newscatcher-catchall-sdk 1.4.0 → 1.5.0
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 +1 -0
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +6 -0
- package/dist/cjs/api/errors/UnauthorizedError.js +54 -0
- package/dist/cjs/api/errors/index.d.ts +1 -0
- package/dist/cjs/api/errors/index.js +1 -0
- package/dist/cjs/api/resources/datasets/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/datasets/client/Client.js +13 -2
- package/dist/cjs/api/resources/datasets/client/requests/ListDatasetsRequest.d.ts +2 -0
- package/dist/cjs/api/resources/entities/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/entities/client/Client.js +6 -1
- package/dist/cjs/api/resources/jobs/client/Client.d.ts +22 -0
- package/dist/cjs/api/resources/jobs/client/Client.js +73 -1
- package/dist/cjs/api/resources/jobs/client/requests/DeleteJobRequest.d.ts +10 -0
- package/dist/cjs/api/resources/jobs/client/requests/DeleteJobRequest.js +3 -0
- package/dist/cjs/api/resources/jobs/client/requests/GetUserJobsRequest.d.ts +5 -0
- package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +1 -1
- package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/monitors/client/Client.d.ts +39 -0
- package/dist/cjs/api/resources/monitors/client/Client.js +138 -8
- package/dist/cjs/api/resources/monitors/client/requests/DeleteMonitorRequest.d.ts +10 -0
- package/dist/cjs/api/resources/monitors/client/requests/DeleteMonitorRequest.js +3 -0
- package/dist/cjs/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.d.ts +10 -0
- package/dist/cjs/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.js +3 -0
- package/dist/cjs/api/resources/monitors/client/requests/ListMonitorsRequest.d.ts +5 -0
- package/dist/cjs/api/resources/monitors/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/types/ConnectedEntity.d.ts +1 -1
- package/dist/cjs/api/types/DeleteJobResponseDto.d.ts +8 -0
- package/dist/cjs/api/types/DeleteJobResponseDto.js +3 -0
- package/dist/cjs/api/types/DeleteMonitorResponseDto.d.ts +8 -0
- package/dist/cjs/api/types/DeleteMonitorResponseDto.js +3 -0
- package/dist/cjs/api/types/MonitorListItemDto.d.ts +2 -0
- package/dist/cjs/api/types/MonitorStatusEntry.d.ts +68 -0
- package/dist/cjs/api/types/MonitorStatusEntry.js +27 -0
- package/dist/cjs/api/types/MonitorStatusHistoryResponseDto.d.ts +13 -0
- package/dist/cjs/api/types/MonitorStatusHistoryResponseDto.js +3 -0
- package/dist/cjs/api/types/OwnershipFilter.d.ts +14 -0
- package/dist/cjs/api/types/OwnershipFilter.js +17 -0
- package/dist/cjs/api/types/PullJobResponseDto.d.ts +2 -0
- package/dist/cjs/api/types/SharingInfo.d.ts +24 -0
- package/dist/cjs/api/types/SharingInfo.js +13 -0
- package/dist/cjs/api/types/UserJob.d.ts +3 -0
- package/dist/cjs/api/types/index.d.ts +6 -0
- package/dist/cjs/api/types/index.js +6 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -0
- package/dist/cjs/core/fetcher/Fetcher.js +7 -1
- package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
- package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
- package/dist/cjs/core/url/index.d.ts +1 -0
- package/dist/cjs/core/url/index.js +3 -1
- package/dist/cjs/core/url/qs.d.ts +2 -1
- package/dist/cjs/core/url/qs.js +24 -12
- 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/api/errors/UnauthorizedError.d.mts +6 -0
- package/dist/esm/api/errors/UnauthorizedError.mjs +17 -0
- package/dist/esm/api/errors/index.d.mts +1 -0
- package/dist/esm/api/errors/index.mjs +1 -0
- package/dist/esm/api/resources/datasets/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/datasets/client/Client.mjs +13 -2
- package/dist/esm/api/resources/datasets/client/requests/ListDatasetsRequest.d.mts +2 -0
- package/dist/esm/api/resources/entities/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/entities/client/Client.mjs +6 -1
- package/dist/esm/api/resources/jobs/client/Client.d.mts +22 -0
- package/dist/esm/api/resources/jobs/client/Client.mjs +73 -1
- package/dist/esm/api/resources/jobs/client/requests/DeleteJobRequest.d.mts +10 -0
- package/dist/esm/api/resources/jobs/client/requests/DeleteJobRequest.mjs +2 -0
- package/dist/esm/api/resources/jobs/client/requests/GetUserJobsRequest.d.mts +5 -0
- package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +1 -1
- package/dist/esm/api/resources/jobs/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/monitors/client/Client.d.mts +39 -0
- package/dist/esm/api/resources/monitors/client/Client.mjs +138 -8
- package/dist/esm/api/resources/monitors/client/requests/DeleteMonitorRequest.d.mts +10 -0
- package/dist/esm/api/resources/monitors/client/requests/DeleteMonitorRequest.mjs +2 -0
- package/dist/esm/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.d.mts +10 -0
- package/dist/esm/api/resources/monitors/client/requests/GetMonitorStatusHistoryRequest.mjs +2 -0
- package/dist/esm/api/resources/monitors/client/requests/ListMonitorsRequest.d.mts +5 -0
- package/dist/esm/api/resources/monitors/client/requests/index.d.mts +2 -0
- package/dist/esm/api/types/ConnectedEntity.d.mts +1 -1
- package/dist/esm/api/types/DeleteJobResponseDto.d.mts +8 -0
- package/dist/esm/api/types/DeleteJobResponseDto.mjs +2 -0
- package/dist/esm/api/types/DeleteMonitorResponseDto.d.mts +8 -0
- package/dist/esm/api/types/DeleteMonitorResponseDto.mjs +2 -0
- package/dist/esm/api/types/MonitorListItemDto.d.mts +2 -0
- package/dist/esm/api/types/MonitorStatusEntry.d.mts +68 -0
- package/dist/esm/api/types/MonitorStatusEntry.mjs +24 -0
- package/dist/esm/api/types/MonitorStatusHistoryResponseDto.d.mts +13 -0
- package/dist/esm/api/types/MonitorStatusHistoryResponseDto.mjs +2 -0
- package/dist/esm/api/types/OwnershipFilter.d.mts +14 -0
- package/dist/esm/api/types/OwnershipFilter.mjs +14 -0
- package/dist/esm/api/types/PullJobResponseDto.d.mts +2 -0
- package/dist/esm/api/types/SharingInfo.d.mts +24 -0
- package/dist/esm/api/types/SharingInfo.mjs +10 -0
- package/dist/esm/api/types/UserJob.d.mts +3 -0
- package/dist/esm/api/types/index.d.mts +6 -0
- package/dist/esm/api/types/index.mjs +6 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +1 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +7 -1
- package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
- package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
- package/dist/esm/core/url/index.d.mts +1 -0
- package/dist/esm/core/url/index.mjs +1 -0
- package/dist/esm/core/url/qs.d.mts +2 -1
- package/dist/esm/core/url/qs.mjs +24 -12
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +208 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as CatchAllApi from "../../../../index.js";
|
|
1
2
|
/**
|
|
2
3
|
* @example
|
|
3
4
|
* {}
|
|
@@ -7,4 +8,8 @@ export interface ListMonitorsRequest {
|
|
|
7
8
|
page?: number;
|
|
8
9
|
/** Number of records per page. */
|
|
9
10
|
page_size?: number;
|
|
11
|
+
/** Filter results by text (case-insensitive substring match). */
|
|
12
|
+
search?: string;
|
|
13
|
+
/** Filter results by ownership. Defaults to `all`. */
|
|
14
|
+
ownership?: CatchAllApi.OwnershipFilter;
|
|
10
15
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type { CreateMonitorRequestDto } from "./CreateMonitorRequestDto.js";
|
|
2
|
+
export type { DeleteMonitorRequest } from "./DeleteMonitorRequest.js";
|
|
2
3
|
export type { DisableMonitorRequest } from "./DisableMonitorRequest.js";
|
|
3
4
|
export type { EnableMonitorRequestDto } from "./EnableMonitorRequestDto.js";
|
|
5
|
+
export type { GetMonitorStatusHistoryRequest } from "./GetMonitorStatusHistoryRequest.js";
|
|
4
6
|
export type { ListMonitorJobsRequest } from "./ListMonitorJobsRequest.js";
|
|
5
7
|
export type { ListMonitorsRequest } from "./ListMonitorsRequest.js";
|
|
6
8
|
export type { PullMonitorResultsRequest } from "./PullMonitorResultsRequest.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface DeleteMonitorResponseDto {
|
|
2
|
+
/** Whether the delete operation succeeded. */
|
|
3
|
+
success: boolean;
|
|
4
|
+
/** Human-readable result message. */
|
|
5
|
+
message: string | null;
|
|
6
|
+
/** ID of the deleted monitor. `null` on failure. */
|
|
7
|
+
monitor_id: string | null;
|
|
8
|
+
}
|
|
@@ -20,4 +20,6 @@ export interface MonitorListItemDto {
|
|
|
20
20
|
webhook?: (CatchAllApi.WebhookDto | null) | undefined;
|
|
21
21
|
/** Masked API key associated with this monitor. */
|
|
22
22
|
user_key?: string | undefined;
|
|
23
|
+
/** Present when this monitor was shared with the authenticated user. Omitted when the user owns the monitor. */
|
|
24
|
+
sharing_info?: CatchAllApi.SharingInfo | undefined;
|
|
23
25
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export interface MonitorStatusEntry {
|
|
2
|
+
/**
|
|
3
|
+
* Type of lifecycle event.
|
|
4
|
+
*
|
|
5
|
+
* - `created`: Monitor was created.
|
|
6
|
+
* - `enable`: Monitor was enabled.
|
|
7
|
+
* - `disable`: Monitor was disabled.
|
|
8
|
+
* - `scheduled`: A job was triggered for execution.
|
|
9
|
+
* `additional_information` contains `job_id`, `start_date`,
|
|
10
|
+
* and `end_date`.
|
|
11
|
+
* - `dump`: Results were collected after a job completed.
|
|
12
|
+
* `additional_information` contains `nb_existing_records`,
|
|
13
|
+
* `nb_final_records`, and optionally `webhook`.
|
|
14
|
+
*/
|
|
15
|
+
status: MonitorStatusEntry.Status;
|
|
16
|
+
/** Timestamp of this event in ISO 8601 format with UTC timezone. */
|
|
17
|
+
created_at: string;
|
|
18
|
+
/**
|
|
19
|
+
* Event-specific metadata. `null` for `created`, `enable`, and `disable` events.
|
|
20
|
+
*
|
|
21
|
+
* For `scheduled`:
|
|
22
|
+
* ```json
|
|
23
|
+
* {
|
|
24
|
+
* "job_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
|
|
25
|
+
* "start_date": "2026-02-04T12:00:00",
|
|
26
|
+
* "end_date": "2026-02-05T12:00:00"
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* For `dump`:
|
|
31
|
+
* ```json
|
|
32
|
+
* {
|
|
33
|
+
* "nb_existing_records": 408,
|
|
34
|
+
* "nb_final_records": 28,
|
|
35
|
+
* "webhook": {
|
|
36
|
+
* "success": true,
|
|
37
|
+
* "status_code": 200,
|
|
38
|
+
* "error_message": null
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
* The `webhook` key is only present if the monitor has a webhook configured.
|
|
43
|
+
*/
|
|
44
|
+
additional_information?: (Record<string, unknown> | null) | undefined;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace MonitorStatusEntry {
|
|
47
|
+
/**
|
|
48
|
+
* Type of lifecycle event.
|
|
49
|
+
*
|
|
50
|
+
* - `created`: Monitor was created.
|
|
51
|
+
* - `enable`: Monitor was enabled.
|
|
52
|
+
* - `disable`: Monitor was disabled.
|
|
53
|
+
* - `scheduled`: A job was triggered for execution.
|
|
54
|
+
* `additional_information` contains `job_id`, `start_date`,
|
|
55
|
+
* and `end_date`.
|
|
56
|
+
* - `dump`: Results were collected after a job completed.
|
|
57
|
+
* `additional_information` contains `nb_existing_records`,
|
|
58
|
+
* `nb_final_records`, and optionally `webhook`.
|
|
59
|
+
*/
|
|
60
|
+
const Status: {
|
|
61
|
+
readonly Created: "created";
|
|
62
|
+
readonly Enable: "enable";
|
|
63
|
+
readonly Disable: "disable";
|
|
64
|
+
readonly Scheduled: "scheduled";
|
|
65
|
+
readonly Dump: "dump";
|
|
66
|
+
};
|
|
67
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
68
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.MonitorStatusEntry = void 0;
|
|
5
|
+
var MonitorStatusEntry;
|
|
6
|
+
(function (MonitorStatusEntry) {
|
|
7
|
+
/**
|
|
8
|
+
* Type of lifecycle event.
|
|
9
|
+
*
|
|
10
|
+
* - `created`: Monitor was created.
|
|
11
|
+
* - `enable`: Monitor was enabled.
|
|
12
|
+
* - `disable`: Monitor was disabled.
|
|
13
|
+
* - `scheduled`: A job was triggered for execution.
|
|
14
|
+
* `additional_information` contains `job_id`, `start_date`,
|
|
15
|
+
* and `end_date`.
|
|
16
|
+
* - `dump`: Results were collected after a job completed.
|
|
17
|
+
* `additional_information` contains `nb_existing_records`,
|
|
18
|
+
* `nb_final_records`, and optionally `webhook`.
|
|
19
|
+
*/
|
|
20
|
+
MonitorStatusEntry.Status = {
|
|
21
|
+
Created: "created",
|
|
22
|
+
Enable: "enable",
|
|
23
|
+
Disable: "disable",
|
|
24
|
+
Scheduled: "scheduled",
|
|
25
|
+
Dump: "dump",
|
|
26
|
+
};
|
|
27
|
+
})(MonitorStatusEntry || (exports.MonitorStatusEntry = MonitorStatusEntry = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as CatchAllApi from "../index.js";
|
|
2
|
+
export interface MonitorStatusHistoryResponseDto {
|
|
3
|
+
/** Whether the request succeeded. */
|
|
4
|
+
success: boolean;
|
|
5
|
+
/** Optional message. `null` on success. */
|
|
6
|
+
message?: (string | null) | undefined;
|
|
7
|
+
/** Monitor identifier. `null` on failure. */
|
|
8
|
+
monitor_id: string | null;
|
|
9
|
+
/** Total number of status entries in the history. */
|
|
10
|
+
total_statuses: number | null;
|
|
11
|
+
/** Full status history, ordered newest to oldest. */
|
|
12
|
+
statuses: CatchAllApi.MonitorStatusEntry[] | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls which resources are returned based on ownership.
|
|
3
|
+
*
|
|
4
|
+
* - `all`: Returns resources owned by the user and resources shared
|
|
5
|
+
* with them (default, backward compatible).
|
|
6
|
+
* - `own`: Returns only resources created by the authenticated user.
|
|
7
|
+
* - `shared`: Returns only resources shared with the user by others.
|
|
8
|
+
*/
|
|
9
|
+
export declare const OwnershipFilter: {
|
|
10
|
+
readonly All: "all";
|
|
11
|
+
readonly Own: "own";
|
|
12
|
+
readonly Shared: "shared";
|
|
13
|
+
};
|
|
14
|
+
export type OwnershipFilter = (typeof OwnershipFilter)[keyof typeof OwnershipFilter];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OwnershipFilter = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Controls which resources are returned based on ownership.
|
|
7
|
+
*
|
|
8
|
+
* - `all`: Returns resources owned by the user and resources shared
|
|
9
|
+
* with them (default, backward compatible).
|
|
10
|
+
* - `own`: Returns only resources created by the authenticated user.
|
|
11
|
+
* - `shared`: Returns only resources shared with the user by others.
|
|
12
|
+
*/
|
|
13
|
+
exports.OwnershipFilter = {
|
|
14
|
+
All: "all",
|
|
15
|
+
Own: "own",
|
|
16
|
+
Shared: "shared",
|
|
17
|
+
};
|
|
@@ -37,6 +37,8 @@ export interface PullJobResponseDto {
|
|
|
37
37
|
total_pages?: number | undefined;
|
|
38
38
|
/** Processing mode used for this job. */
|
|
39
39
|
mode?: PullJobResponseDto.Mode | undefined;
|
|
40
|
+
/** Present when the job was shared with the authenticated user by another organization member. `null` when the user owns the job. */
|
|
41
|
+
sharing_info?: (CatchAllApi.SharingInfo | null) | undefined;
|
|
40
42
|
/** Array of extracted records with structured data and citations. */
|
|
41
43
|
all_records?: CatchAllApi.Record_[] | undefined;
|
|
42
44
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Present on resources shared with the authenticated user by another
|
|
3
|
+
* organization member. Omitted entirely on resources the user owns.
|
|
4
|
+
*/
|
|
5
|
+
export interface SharingInfo {
|
|
6
|
+
/** When the resource was shared. */
|
|
7
|
+
shared_at: string;
|
|
8
|
+
/** Permission level granted to the recipient. */
|
|
9
|
+
permission: SharingInfo.Permission;
|
|
10
|
+
/**
|
|
11
|
+
* Display name of the user who shared the resource (first + last
|
|
12
|
+
* name). Falls back to email address, then user ID.
|
|
13
|
+
*/
|
|
14
|
+
shared_by: string;
|
|
15
|
+
}
|
|
16
|
+
export declare namespace SharingInfo {
|
|
17
|
+
/** Permission level granted to the recipient. */
|
|
18
|
+
const Permission: {
|
|
19
|
+
readonly View: "view";
|
|
20
|
+
readonly Edit: "edit";
|
|
21
|
+
readonly Manage: "manage";
|
|
22
|
+
};
|
|
23
|
+
type Permission = (typeof Permission)[keyof typeof Permission];
|
|
24
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SharingInfo = void 0;
|
|
5
|
+
var SharingInfo;
|
|
6
|
+
(function (SharingInfo) {
|
|
7
|
+
/** Permission level granted to the recipient. */
|
|
8
|
+
SharingInfo.Permission = {
|
|
9
|
+
View: "view",
|
|
10
|
+
Edit: "edit",
|
|
11
|
+
Manage: "manage",
|
|
12
|
+
};
|
|
13
|
+
})(SharingInfo || (exports.SharingInfo = SharingInfo = {}));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as CatchAllApi from "../index.js";
|
|
1
2
|
export interface UserJob {
|
|
2
3
|
/** Job identifier. */
|
|
3
4
|
job_id: string;
|
|
@@ -9,6 +10,8 @@ export interface UserJob {
|
|
|
9
10
|
status: string;
|
|
10
11
|
/** Processing mode used for this job. */
|
|
11
12
|
mode?: UserJob.Mode | undefined;
|
|
13
|
+
/** Present when this job is shared with the authenticated user. Omitted when the user owns the job. */
|
|
14
|
+
sharing_info?: CatchAllApi.SharingInfo | undefined;
|
|
12
15
|
/** Masked API key that created this job. */
|
|
13
16
|
user_key?: string | undefined;
|
|
14
17
|
}
|
|
@@ -19,6 +19,8 @@ export * from "./DatasetSortBy.js";
|
|
|
19
19
|
export * from "./DatasetStatus.js";
|
|
20
20
|
export * from "./DatasetStatusEntry.js";
|
|
21
21
|
export * from "./DatasetStatusHistoryResponse.js";
|
|
22
|
+
export * from "./DeleteJobResponseDto.js";
|
|
23
|
+
export * from "./DeleteMonitorResponseDto.js";
|
|
22
24
|
export * from "./EndDate.js";
|
|
23
25
|
export * from "./EnrichmentSchema.js";
|
|
24
26
|
export * from "./EnrichmentType.js";
|
|
@@ -41,6 +43,9 @@ export * from "./MonitorCitation.js";
|
|
|
41
43
|
export * from "./MonitorJobItem.js";
|
|
42
44
|
export * from "./MonitorListItemDto.js";
|
|
43
45
|
export * from "./MonitorRecord.js";
|
|
46
|
+
export * from "./MonitorStatusEntry.js";
|
|
47
|
+
export * from "./MonitorStatusHistoryResponseDto.js";
|
|
48
|
+
export * from "./OwnershipFilter.js";
|
|
44
49
|
export * from "./PlanFeature.js";
|
|
45
50
|
export * from "./PublicJobStatus.js";
|
|
46
51
|
export * from "./PullJobResponseDto.js";
|
|
@@ -48,6 +53,7 @@ export * from "./PullMonitorResponseDto.js";
|
|
|
48
53
|
export * from "./Query.js";
|
|
49
54
|
export * from "./Record_.js";
|
|
50
55
|
export * from "./ReferenceJob.js";
|
|
56
|
+
export * from "./SharingInfo.js";
|
|
51
57
|
export * from "./SkippedRow.js";
|
|
52
58
|
export * from "./SortOrder.js";
|
|
53
59
|
export * from "./StartDate.js";
|
|
@@ -35,6 +35,8 @@ __exportStar(require("./DatasetSortBy.js"), exports);
|
|
|
35
35
|
__exportStar(require("./DatasetStatus.js"), exports);
|
|
36
36
|
__exportStar(require("./DatasetStatusEntry.js"), exports);
|
|
37
37
|
__exportStar(require("./DatasetStatusHistoryResponse.js"), exports);
|
|
38
|
+
__exportStar(require("./DeleteJobResponseDto.js"), exports);
|
|
39
|
+
__exportStar(require("./DeleteMonitorResponseDto.js"), exports);
|
|
38
40
|
__exportStar(require("./EndDate.js"), exports);
|
|
39
41
|
__exportStar(require("./EnrichmentSchema.js"), exports);
|
|
40
42
|
__exportStar(require("./EnrichmentType.js"), exports);
|
|
@@ -57,6 +59,9 @@ __exportStar(require("./MonitorCitation.js"), exports);
|
|
|
57
59
|
__exportStar(require("./MonitorJobItem.js"), exports);
|
|
58
60
|
__exportStar(require("./MonitorListItemDto.js"), exports);
|
|
59
61
|
__exportStar(require("./MonitorRecord.js"), exports);
|
|
62
|
+
__exportStar(require("./MonitorStatusEntry.js"), exports);
|
|
63
|
+
__exportStar(require("./MonitorStatusHistoryResponseDto.js"), exports);
|
|
64
|
+
__exportStar(require("./OwnershipFilter.js"), exports);
|
|
60
65
|
__exportStar(require("./PlanFeature.js"), exports);
|
|
61
66
|
__exportStar(require("./PublicJobStatus.js"), exports);
|
|
62
67
|
__exportStar(require("./PullJobResponseDto.js"), exports);
|
|
@@ -64,6 +69,7 @@ __exportStar(require("./PullMonitorResponseDto.js"), exports);
|
|
|
64
69
|
__exportStar(require("./Query.js"), exports);
|
|
65
70
|
__exportStar(require("./Record_.js"), exports);
|
|
66
71
|
__exportStar(require("./ReferenceJob.js"), exports);
|
|
72
|
+
__exportStar(require("./SharingInfo.js"), exports);
|
|
67
73
|
__exportStar(require("./SkippedRow.js"), exports);
|
|
68
74
|
__exportStar(require("./SortOrder.js"), exports);
|
|
69
75
|
__exportStar(require("./StartDate.js"), exports);
|
|
@@ -186,7 +186,13 @@ function getHeaders(args) {
|
|
|
186
186
|
function fetcherImpl(args) {
|
|
187
187
|
return __awaiter(this, void 0, void 0, function* () {
|
|
188
188
|
var _a, _b, _c;
|
|
189
|
-
|
|
189
|
+
let url = args.url;
|
|
190
|
+
if (args.queryString != null && args.queryString.length > 0) {
|
|
191
|
+
url = `${url}?${args.queryString}`;
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
url = (0, createRequestUrl_js_1.createRequestUrl)(args.url, args.queryParameters);
|
|
195
|
+
}
|
|
190
196
|
const requestBody = yield (0, getRequestBody_js_1.getRequestBody)({
|
|
191
197
|
body: args.body,
|
|
192
198
|
type: (_a = args.requestType) !== null && _a !== void 0 ? _a : "other",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a fluent builder for constructing URL query strings.
|
|
3
|
+
*
|
|
4
|
+
* Each `.add()` call serializes its value immediately (like C#'s builder),
|
|
5
|
+
* so no format tracking is needed — the style is applied at add-time.
|
|
6
|
+
*
|
|
7
|
+
* Usage (generated code):
|
|
8
|
+
*
|
|
9
|
+
* const qs = core.url.queryBuilder()
|
|
10
|
+
* .add("limit", limit)
|
|
11
|
+
* .add("tags", tags, { style: "comma" }) // explode: false
|
|
12
|
+
* .mergeAdditional(requestOptions?.queryParams)
|
|
13
|
+
* .build();
|
|
14
|
+
*/
|
|
15
|
+
export declare function queryBuilder(): QueryStringBuilder;
|
|
16
|
+
declare class QueryStringBuilder {
|
|
17
|
+
private parts;
|
|
18
|
+
/**
|
|
19
|
+
* Adds a query parameter, serializing it immediately.
|
|
20
|
+
*
|
|
21
|
+
* By default arrays use "repeat" format (`key=a&key=b`).
|
|
22
|
+
* Pass `{ style: "comma" }` for OpenAPI `explode: false` parameters
|
|
23
|
+
* to get comma-separated values (`key=a,b,c`).
|
|
24
|
+
*
|
|
25
|
+
* Null / undefined values are silently skipped.
|
|
26
|
+
*/
|
|
27
|
+
add(key: string, value: unknown, options?: {
|
|
28
|
+
style?: "comma";
|
|
29
|
+
}): this;
|
|
30
|
+
/**
|
|
31
|
+
* Adds multiple query parameters at once from a record.
|
|
32
|
+
* All parameters use the default "repeat" array format.
|
|
33
|
+
* Null / undefined values are silently skipped.
|
|
34
|
+
*/
|
|
35
|
+
addMany(params: Record<string, unknown>): this;
|
|
36
|
+
/**
|
|
37
|
+
* Merges additional query parameters supplied at call-time via
|
|
38
|
+
* `requestOptions.queryParams`. Overrides existing keys (last-write-wins).
|
|
39
|
+
*/
|
|
40
|
+
mergeAdditional(additionalParams?: Record<string, unknown>): this;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the assembled query string (without the leading `?`).
|
|
43
|
+
* Returns an empty string when no parameters were added.
|
|
44
|
+
*/
|
|
45
|
+
build(): string;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.queryBuilder = queryBuilder;
|
|
4
|
+
const qs_js_1 = require("./qs.js");
|
|
5
|
+
/**
|
|
6
|
+
* Creates a fluent builder for constructing URL query strings.
|
|
7
|
+
*
|
|
8
|
+
* Each `.add()` call serializes its value immediately (like C#'s builder),
|
|
9
|
+
* so no format tracking is needed — the style is applied at add-time.
|
|
10
|
+
*
|
|
11
|
+
* Usage (generated code):
|
|
12
|
+
*
|
|
13
|
+
* const qs = core.url.queryBuilder()
|
|
14
|
+
* .add("limit", limit)
|
|
15
|
+
* .add("tags", tags, { style: "comma" }) // explode: false
|
|
16
|
+
* .mergeAdditional(requestOptions?.queryParams)
|
|
17
|
+
* .build();
|
|
18
|
+
*/
|
|
19
|
+
function queryBuilder() {
|
|
20
|
+
return new QueryStringBuilder();
|
|
21
|
+
}
|
|
22
|
+
class QueryStringBuilder {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.parts = new Map();
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Adds a query parameter, serializing it immediately.
|
|
28
|
+
*
|
|
29
|
+
* By default arrays use "repeat" format (`key=a&key=b`).
|
|
30
|
+
* Pass `{ style: "comma" }` for OpenAPI `explode: false` parameters
|
|
31
|
+
* to get comma-separated values (`key=a,b,c`).
|
|
32
|
+
*
|
|
33
|
+
* Null / undefined values are silently skipped.
|
|
34
|
+
*/
|
|
35
|
+
add(key, value, options) {
|
|
36
|
+
if (value === undefined || value === null) {
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
const serialized = (0, qs_js_1.toQueryString)({ [key]: value }, { arrayFormat: (options === null || options === void 0 ? void 0 : options.style) === "comma" ? "comma" : "repeat" });
|
|
40
|
+
if (serialized.length > 0) {
|
|
41
|
+
this.parts.set(key, serialized);
|
|
42
|
+
}
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Adds multiple query parameters at once from a record.
|
|
47
|
+
* All parameters use the default "repeat" array format.
|
|
48
|
+
* Null / undefined values are silently skipped.
|
|
49
|
+
*/
|
|
50
|
+
addMany(params) {
|
|
51
|
+
if (params != null) {
|
|
52
|
+
for (const [key, value] of Object.entries(params)) {
|
|
53
|
+
this.add(key, value);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Merges additional query parameters supplied at call-time via
|
|
60
|
+
* `requestOptions.queryParams`. Overrides existing keys (last-write-wins).
|
|
61
|
+
*/
|
|
62
|
+
mergeAdditional(additionalParams) {
|
|
63
|
+
if (additionalParams != null) {
|
|
64
|
+
for (const [key, value] of Object.entries(additionalParams)) {
|
|
65
|
+
if (value === undefined || value === null) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
const serialized = (0, qs_js_1.toQueryString)({ [key]: value }, { arrayFormat: "repeat" });
|
|
69
|
+
if (serialized.length > 0) {
|
|
70
|
+
this.parts.set(key, serialized);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return this;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Returns the assembled query string (without the leading `?`).
|
|
78
|
+
* Returns an empty string when no parameters were added.
|
|
79
|
+
*/
|
|
80
|
+
build() {
|
|
81
|
+
return [...this.parts.values()].join("&");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toQueryString = exports.join = exports.encodePathParam = void 0;
|
|
3
|
+
exports.toQueryString = exports.queryBuilder = exports.join = exports.encodePathParam = void 0;
|
|
4
4
|
var encodePathParam_js_1 = require("./encodePathParam.js");
|
|
5
5
|
Object.defineProperty(exports, "encodePathParam", { enumerable: true, get: function () { return encodePathParam_js_1.encodePathParam; } });
|
|
6
6
|
var join_js_1 = require("./join.js");
|
|
7
7
|
Object.defineProperty(exports, "join", { enumerable: true, get: function () { return join_js_1.join; } });
|
|
8
|
+
var QueryStringBuilder_js_1 = require("./QueryStringBuilder.js");
|
|
9
|
+
Object.defineProperty(exports, "queryBuilder", { enumerable: true, get: function () { return QueryStringBuilder_js_1.queryBuilder; } });
|
|
8
10
|
var qs_js_1 = require("./qs.js");
|
|
9
11
|
Object.defineProperty(exports, "toQueryString", { enumerable: true, get: function () { return qs_js_1.toQueryString; } });
|
package/dist/cjs/core/url/qs.js
CHANGED
|
@@ -26,19 +26,31 @@ function stringifyObject(obj, prefix = "", options) {
|
|
|
26
26
|
if (value.length === 0) {
|
|
27
27
|
continue;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const effectiveFormat = options.arrayFormat;
|
|
30
|
+
if (effectiveFormat === "comma") {
|
|
31
|
+
const encodedKey = options.encode ? encodeURIComponent(fullKey) : fullKey;
|
|
32
|
+
const encodedValues = value
|
|
33
|
+
.filter((item) => item !== undefined && item !== null)
|
|
34
|
+
.map((item) => encodeValue(item, options.encode));
|
|
35
|
+
if (encodedValues.length > 0) {
|
|
36
|
+
parts.push(`${encodedKey}=${encodedValues.join(",")}`);
|
|
33
37
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
for (let i = 0; i < value.length; i++) {
|
|
41
|
+
const item = value[i];
|
|
42
|
+
if (item === undefined) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (typeof item === "object" && !Array.isArray(item) && item !== null) {
|
|
46
|
+
const arrayKey = effectiveFormat === "indices" ? `${fullKey}[${i}]` : fullKey;
|
|
47
|
+
parts.push(...stringifyObject(item, arrayKey, options));
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
const arrayKey = effectiveFormat === "indices" ? `${fullKey}[${i}]` : fullKey;
|
|
51
|
+
const encodedKey = options.encode ? encodeURIComponent(arrayKey) : arrayKey;
|
|
52
|
+
parts.push(`${encodedKey}=${encodeValue(item, options.encode)}`);
|
|
53
|
+
}
|
|
42
54
|
}
|
|
43
55
|
}
|
|
44
56
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.5.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "newscatcher-catchall-sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "1.
|
|
10
|
-
"User-Agent": "newscatcher-catchall-sdk/1.
|
|
9
|
+
"X-Fern-SDK-Version": "1.5.0",
|
|
10
|
+
"User-Agent": "newscatcher-catchall-sdk/1.5.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as core from "../../core/index.mjs";
|
|
2
|
+
import * as errors from "../../errors/index.mjs";
|
|
3
|
+
import type * as CatchAllApi from "../index.mjs";
|
|
4
|
+
export declare class UnauthorizedError extends errors.CatchAllApiError {
|
|
5
|
+
constructor(body: CatchAllApi.Error_, rawResponse?: core.RawResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import * as errors from "../../errors/index.mjs";
|
|
3
|
+
export class UnauthorizedError extends errors.CatchAllApiError {
|
|
4
|
+
constructor(body, rawResponse) {
|
|
5
|
+
super({
|
|
6
|
+
message: "UnauthorizedError",
|
|
7
|
+
statusCode: 401,
|
|
8
|
+
body: body,
|
|
9
|
+
rawResponse: rawResponse,
|
|
10
|
+
});
|
|
11
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
12
|
+
if (Error.captureStackTrace) {
|
|
13
|
+
Error.captureStackTrace(this, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
this.name = this.constructor.name;
|
|
16
|
+
}
|
|
17
|
+
}
|