@trigger.dev/sdk 2.0.0-next.10 → 2.0.0-next.12

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
@@ -40,7 +40,7 @@ type SerializableJson = Serializable | {
40
40
  [key: string]: SerializableJson;
41
41
  } | SerializableJson[];
42
42
 
43
- declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
43
+ declare const ServerTaskSchema: z.ZodObject<{
44
44
  id: z.ZodString;
45
45
  name: z.ZodString;
46
46
  icon: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -50,20 +50,20 @@ declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
50
50
  delayUntil: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
51
51
  status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED"]>;
52
52
  description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
53
+ params: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
53
54
  properties: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
54
55
  label: z.ZodString;
55
56
  text: z.ZodString;
56
57
  url: z.ZodOptional<z.ZodString>;
57
58
  }, "strip", z.ZodTypeAny, {
58
- url?: string | undefined;
59
59
  label: string;
60
60
  text: string;
61
- }, {
62
61
  url?: string | undefined;
62
+ }, {
63
63
  label: string;
64
64
  text: string;
65
+ url?: string | undefined;
65
66
  }>, "many">>>;
66
- params: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
67
67
  output: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
68
68
  error: z.ZodNullable<z.ZodOptional<z.ZodString>>;
69
69
  parentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -71,17 +71,22 @@ declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
71
71
  style: z.ZodEnum<["normal", "minimal"]>;
72
72
  variant: z.ZodOptional<z.ZodString>;
73
73
  }, "strip", z.ZodTypeAny, {
74
- variant?: string | undefined;
75
74
  style: "normal" | "minimal";
76
- }, {
77
75
  variant?: string | undefined;
76
+ }, {
78
77
  style: "normal" | "minimal";
78
+ variant?: string | undefined;
79
79
  }>>>;
80
80
  operation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
81
- }, {
82
81
  idempotencyKey: z.ZodString;
83
82
  attempts: z.ZodNumber;
84
- }>, "strip", z.ZodTypeAny, {
83
+ }, "strip", z.ZodTypeAny, {
84
+ id: string;
85
+ name: string;
86
+ noop: boolean;
87
+ status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
88
+ idempotencyKey: string;
89
+ attempts: number;
85
90
  icon?: string | null | undefined;
86
91
  startedAt?: Date | null | undefined;
87
92
  completedAt?: Date | null | undefined;
@@ -89,25 +94,25 @@ declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
89
94
  description?: string | null | undefined;
90
95
  params?: DeserializedJson | undefined;
91
96
  properties?: {
92
- url?: string | undefined;
93
97
  label: string;
94
98
  text: string;
99
+ url?: string | undefined;
95
100
  }[] | null | undefined;
96
101
  output?: DeserializedJson | undefined;
97
102
  error?: string | null | undefined;
98
103
  parentId?: string | null | undefined;
99
104
  style?: {
100
- variant?: string | undefined;
101
105
  style: "normal" | "minimal";
106
+ variant?: string | undefined;
102
107
  } | null | undefined;
103
108
  operation?: string | null | undefined;
109
+ }, {
104
110
  id: string;
105
111
  name: string;
106
112
  noop: boolean;
107
113
  status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
108
114
  idempotencyKey: string;
109
115
  attempts: number;
110
- }, {
111
116
  icon?: string | null | undefined;
112
117
  startedAt?: Date | null | undefined;
113
118
  completedAt?: Date | null | undefined;
@@ -115,24 +120,18 @@ declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
115
120
  description?: string | null | undefined;
116
121
  params?: DeserializedJson | undefined;
117
122
  properties?: {
118
- url?: string | undefined;
119
123
  label: string;
120
124
  text: string;
125
+ url?: string | undefined;
121
126
  }[] | null | undefined;
122
127
  output?: DeserializedJson | undefined;
123
128
  error?: string | null | undefined;
124
129
  parentId?: string | null | undefined;
125
130
  style?: {
126
- variant?: string | undefined;
127
131
  style: "normal" | "minimal";
132
+ variant?: string | undefined;
128
133
  } | null | undefined;
129
134
  operation?: string | null | undefined;
130
- id: string;
131
- name: string;
132
- noop: boolean;
133
- status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
134
- idempotencyKey: string;
135
- attempts: number;
136
135
  }>;
137
136
  type ServerTask = z.infer<typeof ServerTaskSchema>;
138
137
  declare const CachedTaskSchema: z.ZodObject<{
@@ -143,19 +142,19 @@ declare const CachedTaskSchema: z.ZodObject<{
143
142
  output: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
144
143
  parentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
145
144
  }, "strip", z.ZodTypeAny, {
146
- output?: DeserializedJson | undefined;
147
- parentId?: string | null | undefined;
148
145
  id: string;
149
146
  noop: boolean;
150
147
  status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
151
148
  idempotencyKey: string;
152
- }, {
153
- noop?: boolean | undefined;
154
149
  output?: DeserializedJson | undefined;
155
150
  parentId?: string | null | undefined;
151
+ }, {
156
152
  id: string;
157
153
  status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
158
154
  idempotencyKey: string;
155
+ noop?: boolean | undefined;
156
+ output?: DeserializedJson | undefined;
157
+ parentId?: string | null | undefined;
159
158
  }>;
160
159
 
161
160
  declare const UpdateTriggerSourceBodySchema: z.ZodObject<{
@@ -163,16 +162,17 @@ declare const UpdateTriggerSourceBodySchema: z.ZodObject<{
163
162
  secret: z.ZodOptional<z.ZodString>;
164
163
  data: z.ZodOptional<z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>;
165
164
  }, "strip", z.ZodTypeAny, {
166
- data?: SerializableJson;
167
- secret?: string | undefined;
168
165
  registeredEvents: string[];
169
- }, {
170
- data?: SerializableJson;
171
166
  secret?: string | undefined;
167
+ data?: SerializableJson;
168
+ }, {
172
169
  registeredEvents: string[];
170
+ secret?: string | undefined;
171
+ data?: SerializableJson;
173
172
  }>;
174
173
  type UpdateTriggerSourceBody = z.infer<typeof UpdateTriggerSourceBodySchema>;
175
174
  declare const RegisterSourceEventSchema: z.ZodObject<{
175
+ /** The id of the source */
176
176
  id: z.ZodString;
177
177
  source: z.ZodObject<{
178
178
  key: z.ZodString;
@@ -204,9 +204,6 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
204
204
  }>]>;
205
205
  clientId: z.ZodOptional<z.ZodString>;
206
206
  }, "strip", z.ZodTypeAny, {
207
- params?: any;
208
- data?: DeserializedJson | undefined;
209
- clientId?: string | undefined;
210
207
  key: string;
211
208
  secret: string;
212
209
  active: boolean;
@@ -218,10 +215,10 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
218
215
  } | {
219
216
  type: "SQS";
220
217
  };
221
- }, {
222
218
  params?: any;
223
219
  data?: DeserializedJson | undefined;
224
220
  clientId?: string | undefined;
221
+ }, {
225
222
  key: string;
226
223
  secret: string;
227
224
  active: boolean;
@@ -233,18 +230,17 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
233
230
  } | {
234
231
  type: "SQS";
235
232
  };
233
+ params?: any;
234
+ data?: DeserializedJson | undefined;
235
+ clientId?: string | undefined;
236
236
  }>;
237
237
  events: z.ZodArray<z.ZodString, "many">;
238
238
  missingEvents: z.ZodArray<z.ZodString, "many">;
239
239
  orphanedEvents: z.ZodArray<z.ZodString, "many">;
240
240
  dynamicTriggerId: z.ZodOptional<z.ZodString>;
241
241
  }, "strip", z.ZodTypeAny, {
242
- dynamicTriggerId?: string | undefined;
243
242
  id: string;
244
243
  source: {
245
- params?: any;
246
- data?: DeserializedJson | undefined;
247
- clientId?: string | undefined;
248
244
  key: string;
249
245
  secret: string;
250
246
  active: boolean;
@@ -256,17 +252,17 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
256
252
  } | {
257
253
  type: "SQS";
258
254
  };
255
+ params?: any;
256
+ data?: DeserializedJson | undefined;
257
+ clientId?: string | undefined;
259
258
  };
260
259
  events: string[];
261
260
  missingEvents: string[];
262
261
  orphanedEvents: string[];
263
- }, {
264
262
  dynamicTriggerId?: string | undefined;
263
+ }, {
265
264
  id: string;
266
265
  source: {
267
- params?: any;
268
- data?: DeserializedJson | undefined;
269
- clientId?: string | undefined;
270
266
  key: string;
271
267
  secret: string;
272
268
  active: boolean;
@@ -278,10 +274,14 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
278
274
  } | {
279
275
  type: "SQS";
280
276
  };
277
+ params?: any;
278
+ data?: DeserializedJson | undefined;
279
+ clientId?: string | undefined;
281
280
  };
282
281
  events: string[];
283
282
  missingEvents: string[];
284
283
  orphanedEvents: string[];
284
+ dynamicTriggerId?: string | undefined;
285
285
  }>;
286
286
  type RegisterSourceEvent = z.infer<typeof RegisterSourceEventSchema>;
287
287
  declare const TriggerSourceSchema: z.ZodObject<{
@@ -300,15 +300,15 @@ declare const HandleTriggerSourceSchema: z.ZodObject<{
300
300
  data: z.ZodAny;
301
301
  params: z.ZodAny;
302
302
  }, "strip", z.ZodTypeAny, {
303
- params?: any;
304
- data?: any;
305
303
  key: string;
306
304
  secret: string;
307
- }, {
308
- params?: any;
309
305
  data?: any;
306
+ params?: any;
307
+ }, {
310
308
  key: string;
311
309
  secret: string;
310
+ data?: any;
311
+ params?: any;
312
312
  }>;
313
313
  type HandleTriggerSource = z.infer<typeof HandleTriggerSourceSchema>;
314
314
  type TriggerSource = z.infer<typeof TriggerSourceSchema>;
@@ -316,11 +316,11 @@ declare const QueueOptionsSchema: z.ZodObject<{
316
316
  name: z.ZodString;
317
317
  maxConcurrent: z.ZodOptional<z.ZodNumber>;
318
318
  }, "strip", z.ZodTypeAny, {
319
- maxConcurrent?: number | undefined;
320
319
  name: string;
321
- }, {
322
320
  maxConcurrent?: number | undefined;
321
+ }, {
323
322
  name: string;
323
+ maxConcurrent?: number | undefined;
324
324
  }>;
325
325
  type QueueOptions = z.infer<typeof QueueOptionsSchema>;
326
326
  declare const JobMetadataSchema: z.ZodObject<{
@@ -338,13 +338,13 @@ declare const JobMetadataSchema: z.ZodObject<{
338
338
  text: z.ZodString;
339
339
  url: z.ZodOptional<z.ZodString>;
340
340
  }, "strip", z.ZodTypeAny, {
341
- url?: string | undefined;
342
341
  label: string;
343
342
  text: string;
344
- }, {
345
343
  url?: string | undefined;
344
+ }, {
346
345
  label: string;
347
346
  text: string;
347
+ url?: string | undefined;
348
348
  }>, "many">>;
349
349
  schema: z.ZodOptional<z.ZodAny>;
350
350
  examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -353,52 +353,52 @@ declare const JobMetadataSchema: z.ZodObject<{
353
353
  name: z.ZodString;
354
354
  payload: z.ZodAny;
355
355
  }, "strip", z.ZodTypeAny, {
356
- icon?: string | undefined;
357
- payload?: any;
358
356
  id: string;
359
357
  name: string;
360
- }, {
361
358
  icon?: string | undefined;
362
359
  payload?: any;
360
+ }, {
363
361
  id: string;
364
362
  name: string;
363
+ icon?: string | undefined;
364
+ payload?: any;
365
365
  }>, "many">>;
366
366
  }, "strip", z.ZodTypeAny, {
367
+ name: string;
368
+ icon: string;
369
+ source: string;
370
+ title: string;
367
371
  filter?: EventFilter | undefined;
368
372
  properties?: {
369
- url?: string | undefined;
370
373
  label: string;
371
374
  text: string;
375
+ url?: string | undefined;
372
376
  }[] | undefined;
373
377
  schema?: any;
374
378
  examples?: {
375
- icon?: string | undefined;
376
- payload?: any;
377
379
  id: string;
378
380
  name: string;
381
+ icon?: string | undefined;
382
+ payload?: any;
379
383
  }[] | undefined;
384
+ }, {
380
385
  name: string;
381
386
  icon: string;
382
387
  source: string;
383
388
  title: string;
384
- }, {
385
389
  filter?: EventFilter | undefined;
386
390
  properties?: {
387
- url?: string | undefined;
388
391
  label: string;
389
392
  text: string;
393
+ url?: string | undefined;
390
394
  }[] | undefined;
391
395
  schema?: any;
392
396
  examples?: {
393
- icon?: string | undefined;
394
- payload?: any;
395
397
  id: string;
396
398
  name: string;
399
+ icon?: string | undefined;
400
+ payload?: any;
397
401
  }[] | undefined;
398
- name: string;
399
- icon: string;
400
- source: string;
401
- title: string;
402
402
  }>;
403
403
  trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
404
404
  type: z.ZodLiteral<"dynamic">;
@@ -417,13 +417,13 @@ declare const JobMetadataSchema: z.ZodObject<{
417
417
  text: z.ZodString;
418
418
  url: z.ZodOptional<z.ZodString>;
419
419
  }, "strip", z.ZodTypeAny, {
420
- url?: string | undefined;
421
420
  label: string;
422
421
  text: string;
423
- }, {
424
422
  url?: string | undefined;
423
+ }, {
425
424
  label: string;
426
425
  text: string;
426
+ url?: string | undefined;
427
427
  }>, "many">>;
428
428
  rule: z.ZodObject<{
429
429
  event: z.ZodString;
@@ -431,44 +431,44 @@ declare const JobMetadataSchema: z.ZodObject<{
431
431
  payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
432
432
  context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
433
433
  }, "strip", z.ZodTypeAny, {
434
- payload?: EventFilter | undefined;
435
- context?: EventFilter | undefined;
436
434
  event: string;
437
435
  source: string;
438
- }, {
439
436
  payload?: EventFilter | undefined;
440
437
  context?: EventFilter | undefined;
438
+ }, {
441
439
  event: string;
442
440
  source: string;
441
+ payload?: EventFilter | undefined;
442
+ context?: EventFilter | undefined;
443
443
  }>;
444
444
  }, "strip", z.ZodTypeAny, {
445
- properties?: {
446
- url?: string | undefined;
447
- label: string;
448
- text: string;
449
- }[] | undefined;
450
445
  type: "static";
451
446
  title: string;
452
447
  rule: {
453
- payload?: EventFilter | undefined;
454
- context?: EventFilter | undefined;
455
448
  event: string;
456
449
  source: string;
450
+ payload?: EventFilter | undefined;
451
+ context?: EventFilter | undefined;
457
452
  };
458
- }, {
459
453
  properties?: {
460
- url?: string | undefined;
461
454
  label: string;
462
455
  text: string;
456
+ url?: string | undefined;
463
457
  }[] | undefined;
458
+ }, {
464
459
  type: "static";
465
460
  title: string;
466
461
  rule: {
467
- payload?: EventFilter | undefined;
468
- context?: EventFilter | undefined;
469
462
  event: string;
470
463
  source: string;
464
+ payload?: EventFilter | undefined;
465
+ context?: EventFilter | undefined;
471
466
  };
467
+ properties?: {
468
+ label: string;
469
+ text: string;
470
+ url?: string | undefined;
471
+ }[] | undefined;
472
472
  }>, z.ZodObject<{
473
473
  type: z.ZodLiteral<"scheduled">;
474
474
  schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -482,17 +482,17 @@ declare const JobMetadataSchema: z.ZodObject<{
482
482
  }>;
483
483
  metadata: z.ZodAny;
484
484
  }, "strip", z.ZodTypeAny, {
485
- metadata?: any;
486
485
  options: {
487
486
  seconds: number;
488
487
  };
489
488
  type: "interval";
490
- }, {
491
489
  metadata?: any;
490
+ }, {
492
491
  options: {
493
492
  seconds: number;
494
493
  };
495
494
  type: "interval";
495
+ metadata?: any;
496
496
  }>, z.ZodObject<{
497
497
  type: z.ZodLiteral<"cron">;
498
498
  options: z.ZodObject<{
@@ -504,47 +504,47 @@ declare const JobMetadataSchema: z.ZodObject<{
504
504
  }>;
505
505
  metadata: z.ZodAny;
506
506
  }, "strip", z.ZodTypeAny, {
507
- metadata?: any;
508
507
  options: {
509
508
  cron: string;
510
509
  };
511
510
  type: "cron";
512
- }, {
513
511
  metadata?: any;
512
+ }, {
514
513
  options: {
515
514
  cron: string;
516
515
  };
517
516
  type: "cron";
517
+ metadata?: any;
518
518
  }>]>;
519
519
  }, "strip", z.ZodTypeAny, {
520
520
  type: "scheduled";
521
521
  schedule: {
522
- metadata?: any;
523
522
  options: {
524
523
  cron: string;
525
524
  };
526
525
  type: "cron";
527
- } | {
528
526
  metadata?: any;
527
+ } | {
529
528
  options: {
530
529
  seconds: number;
531
530
  };
532
531
  type: "interval";
532
+ metadata?: any;
533
533
  };
534
534
  }, {
535
535
  type: "scheduled";
536
536
  schedule: {
537
- metadata?: any;
538
537
  options: {
539
538
  cron: string;
540
539
  };
541
540
  type: "cron";
542
- } | {
543
541
  metadata?: any;
542
+ } | {
544
543
  options: {
545
544
  seconds: number;
546
545
  };
547
546
  type: "interval";
547
+ metadata?: any;
548
548
  };
549
549
  }>]>;
