newscatcher-catchall-sdk 1.5.1 → 2.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 (57) hide show
  1. package/README.md +11 -2
  2. package/dist/cjs/BaseClient.d.ts +3 -0
  3. package/dist/cjs/BaseClient.js +17 -2
  4. package/dist/cjs/api/resources/datasets/client/Client.d.ts +30 -31
  5. package/dist/cjs/api/resources/datasets/client/Client.js +55 -64
  6. package/dist/cjs/api/resources/datasets/client/requests/ListDatasetEntitiesRequest.d.ts +28 -0
  7. package/dist/cjs/api/resources/datasets/client/requests/ListDatasetsRequest.d.ts +0 -1
  8. package/dist/cjs/api/resources/datasets/client/requests/index.d.ts +1 -1
  9. package/dist/cjs/api/resources/entities/client/Client.d.ts +3 -7
  10. package/dist/cjs/api/resources/entities/client/Client.js +3 -7
  11. package/dist/cjs/api/resources/jobs/client/Client.d.ts +2 -4
  12. package/dist/cjs/api/resources/jobs/client/Client.js +2 -4
  13. package/dist/cjs/api/resources/jobs/client/requests/GetUserJobsRequest.d.ts +0 -1
  14. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +7 -1
  15. package/dist/cjs/api/resources/monitors/client/Client.d.ts +2 -1
  16. package/dist/cjs/api/resources/monitors/client/Client.js +2 -1
  17. package/dist/cjs/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.ts +7 -4
  18. package/dist/cjs/api/resources/monitors/client/requests/ListMonitorsRequest.d.ts +0 -1
  19. package/dist/cjs/api/types/ConnectedEntity.d.ts +12 -9
  20. package/dist/cjs/core/auth/AuthProvider.d.ts +1 -0
  21. package/dist/cjs/core/auth/AuthProvider.js +7 -0
  22. package/dist/cjs/core/auth/index.d.ts +1 -1
  23. package/dist/cjs/core/auth/index.js +3 -1
  24. package/dist/cjs/core/fetcher/requestWithRetries.js +4 -1
  25. package/dist/cjs/version.d.ts +1 -1
  26. package/dist/cjs/version.js +1 -1
  27. package/dist/esm/BaseClient.d.mts +3 -0
  28. package/dist/esm/BaseClient.mjs +17 -2
  29. package/dist/esm/api/resources/datasets/client/Client.d.mts +30 -31
  30. package/dist/esm/api/resources/datasets/client/Client.mjs +55 -64
  31. package/dist/esm/api/resources/datasets/client/requests/ListDatasetEntitiesRequest.d.mts +28 -0
  32. package/dist/esm/api/resources/datasets/client/requests/ListDatasetsRequest.d.mts +0 -1
  33. package/dist/esm/api/resources/datasets/client/requests/index.d.mts +1 -1
  34. package/dist/esm/api/resources/entities/client/Client.d.mts +3 -7
  35. package/dist/esm/api/resources/entities/client/Client.mjs +3 -7
  36. package/dist/esm/api/resources/jobs/client/Client.d.mts +2 -4
  37. package/dist/esm/api/resources/jobs/client/Client.mjs +2 -4
  38. package/dist/esm/api/resources/jobs/client/requests/GetUserJobsRequest.d.mts +0 -1
  39. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +7 -1
  40. package/dist/esm/api/resources/monitors/client/Client.d.mts +2 -1
  41. package/dist/esm/api/resources/monitors/client/Client.mjs +2 -1
  42. package/dist/esm/api/resources/monitors/client/requests/CreateMonitorRequestDto.d.mts +7 -4
  43. package/dist/esm/api/resources/monitors/client/requests/ListMonitorsRequest.d.mts +0 -1
  44. package/dist/esm/api/types/ConnectedEntity.d.mts +12 -9
  45. package/dist/esm/core/auth/AuthProvider.d.mts +1 -0
  46. package/dist/esm/core/auth/AuthProvider.mjs +6 -1
  47. package/dist/esm/core/auth/index.d.mts +1 -1
  48. package/dist/esm/core/auth/index.mjs +1 -0
  49. package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -1
  50. package/dist/esm/version.d.mts +1 -1
  51. package/dist/esm/version.mjs +1 -1
  52. package/package.json +2 -2
  53. package/reference.md +35 -42
  54. package/dist/cjs/api/resources/datasets/client/requests/ListEntitiesInDatasetRequest.d.ts +0 -21
  55. package/dist/esm/api/resources/datasets/client/requests/ListEntitiesInDatasetRequest.d.mts +0 -21
  56. /package/dist/cjs/api/resources/datasets/client/requests/{ListEntitiesInDatasetRequest.js → ListDatasetEntitiesRequest.js} +0 -0
  57. /package/dist/esm/api/resources/datasets/client/requests/{ListEntitiesInDatasetRequest.mjs → ListDatasetEntitiesRequest.mjs} +0 -0
