newscatcher-catchall-sdk 1.4.0 → 1.5.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 (111) hide show
  1. package/README.md +2 -0
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/errors/UnauthorizedError.d.ts +6 -0
  4. package/dist/cjs/api/errors/UnauthorizedError.js +54 -0
  5. package/dist/cjs/api/errors/index.d.ts +1 -0
  6. package/dist/cjs/api/errors/index.js +1 -0
  7. package/dist/cjs/api/resources/datasets/client/Client.d.ts +1 -1
  8. package/dist/cjs/api/resources/datasets/client/Client.js +22 -13
  9. package/dist/cjs/api/resources/datasets/client/requests/ListDatasetsRequest.d.ts +2 -0
  10. package/dist/cjs/api/resources/entities/client/Client.d.ts +1 -1
  11. package/dist/cjs/api/resources/entities/client/Client.js +11 -7
  12. package/dist/cjs/api/resources/jobs/client/Client.d.ts +22 -0
  13. package/dist/cjs/api/resources/jobs/client/Client.js +77 -7
  14. package/dist/cjs/api/resources/jobs/client/requests/DeleteJobRequest.d.ts +10 -0
  15. package/dist/cjs/api/resources/jobs/client/requests/DeleteJobRequest.js +3 -0
  16. package/dist/cjs/api/resources/jobs/client/requests/GetUserJobsRequest.d.ts +5 -0
  17. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +1 -1
  18. package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/meta/client/Client.js +3 -3
  20. package/dist/cjs/api/resources/monitors/client/Client.d.ts +39 -0
  21. package/dist/cjs/api/resources/monitors/client/Client.js +136 -8
  22. package/dist/cjs/api/resources/monitors/client/requests/DeleteMonitorRequest.d.ts +10 -0
  23. package/dist/cjs/api/resources/monitors/client/requests/DeleteMonitorRequest.js +3 -0
  24. package/dist/cjs/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.d.ts +10 -0
  25. package/dist/cjs/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.js +3 -0
  26. package/dist/cjs/api/resources/monitors/client/requests/ListMonitorsRequest.d.ts +5 -0
  27. package/dist/cjs/api/resources/monitors/client/requests/index.d.ts +2 -0
  28. package/dist/cjs/api/types/ConnectedEntity.d.ts +1 -1
  29. package/dist/cjs/api/types/DeleteJobResponseDto.d.ts +8 -0
  30. package/dist/cjs/api/types/DeleteJobResponseDto.js +3 -0
  31. package/dist/cjs/api/types/DeleteMonitorResponseDto.d.ts +8 -0
  32. package/dist/cjs/api/types/DeleteMonitorResponseDto.js +3 -0
  33. package/dist/cjs/api/types/MonitorListItemDto.d.ts +2 -0
  34. package/dist/cjs/api/types/MonitorStatusEntry.d.ts +68 -0
  35. package/dist/cjs/api/types/MonitorStatusEntry.js +27 -0
  36. package/dist/cjs/api/types/MonitorStatusHistoryResponseDto.d.ts +13 -0
  37. package/dist/cjs/api/types/MonitorStatusHistoryResponseDto.js +3 -0
  38. package/dist/cjs/api/types/OwnershipFilter.d.ts +14 -0
  39. package/dist/cjs/api/types/OwnershipFilter.js +17 -0
  40. package/dist/cjs/api/types/PullJobResponseDto.d.ts +2 -0
  41. package/dist/cjs/api/types/SharingInfo.d.ts +24 -0
  42. package/dist/cjs/api/types/SharingInfo.js +13 -0
  43. package/dist/cjs/api/types/UserJob.d.ts +3 -0
  44. package/dist/cjs/api/types/index.d.ts +6 -0
  45. package/dist/cjs/api/types/index.js +6 -0
  46. package/dist/cjs/core/fetcher/Fetcher.d.ts +6 -0
  47. package/dist/cjs/core/fetcher/Fetcher.js +9 -8
  48. package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
  49. package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
  50. package/dist/cjs/core/url/index.d.ts +1 -0
  51. package/dist/cjs/core/url/index.js +3 -1
  52. package/dist/cjs/core/url/qs.d.ts +2 -1
  53. package/dist/cjs/core/url/qs.js +24 -12
  54. package/dist/cjs/version.d.ts +1 -1
  55. package/dist/cjs/version.js +1 -1
  56. package/dist/esm/BaseClient.mjs +2 -2
  57. package/dist/esm/api/errors/UnauthorizedError.d.mts +6 -0
  58. package/dist/esm/api/errors/UnauthorizedError.mjs +17 -0
  59. package/dist/esm/api/errors/index.d.mts +1 -0
  60. package/dist/esm/api/errors/index.mjs +1 -0
  61. package/dist/esm/api/resources/datasets/client/Client.d.mts +1 -1
  62. package/dist/esm/api/resources/datasets/client/Client.mjs +22 -13
  63. package/dist/esm/api/resources/datasets/client/requests/ListDatasetsRequest.d.mts +2 -0
  64. package/dist/esm/api/resources/entities/client/Client.d.mts +1 -1
  65. package/dist/esm/api/resources/entities/client/Client.mjs +11 -7
  66. package/dist/esm/api/resources/jobs/client/Client.d.mts +22 -0
  67. package/dist/esm/api/resources/jobs/client/Client.mjs +77 -7
  68. package/dist/esm/api/resources/jobs/client/requests/DeleteJobRequest.d.mts +10 -0
  69. package/dist/esm/api/resources/jobs/client/requests/DeleteJobRequest.mjs +2 -0
  70. package/dist/esm/api/resources/jobs/client/requests/GetUserJobsRequest.d.mts +5 -0
  71. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +1 -1
  72. package/dist/esm/api/resources/jobs/client/requests/index.d.mts +1 -0
  73. package/dist/esm/api/resources/meta/client/Client.mjs +3 -3
  74. package/dist/esm/api/resources/monitors/client/Client.d.mts +39 -0
  75. package/dist/esm/api/resources/monitors/client/Client.mjs +136 -8
  76. package/dist/esm/api/resources/monitors/client/requests/DeleteMonitorRequest.d.mts +10 -0
  77. package/dist/esm/api/resources/monitors/client/requests/DeleteMonitorRequest.mjs +2 -0
  78. package/dist/esm/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.d.mts +10 -0
  79. package/dist/esm/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.mjs +2 -0
  80. package/dist/esm/api/resources/monitors/client/requests/ListMonitorsRequest.d.mts +5 -0
  81. package/dist/esm/api/resources/monitors/client/requests/index.d.mts +2 -0
  82. package/dist/esm/api/types/ConnectedEntity.d.mts +1 -1
  83. package/dist/esm/api/types/DeleteJobResponseDto.d.mts +8 -0
  84. package/dist/esm/api/types/DeleteJobResponseDto.mjs +2 -0
  85. package/dist/esm/api/types/DeleteMonitorResponseDto.d.mts +8 -0
  86. package/dist/esm/api/types/DeleteMonitorResponseDto.mjs +2 -0
  87. package/dist/esm/api/types/MonitorListItemDto.d.mts +2 -0
  88. package/dist/esm/api/types/MonitorStatusEntry.d.mts +68 -0
  89. package/dist/esm/api/types/MonitorStatusEntry.mjs +24 -0
  90. package/dist/esm/api/types/MonitorStatusHistoryResponseDto.d.mts +13 -0
  91. package/dist/esm/api/types/MonitorStatusHistoryResponseDto.mjs +2 -0
  92. package/dist/esm/api/types/OwnershipFilter.d.mts +14 -0
  93. package/dist/esm/api/types/OwnershipFilter.mjs +14 -0
  94. package/dist/esm/api/types/PullJobResponseDto.d.mts +2 -0
  95. package/dist/esm/api/types/SharingInfo.d.mts +24 -0
  96. package/dist/esm/api/types/SharingInfo.mjs +10 -0
  97. package/dist/esm/api/types/UserJob.d.mts +3 -0
  98. package/dist/esm/api/types/index.d.mts +6 -0
  99. package/dist/esm/api/types/index.mjs +6 -0
  100. package/dist/esm/core/fetcher/Fetcher.d.mts +6 -0
  101. package/dist/esm/core/fetcher/Fetcher.mjs +9 -8
  102. package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
  103. package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
  104. package/dist/esm/core/url/index.d.mts +1 -0
  105. package/dist/esm/core/url/index.mjs +1 -0
  106. package/dist/esm/core/url/qs.d.mts +2 -1
  107. package/dist/esm/core/url/qs.mjs +24 -12
  108. package/dist/esm/version.d.mts +1 -1
  109. package/dist/esm/version.mjs +1 -1
  110. package/package.json +1 -1
  111. package/reference.md +208 -0
