@trigger.dev/sdk 2.0.0-next.0 → 2.0.0-next.1

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.
package/dist/index.d.ts CHANGED
@@ -69,55 +69,59 @@ declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
69
69
  }>>>;
70
70
  }, {
71
71
  idempotencyKey: z.ZodString;
72
+ attempts: z.ZodNumber;
72
73
  }>, "strip", z.ZodTypeAny, {
73
- error?: string | null | undefined;
74
- params?: DeserializedJson | undefined;
75
74
  icon?: string | null | undefined;
76
- style?: {
77
- variant?: string | undefined;
78
- style: "normal" | "minimal";
79
- } | null | undefined;
80
75
  startedAt?: Date | null | undefined;
81
76
  completedAt?: Date | null | undefined;
82
77
  delayUntil?: Date | null | undefined;
83
78
  description?: string | null | undefined;
79
+ params?: DeserializedJson | undefined;
84
80
  properties?: {
85
81
  url?: string | undefined;
86
82
  label: string;
87
83
  text: string;
88
84
  }[] | null | undefined;
89
85
  output?: DeserializedJson | undefined;
86
+ error?: string | null | undefined;
90
87
  parentId?: string | null | undefined;
91
- status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
88
+ style?: {
89
+ variant?: string | undefined;
90
+ style: "normal" | "minimal";
91
+ } | null | undefined;
92
92
  id: string;
93
93
  name: string;
94
94
  noop: boolean;
95
+ status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
95
96
  idempotencyKey: string;
97
+ attempts: number;
96
98
  }, {
97
- error?: string | null | undefined;
98
- params?: DeserializedJson | undefined;
99
99
  icon?: string | null | undefined;
100
- style?: {
101
- variant?: string | undefined;
102
- style: "normal" | "minimal";
103
- } | null | undefined;
104
100
  startedAt?: Date | null | undefined;
105
101
  completedAt?: Date | null | undefined;
106
102
  delayUntil?: Date | null | undefined;
107
103
  description?: string | null | undefined;
104
+ params?: DeserializedJson | undefined;
108
105
  properties?: {
109
106
  url?: string | undefined;
110
107
  label: string;
111
108
  text: string;
112
109
  }[] | null | undefined;
113
110
  output?: DeserializedJson | undefined;
111
+ error?: string | null | undefined;
114
112
  parentId?: string | null | undefined;
115
- status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
113
+ style?: {
114
+ variant?: string | undefined;
115
+ style: "normal" | "minimal";
116
+ } | null | undefined;
116
117
  id: string;
117
118
  name: string;
118
119
  noop: boolean;
120
+ status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
119
121
  idempotencyKey: string;
122
+ attempts: number;
120
123
  }>;
124
+ type ServerTask = z.infer<typeof ServerTaskSchema>;
121
125
  declare const CachedTaskSchema: z.ZodObject<{
122
126
  id: z.ZodString;
123
127
  idempotencyKey: z.ZodString;
@@ -128,16 +132,16 @@ declare const CachedTaskSchema: z.ZodObject<{
128
132
  }, "strip", z.ZodTypeAny, {
129
133
  output?: DeserializedJson | undefined;
130
134
  parentId?: string | null | undefined;
131
- status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
132
135
  id: string;
133
136
  noop: boolean;
137
+ status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
134
138
  idempotencyKey: string;
135
139
  }, {
136
140
  noop?: boolean | undefined;
137
141
  output?: DeserializedJson | undefined;
138
142
  parentId?: string | null | undefined;
139
- status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
140
143
  id: string;
144
+ status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
141
145
  idempotencyKey: string;
142
146
  }>;
143
147
 
@@ -167,11 +171,11 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
167
171
  type: z.ZodLiteral<"HTTP">;
168
172
  url: z.ZodString;
169
173
  }, "strip", z.ZodTypeAny, {
170
- type: "HTTP";
171
174
  url: string;
172
- }, {
173
175
  type: "HTTP";
176
+ }, {
174
177
  url: string;
178
+ type: "HTTP";
175
179
  }>, z.ZodObject<{
176
180
  type: z.ZodLiteral<"SMTP">;
177
181
  }, "strip", z.ZodTypeAny, {
@@ -187,30 +191,30 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
187
191
  }>]>;
188
192
  clientId: z.ZodOptional<z.ZodString>;
