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.
- package/README.md +41 -25
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +12 -0
- package/dist/cjs/Client.js +67 -0
- package/dist/cjs/api/resources/jobs/client/Client.d.ts +14 -17
- package/dist/cjs/api/resources/jobs/client/Client.js +13 -19
- package/dist/cjs/api/resources/jobs/client/requests/ContinueRequestDto.d.ts +3 -3
- package/dist/cjs/api/resources/jobs/client/requests/GetJobResultsRequest.d.ts +2 -2
- package/dist/cjs/api/resources/jobs/client/requests/GetJobStatusRequest.d.ts +2 -2
- package/dist/cjs/api/resources/jobs/client/requests/InitializeRequestDto.d.ts +2 -1
- package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +26 -6
- package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.js +14 -0
- package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/jobs/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/jobs/exports.d.ts +2 -0
- package/dist/cjs/api/resources/jobs/exports.js +21 -0
- package/dist/cjs/api/resources/meta/client/Client.d.ts +15 -3
- package/dist/cjs/api/resources/meta/client/Client.js +49 -1
- package/dist/cjs/api/resources/meta/exports.d.ts +2 -0
- package/dist/cjs/api/resources/meta/exports.js +21 -0
- package/dist/cjs/api/resources/meta/types/GetVersionResponse.d.ts +1 -1
- package/dist/cjs/api/resources/meta/types/HealthCheckResponse.d.ts +1 -1
- package/dist/cjs/api/resources/monitors/client/Client.d.ts +23 -37
- package/dist/cjs/api/resources/monitors/client/Client.js +35 -41
- package/dist/cjs/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.ts +23 -6
- package/dist/cjs/api/resources/monitors/client/requests/EnableMonitorRequestDto.d.ts +17 -0
- package/dist/cjs/api/resources/monitors/client/requests/ListMonitorsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/monitors/client/requests/UpdateMonitorRequestDto.d.ts +2 -0
- package/dist/cjs/api/resources/monitors/client/requests/index.d.ts +2 -1
- package/dist/cjs/api/resources/monitors/exports.d.ts +2 -0
- package/dist/cjs/api/resources/monitors/exports.js +21 -0
- package/dist/cjs/api/types/BaseRecord.d.ts +38 -0
- package/dist/cjs/api/types/BaseRecord.js +16 -0
- package/dist/cjs/api/types/Citation.d.ts +3 -3
- package/dist/cjs/api/types/CompanyEnrichmentOutput.d.ts +29 -0
- package/dist/cjs/api/types/CompanyEnrichmentOutput.js +16 -0
- package/dist/cjs/api/types/ContinueResponseDto.d.ts +2 -2
- package/dist/cjs/api/types/CreateMonitorResponseDto.d.ts +1 -1
- package/dist/cjs/api/types/EndDate.d.ts +4 -2
- package/dist/cjs/api/types/EnrichmentType.d.ts +1 -3
- package/dist/cjs/api/types/EnrichmentType.js +1 -3
- package/dist/cjs/api/types/Error_.d.ts +1 -1
- package/dist/cjs/api/types/GetPlanLimitsResponseDto.d.ts +5 -0
- package/dist/cjs/api/types/InitializeResponseDto.d.ts +8 -9
- package/dist/cjs/api/types/JobStep.d.ts +2 -2
- package/dist/cjs/api/types/Limit.d.ts +1 -1
- package/dist/cjs/api/types/ListMonitorsResponseDto.d.ts +7 -1
- package/dist/cjs/api/types/MonitorCitation.d.ts +3 -8
- package/dist/cjs/api/types/MonitorListItemDto.d.ts +10 -8
- package/dist/cjs/api/types/MonitorRecord.d.ts +4 -14
- package/dist/cjs/api/types/PlanFeature.d.ts +12 -0
- package/dist/cjs/api/types/PlanFeature.js +3 -0
- package/dist/{esm/api/types/JobStatus.d.mts → cjs/api/types/PublicJobStatus.d.ts} +4 -4
- package/dist/cjs/api/types/{JobStatus.js → PublicJobStatus.js} +4 -4
- package/dist/cjs/api/types/PullJobResponseDto.d.ts +34 -25
- package/dist/cjs/api/types/PullJobResponseDto.js +9 -0
- package/dist/cjs/api/types/PullMonitorResponseDto.d.ts +12 -12
- package/dist/cjs/api/types/Query.d.ts +1 -1
- package/dist/cjs/api/types/Record_.d.ts +2 -12
- package/dist/cjs/api/types/ReferenceJob.d.ts +3 -3
- package/dist/cjs/api/types/StartDate.d.ts +4 -2
- package/dist/cjs/api/types/StatusResponseDto.d.ts +2 -2
- package/dist/cjs/api/types/{SubmitResponseBody.d.ts → SubmitResponseDto.d.ts} +1 -1
- package/dist/cjs/api/types/SubmitResponseDto.js +3 -0
- package/dist/cjs/api/types/UserJob.d.ts +13 -1
- package/dist/cjs/api/types/UserJob.js +9 -0
- package/dist/cjs/api/types/ValidationErrorDetail.d.ts +3 -3
- package/dist/cjs/api/types/ValidationErrorResponse.d.ts +1 -1
- package/dist/cjs/api/types/ValidatorSchema.d.ts +3 -3
- package/dist/cjs/api/types/WebhookDto.d.ts +4 -4
- package/dist/cjs/api/types/WebhookPayload.d.ts +9 -9
- package/dist/cjs/api/types/index.d.ts +6 -3
- package/dist/cjs/api/types/index.js +6 -3
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/Fetcher.js +8 -2
- package/dist/cjs/core/fetcher/index.d.ts +2 -0
- package/dist/cjs/core/fetcher/index.js +3 -1
- package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/cjs/core/fetcher/makeRequest.js +30 -9
- package/dist/cjs/core/runtime/runtime.js +8 -7
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +12 -0
- package/dist/esm/Client.mjs +34 -0
- package/dist/esm/api/resources/jobs/client/Client.d.mts +14 -17
- package/dist/esm/api/resources/jobs/client/Client.mjs +13 -19
- package/dist/esm/api/resources/jobs/client/requests/ContinueRequestDto.d.mts +3 -3
- package/dist/esm/api/resources/jobs/client/requests/GetJobResultsRequest.d.mts +2 -2
- package/dist/esm/api/resources/jobs/client/requests/GetJobStatusRequest.d.mts +2 -2
- package/dist/esm/api/resources/jobs/client/requests/InitializeRequestDto.d.mts +2 -1
- package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +26 -6
- package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.mjs +13 -1
- package/dist/esm/api/resources/jobs/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/jobs/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/jobs/exports.d.mts +2 -0
- package/dist/esm/api/resources/jobs/exports.mjs +3 -0
- package/dist/esm/api/resources/meta/client/Client.d.mts +15 -3
- package/dist/esm/api/resources/meta/client/Client.mjs +50 -2
- package/dist/esm/api/resources/meta/exports.d.mts +2 -0
- package/dist/esm/api/resources/meta/exports.mjs +3 -0
- package/dist/esm/api/resources/meta/types/GetVersionResponse.d.mts +1 -1
- package/dist/esm/api/resources/meta/types/HealthCheckResponse.d.mts +1 -1
- package/dist/esm/api/resources/monitors/client/Client.d.mts +23 -37
- package/dist/esm/api/resources/monitors/client/Client.mjs +35 -41
- package/dist/esm/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.mts +23 -6
- package/dist/esm/api/resources/monitors/client/requests/EnableMonitorRequestDto.d.mts +17 -0
- package/dist/esm/api/resources/monitors/client/requests/ListMonitorsRequest.d.mts +10 -0
- package/dist/esm/api/resources/monitors/client/requests/UpdateMonitorRequestDto.d.mts +2 -0
- package/dist/esm/api/resources/monitors/client/requests/index.d.mts +2 -1
- package/dist/esm/api/resources/monitors/exports.d.mts +2 -0
- package/dist/esm/api/resources/monitors/exports.mjs +3 -0
- package/dist/esm/api/types/BaseRecord.d.mts +38 -0
- package/dist/esm/api/types/BaseRecord.mjs +13 -0
- package/dist/esm/api/types/Citation.d.mts +3 -3
- package/dist/esm/api/types/CompanyEnrichmentOutput.d.mts +29 -0
- package/dist/esm/api/types/CompanyEnrichmentOutput.mjs +13 -0
- package/dist/esm/api/types/ContinueResponseDto.d.mts +2 -2
- package/dist/esm/api/types/CreateMonitorResponseDto.d.mts +1 -1
- package/dist/esm/api/types/EndDate.d.mts +4 -2
- package/dist/esm/api/types/EnrichmentType.d.mts +1 -3
- package/dist/esm/api/types/EnrichmentType.mjs +1 -3
- package/dist/esm/api/types/Error_.d.mts +1 -1
- package/dist/esm/api/types/GetPlanLimitsResponseDto.d.mts +5 -0
- package/dist/esm/api/types/InitializeResponseDto.d.mts +8 -9
- package/dist/esm/api/types/JobStep.d.mts +2 -2
- package/dist/esm/api/types/Limit.d.mts +1 -1
- package/dist/esm/api/types/ListMonitorsResponseDto.d.mts +7 -1
- package/dist/esm/api/types/MonitorCitation.d.mts +3 -8
- package/dist/esm/api/types/MonitorListItemDto.d.mts +10 -8
- package/dist/esm/api/types/MonitorRecord.d.mts +4 -14
- package/dist/esm/api/types/PlanFeature.d.mts +12 -0
- package/dist/esm/api/types/PlanFeature.mjs +2 -0
- package/dist/{cjs/api/types/JobStatus.d.ts → esm/api/types/PublicJobStatus.d.mts} +4 -4
- package/dist/esm/api/types/{JobStatus.mjs → PublicJobStatus.mjs} +3 -3
- package/dist/esm/api/types/PullJobResponseDto.d.mts +34 -25
- package/dist/esm/api/types/PullJobResponseDto.mjs +8 -1
- package/dist/esm/api/types/PullMonitorResponseDto.d.mts +12 -12
- package/dist/esm/api/types/Query.d.mts +1 -1
- package/dist/esm/api/types/Record_.d.mts +2 -12
- package/dist/esm/api/types/ReferenceJob.d.mts +3 -3
- package/dist/esm/api/types/StartDate.d.mts +4 -2
- package/dist/esm/api/types/StatusResponseDto.d.mts +2 -2
- package/dist/esm/api/types/{SubmitResponseBody.d.mts → SubmitResponseDto.d.mts} +1 -1
- package/dist/esm/api/types/SubmitResponseDto.mjs +2 -0
- package/dist/esm/api/types/UserJob.d.mts +13 -1
- package/dist/esm/api/types/UserJob.mjs +8 -1
- package/dist/esm/api/types/ValidationErrorDetail.d.mts +3 -3
- package/dist/esm/api/types/ValidationErrorResponse.d.mts +1 -1
- package/dist/esm/api/types/ValidatorSchema.d.mts +3 -3
- package/dist/esm/api/types/WebhookDto.d.mts +4 -4
- package/dist/esm/api/types/WebhookPayload.d.mts +9 -9
- package/dist/esm/api/types/index.d.mts +6 -3
- package/dist/esm/api/types/index.mjs +6 -3
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/Fetcher.mjs +8 -2
- package/dist/esm/core/fetcher/index.d.mts +2 -0
- package/dist/esm/core/fetcher/index.mjs +1 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
- package/dist/esm/core/runtime/runtime.mjs +8 -7
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +37 -4
- package/reference.md +99 -53
- package/dist/cjs/api/resources/monitors/client/requests/EnableMonitorRequest.d.ts +0 -10
- package/dist/cjs/api/types/Schema.d.ts +0 -6
- package/dist/esm/api/resources/monitors/client/requests/EnableMonitorRequest.d.mts +0 -10
- package/dist/esm/api/types/Schema.d.mts +0 -6
- /package/dist/cjs/api/resources/monitors/client/requests/{EnableMonitorRequest.js → EnableMonitorRequestDto.js} +0 -0
- /package/dist/cjs/api/{types/Schema.js → resources/monitors/client/requests/ListMonitorsRequest.js} +0 -0
- /package/dist/cjs/api/types/{SubmitResponseBody.js → GetPlanLimitsResponseDto.js} +0 -0
- /package/dist/esm/api/resources/monitors/client/requests/{EnableMonitorRequest.mjs → EnableMonitorRequestDto.mjs} +0 -0
- /package/dist/esm/api/{types/Schema.mjs → resources/monitors/client/requests/ListMonitorsRequest.mjs} +0 -0
- /package/dist/esm/api/types/{SubmitResponseBody.mjs → GetPlanLimitsResponseDto.mjs} +0 -0
|
@@ -23,9 +23,7 @@ export class JobsClient {
|
|
|
23
23
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* Get suggested validators, enrichments, and date ranges for a query
|
|
27
|
-
*
|
|
28
|
-
* Returns LLM-generated suggestions based on query analysis and validates against plan limits.
|
|
26
|
+
* Get suggested validators, enrichments, and date ranges for a query.
|
|
29
27
|
*
|
|
30
28
|
* @param {CatchAllApi.InitializeRequestDto} request
|
|
31
29
|
* @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -35,7 +33,8 @@ export class JobsClient {
|
|
|
35
33
|
*
|
|
36
34
|
* @example
|
|
37
35
|
* await client.jobs.initialize({
|
|
38
|
-
* query: "
|
|
36
|
+
* query: "Series B funding rounds for SaaS startups",
|
|
37
|
+
* context: "Focus on funding amount and company name"
|
|
39
38
|
* })
|
|
40
39
|
*/
|
|
41
40
|
initialize(request, requestOptions) {
|
|
@@ -81,10 +80,7 @@ export class JobsClient {
|
|
|
81
80
|
});
|
|
82
81
|
}
|
|
83
82
|
/**
|
|
84
|
-
* Submit a
|
|
85
|
-
*
|
|
86
|
-
* Optionally specify context, date ranges, limit, custom validators, and enrichments.
|
|
87
|
-
* If dates exceed plan limits, returns 400 error.
|
|
83
|
+
* Submit a query to create a new processing job.
|
|
88
84
|
*
|
|
89
85
|
* @param {CatchAllApi.SubmitRequestDto} request
|
|
90
86
|
* @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -95,11 +91,12 @@ export class JobsClient {
|
|
|
95
91
|
*
|
|
96
92
|
* @example
|
|
97
93
|
* await client.jobs.createJob({
|
|
98
|
-
* query: "
|
|
99
|
-
* context: "Focus on
|
|
94
|
+
* query: "Series B funding rounds for SaaS startups",
|
|
95
|
+
* context: "Focus on funding amount and company name",
|
|
100
96
|
* limit: 10,
|
|
101
|
-
* start_date: "2026-
|
|
102
|
-
* end_date: "2026-02-
|
|
97
|
+
* start_date: "2026-02-18T00:00:00Z",
|
|
98
|
+
* end_date: "2026-02-23T00:00:00Z",
|
|
99
|
+
* mode: "base"
|
|
103
100
|
* })
|
|
104
101
|
*/
|
|
105
102
|
createJob(request, requestOptions) {
|
|
@@ -158,7 +155,7 @@ export class JobsClient {
|
|
|
158
155
|
*
|
|
159
156
|
* @example
|
|
160
157
|
* await client.jobs.continueJob({
|
|
161
|
-
* job_id: "
|
|
158
|
+
* job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
|
|
162
159
|
* new_limit: 100
|
|
163
160
|
* })
|
|
164
161
|
*/
|
|
@@ -217,7 +214,7 @@ export class JobsClient {
|
|
|
217
214
|
*
|
|
218
215
|
* @example
|
|
219
216
|
* await client.jobs.getJobStatus({
|
|
220
|
-
* job_id: "
|
|
217
|
+
* job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
|
|
221
218
|
* })
|
|
222
219
|
*/
|
|
223
220
|
getJobStatus(request, requestOptions) {
|
|
@@ -296,10 +293,7 @@ export class JobsClient {
|
|
|
296
293
|
logging: this._options.logging,
|
|
297
294
|
});
|
|
298
295
|
if (_response.ok) {
|
|
299
|
-
return {
|
|
300
|
-
data: _response.body,
|
|
301
|
-
rawResponse: _response.rawResponse,
|
|
302
|
-
};
|
|
296
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
303
297
|
}
|
|
304
298
|
if (_response.error.reason === "status-code") {
|
|
305
299
|
switch (_response.error.statusCode) {
|
|
@@ -327,7 +321,7 @@ export class JobsClient {
|
|
|
327
321
|
*
|
|
328
322
|
* @example
|
|
329
323
|
* await client.jobs.getJobResults({
|
|
330
|
-
* job_id: "
|
|
324
|
+
* job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
|
|
331
325
|
* })
|
|
332
326
|
*/
|
|
333
327
|
getJobResults(request, requestOptions) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* job_id: "
|
|
4
|
+
* job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
|
|
5
5
|
* new_limit: 100
|
|
6
6
|
* }
|
|
7
7
|
*/
|
|
8
8
|
export interface ContinueRequestDto {
|
|
9
9
|
/** Job identifier of the completed job to continue. */
|
|
10
10
|
job_id: string;
|
|
11
|
-
/** New record limit for continued processing. Must be greater than the previous limit. */
|
|
12
|
-
new_limit
|
|
11
|
+
/** New record limit for continued processing. Must be greater than the previous limit. If not provided, defaults to the plan maximum. */
|
|
12
|
+
new_limit?: number;
|
|
13
13
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* job_id: "
|
|
4
|
+
* job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
|
|
5
5
|
* }
|
|
6
6
|
*/
|
|
7
7
|
export interface GetJobResultsRequest {
|
|
8
|
-
/** Unique job identifier returned from
|
|
8
|
+
/** Unique job identifier returned from [`POST /catchAll/submit`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/create-job). */
|
|
9
9
|
job_id: string;
|
|
10
10
|
/** Page number to retrieve. */
|
|
11
11
|
page?: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* job_id: "
|
|
4
|
+
* job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c"
|
|
5
5
|
* }
|
|
6
6
|
*/
|
|
7
7
|
export interface GetJobStatusRequest {
|
|
8
|
-
/** Unique job identifier returned from
|
|
8
|
+
/** Unique job identifier returned from [`POST /catchAll/submit`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/create-job). */
|
|
9
9
|
job_id: string;
|
|
10
10
|
}
|
|
@@ -2,7 +2,8 @@ import type * as CatchAllApi from "../../../../index.mjs";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
* query: "
|
|
5
|
+
* query: "Series B funding rounds for SaaS startups",
|
|
6
|
+
* context: "Focus on funding amount and company name"
|
|
6
7
|
* }
|
|
7
8
|
*/
|
|
8
9
|
export interface InitializeRequestDto {
|
|
@@ -2,22 +2,22 @@ import type * as CatchAllApi from "../../../../index.mjs";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
* query: "
|
|
6
|
-
* context: "Focus on
|
|
5
|
+
* query: "Series B funding rounds for SaaS startups",
|
|
6
|
+
* context: "Focus on funding amount and company name",
|
|
7
7
|
* limit: 10,
|
|
8
|
-
* start_date: "2026-
|
|
9
|
-
* end_date: "2026-02-
|
|
8
|
+
* start_date: "2026-02-18T00:00:00Z",
|
|
9
|
+
* end_date: "2026-02-23T00:00:00Z",
|
|
10
|
+
* mode: "base"
|
|
10
11
|
* }
|
|
11
12
|
*/
|
|
12
13
|
export interface SubmitRequestDto {
|
|
13
14
|
query: CatchAllApi.Query;
|
|
14
|
-
schema?: CatchAllApi.Schema;
|
|
15
15
|
context?: CatchAllApi.Context;
|
|
16
16
|
limit?: CatchAllApi.Limit;
|
|
17
17
|
start_date?: CatchAllApi.StartDate;
|
|
18
18
|
end_date?: CatchAllApi.EndDate;
|
|
19
19
|
/**
|
|
20
|
-
* Custom validators for filtering
|
|
20
|
+
* Custom validators for filtering web page clusters.
|
|
21
21
|
*
|
|
22
22
|
* If not provided, validators are generated automatically based on the query.
|
|
23
23
|
*/
|
|
@@ -28,4 +28,24 @@ export interface SubmitRequestDto {
|
|
|
28
28
|
* If not provided, enrichments are generated automatically based on the query.
|
|
29
29
|
*/
|
|
30
30
|
enrichments?: CatchAllApi.EnrichmentSchema[];
|
|
31
|
+
/**
|
|
32
|
+
* Job processing mode.
|
|
33
|
+
*
|
|
34
|
+
* - `base`: Full pipeline with validation and enrichment.
|
|
35
|
+
* - `lite`: Lightweight extraction with faster processing. Returns titles and citations only.
|
|
36
|
+
*/
|
|
37
|
+
mode?: SubmitRequestDto.Mode;
|
|
38
|
+
}
|
|
39
|
+
export declare namespace SubmitRequestDto {
|
|
40
|
+
/**
|
|
41
|
+
* Job processing mode.
|
|
42
|
+
*
|
|
43
|
+
* - `base`: Full pipeline with validation and enrichment.
|
|
44
|
+
* - `lite`: Lightweight extraction with faster processing. Returns titles and citations only.
|
|
45
|
+
*/
|
|
46
|
+
const Mode: {
|
|
47
|
+
readonly Lite: "lite";
|
|
48
|
+
readonly Base: "base";
|
|
49
|
+
};
|
|
50
|
+
type Mode = (typeof Mode)[keyof typeof Mode];
|
|
31
51
|
}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
2
|
+
export var SubmitRequestDto;
|
|
3
|
+
(function (SubmitRequestDto) {
|
|
4
|
+
/**
|
|
5
|
+
* Job processing mode.
|
|
6
|
+
*
|
|
7
|
+
* - `base`: Full pipeline with validation and enrichment.
|
|
8
|
+
* - `lite`: Lightweight extraction with faster processing. Returns titles and citations only.
|
|
9
|
+
*/
|
|
10
|
+
SubmitRequestDto.Mode = {
|
|
11
|
+
Lite: "lite",
|
|
12
|
+
Base: "base",
|
|
13
|
+
};
|
|
14
|
+
})(SubmitRequestDto || (SubmitRequestDto = {}));
|
|
@@ -3,4 +3,4 @@ export type { GetJobResultsRequest } from "./GetJobResultsRequest.mjs";
|
|
|
3
3
|
export type { GetJobStatusRequest } from "./GetJobStatusRequest.mjs";
|
|
4
4
|
export type { GetUserJobsRequest } from "./GetUserJobsRequest.mjs";
|
|
5
5
|
export type { InitializeRequestDto } from "./InitializeRequestDto.mjs";
|
|
6
|
-
export
|
|
6
|
+
export { SubmitRequestDto } from "./SubmitRequestDto.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export { SubmitRequestDto } from "./SubmitRequestDto.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
-
import { type
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../core/index.mjs";
|
|
4
|
-
import
|
|
4
|
+
import * as CatchAllApi from "../../../index.mjs";
|
|
5
5
|
export declare namespace MetaClient {
|
|
6
6
|
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -11,7 +11,7 @@ export declare namespace MetaClient {
|
|
|
11
11
|
* Operations to check API health and version.
|
|
12
12
|
*/
|
|
13
13
|
export declare class MetaClient {
|
|
14
|
-
protected readonly _options:
|
|
14
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<MetaClient.Options>;
|
|
15
15
|
constructor(options?: MetaClient.Options);
|
|
16
16
|
/**
|
|
17
17
|
* Check API availability.
|
|
@@ -33,4 +33,16 @@ export declare class MetaClient {
|
|
|
33
33
|
*/
|
|
34
34
|
getVersion(requestOptions?: MetaClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.GetVersionResponse>;
|
|
35
35
|
private __getVersion;
|
|
36
|
+
/**
|
|
37
|
+
* Returns plan features and current usage for the authenticated organization.
|
|
38
|
+
*
|
|
39
|
+
* @param {MetaClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
|
+
*
|
|
41
|
+
* @throws {@link CatchAllApi.ForbiddenError}
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.meta.getPlanLimits()
|
|
45
|
+
*/
|
|
46
|
+
getPlanLimits(requestOptions?: MetaClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.GetPlanLimitsResponseDto>;
|
|
47
|
+
private __getPlanLimits;
|
|
36
48
|
}
|
|
@@ -8,18 +8,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import {
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
12
|
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
17
|
+
import * as CatchAllApi from "../../../index.mjs";
|
|
17
18
|
/**
|
|
18
19
|
* Operations to check API health and version.
|
|
19
20
|
*/
|
|
20
21
|
export class MetaClient {
|
|
21
22
|
constructor(options = {}) {
|
|
22
|
-
this._options =
|
|
23
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
26
|
* Check API availability.
|
|
@@ -99,4 +100,51 @@ export class MetaClient {
|
|
|
99
100
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/version");
|
|
100
101
|
});
|
|
101
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Returns plan features and current usage for the authenticated organization.
|
|
105
|
+
*
|
|
106
|
+
* @param {MetaClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link CatchAllApi.ForbiddenError}
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* await client.meta.getPlanLimits()
|
|
112
|
+
*/
|
|
113
|
+
getPlanLimits(requestOptions) {
|
|
114
|
+
return core.HttpResponsePromise.fromPromise(this.__getPlanLimits(requestOptions));
|
|
115
|
+
}
|
|
116
|
+
__getPlanLimits(requestOptions) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
119
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
120
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
121
|
+
const _response = yield core.fetcher({
|
|
122
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CatchAllApiEnvironment.Default, "catchAll/user/limits"),
|
|
123
|
+
method: "POST",
|
|
124
|
+
headers: _headers,
|
|
125
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
126
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
127
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
128
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
129
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
130
|
+
logging: this._options.logging,
|
|
131
|
+
});
|
|
132
|
+
if (_response.ok) {
|
|
133
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
134
|
+
}
|
|
135
|
+
if (_response.error.reason === "status-code") {
|
|
136
|
+
switch (_response.error.statusCode) {
|
|
137
|
+
case 403:
|
|
138
|
+
throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
139
|
+
default:
|
|
140
|
+
throw new errors.CatchAllApiError({
|
|
141
|
+
statusCode: _response.error.statusCode,
|
|
142
|
+
body: _response.error.body,
|
|
143
|
+
rawResponse: _response.rawResponse,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/catchAll/user/limits");
|
|
148
|
+
});
|
|
149
|
+
}
|
|
102
150
|
}
|
|
@@ -14,20 +14,7 @@ export declare class MonitorsClient {
|
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<MonitorsClient.Options>;
|
|
15
15
|
constructor(options?: MonitorsClient.Options);
|
|
16
16
|
/**
|
|
17
|
-
* Create a monitor
|
|
18
|
-
*
|
|
19
|
-
* **Reference job requirements:**
|
|
20
|
-
* - Job's `end_date` must be within the last 7 days
|
|
21
|
-
*
|
|
22
|
-
* **Schedule requirements:**
|
|
23
|
-
* - Minimum 24-hour interval between executions
|
|
24
|
-
* - Natural language format (e.g., "every day at 12 PM UTC", "every 48 hours")
|
|
25
|
-
*
|
|
26
|
-
* **Validation:**
|
|
27
|
-
* - Reference jobs older than 7 days return 400 Bad Request.
|
|
28
|
-
* - Schedules below minimum frequency return error with descriptive message.
|
|
29
|
-
* - Invalid job IDs return 400 Bad Request.
|
|
30
|
-
* - Duplicate monitors (same job already monitored) return error.
|
|
17
|
+
* Create a scheduled monitor based on a reference job.
|
|
31
18
|
*
|
|
32
19
|
* @param {CatchAllApi.CreateMonitorRequestDto} request
|
|
33
20
|
* @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -36,22 +23,23 @@ export declare class MonitorsClient {
|
|
|
36
23
|
*
|
|
37
24
|
* @example
|
|
38
25
|
* await client.monitors.createMonitor({
|
|
39
|
-
* reference_job_id: "
|
|
40
|
-
* schedule: "every day at 12 PM UTC"
|
|
26
|
+
* reference_job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
|
|
27
|
+
* schedule: "every day at 12 PM UTC",
|
|
28
|
+
* webhook: {
|
|
29
|
+
* url: "https://your-endpoint.com/webhook",
|
|
30
|
+
* method: "POST",
|
|
31
|
+
* headers: {
|
|
32
|
+
* "Authorization": "Bearer your_token_here"
|
|
33
|
+
* }
|
|
34
|
+
* },
|
|
35
|
+
* limit: 10,
|
|
36
|
+
* backfill: true
|
|
41
37
|
* })
|
|
42
38
|
*/
|
|
43
39
|
createMonitor(request: CatchAllApi.CreateMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.CreateMonitorResponseDto>;
|
|
44
40
|
private __createMonitor;
|
|
45
41
|
/**
|
|
46
|
-
* Update webhook configuration for an existing monitor
|
|
47
|
-
*
|
|
48
|
-
* **Supported updates:**
|
|
49
|
-
* - Webhook URL
|
|
50
|
-
* - HTTP method (POST/PUT)
|
|
51
|
-
* - Headers and authentication
|
|
52
|
-
* - Query parameters
|
|
53
|
-
*
|
|
54
|
-
* **Note:** Schedule and reference job cannot be modified. To change these, create a new monitor.
|
|
42
|
+
* Update the webhook configuration for an existing monitor.
|
|
55
43
|
*
|
|
56
44
|
* @param {CatchAllApi.UpdateMonitorRequestDto} request
|
|
57
45
|
* @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -75,8 +63,7 @@ export declare class MonitorsClient {
|
|
|
75
63
|
updateMonitor(request: CatchAllApi.UpdateMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.UpdateMonitorResponseDto>;
|
|
76
64
|
private __updateMonitor;
|
|
77
65
|
/**
|
|
78
|
-
*
|
|
79
|
-
* Each job includes job_id, start_date, and end_date.
|
|
66
|
+
* Return all jobs executed by a monitor.
|
|
80
67
|
*
|
|
81
68
|
* @param {CatchAllApi.ListMonitorJobsRequest} request
|
|
82
69
|
* @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -92,8 +79,7 @@ export declare class MonitorsClient {
|
|
|
92
79
|
listMonitorJobs(request: CatchAllApi.ListMonitorJobsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorJobsResponse>;
|
|
93
80
|
private __listMonitorJobs;
|
|
94
81
|
/**
|
|
95
|
-
* Retrieve aggregated results from all jobs executed by
|
|
96
|
-
* Includes monitor configuration, execution history, and all records collected.
|
|
82
|
+
* Retrieve aggregated results from all jobs executed by a monitor.
|
|
97
83
|
*
|
|
98
84
|
* @param {CatchAllApi.PullMonitorResultsRequest} request
|
|
99
85
|
* @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -109,8 +95,7 @@ export declare class MonitorsClient {
|
|
|
109
95
|
pullMonitorResults(request: CatchAllApi.PullMonitorResultsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.PullMonitorResponseDto>;
|
|
110
96
|
private __pullMonitorResults;
|
|
111
97
|
/**
|
|
112
|
-
*
|
|
113
|
-
* Validates that the provided API key is associated with the monitor.
|
|
98
|
+
* Stop scheduled job execution for a monitor.
|
|
114
99
|
*
|
|
115
100
|
* @param {CatchAllApi.DisableMonitorRequest} request
|
|
116
101
|
* @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -127,10 +112,9 @@ export declare class MonitorsClient {
|
|
|
127
112
|
disableMonitor(request: CatchAllApi.DisableMonitorRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.DisableMonitorResponse>;
|
|
128
113
|
private __disableMonitor;
|
|
129
114
|
/**
|
|
130
|
-
*
|
|
131
|
-
* Validates that the provided API key is associated with the monitor.
|
|
115
|
+
* Resume scheduled job execution for a monitor.
|
|
132
116
|
*
|
|
133
|
-
* @param {CatchAllApi.
|
|
117
|
+
* @param {CatchAllApi.EnableMonitorRequestDto} request
|
|
134
118
|
* @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
135
119
|
*
|
|
136
120
|
* @throws {@link CatchAllApi.ForbiddenError}
|
|
@@ -139,14 +123,16 @@ export declare class MonitorsClient {
|
|
|
139
123
|
*
|
|
140
124
|
* @example
|
|
141
125
|
* await client.monitors.enableMonitor({
|
|
142
|
-
* monitor_id: "monitor_id"
|
|
126
|
+
* monitor_id: "monitor_id",
|
|
127
|
+
* backfill: true
|
|
143
128
|
* })
|
|
144
129
|
*/
|
|
145
|
-
enableMonitor(request: CatchAllApi.
|
|
130
|
+
enableMonitor(request: CatchAllApi.EnableMonitorRequestDto, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.EnableMonitorResponse>;
|
|
146
131
|
private __enableMonitor;
|
|
147
132
|
/**
|
|
148
133
|
* Returns all monitors created by the authenticated user.
|
|
149
134
|
*
|
|
135
|
+
* @param {CatchAllApi.ListMonitorsRequest} request
|
|
150
136
|
* @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
151
137
|
*
|
|
152
138
|
* @throws {@link CatchAllApi.ForbiddenError}
|
|
@@ -155,6 +141,6 @@ export declare class MonitorsClient {
|
|
|
155
141
|
* @example
|
|
156
142
|
* await client.monitors.listMonitors()
|
|
157
143
|
*/
|
|
158
|
-
listMonitors(requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorsResponseDto>;
|
|
144
|
+
listMonitors(request?: CatchAllApi.ListMonitorsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ListMonitorsResponseDto>;
|
|
159
145
|
private __listMonitors;
|
|
160
146
|
}
|