550
550
  integrations: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -554,29 +554,29 @@ declare const JobMetadataSchema: z.ZodObject<{
554
554
  name: z.ZodString;
555
555
  instructions: z.ZodOptional<z.ZodString>;
556
556
  }, "strip", z.ZodTypeAny, {
557
- instructions?: string | undefined;
558
557
  id: string;
559
558
  name: string;
560
- }, {
561
559
  instructions?: string | undefined;
560
+ }, {
562
561
  id: string;
563
562
  name: string;
563
+ instructions?: string | undefined;
564
564
  }>;
565
565
  authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
566
566
  }, "strip", z.ZodTypeAny, {
567
567
  id: string;
568
568
  metadata: {
569
- instructions?: string | undefined;
570
569
  id: string;
571
570
  name: string;
571
+ instructions?: string | undefined;
572
572
  };
573
573
  authSource: "HOSTED" | "LOCAL";
574
574
  }, {
575
575
  id: string;
576
576
  metadata: {
577
- instructions?: string | undefined;
578
577
  id: string;
579
578
  name: string;
579
+ instructions?: string | undefined;
580
580
  };
581
581
  authSource: "HOSTED" | "LOCAL";
582
582
  }>>;
@@ -585,81 +585,77 @@ declare const JobMetadataSchema: z.ZodObject<{
585
585
  name: z.ZodString;
586
586
  maxConcurrent: z.ZodOptional<z.ZodNumber>;
587
587
  }, "strip", z.ZodTypeAny, {
588
- maxConcurrent?: number | undefined;
589
588
  name: string;
590
- }, {
591
589
  maxConcurrent?: number | undefined;
590
+ }, {
592
591
  name: string;
592
+ maxConcurrent?: number | undefined;
593
593
  }>, z.ZodString]>>;
594
594
  startPosition: z.ZodEnum<["initial", "latest"]>;
595
595
  enabled: z.ZodBoolean;
596
596
  preprocessRuns: z.ZodBoolean;
597
597
  }, "strip", z.ZodTypeAny, {
598
- queue?: string | {
599
- maxConcurrent?: number | undefined;
600
- name: string;
601
- } | undefined;
602
598
  id: string;
603
599
  name: string;
604
600
  event: {
601
+ name: string;
602
+ icon: string;
603
+ source: string;
604
+ title: string;
605
605
  filter?: EventFilter | undefined;
606
606
  properties?: {
607
- url?: string | undefined;
608
607
  label: string;
609
608
  text: string;
609
+ url?: string | undefined;
610
610
  }[] | undefined;
611
611
  schema?: any;
612
612
  examples?: {
613
- icon?: string | undefined;
614
- payload?: any;
615
613
  id: string;
616
614
  name: string;
615
+ icon?: string | undefined;
616
+ payload?: any;
617
617
  }[] | undefined;
618
- name: string;
619
- icon: string;
620
- source: string;
621
- title: string;
622
618
  };
623
619
  version: string;
624
620
  trigger: {
625
621
  id: string;
626
622
  type: "dynamic";
627
623
  } | {
628
- properties?: {
629
- url?: string | undefined;
630
- label: string;
631
- text: string;
632
- }[] | undefined;
633
624
  type: "static";
634
625
  title: string;
635
626
  rule: {
636
- payload?: EventFilter | undefined;
637
- context?: EventFilter | undefined;
638
627
  event: string;
639
628
  source: string;
629
+ payload?: EventFilter | undefined;
630
+ context?: EventFilter | undefined;
640
631
  };
632
+ properties?: {
633
+ label: string;
634
+ text: string;
635
+ url?: string | undefined;
636
+ }[] | undefined;
641
637
  } | {
642
638
  type: "scheduled";
643
639
  schedule: {
644
- metadata?: any;
645
640
  options: {
646
641
  cron: string;
647
642
  };
648
643
  type: "cron";
649
- } | {
650
644
  metadata?: any;
645
+ } | {
651
646
  options: {
652
647
  seconds: number;
653
648
  };
654
649
  type: "interval";
650
+ metadata?: any;
655
651
  };
656
652
  };
657
653
  integrations: Record<string, {
658
654
  id: string;
659
655
  metadata: {
660
- instructions?: string | undefined;
661
656
  id: string;
662
657
  name: string;
658
+ instructions?: string | undefined;
663
659
  };
664
660
  authSource: "HOSTED" | "LOCAL";
665
661
  }>;
@@ -667,80 +663,84 @@ declare const JobMetadataSchema: z.ZodObject<{
667
663
  startPosition: "initial" | "latest";
668
664
  enabled: boolean;
669
665
  preprocessRuns: boolean;
670
- }, {
671
- internal?: boolean | undefined;
672
666
  queue?: string | {
673
- maxConcurrent?: number | undefined;
674
667
  name: string;
668
+ maxConcurrent?: number | undefined;
675
669
  } | undefined;
670
+ }, {
676
671
  id: string;
677
672
  name: string;
678
673
  event: {
674
+ name: string;
675
+ icon: string;
676
+ source: string;
677
+ title: string;
679
678
  filter?: EventFilter | undefined;
680
679
  properties?: {
681
- url?: string | undefined;
682
680
  label: string;
683
681
  text: string;
682
+ url?: string | undefined;
684
683
  }[] | undefined;
685
684
  schema?: any;
686
685
  examples?: {
687
- icon?: string | undefined;
688
- payload?: any;
689
686
  id: string;
690
687
  name: string;
688
+ icon?: string | undefined;
689
+ payload?: any;
691
690
  }[] | undefined;
692
- name: string;
693
- icon: string;
694
- source: string;
695
- title: string;
696
691
  };
697
692
  version: string;
698
693
  trigger: {
699
694
  id: string;
700
695
  type: "dynamic";
701
696
  } | {
702
- properties?: {
703
- url?: string | undefined;
704
- label: string;
705
- text: string;
706
- }[] | undefined;
707
697
  type: "static";
708
698
  title: string;
709
699
  rule: {
710
- payload?: EventFilter | undefined;
711
- context?: EventFilter | undefined;
712
700
  event: string;
713
701
  source: string;
702
+ payload?: EventFilter | undefined;
703
+ context?: EventFilter | undefined;
714
704
  };
705
+ properties?: {
706
+ label: string;
707
+ text: string;
708
+ url?: string | undefined;
709
+ }[] | undefined;
715
710
  } | {
716
711
  type: "scheduled";
717
712
  schedule: {
718
- metadata?: any;
719
713
  options: {
720
714
  cron: string;
721
715
  };
722
716
  type: "cron";
723
- } | {
724
717
  metadata?: any;
718
+ } | {
725
719
  options: {
726
720
  seconds: number;
727
721
  };
728
722
  type: "interval";
723
+ metadata?: any;
729
724
  };
730
725
  };
731
726
  integrations: Record<string, {
732
727
  id: string;
733
728
  metadata: {
734
- instructions?: string | undefined;
735
729
  id: string;
736
730
  name: string;
731
+ instructions?: string | undefined;
737
732
  };
738
733
  authSource: "HOSTED" | "LOCAL";
739
734
  }>;
740
735
  startPosition: "initial" | "latest";
741
736
  enabled: boolean;
742
737
  preprocessRuns: boolean;
743
- }>;
738
+ internal?: boolean | undefined;
739
+ queue?: string | {
740
+ name: string;
741
+ maxConcurrent?: number | undefined;
742
+ } | undefined;
743
+ }>;
744
744
  type JobMetadata = z.infer<typeof JobMetadataSchema>;
745
745
  declare const RawEventSchema: z.ZodObject<{
746
746
  /** The `name` property must exactly match any subscriptions you want to
@@ -767,19 +767,19 @@ declare const RawEventSchema: z.ZodObject<{
767
767
  this as you can filter events using this in the `eventTrigger()`. */
768
768
  source: z.ZodOptional<z.ZodString>;
769
769
  }, "strip", z.ZodTypeAny, {
770
- source?: string | undefined;
770
+ id: string;
771
+ name: string;
771
772
  payload?: any;
772
773
  context?: any;
773
774
  timestamp?: Date | undefined;
774
- id: string;
775
- name: string;
776
- }, {
777
- id?: string | undefined;
778
775
  source?: string | undefined;
776
+ }, {
777
+ name: string;
779
778
  payload?: any;
780
779
  context?: any;
780
+ id?: string | undefined;
781
781
  timestamp?: Date | undefined;
782
- name: string;
782
+ source?: string | undefined;
783
783
  }>;
784
784
  /** The event you wish to send to Trigger a Job */
785
785
  type SendEvent = z.input<typeof RawEventSchema>;
@@ -825,13 +825,13 @@ declare const CreateRunBodySchema: z.ZodObject<{
825
825
  text: z.ZodString;
826
826
  url: z.ZodOptional<z.ZodString>;
827
827
  }, "strip", z.ZodTypeAny, {
828
- url?: string | undefined;
829
828
  label: string;
830
829
  text: string;
831
- }, {
832
830
  url?: string | undefined;
831
+ }, {
833
832
  label: string;
834
833
  text: string;
834
+ url?: string | undefined;
835
835
  }>, "many">>;
836
836
  schema: z.ZodOptional<z.ZodAny>;
837
837
  examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -840,52 +840,52 @@ declare const CreateRunBodySchema: z.ZodObject<{
840
840
  name: z.ZodString;
841
841
  payload: z.ZodAny;
842
842
  }, "strip", z.ZodTypeAny, {
843
- icon?: string | undefined;
844
- payload?: any;
845
843
  id: string;
846
844
  name: string;
847
- }, {
848
845
  icon?: string | undefined;
849
846
  payload?: any;
847
+ }, {
850
848
  id: string;
851
849
  name: string;
850
+ icon?: string | undefined;
851
+ payload?: any;
852
852
  }>, "many">>;
853
853
  }, "strip", z.ZodTypeAny, {
854
+ name: string;
855
+ icon: string;
856
+ source: string;
857
+ title: string;
854
858
  filter?: EventFilter | undefined;
855
859
  properties?: {
856
- url?: string | undefined;
857
860
  label: string;
858
861
  text: string;
862
+ url?: string | undefined;
859
863
  }[] | undefined;
860
864
  schema?: any;
861
865
  examples?: {
862
- icon?: string | undefined;
863
- payload?: any;
864
866
  id: string;
865
867
  name: string;
868
+ icon?: string | undefined;
869
+ payload?: any;
866
870
  }[] | undefined;
871
+ }, {
867
872
  name: string;
868
873
  icon: string;
869
874
  source: string;
870
875
  title: string;
871
- }, {
872
876
  filter?: EventFilter | undefined;
873
877
  properties?: {
874
- url?: string | undefined;
875
878
  label: string;
876
879
  text: string;
880
+ url?: string | undefined;
877
881
  }[] | undefined;
878
882
  schema?: any;
879
883
  examples?: {
880
- icon?: string | undefined;
881
- payload?: any;
882
884
  id: string;
883
885
  name: string;
886
+ icon?: string | undefined;
887
+ payload?: any;
884
888
  }[] | undefined;
885
- name: string;
886
- icon: string;
887
- source: string;
888
- title: string;
889
889
  }>;
890
890
  trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
891
891
  type: z.ZodLiteral<"dynamic">;
@@ -904,13 +904,13 @@ declare const CreateRunBodySchema: z.ZodObject<{
904
904
  text: z.ZodString;
905
905
  url: z.ZodOptional<z.ZodString>;
906
906
  }, "strip", z.ZodTypeAny, {
907
- url?: string | undefined;
908
907
  label: string;
909
908
  text: string;
910
- }, {
911
909
  url?: string | undefined;
910
+ }, {
912
911
  label: string;
913
912
  text: string;
913
+ url?: string | undefined;
914
914
  }>, "many">>;
915
915
  rule: z.ZodObject<{
916
916
  event: z.ZodString;
@@ -918,44 +918,44 @@ declare const CreateRunBodySchema: z.ZodObject<{
918
918
  payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
919
919
  context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
920
920
  }, "strip", z.ZodTypeAny, {
921
- payload?: EventFilter | undefined;
922
- context?: EventFilter | undefined;
923
921
  event: string;
924
922
  source: string;
925
- }, {
926
923
  payload?: EventFilter | undefined;
927
924
  context?: EventFilter | undefined;
925
+ }, {
928
926
  event: string;
929
927
  source: string;
928
+ payload?: EventFilter | undefined;
929
+ context?: EventFilter | undefined;
930
930
  }>;
931
931
  }, "strip", z.ZodTypeAny, {
932
- properties?: {
933
- url?: string | undefined;
934
- label: string;
935
- text: string;
936
- }[] | undefined;
937
932
  type: "static";
938
933
  title: string;
939
934
  rule: {
940
- payload?: EventFilter | undefined;
941
- context?: EventFilter | undefined;
942
935
  event: string;
943
936
  source: string;
937
+ payload?: EventFilter | undefined;
938
+ context?: EventFilter | undefined;
944
939
  };
945
- }, {
946
940
  properties?: {
947
- url?: string | undefined;
948
941
  label: string;
949
942
  text: string;
943
+ url?: string | undefined;
950
944
  }[] | undefined;
945
+ }, {
951
946
  type: "static";
952
947
  title: string;
953
948
  rule: {
954
- payload?: EventFilter | undefined;
955
- context?: EventFilter | undefined;
956
949
  event: string;
957
950
  source: string;
951
+ payload?: EventFilter | undefined;
952
+ context?: EventFilter | undefined;
958
953
  };
954
+ properties?: {
955
+ label: string;
956
+ text: string;
957
+ url?: string | undefined;
958
+ }[] | undefined;
959
959
  }>, z.ZodObject<{
960
960
  type: z.ZodLiteral<"scheduled">;
961
961
  schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -969,17 +969,17 @@ declare const CreateRunBodySchema: z.ZodObject<{
969
969
  }>;
970
970
  metadata: z.ZodAny;
971
971
  }, "strip", z.ZodTypeAny, {
972
- metadata?: any;
973
972
  options: {
974
973
  seconds: number;
975
974
  };
976
975
  type: "interval";
977
- }, {
978
976
  metadata?: any;
977
+ }, {
979
978
  options: {
980
979
  seconds: number;
981
980
  };
982
981
  type: "interval";
982
+ metadata?: any;
983
983
  }>, z.ZodObject<{
984
984
  type: z.ZodLiteral<"cron">;
985
985
  options: z.ZodObject<{
@@ -991,47 +991,47 @@ declare const CreateRunBodySchema: z.ZodObject<{
991
991
  }>;
992
992
  metadata: z.ZodAny;
993
993
  }, "strip", z.ZodTypeAny, {
994
- metadata?: any;
995
994
  options: {
996
995
  cron: string;
997
996
  };
998
997
  type: "cron";
999
- }, {
1000
998
  metadata?: any;
999
+ }, {
1001
1000
  options: {
1002
1001
  cron: string;
1003
1002
  };
1004
1003
  type: "cron";
1004
+ metadata?: any;
1005
1005
  }>]>;
1006
1006
  }, "strip", z.ZodTypeAny, {
1007
1007
  type: "scheduled";
1008
1008
  schedule: {
1009
- metadata?: any;
1010
1009
  options: {
1011
1010
  cron: string;
1012
1011
  };
1013
1012
  type: "cron";
1014
- } | {
1015
1013
  metadata?: any;
1014
+ } | {
1016
1015
  options: {
1017
1016
  seconds: number;
1018
1017
  };
1019
1018
  type: "interval";
1019
+ metadata?: any;
1020
1020
  };
1021
1021
  }, {
1022
1022
  type: "scheduled";
1023
1023
  schedule: {
1024
- metadata?: any;
1025
1024
  options: {
1026
1025
  cron: string;
1027
1026
  };
1028
1027
  type: "cron";
1029
- } | {
1030
1028
  metadata?: any;
1029
+ } | {
1031
1030
  options: {
1032
1031
  seconds: number;
1033
1032
  };
1034
1033
  type: "interval";
1034
+ metadata?: any;
1035
1035
  };
1036
1036
  }>]>;
1037
1037
  integrations: z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -1041,29 +1041,29 @@ declare const CreateRunBodySchema: z.ZodObject<{
1041
1041
  name: z.ZodString;
1042
1042
  instructions: z.ZodOptional<z.ZodString>;
1043
1043
  }, "strip", z.ZodTypeAny, {
1044
- instructions?: string | undefined;
1045
1044
  id: string;
1046
1045
  name: string;
1047
- }, {
1048
1046
  instructions?: string | undefined;
1047
+ }, {
1049
1048
  id: string;
1050
1049
  name: string;
1050
+ instructions?: string | undefined;
1051
1051
  }>;
1052
1052
  authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
1053
1053
  }, "strip", z.ZodTypeAny, {
1054
1054
  id: string;
1055
1055
  metadata: {
1056
- instructions?: string | undefined;
1057
1056
  id: string;
1058
1057
  name: string;
1058
+ instructions?: string | undefined;
1059
1059
  };
1060
1060
  authSource: "HOSTED" | "LOCAL";
1061
1061
  }, {
1062
1062
  id: string;
1063
1063
  metadata: {
1064
- instructions?: string | undefined;
1065
1064
  id: string;
1066
1065
  name: string;
1066
+ instructions?: string | undefined;
1067
1067
  };
1068
1068
  authSource: "HOSTED" | "LOCAL";
1069
1069
  }>>;
@@ -1072,81 +1072,77 @@ declare const CreateRunBodySchema: z.ZodObject<{
1072
1072
  name: z.ZodString;
1073
1073
  maxConcurrent: z.ZodOptional<z.ZodNumber>;
1074
1074
  }, "strip", z.ZodTypeAny, {
1075
- maxConcurrent?: number | undefined;
1076
1075
  name: string;
1077
- }, {
1078
1076
  maxConcurrent?: number | undefined;
1077
+ }, {
1079
1078
  name: string;
1079
+ maxConcurrent?: number | undefined;
1080
1080
  }>, z.ZodString]>>;
1081
1081
  startPosition: z.ZodEnum<["initial", "latest"]>;
1082
1082
  enabled: z.ZodBoolean;
