newscatcher-catchall-sdk 1.0.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/README.md +41 -25
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +12 -0
  4. package/dist/cjs/Client.js +67 -0
  5. package/dist/cjs/api/resources/jobs/client/Client.d.ts +14 -17
  6. package/dist/cjs/api/resources/jobs/client/Client.js +13 -19
  7. package/dist/cjs/api/resources/jobs/client/requests/ContinueRequestDto.d.ts +3 -3
  8. package/dist/cjs/api/resources/jobs/client/requests/GetJobResultsRequest.d.ts +2 -2
  9. package/dist/cjs/api/resources/jobs/client/requests/GetJobStatusRequest.d.ts +2 -2
  10. package/dist/cjs/api/resources/jobs/client/requests/InitializeRequestDto.d.ts +2 -1
  11. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +26 -6
  12. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.js +14 -0
  13. package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +1 -1
  14. package/dist/cjs/api/resources/jobs/client/requests/index.js +3 -0
  15. package/dist/cjs/api/resources/jobs/exports.d.ts +2 -0
  16. package/dist/cjs/api/resources/jobs/exports.js +21 -0
  17. package/dist/cjs/api/resources/meta/client/Client.d.ts +15 -3
  18. package/dist/cjs/api/resources/meta/client/Client.js +49 -1
  19. package/dist/cjs/api/resources/meta/exports.d.ts +2 -0
  20. package/dist/cjs/api/resources/meta/exports.js +21 -0
  21. package/dist/cjs/api/resources/meta/types/GetVersionResponse.d.ts +1 -1
  22. package/dist/cjs/api/resources/meta/types/HealthCheckResponse.d.ts +1 -1
  23. package/dist/cjs/api/resources/monitors/client/Client.d.ts +23 -37
  24. package/dist/cjs/api/resources/monitors/client/Client.js +35 -41
  25. package/dist/cjs/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.ts +23 -6
  26. package/dist/cjs/api/resources/monitors/client/requests/EnableMonitorRequestDto.d.ts +17 -0
  27. package/dist/cjs/api/resources/monitors/client/requests/ListMonitorsRequest.d.ts +10 -0
  28. package/dist/cjs/api/resources/monitors/client/requests/UpdateMonitorRequestDto.d.ts +2 -0
  29. package/dist/cjs/api/resources/monitors/client/requests/index.d.ts +2 -1
  30. package/dist/cjs/api/resources/monitors/exports.d.ts +2 -0
  31. package/dist/cjs/api/resources/monitors/exports.js +21 -0
  32. package/dist/cjs/api/types/BaseRecord.d.ts +38 -0
  33. package/dist/cjs/api/types/BaseRecord.js +16 -0
  34. package/dist/cjs/api/types/Citation.d.ts +3 -3
  35. package/dist/cjs/api/types/CompanyEnrichmentOutput.d.ts +29 -0
  36. package/dist/cjs/api/types/CompanyEnrichmentOutput.js +16 -0
  37. package/dist/cjs/api/types/ContinueResponseDto.d.ts +2 -2
  38. package/dist/cjs/api/types/CreateMonitorResponseDto.d.ts +1 -1
  39. package/dist/cjs/api/types/EndDate.d.ts +4 -2
  40. package/dist/cjs/api/types/EnrichmentType.d.ts +1 -3
  41. package/dist/cjs/api/types/EnrichmentType.js +1 -3
  42. package/dist/cjs/api/types/Error_.d.ts +1 -1
  43. package/dist/cjs/api/types/GetPlanLimitsResponseDto.d.ts +5 -0
  44. package/dist/cjs/api/types/InitializeResponseDto.d.ts +8 -9
  45. package/dist/cjs/api/types/JobStep.d.ts +2 -2
  46. package/dist/cjs/api/types/Limit.d.ts +1 -1
  47. package/dist/cjs/api/types/ListMonitorsResponseDto.d.ts +7 -1
  48. package/dist/cjs/api/types/MonitorCitation.d.ts +3 -8
  49. package/dist/cjs/api/types/MonitorListItemDto.d.ts +10 -8
  50. package/dist/cjs/api/types/MonitorRecord.d.ts +4 -14
  51. package/dist/cjs/api/types/PlanFeature.d.ts +12 -0
  52. package/dist/cjs/api/types/PlanFeature.js +3 -0
  53. package/dist/{esm/api/types/JobStatus.d.mts → cjs/api/types/PublicJobStatus.d.ts} +4 -4
  54. package/dist/cjs/api/types/{JobStatus.js → PublicJobStatus.js} +4 -4
  55. package/dist/cjs/api/types/PullJobResponseDto.d.ts +34 -25
  56. package/dist/cjs/api/types/PullJobResponseDto.js +9 -0
  57. package/dist/cjs/api/types/PullMonitorResponseDto.d.ts +12 -12
  58. package/dist/cjs/api/types/Query.d.ts +1 -1
  59. package/dist/cjs/api/types/Record_.d.ts +2 -12
  60. package/dist/cjs/api/types/ReferenceJob.d.ts +3 -3
  61. package/dist/cjs/api/types/StartDate.d.ts +4 -2
  62. package/dist/cjs/api/types/StatusResponseDto.d.ts +2 -2
  63. package/dist/cjs/api/types/{SubmitResponseBody.d.ts → SubmitResponseDto.d.ts} +1 -1
  64. package/dist/cjs/api/types/SubmitResponseDto.js +3 -0
  65. package/dist/cjs/api/types/UserJob.d.ts +13 -1
  66. package/dist/cjs/api/types/UserJob.js +9 -0
  67. package/dist/cjs/api/types/ValidationErrorDetail.d.ts +3 -3
  68. package/dist/cjs/api/types/ValidationErrorResponse.d.ts +1 -1
  69. package/dist/cjs/api/types/ValidatorSchema.d.ts +3 -3
  70. package/dist/cjs/api/types/WebhookDto.d.ts +4 -4
  71. package/dist/cjs/api/types/WebhookPayload.d.ts +9 -9
  72. package/dist/cjs/api/types/index.d.ts +6 -3
  73. package/dist/cjs/api/types/index.js +6 -3
  74. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
  75. package/dist/cjs/core/fetcher/Fetcher.js +8 -2
  76. package/dist/cjs/core/fetcher/index.d.ts +2 -0
  77. package/dist/cjs/core/fetcher/index.js +3 -1
  78. package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
  79. package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
  80. package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
  81. package/dist/cjs/core/fetcher/makeRequest.js +30 -9
  82. package/dist/cjs/core/runtime/runtime.js +8 -7
  83. package/dist/cjs/version.d.ts +1 -1
  84. package/dist/cjs/version.js +1 -1
  85. package/dist/esm/BaseClient.mjs +2 -2
  86. package/dist/esm/Client.d.mts +12 -0
  87. package/dist/esm/Client.mjs +34 -0
  88. package/dist/esm/api/resources/jobs/client/Client.d.mts +14 -17
  89. package/dist/esm/api/resources/jobs/client/Client.mjs +13 -19
  90. package/dist/esm/api/resources/jobs/client/requests/ContinueRequestDto.d.mts +3 -3
  91. package/dist/esm/api/resources/jobs/client/requests/GetJobResultsRequest.d.mts +2 -2
  92. package/dist/esm/api/resources/jobs/client/requests/GetJobStatusRequest.d.mts +2 -2
  93. package/dist/esm/api/resources/jobs/client/requests/InitializeRequestDto.d.mts +2 -1
  94. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +26 -6
  95. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.mjs +13 -1
  96. package/dist/esm/api/resources/jobs/client/requests/index.d.mts +1 -1
  97. package/dist/esm/api/resources/jobs/client/requests/index.mjs +1 -1
  98. package/dist/esm/api/resources/jobs/exports.d.mts +2 -0
  99. package/dist/esm/api/resources/jobs/exports.mjs +3 -0
  100. package/dist/esm/api/resources/meta/client/Client.d.mts +15 -3
  101. package/dist/esm/api/resources/meta/client/Client.mjs +50 -2
  102. package/dist/esm/api/resources/meta/exports.d.mts +2 -0
  103. package/dist/esm/api/resources/meta/exports.mjs +3 -0
  104. package/dist/esm/api/resources/meta/types/GetVersionResponse.d.mts +1 -1
  105. package/dist/esm/api/resources/meta/types/HealthCheckResponse.d.mts +1 -1
  106. package/dist/esm/api/resources/monitors/client/Client.d.mts +23 -37
  107. package/dist/esm/api/resources/monitors/client/Client.mjs +35 -41
  108. package/dist/esm/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.mts +23 -6
  109. package/dist/esm/api/resources/monitors/client/requests/EnableMonitorRequestDto.d.mts +17 -0
  110. package/dist/esm/api/resources/monitors/client/requests/ListMonitorsRequest.d.mts +10 -0
  111. package/dist/esm/api/resources/monitors/client/requests/UpdateMonitorRequestDto.d.mts +2 -0
  112. package/dist/esm/api/resources/monitors/client/requests/index.d.mts +2 -1
  113. package/dist/esm/api/resources/monitors/exports.d.mts +2 -0
  114. package/dist/esm/api/resources/monitors/exports.mjs +3 -0
  115. package/dist/esm/api/types/BaseRecord.d.mts +38 -0
  116. package/dist/esm/api/types/BaseRecord.mjs +13 -0
  117. package/dist/esm/api/types/Citation.d.mts +3 -3
  118. package/dist/esm/api/types/CompanyEnrichmentOutput.d.mts +29 -0
  119. package/dist/esm/api/types/CompanyEnrichmentOutput.mjs +13 -0
  120. package/dist/esm/api/types/ContinueResponseDto.d.mts +2 -2
  121. package/dist/esm/api/types/CreateMonitorResponseDto.d.mts +1 -1
  122. package/dist/esm/api/types/EndDate.d.mts +4 -2
  123. package/dist/esm/api/types/EnrichmentType.d.mts +1 -3
  124. package/dist/esm/api/types/EnrichmentType.mjs +1 -3
  125. package/dist/esm/api/types/Error_.d.mts +1 -1
  126. package/dist/esm/api/types/GetPlanLimitsResponseDto.d.mts +5 -0
  127. package/dist/esm/api/types/InitializeResponseDto.d.mts +8 -9
  128. package/dist/esm/api/types/JobStep.d.mts +2 -2
  129. package/dist/esm/api/types/Limit.d.mts +1 -1
  130. package/dist/esm/api/types/ListMonitorsResponseDto.d.mts +7 -1
  131. package/dist/esm/api/types/MonitorCitation.d.mts +3 -8
  132. package/dist/esm/api/types/MonitorListItemDto.d.mts +10 -8
  133. package/dist/esm/api/types/MonitorRecord.d.mts +4 -14
  134. package/dist/esm/api/types/PlanFeature.d.mts +12 -0
  135. package/dist/esm/api/types/PlanFeature.mjs +2 -0
  136. package/dist/{cjs/api/types/JobStatus.d.ts → esm/api/types/PublicJobStatus.d.mts} +4 -4
  137. package/dist/esm/api/types/{JobStatus.mjs → PublicJobStatus.mjs} +3 -3
  138. package/dist/esm/api/types/PullJobResponseDto.d.mts +34 -25
  139. package/dist/esm/api/types/PullJobResponseDto.mjs +8 -1
  140. package/dist/esm/api/types/PullMonitorResponseDto.d.mts +12 -12
  141. package/dist/esm/api/types/Query.d.mts +1 -1
  142. package/dist/esm/api/types/Record_.d.mts +2 -12
  143. package/dist/esm/api/types/ReferenceJob.d.mts +3 -3
  144. package/dist/esm/api/types/StartDate.d.mts +4 -2
  145. package/dist/esm/api/types/StatusResponseDto.d.mts +2 -2
  146. package/dist/esm/api/types/{SubmitResponseBody.d.mts → SubmitResponseDto.d.mts} +1 -1
  147. package/dist/esm/api/types/SubmitResponseDto.mjs +2 -0
  148. package/dist/esm/api/types/UserJob.d.mts +13 -1
  149. package/dist/esm/api/types/UserJob.mjs +8 -1
  150. package/dist/esm/api/types/ValidationErrorDetail.d.mts +3 -3
  151. package/dist/esm/api/types/ValidationErrorResponse.d.mts +1 -1
  152. package/dist/esm/api/types/ValidatorSchema.d.mts +3 -3
  153. package/dist/esm/api/types/WebhookDto.d.mts +4 -4
  154. package/dist/esm/api/types/WebhookPayload.d.mts +9 -9
  155. package/dist/esm/api/types/index.d.mts +6 -3
  156. package/dist/esm/api/types/index.mjs +6 -3
  157. package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
  158. package/dist/esm/core/fetcher/Fetcher.mjs +8 -2
  159. package/dist/esm/core/fetcher/index.d.mts +2 -0
  160. package/dist/esm/core/fetcher/index.mjs +1 -0
  161. package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
  162. package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
  163. package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
  164. package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
  165. package/dist/esm/core/runtime/runtime.mjs +8 -7
  166. package/dist/esm/version.d.mts +1 -1
  167. package/dist/esm/version.mjs +1 -1
  168. package/package.json +37 -4
  169. package/reference.md +99 -53
  170. package/dist/cjs/api/resources/monitors/client/requests/EnableMonitorRequest.d.ts +0 -10
  171. package/dist/cjs/api/types/Schema.d.ts +0 -6
  172. package/dist/esm/api/resources/monitors/client/requests/EnableMonitorRequest.d.mts +0 -10
  173. package/dist/esm/api/types/Schema.d.mts +0 -6
  174. /package/dist/cjs/api/resources/monitors/client/requests/{EnableMonitorRequest.js → EnableMonitorRequestDto.js} +0 -0
  175. /package/dist/cjs/api/{types/Schema.js → resources/monitors/client/requests/ListMonitorsRequest.js} +0 -0
  176. /package/dist/cjs/api/types/{SubmitResponseBody.js → GetPlanLimitsResponseDto.js} +0 -0
  177. /package/dist/esm/api/resources/monitors/client/requests/{EnableMonitorRequest.mjs → EnableMonitorRequestDto.mjs} +0 -0
  178. /package/dist/esm/api/{types/Schema.mjs → resources/monitors/client/requests/ListMonitorsRequest.mjs} +0 -0
  179. /package/dist/esm/api/types/{SubmitResponseBody.mjs → GetPlanLimitsResponseDto.mjs} +0 -0
