@trigger.dev/sdk 3.0.5 → 3.0.7

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.
@@ -50,6 +50,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
50
50
  durationMs: number;
51
51
  costInCents: number;
52
52
  baseCostInCents: number;
53
+ depth: number;
54
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
53
55
  taskIdentifier: string;
54
56
  isQueued: boolean;
55
57
  isExecuting: boolean;
@@ -57,6 +59,92 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
57
59
  isSuccess: boolean;
58
60
  isFailed: boolean;
59
61
  isCancelled: boolean;
62
+ relatedRuns: {
63
+ root?: {
64
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
65
+ id: string;
66
+ updatedAt: Date;
67
+ isTest: boolean;
68
+ createdAt: Date;
69
+ tags: string[];
70
+ durationMs: number;
71
+ costInCents: number;
72
+ baseCostInCents: number;
73
+ depth: number;
74
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
75
+ taskIdentifier: string;
76
+ isQueued: boolean;
77
+ isExecuting: boolean;
78
+ isCompleted: boolean;
79
+ isSuccess: boolean;
80
+ isFailed: boolean;
81
+ isCancelled: boolean;
82
+ batchId?: string | undefined;
83
+ idempotencyKey?: string | undefined;
84
+ version?: string | undefined;
85
+ startedAt?: Date | undefined;
86
+ finishedAt?: Date | undefined;
87
+ delayedUntil?: Date | undefined;
88
+ ttl?: string | undefined;
89
+ expiredAt?: Date | undefined;
90
+ } | undefined;
91
+ parent?: {
92
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
93
+ id: string;
94
+ updatedAt: Date;
95
+ isTest: boolean;
96
+ createdAt: Date;
97
+ tags: string[];
98
+ durationMs: number;
99
+ costInCents: number;
100
+ baseCostInCents: number;
101
+ depth: number;
102
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
103
+ taskIdentifier: string;
104
+ isQueued: boolean;
105
+ isExecuting: boolean;
106
+ isCompleted: boolean;
107
+ isSuccess: boolean;
108
+ isFailed: boolean;
109
+ isCancelled: boolean;
110
+ batchId?: string | undefined;
111
+ idempotencyKey?: string | undefined;
112
+ version?: string | undefined;
113
+ startedAt?: Date | undefined;
114
+ finishedAt?: Date | undefined;
115
+ delayedUntil?: Date | undefined;
116
+ ttl?: string | undefined;
117
+ expiredAt?: Date | undefined;
118
+ } | undefined;
119
+ children?: {
120
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
121
+ id: string;
122
+ updatedAt: Date;
123
+ isTest: boolean;
124
+ createdAt: Date;
125
+ tags: string[];
126
+ durationMs: number;
127
+ costInCents: number;
128
+ baseCostInCents: number;
129
+ depth: number;
130
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
131
+ taskIdentifier: string;
132
+ isQueued: boolean;
133
+ isExecuting: boolean;
134
+ isCompleted: boolean;
135
+ isSuccess: boolean;
136
+ isFailed: boolean;
137
+ isCancelled: boolean;
138
+ batchId?: string | undefined;
139
+ idempotencyKey?: string | undefined;
140
+ version?: string | undefined;
141
+ startedAt?: Date | undefined;
142
+ finishedAt?: Date | undefined;
143
+ delayedUntil?: Date | undefined;
144
+ ttl?: string | undefined;
145
+ expiredAt?: Date | undefined;
146
+ }[] | undefined;
147
+ };
60
148
  payload?: any;
61
149
  payloadPresignedUrl?: string | undefined;
62
150
  output?: any;
@@ -71,6 +159,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
71
159
  externalId?: string | undefined;
72
160
  deduplicationKey?: string | undefined;
73
161
  } | undefined;
162
+ batchId?: string | undefined;
74
163
  idempotencyKey?: string | undefined;
75
164
  version?: string | undefined;
76
165
  startedAt?: Date | undefined;
