@linkt/sdk 0.5.0 → 0.7.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 (129) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +0 -29
  3. package/client.d.mts +23 -1
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +23 -1
  6. package/client.d.ts.map +1 -1
  7. package/client.js +38 -4
  8. package/client.js.map +1 -1
  9. package/client.mjs +38 -4
  10. package/client.mjs.map +1 -1
  11. package/internal/parse.d.mts.map +1 -1
  12. package/internal/parse.d.ts.map +1 -1
  13. package/internal/parse.js +5 -0
  14. package/internal/parse.js.map +1 -1
  15. package/internal/parse.mjs +5 -0
  16. package/internal/parse.mjs.map +1 -1
  17. package/internal/utils/query.d.mts +2 -0
  18. package/internal/utils/query.d.mts.map +1 -0
  19. package/internal/utils/query.d.ts +2 -0
  20. package/internal/utils/query.d.ts.map +1 -0
  21. package/internal/utils/query.js +10 -0
  22. package/internal/utils/query.js.map +1 -0
  23. package/internal/utils/query.mjs +6 -0
  24. package/internal/utils/query.mjs.map +1 -0
  25. package/internal/utils.d.mts +1 -0
  26. package/internal/utils.d.ts +1 -0
  27. package/internal/utils.js +1 -0
  28. package/internal/utils.js.map +1 -1
  29. package/internal/utils.mjs +1 -0
  30. package/package.json +1 -1
  31. package/resources/entity.d.mts +34 -19
  32. package/resources/entity.d.mts.map +1 -1
  33. package/resources/entity.d.ts +34 -19
  34. package/resources/entity.d.ts.map +1 -1
  35. package/resources/entity.js +15 -8
  36. package/resources/entity.js.map +1 -1
  37. package/resources/entity.mjs +15 -8
  38. package/resources/entity.mjs.map +1 -1
  39. package/resources/files.d.mts +4 -2
  40. package/resources/files.d.mts.map +1 -1
  41. package/resources/files.d.ts +4 -2
  42. package/resources/files.d.ts.map +1 -1
  43. package/resources/files.js +3 -0
  44. package/resources/files.js.map +1 -1
  45. package/resources/files.mjs +3 -0
  46. package/resources/files.mjs.map +1 -1
  47. package/resources/icp.d.mts +31 -0
  48. package/resources/icp.d.mts.map +1 -1
  49. package/resources/icp.d.ts +31 -0
  50. package/resources/icp.d.ts.map +1 -1
  51. package/resources/icp.js +3 -0
  52. package/resources/icp.js.map +1 -1
  53. package/resources/icp.mjs +3 -0
  54. package/resources/icp.mjs.map +1 -1
  55. package/resources/index.d.mts +1 -0
  56. package/resources/index.d.mts.map +1 -1
  57. package/resources/index.d.ts +1 -0
  58. package/resources/index.d.ts.map +1 -1
  59. package/resources/index.js +3 -1
  60. package/resources/index.js.map +1 -1
  61. package/resources/index.mjs +1 -0
  62. package/resources/index.mjs.map +1 -1
  63. package/resources/run.d.mts +3 -0
  64. package/resources/run.d.mts.map +1 -1
  65. package/resources/run.d.ts +3 -0
  66. package/resources/run.d.ts.map +1 -1
  67. package/resources/run.js +3 -0
  68. package/resources/run.js.map +1 -1
  69. package/resources/run.mjs +3 -0
  70. package/resources/run.mjs.map +1 -1
  71. package/resources/schedule.d.mts +305 -0
  72. package/resources/schedule.d.mts.map +1 -0
  73. package/resources/schedule.d.ts +305 -0
  74. package/resources/schedule.d.ts.map +1 -0
  75. package/resources/schedule.js +84 -0
  76. package/resources/schedule.js.map +1 -0
  77. package/resources/schedule.mjs +80 -0
  78. package/resources/schedule.mjs.map +1 -0
  79. package/resources/sheet/schema.d.mts +3 -0
  80. package/resources/sheet/schema.d.mts.map +1 -1
  81. package/resources/sheet/schema.d.ts +3 -0
  82. package/resources/sheet/schema.d.ts.map +1 -1
  83. package/resources/sheet/schema.js +3 -0
  84. package/resources/sheet/schema.js.map +1 -1
  85. package/resources/sheet/schema.mjs +3 -0
  86. package/resources/sheet/schema.mjs.map +1 -1
  87. package/resources/sheet/sheet.d.mts +3 -0
  88. package/resources/sheet/sheet.d.mts.map +1 -1
  89. package/resources/sheet/sheet.d.ts +3 -0
  90. package/resources/sheet/sheet.d.ts.map +1 -1
  91. package/resources/sheet/sheet.js +3 -0
  92. package/resources/sheet/sheet.js.map +1 -1
  93. package/resources/sheet/sheet.mjs +3 -0
  94. package/resources/sheet/sheet.mjs.map +1 -1
  95. package/resources/signal.d.mts +4 -0
  96. package/resources/signal.d.mts.map +1 -1
  97. package/resources/signal.d.ts +4 -0
  98. package/resources/signal.d.ts.map +1 -1
  99. package/resources/signal.js +3 -0
  100. package/resources/signal.js.map +1 -1
  101. package/resources/signal.mjs +3 -0
  102. package/resources/signal.mjs.map +1 -1
  103. package/resources/task.d.mts +233 -5
  104. package/resources/task.d.mts.map +1 -1
  105. package/resources/task.d.ts +233 -5
  106. package/resources/task.d.ts.map +1 -1
  107. package/resources/task.js +3 -0
  108. package/resources/task.js.map +1 -1
  109. package/resources/task.mjs +3 -0
  110. package/resources/task.mjs.map +1 -1
  111. package/src/client.ts +63 -7
  112. package/src/internal/parse.ts +6 -0
  113. package/src/internal/utils/query.ts +7 -0
  114. package/src/internal/utils.ts +1 -0
  115. package/src/resources/entity.ts +36 -19
  116. package/src/resources/files.ts +4 -2
  117. package/src/resources/icp.ts +36 -0
  118. package/src/resources/index.ts +10 -0
  119. package/src/resources/run.ts +3 -0
  120. package/src/resources/schedule.ts +375 -0
  121. package/src/resources/sheet/schema.ts +3 -0
  122. package/src/resources/sheet/sheet.ts +3 -0
  123. package/src/resources/signal.ts +5 -0
  124. package/src/resources/task.ts +258 -0
  125. package/src/version.ts +1 -1
  126. package/version.d.mts +1 -1
  127. package/version.d.ts +1 -1
  128. package/version.js +1 -1
  129. package/version.mjs +1 -1