1083
1083
  preprocessRuns: z.ZodBoolean;
1084
1084
  }, "strip", z.ZodTypeAny, {
1085
- queue?: string | {
1086
- maxConcurrent?: number | undefined;
1087
- name: string;
1088
- } | undefined;
1089
1085
  id: string;
1090
1086
  name: string;
1091
1087
  event: {
1088
+ name: string;
1089
+ icon: string;
1090
+ source: string;
1091
+ title: string;
1092
1092
  filter?: EventFilter | undefined;
1093
1093
  properties?: {
1094
- url?: string | undefined;
1095
1094
  label: string;
1096
1095
  text: string;
1096
+ url?: string | undefined;
1097
1097
  }[] | undefined;
1098
1098
  schema?: any;
1099
1099
  examples?: {
1100
- icon?: string | undefined;
1101
- payload?: any;
1102
1100
  id: string;
1103
1101
  name: string;
1102
+ icon?: string | undefined;
1103
+ payload?: any;
1104
1104
  }[] | undefined;
1105
- name: string;
1106
- icon: string;
1107
- source: string;
1108
- title: string;
1109
1105
  };
1110
1106
  version: string;
1111
1107
  trigger: {
1112
1108
  id: string;
1113
1109
  type: "dynamic";
1114
1110
  } | {
1115
- properties?: {
1116
- url?: string | undefined;
1117
- label: string;
1118
- text: string;
1119
- }[] | undefined;
1120
1111
  type: "static";
1121
1112
  title: string;
1122
1113
  rule: {
1123
- payload?: EventFilter | undefined;
1124
- context?: EventFilter | undefined;
1125
1114
  event: string;
1126
1115
  source: string;
1116
+ payload?: EventFilter | undefined;
1117
+ context?: EventFilter | undefined;
1127
1118
  };
1119
+ properties?: {
1120
+ label: string;
1121
+ text: string;
1122
+ url?: string | undefined;
1123
+ }[] | undefined;
1128
1124
  } | {
1129
1125
  type: "scheduled";
1130
1126
  schedule: {
1131
- metadata?: any;
1132
1127
  options: {
1133
1128
  cron: string;
1134
1129
  };
1135
1130
  type: "cron";
1136
- } | {
1137
1131
  metadata?: any;
1132
+ } | {
1138
1133
  options: {
1139
1134
  seconds: number;
1140
1135
  };
1141
1136
  type: "interval";
1137
+ metadata?: any;
1142
1138
  };
1143
1139
  };
1144
1140
  integrations: Record<string, {
1145
1141
  id: string;
1146
1142
  metadata: {
1147
- instructions?: string | undefined;
1148
1143
  id: string;
1149
1144
  name: string;
1145
+ instructions?: string | undefined;
1150
1146
  };
1151
1147
  authSource: "HOSTED" | "LOCAL";
1152
1148
  }>;
@@ -1154,79 +1150,83 @@ declare const CreateRunBodySchema: z.ZodObject<{
1154
1150
  startPosition: "initial" | "latest";
1155
1151
  enabled: boolean;
1156
1152
  preprocessRuns: boolean;
1157
- }, {
1158
- internal?: boolean | undefined;
1159
1153
  queue?: string | {
1160
- maxConcurrent?: number | undefined;
1161
1154
  name: string;
1155
+ maxConcurrent?: number | undefined;
1162
1156
  } | undefined;
1157
+ }, {
1163
1158
  id: string;
1164
1159
  name: string;
1165
1160
  event: {
1161
+ name: string;
1162
+ icon: string;
1163
+ source: string;
1164
+ title: string;
1166
1165
  filter?: EventFilter | undefined;
1167
1166
  properties?: {
1168
- url?: string | undefined;
1169
1167
  label: string;
1170
1168
  text: string;
1169
+ url?: string | undefined;
1171
1170
  }[] | undefined;
1172
1171
  schema?: any;
1173
1172
  examples?: {
1174
- icon?: string | undefined;
1175
- payload?: any;
1176
1173
  id: string;
1177
1174
  name: string;
1175
+ icon?: string | undefined;
1176
+ payload?: any;
1178
1177
  }[] | undefined;
1179
- name: string;
1180
- icon: string;
1181
- source: string;
1182
- title: string;
1183
1178
  };
1184
1179
  version: string;
1185
1180
  trigger: {
1186
1181
  id: string;
1187
1182
  type: "dynamic";
1188
1183
  } | {
1189
- properties?: {
1190
- url?: string | undefined;
1191
- label: string;
1192
- text: string;
1193
- }[] | undefined;
1194
1184
  type: "static";
1195
1185
  title: string;
1196
1186
  rule: {
1197
- payload?: EventFilter | undefined;
1198
- context?: EventFilter | undefined;
1199
1187
  event: string;
1200
1188
  source: string;
1189
+ payload?: EventFilter | undefined;
1190
+ context?: EventFilter | undefined;
1201
1191
  };
1192
+ properties?: {
1193
+ label: string;
1194
+ text: string;
1195
+ url?: string | undefined;
1196
+ }[] | undefined;
1202
1197
  } | {
1203
1198
  type: "scheduled";
1204
1199
  schedule: {
1205
- metadata?: any;
1206
1200
  options: {
1207
1201
  cron: string;
1208
1202
  };
1209
1203
  type: "cron";
1210
- } | {
1211
1204
  metadata?: any;
1205
+ } | {
1212
1206
  options: {
1213
1207
  seconds: number;
1214
1208
  };
1215
1209
  type: "interval";
1210
+ metadata?: any;
1216
1211
  };
1217
1212
  };
1218
1213
  integrations: Record<string, {
1219
1214
  id: string;
1220
1215
  metadata: {
1221
- instructions?: string | undefined;
1222
1216
  id: string;
1223
1217
  name: string;
1218
+ instructions?: string | undefined;
1224
1219
  };
1225
1220
  authSource: "HOSTED" | "LOCAL";
1226
1221
  }>;
1227
1222
  startPosition: "initial" | "latest";
1228
1223
  enabled: boolean;
1229
1224
  preprocessRuns: boolean;
1225
+ internal?: boolean | undefined;
1226
+ queue?: string | {
1227
+ name: string;
1228
+ maxConcurrent?: number | undefined;
1229
+ } | undefined;
1230
1230
  }>;
1231
1231
  event: z.ZodObject<{
1232
1232
  /** The `id` of the event that was sent.
@@ -1249,116 +1249,119 @@ declare const CreateRunBodySchema: z.ZodObject<{
1249
1249
  or `deliverAfter` were set when sending the event. */
1250
1250
  deliveredAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
1251
1251
  }, "strip", z.ZodTypeAny, {
1252
- context?: DeserializedJson | undefined;
1253
- deliverAt?: Date | null | undefined;
1254
- deliveredAt?: Date | null | undefined;
1255
1252
  id: string;
1256
1253
  name: string;
1257
- payload: DeserializedJson;
1254
+ payload: ((string | number | boolean | {
1255
+ [key: string]: DeserializedJson;
1256
+ } | DeserializedJson[]) & (string | number | boolean | {
1257
+ [key: string]: DeserializedJson;
1258
+ } | DeserializedJson[] | undefined)) | null;
1258
1259
  timestamp: Date;
1259
- }, {
1260
1260
  context?: DeserializedJson | undefined;
1261
1261
  deliverAt?: Date | null | undefined;
1262
1262
  deliveredAt?: Date | null | undefined;
1263
+ }, {
1263
1264
  id: string;
1264
1265
  name: string;
1265
- payload: DeserializedJson;
1266
+ payload: ((string | number | boolean | {
1267
+ [key: string]: DeserializedJson;
1268
+ } | DeserializedJson[]) & (string | number | boolean | {
1269
+ [key: string]: DeserializedJson;
1270
+ } | DeserializedJson[] | undefined)) | null;
1266
1271
  timestamp: Date;
1272
+ context?: DeserializedJson | undefined;
1273
+ deliverAt?: Date | null | undefined;
1274
+ deliveredAt?: Date | null | undefined;
1267
1275
  }>;
1268
1276
  properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
1269
1277
  label: z.ZodString;
1270
1278
  text: z.ZodString;
1271
1279
  url: z.ZodOptional<z.ZodString>;
1272
1280
  }, "strip", z.ZodTypeAny, {
1273
- url?: string | undefined;
1274
1281
  label: string;
1275
1282
  text: string;
1276
- }, {
1277
1283
  url?: string | undefined;
1284
+ }, {
1278
1285
  label: string;
1279
1286
  text: string;
1287
+ url?: string | undefined;
1280
1288
  }>, "many">>;
1281
1289
  }, "strip", z.ZodTypeAny, {
1282
- properties?: {
1283
- url?: string | undefined;
1284
- label: string;
1285
- text: string;
1286
- }[] | undefined;
1287
1290
  event: {
1288
- context?: DeserializedJson | undefined;
1289
- deliverAt?: Date | null | undefined;
1290
- deliveredAt?: Date | null | undefined;
1291
1291
  id: string;
1292
1292
  name: string;
1293
- payload: DeserializedJson;
1293
+ payload: ((string | number | boolean | {
1294
+ [key: string]: DeserializedJson;
1295
+ } | DeserializedJson[]) & (string | number | boolean | {
1296
+ [key: string]: DeserializedJson;
1297
+ } | DeserializedJson[] | undefined)) | null;
1294
1298
  timestamp: Date;
1299
+ context?: DeserializedJson | undefined;
1300
+ deliverAt?: Date | null | undefined;
1301
+ deliveredAt?: Date | null | undefined;
1295
1302
  };
1296
1303
  job: {
1297
- queue?: string | {
1298
- maxConcurrent?: number | undefined;
1299
- name: string;
1300
- } | undefined;
1301
1304
  id: string;
1302
1305
  name: string;
1303
1306
  event: {
1307
+ name: string;
1308
+ icon: string;
1309
+ source: string;
1310
+ title: string;
1304
1311
  filter?: EventFilter | undefined;
1305
1312
  properties?: {
1306
- url?: string | undefined;
1307
1313
  label: string;
1308
1314
  text: string;
1315
+ url?: string | undefined;
1309
1316
  }[] | undefined;
1310
1317
  schema?: any;
1311
1318
  examples?: {
1312
- icon?: string | undefined;
1313
- payload?: any;
1314
1319
  id: string;
1315
1320
  name: string;
1321
+ icon?: string | undefined;
1322
+ payload?: any;
1316
1323
  }[] | undefined;
1317
- name: string;
1318
- icon: string;
1319
- source: string;
1320
- title: string;
1321
1324
  };
1322
1325
  version: string;
1323
1326
  trigger: {
1324
1327
  id: string;
1325
1328
  type: "dynamic";
1326
1329
  } | {
1327
- properties?: {
1328
- url?: string | undefined;
1329
- label: string;
1330
- text: string;
1331
- }[] | undefined;
1332
1330
  type: "static";
1333
1331
  title: string;
1334
1332
  rule: {
1335
- payload?: EventFilter | undefined;
1336
- context?: EventFilter | undefined;
1337
1333
  event: string;
1338
1334
  source: string;
1335
+ payload?: EventFilter | undefined;
1336
+ context?: EventFilter | undefined;
1339
1337
  };
1338
+ properties?: {
1339
+ label: string;
1340
+ text: string;
1341
+ url?: string | undefined;
1342
+ }[] | undefined;
1340
1343
  } | {
1341
1344
  type: "scheduled";
1342
1345
  schedule: {
1343
- metadata?: any;
1344
1346
  options: {
1345
1347
  cron: string;
1346
1348
  };
1347
1349
  type: "cron";
1348
- } | {
1349
1350
  metadata?: any;
1351
+ } | {
1350
1352
  options: {
1351
1353
  seconds: number;
1352
1354
  };
1353
1355
  type: "interval";
1356
+ metadata?: any;
1354
1357
  };
1355
1358
  };
1356
1359
  integrations: Record<string, {
1357
1360
  id: string;
1358
1361
  metadata: {
1359
- instructions?: string | undefined;
1360
1362
  id: string;
1361
1363
  name: string;
1364
+ instructions?: string | undefined;
1362
1365
  };
1363
1366
  authSource: "HOSTED" | "LOCAL";
1364
1367
  }>;
@@ -1366,98 +1369,111 @@ declare const CreateRunBodySchema: z.ZodObject<{
1366
1369
  startPosition: "initial" | "latest";
1367
1370
  enabled: boolean;
1368
1371
  preprocessRuns: boolean;
1369
- };
1370
- client: string;
1371
- }, {
1372
+ queue?: string | {
1373
+ name: string;
1374
+ maxConcurrent?: number | undefined;
1375
+ } | undefined;
1376
+ };
1377
+ client: string;
1372
1378
  properties?: {
1373
- url?: string | undefined;
1374
1379
  label: string;
1375
1380
  text: string;
1381
+ url?: string | undefined;
1376
1382
  }[] | undefined;
1383
+ }, {
1377
1384
  event: {
1378
- context?: DeserializedJson | undefined;
1379
- deliverAt?: Date | null | undefined;
1380
- deliveredAt?: Date | null | undefined;
1381
1385
  id: string;
1382
1386
  name: string;
1383
- payload: DeserializedJson;
1387
+ payload: ((string | number | boolean | {
1388
+ [key: string]: DeserializedJson;
1389
+ } | DeserializedJson[]) & (string | number | boolean | {
1390
+ [key: string]: DeserializedJson;
1391
+ } | DeserializedJson[] | undefined)) | null;
1384
1392
  timestamp: Date;
1393
+ context?: DeserializedJson | undefined;
1394
+ deliverAt?: Date | null | undefined;
1395
+ deliveredAt?: Date | null | undefined;
1385
1396
  };
1386
1397
  job: {
1387
- internal?: boolean | undefined;
1388
- queue?: string | {
1389
- maxConcurrent?: number | undefined;
1390
- name: string;
1391
- } | undefined;
1392
1398
  id: string;
1393
1399
  name: string;
1394
1400
  event: {
1401
+ name: string;
1402
+ icon: string;
1403
+ source: string;
1404
+ title: string;
1395
1405
  filter?: EventFilter | undefined;
1396
1406
  properties?: {
1397
- url?: string | undefined;
1398
1407
  label: string;
1399
1408
  text: string;
1409
+ url?: string | undefined;
1400
1410
  }[] | undefined;
1401
1411
  schema?: any;
1402
1412
  examples?: {
1403
- icon?: string | undefined;
1404
- payload?: any;
1405
1413
  id: string;
1406
1414
  name: string;
1415
+ icon?: string | undefined;
1416
+ payload?: any;
1407
1417
  }[] | undefined;
1408
- name: string;
1409
- icon: string;
1410
- source: string;
1411
- title: string;
1412
1418
  };
1413
1419
  version: string;
1414
1420
  trigger: {
1415
1421
  id: string;
1416
1422
  type: "dynamic";
1417
1423
  } | {
1418
- properties?: {
1419
- url?: string | undefined;
1420
- label: string;
1421
- text: string;
1422
- }[] | undefined;
1423
1424
  type: "static";
1424
1425
  title: string;
1425
1426
  rule: {
1426
- payload?: EventFilter | undefined;
1427
- context?: EventFilter | undefined;
1428
1427
  event: string;
1429
1428
  source: string;
1429
+ payload?: EventFilter | undefined;
1430
+ context?: EventFilter | undefined;
1430
1431
  };
1432
+ properties?: {
1433
+ label: string;
1434
+ text: string;
1435
+ url?: string | undefined;
1436
+ }[] | undefined;
1431
1437
  } | {
1432
1438
  type: "scheduled";
1433
1439
  schedule: {
1434
- metadata?: any;
1435
1440
  options: {
1436
1441
  cron: string;
1437
1442
  };
1438
1443
  type: "cron";
1439
- } | {
1440
1444
  metadata?: any;
1445
+ } | {
1441
1446
  options: {
1442
1447
  seconds: number;
1443
1448
  };
1444
1449
  type: "interval";
1450
+ metadata?: any;
1445
1451
  };
1446
1452
  };
1447
1453
  integrations: Record<string, {
1448
1454
  id: string;
1449
1455
  metadata: {
1450
- instructions?: string | undefined;
1451
1456
  id: string;
1452
1457
  name: string;
1458
+ instructions?: string | undefined;
1453
1459
  };
1454
1460
  authSource: "HOSTED" | "LOCAL";
1455
1461
  }>;
1456
1462
  startPosition: "initial" | "latest";
1457
1463
  enabled: boolean;
1458
1464
  preprocessRuns: boolean;
1465
+ internal?: boolean | undefined;
1466
+ queue?: string | {
1467
+ name: string;
1468
+ maxConcurrent?: number | undefined;
1469
+ } | undefined;
1459
1470
  };
1460
1471
  client: string;
1472
+ properties?: {
1473
+ label: string;
1474
+ text: string;
1475
+ url?: string | undefined;
1476
+ }[] | undefined;
1461
1477
  }>;
1462
1478
  type CreateRunBody = z.infer<typeof CreateRunBodySchema>;
1463
1479
  declare const RedactStringSchema: z.ZodObject<{
@@ -1519,13 +1535,13 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
1519
1535
  text: z.ZodString;
1520
1536
  url: z.ZodOptional<z.ZodString>;
1521
1537
  }, "strip", z.ZodTypeAny, {
1522
- url?: string | undefined;
1523
1538
  label: string;
1524
1539
  text: string;
1525
- }, {
1526
1540
  url?: string | undefined;
1541
+ }, {
1527
1542
  label: string;
1528
1543
  text: string;
1544
+ url?: string | undefined;
1529
1545
  }>, "many">>;
1530
1546
  /** The input params to the Task, will be displayed in the logs */
1531
1547
  params: z.ZodAny;
@@ -1534,11 +1550,11 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
1534
1550
  style: z.ZodEnum<["normal", "minimal"]>;
1535
1551
  variant: z.ZodOptional<z.ZodString>;
