firecrawl 4.9.1 → 4.9.2

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.2",
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.2",
39
39
  description: "JavaScript SDK for Firecrawl API",
40
40
  main: "dist/index.js",
41
41
  types: "dist/index.d.ts",
@@ -763,6 +763,7 @@ 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;
766
767
  return body;
767
768
  }
768
769
  async function startAgent(http, args) {
package/dist/index.d.cts CHANGED
@@ -586,6 +586,7 @@ declare function prepareAgentPayload(args: {
586
586
  prompt: string;
587
587
  schema?: Record<string, unknown> | ZodTypeAny;
588
588
  integration?: string;
589
+ maxCredits?: number;
589
590
  }): Record<string, unknown>;
590
591
  declare function startAgent(http: HttpClient, args: Parameters<typeof prepareAgentPayload>[0]): Promise<AgentResponse>;
591
592
 
package/dist/index.d.ts CHANGED
@@ -586,6 +586,7 @@ declare function prepareAgentPayload(args: {
586
586
  prompt: string;
587
587
  schema?: Record<string, unknown> | ZodTypeAny;
588
588
  integration?: string;
589
+ maxCredits?: number;
589
590
  }): Record<string, unknown>;
590
591
  declare function startAgent(http: HttpClient, args: Parameters<typeof prepareAgentPayload>[0]): Promise<AgentResponse>;
591
592
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  require_package
3
- } from "./chunk-POKQQMNV.js";
3
+ } from "./chunk-NR7V4IEX.js";
4
4
 
5
5
  // src/v2/utils/httpClient.ts
6
6
  import axios from "axios";
@@ -645,6 +645,7 @@ 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;
648
649
  return body;
649
650
  }
650
651
  async function startAgent(http, args) {
@@ -1257,7 +1258,7 @@ var FirecrawlApp = class {
1257
1258
  if (typeof process !== "undefined" && process.env && process.env.npm_package_version) {
1258
1259
  return process.env.npm_package_version;
1259
1260
  }
1260
- const packageJson = await import("./package-YGCUU3YI.js");
1261
+ const packageJson = await import("./package-647PIJ6T.js");
1261
1262
  return packageJson.default.version;
1262
1263
  } catch (error) {
1263
1264
  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-NR7V4IEX.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.2",
4
4
  "description": "JavaScript SDK for Firecrawl API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,6 +9,7 @@ function prepareAgentPayload(args: {
9
9
  prompt: string;
10
10
  schema?: Record<string, unknown> | ZodTypeAny;
11
11
  integration?: string;
12
+ maxCredits?: number;
12
13
  }): Record<string, unknown> {
13
14
  const body: Record<string, unknown> = {};
14
15
  if (args.urls) body.urls = args.urls;
@@ -19,6 +20,7 @@ function prepareAgentPayload(args: {
19
20
  body.schema = isZod ? zodToJsonSchema(s) : args.schema;
20
21
  }
21
22
  if (args.integration && args.integration.trim()) body.integration = args.integration.trim();
23
+ if (args.maxCredits !== null && args.maxCredits !== undefined) body.maxCredits = args.maxCredits;
22
24
  return body;
23
25
  }
24
26