@@ -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
  }
@@ -0,0 +1,5 @@
1
+ import type * as CatchAllApi from "../index.js";
2
+ export interface GetPlanLimitsResponseDto {
3
+ /** Plan features with current usage. */
4
+ features: CatchAllApi.PlanFeature[];
5
+ }
@@ -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,20 @@ 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;
19
- /** Webhook configuration for this monitor (if set). */
20
- webhook?: CatchAllApi.WebhookDto;
18
+ created_at?: string | undefined;
19
+ /** Webhook configuration for this monitor, or null if not set. */
20
+ webhook?: (CatchAllApi.WebhookDto | null) | undefined;
21
+ /** Masked API key associated with this monitor. */
22
+ user_key?: string | undefined;
21
23
  }
@@ -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
  }
@@ -0,0 +1,12 @@
1
+ export interface PlanFeature {
2
+ /** Human-readable feature name. */
3
+ name: string;
4
+ /** Machine-readable feature identifier. */
5
+ code: string;
6
+ /** Data type of the feature value. */
7
+ value_type?: string | undefined;
8
+ /** Feature limit. Type depends on `value_type`. */
9
+ value?: unknown | undefined;
10
+ /** Current usage count for this feature. */
11
+ current_usage?: number | undefined;
12
+ }
@@ -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 });
@@ -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,53 @@ 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;
9
- /** List of validation criteria applied to filter results. */
10
- validators?: string[];
11
- /**
12
- * List of extracted field names generated by the enrichment process.
13
- * These field names appear in the `enrichment` object of each record.
14
- */
15
- enrichments?: string[];
8
+ context?: string | undefined;
9
+ /** Validators applied to filter results. */
10
+ validators?: Record<string, unknown>[] | undefined;
11
+ /** Enrichment fields used for data extraction. */
12
+ enrichments?: Record<string, unknown>[] | undefined;
16
13
  /** Job status. */