@@ -103,6 +192,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
103
192
  durationMs: number;
104
193
  costInCents: number;
105
194
  baseCostInCents: number;
195
+ depth: number;
196
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
106
197
  taskIdentifier: string;
107
198
  isQueued: boolean;
108
199
  isExecuting: boolean;
@@ -110,6 +201,92 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
110
201
  isSuccess: boolean;
111
202
  isFailed: boolean;
112
203
  isCancelled: boolean;
204
+ relatedRuns: {
205
+ root?: {
206
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
207
+ id: string;
208
+ updatedAt: Date;
209
+ isTest: boolean;
210
+ createdAt: Date;
211
+ tags: string[];
212
+ durationMs: number;
213
+ costInCents: number;
214
+ baseCostInCents: number;
215
+ depth: number;
216
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
217
+ taskIdentifier: string;
218
+ isQueued: boolean;
219
+ isExecuting: boolean;
220
+ isCompleted: boolean;
221
+ isSuccess: boolean;
222
+ isFailed: boolean;
223
+ isCancelled: boolean;
224
+ batchId?: string | undefined;
225
+ idempotencyKey?: string | undefined;
226
+ version?: string | undefined;
227
+ startedAt?: Date | undefined;
228
+ finishedAt?: Date | undefined;
229
+ delayedUntil?: Date | undefined;
230
+ ttl?: string | undefined;
231
+ expiredAt?: Date | undefined;
232
+ } | undefined;
233
+ parent?: {
234
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
235
+ id: string;
236
+ updatedAt: Date;
237
+ isTest: boolean;
238
+ createdAt: Date;
239
+ tags: string[];
240
+ durationMs: number;
241
+ costInCents: number;
242
+ baseCostInCents: number;
243
+ depth: number;
244
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
245
+ taskIdentifier: string;
246
+ isQueued: boolean;
247
+ isExecuting: boolean;
248
+ isCompleted: boolean;
249
+ isSuccess: boolean;
250
+ isFailed: boolean;
251
+ isCancelled: boolean;
252
+ batchId?: string | undefined;
253
+ idempotencyKey?: string | undefined;
254
+ version?: string | undefined;
255
+ startedAt?: Date | undefined;
256
+ finishedAt?: Date | undefined;
257
+ delayedUntil?: Date | undefined;
258
+ ttl?: string | undefined;
259
+ expiredAt?: Date | undefined;
260
+ } | undefined;
261
+ children?: {
262
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
263
+ id: string;
264
+ updatedAt: Date;
265
+ isTest: boolean;
266
+ createdAt: Date;
267
+ tags: string[];
268
+ durationMs: number;
269
+ costInCents: number;
270
+ baseCostInCents: number;
271
+ depth: number;
272
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
273
+ taskIdentifier: string;
274
+ isQueued: boolean;
275
+ isExecuting: boolean;
276
+ isCompleted: boolean;
277
+ isSuccess: boolean;
278
+ isFailed: boolean;
279
+ isCancelled: boolean;
280
+ batchId?: string | undefined;
281
+ idempotencyKey?: string | undefined;
282
+ version?: string | undefined;
283
+ startedAt?: Date | undefined;
284
+ finishedAt?: Date | undefined;
285
+ delayedUntil?: Date | undefined;
286
+ ttl?: string | undefined;
287
+ expiredAt?: Date | undefined;
288
+ }[] | undefined;
289
+ };
113
290
  payload?: any;
114
291
  payloadPresignedUrl?: string | undefined;
115
292
  output?: any;
@@ -124,6 +301,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
124
301
  externalId?: string | undefined;
125
302
  deduplicationKey?: string | undefined;
126
303
  } | undefined;
304
+ batchId?: string | undefined;
127
305
  idempotencyKey?: string | undefined;
128
306
  version?: string | undefined;
129
307
  startedAt?: Date | undefined;
@@ -156,6 +334,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
156
334
  durationMs: number;
157
335
  costInCents: number;