@@ -38,9 +38,7 @@ export class EntitiesClient {
38
38
  this._options = normalizeClientOptionsWithAuth(options);
39
39
  }
40
40
  /**
41
- * Returns a paginated list of entities belonging to the authenticated
42
- * organization. Supports filtering by status and entity type, and
43
- * sorting by name, status, or creation date.
41
+ * Returns a paginated list of entities belonging to the authenticated organization. Supports filtering by status and entity type, and sorting by name, status, or creation date.
44
42
  *
45
43
  * @param {CatchAllApi.ListEntitiesRequest} request
46
44
  * @param {EntitiesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -174,11 +172,9 @@ export class EntitiesClient {
174
172
  });
175
173
  }
176
174
  /**
177
- * Creates multiple entities in a single request. Each entity is
178
- * processed independently — a failure in one does not affect others.
175
+ * Creates multiple entities in a single request. Each entity is processed independently — a failure in one does not affect others.
179
176
  *
180
- * Returns an array of `{id, status}` objects in the same order as
181
- * the input array.
177
+ * Returns an array of `{id, status}` objects in the same order as the input array.
182
178
  *
183
179
  * @param {CatchAllApi.CreateEntitiesBatchRequest} request
184
180
  * @param {EntitiesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -116,11 +116,9 @@ export declare class JobsClient {
116
116
  continueJob(request: CatchAllApi.ContinueRequestDto, requestOptions?: JobsClient.RequestOptions): core.HttpResponsePromise<CatchAllApi.ContinueResponseDto>;
117
117
  private __continueJob;
118
118
  /**
119
- * Soft-deletes a job. The job is flagged as deleted and no longer
120
- * appears in list results. The underlying data is retained.
119
+ * Soft-deletes a job. The job is flagged as deleted and no longer appears in list results. The underlying data is retained.
121
120
  *
122
- * Only the job owner can delete a job. Returns `404` if the job is not
123
- * found or does not belong to the authenticated user.
121
+ * Only the job owner can delete a job. Returns `404` if the job is not found or does not belong to the authenticated user.
124
122
  *
125
123
  * Deleting an already-deleted job returns `200`.
126
124
  *
@@ -379,11 +379,9 @@ export class JobsClient {
379
379
  });
380
380
  }
381
381
  /**
382
- * Soft-deletes a job. The job is flagged as deleted and no longer
383
- * appears in list results. The underlying data is retained.
382
+ * Soft-deletes a job. The job is flagged as deleted and no longer appears in list results. The underlying data is retained.
384
383
  *
385
- * Only the job owner can delete a job. Returns `404` if the job is not
386
- * found or does not belong to the authenticated user.
384
+ * Only the job owner can delete a job. Returns `404` if the job is not found or does not belong to the authenticated user.
387
385
  *
388
386
  * Deleting an already-deleted job returns `200`.
389
387
  *
@@ -10,6 +10,5 @@ export interface GetUserJobsRequest {
10
10
  page_size?: number;
11
11
  /** Filter results by text (case-insensitive substring match). */
12
12
  search?: string;
13
- /** Filter results by ownership. Defaults to `all`. */
14
13
  ownership?: CatchAllApi.OwnershipFilter;
15
14
  }