17
- status: string;
14
+ status?: string | undefined;
15
+ /** Error message if the job failed. Null for successful jobs. */
16
+ error?: (string | null) | undefined;
17
+ /** Record limit for this job. Reflects the value specified at submit time, or the plan default if no limit was provided. */
18
+ limit?: number | undefined;
18
19
  /** Total time taken to process the job. */
19
- duration?: string;
20
- /** Number of distinct event clusters identified before validation. */
21
- candidate_records?: number;
20
+ duration?: string | undefined;
21
+ /** Total number of distinct event clusters identified. Compare with `progress_validated` to estimate how many candidates remain unprocessed for job continuation. */
22
+ candidate_records?: number | undefined;
22
23
  /** Number of validated records extracted. */
23
- valid_records?: number;
24
+ valid_records?: number | undefined;
24
25
  /**
25
26
  * Number of candidate clusters that have been validated during processing.
26
27
  *
27
- * The system process data in batches. This field tracks how many candidates have been checked against validation criteria so far.
28
+ * The system process data in batches. This field tracks how many `candidate_records` have been checked against validation criteria so far.
28
29
  */
29
- progress_validated?: number;
30
- date_range?: PullJobResponseDto.DateRange;
30
+ progress_validated?: (number | null) | undefined;
31
+ date_range?: PullJobResponseDto.DateRange | undefined;
31
32
  /** The current page number. */