158
336
  baseCostInCents: number;
337
+ depth: number;
338
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
159
339
  taskIdentifier: string;
160
340
  isQueued: boolean;
161
341
  isExecuting: boolean;
@@ -163,6 +343,92 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
163
343
  isSuccess: boolean;
164
344
  isFailed: boolean;
165
345
  isCancelled: boolean;
346
+ relatedRuns: {
347
+ root?: {
348
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
349
+ id: string;
350
+ updatedAt: Date;
351
+ isTest: boolean;
352
+ createdAt: Date;
353
+ tags: string[];
354
+ durationMs: number;
355
+ costInCents: number;
356
+ baseCostInCents: number;
357
+ depth: number;
358
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
359
+ taskIdentifier: string;
360
+ isQueued: boolean;
361
+ isExecuting: boolean;
362
+ isCompleted: boolean;
363
+ isSuccess: boolean;
364
+ isFailed: boolean;
365
+ isCancelled: boolean;
366
+ batchId?: string | undefined;
367
+ idempotencyKey?: string | undefined;
368
+ version?: string | undefined;
369
+ startedAt?: Date | undefined;
370
+ finishedAt?: Date | undefined;
371
+ delayedUntil?: Date | undefined;
372
+ ttl?: string | undefined;
373
+ expiredAt?: Date | undefined;
374
+ } | undefined;
375
+ parent?: {
376
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
377
+ id: string;
378
+ updatedAt: Date;
379
+ isTest: boolean;
380
+ createdAt: Date;
381
+ tags: string[];
382
+ durationMs: number;
383
+ costInCents: number;
384
+ baseCostInCents: number;
385
+ depth: number;
386
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
387
+ taskIdentifier: string;
388
+ isQueued: boolean;
389
+ isExecuting: boolean;
390
+ isCompleted: boolean;
391
+ isSuccess: boolean;
392
+ isFailed: boolean;
393
+ isCancelled: boolean;
394
+ batchId?: string | undefined;
395
+ idempotencyKey?: string | undefined;
396
+ version?: string | undefined;
397
+ startedAt?: Date | undefined;
398
+ finishedAt?: Date | undefined;
399
+ delayedUntil?: Date | undefined;
400
+ ttl?: string | undefined;
401
+ expiredAt?: Date | undefined;
402
+ } | undefined;
403
+ children?: {
404
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
405
+ id: string;
406
+ updatedAt: Date;
407
+ isTest: boolean;
408
+ createdAt: Date;
409
+ tags: string[];
410
+ durationMs: number;
411
+ costInCents: number;
412
+ baseCostInCents: number;
413
+ depth: number;
414
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
415
+ taskIdentifier: string;
416
+ isQueued: boolean;
417
+ isExecuting: boolean;
418
+ isCompleted: boolean;
419
+ isSuccess: boolean;
420
+ isFailed: boolean;
421
+ isCancelled: boolean;
422
+ batchId?: string | undefined;
423
+ idempotencyKey?: string | undefined;
424
+ version?: string | undefined;
425
+ startedAt?: Date | undefined;
426
+ finishedAt?: Date | undefined;
427
+ delayedUntil?: Date | undefined;
428
+ ttl?: string | undefined;
429
+ expiredAt?: Date | undefined;
430
+ }[] | undefined;
431
+ };
166
432
  payload?: any;
167
433
  payloadPresignedUrl?: string | undefined;
168
434
  output?: any;
@@ -177,6 +443,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
177
443
  externalId?: string | undefined;
178
444
  deduplicationKey?: string | undefined;
179
445
  } | undefined;
446
+ batchId?: string | undefined;
180
447
  idempotencyKey?: string | undefined;
181
448
  version?: string | undefined;
182
449
  startedAt?: Date | undefined;
@@ -207,6 +474,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
207
474
  durationMs: number;
208
475
  costInCents: number;
209
476
  baseCostInCents: number;
477
+ depth: number;
478
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
210
479
  taskIdentifier: string;
