@keystrokehq/scrapfly 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/README.md +17 -0
  2. package/dist/action.cjs +21 -0
  3. package/dist/action.cjs.map +1 -0
  4. package/dist/action.mjs +21 -0
  5. package/dist/action.mjs.map +1 -0
  6. package/dist/actions/capture-screenshot-head.cjs +47 -0
  7. package/dist/actions/capture-screenshot-head.cjs.map +1 -0
  8. package/dist/actions/capture-screenshot-head.d.cts +9 -0
  9. package/dist/actions/capture-screenshot-head.d.cts.map +1 -0
  10. package/dist/actions/capture-screenshot-head.d.mts +9 -0
  11. package/dist/actions/capture-screenshot-head.d.mts.map +1 -0
  12. package/dist/actions/capture-screenshot-head.mjs +44 -0
  13. package/dist/actions/capture-screenshot-head.mjs.map +1 -0
  14. package/dist/actions/capture-screenshot.cjs +41 -0
  15. package/dist/actions/capture-screenshot.cjs.map +1 -0
  16. package/dist/actions/capture-screenshot.d.cts +9 -0
  17. package/dist/actions/capture-screenshot.d.cts.map +1 -0
  18. package/dist/actions/capture-screenshot.d.mts +9 -0
  19. package/dist/actions/capture-screenshot.d.mts.map +1 -0
  20. package/dist/actions/capture-screenshot.mjs +40 -0
  21. package/dist/actions/capture-screenshot.mjs.map +1 -0
  22. package/dist/actions/create-crawler.cjs +29 -0
  23. package/dist/actions/create-crawler.cjs.map +1 -0
  24. package/dist/actions/create-crawler.d.cts +9 -0
  25. package/dist/actions/create-crawler.d.cts.map +1 -0
  26. package/dist/actions/create-crawler.d.mts +9 -0
  27. package/dist/actions/create-crawler.d.mts.map +1 -0
  28. package/dist/actions/create-crawler.mjs +26 -0
  29. package/dist/actions/create-crawler.mjs.map +1 -0
  30. package/dist/actions/extract-data.cjs +57 -0
  31. package/dist/actions/extract-data.cjs.map +1 -0
  32. package/dist/actions/extract-data.d.cts +9 -0
  33. package/dist/actions/extract-data.d.cts.map +1 -0
  34. package/dist/actions/extract-data.d.mts +9 -0
  35. package/dist/actions/extract-data.d.mts.map +1 -0
  36. package/dist/actions/extract-data.mjs +54 -0
  37. package/dist/actions/extract-data.mjs.map +1 -0
  38. package/dist/actions/get-account-info.cjs +88 -0
  39. package/dist/actions/get-account-info.cjs.map +1 -0
  40. package/dist/actions/get-account-info.d.cts +9 -0
  41. package/dist/actions/get-account-info.d.cts.map +1 -0
  42. package/dist/actions/get-account-info.d.mts +9 -0
  43. package/dist/actions/get-account-info.d.mts.map +1 -0
  44. package/dist/actions/get-account-info.mjs +87 -0
  45. package/dist/actions/get-account-info.mjs.map +1 -0
  46. package/dist/actions/get-crawler-artifact.cjs +24 -0
  47. package/dist/actions/get-crawler-artifact.cjs.map +1 -0
  48. package/dist/actions/get-crawler-artifact.d.cts +9 -0
  49. package/dist/actions/get-crawler-artifact.d.cts.map +1 -0
  50. package/dist/actions/get-crawler-artifact.d.mts +9 -0
  51. package/dist/actions/get-crawler-artifact.d.mts.map +1 -0
  52. package/dist/actions/get-crawler-artifact.mjs +23 -0
  53. package/dist/actions/get-crawler-artifact.mjs.map +1 -0
  54. package/dist/actions/get-crawler-contents.cjs +31 -0
  55. package/dist/actions/get-crawler-contents.cjs.map +1 -0
  56. package/dist/actions/get-crawler-contents.d.cts +9 -0
  57. package/dist/actions/get-crawler-contents.d.cts.map +1 -0
  58. package/dist/actions/get-crawler-contents.d.mts +9 -0
  59. package/dist/actions/get-crawler-contents.d.mts.map +1 -0
  60. package/dist/actions/get-crawler-contents.mjs +30 -0
  61. package/dist/actions/get-crawler-contents.mjs.map +1 -0
  62. package/dist/actions/get-crawler-status.cjs +32 -0
  63. package/dist/actions/get-crawler-status.cjs.map +1 -0
  64. package/dist/actions/get-crawler-status.d.cts +9 -0
  65. package/dist/actions/get-crawler-status.d.cts.map +1 -0
  66. package/dist/actions/get-crawler-status.d.mts +9 -0
  67. package/dist/actions/get-crawler-status.d.mts.map +1 -0
  68. package/dist/actions/get-crawler-status.mjs +31 -0
  69. package/dist/actions/get-crawler-status.mjs.map +1 -0
  70. package/dist/actions/get-crawler-urls.cjs +26 -0
  71. package/dist/actions/get-crawler-urls.cjs.map +1 -0
  72. package/dist/actions/get-crawler-urls.d.cts +9 -0
  73. package/dist/actions/get-crawler-urls.d.cts.map +1 -0
  74. package/dist/actions/get-crawler-urls.d.mts +9 -0
  75. package/dist/actions/get-crawler-urls.d.mts.map +1 -0
  76. package/dist/actions/get-crawler-urls.mjs +23 -0
  77. package/dist/actions/get-crawler-urls.mjs.map +1 -0
  78. package/dist/actions/index.cjs +25 -0
  79. package/dist/actions/index.d.cts +13 -0
  80. package/dist/actions/index.d.mts +13 -0
  81. package/dist/actions/index.mjs +13 -0
  82. package/dist/actions/scrape-post.cjs +38 -0
  83. package/dist/actions/scrape-post.cjs.map +1 -0
  84. package/dist/actions/scrape-post.d.cts +9 -0
  85. package/dist/actions/scrape-post.d.cts.map +1 -0
  86. package/dist/actions/scrape-post.d.mts +9 -0
  87. package/dist/actions/scrape-post.d.mts.map +1 -0
  88. package/dist/actions/scrape-post.mjs +35 -0
  89. package/dist/actions/scrape-post.mjs.map +1 -0
  90. package/dist/actions/scrape-with-put.cjs +38 -0
  91. package/dist/actions/scrape-with-put.cjs.map +1 -0
  92. package/dist/actions/scrape-with-put.d.cts +9 -0
  93. package/dist/actions/scrape-with-put.d.cts.map +1 -0
  94. package/dist/actions/scrape-with-put.d.mts +9 -0
  95. package/dist/actions/scrape-with-put.d.mts.map +1 -0
  96. package/dist/actions/scrape-with-put.mjs +35 -0
  97. package/dist/actions/scrape-with-put.mjs.map +1 -0
  98. package/dist/actions/scrape.cjs +47 -0
  99. package/dist/actions/scrape.cjs.map +1 -0
  100. package/dist/actions/scrape.d.cts +9 -0
  101. package/dist/actions/scrape.d.cts.map +1 -0
  102. package/dist/actions/scrape.d.mts +9 -0
  103. package/dist/actions/scrape.d.mts.map +1 -0
  104. package/dist/actions/scrape.mjs +44 -0
  105. package/dist/actions/scrape.mjs.map +1 -0
  106. package/dist/app.cjs +9 -0
  107. package/dist/app.cjs.map +1 -0
  108. package/dist/app.d.cts +5 -0
  109. package/dist/app.d.cts.map +1 -0
  110. package/dist/app.d.mts +5 -0
  111. package/dist/app.d.mts.map +1 -0
  112. package/dist/app.mjs +10 -0
  113. package/dist/app.mjs.map +1 -0
  114. package/dist/catalog.cjs +15 -0
  115. package/dist/catalog.cjs.map +1 -0
  116. package/dist/catalog.d.cts +14 -0
  117. package/dist/catalog.d.cts.map +1 -0
  118. package/dist/catalog.d.mts +14 -0
  119. package/dist/catalog.d.mts.map +1 -0
  120. package/dist/catalog.mjs +15 -0
  121. package/dist/catalog.mjs.map +1 -0
  122. package/dist/execute.cjs +18 -0
  123. package/dist/execute.cjs.map +1 -0
  124. package/dist/execute.mjs +18 -0
  125. package/dist/execute.mjs.map +1 -0
  126. package/dist/index.cjs +30 -0
  127. package/dist/index.d.cts +15 -0
  128. package/dist/index.d.mts +15 -0
  129. package/dist/index.mjs +16 -0
  130. package/package.json +49 -0
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @keystrokehq/scrapfly
2
+
3
+ Keystroke-managed integration.
4
+
5
+ **App:** `scrapfly`
6
+ **Version:** `20260615_00`
7
+ **Actions:** 12
8
+
9
+ ```ts
10
+ import { defineAgent } from "@keystrokehq/keystroke/agent";
11
+ import { scrapflyCaptureScreenshot } from "@keystrokehq/scrapfly/actions";
12
+
13
+ export default defineAgent({
14
+ key: "scrapfly-agent",
15
+ tools: [scrapflyCaptureScreenshot],
16
+ });
17
+ ```
@@ -0,0 +1,21 @@
1
+ const require_app = require("./app.cjs");
2
+ const require_execute = require("./execute.cjs");
3
+ require("zod");
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return require_app.scrapfly.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await require_execute.executeScrapflyTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ exports.action = action;
20
+
21
+ //# sourceMappingURL=action.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.cjs","names":["scrapfly","executeScrapflyTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { scrapfly } from \"./app\";\nimport { executeScrapflyTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return scrapfly.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeScrapflyTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,SAAS,OAAO;EACrB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,oBAAoB,MAAM,KAAgC,CAAC;EAC3F;CACF,CAAC;AACH"}
@@ -0,0 +1,21 @@
1
+ import { scrapfly } from "./app.mjs";
2
+ import { executeScrapflyTool } from "./execute.mjs";
3
+ import "zod";
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return scrapfly.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await executeScrapflyTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ export { action };
20
+
21
+ //# sourceMappingURL=action.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { scrapfly } from \"./app\";\nimport { executeScrapflyTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return scrapfly.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeScrapflyTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,SAAS,OAAO;EACrB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,oBAAoB,MAAM,KAAgC,CAAC;EAC3F;CACF,CAAC;AACH"}
@@ -0,0 +1,47 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/capture-screenshot-head.ts
4
+ const ScrapflyCaptureScreenshotHeadInput = zod.z.object({
5
+ js: zod.z.string().describe("Base64-encoded JavaScript to execute on the page before screenshot (max 16KB).").optional(),
6
+ url: zod.z.string().describe("Target URL to capture screenshot of."),
7
+ cache: zod.z.boolean().describe("Enable caching for repeated requests. Default is false.").optional(),
8
+ format: zod.z.enum([
9
+ "jpg",
10
+ "png",
11
+ "webp",
12
+ "gif"
13
+ ]).describe("Image format options for screenshot.").optional(),
14
+ capture: zod.z.string().describe("Capture area: 'viewport' for visible area, 'fullpage' for entire page, or a CSS selector/XPath for specific element.").optional(),
15
+ country: zod.z.string().describe("Proxy location using ISO 3166 alpha-2 country code (e.g., 'US', 'FR', 'DE'). Default is 'us'.").optional(),
16
+ options: zod.z.string().describe("Comma-separated flags: 'dark_mode' for dark theme, 'block_banners' to hide ads/popups, 'print_media_format' for print styles.").optional(),
17
+ timeout: zod.z.number().int().describe("Maximum request time in milliseconds (range: 60000-120000). Default is 60000.").optional(),
18
+ cache_ttl: zod.z.number().int().describe("Cache duration in seconds. Default is 86400 (24 hours).").optional(),
19
+ resolution: zod.z.string().describe("Screen dimensions as widthxheight (e.g., '1920x1080'). Default is 1920x1080.").optional(),
20
+ auto_scroll: zod.z.boolean().describe("Auto-scroll to bottom of page to trigger lazy-loaded content. Default is false.").optional(),
21
+ cache_clear: zod.z.boolean().describe("Force cache refresh by clearing existing cached result. Default is false.").optional(),
22
+ rendering_wait: zod.z.number().int().describe("Delay after page load before capturing screenshot, in milliseconds. Default is 1000.").optional(),
23
+ vision_deficiency: zod.z.enum([
24
+ "none",
25
+ "deuteranopia",
26
+ "protanopia",
27
+ "tritanopia",
28
+ "achromatopsia",
29
+ "blurredVision"
30
+ ]).describe("Accessibility simulation options for vision deficiency.").optional(),
31
+ wait_for_selector: zod.z.string().describe("CSS selector or XPath to wait for before capturing screenshot.").optional()
32
+ }).describe("Request model for capturing screenshot metadata without returning the image body.");
33
+ const ScrapflyCaptureScreenshotHeadOutput = zod.z.object({
34
+ success: zod.z.boolean().describe("Whether the screenshot was captured successfully."),
35
+ screenshot_url: zod.z.string().describe("URL to download the captured screenshot image.")
36
+ }).describe("Response model for screenshot HEAD request containing metadata.");
37
+ const scrapflyCaptureScreenshotHead = require_action.action("SCRAPFLY_CAPTURE_SCREENSHOT_HEAD", {
38
+ slug: "scrapfly-capture-screenshot-head",
39
+ name: "Capture Screenshot Metadata (HEAD)",
40
+ description: "Tool to capture screenshot metadata without downloading the image body. Use this for async screenshot workflows where you need the URL to retrieve the image later. Returns the screenshot URL in response, saving bandwidth compared to full screenshot retrieval.",
41
+ input: ScrapflyCaptureScreenshotHeadInput,
42
+ output: ScrapflyCaptureScreenshotHeadOutput
43
+ });
44
+ //#endregion
45
+ exports.scrapflyCaptureScreenshotHead = scrapflyCaptureScreenshotHead;
46
+
47
+ //# sourceMappingURL=capture-screenshot-head.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-screenshot-head.cjs","names":["z","action"],"sources":["../../src/actions/capture-screenshot-head.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapflyCaptureScreenshotHeadInput: z.ZodTypeAny = z.object({\n js: z.string().describe(\"Base64-encoded JavaScript to execute on the page before screenshot (max 16KB).\").optional(),\n url: z.string().describe(\"Target URL to capture screenshot of.\"),\n cache: z.boolean().describe(\"Enable caching for repeated requests. Default is false.\").optional(),\n format: z.enum([\"jpg\", \"png\", \"webp\", \"gif\"]).describe(\"Image format options for screenshot.\").optional(),\n capture: z.string().describe(\"Capture area: 'viewport' for visible area, 'fullpage' for entire page, or a CSS selector/XPath for specific element.\").optional(),\n country: z.string().describe(\"Proxy location using ISO 3166 alpha-2 country code (e.g., 'US', 'FR', 'DE'). Default is 'us'.\").optional(),\n options: z.string().describe(\"Comma-separated flags: 'dark_mode' for dark theme, 'block_banners' to hide ads/popups, 'print_media_format' for print styles.\").optional(),\n timeout: z.number().int().describe(\"Maximum request time in milliseconds (range: 60000-120000). Default is 60000.\").optional(),\n cache_ttl: z.number().int().describe(\"Cache duration in seconds. Default is 86400 (24 hours).\").optional(),\n resolution: z.string().describe(\"Screen dimensions as widthxheight (e.g., '1920x1080'). Default is 1920x1080.\").optional(),\n auto_scroll: z.boolean().describe(\"Auto-scroll to bottom of page to trigger lazy-loaded content. Default is false.\").optional(),\n cache_clear: z.boolean().describe(\"Force cache refresh by clearing existing cached result. Default is false.\").optional(),\n rendering_wait: z.number().int().describe(\"Delay after page load before capturing screenshot, in milliseconds. Default is 1000.\").optional(),\n vision_deficiency: z.enum([\"none\", \"deuteranopia\", \"protanopia\", \"tritanopia\", \"achromatopsia\", \"blurredVision\"]).describe(\"Accessibility simulation options for vision deficiency.\").optional(),\n wait_for_selector: z.string().describe(\"CSS selector or XPath to wait for before capturing screenshot.\").optional(),\n}).describe(\"Request model for capturing screenshot metadata without returning the image body.\");\nexport const ScrapflyCaptureScreenshotHeadOutput: z.ZodTypeAny = z.object({\n success: z.boolean().describe(\"Whether the screenshot was captured successfully.\"),\n screenshot_url: z.string().describe(\"URL to download the captured screenshot image.\"),\n}).describe(\"Response model for screenshot HEAD request containing metadata.\");\n\nexport const scrapflyCaptureScreenshotHead = action(\"SCRAPFLY_CAPTURE_SCREENSHOT_HEAD\", {\n slug: \"scrapfly-capture-screenshot-head\",\n name: \"Capture Screenshot Metadata (HEAD)\",\n description: \"Tool to capture screenshot metadata without downloading the image body. Use this for async screenshot workflows where you need the URL to retrieve the image later. Returns the screenshot URL in response, saving bandwidth compared to full screenshot retrieval.\",\n input: ScrapflyCaptureScreenshotHeadInput,\n output: ScrapflyCaptureScreenshotHeadOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qCAAmDA,IAAAA,EAAE,OAAO;CACvE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gFAAgF,CAAC,CAAC,SAAS;CACnH,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;CAC/D,OAAOA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;CAChG,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAO;EAAO;EAAQ;CAAK,CAAC,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;CACxG,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,sHAAsH,CAAC,CAAC,SAAS;CAC9J,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+FAA+F,CAAC,CAAC,SAAS;CACvI,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+HAA+H,CAAC,CAAC,SAAS;CACvK,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+EAA+E,CAAC,CAAC,SAAS;CAC7H,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;CACzG,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS;CACzH,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CAC9H,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,2EAA2E,CAAC,CAAC,SAAS;CACxH,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CAC3I,mBAAmBA,IAAAA,EAAE,KAAK;EAAC;EAAQ;EAAgB;EAAc;EAAc;EAAiB;CAAe,CAAC,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;CAC/L,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;AACpH,CAAC,CAAC,CAAC,SAAS,mFAAmF;AAC/F,MAAa,sCAAoDA,IAAAA,EAAE,OAAO;CACxE,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mDAAmD;CACjF,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD;AACtF,CAAC,CAAC,CAAC,SAAS,iEAAiE;AAE7E,MAAa,gCAAgCC,eAAAA,OAAO,oCAAoC;CACtF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/capture-screenshot-head.d.ts
4
+ declare const ScrapflyCaptureScreenshotHeadInput: z.ZodTypeAny;
5
+ declare const ScrapflyCaptureScreenshotHeadOutput: z.ZodTypeAny;
6
+ declare const scrapflyCaptureScreenshotHead: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { scrapflyCaptureScreenshotHead };
9
+ //# sourceMappingURL=capture-screenshot-head.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-screenshot-head.d.cts","names":[],"sources":["../../src/actions/capture-screenshot-head.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAgB6C;AAAA,cACnF,mCAAA,EAAqC,CAAA,CAAE,UAG0B;AAAA,cAEjE,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/capture-screenshot-head.d.ts
4
+ declare const ScrapflyCaptureScreenshotHeadInput: z.ZodTypeAny;
5
+ declare const ScrapflyCaptureScreenshotHeadOutput: z.ZodTypeAny;
6
+ declare const scrapflyCaptureScreenshotHead: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { scrapflyCaptureScreenshotHead };
9
+ //# sourceMappingURL=capture-screenshot-head.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-screenshot-head.d.mts","names":[],"sources":["../../src/actions/capture-screenshot-head.ts"],"mappings":";;;cAIa,kCAAA,EAAoC,CAAA,CAAE,UAgB6C;AAAA,cACnF,mCAAA,EAAqC,CAAA,CAAE,UAG0B;AAAA,cAEjE,6BAAA,gCAA6B,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,44 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const scrapflyCaptureScreenshotHead = action("SCRAPFLY_CAPTURE_SCREENSHOT_HEAD", {
4
+ slug: "scrapfly-capture-screenshot-head",
5
+ name: "Capture Screenshot Metadata (HEAD)",
6
+ description: "Tool to capture screenshot metadata without downloading the image body. Use this for async screenshot workflows where you need the URL to retrieve the image later. Returns the screenshot URL in response, saving bandwidth compared to full screenshot retrieval.",
7
+ input: z.object({
8
+ js: z.string().describe("Base64-encoded JavaScript to execute on the page before screenshot (max 16KB).").optional(),
9
+ url: z.string().describe("Target URL to capture screenshot of."),
10
+ cache: z.boolean().describe("Enable caching for repeated requests. Default is false.").optional(),
11
+ format: z.enum([
12
+ "jpg",
13
+ "png",
14
+ "webp",
15
+ "gif"
16
+ ]).describe("Image format options for screenshot.").optional(),
17
+ capture: z.string().describe("Capture area: 'viewport' for visible area, 'fullpage' for entire page, or a CSS selector/XPath for specific element.").optional(),
18
+ country: z.string().describe("Proxy location using ISO 3166 alpha-2 country code (e.g., 'US', 'FR', 'DE'). Default is 'us'.").optional(),
19
+ options: z.string().describe("Comma-separated flags: 'dark_mode' for dark theme, 'block_banners' to hide ads/popups, 'print_media_format' for print styles.").optional(),
20
+ timeout: z.number().int().describe("Maximum request time in milliseconds (range: 60000-120000). Default is 60000.").optional(),
21
+ cache_ttl: z.number().int().describe("Cache duration in seconds. Default is 86400 (24 hours).").optional(),
22
+ resolution: z.string().describe("Screen dimensions as widthxheight (e.g., '1920x1080'). Default is 1920x1080.").optional(),
23
+ auto_scroll: z.boolean().describe("Auto-scroll to bottom of page to trigger lazy-loaded content. Default is false.").optional(),
24
+ cache_clear: z.boolean().describe("Force cache refresh by clearing existing cached result. Default is false.").optional(),
25
+ rendering_wait: z.number().int().describe("Delay after page load before capturing screenshot, in milliseconds. Default is 1000.").optional(),
26
+ vision_deficiency: z.enum([
27
+ "none",
28
+ "deuteranopia",
29
+ "protanopia",
30
+ "tritanopia",
31
+ "achromatopsia",
32
+ "blurredVision"
33
+ ]).describe("Accessibility simulation options for vision deficiency.").optional(),
34
+ wait_for_selector: z.string().describe("CSS selector or XPath to wait for before capturing screenshot.").optional()
35
+ }).describe("Request model for capturing screenshot metadata without returning the image body."),
36
+ output: z.object({
37
+ success: z.boolean().describe("Whether the screenshot was captured successfully."),
38
+ screenshot_url: z.string().describe("URL to download the captured screenshot image.")
39
+ }).describe("Response model for screenshot HEAD request containing metadata.")
40
+ });
41
+ //#endregion
42
+ export { scrapflyCaptureScreenshotHead };
43
+
44
+ //# sourceMappingURL=capture-screenshot-head.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-screenshot-head.mjs","names":[],"sources":["../../src/actions/capture-screenshot-head.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapflyCaptureScreenshotHeadInput: z.ZodTypeAny = z.object({\n js: z.string().describe(\"Base64-encoded JavaScript to execute on the page before screenshot (max 16KB).\").optional(),\n url: z.string().describe(\"Target URL to capture screenshot of.\"),\n cache: z.boolean().describe(\"Enable caching for repeated requests. Default is false.\").optional(),\n format: z.enum([\"jpg\", \"png\", \"webp\", \"gif\"]).describe(\"Image format options for screenshot.\").optional(),\n capture: z.string().describe(\"Capture area: 'viewport' for visible area, 'fullpage' for entire page, or a CSS selector/XPath for specific element.\").optional(),\n country: z.string().describe(\"Proxy location using ISO 3166 alpha-2 country code (e.g., 'US', 'FR', 'DE'). Default is 'us'.\").optional(),\n options: z.string().describe(\"Comma-separated flags: 'dark_mode' for dark theme, 'block_banners' to hide ads/popups, 'print_media_format' for print styles.\").optional(),\n timeout: z.number().int().describe(\"Maximum request time in milliseconds (range: 60000-120000). Default is 60000.\").optional(),\n cache_ttl: z.number().int().describe(\"Cache duration in seconds. Default is 86400 (24 hours).\").optional(),\n resolution: z.string().describe(\"Screen dimensions as widthxheight (e.g., '1920x1080'). Default is 1920x1080.\").optional(),\n auto_scroll: z.boolean().describe(\"Auto-scroll to bottom of page to trigger lazy-loaded content. Default is false.\").optional(),\n cache_clear: z.boolean().describe(\"Force cache refresh by clearing existing cached result. Default is false.\").optional(),\n rendering_wait: z.number().int().describe(\"Delay after page load before capturing screenshot, in milliseconds. Default is 1000.\").optional(),\n vision_deficiency: z.enum([\"none\", \"deuteranopia\", \"protanopia\", \"tritanopia\", \"achromatopsia\", \"blurredVision\"]).describe(\"Accessibility simulation options for vision deficiency.\").optional(),\n wait_for_selector: z.string().describe(\"CSS selector or XPath to wait for before capturing screenshot.\").optional(),\n}).describe(\"Request model for capturing screenshot metadata without returning the image body.\");\nexport const ScrapflyCaptureScreenshotHeadOutput: z.ZodTypeAny = z.object({\n success: z.boolean().describe(\"Whether the screenshot was captured successfully.\"),\n screenshot_url: z.string().describe(\"URL to download the captured screenshot image.\"),\n}).describe(\"Response model for screenshot HEAD request containing metadata.\");\n\nexport const scrapflyCaptureScreenshotHead = action(\"SCRAPFLY_CAPTURE_SCREENSHOT_HEAD\", {\n slug: \"scrapfly-capture-screenshot-head\",\n name: \"Capture Screenshot Metadata (HEAD)\",\n description: \"Tool to capture screenshot metadata without downloading the image body. Use this for async screenshot workflows where you need the URL to retrieve the image later. Returns the screenshot URL in response, saving bandwidth compared to full screenshot retrieval.\",\n input: ScrapflyCaptureScreenshotHeadInput,\n output: ScrapflyCaptureScreenshotHeadOutput,\n});\n"],"mappings":";;AA0BA,MAAa,gCAAgC,OAAO,oCAAoC;CACtF,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA1B8D,EAAE,OAAO;EACvE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,gFAAgF,CAAC,CAAC,SAAS;EACnH,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,sCAAsC;EAC/D,OAAO,EAAE,QAAQ,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;EAChG,QAAQ,EAAE,KAAK;GAAC;GAAO;GAAO;GAAQ;EAAK,CAAC,CAAC,CAAC,SAAS,sCAAsC,CAAC,CAAC,SAAS;EACxG,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,sHAAsH,CAAC,CAAC,SAAS;EAC9J,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,+FAA+F,CAAC,CAAC,SAAS;EACvI,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,+HAA+H,CAAC,CAAC,SAAS;EACvK,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+EAA+E,CAAC,CAAC,SAAS;EAC7H,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;EACzG,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,8EAA8E,CAAC,CAAC,SAAS;EACzH,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;EAC9H,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,2EAA2E,CAAC,CAAC,SAAS;EACxH,gBAAgB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;EAC3I,mBAAmB,EAAE,KAAK;GAAC;GAAQ;GAAgB;GAAc;GAAc;GAAiB;EAAe,CAAC,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;EAC/L,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;CACpH,CAAC,CAAC,CAAC,SAAS,mFAUH;CACP,QAV+D,EAAE,OAAO;EACxE,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,mDAAmD;EACjF,gBAAgB,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD;CACtF,CAAC,CAAC,CAAC,SAAS,iEAOF;AACV,CAAC"}
@@ -0,0 +1,41 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/capture-screenshot.ts
4
+ const ScrapflyCaptureScreenshotInput = zod.z.object({
5
+ js: zod.z.string().describe("JavaScript code to execute on the page before capturing screenshot.").optional(),
6
+ url: zod.z.string().describe("Target URL to capture a screenshot of."),
7
+ cache: zod.z.boolean().describe("Enable caching of the screenshot result.").optional(),
8
+ format: zod.z.enum([
9
+ "jpg",
10
+ "png",
11
+ "webp",
12
+ "gif"
13
+ ]).default("jpg").describe("Screenshot image format (jpg, png, webp, or gif). Default is jpg.").optional(),
14
+ capture: zod.z.string().describe("Area to capture: 'viewport' for visible area, 'fullpage' for entire page, or a CSS/XPath selector for a specific element. Default is viewport.").optional(),
15
+ country: zod.z.string().describe("Proxy geolocation country code (e.g., 'US', 'FR', 'DE') to capture screenshot from that region.").optional(),
16
+ options: zod.z.string().describe("Comma-separated screenshot options: 'dark_mode' for dark theme, 'block_banners' to hide cookie/privacy banners, 'print_media_format' for print styles.").optional(),
17
+ timeout: zod.z.number().int().describe("Request timeout in milliseconds. Default is 30000 (30 seconds).").optional(),
18
+ cache_ttl: zod.z.number().int().describe("Cache time-to-live in seconds. Only applies when cache is enabled.").optional(),
19
+ resolution: zod.z.string().describe("Screen resolution in WIDTHxHEIGHT format (e.g., '1920x1080'). Default is 1920x1080.").optional(),
20
+ auto_scroll: zod.z.boolean().describe("Automatically scroll down the page before capturing. Useful for lazy-loaded content.").optional(),
21
+ cache_clear: zod.z.boolean().describe("Clear and refresh cache for this request.").optional(),
22
+ rendering_wait: zod.z.number().int().describe("Time to wait after page load before capturing screenshot, in milliseconds. Useful for waiting for dynamic content.").optional(),
23
+ wait_for_selector: zod.z.string().describe("CSS selector or XPath to wait for before capturing. Screenshot is taken after this element appears.").optional()
24
+ }).describe("Request model for capturing a screenshot of a web page.");
25
+ const ScrapflyCaptureScreenshot_FileDownloadableSchema = zod.z.object({
26
+ name: zod.z.string().describe("Name of the file"),
27
+ s3url: zod.z.string().describe("S3 URL of the downloaded file."),
28
+ mimetype: zod.z.string().describe("Mime type of the file.")
29
+ });
30
+ const ScrapflyCaptureScreenshotOutput = zod.z.object({ screenshot: ScrapflyCaptureScreenshot_FileDownloadableSchema.nullable() }).describe("Response model for screenshot capture containing the image file.");
31
+ const scrapflyCaptureScreenshot = require_action.action("SCRAPFLY_CAPTURE_SCREENSHOT", {
32
+ slug: "scrapfly-capture-screenshot",
33
+ name: "Capture Website Screenshot",
34
+ description: "Tool to capture a full-page or viewport screenshot of a website. Use when you need to take a screenshot with options like JS rendering, custom resolution, or accessibility testing. Returns the screenshot image directly. Supports vision deficiency simulations and dark mode.",
35
+ input: ScrapflyCaptureScreenshotInput,
36
+ output: ScrapflyCaptureScreenshotOutput
37
+ });
38
+ //#endregion
39
+ exports.scrapflyCaptureScreenshot = scrapflyCaptureScreenshot;
40
+
41
+ //# sourceMappingURL=capture-screenshot.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-screenshot.cjs","names":["z","action"],"sources":["../../src/actions/capture-screenshot.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapflyCaptureScreenshotInput: z.ZodTypeAny = z.object({\n js: z.string().describe(\"JavaScript code to execute on the page before capturing screenshot.\").optional(),\n url: z.string().describe(\"Target URL to capture a screenshot of.\"),\n cache: z.boolean().describe(\"Enable caching of the screenshot result.\").optional(),\n format: z.enum([\"jpg\", \"png\", \"webp\", \"gif\"]).default(\"jpg\").describe(\"Screenshot image format (jpg, png, webp, or gif). Default is jpg.\").optional(),\n capture: z.string().describe(\"Area to capture: 'viewport' for visible area, 'fullpage' for entire page, or a CSS/XPath selector for a specific element. Default is viewport.\").optional(),\n country: z.string().describe(\"Proxy geolocation country code (e.g., 'US', 'FR', 'DE') to capture screenshot from that region.\").optional(),\n options: z.string().describe(\"Comma-separated screenshot options: 'dark_mode' for dark theme, 'block_banners' to hide cookie/privacy banners, 'print_media_format' for print styles.\").optional(),\n timeout: z.number().int().describe(\"Request timeout in milliseconds. Default is 30000 (30 seconds).\").optional(),\n cache_ttl: z.number().int().describe(\"Cache time-to-live in seconds. Only applies when cache is enabled.\").optional(),\n resolution: z.string().describe(\"Screen resolution in WIDTHxHEIGHT format (e.g., '1920x1080'). Default is 1920x1080.\").optional(),\n auto_scroll: z.boolean().describe(\"Automatically scroll down the page before capturing. Useful for lazy-loaded content.\").optional(),\n cache_clear: z.boolean().describe(\"Clear and refresh cache for this request.\").optional(),\n rendering_wait: z.number().int().describe(\"Time to wait after page load before capturing screenshot, in milliseconds. Useful for waiting for dynamic content.\").optional(),\n wait_for_selector: z.string().describe(\"CSS selector or XPath to wait for before capturing. Screenshot is taken after this element appears.\").optional(),\n}).describe(\"Request model for capturing a screenshot of a web page.\");\nconst ScrapflyCaptureScreenshot_FileDownloadableSchema: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Name of the file\"),\n s3url: z.string().describe(\"S3 URL of the downloaded file.\"),\n mimetype: z.string().describe(\"Mime type of the file.\"),\n});\nexport const ScrapflyCaptureScreenshotOutput: z.ZodTypeAny = z.object({\n screenshot: ScrapflyCaptureScreenshot_FileDownloadableSchema.nullable(),\n}).describe(\"Response model for screenshot capture containing the image file.\");\n\nexport const scrapflyCaptureScreenshot = action(\"SCRAPFLY_CAPTURE_SCREENSHOT\", {\n slug: \"scrapfly-capture-screenshot\",\n name: \"Capture Website Screenshot\",\n description: \"Tool to capture a full-page or viewport screenshot of a website. Use when you need to take a screenshot with options like JS rendering, custom resolution, or accessibility testing. Returns the screenshot image directly. Supports vision deficiency simulations and dark mode.\",\n input: ScrapflyCaptureScreenshotInput,\n output: ScrapflyCaptureScreenshotOutput,\n});\n"],"mappings":";;;AAIA,MAAa,iCAA+CA,IAAAA,EAAE,OAAO;CACnE,IAAIA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;CACxG,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;CACjE,OAAOA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CACjF,QAAQA,IAAAA,EAAE,KAAK;EAAC;EAAO;EAAO;EAAQ;CAAK,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS;CACpJ,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gJAAgJ,CAAC,CAAC,SAAS;CACxL,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iGAAiG,CAAC,CAAC,SAAS;CACzI,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wJAAwJ,CAAC,CAAC,SAAS;CAChM,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC/G,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CACpH,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qFAAqF,CAAC,CAAC,SAAS;CAChI,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CACnI,aAAaA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACxF,gBAAgBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oHAAoH,CAAC,CAAC,SAAS;CACzK,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qGAAqG,CAAC,CAAC,SAAS;AACzJ,CAAC,CAAC,CAAC,SAAS,yDAAyD;AACrE,MAAM,mDAAiEA,IAAAA,EAAE,OAAO;CAC9E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB;CAC5C,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CAC3D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB;AACxD,CAAC;AACD,MAAa,kCAAgDA,IAAAA,EAAE,OAAO,EACpE,YAAY,iDAAiD,SAAS,EACxE,CAAC,CAAC,CAAC,SAAS,kEAAkE;AAE9E,MAAa,4BAA4BC,eAAAA,OAAO,+BAA+B;CAC7E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/capture-screenshot.d.ts
4
+ declare const ScrapflyCaptureScreenshotInput: z.ZodTypeAny;
5
+ declare const ScrapflyCaptureScreenshotOutput: z.ZodTypeAny;
6
+ declare const scrapflyCaptureScreenshot: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { scrapflyCaptureScreenshot };
9
+ //# sourceMappingURL=capture-screenshot.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-screenshot.d.cts","names":[],"sources":["../../src/actions/capture-screenshot.ts"],"mappings":";;;cAIa,8BAAA,EAAgC,CAAA,CAAE,UAeuB;AAAA,cAMzD,+BAAA,EAAiC,CAAA,CAAE,UAE+B;AAAA,cAElE,yBAAA,gCAAyB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/capture-screenshot.d.ts
4
+ declare const ScrapflyCaptureScreenshotInput: z.ZodTypeAny;
5
+ declare const ScrapflyCaptureScreenshotOutput: z.ZodTypeAny;
6
+ declare const scrapflyCaptureScreenshot: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { scrapflyCaptureScreenshot };
9
+ //# sourceMappingURL=capture-screenshot.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-screenshot.d.mts","names":[],"sources":["../../src/actions/capture-screenshot.ts"],"mappings":";;;cAIa,8BAAA,EAAgC,CAAA,CAAE,UAeuB;AAAA,cAMzD,+BAAA,EAAiC,CAAA,CAAE,UAE+B;AAAA,cAElE,yBAAA,gCAAyB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,40 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/capture-screenshot.ts
4
+ const ScrapflyCaptureScreenshotInput = z.object({
5
+ js: z.string().describe("JavaScript code to execute on the page before capturing screenshot.").optional(),
6
+ url: z.string().describe("Target URL to capture a screenshot of."),
7
+ cache: z.boolean().describe("Enable caching of the screenshot result.").optional(),
8
+ format: z.enum([
9
+ "jpg",
10
+ "png",
11
+ "webp",
12
+ "gif"
13
+ ]).default("jpg").describe("Screenshot image format (jpg, png, webp, or gif). Default is jpg.").optional(),
14
+ capture: z.string().describe("Area to capture: 'viewport' for visible area, 'fullpage' for entire page, or a CSS/XPath selector for a specific element. Default is viewport.").optional(),
15
+ country: z.string().describe("Proxy geolocation country code (e.g., 'US', 'FR', 'DE') to capture screenshot from that region.").optional(),
16
+ options: z.string().describe("Comma-separated screenshot options: 'dark_mode' for dark theme, 'block_banners' to hide cookie/privacy banners, 'print_media_format' for print styles.").optional(),
17
+ timeout: z.number().int().describe("Request timeout in milliseconds. Default is 30000 (30 seconds).").optional(),
18
+ cache_ttl: z.number().int().describe("Cache time-to-live in seconds. Only applies when cache is enabled.").optional(),
19
+ resolution: z.string().describe("Screen resolution in WIDTHxHEIGHT format (e.g., '1920x1080'). Default is 1920x1080.").optional(),
20
+ auto_scroll: z.boolean().describe("Automatically scroll down the page before capturing. Useful for lazy-loaded content.").optional(),
21
+ cache_clear: z.boolean().describe("Clear and refresh cache for this request.").optional(),
22
+ rendering_wait: z.number().int().describe("Time to wait after page load before capturing screenshot, in milliseconds. Useful for waiting for dynamic content.").optional(),
23
+ wait_for_selector: z.string().describe("CSS selector or XPath to wait for before capturing. Screenshot is taken after this element appears.").optional()
24
+ }).describe("Request model for capturing a screenshot of a web page.");
25
+ const ScrapflyCaptureScreenshot_FileDownloadableSchema = z.object({
26
+ name: z.string().describe("Name of the file"),
27
+ s3url: z.string().describe("S3 URL of the downloaded file."),
28
+ mimetype: z.string().describe("Mime type of the file.")
29
+ });
30
+ const scrapflyCaptureScreenshot = action("SCRAPFLY_CAPTURE_SCREENSHOT", {
31
+ slug: "scrapfly-capture-screenshot",
32
+ name: "Capture Website Screenshot",
33
+ description: "Tool to capture a full-page or viewport screenshot of a website. Use when you need to take a screenshot with options like JS rendering, custom resolution, or accessibility testing. Returns the screenshot image directly. Supports vision deficiency simulations and dark mode.",
34
+ input: ScrapflyCaptureScreenshotInput,
35
+ output: z.object({ screenshot: ScrapflyCaptureScreenshot_FileDownloadableSchema.nullable() }).describe("Response model for screenshot capture containing the image file.")
36
+ });
37
+ //#endregion
38
+ export { scrapflyCaptureScreenshot };
39
+
40
+ //# sourceMappingURL=capture-screenshot.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture-screenshot.mjs","names":[],"sources":["../../src/actions/capture-screenshot.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapflyCaptureScreenshotInput: z.ZodTypeAny = z.object({\n js: z.string().describe(\"JavaScript code to execute on the page before capturing screenshot.\").optional(),\n url: z.string().describe(\"Target URL to capture a screenshot of.\"),\n cache: z.boolean().describe(\"Enable caching of the screenshot result.\").optional(),\n format: z.enum([\"jpg\", \"png\", \"webp\", \"gif\"]).default(\"jpg\").describe(\"Screenshot image format (jpg, png, webp, or gif). Default is jpg.\").optional(),\n capture: z.string().describe(\"Area to capture: 'viewport' for visible area, 'fullpage' for entire page, or a CSS/XPath selector for a specific element. Default is viewport.\").optional(),\n country: z.string().describe(\"Proxy geolocation country code (e.g., 'US', 'FR', 'DE') to capture screenshot from that region.\").optional(),\n options: z.string().describe(\"Comma-separated screenshot options: 'dark_mode' for dark theme, 'block_banners' to hide cookie/privacy banners, 'print_media_format' for print styles.\").optional(),\n timeout: z.number().int().describe(\"Request timeout in milliseconds. Default is 30000 (30 seconds).\").optional(),\n cache_ttl: z.number().int().describe(\"Cache time-to-live in seconds. Only applies when cache is enabled.\").optional(),\n resolution: z.string().describe(\"Screen resolution in WIDTHxHEIGHT format (e.g., '1920x1080'). Default is 1920x1080.\").optional(),\n auto_scroll: z.boolean().describe(\"Automatically scroll down the page before capturing. Useful for lazy-loaded content.\").optional(),\n cache_clear: z.boolean().describe(\"Clear and refresh cache for this request.\").optional(),\n rendering_wait: z.number().int().describe(\"Time to wait after page load before capturing screenshot, in milliseconds. Useful for waiting for dynamic content.\").optional(),\n wait_for_selector: z.string().describe(\"CSS selector or XPath to wait for before capturing. Screenshot is taken after this element appears.\").optional(),\n}).describe(\"Request model for capturing a screenshot of a web page.\");\nconst ScrapflyCaptureScreenshot_FileDownloadableSchema: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Name of the file\"),\n s3url: z.string().describe(\"S3 URL of the downloaded file.\"),\n mimetype: z.string().describe(\"Mime type of the file.\"),\n});\nexport const ScrapflyCaptureScreenshotOutput: z.ZodTypeAny = z.object({\n screenshot: ScrapflyCaptureScreenshot_FileDownloadableSchema.nullable(),\n}).describe(\"Response model for screenshot capture containing the image file.\");\n\nexport const scrapflyCaptureScreenshot = action(\"SCRAPFLY_CAPTURE_SCREENSHOT\", {\n slug: \"scrapfly-capture-screenshot\",\n name: \"Capture Website Screenshot\",\n description: \"Tool to capture a full-page or viewport screenshot of a website. Use when you need to take a screenshot with options like JS rendering, custom resolution, or accessibility testing. Returns the screenshot image directly. Supports vision deficiency simulations and dark mode.\",\n input: ScrapflyCaptureScreenshotInput,\n output: ScrapflyCaptureScreenshotOutput,\n});\n"],"mappings":";;;AAIA,MAAa,iCAA+C,EAAE,OAAO;CACnE,IAAI,EAAE,OAAO,CAAC,CAAC,SAAS,qEAAqE,CAAC,CAAC,SAAS;CACxG,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,wCAAwC;CACjE,OAAO,EAAE,QAAQ,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS;CACjF,QAAQ,EAAE,KAAK;EAAC;EAAO;EAAO;EAAQ;CAAK,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS;CACpJ,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,gJAAgJ,CAAC,CAAC,SAAS;CACxL,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,iGAAiG,CAAC,CAAC,SAAS;CACzI,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,wJAAwJ,CAAC,CAAC,SAAS;CAChM,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAC/G,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CACpH,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,qFAAqF,CAAC,CAAC,SAAS;CAChI,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,sFAAsF,CAAC,CAAC,SAAS;CACnI,aAAa,EAAE,QAAQ,CAAC,CAAC,SAAS,2CAA2C,CAAC,CAAC,SAAS;CACxF,gBAAgB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oHAAoH,CAAC,CAAC,SAAS;CACzK,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS,qGAAqG,CAAC,CAAC,SAAS;AACzJ,CAAC,CAAC,CAAC,SAAS,yDAAyD;AACrE,MAAM,mDAAiE,EAAE,OAAO;CAC9E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB;CAC5C,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CAC3D,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB;AACxD,CAAC;AAKD,MAAa,4BAA4B,OAAO,+BAA+B;CAC7E,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAT2D,EAAE,OAAO,EACpE,YAAY,iDAAiD,SAAS,EACxE,CAAC,CAAC,CAAC,SAAS,kEAOF;AACV,CAAC"}
@@ -0,0 +1,29 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/create-crawler.ts
4
+ const ScrapflyCreateCrawlerInput = zod.z.object({
5
+ asp: zod.z.boolean().describe("Enable Anti Scraping Protection bypass").optional(),
6
+ url: zod.z.string().describe("Starting URL for the crawl. Must be a valid HTTP/HTTPS URL"),
7
+ delay: zod.z.number().int().describe("Delay between requests in milliseconds. Range: 0-15000ms").optional(),
8
+ max_depth: zod.z.number().int().describe("Maximum crawl depth - controls how many levels deep the crawler will follow links").optional(),
9
+ render_js: zod.z.boolean().describe("Enable JavaScript rendering").optional(),
10
+ page_limit: zod.z.number().int().describe("Maximum number of pages to crawl. Set to 0 for unlimited (subject to subscription limits)").optional(),
11
+ concurrency: zod.z.number().int().describe("Maximum concurrent scrape requests. Set 0 for account default").optional(),
12
+ cost_budget: zod.z.number().describe("Automatically stop the crawl when reaching a credit limit").optional(),
13
+ exclude_paths: zod.z.array(zod.z.string()).describe("Exclude URLs matching these patterns. Mutually exclusive with include_only_paths").optional(),
14
+ content_formats: zod.z.array(zod.z.string()).describe("Array of desired output formats (markdown, extracted_data, page_metadata, etc.)").optional(),
15
+ include_only_paths: zod.z.array(zod.z.string()).describe("Only crawl URLs matching these patterns. Supports wildcards (*). Max 100 paths").optional(),
16
+ follow_external_links: zod.z.boolean().describe("Allow crawler to follow links to external domains").optional()
17
+ }).describe("Request model for creating a new web crawler.");
18
+ const ScrapflyCreateCrawlerOutput = zod.z.object({ crawler_uuid: zod.z.string().describe("UUID of the created crawler") }).describe("Response model for creating a crawler.");
19
+ const scrapflyCreateCrawler = require_action.action("SCRAPFLY_CREATE_CRAWLER", {
20
+ slug: "scrapfly-create-crawler",
21
+ name: "Create Scrapfly Crawler",
22
+ description: "Tool to create a new web crawler to recursively crawl an entire website. Returns a crawler UUID for tracking progress. Use when you need to crawl multiple pages from a website with configurable limits and extraction rules.",
23
+ input: ScrapflyCreateCrawlerInput,
24
+ output: ScrapflyCreateCrawlerOutput
25
+ });
26
+ //#endregion
27
+ exports.scrapflyCreateCrawler = scrapflyCreateCrawler;
28
+
29
+ //# sourceMappingURL=create-crawler.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-crawler.cjs","names":["z","action"],"sources":["../../src/actions/create-crawler.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapflyCreateCrawlerInput: z.ZodTypeAny = z.object({\n asp: z.boolean().describe(\"Enable Anti Scraping Protection bypass\").optional(),\n url: z.string().describe(\"Starting URL for the crawl. Must be a valid HTTP/HTTPS URL\"),\n delay: z.number().int().describe(\"Delay between requests in milliseconds. Range: 0-15000ms\").optional(),\n max_depth: z.number().int().describe(\"Maximum crawl depth - controls how many levels deep the crawler will follow links\").optional(),\n render_js: z.boolean().describe(\"Enable JavaScript rendering\").optional(),\n page_limit: z.number().int().describe(\"Maximum number of pages to crawl. Set to 0 for unlimited (subject to subscription limits)\").optional(),\n concurrency: z.number().int().describe(\"Maximum concurrent scrape requests. Set 0 for account default\").optional(),\n cost_budget: z.number().describe(\"Automatically stop the crawl when reaching a credit limit\").optional(),\n exclude_paths: z.array(z.string()).describe(\"Exclude URLs matching these patterns. Mutually exclusive with include_only_paths\").optional(),\n content_formats: z.array(z.string()).describe(\"Array of desired output formats (markdown, extracted_data, page_metadata, etc.)\").optional(),\n include_only_paths: z.array(z.string()).describe(\"Only crawl URLs matching these patterns. Supports wildcards (*). Max 100 paths\").optional(),\n follow_external_links: z.boolean().describe(\"Allow crawler to follow links to external domains\").optional(),\n}).describe(\"Request model for creating a new web crawler.\");\nexport const ScrapflyCreateCrawlerOutput: z.ZodTypeAny = z.object({\n crawler_uuid: z.string().describe(\"UUID of the created crawler\"),\n}).describe(\"Response model for creating a crawler.\");\n\nexport const scrapflyCreateCrawler = action(\"SCRAPFLY_CREATE_CRAWLER\", {\n slug: \"scrapfly-create-crawler\",\n name: \"Create Scrapfly Crawler\",\n description: \"Tool to create a new web crawler to recursively crawl an entire website. Returns a crawler UUID for tracking progress. Use when you need to crawl multiple pages from a website with configurable limits and extraction rules.\",\n input: ScrapflyCreateCrawlerInput,\n output: ScrapflyCreateCrawlerOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA2CA,IAAAA,EAAE,OAAO;CAC/D,KAAKA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;CAC7E,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D;CACrF,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;CACtG,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;CACnI,WAAWA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS;CACxE,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2FAA2F,CAAC,CAAC,SAAS;CAC5I,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CACjH,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS;CACvG,eAAeA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;CACzI,iBAAiBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CAC1I,oBAAoBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,gFAAgF,CAAC,CAAC,SAAS;CAC5I,uBAAuBA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;AAC5G,CAAC,CAAC,CAAC,SAAS,+CAA+C;AAC3D,MAAa,8BAA4CA,IAAAA,EAAE,OAAO,EAChE,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,EACjE,CAAC,CAAC,CAAC,SAAS,wCAAwC;AAEpD,MAAa,wBAAwBC,eAAAA,OAAO,2BAA2B;CACrE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-crawler.d.ts
4
+ declare const ScrapflyCreateCrawlerInput: z.ZodTypeAny;
5
+ declare const ScrapflyCreateCrawlerOutput: z.ZodTypeAny;
6
+ declare const scrapflyCreateCrawler: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { scrapflyCreateCrawler };
9
+ //# sourceMappingURL=create-crawler.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-crawler.d.cts","names":[],"sources":["../../src/actions/create-crawler.ts"],"mappings":";;;cAIa,0BAAA,EAA4B,CAAA,CAAE,UAaiB;AAAA,cAC/C,2BAAA,EAA6B,CAAA,CAAE,UAES;AAAA,cAExC,qBAAA,gCAAqB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/create-crawler.d.ts
4
+ declare const ScrapflyCreateCrawlerInput: z.ZodTypeAny;
5
+ declare const ScrapflyCreateCrawlerOutput: z.ZodTypeAny;
6
+ declare const scrapflyCreateCrawler: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { scrapflyCreateCrawler };
9
+ //# sourceMappingURL=create-crawler.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-crawler.d.mts","names":[],"sources":["../../src/actions/create-crawler.ts"],"mappings":";;;cAIa,0BAAA,EAA4B,CAAA,CAAE,UAaiB;AAAA,cAC/C,2BAAA,EAA6B,CAAA,CAAE,UAES;AAAA,cAExC,qBAAA,gCAAqB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,26 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const scrapflyCreateCrawler = action("SCRAPFLY_CREATE_CRAWLER", {
4
+ slug: "scrapfly-create-crawler",
5
+ name: "Create Scrapfly Crawler",
6
+ description: "Tool to create a new web crawler to recursively crawl an entire website. Returns a crawler UUID for tracking progress. Use when you need to crawl multiple pages from a website with configurable limits and extraction rules.",
7
+ input: z.object({
8
+ asp: z.boolean().describe("Enable Anti Scraping Protection bypass").optional(),
9
+ url: z.string().describe("Starting URL for the crawl. Must be a valid HTTP/HTTPS URL"),
10
+ delay: z.number().int().describe("Delay between requests in milliseconds. Range: 0-15000ms").optional(),
11
+ max_depth: z.number().int().describe("Maximum crawl depth - controls how many levels deep the crawler will follow links").optional(),
12
+ render_js: z.boolean().describe("Enable JavaScript rendering").optional(),
13
+ page_limit: z.number().int().describe("Maximum number of pages to crawl. Set to 0 for unlimited (subject to subscription limits)").optional(),
14
+ concurrency: z.number().int().describe("Maximum concurrent scrape requests. Set 0 for account default").optional(),
15
+ cost_budget: z.number().describe("Automatically stop the crawl when reaching a credit limit").optional(),
16
+ exclude_paths: z.array(z.string()).describe("Exclude URLs matching these patterns. Mutually exclusive with include_only_paths").optional(),
17
+ content_formats: z.array(z.string()).describe("Array of desired output formats (markdown, extracted_data, page_metadata, etc.)").optional(),
18
+ include_only_paths: z.array(z.string()).describe("Only crawl URLs matching these patterns. Supports wildcards (*). Max 100 paths").optional(),
19
+ follow_external_links: z.boolean().describe("Allow crawler to follow links to external domains").optional()
20
+ }).describe("Request model for creating a new web crawler."),
21
+ output: z.object({ crawler_uuid: z.string().describe("UUID of the created crawler") }).describe("Response model for creating a crawler.")
22
+ });
23
+ //#endregion
24
+ export { scrapflyCreateCrawler };
25
+
26
+ //# sourceMappingURL=create-crawler.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-crawler.mjs","names":[],"sources":["../../src/actions/create-crawler.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapflyCreateCrawlerInput: z.ZodTypeAny = z.object({\n asp: z.boolean().describe(\"Enable Anti Scraping Protection bypass\").optional(),\n url: z.string().describe(\"Starting URL for the crawl. Must be a valid HTTP/HTTPS URL\"),\n delay: z.number().int().describe(\"Delay between requests in milliseconds. Range: 0-15000ms\").optional(),\n max_depth: z.number().int().describe(\"Maximum crawl depth - controls how many levels deep the crawler will follow links\").optional(),\n render_js: z.boolean().describe(\"Enable JavaScript rendering\").optional(),\n page_limit: z.number().int().describe(\"Maximum number of pages to crawl. Set to 0 for unlimited (subject to subscription limits)\").optional(),\n concurrency: z.number().int().describe(\"Maximum concurrent scrape requests. Set 0 for account default\").optional(),\n cost_budget: z.number().describe(\"Automatically stop the crawl when reaching a credit limit\").optional(),\n exclude_paths: z.array(z.string()).describe(\"Exclude URLs matching these patterns. Mutually exclusive with include_only_paths\").optional(),\n content_formats: z.array(z.string()).describe(\"Array of desired output formats (markdown, extracted_data, page_metadata, etc.)\").optional(),\n include_only_paths: z.array(z.string()).describe(\"Only crawl URLs matching these patterns. Supports wildcards (*). Max 100 paths\").optional(),\n follow_external_links: z.boolean().describe(\"Allow crawler to follow links to external domains\").optional(),\n}).describe(\"Request model for creating a new web crawler.\");\nexport const ScrapflyCreateCrawlerOutput: z.ZodTypeAny = z.object({\n crawler_uuid: z.string().describe(\"UUID of the created crawler\"),\n}).describe(\"Response model for creating a crawler.\");\n\nexport const scrapflyCreateCrawler = action(\"SCRAPFLY_CREATE_CRAWLER\", {\n slug: \"scrapfly-create-crawler\",\n name: \"Create Scrapfly Crawler\",\n description: \"Tool to create a new web crawler to recursively crawl an entire website. Returns a crawler UUID for tracking progress. Use when you need to crawl multiple pages from a website with configurable limits and extraction rules.\",\n input: ScrapflyCreateCrawlerInput,\n output: ScrapflyCreateCrawlerOutput,\n});\n"],"mappings":";;AAsBA,MAAa,wBAAwB,OAAO,2BAA2B;CACrE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAtBsD,EAAE,OAAO;EAC/D,KAAK,EAAE,QAAQ,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;EAC7E,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D;EACrF,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0DAA0D,CAAC,CAAC,SAAS;EACtG,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mFAAmF,CAAC,CAAC,SAAS;EACnI,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS,6BAA6B,CAAC,CAAC,SAAS;EACxE,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2FAA2F,CAAC,CAAC,SAAS;EAC5I,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;EACjH,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS;EACvG,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;EACzI,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;EAC1I,oBAAoB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,gFAAgF,CAAC,CAAC,SAAS;EAC5I,uBAAuB,EAAE,QAAQ,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;CAC5G,CAAC,CAAC,CAAC,SAAS,+CASH;CACP,QATuD,EAAE,OAAO,EAChE,cAAc,EAAE,OAAO,CAAC,CAAC,SAAS,6BAA6B,EACjE,CAAC,CAAC,CAAC,SAAS,wCAOF;AACV,CAAC"}
@@ -0,0 +1,57 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/extract-data.ts
4
+ const ScrapflyExtractDataInput = zod.z.object({
5
+ url: zod.z.string().describe("Base URL for converting relative URLs to absolute URLs in the extracted data. Useful when extracting links and images.").optional(),
6
+ charset: zod.z.string().describe("Document charset encoding. Use 'auto' for automatic detection or specify a charset like 'utf-8', 'iso-8859-1', etc.").optional(),
7
+ content: zod.z.string().describe("HTML, text, or structured content to extract data from. This will be sent as the request body."),
8
+ content_type: zod.z.enum([
9
+ "text/html",
10
+ "text/plain",
11
+ "text/markdown",
12
+ "text/csv",
13
+ "application/json",
14
+ "application/ld+json",
15
+ "application/xml",
16
+ "application/xhtml+xml"
17
+ ]).describe("Content type of the document body. Required to properly parse the input content."),
18
+ webhook_name: zod.z.string().describe("Webhook name for asynchronous processing. If provided, the extraction will be processed asynchronously and results sent to the webhook.").optional(),
19
+ extraction_model: zod.z.enum([
20
+ "article",
21
+ "event",
22
+ "food_recipe",
23
+ "hotel",
24
+ "hotel_listing",
25
+ "job_listing",
26
+ "job_posting",
27
+ "organization",
28
+ "product",
29
+ "product_listing",
30
+ "real_estate_property",
31
+ "real_estate_property_listing",
32
+ "review_list",
33
+ "search_engine_results",
34
+ "social_media_post",
35
+ "software",
36
+ "stock",
37
+ "vehicle_ad",
38
+ "vehicle_ad_listing"
39
+ ]).describe("AI extraction models for structured data extraction.").optional(),
40
+ extraction_prompt: zod.z.string().describe("Custom LLM prompt for extraction. Use this when you need custom extraction logic beyond predefined models. Cannot be used together with extraction_model or extraction_template.").optional(),
41
+ extraction_template: zod.z.string().describe("JSON extraction template defining custom extraction rules. Cannot be used together with extraction_model or extraction_prompt.").optional()
42
+ }).describe("Request model for extracting structured data from content.");
43
+ const ScrapflyExtractDataOutput = zod.z.object({
44
+ data: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Extracted structured data. The structure depends on the extraction method used (model, prompt, or template)."),
45
+ content_type: zod.z.string().describe("Content type of the input document").nullable().optional()
46
+ }).describe("Response model for the extraction API.");
47
+ const scrapflyExtractData = require_action.action("SCRAPFLY_EXTRACT_DATA", {
48
+ slug: "scrapfly-extract-data",
49
+ name: "Extract Structured Data",
50
+ description: "Tool to extract structured data from HTML or other content using AI models, LLM prompts, or custom templates. Use when you need to parse web pages or documents into structured JSON data. Supports predefined extraction models for common types (articles, products, events) or custom extraction via prompts/templates.",
51
+ input: ScrapflyExtractDataInput,
52
+ output: ScrapflyExtractDataOutput
53
+ });
54
+ //#endregion
55
+ exports.scrapflyExtractData = scrapflyExtractData;
56
+
57
+ //# sourceMappingURL=extract-data.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-data.cjs","names":["z","action"],"sources":["../../src/actions/extract-data.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const ScrapflyExtractDataInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"Base URL for converting relative URLs to absolute URLs in the extracted data. Useful when extracting links and images.\").optional(),\n charset: z.string().describe(\"Document charset encoding. Use 'auto' for automatic detection or specify a charset like 'utf-8', 'iso-8859-1', etc.\").optional(),\n content: z.string().describe(\"HTML, text, or structured content to extract data from. This will be sent as the request body.\"),\n content_type: z.enum([\"text/html\", \"text/plain\", \"text/markdown\", \"text/csv\", \"application/json\", \"application/ld+json\", \"application/xml\", \"application/xhtml+xml\"]).describe(\"Content type of the document body. Required to properly parse the input content.\"),\n webhook_name: z.string().describe(\"Webhook name for asynchronous processing. If provided, the extraction will be processed asynchronously and results sent to the webhook.\").optional(),\n extraction_model: z.enum([\"article\", \"event\", \"food_recipe\", \"hotel\", \"hotel_listing\", \"job_listing\", \"job_posting\", \"organization\", \"product\", \"product_listing\", \"real_estate_property\", \"real_estate_property_listing\", \"review_list\", \"search_engine_results\", \"social_media_post\", \"software\", \"stock\", \"vehicle_ad\", \"vehicle_ad_listing\"]).describe(\"AI extraction models for structured data extraction.\").optional(),\n extraction_prompt: z.string().describe(\"Custom LLM prompt for extraction. Use this when you need custom extraction logic beyond predefined models. Cannot be used together with extraction_model or extraction_template.\").optional(),\n extraction_template: z.string().describe(\"JSON extraction template defining custom extraction rules. Cannot be used together with extraction_model or extraction_prompt.\").optional(),\n}).describe(\"Request model for extracting structured data from content.\");\nexport const ScrapflyExtractDataOutput: z.ZodTypeAny = z.object({\n data: z.record(z.string(), z.unknown()).describe(\"Extracted structured data. The structure depends on the extraction method used (model, prompt, or template).\"),\n content_type: z.string().describe(\"Content type of the input document\").nullable().optional(),\n}).describe(\"Response model for the extraction API.\");\n\nexport const scrapflyExtractData = action(\"SCRAPFLY_EXTRACT_DATA\", {\n slug: \"scrapfly-extract-data\",\n name: \"Extract Structured Data\",\n description: \"Tool to extract structured data from HTML or other content using AI models, LLM prompts, or custom templates. Use when you need to parse web pages or documents into structured JSON data. Supports predefined extraction models for common types (articles, products, events) or custom extraction via prompts/templates.\",\n input: ScrapflyExtractDataInput,\n output: ScrapflyExtractDataOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyCA,IAAAA,EAAE,OAAO;CAC7D,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wHAAwH,CAAC,CAAC,SAAS;CAC5J,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qHAAqH,CAAC,CAAC,SAAS;CAC7J,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gGAAgG;CAC7H,cAAcA,IAAAA,EAAE,KAAK;EAAC;EAAa;EAAc;EAAiB;EAAY;EAAoB;EAAuB;EAAmB;CAAuB,CAAC,CAAC,CAAC,SAAS,kFAAkF;CACjQ,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yIAAyI,CAAC,CAAC,SAAS;CACtL,kBAAkBA,IAAAA,EAAE,KAAK;EAAC;EAAW;EAAS;EAAe;EAAS;EAAiB;EAAe;EAAe;EAAgB;EAAW;EAAmB;EAAwB;EAAgC;EAAe;EAAyB;EAAqB;EAAY;EAAS;EAAc;CAAoB,CAAC,CAAC,CAAC,SAAS,sDAAsD,CAAC,CAAC,SAAS;CAC5Z,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kLAAkL,CAAC,CAAC,SAAS;CACpO,qBAAqBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gIAAgI,CAAC,CAAC,SAAS;AACtL,CAAC,CAAC,CAAC,SAAS,4DAA4D;AACxE,MAAa,4BAA0CA,IAAAA,EAAE,OAAO;CAC9D,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,8GAA8G;CAC/J,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oCAAoC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC9F,CAAC,CAAC,CAAC,SAAS,wCAAwC;AAEpD,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/extract-data.d.ts
4
+ declare const ScrapflyExtractDataInput: z.ZodTypeAny;
5
+ declare const ScrapflyExtractDataOutput: z.ZodTypeAny;
6
+ declare const scrapflyExtractData: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { scrapflyExtractData };
9
+ //# sourceMappingURL=extract-data.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-data.d.cts","names":[],"sources":["../../src/actions/extract-data.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UASgC;AAAA,cAC5D,yBAAA,EAA2B,CAAA,CAAE,UAGW;AAAA,cAExC,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/extract-data.d.ts
4
+ declare const ScrapflyExtractDataInput: z.ZodTypeAny;
5
+ declare const ScrapflyExtractDataOutput: z.ZodTypeAny;
6
+ declare const scrapflyExtractData: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { scrapflyExtractData };
9
+ //# sourceMappingURL=extract-data.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-data.d.mts","names":[],"sources":["../../src/actions/extract-data.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UASgC;AAAA,cAC5D,yBAAA,EAA2B,CAAA,CAAE,UAGW;AAAA,cAExC,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}