@trigger.dev/sdk 0.0.0-prerelease-20241003205750 → 0.0.0-prerelease-20241119135607

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 (63) hide show
  1. package/README.md +32 -1
  2. package/dist/commonjs/triggers/invokeTrigger.d.ts +1 -1
  3. package/dist/commonjs/types.d.ts +4 -4
  4. package/dist/commonjs/v3/auth.d.ts +104 -0
  5. package/dist/commonjs/v3/auth.js +102 -0
  6. package/dist/commonjs/v3/auth.js.map +1 -0
  7. package/dist/commonjs/v3/idempotencyKeys.d.ts +2 -46
  8. package/dist/commonjs/v3/idempotencyKeys.js +1 -69
  9. package/dist/commonjs/v3/idempotencyKeys.js.map +1 -1
  10. package/dist/commonjs/v3/index.d.ts +4 -19
  11. package/dist/commonjs/v3/index.js +18 -35
  12. package/dist/commonjs/v3/index.js.map +1 -1
  13. package/dist/commonjs/v3/metadata.d.ts +75 -12
  14. package/dist/commonjs/v3/metadata.js +93 -53
  15. package/dist/commonjs/v3/metadata.js.map +1 -1
  16. package/dist/commonjs/v3/runs.d.ts +49 -772
  17. package/dist/commonjs/v3/runs.js +12 -1
  18. package/dist/commonjs/v3/runs.js.map +1 -1
  19. package/dist/commonjs/v3/shared.d.ts +10 -380
  20. package/dist/commonjs/v3/shared.js +125 -68
  21. package/dist/commonjs/v3/shared.js.map +1 -1
  22. package/dist/commonjs/v3/tasks.d.ts +6 -5
  23. package/dist/commonjs/v3/tasks.js +4 -5
  24. package/dist/commonjs/v3/tasks.js.map +1 -1
  25. package/dist/commonjs/v3/tracer.d.ts +1 -1
  26. package/dist/commonjs/v3/tracer.js +2 -2
  27. package/dist/commonjs/v3/tracer.js.map +1 -1
  28. package/dist/commonjs/v3/waitUntil.d.ts +9 -0
  29. package/dist/commonjs/v3/waitUntil.js +16 -0
  30. package/dist/commonjs/v3/waitUntil.js.map +1 -0
  31. package/dist/commonjs/version.js +1 -1
  32. package/dist/esm/v3/auth.d.ts +104 -0
  33. package/dist/esm/v3/auth.js +98 -0
  34. package/dist/esm/v3/auth.js.map +1 -0
  35. package/dist/esm/v3/idempotencyKeys.d.ts +2 -46
  36. package/dist/esm/v3/idempotencyKeys.js +1 -68
  37. package/dist/esm/v3/idempotencyKeys.js.map +1 -1
  38. package/dist/esm/v3/index-browser.d.mts +2 -0
  39. package/dist/esm/v3/index-browser.mjs +3 -0
  40. package/dist/esm/v3/index-browser.mjs.map +1 -0
  41. package/dist/esm/v3/index.d.ts +4 -19
  42. package/dist/esm/v3/index.js +4 -22
  43. package/dist/esm/v3/index.js.map +1 -1
  44. package/dist/esm/v3/metadata.d.ts +75 -12
  45. package/dist/esm/v3/metadata.js +94 -54
  46. package/dist/esm/v3/metadata.js.map +1 -1
  47. package/dist/esm/v3/runs.d.ts +64 -787
  48. package/dist/esm/v3/runs.js +12 -1
  49. package/dist/esm/v3/runs.js.map +1 -1
  50. package/dist/esm/v3/shared.d.ts +10 -380
  51. package/dist/esm/v3/shared.js +121 -65
  52. package/dist/esm/v3/shared.js.map +1 -1
  53. package/dist/esm/v3/tasks.d.ts +6 -5
  54. package/dist/esm/v3/tasks.js +4 -4
  55. package/dist/esm/v3/tasks.js.map +1 -1
  56. package/dist/esm/v3/tracer.d.ts +1 -1
  57. package/dist/esm/v3/tracer.js +1 -1
  58. package/dist/esm/v3/tracer.js.map +1 -1
  59. package/dist/esm/v3/waitUntil.d.ts +9 -0
  60. package/dist/esm/v3/waitUntil.js +13 -0
  61. package/dist/esm/v3/waitUntil.js.map +1 -0
  62. package/dist/esm/version.js +1 -1
  63. package/package.json +9 -5
