@trigger.dev/sdk 2.0.0-next.11 → 2.0.0-next.13

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