newscatcher-catchall-sdk 3.0.1 → 4.0.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.
Files changed (65) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/api/errors/BadRequestError.js +1 -1
  4. package/dist/cjs/api/errors/ForbiddenError.js +1 -1
  5. package/dist/cjs/api/errors/NotFoundError.js +1 -1
  6. package/dist/cjs/api/errors/UnauthorizedError.js +1 -1
  7. package/dist/cjs/api/errors/UnprocessableEntityError.js +1 -1
  8. package/dist/cjs/api/resources/entities/client/requests/UpdateEntityRequest.d.ts +2 -0
  9. package/dist/cjs/api/resources/jobs/client/Client.d.ts +16 -0
  10. package/dist/cjs/api/resources/jobs/client/Client.js +55 -0
  11. package/dist/cjs/api/resources/jobs/client/requests/GetJobResultsCsvRequest.d.ts +10 -0
  12. package/dist/cjs/api/resources/jobs/client/requests/GetJobResultsCsvRequest.js +3 -0
  13. package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/monitors/client/Client.d.ts +16 -0
  15. package/dist/cjs/api/resources/monitors/client/Client.js +55 -0
  16. package/dist/cjs/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.d.ts +10 -0
  17. package/dist/cjs/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.js +3 -0
  18. package/dist/cjs/api/resources/monitors/client/requests/index.d.ts +1 -0
  19. package/dist/cjs/api/types/ConnectedDataset.d.ts +11 -0
  20. package/dist/cjs/api/types/ConnectedDataset.js +3 -0
  21. package/dist/cjs/api/types/ConnectedEntity.d.ts +2 -0
  22. package/dist/cjs/api/types/CreateEntityRequest.d.ts +2 -0
  23. package/dist/cjs/api/types/EntityResponse.d.ts +2 -0
  24. package/dist/cjs/api/types/EntitySummary.d.ts +2 -0
  25. package/dist/cjs/api/types/PullJobResponseDto.d.ts +4 -0
  26. package/dist/cjs/api/types/PullMonitorResponseDto.d.ts +4 -0
  27. package/dist/cjs/api/types/index.d.ts +1 -0
  28. package/dist/cjs/api/types/index.js +1 -0
  29. package/dist/cjs/errors/CatchAllApiError.js +1 -1
  30. package/dist/cjs/errors/CatchAllApiTimeoutError.js +1 -1
  31. package/dist/cjs/version.d.ts +1 -1
  32. package/dist/cjs/version.js +1 -1
  33. package/dist/esm/BaseClient.mjs +2 -2
  34. package/dist/esm/api/errors/BadRequestError.mjs +1 -1
  35. package/dist/esm/api/errors/ForbiddenError.mjs +1 -1
  36. package/dist/esm/api/errors/NotFoundError.mjs +1 -1
  37. package/dist/esm/api/errors/UnauthorizedError.mjs +1 -1
  38. package/dist/esm/api/errors/UnprocessableEntityError.mjs +1 -1
  39. package/dist/esm/api/resources/entities/client/requests/UpdateEntityRequest.d.mts +2 -0
  40. package/dist/esm/api/resources/jobs/client/Client.d.mts +16 -0
  41. package/dist/esm/api/resources/jobs/client/Client.mjs +55 -0
  42. package/dist/esm/api/resources/jobs/client/requests/GetJobResultsCsvRequest.d.mts +10 -0
  43. package/dist/esm/api/resources/jobs/client/requests/GetJobResultsCsvRequest.mjs +2 -0
  44. package/dist/esm/api/resources/jobs/client/requests/index.d.mts +1 -0
  45. package/dist/esm/api/resources/monitors/client/Client.d.mts +16 -0
  46. package/dist/esm/api/resources/monitors/client/Client.mjs +55 -0
  47. package/dist/esm/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.d.mts +10 -0
  48. package/dist/esm/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.mjs +2 -0
  49. package/dist/esm/api/resources/monitors/client/requests/index.d.mts +1 -0
  50. package/dist/esm/api/types/ConnectedDataset.d.mts +11 -0
  51. package/dist/esm/api/types/ConnectedDataset.mjs +2 -0
  52. package/dist/esm/api/types/ConnectedEntity.d.mts +2 -0
  53. package/dist/esm/api/types/CreateEntityRequest.d.mts +2 -0
  54. package/dist/esm/api/types/EntityResponse.d.mts +2 -0
  55. package/dist/esm/api/types/EntitySummary.d.mts +2 -0
  56. package/dist/esm/api/types/PullJobResponseDto.d.mts +4 -0
  57. package/dist/esm/api/types/PullMonitorResponseDto.d.mts +4 -0
  58. package/dist/esm/api/types/index.d.mts +1 -0
  59. package/dist/esm/api/types/index.mjs +1 -0
  60. package/dist/esm/errors/CatchAllApiError.mjs +1 -1
  61. package/dist/esm/errors/CatchAllApiTimeoutError.mjs +1 -1
  62. package/dist/esm/version.d.mts +1 -1
  63. package/dist/esm/version.mjs +1 -1
  64. package/package.json +1 -1
  65. package/reference.md +130 -0
package/README.md CHANGED
@@ -376,3 +376,4 @@ On the other hand, contributions to the README are always very welcome!
376
376
 