211
480
  isQueued: boolean;
212
481
  isExecuting: boolean;
@@ -214,6 +483,92 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
214
483
  isSuccess: boolean;
215
484
  isFailed: boolean;
216
485
  isCancelled: boolean;
486
+ relatedRuns: {
487
+ root?: {
488
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
489
+ id: string;
490
+ updatedAt: Date;
491
+ isTest: boolean;
492
+ createdAt: Date;
493
+ tags: string[];
494
+ durationMs: number;
495
+ costInCents: number;
496
+ baseCostInCents: number;
497
+ depth: number;
498
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
499
+ taskIdentifier: string;
500
+ isQueued: boolean;
501
+ isExecuting: boolean;
502
+ isCompleted: boolean;
503
+ isSuccess: boolean;
504
+ isFailed: boolean;
505
+ isCancelled: boolean;
506
+ batchId?: string | undefined;
507
+ idempotencyKey?: string | undefined;
508
+ version?: string | undefined;
509
+ startedAt?: Date | undefined;
510
+ finishedAt?: Date | undefined;
511
+ delayedUntil?: Date | undefined;
512
+ ttl?: string | undefined;
513
+ expiredAt?: Date | undefined;
514
+ } | undefined;
515
+ parent?: {
516
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
517
+ id: string;
518
+ updatedAt: Date;
519
+ isTest: boolean;
520
+ createdAt: Date;
521
+ tags: string[];
522
+ durationMs: number;
523
+ costInCents: number;
524
+ baseCostInCents: number;
525
+ depth: number;
526
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
527
+ taskIdentifier: string;
528
+ isQueued: boolean;
529
+ isExecuting: boolean;
530
+ isCompleted: boolean;
531
+ isSuccess: boolean;
532
+ isFailed: boolean;
533
+ isCancelled: boolean;
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
+ } | undefined;
543
+ children?: {
544
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
545
+ id: string;
546
+ updatedAt: Date;
547
+ isTest: boolean;
548
+ createdAt: Date;
549
+ tags: string[];
550
+ durationMs: number;
551
+ costInCents: number;
552
+ baseCostInCents: number;
553
+ depth: number;
554
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
555
+ taskIdentifier: string;
556
+ isQueued: boolean;
557
+ isExecuting: boolean;
558
+ isCompleted: boolean;
559
+ isSuccess: boolean;
560
+ isFailed: boolean;
561
+ isCancelled: boolean;
562
+ batchId?: string | undefined;
563
+ idempotencyKey?: string | undefined;
564
+ version?: string | undefined;
565
+ startedAt?: Date | undefined;
566
+ finishedAt?: Date | undefined;
567
+ delayedUntil?: Date | undefined;
568
+ ttl?: string | undefined;
569
+ expiredAt?: Date | undefined;
570
+ }[] | undefined;
571
+ };
217
572
  payload?: any;
218
573
  payloadPresignedUrl?: string | undefined;
219
574
  output?: any;
@@ -228,6 +583,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
228
583
  externalId?: string | undefined;
229
584
  deduplicationKey?: string | undefined;
230
585
  } | undefined;
586
+ batchId?: string | undefined;
231
587
  idempotencyKey?: string | undefined;
232
588
  version?: string | undefined;
233
589
  startedAt?: Date | undefined;
@@ -260,6 +616,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
260
616
  durationMs: number;
261
617
  costInCents: number;
262
618
  baseCostInCents: number;
619
+ depth: number;
620
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
263
621
  taskIdentifier: string;
264
622
  isQueued: boolean;
265
623
  isExecuting: boolean;
@@ -267,6 +625,92 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
267
625
  isSuccess: boolean;
268
626
  isFailed: boolean;
269
627
  isCancelled: boolean;
