newscatcher-catchall-sdk 1.0.0 → 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 (179) hide show
  1. package/README.md +41 -25
  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 +14 -17
  6. package/dist/cjs/api/resources/jobs/client/Client.js +13 -19
  7. package/dist/cjs/api/resources/jobs/client/requests/ContinueRequestDto.d.ts +3 -3
  8. package/dist/cjs/api/resources/jobs/client/requests/GetJobResultsRequest.d.ts +2 -2
  9. package/dist/cjs/api/resources/jobs/client/requests/GetJobStatusRequest.d.ts +2 -2
  10. package/dist/cjs/api/resources/jobs/client/requests/InitializeRequestDto.d.ts +2 -1
  11. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +26 -6
  12. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.js +14 -0
  13. package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +1 -1
  14. package/dist/cjs/api/resources/jobs/client/requests/index.js +3 -0
  15. package/dist/cjs/api/resources/jobs/exports.d.ts +2 -0
  16. package/dist/cjs/api/resources/jobs/exports.js +21 -0
  17. package/dist/cjs/api/resources/meta/client/Client.d.ts +15 -3
  18. package/dist/cjs/api/resources/meta/client/Client.js +49 -1
  19. package/dist/cjs/api/resources/meta/exports.d.ts +2 -0
  20. package/dist/cjs/api/resources/meta/exports.js +21 -0
  21. package/dist/cjs/api/resources/meta/types/GetVersionResponse.d.ts +1 -1
  22. package/dist/cjs/api/resources/meta/types/HealthCheckResponse.d.ts +1 -1
  23. package/dist/cjs/api/resources/monitors/client/Client.d.ts +23 -37
  24. package/dist/cjs/api/resources/monitors/client/Client.js +35 -41
  25. package/dist/cjs/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.ts +23 -6
  26. package/dist/cjs/api/resources/monitors/client/requests/EnableMonitorRequestDto.d.ts +17 -0
  27. package/dist/cjs/api/resources/monitors/client/requests/ListMonitorsRequest.d.ts +10 -0
  28. package/dist/cjs/api/resources/monitors/client/requests/UpdateMonitorRequestDto.d.ts +2 -0
  29. package/dist/cjs/api/resources/monitors/client/requests/index.d.ts +2 -1
  30. package/dist/cjs/api/resources/monitors/exports.d.ts +2 -0
  31. package/dist/cjs/api/resources/monitors/exports.js +21 -0
  32. package/dist/cjs/api/types/BaseRecord.d.ts +38 -0
  33. package/dist/cjs/api/types/BaseRecord.js +16 -0
  34. package/dist/cjs/api/types/Citation.d.ts +3 -3
  35. package/dist/cjs/api/types/CompanyEnrichmentOutput.d.ts +29 -0
  36. package/dist/cjs/api/types/CompanyEnrichmentOutput.js +16 -0
  37. package/dist/cjs/api/types/ContinueResponseDto.d.ts +2 -2
  38. package/dist/cjs/api/types/CreateMonitorResponseDto.d.ts +1 -1
  39. package/dist/cjs/api/types/EndDate.d.ts +4 -2
  40. package/dist/cjs/api/types/EnrichmentType.d.ts +1 -3
  41. package/dist/cjs/api/types/EnrichmentType.js +1 -3
  42. package/dist/cjs/api/types/Error_.d.ts +1 -1
  43. package/dist/cjs/api/types/GetPlanLimitsResponseDto.d.ts +5 -0
  44. package/dist/cjs/api/types/InitializeResponseDto.d.ts +8 -9
  45. package/dist/cjs/api/types/JobStep.d.ts +2 -2
  46. package/dist/cjs/api/types/Limit.d.ts +1 -1
  47. package/dist/cjs/api/types/ListMonitorsResponseDto.d.ts +7 -1
  48. package/dist/cjs/api/types/MonitorCitation.d.ts +3 -8
  49. package/dist/cjs/api/types/MonitorListItemDto.d.ts +10 -8
  50. package/dist/cjs/api/types/MonitorRecord.d.ts +4 -14
  51. package/dist/cjs/api/types/PlanFeature.d.ts +12 -0
  52. package/dist/cjs/api/types/PlanFeature.js +3 -0
  53. package/dist/{esm/api/types/JobStatus.d.mts → cjs/api/types/PublicJobStatus.d.ts} +4 -4
  54. package/dist/cjs/api/types/{JobStatus.js → PublicJobStatus.js} +4 -4
  55. package/dist/cjs/api/types/PullJobResponseDto.d.ts +34 -25
  56. package/dist/cjs/api/types/PullJobResponseDto.js +9 -0
  57. package/dist/cjs/api/types/PullMonitorResponseDto.d.ts +12 -12
  58. package/dist/cjs/api/types/Query.d.ts +1 -1
  59. package/dist/cjs/api/types/Record_.d.ts +2 -12
  60. package/dist/cjs/api/types/ReferenceJob.d.ts +3 -3
  61. package/dist/cjs/api/types/StartDate.d.ts +4 -2
  62. package/dist/cjs/api/types/StatusResponseDto.d.ts +2 -2
  63. package/dist/cjs/api/types/{SubmitResponseBody.d.ts → SubmitResponseDto.d.ts} +1 -1
  64. package/dist/cjs/api/types/SubmitResponseDto.js +3 -0
  65. package/dist/cjs/api/types/UserJob.d.ts +13 -1
  66. package/dist/cjs/api/types/UserJob.js +9 -0
  67. package/dist/cjs/api/types/ValidationErrorDetail.d.ts +3 -3
  68. package/dist/cjs/api/types/ValidationErrorResponse.d.ts +1 -1
  69. package/dist/cjs/api/types/ValidatorSchema.d.ts +3 -3
  70. package/dist/cjs/api/types/WebhookDto.d.ts +4 -4
  71. package/dist/cjs/api/types/WebhookPayload.d.ts +9 -9
  72. package/dist/cjs/api/types/index.d.ts +6 -3
  73. package/dist/cjs/api/types/index.js +6 -3
  74. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
  75. package/dist/cjs/core/fetcher/Fetcher.js +8 -2
  76. package/dist/cjs/core/fetcher/index.d.ts +2 -0
  77. package/dist/cjs/core/fetcher/index.js +3 -1
  78. package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
  79. package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
  80. package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
  81. package/dist/cjs/core/fetcher/makeRequest.js +30 -9
  82. package/dist/cjs/core/runtime/runtime.js +8 -7
  83. package/dist/cjs/version.d.ts +1 -1
  84. package/dist/cjs/version.js +1 -1
  85. package/dist/esm/BaseClient.mjs +2 -2
  86. package/dist/esm/Client.d.mts +12 -0
  87. package/dist/esm/Client.mjs +34 -0
  88. package/dist/esm/api/resources/jobs/client/Client.d.mts +14 -17
  89. package/dist/esm/api/resources/jobs/client/Client.mjs +13 -19
  90. package/dist/esm/api/resources/jobs/client/requests/ContinueRequestDto.d.mts +3 -3
  91. package/dist/esm/api/resources/jobs/client/requests/GetJobResultsRequest.d.mts +2 -2
  92. package/dist/esm/api/resources/jobs/client/requests/GetJobStatusRequest.d.mts +2 -2
  93. package/dist/esm/api/resources/jobs/client/requests/InitializeRequestDto.d.mts +2 -1
  94. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +26 -6
  95. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.mjs +13 -1
  96. package/dist/esm/api/resources/jobs/client/requests/index.d.mts +1 -1
  97. package/dist/esm/api/resources/jobs/client/requests/index.mjs +1 -1
  98. package/dist/esm/api/resources/jobs/exports.d.mts +2 -0
  99. package/dist/esm/api/resources/jobs/exports.mjs +3 -0
  100. package/dist/esm/api/resources/meta/client/Client.d.mts +15 -3
  101. package/dist/esm/api/resources/meta/client/Client.mjs +50 -2
  102. package/dist/esm/api/resources/meta/exports.d.mts +2 -0
  103. package/dist/esm/api/resources/meta/exports.mjs +3 -0
  104. package/dist/esm/api/resources/meta/types/GetVersionResponse.d.mts +1 -1
  105. package/dist/esm/api/resources/meta/types/HealthCheckResponse.d.mts +1 -1
  106. package/dist/esm/api/resources/monitors/client/Client.d.mts +23 -37
  107. package/dist/esm/api/resources/monitors/client/Client.mjs +35 -41
  108. package/dist/esm/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.mts +23 -6
  109. package/dist/esm/api/resources/monitors/client/requests/EnableMonitorRequestDto.d.mts +17 -0
  110. package/dist/esm/api/resources/monitors/client/requests/ListMonitorsRequest.d.mts +10 -0
  111. package/dist/esm/api/resources/monitors/client/requests/UpdateMonitorRequestDto.d.mts +2 -0
  112. package/dist/esm/api/resources/monitors/client/requests/index.d.mts +2 -1
  113. package/dist/esm/api/resources/monitors/exports.d.mts +2 -0
  114. package/dist/esm/api/resources/monitors/exports.mjs +3 -0
  115. package/dist/esm/api/types/BaseRecord.d.mts +38 -0
  116. package/dist/esm/api/types/BaseRecord.mjs +13 -0
  117. package/dist/esm/api/types/Citation.d.mts +3 -3
  118. package/dist/esm/api/types/CompanyEnrichmentOutput.d.mts +29 -0
  119. package/dist/esm/api/types/CompanyEnrichmentOutput.mjs +13 -0
  120. package/dist/esm/api/types/ContinueResponseDto.d.mts +2 -2
  121. package/dist/esm/api/types/CreateMonitorResponseDto.d.mts +1 -1
  122. package/dist/esm/api/types/EndDate.d.mts +4 -2
  123. package/dist/esm/api/types/EnrichmentType.d.mts +1 -3
  124. package/dist/esm/api/types/EnrichmentType.mjs +1 -3
  125. package/dist/esm/api/types/Error_.d.mts +1 -1
  126. package/dist/esm/api/types/GetPlanLimitsResponseDto.d.mts +5 -0
  127. package/dist/esm/api/types/InitializeResponseDto.d.mts +8 -9
  128. package/dist/esm/api/types/JobStep.d.mts +2 -2
  129. package/dist/esm/api/types/Limit.d.mts +1 -1
  130. package/dist/esm/api/types/ListMonitorsResponseDto.d.mts +7 -1
  131. package/dist/esm/api/types/MonitorCitation.d.mts +3 -8
  132. package/dist/esm/api/types/MonitorListItemDto.d.mts +10 -8
  133. package/dist/esm/api/types/MonitorRecord.d.mts +4 -14
  134. package/dist/esm/api/types/PlanFeature.d.mts +12 -0
  135. package/dist/esm/api/types/PlanFeature.mjs +2 -0
  136. package/dist/{cjs/api/types/JobStatus.d.ts → esm/api/types/PublicJobStatus.d.mts} +4 -4
  137. package/dist/esm/api/types/{JobStatus.mjs → PublicJobStatus.mjs} +3 -3
  138. package/dist/esm/api/types/PullJobResponseDto.d.mts +34 -25
  139. package/dist/esm/api/types/PullJobResponseDto.mjs +8 -1
  140. package/dist/esm/api/types/PullMonitorResponseDto.d.mts +12 -12
  141. package/dist/esm/api/types/Query.d.mts +1 -1
  142. package/dist/esm/api/types/Record_.d.mts +2 -12
  143. package/dist/esm/api/types/ReferenceJob.d.mts +3 -3
  144. package/dist/esm/api/types/StartDate.d.mts +4 -2
  145. package/dist/esm/api/types/StatusResponseDto.d.mts +2 -2
  146. package/dist/esm/api/types/{SubmitResponseBody.d.mts → SubmitResponseDto.d.mts} +1 -1
  147. package/dist/esm/api/types/SubmitResponseDto.mjs +2 -0
  148. package/dist/esm/api/types/UserJob.d.mts +13 -1
  149. package/dist/esm/api/types/UserJob.mjs +8 -1
  150. package/dist/esm/api/types/ValidationErrorDetail.d.mts +3 -3
  151. package/dist/esm/api/types/ValidationErrorResponse.d.mts +1 -1
  152. package/dist/esm/api/types/ValidatorSchema.d.mts +3 -3
  153. package/dist/esm/api/types/WebhookDto.d.mts +4 -4
  154. package/dist/esm/api/types/WebhookPayload.d.mts +9 -9
  155. package/dist/esm/api/types/index.d.mts +6 -3
  156. package/dist/esm/api/types/index.mjs +6 -3
  157. package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
  158. package/dist/esm/core/fetcher/Fetcher.mjs +8 -2
  159. package/dist/esm/core/fetcher/index.d.mts +2 -0
  160. package/dist/esm/core/fetcher/index.mjs +1 -0
  161. package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
  162. package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
  163. package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
  164. package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
  165. package/dist/esm/core/runtime/runtime.mjs +8 -7
  166. package/dist/esm/version.d.mts +1 -1
  167. package/dist/esm/version.mjs +1 -1
  168. package/package.json +37 -4
  169. package/reference.md +99 -53
  170. package/dist/cjs/api/resources/monitors/client/requests/EnableMonitorRequest.d.ts +0 -10
  171. package/dist/cjs/api/types/Schema.d.ts +0 -6
  172. package/dist/esm/api/resources/monitors/client/requests/EnableMonitorRequest.d.mts +0 -10
  173. package/dist/esm/api/types/Schema.d.mts +0 -6
  174. /package/dist/cjs/api/resources/monitors/client/requests/{EnableMonitorRequest.js → EnableMonitorRequestDto.js} +0 -0
  175. /package/dist/cjs/api/{types/Schema.js → resources/monitors/client/requests/ListMonitorsRequest.js} +0 -0
  176. /package/dist/cjs/api/types/{SubmitResponseBody.js → GetPlanLimitsResponseDto.js} +0 -0
  177. /package/dist/esm/api/resources/monitors/client/requests/{EnableMonitorRequest.mjs → EnableMonitorRequestDto.mjs} +0 -0
  178. /package/dist/esm/api/{types/Schema.mjs → resources/monitors/client/requests/ListMonitorsRequest.mjs} +0 -0
  179. /package/dist/esm/api/types/{SubmitResponseBody.mjs → GetPlanLimitsResponseDto.mjs} +0 -0