1536
1552
  }, "strip", z.ZodTypeAny, {
1537
- variant?: string | undefined;
1538
1553
  style: "normal" | "minimal";
1539
- }, {
1540
1554
  variant?: string | undefined;
1555
+ }, {
1541
1556
  style: "normal" | "minimal";
1557
+ variant?: string | undefined;
1542
1558
  }>>;
1543
1559
  /** Allows you to link the Integration connection in the logs. This is handled automatically in integrations. */
1544
1560
  connectionKey: z.ZodOptional<z.ZodString>;
@@ -1570,13 +1586,13 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
1570
1586
  text: z.ZodString;
1571
1587
  url: z.ZodOptional<z.ZodString>;
1572
1588
  }, "strip", z.ZodTypeAny, {
1573
- url?: string | undefined;
1574
1589
  label: string;
1575
1590
  text: string;
1576
- }, {
1577
1591
  url?: string | undefined;
1592
+ }, {
1578
1593
  label: string;
1579
1594
  text: string;
1595
+ url?: string | undefined;
1580
1596
  }>, "many">>;
1581
1597
  rule: z.ZodObject<{
1582
1598
  event: z.ZodString;
@@ -1584,44 +1600,44 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
1584
1600
  payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1585
1601
  context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1586
1602
  }, "strip", z.ZodTypeAny, {
1587
- payload?: EventFilter | undefined;
1588
- context?: EventFilter | undefined;
1589
1603
  event: string;
1590
1604
  source: string;
1591
- }, {
1592
1605
  payload?: EventFilter | undefined;
1593
1606
  context?: EventFilter | undefined;
1607
+ }, {
1594
1608
  event: string;
1595
1609
  source: string;
1610
+ payload?: EventFilter | undefined;
1611
+ context?: EventFilter | undefined;
1596
1612
  }>;
1597
1613
  }, "strip", z.ZodTypeAny, {
1598
- properties?: {
1599
- url?: string | undefined;
1600
- label: string;
1601
- text: string;
1602
- }[] | undefined;
1603
1614
  type: "static";
1604
1615
  title: string;
1605
1616
  rule: {
1606
- payload?: EventFilter | undefined;
1607
- context?: EventFilter | undefined;
1608
1617
  event: string;
1609
1618
  source: string;
1619
+ payload?: EventFilter | undefined;
1620
+ context?: EventFilter | undefined;
1610
1621
  };
1611
- }, {
1612
1622
  properties?: {
1613
- url?: string | undefined;
1614
1623
  label: string;
1615
1624
  text: string;
1625
+ url?: string | undefined;
1616
1626
  }[] | undefined;
1627
+ }, {
1617
1628
  type: "static";
1618
1629
  title: string;
1619
1630
  rule: {
1620
- payload?: EventFilter | undefined;
1621
- context?: EventFilter | undefined;
1622
1631
  event: string;
1623
1632
  source: string;
1633
+ payload?: EventFilter | undefined;
1634
+ context?: EventFilter | undefined;
1624
1635
  };
1636
+ properties?: {
1637
+ label: string;
1638
+ text: string;
1639
+ url?: string | undefined;
1640
+ }[] | undefined;
1625
1641
  }>, z.ZodObject<{
1626
1642
  type: z.ZodLiteral<"scheduled">;
1627
1643
  schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -1635,17 +1651,17 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
1635
1651
  }>;
1636
1652
  metadata: z.ZodAny;
1637
1653
  }, "strip", z.ZodTypeAny, {
1638
- metadata?: any;
1639
1654
  options: {
1640
1655
  seconds: number;
1641
1656
  };
1642
1657
  type: "interval";
1643
- }, {
1644
1658
  metadata?: any;
1659
+ }, {
1645
1660
  options: {
1646
1661
  seconds: number;
1647
1662
  };
1648
1663
  type: "interval";
1664
+ metadata?: any;
1649
1665
  }>, z.ZodObject<{
1650
1666
  type: z.ZodLiteral<"cron">;
1651
1667
  options: z.ZodObject<{
@@ -1657,97 +1673,114 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
1657
1673
  }>;
1658
1674
  metadata: z.ZodAny;
1659
1675
  }, "strip", z.ZodTypeAny, {
1660
- metadata?: any;
1661
1676
  options: {
1662
1677
  cron: string;
1663
1678
  };
1664
1679
  type: "cron";
1665
- }, {
1666
1680
  metadata?: any;
1681
+ }, {
1667
1682
  options: {
1668
1683
  cron: string;
1669
1684
  };
1670
1685
  type: "cron";
1686
+ metadata?: any;
1671
1687
  }>]>;
1672
1688
  }, "strip", z.ZodTypeAny, {
1673
1689
  type: "scheduled";
1674
1690
  schedule: {
1675
- metadata?: any;
1676
1691
  options: {
1677
1692
  cron: string;
1678
1693
  };
1679
1694
  type: "cron";
1680
- } | {
1681
1695
  metadata?: any;
1696
+ } | {
1682
1697
  options: {
1683
1698
  seconds: number;
1684
1699
  };
1685
1700
  type: "interval";
1701
+ metadata?: any;
1686
1702
  };
1687
1703
  }, {
1688
1704
  type: "scheduled";
1689
1705
  schedule: {
1690
- metadata?: any;
1691
1706
  options: {
1692
1707
  cron: string;
1693
1708
  };
1694
1709
  type: "cron";
1695
- } | {
1696
1710
  metadata?: any;
1711
+ } | {
1697
1712
  options: {
1698
1713
  seconds: number;
1699
1714
  };
1700
1715
  type: "interval";
1716
+ metadata?: any;
1701
1717
  };
1702
1718
  }>]>>;
1703
1719
  }, "strip", z.ZodTypeAny, {
1704
- icon?: string | undefined;
1720
+ name: string;
1721
+ noop: boolean;
1705
1722
  delayUntil?: Date | undefined;
1723
+ retry?: {
1724
+ limit?: number | undefined;
1725
+ factor?: number | undefined;
1726
+ minTimeoutInMs?: number | undefined;
1727
+ maxTimeoutInMs?: number | undefined;
1728
+ randomize?: boolean | undefined;
1729
+ } | undefined;
1730
+ icon?: string | undefined;
1731
+ displayKey?: string | undefined;
1706
1732
  description?: string | undefined;
1707
- params?: any;
1708
1733
  properties?: {
1709
- url?: string | undefined;
1710
1734
  label: string;
1711
1735
  text: string;
1736
+ url?: string | undefined;
1712
1737
  }[] | undefined;
1738
+ params?: any;
1713
1739
  style?: {
1714
- variant?: string | undefined;
1715
1740
  style: "normal" | "minimal";
1741
+ variant?: string | undefined;
1716
1742
  } | undefined;
1743
+ connectionKey?: string | undefined;
1717
1744
  operation?: "fetch" | undefined;
1745
+ redact?: {
1746
+ paths: string[];
1747
+ } | undefined;
1718
1748
  trigger?: {
1719
1749
  id: string;
1720
1750
  type: "dynamic";
1721
1751
  } | {
1722
- properties?: {
1723
- url?: string | undefined;
1724
- label: string;
1725
- text: string;
1726
- }[] | undefined;
1727
1752
  type: "static";
1728
1753
  title: string;
1729
1754
  rule: {
1730
- payload?: EventFilter | undefined;
1731
- context?: EventFilter | undefined;
1732
1755
  event: string;
1733
1756
  source: string;
1757
+ payload?: EventFilter | undefined;
1758
+ context?: EventFilter | undefined;
1734
1759
  };
1760
+ properties?: {
1761
+ label: string;
1762
+ text: string;
1763
+ url?: string | undefined;
1764
+ }[] | undefined;
1735
1765
  } | {
1736
1766
  type: "scheduled";
1737
1767
  schedule: {
1738
- metadata?: any;
1739
1768
  options: {
1740
1769
  cron: string;
1741
1770
  };
1742
1771
  type: "cron";
1743
- } | {
1744
1772
  metadata?: any;
1773
+ } | {
1745
1774
  options: {
1746
1775
  seconds: number;
1747
1776
  };
1748
1777
  type: "interval";
1778
+ metadata?: any;
1749
1779
  };
1750
1780
  } | undefined;
1781
+ }, {
1782
+ name: string;
1783
+ delayUntil?: Date | undefined;
1751
1784
  retry?: {
1752
1785
  limit?: number | undefined;
1753
1786
  factor?: number | undefined;
@@ -1755,155 +1788,91 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
1755
1788
  maxTimeoutInMs?: number | undefined;
1756
1789
  randomize?: boolean | undefined;
1757
1790
  } | undefined;
1758
- displayKey?: string | undefined;
1759
- connectionKey?: string | undefined;
1760
- redact?: {
1761
- paths: string[];
1762
- } | undefined;
1763
- name: string;
1764
- noop: boolean;
1765
- }, {
1766
1791
  icon?: string | undefined;
1767
- noop?: boolean | undefined;
1768
- delayUntil?: Date | undefined;
1792
+ displayKey?: string | undefined;
1769
1793
  description?: string | undefined;
1770
- params?: any;
1771
1794
  properties?: {
1772
- url?: string | undefined;
1773
1795
  label: string;
1774
1796
  text: string;
1797
+ url?: string | undefined;
1775
1798
  }[] | undefined;
1799
+ params?: any;
1776
1800
  style?: {
1777
- variant?: string | undefined;
1778
1801
  style: "normal" | "minimal";
1802
+ variant?: string | undefined;
1779
1803
  } | undefined;
1804
+ connectionKey?: string | undefined;
1780
1805
  operation?: "fetch" | undefined;
1806
+ noop?: boolean | undefined;
1807
+ redact?: {
1808
+ paths: string[];
1809
+ } | undefined;
1781
1810
  trigger?: {
1782
1811
  id: string;
1783
1812
  type: "dynamic";
1784
1813
  } | {
1785
- properties?: {
1786
- url?: string | undefined;
1787
- label: string;
1788
- text: string;
1789
- }[] | undefined;
1790
1814
  type: "static";
1791
1815
  title: string;
1792
1816
  rule: {
1793
- payload?: EventFilter | undefined;
1794
- context?: EventFilter | undefined;
1795
1817
  event: string;
1796
1818
  source: string;
1819
+ payload?: EventFilter | undefined;
1820
+ context?: EventFilter | undefined;
1797
1821
  };
1822
+ properties?: {
1823
+ label: string;
1824
+ text: string;
1825
+ url?: string | undefined;
1826
+ }[] | undefined;
1798
1827
  } | {
1799
1828
  type: "scheduled";
1800
1829
  schedule: {
1801
- metadata?: any;
1802
1830
  options: {
1803
1831
  cron: string;
1804
1832
  };
1805
1833
  type: "cron";
1806
- } | {
1807
1834
  metadata?: any;
1835
+ } | {
1808
1836
  options: {
1809
1837
  seconds: number;
1810
1838
  };
1811
1839
  type: "interval";
1840
+ metadata?: any;
1812
1841
  };
1813
1842
  } | undefined;
1814
- retry?: {
1815
- limit?: number | undefined;
1816
- factor?: number | undefined;
1817
- minTimeoutInMs?: number | undefined;
1818
- maxTimeoutInMs?: number | undefined;
1819
- randomize?: boolean | undefined;
1820
- } | undefined;
1821
- displayKey?: string | undefined;
1822
- connectionKey?: string | undefined;
1823
- redact?: {
1824
- paths: string[];
1825
- } | undefined;
1826
- name: string;
1827
1843
  }>;
1828
1844
  type RunTaskOptions = z.input<typeof RunTaskOptionsSchema>;
1829
- declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
1830
- /** The name of the Task is required. This is displayed on the Task in the logs. */
1845
+ declare const RunTaskBodyInputSchema: z.ZodObject<{
1831
1846
  name: z.ZodString;
1832
- /** The Task will wait and only start at the specified Date */
1833
- delayUntil: z.ZodOptional<z.ZodDate>;
1834
- /** Retry options */
1835
- retry: z.ZodOptional<z.ZodObject<{
1836
- /** The maximum number of times to retry the request. */
1837
- limit: z.ZodOptional<z.ZodNumber>;
1838
- /** The exponential factor to use when calculating the next retry time. */
1839
- factor: z.ZodOptional<z.ZodNumber>;
1840
- /** The minimum amount of time to wait before retrying the request. */
1841
- minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1842
- /** The maximum amount of time to wait before retrying the request. */
1843
- maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1844
- /** Whether to randomize the retry time. */
1845
- randomize: z.ZodOptional<z.ZodBoolean>;
1846
- }, "strip", z.ZodTypeAny, {
1847
- limit?: number | undefined;
1848
- factor?: number | undefined;
1849
- minTimeoutInMs?: number | undefined;
1850
- maxTimeoutInMs?: number | undefined;
1851
- randomize?: boolean | undefined;
1852
- }, {
1853
- limit?: number | undefined;
1854
- factor?: number | undefined;
1855
- minTimeoutInMs?: number | undefined;
1856
- maxTimeoutInMs?: number | undefined;
1857
- randomize?: boolean | undefined;
1858
- }>>;
1859
- /** The icon for the Task, it will appear in the logs.
1860
- * You can use the name of a company in lowercase, e.g. "github".
1861
- * Or any icon name that [Font Awesome](https://fontawesome.com/icons) supports. */
1862
1847
  icon: z.ZodOptional<z.ZodString>;
1863
- /** The key for the Task that you want to appear in the logs */
1864
- displayKey: z.ZodOptional<z.ZodString>;
1865
- /** A description of the Task */
1848
+ noop: z.ZodDefault<z.ZodBoolean>;
1849
+ delayUntil: z.ZodOptional<z.ZodDate>;
1866
1850
  description: z.ZodOptional<z.ZodString>;
1867
- /** Properties that are displayed in the logs */
1851
+ params: z.ZodAny;
1868
1852
  properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
1869
1853
  label: z.ZodString;
1870
1854
  text: z.ZodString;
1871
1855
  url: z.ZodOptional<z.ZodString>;
1872
1856
  }, "strip", z.ZodTypeAny, {
1873
- url?: string | undefined;
1874
1857
  label: string;
1875
1858
  text: string;
1876
- }, {
1877
1859
  url?: string | undefined;
1860
+ }, {
1878
1861
  label: string;
1879
1862
  text: string;
1863
+ url?: string | undefined;
1880
1864
  }>, "many">>;
1881
- /** The input params to the Task, will be displayed in the logs */
1882
- params: z.ZodAny;
1883
- /** The style of the log entry. */
1884
1865
  style: z.ZodOptional<z.ZodObject<{
1885
1866
  style: z.ZodEnum<["normal", "minimal"]>;
1886
1867
  variant: z.ZodOptional<z.ZodString>;
1887
1868
  }, "strip", z.ZodTypeAny, {
1888
- variant?: string | undefined;
1889
1869
  style: "normal" | "minimal";
1890
- }, {
1891
1870
  variant?: string | undefined;
1871
+ }, {
1892
1872
  style: "normal" | "minimal";
1873
+ variant?: string | undefined;
1893
1874
  }>>;
1894
- /** Allows you to link the Integration connection in the logs. This is handled automatically in integrations. */
1895
- connectionKey: z.ZodOptional<z.ZodString>;
1896
- /** An operation you want to perform on the Trigger.dev platform, current only "fetch" is supported. If you wish to `fetch` use [`io.backgroundFetch()`](https://trigger.dev/docs/sdk/io/backgroundfetch) instead. */
1897
1875
  operation: z.ZodOptional<z.ZodEnum<["fetch"]>>;
1898
- /** A No Operation means that the code won't be executed. This is used internally to implement features like [io.wait()](https://trigger.dev/docs/sdk/io/wait). */
1899
- noop: z.ZodDefault<z.ZodBoolean>;
1900
- redact: z.ZodOptional<z.ZodObject<{
1901
- paths: z.ZodArray<z.ZodString, "many">;
1902
- }, "strip", z.ZodTypeAny, {
1903
- paths: string[];
1904
- }, {
1905
- paths: string[];
1906
- }>>;
1907
1876
  trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1908
1877
  type: z.ZodLiteral<"dynamic">;
1909
1878
  id: z.ZodString;
@@ -1921,13 +1890,13 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
1921
1890
  text: z.ZodString;
1922
1891
  url: z.ZodOptional<z.ZodString>;
1923
1892
  }, "strip", z.ZodTypeAny, {
1924
- url?: string | undefined;
1925
1893
  label: string;
1926
1894
  text: string;
1927
- }, {
1928
1895
  url?: string | undefined;
1896
+ }, {
1929
1897
  label: string;
1930
1898
  text: string;
1899
+ url?: string | undefined;
1931
1900
  }>, "many">>;
1932
1901
  rule: z.ZodObject<{
1933
1902
  event: z.ZodString;
@@ -1935,44 +1904,44 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
1935
1904
  payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1936
1905
  context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1937
1906
  }, "strip", z.ZodTypeAny, {
1938
- payload?: EventFilter | undefined;
1939
- context?: EventFilter | undefined;
1940
1907
  event: string;
1941
1908
  source: string;
1942
- }, {
1943
1909
  payload?: EventFilter | undefined;
1944
1910
  context?: EventFilter | undefined;
1911
+ }, {
1945
1912
  event: string;
1946
1913
  source: string;
1914
+ payload?: EventFilter | undefined;
1915
+ context?: EventFilter | undefined;
1947
1916
  }>;