32
- page?: number;
33
- /** The total number of pages available. */
34
- total_pages?: number;
33
+ page?: number | undefined;
35
34
  /** The number of records per page. */
36
- page_size?: number;
35
+ page_size?: number | undefined;
36
+ /** The total number of pages available. */
37
+ total_pages?: number | undefined;
38
+ /** Processing mode used for this job. */
39
+ mode?: PullJobResponseDto.Mode | undefined;
37
40
  /** Array of extracted records with structured data and citations. */
38
- all_records?: CatchAllApi.Record_[];
41
+ all_records?: CatchAllApi.Record_[] | undefined;
39
42
  }
40
43
  export declare namespace PullJobResponseDto {
41
44
  interface DateRange {
42
- start_date?: string;
43
- end_date?: string;
45
+ start_date?: string | undefined;
46
+ end_date?: string | undefined;
44
47
  }
48
+ /** Processing mode used for this job. */
49
+ const Mode: {
50
+ readonly Lite: "lite";
51
+ readonly Base: "base";
52
+ };
53
+ type Mode = (typeof Mode)[keyof typeof Mode];
45
54
  }
@@ -1,3 +1,12 @@
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.PullJobResponseDto = void 0;
5
+ var PullJobResponseDto;
6
+ (function (PullJobResponseDto) {
7
+ /** Processing mode used for this job. */
8
+ PullJobResponseDto.Mode = {
9
+ Lite: "lite",
10
+ Base: "base",
11
+ };
12
+ })(PullJobResponseDto || (exports.PullJobResponseDto = PullJobResponseDto = {}));
@@ -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
  */
