newscatcher-catchall-sdk 1.4.0 → 1.5.0

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 (109) hide show
  1. package/README.md +1 -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 +13 -2
  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 +6 -1
  12. package/dist/cjs/api/resources/jobs/client/Client.d.ts +22 -0
  13. package/dist/cjs/api/resources/jobs/client/Client.js +73 -1
  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/monitors/client/Client.d.ts +39 -0
  20. package/dist/cjs/api/resources/monitors/client/Client.js +138 -8
  21. package/dist/cjs/api/resources/monitors/client/requests/DeleteMonitorRequest.d.ts +10 -0
  22. package/dist/cjs/api/resources/monitors/client/requests/DeleteMonitorRequest.js +3 -0
  23. package/dist/cjs/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.d.ts +10 -0
  24. package/dist/cjs/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.js +3 -0
  25. package/dist/cjs/api/resources/monitors/client/requests/ListMonitorsRequest.d.ts +5 -0
  26. package/dist/cjs/api/resources/monitors/client/requests/index.d.ts +2 -0
  27. package/dist/cjs/api/types/ConnectedEntity.d.ts +1 -1
  28. package/dist/cjs/api/types/DeleteJobResponseDto.d.ts +8 -0
  29. package/dist/cjs/api/types/DeleteJobResponseDto.js +3 -0
  30. package/dist/cjs/api/types/DeleteMonitorResponseDto.d.ts +8 -0
  31. package/dist/cjs/api/types/DeleteMonitorResponseDto.js +3 -0
  32. package/dist/cjs/api/types/MonitorListItemDto.d.ts +2 -0
  33. package/dist/cjs/api/types/MonitorStatusEntry.d.ts +68 -0
  34. package/dist/cjs/api/types/MonitorStatusEntry.js +27 -0
  35. package/dist/cjs/api/types/MonitorStatusHistoryResponseDto.d.ts +13 -0
  36. package/dist/cjs/api/types/MonitorStatusHistoryResponseDto.js +3 -0
  37. package/dist/cjs/api/types/OwnershipFilter.d.ts +14 -0
  38. package/dist/cjs/api/types/OwnershipFilter.js +17 -0
  39. package/dist/cjs/api/types/PullJobResponseDto.d.ts +2 -0
  40. package/dist/cjs/api/types/SharingInfo.d.ts +24 -0
  41. package/dist/cjs/api/types/SharingInfo.js +13 -0
  42. package/dist/cjs/api/types/UserJob.d.ts +3 -0
  43. package/dist/cjs/api/types/index.d.ts +6 -0
  44. package/dist/cjs/api/types/index.js +6 -0
  45. package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -0
  46. package/dist/cjs/core/fetcher/Fetcher.js +7 -1
  47. package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
  48. package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
  49. package/dist/cjs/core/url/index.d.ts +1 -0
  50. package/dist/cjs/core/url/index.js +3 -1
  51. package/dist/cjs/core/url/qs.d.ts +2 -1
  52. package/dist/cjs/core/url/qs.js +24 -12
  53. package/dist/cjs/version.d.ts +1 -1
  54. package/dist/cjs/version.js +1 -1
  55. package/dist/esm/BaseClient.mjs +2 -2
  56. package/dist/esm/api/errors/UnauthorizedError.d.mts +6 -0
  57. package/dist/esm/api/errors/UnauthorizedError.mjs +17 -0
  58. package/dist/esm/api/errors/index.d.mts +1 -0
  59. package/dist/esm/api/errors/index.mjs +1 -0
  60. package/dist/esm/api/resources/datasets/client/Client.d.mts +1 -1
  61. package/dist/esm/api/resources/datasets/client/Client.mjs +13 -2
  62. package/dist/esm/api/resources/datasets/client/requests/ListDatasetsRequest.d.mts +2 -0
  63. package/dist/esm/api/resources/entities/client/Client.d.mts +1 -1
  64. package/dist/esm/api/resources/entities/client/Client.mjs +6 -1
  65. package/dist/esm/api/resources/jobs/client/Client.d.mts +22 -0
  66. package/dist/esm/api/resources/jobs/client/Client.mjs +73 -1
  67. package/dist/esm/api/resources/jobs/client/requests/DeleteJobRequest.d.mts +10 -0
  68. package/dist/esm/api/resources/jobs/client/requests/DeleteJobRequest.mjs +2 -0
  69. package/dist/esm/api/resources/jobs/client/requests/GetUserJobsRequest.d.mts +5 -0
  70. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +1 -1
  71. package/dist/esm/api/resources/jobs/client/requests/index.d.mts +1 -0
  72. package/dist/esm/api/resources/monitors/client/Client.d.mts +39 -0
  73. package/dist/esm/api/resources/monitors/client/Client.mjs +138 -8
  74. package/dist/esm/api/resources/monitors/client/requests/DeleteMonitorRequest.d.mts +10 -0
  75. package/dist/esm/api/resources/monitors/client/requests/DeleteMonitorRequest.mjs +2 -0
  76. package/dist/esm/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.d.mts +10 -0
  77. package/dist/esm/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.mjs +2 -0
  78. package/dist/esm/api/resources/monitors/client/requests/ListMonitorsRequest.d.mts +5 -0
  79. package/dist/esm/api/resources/monitors/client/requests/index.d.mts +2 -0
  80. package/dist/esm/api/types/ConnectedEntity.d.mts +1 -1
  81. package/dist/esm/api/types/DeleteJobResponseDto.d.mts +8 -0
  82. package/dist/esm/api/types/DeleteJobResponseDto.mjs +2 -0
  83. package/dist/esm/api/types/DeleteMonitorResponseDto.d.mts +8 -0
  84. package/dist/esm/api/types/DeleteMonitorResponseDto.mjs +2 -0
  85. package/dist/esm/api/types/MonitorListItemDto.d.mts +2 -0
  86. package/dist/esm/api/types/MonitorStatusEntry.d.mts +68 -0
  87. package/dist/esm/api/types/MonitorStatusEntry.mjs +24 -0
  88. package/dist/esm/api/types/MonitorStatusHistoryResponseDto.d.mts +13 -0
  89. package/dist/esm/api/types/MonitorStatusHistoryResponseDto.mjs +2 -0
  90. package/dist/esm/api/types/OwnershipFilter.d.mts +14 -0
  91. package/dist/esm/api/types/OwnershipFilter.mjs +14 -0
  92. package/dist/esm/api/types/PullJobResponseDto.d.mts +2 -0
  93. package/dist/esm/api/types/SharingInfo.d.mts +24 -0
  94. package/dist/esm/api/types/SharingInfo.mjs +10 -0
  95. package/dist/esm/api/types/UserJob.d.mts +3 -0
  96. package/dist/esm/api/types/index.d.mts +6 -0
  97. package/dist/esm/api/types/index.mjs +6 -0
  98. package/dist/esm/core/fetcher/Fetcher.d.mts +1 -0
  99. package/dist/esm/core/fetcher/Fetcher.mjs +7 -1
  100. package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
  101. package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
  102. package/dist/esm/core/url/index.d.mts +1 -0
  103. package/dist/esm/core/url/index.mjs +1 -0
  104. package/dist/esm/core/url/qs.d.mts +2 -1
  105. package/dist/esm/core/url/qs.mjs +24 -12
  106. package/dist/esm/version.d.mts +1 -1
  107. package/dist/esm/version.mjs +1 -1
  108. package/package.json +1 -1
  109. package/reference.md +208 -0
