@trigger.dev/core 0.0.0-prerelease-20241128131418 → 0.0.0-prerelease-20241202120601

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.
@@ -10,12 +10,12 @@ export declare const MachineConfig: z.ZodObject<{
10
10
  memory: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>>;
11
11
  preset: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
12
12
  }, "strip", z.ZodTypeAny, {
13
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
14
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
13
+ cpu?: 2 | 1 | 0.25 | 0.5 | 4 | undefined;
14
+ memory?: 2 | 1 | 0.25 | 0.5 | 4 | 8 | undefined;
15
15
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
16
16
  }, {
17
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
18
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
17
+ cpu?: 2 | 1 | 0.25 | 0.5 | 4 | undefined;
18
+ memory?: 2 | 1 | 0.25 | 0.5 | 4 | 8 | undefined;
19
19
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
20
20
  }>;
21
21
  export type MachineConfig = z.infer<typeof MachineConfig>;
@@ -25,14 +25,14 @@ export declare const MachinePreset: z.ZodObject<{
25
25
  memory: z.ZodNumber;
26
26
  centsPerMs: z.ZodNumber;
27
27
  }, "strip", z.ZodTypeAny, {
28
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
29
28
  cpu: number;
30
29
  memory: number;
30
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
31
31
  centsPerMs: number;
32
32
  }, {
33
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
34
33
  cpu: number;
35
34
  memory: number;
35
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
36
36
  centsPerMs: number;
37
37
  }>;
38
38
  export type MachinePreset = z.infer<typeof MachinePreset>;
@@ -161,38 +161,38 @@ export declare const TaskRun: z.ZodObject<{
161
161
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
162
162
  maxDuration: z.ZodOptional<z.ZodNumber>;
163
163
  }, "strip", z.ZodTypeAny, {
164
- payload: string;
165
164
  id: string;
166
- startedAt: Date;
165
+ payload: string;
167
166
  payloadType: string;
167
+ tags: string[];
168
168
  isTest: boolean;
169
169
  createdAt: Date;
170
- tags: string[];
170
+ startedAt: Date;
171
171
  durationMs: number;
172
172
  costInCents: number;
173
173
  baseCostInCents: number;
174
174
  context?: any;
175
- metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
176
- version?: string | undefined;
177
175
  idempotencyKey?: string | undefined;
178
176
  maxAttempts?: number | undefined;
177
+ version?: string | undefined;
178
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
179
179
  maxDuration?: number | undefined;
180
180
  }, {
181
- payload: string;
182
181
  id: string;
182
+ payload: string;
183
183
  payloadType: string;
184
- createdAt: Date;
185
184
  tags: string[];
185
+ createdAt: Date;
186
186
  context?: any;
187
- metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
188
- version?: string | undefined;
187
+ isTest?: boolean | undefined;
189
188
  startedAt?: Date | undefined;
190
189
  idempotencyKey?: string | undefined;
191
- isTest?: boolean | undefined;
192
190
  maxAttempts?: number | undefined;
193
191
  durationMs?: number | undefined;
194
192
  costInCents?: number | undefined;
195
193
  baseCostInCents?: number | undefined;
194
+ version?: string | undefined;
195
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
196
196
  maxDuration?: number | undefined;
197
197
  }>;
198
198
  export type TaskRun = z.infer<typeof TaskRun>;