@@ -1,15 +1,5 @@
1
1
  import type * as CatchAllApi from "../index.js";
2
- export interface Record_ {
3
- /** Unique identifier for the record. */
4
- record_id: string;
5
- /** Short title summarizing the record. */
6
- record_title: string;
7
- /**
8
- * Structured data extracted from articles. Schema is dynamically generated per job. Field names are chosen semantically to match the content.
9
- *
10
- * See [Understanding dynamic schemas](https://www.newscatcherapi.com/docs/v3/catch-all/overview/dynamic-schemas) for integration guidance.
11
- */
12
- enrichment: Record<string, unknown>;
13
- /** Source articles that were used to extract this record. */
2
+ export interface Record_ extends CatchAllApi.BaseRecord {
3
+ /** Source documents that were used to extract this record. */
14
4
  citations: CatchAllApi.Citation[];
15
5
  }
@@ -1,6 +1,6 @@
1
1
  export interface ReferenceJob {
2
- /** Natural language query from the reference job. */
3
- query?: string;
2
+ /** Plain text query from the reference job. */
3
+ query?: string | undefined;
4
4
  /** Context provided with the reference job query. */
5
- context?: string;
5
+ context?: string | undefined;
6
6
  }
@@ -1,6 +1,8 @@
1
1
  /**
2
- * Start of date range for article search (ISO 8601 format with UTC timezone).
2
+ * Start date for web search (ISO 8601 format with UTC timezone).
3
3
  *
4
- * Must be within plan's allowed lookback period. Default is 5 days before current date if not specified.
4
+ * Defines the start 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. Default is 5 days before current date if not specified.
5
7
  */
6
8
  export type StartDate = string;
@@ -3,7 +3,7 @@ export interface StatusResponseDto {
3
3
  /** Job identifier. */
4
4
  job_id: string;
5
5
  /** Current job processing status. */
6
- status?: CatchAllApi.JobStatus;
6
+ status?: CatchAllApi.PublicJobStatus | undefined;
7
7
  /** Detailed progress tracking for each processing stage. Steps progress sequentially from order 1 (submitted) through 5 (enriching), ending at order 6 (completed) or 7 (failed). */
8
- steps: CatchAllApi.JobStep[];
8
+ steps?: CatchAllApi.JobStep[] | undefined;
9
9
  }
@@ -1,4 +1,4 @@
1
- export interface SubmitResponseBody {
1
+ export interface SubmitResponseDto {
2
2
  /** Unique identifier for the created job. Use this to check status and retrieve results. */
3
3
  job_id: string;
4
4
  }
@@ -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,10 +1,22 @@
1
1
  export interface UserJob {
2
2
  /** Job identifier. */
3
3
  job_id: string;
4
- /** Natural language query for this job. */
4
+ /** Plain text query for this job. */
5
5
  query: string;
6
6
  /** Job creation timestamp in ISO 8601 format. */
7
7
  created_at: string;
8
8
  /** Current processing status of the job. */
9
9
  status: string;
10
+ /** Processing mode used for this job. */
11
+ mode?: UserJob.Mode | undefined;
12
+ /** Masked API key that created this job. */
13
+ user_key?: string | undefined;
14
+ }
15
+ export declare namespace UserJob {
16
+ /** Processing mode used for this job. */
17
+ const Mode: {
18
+ readonly Lite: "lite";
19
+ readonly Base: "base";
20
+ };
21
+ type Mode = (typeof Mode)[keyof typeof Mode];
10
22
  }
@@ -1,3 +1,12 @@
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.UserJob = void 0;
5
+ var UserJob;
6
+ (function (UserJob) {
7
+ /** Processing mode used for this job. */
8
+ UserJob.Mode = {
9
+ Lite: "lite",
10
+ Base: "base",
11
+ };
12
+ })(UserJob || (exports.UserJob = UserJob = {}));
@@ -1,10 +1,10 @@
1
1
  export interface ValidationErrorDetail {
2
2
  /** Location of the validation error */
3
- loc?: ValidationErrorDetail.Loc.Item[];
3
+ loc?: ValidationErrorDetail.Loc.Item[] | undefined;
4
4
  /** Error message */
5
- msg?: string;
5
+ msg?: string | undefined;
6
6
  /** Error type */
7
- type?: string;
7
+ type?: string | undefined;
8
8
  }
9
9
  export declare namespace ValidationErrorDetail {
10
10
  type Loc = Loc.Item[];
@@ -1,4 +1,4 @@
1
1
  import type * as CatchAllApi from "../index.js";
2
2
  export interface ValidationErrorResponse {
3
- detail?: CatchAllApi.ValidationErrorDetail[];
3
+ detail?: CatchAllApi.ValidationErrorDetail[] | undefined;
4
4
  }
@@ -1,13 +1,13 @@
1
1
  /**
2
- * Schema for a single validator that filters article clusters.
2
+ * Schema for a single validator that filters clusters of web pages.
3
3
  *
4
4
  * Validators are applied during the enriching stage to determine which clusters are relevant.
5
5
  */
6
6
  export interface ValidatorSchema {
7
7
  /** Validator field name (snake_case recommended). */
8
8
  name: string;
9
- /** What this validator checks for in the article. */
9
+ /** What this validator checks for in the web page. */
10
10
  description: string;
11
11
  /** Validator type (currently only boolean supported). */
12
- type?: "boolean";
12
+ type?: "boolean" | undefined;
13
13
  }
@@ -2,13 +2,13 @@ export interface WebhookDto {
2
2
  /** Webhook endpoint URL. */
3
3
  url: string;
4
4
  /** HTTP method to use. */
5
- method?: WebhookDto.Method;
5
+ method?: WebhookDto.Method | undefined;
6
6
  /** HTTP headers to include in request. */
7
- headers?: Record<string, string>;
7
+ headers?: Record<string, string> | undefined;
8
8
  /** Query string parameters. */
9
- params?: Record<string, unknown>;
9
+ params?: Record<string, unknown> | undefined;
10
10
  /** Basic auth credentials [username, password]. */
11
- auth?: string[];
11
+ auth?: string[] | undefined;
12
12
  }
13
13
  export declare namespace WebhookDto {
14
14
  /** HTTP method to use. */