package/README.md CHANGED
@@ -363,3 +363,4 @@ On the other hand, contributions to the README are always very welcome!
363
363
  - Support: <support@newscatcherapi.com>
364
364
 
365
365
 
366
+
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "newscatcher-catchall-sdk",
46
- "X-Fern-SDK-Version": "1.4.0",
47
- "User-Agent": "newscatcher-catchall-sdk/1.4.0",
46
+ "X-Fern-SDK-Version": "1.5.0",
47
+ "User-Agent": "newscatcher-catchall-sdk/1.5.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ import type * as CatchAllApi from "../index.js";
4
+ export declare class UnauthorizedError extends errors.CatchAllApiError {
5
+ constructor(body: CatchAllApi.Error_, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,54 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.UnauthorizedError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class UnauthorizedError extends errors.CatchAllApiError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "UnauthorizedError",
43
+ statusCode: 401,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, new.target.prototype);
48
+ if (Error.captureStackTrace) {
49
+ Error.captureStackTrace(this, this.constructor);
50
+ }
51
+ this.name = this.constructor.name;
52
+ }
53
+ }
54
+ exports.UnauthorizedError = UnauthorizedError;
@@ -1,4 +1,5 @@
1
1
  export * from "./BadRequestError.js";
2
2
  export * from "./ForbiddenError.js";