1948
1917
  }, "strip", z.ZodTypeAny, {
1949
- properties?: {
1950
- url?: string | undefined;
1951
- label: string;
1952
- text: string;
1953
- }[] | undefined;
1954
1918
  type: "static";
1955
1919
  title: string;
1956
1920
  rule: {
1957
- payload?: EventFilter | undefined;
1958
- context?: EventFilter | undefined;
1959
1921
  event: string;
1960
1922
  source: string;
1923
+ payload?: EventFilter | undefined;
1924
+ context?: EventFilter | undefined;
1961
1925
  };
1962
- }, {
1963
1926
  properties?: {
1964
- url?: string | undefined;
1965
1927
  label: string;
1966
1928
  text: string;
1929
+ url?: string | undefined;
1967
1930
  }[] | undefined;
1931
+ }, {
1968
1932
  type: "static";
1969
1933
  title: string;
1970
1934
  rule: {
1971
- payload?: EventFilter | undefined;
1972
- context?: EventFilter | undefined;
1973
1935
  event: string;
1974
1936
  source: string;
1937
+ payload?: EventFilter | undefined;
1938
+ context?: EventFilter | undefined;
1975
1939
  };
1940
+ properties?: {
1941
+ label: string;
1942
+ text: string;
1943
+ url?: string | undefined;
1944
+ }[] | undefined;
1976
1945
  }>, z.ZodObject<{
1977
1946
  type: z.ZodLiteral<"scheduled">;
1978
1947
  schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -1986,17 +1955,17 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
1986
1955
  }>;
1987
1956
  metadata: z.ZodAny;
1988
1957
  }, "strip", z.ZodTypeAny, {
1989
- metadata?: any;
1990
1958
  options: {
1991
1959
  seconds: number;
1992
1960
  };
1993
1961
  type: "interval";
1994
- }, {
1995
1962
  metadata?: any;
1963
+ }, {
1996
1964
  options: {
1997
1965
  seconds: number;
1998
1966
  };
1999
1967
  type: "interval";
1968
+ metadata?: any;
2000
1969
  }>, z.ZodObject<{
2001
1970
  type: z.ZodLiteral<"cron">;
2002
1971
  options: z.ZodObject<{
@@ -2008,99 +1977,133 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
2008
1977
  }>;
2009
1978
  metadata: z.ZodAny;
2010
1979
  }, "strip", z.ZodTypeAny, {
2011
- metadata?: any;
2012
1980
  options: {
2013
1981
  cron: string;
2014
1982
  };
2015
1983
  type: "cron";
2016
- }, {
2017
1984
  metadata?: any;
1985
+ }, {
2018
1986
  options: {
2019
1987
  cron: string;
2020
1988
  };
2021
1989
  type: "cron";
1990
+ metadata?: any;
2022
1991
  }>]>;
2023
1992
  }, "strip", z.ZodTypeAny, {
2024
1993
  type: "scheduled";
2025
1994
  schedule: {
2026
- metadata?: any;
2027
1995
  options: {
2028
1996
  cron: string;
2029
1997
  };
2030
1998
  type: "cron";
2031
- } | {
2032
1999
  metadata?: any;
2000
+ } | {
2033
2001
  options: {
2034
2002
  seconds: number;
2035
2003
  };
2036
2004
  type: "interval";
2005
+ metadata?: any;
2037
2006
  };
2038
2007
  }, {
2039
2008
  type: "scheduled";
2040
2009
  schedule: {
2041
- metadata?: any;
2042
2010
  options: {
2043
2011
  cron: string;
2044
2012
  };
2045
2013
  type: "cron";
2046
- } | {
2047
2014
  metadata?: any;
2015
+ } | {
2048
2016
  options: {
2049
2017
  seconds: number;
2050
2018
  };
2051
2019
  type: "interval";
2020
+ metadata?: any;
2052
2021
  };
2053
2022
  }>]>>;
2054
- }, {
2023
+ retry: z.ZodOptional<z.ZodObject<{
2024
+ /** The maximum number of times to retry the request. */
2025
+ limit: z.ZodOptional<z.ZodNumber>;
2026
+ /** The exponential factor to use when calculating the next retry time. */
2027
+ factor: z.ZodOptional<z.ZodNumber>;
2028
+ /** The minimum amount of time to wait before retrying the request. */
2029
+ minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
2030
+ /** The maximum amount of time to wait before retrying the request. */
2031
+ maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
2032
+ /** Whether to randomize the retry time. */
2033
+ randomize: z.ZodOptional<z.ZodBoolean>;
2034
+ }, "strip", z.ZodTypeAny, {
2035
+ limit?: number | undefined;
2036
+ factor?: number | undefined;
2037
+ minTimeoutInMs?: number | undefined;
2038
+ maxTimeoutInMs?: number | undefined;
2039
+ randomize?: boolean | undefined;
2040
+ }, {
2041
+ limit?: number | undefined;
2042
+ factor?: number | undefined;
2043
+ minTimeoutInMs?: number | undefined;
2044
+ maxTimeoutInMs?: number | undefined;
2045
+ randomize?: boolean | undefined;
2046
+ }>>;
2047
+ displayKey: z.ZodOptional<z.ZodString>;
2048
+ connectionKey: z.ZodOptional<z.ZodString>;
2049
+ redact: z.ZodOptional<z.ZodObject<{
2050
+ paths: z.ZodArray<z.ZodString, "many">;
2051
+ }, "strip", z.ZodTypeAny, {
2052
+ paths: string[];
2053
+ }, {
2054
+ paths: string[];
2055
+ }>>;
2055
2056
  idempotencyKey: z.ZodString;
2056
2057
  parentId: z.ZodOptional<z.ZodString>;
2057
- }>, "strip", z.ZodTypeAny, {
2058
+ }, "strip", z.ZodTypeAny, {
2059
+ name: string;
2060
+ noop: boolean;
2061
+ idempotencyKey: string;
2058
2062
  icon?: string | undefined;
2059
2063
  delayUntil?: Date | undefined;
2060
2064
  description?: string | undefined;
2061
2065
  params?: any;
2062
2066
  properties?: {
2063
- url?: string | undefined;
2064
2067
  label: string;
2065
2068
  text: string;
2069
+ url?: string | undefined;
2066
2070
  }[] | undefined;
2067
- parentId?: string | undefined;
2068
2071
  style?: {
2069
- variant?: string | undefined;
2070
2072
  style: "normal" | "minimal";
2073
+ variant?: string | undefined;
2071
2074
  } | undefined;
2072
2075
  operation?: "fetch" | undefined;
2073
2076
  trigger?: {
2074
2077
  id: string;
2075
2078
  type: "dynamic";
2076
2079
  } | {
2077
- properties?: {
2078
- url?: string | undefined;
2079
- label: string;
2080
- text: string;
2081
- }[] | undefined;
2082
2080
  type: "static";
2083
2081
  title: string;
2084
2082
  rule: {
2085
- payload?: EventFilter | undefined;
2086
- context?: EventFilter | undefined;
2087
2083
  event: string;
2088
2084
  source: string;
2085
+ payload?: EventFilter | undefined;
2086
+ context?: EventFilter | undefined;
2089
2087
  };
2088
+ properties?: {
2089
+ label: string;
2090
+ text: string;
2091
+ url?: string | undefined;
2092
+ }[] | undefined;
2090
2093
  } | {
2091
2094
  type: "scheduled";
2092
2095
  schedule: {
2093
- metadata?: any;
2094
2096
  options: {
2095
2097
  cron: string;
2096
2098
  };
2097
2099
  type: "cron";
2098
- } | {
2099
2100
  metadata?: any;
2101
+ } | {
2100
2102
  options: {
2101
2103
  seconds: number;
2102
2104
  };
2103
2105
  type: "interval";
2106
+ metadata?: any;
2104
2107
  };
2105
2108
  } | undefined;
2106
2109
  retry?: {
@@ -2115,57 +2118,56 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
2115
2118
  redact?: {
2116
2119
  paths: string[];
2117
2120
  } | undefined;
2121
+ parentId?: string | undefined;
2122
+ }, {
2118
2123
  name: string;
2119
- noop: boolean;
2120
2124
  idempotencyKey: string;
2121
- }, {
2122
2125
  icon?: string | undefined;
2123
2126
  noop?: boolean | undefined;
2124
2127
  delayUntil?: Date | undefined;
2125
2128
  description?: string | undefined;
2126
2129
  params?: any;
2127
2130
  properties?: {
2128
- url?: string | undefined;
2129
2131
  label: string;
2130
2132
  text: string;
2133
+ url?: string | undefined;
2131
2134
  }[] | undefined;
2132
- parentId?: string | undefined;
2133
2135
  style?: {
2134
- variant?: string | undefined;
2135
2136
  style: "normal" | "minimal";
2137
+ variant?: string | undefined;
2136
2138
  } | undefined;
2137
2139
  operation?: "fetch" | undefined;
2138
2140
  trigger?: {
2139
2141
  id: string;
2140
2142
  type: "dynamic";
2141
2143
  } | {
2142
- properties?: {
2143
- url?: string | undefined;
2144
- label: string;
2145
- text: string;
2146
- }[] | undefined;
2147
2144
  type: "static";
2148
2145
  title: string;
2149
2146
  rule: {
2150
- payload?: EventFilter | undefined;
2151
- context?: EventFilter | undefined;
2152
2147
  event: string;
2153
2148
  source: string;
2149
+ payload?: EventFilter | undefined;
2150
+ context?: EventFilter | undefined;
2154
2151
  };
2152
+ properties?: {
2153
+ label: string;
2154
+ text: string;
2155
+ url?: string | undefined;
2156
+ }[] | undefined;
2155
2157
  } | {
2156
2158
  type: "scheduled";
2157
2159
  schedule: {
2158
- metadata?: any;
2159
2160
  options: {
2160
2161
  cron: string;
2161
2162
  };
2162
2163
  type: "cron";
2163
- } | {
2164
2164
  metadata?: any;
2165
+ } | {
2165
2166
  options: {
2166
2167
  seconds: number;
2167
2168
  };
2168
2169
  type: "interval";
2170
+ metadata?: any;
2169
2171
  };
2170
2172
  } | undefined;
2171
2173
  retry?: {
@@ -2180,260 +2182,48 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
2180
2182
  redact?: {
2181
2183
  paths: string[];
2182
2184
  } | undefined;
2183
- name: string;
2184
- idempotencyKey: string;
2185
+ parentId?: string | undefined;
2185
2186
  }>;
2186
2187
  type RunTaskBodyInput = z.infer<typeof RunTaskBodyInputSchema>;
2187
- declare const CompleteTaskBodyInputSchema: z.ZodObject<z.extendShape<Pick<z.extendShape<{
2188
- /** The name of the Task is required. This is displayed on the Task in the logs. */
2189
- name: z.ZodString;
2190
- /** The Task will wait and only start at the specified Date */
2191
- delayUntil: z.ZodOptional<z.ZodDate>;
2192
- /** Retry options */
2193
- retry: z.ZodOptional<z.ZodObject<{
2194
- /** The maximum number of times to retry the request. */
2195
- limit: z.ZodOptional<z.ZodNumber>;
2196
- /** The exponential factor to use when calculating the next retry time. */
2197
- factor: z.ZodOptional<z.ZodNumber>;
2198
- /** The minimum amount of time to wait before retrying the request. */
2199
- minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
2200
- /** The maximum amount of time to wait before retrying the request. */
2201
- maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
2202
- /** Whether to randomize the retry time. */
2203
- randomize: z.ZodOptional<z.ZodBoolean>;
2204
- }, "strip", z.ZodTypeAny, {
2205
- limit?: number | undefined;
2206
- factor?: number | undefined;
2207
- minTimeoutInMs?: number | undefined;
2208
- maxTimeoutInMs?: number | undefined;
2209
- randomize?: boolean | undefined;
2210
- }, {
2211
- limit?: number | undefined;
2212
- factor?: number | undefined;
2213
- minTimeoutInMs?: number | undefined;
2214
- maxTimeoutInMs?: number | undefined;
2215
- randomize?: boolean | undefined;
2216
- }>>;
2217
- /** The icon for the Task, it will appear in the logs.
2218
- * You can use the name of a company in lowercase, e.g. "github".
2219
- * Or any icon name that [Font Awesome](https://fontawesome.com/icons) supports. */
2220
- icon: z.ZodOptional<z.ZodString>;
2221
- /** The key for the Task that you want to appear in the logs */
2222
- displayKey: z.ZodOptional<z.ZodString>;
2223
- /** A description of the Task */
2188
+ declare const CompleteTaskBodyInputSchema: z.ZodObject<{
2224
2189
  description: z.ZodOptional<z.ZodString>;
2225
- /** Properties that are displayed in the logs */
2190
+ params: z.ZodAny;
2226
2191
  properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
2227
2192
  label: z.ZodString;
2228
2193
  text: z.ZodString;
2229
2194
  url: z.ZodOptional<z.ZodString>;
2230
2195
  }, "strip", z.ZodTypeAny, {
2231
- url?: string | undefined;
2232
2196
  label: string;
2233
2197
  text: string;
2234
- }, {
2235
2198
  url?: string | undefined;
2199
+ }, {
2236
2200
  label: string;
2237
2201
  text: string;
2202
+ url?: string | undefined;
2238
2203
  }>, "many">>;
2239
- /** The input params to the Task, will be displayed in the logs */
2240
- params: z.ZodAny;
2241
- /** The style of the log entry. */
2242
- style: z.ZodOptional<z.ZodObject<{
2243
- style: z.ZodEnum<["normal", "minimal"]>;
2244
- variant: z.ZodOptional<z.ZodString>;
2245
- }, "strip", z.ZodTypeAny, {
2246
- variant?: string | undefined;
2247
- style: "normal" | "minimal";
2248
- }, {
2249
- variant?: string | undefined;
2250
- style: "normal" | "minimal";
2251
- }>>;
2252
- /** Allows you to link the Integration connection in the logs. This is handled automatically in integrations. */
2253
- connectionKey: z.ZodOptional<z.ZodString>;
2254
- /** An operation you want to perform on the Trigger.dev platform, current only "fetch" is supported. If you wish to `fetch` use [`io.backgroundFetch()`](https://trigger.dev/docs/sdk/io/backgroundfetch) instead. */
2255
- operation: z.ZodOptional<z.ZodEnum<["fetch"]>>;
2256
- /** A No Operation means that the code won't be executed. This is used internally to implement features like [io.wait()](https://trigger.dev/docs/sdk/io/wait). */
2257
- noop: z.ZodDefault<z.ZodBoolean>;
2258
- redact: z.ZodOptional<z.ZodObject<{
2259
- paths: z.ZodArray<z.ZodString, "many">;
2260
- }, "strip", z.ZodTypeAny, {
2261
- paths: string[];
2262
- }, {
2263
- paths: string[];
2264
- }>>;
2265
- trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2266
- type: z.ZodLiteral<"dynamic">;
2267
- id: z.ZodString;
2268
- }, "strip", z.ZodTypeAny, {
2269
- id: string;
2270
- type: "dynamic";
2271
- }, {
2272
- id: string;
2273
- type: "dynamic";
2274
- }>, z.ZodObject<{
2275
- type: z.ZodLiteral<"static">;
2276
- title: z.ZodString;
2277
- properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
2278
- label: z.ZodString;
2279
- text: z.ZodString;
2280
- url: z.ZodOptional<z.ZodString>;
2281
- }, "strip", z.ZodTypeAny, {
2282
- url?: string | undefined;
2283
- label: string;
2284
- text: string;
2285
- }, {
2286
- url?: string | undefined;
2287
- label: string;
2288
- text: string;
2289
- }>, "many">>;
2290
- rule: z.ZodObject<{
2291
- event: z.ZodString;
2292
- source: z.ZodString;
2293
- payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
2294
- context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
2295
- }, "strip", z.ZodTypeAny, {
2296
- payload?: EventFilter | undefined;
2297
- context?: EventFilter | undefined;
2298
- event: string;
2299
- source: string;
2300
- }, {
2301
- payload?: EventFilter | undefined;
2302
- context?: EventFilter | undefined;
2303
- event: string;
2304
- source: string;
2305
- }>;
2306
- }, "strip", z.ZodTypeAny, {
2307
- properties?: {
2308
- url?: string | undefined;
2309
- label: string;
2310
- text: string;
2311
- }[] | undefined;
2312
- type: "static";
2313
- title: string;
2314
- rule: {
2315
- payload?: EventFilter | undefined;
2316
- context?: EventFilter | undefined;
2317
- event: string;
2318
- source: string;
2319
- };
2320
- }, {
2321
- properties?: {
2322
- url?: string | undefined;
2323
- label: string;
2324
- text: string;
2325
- }[] | undefined;
2326
- type: "static";
2327
- title: string;
2328
- rule: {
2329
- payload?: EventFilter | undefined;
2330
- context?: EventFilter | undefined;
2331
- event: string;
2332
- source: string;
2333
- };
2334
- }>, z.ZodObject<{
2335
- type: z.ZodLiteral<"scheduled">;
2336
- schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2337
- type: z.ZodLiteral<"interval">;
2338
- options: z.ZodObject<{
2339
- seconds: z.ZodNumber;
2340
- }, "strip", z.ZodTypeAny, {
2341
- seconds: number;
2342
- }, {
2343
- seconds: number;
2344
- }>;
2345
- metadata: z.ZodAny;
2346
- }, "strip", z.ZodTypeAny, {
2347
- metadata?: any;
2348
- options: {
2349
- seconds: number;
2350
- };
2351
- type: "interval";
2352
- }, {
2353
- metadata?: any;
2354
- options: {
2355
- seconds: number;
2356
- };
2357
- type: "interval";
2358
- }>, z.ZodObject<{
2359
- type: z.ZodLiteral<"cron">;
2360
- options: z.ZodObject<{
2361
- cron: z.ZodString;
2362
- }, "strip", z.ZodTypeAny, {
2363
- cron: string;
2364
- }, {
2365
- cron: string;
2366
- }>;
2367
- metadata: z.ZodAny;
2368
- }, "strip", z.ZodTypeAny, {
2369
- metadata?: any;
2370
- options: {
2371
- cron: string;
2372
- };
2373
- type: "cron";
2374
- }, {
2375
- metadata?: any;
2376
- options: {
2377
- cron: string;
2378
- };
2379
- type: "cron";
2380
- }>]>;
2381
- }, "strip", z.ZodTypeAny, {
2382
- type: "scheduled";
2383
- schedule: {
2384
- metadata?: any;
2385
- options: {
2386
- cron: string;
2387
- };
2388
- type: "cron";
2389
- } | {
2390
- metadata?: any;
2391
- options: {
2392
- seconds: number;
2393
- };
2394
- type: "interval";
2395
- };
2396
- }, {
2397
- type: "scheduled";
2398
- schedule: {
2399
- metadata?: any;
2400
- options: {
2401
- cron: string;
2402
- };
2403
- type: "cron";
2404
- } | {
2405
- metadata?: any;
2406
- options: {
2407
- seconds: number;
2408
- };
2409
- type: "interval";
2410
- };
2411
- }>]>>;
2412
- }, {
2413
- idempotencyKey: z.ZodString;
2414
- parentId: z.ZodOptional<z.ZodString>;
2415
- }>, "description" | "params" | "properties">, {
2416
2204
  output: z.ZodEffects<z.ZodOptional<z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>, string | number | boolean | {
2417
2205
  [key: string]: DeserializedJson;
2418
2206
  } | DeserializedJson[] | null, SerializableJson>;
2419
- }>, "strip", z.ZodTypeAny, {
2207
+ }, "strip", z.ZodTypeAny, {
2208
+ output: ((string | number | boolean | {
2209
+ [key: string]: DeserializedJson;
2210
+ } | DeserializedJson[]) & (string | number | boolean | {
2211
+ [key: string]: DeserializedJson;
2212
+ } | DeserializedJson[] | undefined)) | null;
2420
2213
  description?: string | undefined;
2421
2214
  params?: any;
2422
2215
  properties?: {
2423
- url?: string | undefined;
2424
2216
  label: string;
2425
2217
  text: string;
2218
+ url?: string | undefined;
2426
2219
  }[] | undefined;
2427
- output: string | number | boolean | {
2428
- [key: string]: DeserializedJson;
2429
- } | DeserializedJson[] | null;
2430
2220
  }, {
2431
2221
  description?: string | undefined;
2432
2222
  params?: any;
2433
2223
  properties?: {
2434
- url?: string | undefined;
2435
2224
  label: string;
2436
2225
  text: string;
2226
+ url?: string | undefined;
2437
2227
  }[] | undefined;
2438
2228
  output?: SerializableJson;
2439
2229
  }>;