@@ -23,9 +23,7 @@ export class JobsClient {
23
23
  this._options = normalizeClientOptionsWithAuth(options);
24
24
  }
25
25
  /**
26
- * Get suggested validators, enrichments, and date ranges for a query before submitting a job.
27
- *
28
- * Returns LLM-generated suggestions based on query analysis and validates against plan limits.
26
+ * Get suggested validators, enrichments, and date ranges for a query.
29
27
  *
30
28
  * @param {CatchAllApi.InitializeRequestDto} request
31
29
  * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -35,7 +33,8 @@ export class JobsClient {
35
33
  *
36
34
  * @example
37
35
  * await client.jobs.initialize({
38
- * query: "AI company acquisitions in fintech last week"
36
+ * query: "Series B funding rounds for SaaS startups",
37
+ * context: "Focus on funding amount and company name"
39
38
  * })
40
39
  */
41
40
  initialize(request, requestOptions) {
@@ -81,10 +80,7 @@ export class JobsClient {
81
80
  });
82
81
  }
83
82
  /**
84
- * Submit a natural language query to create a new processing job.
85
- *
86
- * Optionally specify context, date ranges, limit, custom validators, and enrichments.
87
- * If dates exceed plan limits, returns 400 error.
83
+ * Submit a query to create a new processing job.
88
84
  *
89
85
  * @param {CatchAllApi.SubmitRequestDto} request
90
86
  * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -95,11 +91,12 @@ export class JobsClient {
95
91
  *
96
92
  * @example
97
93
  * await client.jobs.createJob({
98
- * query: "AI company acquisitions",
99
- * context: "Focus on deal size and acquiring company details",
94
+ * query: "Series B funding rounds for SaaS startups",
95
+ * context: "Focus on funding amount and company name",
100
96
  * limit: 10,
101
- * start_date: "2026-01-30T00:00:00Z",
102
- * end_date: "2026-02-05T00:00:00Z"
97
+ * start_date: "2026-02-18T00:00:00Z",
98
+ * end_date: "2026-02-23T00:00:00Z",
99
+ * mode: "base"
103
100
  * })
104
101
  */