@@ -36,11 +36,17 @@ export interface SubmitRequestDto {
36
36
  */
37
37
  mode?: SubmitRequestDto.Mode;
38
38
  /**
39
- * Dataset IDs to connect to this job. When provided, activates Company Watchlist mode — the job returns only events relevant to companies in the connected datasets with each record including a `connected_entities` array scored per company.
39
+ * Dataset IDs to connect to the job. When provided, this enables Company Watchlist mode — the job returns only events relevant to companies in the connected datasets. To set the minimum relevance threshold, use `ed_score_min`.
40
40
  *
41
41
  * The dataset must have `latest_status: ready` before the job is submitted. Submitting with a non-existent or inaccessible dataset ID returns `400`.
42
42
  */
43
43
  connected_dataset_ids?: string[];
44
+ /**
45
+ * The minimum relevance score a connected entity must reach for its record to be included in results.
46
+ *
47
+ * Only valid when `connected_dataset_ids` is set; otherwise ignored. Records where no connected entity meets the threshold are excluded entirely.
48
+ */
49
+ ed_score_min?: number;
44
50
  }
45
51
  export declare namespace SubmitRequestDto {
46
52
  /**
@@ -38,7 +38,8 @@ export declare class MonitorsClient {
38
38
  * @example
39
39
  * await client.monitors.createMonitor({
40
40
  * reference_job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
41
- * schedule: "every day at 12 PM UTC",
41
+ * schedule: "every day at 12 PM",
42
+ * timezone: "UTC",
42
43
  * webhook: {
43
44
  * url: "https://your-endpoint.com/webhook",
44
45
  * method: "POST",
@@ -106,7 +106,8 @@ export class MonitorsClient {
106
106
  * @example
107
107
  * await client.monitors.createMonitor({
108
108
  * reference_job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
109
- * schedule: "every day at 12 PM UTC",
109
+ * schedule: "every day at 12 PM",
110
+ * timezone: "UTC",
110
111
  * webhook: {
111
112
  * url: "https://your-endpoint.com/webhook",
112
113
  * method: "POST",
@@ -3,7 +3,8 @@ import type * as CatchAllApi from "../../../../index.mjs";
3
3
  * @example
4
4
  * {
5
5
  * reference_job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
6
- * schedule: "every day at 12 PM UTC",
6
+ * schedule: "every day at 12 PM",
7
+ * timezone: "UTC",
7
8
  * webhook: {
8
9
  * url: "https://your-endpoint.com/webhook",
9
10
  * method: "POST",
@@ -22,12 +23,14 @@ export interface CreateMonitorRequestDto {
22
23
  * If [`backfill`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/monitors/create-monitor#body-backfill) is true, the job's `end_date` must be within the last 7 days.
23
24
  */
24
25
  reference_job_id: string;
26
+ /** Monitor schedule in plain text format. Minimum frequency depends on your plan. */
27
+ schedule: string;
25
28
  /**
26
- * Monitor schedule in plain text format (e.g. 'every day at 12 PM UTC', 'every 48 hours').
29
+ * The IANA timezone identifier used as the fallback when the `schedule` string does not include an explicit timezone.
27
30
  *
28
- * Minimum frequency depends on your plan.
31
+ * If the schedule includes a timezone abbreviation (for example, `"every day at 9am EST"`), the parsed timezone takes priority and this value is ignored.
29
32
  */
30
- schedule: string;
33
+ timezone?: string;
31
34
  /** Optional webhook to receive notifications when jobs complete. */
32
35
  webhook?: CatchAllApi.WebhookDto;
33
36
  /** Maximum number of records per monitor run. If not provided, defaults to the plan limit. */
@@ -10,6 +10,5 @@ export interface ListMonitorsRequest {
10
10
  page_size?: number;
11
11
  /** Filter results by text (case-insensitive substring match). */
12
12
  search?: string;
13
- /** Filter results by ownership. Defaults to `all`. */
14
13
  ownership?: CatchAllApi.OwnershipFilter;
15
14
  }
@@ -1,9 +1,8 @@
1
+ import type * as CatchAllApi from "../index.mjs";
1
2
  /**
2
- * A company entity matched to a record in a Company Watchlist job, with
3
- * a relevance score and explanation.
3
+ * A company entity matched to a record in a Company Watchlist job, with a relevance score and explanation.
4
4
  *
5
- * Only entities with `ed_score` ≥ 1 appear in results. Entities scored
6
- * 0 are filtered out before the response is returned.
5
+ * Only entities with `ed_score` ≥ 1 appear in results. Entities scored 0 are filtered out before the response is returned. When `ed_score_min` is set at submission time, entities below that threshold are excluded.
7
6
  */
8
7
  export interface ConnectedEntity {
9
8
  /** Unique identifier of the matched entity. */
@@ -11,8 +10,7 @@ export interface ConnectedEntity {
11
10
  /** Name of the matched entity. */
12
11
  name: string;
13
12
  /**
14
- * Relevance score indicating how directly the entity is associated
15
- * with this event.
13
+ * Relevance score indicating how directly the entity is associated with this event.
16
14
  *
17
15
  * | Score | Meaning |
18
16
  * |-------|---------|
@@ -22,9 +20,14 @@ export interface ConnectedEntity {
22
20
  * | 1–3 | Indirect mention (listed with others, stock noise) |
23
21
  */
24
22
  ed_score: number;
23
+ /** Short explanation (up to 100 characters) of why this entity is associated with the event. */
24
+ relation: string;
25
+ /** The entity type. */
26
+ type: string;
25
27
  /**
26
- * Short explanation (up to 100 characters) of why this entity is
27
- * associated with the event.
28
+ * The stored attributes for this entity. Present only when attributes exist in the database.
29
+ *
30
+ * The field name matches the value of `type` — for example, `"company"` type entities have a `company` field.
28
31
  */
29
- relation: string;
32
+ company?: CatchAllApi.CompanyAttributes | undefined;
30
33
  }
@@ -5,3 +5,4 @@ export interface AuthProvider {
5
5
  endpointMetadata?: EndpointMetadata;
6
6
  }): Promise<AuthRequest>;
7
7
  }
