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
commit 219f4732a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 4 deletions

View File

@ -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"),

View File

@ -30,7 +30,8 @@ export type Action = {
key: string,
} | {
type: "scroll",
direction: "up" | "down"
direction?: "up" | "down",
selector?: string,
} | {
type: "scrape",
} | {

View File

@ -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",

View File

@ -108,7 +108,8 @@ export type Action = {
key: string,
} | {
type: "scroll",
direction: "up" | "down",
direction?: "up" | "down",
selector?: string,
} | {
type: "scrape",
} | {