Merge pull request #881 from mendableai/fix/scroll-action

[BUG] fixes scroll action
This commit is contained in:
Nicolas
2024-11-11 14:50:08 -05:00
committed by GitHub
4 changed files with 7 additions and 4 deletions
+2 -1
View File
@@ -88,7 +88,8 @@ export const actionsSchema = z.array(z.union([
}), }),
z.object({ z.object({
type: z.literal("scroll"), type: z.literal("scroll"),
direction: z.enum(["up", "down"]), direction: z.enum(["up", "down"]).optional().default("down"),
selector: z.string().optional(),
}), }),
z.object({ z.object({
type: z.literal("scrape"), type: z.literal("scrape"),
+2 -1
View File
@@ -30,7 +30,8 @@ export type Action = {
key: string, key: string,
} | { } | {
type: "scroll", type: "scroll",
direction: "up" | "down" direction?: "up" | "down",
selector?: string,
} | { } | {
type: "scrape", type: "scrape",
} | { } | {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@mendable/firecrawl-js", "name": "@mendable/firecrawl-js",
"version": "1.7.3", "version": "1.8.0",
"description": "JavaScript SDK for Firecrawl API", "description": "JavaScript SDK for Firecrawl API",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
+2 -1
View File
@@ -108,7 +108,8 @@ export type Action = {
key: string, key: string,
} | { } | {
type: "scroll", type: "scroll",
direction: "up" | "down", direction?: "up" | "down",
selector?: string,
} | { } | {
type: "scrape", type: "scrape",
} | { } | {