377
377
 
378
378
 
379
+
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "newscatcher-catchall-sdk",
46
- "X-Fern-SDK-Version": "3.0.1",
47
- "User-Agent": "newscatcher-catchall-sdk/3.0.1",
46
+ "X-Fern-SDK-Version": "4.0.0",
47
+ "User-Agent": "newscatcher-catchall-sdk/4.0.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -48,7 +48,7 @@ class BadRequestError extends errors.CatchAllApiError {
48
48
  if (Error.captureStackTrace) {
49
49
  Error.captureStackTrace(this, this.constructor);
50
50
  }
51
- this.name = this.constructor.name;
51
+ this.name = "BadRequestError";
52
52
  }
53
53
  }
54
54
  exports.BadRequestError = BadRequestError;
@@ -48,7 +48,7 @@ class ForbiddenError extends errors.CatchAllApiError {
48
48
  if (Error.captureStackTrace) {
49
49
  Error.captureStackTrace(this, this.constructor);
50
50
  }
51
- this.name = this.constructor.name;
51
+ this.name = "ForbiddenError";
52
52
  }
53
53
  }
54
54
  exports.ForbiddenError = ForbiddenError;
@@ -48,7 +48,7 @@ class NotFoundError extends errors.CatchAllApiError {
48
48
  if (Error.captureStackTrace) {
49
49
  Error.captureStackTrace(this, this.constructor);
50
50
  }
51
- this.name = this.constructor.name;
51
+ this.name = "NotFoundError";
52
52
  }
53
53
  }
54
54
  exports.NotFoundError = NotFoundError;
@@ -48,7 +48,7 @@ class UnauthorizedError extends errors.CatchAllApiError {
48
48
  if (Error.captureStackTrace) {
49
49
  Error.captureStackTrace(this, this.constructor);
50
50
  }
51
- this.name = this.constructor.name;
51
+ this.name = "UnauthorizedError";
52
52
  }
53
53
  }
54
54
  exports.UnauthorizedError = UnauthorizedError;
@@ -48,7 +48,7 @@ class UnprocessableEntityError extends errors.CatchAllApiError {
48
48
  if (Error.captureStackTrace) {
49
49
  Error.captureStackTrace(this, this.constructor);
50
50
  }
51
- this.name = this.constructor.name;
51
+ this.name = "UnprocessableEntityError";
52
52
  }
53
53
  }
54
54
  exports.UnprocessableEntityError = UnprocessableEntityError;
@@ -18,5 +18,7 @@ export interface UpdateEntityRequest {
18
18
  name?: string;
19
19
  /** Updated description. */
20
20
  description?: string;
21
+ /** Updated external identifier for this entity. */
22
+ external_entity_id?: string;
21
23
  additional_attributes?: CatchAllApi.AdditionalAttributes;
22
24
  }
