@linkt/sdk 0.2.0 → 0.4.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 (76) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/client.d.mts +7 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/entity.d.mts +392 -0
  12. package/resources/entity.d.mts.map +1 -0
  13. package/resources/entity.d.ts +392 -0
  14. package/resources/entity.d.ts.map +1 -0
  15. package/resources/entity.js +164 -0
  16. package/resources/entity.js.map +1 -0
  17. package/resources/entity.mjs +160 -0
  18. package/resources/entity.mjs.map +1 -0
  19. package/resources/icp.d.mts +56 -3
  20. package/resources/icp.d.mts.map +1 -1
  21. package/resources/icp.d.ts +56 -3
  22. package/resources/icp.d.ts.map +1 -1
  23. package/resources/icp.js +2 -2
  24. package/resources/icp.mjs +2 -2
  25. package/resources/index.d.mts +3 -2
  26. package/resources/index.d.mts.map +1 -1
  27. package/resources/index.d.ts +3 -2
  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/run.d.mts +3 -3
  34. package/resources/run.d.ts +3 -3
  35. package/resources/sheet/index.d.mts +1 -2
  36. package/resources/sheet/index.d.mts.map +1 -1
  37. package/resources/sheet/index.d.ts +1 -2
  38. package/resources/sheet/index.d.ts.map +1 -1
  39. package/resources/sheet/index.js +1 -3
  40. package/resources/sheet/index.js.map +1 -1
  41. package/resources/sheet/index.mjs +0 -1
  42. package/resources/sheet/index.mjs.map +1 -1
  43. package/resources/sheet/sheet.d.mts +1 -90
  44. package/resources/sheet/sheet.d.mts.map +1 -1
  45. package/resources/sheet/sheet.d.ts +1 -90
  46. package/resources/sheet/sheet.d.ts.map +1 -1
  47. package/resources/sheet/sheet.js +0 -22
  48. package/resources/sheet/sheet.js.map +1 -1
  49. package/resources/sheet/sheet.mjs +0 -22
  50. package/resources/sheet/sheet.mjs.map +1 -1
  51. package/resources/task.d.mts +443 -288
  52. package/resources/task.d.mts.map +1 -1
  53. package/resources/task.d.ts +443 -288
  54. package/resources/task.d.ts.map +1 -1
  55. package/src/client.ts +57 -20
  56. package/src/resources/entity.ts +491 -0
  57. package/src/resources/icp.ts +59 -3
  58. package/src/resources/index.ts +27 -10
  59. package/src/resources/run.ts +3 -3
  60. package/src/resources/sheet/index.ts +0 -11
  61. package/src/resources/sheet/sheet.ts +0 -136
  62. package/src/resources/task.ts +530 -329
  63. package/src/version.ts +1 -1
  64. package/version.d.mts +1 -1
  65. package/version.d.ts +1 -1
  66. package/version.js +1 -1
  67. package/version.mjs +1 -1
  68. package/resources/sheet/entity.d.mts +0 -52
  69. package/resources/sheet/entity.d.mts.map +0 -1
  70. package/resources/sheet/entity.d.ts +0 -52
  71. package/resources/sheet/entity.d.ts.map +0 -1
  72. package/resources/sheet/entity.js +0 -45
  73. package/resources/sheet/entity.js.map +0 -1
  74. package/resources/sheet/entity.mjs +0 -41
  75. package/resources/sheet/entity.mjs.map +0 -1
  76. package/src/resources/sheet/entity.ts +0 -97
