From eac3714c12edb0e954a0436aead12611993be4c8 Mon Sep 17 00:00:00 2001 From: rafaelmmiller <8574157+rafaelmmiller@users.noreply.github.com> Date: Fri, 8 Nov 2024 17:40:45 -0300 Subject: [PATCH 1/3] fixes scroll action --- apps/api/src/controllers/v1/types.ts | 3 ++- apps/api/src/lib/entities.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts index 82b24c22..9b112a58 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 9b68f425..435cf2b8 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", } From e241871b4377f1a9e6a9c03c718d3c2aa58e38e6 Mon Sep 17 00:00:00 2001 From: rafaelmmiller <8574157+rafaelmmiller@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:36:02 -0300 Subject: [PATCH 2/3] fixed scroll action on js sdk --- apps/js-sdk/firecrawl/package.json | 2 +- apps/js-sdk/firecrawl/src/index.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/js-sdk/firecrawl/package.json b/apps/js-sdk/firecrawl/package.json index 9b23077a..22c8ff4f 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.7.4", "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 7ad5a5f0..8bd8aaca 100644 --- a/apps/js-sdk/firecrawl/src/index.ts +++ b/apps/js-sdk/firecrawl/src/index.ts @@ -106,7 +106,8 @@ export type Action = { key: string, } | { type: "scroll", - direction: "up" | "down", + direction?: "up" | "down", + selector?: string, } | { type: "scrape", }; From ddbf3e45a331d1ff1f2e0bf433adb436067d1810 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 11 Nov 2024 14:49:50 -0500 Subject: [PATCH 3/3] Update package.json --- apps/js-sdk/firecrawl/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/js-sdk/firecrawl/package.json b/apps/js-sdk/firecrawl/package.json index 22c8ff4f..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.4", + "version": "1.8.0", "description": "JavaScript SDK for Firecrawl API", "main": "dist/index.js", "types": "dist/index.d.ts",