newscatcher-catchall-sdk 1.0.0 → 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 (143) hide show
  1. package/README.md +284 -289
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/resources/jobs/client/Client.d.ts +13 -17
  4. package/dist/cjs/api/resources/jobs/client/Client.js +12 -19
  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/InitializeRequestDto.d.ts +2 -1
  9. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +5 -6
  10. package/dist/cjs/api/resources/jobs/exports.d.ts +2 -0
  11. package/dist/cjs/api/resources/jobs/exports.js +21 -0
  12. package/dist/cjs/api/resources/meta/exports.d.ts +2 -0
  13. package/dist/cjs/api/resources/meta/exports.js +21 -0
  14. package/dist/cjs/api/resources/meta/types/GetVersionResponse.d.ts +1 -1
  15. package/dist/cjs/api/resources/meta/types/HealthCheckResponse.d.ts +1 -1
  16. package/dist/cjs/api/resources/monitors/client/Client.d.ts +23 -37
  17. package/dist/cjs/api/resources/monitors/client/Client.js +35 -41
  18. package/dist/cjs/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.ts +23 -6
  19. package/dist/cjs/api/resources/monitors/client/requests/EnableMonitorRequestDto.d.ts +17 -0
  20. package/dist/cjs/api/resources/monitors/client/requests/ListMonitorsRequest.d.ts +10 -0
  21. package/dist/cjs/api/resources/monitors/client/requests/UpdateMonitorRequestDto.d.ts +2 -0
  22. package/dist/cjs/api/resources/monitors/client/requests/index.d.ts +2 -1
  23. package/dist/cjs/api/resources/monitors/exports.d.ts +2 -0
  24. package/dist/cjs/api/resources/monitors/exports.js +21 -0
  25. package/dist/cjs/api/types/BaseRecord.d.ts +38 -0
  26. package/dist/cjs/api/types/BaseRecord.js +16 -0
  27. package/dist/cjs/api/types/Citation.d.ts +3 -3
  28. package/dist/cjs/api/types/CompanyEnrichmentOutput.d.ts +29 -0
  29. package/dist/cjs/api/types/CompanyEnrichmentOutput.js +16 -0
  30. package/dist/cjs/api/types/ContinueResponseDto.d.ts +2 -2
  31. package/dist/cjs/api/types/CreateMonitorResponseDto.d.ts +1 -1
  32. package/dist/cjs/api/types/EndDate.d.ts +4 -2
  33. package/dist/cjs/api/types/EnrichmentType.d.ts +1 -3
  34. package/dist/cjs/api/types/EnrichmentType.js +1 -3
  35. package/dist/cjs/api/types/Error_.d.ts +1 -1
  36. package/dist/cjs/api/types/InitializeResponseDto.d.ts +8 -9
  37. package/dist/cjs/api/types/JobStep.d.ts +2 -2
  38. package/dist/cjs/api/types/Limit.d.ts +1 -1
  39. package/dist/cjs/api/types/ListMonitorsResponseDto.d.ts +7 -1
  40. package/dist/cjs/api/types/MonitorCitation.d.ts +3 -8
  41. package/dist/cjs/api/types/MonitorListItemDto.d.ts +7 -7
  42. package/dist/cjs/api/types/MonitorRecord.d.ts +4 -14
  43. package/dist/{esm/api/types/JobStatus.d.mts → cjs/api/types/PublicJobStatus.d.ts} +4 -4
  44. package/dist/cjs/api/types/{JobStatus.js → PublicJobStatus.js} +4 -4
  45. package/dist/cjs/api/types/PullJobResponseDto.d.ts +27 -22
  46. package/dist/cjs/api/types/PullMonitorResponseDto.d.ts +12 -12
  47. package/dist/cjs/api/types/Query.d.ts +1 -1
  48. package/dist/cjs/api/types/Record_.d.ts +2 -12
  49. package/dist/cjs/api/types/ReferenceJob.d.ts +3 -3
  50. package/dist/cjs/api/types/StartDate.d.ts +4 -2
  51. package/dist/cjs/api/types/StatusResponseDto.d.ts +2 -2
  52. package/dist/cjs/api/types/{SubmitResponseBody.d.ts → SubmitResponseDto.d.ts} +1 -1
  53. package/dist/cjs/api/types/UserJob.d.ts +1 -1
  54. package/dist/cjs/api/types/ValidationErrorDetail.d.ts +3 -3
  55. package/dist/cjs/api/types/ValidationErrorResponse.d.ts +1 -1
  56. package/dist/cjs/api/types/ValidatorSchema.d.ts +3 -3
  57. package/dist/cjs/api/types/WebhookDto.d.ts +4 -4
  58. package/dist/cjs/api/types/WebhookPayload.d.ts +9 -9
  59. package/dist/cjs/api/types/index.d.ts +4 -3
  60. package/dist/cjs/api/types/index.js +4 -3
  61. package/dist/cjs/core/fetcher/Fetcher.js +8 -2
  62. package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
  63. package/dist/cjs/core/fetcher/makeRequest.js +30 -9
  64. package/dist/cjs/core/runtime/runtime.js +8 -7
  65. package/dist/cjs/version.d.ts +1 -1
  66. package/dist/cjs/version.js +1 -1
  67. package/dist/esm/BaseClient.mjs +2 -2
  68. package/dist/esm/api/resources/jobs/client/Client.d.mts +13 -17
  69. package/dist/esm/api/resources/jobs/client/Client.mjs +12 -19
  70. package/dist/esm/api/resources/jobs/client/requests/ContinueRequestDto.d.mts +3 -3
  71. package/dist/esm/api/resources/jobs/client/requests/GetJobResultsRequest.d.mts +2 -2
  72. package/dist/esm/api/resources/jobs/client/requests/GetJobStatusRequest.d.mts +2 -2
  73. package/dist/esm/api/resources/jobs/client/requests/InitializeRequestDto.d.mts +2 -1
  74. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +5 -6
  75. package/dist/esm/api/resources/jobs/exports.d.mts +2 -0
  76. package/dist/esm/api/resources/jobs/exports.mjs +3 -0
  77. package/dist/esm/api/resources/meta/exports.d.mts +2 -0
  78. package/dist/esm/api/resources/meta/exports.mjs +3 -0
  79. package/dist/esm/api/resources/meta/types/GetVersionResponse.d.mts +1 -1
  80. package/dist/esm/api/resources/meta/types/HealthCheckResponse.d.mts +1 -1
  81. package/dist/esm/api/resources/monitors/client/Client.d.mts +23 -37
  82. package/dist/esm/api/resources/monitors/client/Client.mjs +35 -41
  83. package/dist/esm/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.mts +23 -6
  84. package/dist/esm/api/resources/monitors/client/requests/EnableMonitorRequestDto.d.mts +17 -0
  85. package/dist/esm/api/resources/monitors/client/requests/ListMonitorsRequest.d.mts +10 -0
  86. package/dist/esm/api/resources/monitors/client/requests/UpdateMonitorRequestDto.d.mts +2 -0
  87. package/dist/esm/api/resources/monitors/client/requests/index.d.mts +2 -1
  88. package/dist/esm/api/resources/monitors/exports.d.mts +2 -0
  89. package/dist/esm/api/resources/monitors/exports.mjs +3 -0
  90. package/dist/esm/api/types/BaseRecord.d.mts +38 -0
  91. package/dist/esm/api/types/BaseRecord.mjs +13 -0
  92. package/dist/esm/api/types/Citation.d.mts +3 -3
  93. package/dist/esm/api/types/CompanyEnrichmentOutput.d.mts +29 -0
  94. package/dist/esm/api/types/CompanyEnrichmentOutput.mjs +13 -0
  95. package/dist/esm/api/types/ContinueResponseDto.d.mts +2 -2
  96. package/dist/esm/api/types/CreateMonitorResponseDto.d.mts +1 -1
  97. package/dist/esm/api/types/EndDate.d.mts +4 -2
  98. package/dist/esm/api/types/EnrichmentType.d.mts +1 -3
  99. package/dist/esm/api/types/EnrichmentType.mjs +1 -3
  100. package/dist/esm/api/types/Error_.d.mts +1 -1
  101. package/dist/esm/api/types/InitializeResponseDto.d.mts +8 -9
  102. package/dist/esm/api/types/JobStep.d.mts +2 -2
  103. package/dist/esm/api/types/Limit.d.mts +1 -1
  104. package/dist/esm/api/types/ListMonitorsResponseDto.d.mts +7 -1
  105. package/dist/esm/api/types/MonitorCitation.d.mts +3 -8
  106. package/dist/esm/api/types/MonitorListItemDto.d.mts +7 -7
  107. package/dist/esm/api/types/MonitorRecord.d.mts +4 -14
  108. package/dist/{cjs/api/types/JobStatus.d.ts → esm/api/types/PublicJobStatus.d.mts} +4 -4
  109. package/dist/esm/api/types/{JobStatus.mjs → PublicJobStatus.mjs} +3 -3
  110. package/dist/esm/api/types/PullJobResponseDto.d.mts +27 -22
  111. package/dist/esm/api/types/PullMonitorResponseDto.d.mts +12 -12
  112. package/dist/esm/api/types/Query.d.mts +1 -1
  113. package/dist/esm/api/types/Record_.d.mts +2 -12
  114. package/dist/esm/api/types/ReferenceJob.d.mts +3 -3
  115. package/dist/esm/api/types/StartDate.d.mts +4 -2
  116. package/dist/esm/api/types/StatusResponseDto.d.mts +2 -2
  117. package/dist/esm/api/types/{SubmitResponseBody.d.mts → SubmitResponseDto.d.mts} +1 -1
  118. package/dist/esm/api/types/UserJob.d.mts +1 -1
  119. package/dist/esm/api/types/ValidationErrorDetail.d.mts +3 -3
  120. package/dist/esm/api/types/ValidationErrorResponse.d.mts +1 -1
  121. package/dist/esm/api/types/ValidatorSchema.d.mts +3 -3
  122. package/dist/esm/api/types/WebhookDto.d.mts +4 -4
  123. package/dist/esm/api/types/WebhookPayload.d.mts +9 -9
  124. package/dist/esm/api/types/index.d.mts +4 -3
  125. package/dist/esm/api/types/index.mjs +4 -3
  126. package/dist/esm/core/fetcher/Fetcher.mjs +8 -2
  127. package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
  128. package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
  129. package/dist/esm/core/runtime/runtime.mjs +8 -7
  130. package/dist/esm/version.d.mts +1 -1
  131. package/dist/esm/version.mjs +1 -1
  132. package/package.json +37 -4
  133. package/reference.md +43 -53
  134. package/dist/cjs/api/resources/monitors/client/requests/EnableMonitorRequest.d.ts +0 -10
  135. package/dist/cjs/api/types/Schema.d.ts +0 -6
  136. package/dist/esm/api/resources/monitors/client/requests/EnableMonitorRequest.d.mts +0 -10
  137. package/dist/esm/api/types/Schema.d.mts +0 -6
  138. /package/dist/cjs/api/resources/monitors/client/requests/{EnableMonitorRequest.js → EnableMonitorRequestDto.js} +0 -0
  139. /package/dist/cjs/api/{types/Schema.js → resources/monitors/client/requests/ListMonitorsRequest.js} +0 -0
  140. /package/dist/cjs/api/types/{SubmitResponseBody.js → SubmitResponseDto.js} +0 -0
  141. /package/dist/esm/api/resources/monitors/client/requests/{EnableMonitorRequest.mjs → EnableMonitorRequestDto.mjs} +0 -0
  142. /package/dist/esm/api/{types/Schema.mjs → resources/monitors/client/requests/ListMonitorsRequest.mjs} +0 -0
  143. /package/dist/esm/api/types/{SubmitResponseBody.mjs → SubmitResponseDto.mjs} +0 -0
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { JobsClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -0,0 +1,2 @@
1
+ export { MetaClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { MetaClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -1,3 +1,3 @@
1
1
  export interface GetVersionResponse {
2
- version?: string;
2
+ version?: string | undefined;
3
3
  }
@@ -1,3 +1,3 @@
1
1
  export interface HealthCheckResponse {
2
- healthy?: boolean;
2
+ healthy?: boolean | undefined;
3
3
  }
@@ -14,20 +14,7 @@ export declare class MonitorsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<MonitorsClient.Options>;
15
15
  constructor(options?: MonitorsClient.Options);
16
16
  /**
17
- * Create a monitor that runs jobs based on a reference job with a specified schedule.
18
- *
19
- * **Reference job requirements:**
20
- * - Job's `end_date` must be within the last 7 days
21
- *
22
- * **Schedule requirements:**
23
- * - Minimum 24-hour interval between executions
24
- * - Natural language format (e.g., "every day at 12 PM UTC", "every 48 hours")
25
- *
26
- * **Validation:**
27
- * - Reference jobs older than 7 days return 400 Bad Request.
28
- * - Schedules below minimum frequency return error with descriptive message.
29
- * - Invalid job IDs return 400 Bad Request.
30
- * - Duplicate monitors (same job already monitored) return error.
17
+ * Create a scheduled monitor based on a reference job.
31
18
  *
32
19
  * @param {CatchAllApi.CreateMonitorRequestDto} request
33
20
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -36,22 +23,23 @@ export declare class MonitorsClient {
36
23
  *
37
24
  * @example
38
25
  * await client.monitors.createMonitor({
39
- * reference_job_id: "reference_job_id",
40
- * schedule: "every day at 12 PM UTC"
26
+ * reference_job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
27
+ * schedule: "every day at 12 PM UTC",
28
+ * webhook: {
29
+ * url: "https://your-endpoint.com/webhook",
30
+ * method: "POST",
31
+ * headers: {
32
+ * "Authorization": "Bearer your_token_here"
33
+ * }
34
+ * },
35
+ * limit: 10,
36
+ * backfill: true
41
37
  * })
42
38
  */
43
39
  createMonitor(request: CatchAllApi.CreateMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.CreateMonitorResponseDto>;
44
40
  private __createMonitor;
45
41
  /**
46
- * Update webhook configuration for an existing monitor without recreating it.
47
- *
48
- * **Supported updates:**
49
- * - Webhook URL
50
- * - HTTP method (POST/PUT)
51
- * - Headers and authentication
52
- * - Query parameters
53
- *
54
- * **Note:** Schedule and reference job cannot be modified. To change these, create a new monitor.
42
+ * Update the webhook configuration for an existing monitor.
55
43
  *
56
44
  * @param {CatchAllApi.UpdateMonitorRequestDto} request
57
45
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -75,8 +63,7 @@ export declare class MonitorsClient {
75
63
  updateMonitor(request: CatchAllApi.UpdateMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.UpdateMonitorResponseDto>;
76
64
  private __updateMonitor;
77
65
  /**
78
- * Returns all jobs associated with a monitor, sorted by start_date.
79
- * Each job includes job_id, start_date, and end_date.
66
+ * Return all jobs executed by a monitor.
80
67
  *
81
68
  * @param {CatchAllApi.ListMonitorJobsRequest} request
82
69
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -92,8 +79,7 @@ export declare class MonitorsClient {
92
79
  listMonitorJobs(request: CatchAllApi.ListMonitorJobsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorJobsResponse>;
93
80
  private __listMonitorJobs;
94
81
  /**
95
- * Retrieve aggregated results from all jobs executed by this monitor.
96
- * Includes monitor configuration, execution history, and all records collected.
82
+ * Retrieve aggregated results from all jobs executed by a monitor.
97
83
  *
98
84
  * @param {CatchAllApi.PullMonitorResultsRequest} request
99
85
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -109,8 +95,7 @@ export declare class MonitorsClient {
109
95
  pullMonitorResults(request: CatchAllApi.PullMonitorResultsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.PullMonitorResponseDto>;
110
96
  private __pullMonitorResults;
111
97
  /**
112
- * Disables a monitor to stop executing scheduled jobs.
113
- * Validates that the provided API key is associated with the monitor.
98
+ * Stop scheduled job execution for a monitor.
114
99
  *
115
100
  * @param {CatchAllApi.DisableMonitorRequest} request
116
101
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -127,10 +112,9 @@ export declare class MonitorsClient {
127
112
  disableMonitor(request: CatchAllApi.DisableMonitorRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.DisableMonitorResponse>;
128
113
  private __disableMonitor;
129
114
  /**
130
- * Enables a monitor to resume executing scheduled jobs.
131
- * Validates that the provided API key is associated with the monitor.
115
+ * Resume scheduled job execution for a monitor.
132
116
  *
133
- * @param {CatchAllApi.EnableMonitorRequest} request
117
+ * @param {CatchAllApi.EnableMonitorRequestDto} request
134
118
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
135
119
  *
136
120
  * @throws {@link CatchAllApi.ForbiddenError}
@@ -139,14 +123,16 @@ export declare class MonitorsClient {
139
123
  *
140
124
  * @example
141
125
  * await client.monitors.enableMonitor({
142
- * monitor_id: "monitor_id"
126
+ * monitor_id: "monitor_id",
127
+ * backfill: true
143
128
  * })
144
129
  */
145
- enableMonitor(request: CatchAllApi.EnableMonitorRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.EnableMonitorResponse>;
130
+ enableMonitor(request: CatchAllApi.EnableMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.EnableMonitorResponse>;
146
131
  private __enableMonitor;
147
132
  /**
148
133
  * Returns all monitors created by the authenticated user.
149
134
  *
135
+ * @param {CatchAllApi.ListMonitorsRequest} request
150
136
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
151
137
  *
152
138
  * @throws {@link CatchAllApi.ForbiddenError}
@@ -155,6 +141,6 @@ export declare class MonitorsClient {
155
141
  * @example
156
142
  * await client.monitors.listMonitors()
157
143
  */
158
- listMonitors(requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorsResponseDto>;
144
+ listMonitors(request?: CatchAllApi.ListMonitorsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorsResponseDto>;
159
145
  private __listMonitors;
160
146
  }
@@ -34,20 +34,7 @@ export class MonitorsClient {
34
34
  this._options = normalizeClientOptionsWithAuth(options);
35
35
  }
36
36
  /**
37
- * Create a monitor that runs jobs based on a reference job with a specified schedule.
38
- *
39
- * **Reference job requirements:**
40
- * - Job's `end_date` must be within the last 7 days
41
- *
42
- * **Schedule requirements:**
43
- * - Minimum 24-hour interval between executions
44
- * - Natural language format (e.g., "every day at 12 PM UTC", "every 48 hours")
45
- *
46
- * **Validation:**
47
- * - Reference jobs older than 7 days return 400 Bad Request.
48
- * - Schedules below minimum frequency return error with descriptive message.
49
- * - Invalid job IDs return 400 Bad Request.
50
- * - Duplicate monitors (same job already monitored) return error.
37
+ * Create a scheduled monitor based on a reference job.
51
38
  *
52
39
  * @param {CatchAllApi.CreateMonitorRequestDto} request
53
40
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -56,8 +43,17 @@ export class MonitorsClient {
56
43
  *
57
44
  * @example
58
45
  * await client.monitors.createMonitor({
59
- * reference_job_id: "reference_job_id",
60
- * schedule: "every day at 12 PM UTC"
46
+ * reference_job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
47
+ * schedule: "every day at 12 PM UTC",
48
+ * webhook: {
49
+ * url: "https://your-endpoint.com/webhook",
50
+ * method: "POST",
51
+ * headers: {
52
+ * "Authorization": "Bearer your_token_here"
53
+ * }
54
+ * },
55
+ * limit: 10,
56
+ * backfill: true
61
57
  * })
62
58
  */
63
59
  createMonitor(request, requestOptions) {
@@ -101,15 +97,7 @@ export class MonitorsClient {
101
97
  });
102
98
  }
103
99
  /**
104
- * Update webhook configuration for an existing monitor without recreating it.
105
- *
106
- * **Supported updates:**
107
- * - Webhook URL
108
- * - HTTP method (POST/PUT)
109
- * - Headers and authentication
110
- * - Query parameters
111
- *
112
- * **Note:** Schedule and reference job cannot be modified. To change these, create a new monitor.
100
+ * Update the webhook configuration for an existing monitor.
113
101
  *
114
102
  * @param {CatchAllApi.UpdateMonitorRequestDto} request
115
103
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -176,8 +164,7 @@ export class MonitorsClient {
176
164
  });
177
165
  }
178
166
  /**
179
- * Returns all jobs associated with a monitor, sorted by start_date.
180
- * Each job includes job_id, start_date, and end_date.
167
+ * Return all jobs executed by a monitor.
181
168
  *
182
169
  * @param {CatchAllApi.ListMonitorJobsRequest} request
183
170
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -234,8 +221,7 @@ export class MonitorsClient {
234
221
  });
235
222
  }
236
223
  /**
237
- * Retrieve aggregated results from all jobs executed by this monitor.
238
- * Includes monitor configuration, execution history, and all records collected.
224
+ * Retrieve aggregated results from all jobs executed by a monitor.
239
225
  *
240
226
  * @param {CatchAllApi.PullMonitorResultsRequest} request
241
227
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -289,8 +275,7 @@ export class MonitorsClient {
289
275
  });
290
276
  }
291
277
  /**
292
- * Disables a monitor to stop executing scheduled jobs.
293
- * Validates that the provided API key is associated with the monitor.
278
+ * Stop scheduled job execution for a monitor.
294
279
  *
295
280
  * @param {CatchAllApi.DisableMonitorRequest} request
296
281
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -347,10 +332,9 @@ export class MonitorsClient {
347
332
  });
348
333
  }
349
334
  /**
350
- * Enables a monitor to resume executing scheduled jobs.
351
- * Validates that the provided API key is associated with the monitor.
335
+ * Resume scheduled job execution for a monitor.
352
336
  *
353
- * @param {CatchAllApi.EnableMonitorRequest} request
337
+ * @param {CatchAllApi.EnableMonitorRequestDto} request
354
338
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
355
339
  *
356
340
  * @throws {@link CatchAllApi.ForbiddenError}
@@ -359,7 +343,8 @@ export class MonitorsClient {
359
343
  *
360
344
  * @example
361
345
  * await client.monitors.enableMonitor({
362
- * monitor_id: "monitor_id"
346
+ * monitor_id: "monitor_id",
347
+ * backfill: true
363
348
  * })
364
349
  */
365
350
  enableMonitor(request, requestOptions) {
@@ -368,14 +353,17 @@ export class MonitorsClient {
368
353
  __enableMonitor(request, requestOptions) {
369
354
  return __awaiter(this, void 0, void 0, function* () {
370
355
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
371
- const { monitor_id: monitorId } = request;
356
+ const { monitor_id: monitorId } = request, _body = __rest(request, ["monitor_id"]);
372
357
  const _authRequest = yield this._options.authProvider.getAuthRequest();
373
358
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
374
359
  const _response = yield core.fetcher({
375
360
  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)}/enable`),
376
361
  method: "POST",
377
362
  headers: _headers,
363
+ contentType: "application/json",
378
364
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
365
+ requestType: "json",
366
+ body: _body,
379
367
  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,
380
368
  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,
381
369
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -407,6 +395,7 @@ export class MonitorsClient {
407
395
  /**
408
396
  * Returns all monitors created by the authenticated user.
409
397
  *
398
+ * @param {CatchAllApi.ListMonitorsRequest} request
410
399
  * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
411
400
  *
412
401
  * @throws {@link CatchAllApi.ForbiddenError}
@@ -415,19 +404,24 @@ export class MonitorsClient {
415
404
  * @example
416
405
  * await client.monitors.listMonitors()
417
406
  */
418
- listMonitors(requestOptions) {
419
- return core.HttpResponsePromise.fromPromise(this.__listMonitors(requestOptions));
407
+ listMonitors(request = {}, requestOptions) {
408
+ return core.HttpResponsePromise.fromPromise(this.__listMonitors(request, requestOptions));
420
409
  }
421
- __listMonitors(requestOptions) {
422
- return __awaiter(this, void 0, void 0, function* () {
410
+ __listMonitors() {
411
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
423
412
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
413
+ const { page, page_size: pageSize } = request;
414
+ const _queryParams = {
415
+ page,
416
+ page_size: pageSize,
417
+ };
424
418
  const _authRequest = yield this._options.authProvider.getAuthRequest();
425
419
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
426
420
  const _response = yield core.fetcher({
427
421
  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"),
428
422
  method: "GET",
429
423
  headers: _headers,
430
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
424
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
431
425
  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,
432
426
  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,
433
427
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -2,23 +2,40 @@ import type * as CatchAllApi from "../../../../index.mjs";
2
2
  /**
3
3
  * @example
4
4
  * {
5
- * reference_job_id: "reference_job_id",
6
- * schedule: "every day at 12 PM UTC"
5
+ * reference_job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
6
+ * schedule: "every day at 12 PM UTC",
7
+ * webhook: {
8
+ * url: "https://your-endpoint.com/webhook",
9
+ * method: "POST",
10
+ * headers: {
11
+ * "Authorization": "Bearer your_token_here"
12
+ * }
13
+ * },
14
+ * limit: 10,
15
+ * backfill: true
7
16
  * }
8
17
  */
9
18
  export interface CreateMonitorRequestDto {
10
19
  /**
11
- * Job ID to use as template for scheduled runs.
20
+ * Job ID to use as template for scheduled runs. Defines the query, validators, and enrichments used for each scheduled run.
12
21
  *
13
- * Job's `end_date` must be within the last 7 days.
22
+ * If [`backfill`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/monitors/create-monitor#body-backfill) is true, the job's `end_date` must be within the last 7 days.
14
23
  */
15
24
  reference_job_id: string;
16
25
  /**
17
- * Natural language schedule (e.g. 'every day at 12 AM EST').
26
+ * Monitor schedule in plain text format (e.g. 'every day at 12 PM UTC', 'every 48 hours').
18
27
  *
19
- * **Minimum frequency:** Monitors must be scheduled at least 24 hours apart.
28
+ * Minimum frequency depends on your plan.
20
29
  */
21
30
  schedule: string;
22
31
  /** Optional webhook to receive notifications when jobs complete. */
23
32
  webhook?: CatchAllApi.WebhookDto;
33
+ /** Maximum number of records per monitor run. If not provided, defaults to the plan limit. */
34
+ limit?: number;
35
+ /**
36
+ * If true, fills the data gap between the reference job's `end_date` and the first scheduled run. The reference job's `end_date` must be within the last 7 days.
37
+ *
38
+ * If false, no gap filling occurs and the first run uses the current cron window only — the reference job's age does not matter.
39
+ */
40
+ backfill?: boolean;
24
41
  }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * monitor_id: "monitor_id",
5
+ * backfill: true
6
+ * }
7
+ */
8
+ export interface EnableMonitorRequestDto {
9
+ /** Monitor identifier. */
10
+ monitor_id: string;
11
+ /**
12
+ * If true, fills the data gap between the last job's `end_date` and the first scheduled run after enabling. The last job's `end_date` must be within the last 7 days.
13
+ *
14
+ * If false, no gap filling occurs and the first run uses the current cron window only — the last job's age does not matter.
15
+ */
16
+ backfill?: boolean;
17
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface ListMonitorsRequest {
6
+ /** Page number to retrieve. */
7
+ page?: number;
8
+ /** Number of records per page. */
9
+ page_size?: number;
10
+ }
@@ -17,4 +17,6 @@ export interface UpdateMonitorRequestDto {
17
17
  monitor_id: string;
18
18
  /** Updated webhook configuration. */
19
19
  webhook?: CatchAllApi.WebhookDto;
20
+ /** Updated maximum number of records per monitor run. */
21
+ limit?: number;
20
22
  }
@@ -1,6 +1,7 @@
1
1
  export type { CreateMonitorRequestDto } from "./CreateMonitorRequestDto.mjs";
2
2
  export type { DisableMonitorRequest } from "./DisableMonitorRequest.mjs";
3
- export type { EnableMonitorRequest } from "./EnableMonitorRequest.mjs";
3
+ export type { EnableMonitorRequestDto } from "./EnableMonitorRequestDto.mjs";
4
4
  export type { ListMonitorJobsRequest } from "./ListMonitorJobsRequest.mjs";
5
+ export type { ListMonitorsRequest } from "./ListMonitorsRequest.mjs";
5
6
  export type { PullMonitorResultsRequest } from "./PullMonitorResultsRequest.mjs";
6
7
  export type { UpdateMonitorRequestDto } from "./UpdateMonitorRequestDto.mjs";
@@ -0,0 +1,2 @@
1
+ export { MonitorsClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { MonitorsClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -0,0 +1,38 @@
1
+ export interface BaseRecord {
2
+ /** Unique identifier for the record. */
3
+ record_id: string;
4
+ /** Short title summarizing the record. */
5
+ record_title: string;
6
+ /**
7
+ * Structured data extracted from web pages. Schema is dynamically generated per job. Field names are chosen semantically to match the content.
8
+ *
9
+ * **Note:** The system always includes the `enrichment_confidence` field within the `enrichment` object, regardless of whether enrichments are generated or specified by you.
10
+ *
11
+ * For integration guidance, see [Dynamic schemas](https://www.newscatcherapi.com/docs/web-search-api/guides-and-concepts/dynamic-schemas)
12
+ */
13
+ enrichment: BaseRecord.Enrichment;
14
+ }
15
+ export declare namespace BaseRecord {
16
+ /**
17
+ * Structured data extracted from web pages. Schema is dynamically generated per job. Field names are chosen semantically to match the content.
18
+ *
19
+ * **Note:** The system always includes the `enrichment_confidence` field within the `enrichment` object, regardless of whether enrichments are generated or specified by you.
20
+ *
21
+ * For integration guidance, see [Dynamic schemas](https://www.newscatcherapi.com/docs/web-search-api/guides-and-concepts/dynamic-schemas)
22
+ */
23
+ interface Enrichment {
24
+ /** Overall confidence score for the enrichment extraction. */
25
+ enrichment_confidence?: (Enrichment.EnrichmentConfidence | null) | undefined;
26
+ /** Accepts any additional properties */
27
+ [key: string]: any;
28
+ }
29
+ namespace Enrichment {
30
+ /** Overall confidence score for the enrichment extraction. */
31
+ const EnrichmentConfidence: {
32
+ readonly Low: "low";
33
+ readonly Medium: "medium";
34
+ readonly High: "high";
35
+ };
36
+ type EnrichmentConfidence = (typeof EnrichmentConfidence)[keyof typeof EnrichmentConfidence];
37
+ }
38
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var BaseRecord;
3
+ (function (BaseRecord) {
4
+ let Enrichment;
5
+ (function (Enrichment) {
6
+ /** Overall confidence score for the enrichment extraction. */
7
+ Enrichment.EnrichmentConfidence = {
8
+ Low: "low",
9
+ Medium: "medium",
10
+ High: "high",
11
+ };
12
+ })(Enrichment = BaseRecord.Enrichment || (BaseRecord.Enrichment = {}));
13
+ })(BaseRecord || (BaseRecord = {}));
@@ -1,8 +1,8 @@
1
1
  export interface Citation {
2
- /** Article title */
2
+ /** The title of the source document. */
3
3
  title: string;
4
- /** URL to the source article */
4
+ /** URL to the source document. */
5
5
  link: string;
6
- /** Article publication date in ISO 8601 format with UTC timezone. */
6
+ /** The publication date of the source document in ISO 8601 format (UTC timezone). */
7
7
  published_date: string;
8
8
  }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Appears as the value of company-typed fields in the `enrichment` object of each record. The `metadata` sub-object is populated by the system based on the identified company.
3
+ */
4
+ export interface CompanyEnrichmentOutput {
5
+ /** The text span in the source document where the company was identified. */
6
+ source_text: string;
7
+ /** Confidence score for the company identification. */
8
+ confidence: number;
9
+ metadata: CompanyEnrichmentOutput.Metadata;
10
+ }
11
+ export declare namespace CompanyEnrichmentOutput {
12
+ interface Metadata {
13
+ /** Normalized company name. */
14
+ name: string;
15
+ /** Company website domain if resolved, otherwise null. */
16
+ domain_url?: (string | null) | undefined;
17
+ /** Confidence level for the domain URL resolution. */
18
+ domain_url_confidence?: (Metadata.DomainUrlConfidence | null) | undefined;
19
+ }
20
+ namespace Metadata {
21
+ /** Confidence level for the domain URL resolution. */
22
+ const DomainUrlConfidence: {
23
+ readonly Low: "low";
24
+ readonly Medium: "medium";
25
+ readonly High: "high";
26
+ };
27
+ type DomainUrlConfidence = (typeof DomainUrlConfidence)[keyof typeof DomainUrlConfidence];
28
+ }
29
+ }
@@ -0,0 +1,13 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var CompanyEnrichmentOutput;
3
+ (function (CompanyEnrichmentOutput) {
4
+ let Metadata;
5
+ (function (Metadata) {
6
+ /** Confidence level for the domain URL resolution. */
7
+ Metadata.DomainUrlConfidence = {
8
+ Low: "low",
9
+ Medium: "medium",
10
+ High: "high",
11
+ };
12
+ })(Metadata = CompanyEnrichmentOutput.Metadata || (CompanyEnrichmentOutput.Metadata = {}));
13
+ })(CompanyEnrichmentOutput || (CompanyEnrichmentOutput = {}));
@@ -2,9 +2,9 @@ export interface ContinueResponseDto {
2
2
  /** Job identifier for the continued job. */
3
3
  job_id: string;
4
4
  /** Previous record limit before continuation. */
5
- previous_limit?: number;
5
+ previous_limit?: number | undefined;
6
6
  /** New record limit after continuation. */
7
7
  new_limit: number;
8
8
  /** Confirmation that the continuation request was accepted. */
9
- status?: string;
9
+ status: string;
10
10
  }
@@ -1,6 +1,6 @@
1
1
  export interface CreateMonitorResponseDto {
2
2
  /** Monitor ID if successful, null if error. */
3
- monitor_id?: string;
3
+ monitor_id?: (string | null) | undefined;
4
4
  /** Creation status or error message */
5
5
  status: string;
6
6
  }
@@ -1,6 +1,8 @@
1
1
  /**
2
- * End of date range for article search (ISO 8601 format with UTC timezone).
2
+ * End date for web search (ISO 8601 format with UTC timezone).
3
3
  *
4
- * Must be within plan's allowed lookback period and after start_date. Default is current date if not specified.
4
+ * Defines the end of the search window by web page discovery date, not event date. Web pages discovered within this range may describe events from any time period.
5
+ *
6
+ * Must be within plan's allowed search depth and after start_date. Default is current date if not specified.
5
7
  */
6
8
  export type EndDate = string;
@@ -6,8 +6,7 @@
6
6
  * - `date`: ISO format dates (YYYY-MM-DD)
7
7
  * - `option`: Enum-like fixed values (status, category)
8
8
  * - `url`: Web URLs
9
- * - `dict`: Complex structured objects
10
- * - `company`: Structured company data (name, alternative_names, website_candidates, people, address)
9
+ * - `company`: Structured company data. Returns `source_text`, `confidence`, and `metadata`. See [Company enrichment](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/company-enrichment-dto) data model.
11
10
  */
12
11
  export declare const EnrichmentType: {
13
12
  readonly Text: "text";
@@ -15,7 +14,6 @@ export declare const EnrichmentType: {
15
14
  readonly Date: "date";
16
15
  readonly Option: "option";
17
16
  readonly Url: "url";
18
- readonly Dict: "dict";
19
17
  readonly Company: "company";
20
18
  };
21
19
  export type EnrichmentType = (typeof EnrichmentType)[keyof typeof EnrichmentType];
@@ -7,8 +7,7 @@
7
7
  * - `date`: ISO format dates (YYYY-MM-DD)
8
8
  * - `option`: Enum-like fixed values (status, category)
9
9
  * - `url`: Web URLs
10
- * - `dict`: Complex structured objects
11
- * - `company`: Structured company data (name, alternative_names, website_candidates, people, address)
10
+ * - `company`: Structured company data. Returns `source_text`, `confidence`, and `metadata`. See [Company enrichment](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/company-enrichment-dto) data model.
12
11
  */
13
12
  export const EnrichmentType = {
14
13
  Text: "text",
@@ -16,6 +15,5 @@ export const EnrichmentType = {
16
15
  Date: "date",
17
16
  Option: "option",
18
17
  Url: "url",
19
- Dict: "dict",
20
18
  Company: "company",
21
19
  };
@@ -1,4 +1,4 @@
1
1
  export interface Error_ {
2
2
  /** Error message. */
3
- detail?: string;
3
+ detail?: string | undefined;
4
4
  }
@@ -1,20 +1,19 @@
1
1
  import type * as CatchAllApi from "../index.mjs";
2
- /**
3
- * Suggestions for validators, enrichments, and date ranges based on query analysis.
4
- *
5
- * Date ranges are validated against plan limits and adjusted if necessary.
6
- */
7
2
  export interface InitializeResponseDto {
8
- /** Suggested validators for filtering relevant articles. */
3
+ /** Echo of the query from the request. */
4
+ query: string;
5
+ /** Echo of the context from the request. Null if not provided. */
6
+ context?: (string | null) | undefined;
7
+ /** Suggested validators for filtering relevant web pages. */
9
8
  validators: CatchAllApi.ValidatorSchema[];
10
9
  /** Suggested enrichment fields for data extraction. */
11
10
  enrichments: CatchAllApi.EnrichmentSchema[];
12
- start_date: CatchAllApi.StartDate;
13
- end_date: CatchAllApi.EndDate;
11
+ start_date?: CatchAllApi.StartDate | undefined;
12
+ end_date?: CatchAllApi.EndDate | undefined;
14
13
  /**
15
14
  * Messages explaining date adjustments due to plan limits.
16
15
  *
17
16
  * Empty array if no modifications were needed. Contains human-readable messages when requested dates exceed plan's allowed lookback period.
18
17
  */
19
- date_modification_message?: string[];
18
+ date_modification_message?: string[] | undefined;
20
19
  }