@@ -2444,25 +2234,25 @@ declare const FailTaskBodyInputSchema: z.ZodObject<{
2444
2234
  name: z.ZodOptional<z.ZodString>;
2445
2235
  stack: z.ZodOptional<z.ZodString>;
2446
2236
  }, "strip", z.ZodTypeAny, {
2237
+ message: string;
2447
2238
  name?: string | undefined;
2448
2239
  stack?: string | undefined;
2449
- message: string;
2450
2240
  }, {
2241
+ message: string;
2451
2242
  name?: string | undefined;
2452
2243
  stack?: string | undefined;
2453
- message: string;
2454
2244
  }>;
2455
2245
  }, "strip", z.ZodTypeAny, {
2456
2246
  error: {
2247
+ message: string;
2457
2248
  name?: string | undefined;
2458
2249
  stack?: string | undefined;
2459
- message: string;
2460
2250
  };
2461
2251
  }, {
2462
2252
  error: {
2253
+ message: string;
2463
2254
  name?: string | undefined;
2464
2255
  stack?: string | undefined;
2465
- message: string;
2466
2256
  };
2467
2257
  }>;
2468
2258
  type FailTaskBodyInput = z.infer<typeof FailTaskBodyInputSchema>;
@@ -2473,17 +2263,17 @@ declare const NormalizedRequestSchema: z.ZodObject<{
2473
2263
  url: z.ZodString;
2474
2264
  body: z.ZodAny;
2475
2265
  }, "strip", z.ZodTypeAny, {
2476
- body?: any;
2477
2266
  url: string;
2478
2267
  method: string;
2479
2268
  headers: Record<string, string>;
2480
2269
  query: Record<string, string>;
2481
- }, {
2482
2270
  body?: any;
2271
+ }, {
2483
2272
  url: string;
2484
2273
  method: string;
2485
2274
  headers: Record<string, string>;
2486
2275
  query: Record<string, string>;
2276
+ body?: any;
2487
2277
  }>;
2488
2278
  type NormalizedRequest = z.infer<typeof NormalizedRequestSchema>;
2489
2279
  declare const NormalizedResponseSchema: z.ZodObject<{
@@ -2491,13 +2281,13 @@ declare const NormalizedResponseSchema: z.ZodObject<{
2491
2281
  body: z.ZodAny;
2492
2282
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2493
2283
  }, "strip", z.ZodTypeAny, {
2494
- headers?: Record<string, string> | undefined;
2495
- body?: any;
2496
2284
  status: number;
2497
- }, {
2498
- headers?: Record<string, string> | undefined;
2499
2285
  body?: any;
2286
+ headers?: Record<string, string> | undefined;
2287
+ }, {
2500
2288
  status: number;
2289
+ body?: any;
2290
+ headers?: Record<string, string> | undefined;
2501
2291
  }>;
2502
2292
  type NormalizedResponse = z.infer<typeof NormalizedResponseSchema>;
2503
2293
  declare const RegisterTriggerBodySchema: z.ZodObject<{
@@ -2507,15 +2297,15 @@ declare const RegisterTriggerBodySchema: z.ZodObject<{
2507
2297
  payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
2508
2298
  context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
2509
2299
  }, "strip", z.ZodTypeAny, {
2510
- payload?: EventFilter | undefined;
2511
- context?: EventFilter | undefined;
2512
2300
  event: string;
2513
2301
  source: string;
2514
- }, {
2515
2302
  payload?: EventFilter | undefined;
2516
2303
  context?: EventFilter | undefined;
2304
+ }, {
2517
2305
  event: string;
2518
2306
  source: string;
2307
+ payload?: EventFilter | undefined;
2308
+ context?: EventFilter | undefined;
2519
2309
  }>;
2520
2310
  source: z.ZodObject<{
2521
2311
  channel: z.ZodEnum<["HTTP", "SQS", "SMTP"]>;
@@ -2526,107 +2316,133 @@ declare const RegisterTriggerBodySchema: z.ZodObject<{
2526
2316
  name: z.ZodString;
2527
2317
  instructions: z.ZodOptional<z.ZodString>;
2528
2318
  }, "strip", z.ZodTypeAny, {
2529
- instructions?: string | undefined;
2530
2319
  id: string;
2531
2320
  name: string;
2532
- }, {
2533
2321
  instructions?: string | undefined;
2322
+ }, {
2534
2323
  id: string;
2535
2324
  name: string;
2325
+ instructions?: string | undefined;
2536
2326
  }>;
2537
2327
  authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
2538
2328
  }, "strip", z.ZodTypeAny, {
2539
2329
  id: string;
2540
2330
  metadata: {
2541
- instructions?: string | undefined;
2542
2331
  id: string;
2543
2332
  name: string;
2333
+ instructions?: string | undefined;
2544
2334
  };
2545
2335
  authSource: "HOSTED" | "LOCAL";
2546
2336
  }, {
2547
2337
  id: string;
2548
2338
  metadata: {
2549
- instructions?: string | undefined;
2550
2339
  id: string;
2551
2340
  name: string;
2341
+ instructions?: string | undefined;
2552
2342
  };
2553
2343
  authSource: "HOSTED" | "LOCAL";
2554
2344
  }>;
2555
2345
  key: z.ZodString;
2556
2346
  params: z.ZodAny;
2557
2347
  events: z.ZodArray<z.ZodString, "many">;
2348
+ registerSourceJob: z.ZodOptional<z.ZodObject<{
2349
+ id: z.ZodString;
2350
+ version: z.ZodString;
2351
+ }, "strip", z.ZodTypeAny, {
2352
+ id: string;
2353
+ version: string;
2354
+ }, {
2355
+ id: string;
2356
+ version: string;
2357
+ }>>;
2558
2358
  }, "strip", z.ZodTypeAny, {
2559
- params?: any;
2560
2359
  key: string;
2561
2360
  channel: "HTTP" | "SMTP" | "SQS";
2562
2361
  events: string[];
2563
2362
  integration: {
2564
2363
  id: string;
2565
2364
  metadata: {
2566
- instructions?: string | undefined;
2567
2365
  id: string;
2568
2366
  name: string;
2367
+ instructions?: string | undefined;
2569
2368
  };
2570
2369
  authSource: "HOSTED" | "LOCAL";
2571
2370
  };
2572
- }, {
2573
2371
  params?: any;
2372
+ registerSourceJob?: {
2373
+ id: string;
2374
+ version: string;
2375
+ } | undefined;
2376
+ }, {
2574
2377
  key: string;
2575
2378
  channel: "HTTP" | "SMTP" | "SQS";
2576
2379
  events: string[];
2577
2380
  integration: {
2578
2381
  id: string;
2579
2382
  metadata: {
2580
- instructions?: string | undefined;
2581
2383
  id: string;
2582
2384
  name: string;
2385
+ instructions?: string | undefined;
2583
2386
  };
2584
2387
  authSource: "HOSTED" | "LOCAL";
2585
2388
  };
2389
+ params?: any;
2390
+ registerSourceJob?: {
2391
+ id: string;
2392
+ version: string;
2393
+ } | undefined;
2586
2394
  }>;
2587
2395
  }, "strip", z.ZodTypeAny, {
2588
2396
  source: {
2589
- params?: any;
2590
2397
  key: string;
2591
2398
  channel: "HTTP" | "SMTP" | "SQS";
2592
2399
  events: string[];
2593
2400
  integration: {
2594
2401
  id: string;
2595
2402
  metadata: {
2596
- instructions?: string | undefined;
2597
2403
  id: string;
2598
2404
  name: string;
2405
+ instructions?: string | undefined;
2599
2406
  };
2600
2407
  authSource: "HOSTED" | "LOCAL";
2601
2408
  };
2409
+ params?: any;
2410
+ registerSourceJob?: {
2411
+ id: string;
2412
+ version: string;
2413
+ } | undefined;
2602
2414
  };
2603
2415
  rule: {
2604
- payload?: EventFilter | undefined;
2605
- context?: EventFilter | undefined;
2606
2416
  event: string;
2607
2417
  source: string;
2418
+ payload?: EventFilter | undefined;
2419
+ context?: EventFilter | undefined;
2608
2420
  };
2609
2421
  }, {
2610
2422
  source: {
2611
- params?: any;
2612
2423
  key: string;
2613
2424
  channel: "HTTP" | "SMTP" | "SQS";
2614
2425
  events: string[];
2615
2426
  integration: {
2616
2427
  id: string;
2617
2428
  metadata: {
2618
- instructions?: string | undefined;
2619
2429
  id: string;
2620
2430
  name: string;
2431
+ instructions?: string | undefined;
2621
2432
  };
2622
2433
  authSource: "HOSTED" | "LOCAL";
2623
2434
  };
2435
+ params?: any;
2436
+ registerSourceJob?: {
2437
+ id: string;
2438
+ version: string;
2439
+ } | undefined;
2624
2440
  };
2625
2441
  rule: {
2626
- payload?: EventFilter | undefined;
2627
- context?: EventFilter | undefined;
2628
2442
  event: string;
2629
2443
  source: string;
2444
+ payload?: EventFilter | undefined;
2445
+ context?: EventFilter | undefined;
2630
2446
  };
2631
2447
  }>;
2632
2448
  type RegisterTriggerBody = z.infer<typeof RegisterTriggerBodySchema>;
@@ -2648,13 +2464,13 @@ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
2648
2464
  text: z.ZodString;
2649
2465
  url: z.ZodOptional<z.ZodString>;
2650
2466
  }, "strip", z.ZodTypeAny, {
2651
- url?: string | undefined;
2652
2467
  label: string;
2653
2468
  text: string;
2654
- }, {
2655
2469
  url?: string | undefined;
2470
+ }, {
2656
2471
  label: string;
2657
2472
  text: string;
2473
+ url?: string | undefined;
2658
2474
  }>, "many">>;
2659
2475
  rule: z.ZodObject<{
2660
2476
  event: z.ZodString;
@@ -2662,44 +2478,44 @@ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
2662
2478
  payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
2663
2479
  context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
2664
2480
  }, "strip", z.ZodTypeAny, {
2665
- payload?: EventFilter | undefined;
2666
- context?: EventFilter | undefined;
2667
2481
  event: string;
2668
2482
  source: string;
2669
- }, {
2670
2483
  payload?: EventFilter | undefined;
2671
2484
  context?: EventFilter | undefined;
2485
+ }, {
2672
2486
  event: string;
2673
2487
  source: string;
2488
+ payload?: EventFilter | undefined;
2489
+ context?: EventFilter | undefined;
2674
2490
  }>;
2675
2491
  }, "strip", z.ZodTypeAny, {
2676
- properties?: {
2677
- url?: string | undefined;
2678
- label: string;
2679
- text: string;
2680
- }[] | undefined;
2681
2492
  type: "static";
2682
2493
  title: string;
2683
2494
  rule: {
2684
- payload?: EventFilter | undefined;
2685
- context?: EventFilter | undefined;
2686
2495
  event: string;
2687
2496
  source: string;
2497
+ payload?: EventFilter | undefined;
2498
+ context?: EventFilter | undefined;
2688
2499
  };
2689
- }, {
2690
2500
  properties?: {
2691
- url?: string | undefined;
2692
2501
  label: string;
2693
2502
  text: string;
2503
+ url?: string | undefined;
2694
2504
  }[] | undefined;
2505
+ }, {
2695
2506
  type: "static";
2696
2507
  title: string;
2697
2508
  rule: {
2698
- payload?: EventFilter | undefined;
2699
- context?: EventFilter | undefined;
2700
2509
  event: string;
2701
2510
  source: string;
2511
+ payload?: EventFilter | undefined;
2512
+ context?: EventFilter | undefined;
2702
2513
  };
2514
+ properties?: {
2515
+ label: string;
2516
+ text: string;
2517
+ url?: string | undefined;
2518
+ }[] | undefined;
2703
2519
  }>, z.ZodObject<{
2704
2520
  type: z.ZodLiteral<"scheduled">;
2705
2521
  schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -2713,17 +2529,17 @@ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
2713
2529
  }>;
2714
2530
  metadata: z.ZodAny;
2715
2531
  }, "strip", z.ZodTypeAny, {
2716
- metadata?: any;
2717
2532
  options: {
2718
2533
  seconds: number;
2719
2534
  };
2720
2535
  type: "interval";
2721
- }, {
2722
2536
  metadata?: any;
2537
+ }, {
2723
2538
  options: {
2724
2539
  seconds: number;
2725
2540
  };
2726
2541
  type: "interval";
2542
+ metadata?: any;
2727
2543
  }>, z.ZodObject<{
2728
2544
  type: z.ZodLiteral<"cron">;
2729
2545
  options: z.ZodObject<{
@@ -2735,47 +2551,47 @@ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
2735
2551
  }>;
2736
2552
  metadata: z.ZodAny;
2737
2553
  }, "strip", z.ZodTypeAny, {
2738
- metadata?: any;
2739
2554
  options: {
2740
2555
  cron: string;
2741
2556
  };
2742
2557
  type: "cron";
2743
- }, {
2744
2558
  metadata?: any;
2559
+ }, {
2745
2560
  options: {
2746
2561
  cron: string;
2747
2562
  };
2748
2563
  type: "cron";
2564
+ metadata?: any;
2749
2565
  }>]>;
2750
2566
  }, "strip", z.ZodTypeAny, {
2751
2567
  type: "scheduled";
2752
2568
  schedule: {
2753
- metadata?: any;
2754
2569
  options: {
2755
2570
  cron: string;
2756
2571
  };
2757
2572
  type: "cron";
2758
- } | {
2759
2573
  metadata?: any;
2574
+ } | {
2760
2575
  options: {
2761
2576
  seconds: number;
2762
2577
  };
2763
2578
  type: "interval";
2579
+ metadata?: any;
2764
2580
  };
2765
2581
  }, {
2766
2582
  type: "scheduled";
2767
2583
  schedule: {
2768
- metadata?: any;
2769
2584
  options: {
2770
2585
  cron: string;
2771
2586
  };
2772
2587
  type: "cron";
2773
- } | {
2774
2588
  metadata?: any;
2589
+ } | {
2775
2590
  options: {
2776
2591
  seconds: number;
2777
2592
  };
2778
2593
  type: "interval";
2594
+ metadata?: any;
2779
2595
  };
2780
2596
  }>]>;
2781
2597
  type TriggerMetadata = z.infer<typeof TriggerMetadataSchema>;
@@ -2785,13 +2601,13 @@ declare const ErrorWithStackSchema: z.ZodObject<{
2785
2601
  name: z.ZodOptional<z.ZodString>;
2786
2602
  stack: z.ZodOptional<z.ZodString>;
2787
2603
  }, "strip", z.ZodTypeAny, {
2604
+ message: string;
2788
2605
  name?: string | undefined;
2789
2606
  stack?: string | undefined;
2790
- message: string;
2791
2607
  }, {
2608
+ message: string;
2792
2609
  name?: string | undefined;
2793
2610
  stack?: string | undefined;
2794
- message: string;
2795
2611
  }>;
2796
2612
  type ErrorWithStack = z.infer<typeof ErrorWithStackSchema>;
2797
2613
 
@@ -2804,13 +2620,13 @@ declare const DisplayPropertySchema: z.ZodObject<{
2804
2620
  /** The URL to link to when the property is clicked */
2805
2621
  url: z.ZodOptional<z.ZodString>;
2806
2622
  }, "strip", z.ZodTypeAny, {
2807
- url?: string | undefined;
2808
2623
  label: string;
2809
2624
  text: string;
2810
- }, {
2811
2625
  url?: string | undefined;
2626
+ }, {
2812
2627
  label: string;
2813
2628
  text: string;
2629
+ url?: string | undefined;
2814
2630
  }>;
2815
2631
  type DisplayProperty = z.infer<typeof DisplayPropertySchema>;
2816
2632
 
