@trigger.dev/sdk 0.0.0-prerelease-20240918205213 → 0.0.0-prerelease-20240920102011

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