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.",
}
).transform(val => val ? val.toUpperCase() : 'US')
).transform(val => val ? val.toUpperCase() : 'US'),
languages: z.string().array().optional(),
}).optional(),
// Deprecated
geolocation: z.object({
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.",
}
).transform(val => val ? val.toUpperCase() : 'US')
).transform(val => val ? val.toUpperCase() : 'US'),
languages: z.string().array().optional(),
}).optional(),
skipTlsVerification: z.boolean().default(false),
}).strict(strictMessage)