@@ -1,11 +1,7 @@
1
- import type { ApiRequestOptions, ListProjectRunsQueryParams, ListRunsQueryParams, RescheduleRunRequestBody } from "@trigger.dev/core/v3";
1
+ import type { AnyRetrieveRunResult, AnyRunShape, ApiRequestOptions, InferRunTypes, ListProjectRunsQueryParams, ListRunsQueryParams, RescheduleRunRequestBody, RetrieveRunResult, RunShape, RealtimeRun, RunSubscription, TaskRunShape } from "@trigger.dev/core/v3";
2
2
  import { ApiPromise, CanceledRunResponse, CursorPagePromise, ListRunResponseItem, ReplayRunResponse, RetrieveRunResponse } from "@trigger.dev/core/v3";
3
- import { AnyTask, Prettify, RunHandle, Task } from "./shared.js";
4
- export type RetrieveRunResult<TRunId> = Prettify<TRunId extends RunHandle<infer TOutput> ? Omit<RetrieveRunResponse, "output"> & {
5
- output?: TOutput;
6
- } : TRunId extends Task<string, any, infer TTaskOutput> ? Omit<RetrieveRunResponse, "output"> & {
7
- output?: TTaskOutput;
8
- } : TRunId extends string ? RetrieveRunResponse : never>;
3
+ import { AnyRunHandle, AnyTask } from "./shared.js";
4
+ export type { AnyRetrieveRunResult, AnyRunShape, RetrieveRunResult, RunShape, TaskRunShape, RealtimeRun, };
9
5
  export declare const runs: {
10
6
  replay: typeof replayRun;
11
7
  cancel: typeof cancelRun;
@@ -13,641 +9,68 @@ export declare const runs: {
13
9
  list: typeof listRuns;
14
10
  reschedule: typeof rescheduleRun;
15
11
  poll: typeof poll;
12
+ subscribeToRun: typeof subscribeToRun;
13
+ subscribeToRunsWithTag: typeof subscribeToRunsWithTag;
16
14
  };
17
15
  export type ListRunsItem = ListRunResponseItem;
18
16
  declare function listRuns(projectRef: string, params?: ListProjectRunsQueryParams, requestOptions?: ApiRequestOptions): CursorPagePromise<typeof ListRunResponseItem>;
19
17
  declare function listRuns(params?: ListRunsQueryParams, requestOptions?: ApiRequestOptions): CursorPagePromise<typeof ListRunResponseItem>;
20
- type RunId<TRunId> = TRunId extends RunHandle<any> ? TRunId : TRunId extends AnyTask ? string : TRunId extends string ? TRunId : never;
21
- declare function retrieveRun<TRunId extends RunHandle<any> | AnyTask | string>(runId: RunId<TRunId>, requestOptions?: ApiRequestOptions): ApiPromise<RetrieveRunResult<TRunId>>;
18
+ type RunId<TRunId> = TRunId extends AnyRunHandle ? TRunId : TRunId extends AnyTask ? string : TRunId extends string ? TRunId : never;
19
+ declare function retrieveRun<TRunId extends AnyRunHandle | AnyTask | string>(runId: RunId<TRunId>, requestOptions?: ApiRequestOptions): ApiPromise<RetrieveRunResult<TRunId>>;
22
20
  declare function replayRun(runId: string, requestOptions?: ApiRequestOptions): ApiPromise<ReplayRunResponse>;
23
21
  declare function cancelRun(runId: string, requestOptions?: ApiRequestOptions): ApiPromise<CanceledRunResponse>;
24
22
  declare function rescheduleRun(runId: string, body: RescheduleRunRequestBody, requestOptions?: ApiRequestOptions): ApiPromise<RetrieveRunResponse>;
25
23
  export type PollOptions = {
26
24
  pollIntervalMs?: number;
27
25
  };
28
- declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: RunId<TRunId>, options?: {
26
+ declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: RunId<TRunId>, options?: {
29
27
  pollIntervalMs?: number;
30
- }, requestOptions?: ApiRequestOptions): Promise<(TRunId extends RunHandle<infer TOutput> ? Omit<{
31
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
32
- id: string;
33
- createdAt: Date;
34
- tags: string[];
35
- depth: number;
36
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
37
- taskIdentifier: string;
38
- isQueued: boolean;
39
- isExecuting: boolean;
40
- isCompleted: boolean;
41
- isSuccess: boolean;
42
- isFailed: boolean;
43
- isCancelled: boolean;
44
- isTest: boolean;
45
- updatedAt: Date;
46
- costInCents: number;
47
- baseCostInCents: number;
48
- durationMs: number;
49
- relatedRuns: {
50
- root?: {
51
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
52
- id: string;
53
- createdAt: Date;
54
- tags: string[];
55
- depth: number;
56
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
57
- taskIdentifier: string;
58
- isQueued: boolean;
59
- isExecuting: boolean;
60
- isCompleted: boolean;
61
- isSuccess: boolean;
62
- isFailed: boolean;
63
- isCancelled: boolean;
64
- isTest: boolean;
65
- updatedAt: Date;
66
- costInCents: number;
67
- baseCostInCents: number;
68
- durationMs: number;
69
- batchId?: string | undefined;
70
- idempotencyKey?: string | undefined;
71
- version?: string | undefined;
72
- startedAt?: Date | undefined;
73
- finishedAt?: Date | undefined;
74
- delayedUntil?: Date | undefined;
75
- ttl?: string | undefined;
76
- expiredAt?: Date | undefined;
77
- metadata?: Record<string, any> | undefined;
78
- } | undefined;
79
- parent?: {
80
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
81
- id: string;
82
- createdAt: Date;
83
- tags: string[];
84
- depth: number;
85
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
86
- taskIdentifier: string;
87
- isQueued: boolean;
88
- isExecuting: boolean;
89
- isCompleted: boolean;
90
- isSuccess: boolean;
91
- isFailed: boolean;
92
- isCancelled: boolean;
93
- isTest: boolean;
94
- updatedAt: Date;
95
- costInCents: number;
96
- baseCostInCents: number;
97
- durationMs: number;
98
- batchId?: string | undefined;
99
- idempotencyKey?: string | undefined;
100
- version?: string | undefined;
101
- startedAt?: Date | undefined;
102
- finishedAt?: Date | undefined;
103
- delayedUntil?: Date | undefined;
104
- ttl?: string | undefined;
105
- expiredAt?: Date | undefined;
106
- metadata?: Record<string, any> | undefined;
107
- } | undefined;
108
- children?: {
109
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
110
- id: string;
111
- createdAt: Date;
112
- tags: string[];
113
- depth: number;
114
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
115
- taskIdentifier: string;
116
- isQueued: boolean;
117
- isExecuting: boolean;
118
- isCompleted: boolean;
119
- isSuccess: boolean;
120
- isFailed: boolean;
121
- isCancelled: boolean;
122
- isTest: boolean;
123
- updatedAt: Date;
124
- costInCents: number;
125
- baseCostInCents: number;
126
- durationMs: number;
127
- batchId?: string | undefined;
128
- idempotencyKey?: string | undefined;
129
- version?: string | undefined;
130
- startedAt?: Date | undefined;
131
- finishedAt?: Date | undefined;
132
- delayedUntil?: Date | undefined;
133
- ttl?: string | undefined;
134
- expiredAt?: Date | undefined;
135
- metadata?: Record<string, any> | undefined;
136
- }[] | undefined;
137
- };
138
- attempts: ({
139
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
140
- id: string;
141
- createdAt: Date;
142
- updatedAt: Date;
143
- startedAt?: Date | undefined;
144
- completedAt?: Date | undefined;
145
- error?: {
146
- message: string;
147
- name?: string | undefined;
148
- stackTrace?: string | undefined;
149
- } | undefined;
150
- } | undefined)[];
151
- payload?: any;
152
- payloadPresignedUrl?: string | undefined;
153
- output?: any;
154
- outputPresignedUrl?: string | undefined;
155
- schedule?: {
156
- id: string;
157
- generator: {
158
- type: "CRON";
159
- expression: string;
160
- description: string;
161
- };
162
- externalId?: string | undefined;
163
- deduplicationKey?: string | undefined;
164
- } | undefined;
165
- batchId?: string | undefined;
166
- idempotencyKey?: string | undefined;
167
- version?: string | undefined;
168
- startedAt?: Date | undefined;
169
- finishedAt?: Date | undefined;
170
- delayedUntil?: Date | undefined;
171
- ttl?: string | undefined;
172
- expiredAt?: Date | undefined;
173
- metadata?: Record<string, any> | undefined;
174
- }, "output"> & {
175
- output?: TOutput;
176
- } : TRunId extends Task<string, any, infer TTaskOutput> ? Omit<{
177
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
178
- id: string;
179
- createdAt: Date;
180
- tags: string[];
181
- depth: number;
182
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
183
- taskIdentifier: string;
184
- isQueued: boolean;
185
- isExecuting: boolean;
186
- isCompleted: boolean;
187
- isSuccess: boolean;
188
- isFailed: boolean;
189
- isCancelled: boolean;
190
- isTest: boolean;
191
- updatedAt: Date;
192
- costInCents: number;
193
- baseCostInCents: number;
194
- durationMs: number;
195
- relatedRuns: {
196
- root?: {
197
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
198
- id: string;
199
- createdAt: Date;
200
- tags: string[];
201
- depth: number;
202
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
203
- taskIdentifier: string;
204
- isQueued: boolean;
205
- isExecuting: boolean;
206
- isCompleted: boolean;
207
- isSuccess: boolean;
208
- isFailed: boolean;
209
- isCancelled: boolean;
210
- isTest: boolean;
211
- updatedAt: Date;
212
- costInCents: number;
213
- baseCostInCents: number;
214
- durationMs: number;
215
- batchId?: string | undefined;
216
- idempotencyKey?: string | undefined;
217
- version?: string | undefined;
218
- startedAt?: Date | undefined;
219
- finishedAt?: Date | undefined;
220
- delayedUntil?: Date | undefined;
221
- ttl?: string | undefined;
222
- expiredAt?: Date | undefined;
223
- metadata?: Record<string, any> | undefined;
224
- } | undefined;
225
- parent?: {
226
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
227
- id: string;
228
- createdAt: Date;
229
- tags: string[];
230
- depth: number;
231
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
232
- taskIdentifier: string;
233
- isQueued: boolean;
234
- isExecuting: boolean;
235
- isCompleted: boolean;
236
- isSuccess: boolean;
237
- isFailed: boolean;
238
- isCancelled: boolean;
239
- isTest: boolean;
240
- updatedAt: Date;
241
- costInCents: number;
242
- baseCostInCents: number;
243
- durationMs: number;
244
- batchId?: string | undefined;
245
- idempotencyKey?: string | undefined;
246
- version?: string | undefined;
247
- startedAt?: Date | undefined;
248
- finishedAt?: Date | undefined;
249
- delayedUntil?: Date | undefined;
250
- ttl?: string | undefined;
251
- expiredAt?: Date | undefined;
252
- metadata?: Record<string, any> | undefined;
253
- } | undefined;
254
- children?: {
255
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
256
- id: string;
257
- createdAt: Date;
258
- tags: string[];
259
- depth: number;
260
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
261
- taskIdentifier: string;
262
- isQueued: boolean;
263
- isExecuting: boolean;
264
- isCompleted: boolean;
265
- isSuccess: boolean;
266
- isFailed: boolean;
267
- isCancelled: boolean;
268
- isTest: boolean;
269
- updatedAt: Date;
270
- costInCents: number;
271
- baseCostInCents: number;
272
- durationMs: number;
273
- batchId?: string | undefined;
274
- idempotencyKey?: string | undefined;
275
- version?: string | undefined;
276
- startedAt?: Date | undefined;
277
- finishedAt?: Date | undefined;
278
- delayedUntil?: Date | undefined;
279
- ttl?: string | undefined;
280
- expiredAt?: Date | undefined;
281
- metadata?: Record<string, any> | undefined;
282
- }[] | undefined;
283
- };
284
- attempts: ({
285
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
286
- id: string;
287
- createdAt: Date;
288
- updatedAt: Date;
289
- startedAt?: Date | undefined;
290
- completedAt?: Date | undefined;
291
- error?: {
292
- message: string;
293
- name?: string | undefined;
294
- stackTrace?: string | undefined;
295
- } | undefined;
296
- } | undefined)[];
297
- payload?: any;
298
- payloadPresignedUrl?: string | undefined;
299
- output?: any;
300
- outputPresignedUrl?: string | undefined;
301
- schedule?: {
302
- id: string;
303
- generator: {
304
- type: "CRON";
305
- expression: string;
306
- description: string;
307
- };
308
- externalId?: string | undefined;
309
- deduplicationKey?: string | undefined;
310
- } | undefined;
311
- batchId?: string | undefined;
312
- idempotencyKey?: string | undefined;
313
- version?: string | undefined;
314
- startedAt?: Date | undefined;
315
- finishedAt?: Date | undefined;
316
- delayedUntil?: Date | undefined;
317
- ttl?: string | undefined;
318
- expiredAt?: Date | undefined;
319
- metadata?: Record<string, any> | undefined;
320
- }, "output"> & {
321
- output?: TTaskOutput;
322
- } : TRunId extends string ? {
323
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
324
- id: string;
325
- createdAt: Date;
326
- tags: string[];
327
- depth: number;
328
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
329
- taskIdentifier: string;
330
- isQueued: boolean;
331
- isExecuting: boolean;
332
- isCompleted: boolean;
333
- isSuccess: boolean;
334
- isFailed: boolean;
335
- isCancelled: boolean;
336
- isTest: boolean;
337
- updatedAt: Date;
338
- costInCents: number;
339
- baseCostInCents: number;
340
- durationMs: number;
341
- relatedRuns: {
342
- root?: {
343
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
344
- id: string;
345
- createdAt: Date;
346
- tags: string[];
347
- depth: number;
348
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
349
- taskIdentifier: string;
350
- isQueued: boolean;
351
- isExecuting: boolean;
352
- isCompleted: boolean;
353
- isSuccess: boolean;
354
- isFailed: boolean;
355
- isCancelled: boolean;
356
- isTest: boolean;
357
- updatedAt: Date;
358
- costInCents: number;
359
- baseCostInCents: number;
360
- durationMs: number;
361
- batchId?: string | undefined;
362
- idempotencyKey?: string | undefined;
363
- version?: string | undefined;
364
- startedAt?: Date | undefined;
365
- finishedAt?: Date | undefined;
366
- delayedUntil?: Date | undefined;
367
- ttl?: string | undefined;
368
- expiredAt?: Date | undefined;
369
- metadata?: Record<string, any> | undefined;
370
- } | undefined;
371
- parent?: {
372
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
373
- id: string;
374
- createdAt: Date;
375
- tags: string[];
376
- depth: number;
377
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
378
- taskIdentifier: string;
379
- isQueued: boolean;
380
- isExecuting: boolean;
381
- isCompleted: boolean;
382
- isSuccess: boolean;
383
- isFailed: boolean;
384
- isCancelled: boolean;
385
- isTest: boolean;
386
- updatedAt: Date;
387
- costInCents: number;
388
- baseCostInCents: number;
389
- durationMs: number;
390
- batchId?: string | undefined;
391
- idempotencyKey?: string | undefined;
392
- version?: string | undefined;
393
- startedAt?: Date | undefined;
394
- finishedAt?: Date | undefined;
395
- delayedUntil?: Date | undefined;
396
- ttl?: string | undefined;
397
- expiredAt?: Date | undefined;
398
- metadata?: Record<string, any> | undefined;
399
- } | undefined;
400
- children?: {
401
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
402
- id: string;
403
- createdAt: Date;
404
- tags: string[];
405
- depth: number;
406
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
407
- taskIdentifier: string;
408
- isQueued: boolean;
409
- isExecuting: boolean;
410
- isCompleted: boolean;
411
- isSuccess: boolean;
412
- isFailed: boolean;
413
- isCancelled: boolean;
414
- isTest: boolean;
415
- updatedAt: Date;
416
- costInCents: number;
417
- baseCostInCents: number;
418
- durationMs: number;
419
- batchId?: string | undefined;
420
- idempotencyKey?: string | undefined;
421
- version?: string | undefined;
422
- startedAt?: Date | undefined;
423
- finishedAt?: Date | undefined;
424
- delayedUntil?: Date | undefined;
425
- ttl?: string | undefined;
426
- expiredAt?: Date | undefined;
427
- metadata?: Record<string, any> | undefined;
428
- }[] | undefined;
429
- };
430
- attempts: ({
431
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
432
- id: string;
433
- createdAt: Date;
434
- updatedAt: Date;
435
- startedAt?: Date | undefined;
436
- completedAt?: Date | undefined;
437
- error?: {
438
- message: string;
439
- name?: string | undefined;
440
- stackTrace?: string | undefined;
441
- } | undefined;
442
- } | undefined)[];
443
- payload?: any;
444
- payloadPresignedUrl?: string | undefined;
445
- output?: any;
446
- outputPresignedUrl?: string | undefined;
447
- schedule?: {
448
- id: string;
449
- generator: {
450
- type: "CRON";
451
- expression: string;
452
- description: string;
453
- };
454
- externalId?: string | undefined;
455
- deduplicationKey?: string | undefined;
456
- } | undefined;
457
- batchId?: string | undefined;
458
- idempotencyKey?: string | undefined;
459
- version?: string | undefined;
460
- startedAt?: Date | undefined;
461
- finishedAt?: Date | undefined;
462
- delayedUntil?: Date | undefined;
463
- ttl?: string | undefined;
464
- expiredAt?: Date | undefined;
465
- metadata?: Record<string, any> | undefined;
466
- } : never) extends infer T ? { [K in keyof T]: (TRunId extends RunHandle<infer TOutput> ? Omit<{
467
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
468
- id: string;
469
- createdAt: Date;
470
- tags: string[];
471
- depth: number;
472
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
473
- taskIdentifier: string;
474
- isQueued: boolean;
475
- isExecuting: boolean;
476
- isCompleted: boolean;
477
- isSuccess: boolean;
478
- isFailed: boolean;
479
- isCancelled: boolean;
480
- isTest: boolean;
481
- updatedAt: Date;
482
- costInCents: number;
483
- baseCostInCents: number;
484
- durationMs: number;
485
- relatedRuns: {
486
- root?: {
487
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
488
- id: string;
489
- createdAt: Date;
490
- tags: string[];
491
- depth: number;
492
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
493
- taskIdentifier: string;
494
- isQueued: boolean;
495
- isExecuting: boolean;
496
- isCompleted: boolean;
497
- isSuccess: boolean;
498
- isFailed: boolean;
499
- isCancelled: boolean;
500
- isTest: boolean;
501
- updatedAt: Date;
502
- costInCents: number;
503
- baseCostInCents: number;
504
- durationMs: number;
505
- batchId?: string | undefined;
506
- idempotencyKey?: string | undefined;
507
- version?: string | undefined;
508
- startedAt?: Date | undefined;
509
- finishedAt?: Date | undefined;
510
- delayedUntil?: Date | undefined;
511
- ttl?: string | undefined;
512
- expiredAt?: Date | undefined;
513
- metadata?: Record<string, any> | undefined;
514
- } | undefined;
515
- parent?: {
516
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
517
- id: string;
518
- createdAt: Date;
519
- tags: string[];
520
- depth: number;
521
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
522
- taskIdentifier: string;
523
- isQueued: boolean;
524
- isExecuting: boolean;
525
- isCompleted: boolean;
526
- isSuccess: boolean;
527
- isFailed: boolean;
528
- isCancelled: boolean;
529
- isTest: boolean;
530
- updatedAt: Date;
531
- costInCents: number;
532
- baseCostInCents: number;
533
- durationMs: number;
534
- batchId?: string | undefined;
535
- idempotencyKey?: string | undefined;
536
- version?: string | undefined;
537
- startedAt?: Date | undefined;
538
- finishedAt?: Date | undefined;
539
- delayedUntil?: Date | undefined;
540
- ttl?: string | undefined;
541
- expiredAt?: Date | undefined;
542
- metadata?: Record<string, any> | undefined;
543
- } | undefined;
544
- children?: {
545
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
546
- id: string;
547
- createdAt: Date;
548
- tags: string[];
549
- depth: number;
550
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
551
- taskIdentifier: string;
552
- isQueued: boolean;
553
- isExecuting: boolean;
554
- isCompleted: boolean;
555
- isSuccess: boolean;
556
- isFailed: boolean;
557
- isCancelled: boolean;
558
- isTest: boolean;
559
- updatedAt: Date;
560
- costInCents: number;
561
- baseCostInCents: number;
562
- durationMs: number;
563
- batchId?: string | undefined;
564
- idempotencyKey?: string | undefined;
565
- version?: string | undefined;
566
- startedAt?: Date | undefined;
567
- finishedAt?: Date | undefined;
568
- delayedUntil?: Date | undefined;
569
- ttl?: string | undefined;
570
- expiredAt?: Date | undefined;
571
- metadata?: Record<string, any> | undefined;
572
- }[] | undefined;
573
- };
574
- attempts: ({
575
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
576
- id: string;
577
- createdAt: Date;
578
- updatedAt: Date;
579
- startedAt?: Date | undefined;
580
- completedAt?: Date | undefined;
581
- error?: {
582
- message: string;
583
- name?: string | undefined;
584
- stackTrace?: string | undefined;
585
- } | undefined;
586
- } | undefined)[];
587
- payload?: any;
588
- payloadPresignedUrl?: string | undefined;
589
- output?: any;
590
- outputPresignedUrl?: string | undefined;
28
+ }, requestOptions?: ApiRequestOptions): Promise<{
29
+ tags: string[];
30
+ version?: string | undefined;
31
+ error?: {
32
+ message: string;
33
+ name?: string | undefined;
34
+ stackTrace?: string | undefined;
35
+ } | undefined;
36
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
37
+ taskIdentifier: string;
591
38
  schedule?: {
592
39
  id: string;
593
40
  generator: {
41
+ description: string;
594
42
  type: "CRON";
595
43
  expression: string;
596
- description: string;
597
44
  };
598
45
  externalId?: string | undefined;
599
46
  deduplicationKey?: string | undefined;
600
47
  } | undefined;
601
- batchId?: string | undefined;
602
- idempotencyKey?: string | undefined;
603
- version?: string | undefined;
604
- startedAt?: Date | undefined;
605
- finishedAt?: Date | undefined;
606
- delayedUntil?: Date | undefined;
607
- ttl?: string | undefined;
608
- expiredAt?: Date | undefined;
609
- metadata?: Record<string, any> | undefined;
610
- }, "output"> & {
611
- output?: TOutput;
612
- } : TRunId extends Task<string, any, infer TTaskOutput> ? Omit<{
613
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
48
+ isTest: boolean;
614
49
  id: string;
615
50
  createdAt: Date;
616
- tags: string[];
617
- depth: number;
618
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
619
- taskIdentifier: string;
620
- isQueued: boolean;
621
- isExecuting: boolean;
622
- isCompleted: boolean;
623
- isSuccess: boolean;
624
- isFailed: boolean;
625
- isCancelled: boolean;
626
- isTest: boolean;
627
- updatedAt: Date;
51
+ durationMs: number;
628
52
  costInCents: number;
629
53
  baseCostInCents: number;
630
- durationMs: number;
631
54
  relatedRuns: {
632
55
  root?: {
633
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
56
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
634
57
  id: string;
635
- createdAt: Date;
636
58
  tags: string[];
59
+ isTest: boolean;
60
+ createdAt: Date;
61
+ durationMs: number;
62
+ costInCents: number;
63
+ baseCostInCents: number;
64
+ taskIdentifier: string;
637
65
  depth: number;
638
66
  triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
639
- taskIdentifier: string;
640
67
  isQueued: boolean;
641
68
  isExecuting: boolean;
642
69
  isCompleted: boolean;
643
70
  isSuccess: boolean;
644
71
  isFailed: boolean;
645
72
  isCancelled: boolean;
646
- isTest: boolean;
647
73
  updatedAt: Date;
648
- costInCents: number;
649
- baseCostInCents: number;
650
- durationMs: number;
651
74
  batchId?: string | undefined;
652
75
  idempotencyKey?: string | undefined;
653
76
  version?: string | undefined;
@@ -659,24 +82,24 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
659
82
  metadata?: Record<string, any> | undefined;
660
83
  } | undefined;
661
84
  parent?: {
662
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
85
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
663
86
  id: string;
664
- createdAt: Date;
665
87
  tags: string[];
88
+ isTest: boolean;
89
+ createdAt: Date;
90
+ durationMs: number;
91
+ costInCents: number;
92
+ baseCostInCents: number;
93
+ taskIdentifier: string;
666
94
  depth: number;
667
95
  triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
668
- taskIdentifier: string;
669
96
  isQueued: boolean;
670
97
  isExecuting: boolean;
671
98
  isCompleted: boolean;
672
99
  isSuccess: boolean;
673
100
  isFailed: boolean;
674
101
  isCancelled: boolean;
675
- isTest: boolean;
676
102
  updatedAt: Date;
677
- costInCents: number;
678
- baseCostInCents: number;
679
- durationMs: number;
680
103
  batchId?: string | undefined;
681
104
  idempotencyKey?: string | undefined;
682
105
  version?: string | undefined;
@@ -688,24 +111,24 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
688
111
  metadata?: Record<string, any> | undefined;
689
112
  } | undefined;
690
113
  children?: {
691
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
114
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
692
115
  id: string;
693
- createdAt: Date;
694
116
  tags: string[];
117
+ isTest: boolean;
118
+ createdAt: Date;
119
+ durationMs: number;
120
+ costInCents: number;
121
+ baseCostInCents: number;
122
+ taskIdentifier: string;
695
123
  depth: number;
696
124
  triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
697
- taskIdentifier: string;
698
125
  isQueued: boolean;
699
126
  isExecuting: boolean;
700
127
  isCompleted: boolean;
701
128
  isSuccess: boolean;
702
129
  isFailed: boolean;
703
130
  isCancelled: boolean;
704
- isTest: boolean;
705
131
  updatedAt: Date;
706
- costInCents: number;
707
- baseCostInCents: number;
708
- durationMs: number;
709
132
  batchId?: string | undefined;
710
133
  idempotencyKey?: string | undefined;
711
134
  version?: string | undefined;
@@ -717,154 +140,17 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
717
140
  metadata?: Record<string, any> | undefined;
718
141
  }[] | undefined;
719
142
  };
720
- attempts: ({
721
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
722
- id: string;
723
- createdAt: Date;
724
- updatedAt: Date;
725
- startedAt?: Date | undefined;
726
- completedAt?: Date | undefined;
727
- error?: {
728
- message: string;
729
- name?: string | undefined;
730
- stackTrace?: string | undefined;
731
- } | undefined;
732
- } | undefined)[];
733
- payload?: any;
734
- payloadPresignedUrl?: string | undefined;
735
- output?: any;
736
- outputPresignedUrl?: string | undefined;
737
- schedule?: {
738
- id: string;
739
- generator: {
740
- type: "CRON";
741
- expression: string;
742
- description: string;
743
- };
744
- externalId?: string | undefined;
745
- deduplicationKey?: string | undefined;
746
- } | undefined;
747
- batchId?: string | undefined;
748
- idempotencyKey?: string | undefined;
749
- version?: string | undefined;
750
- startedAt?: Date | undefined;
751
- finishedAt?: Date | undefined;
752
- delayedUntil?: Date | undefined;
753
- ttl?: string | undefined;
754
- expiredAt?: Date | undefined;
755
- metadata?: Record<string, any> | undefined;
756
- }, "output"> & {
757
- output?: TTaskOutput;
758
- } : TRunId extends string ? {
759
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
760
- id: string;
761
- createdAt: Date;
762
- tags: string[];
763
143
  depth: number;
764
144
  triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
765
- taskIdentifier: string;
766
145
  isQueued: boolean;
767
146
  isExecuting: boolean;
768
147
  isCompleted: boolean;
769
148
  isSuccess: boolean;
770
149
  isFailed: boolean;
771
150
  isCancelled: boolean;
772
- isTest: boolean;
773
151
  updatedAt: Date;
774
- costInCents: number;
775
- baseCostInCents: number;
776
- durationMs: number;
777
- relatedRuns: {
778
- root?: {
779
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
780
- id: string;
781
- createdAt: Date;
782
- tags: string[];
783
- depth: number;
784
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
785
- taskIdentifier: string;
786
- isQueued: boolean;
787
- isExecuting: boolean;
788
- isCompleted: boolean;
789
- isSuccess: boolean;
790
- isFailed: boolean;
791
- isCancelled: boolean;
792
- isTest: boolean;
793
- updatedAt: Date;
794
- costInCents: number;
795
- baseCostInCents: number;
796
- durationMs: number;
797
- batchId?: string | undefined;
798
- idempotencyKey?: string | undefined;
799
- version?: string | undefined;
800
- startedAt?: Date | undefined;
801
- finishedAt?: Date | undefined;
802
- delayedUntil?: Date | undefined;
803
- ttl?: string | undefined;
804
- expiredAt?: Date | undefined;
805
- metadata?: Record<string, any> | undefined;
806
- } | undefined;
807
- parent?: {
808
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
809
- id: string;
810
- createdAt: Date;
811
- tags: string[];
812
- depth: number;
813
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
814
- taskIdentifier: string;
815
- isQueued: boolean;
816
- isExecuting: boolean;
817
- isCompleted: boolean;
818
- isSuccess: boolean;
819
- isFailed: boolean;
820
- isCancelled: boolean;
821
- isTest: boolean;
822
- updatedAt: Date;
823
- costInCents: number;
824
- baseCostInCents: number;
825
- durationMs: number;
826
- batchId?: string | undefined;
827
- idempotencyKey?: string | undefined;
828
- version?: string | undefined;
829
- startedAt?: Date | undefined;
830
- finishedAt?: Date | undefined;
831
- delayedUntil?: Date | undefined;
832
- ttl?: string | undefined;
833
- expiredAt?: Date | undefined;
834
- metadata?: Record<string, any> | undefined;
835
- } | undefined;
836
- children?: {
837
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
838
- id: string;
839
- createdAt: Date;
840
- tags: string[];
841
- depth: number;
842
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
843
- taskIdentifier: string;
844
- isQueued: boolean;
845
- isExecuting: boolean;
846
- isCompleted: boolean;
847
- isSuccess: boolean;
848
- isFailed: boolean;
849
- isCancelled: boolean;
850
- isTest: boolean;
851
- updatedAt: Date;
852
- costInCents: number;
853
- baseCostInCents: number;
854
- durationMs: number;
855
- batchId?: string | undefined;
856
- idempotencyKey?: string | undefined;
857
- version?: string | undefined;
858
- startedAt?: Date | undefined;
859
- finishedAt?: Date | undefined;
860
- delayedUntil?: Date | undefined;
861
- ttl?: string | undefined;
862
- expiredAt?: Date | undefined;
863
- metadata?: Record<string, any> | undefined;
864
- }[] | undefined;
865
- };
866
152
  attempts: ({
867
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
153
+ status: "EXECUTING" | "COMPLETED" | "CANCELED" | "FAILED" | "PENDING" | "PAUSED";
868
154
  id: string;
869
155
  createdAt: Date;
870
156
  updatedAt: Date;
@@ -876,28 +162,19 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
876
162
  stackTrace?: string | undefined;
877
163
  } | undefined;
878
164
  } | undefined)[];
879
- payload?: any;
165
+ attemptCount: number;
880
166
  payloadPresignedUrl?: string | undefined;
881
- output?: any;
882
167
  outputPresignedUrl?: string | undefined;
883
- schedule?: {
884
- id: string;
885
- generator: {
886
- type: "CRON";
887
- expression: string;
888
- description: string;
889
- };
890
- externalId?: string | undefined;
891
- deduplicationKey?: string | undefined;
892
- } | undefined;
893
168
  batchId?: string | undefined;
894
169
  idempotencyKey?: string | undefined;
895
- version?: string | undefined;
896
170
  startedAt?: Date | undefined;
897
171
  finishedAt?: Date | undefined;
898
172
  delayedUntil?: Date | undefined;
899
173
  ttl?: string | undefined;
900
174
  expiredAt?: Date | undefined;
901
175
  metadata?: Record<string, any> | undefined;
902
- } : never)[K]; } : never>;
903
- export {};
176
+ output?: InferRunTypes<TRunId>["output"] | undefined;
177
+ payload?: InferRunTypes<TRunId>["payload"] | undefined;
178
+ }>;
179
+ declare function subscribeToRun<TRunId extends AnyRunHandle | AnyTask | string>(runId: RunId<TRunId>): RunSubscription<InferRunTypes<TRunId>>;
180
+ declare function subscribeToRunsWithTag<TTasks extends AnyTask>(tag: string | string[]): RunSubscription<InferRunTypes<TTasks>>;