@@ -0,0 +1,375 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { buildHeaders } from '../internal/headers';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class Schedule extends APIResource {
10
+ /**
11
+ * Create a new schedule.
12
+ *
13
+ * The cron expression must be a daily, weekly, or monthly pattern. For signal
14
+ * tasks, the cron frequency must match the task's monitoring_frequency.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const scheduleResponse = await client.schedule.create({
19
+ * cron_expression: 'cron_expression',
20
+ * icp_id: '5eb7cf5a86d9755df3a6c593',
21
+ * name: 'x',
22
+ * task_id: '5eb7cf5a86d9755df3a6c593',
23
+ * });
24
+ * ```
25
+ */
26
+ create(body: ScheduleCreateParams, options?: RequestOptions): APIPromise<ScheduleResponse> {
27
+ return this._client.post('/v1/schedule', { body, ...options });
28
+ }
29
+
30
+ /**
31
+ * Get a specific schedule by ID.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const scheduleResponse = await client.schedule.retrieve(
36
+ * '5eb7cf5a86d9755df3a6c593',
37
+ * );
38
+ * ```
39
+ */
40
+ retrieve(scheduleID: string, options?: RequestOptions): APIPromise<ScheduleResponse> {
41
+ return this._client.get(path`/v1/schedule/${scheduleID}`, options);
42
+ }
43
+
44
+ /**
45
+ * Update a schedule.
46
+ *
47
+ * Only provided fields will be updated. The cron expression is validated for
48
+ * frequency restrictions.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * const scheduleResponse = await client.schedule.update(
53
+ * '5eb7cf5a86d9755df3a6c593',
54
+ * );
55
+ * ```
56
+ */
57
+ update(
58
+ scheduleID: string,
59
+ body: ScheduleUpdateParams,
60
+ options?: RequestOptions,
61
+ ): APIPromise<ScheduleResponse> {
62
+ return this._client.patch(path`/v1/schedule/${scheduleID}`, { body, ...options });
63
+ }
64
+
65
+ /**
66
+ * List schedules with pagination and optional filters.
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const scheduleListResponse = await client.schedule.list();
71
+ * ```
72
+ */
73
+ list(
74
+ query: ScheduleListParams | null | undefined = {},
75
+ options?: RequestOptions,
76
+ ): APIPromise<ScheduleListResponse> {
77
+ return this._client.get('/v1/schedule', { query, ...options });
78
+ }
79
+
80
+ /**
81
+ * Delete a schedule.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * await client.schedule.delete('5eb7cf5a86d9755df3a6c593');
86
+ * ```
87
+ */
88
+ delete(scheduleID: string, options?: RequestOptions): APIPromise<void> {
89
+ return this._client.delete(path`/v1/schedule/${scheduleID}`, {
90
+ ...options,
91
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
92
+ });
93
+ }
94
+ }
95
+
96
+ /**
97
+ * Request model for creating a new schedule.
98
+ *
99
+ * Attributes: name: Human-readable name for the schedule. task_id: ID of the task
100
+ * to execute. icp_id: ID of the ICP context for execution. cron_expression: 5-part
101
+ * cron expression (must be daily/weekly/monthly). description: Optional
102
+ * description. parameters: Optional execution parameters.
103
+ */
104
+ export interface CreateScheduleRequest {
105
+ /**
106
+ * Cron expression (5 parts: minute hour day month day_of_week). Must be daily,
107
+ * weekly, or monthly.
108
+ */
109
+ cron_expression: string;
110
+
111
+ /**
112
+ * ICP context for execution
113
+ */
114
+ icp_id: string;
115
+
116
+ /**
117
+ * Schedule name
118
+ */
119
+ name: string;
120
+
121
+ /**
122
+ * Task to execute
123
+ */
124
+ task_id: string;
125
+
126
+ /**
127
+ * Schedule description
128
+ */
129
+ description?: string | null;
130
+
131
+ /**
132
+ * Execution parameters
133
+ */
134
+ parameters?: { [key: string]: unknown };
135
+ }
136
+
137
+ /**
138
+ * Response model for paginated schedule list.
139
+ *
140
+ * Attributes: schedules: List of schedules. total: Total number of schedules
141
+ * matching filters. page: Current page number (1-based). page_size: Number of
142
+ * items per page.
143
+ */
144
+ export interface ScheduleListResponse {
145
+ /**
146
+ * Current page number (1-based)
147
+ */
148
+ page: number;
149
+
150
+ /**
151
+ * Number of items per page
152
+ */
153
+ page_size: number;
154
+
155
+ /**
156
+ * List of schedules
157
+ */
158
+ schedules: Array<ScheduleResponse>;
159
+
160
+ /**
161
+ * Total number of schedules matching filters
162
+ */
163
+ total: number;
164
+ }
165
+
166
+ /**
167
+ * Response model for schedule data.
168
+ *
169
+ * Attributes: id: Schedule ID. name: Schedule name. task_id: Task ID. icp_id: ICP
170
+ * ID. cron_expression: Cron expression. status: Schedule status. description:
171
+ * Optional description. parameters: Execution parameters. created_at: Creation
172
+ * timestamp. updated_at: Last update timestamp.
173
+ */
174
+ export interface ScheduleResponse {
175
+ /**
176
+ * Schedule ID
177
+ */
178
+ id: string;
179
+
180
+ /**
181
+ * Creation timestamp
182
+ */
183
+ created_at: string;
184
+
185
+ /**
186
+ * Cron expression
187
+ */
188
+ cron_expression: string;
189
+
190
+ /**
191
+ * ICP ID
192
+ */
193
+ icp_id: string;
194
+
195
+ /**
196
+ * Schedule name
197
+ */
198
+ name: string;
199
+
200
+ /**
201
+ * Schedule status
202
+ */
203
+ status: string;
204
+
205
+ /**
206
+ * Task ID
207
+ */
208
+ task_id: string;
209
+
210
+ /**
211
+ * Last update timestamp
212
+ */
213
+ updated_at: string;
214
+
215
+ /**
216
+ * Description
217
+ */
218
+ description?: string | null;
219
+
220
+ /**
221
+ * Execution parameters
222
+ */
223
+ parameters?: { [key: string]: unknown };
224
+ }
225
+
226
+ /**
227
+ * Request model for updating a schedule.
228
+ *
229
+ * At least one field must be provided.
230
+ *
231
+ * Attributes: name: Updated schedule name. description: Updated description.
232
+ * cron_expression: Updated cron expression (validated for frequency). parameters:
233
+ * Updated execution parameters. status: Updated schedule status.
234
+ */
235
+ export interface UpdateScheduleRequest {
236
+ /**
237
+ * Updated cron expression
238
+ */
239
+ cron_expression?: string | null;
240
+
241
+ /**
242
+ * Updated description
243
+ */
244
+ description?: string | null;
245
+
246
+ /**
247
+ * Updated schedule name
248
+ */
249
+ name?: string | null;
250
+
251
+ /**
252
+ * Updated execution parameters
253
+ */
254
+ parameters?: { [key: string]: unknown } | null;
255
+
256
+ /**
257
+ * Schedule status values.
258
+ *
259
+ * ACTIVE: Schedule is eligible for execution PAUSED: Temporarily suspended but can
260
+ * be resumed DISABLED: Permanently disabled (requires manual intervention)
261
+ */
262
+ status?: 'active' | 'paused' | 'disabled' | null;
263
+ }
264
+
265
+ export interface ScheduleCreateParams {
266
+ /**
267
+ * Cron expression (5 parts: minute hour day month day_of_week). Must be daily,
268
+ * weekly, or monthly.
269
+ */
270
+ cron_expression: string;
271
+
272
+ /**
273
+ * ICP context for execution
274
+ */
275
+ icp_id: string;
276
+
277
+ /**
278
+ * Schedule name
279
+ */
280
+ name: string;
281
+
282
+ /**
283
+ * Task to execute
284
+ */
285
+ task_id: string;
286
+
287
+ /**
288
+ * Schedule description
289
+ */
290
+ description?: string | null;
291
+
292
+ /**
293
+ * Execution parameters
294
+ */
295
+ parameters?: { [key: string]: unknown };
296
+ }
297
+
298
+ export interface ScheduleUpdateParams {
299
+ /**
300
+ * Updated cron expression
301
+ */
302
+ cron_expression?: string | null;
303
+
304
+ /**
305
+ * Updated description
306
+ */
307
+ description?: string | null;
308
+
309
+ /**
310
+ * Updated schedule name
311
+ */
312
+ name?: string | null;
313
+
314
+ /**
315
+ * Updated execution parameters
316
+ */
317
+ parameters?: { [key: string]: unknown } | null;
318
+
319
+ /**
320
+ * Schedule status values.
321
+ *
322
+ * ACTIVE: Schedule is eligible for execution PAUSED: Temporarily suspended but can
323
+ * be resumed DISABLED: Permanently disabled (requires manual intervention)
324
+ */
325
+ status?: 'active' | 'paused' | 'disabled' | null;
326
+ }
327
+
328
+ export interface ScheduleListParams {
329
+ /**
330
+ * Filter by ICP
331
+ */
332
+ icp_id?: string | null;
333
+
334
+ /**
335
+ * Sort order: -1 descending, 1 ascending
336
+ */
337
+ order?: number | null;
338
+
339
+ /**
340
+ * Page number (1-based)
341
+ */
342
+ page?: number;
343
+
344
+ /**
345
+ * Items per page (max 100)
346
+ */
347
+ page_size?: number;
348
+
349
+ /**
350
+ * Field to sort by (e.g., 'created_at')
351
+ */
352
+ sort_by?: string | null;
353
+
354
+ /**
355
+ * Filter by status
356
+ */
357
+ status?: 'active' | 'paused' | 'disabled' | null;
358
+
359
+ /**
360
+ * Filter by task
361
+ */
362
+ task_id?: string | null;
363
+ }
364
+
365
+ export declare namespace Schedule {
366
+ export {
367
+ type CreateScheduleRequest as CreateScheduleRequest,
368
+ type ScheduleListResponse as ScheduleListResponse,
369
+ type ScheduleResponse as ScheduleResponse,
370
+ type UpdateScheduleRequest as UpdateScheduleRequest,
371
+ type ScheduleCreateParams as ScheduleCreateParams,
372
+ type ScheduleUpdateParams as ScheduleUpdateParams,
373
+ type ScheduleListParams as ScheduleListParams,
374
+ };
375
+ }
@@ -6,6 +6,9 @@ import { buildHeaders } from '../../internal/headers';
6
6
  import { RequestOptions } from '../../internal/request-options';