@@ -84,6 +84,22 @@ export declare class MonitorsClient {
84
84
  */
85
85
  listMonitorJobs(request: CatchAllApi.ListMonitorJobsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorJobsResponse>;
86
86
  private __listMonitorJobs;
87
+ /**
88
+ * Returns the full execution history of a monitor as a list of status entries, ordered from newest to oldest.
89
+ *
90
+ * @param {CatchAllApi.GetMonitorStatusHistoryRequest} request
91
+ * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
92
+ *
93
+ * @throws {@link CatchAllApi.UnauthorizedError}
94
+ * @throws {@link CatchAllApi.NotFoundError}
95
+ *
96
+ * @example
97
+ * await client.monitors.getMonitorStatusHistory({
98
+ * monitor_id: "monitor_id"
99
+ * })
100
+ */
101
+ getMonitorStatusHistory(request: CatchAllApi.GetMonitorStatusHistoryRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.MonitorStatusHistoryResponseDto>;
102
+ private __getMonitorStatusHistory;
87
103
  /**
88
104
  * Resume scheduled job execution for a monitor.
89
105
  *
@@ -119,6 +135,29 @@ export declare class MonitorsClient {
119
135
  */
120
136
  disableMonitor(request: CatchAllApi.DisableMonitorRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.DisableMonitorResponse>;
121
137
  private __disableMonitor;
138
+ /**
139
+ * Soft-deletes a monitor. The monitor is flagged as deleted, stops
140
+ * executing scheduled jobs immediately, and no longer appears in list
141
+ * results.
142
+ *
143
+ * Only the monitor owner can delete a monitor. Returns `404` if the
144
+ * monitor is not found or does not belong to the authenticated user.
145
+ *
146
+ * Deleting an already-deleted monitor returns `200`.
147
+ *
148
+ * @param {CatchAllApi.DeleteMonitorRequest} request
149
+ * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
150
+ *
151
+ * @throws {@link CatchAllApi.UnauthorizedError}
152
+ * @throws {@link CatchAllApi.NotFoundError}
153
+ *
154
+ * @example
155
+ * await client.monitors.deleteMonitor({
156
+ * monitor_id: "monitor_id"
157
+ * })
158
+ */
159
+ deleteMonitor(request: CatchAllApi.DeleteMonitorRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.DeleteMonitorResponseDto>;
160
+ private __deleteMonitor;
122
161
  /**
123
162
  * Update the webhook configuration for an existing monitor.
124
163
  *
@@ -87,10 +87,12 @@ class MonitorsClient {
87
87
  __listMonitors() {
88
88
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
89
89
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
90
- const { page, page_size: pageSize } = request;
90
+ const { page, page_size: pageSize, search, ownership } = request;
91
91
  const _queryParams = {
92
92
  page,
93
93
  page_size: pageSize,
94
+ search,
95
+ ownership: ownership != null ? ownership : undefined,
94
96
  };
95
97
  const _authRequest = yield this._options.authProvider.getAuthRequest();
96
98
  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);
@@ -98,7 +100,11 @@ class MonitorsClient {
98
100
  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/monitors"),
99
101
  method: "GET",
100
102
  headers: _headers,
101
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
103
+ queryString: core.url
104
+ .queryBuilder()
105
+ .addMany(_queryParams)
106
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
107
+ .build(),
102
108
  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,
103
109
  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,
104
110
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -161,7 +167,7 @@ class MonitorsClient {
161
167
  method: "POST",
162
168
  headers: _headers,
163
169
  contentType: "application/json",
164
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
170
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
165
171
  requestType: "json",
166
172
  body: request,
167
173
  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,
@@ -215,7 +221,7 @@ class MonitorsClient {
215
221
  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/monitors/pull/${core.url.encodePathParam(monitorId)}`),
216
222
  method: "GET",
217
223
  headers: _headers,
218
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
224
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
219
225
  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,
220
226
  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,
221
227
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -272,7 +278,11 @@ class MonitorsClient {
272
278
  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/monitors/${core.url.encodePathParam(monitorId)}/jobs`),
273
279
  method: "GET",
274
280
  headers: _headers,
275
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
281
+ queryString: core.url
282
+ .queryBuilder()
283
+ .addMany(_queryParams)
284
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
285
+ .build(),
276
286
  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,
277
287
  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,
278
288
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -299,6 +309,63 @@ class MonitorsClient {
299
309
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catchAll/monitors/{monitor_id}/jobs");
300
310
  });
301
311
  }
312
+ /**
313
+ * Returns the full execution history of a monitor as a list of status entries, ordered from newest to oldest.
314
+ *
315
+ * @param {CatchAllApi.GetMonitorStatusHistoryRequest} request
316
+ * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
317
+ *
318
+ * @throws {@link CatchAllApi.UnauthorizedError}
319
+ * @throws {@link CatchAllApi.NotFoundError}
320
+ *
321
+ * @example
322
+ * await client.monitors.getMonitorStatusHistory({
323
+ * monitor_id: "monitor_id"
324
+ * })
325
+ */
326
+ getMonitorStatusHistory(request, requestOptions) {
327
+ return core.HttpResponsePromise.fromPromise(this.__getMonitorStatusHistory(request, requestOptions));
328
+ }
329
+ __getMonitorStatusHistory(request, requestOptions) {
330
+ return __awaiter(this, void 0, void 0, function* () {
331
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
332
+ const { monitor_id: monitorId } = request;
333
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
334
+ 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);
335
+ const _response = yield core.fetcher({
336
+ 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/monitors/${core.url.encodePathParam(monitorId)}/status`),
337
+ method: "GET",
338
+ headers: _headers,
339
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
340
+ 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,
341
+ 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,
342
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
343
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
344
+ logging: this._options.logging,
345
+ });
346
+ if (_response.ok) {
347
+ return {
348
+ data: _response.body,
349
+ rawResponse: _response.rawResponse,
350
+ };
351
+ }
352
+ if (_response.error.reason === "status-code") {
353
+ switch (_response.error.statusCode) {
354
+ case 401:
355
+ throw new CatchAllApi.UnauthorizedError(_response.error.body, _response.rawResponse);
356
+ case 404:
357
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
358
+ default:
359
+ throw new errors.CatchAllApiError({
360
+ statusCode: _response.error.statusCode,
361
+ body: _response.error.body,
362
+ rawResponse: _response.rawResponse,
363
+ });
364
+ }
365
+ }
366
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catchAll/monitors/{monitor_id}/status");
367
+ });
368
+ }
302
369
  /**
303
370
  * Resume scheduled job execution for a monitor.
304
371
  *
@@ -329,7 +396,7 @@ class MonitorsClient {
329
396
  method: "POST",
330
397
  headers: _headers,
331
398
  contentType: "application/json",
332
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
399
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
333
400
  requestType: "json",
334
401
  body: _body,
335
402
  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,
@@ -388,7 +455,7 @@ class MonitorsClient {
388
455
  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/monitors/${core.url.encodePathParam(monitorId)}/disable`),
389
456
  method: "POST",
390
457
  headers: _headers,
391
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
458
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
392
459
  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,
393
460
  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,
394
461
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -417,6 +484,67 @@ class MonitorsClient {
417
484
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/catchAll/monitors/{monitor_id}/disable");
418
485
  });
419
486
  }
487
+ /**
488
+ * Soft-deletes a monitor. The monitor is flagged as deleted, stops
489
+ * executing scheduled jobs immediately, and no longer appears in list
490
+ * results.
491
+ *
492
+ * Only the monitor owner can delete a monitor. Returns `404` if the
493
+ * monitor is not found or does not belong to the authenticated user.
494
+ *
495
+ * Deleting an already-deleted monitor returns `200`.
496
+ *
497
+ * @param {CatchAllApi.DeleteMonitorRequest} request
498
+ * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
499
+ *
500
+ * @throws {@link CatchAllApi.UnauthorizedError}
501
+ * @throws {@link CatchAllApi.NotFoundError}
502
+ *
503
+ * @example
504
+ * await client.monitors.deleteMonitor({
505
+ * monitor_id: "monitor_id"
506
+ * })
507
+ */
508
+ deleteMonitor(request, requestOptions) {
509
+ return core.HttpResponsePromise.fromPromise(this.__deleteMonitor(request, requestOptions));
510
+ }
511
+ __deleteMonitor(request, requestOptions) {
512
+ return __awaiter(this, void 0, void 0, function* () {
513
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
514
+ const { monitor_id: monitorId } = request;
515
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
516
+ 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);
517
+ const _response = yield core.fetcher({
518
+ 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/monitors/${core.url.encodePathParam(monitorId)}`),
519
+ method: "DELETE",
520
+ headers: _headers,
521
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
522
+ 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,
523
+ 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,
524
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
525
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
526
+ logging: this._options.logging,
527
+ });
528
+ if (_response.ok) {
529
+ return { data: _response.body, rawResponse: _response.rawResponse };
530
+ }
531
+ if (_response.error.reason === "status-code") {
532
+ switch (_response.error.statusCode) {
533
+ case 401:
534
+ throw new CatchAllApi.UnauthorizedError(_response.error.body, _response.rawResponse);
535
+ case 404:
536
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
537
+ default:
538
+ throw new errors.CatchAllApiError({
539
+ statusCode: _response.error.statusCode,
540
+ body: _response.error.body,
541
+ rawResponse: _response.rawResponse,
542
+ });
543
+ }
544
+ }
545
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/catchAll/monitors/{monitor_id}");
546
+ });
547
+ }
420
548
  /**
421
549
  * Update the webhook configuration for an existing monitor.
422
550
  *
@@ -453,7 +581,7 @@ class MonitorsClient {
453
581
  method: "PATCH",
454
582
  headers: _headers,
455
583
  contentType: "application/json",
456
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
584
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
457
585
  requestType: "json",
458
586
  body: _body,
459
587
  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,
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * monitor_id: "monitor_id"
5
+ * }
6
+ */
7
+ export interface DeleteMonitorRequest {
8
+ /** Monitor identifier. */
9
+ monitor_id: string;
10
+ }
@@ -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 });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * monitor_id: "monitor_id"
5
+ * }
6
+ */
7
+ export interface GetMonitorStatusHistoryRequest {
8
+ /** Monitor identifier. */
9
+ monitor_id: string;
10
+ }
@@ -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 });
@@ -1,3 +1,4 @@
1
+ import type * as CatchAllApi from "../../../../index.js";
1
2
  /**
2
3
  * @example
3
4
  * {}
@@ -7,4 +8,8 @@ export interface ListMonitorsRequest {
7
8
  page?: number;
8
9
  /** Number of records per page. */
9
10
  page_size?: number;
11
+ /** Filter results by text (case-insensitive substring match). */
12
+ search?: string;
13
+ /** Filter results by ownership. Defaults to `all`. */
14
+ ownership?: CatchAllApi.OwnershipFilter;
10
15
  }
@@ -1,6 +1,8 @@
1
1
  export type { CreateMonitorRequestDto } from "./CreateMonitorRequestDto.js";
2
+ export type { DeleteMonitorRequest } from "./DeleteMonitorRequest.js";
2
3
  export type { DisableMonitorRequest } from "./DisableMonitorRequest.js";
3
4
  export type { EnableMonitorRequestDto } from "./EnableMonitorRequestDto.js";
5
+ export type { GetMonitorStatusHistoryRequest } from "./GetMonitorStatusHistoryRequest.js";
4
6
  export type { ListMonitorJobsRequest } from "./ListMonitorJobsRequest.js";
5
7
  export type { ListMonitorsRequest } from "./ListMonitorsRequest.js";
6
8
  export type { PullMonitorResultsRequest } from "./PullMonitorResultsRequest.js";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * A company entity matched to a record in a Company Search job, with
2
+ * A company entity matched to a record in a Company Watchlist job, with
3
3
  * a relevance score and explanation.
4
4
  *
5
5
  * Only entities with `ed_score` ≥ 1 appear in results. Entities scored
@@ -0,0 +1,8 @@
1
+ export interface DeleteJobResponseDto {
2
+ /** Whether the delete operation succeeded. */
3
+ success: boolean;
4
+ /** Human-readable result message. */
5
+ message: string | null;
6
+ /** ID of the deleted job. `null` on failure. */
7
+ job_id: string | null;
8
+ }
@@ -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 });
@@ -0,0 +1,8 @@
1
+ export interface DeleteMonitorResponseDto {
2
+ /** Whether the delete operation succeeded. */
3
+ success: boolean;
4
+ /** Human-readable result message. */
5
+ message: string | null;
6
+ /** ID of the deleted monitor. `null` on failure. */
7
+ monitor_id: string | null;
8
+ }
@@ -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 });
@@ -20,4 +20,6 @@ export interface MonitorListItemDto {
20
20
  webhook?: (CatchAllApi.WebhookDto | null) | undefined;
21
21
  /** Masked API key associated with this monitor. */
22
22
  user_key?: string | undefined;
23
+ /** Present when this monitor was shared with the authenticated user. Omitted when the user owns the monitor. */
24
+ sharing_info?: CatchAllApi.SharingInfo | undefined;
23
25
  }
@@ -0,0 +1,68 @@
1
+ export interface MonitorStatusEntry {
2
+ /**
3
+ * Type of lifecycle event.
4
+ *
5
+ * - `created`: Monitor was created.
6
+ * - `enable`: Monitor was enabled.
7
+ * - `disable`: Monitor was disabled.
8
+ * - `scheduled`: A job was triggered for execution.
9
+ * `additional_information` contains `job_id`, `start_date`,
10
+ * and `end_date`.
11
+ * - `dump`: Results were collected after a job completed.
12
+ * `additional_information` contains `nb_existing_records`,
13
+ * `nb_final_records`, and optionally `webhook`.
14
+ */
15
+ status: MonitorStatusEntry.Status;
16
+ /** Timestamp of this event in ISO 8601 format with UTC timezone. */
17
+ created_at: string;
18
+ /**
19
+ * Event-specific metadata. `null` for `created`, `enable`, and `disable` events.
20
+ *
21
+ * For `scheduled`:
22
+ * ```json
23
+ * {
24
+ * "job_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
25
+ * "start_date": "2026-02-04T12:00:00",
26
+ * "end_date": "2026-02-05T12:00:00"
27
+ * }
28
+ * ```
29
+ *
30
+ * For `dump`:
31
+ * ```json
32
+ * {
33
+ * "nb_existing_records": 408,
34
+ * "nb_final_records": 28,
35
+ * "webhook": {
36
+ * "success": true,
37
+ * "status_code": 200,
38
+ * "error_message": null
39
+ * }
40
+ * }
41
+ * ```
42
+ * The `webhook` key is only present if the monitor has a webhook configured.
43
+ */
44
+ additional_information?: (Record<string, unknown> | null) | undefined;
45
+ }
46
+ export declare namespace MonitorStatusEntry {
47
+ /**
48
+ * Type of lifecycle event.
49
+ *
50
+ * - `created`: Monitor was created.
51
+ * - `enable`: Monitor was enabled.
52
+ * - `disable`: Monitor was disabled.
53
+ * - `scheduled`: A job was triggered for execution.
54
+ * `additional_information` contains `job_id`, `start_date`,
55
+ * and `end_date`.
56
+ * - `dump`: Results were collected after a job completed.
57
+ * `additional_information` contains `nb_existing_records`,
58
+ * `nb_final_records`, and optionally `webhook`.
59
+ */
60
+ const Status: {
61
+ readonly Created: "created";
62
+ readonly Enable: "enable";
63
+ readonly Disable: "disable";
64
+ readonly Scheduled: "scheduled";
65
+ readonly Dump: "dump";
66
+ };
67
+ type Status = (typeof Status)[keyof typeof Status];
68
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.MonitorStatusEntry = void 0;
5
+ var MonitorStatusEntry;
6
+ (function (MonitorStatusEntry) {
7
+ /**
8
+ * Type of lifecycle event.
9
+ *
10
+ * - `created`: Monitor was created.
11
+ * - `enable`: Monitor was enabled.
12
+ * - `disable`: Monitor was disabled.
13
+ * - `scheduled`: A job was triggered for execution.
14
+ * `additional_information` contains `job_id`, `start_date`,
15
+ * and `end_date`.
16
+ * - `dump`: Results were collected after a job completed.
17
+ * `additional_information` contains `nb_existing_records`,
18
+ * `nb_final_records`, and optionally `webhook`.
19
+ */
20
+ MonitorStatusEntry.Status = {
21
+ Created: "created",
22
+ Enable: "enable",
23
+ Disable: "disable",
24
+ Scheduled: "scheduled",
25
+ Dump: "dump",
26
+ };
27
+ })(MonitorStatusEntry || (exports.MonitorStatusEntry = MonitorStatusEntry = {}));
@@ -0,0 +1,13 @@
1
+ import type * as CatchAllApi from "../index.js";
2
+ export interface MonitorStatusHistoryResponseDto {
3
+ /** Whether the request succeeded. */
4
+ success: boolean;
5
+ /** Optional message. `null` on success. */
6
+ message?: (string | null) | undefined;
7
+ /** Monitor identifier. `null` on failure. */
8
+ monitor_id: string | null;
9
+ /** Total number of status entries in the history. */
10
+ total_statuses: number | null;
11
+ /** Full status history, ordered newest to oldest. */
12
+ statuses: CatchAllApi.MonitorStatusEntry[] | null;
13
+ }
@@ -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 });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Controls which resources are returned based on ownership.
3
+ *
4
+ * - `all`: Returns resources owned by the user and resources shared
5
+ * with them (default, backward compatible).
6
+ * - `own`: Returns only resources created by the authenticated user.
7
+ * - `shared`: Returns only resources shared with the user by others.
8
+ */
9
+ export declare const OwnershipFilter: {
10
+ readonly All: "all";
11
+ readonly Own: "own";
12
+ readonly Shared: "shared";
13
+ };
14
+ export type OwnershipFilter = (typeof OwnershipFilter)[keyof typeof OwnershipFilter];
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.OwnershipFilter = void 0;
5
+ /**
6
+ * Controls which resources are returned based on ownership.
7
+ *
8
+ * - `all`: Returns resources owned by the user and resources shared
9
+ * with them (default, backward compatible).
10
+ * - `own`: Returns only resources created by the authenticated user.
11
+ * - `shared`: Returns only resources shared with the user by others.
12
+ */
13
+ exports.OwnershipFilter = {
14
+ All: "all",
15
+ Own: "own",
16
+ Shared: "shared",
17
+ };
@@ -37,6 +37,8 @@ export interface PullJobResponseDto {
37
37
  total_pages?: number | undefined;
38
38
  /** Processing mode used for this job. */
39
39
  mode?: PullJobResponseDto.Mode | undefined;
40
+ /** Present when the job was shared with the authenticated user by another organization member. `null` when the user owns the job. */
41
+ sharing_info?: (CatchAllApi.SharingInfo | null) | undefined;
40
42
  /** Array of extracted records with structured data and citations. */
41
43
  all_records?: CatchAllApi.Record_[] | undefined;
42
44
  }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Present on resources shared with the authenticated user by another
3
+ * organization member. Omitted entirely on resources the user owns.
4
+ */
5
+ export interface SharingInfo {
6
+ /** When the resource was shared. */
7
+ shared_at: string;
8
+ /** Permission level granted to the recipient. */
9
+ permission: SharingInfo.Permission;
10
+ /**
11
+ * Display name of the user who shared the resource (first + last
12
+ * name). Falls back to email address, then user ID.
13
+ */
14
+ shared_by: string;
15
+ }
16
+ export declare namespace SharingInfo {
17
+ /** Permission level granted to the recipient. */
18
+ const Permission: {
19
+ readonly View: "view";
20
+ readonly Edit: "edit";
21
+ readonly Manage: "manage";
22
+ };
23
+ type Permission = (typeof Permission)[keyof typeof Permission];
24
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SharingInfo = void 0;
5
+ var SharingInfo;
6
+ (function (SharingInfo) {
7
+ /** Permission level granted to the recipient. */
8
+ SharingInfo.Permission = {
9
+ View: "view",
10
+ Edit: "edit",
11
+ Manage: "manage",
12
+ };
13
+ })(SharingInfo || (exports.SharingInfo = SharingInfo = {}));
@@ -1,3 +1,4 @@
1
+ import type * as CatchAllApi from "../index.js";
1
2
  export interface UserJob {
2
3
  /** Job identifier. */
3
4
  job_id: string;
@@ -9,6 +10,8 @@ export interface UserJob {
9
10
  status: string;
10
11
  /** Processing mode used for this job. */
11
12
  mode?: UserJob.Mode | undefined;
13
+ /** Present when this job is shared with the authenticated user. Omitted when the user owns the job. */
14
+ sharing_info?: CatchAllApi.SharingInfo | undefined;
12
15
  /** Masked API key that created this job. */
13
16
  user_key?: string | undefined;
14
17
  }
@@ -19,6 +19,8 @@ export * from "./DatasetSortBy.js";
19
19
  export * from "./DatasetStatus.js";
20
20
  export * from "./DatasetStatusEntry.js";
21
21
  export * from "./DatasetStatusHistoryResponse.js";
22
+ export * from "./DeleteJobResponseDto.js";
23
+ export * from "./DeleteMonitorResponseDto.js";
22
24
  export * from "./EndDate.js";
23
25
  export * from "./EnrichmentSchema.js";
24
26
  export * from "./EnrichmentType.js";
@@ -41,6 +43,9 @@ export * from "./MonitorCitation.js";
41
43
  export * from "./MonitorJobItem.js";
42
44
  export * from "./MonitorListItemDto.js";
43
45
  export * from "./MonitorRecord.js";
46
+ export * from "./MonitorStatusEntry.js";
47
+ export * from "./MonitorStatusHistoryResponseDto.js";
48
+ export * from "./OwnershipFilter.js";
44
49
  export * from "./PlanFeature.js";
45
50
  export * from "./PublicJobStatus.js";
46
51
  export * from "./PullJobResponseDto.js";
@@ -48,6 +53,7 @@ export * from "./PullMonitorResponseDto.js";
48
53
  export * from "./Query.js";
49
54
  export * from "./Record_.js";
50
55
  export * from "./ReferenceJob.js";
56
+ export * from "./SharingInfo.js";
51
57
  export * from "./SkippedRow.js";
52
58
  export * from "./SortOrder.js";
53
59
  export * from "./StartDate.js";
@@ -35,6 +35,8 @@ __exportStar(require("./DatasetSortBy.js"), exports);
35
35
  __exportStar(require("./DatasetStatus.js"), exports);
36
36
  __exportStar(require("./DatasetStatusEntry.js"), exports);
37
37
  __exportStar(require("./DatasetStatusHistoryResponse.js"), exports);
38
+ __exportStar(require("./DeleteJobResponseDto.js"), exports);
39
+ __exportStar(require("./DeleteMonitorResponseDto.js"), exports);
38
40
  __exportStar(require("./EndDate.js"), exports);
39
41
  __exportStar(require("./EnrichmentSchema.js"), exports);
40
42
  __exportStar(require("./EnrichmentType.js"), exports);
@@ -57,6 +59,9 @@ __exportStar(require("./MonitorCitation.js"), exports);
57
59
  __exportStar(require("./MonitorJobItem.js"), exports);
58
60
  __exportStar(require("./MonitorListItemDto.js"), exports);
59
61
  __exportStar(require("./MonitorRecord.js"), exports);
62
+ __exportStar(require("./MonitorStatusEntry.js"), exports);
63
+ __exportStar(require("./MonitorStatusHistoryResponseDto.js"), exports);
64
+ __exportStar(require("./OwnershipFilter.js"), exports);
60
65
  __exportStar(require("./PlanFeature.js"), exports);
61
66
  __exportStar(require("./PublicJobStatus.js"), exports);
62
67
  __exportStar(require("./PullJobResponseDto.js"), exports);
@@ -64,6 +69,7 @@ __exportStar(require("./PullMonitorResponseDto.js"), exports);
64
69
  __exportStar(require("./Query.js"), exports);
65
70
  __exportStar(require("./Record_.js"), exports);
66
71
  __exportStar(require("./ReferenceJob.js"), exports);
72
+ __exportStar(require("./SharingInfo.js"), exports);
67
73
  __exportStar(require("./SkippedRow.js"), exports);
68
74
  __exportStar(require("./SortOrder.js"), exports);
69
75
  __exportStar(require("./StartDate.js"), exports);