@mendable/firecrawl 1.23.8 → 1.24.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mendable/firecrawl",
3
- "version": "1.23.8",
3
+ "version": "1.24.0",
4
4
  "description": "JavaScript SDK for Firecrawl API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,7 +27,8 @@
27
27
  "dependencies": {
28
28
  "typescript-event-target": "^1.1.1",
29
29
  "zod": "^3.23.8",
30
- "zod-to-json-schema": "^3.23.0"
30
+ "zod-to-json-schema": "^3.23.0",
31
+ "axios": "^1.6.8"
31
32
  },
32
33
  "bugs": {
33
34
  "url": "https://github.com/mendableai/firecrawl/issues"
@@ -41,7 +42,6 @@
41
42
  "@types/mocha": "^10.0.6",
42
43
  "@types/node": "^20.12.12",
43
44
  "@types/uuid": "^9.0.8",
44
- "axios": "^1.6.8",
45
45
  "dotenv": "^16.4.5",
46
46
  "jest": "^29.7.0",
47
47
  "ts-jest": "^29.2.2",
package/src/index.ts CHANGED
@@ -167,6 +167,7 @@ export interface ScrapeParams<LLMSchema extends zt.ZodSchema = any, ActionsSchem
167
167
  modes?: ("json" | "git-diff")[];
168
168
  }
169
169
  actions?: ActionsSchema;
170
+ agent?: AgentOptions;
170
171
  }
171
172
 
172
173
  export interface ActionsResult {
@@ -296,6 +297,21 @@ export interface MapResponse {
296
297
  * Parameters for extracting information from URLs.
297
298
  * Defines options for extracting information from URLs.
298
299
  */
300
+ export interface AgentOptions {
301
+ model?: string;
302
+ prompt?: string;
303
+ sessionId?: string;
304
+ }
305
+
306
+ /**
307
+ * Parameters for extracting information from URLs.
308
+ * Defines options for extracting information from URLs.
309
+ */
310
+ export interface AgentOptionsExtract {
311
+ model?: string;
312
+ sessionId?: string;
313
+ }
314
+
299
315
  export interface ExtractParams<LLMSchema extends zt.ZodSchema = any> {
300
316
  prompt?: string;
301
317
  schema?: LLMSchema | object;
@@ -306,6 +322,7 @@ export interface ExtractParams<LLMSchema extends zt.ZodSchema = any> {
306
322
  origin?: string;
307
323
  showSources?: boolean;
308
324
  scrapeOptions?: CrawlScrapeOptions;
325
+ agent?: AgentOptionsExtract;
309
326
  }
310
327
 
311
328
  /**
package/tsup.config.ts CHANGED
@@ -8,7 +8,7 @@ export default defineConfig({
8
8
  clean: true,
9
9
  platform: "node",
10
10
  target: "node22",
11
- noExternal: ["typescript-event-target", "axios"],
11
+ noExternal: ["typescript-event-target"],
12
12
  esbuildOptions(options) {
13
13
  options.define = {
14
14
  ...options.define,