8
+ export declare function isAuthProvider(value: unknown): value is AuthProvider;
@@ -1 +1,6 @@
1
- export {};
1
+ export function isAuthProvider(value) {
2
+ return (typeof value === "object" &&
3
+ value !== null &&
4
+ "getAuthRequest" in value &&
5
+ typeof value.getAuthRequest === "function");
6
+ }
@@ -1,4 +1,4 @@
1
- export type { AuthProvider } from "./AuthProvider.mjs";
1
+ export { type AuthProvider, isAuthProvider } from "./AuthProvider.mjs";
2
2
  export type { AuthRequest } from "./AuthRequest.mjs";
3
3
  export { BasicAuth } from "./BasicAuth.mjs";
4
4
  export { BearerToken } from "./BearerToken.mjs";
@@ -1,3 +1,4 @@
1
+ export { isAuthProvider } from "./AuthProvider.mjs";
1
2
  export { BasicAuth } from "./BasicAuth.mjs";
2
3
  export { BearerToken } from "./BearerToken.mjs";
3
4
  export { NoOpAuthProvider } from "./NoOpAuthProvider.mjs";
@@ -11,6 +11,9 @@ const INITIAL_RETRY_DELAY = 1000; // in milliseconds
11
11
  const MAX_RETRY_DELAY = 60000; // in milliseconds
12
12
  const DEFAULT_MAX_RETRIES = 2;
13
13
  const JITTER_FACTOR = 0.2; // 20% random jitter
