newscatcher-catchall-sdk 1.1.2 → 1.3.1

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 (61) hide show
  1. package/README.md +305 -284
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +12 -0
  4. package/dist/cjs/Client.js +67 -0
  5. package/dist/cjs/api/resources/jobs/client/Client.d.ts +2 -1
  6. package/dist/cjs/api/resources/jobs/client/Client.js +2 -1
  7. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +22 -1
  8. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.js +14 -0
  9. package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +1 -1
  10. package/dist/cjs/api/resources/jobs/client/requests/index.js +3 -0
  11. package/dist/cjs/api/resources/meta/client/Client.d.ts +15 -3
  12. package/dist/cjs/api/resources/meta/client/Client.js +49 -1
  13. package/dist/cjs/api/types/GetPlanLimitsResponseDto.d.ts +5 -0
  14. package/dist/cjs/api/types/GetPlanLimitsResponseDto.js +3 -0
  15. package/dist/cjs/api/types/MonitorListItemDto.d.ts +4 -2
  16. package/dist/cjs/api/types/PlanFeature.d.ts +12 -0
  17. package/dist/cjs/api/types/PlanFeature.js +3 -0
  18. package/dist/cjs/api/types/PullJobResponseDto.d.ts +12 -8
  19. package/dist/cjs/api/types/PullJobResponseDto.js +9 -0
  20. package/dist/cjs/api/types/UserJob.d.ts +12 -0
  21. package/dist/cjs/api/types/UserJob.js +9 -0
  22. package/dist/cjs/api/types/index.d.ts +2 -0
  23. package/dist/cjs/api/types/index.js +2 -0
  24. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
  25. package/dist/cjs/core/fetcher/index.d.ts +2 -0
  26. package/dist/cjs/core/fetcher/index.js +3 -1
  27. package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
  28. package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
  29. package/dist/cjs/version.d.ts +1 -1
  30. package/dist/cjs/version.js +1 -1
  31. package/dist/esm/BaseClient.mjs +2 -2
  32. package/dist/esm/Client.d.mts +12 -0
  33. package/dist/esm/Client.mjs +34 -0
  34. package/dist/esm/api/resources/jobs/client/Client.d.mts +2 -1
  35. package/dist/esm/api/resources/jobs/client/Client.mjs +2 -1
  36. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +22 -1
  37. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.mjs +13 -1
  38. package/dist/esm/api/resources/jobs/client/requests/index.d.mts +1 -1
  39. package/dist/esm/api/resources/jobs/client/requests/index.mjs +1 -1
  40. package/dist/esm/api/resources/meta/client/Client.d.mts +15 -3
  41. package/dist/esm/api/resources/meta/client/Client.mjs +50 -2
  42. package/dist/esm/api/types/GetPlanLimitsResponseDto.d.mts +5 -0
  43. package/dist/esm/api/types/GetPlanLimitsResponseDto.mjs +2 -0
  44. package/dist/esm/api/types/MonitorListItemDto.d.mts +4 -2
  45. package/dist/esm/api/types/PlanFeature.d.mts +12 -0
  46. package/dist/esm/api/types/PlanFeature.mjs +2 -0
  47. package/dist/esm/api/types/PullJobResponseDto.d.mts +12 -8
  48. package/dist/esm/api/types/PullJobResponseDto.mjs +8 -1
  49. package/dist/esm/api/types/UserJob.d.mts +12 -0
  50. package/dist/esm/api/types/UserJob.mjs +8 -1
  51. package/dist/esm/api/types/index.d.mts +2 -0
  52. package/dist/esm/api/types/index.mjs +2 -0
  53. package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
  54. package/dist/esm/core/fetcher/index.d.mts +2 -0
  55. package/dist/esm/core/fetcher/index.mjs +1 -0
  56. package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
  57. package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
  58. package/dist/esm/version.d.mts +1 -1
  59. package/dist/esm/version.mjs +1 -1
  60. package/package.json +1 -1
  61. package/reference.md +57 -1
@@ -1,11 +1,54 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
3
45
  Object.defineProperty(exports, "__esModule", { value: true });
4
46
  exports.CatchAllApiClient = void 0;
5
47
  const Client_js_1 = require("./api/resources/jobs/client/Client.js");
6
48
  const Client_js_2 = require("./api/resources/meta/client/Client.js");
7
49
  const Client_js_3 = require("./api/resources/monitors/client/Client.js");