7
7
  import { path } from '../../internal/utils/path';
8
8
 
9
+ /**
10
+ * **Sheet Schemas** define the structure of entity data within sheets. Each entity type (company, person) has a default schema with standard fields. Use these endpoints to view default schemas, add custom fields to capture additional data points, or remove custom fields you no longer need.
11
+ */
9
12
  export class Schema extends APIResource {
10
13
  /**
11
14
  * Add custom fields to a sheet's entity schema.
@@ -15,6 +15,9 @@ import { buildHeaders } from '../../internal/headers';
15
15
  import { RequestOptions } from '../../internal/request-options';
16
16
  import { path } from '../../internal/utils/path';
17
17
 
18
+ /**
19
+ * **Sheets** are collections WHERE entities (companies, people) are stored. Each sheet must reference an ICP that defines targeting criteria, and holds entities of a single type (company or person). Sheets support custom schemas, CSV export, and comprehensive entity filtering. Use sheets to organize and manage your research results.
20
+ */
18
21
  export class SheetResource extends APIResource {
19
22
  schema: SchemaAPI.Schema = new SchemaAPI.Schema(this._client);
20
23
 
@@ -5,6 +5,9 @@ import { APIPromise } from '../core/api-promise';
5
5
  import { RequestOptions } from '../internal/request-options';
6
6
  import { path } from '../internal/utils/path';
7
7
 
8
+ /**
9
+ * **Signals** are time-based events detected by AI agents that affect your entities. Examples include funding rounds, leadership changes, hiring events, and product launches. Signals are **read-only** - they are created automatically by research workflows and represent an immutable audit trail of what happened and when.
10
+ */
8
11
  export class Signal extends APIResource {
9
12
  /**
10
13
  * Get a specific signal by ID (read-only).
@@ -42,6 +45,8 @@ export interface SignalResponse {
42
45
 
43
46
  references: Array<string>;
44
47
 
48
+ score: number | null;
49
+
45
50
  signal_type: string | null;
46
51
 
47
52
  strength: string | null;