Nick: languages support

This commit is contained in:
Nicolas 2024-10-28 20:16:11 -03:00
parent 877d5e4383
commit 3d1bb82aa2

View File

@ -116,8 +116,10 @@ export const scrapeOptions = z.object({
{ {
message: "Invalid country code. Please use a valid ISO 3166-1 alpha-2 country code.", message: "Invalid country code. Please use a valid ISO 3166-1 alpha-2 country code.",
} }
).transform(val => val ? val.toUpperCase() : 'US') ).transform(val => val ? val.toUpperCase() : 'US'),
languages: z.string().array().optional(),
}).optional(), }).optional(),
// Deprecated // Deprecated
geolocation: z.object({ geolocation: z.object({
country: z.string().optional().refine( country: z.string().optional().refine(
@ -125,7 +127,8 @@ export const scrapeOptions = z.object({
{ {
message: "Invalid country code. Please use a valid ISO 3166-1 alpha-2 country code.", message: "Invalid country code. Please use a valid ISO 3166-1 alpha-2 country code.",
} }
).transform(val => val ? val.toUpperCase() : 'US') ).transform(val => val ? val.toUpperCase() : 'US'),
languages: z.string().array().optional(),
}).optional(), }).optional(),
skipTlsVerification: z.boolean().default(false), skipTlsVerification: z.boolean().default(false),
}).strict(strictMessage) }).strict(strictMessage)