@@ -350,38 +350,38 @@ export declare const TaskRunExecution: z.ZodObject<{
350
350
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
351
351
  maxDuration: z.ZodOptional<z.ZodNumber>;
352
352
  }, "strip", z.ZodTypeAny, {
353
- payload: string;
354
353
  id: string;
355
- startedAt: Date;
354
+ payload: string;
356
355
  payloadType: string;
356
+ tags: string[];
357
357
  isTest: boolean;
358
358
  createdAt: Date;
359
- tags: string[];
359
+ startedAt: Date;
360
360
  durationMs: number;
361
361
  costInCents: number;
362
362
  baseCostInCents: number;
363
363
  context?: any;
364
- metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
365
- version?: string | undefined;
366
364
  idempotencyKey?: string | undefined;
367
365
  maxAttempts?: number | undefined;
366
+ version?: string | undefined;
367
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
368
368
  maxDuration?: number | undefined;
369
369
  }, {
370
- payload: string;
371
370
  id: string;
371
+ payload: string;
372
372
  payloadType: string;
373
- createdAt: Date;
374
373
  tags: string[];
374
+ createdAt: Date;
375
375
  context?: any;
376
- metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
377
- version?: string | undefined;
376
+ isTest?: boolean | undefined;
378
377
  startedAt?: Date | undefined;
379
378
  idempotencyKey?: string | undefined;
380
- isTest?: boolean | undefined;
381
379
  maxAttempts?: number | undefined;
382
380
  durationMs?: number | undefined;
383
381
  costInCents?: number | undefined;
384
382
  baseCostInCents?: number | undefined;
383
+ version?: string | undefined;
384
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
385
385
  maxDuration?: number | undefined;
386
386
  }>;
