From 3d1bb82aa27865bfda143a952c4b33b0f8b7b18c Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 28 Oct 2024 20:16:11 -0300 Subject: [PATCH] Nick: languages support --- apps/api/src/controllers/v1/types.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts index 8c60c0fb..633bbdf1 100644 --- a/apps/api/src/controllers/v1/types.ts +++ b/apps/api/src/controllers/v1/types.ts @@ -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)