@@ -51,8 +51,8 @@ export class Icp extends APIResource {
51
51
  * Delete an ICP and all related resources.
52
52
  *
53
53
  * **Cascade delete**: This permanently removes the ICP along with all associated
54
- * sheets, entities, schedules, tasks, and signals. This operation cannot be
55
- * undone.
54
+ * sheets, entities, schedules, tasks, signals, and actions. This operation cannot
55
+ * be undone.
56
56
  */
57
57
  delete(icpID: string, options?: RequestOptions): APIPromise<void> {
58
58
  return this._client.delete(path`/v1/icp/${icpID}`, {
@@ -74,6 +74,23 @@ export class Icp extends APIResource {
74
74
 
75
75
  /**
76
76
  * Request model for entity target configuration.
77
+ *
78
+ * Synchronized with core.schema.mongo.icp.EntityTargetConfig to ensure all fields
79
+ * available in the database model can be set via the API.
80
+ *
81
+ * Attributes: entity_type: The entity type to target (e.g., 'company', 'person').
82
+ * description: Business description of what makes a good target. root: If True,
83
+ * this is the root entity type of the search hierarchy. Only one entity target
84
+ * should be marked as root. Defaults to False for backward compatibility with
85
+ * existing API consumers. desired_count: For non-root entities, the desired number
86
+ * of entities per parent (minimum: 1). Uses `ge=1` Field constraint which
87
+ * generates `minimum: 1` in OpenAPI schema for SDK validation. If not specified,
88
+ * defaults to system minimum (typically 2). filters: Optional list of filter
89
+ * criteria to apply to the search.
90
+ *
91
+ * Note: The `root` and `desired_count` fields default to False and None
92
+ * respectively, making them optional in API requests for backward compatibility
93
+ * with existing integrations.
77
94
  */
78
95
  export interface EntityTargetConfig {
79
96
  /**
@@ -82,14 +99,26 @@ export interface EntityTargetConfig {
82
99
  description: string;
83
100
 
84
101
  /**
85
- * Entity type to target
102
+ * Entity type to target (company, person, etc.)
86
103
  */
87
104
  entity_type: string;
88
105
 
106
+ /**
107
+ * For non-root entities, desired count per parent (minimum: 1). If not specified,
108
+ * defaults to system minimum.
109
+ */
110
+ desired_count?: number | null;
111
+
89
112
  /**
90
113
  * Filters to apply
91
114
  */
92
115
  filters?: Array<string>;
116
+
117
+ /**
118
+ * If this is the root entity type of the search. Only one entity target should be
119
+ * root.
120
+ */
121
+ root?: boolean;
93
122
  }
94
123
 
95
124
  /**
@@ -112,13 +141,40 @@ export interface IcpResponse {
112
141
  export namespace IcpResponse {
113
142
  /**
114
143
  * Response model for entity target configuration.
144
+ *
145
+ * Synchronized with core.schema.mongo.icp.EntityTargetConfig to return all
146
+ * configuration fields stored in the database to API consumers.
147
+ *
148
+ * Attributes: root: If True, this is the root entity type of the search hierarchy.
149
+ * entity_type: The entity type this config targets (e.g., 'company', 'person').
150
+ * description: Business description of what makes a good target. desired_count:
151
+ * For non-root entities, the desired number of entities per parent. Returns None
152
+ * if not explicitly set in the ICP.
153
+ *
154
+ * Note: The `desired_count` field is included in responses to enable API consumers
155
+ * to see the full configuration. When None, the system applies its default minimum
156
+ * (typically 2).
115
157
  */
116
158
  export interface EntityTarget {
159
+ /**
160
+ * Business description of targets
161
+ */
117
162
  description: string;
118
163
 
164
+ /**
165
+ * Entity type (company, person, etc.)
166
+ */
119
167
  entity_type: string;
120
168
 
169
+ /**
170
+ * If this is the root entity type
171
+ */
121
172
  root: boolean;
173
+
174
+ /**
175
+ * For non-root entities, desired count per parent
176
+ */
177
+ desired_count?: number | null;
122
178
  }
123
179
  }
124
180
 
@@ -1,5 +1,20 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ export {
4
+ Entity,
5
+ type EntityResponse,
6
+ type EntityListResponse,
7
+ type EntityBulkUpdateStatusResponse,
8
+ type EntityExportResponse,
9
+ type EntityGetCountsResponse,
10
+ type EntitySearchResponse,
11
+ type EntityUpdateParams,
12
+ type EntityListParams,
13
+ type EntityBulkUpdateStatusParams,
14
+ type EntityExportParams,
15
+ type EntityGetCountsParams,
16
+ type EntitySearchParams,
17
+ } from './entity';
3
18
  export {
4
19
  Files,
5
20
  type CsvProcessingStatus,
@@ -34,25 +49,27 @@ export {
34
49
  type EntityType,
35
50
  type Sheet,
36
51
  type SheetListResponse,
37
- type SheetExportCsvResponse,
38
- type SheetGetEntitiesResponse,
39
52
  type SheetCreateParams,
40
53
  type SheetUpdateParams,
41
54
  type SheetListParams,
42
- type SheetExportCsvParams,
43
- type SheetGetEntitiesParams,
44
55
  } from './sheet/sheet';
45
56
  export { Signal, type SignalResponse, type SignalListResponse, type SignalListParams } from './signal';
46
57
  export {
47
58
  Task,
59
+ type IngestPromptConfigResponse,
48
60
  type IngestTaskConfig,
49
- type SearchV2Config,
50
- type SearchV3Config,
51
- type SignalCsvConfigInput,
52
- type SignalSheetConfigInput,
53
- type SignalTopicConfigInput,
61
+ type IngestTaskConfigResponse,
62
+ type ProfilePromptConfig,
63
+ type ProfilePromptConfigResponse,
64
+ type SearchTaskConfig,
65
+ type SearchTaskConfigResponse,
66
+ type SignalCsvConfig,
67
+ type SignalCsvConfigResponse,
68
+ type SignalSheetConfig,
69
+ type SignalSheetConfigResponse,
70
+ type SignalTopicConfig,
71
+ type SignalTopicConfigResponse,
54
72
  type SignalTypeConfig,
55
- type StandardPromptConfig,
56
73
  type TaskCreateResponse,
57
74
  type TaskRetrieveResponse,
58
75
  type TaskListResponse,
@@ -126,9 +126,9 @@ export type RunRetrieveResponse = { [key: string]: unknown };
126
126
  * - SheetListResponse (src/api/schema/sheet.py)
127
127
  * - ICPListResponse (src/api/schema/icp.py)
128
128
  *
129
- * Attributes: runs: List of AgentRun objects for the current page total: Total
130
- * number of runs matching the filter criteria page: Current page number (1-based)
131
- * page_size: Number of items per page
129
+ * Attributes: runs: List of AgentRun objects for the current page (metadata
130
+ * excluded) total: Total number of runs matching the filter criteria page: Current
131
+ * page number (1-based) page_size: Number of items per page
132
132
  */
133
133
  export interface RunListResponse {
134
134
  page: number;
@@ -1,12 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export {
4
- Entity,
5
- type EntityRetrieveResponse,
6
- type EntityRetrieveParams,
7
- type EntityUpdateCommentsParams,
8
- type EntityUpdateStatusParams,
9
- } from './entity';
10
3
  export {
11
4
  Schema,
12
5
  type SchemaGetResponse,
@@ -20,11 +13,7 @@ export {
20
13
  type EntityType,
21
14
  type Sheet,
22
15
  type SheetListResponse,
23
- type SheetExportCsvResponse,
24
- type SheetGetEntitiesResponse,
25
16
  type SheetCreateParams,
26
17
  type SheetUpdateParams,
27
18
  type SheetListParams,
28
- type SheetExportCsvParams,
29
- type SheetGetEntitiesParams,
30
19
  } from './sheet';
@@ -1,14 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as EntityAPI from './entity';
5
- import {
6
- Entity,
7
- EntityRetrieveParams,
8
- EntityRetrieveResponse,
9
- EntityUpdateCommentsParams,
10
- EntityUpdateStatusParams,
11
- } from './entity';
12
4
  import * as SchemaAPI from './schema';
13
5
  import {
14
6
  Schema,
@@ -24,7 +16,6 @@ import { RequestOptions } from '../../internal/request-options';
24
16
  import { path } from '../../internal/utils/path';
25
17
 
26
18
  export class SheetResource extends APIResource {
27
- entity: EntityAPI.Entity = new EntityAPI.Entity(this._client);
28
19
  schema: SchemaAPI.Schema = new SchemaAPI.Schema(this._client);
29
20
 
30
21
  /**
@@ -83,34 +74,6 @@ export class SheetResource extends APIResource {
83
74
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
84
75
  });
85
76
  }
86
-
87
- /**
88
- * Export sheet entities as a CSV file.
89
- *
90
- * Exports entities with proper field formatting based on the sheet's schema. Pass
91
- * specific entity_ids to export a subset, or omit to export all entities.
92
- */
93
- exportCsv(
94
- sheetID: string,
95
- query: SheetExportCsvParams | null | undefined = {},
96
- options?: RequestOptions,
97
- ): APIPromise<unknown> {
98
- return this._client.get(path`/v1/sheet/${sheetID}/export-csv`, { query, ...options });
99
- }
100
-
101
- /**
102
- * List all entities in a sheet.
103
- *
104
- * Supports text search across name/company fields and comprehensive filtering by
105
- * status, comments, and date ranges.
106
- */
107
- getEntities(
108
- sheetID: string,
109
- query: SheetGetEntitiesParams | null | undefined = {},
110
- options?: RequestOptions,
111
- ): APIPromise<SheetGetEntitiesResponse> {
112
- return this._client.get(path`/v1/sheet/${sheetID}/entities`, { query, ...options });
113
- }
114
77
  }
115
78
 
116
79
  /**
@@ -152,28 +115,6 @@ export interface SheetListResponse {
152
115
  total: number;
153
116
  }
154
117
 
155
- export type SheetExportCsvResponse = unknown;
156
-
157
- /**
158
- * Response schema for paginated list of sheet entities.
159
- *
160
- * Uses EntityForHTTP which automatically excludes embedding data for efficient API
161
- * responses.
162
- *
163
- * Attributes: entities: List of EntityForHTTP objects for the current page total:
164
- * Total number of entities matching the filter criteria page: Current page number
165
- * (1-based) page_size: Number of items per page
166
- */
167
- export interface SheetGetEntitiesResponse {
168
- entities: Array<{ [key: string]: unknown }>;
169
-
170
- page: number;
171
-
172
- page_size: number;
173
-
174
- total: number;
175
- }
176
-
177
118
  export interface SheetCreateParams {
178
119
  description: string;
179
120
 
@@ -218,71 +159,6 @@ export interface SheetListParams {
218
159
  sort_by?: string | null;
219
160
  }
220
161
 
221
- export interface SheetExportCsvParams {
222
- /**
223
- * Optional list of entity IDs to export. If not provided, exports all entities.
224
- */
225
- entity_ids?: Array<string> | null;
226
- }
227
-
228
- export interface SheetGetEntitiesParams {
229
- /**
230
- * Filter entities created after this date (ISO 8601 format: 2024-01-15T10:30:00Z)
231
- */
232
- created_after?: string | null;
233
-
234
- /**
235
- * Filter entities created before this date (ISO 8601 format)
236
- */
237
- created_before?: string | null;
238
-
239
- /**
240
- * Filter entities with or without user comments
241
- */
242
- has_comments?: boolean | null;
243
-
244
- /**
245
- * Sort order: -1 for descending, 1 for ascending
246
- */
247
- order?: number | null;
248
-
249
- /**
250
- * Page number (1-based)
251
- */
252
- page?: number;
253
-
254
- /**
255
- * Items per page (max 100, default 50)
256
- */
257
- page_size?: number;
258
-
259
- /**
260
- * Search entities by name or company
261
- */
262
- search?: string | null;
263
-
264
- /**
265
- * Field to sort by (e.g., 'created_at', 'updated_at', 'status')
266
- */
267
- sort_by?: string | null;
268
-
269
- /**
270
- * Filter by entity status (true=active, false=inactive)
271
- */
272
- status?: boolean | null;
273
-
274
- /**
275
- * Filter entities updated after this date (ISO 8601 format)
276
- */
277
- updated_after?: string | null;
278
-
279
- /**
280
- * Filter entities updated before this date (ISO 8601 format)
281
- */
282
- updated_before?: string | null;
283
- }
284
-
285
- SheetResource.Entity = Entity;
286
162
  SheetResource.Schema = Schema;
287
163
 
288
164
  export declare namespace SheetResource {
@@ -290,21 +166,9 @@ export declare namespace SheetResource {
290
166
  type EntityType as EntityType,
291
167
  type Sheet as Sheet,
292
168
  type SheetListResponse as SheetListResponse,
293
- type SheetExportCsvResponse as SheetExportCsvResponse,
294
- type SheetGetEntitiesResponse as SheetGetEntitiesResponse,
295
169
  type SheetCreateParams as SheetCreateParams,
296
170
  type SheetUpdateParams as SheetUpdateParams,
297
171
  type SheetListParams as SheetListParams,
298
- type SheetExportCsvParams as SheetExportCsvParams,
299
- type SheetGetEntitiesParams as SheetGetEntitiesParams,
300
- };
301
-
302
- export {
303
- Entity as Entity,
304
- type EntityRetrieveResponse as EntityRetrieveResponse,
305
- type EntityRetrieveParams as EntityRetrieveParams,
306
- type EntityUpdateCommentsParams as EntityUpdateCommentsParams,
307
- type EntityUpdateStatusParams as EntityUpdateStatusParams,
308
172
  };
309
173
 
310
174
  export {