8
50
  const BaseClient_js_1 = require("./BaseClient.js");
51
+ const core = __importStar(require("./core/index.js"));
9
52
  class CatchAllApiClient {
10
53
  constructor(options = {}) {
11
54
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
@@ -22,5 +65,29 @@ class CatchAllApiClient {
22
65
  var _a;
23
66
  return ((_a = this._meta) !== null && _a !== void 0 ? _a : (this._meta = new Client_js_2.MetaClient(this._options)));
24
67
  }
68
+ /**
69
+ * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
70
+ * This is useful for making requests to endpoints not yet supported in the SDK.
71
+ * The input can be a URL string, URL object, or Request object. Relative paths are resolved against the configured base URL.
72
+ *
73
+ * @param {Request | string | URL} input - The URL, path, or Request object.
74
+ * @param {RequestInit} init - Standard fetch RequestInit options.
75
+ * @param {core.PassthroughRequest.RequestOptions} requestOptions - Per-request overrides (timeout, retries, headers, abort signal).
76
+ * @returns {Promise<Response>} A standard Response object.
77
+ */
78
+ fetch(input, init, requestOptions) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ var _a;
81
+ return core.makePassthroughRequest(input, init, {
82
+ baseUrl: (_a = this._options.baseUrl) !== null && _a !== void 0 ? _a : this._options.environment,
83
+ headers: this._options.headers,
84
+ timeoutInSeconds: this._options.timeoutInSeconds,
85
+ maxRetries: this._options.maxRetries,
86
+ fetch: this._options.fetch,
87
+ logging: this._options.logging,
88
+ getAuthHeaders: () => __awaiter(this, void 0, void 0, function* () { return (yield this._options.authProvider.getAuthRequest()).headers; }),
89
+ }, requestOptions);
90
+ });
91
+ }
25
92
  }
26
93
  exports.CatchAllApiClient = CatchAllApiClient;
@@ -46,7 +46,8 @@ export declare class JobsClient {
46
46
  * context: "Focus on funding amount and company name",
47
47
  * limit: 10,
48
48
  * start_date: "2026-02-18T00:00:00Z",
49
- * end_date: "2026-02-23T00:00:00Z"
49
+ * end_date: "2026-02-23T00:00:00Z",
50
+ * mode: "base"
50
51
  * })
51
52
  */
52
53
  createJob(request: CatchAllApi.SubmitRequestDto, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.SubmitResponseDto>;
@@ -131,7 +131,8 @@ class JobsClient {
131
131
  * context: "Focus on funding amount and company name",
132
132
  * limit: 10,
133
133
  * start_date: "2026-02-18T00:00:00Z",
134
- * end_date: "2026-02-23T00:00:00Z"
134
+ * end_date: "2026-02-23T00:00:00Z",
135
+ * mode: "base"
135
136
  * })
136
137
  */
137
138
  createJob(request, requestOptions) {
@@ -6,7 +6,8 @@ import type * as CatchAllApi from "../../../../index.js";
6
6
  * context: "Focus on funding amount and company name",
7
7
  * limit: 10,
8
8
  * start_date: "2026-02-18T00:00:00Z",
9
- * end_date: "2026-02-23T00:00:00Z"
9
+ * end_date: "2026-02-23T00:00:00Z",
10
+ * mode: "base"
10
11
  * }
11
12
  */