@@ -2820,15 +2636,15 @@ declare const ConnectionAuthSchema: z.ZodObject<{
2820
2636
  scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2821
2637
  additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2822
2638
  }, "strip", z.ZodTypeAny, {
2823
- scopes?: string[] | undefined;
2824
- additionalFields?: Record<string, string> | undefined;
2825
2639
  type: "oauth2";
2826
2640
  accessToken: string;
2827
- }, {
2828
2641
  scopes?: string[] | undefined;
2829
2642
  additionalFields?: Record<string, string> | undefined;
2643
+ }, {
2830
2644
  type: "oauth2";
2831
2645
  accessToken: string;
2646
+ scopes?: string[] | undefined;
2647
+ additionalFields?: Record<string, string> | undefined;
2832
2648
  }>;
2833
2649
  type ConnectionAuth = z.infer<typeof ConnectionAuthSchema>;
2834
2650
  declare const IntegrationMetadataSchema: z.ZodObject<{
@@ -2836,13 +2652,13 @@ declare const IntegrationMetadataSchema: z.ZodObject<{
2836
2652
  name: z.ZodString;
2837
2653
  instructions: z.ZodOptional<z.ZodString>;
2838
2654
  }, "strip", z.ZodTypeAny, {
2839
- instructions?: string | undefined;
2840
2655
  id: string;
2841
2656
  name: string;
2842
- }, {
2843
2657
  instructions?: string | undefined;
2658
+ }, {
2844
2659
  id: string;
2845
2660
  name: string;
2661
+ instructions?: string | undefined;
2846
2662
  }>;
2847
2663
  type IntegrationMetadata = z.infer<typeof IntegrationMetadataSchema>;
2848
2664
  declare const IntegrationConfigSchema: z.ZodObject<{
@@ -2852,29 +2668,29 @@ declare const IntegrationConfigSchema: z.ZodObject<{
2852
2668
  name: z.ZodString;
2853
2669
  instructions: z.ZodOptional<z.ZodString>;
2854
2670
  }, "strip", z.ZodTypeAny, {
2855
- instructions?: string | undefined;
2856
2671
  id: string;
2857
2672
  name: string;
2858
- }, {
2859
2673
  instructions?: string | undefined;
2674
+ }, {
2860
2675
  id: string;
2861
2676
  name: string;
2677
+ instructions?: string | undefined;
2862
2678
  }>;
2863
2679
  authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
2864
2680
  }, "strip", z.ZodTypeAny, {
2865
2681
  id: string;
2866
2682
  metadata: {
2867
- instructions?: string | undefined;
2868
2683
  id: string;
2869
2684
  name: string;
2685
+ instructions?: string | undefined;
2870
2686
  };
2871
2687
  authSource: "HOSTED" | "LOCAL";
2872
2688
  }, {
2873
2689
  id: string;
2874
2690
  metadata: {
2875
- instructions?: string | undefined;
2876
2691
  id: string;
2877
2692
  name: string;
2693
+ instructions?: string | undefined;
2878
2694
  };
2879
2695
  authSource: "HOSTED" | "LOCAL";
2880
2696
  }>;
@@ -2884,11 +2700,11 @@ declare const ScheduledPayloadSchema: z.ZodObject<{
2884
2700
  ts: z.ZodDate;
2885
2701
  lastTimestamp: z.ZodOptional<z.ZodDate>;
2886
2702
  }, "strip", z.ZodTypeAny, {
2887
- lastTimestamp?: Date | undefined;
2888
2703
  ts: Date;
2889
- }, {
2890
2704
  lastTimestamp?: Date | undefined;
2705
+ }, {
2891
2706
  ts: Date;
2707
+ lastTimestamp?: Date | undefined;
2892
2708
  }>;
2893
2709
  type ScheduledPayload = z.infer<typeof ScheduledPayloadSchema>;
2894
2710
  declare const IntervalOptionsSchema: z.ZodObject<{
@@ -2911,6 +2727,7 @@ declare const CronOptionsSchema: z.ZodObject<{
2911
2727
  }, {
2912
2728
  cron: string;
2913
2729
  }>;
2730
+ /** The options for a `cronTrigger()` */
2914
2731
  type CronOptions = z.infer<typeof CronOptionsSchema>;
2915
2732
  declare const ScheduleMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2916
2733
  /** An interval reoccurs at the specified number of seconds */
@@ -2927,17 +2744,17 @@ declare const ScheduleMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2927
2744
  /** Any additional metadata about the schedule. */
2928
2745
  metadata: z.ZodAny;
2929
2746
  }, "strip", z.ZodTypeAny, {
2930
- metadata?: any;
2931
2747
  options: {
2932
2748
  seconds: number;
2933
2749
  };
2934
2750
  type: "interval";
2935
- }, {
2936
2751
  metadata?: any;
2752
+ }, {
2937
2753
  options: {
2938
2754
  seconds: number;
2939
2755
  };
2940
2756
  type: "interval";
2757
+ metadata?: any;
2941
2758
  }>, z.ZodObject<{
2942
2759
  type: z.ZodLiteral<"cron">;
2943
2760
  options: z.ZodObject<{
@@ -2952,21 +2769,21 @@ declare const ScheduleMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2952
2769
  }>;
2953
2770
  metadata: z.ZodAny;
2954
2771
  }, "strip", z.ZodTypeAny, {
2955
- metadata?: any;
2956
2772
  options: {
2957
2773
  cron: string;
2958
2774
  };
2959
2775
  type: "cron";
2960
- }, {
2961
2776
  metadata?: any;
2777
+ }, {
2962
2778
  options: {
2963
2779
  cron: string;
2964
2780
  };
2965
2781
  type: "cron";
2782
+ metadata?: any;
2966
2783
  }>]>;
2967
2784
  type ScheduleMetadata = z.infer<typeof ScheduleMetadataSchema>;
2968
2785
 