105
102
  createJob(request, requestOptions) {
@@ -158,7 +155,7 @@ export class JobsClient {
158
155
  *
159
156
  * @example
160
157
  * await client.jobs.continueJob({
161
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3",
158
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
162
159
  * new_limit: 100
163
160
  * })
164
161
  */
@@ -217,7 +214,7 @@ export class JobsClient {
217
214
  *
218
215
  * @example
219
216
  * await client.jobs.getJobStatus({
220
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3"
217
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
221
218
  * })
222
219
  */
223
220
  getJobStatus(request, requestOptions) {
@@ -296,10 +293,7 @@ export class JobsClient {
296
293
  logging: this._options.logging,
297
294
  });
298
295
  if (_response.ok) {
299
- return {
300
- data: _response.body,
301
- rawResponse: _response.rawResponse,
302
- };
296
+ return { data: _response.body, rawResponse: _response.rawResponse };
303
297
  }
304
298
  if (_response.error.reason === "status-code") {
305
299
  switch (_response.error.statusCode) {
@@ -327,7 +321,7 @@ export class JobsClient {
327
321
  *
328
322
  * @example
329
323
  * await client.jobs.getJobResults({
330
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3"
324
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
331
325
  * })
332
326
  */
333
327
  getJobResults(request, requestOptions) {
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3",
4
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
5
5
  * new_limit: 100
6
6
  * }
7
7
  */
8
8
  export interface ContinueRequestDto {
9
9
  /** Job identifier of the completed job to continue. */
10
10
  job_id: string;
11
- /** New record limit for continued processing. Must be greater than the previous limit. */
12
- new_limit: number;
11
+ /** New record limit for continued processing. Must be greater than the previous limit. If not provided, defaults to the plan maximum. */
12
+ new_limit?: number;
13
13
  }
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3"
4
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
5
5
  * }
6
6
  */
7
7
  export interface GetJobResultsRequest {
8
- /** Unique job identifier returned from the [`POST /catchAll/submit`](https://www.newscatcherapi.com/docs/v3/catch-all/endpoints/create-job) endpoint. */
8
+ /** Unique job identifier returned from [`POST /catchAll/submit`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/create-job). */
9
9
  job_id: string;
10
10
  /** Page number to retrieve. */
11
11
  page?: number;
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3"
4
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
5
5
  * }
6
6
  */
7
7
  export interface GetJobStatusRequest {
8
- /** Unique job identifier returned from the [`POST /catchAll/submit`](https://www.newscatcherapi.com/docs/v3/catch-all/endpoints/create-job) endpoint. */
8
+ /** Unique job identifier returned from [`POST /catchAll/submit`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/create-job). */
9
9
  job_id: string;
10
10
  }
@@ -2,7 +2,8 @@ import type * as CatchAllApi from "../../../../index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * query: "AI company acquisitions in fintech last week"
5
+ * query: "Series B funding rounds for SaaS startups",
6
+ * context: "Focus on funding amount and company name"
6
7
  * }
7
8
  */
8
9
  export interface InitializeRequestDto {
@@ -2,22 +2,22 @@ import type * as CatchAllApi from "../../../../index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * query: "AI company acquisitions",
6
- * context: "Focus on deal size and acquiring company details",
5
+ * query: "Series B funding rounds for SaaS startups",
6
+ * context: "Focus on funding amount and company name",
7
7
  * limit: 10,
8
- * start_date: "2026-01-30T00:00:00Z",
9
- * end_date: "2026-02-05T00:00:00Z"
8
+ * start_date: "2026-02-18T00:00:00Z",
9
+ * end_date: "2026-02-23T00:00:00Z",
10
+ * mode: "base"
10
11
  * }
11
12
  */
12
13
  export interface SubmitRequestDto {
13
14
  query: CatchAllApi.Query;
14
- schema?: CatchAllApi.Schema;
15
15
  context?: CatchAllApi.Context;
16
16
  limit?: CatchAllApi.Limit;
17
17
  start_date?: CatchAllApi.StartDate;
18
18
  end_date?: CatchAllApi.EndDate;
19
19
  /**
20
- * Custom validators for filtering article clusters.
20
+ * Custom validators for filtering web page clusters.
21
21
  *
22
22
  * If not provided, validators are generated automatically based on the query.
23
23
  */
@@ -28,4 +28,24 @@ export interface SubmitRequestDto {
28
28
  * If not provided, enrichments are generated automatically based on the query.
29
29
  */
30
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];
31
51
  }
@@ -1,2 +1,14 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var SubmitRequestDto;
3
+ (function (SubmitRequestDto) {
4
+ /**
5
+ * Job processing mode.
6
+ *
7
+ * - `base`: Full pipeline with validation and enrichment.
8
+ * - `lite`: Lightweight extraction with faster processing. Returns titles and citations only.
9
+ */
10
+ SubmitRequestDto.Mode = {
11
+ Lite: "lite",
12
+ Base: "base",
13
+ };
14
+ })(SubmitRequestDto || (SubmitRequestDto = {}));
@@ -3,4 +3,4 @@ export type { GetJobResultsRequest } from "./GetJobResultsRequest.mjs";
3
3
  export type { GetJobStatusRequest } from "./GetJobStatusRequest.mjs";
4
4
  export type { GetUserJobsRequest } from "./GetUserJobsRequest.mjs";
5
5
  export type { InitializeRequestDto } from "./InitializeRequestDto.mjs";
6
- export type { SubmitRequestDto } from "./SubmitRequestDto.mjs";
6
+ export { SubmitRequestDto } from "./SubmitRequestDto.mjs";
@@ -1 +1 @@
1
- export {};
1
+ export { SubmitRequestDto } from "./SubmitRequestDto.mjs";
@@ -0,0 +1,2 @@
1
+ export { JobsClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { JobsClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -1,7 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
- import { type NormalizedClientOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
- import type * as CatchAllApi from "../../../index.mjs";
4
+ import * as CatchAllApi from "../../../index.mjs";
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
  }
@@ -8,18 +8,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { normalizeClientOptions } from "../../../../BaseClient.mjs";
11
+ import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
12
12
  import { mergeHeaders } from "../../../../core/headers.mjs";
13
13
  import * as core from "../../../../core/index.mjs";
14
14
  import * as environments from "../../../../environments.mjs";
15
15
  import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
16
  import * as errors from "../../../../errors/index.mjs";
17
+ import * as CatchAllApi from "../../../index.mjs";
17
18
  /**
18
19
  * Operations to check API health and version.
19
20
  */
20
21
  export class MetaClient {
21
22
  constructor(options = {}) {
22
- this._options = normalizeClientOptions(options);
23
+ this._options = normalizeClientOptionsWithAuth(options);
23
24
  }
24
25
  /**
25
26
  * Check API availability.
@@ -99,4 +100,51 @@ export class MetaClient {
99
100
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/version");
100
101
  });
101
102
  }
103
+ /**
104
+ * Returns plan features and current usage for the authenticated organization.
105
+ *
106
+ * @param {MetaClient.RequestOptions} requestOptions - Request-specific configuration.
107
+ *
108
+ * @throws {@link CatchAllApi.ForbiddenError}
109
+ *
110
+ * @example
111
+ * await client.meta.getPlanLimits()
112
+ */
113
+ getPlanLimits(requestOptions) {
114
+ return core.HttpResponsePromise.fromPromise(this.__getPlanLimits(requestOptions));
115
+ }
116
+ __getPlanLimits(requestOptions) {
117
+ return __awaiter(this, void 0, void 0, function* () {
118
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
119
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
120
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
121
+ const _response = yield core.fetcher({
122
+ 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"),
123
+ method: "POST",
124
+ headers: _headers,
125
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
126
+ 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,
127
+ 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,
128
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
129
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
130
+ logging: this._options.logging,
131
+ });
132
+ if (_response.ok) {
133
+ return { data: _response.body, rawResponse: _response.rawResponse };
134
+ }
135
+ if (_response.error.reason === "status-code") {
136
+ switch (_response.error.statusCode) {
137
+ case 403:
138
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
139
+ default:
140
+ throw new errors.CatchAllApiError({
141
+ statusCode: _response.error.statusCode,
142
+ body: _response.error.body,
143
+ rawResponse: _response.rawResponse,
144
+ });
145
+ }
146
+ }
147
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/catchAll/user/limits");
148
+ });
149
+ }
102
150
  }
@@ -0,0 +1,2 @@
1
+ export { MetaClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { MetaClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -1,3 +1,3 @@
1
1
  export interface GetVersionResponse {
2
- version?: string;
2
+ version?: string | undefined;
3
3
  }
@@ -1,3 +1,3 @@
1
1
  export interface HealthCheckResponse {
2
- healthy?: boolean;
2
+ healthy?: boolean | undefined;
3
3
  }
@@ -14,20 +14,7 @@ export declare class MonitorsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<MonitorsClient.Options>;
15
15
  constructor(options?: MonitorsClient.Options);
16
16
  /**
17
- * Create a monitor that runs jobs based on a reference job with a specified schedule.
18
- *
19
- * **Reference job requirements:**
20
- * - Job's `end_date` must be within the last 7 days
21
- *
22
- * **Schedule requirements:**
23
- * - Minimum 24-hour interval between executions
24
- * - Natural language format (e.g., "every day at 12 PM UTC", "every 48 hours")
25
- *
26
- * **Validation:**
27
- * - Reference jobs older than 7 days return 400 Bad Request.
28
- * - Schedules below minimum frequency return error with descriptive message.
29
- * - Invalid job IDs return 400 Bad Request.
30
- * - Duplicate monitors (same job already monitored) return error.
17
+ * Create a scheduled monitor based on a reference job.
31
18
  *
32
19
  * @param {CatchAllApi.CreateMonitorRequestDto} request
33
20
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -36,22 +23,23 @@ export declare class MonitorsClient {
36
23
  *
37
24
  * @example
38
25
  * await client.monitors.createMonitor({
39
- * reference_job_id: "reference_job_id",
40
- * schedule: "every day at 12 PM UTC"
26
+ * reference_job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
27
+ * schedule: "every day at 12 PM UTC",
28
+ * webhook: {
29
+ * url: "https://your-endpoint.com/webhook",
30
+ * method: "POST",
31
+ * headers: {
32
+ * "Authorization": "Bearer your_token_here"
33
+ * }
34
+ * },
35
+ * limit: 10,
36
+ * backfill: true
41
37
  * })
42
38
  */
43
39
  createMonitor(request: CatchAllApi.CreateMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.CreateMonitorResponseDto>;
44
40
  private __createMonitor;
45
41
  /**
46
- * Update webhook configuration for an existing monitor without recreating it.
47
- *
48
- * **Supported updates:**
49
- * - Webhook URL
50
- * - HTTP method (POST/PUT)
51
- * - Headers and authentication
52
- * - Query parameters
53
- *
54
- * **Note:** Schedule and reference job cannot be modified. To change these, create a new monitor.
42
+ * Update the webhook configuration for an existing monitor.
55
43
  *
56
44
  * @param {CatchAllApi.UpdateMonitorRequestDto} request
57
45
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -75,8 +63,7 @@ export declare class MonitorsClient {
75
63
  updateMonitor(request: CatchAllApi.UpdateMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.UpdateMonitorResponseDto>;
76
64
  private __updateMonitor;
77
65
  /**
78
- * Returns all jobs associated with a monitor, sorted by start_date.
79
- * Each job includes job_id, start_date, and end_date.
66
+ * Return all jobs executed by a monitor.
80
67
  *
81
68
  * @param {CatchAllApi.ListMonitorJobsRequest} request
82
69
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -92,8 +79,7 @@ export declare class MonitorsClient {
92
79
  listMonitorJobs(request: CatchAllApi.ListMonitorJobsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorJobsResponse>;
93
80
  private __listMonitorJobs;
94
81
  /**
95
- * Retrieve aggregated results from all jobs executed by this monitor.
96
- * Includes monitor configuration, execution history, and all records collected.
82
+ * Retrieve aggregated results from all jobs executed by a monitor.
97
83
  *
98
84
  * @param {CatchAllApi.PullMonitorResultsRequest} request
99
85
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -109,8 +95,7 @@ export declare class MonitorsClient {
109
95
  pullMonitorResults(request: CatchAllApi.PullMonitorResultsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.PullMonitorResponseDto>;
110
96
  private __pullMonitorResults;
111
97
  /**
112
- * Disables a monitor to stop executing scheduled jobs.
113
- * Validates that the provided API key is associated with the monitor.
98
+ * Stop scheduled job execution for a monitor.
114
99
  *
115
100
  * @param {CatchAllApi.DisableMonitorRequest} request
116
101
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -127,10 +112,9 @@ export declare class MonitorsClient {
127
112
  disableMonitor(request: CatchAllApi.DisableMonitorRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.DisableMonitorResponse>;
128
113
  private __disableMonitor;
129
114
  /**
130
- * Enables a monitor to resume executing scheduled jobs.
131
- * Validates that the provided API key is associated with the monitor.
115
+ * Resume scheduled job execution for a monitor.
132
116
  *
133
- * @param {CatchAllApi.EnableMonitorRequest} request
117
+ * @param {CatchAllApi.EnableMonitorRequestDto} request
134
118
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
135
119
  *
136
120
  * @throws {@link CatchAllApi.ForbiddenError}
@@ -139,14 +123,16 @@ export declare class MonitorsClient {
139
123
  *
140
124
  * @example
141
125
  * await client.monitors.enableMonitor({
142
- * monitor_id: "monitor_id"
126
+ * monitor_id: "monitor_id",
127
+ * backfill: true
143
128
  * })
144
129
  */
145
- enableMonitor(request: CatchAllApi.EnableMonitorRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.EnableMonitorResponse>;
130
+ enableMonitor(request: CatchAllApi.EnableMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.EnableMonitorResponse>;
146
131
  private __enableMonitor;
147
132
  /**
148
133
  * Returns all monitors created by the authenticated user.
149
134
  *
135
+ * @param {CatchAllApi.ListMonitorsRequest} request
150
136
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
151
137
  *
152
138
  * @throws {@link CatchAllApi.ForbiddenError}
@@ -155,6 +141,6 @@ export declare class MonitorsClient {
155
141
  * @example
156
142
  * await client.monitors.listMonitors()
157
143
  */
158
- listMonitors(requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorsResponseDto>;
144
+ listMonitors(request?: CatchAllApi.ListMonitorsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorsResponseDto>;
159
145
  private __listMonitors;
160
146
  }