12
13
  export interface SubmitRequestDto {
@@ -27,4 +28,24 @@ export interface SubmitRequestDto {
27
28
  * If not provided, enrichments are generated automatically based on the query.
28
29
  */
29
30
  enrichments?: CatchAllApi.EnrichmentSchema[];
31
+ /**
32
+ * Job processing mode.
33
+ *
34
+ * - `base`: Full pipeline with validation and enrichment.
35
+ * - `lite`: Lightweight extraction with faster processing. Returns titles and citations only.
36
+ */
37
+ mode?: SubmitRequestDto.Mode;
38
+ }
39
+ export declare namespace SubmitRequestDto {
40
+ /**
41
+ * Job processing mode.
42
+ *
43
+ * - `base`: Full pipeline with validation and enrichment.
44
+ * - `lite`: Lightweight extraction with faster processing. Returns titles and citations only.
45
+ */
46
+ const Mode: {
47
+ readonly Lite: "lite";
48
+ readonly Base: "base";
49
+ };
50
+ type Mode = (typeof Mode)[keyof typeof Mode];
30
51
  }
@@ -1,3 +1,17 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SubmitRequestDto = void 0;
5
+ var SubmitRequestDto;
6
+ (function (SubmitRequestDto) {
7
+ /**
8
+ * Job processing mode.
9
+ *
10
+ * - `base`: Full pipeline with validation and enrichment.
11
+ * - `lite`: Lightweight extraction with faster processing. Returns titles and citations only.
12
+ */
13
+ SubmitRequestDto.Mode = {
14
+ Lite: "lite",
15
+ Base: "base",
16
+ };
17
+ })(SubmitRequestDto || (exports.SubmitRequestDto = SubmitRequestDto = {}));
@@ -3,4 +3,4 @@ export type { GetJobResultsRequest } from "./GetJobResultsRequest.js";
3
3
  export type { GetJobStatusRequest } from "./GetJobStatusRequest.js";
4
4
  export type { GetUserJobsRequest } from "./GetUserJobsRequest.js";
5
5
  export type { InitializeRequestDto } from "./InitializeRequestDto.js";
6
- export type { SubmitRequestDto } from "./SubmitRequestDto.js";
6
+ export { SubmitRequestDto } from "./SubmitRequestDto.js";
@@ -1,2 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubmitRequestDto = void 0;
4
+ var SubmitRequestDto_js_1 = require("./SubmitRequestDto.js");
5
+ Object.defineProperty(exports, "SubmitRequestDto", { enumerable: true, get: function () { return SubmitRequestDto_js_1.SubmitRequestDto; } });
@@ -1,7 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
- import { type NormalizedClientOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
- import type * as CatchAllApi from "../../../index.js";
4
+ import * as CatchAllApi from "../../../index.js";
5
5
  export declare namespace MetaClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
@@ -11,7 +11,7 @@ export declare namespace MetaClient {
11
11
  * Operations to check API health and version.
12
12
  */
13
13
  export declare class MetaClient {
14
- protected readonly _options: NormalizedClientOptions<MetaClient.Options>;
14
+ protected readonly _options: NormalizedClientOptionsWithAuth<MetaClient.Options>;
15
15
  constructor(options?: MetaClient.Options);
16
16
  /**
17
17
  * Check API availability.
@@ -33,4 +33,16 @@ export declare class MetaClient {
33
33
  */
34
34
  getVersion(requestOptions?: MetaClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.GetVersionResponse>;
35
35
  private __getVersion;
36
+ /**
37
+ * Returns plan features and current usage for the authenticated organization.
38
+ *
39
+ * @param {MetaClient.RequestOptions} requestOptions - Request-specific configuration.
40
+ *
41
+ * @throws {@link CatchAllApi.ForbiddenError}
42
+ *
43
+ * @example
44
+ * await client.meta.getPlanLimits()
45
+ */
46
+ getPlanLimits(requestOptions?: MetaClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.GetPlanLimitsResponseDto>;
47
+ private __getPlanLimits;
36
48
  }
@@ -50,12 +50,13 @@ const core = __importStar(require("../../../../core/index.js"));
50
50
  const environments = __importStar(require("../../../../environments.js"));
51
51
  const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
52
  const errors = __importStar(require("../../../../errors/index.js"));
53
+ const CatchAllApi = __importStar(require("../../../index.js"));
53
54
  /**
54
55
  * Operations to check API health and version.
55
56
  */
56
57
  class MetaClient {
57
58
  constructor(options = {}) {
58
- this._options = (0, BaseClient_js_1.normalizeClientOptions)(options);
59
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
59
60
  }
60
61
  /**
61
62
  * Check API availability.
@@ -135,5 +136,52 @@ class MetaClient {
135
136
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/version");
136
137
  });
137
138
  }
139
+ /**
140
+ * Returns plan features and current usage for the authenticated organization.
141
+ *
142
+ * @param {MetaClient.RequestOptions} requestOptions - Request-specific configuration.
143
+ *
144
+ * @throws {@link CatchAllApi.ForbiddenError}
145
+ *
146
+ * @example
147
+ * await client.meta.getPlanLimits()
148
+ */
149
+ getPlanLimits(requestOptions) {
150
+ return core.HttpResponsePromise.fromPromise(this.__getPlanLimits(requestOptions));
151
+ }
152
+ __getPlanLimits(requestOptions) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
155
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
156
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
157
+ const _response = yield core.fetcher({
158
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CatchAllApiEnvironment.Default, "catchAll/user/limits"),
159
+ method: "POST",
160
+ headers: _headers,
161
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
162
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
163
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
164
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
165
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
166
+ logging: this._options.logging,
167
+ });
168
+ if (_response.ok) {
169
+ return { data: _response.body, rawResponse: _response.rawResponse };
170
+ }
171
+ if (_response.error.reason === "status-code") {
172
+ switch (_response.error.statusCode) {
173
+ case 403:
174
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
175
+ default:
176
+ throw new errors.CatchAllApiError({
177
+ statusCode: _response.error.statusCode,
178
+ body: _response.error.body,
179
+ rawResponse: _response.rawResponse,
180
+ });
181
+ }
182
+ }
183
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/catchAll/user/limits");
184
+ });
185
+ }
138
186
  }
139
187
  exports.MetaClient = MetaClient;
@@ -0,0 +1,5 @@
1
+ import type * as CatchAllApi from "../index.js";
2
+ export interface GetPlanLimitsResponseDto {
3
+ /** Plan features with current usage. */
4
+ features: CatchAllApi.PlanFeature[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -16,6 +16,8 @@ export interface MonitorListItemDto {
16
16
  timezone?: string | undefined;
17
17
  /** The date when the monitor was created. */
18
18
  created_at?: string | undefined;
19
- /** Webhook configuration for this monitor (if set). */
20
- webhook?: CatchAllApi.WebhookDto | undefined;
19
+ /** Webhook configuration for this monitor, or null if not set. */
20
+ webhook?: (CatchAllApi.WebhookDto | null) | undefined;
21
+ /** Masked API key associated with this monitor. */
22
+ user_key?: string | undefined;
21
23
  }
@@ -0,0 +1,12 @@
1
+ export interface PlanFeature {
2
+ /** Human-readable feature name. */
3
+ name: string;
4
+ /** Machine-readable feature identifier. */
5
+ code: string;
6
+ /** Data type of the feature value. */
7
+ value_type?: string | undefined;
8
+ /** Feature limit. Type depends on `value_type`. */
9
+ value?: unknown | undefined;
10
+ /** Current usage count for this feature. */
11
+ current_usage?: number | undefined;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -6,14 +6,10 @@ export interface PullJobResponseDto {
6
6
  query?: string | undefined;
7
7
  /** Context provided with the query. */
8
8
  context?: string | undefined;
9
- /** List of validation criteria applied to filter results. */
10
- validators?: string[] | undefined;
11
- /**
12
- * List of extracted field names generated by the enrichment process. These field names appear in the `enrichment` object of each record.
13
- *
14
- * **Note:** The `enrichment_confidence` field always appears in this list. The system adds it to every record regardless of the enrichments generated or defined.
15
- */
16
- enrichments?: string[] | undefined;
9
+ /** Validators applied to filter results. */
10
+ validators?: Record<string, unknown>[] | undefined;
11
+ /** Enrichment fields used for data extraction. */
12
+ enrichments?: Record<string, unknown>[] | undefined;
17
13
  /** Job status. */
18
14
  status?: string | undefined;
19
15
  /** Error message if the job failed. Null for successful jobs. */
@@ -39,6 +35,8 @@ export interface PullJobResponseDto {
39
35
  page_size?: number | undefined;
40
36
  /** The total number of pages available. */
41
37
  total_pages?: number | undefined;
38
+ /** Processing mode used for this job. */
39
+ mode?: PullJobResponseDto.Mode | undefined;
42
40
  /** Array of extracted records with structured data and citations. */
43
41
  all_records?: CatchAllApi.Record_[] | undefined;
44
42
  }
@@ -47,4 +45,10 @@ export declare namespace PullJobResponseDto {
47
45
  start_date?: string | undefined;
48
46
  end_date?: string | undefined;
49
47
  }
48
+ /** Processing mode used for this job. */
49
+ const Mode: {
50
+ readonly Lite: "lite";
51
+ readonly Base: "base";
52
+ };
53
+ type Mode = (typeof Mode)[keyof typeof Mode];
50
54
  }
@@ -1,3 +1,12 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.PullJobResponseDto = void 0;
5
+ var PullJobResponseDto;
6
+ (function (PullJobResponseDto) {
7
+ /** Processing mode used for this job. */
8
+ PullJobResponseDto.Mode = {
9
+ Lite: "lite",
10
+ Base: "base",
11
+ };
12
+ })(PullJobResponseDto || (exports.PullJobResponseDto = PullJobResponseDto = {}));
@@ -7,4 +7,16 @@ export interface UserJob {
7
7
  created_at: string;
8
8
  /** Current processing status of the job. */
9
9
  status: string;
10
+ /** Processing mode used for this job. */
11
+ mode?: UserJob.Mode | undefined;
12
+ /** Masked API key that created this job. */
13
+ user_key?: string | undefined;
14
+ }
15
+ export declare namespace UserJob {
16
+ /** Processing mode used for this job. */
17
+ const Mode: {
18
+ readonly Lite: "lite";
19
+ readonly Base: "base";
20
+ };
21
+ type Mode = (typeof Mode)[keyof typeof Mode];
10
22
  }
@@ -1,3 +1,12 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.UserJob = void 0;
5
+ var UserJob;
6
+ (function (UserJob) {
7
+ /** Processing mode used for this job. */
8
+ UserJob.Mode = {
9
+ Lite: "lite",
10
+ Base: "base",
11
+ };
12
+ })(UserJob || (exports.UserJob = UserJob = {}));
@@ -8,6 +8,7 @@ export * from "./EndDate.js";
8
8
  export * from "./EnrichmentSchema.js";
9
9
  export * from "./EnrichmentType.js";
10
10
  export * from "./Error_.js";
11
+ export * from "./GetPlanLimitsResponseDto.js";
11
12
  export * from "./InitializeResponseDto.js";
12
13
  export * from "./JobStep.js";
13
14
  export * from "./Limit.js";
@@ -17,6 +18,7 @@ export * from "./MonitorCitation.js";
17
18
  export * from "./MonitorJobItem.js";
18
19
  export * from "./MonitorListItemDto.js";
19
20
  export * from "./MonitorRecord.js";
21
+ export * from "./PlanFeature.js";
20
22
  export * from "./PublicJobStatus.js";
21
23
  export * from "./PullJobResponseDto.js";
22
24
  export * from "./PullMonitorResponseDto.js";
@@ -24,6 +24,7 @@ __exportStar(require("./EndDate.js"), exports);
24
24
  __exportStar(require("./EnrichmentSchema.js"), exports);
25
25
  __exportStar(require("./EnrichmentType.js"), exports);
26
26
  __exportStar(require("./Error_.js"), exports);
27
+ __exportStar(require("./GetPlanLimitsResponseDto.js"), exports);
27
28
  __exportStar(require("./InitializeResponseDto.js"), exports);
28
29
  __exportStar(require("./JobStep.js"), exports);
29
30
  __exportStar(require("./Limit.js"), exports);
@@ -33,6 +34,7 @@ __exportStar(require("./MonitorCitation.js"), exports);
33
34
  __exportStar(require("./MonitorJobItem.js"), exports);
34
35
  __exportStar(require("./MonitorListItemDto.js"), exports);
35
36
  __exportStar(require("./MonitorRecord.js"), exports);
37
+ __exportStar(require("./PlanFeature.js"), exports);
36
38
  __exportStar(require("./PublicJobStatus.js"), exports);
37
39
  __exportStar(require("./PullJobResponseDto.js"), exports);
38
40
  __exportStar(require("./PullMonitorResponseDto.js"), exports);
@@ -14,6 +14,6 @@ export type BinaryResponse = {
14
14
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)
15
15
  * Some versions of the Fetch API may not support this method.
16
16
  */
17
- bytes?(): ReturnType<Response["bytes"]>;
17
+ bytes?(): Promise<Uint8Array>;
18
18
  };
19
19
  export declare function getBinaryResponse(response: Response): BinaryResponse;
@@ -6,6 +6,8 @@ export type { Fetcher, FetchFunction } from "./Fetcher.js";
6
6
  export { fetcher } from "./Fetcher.js";
7
7
  export { getHeader } from "./getHeader.js";
8
8
  export { HttpResponsePromise } from "./HttpResponsePromise.js";
9
+ export type { PassthroughRequest } from "./makePassthroughRequest.js";
10
+ export { makePassthroughRequest } from "./makePassthroughRequest.js";
9
11
  export type { RawResponse, WithRawResponse } from "./RawResponse.js";
10
12
  export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.js";
11
13
  export { Supplier } from "./Supplier.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Supplier = exports.unknownRawResponse = exports.toRawResponse = exports.abortRawResponse = exports.HttpResponsePromise = exports.getHeader = exports.fetcher = exports.EndpointSupplier = void 0;
3
+ exports.Supplier = exports.unknownRawResponse = exports.toRawResponse = exports.abortRawResponse = exports.makePassthroughRequest = exports.HttpResponsePromise = exports.getHeader = exports.fetcher = exports.EndpointSupplier = void 0;
4
4
  var EndpointSupplier_js_1 = require("./EndpointSupplier.js");
5
5
  Object.defineProperty(exports, "EndpointSupplier", { enumerable: true, get: function () { return EndpointSupplier_js_1.EndpointSupplier; } });
6
6
  var Fetcher_js_1 = require("./Fetcher.js");
@@ -9,6 +9,8 @@ var getHeader_js_1 = require("./getHeader.js");
9
9
  Object.defineProperty(exports, "getHeader", { enumerable: true, get: function () { return getHeader_js_1.getHeader; } });
10
10
  var HttpResponsePromise_js_1 = require("./HttpResponsePromise.js");
11
11
  Object.defineProperty(exports, "HttpResponsePromise", { enumerable: true, get: function () { return HttpResponsePromise_js_1.HttpResponsePromise; } });
12
+ var makePassthroughRequest_js_1 = require("./makePassthroughRequest.js");
13
+ Object.defineProperty(exports, "makePassthroughRequest", { enumerable: true, get: function () { return makePassthroughRequest_js_1.makePassthroughRequest; } });
12
14
  var RawResponse_js_1 = require("./RawResponse.js");
13
15
  Object.defineProperty(exports, "abortRawResponse", { enumerable: true, get: function () { return RawResponse_js_1.abortRawResponse; } });
14
16
  Object.defineProperty(exports, "toRawResponse", { enumerable: true, get: function () { return RawResponse_js_1.toRawResponse; } });
@@ -0,0 +1,49 @@
1
+ import { type LogConfig, type Logger } from "../logging/logger.js";
2
+ import { Supplier } from "./Supplier.js";
3
+ export declare namespace PassthroughRequest {
4
+ /**
5
+ * Per-request options that can override the SDK client defaults.
6
+ */
7
+ interface RequestOptions {
8
+ /** Override the default timeout for this request (in seconds). */
9
+ timeoutInSeconds?: number;
10
+ /** Override the default number of retries for this request. */
11
+ maxRetries?: number;
12
+ /** Additional headers to include in this request. */
13
+ headers?: Record<string, string>;
14
+ /** Abort signal for this request. */
15
+ abortSignal?: AbortSignal;
16
+ }
17
+ /**
18
+ * SDK client configuration used by the passthrough fetch method.
19
+ */
20
+ interface ClientOptions {
21
+ /** The base URL or environment for the client. */
22
+ environment?: Supplier<string>;
23
+ /** Override the base URL. */
24
+ baseUrl?: Supplier<string>;
25
+ /** Default headers to include in requests. */
26
+ headers?: Record<string, unknown>;
27
+ /** Default maximum time to wait for a response in seconds. */
28
+ timeoutInSeconds?: number;
29
+ /** Default number of times to retry the request. Defaults to 2. */
30
+ maxRetries?: number;
31
+ /** A custom fetch function. */
32
+ fetch?: typeof fetch;
33
+ /** Logging configuration. */
34
+ logging?: LogConfig | Logger;
35
+ /** A function that returns auth headers. */
36
+ getAuthHeaders?: () => Promise<Record<string, string>>;
37
+ }
38
+ }
39
+ /**
40
+ * Makes a passthrough HTTP request using the SDK's configuration (auth, retry, logging, etc.)
41
+ * while mimicking the standard `fetch` API.
42
+ *
43
+ * @param input - The URL, path, or Request object. If a relative path, it will be resolved against the configured base URL.
44
+ * @param init - Standard RequestInit options (method, headers, body, signal, etc.)
45
+ * @param clientOptions - SDK client options (auth, default headers, logging, etc.)
46
+ * @param requestOptions - Per-request overrides (timeout, retries, extra headers, abort signal).
47
+ * @returns A standard Response object.
48
+ */
49
+ export declare function makePassthroughRequest(input: Request | string | URL, init: RequestInit | undefined, clientOptions: PassthroughRequest.ClientOptions, requestOptions?: PassthroughRequest.RequestOptions): Promise<Response>;