newscatcher-catchall-sdk 0.3.1 → 1.1.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.
Files changed (169) hide show
  1. package/README.md +284 -286
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/jobs/client/Client.d.ts +32 -8
  4. package/dist/cjs/api/resources/jobs/client/Client.js +93 -20
  5. package/dist/cjs/api/resources/jobs/client/requests/ContinueRequestDto.d.ts +3 -3
  6. package/dist/cjs/api/resources/jobs/client/requests/GetJobResultsRequest.d.ts +2 -2
  7. package/dist/cjs/api/resources/jobs/client/requests/GetJobStatusRequest.d.ts +2 -2
  8. package/dist/cjs/api/resources/jobs/client/requests/GetUserJobsRequest.d.ts +10 -0
  9. package/dist/cjs/api/resources/jobs/client/requests/InitializeRequestDto.d.ts +12 -0
  10. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +17 -6
  11. package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +2 -0
  12. package/dist/cjs/api/resources/jobs/exports.d.ts +2 -0
  13. package/dist/cjs/api/resources/jobs/exports.js +21 -0
  14. package/dist/cjs/api/resources/meta/exports.d.ts +2 -0
  15. package/dist/cjs/api/resources/meta/exports.js +21 -0
  16. package/dist/cjs/api/resources/meta/types/GetVersionResponse.d.ts +1 -1
  17. package/dist/cjs/api/resources/meta/types/HealthCheckResponse.d.ts +1 -1
  18. package/dist/cjs/api/resources/monitors/client/Client.d.ts +23 -33
  19. package/dist/cjs/api/resources/monitors/client/Client.js +35 -37
  20. package/dist/cjs/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.ts +26 -5
  21. package/dist/cjs/api/resources/monitors/client/requests/EnableMonitorRequestDto.d.ts +17 -0
  22. package/dist/cjs/api/resources/monitors/client/requests/ListMonitorsRequest.d.ts +10 -0
  23. package/dist/cjs/api/resources/monitors/client/requests/ListMonitorsRequest.js +3 -0
  24. package/dist/cjs/api/resources/monitors/client/requests/UpdateMonitorRequestDto.d.ts +2 -0
  25. package/dist/cjs/api/resources/monitors/client/requests/index.d.ts +2 -1
  26. package/dist/cjs/api/resources/monitors/exports.d.ts +2 -0
  27. package/dist/cjs/api/resources/monitors/exports.js +21 -0
  28. package/dist/cjs/api/types/BaseRecord.d.ts +38 -0
  29. package/dist/cjs/api/types/BaseRecord.js +16 -0
  30. package/dist/cjs/api/types/Citation.d.ts +3 -3
  31. package/dist/cjs/api/types/CompanyEnrichmentOutput.d.ts +29 -0
  32. package/dist/cjs/api/types/CompanyEnrichmentOutput.js +16 -0
  33. package/dist/cjs/api/types/ContinueResponseDto.d.ts +2 -2
  34. package/dist/cjs/api/types/CreateMonitorResponseDto.d.ts +1 -1
  35. package/dist/cjs/api/types/EndDate.d.ts +8 -0
  36. package/dist/cjs/api/types/EndDate.js +3 -0
  37. package/dist/cjs/api/types/EnrichmentSchema.d.ts +13 -0
  38. package/dist/cjs/api/types/EnrichmentSchema.js +3 -0
  39. package/dist/cjs/api/types/EnrichmentType.d.ts +19 -0
  40. package/dist/cjs/api/types/EnrichmentType.js +22 -0
  41. package/dist/cjs/api/types/Error_.d.ts +1 -1
  42. package/dist/cjs/api/types/InitializeResponseDto.d.ts +19 -0
  43. package/dist/cjs/api/types/InitializeResponseDto.js +3 -0
  44. package/dist/cjs/api/types/JobStep.d.ts +2 -2
  45. package/dist/cjs/api/types/Limit.d.ts +6 -0
  46. package/dist/cjs/api/types/Limit.js +3 -0
  47. package/dist/cjs/api/types/ListMonitorsResponseDto.d.ts +7 -1
  48. package/dist/cjs/api/types/ListUserJobsResponseDto.d.ts +11 -8
  49. package/dist/cjs/api/types/MonitorCitation.d.ts +3 -8
  50. package/dist/cjs/api/types/MonitorListItemDto.d.ts +7 -7
  51. package/dist/cjs/api/types/MonitorRecord.d.ts +4 -14
  52. package/dist/{esm/api/types/JobStatus.d.mts → cjs/api/types/PublicJobStatus.d.ts} +4 -4
  53. package/dist/cjs/api/types/{JobStatus.js → PublicJobStatus.js} +4 -4
  54. package/dist/cjs/api/types/PullJobResponseDto.d.ts +28 -23
  55. package/dist/cjs/api/types/PullMonitorResponseDto.d.ts +12 -12
  56. package/dist/cjs/api/types/Query.d.ts +1 -1
  57. package/dist/cjs/api/types/Record_.d.ts +2 -12
  58. package/dist/cjs/api/types/ReferenceJob.d.ts +3 -3
  59. package/dist/cjs/api/types/StartDate.d.ts +8 -0
  60. package/dist/cjs/api/types/StartDate.js +3 -0
  61. package/dist/cjs/api/types/StatusResponseDto.d.ts +2 -2
  62. package/dist/cjs/api/types/{SubmitResponseBody.d.ts → SubmitResponseDto.d.ts} +1 -1
  63. package/dist/cjs/api/types/SubmitResponseDto.js +3 -0
  64. package/dist/cjs/api/types/UserJob.d.ts +10 -0
  65. package/dist/cjs/api/types/UserJob.js +3 -0
  66. package/dist/cjs/api/types/ValidationErrorDetail.d.ts +3 -3
  67. package/dist/cjs/api/types/ValidationErrorResponse.d.ts +1 -1
  68. package/dist/cjs/api/types/ValidatorSchema.d.ts +13 -0
  69. package/dist/cjs/api/types/ValidatorSchema.js +3 -0
  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 +12 -3
  73. package/dist/cjs/api/types/index.js +12 -3
  74. package/dist/cjs/core/fetcher/Fetcher.js +8 -2
  75. package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
  76. package/dist/cjs/core/fetcher/makeRequest.js +30 -9
  77. package/dist/cjs/core/runtime/runtime.js +8 -7
  78. package/dist/cjs/version.d.ts +1 -1
  79. package/dist/cjs/version.js +1 -1
  80. package/dist/esm/BaseClient.mjs +2 -2
  81. package/dist/esm/api/resources/jobs/client/Client.d.mts +32 -8
  82. package/dist/esm/api/resources/jobs/client/Client.mjs +93 -20
  83. package/dist/esm/api/resources/jobs/client/requests/ContinueRequestDto.d.mts +3 -3
  84. package/dist/esm/api/resources/jobs/client/requests/GetJobResultsRequest.d.mts +2 -2
  85. package/dist/esm/api/resources/jobs/client/requests/GetJobStatusRequest.d.mts +2 -2
  86. package/dist/esm/api/resources/jobs/client/requests/GetUserJobsRequest.d.mts +10 -0
  87. package/dist/esm/api/resources/jobs/client/requests/InitializeRequestDto.d.mts +12 -0
  88. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +17 -6
  89. package/dist/esm/api/resources/jobs/client/requests/index.d.mts +2 -0
  90. package/dist/esm/api/resources/jobs/exports.d.mts +2 -0
  91. package/dist/esm/api/resources/jobs/exports.mjs +3 -0
  92. package/dist/esm/api/resources/meta/exports.d.mts +2 -0
  93. package/dist/esm/api/resources/meta/exports.mjs +3 -0
  94. package/dist/esm/api/resources/meta/types/GetVersionResponse.d.mts +1 -1
  95. package/dist/esm/api/resources/meta/types/HealthCheckResponse.d.mts +1 -1
  96. package/dist/esm/api/resources/monitors/client/Client.d.mts +23 -33
  97. package/dist/esm/api/resources/monitors/client/Client.mjs +35 -37
  98. package/dist/esm/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.mts +26 -5
  99. package/dist/esm/api/resources/monitors/client/requests/EnableMonitorRequestDto.d.mts +17 -0
  100. package/dist/esm/api/resources/monitors/client/requests/ListMonitorsRequest.d.mts +10 -0
  101. package/dist/esm/api/resources/monitors/client/requests/ListMonitorsRequest.mjs +2 -0
  102. package/dist/esm/api/resources/monitors/client/requests/UpdateMonitorRequestDto.d.mts +2 -0
  103. package/dist/esm/api/resources/monitors/client/requests/index.d.mts +2 -1
  104. package/dist/esm/api/resources/monitors/exports.d.mts +2 -0
  105. package/dist/esm/api/resources/monitors/exports.mjs +3 -0
  106. package/dist/esm/api/types/BaseRecord.d.mts +38 -0
  107. package/dist/esm/api/types/BaseRecord.mjs +13 -0
  108. package/dist/esm/api/types/Citation.d.mts +3 -3
  109. package/dist/esm/api/types/CompanyEnrichmentOutput.d.mts +29 -0
  110. package/dist/esm/api/types/CompanyEnrichmentOutput.mjs +13 -0
  111. package/dist/esm/api/types/ContinueResponseDto.d.mts +2 -2
  112. package/dist/esm/api/types/CreateMonitorResponseDto.d.mts +1 -1
  113. package/dist/esm/api/types/EndDate.d.mts +8 -0
  114. package/dist/esm/api/types/EndDate.mjs +2 -0
  115. package/dist/esm/api/types/EnrichmentSchema.d.mts +13 -0
  116. package/dist/esm/api/types/EnrichmentSchema.mjs +2 -0
  117. package/dist/esm/api/types/EnrichmentType.d.mts +19 -0
  118. package/dist/esm/api/types/EnrichmentType.mjs +19 -0
  119. package/dist/esm/api/types/Error_.d.mts +1 -1
  120. package/dist/esm/api/types/InitializeResponseDto.d.mts +19 -0
  121. package/dist/esm/api/types/InitializeResponseDto.mjs +2 -0
  122. package/dist/esm/api/types/JobStep.d.mts +2 -2
  123. package/dist/esm/api/types/Limit.d.mts +6 -0
  124. package/dist/esm/api/types/Limit.mjs +2 -0
  125. package/dist/esm/api/types/ListMonitorsResponseDto.d.mts +7 -1
  126. package/dist/esm/api/types/ListUserJobsResponseDto.d.mts +11 -8
  127. package/dist/esm/api/types/MonitorCitation.d.mts +3 -8
  128. package/dist/esm/api/types/MonitorListItemDto.d.mts +7 -7
  129. package/dist/esm/api/types/MonitorRecord.d.mts +4 -14
  130. package/dist/{cjs/api/types/JobStatus.d.ts → esm/api/types/PublicJobStatus.d.mts} +4 -4
  131. package/dist/esm/api/types/{JobStatus.mjs → PublicJobStatus.mjs} +3 -3
  132. package/dist/esm/api/types/PullJobResponseDto.d.mts +28 -23
  133. package/dist/esm/api/types/PullMonitorResponseDto.d.mts +12 -12
  134. package/dist/esm/api/types/Query.d.mts +1 -1
  135. package/dist/esm/api/types/Record_.d.mts +2 -12
  136. package/dist/esm/api/types/ReferenceJob.d.mts +3 -3
  137. package/dist/esm/api/types/StartDate.d.mts +8 -0
  138. package/dist/esm/api/types/StartDate.mjs +2 -0
  139. package/dist/esm/api/types/StatusResponseDto.d.mts +2 -2
  140. package/dist/esm/api/types/{SubmitResponseBody.d.mts → SubmitResponseDto.d.mts} +1 -1
  141. package/dist/esm/api/types/SubmitResponseDto.mjs +2 -0
  142. package/dist/esm/api/types/UserJob.d.mts +10 -0
  143. package/dist/esm/api/types/UserJob.mjs +2 -0
  144. package/dist/esm/api/types/ValidationErrorDetail.d.mts +3 -3
  145. package/dist/esm/api/types/ValidationErrorResponse.d.mts +1 -1
  146. package/dist/esm/api/types/ValidatorSchema.d.mts +13 -0
  147. package/dist/esm/api/types/ValidatorSchema.mjs +2 -0
  148. package/dist/esm/api/types/WebhookDto.d.mts +4 -4
  149. package/dist/esm/api/types/WebhookPayload.d.mts +9 -9
  150. package/dist/esm/api/types/index.d.mts +12 -3
  151. package/dist/esm/api/types/index.mjs +12 -3
  152. package/dist/esm/core/fetcher/Fetcher.mjs +8 -2
  153. package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
  154. package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
  155. package/dist/esm/core/runtime/runtime.mjs +8 -7
  156. package/dist/esm/version.d.mts +1 -1
  157. package/dist/esm/version.mjs +1 -1
  158. package/package.json +37 -4
  159. package/reference.md +115 -40
  160. package/dist/cjs/api/resources/monitors/client/requests/EnableMonitorRequest.d.ts +0 -10
  161. package/dist/cjs/api/types/Schema.d.ts +0 -6
  162. package/dist/esm/api/resources/monitors/client/requests/EnableMonitorRequest.d.mts +0 -10
  163. package/dist/esm/api/types/Schema.d.mts +0 -6
  164. /package/dist/cjs/api/resources/{monitors/client/requests/EnableMonitorRequest.js → jobs/client/requests/GetUserJobsRequest.js} +0 -0
  165. /package/dist/cjs/api/{types/Schema.js → resources/jobs/client/requests/InitializeRequestDto.js} +0 -0
  166. /package/dist/cjs/api/{types/SubmitResponseBody.js → resources/monitors/client/requests/EnableMonitorRequestDto.js} +0 -0
  167. /package/dist/esm/api/resources/{monitors/client/requests/EnableMonitorRequest.mjs → jobs/client/requests/GetUserJobsRequest.mjs} +0 -0
  168. /package/dist/esm/api/{types/Schema.mjs → resources/jobs/client/requests/InitializeRequestDto.mjs} +0 -0
  169. /package/dist/esm/api/{types/SubmitResponseBody.mjs → resources/monitors/client/requests/EnableMonitorRequestDto.mjs} +0 -0
