@linkt/sdk 0.4.0 → 0.6.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 (55) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/client.d.mts +4 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +4 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +11 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +11 -2
  9. package/client.mjs.map +1 -1
  10. package/internal/parse.d.mts.map +1 -1
  11. package/internal/parse.d.ts.map +1 -1
  12. package/internal/parse.js +5 -0
  13. package/internal/parse.js.map +1 -1
  14. package/internal/parse.mjs +5 -0
  15. package/internal/parse.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/entity.d.mts +165 -27
  18. package/resources/entity.d.mts.map +1 -1
  19. package/resources/entity.d.ts +165 -27
  20. package/resources/entity.d.ts.map +1 -1
  21. package/resources/entity.js +32 -14
  22. package/resources/entity.js.map +1 -1
  23. package/resources/entity.mjs +32 -14
  24. package/resources/entity.mjs.map +1 -1
  25. package/resources/index.d.mts +1 -0
  26. package/resources/index.d.mts.map +1 -1
  27. package/resources/index.d.ts +1 -0
  28. package/resources/index.d.ts.map +1 -1
  29. package/resources/index.js +3 -1
  30. package/resources/index.js.map +1 -1
  31. package/resources/index.mjs +1 -0
  32. package/resources/index.mjs.map +1 -1
  33. package/resources/schedule.d.mts +308 -0
  34. package/resources/schedule.d.mts.map +1 -0
  35. package/resources/schedule.d.ts +308 -0
  36. package/resources/schedule.d.ts.map +1 -0
  37. package/resources/schedule.js +84 -0
  38. package/resources/schedule.js.map +1 -0
  39. package/resources/schedule.mjs +80 -0
  40. package/resources/schedule.mjs.map +1 -0
  41. package/resources/signal.d.mts +1 -0
  42. package/resources/signal.d.mts.map +1 -1
  43. package/resources/signal.d.ts +1 -0
  44. package/resources/signal.d.ts.map +1 -1
  45. package/src/client.ts +32 -2
  46. package/src/internal/parse.ts +6 -0
  47. package/src/resources/entity.ts +183 -27
  48. package/src/resources/index.ts +10 -0
  49. package/src/resources/schedule.ts +378 -0
  50. package/src/resources/signal.ts +2 -0
  51. package/src/version.ts +1 -1
  52. package/version.d.mts +1 -1
  53. package/version.d.ts +1 -1
  54. package/version.js +1 -1
  55. package/version.mjs +1 -1
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Schedule = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const headers_1 = require("../internal/headers.js");
7
+ const path_1 = require("../internal/utils/path.js");
8
+ class Schedule extends resource_1.APIResource {
9
+ /**
10
+ * Create a new schedule.
11
+ *
12
+ * The cron expression must be a daily, weekly, or monthly pattern. For signal
13
+ * tasks, the cron frequency must match the task's monitoring_frequency.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const scheduleResponse = await client.schedule.create({
18
+ * cron_expression: 'cron_expression',
19
+ * icp_id: '5eb7cf5a86d9755df3a6c593',
20
+ * name: 'x',
21
+ * task_id: '5eb7cf5a86d9755df3a6c593',
22
+ * });
23
+ * ```
24
+ */
25
+ create(body, options) {
26
+ return this._client.post('/v1/schedule', { body, ...options });
27
+ }
28
+ /**
29
+ * Get a specific schedule by ID.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const scheduleResponse = await client.schedule.retrieve(
34
+ * '5eb7cf5a86d9755df3a6c593',
35
+ * );
36
+ * ```
37
+ */
38
+ retrieve(scheduleID, options) {
39
+ return this._client.get((0, path_1.path) `/v1/schedule/${scheduleID}`, options);
40
+ }
41
+ /**
42
+ * Update a schedule.
43
+ *
44
+ * Only provided fields will be updated. The cron expression is validated for
45
+ * frequency restrictions.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const scheduleResponse = await client.schedule.update(
50
+ * '5eb7cf5a86d9755df3a6c593',
51
+ * );
52
+ * ```
53
+ */
54
+ update(scheduleID, body, options) {
55
+ return this._client.patch((0, path_1.path) `/v1/schedule/${scheduleID}`, { body, ...options });
56
+ }
57
+ /**
58
+ * List schedules with pagination and optional filters.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * const scheduleListResponse = await client.schedule.list();
63
+ * ```
64
+ */
65
+ list(query = {}, options) {
66
+ return this._client.get('/v1/schedule', { query, ...options });
67
+ }
68
+ /**
69
+ * Delete a schedule.
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * await client.schedule.delete('5eb7cf5a86d9755df3a6c593');
74
+ * ```
75
+ */
76
+ delete(scheduleID, options) {
77
+ return this._client.delete((0, path_1.path) `/v1/schedule/${scheduleID}`, {
78
+ ...options,
79
+ headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
80
+ });
81
+ }
82
+ }
83
+ exports.Schedule = Schedule;
84
+ //# sourceMappingURL=schedule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule.js","sourceRoot":"","sources":["../src/resources/schedule.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,UAAkB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,UAAkB,EAClB,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,gBAAgB,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,UAAkB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,gBAAgB,UAAU,EAAE,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AArFD,4BAqFC"}
@@ -0,0 +1,80 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { buildHeaders } from "../internal/headers.mjs";
4
+ import { path } from "../internal/utils/path.mjs";
5
+ export class Schedule extends APIResource {
6
+ /**
7
+ * Create a new schedule.
8
+ *
9
+ * The cron expression must be a daily, weekly, or monthly pattern. For signal
10
+ * tasks, the cron frequency must match the task's monitoring_frequency.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const scheduleResponse = await client.schedule.create({
15
+ * cron_expression: 'cron_expression',
16
+ * icp_id: '5eb7cf5a86d9755df3a6c593',
17
+ * name: 'x',
18
+ * task_id: '5eb7cf5a86d9755df3a6c593',
19
+ * });
20
+ * ```
21
+ */
22
+ create(body, options) {
23
+ return this._client.post('/v1/schedule', { body, ...options });
24
+ }
25
+ /**
26
+ * Get a specific schedule by ID.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const scheduleResponse = await client.schedule.retrieve(
31
+ * '5eb7cf5a86d9755df3a6c593',
32
+ * );
33
+ * ```
34
+ */
35
+ retrieve(scheduleID, options) {
36
+ return this._client.get(path `/v1/schedule/${scheduleID}`, options);
37
+ }
38
+ /**
39
+ * Update a schedule.
40
+ *
41
+ * Only provided fields will be updated. The cron expression is validated for
42
+ * frequency restrictions.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const scheduleResponse = await client.schedule.update(
47
+ * '5eb7cf5a86d9755df3a6c593',
48
+ * );
49
+ * ```
50
+ */
51
+ update(scheduleID, body, options) {
52
+ return this._client.patch(path `/v1/schedule/${scheduleID}`, { body, ...options });
53
+ }
54
+ /**
55
+ * List schedules with pagination and optional filters.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * const scheduleListResponse = await client.schedule.list();
60
+ * ```
61
+ */
62
+ list(query = {}, options) {
63
+ return this._client.get('/v1/schedule', { query, ...options });
64
+ }
65
+ /**
66
+ * Delete a schedule.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * await client.schedule.delete('5eb7cf5a86d9755df3a6c593');
71
+ * ```
72
+ */
73
+ delete(scheduleID, options) {
74
+ return this._client.delete(path `/v1/schedule/${scheduleID}`, {
75
+ ...options,
76
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
77
+ });
78
+ }
79
+ }
80
+ //# sourceMappingURL=schedule.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schedule.mjs","sourceRoot":"","sources":["../src/resources/schedule.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,UAAkB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,UAAkB,EAClB,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,gBAAgB,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAA+C,EAAE,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,UAAkB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,gBAAgB,UAAU,EAAE,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -24,6 +24,7 @@ export interface SignalResponse {
24
24
  entity_ids: Array<string>;
