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
@@ -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];
@@ -4,15 +4,15 @@
4
4
  *
5
5
  * - `submitted`: Job queued, waiting to start processing.
6
6
  * - `analyzing`: Extracting keywords, generating search queries, and creating validators/extractors.
7
- * - `fetching`: Retrieving articles from web sources.
8
- * - `clustering`: Grouping similar articles into distinct events.
7
+ * - `fetching`: Retrieving web pages.
8
+ * - `clustering`: Grouping similar web pages into clusters.
9
9
  * - `enriching`: Validating clusters and extracting structured data.
10
10
  * - `completed`: Job finished successfully, results ready.
11
11
  * - `failed`: Job processing failed.
12
12
  *
13
13
  * Poll `/catchAll/status/{job_id}` every 30-60 seconds until status is `completed` (typically 10-15 minutes).
14
14
  */
15
- export const JobStatus = {
15
+ export const PublicJobStatus = {
16
16
  Submitted: "submitted",
17
17
  Analyzing: "analyzing",
18
18
  Fetching: "fetching",
@@ -2,44 +2,53 @@ import type * as CatchAllApi from "../index.mjs";
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,2 +1,9 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var PullJobResponseDto;
3
+ (function (PullJobResponseDto) {
4
+ /** Processing mode used for this job. */
5
+ PullJobResponseDto.Mode = {
6
+ Lite: "lite",
7
+ Base: "base",
8
+ };
9
+ })(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.mjs";
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,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -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,2 +1,9 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export {};
2
+ export var UserJob;
3
+ (function (UserJob) {
4
+ /** Processing mode used for this job. */
5
+ UserJob.Mode = {
6
+ Lite: "lite",
7
+ Base: "base",
8
+ };
9
+ })(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.mjs";
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. */
@@ -6,21 +6,21 @@ import type * as CatchAllApi from "../index.mjs";
6
6
  */
7
7
  export interface WebhookPayload {
8
8
  /** Monitor identifier. */
9
- monitor_id?: string;
9
+ monitor_id?: string | undefined;
10
10
  /** Reference job used as template for this monitor. */
11
- reference_job_id?: string;
11
+ reference_job_id?: string | undefined;
12
12
  /** Job ID of the most recent execution. */
13
- latest_job_id?: string;
13
+ latest_job_id?: string | undefined;
14
14
  /** Number of new records from latest job (after deduplication). */
15
- records_count?: number;
15
+ records_count?: number | undefined;
16
16
  /** Total number of jobs executed by this monitor. */
17
- jobs_processed?: number;
17
+ jobs_processed?: number | undefined;
18
18
  /** The date when the webhook was triggered in ISO 8601 format with UTC timezone. */
19
- updated_at?: string;
19
+ updated_at?: string | undefined;
20
20
  /** Cron expression defining the monitor schedule. */
21
- cron_expression?: string;
21
+ cron_expression?: string | undefined;
22
22
  /** Timezone for schedule execution. */
23
- timezone?: string;
23
+ timezone?: string | undefined;
24
24
  /** Array of new records from the latest job execution (includes monitor-specific fields like added_on, updated_on). */
25
- records?: CatchAllApi.MonitorRecord[];
25
+ records?: CatchAllApi.MonitorRecord[] | undefined;
26
26
  }
@@ -1,4 +1,6 @@
1
+ export * from "./BaseRecord.mjs";
1
2
  export * from "./Citation.mjs";
3
+ export * from "./CompanyEnrichmentOutput.mjs";
2
4
  export * from "./Context.mjs";
3
5
  export * from "./ContinueResponseDto.mjs";
4
6
  export * from "./CreateMonitorResponseDto.mjs";
@@ -6,8 +8,8 @@ export * from "./EndDate.mjs";
6
8
  export * from "./EnrichmentSchema.mjs";
7
9
  export * from "./EnrichmentType.mjs";
8
10
  export * from "./Error_.mjs";
11
+ export * from "./GetPlanLimitsResponseDto.mjs";
9
12
  export * from "./InitializeResponseDto.mjs";
10
- export * from "./JobStatus.mjs";
11
13
  export * from "./JobStep.mjs";
12
14
  export * from "./Limit.mjs";
13
15
  export * from "./ListMonitorsResponseDto.mjs";
@@ -16,15 +18,16 @@ export * from "./MonitorCitation.mjs";
16
18
  export * from "./MonitorJobItem.mjs";
17
19
  export * from "./MonitorListItemDto.mjs";
18
20
  export * from "./MonitorRecord.mjs";
21
+ export * from "./PlanFeature.mjs";
22
+ export * from "./PublicJobStatus.mjs";
19
23
  export * from "./PullJobResponseDto.mjs";
20
24
  export * from "./PullMonitorResponseDto.mjs";
21
25
  export * from "./Query.mjs";
22
26
  export * from "./Record_.mjs";
23
27
  export * from "./ReferenceJob.mjs";
24
- export * from "./Schema.mjs";
25
28
  export * from "./StartDate.mjs";
26
29
  export * from "./StatusResponseDto.mjs";
27
- export * from "./SubmitResponseBody.mjs";
30
+ export * from "./SubmitResponseDto.mjs";
28
31
  export * from "./UpdateMonitorResponseDto.mjs";
29
32
  export * from "./UserJob.mjs";
30
33
  export * from "./ValidationErrorDetail.mjs";
@@ -1,4 +1,6 @@
1
+ export * from "./BaseRecord.mjs";
1
2
  export * from "./Citation.mjs";
3
+ export * from "./CompanyEnrichmentOutput.mjs";
2
4
  export * from "./Context.mjs";
3
5
  export * from "./ContinueResponseDto.mjs";
4
6
  export * from "./CreateMonitorResponseDto.mjs";
@@ -6,8 +8,8 @@ export * from "./EndDate.mjs";
6
8
  export * from "./EnrichmentSchema.mjs";
7
9
  export * from "./EnrichmentType.mjs";
8
10
  export * from "./Error_.mjs";
11
+ export * from "./GetPlanLimitsResponseDto.mjs";
9
12
  export * from "./InitializeResponseDto.mjs";
10
- export * from "./JobStatus.mjs";
11
13
  export * from "./JobStep.mjs";
12
14
  export * from "./Limit.mjs";
13
15
  export * from "./ListMonitorsResponseDto.mjs";
@@ -16,15 +18,16 @@ export * from "./MonitorCitation.mjs";
16
18
  export * from "./MonitorJobItem.mjs";
17
19
  export * from "./MonitorListItemDto.mjs";
18
20
  export * from "./MonitorRecord.mjs";
21
+ export * from "./PlanFeature.mjs";
22
+ export * from "./PublicJobStatus.mjs";
19
23
  export * from "./PullJobResponseDto.mjs";
20
24
  export * from "./PullMonitorResponseDto.mjs";
21
25
  export * from "./Query.mjs";
22
26
  export * from "./Record_.mjs";
23
27
  export * from "./ReferenceJob.mjs";
24
- export * from "./Schema.mjs";
25
28
  export * from "./StartDate.mjs";
26
29
  export * from "./StatusResponseDto.mjs";
27
- export * from "./SubmitResponseBody.mjs";
30
+ export * from "./SubmitResponseDto.mjs";
28
31
  export * from "./UpdateMonitorResponseDto.mjs";
29
32
  export * from "./UserJob.mjs";
30
33
  export * from "./ValidationErrorDetail.mjs";
@@ -14,6 +14,6 @@ export type BinaryResponse = {
14
14
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes)
15
15
  * Some versions of the Fetch API may not support this method.
16
16
  */
17
- bytes?(): ReturnType<Response["bytes"]>;
17
+ bytes?(): Promise<Uint8Array>;
18
18
  };
19
19
  export declare function getBinaryResponse(response: Response): BinaryResponse;
@@ -152,7 +152,13 @@ function getHeaders(args) {
152
152
  return __awaiter(this, void 0, void 0, function* () {
153
153
  var _a;
154
154
  const newHeaders = new Headers();
155
- newHeaders.set("Accept", args.responseType === "json" ? "application/json" : args.responseType === "text" ? "text/plain" : "*/*");
155
+ newHeaders.set("Accept", args.responseType === "json"
156
+ ? "application/json"
157
+ : args.responseType === "text"
158
+ ? "text/plain"
159
+ : args.responseType === "sse"
160
+ ? "text/event-stream"
161
+ : "*/*");
156
162
  if (args.body !== undefined && args.contentType != null) {
157
163
  newHeaders.set("Content-Type", args.contentType);
158
164
  }
@@ -196,7 +202,7 @@ export function fetcherImpl(args) {
196
202
  }
197
203
  try {
198
204
  const response = yield requestWithRetries(() => __awaiter(this, void 0, void 0, function* () {
199
- return makeRequest(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex);
205
+ return makeRequest(fetchFn, url, args.method, headers, requestBody, args.timeoutMs, args.abortSignal, args.withCredentials, args.duplex, args.responseType === "streaming" || args.responseType === "sse");
200
206
  }), args.maxRetries);
201
207
  if (response.status >= 200 && response.status < 400) {
202
208
  if (logger.isDebug()) {
@@ -6,6 +6,8 @@ export type { Fetcher, FetchFunction } from "./Fetcher.mjs";
6
6
  export { fetcher } from "./Fetcher.mjs";
7
7
  export { getHeader } from "./getHeader.mjs";
8
8
  export { HttpResponsePromise } from "./HttpResponsePromise.mjs";
9
+ export type { PassthroughRequest } from "./makePassthroughRequest.mjs";
10
+ export { makePassthroughRequest } from "./makePassthroughRequest.mjs";
9
11
  export type { RawResponse, WithRawResponse } from "./RawResponse.mjs";
10
12
  export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
11
13
  export { Supplier } from "./Supplier.mjs";
@@ -2,5 +2,6 @@ export { EndpointSupplier } from "./EndpointSupplier.mjs";
2
2
  export { fetcher } from "./Fetcher.mjs";
3
3
  export { getHeader } from "./getHeader.mjs";
4
4
  export { HttpResponsePromise } from "./HttpResponsePromise.mjs";
5
+ export { makePassthroughRequest } from "./makePassthroughRequest.mjs";
5
6
  export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.mjs";
6
7
  export { Supplier } from "./Supplier.mjs";
@@ -0,0 +1,49 @@
1
+ import { type LogConfig, type Logger } from "../logging/logger.mjs";
2
+ import { Supplier } from "./Supplier.mjs";
3
+ export declare namespace PassthroughRequest {
4
+ /**
5
+ * Per-request options that can override the SDK client defaults.
6
+ */
7
+ interface RequestOptions {
8
+ /** Override the default timeout for this request (in seconds). */
9
+ timeoutInSeconds?: number;
10
+ /** Override the default number of retries for this request. */
11
+ maxRetries?: number;
12
+ /** Additional headers to include in this request. */
13
+ headers?: Record<string, string>;
14
+ /** Abort signal for this request. */
15
+ abortSignal?: AbortSignal;
16
+ }
17
+ /**
18
+ * SDK client configuration used by the passthrough fetch method.
19
+ */
20
+ interface ClientOptions {
21
+ /** The base URL or environment for the client. */
22
+ environment?: Supplier<string>;
23
+ /** Override the base URL. */
24
+ baseUrl?: Supplier<string>;
25
+ /** Default headers to include in requests. */
26
+ headers?: Record<string, unknown>;
27
+ /** Default maximum time to wait for a response in seconds. */
28
+ timeoutInSeconds?: number;
29
+ /** Default number of times to retry the request. Defaults to 2. */
30
+ maxRetries?: number;
31
+ /** A custom fetch function. */
32
+ fetch?: typeof fetch;
33
+ /** Logging configuration. */
34
+ logging?: LogConfig | Logger;
35
+ /** A function that returns auth headers. */
36
+ getAuthHeaders?: () => Promise<Record<string, string>>;
37
+ }
38
+ }
39
+ /**
40
+ * Makes a passthrough HTTP request using the SDK's configuration (auth, retry, logging, etc.)
41
+ * while mimicking the standard `fetch` API.
42
+ *
43
+ * @param input - The URL, path, or Request object. If a relative path, it will be resolved against the configured base URL.
44
+ * @param init - Standard RequestInit options (method, headers, body, signal, etc.)
45
+ * @param clientOptions - SDK client options (auth, default headers, logging, etc.)
46
+ * @param requestOptions - Per-request overrides (timeout, retries, extra headers, abort signal).
47
+ * @returns A standard Response object.
48
+ */
49
+ export declare function makePassthroughRequest(input: Request | string | URL, init: RequestInit | undefined, clientOptions: PassthroughRequest.ClientOptions, requestOptions?: PassthroughRequest.RequestOptions): Promise<Response>;