@@ -117,6 +117,22 @@ export declare class JobsClient {
117
117
  */
118
118
  getJobResults(request: CatchAllApi.GetJobResultsRequest, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.PullJobResponseDto>;
119
119
  private __getJobResults;
120
+ /**
121
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
122
+ *
123
+ * @param {CatchAllApi.GetJobResultsCsvRequest} request
124
+ * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
125
+ *
126
+ * @throws {@link CatchAllApi.ForbiddenError}
127
+ * @throws {@link CatchAllApi.NotFoundError}
128
+ *
129
+ * @example
130
+ * await client.jobs.getJobResultsCsv({
131
+ * job_id: "job_id"
132
+ * })
133
+ */
134
+ getJobResultsCsv(request: CatchAllApi.GetJobResultsCsvRequest, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<string>;
135
+ private __getJobResultsCsv;
120
136
  /**
121
137
  * Continue an existing job to process more records beyond the initial limit.
122
138
  *
@@ -415,6 +415,61 @@ class JobsClient {
415
415
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catchAll/pull/{job_id}");
416
416
  });
417
417
  }
418
+ /**
419
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
420
+ *
421
+ * @param {CatchAllApi.GetJobResultsCsvRequest} request
422
+ * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
423
+ *
424
+ * @throws {@link CatchAllApi.ForbiddenError}
425
+ * @throws {@link CatchAllApi.NotFoundError}
426
+ *
427
+ * @example
428
+ * await client.jobs.getJobResultsCsv({
429
+ * job_id: "job_id"
430
+ * })
431
+ */
432
+ getJobResultsCsv(request, requestOptions) {
433
+ return core.HttpResponsePromise.fromPromise(this.__getJobResultsCsv(request, requestOptions));
434
+ }
435
+ __getJobResultsCsv(request, requestOptions) {
436
+ return __awaiter(this, void 0, void 0, function* () {
437
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
438
+ const { job_id: jobId } = request;
439
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
440
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
441
+ const _response = yield core.fetcher({
442
+ 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/pull/${core.url.encodePathParam(jobId)}/csv`),
443
+ method: "GET",
444
+ headers: _headers,
445
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
446
+ responseType: "text",
447
+ 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,
448
+ 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,
449
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
450
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
451
+ logging: this._options.logging,
452
+ });
453
+ if (_response.ok) {
454
+ return { data: _response.body, rawResponse: _response.rawResponse };
455
+ }
456
+ if (_response.error.reason === "status-code") {
457
+ switch (_response.error.statusCode) {
458
+ case 403:
459
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
460
+ case 404:
461
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
462
+ default:
463
+ throw new errors.CatchAllApiError({
464
+ statusCode: _response.error.statusCode,
465
+ body: _response.error.body,
466
+ rawResponse: _response.rawResponse,
467
+ });
468
+ }
469
+ }
470
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catchAll/pull/{job_id}/csv");
471
+ });
472
+ }
418
473
  /**
419
474
  * Continue an existing job to process more records beyond the initial limit.
420
475
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * job_id: "job_id"
5
+ * }
6
+ */
7
+ export interface GetJobResultsCsvRequest {
8
+ /** Unique job identifier returned from [`POST /catchAll/submit`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/create-job). */
9
+ job_id: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,6 @@
1
1
  export type { ContinueRequestDto } from "./ContinueRequestDto.js";
2
2
  export type { DeleteJobRequest } from "./DeleteJobRequest.js";
3
+ export type { GetJobResultsCsvRequest } from "./GetJobResultsCsvRequest.js";
3
4
  export type { GetJobResultsRequest } from "./GetJobResultsRequest.js";
4
5
  export type { GetJobStatusRequest } from "./GetJobStatusRequest.js";
5
6
  export type { GetUserJobsRequest } from "./GetUserJobsRequest.js";
@@ -65,6 +65,22 @@ export declare class MonitorsClient {
65
65
  */
66
66
  pullMonitorResults(request: CatchAllApi.PullMonitorResultsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.PullMonitorResponseDto>;
67
67
  private __pullMonitorResults;
68
+ /**
69
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
70
+ *
71
+ * @param {CatchAllApi.PullMonitorResultsCsvRequest} request
72
+ * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
73
+ *
74
+ * @throws {@link CatchAllApi.ForbiddenError}
75
+ * @throws {@link CatchAllApi.NotFoundError}
76
+ *
77
+ * @example
78
+ * await client.monitors.pullMonitorResultsCsv({
79
+ * monitor_id: "monitor_id"
80
+ * })
81
+ */
82
+ pullMonitorResultsCsv(request: CatchAllApi.PullMonitorResultsCsvRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<string>;
83
+ private __pullMonitorResultsCsv;
68
84
  /**
69
85
  * Return all jobs executed by a monitor.
70
86
  *
@@ -246,6 +246,61 @@ class MonitorsClient {
246
246
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catchAll/monitors/pull/{monitor_id}");
247
247
  });
248
248
  }
249
+ /**
250
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
251
+ *
252
+ * @param {CatchAllApi.PullMonitorResultsCsvRequest} request
253
+ * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
254
+ *
255
+ * @throws {@link CatchAllApi.ForbiddenError}
256
+ * @throws {@link CatchAllApi.NotFoundError}
257
+ *
258
+ * @example
259
+ * await client.monitors.pullMonitorResultsCsv({
260
+ * monitor_id: "monitor_id"
261
+ * })
262
+ */
263
+ pullMonitorResultsCsv(request, requestOptions) {
264
+ return core.HttpResponsePromise.fromPromise(this.__pullMonitorResultsCsv(request, requestOptions));
265
+ }
266
+ __pullMonitorResultsCsv(request, requestOptions) {
267
+ return __awaiter(this, void 0, void 0, function* () {
268
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
269
+ const { monitor_id: monitorId } = request;
270
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
271
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
272
+ const _response = yield core.fetcher({
273
+ 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/monitors/pull/${core.url.encodePathParam(monitorId)}/csv`),
274
+ method: "GET",
275
+ headers: _headers,
276
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
277
+ responseType: "text",
278
+ 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,
279
+ 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,
280
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
281
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
282
+ logging: this._options.logging,
283
+ });
284
+ if (_response.ok) {
285
+ return { data: _response.body, rawResponse: _response.rawResponse };
286
+ }
287
+ if (_response.error.reason === "status-code") {
288
+ switch (_response.error.statusCode) {
289
+ case 403:
290
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
291
+ case 404:
292
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
293
+ default:
294
+ throw new errors.CatchAllApiError({
295
+ statusCode: _response.error.statusCode,
296
+ body: _response.error.body,
297
+ rawResponse: _response.rawResponse,
298
+ });
299
+ }
300
+ }
301
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catchAll/monitors/pull/{monitor_id}/csv");
302
+ });
303
+ }
249
304
  /**
250
305
  * Return all jobs executed by a monitor.
251
306
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * monitor_id: "monitor_id"
5
+ * }
6
+ */
7
+ export interface PullMonitorResultsCsvRequest {
8
+ /** Monitor identifier. */
9
+ monitor_id: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,5 +5,6 @@ export type { EnableMonitorRequestDto } from "./EnableMonitorRequestDto.js";
5
5
  export type { GetMonitorStatusHistoryRequest } from "./GetMonitorStatusHistoryRequest.js";
6
6
  export type { ListMonitorJobsRequest } from "./ListMonitorJobsRequest.js";
7
7
  export type { ListMonitorsRequest } from "./ListMonitorsRequest.js";
8
+ export type { PullMonitorResultsCsvRequest } from "./PullMonitorResultsCsvRequest.js";
8
9
  export type { PullMonitorResultsRequest } from "./PullMonitorResultsRequest.js";
9
10
  export type { UpdateMonitorRequestDto } from "./UpdateMonitorRequestDto.js";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A dataset used to narrow the retrieval scope of a job or monitor, returned with its identifier and name.
3
+ */
4
+ export interface ConnectedDataset {
5
+ /** Dataset identifier. */
6
+ id: string;
7
+ /** Dataset name as stored. Check `is_deleted` to determine whether the dataset is still active. */
8
+ name: string;
9
+ /** True when the dataset has been deleted. */
10
+ is_deleted?: boolean | undefined;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -26,6 +26,8 @@ export interface ConnectedEntity {
26
26
  association_type?: string | undefined;
27
27
  /** The entity type. */
28
28
  type: string;
29
+ /** External identifier for this entity. Null when not set. */
30
+ external_entity_id?: (string | null) | undefined;
29
31
  /**
30
32
  * The stored attributes for this entity. Present only when attributes exist in the database.
31
33
  *
@@ -9,5 +9,7 @@ export interface CreateEntityRequest {
9
9
  entity_type?: CatchAllApi.EntityType | undefined;
10
10
  /** Free-text description of the entity used for disambiguation when similar names exist. */
11
11
  description?: string | undefined;
12
+ /** Optional external identifier for this entity. Free-form string, not enforced as unique. Use it to store your own CRM, data warehouse, or internal database ID so you can join CatchAll results back to your systems. */
13
+ external_entity_id?: string | undefined;
12
14
  additional_attributes?: CatchAllApi.AdditionalAttributes | undefined;
13
15
  }
@@ -9,6 +9,8 @@ export interface EntityResponse {
9
9
  name: string;
10
10
  /** Free-text description. */
11
11
  description?: (string | null) | undefined;
12
+ /** External identifier for this entity. Null when not set. */
13
+ external_entity_id?: (string | null) | undefined;
12
14
  additional_attributes?: CatchAllApi.AdditionalAttributes | undefined;
13
15
  status: CatchAllApi.EntityStatus;
14
16
  /** ID of the user who created this entity. */
@@ -14,5 +14,7 @@ export interface EntitySummary {
14
14
  status: CatchAllApi.EntityStatus;
15
15
  /** Free-text description. */
16
16
  description?: (string | null) | undefined;
17
+ /** External identifier for this entity. Null when not set. */
18
+ external_entity_id?: (string | null) | undefined;
17
19
  attributes?: CatchAllApi.CompanyAttributes | undefined;
18
20
  }
@@ -37,6 +37,10 @@ export interface PullJobResponseDto {
37
37
  total_pages?: number | undefined;
38
38
  /** Processing mode used for this job. */
39
39
  mode?: PullJobResponseDto.Mode | undefined;
40
+ /** Datasets used to narrow retrieval scope, each with `id` and `name`. */
41
+ connected_datasets?: CatchAllApi.ConnectedDataset[] | undefined;
42
+ /** True when the query was submitted as an all-news (watchlist-generic) query. */
43
+ is_all_news_query?: boolean | undefined;
40
44
  /** Present when the job was shared with the authenticated user by another organization member. `null` when the user owns the job. */
41
45
  sharing_info?: (CatchAllApi.SharingInfo | null) | undefined;
42
46
  /** Array of extracted records with structured data and citations. */
@@ -21,6 +21,10 @@ export interface PullMonitorResponseDto {
21
21
  all_records?: CatchAllApi.MonitorRecord[] | undefined;
22
22
  /** Record limit applied to this monitor's jobs. */
23
23
  limit?: (number | null) | undefined;
24
+ /** Datasets used to narrow retrieval scope, each with `id` and `name`. */
25
+ connected_datasets?: CatchAllApi.ConnectedDataset[] | undefined;
26
+ /** True when the reference job was submitted as an all-news (watchlist-generic) query. */
27
+ is_all_news_query?: boolean | undefined;
24
28
  }
25
29
  export declare namespace PullMonitorResponseDto {
26
30
  /**
@@ -8,6 +8,7 @@ export * from "./BearerAuthDto.js";
8
8
  export * from "./Citation.js";
9
9
  export * from "./CompanyAttributes.js";
10
10
  export * from "./CompanyEnrichmentOutput.js";
11
+ export * from "./ConnectedDataset.js";
11
12
  export * from "./ConnectedEntity.js";
12
13
  export * from "./Context.js";
13
14
  export * from "./ContinueResponseDto.js";
@@ -24,6 +24,7 @@ __exportStar(require("./BearerAuthDto.js"), exports);
24
24
  __exportStar(require("./Citation.js"), exports);
25
25
  __exportStar(require("./CompanyAttributes.js"), exports);
26
26
  __exportStar(require("./CompanyEnrichmentOutput.js"), exports);
27
+ __exportStar(require("./ConnectedDataset.js"), exports);
27
28
  __exportStar(require("./ConnectedEntity.js"), exports);
28
29
  __exportStar(require("./Context.js"), exports);
29
30
  __exportStar(require("./ContinueResponseDto.js"), exports);
@@ -10,7 +10,7 @@ class CatchAllApiError extends Error {
10
10
  if (Error.captureStackTrace) {
11
11
  Error.captureStackTrace(this, this.constructor);
12
12
  }
13
- this.name = this.constructor.name;
13
+ this.name = "CatchAllApiError";
14
14
  this.statusCode = statusCode;
15
15
  this.body = body;
16
16
  this.rawResponse = rawResponse;
@@ -9,7 +9,7 @@ class CatchAllApiTimeoutError extends Error {
9
9
  if (Error.captureStackTrace) {
10
10
  Error.captureStackTrace(this, this.constructor);
11
11
  }
12
- this.name = this.constructor.name;
12
+ this.name = "CatchAllApiTimeoutError";
13
13
  if ((opts === null || opts === void 0 ? void 0 : opts.cause) != null) {
14
14
  this.cause = opts.cause;
15
15
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.0.1";
1
+ export declare const SDK_VERSION = "4.0.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "3.0.1";
4
+ exports.SDK_VERSION = "4.0.0";
@@ -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": "3.0.1",
10
- "User-Agent": "newscatcher-catchall-sdk/3.0.1",
9
+ "X-Fern-SDK-Version": "4.0.0",
10
+ "User-Agent": "newscatcher-catchall-sdk/4.0.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);
@@ -12,6 +12,6 @@ export class BadRequestError extends errors.CatchAllApiError {
12
12
  if (Error.captureStackTrace) {
13
13
  Error.captureStackTrace(this, this.constructor);
14
14
  }
15
- this.name = this.constructor.name;
15
+ this.name = "BadRequestError";
16
16
  }
17
17
  }
@@ -12,6 +12,6 @@ export class ForbiddenError extends errors.CatchAllApiError {
12
12
  if (Error.captureStackTrace) {
13
13
  Error.captureStackTrace(this, this.constructor);
14
14
  }
15
- this.name = this.constructor.name;
15
+ this.name = "ForbiddenError";
16
16
  }
17
17
  }
@@ -12,6 +12,6 @@ export class NotFoundError extends errors.CatchAllApiError {
12
12
  if (Error.captureStackTrace) {
13
13
  Error.captureStackTrace(this, this.constructor);
14
14
  }
15
- this.name = this.constructor.name;
15
+ this.name = "NotFoundError";
16
16
  }
17
17
  }
@@ -12,6 +12,6 @@ export class UnauthorizedError extends errors.CatchAllApiError {
12
12
  if (Error.captureStackTrace) {
13
13
  Error.captureStackTrace(this, this.constructor);
14
14
  }
15
- this.name = this.constructor.name;
15
+ this.name = "UnauthorizedError";
16
16
  }
17
17
  }
@@ -12,6 +12,6 @@ export class UnprocessableEntityError extends errors.CatchAllApiError {
12
12
  if (Error.captureStackTrace) {
13
13
  Error.captureStackTrace(this, this.constructor);
14
14
  }
15
- this.name = this.constructor.name;
15
+ this.name = "UnprocessableEntityError";
16
16
  }
17
17
  }
@@ -18,5 +18,7 @@ export interface UpdateEntityRequest {
18
18
  name?: string;
19
19
  /** Updated description. */
20
20
  description?: string;
21
+ /** Updated external identifier for this entity. */
22
+ external_entity_id?: string;
21
23
  additional_attributes?: CatchAllApi.AdditionalAttributes;
22
24
  }
@@ -117,6 +117,22 @@ export declare class JobsClient {
117
117
  */
118
118
  getJobResults(request: CatchAllApi.GetJobResultsRequest, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.PullJobResponseDto>;
119
119
  private __getJobResults;
120
+ /**
121
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
122
+ *
123
+ * @param {CatchAllApi.GetJobResultsCsvRequest} request
124
+ * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
125
+ *
126
+ * @throws {@link CatchAllApi.ForbiddenError}
127
+ * @throws {@link CatchAllApi.NotFoundError}
128
+ *
129
+ * @example
130
+ * await client.jobs.getJobResultsCsv({
131
+ * job_id: "job_id"
132
+ * })
133
+ */
134
+ getJobResultsCsv(request: CatchAllApi.GetJobResultsCsvRequest, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<string>;
135
+ private __getJobResultsCsv;
120
136
  /**
121
137
  * Continue an existing job to process more records beyond the initial limit.
122
138
  *
@@ -379,6 +379,61 @@ export class JobsClient {
379
379
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/catchAll/pull/{job_id}");
380
380
  });
381
381
  }
382
+ /**
383
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
384
+ *
385
+ * @param {CatchAllApi.GetJobResultsCsvRequest} request
386
+ * @param {JobsClient.RequestOptions} requestOptions - Request-specific configuration.
387
+ *
388
+ * @throws {@link CatchAllApi.ForbiddenError}
389
+ * @throws {@link CatchAllApi.NotFoundError}
390
+ *
391
+ * @example
392
+ * await client.jobs.getJobResultsCsv({
393
+ * job_id: "job_id"
394
+ * })
395
+ */
396
+ getJobResultsCsv(request, requestOptions) {
397
+ return core.HttpResponsePromise.fromPromise(this.__getJobResultsCsv(request, requestOptions));
398
+ }
399
+ __getJobResultsCsv(request, requestOptions) {
400
+ return __awaiter(this, void 0, void 0, function* () {
401
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
402
+ const { job_id: jobId } = request;
403
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
404
+ 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);
405
+ const _response = yield core.fetcher({
406
+ 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/pull/${core.url.encodePathParam(jobId)}/csv`),
407
+ method: "GET",
408
+ headers: _headers,
409
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
410
+ responseType: "text",
411
+ 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,
412
+ 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,
413
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
414
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
415
+ logging: this._options.logging,
416
+ });
417
+ if (_response.ok) {
418
+ return { data: _response.body, rawResponse: _response.rawResponse };
419
+ }
420
+ if (_response.error.reason === "status-code") {
421
+ switch (_response.error.statusCode) {
422
+ case 403:
423
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
424
+ case 404:
425
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
426
+ default:
427
+ throw new errors.CatchAllApiError({
428
+ statusCode: _response.error.statusCode,
429
+ body: _response.error.body,
430
+ rawResponse: _response.rawResponse,
431
+ });
432
+ }
433
+ }
434
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/catchAll/pull/{job_id}/csv");
435
+ });
436
+ }
382
437
  /**
383
438
  * Continue an existing job to process more records beyond the initial limit.
384
439
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * job_id: "job_id"
5
+ * }
6
+ */
7
+ export interface GetJobResultsCsvRequest {
8
+ /** Unique job identifier returned from [`POST /catchAll/submit`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/create-job). */
9
+ job_id: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,5 +1,6 @@
1
1
  export type { ContinueRequestDto } from "./ContinueRequestDto.mjs";
2
2
  export type { DeleteJobRequest } from "./DeleteJobRequest.mjs";
3
+ export type { GetJobResultsCsvRequest } from "./GetJobResultsCsvRequest.mjs";
3
4
  export type { GetJobResultsRequest } from "./GetJobResultsRequest.mjs";
4
5
  export type { GetJobStatusRequest } from "./GetJobStatusRequest.mjs";
5
6
  export type { GetUserJobsRequest } from "./GetUserJobsRequest.mjs";
@@ -65,6 +65,22 @@ export declare class MonitorsClient {
65
65
  */
66
66
  pullMonitorResults(request: CatchAllApi.PullMonitorResultsRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.PullMonitorResponseDto>;
67
67
  private __pullMonitorResults;
68
+ /**
69
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
70
+ *
71
+ * @param {CatchAllApi.PullMonitorResultsCsvRequest} request
72
+ * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
73
+ *
74
+ * @throws {@link CatchAllApi.ForbiddenError}
75
+ * @throws {@link CatchAllApi.NotFoundError}
76
+ *
77
+ * @example
78
+ * await client.monitors.pullMonitorResultsCsv({
79
+ * monitor_id: "monitor_id"
80
+ * })
81
+ */
82
+ pullMonitorResultsCsv(request: CatchAllApi.PullMonitorResultsCsvRequest, requestOptions?: MonitorsClient.RequestOptions): core.HttpResponsePromise<string>;
83
+ private __pullMonitorResultsCsv;
68
84
  /**
69
85
  * Return all jobs executed by a monitor.
70
86
  *
@@ -210,6 +210,61 @@ export class MonitorsClient {
210
210
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/catchAll/monitors/pull/{monitor_id}");
211
211
  });
212
212
  }
213
+ /**
214
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
215
+ *
216
+ * @param {CatchAllApi.PullMonitorResultsCsvRequest} request
217
+ * @param {MonitorsClient.RequestOptions} requestOptions - Request-specific configuration.
218
+ *
219
+ * @throws {@link CatchAllApi.ForbiddenError}
220
+ * @throws {@link CatchAllApi.NotFoundError}
221
+ *
222
+ * @example
223
+ * await client.monitors.pullMonitorResultsCsv({
224
+ * monitor_id: "monitor_id"
225
+ * })
226
+ */
227
+ pullMonitorResultsCsv(request, requestOptions) {
228
+ return core.HttpResponsePromise.fromPromise(this.__pullMonitorResultsCsv(request, requestOptions));
229
+ }
230
+ __pullMonitorResultsCsv(request, requestOptions) {
231
+ return __awaiter(this, void 0, void 0, function* () {
232
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
233
+ const { monitor_id: monitorId } = request;
234
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
235
+ 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);
236
+ const _response = yield core.fetcher({
237
+ 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/monitors/pull/${core.url.encodePathParam(monitorId)}/csv`),
238
+ method: "GET",
239
+ headers: _headers,
240
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
241
+ responseType: "text",
242
+ 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,
243
+ 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,
244
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
245
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
246
+ logging: this._options.logging,
247
+ });
248
+ if (_response.ok) {
249
+ return { data: _response.body, rawResponse: _response.rawResponse };
250
+ }
251
+ if (_response.error.reason === "status-code") {
252
+ switch (_response.error.statusCode) {
253
+ case 403:
254
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
255
+ case 404:
256
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
257
+ default:
258
+ throw new errors.CatchAllApiError({
259
+ statusCode: _response.error.statusCode,
260
+ body: _response.error.body,
261
+ rawResponse: _response.rawResponse,
262
+ });
263
+ }
264
+ }
265
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/catchAll/monitors/pull/{monitor_id}/csv");
266
+ });
267
+ }
213
268
  /**
214
269
  * Return all jobs executed by a monitor.
215
270
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * monitor_id: "monitor_id"
5
+ * }
6
+ */
7
+ export interface PullMonitorResultsCsvRequest {
8
+ /** Monitor identifier. */
9
+ monitor_id: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -5,5 +5,6 @@ export type { EnableMonitorRequestDto } from "./EnableMonitorRequestDto.mjs";
5
5
  export type { GetMonitorStatusHistoryRequest } from "./GetMonitorStatusHistoryRequest.mjs";
6
6
  export type { ListMonitorJobsRequest } from "./ListMonitorJobsRequest.mjs";
7
7
  export type { ListMonitorsRequest } from "./ListMonitorsRequest.mjs";
8
+ export type { PullMonitorResultsCsvRequest } from "./PullMonitorResultsCsvRequest.mjs";
8
9
  export type { PullMonitorResultsRequest } from "./PullMonitorResultsRequest.mjs";
9
10
  export type { UpdateMonitorRequestDto } from "./UpdateMonitorRequestDto.mjs";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A dataset used to narrow the retrieval scope of a job or monitor, returned with its identifier and name.
3
+ */
4
+ export interface ConnectedDataset {
5
+ /** Dataset identifier. */
6
+ id: string;
7
+ /** Dataset name as stored. Check `is_deleted` to determine whether the dataset is still active. */
8
+ name: string;
9
+ /** True when the dataset has been deleted. */
10
+ is_deleted?: boolean | undefined;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -26,6 +26,8 @@ export interface ConnectedEntity {
26
26
  association_type?: string | undefined;
27
27
  /** The entity type. */
28
28
  type: string;
29
+ /** External identifier for this entity. Null when not set. */
30
+ external_entity_id?: (string | null) | undefined;
29
31
  /**
30
32
  * The stored attributes for this entity. Present only when attributes exist in the database.
31
33
  *
@@ -9,5 +9,7 @@ export interface CreateEntityRequest {
9
9
  entity_type?: CatchAllApi.EntityType | undefined;
10
10
  /** Free-text description of the entity used for disambiguation when similar names exist. */
11
11
  description?: string | undefined;
12
+ /** Optional external identifier for this entity. Free-form string, not enforced as unique. Use it to store your own CRM, data warehouse, or internal database ID so you can join CatchAll results back to your systems. */
13
+ external_entity_id?: string | undefined;
12
14
  additional_attributes?: CatchAllApi.AdditionalAttributes | undefined;
13
15
  }
@@ -9,6 +9,8 @@ export interface EntityResponse {
9
9
  name: string;
10
10
  /** Free-text description. */
11
11
  description?: (string | null) | undefined;
12
+ /** External identifier for this entity. Null when not set. */
13
+ external_entity_id?: (string | null) | undefined;
12
14
  additional_attributes?: CatchAllApi.AdditionalAttributes | undefined;
13
15
  status: CatchAllApi.EntityStatus;
14
16
  /** ID of the user who created this entity. */
@@ -14,5 +14,7 @@ export interface EntitySummary {
14
14
  status: CatchAllApi.EntityStatus;
15
15
  /** Free-text description. */
16
16
  description?: (string | null) | undefined;
17
+ /** External identifier for this entity. Null when not set. */
18
+ external_entity_id?: (string | null) | undefined;
17
19
  attributes?: CatchAllApi.CompanyAttributes | undefined;
18
20
  }
@@ -37,6 +37,10 @@ export interface PullJobResponseDto {
37
37
  total_pages?: number | undefined;
38
38
  /** Processing mode used for this job. */
39
39
  mode?: PullJobResponseDto.Mode | undefined;
40
+ /** Datasets used to narrow retrieval scope, each with `id` and `name`. */
41
+ connected_datasets?: CatchAllApi.ConnectedDataset[] | undefined;
42
+ /** True when the query was submitted as an all-news (watchlist-generic) query. */
43
+ is_all_news_query?: boolean | undefined;
40
44
  /** Present when the job was shared with the authenticated user by another organization member. `null` when the user owns the job. */
41
45
  sharing_info?: (CatchAllApi.SharingInfo | null) | undefined;
42
46
  /** Array of extracted records with structured data and citations. */
@@ -21,6 +21,10 @@ export interface PullMonitorResponseDto {
21
21
  all_records?: CatchAllApi.MonitorRecord[] | undefined;
22
22
  /** Record limit applied to this monitor's jobs. */
23
23
  limit?: (number | null) | undefined;
24
+ /** Datasets used to narrow retrieval scope, each with `id` and `name`. */
25
+ connected_datasets?: CatchAllApi.ConnectedDataset[] | undefined;
26
+ /** True when the reference job was submitted as an all-news (watchlist-generic) query. */
27
+ is_all_news_query?: boolean | undefined;
24
28
  }
25
29
  export declare namespace PullMonitorResponseDto {
26
30
  /**
@@ -8,6 +8,7 @@ export * from "./BearerAuthDto.mjs";
8
8
  export * from "./Citation.mjs";
9
9
  export * from "./CompanyAttributes.mjs";
10
10
  export * from "./CompanyEnrichmentOutput.mjs";
11
+ export * from "./ConnectedDataset.mjs";
11
12
  export * from "./ConnectedEntity.mjs";
12
13
  export * from "./Context.mjs";
13
14
  export * from "./ContinueResponseDto.mjs";
@@ -8,6 +8,7 @@ export * from "./BearerAuthDto.mjs";
8
8
  export * from "./Citation.mjs";
9
9
  export * from "./CompanyAttributes.mjs";
10
10
  export * from "./CompanyEnrichmentOutput.mjs";
11
+ export * from "./ConnectedDataset.mjs";
11
12
  export * from "./ConnectedEntity.mjs";
12
13
  export * from "./Context.mjs";
13
14
  export * from "./ContinueResponseDto.mjs";
@@ -7,7 +7,7 @@ export class CatchAllApiError extends Error {
7
7
  if (Error.captureStackTrace) {
8
8
  Error.captureStackTrace(this, this.constructor);
9
9
  }
10
- this.name = this.constructor.name;
10
+ this.name = "CatchAllApiError";
11
11
  this.statusCode = statusCode;
12
12
  this.body = body;
13
13
  this.rawResponse = rawResponse;
@@ -6,7 +6,7 @@ export class CatchAllApiTimeoutError extends Error {
6
6
  if (Error.captureStackTrace) {
7
7
  Error.captureStackTrace(this, this.constructor);
8
8
  }
9
- this.name = this.constructor.name;
9
+ this.name = "CatchAllApiTimeoutError";
10
10
  if ((opts === null || opts === void 0 ? void 0 : opts.cause) != null) {
11
11
  this.cause = opts.cause;
12
12
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.0.1";
1
+ export declare const SDK_VERSION = "4.0.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "3.0.1";
1
+ export const SDK_VERSION = "4.0.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newscatcher-catchall-sdk",
3
- "version": "3.0.1",
3
+ "version": "4.0.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -394,6 +394,71 @@ await client.jobs.getJobResults({
394
394
  </dl>
395
395
 
396
396
 
397
+ </dd>
398
+ </dl>
399
+ </details>
400
+
401
+ <details><summary><code>client.jobs.<a href="/src/api/resources/jobs/client/Client.ts">getJobResultsCsv</a>({ ...params }) -> string</code></summary>
402
+ <dl>
403
+ <dd>
404
+
405
+ #### 📝 Description
406
+
407
+ <dl>
408
+ <dd>
409
+
410
+ <dl>
411
+ <dd>
412
+
413
+ Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
414
+ </dd>
415
+ </dl>
416
+ </dd>
417
+ </dl>
418
+
419
+ #### 🔌 Usage
420
+
421
+ <dl>
422
+ <dd>
423
+
424
+ <dl>
425
+ <dd>
426
+
427
+ ```typescript
428
+ await client.jobs.getJobResultsCsv({
429
+ job_id: "job_id"
430
+ });
431
+
432
+ ```
433
+ </dd>
434
+ </dl>
435
+ </dd>
436
+ </dl>
437
+
438
+ #### ⚙️ Parameters
439
+
440
+ <dl>
441
+ <dd>
442
+
443
+ <dl>
444
+ <dd>
445
+
446
+ **request:** `CatchAllApi.GetJobResultsCsvRequest`
447
+
448
+ </dd>
449
+ </dl>
450
+
451
+ <dl>
452
+ <dd>
453
+
454
+ **requestOptions:** `JobsClient.RequestOptions`
455
+
456
+ </dd>
457
+ </dl>
458
+ </dd>
459
+ </dl>
460
+
461
+
397
462
  </dd>
398
463
  </dl>
399
464
  </details>
@@ -730,6 +795,71 @@ await client.monitors.pullMonitorResults({
730
795
  </dl>
731
796
 
732
797
 
798
+ </dd>
799
+ </dl>
800
+ </details>
801
+
802
+ <details><summary><code>client.monitors.<a href="/src/api/resources/monitors/client/Client.ts">pullMonitorResultsCsv</a>({ ...params }) -> string</code></summary>
803
+ <dl>
804
+ <dd>
805
+
806
+ #### 📝 Description
807
+
808
+ <dl>
809
+ <dd>
810
+
811
+ <dl>
812
+ <dd>
813
+
814
+ Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
815
+ </dd>
816
+ </dl>
817
+ </dd>
818
+ </dl>
819
+
820
+ #### 🔌 Usage
821
+
822
+ <dl>
823
+ <dd>
824
+
825
+ <dl>
826
+ <dd>
827
+
828
+ ```typescript
829
+ await client.monitors.pullMonitorResultsCsv({
830
+ monitor_id: "monitor_id"
831
+ });
832
+
833
+ ```
834
+ </dd>
835
+ </dl>
836
+ </dd>
837
+ </dl>
838
+
839
+ #### ⚙️ Parameters
840
+
841
+ <dl>
842
+ <dd>
843
+
844
+ <dl>
845
+ <dd>
846
+
847
+ **request:** `CatchAllApi.PullMonitorResultsCsvRequest`
848
+
849
+ </dd>
850
+ </dl>
851
+
852
+ <dl>
853
+ <dd>
854
+
855
+ **requestOptions:** `MonitorsClient.RequestOptions`
856
+
857
+ </dd>
858
+ </dl>
859
+ </dd>
860
+ </dl>
861
+
862
+
733
863
  </dd>
734
864
  </dl>
735
865
  </details>