firecrawl 4.9.1 → 4.9.3

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.
@@ -8,7 +8,7 @@ var require_package = __commonJS({
8
8
  "package.json"(exports, module) {
9
9
  module.exports = {
10
10
  name: "@mendable/firecrawl-js",
11
- version: "4.9.1",
11
+ version: "4.9.3",
12
12
  description: "JavaScript SDK for Firecrawl API",
13
13
  main: "dist/index.js",
14
14
  types: "dist/index.d.ts",
package/dist/index.cjs CHANGED
@@ -35,7 +35,7 @@ var require_package = __commonJS({
35
35
  "package.json"(exports2, module2) {
36
36
  module2.exports = {
37
37
  name: "@mendable/firecrawl-js",
38
- version: "4.9.1",
38
+ version: "4.9.3",
39
39
  description: "JavaScript SDK for Firecrawl API",
40
40
  main: "dist/index.js",
41
41
  types: "dist/index.d.ts",
@@ -763,6 +763,8 @@ function prepareAgentPayload(args) {
763
763
  body.schema = isZod ? (0, import_zod_to_json_schema3.zodToJsonSchema)(s) : args.schema;
764
764
  }
765
765
  if (args.integration && args.integration.trim()) body.integration = args.integration.trim();
766
+ if (args.maxCredits !== null && args.maxCredits !== void 0) body.maxCredits = args.maxCredits;
767
+ if (args.strictConstrainToURLs !== null && args.strictConstrainToURLs !== void 0) body.strictConstrainToURLs = args.strictConstrainToURLs;
766
768
  return body;
767
769
  }
768
770
  async function startAgent(http, args) {
package/dist/index.d.cts CHANGED
@@ -586,6 +586,8 @@ declare function prepareAgentPayload(args: {
586
586
  prompt: string;
587
587
  schema?: Record<string, unknown> | ZodTypeAny;
588
588
  integration?: string;
589
+ maxCredits?: number;
590
+ strictConstrainToURLs?: boolean;
589
591
  }): Record<string, unknown>;
590
592
  declare function startAgent(http: HttpClient, args: Parameters<typeof prepareAgentPayload>[0]): Promise<AgentResponse>;
591
593
 
package/dist/index.d.ts CHANGED
@@ -586,6 +586,8 @@ declare function prepareAgentPayload(args: {
586
586
  prompt: string;
587
587
  schema?: Record<string, unknown> | ZodTypeAny;
588
588
  integration?: string;
589
+ maxCredits?: number;
590
+ strictConstrainToURLs?: boolean;
589
591
  }): Record<string, unknown>;
590
592
  declare function startAgent(http: HttpClient, args: Parameters<typeof prepareAgentPayload>[0]): Promise<AgentResponse>;
591
593
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  require_package
3
- } from "./chunk-POKQQMNV.js";
3
+ } from "./chunk-46HSLP23.js";
4
4
 
5
5
  // src/v2/utils/httpClient.ts
6
6
  import axios from "axios";
@@ -645,6 +645,8 @@ function prepareAgentPayload(args) {
645
645
  body.schema = isZod ? zodToJsonSchema3(s) : args.schema;
646
646
  }
647
647
  if (args.integration && args.integration.trim()) body.integration = args.integration.trim();
648
+ if (args.maxCredits !== null && args.maxCredits !== void 0) body.maxCredits = args.maxCredits;
649
+ if (args.strictConstrainToURLs !== null && args.strictConstrainToURLs !== void 0) body.strictConstrainToURLs = args.strictConstrainToURLs;
648
650
  return body;
649
651
  }
650
652
  async function startAgent(http, args) {
@@ -1257,7 +1259,7 @@ var FirecrawlApp = class {
1257
1259
  if (typeof process !== "undefined" && process.env && process.env.npm_package_version) {
1258
1260
  return process.env.npm_package_version;
1259
1261
  }
1260
- const packageJson = await import("./package-YGCUU3YI.js");
1262
+ const packageJson = await import("./package-ZXN6LAWY.js");
1261
1263
  return packageJson.default.version;
1262
1264
  } catch (error) {
1263
1265
  const isTest = typeof process !== "undefined" && (process.env.JEST_WORKER_ID != null || false);
@@ -1,4 +1,4 @@
1
1
  import {
2
2
  require_package
3
- } from "./chunk-POKQQMNV.js";
3
+ } from "./chunk-46HSLP23.js";
4
4
  export default require_package();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firecrawl",
3
- "version": "4.9.1",
3
+ "version": "4.9.3",
4
4
  "description": "JavaScript SDK for Firecrawl API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,6 +9,8 @@ function prepareAgentPayload(args: {
9
9
  prompt: string;
10
10
  schema?: Record<string, unknown> | ZodTypeAny;
11
11
  integration?: string;
12
+ maxCredits?: number;
13
+ strictConstrainToURLs?: boolean;
12
14
  }): Record<string, unknown> {
13
15
  const body: Record<string, unknown> = {};
14
16
  if (args.urls) body.urls = args.urls;
@@ -19,6 +21,8 @@ function prepareAgentPayload(args: {
19
21
  body.schema = isZod ? zodToJsonSchema(s) : args.schema;
20
22
  }
21
23
  if (args.integration && args.integration.trim()) body.integration = args.integration.trim();
24
+ if (args.maxCredits !== null && args.maxCredits !== undefined) body.maxCredits = args.maxCredits;
25
+ if (args.strictConstrainToURLs !== null && args.strictConstrainToURLs !== undefined) body.strictConstrainToURLs = args.strictConstrainToURLs;
22
26
  return body;
23
27
  }
24
28