25
25
  icp_id: string;
26
26
  references: Array<string>;
27
+ score: number | null;
27
28
  signal_type: string | null;
28
29
  strength: string | null;
29
30
  summary: string;
@@ -1 +1 @@
1
- {"version":3,"file":"signal.d.mts","sourceRoot":"","sources":["../src/resources/signal.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IAC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,CAAC;IAElB,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAE/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
@@ -24,6 +24,7 @@ export interface SignalResponse {
24
24
  entity_ids: Array<string>;
25
25
  icp_id: string;
26
26
  references: Array<string>;
27
+ score: number | null;
27
28
  signal_type: string | null;
28
29
  strength: string | null;
29
30
  summary: string;
@@ -1 +1 @@
1
- {"version":3,"file":"signal.d.ts","sourceRoot":"","sources":["../src/resources/signal.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAA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AC,CAAC;IAE/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
package/src/client.ts CHANGED
@@ -61,6 +61,16 @@ import {
61
61
  RunListResponse,
62
62
  RunRetrieveResponse,
63
63
  } from './resources/run';
64
+ import {
65
+ CreateScheduleRequest,
66
+ Schedule,
67
+ ScheduleCreateParams,
68
+ ScheduleListParams,
69
+ ScheduleListResponse,
70
+ ScheduleResponse,
71
+ ScheduleUpdateParams,
72
+ UpdateScheduleRequest,
73
+ } from './resources/schedule';
64
74
  import { Signal, SignalListParams, SignalListResponse, SignalResponse } from './resources/signal';
65
75
  import {
66
76
  IngestPromptConfigResponse,
@@ -576,9 +586,10 @@ export class Linkt {
576
586
  controller: AbortController,
577
587
  ): Promise<Response> {
578
588
  const { signal, method, ...options } = init || {};
579
- if (signal) signal.addEventListener('abort', () => controller.abort());
589
+ const abort = this._makeAbort(controller);
590
+ if (signal) signal.addEventListener('abort', abort, { once: true });
580
591
 
581
- const timeout = setTimeout(() => controller.abort(), ms);
592
+ const timeout = setTimeout(abort, ms);
582
593
 
583
594
  const isReadableBody =
584
595
  ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) ||
@@ -745,6 +756,12 @@ export class Linkt {
745
756
  return headers.values;
746
757
  }
747
758
 
759
+ private _makeAbort(controller: AbortController) {
760
+ // note: we can't just inline this method inside `fetchWithTimeout()` because then the closure
761
+ // would capture all request options, and cause a memory leak.
762
+ return () => controller.abort();
763
+ }
764
+
748
765
  private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
749
766
  bodyHeaders: HeadersLike;
750
767
  body: BodyInit | undefined;
@@ -807,6 +824,7 @@ export class Linkt {
807
824
  task: API.Task = new API.Task(this);
808
825
  signal: API.Signal = new API.Signal(this);
809
826
  run: API.Run = new API.Run(this);
827
+ schedule: API.Schedule = new API.Schedule(this);
810
828
  files: API.Files = new API.Files(this);
811
829
  }
812
830
 
@@ -816,6 +834,7 @@ Linkt.Entity = Entity;
816
834
  Linkt.Task = Task;
817
835
  Linkt.Signal = Signal;
818
836
  Linkt.Run = Run;
837
+ Linkt.Schedule = Schedule;
819
838
  Linkt.Files = Files;
820
839
 
821
840
  export declare namespace Linkt {
@@ -902,6 +921,17 @@ export declare namespace Linkt {
902
921
  type RunGetQueueParams as RunGetQueueParams,
903
922
  };
904
923
 
924
+ export {
925
+ Schedule as Schedule,
926
+ type CreateScheduleRequest as CreateScheduleRequest,
927
+ type ScheduleListResponse as ScheduleListResponse,
928
+ type ScheduleResponse as ScheduleResponse,
929
+ type UpdateScheduleRequest as UpdateScheduleRequest,
930
+ type ScheduleCreateParams as ScheduleCreateParams,
931
+ type ScheduleUpdateParams as ScheduleUpdateParams,
932
+ type ScheduleListParams as ScheduleListParams,
933
+ };
934
+
905
935
  export {
906
936
  Files as Files,
907
937
  type CsvProcessingStatus as CsvProcessingStatus,
@@ -29,6 +29,12 @@ export async function defaultParseResponse<T>(client: Linkt, props: APIResponseP
29
29
  const mediaType = contentType?.split(';')[0]?.trim();
30
30
  const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
31
31
  if (isJSON) {
32
+ const contentLength = response.headers.get('content-length');
33
+ if (contentLength === '0') {
34
+ // if there is no content we can't do anything
35
+ return undefined as T;
36
+ }
37
+
32
38
  const json = await response.json();
33
39
  return json as T;
34
40
  }
@@ -11,20 +11,25 @@ export class Entity extends APIResource {
11
11
  /**
12
12
  * Get a single entity by ID with enrichment.
13
13
  *
14
- * Returns the entity with sheet_name, entity_type, and icp_id populated from the
15
- * parent sheet.
14
+ * Returns the entity with sheet_name, entity_type, icp_id, and duplicate_info
15
+ * populated. duplicate_info is null if the entity has no duplicates across ICPs.
16
16
  */
17
17
  retrieve(entityID: string, options?: RequestOptions): APIPromise<EntityResponse> {
18
18
  return this._client.get(path`/v1/entity/${entityID}`, options);
19
19
  }
20
20
 
21
21
  /**
22
- * Update entity status or comments.
22
+ * Update entity status or comments with optional propagation.
23
23
  *
24
24
  * Only status and comments can be updated via this endpoint. Use status=null to
25
25
  * clear status, comments=null to clear comments.
26
26
  *
27
27
  * Status must be one of: new, reviewed, passed, contacted, or null.
28
+ *
29
+ * Propagation flags control cascading updates:
30
+ *
31
+ * - propagate_to_family: Update parent/child entities (default: True)
32
+ * - propagate_to_duplicates: Update duplicate entities across ICPs (default: True)
28
33
  */
29
34
  update(entityID: string, body: EntityUpdateParams, options?: RequestOptions): APIPromise<EntityResponse> {
30
35
  return this._client.put(path`/v1/entity/${entityID}`, { body, ...options });
@@ -35,12 +40,14 @@ export class Entity extends APIResource {
35
40
  *
36
41
  * Supports filtering by:
37
42
  *
38
- * - icp_id: Entities in sheets belonging to an ICP
43
+ * - icp_id: Entities in sheets belonging to ICP(s). Supports multiple values for
44
+ * filtering across ICPs (e.g., ?icp_id=abc&icp_id=def).
39
45
  * - sheet_id: Entities in a specific sheet
40
46
  * - entity_type: Entities of a specific type (company, person, etc.)
41
47
  * - status: Filter by workflow status (supports multiple:
42
48
  * ?status=new&status=reviewed) Valid values: new, reviewed, passed, contacted,
43
49
  * null
50
+ * - hide_duplicates: When true, only show primary entities (filter out duplicates)
44
51
  *
45
52
  * All results include enrichment fields for UI annotations.
46
53
  */
@@ -64,7 +71,7 @@ export class Entity extends APIResource {
64
71
  }
65
72
 
66
73
  /**
67
- * Update status for multiple entities at once.
74
+ * Update status for multiple entities at once with optional propagation.
68
75
  *
69
76
  * Accepts a list of entity IDs and a status value. The status can be:
70
77
  *
@@ -74,10 +81,14 @@ export class Entity extends APIResource {
74
81
  * Returns the count of successfully updated entities and any failed IDs. Entities
75
82
  * may fail to update if they have an invalid ID format or don't exist.
76
83
  *
84
+ * Propagation flags control cascading updates:
85
+ *
86
+ * - propagate_to_family: Update parent/child of each entity (default: True)
87
+ * - propagate_to_duplicates: Update duplicate entities across ICPs (default: True)
88
+ *
77
89
  * WHY: Bulk operations enable users to update status for many entities at once
78
90
  * (e.g., mark all search results as "reviewed"), improving workflow efficiency
79
- * versus N individual PUT calls. Uses batch_update_by_filter for single database
80
- * roundtrip efficiency.
91
+ * versus N individual PUT calls.
81
92
  */
82
93
  bulkUpdateStatus(
83
94
  body: EntityBulkUpdateStatusParams,
@@ -121,10 +132,12 @@ export class Entity extends APIResource {
121
132
  * ?status=new&status=contacted) Valid values: new, reviewed, passed, contacted,
122
133
  * null
123
134
  *
124
- * Args: icp_id: Filter by ICP ID (REQUIRED for format=combined) sheet_id: Filter
125
- * by sheet ID entity_type: Filter by entity type (ignored for format=combined)
126
- * entity_ids: Export specific entity IDs status: Filter by status values (multiple
127
- * allowed) format: Export format - "separate" (default) or "combined"
135
+ * Args: icp_id: Filter by ICP ID(s). Supports multiple values for separate format
136
+ * (e.g., ?icp_id=abc&icp_id=def). Combined format only supports a single ICP.
137
+ * sheet_id: Filter by sheet ID entity_type: Filter by entity type (ignored for
138
+ * format=combined) entity_ids: Export specific entity IDs status: Filter by status
139
+ * values (multiple allowed) hide_duplicates: Exclude duplicate entities from
140
+ * export format: Export format - "separate" (default) or "combined"
128
141
  *
129
142
  * Returns: StreamingResponse with CSV content
130
143
  *
@@ -139,13 +152,16 @@ export class Entity extends APIResource {
139
152
  * Get entity counts grouped by entity_type.
140
153
  *
141
154
  * Returns the count of entities for each entity_type (company, person, etc.)
142
- * across the organization. Supports optional filtering by ICP or status.
155
+ * across the organization. Supports optional filtering by ICP(s) or status.
143
156
  *
144
- * Additional filtering:
157
+ * Filtering options:
145
158
  *
159
+ * - icp_id: Filter by ICP ID(s). Supports multiple values for counting across ICPs
160
+ * (e.g., ?icp_id=abc&icp_id=def).
146
161
  * - status: Filter by workflow status (supports multiple:
147
162
  * ?status=new&status=reviewed) Valid values: new, reviewed, passed, contacted,
148
163
  * null
164
+ * - hide_duplicates: When true, excludes duplicate entities from counts
149
165
  *
150
166
  * Used by Entity Master List for accurate tab navigation counts.
151
167
  */
@@ -165,7 +181,8 @@ export class Entity extends APIResource {
165
181
  * Scope of search determined by filters:
166
182
  *
167
183
  * - sheet_id: Search within specific sheet
168
- * - icp_id: Search across ICP sheets
184
+ * - icp_id: Search across ICP sheet(s). Supports multiple values for searching
185
+ * across ICPs (e.g., ?icp_id=abc&icp_id=def).
169
186
  * - No filters: Search org-wide
170
187
  *
171
188
  * Additional filtering:
@@ -173,6 +190,7 @@ export class Entity extends APIResource {
173
190
  * - status: Filter by workflow status (supports multiple:
174
191
  * ?status=new&status=reviewed) Valid values: new, reviewed, passed, contacted,
175
192
  * null
193
+ * - hide_duplicates: When true, only show primary entities
176
194
  */
177
195
  search(query: EntitySearchParams, options?: RequestOptions): APIPromise<EntitySearchResponse> {
178
196
  return this._client.get('/v1/entity/search', { query, ...options });
@@ -232,15 +250,107 @@ export interface EntityResponse {
232
250
  */
233
251
  comments?: string | null;
234
252
 
253
+ /**
254
+ * Duplicate status information for an entity.
255
+ *
256
+ * Indicates whether an entity is part of a duplicate group and its role:
257
+ *
258
+ * - Primary entities: is_primary=True, has duplicate_entity_ids and duplicate_icps
259
+ * - Duplicate entities: is_duplicate=True, has primary_entity_id and
260
+ * primary_icp_name
261
+ *
262
+ * For entities that have no duplicates, this field will be None/null in the
263
+ * EntityResponse.
264
+ */
265
+ duplicate_info?: EntityResponse.DuplicateInfo | null;
266
+
235
267
  /**
236
268
  * Parent entity ID (for hierarchical entities)
237
269
  */
238
270
  parent_id?: string | null;
239
271
 
240
272
  /**
241
- * Entity workflow status: new, reviewed, passed, contacted, or null
273
+ * Status values for entity workflow tracking.
274
+ *
275
+ * Transitions are user-driven (not automatic state machine):
276
+ *
277
+ * - new: Default for all newly created entities
278
+ * - reviewed: User has examined the entity
279
+ * - passed: Entity has been approved/qualified
280
+ * - contacted: Outreach has been initiated
242
281
  */
243
- status?: string | null;
282
+ status?: 'new' | 'reviewed' | 'passed' | 'contacted' | null;
283
+ }
284
+
285
+ export namespace EntityResponse {
286
+ /**
287
+ * Duplicate status information for an entity.
288
+ *
289
+ * Indicates whether an entity is part of a duplicate group and its role:
290
+ *
291
+ * - Primary entities: is_primary=True, has duplicate_entity_ids and duplicate_icps
292
+ * - Duplicate entities: is_duplicate=True, has primary_entity_id and
293
+ * primary_icp_name
294
+ *
295
+ * For entities that have no duplicates, this field will be None/null in the
296
+ * EntityResponse.
297
+ */
298
+ export interface DuplicateInfo {
299
+ /**
300
+ * Whether this entity is a duplicate (not the primary)
301
+ */
302
+ is_duplicate: boolean;
303
+
304
+ /**
305
+ * Whether this entity is the primary in a duplicate group
306
+ */
307
+ is_primary: boolean;
308
+
309
+ /**
310
+ * Number of duplicate entities (primary only)
311
+ */
312
+ duplicate_count?: number | null;
313
+
314
+ /**
315
+ * IDs of duplicate entities (primary only)
316
+ */
317
+ duplicate_entity_ids?: Array<string> | null;
318
+
319
+ /**
320
+ * ICPs containing duplicates (primary only)
321
+ */
322
+ duplicate_icps?: Array<DuplicateInfo.DuplicateIcp> | null;
323
+
324
+ /**
325
+ * ID of the primary entity (duplicate only)
326
+ */
327
+ primary_entity_id?: string | null;
328
+
329
+ /**
330
+ * ICP name of the primary entity (duplicate only)
331
+ */
332
+ primary_icp_name?: string | null;
333
+ }
334
+
335
+ export namespace DuplicateInfo {
336
+ /**
337
+ * Info about an ICP containing a duplicate entity.
338
+ *
339
+ * Used in DuplicateInfo to show which ICPs contain duplicate instances of the same
340
+ * entity.
341
+ */
342
+ export interface DuplicateIcp {
343
+ /**
344
+ * ICP ID
345
+ */
346
+ icp_id: string;
347
+
348
+ /**
349
+ * ICP name
350
+ */
351
+ icp_name: string;
352
+ }
353
+ }
244
354
  }
245
355
 
246
356
  /**
@@ -342,10 +452,26 @@ export interface EntityUpdateParams {
342
452
  comments?: string | null;
343
453
 
344
454
  /**
345
- * Update workflow status: new, reviewed, passed, contacted, or null. Use explicit
346
- * null to clear status.
455
+ * Reflect updates to duplicate entities across ICPs (default: True)
456
+ */
457
+ propagate_to_duplicates?: boolean;
458
+
459
+ /**
460
+ * Reflect updates to parent/child entities (default: True)
461
+ */
462
+ propagate_to_family?: boolean;
463
+
464
+ /**
465
+ * Status values for entity workflow tracking.
466
+ *
467
+ * Transitions are user-driven (not automatic state machine):
468
+ *
469
+ * - new: Default for all newly created entities
470
+ * - reviewed: User has examined the entity
471
+ * - passed: Entity has been approved/qualified
472
+ * - contacted: Outreach has been initiated
347
473
  */
348
- status?: string | null;
474
+ status?: 'new' | 'reviewed' | 'passed' | 'contacted' | null;
349
475
  }
350
476
 
351
477
  export interface EntityListParams {
@@ -355,9 +481,14 @@ export interface EntityListParams {
355
481
  entity_type?: SheetAPI.EntityType | null;
356
482
 
357
483
  /**
358
- * Filter by ICP ID
484
+ * Hide duplicate entities (show only primaries)
359
485
  */
360
- icp_id?: string | null;
486
+ hide_duplicates?: boolean;
487
+
488
+ /**
489
+ * Filter by ICP ID(s) - supports multiple
490
+ */
491
+ icp_id?: Array<string> | null;
361
492
 
362
493
  /**
363
494
  * Page number (1-based)
@@ -390,6 +521,16 @@ export interface EntityBulkUpdateStatusParams {
390
521
  * New status value: new, reviewed, passed, contacted, or null to clear
391
522
  */
392
523
  status: string | null;
524
+
525
+ /**
526
+ * Reflect status to duplicate entities across ICPs (default: True)
527
+ */
528
+ propagate_to_duplicates?: boolean;
529
+
530
+ /**
531
+ * Reflect status to parent/child of each entity (default: True)
532
+ */
533
+ propagate_to_family?: boolean;
393
534
  }
394
535
 
395
536
  export interface EntityExportParams {
@@ -409,9 +550,14 @@ export interface EntityExportParams {
409
550
  format?: 'separate' | 'combined';
410
551
 
411
552
  /**
412
- * Filter by ICP ID
553
+ * Exclude duplicate entities from export (show only primaries)
554
+ */
555
+ hide_duplicates?: boolean;
556
+
557
+ /**
558
+ * Filter by ICP ID(s) - supports multiple
413
559
  */
414
- icp_id?: string | null;
560
+ icp_id?: Array<string> | null;
415
561
 
416
562
  /**
417
563
  * Filter by sheet ID
@@ -426,9 +572,14 @@ export interface EntityExportParams {
426
572
 
427
573
  export interface EntityGetCountsParams {
428
574
  /**
429
- * Filter by ICP ID
575
+ * Exclude duplicate entities from counts (show only primaries)
430
576
  */
431
- icp_id?: string | null;
577
+ hide_duplicates?: boolean;
578
+
579
+ /**
580
+ * Filter by ICP ID(s) - supports multiple
581
+ */
582
+ icp_id?: Array<string> | null;
432
583
 
433
584
  /**
434
585
  * Filter by status values (supports multiple: ?status=new&status=passed)
@@ -448,9 +599,14 @@ export interface EntitySearchParams {
448
599
  entity_type?: SheetAPI.EntityType | null;
449
600
 
450
601
  /**
451
- * Filter by ICP ID
602
+ * Hide duplicate entities (show only primaries)
603
+ */
604
+ hide_duplicates?: boolean;
605
+
606
+ /**
607
+ * Filter by ICP ID(s) - supports multiple
452
608
  */
453
- icp_id?: string | null;
609
+ icp_id?: Array<string> | null;
454
610
 
455
611
  /**
456
612
  * Page number
@@ -44,6 +44,16 @@ export {
44
44
  type RunListParams,
45
45
  type RunGetQueueParams,
46
46
  } from './run';
47
+ export {
48
+ Schedule,
49
+ type CreateScheduleRequest,
50
+ type ScheduleListResponse,
51
+ type ScheduleResponse,
52
+ type UpdateScheduleRequest,
53
+ type ScheduleCreateParams,
54
+ type ScheduleUpdateParams,
55
+ type ScheduleListParams,
56
+ } from './schedule';
47
57
  export {
48
58
  SheetResource,
49
59
  type EntityType,