2969
- declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.extendShape<{
2786
+ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2970
2787
  id: z.ZodString;
2971
2788
  client: z.ZodObject<{
2972
2789
  id: z.ZodString;
@@ -2988,9 +2805,8 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
2988
2805
  updatedAt: Date;
2989
2806
  }>;
2990
2807
  authorizationUrl: z.ZodString;
2991
- }, {
2992
2808
  type: z.ZodLiteral<"DEVELOPER">;
2993
- }>, "strip", z.ZodTypeAny, {
2809
+ }, "strip", z.ZodTypeAny, {
2994
2810
  id: string;
2995
2811
  type: "DEVELOPER";
2996
2812
  client: {
@@ -3012,7 +2828,7 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
3012
2828
  updatedAt: Date;
3013
2829
  };
3014
2830
  authorizationUrl: string;
3015
- }>, z.ZodObject<z.extendShape<{
2831
+ }>, z.ZodObject<{
3016
2832
  id: z.ZodString;
3017
2833
  client: z.ZodObject<{
3018
2834
  id: z.ZodString;
@@ -3034,24 +2850,23 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
3034
2850
  updatedAt: Date;
3035
2851
  }>;
3036
2852
  authorizationUrl: z.ZodString;
3037
- }, {
3038
2853
  type: z.ZodLiteral<"EXTERNAL">;
3039
2854
  account: z.ZodObject<{
3040
2855
  id: z.ZodString;
3041
2856
  metadata: z.ZodAny;
3042
2857
  }, "strip", z.ZodTypeAny, {
3043
- metadata?: any;
3044
2858
  id: string;
3045
- }, {
3046
2859
  metadata?: any;
2860
+ }, {
3047
2861
  id: string;
2862
+ metadata?: any;
3048
2863
  }>;
3049
- }>, "strip", z.ZodTypeAny, {
2864
+ }, "strip", z.ZodTypeAny, {
3050
2865
  id: string;
3051
2866
  type: "EXTERNAL";
3052
2867
  account: {
3053
- metadata?: any;
3054
2868
  id: string;
2869
+ metadata?: any;
3055
2870
  };
3056
2871
  client: {
3057
2872
  id: string;
@@ -3065,8 +2880,8 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
3065
2880
  id: string;
3066
2881
  type: "EXTERNAL";
3067
2882
  account: {
3068
- metadata?: any;
3069
2883
  id: string;
2884
+ metadata?: any;
3070
2885
  };
3071
2886
  client: {
3072
2887
  id: string;
@@ -3078,7 +2893,7 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
3078
2893
  authorizationUrl: string;
3079
2894
  }>]>;
3080
2895
  type MissingConnectionNotificationPayload = z.infer<typeof MissingConnectionNotificationPayloadSchema>;
3081
- declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.extendShape<{
2896
+ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3082
2897
  id: z.ZodString;
3083
2898
  client: z.ZodObject<{
3084
2899
  id: z.ZodString;
@@ -3106,9 +2921,8 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
3106
2921
  integrationAuthMethod: string;
3107
2922
  }>;
3108
2923
  expiresAt: z.ZodDate;
3109
- }, {
3110
2924
  type: z.ZodLiteral<"DEVELOPER">;
3111
- }>, "strip", z.ZodTypeAny, {
2925
+ }, "strip", z.ZodTypeAny, {
3112
2926
  id: string;
3113
2927
  type: "DEVELOPER";
3114
2928
  client: {
@@ -3134,7 +2948,7 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
3134
2948
  integrationAuthMethod: string;
3135
2949
  };
3136
2950
  expiresAt: Date;
3137
- }>, z.ZodObject<z.extendShape<{
2951
+ }>, z.ZodObject<{
3138
2952
  id: z.ZodString;
3139
2953
  client: z.ZodObject<{
3140
2954
  id: z.ZodString;
@@ -3162,24 +2976,23 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
3162
2976
  integrationAuthMethod: string;
3163
2977
  }>;
3164
2978
  expiresAt: z.ZodDate;
3165
- }, {
3166
2979
  type: z.ZodLiteral<"EXTERNAL">;
3167
2980
  account: z.ZodObject<{
3168
2981
  id: z.ZodString;
3169
2982
  metadata: z.ZodAny;
3170
2983
  }, "strip", z.ZodTypeAny, {
3171
- metadata?: any;
3172
2984
  id: string;
3173
- }, {
3174
2985
  metadata?: any;
2986
+ }, {
3175
2987
  id: string;
2988
+ metadata?: any;
3176
2989
  }>;
3177
- }>, "strip", z.ZodTypeAny, {
2990
+ }, "strip", z.ZodTypeAny, {
3178
2991
  id: string;
3179
2992
  type: "EXTERNAL";
3180
2993
  account: {
3181
- metadata?: any;
3182
2994
  id: string;
2995
+ metadata?: any;
3183
2996
  };
3184
2997
  client: {
3185
2998
  id: string;
@@ -3195,8 +3008,8 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
3195
3008
  id: string;
3196
3009
  type: "EXTERNAL";
3197
3010
  account: {
3198
- metadata?: any;
3199
3011
  id: string;
3012
+ metadata?: any;
3200
3013
  };
3201
3014
  client: {
3202
3015
  id: string;
@@ -3269,29 +3082,27 @@ declare const FetchRetryOptionsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminat
3269
3082
  limitHeader: string;
3270
3083
  remainingHeader: string;
3271
3084
  resetHeader: string;
3272
- }>, z.ZodObject<z.extendShape<{
3085
+ }>, z.ZodObject<{
3273
3086
  limit: z.ZodOptional<z.ZodNumber>;
3274
3087
  factor: z.ZodOptional<z.ZodNumber>;
3275
3088
  minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
3276
3089
  maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
3277
3090
  randomize: z.ZodOptional<z.ZodBoolean>;
3278
- }, {
3279
- /** The `backoff` strategy retries the request with an exponential backoff. */
3280
3091
  strategy: z.ZodLiteral<"backoff">;
3281
- }>, "strip", z.ZodTypeAny, {
3092
+ }, "strip", z.ZodTypeAny, {
3093
+ strategy: "backoff";
3282
3094
  limit?: number | undefined;
3283
3095
  factor?: number | undefined;
3284
3096
  minTimeoutInMs?: number | undefined;
3285
3097
  maxTimeoutInMs?: number | undefined;
3286
3098
  randomize?: boolean | undefined;
3287
- strategy: "backoff";
3288
3099
  }, {
3100
+ strategy: "backoff";
3289
3101
  limit?: number | undefined;
3290
3102
  factor?: number | undefined;
3291
3103
  minTimeoutInMs?: number | undefined;
3292
3104
  maxTimeoutInMs?: number | undefined;
3293
3105
  randomize?: boolean | undefined;
3294
- strategy: "backoff";
3295
3106
  }>]>>;
3296
3107
  /** An object where the key is a status code pattern and the value is a retrying strategy. Supported patterns are:
3297
3108
  - Specific status codes: 429
@@ -3331,6 +3142,12 @@ declare class ApiClient {
3331
3142
  ok: false;
3332
3143
  }>;
3333
3144
  runTask(runId: string, task: RunTaskBodyInput): Promise<{
3145
+ id: string;
3146
+ name: string;
3147
+ noop: boolean;
3148
+ status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
3149
+ idempotencyKey: string;
3150
+ attempts: number;
3334
3151
  icon?: string | null | undefined;
3335
3152
  startedAt?: Date | null | undefined;
3336
3153
  completedAt?: Date | null | undefined;
@@ -3338,26 +3155,26 @@ declare class ApiClient {
3338
3155
  description?: string | null | undefined;
3339
3156
  params?: DeserializedJson | undefined;
3340
3157
  properties?: {
3341
- url?: string | undefined;
3342
3158
  label: string;
3343
3159
  text: string;
3160
+ url?: string | undefined;
3344
3161
  }[] | null | undefined;
3345
3162
  output?: DeserializedJson | undefined;
3346
3163
  error?: string | null | undefined;
3347
3164
  parentId?: string | null | undefined;
3348
3165
  style?: {
3349
- variant?: string | undefined;
3350
3166
  style: "normal" | "minimal";
3167
+ variant?: string | undefined;
3351
3168
  } | null | undefined;
3352
3169
  operation?: string | null | undefined;
3170
+ }>;
3171
+ completeTask(runId: string, id: string, task: CompleteTaskBodyInput): Promise<{
3353
3172
  id: string;
3354
3173
  name: string;
3355
3174
  noop: boolean;
3356
3175
  status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
3357
3176
  idempotencyKey: string;
3358
3177
  attempts: number;
3359
- }>;
3360
- completeTask(runId: string, id: string, task: CompleteTaskBodyInput): Promise<{
3361
3178
  icon?: string | null | undefined;
3362
3179
  startedAt?: Date | null | undefined;
3363
3180
  completedAt?: Date | null | undefined;
@@ -3365,26 +3182,26 @@ declare class ApiClient {
3365
3182
  description?: string | null | undefined;
3366
3183
  params?: DeserializedJson | undefined;
3367
3184
  properties?: {
3368
- url?: string | undefined;
3369
3185
  label: string;
3370
3186
  text: string;
3187
+ url?: string | undefined;
3371
3188
  }[] | null | undefined;
3372
3189
  output?: DeserializedJson | undefined;
3373
3190
  error?: string | null | undefined;
3374
3191
  parentId?: string | null | undefined;
3375
3192
  style?: {
3376
- variant?: string | undefined;
3377
3193
  style: "normal" | "minimal";
3194
+ variant?: string | undefined;
3378
3195
  } | null | undefined;
3379
3196
  operation?: string | null | undefined;
3197
+ }>;
3198
+ failTask(runId: string, id: string, body: FailTaskBodyInput): Promise<{
3380
3199
  id: string;
3381
3200
  name: string;
3382
3201
  noop: boolean;
3383
3202
  status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
3384
3203
  idempotencyKey: string;
3385
3204
  attempts: number;
3386
- }>;
3387
- failTask(runId: string, id: string, body: FailTaskBodyInput): Promise<{
3388
3205
  icon?: string | null | undefined;
3389
3206
  startedAt?: Date | null | undefined;
3390
3207
  completedAt?: Date | null | undefined;
@@ -3392,62 +3209,60 @@ declare class ApiClient {
3392
3209
  description?: string | null | undefined;
3393
3210
  params?: DeserializedJson | undefined;
3394
3211
  properties?: {
3395
- url?: string | undefined;
3396
3212
  label: string;
3397
3213
  text: string;
3214
+ url?: string | undefined;
3398
3215
  }[] | null | undefined;
3399
3216
  output?: DeserializedJson | undefined;
3400
3217
  error?: string | null | undefined;
3401
3218
  parentId?: string | null | undefined;
3402
3219
  style?: {
3403
- variant?: string | undefined;
3404
3220
  style: "normal" | "minimal";
3221
+ variant?: string | undefined;
3405
3222
  } | null | undefined;
3406
3223
  operation?: string | null | undefined;
3407
- id: string;
3408
- name: string;
3409
- noop: boolean;
3410
- status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
3411
- idempotencyKey: string;
3412
- attempts: number;
3413
3224
  }>;
3414
3225
  sendEvent(event: SendEvent, options?: SendEventOptions): Promise<{
3415
- context?: DeserializedJson | undefined;
3416
- deliverAt?: Date | null | undefined;
3417
- deliveredAt?: Date | null | undefined;
3418
3226
  id: string;
3419
3227
  name: string;
3420
- payload: DeserializedJson;
3228
+ payload: ((string | number | boolean | {
3229
+ [key: string]: DeserializedJson;
3230
+ } | DeserializedJson[]) & (string | number | boolean | {
3231
+ [key: string]: DeserializedJson;
3232
+ } | DeserializedJson[] | undefined)) | null;
3421
3233
  timestamp: Date;
3234
+ context?: DeserializedJson | undefined;
3235
+ deliverAt?: Date | null | undefined;
3236
+ deliveredAt?: Date | null | undefined;
3422
3237
  }>;
3423
3238
  updateSource(client: string, key: string, source: UpdateTriggerSourceBody): Promise<TriggerSource>;
3424
3239
  registerTrigger(client: string, id: string, key: string, payload: RegisterTriggerBody): Promise<RegisterSourceEvent>;
3425
3240
  registerSchedule(client: string, id: string, key: string, payload: ScheduleMetadata): Promise<{
3426
- metadata?: any;
3427
3241
  id: string;
3428
3242
  schedule: {
3429
- metadata?: any;
3430
3243
  options: {
3431
3244
  cron: string;
3432
3245
  };
3433
3246
  type: "cron";
3434
- } | {
3435
3247
  metadata?: any;
3248
+ } | {
3436
3249
  options: {
3437
3250
  seconds: number;
3438
3251
  };
3439
3252
  type: "interval";
3253
+ metadata?: any;
3440
3254
  };
3441
3255
  active: boolean;
3256
+ metadata?: any;
3442
3257
  }>;
3443
3258
  unregisterSchedule(client: string, id: string, key: string): Promise<{
3444
3259
  ok: boolean;
3445
3260
  }>;
3446
3261
  getAuth(client: string, id: string): Promise<{
3447
- scopes?: string[] | undefined;
3448
- additionalFields?: Record<string, string> | undefined;
3449
3262
  type: "oauth2";
3450
3263
  accessToken: string;
3264
+ scopes?: string[] | undefined;
3265
+ additionalFields?: Record<string, string> | undefined;
3451
3266
  } | undefined>;
3452
3267
  }
3453
3268
 
@@ -3624,7 +3439,7 @@ type ExternalSourceOptions<TChannel extends ChannelNames, TIntegration extends T
3624
3439
  schema: z.Schema<TParams>;
3625
3440
  integration: TIntegration;
3626
3441
  register: RegisterFunction<TIntegration, TParams, TChannel>;
3627
- filter: FilterFunction<TParams>;
3442
+ filter?: FilterFunction<TParams>;
3628
3443
  handler: HandlerFunction<TChannel, TParams>;
3629
3444
  key: KeyFunction<TParams>;
3630
3445
  properties?: (params: TParams) => DisplayProperty[];
@@ -3635,34 +3450,34 @@ declare class ExternalSource<TIntegration extends TriggerIntegration<Integration
3635
3450
  constructor(channel: TChannel, options: ExternalSourceOptions<TChannel, TIntegration, TParams>);
3636
3451
  handle(source: HandleTriggerSource, rawEvent: ExternalSourceChannelMap[TChannel]["event"], logger: Logger): Promise<void | {
3637
3452
  events: {
3638
- id?: string | undefined;
3639
- source?: string | undefined;
3453
+ name: string;
3640
3454
  payload?: any;
3641
3455
  context?: any;
3456
+ id?: string | undefined;
3642
3457
  timestamp?: Date | undefined;
3643
- name: string;
3458
+ source?: string | undefined;
3644
3459
  }[];
3645
3460
  response?: {
3646
- headers?: Record<string, string> | undefined;
3647
- body?: any;
3648
3461
  status: number;
3462
+ body?: any;
3463
+ headers?: Record<string, string> | undefined;
3649
3464
  } | undefined;
3650
3465
  }>;
3651
3466
  filter(params: TParams): EventFilter;
3652
3467
  properties(params: TParams): DisplayProperty[];
3653
3468
  register(params: TParams, registerEvent: RegisterSourceEvent, io: IO, ctx: TriggerContext): Promise<{
3654
- data?: SerializableJson;
3655
- secret?: string | undefined;
3656
3469
  registeredEvents: string[];
3470
+ secret?: string | undefined;
3471
+ data?: SerializableJson;
3657
3472
  } | undefined>;
3658
3473
  key(params: TParams): string;
3659
3474
  get integration(): TIntegration;
3660
3475
  get integrationConfig(): {
3661
3476
  id: string;
3662
3477
  metadata: {
3663
- instructions?: string | undefined;
3664
3478
  id: string;
3665
3479
  name: string;
3480
+ instructions?: string | undefined;
3666
3481
  };
3667
3482
  };
3668
3483
  get id(): string;
@@ -3687,19 +3502,43 @@ declare function omit<T extends Record<string, unknown>, K extends keyof T>(obj:
3687
3502
  ommited: T[K];
3688
3503
  };
3689
3504
 
3505
+ /** Options for a DynamicTrigger */
3690
3506
  type DynamicTriggerOptions<TEventSpec extends EventSpecification<any>, TExternalSource extends ExternalSource<any, any, any>> = {
3507
+ /** Used to uniquely identify a DynamicTrigger */
3691
3508
  id: string;
3509
+ /** An event from an [Integration](https://trigger.dev/docs/integrations) package that you want to attach to the DynamicTrigger. The event types will come through to the payload in your Job's run. */
3692
3510
  event: TEventSpec;
3511
+ /** An external source fron an [Integration](https://trigger.dev/docs/integrations) package
3512
+ * @example
3513
+ * ```ts
3514
+ * import { events } from "@trigger.dev/github";
3515
+ *
3516
+ * const dynamicOnIssueOpened = new DynamicTrigger(client, {
3517
+ id: "github-issue-opened",
3518
+ event: events.onIssueOpened,
3519
+ source: github.sources.repo,
3520
+ });
3521
+ * ```
3522
+ */
3693
3523
  source: TExternalSource;
3694
3524
  };
3525
+ /** `DynamicTrigger` allows you to define a trigger that can be configured dynamically at runtime. */
3695
3526
  declare class DynamicTrigger<TEventSpec extends EventSpecification<any>, TExternalSource extends ExternalSource<any, any, any>> implements Trigger<TEventSpec> {
3696
3527
  #private;
3697
3528
  source: TExternalSource;
3529
+ /** `DynamicTrigger` allows you to define a trigger that can be configured dynamically at runtime.
3530
+ * @param client The `TriggerClient` instance to use for registering the trigger.
3531
+ * @param options The options for the dynamic trigger.
3532
+ * */
3698
3533
  constructor(client: TriggerClient, options: DynamicTriggerOptions<TEventSpec, TExternalSource>);
3699
3534
  toJSON(): TriggerMetadata;
3700
3535
  get id(): string;
3701
3536
  get event(): TEventSpec;
3702
3537
  registeredTriggerForParams(params: ExternalSourceParams<TExternalSource>): RegisterTriggerBody;
3538
+ /** Use this method to register a new configuration with the DynamicTrigger.
3539
+ * @param key The key for the configuration. This will be used to identify the configuration when it is triggered.
3540
+ * @param params The params for the configuration.
3541
+ */
3703
3542
  register(key: string, params: ExternalSourceParams<TExternalSource>): Promise<RegisterSourceEvent>;
3704
3543
  attachToJob(triggerClient: TriggerClient, job: Job<Trigger<TEventSpec>, any>): void;
3705
3544
  get preprocessRuns(): boolean;
@@ -3741,12 +3580,8 @@ declare class TriggerClient {
3741
3580
  }): void;
3742
3581
  attachDynamicSchedule(key: string, job: Job<Trigger<any>, any>): void;
3743
3582
  registerTrigger(id: string, key: string, options: RegisterTriggerBody): Promise<{
3744
- dynamicTriggerId?: string | undefined;
3745
3583
  id: string;
3746
3584
  source: {
3747
- params?: any;
3748
- data?: DeserializedJson | undefined;
3749
- clientId?: string | undefined;
3750
3585
  key: string;
3751
3586
  secret: string;
3752
3587
  active: boolean;
@@ -3758,16 +3593,20 @@ declare class TriggerClient {
3758
3593
  } | {
3759
3594
  type: "SQS";
3760
3595
  };
3596
+ params?: any;
3597
+ data?: DeserializedJson | undefined;
3598
+ clientId?: string | undefined;
3761
3599
  };
3762
3600
  events: string[];
3763
3601
  missingEvents: string[];
3764
3602
  orphanedEvents: string[];
3603
+ dynamicTriggerId?: string | undefined;
3765
3604
  }>;
3766
3605
  getAuth(id: string): Promise<{
3767
- scopes?: string[] | undefined;
3768
- additionalFields?: Record<string, string> | undefined;
3769
3606
  type: "oauth2";
3770
3607
  accessToken: string;
3608
+ scopes?: string[] | undefined;
3609
+ additionalFields?: Record<string, string> | undefined;
3771
3610
  } | undefined>;
3772
3611
  /** You can call this function from anywhere in your code to send an event. The other way to send an event is by using [`io.sendEvent()`](https://trigger.dev/docs/sdk/io/sendevent) from inside a `run()` function.
3773
3612
  * @param event The event to send.
@@ -3775,31 +3614,35 @@ declare class TriggerClient {
3775
3614
  * @returns A promise that resolves to the event details
3776
3615
  */
3777
3616
  sendEvent(event: SendEvent, options?: SendEventOptions): Promise<{
3778
- context?: DeserializedJson | undefined;
3779
- deliverAt?: Date | null | undefined;
3780
- deliveredAt?: Date | null | undefined;
3781
3617
  id: string;
3782
3618
  name: string;
3783
- payload: DeserializedJson;
3619
+ payload: ((string | number | boolean | {
3620
+ [key: string]: DeserializedJson;
3621
+ } | DeserializedJson[]) & (string | number | boolean | {
3622
+ [key: string]: DeserializedJson;
3623
+ } | DeserializedJson[] | undefined)) | null;
3784
3624
  timestamp: Date;
3625
+ context?: DeserializedJson | undefined;
3626
+ deliverAt?: Date | null | undefined;
3627
+ deliveredAt?: Date | null | undefined;
3785
3628
  }>;
3786
3629
  registerSchedule(id: string, key: string, schedule: ScheduleMetadata): Promise<{
3787
- metadata?: any;
3788
3630
  id: string;
3789
3631
  schedule: {
3790
- metadata?: any;
3791
3632
  options: {
3792
3633
  cron: string;
3793
3634
  };
3794
3635
  type: "cron";
3795
- } | {
3796
3636
  metadata?: any;
3637
+ } | {
3797
3638
  options: {
3798
3639
  seconds: number;
3799
3640
  };
3800
3641
  type: "interval";
3642
+ metadata?: any;
3801
3643
  };
3802
3644
  active: boolean;
3645
+ metadata?: any;
3803
3646
  }>;
3804
3647
  unregisterSchedule(id: string, key: string): Promise<{
3805
3648
  ok: boolean;
@@ -3827,8 +3670,8 @@ declare class IntervalTrigger implements Trigger<ScheduledEventSpecification> {
3827
3670
  };
3828
3671
  }[];
3829
3672
  parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
3830
- lastTimestamp?: Date | undefined;
3831
3673
  ts: Date;
3674
+ lastTimestamp?: Date | undefined;
3832
3675
  };
3833
3676
  properties: {
3834
3677
  label: string;
@@ -3839,6 +3682,9 @@ declare class IntervalTrigger implements Trigger<ScheduledEventSpecification> {
3839
3682
  get preprocessRuns(): boolean;
3840
3683
  toJSON(): TriggerMetadata;
3841
3684
  }
3685
+ /** `intervalTrigger()` is set as a [Job's trigger](/sdk/job) to trigger a Job at a recurring interval.
3686
+ * @param options An object containing options about the interval.
3687
+ */
3842
3688
  declare function intervalTrigger(options: IntervalOptions): IntervalTrigger;
3843
3689
  declare class CronTrigger implements Trigger<ScheduledEventSpecification> {
3844
3690
  private options;
@@ -3858,8 +3704,8 @@ declare class CronTrigger implements Trigger<ScheduledEventSpecification> {
3858
3704
  };
3859
3705
  }[];
3860
3706
  parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
3861
- lastTimestamp?: Date | undefined;
3862
3707
  ts: Date;
3708
+ lastTimestamp?: Date | undefined;
3863
3709
  };
3864
3710
  properties: {
3865
3711
  label: string;
@@ -3870,13 +3716,24 @@ declare class CronTrigger implements Trigger<ScheduledEventSpecification> {
3870
3716
  get preprocessRuns(): boolean;
3871
3717
  toJSON(): TriggerMetadata;
3872
3718
  }
3719
+ /** `cronTrigger()` is set as a [Job's trigger](https://trigger.dev/docs/sdk/job) to trigger a Job on a recurring schedule using a CRON expression.
3720
+ * @param options An object containing options about the CRON schedule.
3721
+ */
3873
3722
  declare function cronTrigger(options: CronOptions): CronTrigger;
3723
+ /** DynamicSchedule options
3724
+ * @param id Used to uniquely identify a DynamicSchedule
3725
+ */
3874
3726
  type DynamicIntervalOptions = {
3875
3727
  id: string;
3876
3728
  };
3729
+ /** DynamicSchedule` allows you to define a scheduled trigger that can be configured dynamically at runtime. */
3877
3730
  declare class DynamicSchedule implements Trigger<ScheduledEventSpecification> {
3878
3731
  private client;
3879
3732
  private options;
3733
+ /**
3734
+ * @param client The `TriggerClient` instance to use for registering the trigger.
3735
+ * @param options The options for the schedule.
3736
+ */
3880
3737
  constructor(client: TriggerClient, options: DynamicIntervalOptions);
3881
3738
  get id(): string;
3882
3739
  get event(): {
@@ -3894,27 +3751,27 @@ declare class DynamicSchedule implements Trigger<ScheduledEventSpecification> {
3894
3751
  };
3895
3752
  }[];
3896
3753
  parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
3897
- lastTimestamp?: Date | undefined;
3898
3754
  ts: Date;
3755
+ lastTimestamp?: Date | undefined;
3899
3756
  };
3900
3757
  };
3901
3758
  register(key: string, metadata: ScheduleMetadata): Promise<{
3902
- metadata?: any;
3903
3759
  id: string;
3904
3760
  schedule: {
3905
- metadata?: any;
3906
3761
  options: {
3907
3762
  cron: string;
3908
3763
  };
3909
3764
  type: "cron";
3910
- } | {
3911
3765
  metadata?: any;
3766
+ } | {
3912
3767
  options: {
3913
3768
  seconds: number;
3914
3769
  };
3915
3770
  type: "interval";
3771
+ metadata?: any;
3916
3772
  };
3917
3773
  active: boolean;
3774
+ metadata?: any;
3918
3775
  }>;
3919
3776
  unregister(key: string): Promise<{
3920
3777
  ok: boolean;
@@ -3973,13 +3830,17 @@ declare class IO {
3973
3830
  * @param options Options for sending the event.
3974
3831
  */
3975
3832
  sendEvent(key: string | any[], event: SendEvent, options?: SendEventOptions): Promise<{
3976
- context?: DeserializedJson | undefined;
3977
- deliverAt?: Date | null | undefined;
3978
- deliveredAt?: Date | null | undefined;
3979
3833
  id: string;
3980
3834
  name: string;
3981
- payload: DeserializedJson;
3835
+ payload: ((string | number | boolean | {
3836
+ [key: string]: DeserializedJson;
3837
+ } | DeserializedJson[]) & (string | number | boolean | {
3838
+ [key: string]: DeserializedJson;
3839
+ } | DeserializedJson[] | undefined)) | null;
3982
3840
  timestamp: Date;
3841
+ context?: DeserializedJson | undefined;
3842
+ deliverAt?: Date | null | undefined;
3843
+ deliveredAt?: Date | null | undefined;
3983
3844
  }>;
3984
3845
  updateSource(key: string | any[], options: {
3985
3846
  key: string;
@@ -3995,22 +3856,22 @@ declare class IO {
3995
3856
  * @returns A promise that has information about the interval.
3996
3857
  */
3997
3858
  registerInterval(key: string | any[], dynamicSchedule: DynamicSchedule, id: string, options: IntervalOptions): Promise<{
3998
- metadata?: any;
3999
3859
  id: string;
4000
3860
  schedule: {
4001
- metadata?: any;
4002
3861
  options: {
4003
3862
  cron: string;
4004
3863
  };
4005
3864
  type: "cron";
4006
- } | {
4007
3865
  metadata?: any;
3866
+ } | {
4008
3867
  options: {
4009
3868
  seconds: number;
4010
3869
  };
4011
3870
  type: "interval";
3871
+ metadata?: any;
4012
3872
  };
4013
3873
  active: boolean;
3874
+ metadata?: any;
4014
3875
  }>;
4015
3876
  /** `io.unregisterInterval()` allows you to unregister a [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) that was previously registered with `io.registerInterval()`.
4016
3877
  * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information.
@@ -4027,22 +3888,22 @@ declare class IO {
4027
3888
  * @param options The options for the CRON schedule.
4028
3889
  */
4029
3890
  registerCron(key: string | any[], dynamicSchedule: DynamicSchedule, id: string, options: CronOptions): Promise<{
4030
- metadata?: any;
4031
3891
  id: string;
4032
3892
  schedule: {
4033
- metadata?: any;
4034
3893
  options: {
4035
3894
  cron: string;
4036
3895
  };
4037
3896
  type: "cron";
4038
- } | {
4039
3897
  metadata?: any;
3898
+ } | {
4040
3899
  options: {
4041
3900
  seconds: number;
4042
3901
  };
4043
3902
  type: "interval";
3903
+ metadata?: any;
4044
3904
  };
4045
3905
  active: boolean;
3906
+ metadata?: any;
4046
3907
  }>;
4047
3908
  /** `io.unregisterCron()` allows you to unregister a [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) that was previously registered with `io.registerCron()`.
4048
3909
  * @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information.
@@ -4295,8 +4156,8 @@ declare class MissingConnectionNotification implements Trigger<MissingConnection
4295
4156
  id: string;
4296
4157
  type: "EXTERNAL";
4297
4158
  account: {
4298
- metadata?: any;
4299
4159
  id: string;
4160
+ metadata?: any;
4300
4161
  };
4301
4162
  client: {
4302
4163
  id: string;
@@ -4342,8 +4203,8 @@ declare class MissingConnectionResolvedNotification implements Trigger<MissingCo
4342
4203
  id: string;
4343
4204
  type: "EXTERNAL";
4344
4205
  account: {
4345
- metadata?: any;
4346
4206
  id: string;
4207
+ metadata?: any;
4347
4208
  };
4348
4209
  client: {
4349
4210
  id: string;