From 0ee96039452849bd94bd6424f6de95684bb01a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Tue, 15 Apr 2025 02:09:52 -0700 Subject: [PATCH] FIX MORE --- apps/api/src/controllers/v1/types.ts | 10 ++++++---- apps/api/src/types.ts | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts index 8ecaf899..334dea16 100644 --- a/apps/api/src/controllers/v1/types.ts +++ b/apps/api/src/controllers/v1/types.ts @@ -403,10 +403,12 @@ export const scrapeOptions = baseScrapeOptions .refine(fire1Refine, fire1RefineOpts) .transform(extractTransform); -export type ScrapeOptions = z.infer & { - extract: z.infer, - jsonOptions: z.infer, - agent: { +export type BaseScrapeOptions = z.infer; + +export type ScrapeOptions = BaseScrapeOptions & { + extract?: z.infer, + jsonOptions?: z.infer, + agent?: { model: string, prompt: string, sessionId?: string, diff --git a/apps/api/src/types.ts b/apps/api/src/types.ts index 65e3a428..03f0a015 100644 --- a/apps/api/src/types.ts +++ b/apps/api/src/types.ts @@ -1,6 +1,7 @@ import { z } from "zod"; import { AuthCreditUsageChunk, + BaseScrapeOptions, ScrapeOptions, Document as V1Document, webhookSchema, @@ -35,7 +36,7 @@ export interface WebScraperOptions { url: string; mode: Mode; crawlerOptions?: any; - scrapeOptions: ScrapeOptions; + scrapeOptions: BaseScrapeOptions; internalOptions?: InternalOptions; team_id: string; origin?: string;