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
@@ -2,23 +2,40 @@ import type * as CatchAllApi from "../../../../index.js";
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.js";
2
2
  export type { DisableMonitorRequest } from "./DisableMonitorRequest.js";
3
- export type { EnableMonitorRequest } from "./EnableMonitorRequest.js";
3
+ export type { EnableMonitorRequestDto } from "./EnableMonitorRequestDto.js";
4
4
  export type { ListMonitorJobsRequest } from "./ListMonitorJobsRequest.js";
5
+ export type { ListMonitorsRequest } from "./ListMonitorsRequest.js";
5
6
  export type { PullMonitorResultsRequest } from "./PullMonitorResultsRequest.js";
6
7
  export type { UpdateMonitorRequestDto } from "./UpdateMonitorRequestDto.js";
@@ -0,0 +1,2 @@
1
+ export { MonitorsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.MonitorsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "MonitorsClient", { enumerable: true, get: function () { return Client_js_1.MonitorsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -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,16 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.BaseRecord = void 0;
5
+ var BaseRecord;
6
+ (function (BaseRecord) {
7
+ let Enrichment;
8
+ (function (Enrichment) {
9
+ /** Overall confidence score for the enrichment extraction. */
10
+ Enrichment.EnrichmentConfidence = {
11
+ Low: "low",
12
+ Medium: "medium",
13
+ High: "high",
14
+ };
15
+ })(Enrichment = BaseRecord.Enrichment || (BaseRecord.Enrichment = {}));
16
+ })(BaseRecord || (exports.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,16 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CompanyEnrichmentOutput = void 0;
5
+ var CompanyEnrichmentOutput;
6
+ (function (CompanyEnrichmentOutput) {
7
+ let Metadata;
8
+ (function (Metadata) {
9
+ /** Confidence level for the domain URL resolution. */
10
+ Metadata.DomainUrlConfidence = {
11
+ Low: "low",
12
+ Medium: "medium",
13
+ High: "high",
14
+ };
15
+ })(Metadata = CompanyEnrichmentOutput.Metadata || (CompanyEnrichmentOutput.Metadata = {}));
16
+ })(CompanyEnrichmentOutput || (exports.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];
@@ -10,8 +10,7 @@ exports.EnrichmentType = void 0;
10
10
  * - `date`: ISO format dates (YYYY-MM-DD)
11
11
  * - `option`: Enum-like fixed values (status, category)
12
12
  * - `url`: Web URLs
13
- * - `dict`: Complex structured objects
14
- * - `company`: Structured company data (name, alternative_names, website_candidates, people, address)
13
+ * - `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.
15
14
  */
16
15
  exports.EnrichmentType = {
17
16
  Text: "text",
@@ -19,6 +18,5 @@ exports.EnrichmentType = {
19
18
  Date: "date",
20
19
  Option: "option",
21
20
  Url: "url",
22
- Dict: "dict",
23
21
  Company: "company",
24
22
  };
@@ -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.js";
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
  }
@@ -1,8 +1,8 @@
1
1
  import type * as CatchAllApi from "../index.js";
2
2
  export interface JobStep {
3
- status: CatchAllApi.JobStatus;
3
+ status: CatchAllApi.PublicJobStatus;
4
4
  /** Sequential position of this step in the pipeline (1-7). */
5
5
  order: number;
6
6
  /** Whether this step has finished processing. */
7
- completed?: boolean;
7
+ completed: boolean;
8
8
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Maximum number of records to return. If not specified, defaults to your plan limit.
3
3
  *
4
- * Use [`POST /catchAll/continue`](https://www.newscatcherapi.com/docs/v3/catch-all/endpoints/continue-job) to extend the limit after job completion without reprocessing.
4
+ * Use [`POST /catchAll/continue`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/continue-job) to extend the limit after job completion without reprocessing.
5
5
  */
6
6
  export type Limit = number;
@@ -1,7 +1,13 @@
1
1
  import type * as CatchAllApi from "../index.js";
2
2
  export interface ListMonitorsResponseDto {
3
3
  /** Total number of monitors for this user. */
4
- total_monitors: number;
4
+ total: number;
5
+ /** Current page number. */
6
+ page: number;
7
+ /** Number of monitors per page. */
8
+ page_size: number;
9
+ /** Total number of pages available. */
10
+ total_pages: number;
5
11
  /** Array of monitor summaries. */
6
12
  monitors: CatchAllApi.MonitorListItemDto[];
7
13
  }
@@ -1,16 +1,11 @@
1
+ import type * as CatchAllApi from "../index.js";
1
2
  /**
2
3
  * Citation with monitor-specific metadata. Used in monitor results and webhook payloads.
3
4
  * Extends base citation with tracking information for job_id and timestamps.
4
5
  */
5
- export interface MonitorCitation {
6
- /** Article identifier from News API */
6
+ export interface MonitorCitation extends CatchAllApi.Citation {
7
+ /** Unique identifier of the document in the search index. */
7
8
  id: string;
8
- /** Article title */
9
- title: string;
10
- /** URL to the source article */
11
- link: string;
12
- /** Article publication date in ISO 8601 format with UTC timezone. */
13
- published_date: string;
14
9
  /** Job ID that found this citation. */
15
10
  job_id: string;
16
11
  /** The date when the citation was added to the record in ISO 8601 format with UTC timezone. */
@@ -4,18 +4,18 @@ export interface MonitorListItemDto {
4
4
  monitor_id: string;
5
5
  /** Job identifier used as a reference for this monitor. */
6
6
  reference_job_id: string;
7
- /** Natural language query from the reference job. */
7
+ /** Plain text query from the reference job. */
8
8
  reference_job_query: string;
9
9
  /** Whether the monitor is currently active. */
10
10
  enabled: boolean;
11
11
  /** Cron expression for monitor schedule. */
12
- schedule?: string;
13
- /** Natural language description of the monitor schedule. */
14
- schedule_human_readable?: string;
12
+ schedule?: string | undefined;
13
+ /** The monitor schedule in a plain text format. */
14
+ schedule_human_readable?: string | undefined;
15
15
  /** Timezone for schedule execution. */
16
- timezone?: string;
16
+ timezone?: string | undefined;
17
17
  /** The date when the monitor was created. */
18
- created_at?: string;
18
+ created_at?: string | undefined;
19
19
  /** Webhook configuration for this monitor (if set). */
20
- webhook?: CatchAllApi.WebhookDto;
20
+ webhook?: CatchAllApi.WebhookDto | undefined;
21
21
  }
@@ -3,21 +3,11 @@ import type * as CatchAllApi from "../index.js";
3
3
  * Record with monitor-specific metadata. Used in monitor results and webhook payloads.
4
4
  * Includes timestamps tracking when records were added and updated, and citations include job tracking.
5
5
  */
6
- export interface MonitorRecord {
7
- /** Unique identifier for the record. */
8
- record_id: string;
9
- /** Short title summarizing the record. */
10
- record_title: string;
11
- /**
12
- * Structured data extracted from articles. Schema is dynamically generated per job. Field names are chosen semantically to match the content.
13
- *
14
- * See [Understanding dynamic schemas](https://www.newscatcherapi.com/docs/v3/catch-all/overview/dynamic-schemas) for integration guidance.
15
- */
16
- enrichment: Record<string, unknown>;
17
- /** Source articles with monitor-specific metadata (job_id, added_on timestamps). */
6
+ export interface MonitorRecord extends CatchAllApi.BaseRecord {
7
+ /** Source documents with monitor-specific metadata (job_id, added_on timestamps). */
18
8
  citations: CatchAllApi.MonitorCitation[];
19
9
  /** The date when this record was first added to monitor results in ISO 8601 format with UTC timezone. */
20
- added_on?: string;
10
+ added_on?: string | undefined;
21
11
  /** The date when this record was last updated in monitor results in ISO 8601 format with UTC timezone. */
22
- updated_on?: string;
12
+ updated_on?: string | undefined;
23
13
  }
@@ -3,15 +3,15 @@
3
3
  *
4
4
  * - `submitted`: Job queued, waiting to start processing.
5
5
  * - `analyzing`: Extracting keywords, generating search queries, and creating validators/extractors.
6
- * - `fetching`: Retrieving articles from web sources.
7
- * - `clustering`: Grouping similar articles into distinct events.
6
+ * - `fetching`: Retrieving web pages.
7
+ * - `clustering`: Grouping similar web pages into clusters.
8
8
  * - `enriching`: Validating clusters and extracting structured data.
9
9
  * - `completed`: Job finished successfully, results ready.
10
10
  * - `failed`: Job processing failed.
11
11
  *
12
12
  * Poll `/catchAll/status/{job_id}` every 30-60 seconds until status is `completed` (typically 10-15 minutes).
13
13
  */
14
- export declare const JobStatus: {
14
+ export declare const PublicJobStatus: {
15
15
  readonly Submitted: "submitted";
16
16
  readonly Analyzing: "analyzing";
17
17
  readonly Fetching: "fetching";
@@ -20,4 +20,4 @@ export declare const JobStatus: {
20
20
  readonly Completed: "completed";
21
21
  readonly Failed: "failed";
22
22
  };
23
- export type JobStatus = (typeof JobStatus)[keyof typeof JobStatus];
23
+ export type PublicJobStatus = (typeof PublicJobStatus)[keyof typeof PublicJobStatus];
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.JobStatus = void 0;
4
+ exports.PublicJobStatus = void 0;
5
5
  /**
6
6
  * Current job processing status. Jobs progress through these stages:
7
7
  *
8
8
  * - `submitted`: Job queued, waiting to start processing.
9
9
  * - `analyzing`: Extracting keywords, generating search queries, and creating validators/extractors.
10
- * - `fetching`: Retrieving articles from web sources.
11
- * - `clustering`: Grouping similar articles into distinct events.
10
+ * - `fetching`: Retrieving web pages.
11
+ * - `clustering`: Grouping similar web pages into clusters.
12
12
  * - `enriching`: Validating clusters and extracting structured data.
13
13
  * - `completed`: Job finished successfully, results ready.
14
14
  * - `failed`: Job processing failed.
15
15
  *
16
16
  * Poll `/catchAll/status/{job_id}` every 30-60 seconds until status is `completed` (typically 10-15 minutes).
17
17
  */
18
- exports.JobStatus = {
18
+ exports.PublicJobStatus = {
19
19
  Submitted: "submitted",
20
20
  Analyzing: "analyzing",
21
21
  Fetching: "fetching",
@@ -2,44 +2,49 @@ import type * as CatchAllApi from "../index.js";
2
2
  export interface PullJobResponseDto {
3
3
  /** Job identifier. */
4
4
  job_id: string;
5
- /** Original natural language query. */
6
- query?: string;
5
+ /** Original plain text query. */
6
+ query?: string | undefined;
7
7
  /** Context provided with the query. */
8
- context?: string;
8
+ context?: string | undefined;
9
9
  /** List of validation criteria applied to filter results. */
10
- validators?: string[];
10
+ validators?: string[] | undefined;
11
11
  /**
12
- * List of extracted field names generated by the enrichment process.
13
- * These field names appear in the `enrichment` object of each record.
12
+ * List of extracted field names generated by the enrichment process. These field names appear in the `enrichment` object of each record.
13
+ *
14
+ * **Note:** The `enrichment_confidence` field always appears in this list. The system adds it to every record regardless of the enrichments generated or defined.
14
15
  */
15
- enrichments?: string[];
16
+ enrichments?: string[] | undefined;
16
17
  /** Job status. */
17
- status: string;
18
+ status?: string | undefined;
19
+ /** Error message if the job failed. Null for successful jobs. */
20
+ error?: (string | null) | undefined;
21
+ /** Record limit for this job. Reflects the value specified at submit time, or the plan default if no limit was provided. */
22
+ limit?: number | undefined;
18
23
  /** Total time taken to process the job. */
19
- duration?: string;
20
- /** Number of distinct event clusters identified before validation. */
21
- candidate_records?: number;
24
+ duration?: string | undefined;
25
+ /** Total number of distinct event clusters identified. Compare with `progress_validated` to estimate how many candidates remain unprocessed for job continuation. */
26
+ candidate_records?: number | undefined;
22
27
  /** Number of validated records extracted. */
23
- valid_records?: number;
28
+ valid_records?: number | undefined;
24
29
  /**
25
30
  * Number of candidate clusters that have been validated during processing.
26
31
  *
27
- * The system process data in batches. This field tracks how many candidates have been checked against validation criteria so far.
32
+ * The system process data in batches. This field tracks how many `candidate_records` have been checked against validation criteria so far.
28
33
  */
29
- progress_validated?: number;
30
- date_range?: PullJobResponseDto.DateRange;
34
+ progress_validated?: (number | null) | undefined;
35
+ date_range?: PullJobResponseDto.DateRange | undefined;
31
36
  /** The current page number. */
32
- page?: number;
33
- /** The total number of pages available. */
34
- total_pages?: number;
37
+ page?: number | undefined;
35
38
  /** The number of records per page. */
36
- page_size?: number;
39
+ page_size?: number | undefined;
40
+ /** The total number of pages available. */
41
+ total_pages?: number | undefined;
37
42
  /** Array of extracted records with structured data and citations. */
38
- all_records?: CatchAllApi.Record_[];
43
+ all_records?: CatchAllApi.Record_[] | undefined;
39
44
  }
40
45
  export declare namespace PullJobResponseDto {
41
46
  interface DateRange {
42
- start_date?: string;
43
- end_date?: string;
47
+ start_date?: string | undefined;
48
+ end_date?: string | undefined;
44
49
  }
45
50
  }
@@ -3,24 +3,24 @@ export interface PullMonitorResponseDto {
3
3
  /** Unique identifier for the monitor. */
4
4
  monitor_id: string;
5
5
  /**
6
- * Parsed cron expression from the natural language schedule.
6
+ * The cron expression for a monitor schedule parsed from the text schedule you provide.
7
+ *
7
8
  * Standard cron format (minute hour day month day-of-week).
8
9
  */
9
- cron_expression?: string;
10
+ cron_expression?: string | undefined;
10
11
  /** Timezone used for schedule execution. */
11
- timezone?: string;
12
+ timezone?: string | undefined;
12
13
  reference_job: CatchAllApi.ReferenceJob;
13
14
  /** Execution time range for this monitor. */
14
- run_info?: PullMonitorResponseDto.RunInfo;
15
+ run_info?: PullMonitorResponseDto.RunInfo | undefined;
15
16
  /** Total number of records collected across all monitor jobs. */
16
- records?: number;
17
+ records?: number | undefined;
17
18
  /** Current monitor status or error message if monitor creation failed. */
18
19
  status: string;
19
- /**
20
- * Aggregated records from all jobs executed by this monitor.
21
- * Each record includes structured data extracted from web sources with citations.
22
- */
23
- all_records?: CatchAllApi.MonitorRecord[];
20
+ /** Aggregated records from all jobs executed by this monitor. Each record includes structured data extracted from web sources with citations. */
21
+ all_records?: CatchAllApi.MonitorRecord[] | undefined;
22
+ /** Record limit applied to this monitor's jobs. */
23
+ limit?: (number | null) | undefined;
24
24
  }
25
25
  export declare namespace PullMonitorResponseDto {
26
26
  /**
@@ -28,8 +28,8 @@ export declare namespace PullMonitorResponseDto {
28
28
  */
29
29
  interface RunInfo {
30
30
  /** Timestamp of the first job execution. */
31
- first_run?: string;
31
+ first_run?: string | undefined;
32
32
  /** Timestamp of the most recent job execution. */
33
- last_run?: string;
33
+ last_run?: string | undefined;
34
34
  }
35
35
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Natural language question describing what to find.
2
+ * Plain text question describing what to find.
3
3
  *
4
4
  * The system analyzes your input to generate search queries, validators, and extractors. More specific queries produce more focused results.
5
5
  */