diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts index 67d66742..b7ca551b 100644 --- a/apps/api/src/controllers/v1/types.ts +++ b/apps/api/src/controllers/v1/types.ts @@ -78,6 +78,10 @@ export const actionsSchema = z.array(z.union([ type: z.literal("pressKey"), key: z.string(), }), + z.object({ + type: z.literal("scroll"), + direction: z.enum(["up", "down"]), + }), ])); export const scrapeOptions = z.object({ diff --git a/apps/api/src/lib/entities.ts b/apps/api/src/lib/entities.ts index 1186583a..7723f0f2 100644 --- a/apps/api/src/lib/entities.ts +++ b/apps/api/src/lib/entities.ts @@ -25,6 +25,9 @@ export type Action = { } | { type: "pressKey", key: string, +} | { + type: "scroll", + direction: "up" | "down" }; export type PageOptions = { diff --git a/apps/js-sdk/firecrawl/src/index.ts b/apps/js-sdk/firecrawl/src/index.ts index 23241a5d..7004d86f 100644 --- a/apps/js-sdk/firecrawl/src/index.ts +++ b/apps/js-sdk/firecrawl/src/index.ts @@ -99,7 +99,10 @@ export type Action = { } | { type: "pressKey", key: string, -};; +} | { + type: "scroll", + direction: "up" | "down", +}; export interface ScrapeParams extends CrawlScrapeOptions { extract?: {