628
+ relatedRuns: {
629
+ root?: {
630
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
631
+ id: string;
632
+ updatedAt: Date;
633
+ isTest: boolean;
634
+ createdAt: Date;
635
+ tags: string[];
636
+ durationMs: number;
637
+ costInCents: number;
638
+ baseCostInCents: number;
639
+ depth: number;
640
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
641
+ taskIdentifier: string;
642
+ isQueued: boolean;
643
+ isExecuting: boolean;
644
+ isCompleted: boolean;
645
+ isSuccess: boolean;
646
+ isFailed: boolean;
647
+ isCancelled: boolean;
648
+ batchId?: string | undefined;
649
+ idempotencyKey?: string | undefined;
650
+ version?: string | undefined;
651
+ startedAt?: Date | undefined;
652
+ finishedAt?: Date | undefined;
653
+ delayedUntil?: Date | undefined;
654
+ ttl?: string | undefined;
655
+ expiredAt?: Date | undefined;
656
+ } | undefined;
657
+ parent?: {
658
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
659
+ id: string;
660
+ updatedAt: Date;
661
+ isTest: boolean;
662
+ createdAt: Date;
663
+ tags: string[];
664
+ durationMs: number;
665
+ costInCents: number;
666
+ baseCostInCents: number;
667
+ depth: number;
668
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
669
+ taskIdentifier: string;
670
+ isQueued: boolean;
671
+ isExecuting: boolean;
672
+ isCompleted: boolean;
673
+ isSuccess: boolean;
674
+ isFailed: boolean;
675
+ isCancelled: boolean;
676
+ batchId?: string | undefined;
677
+ idempotencyKey?: string | undefined;
678
+ version?: string | undefined;
679
+ startedAt?: Date | undefined;
680
+ finishedAt?: Date | undefined;
681
+ delayedUntil?: Date | undefined;
682
+ ttl?: string | undefined;
683
+ expiredAt?: Date | undefined;
684
+ } | undefined;
685
+ children?: {
686
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
687
+ id: string;
688
+ updatedAt: Date;
689
+ isTest: boolean;
690
+ createdAt: Date;
691
+ tags: string[];
692
+ durationMs: number;
693
+ costInCents: number;
694
+ baseCostInCents: number;
695
+ depth: number;
696
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
697
+ taskIdentifier: string;
698
+ isQueued: boolean;
699
+ isExecuting: boolean;
700
+ isCompleted: boolean;
701
+ isSuccess: boolean;
702
+ isFailed: boolean;
703
+ isCancelled: boolean;
704
+ batchId?: string | undefined;
705
+ idempotencyKey?: string | undefined;
706
+ version?: string | undefined;
707
+ startedAt?: Date | undefined;
708
+ finishedAt?: Date | undefined;
709
+ delayedUntil?: Date | undefined;
710
+ ttl?: string | undefined;
711
+ expiredAt?: Date | undefined;
712
+ }[] | undefined;
713
+ };
270
714
  payload?: any;
271
715
  payloadPresignedUrl?: string | undefined;
272
716
  output?: any;
@@ -281,6 +725,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
281
725
  externalId?: string | undefined;
282
726
  deduplicationKey?: string | undefined;
283
727
  } | undefined;
728
+ batchId?: string | undefined;
284
729
  idempotencyKey?: string | undefined;
285
730
  version?: string | undefined;
286
731
  startedAt?: Date | undefined;
@@ -313,6 +758,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
313
758
  durationMs: number;
314
759
  costInCents: number;
315
760
  baseCostInCents: number;
761
+ depth: number;
762
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
316
763
  taskIdentifier: string;
317
764
  isQueued: boolean;
318
765
  isExecuting: boolean;
@@ -320,6 +767,92 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
320
767
  isSuccess: boolean;
321
768
  isFailed: boolean;
322
769
  isCancelled: boolean;