387
387
  queue: z.ZodObject<{
@@ -449,35 +449,52 @@ export declare const TaskRunExecution: z.ZodObject<{
449
449
  memory: z.ZodNumber;
450
450
  centsPerMs: z.ZodNumber;
451
451
  }, "strip", z.ZodTypeAny, {
452
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
453
452
  cpu: number;
454
453
  memory: number;
454
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
455
455
  centsPerMs: number;
456
456
  }, {
457
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
458
457
  cpu: number;
459
458
  memory: number;
459
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
460
460
  centsPerMs: number;
461
461
  }>>;
462
462
  }, "strip", z.ZodTypeAny, {
463
- run: {
464
- payload: string;
463
+ task: {
464
+ id: string;
465
+ filePath: string;
466
+ exportName: string;
467
+ };
468
+ attempt: {
469
+ number: number;
470
+ status: string;
465
471
  id: string;
466
472
  startedAt: Date;
473
+ backgroundWorkerId: string;
474
+ backgroundWorkerTaskId: string;
475
+ };
476
+ run: {
477
+ id: string;
478
+ payload: string;
467
479
  payloadType: string;
480
+ tags: string[];
468
481
  isTest: boolean;
469
482
  createdAt: Date;
470
- tags: string[];
483
+ startedAt: Date;
471
484
  durationMs: number;
472
485
  costInCents: number;
473
486
  baseCostInCents: number;
474
487
  context?: any;
475
- metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
476
- version?: string | undefined;
477
488
  idempotencyKey?: string | undefined;
478
489
  maxAttempts?: number | undefined;
490
+ version?: string | undefined;
491
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
479
492
  maxDuration?: number | undefined;
480
493
  };
494
+ queue: {
495
+ name: string;
496
+ id: string;
497
+ };
481
498
  environment: {
482
499
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
483
500
  id: string;
@@ -494,6 +511,16 @@ export declare const TaskRunExecution: z.ZodObject<{
494
511
  slug: string;
495
512
  ref: string;
496
513
  };
514
+ batch?: {
515
+ id: string;
516
+ } | undefined;
517
+ machine?: {
518
+ cpu: number;
519
+ memory: number;
520
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
521
+ centsPerMs: number;
522
+ } | undefined;
523
+ }, {
497
524
  task: {
498
525
  id: string;
499
526
  filePath: string;
@@ -507,38 +534,28 @@ export declare const TaskRunExecution: z.ZodObject<{
507
534
  backgroundWorkerId: string;
508
535
  backgroundWorkerTaskId: string;
509
536
  };
510
- queue: {
511
- name: string;
512
- id: string;
513
- };
514
- batch?: {
515
- id: string;
516
- } | undefined;
517
- machine?: {
518
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
519
- cpu: number;
520
- memory: number;
521
- centsPerMs: number;
522
- } | undefined;
523
- }, {
524
537
  run: {
525
- payload: string;
526
538
  id: string;
539
+ payload: string;
527
540
  payloadType: string;
528
- createdAt: Date;
529
541
  tags: string[];
542
+ createdAt: Date;
530
543
  context?: any;
531
- metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
532
- version?: string | undefined;
544
+ isTest?: boolean | undefined;
533
545
  startedAt?: Date | undefined;
534
546
  idempotencyKey?: string | undefined;
535
- isTest?: boolean | undefined;
536
547
  maxAttempts?: number | undefined;
537
548
  durationMs?: number | undefined;
538
549
  costInCents?: number | undefined;
539
550
  baseCostInCents?: number | undefined;
551
+ version?: string | undefined;
552
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
540
553
  maxDuration?: number | undefined;
541
554
  };
555
+ queue: {
556
+ name: string;
557
+ id: string;
558
+ };
542
559
  environment: {
543
560
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
544
561
  id: string;
@@ -555,30 +572,13 @@ export declare const TaskRunExecution: z.ZodObject<{
555
572
  slug: string;
556
573
  ref: string;
557
574
  };
558
- task: {
559
- id: string;
560
- filePath: string;
561
- exportName: string;
562
- };
563
- attempt: {
564
- number: number;
565
- status: string;
566
- id: string;
567
- startedAt: Date;
568
- backgroundWorkerId: string;
569
- backgroundWorkerTaskId: string;
570
- };
571
- queue: {
572
- name: string;
573
- id: string;
574
- };
575
575
  batch?: {
576
576
  id: string;
577
577
  } | undefined;
578
578
  machine?: {
579
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
580
579
  cpu: number;
581
580
  memory: number;
581
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
582
582
  centsPerMs: number;
583
583
  } | undefined;
584
584
  }>;
@@ -632,33 +632,33 @@ export declare const TaskRunContext: z.ZodObject<{
632
632
  version: z.ZodOptional<z.ZodString>;
633
633
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
634
634
  maxDuration: z.ZodOptional<z.ZodNumber>;
635
- }, "payload" | "metadata" | "payloadType">, "strip", z.ZodTypeAny, {
635
+ }, "payload" | "payloadType" | "metadata">, "strip", z.ZodTypeAny, {
636
636
  id: string;
637
- startedAt: Date;
637
+ tags: string[];
638
638
  isTest: boolean;
639
639
  createdAt: Date;
640
- tags: string[];
640
+ startedAt: Date;
641
641
  durationMs: number;
642
642
  costInCents: number;
643
643
  baseCostInCents: number;
644
644
  context?: any;
645
- version?: string | undefined;
646
645
  idempotencyKey?: string | undefined;
647
646
  maxAttempts?: number | undefined;
647
+ version?: string | undefined;
648
648
  maxDuration?: number | undefined;
649
649
  }, {
650
650
  id: string;
651
- createdAt: Date;
652
651
  tags: string[];
652
+ createdAt: Date;
653
653
  context?: any;
654
- version?: string | undefined;
654
+ isTest?: boolean | undefined;
655
655
  startedAt?: Date | undefined;
656
656
  idempotencyKey?: string | undefined;
657
- isTest?: boolean | undefined;
658
657
  maxAttempts?: number | undefined;
659
658
  durationMs?: number | undefined;
660
659
  costInCents?: number | undefined;
661
660
  baseCostInCents?: number | undefined;
661
+ version?: string | undefined;
662
662
  maxDuration?: number | undefined;
663
663
  }>;
664
664
  queue: z.ZodObject<{
@@ -726,32 +726,47 @@ export declare const TaskRunContext: z.ZodObject<{
726
726
  memory: z.ZodNumber;
727
727
  centsPerMs: z.ZodNumber;
728
728
  }, "strip", z.ZodTypeAny, {
729
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
730
729
  cpu: number;
731
730
  memory: number;
731
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
732
732
  centsPerMs: number;
733
733
  }, {
734
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
735
734
  cpu: number;
736
735
  memory: number;
736
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
737
737
  centsPerMs: number;
738
738
  }>>;
739
739
  }, "strip", z.ZodTypeAny, {
740
- run: {
740
+ task: {
741
+ id: string;
742
+ filePath: string;
743
+ exportName: string;
744
+ };
745
+ attempt: {
746
+ number: number;
747
+ status: string;
741
748
  id: string;
742
749
  startedAt: Date;
750
+ };
751
+ run: {
752
+ id: string;
753
+ tags: string[];
743
754
  isTest: boolean;
744
755
  createdAt: Date;
745
- tags: string[];
756
+ startedAt: Date;
746
757
  durationMs: number;
747
758
  costInCents: number;
748
759
  baseCostInCents: number;
749
760
  context?: any;
750
- version?: string | undefined;
751
761
  idempotencyKey?: string | undefined;
752
762
  maxAttempts?: number | undefined;
763
+ version?: string | undefined;
753
764
  maxDuration?: number | undefined;
754
765
  };
766
+ queue: {
767
+ name: string;
768
+ id: string;
769
+ };
755
770
  environment: {
756
771
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
757
772
  id: string;
@@ -768,6 +783,16 @@ export declare const TaskRunContext: z.ZodObject<{
768
783
  slug: string;
769
784
  ref: string;
770
785
  };
786
+ batch?: {
787
+ id: string;
788
+ } | undefined;
789
+ machine?: {
790
+ cpu: number;
791
+ memory: number;
792
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
793
+ centsPerMs: number;
794
+ } | undefined;
795
+ }, {
771
796
  task: {
772
797
  id: string;
773
798
  filePath: string;
@@ -779,35 +804,25 @@ export declare const TaskRunContext: z.ZodObject<{
779
804
  id: string;
780
805
  startedAt: Date;
781
806
  };
782
- queue: {
783
- name: string;
784
- id: string;
785
- };
786
- batch?: {
787
- id: string;
788
- } | undefined;
789
- machine?: {
790
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
791
- cpu: number;
792
- memory: number;
793
- centsPerMs: number;
794
- } | undefined;
795
- }, {
796
807
  run: {
797
808
  id: string;
798
- createdAt: Date;
799
809
  tags: string[];
810
+ createdAt: Date;
800
811
  context?: any;
801
- version?: string | undefined;
812
+ isTest?: boolean | undefined;
802
813
  startedAt?: Date | undefined;
803
814
  idempotencyKey?: string | undefined;
804
- isTest?: boolean | undefined;
805
815
  maxAttempts?: number | undefined;
806
816
  durationMs?: number | undefined;
807
817
  costInCents?: number | undefined;
808
818
  baseCostInCents?: number | undefined;
819
+ version?: string | undefined;
809
820
  maxDuration?: number | undefined;
810
821
  };
822
+ queue: {
823
+ name: string;
824
+ id: string;
825
+ };
811
826
  environment: {
812
827
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
813
828
  id: string;
@@ -824,28 +839,13 @@ export declare const TaskRunContext: z.ZodObject<{
824
839
  slug: string;
825
840
  ref: string;
826
841
  };
827
- task: {
828
- id: string;
829
- filePath: string;
830
- exportName: string;
831
- };
832
- attempt: {
833
- number: number;
834
- status: string;
835
- id: string;
836
- startedAt: Date;
837
- };
838
- queue: {
839
- name: string;
840
- id: string;
841
- };
842
842
  batch?: {
843
843
  id: string;
844
844
  } | undefined;
845
845
  machine?: {
846
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
847
846
  cpu: number;
848
847
  memory: number;
848
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
849
849
  centsPerMs: number;
850
850
  } | undefined;
851
851
  }>;
@@ -1025,20 +1025,20 @@ export declare const TaskRunSuccessfulExecutionResult: z.ZodObject<{
1025
1025
  id: string;
1026
1026
  ok: true;
1027
1027
  outputType: string;
1028
- output?: string | undefined;
1029
1028
  usage?: {
1030
1029
  durationMs: number;
1031
1030
  } | undefined;
1032
1031
  taskIdentifier?: string | undefined;
1032
+ output?: string | undefined;
1033
1033
  }, {
1034
1034
  id: string;
1035
1035
  ok: true;
1036
1036
  outputType: string;
1037
- output?: string | undefined;
1038
1037
  usage?: {
1039
1038
  durationMs: number;
1040
1039
  } | undefined;
1041
1040
  taskIdentifier?: string | undefined;
1041
+ output?: string | undefined;
1042
1042
  }>;
1043
1043
  export type TaskRunSuccessfulExecutionResult = z.infer<typeof TaskRunSuccessfulExecutionResult>;
1044
1044
  export declare const TaskRunExecutionResult: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
@@ -1058,20 +1058,20 @@ export declare const TaskRunExecutionResult: z.ZodDiscriminatedUnion<"ok", [z.Zo
1058
1058
  id: string;
1059
1059
  ok: true;
1060
1060
  outputType: string;
1061
- output?: string | undefined;
1062
1061
  usage?: {
1063
1062
  durationMs: number;
1064
1063
  } | undefined;
1065
1064
  taskIdentifier?: string | undefined;
1065
+ output?: string | undefined;
1066
1066
  }, {
1067
1067
  id: string;
1068
1068
  ok: true;
1069
1069
  outputType: string;
1070
- output?: string | undefined;
1071
1070
  usage?: {
1072
1071
  durationMs: number;
1073
1072
  } | undefined;
1074
1073
  taskIdentifier?: string | undefined;
1074
+ output?: string | undefined;
1075
1075
  }>, z.ZodObject<{
1076
1076
  ok: z.ZodLiteral<false>;
1077
1077
  id: z.ZodString;
@@ -1227,20 +1227,20 @@ export declare const BatchTaskRunExecutionResult: z.ZodObject<{
1227
1227
  id: string;
1228
1228
  ok: true;
1229
1229
  outputType: string;
1230
- output?: string | undefined;
1231
1230
  usage?: {
1232
1231
  durationMs: number;
1233
1232
  } | undefined;
1234
1233
  taskIdentifier?: string | undefined;
1234
+ output?: string | undefined;
1235
1235
  }, {
1236
1236
  id: string;
1237
1237
  ok: true;
1238
1238
  outputType: string;
1239
- output?: string | undefined;
1240
1239
  usage?: {
1241
1240
  durationMs: number;
1242
1241
  } | undefined;
1243
1242
  taskIdentifier?: string | undefined;
1243
+ output?: string | undefined;
1244
1244
  }>, z.ZodObject<{
1245
1245
  ok: z.ZodLiteral<false>;
1246
1246
  id: z.ZodString;
@@ -1412,11 +1412,11 @@ export declare const BatchTaskRunExecutionResult: z.ZodObject<{
1412
1412
  id: string;
1413
1413
  ok: true;
1414
1414
  outputType: string;
1415
- output?: string | undefined;
1416
1415
  usage?: {
1417
1416
  durationMs: number;
1418
1417
  } | undefined;
1419
1418
  taskIdentifier?: string | undefined;
1419
+ output?: string | undefined;
1420
1420
  })[];
1421
1421
  }, {
1422
1422
  id: string;
@@ -1454,11 +1454,11 @@ export declare const BatchTaskRunExecutionResult: z.ZodObject<{
1454
1454
  id: string;
1455
1455
  ok: true;
1456
1456
  outputType: string;
1457
- output?: string | undefined;
1458
1457
  usage?: {
1459
1458
  durationMs: number;
1460
1459
  } | undefined;
1461
1460
  taskIdentifier?: string | undefined;
1461
+ output?: string | undefined;
1462
1462
  })[];
1463
1463
  }>;
1464
1464
  export type BatchTaskRunExecutionResult = z.infer<typeof BatchTaskRunExecutionResult>;