diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts index f2bb0604..f072ca0b 100644 --- a/apps/api/src/controllers/v1/types.ts +++ b/apps/api/src/controllers/v1/types.ts @@ -88,7 +88,8 @@ export const actionsSchema = z.array(z.union([ }), z.object({ type: z.literal("scroll"), - direction: z.enum(["up", "down"]), + direction: z.enum(["up", "down"]).optional().default("down"), + selector: z.string().optional(), }), z.object({ type: z.literal("scrape"), diff --git a/apps/api/src/lib/entities.ts b/apps/api/src/lib/entities.ts index b13ddcdc..9fa39cff 100644 --- a/apps/api/src/lib/entities.ts +++ b/apps/api/src/lib/entities.ts @@ -30,7 +30,8 @@ export type Action = { key: string, } | { type: "scroll", - direction: "up" | "down" + direction?: "up" | "down", + selector?: string, } | { type: "scrape", } | { diff --git a/apps/js-sdk/firecrawl/package.json b/apps/js-sdk/firecrawl/package.json index 9b23077a..3c2b5290 100644 --- a/apps/js-sdk/firecrawl/package.json +++ b/apps/js-sdk/firecrawl/package.json @@ -1,6 +1,6 @@ { "name": "@mendable/firecrawl-js", - "version": "1.7.3", + "version": "1.8.0", "description": "JavaScript SDK for Firecrawl API", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/apps/js-sdk/firecrawl/src/index.ts b/apps/js-sdk/firecrawl/src/index.ts index 45c67cf8..0bd99457 100644 --- a/apps/js-sdk/firecrawl/src/index.ts +++ b/apps/js-sdk/firecrawl/src/index.ts @@ -108,7 +108,8 @@ export type Action = { key: string, } | { type: "scroll", - direction: "up" | "down", + direction?: "up" | "down", + selector?: string, } | { type: "scrape", } | {