3
3
  export * from "./NotFoundError.js";
4
+ export * from "./UnauthorizedError.js";
4
5
  export * from "./UnprocessableEntityError.js";
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BadRequestError.js"), exports);
18
18
  __exportStar(require("./ForbiddenError.js"), exports);
19
19
  __exportStar(require("./NotFoundError.js"), exports);
20
+ __exportStar(require("./UnauthorizedError.js"), exports);
20
21
  __exportStar(require("./UnprocessableEntityError.js"), exports);
@@ -12,7 +12,7 @@ export declare namespace DatasetsClient {
12
12
  *
13
13
  * A dataset is a named collection of entities — think of it as a watchlist or
14
14
  * portfolio. Connect a dataset to a job via `connected_dataset_ids` to activate
15
- * Company Search mode. Datasets can be reused across multiple jobs and monitors.
15
+ * Company Watchlist. Datasets can be reused across multiple jobs and monitors.
16
16
  */
17
17
  export declare class DatasetsClient {
18
18
  protected readonly _options: NormalizedClientOptionsWithAuth<DatasetsClient.Options>;
@@ -67,7 +67,7 @@ const CatchAllApi = __importStar(require("../../../index.js"));
67
67
  *
68
68
  * A dataset is a named collection of entities — think of it as a watchlist or
69
69
  * portfolio. Connect a dataset to a job via `connected_dataset_ids` to activate
70
- * Company Search mode. Datasets can be reused across multiple jobs and monitors.
70
+ * Company Watchlist. Datasets can be reused across multiple jobs and monitors.
71
71
  */
72
72
  class DatasetsClient {
73
73
  constructor(options = {}) {
@@ -94,7 +94,7 @@ class DatasetsClient {
94
94
  __listDatasets() {
95
95
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
96
96
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
97
- const { page, page_size: pageSize, search, latest_status: latestStatus, sort_by: sortBy, sort_order: sortOrder, } = request;
97
+ const { page, page_size: pageSize, search, latest_status: latestStatus, sort_by: sortBy, sort_order: sortOrder, ownership, } = request;
98
98
  const _queryParams = {
99
99
  page,
100
100
  page_size: pageSize,
@@ -102,6 +102,7 @@ class DatasetsClient {
102
102
  latest_status: latestStatus != null ? latestStatus : undefined,
103
103
  sort_by: sortBy != null ? sortBy : undefined,
104
104
  sort_order: sortOrder != null ? sortOrder : undefined,
105
+ ownership: ownership != null ? ownership : undefined,
105
106
  };
106
107
  const _authRequest = yield this._options.authProvider.getAuthRequest();
107
108
  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);
@@ -110,6 +111,11 @@ class DatasetsClient {
110
111
  method: "GET",
111
112
  headers: _headers,
112
113
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
114
+ queryString: core.url
115
+ .queryBuilder()
116
+ .addMany(_queryParams)
117
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
118
+ .build(),
113
119
  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,
114
120
  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,
115
121
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -489,6 +495,11 @@ class DatasetsClient {
489
495
  method: "GET",
490
496
  headers: _headers,
491
497
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
498
+ queryString: core.url
499
+ .queryBuilder()
500
+ .addMany(_queryParams)
501
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
502
+ .build(),
492
503
  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,
493
504
  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,
494
505
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -16,4 +16,6 @@ export interface ListDatasetsRequest {
16
16
  latest_status?: CatchAllApi.DatasetStatus;
17
17
  sort_by?: CatchAllApi.DatasetSortBy;
18
18
  sort_order?: CatchAllApi.SortOrder;
19
+ /** Filter results by ownership. Defaults to `all`. */
20
+ ownership?: CatchAllApi.OwnershipFilter;
19
21
  }
@@ -10,7 +10,7 @@ export declare namespace EntitiesClient {
10
10
  /**
11
11
  * Operations to create, update, and delete company entities.
12
12
  *
13
- * Entities are the building blocks of Company Search. Each entity represents
13
+ * Entities are the building blocks of Company Watchlist. Each entity represents
14
14
  * a company (or person) you want to track. Add identifying information such as
15
15
  * domain, alternative names, and key persons to improve matching quality.
16
16
  */
@@ -65,7 +65,7 @@ const CatchAllApi = __importStar(require("../../../index.js"));
65
65
  /**
66
66
  * Operations to create, update, and delete company entities.
67
67
  *
68
- * Entities are the building blocks of Company Search. Each entity represents
68
+ * Entities are the building blocks of Company Watchlist. Each entity represents
69
69
  * a company (or person) you want to track. Add identifying information such as
70
70
  * domain, alternative names, and key persons to improve matching quality.
71
71
  */
@@ -111,6 +111,11 @@ class EntitiesClient {
111
111
  method: "GET",
112
112
  headers: _headers,
113
113
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
114
+ queryString: core.url
115
+ .queryBuilder()
116
+ .addMany(_queryParams)
117
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
118
+ .build(),
114
119
  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,
115
120
  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,
116
121
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -115,4 +115,26 @@ export declare class JobsClient {
115
115
  */
116
116
  continueJob(request: CatchAllApi.ContinueRequestDto, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ContinueResponseDto>;
117
117
  private __continueJob;
118
+ /**
119
+ * Soft-deletes a job. The job is flagged as deleted and no longer
120
+ * appears in list results. The underlying data is retained.
121
+ *
122
+ * Only the job owner can delete a job. Returns `404` if the job is not
123
+ * found or does not belong to the authenticated user.
124
+ *
125
+ * Deleting an already-deleted job returns `200`.
126
+ *
127
+ * @param {CatchAllApi.DeleteJobRequest} request
128
+ * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
129
+ *
130
+ * @throws {@link CatchAllApi.UnauthorizedError}
131
+ * @throws {@link CatchAllApi.NotFoundError}
132
+ *
133
+ * @example
134
+ * await client.jobs.deleteJob({
135
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
136
+ * })
137
+ */
138
+ deleteJob(request: CatchAllApi.DeleteJobRequest, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.DeleteJobResponseDto>;
139
+ private __deleteJob;
118
140
  }
@@ -75,10 +75,12 @@ class JobsClient {
75
75
  __getUserJobs() {
76
76
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
77
77
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
78
- const { page, page_size: pageSize } = request;
78
+ const { page, page_size: pageSize, search, ownership } = request;
79
79
  const _queryParams = {
80
80
  page,
81
81
  page_size: pageSize,
82
+ search,
83
+ ownership: ownership != null ? ownership : undefined,
82
84
  };
83
85
  const _authRequest = yield this._options.authProvider.getAuthRequest();
84
86
  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);
@@ -87,6 +89,11 @@ class JobsClient {
87
89
  method: "GET",
88
90
  headers: _headers,
89
91
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
92
+ queryString: core.url
93
+ .queryBuilder()
94
+ .addMany(_queryParams)
95
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
96
+ .build(),
90
97
  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,
91
98
  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,
92
99
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -318,6 +325,11 @@ class JobsClient {
318
325
  method: "GET",
319
326
  headers: _headers,
320
327
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
328
+ queryString: core.url
329
+ .queryBuilder()
330
+ .addMany(_queryParams)
331
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
332
+ .build(),
321
333
  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,
322
334
  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,
323
335
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -404,5 +416,65 @@ class JobsClient {
404
416
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/catchAll/continue");
405
417
  });
406
418
  }
419
+ /**
420
+ * Soft-deletes a job. The job is flagged as deleted and no longer
421
+ * appears in list results. The underlying data is retained.
422
+ *
423
+ * Only the job owner can delete a job. Returns `404` if the job is not
424
+ * found or does not belong to the authenticated user.
425
+ *
426
+ * Deleting an already-deleted job returns `200`.
427
+ *
428
+ * @param {CatchAllApi.DeleteJobRequest} request
429
+ * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
430
+ *
431
+ * @throws {@link CatchAllApi.UnauthorizedError}
432
+ * @throws {@link CatchAllApi.NotFoundError}
433
+ *
434
+ * @example
435
+ * await client.jobs.deleteJob({
436
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
437
+ * })
438
+ */
439
+ deleteJob(request, requestOptions) {
440
+ return core.HttpResponsePromise.fromPromise(this.__deleteJob(request, requestOptions));
441
+ }
442
+ __deleteJob(request, requestOptions) {
443
+ return __awaiter(this, void 0, void 0, function* () {
444
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
445
+ const { job_id: jobId } = request;
446
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
447
+ 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);
448
+ const _response = yield core.fetcher({
449
+ 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/${core.url.encodePathParam(jobId)}`),
450
+ method: "DELETE",
451
+ headers: _headers,
452
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
453
+ 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,
454
+ 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,
455
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
456
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
457
+ logging: this._options.logging,
458
+ });
459
+ if (_response.ok) {
460
+ return { data: _response.body, rawResponse: _response.rawResponse };
461
+ }
462
+ if (_response.error.reason === "status-code") {
463
+ switch (_response.error.statusCode) {
464
+ case 401:
465
+ throw new CatchAllApi.UnauthorizedError(_response.error.body, _response.rawResponse);
466
+ case 404:
467
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
468
+ default:
469
+ throw new errors.CatchAllApiError({
470
+ statusCode: _response.error.statusCode,
471
+ body: _response.error.body,
472
+ rawResponse: _response.rawResponse,
473
+ });
474
+ }
475
+ }
476
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/catchAll/jobs/{job_id}");
477
+ });
478
+ }
407
479
  }
408
480
  exports.JobsClient = JobsClient;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
5
+ * }
6
+ */
7
+ export interface DeleteJobRequest {
8
+ /** Unique job identifier returned from [`POST /catchAll/submit`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/create-job). */
9
+ job_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 GetUserJobsRequest {
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
  }
@@ -36,7 +36,7 @@ export interface SubmitRequestDto {
36
36
  */
37
37
  mode?: SubmitRequestDto.Mode;
38
38
  /**
39
- * Dataset IDs to connect to this job. When provided, activates Company Search mode — the job returns only events relevant to companies in the connected datasets with each record including a `connected_entities` array scored per company.
39
+ * Dataset IDs to connect to this job. When provided, activates Company Watchlist mode — the job returns only events relevant to companies in the connected datasets with each record including a `connected_entities` array scored per company.
40
40
  *
41
41
  * The dataset must have `latest_status: ready` before the job is submitted. Submitting with a non-existent or inaccessible dataset ID returns `400`.
42
42
  */
@@ -1,4 +1,5 @@
1
1
  export type { ContinueRequestDto } from "./ContinueRequestDto.js";
2
+ export type { DeleteJobRequest } from "./DeleteJobRequest.js";
2
3
  export type { GetJobResultsRequest } from "./GetJobResultsRequest.js";
3
4
  export type { GetJobStatusRequest } from "./GetJobStatusRequest.js";
4
5
  export type { GetUserJobsRequest } from "./GetUserJobsRequest.js";
@@ -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);
@@ -99,6 +101,11 @@ class MonitorsClient {
99
101
  method: "GET",
100
102
  headers: _headers,
101
103
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
104
+ queryString: core.url
105
+ .queryBuilder()
106
+ .addMany(_queryParams)
107
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
108
+ .build(),
102
109
  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
110
  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
111
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -261,22 +268,27 @@ class MonitorsClient {
261
268
  }
262
269
  __listMonitorJobs(request, requestOptions) {
263
270
  return __awaiter(this, void 0, void 0, function* () {
264
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
271
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
265
272
  const { monitor_id: monitorId, sort } = request;
266
273
  const _queryParams = {
267
- sort: sort != null ? sort : undefined,
274
+ sort: (_a = (sort != null ? sort : undefined)) !== null && _a !== void 0 ? _a : "asc",
268
275
  };
269
276
  const _authRequest = yield this._options.authProvider.getAuthRequest();
270
- 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);
277
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
271
278
  const _response = yield core.fetcher({
272
- 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`),
279
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CatchAllApiEnvironment.Default, `catchAll/monitors/${core.url.encodePathParam(monitorId)}/jobs`),
273
280
  method: "GET",
274
281
  headers: _headers,
275
282
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
276
- 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
- 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,
283
+ queryString: core.url
284
+ .queryBuilder()
285
+ .addMany(_queryParams)
286
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
287
+ .build(),
288
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
289
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
278
290
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
279
- fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
291
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
280
292
  logging: this._options.logging,
281
293
  });
282
294
  if (_response.ok) {
@@ -299,6 +311,63 @@ class MonitorsClient {
299
311
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catchAll/monitors/{monitor_id}/jobs");
300
312
  });
301
313
  }
314
+ /**
315
+ * Returns the full execution history of a monitor as a list of status entries, ordered from newest to oldest.
316
+ *
317
+ * @param {CatchAllApi.GetMonitorStatusHistoryRequest} request
318
+ * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
319
+ *
320
+ * @throws {@link CatchAllApi.UnauthorizedError}
321
+ * @throws {@link CatchAllApi.NotFoundError}
322
+ *
323
+ * @example
324
+ * await client.monitors.getMonitorStatusHistory({
325
+ * monitor_id: "monitor_id"
326
+ * })
327
+ */
328
+ getMonitorStatusHistory(request, requestOptions) {
329
+ return core.HttpResponsePromise.fromPromise(this.__getMonitorStatusHistory(request, requestOptions));
330
+ }
331
+ __getMonitorStatusHistory(request, requestOptions) {
332
+ return __awaiter(this, void 0, void 0, function* () {
333
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
334
+ const { monitor_id: monitorId } = request;
335
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
336
+ 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);
337
+ const _response = yield core.fetcher({
338
+ 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`),
339
+ method: "GET",
340
+ headers: _headers,
341
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
342
+ 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,
343
+ 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,
344
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
345
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
346
+ logging: this._options.logging,
347
+ });
348
+ if (_response.ok) {
349
+ return {
350
+ data: _response.body,
351
+ rawResponse: _response.rawResponse,
352
+ };
353
+ }
354
+ if (_response.error.reason === "status-code") {
355
+ switch (_response.error.statusCode) {
356
+ case 401:
357
+ throw new CatchAllApi.UnauthorizedError(_response.error.body, _response.rawResponse);
358
+ case 404:
359
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
360
+ default:
361
+ throw new errors.CatchAllApiError({
362
+ statusCode: _response.error.statusCode,
363
+ body: _response.error.body,
364
+ rawResponse: _response.rawResponse,
365
+ });
366
+ }
367
+ }
368
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catchAll/monitors/{monitor_id}/status");
369
+ });
370
+ }
302
371
  /**
303
372
  * Resume scheduled job execution for a monitor.
304
373
  *
@@ -417,6 +486,67 @@ class MonitorsClient {
417
486
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/catchAll/monitors/{monitor_id}/disable");
418
487
  });
419
488
  }
489
+ /**
490
+ * Soft-deletes a monitor. The monitor is flagged as deleted, stops
491
+ * executing scheduled jobs immediately, and no longer appears in list
492
+ * results.
493
+ *
494
+ * Only the monitor owner can delete a monitor. Returns `404` if the
495
+ * monitor is not found or does not belong to the authenticated user.
496
+ *
497
+ * Deleting an already-deleted monitor returns `200`.
498
+ *
499
+ * @param {CatchAllApi.DeleteMonitorRequest} request
500
+ * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
501
+ *
502
+ * @throws {@link CatchAllApi.UnauthorizedError}
503
+ * @throws {@link CatchAllApi.NotFoundError}
504
+ *
505
+ * @example
506
+ * await client.monitors.deleteMonitor({
507
+ * monitor_id: "monitor_id"
508
+ * })
509
+ */
510
+ deleteMonitor(request, requestOptions) {
511
+ return core.HttpResponsePromise.fromPromise(this.__deleteMonitor(request, requestOptions));
512
+ }
513
+ __deleteMonitor(request, requestOptions) {
514
+ return __awaiter(this, void 0, void 0, function* () {
515
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
516
+ const { monitor_id: monitorId } = request;
517
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
518
+ 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);
519
+ const _response = yield core.fetcher({
520
+ 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)}`),
521
+ method: "DELETE",
522
+ headers: _headers,
523
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
524
+ 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,
525
+ 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,
526
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
527
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
528
+ logging: this._options.logging,
529
+ });
530
+ if (_response.ok) {
531
+ return { data: _response.body, rawResponse: _response.rawResponse };
532
+ }
533
+ if (_response.error.reason === "status-code") {
534
+ switch (_response.error.statusCode) {
535
+ case 401:
536
+ throw new CatchAllApi.UnauthorizedError(_response.error.body, _response.rawResponse);
537
+ case 404:
538
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
539
+ default:
540
+ throw new errors.CatchAllApiError({
541
+ statusCode: _response.error.statusCode,
542
+ body: _response.error.body,
543
+ rawResponse: _response.rawResponse,
544
+ });
545
+ }
546
+ }
547
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/catchAll/monitors/{monitor_id}");
548
+ });
549
+ }
420
550
  /**
421
551
  * Update the webhook configuration for an existing monitor.
422
552
  *
@@ -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 });