14
+ function isRetryableStatusCode(statusCode) {
15
+ return [408, 429].includes(statusCode) || statusCode >= 500;
16
+ }
14
17
  function addPositiveJitter(delay) {
15
18
  const jitterMultiplier = 1 + Math.random() * JITTER_FACTOR;
16
19
  return delay * jitterMultiplier;
@@ -50,7 +53,7 @@ export function requestWithRetries(requestFn_1) {
50
53
  return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
51
54
  let response = yield requestFn();
52
55
  for (let i = 0; i < maxRetries; ++i) {
53
- if ([408, 429].includes(response.status) || response.status >= 500) {
56
+ if (isRetryableStatusCode(response.status)) {
54
57
  const delay = getRetryDelayFromHeaders(response, i);
55
58
  yield new Promise((resolve) => setTimeout(resolve, delay));
56
59
  response = yield requestFn();
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.5.1";
1
+ export declare const SDK_VERSION = "2.0.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.5.1";
1
+ export const SDK_VERSION = "2.0.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newscatcher-catchall-sdk",
3
- "version": "1.5.1",
3
+ "version": "2.0.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -106,7 +106,7 @@
106
106
  "ts-loader": "^9.5.4",
107
107
  "vitest": "^4.1.1",
108
108
  "msw": "2.11.2",
109
- "@types/node": "^18.19.70",
109
+ "@types/node": "^20.0.0",
110
110
  "typescript": "~5.9.3",
111
111
  "@biomejs/biome": "2.4.10"
112
112
  },
package/reference.md CHANGED
@@ -407,11 +407,9 @@ await client.jobs.continueJob({
407
407
  <dl>
408
408
  <dd>
409
409
 
410
- Soft-deletes a job. The job is flagged as deleted and no longer
411
- appears in list results. The underlying data is retained.
410
+ Soft-deletes a job. The job is flagged as deleted and no longer appears in list results. The underlying data is retained.
412
411
 
413
- Only the job owner can delete a job. Returns `404` if the job is not
414
- found or does not belong to the authenticated user.
412
+ Only the job owner can delete a job. Returns `404` if the job is not found or does not belong to the authenticated user.
415
413
 
416
414
  Deleting an already-deleted job returns `200`.
417
415
  </dd>
@@ -559,7 +557,8 @@ Create a scheduled monitor based on a reference job.
559
557
  ```typescript
560
558
  await client.monitors.createMonitor({
561
559
  reference_job_id: "5f0c9087-85cb-4917-b3c7-e5a5eff73a0c",
562
- schedule: "every day at 12 PM UTC",
560
+ schedule: "every day at 12 PM",
561
+ timezone: "UTC",
563
562
  webhook: {
564
563
  url: "https://your-endpoint.com/webhook",
565
564
  method: "POST",
@@ -1088,9 +1087,7 @@ await client.monitors.updateMonitor({
1088
1087
  <dl>
1089
1088
  <dd>
1090
1089
 
1091
- Returns a paginated list of entities belonging to the authenticated
1092
- organization. Supports filtering by status and entity type, and
1093
- sorting by name, status, or creation date.
1090
+ Returns a paginated list of entities belonging to the authenticated organization. Supports filtering by status and entity type, and sorting by name, status, or creation date.
1094
1091
  </dd>
1095
1092
  </dl>
1096
1093
  </dd>
@@ -1234,11 +1231,9 @@ await client.entities.createEntity({
1234
1231
  <dl>
1235
1232
  <dd>
1236
1233
 
1237
- Creates multiple entities in a single request. Each entity is
1238
- processed independently — a failure in one does not affect others.
1234
+ Creates multiple entities in a single request. Each entity is processed independently — a failure in one does not affect others.
1239
1235
 
1240
- Returns an array of `{id, status}` objects in the same order as
1241
- the input array.
1236
+ Returns an array of `{id, status}` objects in the same order as the input array.
1242
1237
  </dd>
1243
1238
  </dl>
1244
1239
  </dd>
@@ -1527,9 +1522,7 @@ await client.entities.updateEntity({
1527
1522
  <dl>
1528
1523
  <dd>
1529
1524
 
1530
- Returns a paginated list of datasets belonging to the authenticated
1531
- organization. Supports filtering by status and sorting by name,
1532
- status, or creation date.
1525
+ Returns a paginated list of datasets belonging to the authenticated organization. Supports filtering by status and sorting by name, status, or creation date.
1533
1526
  </dd>
1534
1527
  </dl>
1535
1528
  </dd>
@@ -1668,9 +1661,7 @@ await client.datasets.createDataset({
1668
1661
  <dl>
1669
1662
  <dd>
1670
1663
 
1671
- Creates a new dataset by uploading a CSV file. Each row in the CSV
1672
- becomes an entity. The `name` column is required; all other columns
1673
- are optional.
1664
+ Creates a new dataset by uploading a CSV file. Each row in the CSV becomes an entity. The `name` and `domain`columns are required; all other columns are optional.
1674
1665
 
1675
1666
  **CSV format:**
1676
1667
  ```csv
@@ -1934,7 +1925,7 @@ await client.datasets.updateDataset({
1934
1925
  </dl>
1935
1926
  </details>
1936
1927
 
1937
- <details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">listEntitiesInDataset</a>({ ...params }) -> CatchAllApi.DatasetEntityListResponse</code></summary>
1928
+ <details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">addEntitiesToDataset</a>({ ...params }) -> CatchAllApi.ManageEntitiesResponse</code></summary>
1938
1929
  <dl>
1939
1930
  <dd>
1940
1931
 
@@ -1946,7 +1937,7 @@ await client.datasets.updateDataset({
1946
1937
  <dl>
1947
1938
  <dd>
1948
1939
 
1949
- Returns a paginated list of entities in a dataset. Supports filtering by status and entity type.
1940
+ Adds one or more existing entities to a dataset. Returns the number of entities added.
1950
1941
  </dd>
1951
1942
  </dl>
1952
1943
  </dd>
@@ -1961,8 +1952,11 @@ Returns a paginated list of entities in a dataset. Supports filtering by status
1961
1952
  <dd>
1962
1953
 
1963
1954
  ```typescript
1964
- await client.datasets.listEntitiesInDataset({
1965
- dataset_id: "ccabb755-afc2-4047-b84c-78d1f23d49b2"
1955
+ await client.datasets.addEntitiesToDataset({
1956
+ dataset_id: "ccabb755-afc2-4047-b84c-78d1f23d49b2",
1957
+ body: {
1958
+ entity_ids: ["854198fa-f702-49db-a381-0427fa87f173"]
1959
+ }
1966
1960
  });
1967
1961
 
1968
1962
  ```
@@ -1979,7 +1973,7 @@ await client.datasets.listEntitiesInDataset({
1979
1973
  <dl>
1980
1974
  <dd>
1981
1975
 
1982
- **request:** `CatchAllApi.ListEntitiesInDatasetRequest`
1976
+ **request:** `CatchAllApi.AddEntitiesToDatasetRequest`
1983
1977
 
1984
1978
  </dd>
1985
1979
  </dl>
@@ -1999,7 +1993,7 @@ await client.datasets.listEntitiesInDataset({
1999
1993
  </dl>
2000
1994
  </details>
2001
1995
 
2002
- <details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">addEntitiesToDataset</a>({ ...params }) -> CatchAllApi.ManageEntitiesResponse</code></summary>
1996
+ <details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">removeEntitiesFromDataset</a>({ ...params }) -> CatchAllApi.ManageEntitiesResponse</code></summary>
2003
1997
  <dl>
2004
1998
  <dd>
2005
1999
 
@@ -2011,7 +2005,7 @@ await client.datasets.listEntitiesInDataset({
2011
2005
  <dl>
2012
2006
  <dd>
2013
2007
 
2014
- Adds one or more existing entities to a dataset. Returns the number of entities added.
2008
+ Removes one or more entities from a dataset. The entities themselves are not deleted — they are only removed from this dataset. Returns the number of entities removed.
2015
2009
  </dd>
2016
2010
  </dl>
2017
2011
  </dd>
@@ -2026,7 +2020,7 @@ Adds one or more existing entities to a dataset. Returns the number of entities
2026
2020
  <dd>
2027
2021
 
2028
2022
  ```typescript
2029
- await client.datasets.addEntitiesToDataset({
2023
+ await client.datasets.removeEntitiesFromDataset({
2030
2024
  dataset_id: "ccabb755-afc2-4047-b84c-78d1f23d49b2",
2031
2025
  body: {
2032
2026
  entity_ids: ["854198fa-f702-49db-a381-0427fa87f173"]
@@ -2047,7 +2041,7 @@ await client.datasets.addEntitiesToDataset({
2047
2041
  <dl>
2048
2042
  <dd>
2049
2043
 
2050
- **request:** `CatchAllApi.AddEntitiesToDatasetRequest`
2044
+ **request:** `CatchAllApi.RemoveEntitiesFromDatasetRequest`
2051
2045
 
2052
2046
  </dd>
2053
2047
  </dl>
@@ -2067,7 +2061,7 @@ await client.datasets.addEntitiesToDataset({
2067
2061
  </dl>
2068
2062
  </details>
2069
2063
 
2070
- <details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">removeEntitiesFromDataset</a>({ ...params }) -> CatchAllApi.ManageEntitiesResponse</code></summary>
2064
+ <details><summary><code>client.datasets.<a href="/src/api/resources/datasets/client/Client.ts">listEntitiesInDataset</a>({ ...params }) -> CatchAllApi.DatasetEntityListResponse</code></summary>
2071
2065
  <dl>
2072
2066
  <dd>
2073
2067
 
@@ -2079,9 +2073,7 @@ await client.datasets.addEntitiesToDataset({
2079
2073
  <dl>
2080
2074
  <dd>
2081
2075
 
2082
- Removes one or more entities from a dataset. The entities themselves
2083
- are not deleted — they are only removed from this dataset. Returns
2084
- the number of entities removed.
2076
+ Returns a paginated list of entities in a dataset. Supports filtering by status, entity type, and name search.
2085
2077
  </dd>
2086
2078
  </dl>
2087
2079
  </dd>
@@ -2096,11 +2088,15 @@ the number of entities removed.
2096
2088
  <dd>
2097
2089
 
2098
2090
  ```typescript
2099
- await client.datasets.removeEntitiesFromDataset({
2091
+ await client.datasets.listEntitiesInDataset({
2100
2092
  dataset_id: "ccabb755-afc2-4047-b84c-78d1f23d49b2",
2101
- body: {
2102
- entity_ids: ["854198fa-f702-49db-a381-0427fa87f173"]
2103
- }
2093
+ page: 1,
2094
+ page_size: 100,
2095
+ search: "OpenAI",
2096
+ status: "ready",
2097
+ entity_type: "company",
2098
+ sort_by: "created_at",
2099
+ sort_order: "desc"
2104
2100
  });
2105
2101
 
2106
2102
  ```
@@ -2117,7 +2113,7 @@ await client.datasets.removeEntitiesFromDataset({
2117
2113
  <dl>
2118
2114
  <dd>
2119
2115
 
2120
- **request:** `CatchAllApi.RemoveEntitiesFromDatasetRequest`
2116
+ **request:** `CatchAllApi.ListDatasetEntitiesRequest`
2121
2117
 
2122
2118
  </dd>
2123
2119
  </dl>
@@ -2149,8 +2145,7 @@ await client.datasets.removeEntitiesFromDataset({
2149
2145
  <dl>
2150
2146
  <dd>
2151
2147
 
2152
- Returns the full status change history for a dataset, ordered
2153
- chronologically from oldest to newest.
2148
+ Returns the full status change history for a dataset, ordered chronologically from oldest to newest.
2154
2149
  </dd>
2155
2150
  </dl>
2156
2151
  </dd>
@@ -2215,11 +2210,9 @@ await client.datasets.getDatasetStatusHistory({
2215
2210
  <dl>
2216
2211
  <dd>
2217
2212
 
2218
- Appends new companies to an existing dataset by uploading a CSV file.
2219
- Uses the same CSV format as the dataset creation endpoint.
2213
+ Appends new companies to an existing dataset by uploading a CSV file. Uses the same CSV format as the dataset creation endpoint.
2220
2214
 
2221
- The response omits `dataset_name` compared to the create-from-CSV
2222
- endpoint since the dataset already exists.
2215
+ The response omits `dataset_name` compared to the create-from-CSV endpoint since the dataset already exists.
2223
2216
  </dd>
2224
2217
  </dl>
2225
2218
  </dd>
@@ -1,21 +0,0 @@
1
- import type * as CatchAllApi from "../../../../index.js";
2
- /**
3
- * @example
4
- * {
5
- * dataset_id: "ccabb755-afc2-4047-b84c-78d1f23d49b2"
6
- * }
7
- */
8
- export interface ListEntitiesInDatasetRequest {
9
- /** Unique dataset identifier. */
10
- dataset_id: string;
11
- /** Page number to retrieve. */
12
- page?: number;
13
- /** Number of entities per page. */
14
- page_size?: number;
15
- /** Filter entities by name. */
16
- search?: string;
17
- status?: CatchAllApi.EntityStatus;
18
- entity_type?: CatchAllApi.EntityType;
19
- sort_by?: CatchAllApi.EntitySortBy;
20
- sort_order?: CatchAllApi.SortOrder;
21
- }
@@ -1,21 +0,0 @@
1
- import type * as CatchAllApi from "../../../../index.mjs";
2
- /**
3
- * @example
4
- * {
5
- * dataset_id: "ccabb755-afc2-4047-b84c-78d1f23d49b2"
6
- * }
7
- */
8
- export interface ListEntitiesInDatasetRequest {
9
- /** Unique dataset identifier. */
10
- dataset_id: string;
11
- /** Page number to retrieve. */
12
- page?: number;
13
- /** Number of entities per page. */
14
- page_size?: number;
15
- /** Filter entities by name. */
16
- search?: string;
17
- status?: CatchAllApi.EntityStatus;
18
- entity_type?: CatchAllApi.EntityType;
19
- sort_by?: CatchAllApi.EntitySortBy;
20
- sort_order?: CatchAllApi.SortOrder;
21
- }