189
193
  }, "strip", z.ZodTypeAny, {
190
- data?: DeserializedJson | undefined;
191
194
  params?: any;
195
+ data?: DeserializedJson | undefined;
192
196
  clientId?: string | undefined;
193
197
  key: string;
194
198
  secret: string;
195
199
  active: boolean;
196
200
  channel: {
197
- type: "HTTP";
198
201
  url: string;
202
+ type: "HTTP";
199
203
  } | {
200
204
  type: "SMTP";
201
205
  } | {
202
206
  type: "SQS";
203
207
  };
204
208
  }, {
205
- data?: DeserializedJson | undefined;
206
209
  params?: any;
210
+ data?: DeserializedJson | undefined;
207
211
  clientId?: string | undefined;
208
212
  key: string;
209
213
  secret: string;
210
214
  active: boolean;
211
215
  channel: {
212
- type: "HTTP";
213
216
  url: string;
217
+ type: "HTTP";
214
218
  } | {
215
219
  type: "SMTP";
216
220
  } | {
@@ -225,15 +229,15 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
225
229
  dynamicTriggerId?: string | undefined;
226
230
  id: string;
227
231
  source: {
228
- data?: DeserializedJson | undefined;
229
232
  params?: any;
233
+ data?: DeserializedJson | undefined;
230
234
  clientId?: string | undefined;
231
235
  key: string;
232
236
  secret: string;
233
237
  active: boolean;
234
238
  channel: {
235
- type: "HTTP";
236
239
  url: string;
240
+ type: "HTTP";
237
241
  } | {
238
242
  type: "SMTP";
239
243
  } | {
@@ -247,15 +251,15 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
247
251
  dynamicTriggerId?: string | undefined;
248
252
  id: string;
249
253
  source: {
250
- data?: DeserializedJson | undefined;
251
254
  params?: any;
255
+ data?: DeserializedJson | undefined;
252
256
  clientId?: string | undefined;
253
257
  key: string;
254
258
  secret: string;
255
259
  active: boolean;
256
260
  channel: {
257
- type: "HTTP";
258
261
  url: string;
262
+ type: "HTTP";
259
263
  } | {
260
264
  type: "SMTP";
261
265
  } | {
@@ -271,11 +275,11 @@ declare const TriggerSourceSchema: z.ZodObject<{
271
275
  id: z.ZodString;
272
276
  key: z.ZodString;
273
277
  }, "strip", z.ZodTypeAny, {
274
- key: string;
275
278
  id: string;
276
- }, {
277
279
  key: string;
280
+ }, {
278
281
  id: string;
282
+ key: string;
279
283
  }>;
280
284
  declare const HandleTriggerSourceSchema: z.ZodObject<{
281
285
  key: z.ZodString;
@@ -283,13 +287,13 @@ declare const HandleTriggerSourceSchema: z.ZodObject<{
283
287
  data: z.ZodAny;
284
288
  params: z.ZodAny;
285
289
  }, "strip", z.ZodTypeAny, {
286
- data?: any;
287
290
  params?: any;
291
+ data?: any;
288
292
  key: string;
289
293
  secret: string;
290
294
  }, {
291
- data?: any;
292
295
  params?: any;
296
+ data?: any;
293
297
  key: string;
294
298
  secret: string;
295
299
  }>;
@@ -330,7 +334,22 @@ declare const JobMetadataSchema: z.ZodObject<{
330
334
  text: string;
331
335
  }>, "many">>;
332
336
  schema: z.ZodOptional<z.ZodAny>;
333
- examples: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
337
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
338
+ id: z.ZodString;
339
+ icon: z.ZodOptional<z.ZodString>;
340
+ name: z.ZodString;
341
+ payload: z.ZodAny;
342
+ }, "strip", z.ZodTypeAny, {
343
+ icon?: string | undefined;
344
+ payload?: any;
345
+ id: string;
346
+ name: string;
347
+ }, {
348
+ icon?: string | undefined;
349
+ payload?: any;
350
+ id: string;
351
+ name: string;
352
+ }>, "many">>;
334
353
  }, "strip", z.ZodTypeAny, {
335
354
  filter?: EventFilter | undefined;
336
355
  properties?: {
@@ -339,11 +358,16 @@ declare const JobMetadataSchema: z.ZodObject<{
339
358
  text: string;
340
359
  }[] | undefined;
341
360
  schema?: any;
342
- examples?: any[] | undefined;
343
- title: string;
344
- icon: string;
361
+ examples?: {
362
+ icon?: string | undefined;
363
+ payload?: any;
364
+ id: string;
365
+ name: string;
366
+ }[] | undefined;
345
367
  name: string;
368
+ icon: string;
346
369
  source: string;
370
+ title: string;
347
371
  }, {
348
372
  filter?: EventFilter | undefined;
349
373
  properties?: {
@@ -352,21 +376,26 @@ declare const JobMetadataSchema: z.ZodObject<{
352
376
  text: string;
353
377
  }[] | undefined;
354
378
  schema?: any;
355
- examples?: any[] | undefined;
356
- title: string;
357
- icon: string;
379
+ examples?: {
380
+ icon?: string | undefined;
381
+ payload?: any;
382
+ id: string;
383
+ name: string;
384
+ }[] | undefined;
358
385
  name: string;
386
+ icon: string;
359
387
  source: string;
388
+ title: string;
360
389
  }>;
361
390
  trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
362
391
  type: z.ZodLiteral<"dynamic">;
363
392
  id: z.ZodString;
364
393
  }, "strip", z.ZodTypeAny, {
365
- type: "dynamic";
366
394
  id: string;
367
- }, {
368
395
  type: "dynamic";
396
+ }, {
369
397
  id: string;
398
+ type: "dynamic";
370
399
  }>, z.ZodObject<{
371
400
  type: z.ZodLiteral<"static">;
372
401
  title: z.ZodString;
@@ -512,27 +541,27 @@ declare const JobMetadataSchema: z.ZodObject<{
512
541
  title: z.ZodString;
513
542
  icon: z.ZodString;
514
543
  }, "strip", z.ZodTypeAny, {
544
+ icon: string;
515
545
  key: string;
516
546
  title: string;
517
- icon: string;
518
547
  }, {
548
+ icon: string;
519
549
  key: string;
520
550
  title: string;
521
- icon: string;
522
551
  }>;
523
552
  }, "strip", z.ZodTypeAny, {
524
553
  id: string;
525
554
  metadata: {
555
+ icon: string;
526
556
  key: string;
527
557
  title: string;
528
- icon: string;
529
558
  };
530
559
  }, {
531
560
  id: string;
532
561
  metadata: {
562
+ icon: string;
533
563
  key: string;
534
564
  title: string;
535
- icon: string;
536
565
  };
537
566
  }>>;
538
567
  internal: z.ZodDefault<z.ZodBoolean>;
@@ -564,16 +593,21 @@ declare const JobMetadataSchema: z.ZodObject<{
564
593
  text: string;
565
594
  }[] | undefined;
566
595
  schema?: any;
567
- examples?: any[] | undefined;
568
- title: string;
569
- icon: string;
596
+ examples?: {
597
+ icon?: string | undefined;
598
+ payload?: any;
599
+ id: string;
600
+ name: string;
601
+ }[] | undefined;
570
602
  name: string;
603
+ icon: string;
571
604
  source: string;
605
+ title: string;
572
606
  };
573
607
  version: string;
574
608
  trigger: {
575
- type: "dynamic";
576
609
  id: string;
610
+ type: "dynamic";
577
611
  } | {
578
612
  properties?: {
579
613
  url?: string | undefined;
@@ -607,9 +641,9 @@ declare const JobMetadataSchema: z.ZodObject<{
607
641
  integrations: Record<string, {
608
642
  id: string;
609
643
  metadata: {
644
+ icon: string;
610
645
  key: string;
611
646
  title: string;
612
- icon: string;
613
647
  };
614
648
  }>;
615
649
  internal: boolean;
@@ -632,16 +666,21 @@ declare const JobMetadataSchema: z.ZodObject<{
632
666
  text: string;
633
667
  }[] | undefined;
634
668
  schema?: any;
635
- examples?: any[] | undefined;
636
- title: string;
637
- icon: string;
669
+ examples?: {
670
+ icon?: string | undefined;
671
+ payload?: any;
672
+ id: string;
673
+ name: string;
674
+ }[] | undefined;
638
675
  name: string;
676
+ icon: string;
639
677
  source: string;
678
+ title: string;
640
679
  };
641
680
  version: string;
642
681
  trigger: {
643
- type: "dynamic";
644
682
  id: string;
683
+ type: "dynamic";
645
684
  } | {
646
685
  properties?: {
647
686
  url?: string | undefined;
@@ -675,9 +714,9 @@ declare const JobMetadataSchema: z.ZodObject<{
675
714
  integrations: Record<string, {
676
715
  id: string;
677
716
  metadata: {
717
+ icon: string;
678
718
  key: string;
679
719
  title: string;
680
- icon: string;
681
720
  };
682
721
  }>;
683
722
  startPosition: "initial" | "latest";
@@ -750,7 +789,22 @@ declare const CreateRunBodySchema: z.ZodObject<{
750
789
  text: string;
751
790
  }>, "many">>;
752
791
  schema: z.ZodOptional<z.ZodAny>;
753
- examples: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
792
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
793
+ id: z.ZodString;
794
+ icon: z.ZodOptional<z.ZodString>;
795
+ name: z.ZodString;
796
+ payload: z.ZodAny;
797
+ }, "strip", z.ZodTypeAny, {
798
+ icon?: string | undefined;
799
+ payload?: any;
800
+ id: string;
801
+ name: string;
802
+ }, {
803
+ icon?: string | undefined;
804
+ payload?: any;
805
+ id: string;
806
+ name: string;
807
+ }>, "many">>;
754
808
  }, "strip", z.ZodTypeAny, {
755
809
  filter?: EventFilter | undefined;
756
810
  properties?: {
@@ -759,11 +813,16 @@ declare const CreateRunBodySchema: z.ZodObject<{
759
813
  text: string;
760
814
  }[] | undefined;
761
815
  schema?: any;
762
- examples?: any[] | undefined;
763
- title: string;
764
- icon: string;
816
+ examples?: {
817
+ icon?: string | undefined;
818
+ payload?: any;
819
+ id: string;
820
+ name: string;
821
+ }[] | undefined;
765
822
  name: string;
823
+ icon: string;
766
824
  source: string;
825
+ title: string;
767
826
  }, {
768
827
  filter?: EventFilter | undefined;
769
828
  properties?: {
@@ -772,21 +831,26 @@ declare const CreateRunBodySchema: z.ZodObject<{
772
831
  text: string;
773
832
  }[] | undefined;
774
833
  schema?: any;
775
- examples?: any[] | undefined;
776
- title: string;
777
- icon: string;
834
+ examples?: {
835
+ icon?: string | undefined;
836
+ payload?: any;
837
+ id: string;
838
+ name: string;
839
+ }[] | undefined;
778
840
  name: string;
841
+ icon: string;
779
842
  source: string;
843
+ title: string;
780
844
  }>;
781
845
  trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
782
846
  type: z.ZodLiteral<"dynamic">;
783
847
  id: z.ZodString;
784
848
  }, "strip", z.ZodTypeAny, {
785
- type: "dynamic";
786
849
  id: string;
787
- }, {
788
850
  type: "dynamic";
851
+ }, {
789
852
  id: string;
853
+ type: "dynamic";
790
854
  }>, z.ZodObject<{
791
855
  type: z.ZodLiteral<"static">;
792
856
  title: z.ZodString;
@@ -932,27 +996,27 @@ declare const CreateRunBodySchema: z.ZodObject<{
932
996
  title: z.ZodString;
933
997
  icon: z.ZodString;
934
998
  }, "strip", z.ZodTypeAny, {
999
+ icon: string;
935
1000
  key: string;
936
1001
  title: string;
937
- icon: string;
938
1002
  }, {
1003
+ icon: string;
939
1004
  key: string;
940
1005
  title: string;
941
- icon: string;
942
1006
  }>;
943
1007
  }, "strip", z.ZodTypeAny, {
944
1008
  id: string;
945
1009
  metadata: {
1010
+ icon: string;
946
1011
  key: string;
947
1012
  title: string;
948
- icon: string;
949
1013
  };
950
1014
  }, {
951
1015
  id: string;
952
1016
  metadata: {
1017
+ icon: string;
953
1018
  key: string;
954
1019
  title: string;
955
- icon: string;
956
1020
  };
957
1021
  }>>;
958
1022
  internal: z.ZodDefault<z.ZodBoolean>;
@@ -984,16 +1048,21 @@ declare const CreateRunBodySchema: z.ZodObject<{
984
1048
  text: string;
985
1049
  }[] | undefined;
986
1050
  schema?: any;
987
- examples?: any[] | undefined;
988
- title: string;
989
- icon: string;
1051
+ examples?: {
1052
+ icon?: string | undefined;
1053
+ payload?: any;
1054
+ id: string;
1055
+ name: string;
1056
+ }[] | undefined;
990
1057
  name: string;
1058
+ icon: string;
991
1059
  source: string;
1060
+ title: string;
992
1061
  };
993
1062
  version: string;
994
1063
  trigger: {
995
- type: "dynamic";
996
1064
  id: string;
1065
+ type: "dynamic";
997
1066
  } | {
998
1067
  properties?: {
999
1068
  url?: string | undefined;
@@ -1027,9 +1096,9 @@ declare const CreateRunBodySchema: z.ZodObject<{
1027
1096
  integrations: Record<string, {
1028
1097
  id: string;
1029
1098
  metadata: {
1099
+ icon: string;
1030
1100
  key: string;
1031
1101
  title: string;
1032
- icon: string;
1033
1102
  };
1034
1103
  }>;
1035
1104
  internal: boolean;
@@ -1052,16 +1121,21 @@ declare const CreateRunBodySchema: z.ZodObject<{
1052
1121
  text: string;
1053
1122
  }[] | undefined;
1054
1123
  schema?: any;
1055
- examples?: any[] | undefined;
1056
- title: string;
1057
- icon: string;
1124
+ examples?: {
1125
+ icon?: string | undefined;
1126
+ payload?: any;
1127
+ id: string;
1128
+ name: string;
1129
+ }[] | undefined;
1058
1130
  name: string;
1131
+ icon: string;
1059
1132
  source: string;
1133
+ title: string;
1060
1134
  };
1061
1135
  version: string;
1062
1136
  trigger: {
1063
- type: "dynamic";
1064
1137
  id: string;
1138
+ type: "dynamic";
1065
1139
  } | {
1066
1140
  properties?: {
1067
1141
  url?: string | undefined;
@@ -1095,9 +1169,9 @@ declare const CreateRunBodySchema: z.ZodObject<{
1095
1169
  integrations: Record<string, {
1096
1170
  id: string;
1097
1171
  metadata: {
1172
+ icon: string;
1098
1173
  key: string;
1099
1174
  title: string;
1100
- icon: string;
1101
1175
  };
1102
1176
  }>;
1103
1177
  startPosition: "initial" | "latest";
@@ -1172,16 +1246,21 @@ declare const CreateRunBodySchema: z.ZodObject<{
1172
1246
  text: string;
1173
1247
  }[] | undefined;
1174
1248
  schema?: any;
1175
- examples?: any[] | undefined;
1176
- title: string;
1177
- icon: string;
1249
+ examples?: {
1250
+ icon?: string | undefined;
1251
+ payload?: any;
1252
+ id: string;
1253
+ name: string;
1254
+ }[] | undefined;
1178
1255
  name: string;
1256
+ icon: string;
1179
1257
  source: string;
1258
+ title: string;
1180
1259
  };
1181
1260
  version: string;
1182
1261
  trigger: {
1183
- type: "dynamic";
1184
1262
  id: string;
1263
+ type: "dynamic";
1185
1264
  } | {
1186
1265
  properties?: {
1187
1266
  url?: string | undefined;
@@ -1215,9 +1294,9 @@ declare const CreateRunBodySchema: z.ZodObject<{
1215
1294
  integrations: Record<string, {
1216
1295
  id: string;
1217
1296
  metadata: {
1297
+ icon: string;
1218
1298
  key: string;
1219
1299
  title: string;
1220
- icon: string;
1221
1300
  };
1222
1301
  }>;
1223
1302
  internal: boolean;
@@ -1257,16 +1336,21 @@ declare const CreateRunBodySchema: z.ZodObject<{
1257
1336
  text: string;
1258
1337
  }[] | undefined;
1259
1338
  schema?: any;
1260
- examples?: any[] | undefined;
1261
- title: string;
1262
- icon: string;
1339
+ examples?: {
1340
+ icon?: string | undefined;
1341
+ payload?: any;
1342
+ id: string;
1343
+ name: string;
1344
+ }[] | undefined;
1263
1345
  name: string;
1346
+ icon: string;
1264
1347
  source: string;
1348
+ title: string;
1265
1349
  };
1266
1350
  version: string;
1267
1351
  trigger: {
1268
- type: "dynamic";
1269
1352
  id: string;
1353
+ type: "dynamic";
1270
1354
  } | {
1271
1355
  properties?: {
1272
1356
  url?: string | undefined;
@@ -1300,9 +1384,9 @@ declare const CreateRunBodySchema: z.ZodObject<{
1300
1384
  integrations: Record<string, {
1301
1385
  id: string;
1302
1386
  metadata: {
1387
+ icon: string;
1303
1388
  key: string;
1304
1389
  title: string;
1305
- icon: string;
1306
1390
  };
1307
1391
  }>;
1308
1392
  startPosition: "initial" | "latest";
@@ -1326,7 +1410,6 @@ declare const SecureStringSchema: z.ZodObject<{
1326
1410
  interpolations: string[];
1327
1411
  }>;
1328
1412
  type SecureString = z.infer<typeof SecureStringSchema>;
1329
- type ServerTask = z.output<typeof ServerTaskSchema>;
1330
1413
  type CachedTask = z.infer<typeof CachedTaskSchema>;
1331
1414
  declare const RunTaskOptionsSchema: z.ZodObject<{
1332
1415
  name: z.ZodString;
@@ -1353,11 +1436,11 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
1353
1436
  type: z.ZodLiteral<"dynamic">;
1354
1437
  id: z.ZodString;
1355
1438
  }, "strip", z.ZodTypeAny, {
1356
- type: "dynamic";
1357
1439
  id: string;
1358
- }, {
1359
1440
  type: "dynamic";
1441
+ }, {
1360
1442
  id: string;
1443
+ type: "dynamic";
1361
1444
  }>, z.ZodObject<{
1362
1445
  type: z.ZodLiteral<"static">;
1363
1446
  title: z.ZodString;
@@ -1514,23 +1597,42 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
1514
1597
  variant?: string | undefined;
1515
1598
  style: "normal" | "minimal";
1516
1599
  }>>;
1600
+ retry: z.ZodOptional<z.ZodObject<{
1601
+ limit: z.ZodOptional<z.ZodNumber>;
1602
+ factor: z.ZodOptional<z.ZodNumber>;
1603
+ minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1604
+ maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1605
+ randomize: z.ZodOptional<z.ZodBoolean>;
1606
+ }, "strip", z.ZodTypeAny, {
1607
+ limit?: number | undefined;
1608
+ factor?: number | undefined;
1609
+ minTimeoutInMs?: number | undefined;
1610
+ maxTimeoutInMs?: number | undefined;
1611
+ randomize?: boolean | undefined;
1612
+ }, {
1613
+ limit?: number | undefined;
1614
+ factor?: number | undefined;
1615
+ minTimeoutInMs?: number | undefined;
1616
+ maxTimeoutInMs?: number | undefined;
1617
+ randomize?: boolean | undefined;
1618
+ }>>;
1517
1619
  }, "strip", z.ZodTypeAny, {
1518
- params?: SerializableJson;
1519
1620
  icon?: string | undefined;
1520
- style?: {
1521
- variant?: string | undefined;
1522
- style: "normal" | "minimal";
1523
- } | undefined;
1524
1621
  delayUntil?: Date | undefined;
1525
1622
  description?: string | undefined;
1623
+ params?: SerializableJson;
1526
1624
  properties?: {
1527
1625
  url?: string | undefined;
1528
1626
  label: string;
1529
1627
  text: string;
1530
1628
  }[] | undefined;
1629
+ style?: {
1630
+ variant?: string | undefined;
1631
+ style: "normal" | "minimal";
1632
+ } | undefined;
1531
1633
  trigger?: {
1532
- type: "dynamic";
1533
1634
  id: string;
1635
+ type: "dynamic";
1534
1636
  } | {
1535
1637
  properties?: {
1536
1638
  url?: string | undefined;
@@ -1566,26 +1668,33 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
1566
1668
  paths: string[];
1567
1669
  } | undefined;
1568
1670
  connectionKey?: string | undefined;
1671
+ retry?: {
1672
+ limit?: number | undefined;
1673
+ factor?: number | undefined;
1674
+ minTimeoutInMs?: number | undefined;
1675
+ maxTimeoutInMs?: number | undefined;
1676
+ randomize?: boolean | undefined;
1677
+ } | undefined;
1569
1678
  name: string;
1570
1679
  noop: boolean;
1571
1680
  }, {
1572
- params?: SerializableJson;
1573
1681
  icon?: string | undefined;
1574
- style?: {
1575
- variant?: string | undefined;
1576
- style: "normal" | "minimal";
1577
- } | undefined;
1578
1682
  noop?: boolean | undefined;
1579
1683
  delayUntil?: Date | undefined;
1580
1684
  description?: string | undefined;
1685
+ params?: SerializableJson;
1581
1686
  properties?: {
1582
1687
  url?: string | undefined;
1583
1688
  label: string;
1584
1689
  text: string;
1585
1690
  }[] | undefined;
1691
+ style?: {
1692
+ variant?: string | undefined;
1693
+ style: "normal" | "minimal";
1694
+ } | undefined;
1586
1695
  trigger?: {
1587
- type: "dynamic";
1588
1696
  id: string;
1697
+ type: "dynamic";
1589
1698
  } | {
1590
1699
  properties?: {
1591
1700
  url?: string | undefined;
@@ -1621,6 +1730,13 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
1621
1730
  paths: string[];
1622
1731
  } | undefined;
1623
1732
  connectionKey?: string | undefined;
1733
+ retry?: {
1734
+ limit?: number | undefined;
1735
+ factor?: number | undefined;
1736
+ minTimeoutInMs?: number | undefined;
1737
+ maxTimeoutInMs?: number | undefined;
1738
+ randomize?: boolean | undefined;
1739
+ } | undefined;
1624
1740
  name: string;
1625
1741
  }>;
1626
1742
  type RunTaskOptions = z.input<typeof RunTaskOptionsSchema>;
@@ -1649,11 +1765,11 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
1649
1765
  type: z.ZodLiteral<"dynamic">;
1650
1766
  id: z.ZodString;
1651
1767
  }, "strip", z.ZodTypeAny, {
1652
- type: "dynamic";
1653
1768
  id: string;
1654
- }, {
1655
1769
  type: "dynamic";
1770
+ }, {
1656
1771
  id: string;
1772
+ type: "dynamic";
1657
1773
  }>, z.ZodObject<{
1658
1774
  type: z.ZodLiteral<"static">;
1659
1775
  title: z.ZodString;
@@ -1810,27 +1926,46 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
1810
1926
  variant?: string | undefined;
1811
1927
  style: "normal" | "minimal";
1812
1928
  }>>;
1929
+ retry: z.ZodOptional<z.ZodObject<{
1930
+ limit: z.ZodOptional<z.ZodNumber>;
1931
+ factor: z.ZodOptional<z.ZodNumber>;
1932
+ minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1933
+ maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1934
+ randomize: z.ZodOptional<z.ZodBoolean>;
1935
+ }, "strip", z.ZodTypeAny, {
1936
+ limit?: number | undefined;
1937
+ factor?: number | undefined;
1938
+ minTimeoutInMs?: number | undefined;
1939
+ maxTimeoutInMs?: number | undefined;
1940
+ randomize?: boolean | undefined;
1941
+ }, {
1942
+ limit?: number | undefined;
1943
+ factor?: number | undefined;
1944
+ minTimeoutInMs?: number | undefined;
1945
+ maxTimeoutInMs?: number | undefined;
1946
+ randomize?: boolean | undefined;
1947
+ }>>;
1813
1948
  }, {
1814
1949
  idempotencyKey: z.ZodString;
1815
1950
  parentId: z.ZodOptional<z.ZodString>;
1816
1951
  }>, "strip", z.ZodTypeAny, {
1817
- params?: SerializableJson;
1818
1952
  icon?: string | undefined;
1819
- style?: {
1820
- variant?: string | undefined;
1821
- style: "normal" | "minimal";
1822
- } | undefined;
1823
1953
  delayUntil?: Date | undefined;
1824
1954
  description?: string | undefined;
1955
+ params?: SerializableJson;
1825
1956
  properties?: {
1826
1957
  url?: string | undefined;
1827
1958
  label: string;
1828
1959
  text: string;
1829
1960
  }[] | undefined;
1830
1961
  parentId?: string | undefined;
1962
+ style?: {
1963
+ variant?: string | undefined;
1964
+ style: "normal" | "minimal";
1965
+ } | undefined;
1831
1966
  trigger?: {
1832
- type: "dynamic";
1833
1967
  id: string;
1968
+ type: "dynamic";
1834
1969
  } | {
1835
1970
  properties?: {
1836
1971
  url?: string | undefined;
@@ -1866,28 +2001,35 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
1866
2001
  paths: string[];
1867
2002
  } | undefined;
1868
2003
  connectionKey?: string | undefined;
2004
+ retry?: {
2005
+ limit?: number | undefined;
2006
+ factor?: number | undefined;
2007
+ minTimeoutInMs?: number | undefined;
2008
+ maxTimeoutInMs?: number | undefined;
2009
+ randomize?: boolean | undefined;
2010
+ } | undefined;
1869
2011
  name: string;
1870
2012
  noop: boolean;
1871
2013
  idempotencyKey: string;
1872
2014
  }, {
1873
- params?: SerializableJson;
1874
2015
  icon?: string | undefined;
1875
- style?: {
1876
- variant?: string | undefined;
1877
- style: "normal" | "minimal";
1878
- } | undefined;
1879
2016
  noop?: boolean | undefined;
1880
2017
  delayUntil?: Date | undefined;
1881
2018
  description?: string | undefined;
2019
+ params?: SerializableJson;
1882
2020
  properties?: {
1883
2021
  url?: string | undefined;
1884
2022
  label: string;
1885
2023
  text: string;
1886
2024
  }[] | undefined;
1887
2025
  parentId?: string | undefined;
2026
+ style?: {
2027
+ variant?: string | undefined;
2028
+ style: "normal" | "minimal";
2029
+ } | undefined;
1888
2030
  trigger?: {
1889
- type: "dynamic";
1890
2031
  id: string;
2032
+ type: "dynamic";
1891
2033
  } | {
1892
2034
  properties?: {
1893
2035
  url?: string | undefined;
@@ -1923,6 +2065,13 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
1923
2065
  paths: string[];
1924
2066
  } | undefined;
1925
2067
  connectionKey?: string | undefined;
2068
+ retry?: {
2069
+ limit?: number | undefined;
2070
+ factor?: number | undefined;
2071
+ minTimeoutInMs?: number | undefined;
2072
+ maxTimeoutInMs?: number | undefined;
2073
+ randomize?: boolean | undefined;
2074
+ } | undefined;
1926
2075
  name: string;
1927
2076
  idempotencyKey: string;
1928
2077
  }>;
@@ -1952,11 +2101,11 @@ declare const CompleteTaskBodyInputSchema: z.ZodObject<z.extendShape<Pick<z.exte
1952
2101
  type: z.ZodLiteral<"dynamic">;
1953
2102
  id: z.ZodString;
1954
2103
  }, "strip", z.ZodTypeAny, {
1955
- type: "dynamic";
1956
2104
  id: string;
1957
- }, {
1958
2105
  type: "dynamic";
2106
+ }, {
1959
2107
  id: string;
2108
+ type: "dynamic";
1960
2109
  }>, z.ZodObject<{
1961
2110
  type: z.ZodLiteral<"static">;
1962
2111
  title: z.ZodString;
@@ -2113,16 +2262,35 @@ declare const CompleteTaskBodyInputSchema: z.ZodObject<z.extendShape<Pick<z.exte
2113
2262
  variant?: string | undefined;
2114
2263
  style: "normal" | "minimal";
2115
2264
  }>>;
2265
+ retry: z.ZodOptional<z.ZodObject<{
2266
+ limit: z.ZodOptional<z.ZodNumber>;
2267
+ factor: z.ZodOptional<z.ZodNumber>;
2268
+ minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
2269
+ maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
2270
+ randomize: z.ZodOptional<z.ZodBoolean>;
2271
+ }, "strip", z.ZodTypeAny, {
2272
+ limit?: number | undefined;
2273
+ factor?: number | undefined;
2274
+ minTimeoutInMs?: number | undefined;
2275
+ maxTimeoutInMs?: number | undefined;
2276
+ randomize?: boolean | undefined;
2277
+ }, {
2278
+ limit?: number | undefined;
2279
+ factor?: number | undefined;
2280
+ minTimeoutInMs?: number | undefined;
2281
+ maxTimeoutInMs?: number | undefined;
2282
+ randomize?: boolean | undefined;
2283
+ }>>;
2116
2284
  }, {
2117
2285
  idempotencyKey: z.ZodString;
2118
2286
  parentId: z.ZodOptional<z.ZodString>;
2119
- }>, "params" | "description" | "properties">, {
2287
+ }>, "description" | "params" | "properties">, {
2120
2288
  output: z.ZodEffects<z.ZodOptional<z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>, string | number | boolean | {
2121
2289
  [key: string]: DeserializedJson;
2122
2290
  } | DeserializedJson[] | null, SerializableJson>;
2123
2291
  }>, "strip", z.ZodTypeAny, {
2124
- params?: SerializableJson;
2125
2292
  description?: string | undefined;
2293
+ params?: SerializableJson;
2126
2294
  properties?: {
2127
2295
  url?: string | undefined;
2128
2296
  label: string;
@@ -2132,8 +2300,8 @@ declare const CompleteTaskBodyInputSchema: z.ZodObject<z.extendShape<Pick<z.exte
2132
2300
  [key: string]: DeserializedJson;
2133
2301
  } | DeserializedJson[] | null;
2134
2302
  }, {
2135
- params?: SerializableJson;
2136
2303
  description?: string | undefined;
2304
+ params?: SerializableJson;
2137
2305
  properties?: {
2138
2306
  url?: string | undefined;
2139
2307
  label: string;
@@ -2142,6 +2310,34 @@ declare const CompleteTaskBodyInputSchema: z.ZodObject<z.extendShape<Pick<z.exte
2142
2310
  output?: SerializableJson;
2143
2311
  }>;
2144
2312
  type CompleteTaskBodyInput = z.input<typeof CompleteTaskBodyInputSchema>;
2313
+ declare const FailTaskBodyInputSchema: z.ZodObject<{
2314
+ error: z.ZodObject<{
2315
+ message: z.ZodString;
2316
+ name: z.ZodOptional<z.ZodString>;
2317
+ stack: z.ZodOptional<z.ZodString>;
2318
+ }, "strip", z.ZodTypeAny, {
2319
+ name?: string | undefined;
2320
+ stack?: string | undefined;
2321
+ message: string;
2322
+ }, {
2323
+ name?: string | undefined;
2324
+ stack?: string | undefined;
2325
+ message: string;
2326
+ }>;
2327
+ }, "strip", z.ZodTypeAny, {
2328
+ error: {
2329
+ name?: string | undefined;
2330
+ stack?: string | undefined;
2331
+ message: string;
2332
+ };
2333
+ }, {
2334
+ error: {
2335
+ name?: string | undefined;
2336
+ stack?: string | undefined;
2337
+ message: string;
2338
+ };
2339
+ }>;
2340
+ type FailTaskBodyInput = z.infer<typeof FailTaskBodyInputSchema>;
2145
2341
  declare const NormalizedRequestSchema: z.ZodObject<{
2146
2342
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
2147
2343
  method: z.ZodString;
@@ -2247,11 +2443,11 @@ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
2247
2443
  type: z.ZodLiteral<"dynamic">;
2248
2444
  id: z.ZodString;
2249
2445
  }, "strip", z.ZodTypeAny, {
2250
- type: "dynamic";
2251
2446
  id: string;
2252
- }, {
2253
2447
  type: "dynamic";
2448
+ }, {
2254
2449
  id: string;
2450
+ type: "dynamic";
2255
2451
  }>, z.ZodObject<{
2256
2452
  type: z.ZodLiteral<"static">;
2257
2453
  title: z.ZodString;
@@ -2392,6 +2588,21 @@ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
2392
2588
  }>]>;
2393
2589
  type TriggerMetadata = z.infer<typeof TriggerMetadataSchema>;
2394
2590
 
2591
+ declare const ErrorWithStackSchema: z.ZodObject<{
2592
+ message: z.ZodString;
2593
+ name: z.ZodOptional<z.ZodString>;
2594
+ stack: z.ZodOptional<z.ZodString>;
2595
+ }, "strip", z.ZodTypeAny, {
2596
+ name?: string | undefined;
2597
+ stack?: string | undefined;
2598
+ message: string;
2599
+ }, {
2600
+ name?: string | undefined;
2601
+ stack?: string | undefined;
2602
+ message: string;
2603
+ }>;
2604
+ type ErrorWithStack = z.infer<typeof ErrorWithStackSchema>;
2605
+
2395
2606
  declare const DisplayPropertySchema: z.ZodObject<{
2396
2607
  label: z.ZodString;
2397
2608
  text: z.ZodString;
@@ -2429,13 +2640,13 @@ declare const IntegrationMetadataSchema: z.ZodObject<{
2429
2640
  title: z.ZodString;
2430
2641
  icon: z.ZodString;
2431
2642
  }, "strip", z.ZodTypeAny, {
2643
+ icon: string;
2432
2644
  key: string;
2433
2645
  title: string;
2434
- icon: string;
2435
2646
  }, {
2647
+ icon: string;
2436
2648
  key: string;
2437
2649
  title: string;
2438
- icon: string;
2439
2650
  }>;
2440
2651
  type IntegrationMetadata = z.infer<typeof IntegrationMetadataSchema>;
2441
2652
  declare const IntegrationConfigSchema: z.ZodObject<{
@@ -2445,27 +2656,27 @@ declare const IntegrationConfigSchema: z.ZodObject<{
2445
2656
  title: z.ZodString;
2446
2657
  icon: z.ZodString;
2447
2658
  }, "strip", z.ZodTypeAny, {
2659
+ icon: string;
2448
2660
  key: string;
2449
2661
  title: string;
2450
- icon: string;
2451
2662
  }, {
2663
+ icon: string;
2452
2664
  key: string;
2453
2665
  title: string;
2454
- icon: string;
2455
2666
  }>;
2456
2667
  }, "strip", z.ZodTypeAny, {
2457
2668
  id: string;
2458
2669
  metadata: {
2670
+ icon: string;
2459
2671
  key: string;
2460
2672
  title: string;
2461
- icon: string;
2462
2673
  };
2463
2674
  }, {
2464
2675
  id: string;
2465
2676
  metadata: {
2677
+ icon: string;
2466
2678
  key: string;
2467
2679
  title: string;
2468
- icon: string;
2469
2680
  };
2470
2681
  }>;
2471
2682
  type IntegrationConfig = z.infer<typeof IntegrationConfigSchema>;
@@ -2555,17 +2766,17 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
2555
2766
  integrationIdentifier: z.ZodString;
2556
2767
  integrationAuthMethod: z.ZodString;
2557
2768
  }, "strip", z.ZodTypeAny, {
2769
+ id: string;
2558
2770
  scopes: string[];
2559
2771
  title: string;
2560
- id: string;
2561
2772
  createdAt: Date;
2562
2773
  updatedAt: Date;
2563
2774
  integrationIdentifier: string;
2564
2775
  integrationAuthMethod: string;
2565
2776
  }, {
2777
+ id: string;
2566
2778
  scopes: string[];
2567
2779
  title: string;
2568
- id: string;
2569
2780
  createdAt: Date;
2570
2781
  updatedAt: Date;
2571
2782
  integrationIdentifier: string;
@@ -2575,12 +2786,12 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
2575
2786
  }, {
2576
2787
  type: z.ZodLiteral<"DEVELOPER">;
2577
2788
  }>, "strip", z.ZodTypeAny, {
2578
- type: "DEVELOPER";
2579
2789
  id: string;
2790
+ type: "DEVELOPER";
2580
2791
  client: {
2792
+ id: string;
2581
2793
  scopes: string[];
2582
2794
  title: string;
2583
- id: string;
2584
2795
  createdAt: Date;
2585
2796
  updatedAt: Date;
2586
2797
  integrationIdentifier: string;
@@ -2588,12 +2799,12 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
2588
2799
  };
2589
2800
  authorizationUrl: string;
2590
2801
  }, {
2591
- type: "DEVELOPER";
2592
2802
  id: string;
2803
+ type: "DEVELOPER";
2593
2804
  client: {
2805
+ id: string;
2594
2806
  scopes: string[];
2595
2807
  title: string;
2596
- id: string;
2597
2808
  createdAt: Date;
2598
2809
  updatedAt: Date;
2599
2810
  integrationIdentifier: string;
@@ -2611,17 +2822,17 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
2611
2822
  integrationIdentifier: z.ZodString;
2612
2823
  integrationAuthMethod: z.ZodString;
2613
2824
  }, "strip", z.ZodTypeAny, {
2825
+ id: string;
2614
2826
  scopes: string[];
2615
2827
  title: string;
2616
- id: string;
2617
2828
  createdAt: Date;
2618
2829
  updatedAt: Date;
2619
2830
  integrationIdentifier: string;
2620
2831
  integrationAuthMethod: string;
2621
2832
  }, {
2833
+ id: string;
2622
2834
  scopes: string[];
2623
2835
  title: string;
2624
- id: string;
2625
2836
  createdAt: Date;
2626
2837
  updatedAt: Date;
2627
2838
  integrationIdentifier: string;
@@ -2641,16 +2852,16 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
2641
2852
  id: string;
2642
2853
  }>;
2643
2854
  }>, "strip", z.ZodTypeAny, {
2644
- type: "EXTERNAL";
2645
2855
  id: string;
2856
+ type: "EXTERNAL";
2646
2857
  account: {
2647
2858
  metadata?: any;
2648
2859
  id: string;
2649
2860
  };
2650
2861
  client: {
2862
+ id: string;
2651
2863
  scopes: string[];
2652
2864
  title: string;
2653
- id: string;
2654
2865
  createdAt: Date;
2655
2866
  updatedAt: Date;
2656
2867
  integrationIdentifier: string;
@@ -2658,16 +2869,16 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
2658
2869
  };
2659
2870
  authorizationUrl: string;
2660
2871
  }, {
2661
- type: "EXTERNAL";
2662
2872
  id: string;
2873
+ type: "EXTERNAL";
2663
2874
  account: {
2664
2875
  metadata?: any;
2665
2876
  id: string;
2666
2877
  };
2667
2878
  client: {
2879
+ id: string;
2668
2880
  scopes: string[];
2669
2881
  title: string;
2670
- id: string;
2671
2882
  createdAt: Date;
2672
2883
  updatedAt: Date;
2673
2884
  integrationIdentifier: string;
@@ -2687,17 +2898,17 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
2687
2898
  integrationIdentifier: z.ZodString;
2688
2899
  integrationAuthMethod: z.ZodString;
2689
2900
  }, "strip", z.ZodTypeAny, {
2901
+ id: string;
2690
2902
  scopes: string[];
2691
2903
  title: string;
2692
- id: string;
2693
2904
  createdAt: Date;
2694
2905
  updatedAt: Date;
2695
2906
  integrationIdentifier: string;
2696
2907
  integrationAuthMethod: string;
2697
2908
  }, {
2909
+ id: string;
2698
2910
  scopes: string[];
2699
2911
  title: string;
2700
- id: string;
2701
2912
  createdAt: Date;
2702
2913
  updatedAt: Date;
2703
2914
  integrationIdentifier: string;
@@ -2707,12 +2918,12 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
2707
2918
  }, {
2708
2919
  type: z.ZodLiteral<"DEVELOPER">;
2709
2920
  }>, "strip", z.ZodTypeAny, {
2710
- type: "DEVELOPER";
2711
2921
  id: string;
2922
+ type: "DEVELOPER";
2712
2923
  client: {
2924
+ id: string;
2713
2925
  scopes: string[];
2714
2926
  title: string;
2715
- id: string;
2716
2927
  createdAt: Date;
2717
2928
  updatedAt: Date;
2718
2929
  integrationIdentifier: string;
@@ -2720,12 +2931,12 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
2720
2931
  };
2721
2932
  expiresAt: Date;
2722
2933
  }, {
2723
- type: "DEVELOPER";
2724
2934
  id: string;
2935
+ type: "DEVELOPER";
2725
2936
  client: {
2937
+ id: string;
2726
2938
  scopes: string[];
2727
2939
  title: string;
2728
- id: string;
2729
2940
  createdAt: Date;
2730
2941
  updatedAt: Date;
2731
2942
  integrationIdentifier: string;
@@ -2743,17 +2954,17 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
2743
2954
  integrationIdentifier: z.ZodString;
2744
2955
  integrationAuthMethod: z.ZodString;
2745
2956
  }, "strip", z.ZodTypeAny, {
2957
+ id: string;
2746
2958
  scopes: string[];
2747
2959
  title: string;
2748
- id: string;
2749
2960
  createdAt: Date;
2750
2961
  updatedAt: Date;
2751
2962
  integrationIdentifier: string;
2752
2963
  integrationAuthMethod: string;
2753
2964
  }, {
2965
+ id: string;
2754
2966
  scopes: string[];
2755
2967
  title: string;
2756
- id: string;
2757
2968
  createdAt: Date;
2758
2969
  updatedAt: Date;
2759
2970
  integrationIdentifier: string;
@@ -2773,16 +2984,16 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
2773
2984
  id: string;
2774
2985
  }>;
2775
2986
  }>, "strip", z.ZodTypeAny, {
2776
- type: "EXTERNAL";
2777
2987
  id: string;
2988
+ type: "EXTERNAL";
2778
2989
  account: {
2779
2990
  metadata?: any;
2780
2991
  id: string;
2781
2992
  };
2782
2993
  client: {
2994
+ id: string;
2783
2995
  scopes: string[];
2784
2996
  title: string;
2785
- id: string;
2786
2997
  createdAt: Date;
2787
2998
  updatedAt: Date;
2788
2999
  integrationIdentifier: string;
@@ -2790,16 +3001,16 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
2790
3001
  };
2791
3002
  expiresAt: Date;
2792
3003
  }, {
2793
- type: "EXTERNAL";
2794
3004
  id: string;
3005
+ type: "EXTERNAL";
2795
3006
  account: {
2796
3007
  metadata?: any;
2797
3008
  id: string;
2798
3009
  };
2799
3010
  client: {
3011
+ id: string;
2800
3012
  scopes: string[];
2801
3013
  title: string;
2802
- id: string;
2803
3014
  createdAt: Date;
2804
3015
  updatedAt: Date;
2805
3016
  integrationIdentifier: string;
@@ -2836,54 +3047,82 @@ declare class ApiClient {
2836
3047
  ok: false;
2837
3048
  }>;
2838
3049
  runTask(runId: string, task: RunTaskBodyInput): Promise<{
2839
- error?: string | null | undefined;
2840
- params?: DeserializedJson | undefined;
2841
3050
  icon?: string | null | undefined;
2842
- style?: {
2843
- variant?: string | undefined;
2844
- style: "normal" | "minimal";
2845
- } | null | undefined;
2846
3051
  startedAt?: Date | null | undefined;
2847
3052
  completedAt?: Date | null | undefined;
2848
3053
  delayUntil?: Date | null | undefined;
2849
3054
  description?: string | null | undefined;
3055
+ params?: DeserializedJson | undefined;
2850
3056
  properties?: {
2851
3057
  url?: string | undefined;
2852
3058
  label: string;
2853
3059
  text: string;
2854
3060
  }[] | null | undefined;
2855
3061
  output?: DeserializedJson | undefined;
3062
+ error?: string | null | undefined;
2856
3063
  parentId?: string | null | undefined;
2857
- status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
3064
+ style?: {
3065
+ variant?: string | undefined;
3066
+ style: "normal" | "minimal";
3067
+ } | null | undefined;
2858
3068
  id: string;
2859
3069
  name: string;
2860
3070
  noop: boolean;
3071
+ status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
2861
3072
  idempotencyKey: string;
3073
+ attempts: number;
2862
3074
  }>;
2863
3075
  completeTask(runId: string, id: string, task: CompleteTaskBodyInput): Promise<{
2864
- error?: string | null | undefined;
2865
- params?: DeserializedJson | undefined;
2866
3076
  icon?: string | null | undefined;
3077
+ startedAt?: Date | null | undefined;
3078
+ completedAt?: Date | null | undefined;
3079
+ delayUntil?: Date | null | undefined;
3080
+ description?: string | null | undefined;
3081
+ params?: DeserializedJson | undefined;
3082
+ properties?: {
3083
+ url?: string | undefined;
3084
+ label: string;
3085
+ text: string;
3086
+ }[] | null | undefined;
3087
+ output?: DeserializedJson | undefined;
3088
+ error?: string | null | undefined;
3089
+ parentId?: string | null | undefined;
2867
3090
  style?: {
2868
3091
  variant?: string | undefined;
2869
3092
  style: "normal" | "minimal";
2870
3093
  } | null | undefined;
3094
+ id: string;
3095
+ name: string;
3096
+ noop: boolean;
3097
+ status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
3098
+ idempotencyKey: string;
3099
+ attempts: number;
3100
+ }>;
3101
+ failTask(runId: string, id: string, body: FailTaskBodyInput): Promise<{
3102
+ icon?: string | null | undefined;
2871
3103
  startedAt?: Date | null | undefined;
2872
3104
  completedAt?: Date | null | undefined;
2873
3105
  delayUntil?: Date | null | undefined;
2874
3106
  description?: string | null | undefined;
3107
+ params?: DeserializedJson | undefined;
2875
3108
  properties?: {
2876
3109
  url?: string | undefined;
2877
3110
  label: string;
2878
3111
  text: string;
2879
3112
  }[] | null | undefined;
2880
3113
  output?: DeserializedJson | undefined;
3114
+ error?: string | null | undefined;
2881
3115
  parentId?: string | null | undefined;
2882
- status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
3116
+ style?: {
3117
+ variant?: string | undefined;
3118
+ style: "normal" | "minimal";
3119
+ } | null | undefined;
2883
3120
  id: string;
2884
3121
  name: string;
2885
3122
  noop: boolean;
3123
+ status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
2886
3124
  idempotencyKey: string;
3125
+ attempts: number;
2887
3126
  }>;
2888
3127
  sendEvent(event: SendEvent, options?: SendEventOptions): Promise<{
2889
3128
  context?: DeserializedJson | undefined;
@@ -3010,7 +3249,12 @@ interface EventSpecification<TEvent extends any> {
3010
3249
  icon: string;
3011
3250
  properties?: DisplayProperty[];
3012
3251
  schema?: any;
3013
- examples?: Array<TEvent>;
3252
+ examples?: Array<{
3253
+ id: string;
3254
+ name: string;
3255
+ icon?: string;
3256
+ payload: TEvent;
3257
+ }>;
3014
3258
  filter?: EventFilter;
3015
3259
  parsePayload: (payload: unknown) => TEvent;
3016
3260
  runProperties?: (payload: TEvent) => DisplayProperty[];
@@ -3117,9 +3361,9 @@ declare class ExternalSource<TIntegration extends TriggerIntegration<Integration
3117
3361
  get integrationConfig(): {
3118
3362
  id: string;
3119
3363
  metadata: {
3364
+ icon: string;
3120
3365
  key: string;
3121
3366
  title: string;
3122
- icon: string;
3123
3367
  };
3124
3368
  };
3125
3369
  get id(): string;
@@ -3194,15 +3438,15 @@ declare class TriggerClient {
3194
3438
  dynamicTriggerId?: string | undefined;
3195
3439
  id: string;
3196
3440
  source: {
3197
- data?: DeserializedJson | undefined;
3198
3441
  params?: any;
3442
+ data?: DeserializedJson | undefined;
3199
3443
  clientId?: string | undefined;
3200
3444
  key: string;
3201
3445
  secret: string;
3202
3446
  active: boolean;
3203
3447
  channel: {
3204
- type: "HTTP";
3205
3448
  url: string;
3449
+ type: "HTTP";
3206
3450
  } | {
3207
3451
  type: "SMTP";
3208
3452
  } | {
@@ -3343,10 +3587,6 @@ declare class DynamicSchedule implements Trigger<ScheduledEventSpecification> {
3343
3587
  toJSON(): TriggerMetadata;
3344
3588
  }
3345
3589
 
3346
- declare class ResumeWithTask {
3347
- task: ServerTask;
3348
- constructor(task: ServerTask);
3349
- }
3350
3590
  type IOTask = ServerTask;
3351
3591
  type IOOptions = {
3352
3592
  id: string;
@@ -3381,8 +3621,8 @@ declare class IO {
3381
3621
  updateSource(key: string | any[], options: {
3382
3622
  key: string;
3383
3623
  } & UpdateTriggerSourceBody): Promise<{
3384
- key: string;
3385
3624
  id: string;
3625
+ key: string;
3386
3626
  }>;
3387
3627
  registerInterval(key: string | any[], dynamicSchedule: DynamicSchedule, id: string, options: IntervalOptions): Promise<{
3388
3628
  metadata?: any;
@@ -3431,7 +3671,11 @@ declare class IO {
3431
3671
  key: string;
3432
3672
  } | undefined>;
3433
3673
  getAuth(key: string | any[], clientId?: string): Promise<ConnectionAuth | undefined>;
3434
- runTask<T extends SerializableJson | void = void>(key: string | any[], options: RunTaskOptions, callback: (task: IOTask, io: IO) => Promise<T>): Promise<T>;
3674
+ runTask<TResult extends SerializableJson | void = void>(key: string | any[], options: RunTaskOptions, callback: (task: IOTask, io: IO) => Promise<TResult>, onError?: (error: unknown, task: IOTask, io: IO) => {
3675
+ retryAt: Date;
3676
+ error?: Error;
3677
+ } | undefined | void): Promise<TResult>;
3678
+ try<TResult, TCatchResult>(tryCallback: () => Promise<TResult>, catchCallback: (error: unknown) => Promise<TCatchResult>): Promise<TResult | TCatchResult>;
3435
3679
  }
3436
3680
  type CallbackFunction = (level: "DEBUG" | "INFO" | "WARN" | "ERROR", message: string, properties?: Record<string, any>) => Promise<void>;
3437
3681
  declare class IOLogger implements TaskLogger {
@@ -3461,6 +3705,10 @@ type IntegrationClient<TClient, TTasks extends Record<string, AuthenticatedTask<
3461
3705
  type AuthenticatedTask<TClient, TParams, TResult> = {
3462
3706
  run: (params: TParams, client: TClient, task: ServerTask, io: IO) => Promise<TResult>;
3463
3707
  init: (params: TParams) => RunTaskOptions;
3708
+ onError?: (error: unknown, task: ServerTask) => {
3709
+ retryAt: Date;
3710
+ error?: Error;
3711
+ } | undefined | void;
3464
3712
  };
3465
3713
  declare function authenticatedTask<TClient, TParams, TResult>(options: {
3466
3714
  run: (params: TParams, client: TClient, task: ServerTask, io: IO) => Promise<TResult>;
@@ -3550,12 +3798,12 @@ declare class MissingConnectionNotification implements Trigger<MissingConnection
3550
3798
  source: string;
3551
3799
  icon: string;
3552
3800
  parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
3553
- type: "DEVELOPER";
3554
3801
  id: string;
3802
+ type: "DEVELOPER";
3555
3803
  client: {
3804
+ id: string;
3556
3805
  scopes: string[];
3557
3806
  title: string;
3558
- id: string;
3559
3807
  createdAt: Date;
3560
3808
  updatedAt: Date;
3561
3809
  integrationIdentifier: string;
@@ -3563,16 +3811,16 @@ declare class MissingConnectionNotification implements Trigger<MissingConnection
3563
3811
  };
3564
3812
  authorizationUrl: string;
3565
3813
  } | {
3566
- type: "EXTERNAL";
3567
3814
  id: string;
3815
+ type: "EXTERNAL";
3568
3816
  account: {
3569
3817
  metadata?: any;
3570
3818
  id: string;
3571
3819
  };
3572
3820
  client: {
3821
+ id: string;
3573
3822
  scopes: string[];
3574
3823
  title: string;
3575
- id: string;
3576
3824
  createdAt: Date;
3577
3825
  updatedAt: Date;
3578
3826
  integrationIdentifier: string;
@@ -3599,12 +3847,12 @@ declare class MissingConnectionResolvedNotification implements Trigger<MissingCo
3599
3847
  source: string;
3600
3848
  icon: string;
3601
3849
  parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
3602
- type: "DEVELOPER";
3603
3850
  id: string;
3851
+ type: "DEVELOPER";
3604
3852
  client: {
3853
+ id: string;
3605
3854
  scopes: string[];
3606
3855
  title: string;
3607
- id: string;
3608
3856
  createdAt: Date;
3609
3857
  updatedAt: Date;
3610
3858
  integrationIdentifier: string;
@@ -3612,16 +3860,16 @@ declare class MissingConnectionResolvedNotification implements Trigger<MissingCo
3612
3860
  };
3613
3861
  expiresAt: Date;
3614
3862
  } | {
3615
- type: "EXTERNAL";
3616
3863
  id: string;
3864
+ type: "EXTERNAL";
3617
3865
  account: {
3618
3866
  metadata?: any;
3619
3867
  id: string;
3620
3868
  };
3621
3869
  client: {
3870
+ id: string;
3622
3871
  scopes: string[];
3623
3872
  title: string;
3624
- id: string;
3625
3873
  createdAt: Date;
3626
3874
  updatedAt: Date;
3627
3875
  integrationIdentifier: string;
@@ -3639,6 +3887,19 @@ declare class MissingConnectionResolvedNotification implements Trigger<MissingCo
3639
3887
  toJSON(): TriggerMetadata;
3640
3888
  }
3641
3889
 
3890
+ declare class ResumeWithTaskError {
3891
+ task: ServerTask;
3892
+ constructor(task: ServerTask);
3893
+ }
3894
+ declare class RetryWithTaskError {
3895
+ cause: ErrorWithStack;
3896
+ task: ServerTask;
3897
+ retryAt: Date;
3898
+ constructor(cause: ErrorWithStack, task: ServerTask, retryAt: Date);
3899
+ }
3900
+ declare function isTriggerError(err: unknown): err is ResumeWithTaskError | RetryWithTaskError;
3901
+
3902
+ type Task = ServerTask;
3642
3903
  declare function secureString(strings: TemplateStringsArray, ...interpolations: string[]): SecureString;
3643
3904
 
3644
- export { AuthenticatedTask, ClientFactory, CronTrigger, DynamicIntervalOptions, DynamicSchedule, DynamicTrigger, DynamicTriggerOptions, EventFilter, EventSpecification, EventTrigger, EventTypeFromSpecification, ExternalSource, ExternalSourceParams, ExternalSourceTrigger, ExternalSourceTriggerOptions, HandlerEvent, HttpSourceEvent, IO, IOLogger, IOOptions, IOTask, IOWithIntegrations, IntegrationClient, IntervalTrigger, Job, JobOptions, ListenOptions, Logger, MissingConnectionNotification, MissingConnectionResolvedNotification, NormalizedRequest, PreprocessResults, ResumeWithTask, SecureString, TaskLogger, Trigger, TriggerClient, TriggerClientOptions, TriggerContext, TriggerEventType, TriggerIntegration, TriggerPreprocessContext, authenticatedTask, cronTrigger, eventTrigger, intervalTrigger, missingConnectionNotification, missingConnectionResolvedNotification, omit, secureString };
3905
+ export { AuthenticatedTask, ClientFactory, CronTrigger, DynamicIntervalOptions, DynamicSchedule, DynamicTrigger, DynamicTriggerOptions, EventFilter, EventSpecification, EventTrigger, EventTypeFromSpecification, ExternalSource, ExternalSourceParams, ExternalSourceTrigger, ExternalSourceTriggerOptions, HandlerEvent, HttpSourceEvent, IO, IOLogger, IOOptions, IOTask, IOWithIntegrations, IntegrationClient, IntervalTrigger, Job, JobOptions, ListenOptions, Logger, MissingConnectionNotification, MissingConnectionResolvedNotification, NormalizedRequest, PreprocessResults, SecureString, Task, TaskLogger, Trigger, TriggerClient, TriggerClientOptions, TriggerContext, TriggerEventType, TriggerIntegration, TriggerPreprocessContext, authenticatedTask, cronTrigger, eventTrigger, intervalTrigger, isTriggerError, missingConnectionNotification, missingConnectionResolvedNotification, omit, secureString };