@@ -14,21 +14,42 @@ export declare class JobsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<JobsClient.Options>;
15
15
  constructor(options?: JobsClient.Options);
16
16
  /**
17
- * Submit a natural language query to create a new processing job.
17
+ * Get suggested validators, enrichments, and date ranges for a query.
18
+ *
19
+ * @param {CatchAllApi.InitializeRequestDto} request
20
+ * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
21
+ *
22
+ * @throws {@link CatchAllApi.ForbiddenError}
23
+ * @throws {@link CatchAllApi.UnprocessableEntityError}
24
+ *
25
+ * @example
26
+ * await client.jobs.initialize({
27
+ * query: "Series B funding rounds for SaaS startups",
28
+ * context: "Focus on funding amount and company name"
29
+ * })
30
+ */
31
+ initialize(request: CatchAllApi.InitializeRequestDto, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.InitializeResponseDto>;
32
+ private __initialize;
33
+ /**
34
+ * Submit a query to create a new processing job.
18
35
  *
19
36
  * @param {CatchAllApi.SubmitRequestDto} request
20
37
  * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
21
38
  *
39
+ * @throws {@link CatchAllApi.BadRequestError}
22
40
  * @throws {@link CatchAllApi.ForbiddenError}
23
41
  * @throws {@link CatchAllApi.UnprocessableEntityError}
24
42
  *
25
43
  * @example
26
44
  * await client.jobs.createJob({
27
- * query: "AI company acquisitions",
28
- * context: "Focus on deal size and acquiring company details"
45
+ * query: "Series B funding rounds for SaaS startups",
46
+ * context: "Focus on funding amount and company name",
47
+ * limit: 10,
48
+ * start_date: "2026-02-18T00:00:00Z",
49
+ * end_date: "2026-02-23T00:00:00Z"
29
50
  * })
30
51
  */
31
- createJob(request: CatchAllApi.SubmitRequestDto, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.SubmitResponseBody>;
52
+ createJob(request: CatchAllApi.SubmitRequestDto, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.SubmitResponseDto>;
32
53
  private __createJob;
33
54
  /**
34
55
  * Continue an existing job to process more records beyond the initial limit.
@@ -42,7 +63,7 @@ export declare class JobsClient {
42
63
  *
43
64
  * @example
44
65
  * await client.jobs.continueJob({
45
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3",
66
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
46
67
  * new_limit: 100
47
68
  * })
48
69
  */
@@ -59,7 +80,7 @@ export declare class JobsClient {
59
80
  *
60
81
  * @example
61
82
  * await client.jobs.getJobStatus({
62
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3"
83
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
63
84
  * })
64
85
  */
65
86
  getJobStatus(request: CatchAllApi.GetJobStatusRequest, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.StatusResponseDto>;
@@ -67,12 +88,15 @@ export declare class JobsClient {
67
88
  /**
68
89
  * Returns all jobs created by the authenticated user.
69
90
  *
91
+ * @param {CatchAllApi.GetUserJobsRequest} request
70
92
  * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
71
93
  *
94
+ * @throws {@link CatchAllApi.ForbiddenError}
95
+ *
72
96
  * @example
73
97
  * await client.jobs.getUserJobs()
74
98
  */
75
- getUserJobs(requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListUserJobsResponseDto[]>;
99
+ getUserJobs(request?: CatchAllApi.GetUserJobsRequest, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListUserJobsResponseDto>;
76
100
  private __getUserJobs;
77
101
  /**
78
102
  * Retrieve the final results for a completed job.
@@ -85,7 +109,7 @@ export declare class JobsClient {
85
109
  *
86
110
  * @example
87
111
  * await client.jobs.getJobResults({
88
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3"
112
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
89
113
  * })
90
114
  */
91
115
  getJobResults(request: CatchAllApi.GetJobResultsRequest, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.PullJobResponseDto>;
@@ -59,18 +59,79 @@ class JobsClient {
59
59
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
60
60
  }
61
61
  /**
62
- * Submit a natural language query to create a new processing job.
62
+ * Get suggested validators, enrichments, and date ranges for a query.
63
+ *
64
+ * @param {CatchAllApi.InitializeRequestDto} request
65
+ * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @throws {@link CatchAllApi.ForbiddenError}
68
+ * @throws {@link CatchAllApi.UnprocessableEntityError}
69
+ *
70
+ * @example
71
+ * await client.jobs.initialize({
72
+ * query: "Series B funding rounds for SaaS startups",
73
+ * context: "Focus on funding amount and company name"
74
+ * })
75
+ */
76
+ initialize(request, requestOptions) {
77
+ return core.HttpResponsePromise.fromPromise(this.__initialize(request, requestOptions));
78
+ }
79
+ __initialize(request, requestOptions) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
82
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
83
+ 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);
84
+ const _response = yield core.fetcher({
85
+ 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/initialize"),
86
+ method: "POST",
87
+ headers: _headers,
88
+ contentType: "application/json",
89
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
90
+ requestType: "json",
91
+ body: request,
92
+ 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,
93
+ 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,
94
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
95
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
96
+ logging: this._options.logging,
97
+ });
98
+ if (_response.ok) {
99
+ return { data: _response.body, rawResponse: _response.rawResponse };
100
+ }
101
+ if (_response.error.reason === "status-code") {
102
+ switch (_response.error.statusCode) {
103
+ case 403:
104
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
105
+ case 422:
106
+ throw new CatchAllApi.UnprocessableEntityError(_response.error.body, _response.rawResponse);
107
+ default:
108
+ throw new errors.CatchAllApiError({
109
+ statusCode: _response.error.statusCode,
110
+ body: _response.error.body,
111
+ rawResponse: _response.rawResponse,
112
+ });
113
+ }
114
+ }
115
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/catchAll/initialize");
116
+ });
117
+ }
118
+ /**
119
+ * Submit a query to create a new processing job.
63
120
  *
64
121
  * @param {CatchAllApi.SubmitRequestDto} request
65
122
  * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
66
123
  *
124
+ * @throws {@link CatchAllApi.BadRequestError}
67
125
  * @throws {@link CatchAllApi.ForbiddenError}
68
126
  * @throws {@link CatchAllApi.UnprocessableEntityError}
69
127
  *
70
128
  * @example
71
129
  * await client.jobs.createJob({
72
- * query: "AI company acquisitions",
73
- * context: "Focus on deal size and acquiring company details"
130
+ * query: "Series B funding rounds for SaaS startups",
131
+ * context: "Focus on funding amount and company name",
132
+ * limit: 10,
133
+ * start_date: "2026-02-18T00:00:00Z",
134
+ * end_date: "2026-02-23T00:00:00Z"
74
135
  * })
75
136
  */
76
137
  createJob(request, requestOptions) {
@@ -100,6 +161,8 @@ class JobsClient {
100
161
  }
101
162
  if (_response.error.reason === "status-code") {
102
163
  switch (_response.error.statusCode) {
164
+ case 400:
165
+ throw new CatchAllApi.BadRequestError(_response.error.body, _response.rawResponse);
103
166
  case 403:
104
167
  throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
105
168
  case 422:
@@ -127,7 +190,7 @@ class JobsClient {
127
190
  *
128
191
  * @example
129
192
  * await client.jobs.continueJob({
130
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3",
193
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
131
194
  * new_limit: 100
132
195
  * })
133
196
  */
@@ -186,7 +249,7 @@ class JobsClient {
186
249
  *
187
250
  * @example
188
251
  * await client.jobs.getJobStatus({
189
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3"
252
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
190
253
  * })
191
254
  */
192
255
  getJobStatus(request, requestOptions) {
@@ -232,24 +295,32 @@ class JobsClient {
232
295
  /**
233
296
  * Returns all jobs created by the authenticated user.
234
297
  *
298
+ * @param {CatchAllApi.GetUserJobsRequest} request
235
299
  * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
236
300
  *
301
+ * @throws {@link CatchAllApi.ForbiddenError}
302
+ *
237
303
  * @example
238
304
  * await client.jobs.getUserJobs()
239
305
  */
240
- getUserJobs(requestOptions) {
241
- return core.HttpResponsePromise.fromPromise(this.__getUserJobs(requestOptions));
306
+ getUserJobs(request = {}, requestOptions) {
307
+ return core.HttpResponsePromise.fromPromise(this.__getUserJobs(request, requestOptions));
242
308
  }
243
- __getUserJobs(requestOptions) {
244
- return __awaiter(this, void 0, void 0, function* () {
309
+ __getUserJobs() {
310
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
245
311
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
312
+ const { page, page_size: pageSize } = request;
313
+ const _queryParams = {
314
+ page,
315
+ page_size: pageSize,
316
+ };
246
317
  const _authRequest = yield this._options.authProvider.getAuthRequest();
247
318
  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);
248
319
  const _response = yield core.fetcher({
249
320
  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/jobs/user"),
250
321
  method: "GET",
251
322
  headers: _headers,
252
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
323
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
253
324
  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,
254
325
  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,
255
326
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -257,17 +328,19 @@ class JobsClient {
257
328
  logging: this._options.logging,
258
329
  });
259
330
  if (_response.ok) {
260
- return {
261
- data: _response.body,
262
- rawResponse: _response.rawResponse,
263
- };
331
+ return { data: _response.body, rawResponse: _response.rawResponse };
264
332
  }
265
333
  if (_response.error.reason === "status-code") {
266
- throw new errors.CatchAllApiError({
267
- statusCode: _response.error.statusCode,
268
- body: _response.error.body,
269
- rawResponse: _response.rawResponse,
270
- });
334
+ switch (_response.error.statusCode) {
335
+ case 403:
336
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
337
+ default:
338
+ throw new errors.CatchAllApiError({
339
+ statusCode: _response.error.statusCode,
340
+ body: _response.error.body,
341
+ rawResponse: _response.rawResponse,
342
+ });
343
+ }
271
344
  }
272
345
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catchAll/jobs/user");
273
346
  });
@@ -283,7 +356,7 @@ class JobsClient {
283
356
  *
284
357
  * @example
285
358
  * await client.jobs.getJobResults({
286
- * job_id: "af7a26d6-cf0b-458c-a6ed-4b6318c74da3"
359
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
287
360
  * })
288
361
  */
289
362
  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 `/catchAll/submit` 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 `/catchAll/submit` 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
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface GetUserJobsRequest {
6
+ /** Page number to retrieve. */
7
+ page?: number;
8
+ /** Number of records per page. */
9
+ page_size?: number;
10
+ }
@@ -0,0 +1,12 @@
1
+ import type * as CatchAllApi from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * query: "Series B funding rounds for SaaS startups",
6
+ * context: "Focus on funding amount and company name"
7
+ * }
8
+ */
9
+ export interface InitializeRequestDto {
10
+ query: CatchAllApi.Query;
11
+ context?: CatchAllApi.Context;
12
+ }
@@ -2,18 +2,29 @@ import type * as CatchAllApi from "../../../../index.js";
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
+ * limit: 10,
8
+ * start_date: "2026-02-18T00:00:00Z",
9
+ * end_date: "2026-02-23T00:00:00Z"
7
10
  * }
8
11
  */
9
12
  export interface SubmitRequestDto {
10
13
  query: CatchAllApi.Query;
11
- schema?: CatchAllApi.Schema;
12
14
  context?: CatchAllApi.Context;
15
+ limit?: CatchAllApi.Limit;
16
+ start_date?: CatchAllApi.StartDate;
17
+ end_date?: CatchAllApi.EndDate;
13
18
  /**
14
- * Maximum number of records to return. If not specified, defaults to your plan limit.
19
+ * Custom validators for filtering web page clusters.
15
20
  *
16
- * Use /catchAll/continue to extend the limit after job completion without reprocessing.
21
+ * If not provided, validators are generated automatically based on the query.
17
22
  */
18
- limit?: number;
23
+ validators?: CatchAllApi.ValidatorSchema[];
24
+ /**
25
+ * Custom enrichment fields for data extraction.
26
+ *
27
+ * If not provided, enrichments are generated automatically based on the query.
28
+ */
29
+ enrichments?: CatchAllApi.EnrichmentSchema[];
19
30
  }
@@ -1,4 +1,6 @@
1
1
  export type { ContinueRequestDto } from "./ContinueRequestDto.js";
2
2
  export type { GetJobResultsRequest } from "./GetJobResultsRequest.js";
3
3
  export type { GetJobStatusRequest } from "./GetJobStatusRequest.js";
4
+ export type { GetUserJobsRequest } from "./GetUserJobsRequest.js";
5
+ export type { InitializeRequestDto } from "./InitializeRequestDto.js";
4
6
  export type { SubmitRequestDto } from "./SubmitRequestDto.js";
@@ -0,0 +1,2 @@
1
+ export { JobsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.JobsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "JobsClient", { enumerable: true, get: function () { return Client_js_1.JobsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export { MetaClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.MetaClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "MetaClient", { enumerable: true, get: function () { return Client_js_1.MetaClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -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,16 +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
- * **Schedule requirements:**
20
- * - Minimum 24-hour interval between executions
21
- * - Natural language format (e.g., "every day at 12 PM UTC", "every 48 hours")
22
- *
23
- * **Validation:**
24
- * - Schedules below minimum frequency return error with descriptive message.
25
- * - Invalid job IDs return 400 Bad Request.
26
- * - Duplicate monitors (same job already monitored) return error.
17
+ * Create a scheduled monitor based on a reference job.
27
18
  *
28
19
  * @param {CatchAllApi.CreateMonitorRequestDto} request
29
20
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -32,22 +23,23 @@ export declare class MonitorsClient {
32
23
  *
33
24
  * @example
34
25
  * await client.monitors.createMonitor({
35
- * reference_job_id: "reference_job_id",
36
- * 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
37
37
  * })
38
38
  */
39
39
  createMonitor(request: CatchAllApi.CreateMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.CreateMonitorResponseDto>;
40
40
  private __createMonitor;
41
41
  /**
42
- * Update webhook configuration for an existing monitor without recreating it.
43
- *
44
- * **Supported updates:**
45
- * - Webhook URL
46
- * - HTTP method (POST/PUT)
47
- * - Headers and authentication
48
- * - Query parameters
49
- *
50
- * **Note:** Schedule and reference job cannot be modified. To change these, create a new monitor.
42
+ * Update the webhook configuration for an existing monitor.
51
43
  *
52
44
  * @param {CatchAllApi.UpdateMonitorRequestDto} request
53
45
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -71,8 +63,7 @@ export declare class MonitorsClient {
71
63
  updateMonitor(request: CatchAllApi.UpdateMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.UpdateMonitorResponseDto>;
72
64
  private __updateMonitor;
73
65
  /**
74
- * Returns all jobs associated with a monitor, sorted by start_date.
75
- * Each job includes job_id, start_date, and end_date.
66
+ * Return all jobs executed by a monitor.
76
67
  *
77
68
  * @param {CatchAllApi.ListMonitorJobsRequest} request
78
69
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -88,8 +79,7 @@ export declare class MonitorsClient {
88
79
  listMonitorJobs(request: CatchAllApi.ListMonitorJobsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorJobsResponse>;
89
80
  private __listMonitorJobs;
90
81
  /**
91
- * Retrieve aggregated results from all jobs executed by this monitor.
92
- * Includes monitor configuration, execution history, and all records collected.
82
+ * Retrieve aggregated results from all jobs executed by a monitor.
93
83
  *
94
84
  * @param {CatchAllApi.PullMonitorResultsRequest} request
95
85
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -105,8 +95,7 @@ export declare class MonitorsClient {
105
95
  pullMonitorResults(request: CatchAllApi.PullMonitorResultsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.PullMonitorResponseDto>;
106
96
  private __pullMonitorResults;
107
97
  /**
108
- * Disables a monitor to stop executing scheduled jobs.
109
- * Validates that the provided API key is associated with the monitor.
98
+ * Stop scheduled job execution for a monitor.
110
99
  *
111
100
  * @param {CatchAllApi.DisableMonitorRequest} request
112
101
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -123,10 +112,9 @@ export declare class MonitorsClient {
123
112
  disableMonitor(request: CatchAllApi.DisableMonitorRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.DisableMonitorResponse>;
124
113
  private __disableMonitor;
125
114
  /**
126
- * Enables a monitor to resume executing scheduled jobs.
127
- * Validates that the provided API key is associated with the monitor.
115
+ * Resume scheduled job execution for a monitor.
128
116
  *
129
- * @param {CatchAllApi.EnableMonitorRequest} request
117
+ * @param {CatchAllApi.EnableMonitorRequestDto} request
130
118
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
131
119
  *
132
120
  * @throws {@link CatchAllApi.ForbiddenError}
@@ -135,14 +123,16 @@ export declare class MonitorsClient {
135
123
  *
136
124
  * @example
137
125
  * await client.monitors.enableMonitor({
138
- * monitor_id: "monitor_id"
126
+ * monitor_id: "monitor_id",
127
+ * backfill: true
139
128
  * })
140
129
  */
141
- enableMonitor(request: CatchAllApi.EnableMonitorRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.EnableMonitorResponse>;
130
+ enableMonitor(request: CatchAllApi.EnableMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.EnableMonitorResponse>;
142
131
  private __enableMonitor;
143
132
  /**
144
133
  * Returns all monitors created by the authenticated user.
145
134
  *
135
+ * @param {CatchAllApi.ListMonitorsRequest} request
146
136
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
147
137
  *
148
138
  * @throws {@link CatchAllApi.ForbiddenError}
@@ -151,6 +141,6 @@ export declare class MonitorsClient {
151
141
  * @example
152
142
  * await client.monitors.listMonitors()
153
143
  */
154
- listMonitors(requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorsResponseDto>;
144
+ listMonitors(request?: CatchAllApi.ListMonitorsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorsResponseDto>;
155
145
  private __listMonitors;
156
146
  }