770
+ relatedRuns: {
771
+ root?: {
772
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
773
+ id: string;
774
+ updatedAt: Date;
775
+ isTest: boolean;
776
+ createdAt: Date;
777
+ tags: string[];
778
+ durationMs: number;
779
+ costInCents: number;
780
+ baseCostInCents: number;
781
+ depth: number;
782
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
783
+ taskIdentifier: string;
784
+ isQueued: boolean;
785
+ isExecuting: boolean;
786
+ isCompleted: boolean;
787
+ isSuccess: boolean;
788
+ isFailed: boolean;
789
+ isCancelled: boolean;
790
+ batchId?: string | undefined;
791
+ idempotencyKey?: string | undefined;
792
+ version?: string | undefined;
793
+ startedAt?: Date | undefined;
794
+ finishedAt?: Date | undefined;
795
+ delayedUntil?: Date | undefined;
796
+ ttl?: string | undefined;
797
+ expiredAt?: Date | undefined;
798
+ } | undefined;
799
+ parent?: {
800
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
801
+ id: string;
802
+ updatedAt: Date;
803
+ isTest: boolean;
804
+ createdAt: Date;
805
+ tags: string[];
806
+ durationMs: number;
807
+ costInCents: number;
808
+ baseCostInCents: number;
809
+ depth: number;
810
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
811
+ taskIdentifier: string;
812
+ isQueued: boolean;
813
+ isExecuting: boolean;
814
+ isCompleted: boolean;
815
+ isSuccess: boolean;
816
+ isFailed: boolean;
817
+ isCancelled: boolean;
818
+ batchId?: string | undefined;
819
+ idempotencyKey?: string | undefined;
820
+ version?: string | undefined;
821
+ startedAt?: Date | undefined;
822
+ finishedAt?: Date | undefined;
823
+ delayedUntil?: Date | undefined;
824
+ ttl?: string | undefined;
825
+ expiredAt?: Date | undefined;
826
+ } | undefined;
827
+ children?: {
828
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
829
+ id: string;
830
+ updatedAt: Date;
831
+ isTest: boolean;
832
+ createdAt: Date;
833
+ tags: string[];
834
+ durationMs: number;
835
+ costInCents: number;
836
+ baseCostInCents: number;
837
+ depth: number;
838
+ triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
839
+ taskIdentifier: string;
840
+ isQueued: boolean;
841
+ isExecuting: boolean;
842
+ isCompleted: boolean;
843
+ isSuccess: boolean;
844
+ isFailed: boolean;
845
+ isCancelled: boolean;
846
+ batchId?: string | undefined;
847
+ idempotencyKey?: string | undefined;
848
+ version?: string | undefined;
849
+ startedAt?: Date | undefined;
850
+ finishedAt?: Date | undefined;
851
+ delayedUntil?: Date | undefined;
852
+ ttl?: string | undefined;
853
+ expiredAt?: Date | undefined;
854
+ }[] | undefined;
855
+ };
323
856
  payload?: any;
324
857
  payloadPresignedUrl?: string | undefined;
325
858
  output?: any;
@@ -334,6 +867,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
334
867
  externalId?: string | undefined;
335
868
  deduplicationKey?: string | undefined;
336
869
  } | undefined;
870
+ batchId?: string | undefined;
337
871
  idempotencyKey?: string | undefined;
338
872
  version?: string | undefined;
339
873
  startedAt?: Date | undefined;
@@ -237,6 +237,7 @@ async function trigger_internal(name, id, payload, options, requestOptions) {
237
237
  ttl: options?.ttl,
238
238
  tags: options?.tags,
239
239
  maxAttempts: options?.maxAttempts,
240
+ parentAttempt: v3_1.taskContext.ctx?.attempt.id,
240
241
  },
241
242
  }, {
242
243
  spanParentAsLink: true,
@@ -290,6 +291,7 @@ async function batchTrigger_internal(name, id, items, requestOptions, queue) {
290
291
  ttl: item.options?.ttl,
291
292
  tags: item.options?.tags,
292
293
  maxAttempts: item.options?.maxAttempts,
294
+ parentAttempt: v3_1.taskContext.ctx?.attempt.id,
293
295
  },
294
296
  };
295
297
  })),