@trigger.dev/core 4.0.0-v4-beta.24 → 4.0.0-v4-beta.26

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.
Files changed (91) hide show
  1. package/dist/commonjs/logger.d.ts +1 -0
  2. package/dist/commonjs/logger.js +5 -0
  3. package/dist/commonjs/logger.js.map +1 -1
  4. package/dist/commonjs/v3/apiClient/index.d.ts +8 -8
  5. package/dist/commonjs/v3/isomorphic/friendlyId.d.ts +1 -0
  6. package/dist/commonjs/v3/isomorphic/friendlyId.js +2 -1
  7. package/dist/commonjs/v3/isomorphic/friendlyId.js.map +1 -1
  8. package/dist/commonjs/v3/runEngineWorker/supervisor/http.d.ts +79 -61
  9. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.d.ts +375 -243
  10. package/dist/commonjs/v3/runEngineWorker/workload/http.d.ts +63 -45
  11. package/dist/commonjs/v3/runEngineWorker/workload/schemas.d.ts +341 -209
  12. package/dist/commonjs/v3/runMetadata/manager.d.ts +1 -0
  13. package/dist/commonjs/v3/runMetadata/manager.js +72 -2
  14. package/dist/commonjs/v3/runMetadata/manager.js.map +1 -1
  15. package/dist/commonjs/v3/schemas/api.d.ts +116 -116
  16. package/dist/commonjs/v3/schemas/build.d.ts +36 -36
  17. package/dist/commonjs/v3/schemas/checkpoints.d.ts +72 -72
  18. package/dist/commonjs/v3/schemas/common.d.ts +1708 -408
  19. package/dist/commonjs/v3/schemas/common.js +101 -42
  20. package/dist/commonjs/v3/schemas/common.js.map +1 -1
  21. package/dist/commonjs/v3/schemas/messages.d.ts +3564 -2986
  22. package/dist/commonjs/v3/schemas/messages.js +10 -10
  23. package/dist/commonjs/v3/schemas/messages.js.map +1 -1
  24. package/dist/commonjs/v3/schemas/resources.d.ts +10 -10
  25. package/dist/commonjs/v3/schemas/runEngine.d.ts +341 -209
  26. package/dist/commonjs/v3/schemas/schemas.d.ts +562 -442
  27. package/dist/commonjs/v3/schemas/schemas.js +4 -4
  28. package/dist/commonjs/v3/schemas/schemas.js.map +1 -1
  29. package/dist/commonjs/v3/schemas/webhooks.d.ts +120 -120
  30. package/dist/commonjs/v3/taskContext/index.js +0 -2
  31. package/dist/commonjs/v3/taskContext/index.js.map +1 -1
  32. package/dist/commonjs/v3/usage/api.d.ts +2 -1
  33. package/dist/commonjs/v3/usage/api.js +3 -0
  34. package/dist/commonjs/v3/usage/api.js.map +1 -1
  35. package/dist/commonjs/v3/usage/devUsageManager.d.ts +4 -1
  36. package/dist/commonjs/v3/usage/devUsageManager.js +14 -0
  37. package/dist/commonjs/v3/usage/devUsageManager.js.map +1 -1
  38. package/dist/commonjs/v3/usage/noopUsageManager.d.ts +2 -1
  39. package/dist/commonjs/v3/usage/noopUsageManager.js +6 -0
  40. package/dist/commonjs/v3/usage/noopUsageManager.js.map +1 -1
  41. package/dist/commonjs/v3/usage/prodUsageManager.d.ts +4 -1
  42. package/dist/commonjs/v3/usage/prodUsageManager.js +14 -0
  43. package/dist/commonjs/v3/usage/prodUsageManager.js.map +1 -1
  44. package/dist/commonjs/v3/usage/types.d.ts +5 -0
  45. package/dist/commonjs/version.js +1 -1
  46. package/dist/esm/logger.d.ts +1 -0
  47. package/dist/esm/logger.js +5 -0
  48. package/dist/esm/logger.js.map +1 -1
  49. package/dist/esm/v3/apiClient/index.d.ts +8 -8
  50. package/dist/esm/v3/isomorphic/friendlyId.d.ts +1 -0
  51. package/dist/esm/v3/isomorphic/friendlyId.js +1 -0
  52. package/dist/esm/v3/isomorphic/friendlyId.js.map +1 -1
  53. package/dist/esm/v3/runEngineWorker/supervisor/http.d.ts +79 -61
  54. package/dist/esm/v3/runEngineWorker/supervisor/schemas.d.ts +375 -243
  55. package/dist/esm/v3/runEngineWorker/workload/http.d.ts +63 -45
  56. package/dist/esm/v3/runEngineWorker/workload/schemas.d.ts +341 -209
  57. package/dist/esm/v3/runMetadata/manager.d.ts +1 -0
  58. package/dist/esm/v3/runMetadata/manager.js +72 -2
  59. package/dist/esm/v3/runMetadata/manager.js.map +1 -1
  60. package/dist/esm/v3/schemas/api.d.ts +116 -116
  61. package/dist/esm/v3/schemas/build.d.ts +36 -36
  62. package/dist/esm/v3/schemas/checkpoints.d.ts +72 -72
  63. package/dist/esm/v3/schemas/common.d.ts +1708 -408
  64. package/dist/esm/v3/schemas/common.js +100 -41
  65. package/dist/esm/v3/schemas/common.js.map +1 -1
  66. package/dist/esm/v3/schemas/messages.d.ts +3564 -2986
  67. package/dist/esm/v3/schemas/messages.js +11 -11
  68. package/dist/esm/v3/schemas/messages.js.map +1 -1
  69. package/dist/esm/v3/schemas/resources.d.ts +10 -10
  70. package/dist/esm/v3/schemas/runEngine.d.ts +341 -209
  71. package/dist/esm/v3/schemas/schemas.d.ts +562 -442
  72. package/dist/esm/v3/schemas/schemas.js +4 -4
  73. package/dist/esm/v3/schemas/schemas.js.map +1 -1
  74. package/dist/esm/v3/schemas/webhooks.d.ts +120 -120
  75. package/dist/esm/v3/taskContext/index.js +0 -2
  76. package/dist/esm/v3/taskContext/index.js.map +1 -1
  77. package/dist/esm/v3/usage/api.d.ts +2 -1
  78. package/dist/esm/v3/usage/api.js +3 -0
  79. package/dist/esm/v3/usage/api.js.map +1 -1
  80. package/dist/esm/v3/usage/devUsageManager.d.ts +4 -1
  81. package/dist/esm/v3/usage/devUsageManager.js +14 -0
  82. package/dist/esm/v3/usage/devUsageManager.js.map +1 -1
  83. package/dist/esm/v3/usage/noopUsageManager.d.ts +2 -1
  84. package/dist/esm/v3/usage/noopUsageManager.js +6 -0
  85. package/dist/esm/v3/usage/noopUsageManager.js.map +1 -1
  86. package/dist/esm/v3/usage/prodUsageManager.d.ts +4 -1
  87. package/dist/esm/v3/usage/prodUsageManager.js +14 -0
  88. package/dist/esm/v3/usage/prodUsageManager.js.map +1 -1
  89. package/dist/esm/v3/usage/types.d.ts +5 -0
  90. package/dist/esm/version.js +1 -1
  91. package/package.json +1 -1
@@ -656,25 +656,13 @@ export declare const TaskRun: z.ZodObject<{
656
656
  version: z.ZodOptional<z.ZodString>;
657
657
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
658
658
  maxDuration: z.ZodOptional<z.ZodNumber>;
659
- /** @deprecated */
660
- context: z.ZodAny;
661
- /**
662
- * @deprecated For live values use the `usage` SDK functions
663
- * @link https://trigger.dev/docs/run-usage
664
- */
665
- durationMs: z.ZodDefault<z.ZodNumber>;
666
- /**
667
- * @deprecated For live values use the `usage` SDK functions
668
- * @link https://trigger.dev/docs/run-usage
669
- */
670
- costInCents: z.ZodDefault<z.ZodNumber>;
671
- /**
672
- * @deprecated For live values use the `usage` SDK functions
673
- * @link https://trigger.dev/docs/run-usage
674
- */
675
- baseCostInCents: z.ZodDefault<z.ZodNumber>;
676
659
  /** The priority of the run. Wih a value of 10 it will be dequeued before runs that were triggered 9 seconds before it (assuming they had no priority set). */
677
660
  priority: z.ZodOptional<z.ZodNumber>;
661
+ baseCostInCents: z.ZodOptional<z.ZodNumber>;
662
+ parentTaskRunId: z.ZodOptional<z.ZodString>;
663
+ rootTaskRunId: z.ZodOptional<z.ZodString>;
664
+ durationMs: z.ZodOptional<z.ZodNumber>;
665
+ costInCents: z.ZodOptional<z.ZodNumber>;
678
666
  }, "strip", z.ZodTypeAny, {
679
667
  payload: string;
680
668
  id: string;
@@ -683,23 +671,23 @@ export declare const TaskRun: z.ZodObject<{
683
671
  isTest: boolean;
684
672
  createdAt: Date;
685
673
  startedAt: Date;
686
- durationMs: number;
687
- costInCents: number;
688
- baseCostInCents: number;
689
- context?: any;
690
674
  metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
691
675
  idempotencyKey?: string | undefined;
692
676
  maxAttempts?: number | undefined;
693
677
  version?: string | undefined;
694
678
  maxDuration?: number | undefined;
695
679
  priority?: number | undefined;
680
+ baseCostInCents?: number | undefined;
681
+ parentTaskRunId?: string | undefined;
682
+ rootTaskRunId?: string | undefined;
683
+ durationMs?: number | undefined;
684
+ costInCents?: number | undefined;
696
685
  }, {
697
686
  payload: string;
698
687
  id: string;
699
688
  payloadType: string;
700
689
  tags: string[];
701
690
  createdAt: Date;
702
- context?: any;
703
691
  metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
704
692
  isTest?: boolean | undefined;
705
693
  startedAt?: Date | undefined;
@@ -707,52 +695,14 @@ export declare const TaskRun: z.ZodObject<{
707
695
  maxAttempts?: number | undefined;
708
696
  version?: string | undefined;
709
697
  maxDuration?: number | undefined;
698
+ priority?: number | undefined;
699
+ baseCostInCents?: number | undefined;
700
+ parentTaskRunId?: string | undefined;
701
+ rootTaskRunId?: string | undefined;
710
702
  durationMs?: number | undefined;
711
703
  costInCents?: number | undefined;
712
- baseCostInCents?: number | undefined;
713
- priority?: number | undefined;
714
704
  }>;
715
705
  export type TaskRun = z.infer<typeof TaskRun>;
716
- export declare const TaskRunExecutionTask: z.ZodObject<{
717
- id: z.ZodString;
718
- filePath: z.ZodString;
719
- exportName: z.ZodOptional<z.ZodString>;
720
- }, "strip", z.ZodTypeAny, {
721
- id: string;
722
- filePath: string;
723
- exportName?: string | undefined;
724
- }, {
725
- id: string;
726
- filePath: string;
727
- exportName?: string | undefined;
728
- }>;
729
- export type TaskRunExecutionTask = z.infer<typeof TaskRunExecutionTask>;
730
- export declare const TaskRunExecutionAttempt: z.ZodObject<{
731
- number: z.ZodNumber;
732
- startedAt: z.ZodDate;
733
- /** @deprecated */
734
- id: z.ZodString;
735
- /** @deprecated */
736
- backgroundWorkerId: z.ZodString;
737
- /** @deprecated */
738
- backgroundWorkerTaskId: z.ZodString;
739
- /** @deprecated */
740
- status: z.ZodString;
741
- }, "strip", z.ZodTypeAny, {
742
- number: number;
743
- status: string;
744
- id: string;
745
- startedAt: Date;
746
- backgroundWorkerId: string;
747
- backgroundWorkerTaskId: string;
748
- }, {
749
- number: number;
750
- status: string;
751
- id: string;
752
- startedAt: Date;
753
- backgroundWorkerId: string;
754
- backgroundWorkerTaskId: string;
755
- }>;
756
706
  export declare const GitMeta: z.ZodObject<{
757
707
  commitAuthorName: z.ZodOptional<z.ZodString>;
758
708
  commitMessage: z.ZodOptional<z.ZodString>;
@@ -785,6 +735,27 @@ export declare const GitMeta: z.ZodObject<{
785
735
  pullRequestState?: "open" | "closed" | "merged" | undefined;
786
736
  }>;
787
737
  export type GitMeta = z.infer<typeof GitMeta>;
738
+ export declare const TaskRunExecutionTask: z.ZodObject<{
739
+ id: z.ZodString;
740
+ filePath: z.ZodString;
741
+ }, "strip", z.ZodTypeAny, {
742
+ id: string;
743
+ filePath: string;
744
+ }, {
745
+ id: string;
746
+ filePath: string;
747
+ }>;
748
+ export type TaskRunExecutionTask = z.infer<typeof TaskRunExecutionTask>;
749
+ export declare const TaskRunExecutionAttempt: z.ZodObject<{
750
+ number: z.ZodNumber;
751
+ startedAt: z.ZodDate;
752
+ }, "strip", z.ZodTypeAny, {
753
+ number: number;
754
+ startedAt: Date;
755
+ }, {
756
+ number: number;
757
+ startedAt: Date;
758
+ }>;
788
759
  export type TaskRunExecutionAttempt = z.infer<typeof TaskRunExecutionAttempt>;
789
760
  export declare const TaskRunExecutionEnvironment: z.ZodObject<{
790
761
  id: z.ZodString;
@@ -905,121 +876,90 @@ export declare const TaskRunExecutionBatch: z.ZodObject<{
905
876
  }, {
906
877
  id: string;
907
878
  }>;
908
- export declare const TaskRunExecution: z.ZodObject<{
879
+ export declare const TaskRunExecutionDeployment: z.ZodObject<{
880
+ id: z.ZodString;
881
+ shortCode: z.ZodString;
882
+ version: z.ZodString;
883
+ runtime: z.ZodString;
884
+ runtimeVersion: z.ZodString;
885
+ git: z.ZodOptional<z.ZodObject<{
886
+ commitAuthorName: z.ZodOptional<z.ZodString>;
887
+ commitMessage: z.ZodOptional<z.ZodString>;
888
+ commitRef: z.ZodOptional<z.ZodString>;
889
+ commitSha: z.ZodOptional<z.ZodString>;
890
+ dirty: z.ZodOptional<z.ZodBoolean>;
891
+ remoteUrl: z.ZodOptional<z.ZodString>;
892
+ pullRequestNumber: z.ZodOptional<z.ZodNumber>;
893
+ pullRequestTitle: z.ZodOptional<z.ZodString>;
894
+ pullRequestState: z.ZodOptional<z.ZodEnum<["open", "closed", "merged"]>>;
895
+ }, "strip", z.ZodTypeAny, {
896
+ dirty?: boolean | undefined;
897
+ commitAuthorName?: string | undefined;
898
+ commitMessage?: string | undefined;
899
+ commitRef?: string | undefined;
900
+ commitSha?: string | undefined;
901
+ remoteUrl?: string | undefined;
902
+ pullRequestNumber?: number | undefined;
903
+ pullRequestTitle?: string | undefined;
904
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
905
+ }, {
906
+ dirty?: boolean | undefined;
907
+ commitAuthorName?: string | undefined;
908
+ commitMessage?: string | undefined;
909
+ commitRef?: string | undefined;
910
+ commitSha?: string | undefined;
911
+ remoteUrl?: string | undefined;
912
+ pullRequestNumber?: number | undefined;
913
+ pullRequestTitle?: string | undefined;
914
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
915
+ }>>;
916
+ }, "strip", z.ZodTypeAny, {
917
+ id: string;
918
+ version: string;
919
+ shortCode: string;
920
+ runtime: string;
921
+ runtimeVersion: string;
922
+ git?: {
923
+ dirty?: boolean | undefined;
924
+ commitAuthorName?: string | undefined;
925
+ commitMessage?: string | undefined;
926
+ commitRef?: string | undefined;
927
+ commitSha?: string | undefined;
928
+ remoteUrl?: string | undefined;
929
+ pullRequestNumber?: number | undefined;
930
+ pullRequestTitle?: string | undefined;
931
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
932
+ } | undefined;
933
+ }, {
934
+ id: string;
935
+ version: string;
936
+ shortCode: string;
937
+ runtime: string;
938
+ runtimeVersion: string;
939
+ git?: {
940
+ dirty?: boolean | undefined;
941
+ commitAuthorName?: string | undefined;
942
+ commitMessage?: string | undefined;
943
+ commitRef?: string | undefined;
944
+ commitSha?: string | undefined;
945
+ remoteUrl?: string | undefined;
946
+ pullRequestNumber?: number | undefined;
947
+ pullRequestTitle?: string | undefined;
948
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
949
+ } | undefined;
950
+ }>;
951
+ export type TaskRunExecutionDeployment = z.infer<typeof TaskRunExecutionDeployment>;
952
+ export declare const StaticTaskRunExecution: z.ZodObject<{
909
953
  task: z.ZodObject<{
910
954
  id: z.ZodString;
911
955
  filePath: z.ZodString;
912
- exportName: z.ZodOptional<z.ZodString>;
913
- }, "strip", z.ZodTypeAny, {
914
- id: string;
915
- filePath: string;
916
- exportName?: string | undefined;
917
- }, {
918
- id: string;
919
- filePath: string;
920
- exportName?: string | undefined;
921
- }>;
922
- attempt: z.ZodObject<{
923
- number: z.ZodNumber;
924
- startedAt: z.ZodDate;
925
- /** @deprecated */
956
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
926
957
  id: z.ZodString;
927
- /** @deprecated */
928
- backgroundWorkerId: z.ZodString;
929
- /** @deprecated */
930
- backgroundWorkerTaskId: z.ZodString;
931
- /** @deprecated */
932
- status: z.ZodString;
933
- }, "strip", z.ZodTypeAny, {
934
- number: number;
935
- status: string;
936
- id: string;
937
- startedAt: Date;
938
- backgroundWorkerId: string;
939
- backgroundWorkerTaskId: string;
940
- }, {
941
- number: number;
942
- status: string;
943
- id: string;
944
- startedAt: Date;
945
- backgroundWorkerId: string;
946
- backgroundWorkerTaskId: string;
947
- }>;
948
- run: z.ZodIntersection<z.ZodObject<{
958
+ filePath: z.ZodString;
959
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
949
960
  id: z.ZodString;
950
- payload: z.ZodString;
951
- payloadType: z.ZodString;
952
- tags: z.ZodArray<z.ZodString, "many">;
953
- isTest: z.ZodDefault<z.ZodBoolean>;
954
- createdAt: z.ZodDate;
955
- startedAt: z.ZodDefault<z.ZodDate>;
956
- idempotencyKey: z.ZodOptional<z.ZodString>;
957
- maxAttempts: z.ZodOptional<z.ZodNumber>;
958
- version: z.ZodOptional<z.ZodString>;
959
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
960
- maxDuration: z.ZodOptional<z.ZodNumber>;
961
- /** @deprecated */
962
- context: z.ZodAny;
963
- /**
964
- * @deprecated For live values use the `usage` SDK functions
965
- * @link https://trigger.dev/docs/run-usage
966
- */
967
- durationMs: z.ZodDefault<z.ZodNumber>;
968
- /**
969
- * @deprecated For live values use the `usage` SDK functions
970
- * @link https://trigger.dev/docs/run-usage
971
- */
972
- costInCents: z.ZodDefault<z.ZodNumber>;
973
- /**
974
- * @deprecated For live values use the `usage` SDK functions
975
- * @link https://trigger.dev/docs/run-usage
976
- */
977
- baseCostInCents: z.ZodDefault<z.ZodNumber>;
978
- /** The priority of the run. Wih a value of 10 it will be dequeued before runs that were triggered 9 seconds before it (assuming they had no priority set). */
979
- priority: z.ZodOptional<z.ZodNumber>;
980
- }, "strip", z.ZodTypeAny, {
981
- payload: string;
982
- id: string;
983
- payloadType: string;
984
- tags: string[];
985
- isTest: boolean;
986
- createdAt: Date;
987
- startedAt: Date;
988
- durationMs: number;
989
- costInCents: number;
990
- baseCostInCents: number;
991
- context?: any;
992
- metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
993
- idempotencyKey?: string | undefined;
994
- maxAttempts?: number | undefined;
995
- version?: string | undefined;
996
- maxDuration?: number | undefined;
997
- priority?: number | undefined;
998
- }, {
999
- payload: string;
1000
- id: string;
1001
- payloadType: string;
1002
- tags: string[];
1003
- createdAt: Date;
1004
- context?: any;
1005
- metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
1006
- isTest?: boolean | undefined;
1007
- startedAt?: Date | undefined;
1008
- idempotencyKey?: string | undefined;
1009
- maxAttempts?: number | undefined;
1010
- version?: string | undefined;
1011
- maxDuration?: number | undefined;
1012
- durationMs?: number | undefined;
1013
- costInCents?: number | undefined;
1014
- baseCostInCents?: number | undefined;
1015
- priority?: number | undefined;
1016
- }>, z.ZodObject<{
1017
- traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1018
- }, "strip", z.ZodTypeAny, {
1019
- traceContext?: Record<string, unknown> | undefined;
1020
- }, {
1021
- traceContext?: Record<string, unknown> | undefined;
1022
- }>>;
961
+ filePath: z.ZodString;
962
+ }, z.ZodTypeAny, "passthrough">>;
1023
963
  queue: z.ZodObject<{
1024
964
  id: z.ZodString;
1025
965
  name: z.ZodString;
@@ -1128,13 +1068,6 @@ export declare const TaskRunExecution: z.ZodObject<{
1128
1068
  slug: string;
1129
1069
  ref: string;
1130
1070
  }>;
1131
- batch: z.ZodOptional<z.ZodObject<{
1132
- id: z.ZodString;
1133
- }, "strip", z.ZodTypeAny, {
1134
- id: string;
1135
- }, {
1136
- id: string;
1137
- }>>;
1138
1071
  machine: z.ZodObject<{
1139
1072
  name: z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>;
1140
1073
  /** unit: vCPU */
@@ -1153,41 +1086,1451 @@ export declare const TaskRunExecution: z.ZodObject<{
1153
1086
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1154
1087
  centsPerMs: number;
1155
1088
  }>;
1156
- }, "strip", z.ZodTypeAny, {
1157
- task: {
1158
- id: string;
1159
- filePath: string;
1160
- exportName?: string | undefined;
1161
- };
1162
- attempt: {
1163
- number: number;
1164
- status: string;
1089
+ batch: z.ZodOptional<z.ZodObject<{
1090
+ id: z.ZodString;
1091
+ }, "strip", z.ZodTypeAny, {
1165
1092
  id: string;
1166
- startedAt: Date;
1167
- backgroundWorkerId: string;
1168
- backgroundWorkerTaskId: string;
1169
- };
1170
- run: {
1171
- payload: string;
1093
+ }, {
1172
1094
  id: string;
1173
- payloadType: string;
1174
- tags: string[];
1175
- isTest: boolean;
1176
- createdAt: Date;
1177
- startedAt: Date;
1178
- durationMs: number;
1179
- costInCents: number;
1180
- baseCostInCents: number;
1181
- context?: any;
1182
- metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
1183
- idempotencyKey?: string | undefined;
1184
- maxAttempts?: number | undefined;
1185
- version?: string | undefined;
1186
- maxDuration?: number | undefined;
1187
- priority?: number | undefined;
1188
- } & {
1095
+ }>>;
1096
+ deployment: z.ZodOptional<z.ZodObject<{
1097
+ id: z.ZodString;
1098
+ shortCode: z.ZodString;
1099
+ version: z.ZodString;
1100
+ runtime: z.ZodString;
1101
+ runtimeVersion: z.ZodString;
1102
+ git: z.ZodOptional<z.ZodObject<{
1103
+ commitAuthorName: z.ZodOptional<z.ZodString>;
1104
+ commitMessage: z.ZodOptional<z.ZodString>;
1105
+ commitRef: z.ZodOptional<z.ZodString>;
1106
+ commitSha: z.ZodOptional<z.ZodString>;
1107
+ dirty: z.ZodOptional<z.ZodBoolean>;
1108
+ remoteUrl: z.ZodOptional<z.ZodString>;
1109
+ pullRequestNumber: z.ZodOptional<z.ZodNumber>;
1110
+ pullRequestTitle: z.ZodOptional<z.ZodString>;
1111
+ pullRequestState: z.ZodOptional<z.ZodEnum<["open", "closed", "merged"]>>;
1112
+ }, "strip", z.ZodTypeAny, {
1113
+ dirty?: boolean | undefined;
1114
+ commitAuthorName?: string | undefined;
1115
+ commitMessage?: string | undefined;
1116
+ commitRef?: string | undefined;
1117
+ commitSha?: string | undefined;
1118
+ remoteUrl?: string | undefined;
1119
+ pullRequestNumber?: number | undefined;
1120
+ pullRequestTitle?: string | undefined;
1121
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1122
+ }, {
1123
+ dirty?: boolean | undefined;
1124
+ commitAuthorName?: string | undefined;
1125
+ commitMessage?: string | undefined;
1126
+ commitRef?: string | undefined;
1127
+ commitSha?: string | undefined;
1128
+ remoteUrl?: string | undefined;
1129
+ pullRequestNumber?: number | undefined;
1130
+ pullRequestTitle?: string | undefined;
1131
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1132
+ }>>;
1133
+ }, "strip", z.ZodTypeAny, {
1134
+ id: string;
1135
+ version: string;
1136
+ shortCode: string;
1137
+ runtime: string;
1138
+ runtimeVersion: string;
1139
+ git?: {
1140
+ dirty?: boolean | undefined;
1141
+ commitAuthorName?: string | undefined;
1142
+ commitMessage?: string | undefined;
1143
+ commitRef?: string | undefined;
1144
+ commitSha?: string | undefined;
1145
+ remoteUrl?: string | undefined;
1146
+ pullRequestNumber?: number | undefined;
1147
+ pullRequestTitle?: string | undefined;
1148
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1149
+ } | undefined;
1150
+ }, {
1151
+ id: string;
1152
+ version: string;
1153
+ shortCode: string;
1154
+ runtime: string;
1155
+ runtimeVersion: string;
1156
+ git?: {
1157
+ dirty?: boolean | undefined;
1158
+ commitAuthorName?: string | undefined;
1159
+ commitMessage?: string | undefined;
1160
+ commitRef?: string | undefined;
1161
+ commitSha?: string | undefined;
1162
+ remoteUrl?: string | undefined;
1163
+ pullRequestNumber?: number | undefined;
1164
+ pullRequestTitle?: string | undefined;
1165
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1166
+ } | undefined;
1167
+ }>>;
1168
+ }, "strip", z.ZodTypeAny, {
1169
+ task: {
1170
+ id: string;
1171
+ filePath: string;
1172
+ } & {
1173
+ [k: string]: unknown;
1174
+ };
1175
+ queue: {
1176
+ name: string;
1177
+ id: string;
1178
+ };
1179
+ environment: {
1180
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1181
+ id: string;
1182
+ slug: string;
1183
+ branchName?: string | undefined;
1184
+ git?: {
1185
+ dirty?: boolean | undefined;
1186
+ commitAuthorName?: string | undefined;
1187
+ commitMessage?: string | undefined;
1188
+ commitRef?: string | undefined;
1189
+ commitSha?: string | undefined;
1190
+ remoteUrl?: string | undefined;
1191
+ pullRequestNumber?: number | undefined;
1192
+ pullRequestTitle?: string | undefined;
1193
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1194
+ } | undefined;
1195
+ };
1196
+ organization: {
1197
+ name: string;
1198
+ id: string;
1199
+ slug: string;
1200
+ };
1201
+ project: {
1202
+ name: string;
1203
+ id: string;
1204
+ slug: string;
1205
+ ref: string;
1206
+ };
1207
+ machine: {
1208
+ cpu: number;
1209
+ memory: number;
1210
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1211
+ centsPerMs: number;
1212
+ };
1213
+ batch?: {
1214
+ id: string;
1215
+ } | undefined;
1216
+ deployment?: {
1217
+ id: string;
1218
+ version: string;
1219
+ shortCode: string;
1220
+ runtime: string;
1221
+ runtimeVersion: string;
1222
+ git?: {
1223
+ dirty?: boolean | undefined;
1224
+ commitAuthorName?: string | undefined;
1225
+ commitMessage?: string | undefined;
1226
+ commitRef?: string | undefined;
1227
+ commitSha?: string | undefined;
1228
+ remoteUrl?: string | undefined;
1229
+ pullRequestNumber?: number | undefined;
1230
+ pullRequestTitle?: string | undefined;
1231
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1232
+ } | undefined;
1233
+ } | undefined;
1234
+ }, {
1235
+ task: {
1236
+ id: string;
1237
+ filePath: string;
1238
+ } & {
1239
+ [k: string]: unknown;
1240
+ };
1241
+ queue: {
1242
+ name: string;
1243
+ id: string;
1244
+ };
1245
+ environment: {
1246
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1247
+ id: string;
1248
+ slug: string;
1249
+ branchName?: string | undefined;
1250
+ git?: {
1251
+ dirty?: boolean | undefined;
1252
+ commitAuthorName?: string | undefined;
1253
+ commitMessage?: string | undefined;
1254
+ commitRef?: string | undefined;
1255
+ commitSha?: string | undefined;
1256
+ remoteUrl?: string | undefined;
1257
+ pullRequestNumber?: number | undefined;
1258
+ pullRequestTitle?: string | undefined;
1259
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1260
+ } | undefined;
1261
+ };
1262
+ organization: {
1263
+ name: string;
1264
+ id: string;
1265
+ slug: string;
1266
+ };
1267
+ project: {
1268
+ name: string;
1269
+ id: string;
1270
+ slug: string;
1271
+ ref: string;
1272
+ };
1273
+ machine: {
1274
+ cpu: number;
1275
+ memory: number;
1276
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1277
+ centsPerMs: number;
1278
+ };
1279
+ batch?: {
1280
+ id: string;
1281
+ } | undefined;
1282
+ deployment?: {
1283
+ id: string;
1284
+ version: string;
1285
+ shortCode: string;
1286
+ runtime: string;
1287
+ runtimeVersion: string;
1288
+ git?: {
1289
+ dirty?: boolean | undefined;
1290
+ commitAuthorName?: string | undefined;
1291
+ commitMessage?: string | undefined;
1292
+ commitRef?: string | undefined;
1293
+ commitSha?: string | undefined;
1294
+ remoteUrl?: string | undefined;
1295
+ pullRequestNumber?: number | undefined;
1296
+ pullRequestTitle?: string | undefined;
1297
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1298
+ } | undefined;
1299
+ } | undefined;
1300
+ }>;
1301
+ export type StaticTaskRunExecution = z.infer<typeof StaticTaskRunExecution>;
1302
+ export declare const TaskRunExecution: z.ZodObject<{
1303
+ task: z.ZodObject<{
1304
+ id: z.ZodString;
1305
+ filePath: z.ZodString;
1306
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1307
+ id: z.ZodString;
1308
+ filePath: z.ZodString;
1309
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1310
+ id: z.ZodString;
1311
+ filePath: z.ZodString;
1312
+ }, z.ZodTypeAny, "passthrough">>;
1313
+ queue: z.ZodObject<{
1314
+ id: z.ZodString;
1315
+ name: z.ZodString;
1316
+ }, "strip", z.ZodTypeAny, {
1317
+ name: string;
1318
+ id: string;
1319
+ }, {
1320
+ name: string;
1321
+ id: string;
1322
+ }>;
1323
+ environment: z.ZodObject<{
1324
+ id: z.ZodString;
1325
+ slug: z.ZodString;
1326
+ type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
1327
+ branchName: z.ZodOptional<z.ZodString>;
1328
+ git: z.ZodOptional<z.ZodObject<{
1329
+ commitAuthorName: z.ZodOptional<z.ZodString>;
1330
+ commitMessage: z.ZodOptional<z.ZodString>;
1331
+ commitRef: z.ZodOptional<z.ZodString>;
1332
+ commitSha: z.ZodOptional<z.ZodString>;
1333
+ dirty: z.ZodOptional<z.ZodBoolean>;
1334
+ remoteUrl: z.ZodOptional<z.ZodString>;
1335
+ pullRequestNumber: z.ZodOptional<z.ZodNumber>;
1336
+ pullRequestTitle: z.ZodOptional<z.ZodString>;
1337
+ pullRequestState: z.ZodOptional<z.ZodEnum<["open", "closed", "merged"]>>;
1338
+ }, "strip", z.ZodTypeAny, {
1339
+ dirty?: boolean | undefined;
1340
+ commitAuthorName?: string | undefined;
1341
+ commitMessage?: string | undefined;
1342
+ commitRef?: string | undefined;
1343
+ commitSha?: string | undefined;
1344
+ remoteUrl?: string | undefined;
1345
+ pullRequestNumber?: number | undefined;
1346
+ pullRequestTitle?: string | undefined;
1347
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1348
+ }, {
1349
+ dirty?: boolean | undefined;
1350
+ commitAuthorName?: string | undefined;
1351
+ commitMessage?: string | undefined;
1352
+ commitRef?: string | undefined;
1353
+ commitSha?: string | undefined;
1354
+ remoteUrl?: string | undefined;
1355
+ pullRequestNumber?: number | undefined;
1356
+ pullRequestTitle?: string | undefined;
1357
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1358
+ }>>;
1359
+ }, "strip", z.ZodTypeAny, {
1360
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1361
+ id: string;
1362
+ slug: string;
1363
+ branchName?: string | undefined;
1364
+ git?: {
1365
+ dirty?: boolean | undefined;
1366
+ commitAuthorName?: string | undefined;
1367
+ commitMessage?: string | undefined;
1368
+ commitRef?: string | undefined;
1369
+ commitSha?: string | undefined;
1370
+ remoteUrl?: string | undefined;
1371
+ pullRequestNumber?: number | undefined;
1372
+ pullRequestTitle?: string | undefined;
1373
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1374
+ } | undefined;
1375
+ }, {
1376
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1377
+ id: string;
1378
+ slug: string;
1379
+ branchName?: string | undefined;
1380
+ git?: {
1381
+ dirty?: boolean | undefined;
1382
+ commitAuthorName?: string | undefined;
1383
+ commitMessage?: string | undefined;
1384
+ commitRef?: string | undefined;
1385
+ commitSha?: string | undefined;
1386
+ remoteUrl?: string | undefined;
1387
+ pullRequestNumber?: number | undefined;
1388
+ pullRequestTitle?: string | undefined;
1389
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1390
+ } | undefined;
1391
+ }>;
1392
+ organization: z.ZodObject<{
1393
+ id: z.ZodString;
1394
+ slug: z.ZodString;
1395
+ name: z.ZodString;
1396
+ }, "strip", z.ZodTypeAny, {
1397
+ name: string;
1398
+ id: string;
1399
+ slug: string;
1400
+ }, {
1401
+ name: string;
1402
+ id: string;
1403
+ slug: string;
1404
+ }>;
1405
+ project: z.ZodObject<{
1406
+ id: z.ZodString;
1407
+ ref: z.ZodString;
1408
+ slug: z.ZodString;
1409
+ name: z.ZodString;
1410
+ }, "strip", z.ZodTypeAny, {
1411
+ name: string;
1412
+ id: string;
1413
+ slug: string;
1414
+ ref: string;
1415
+ }, {
1416
+ name: string;
1417
+ id: string;
1418
+ slug: string;
1419
+ ref: string;
1420
+ }>;
1421
+ machine: z.ZodObject<{
1422
+ name: z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>;
1423
+ /** unit: vCPU */
1424
+ cpu: z.ZodNumber;
1425
+ /** unit: GB */
1426
+ memory: z.ZodNumber;
1427
+ centsPerMs: z.ZodNumber;
1428
+ }, "strip", z.ZodTypeAny, {
1429
+ cpu: number;
1430
+ memory: number;
1431
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1432
+ centsPerMs: number;
1433
+ }, {
1434
+ cpu: number;
1435
+ memory: number;
1436
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1437
+ centsPerMs: number;
1438
+ }>;
1439
+ batch: z.ZodOptional<z.ZodObject<{
1440
+ id: z.ZodString;
1441
+ }, "strip", z.ZodTypeAny, {
1442
+ id: string;
1443
+ }, {
1444
+ id: string;
1445
+ }>>;
1446
+ deployment: z.ZodOptional<z.ZodObject<{
1447
+ id: z.ZodString;
1448
+ shortCode: z.ZodString;
1449
+ version: z.ZodString;
1450
+ runtime: z.ZodString;
1451
+ runtimeVersion: z.ZodString;
1452
+ git: z.ZodOptional<z.ZodObject<{
1453
+ commitAuthorName: z.ZodOptional<z.ZodString>;
1454
+ commitMessage: z.ZodOptional<z.ZodString>;
1455
+ commitRef: z.ZodOptional<z.ZodString>;
1456
+ commitSha: z.ZodOptional<z.ZodString>;
1457
+ dirty: z.ZodOptional<z.ZodBoolean>;
1458
+ remoteUrl: z.ZodOptional<z.ZodString>;
1459
+ pullRequestNumber: z.ZodOptional<z.ZodNumber>;
1460
+ pullRequestTitle: z.ZodOptional<z.ZodString>;
1461
+ pullRequestState: z.ZodOptional<z.ZodEnum<["open", "closed", "merged"]>>;
1462
+ }, "strip", z.ZodTypeAny, {
1463
+ dirty?: boolean | undefined;
1464
+ commitAuthorName?: string | undefined;
1465
+ commitMessage?: string | undefined;
1466
+ commitRef?: string | undefined;
1467
+ commitSha?: string | undefined;
1468
+ remoteUrl?: string | undefined;
1469
+ pullRequestNumber?: number | undefined;
1470
+ pullRequestTitle?: string | undefined;
1471
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1472
+ }, {
1473
+ dirty?: boolean | undefined;
1474
+ commitAuthorName?: string | undefined;
1475
+ commitMessage?: string | undefined;
1476
+ commitRef?: string | undefined;
1477
+ commitSha?: string | undefined;
1478
+ remoteUrl?: string | undefined;
1479
+ pullRequestNumber?: number | undefined;
1480
+ pullRequestTitle?: string | undefined;
1481
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1482
+ }>>;
1483
+ }, "strip", z.ZodTypeAny, {
1484
+ id: string;
1485
+ version: string;
1486
+ shortCode: string;
1487
+ runtime: string;
1488
+ runtimeVersion: string;
1489
+ git?: {
1490
+ dirty?: boolean | undefined;
1491
+ commitAuthorName?: string | undefined;
1492
+ commitMessage?: string | undefined;
1493
+ commitRef?: string | undefined;
1494
+ commitSha?: string | undefined;
1495
+ remoteUrl?: string | undefined;
1496
+ pullRequestNumber?: number | undefined;
1497
+ pullRequestTitle?: string | undefined;
1498
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1499
+ } | undefined;
1500
+ }, {
1501
+ id: string;
1502
+ version: string;
1503
+ shortCode: string;
1504
+ runtime: string;
1505
+ runtimeVersion: string;
1506
+ git?: {
1507
+ dirty?: boolean | undefined;
1508
+ commitAuthorName?: string | undefined;
1509
+ commitMessage?: string | undefined;
1510
+ commitRef?: string | undefined;
1511
+ commitSha?: string | undefined;
1512
+ remoteUrl?: string | undefined;
1513
+ pullRequestNumber?: number | undefined;
1514
+ pullRequestTitle?: string | undefined;
1515
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1516
+ } | undefined;
1517
+ }>>;
1518
+ attempt: z.ZodObject<{
1519
+ number: z.ZodNumber;
1520
+ startedAt: z.ZodDate;
1521
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1522
+ number: z.ZodNumber;
1523
+ startedAt: z.ZodDate;
1524
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1525
+ number: z.ZodNumber;
1526
+ startedAt: z.ZodDate;
1527
+ }, z.ZodTypeAny, "passthrough">>;
1528
+ run: z.ZodIntersection<z.ZodObject<{
1529
+ id: z.ZodString;
1530
+ payload: z.ZodString;
1531
+ payloadType: z.ZodString;
1532
+ tags: z.ZodArray<z.ZodString, "many">;
1533
+ isTest: z.ZodDefault<z.ZodBoolean>;
1534
+ createdAt: z.ZodDate;
1535
+ startedAt: z.ZodDefault<z.ZodDate>;
1536
+ idempotencyKey: z.ZodOptional<z.ZodString>;
1537
+ maxAttempts: z.ZodOptional<z.ZodNumber>;
1538
+ version: z.ZodOptional<z.ZodString>;
1539
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
1540
+ maxDuration: z.ZodOptional<z.ZodNumber>;
1541
+ /** The priority of the run. Wih a value of 10 it will be dequeued before runs that were triggered 9 seconds before it (assuming they had no priority set). */
1542
+ priority: z.ZodOptional<z.ZodNumber>;
1543
+ baseCostInCents: z.ZodOptional<z.ZodNumber>;
1544
+ parentTaskRunId: z.ZodOptional<z.ZodString>;
1545
+ rootTaskRunId: z.ZodOptional<z.ZodString>;
1546
+ durationMs: z.ZodOptional<z.ZodNumber>;
1547
+ costInCents: z.ZodOptional<z.ZodNumber>;
1548
+ }, "strip", z.ZodTypeAny, {
1549
+ payload: string;
1550
+ id: string;
1551
+ payloadType: string;
1552
+ tags: string[];
1553
+ isTest: boolean;
1554
+ createdAt: Date;
1555
+ startedAt: Date;
1556
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
1557
+ idempotencyKey?: string | undefined;
1558
+ maxAttempts?: number | undefined;
1559
+ version?: string | undefined;
1560
+ maxDuration?: number | undefined;
1561
+ priority?: number | undefined;
1562
+ baseCostInCents?: number | undefined;
1563
+ parentTaskRunId?: string | undefined;
1564
+ rootTaskRunId?: string | undefined;
1565
+ durationMs?: number | undefined;
1566
+ costInCents?: number | undefined;
1567
+ }, {
1568
+ payload: string;
1569
+ id: string;
1570
+ payloadType: string;
1571
+ tags: string[];
1572
+ createdAt: Date;
1573
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
1574
+ isTest?: boolean | undefined;
1575
+ startedAt?: Date | undefined;
1576
+ idempotencyKey?: string | undefined;
1577
+ maxAttempts?: number | undefined;
1578
+ version?: string | undefined;
1579
+ maxDuration?: number | undefined;
1580
+ priority?: number | undefined;
1581
+ baseCostInCents?: number | undefined;
1582
+ parentTaskRunId?: string | undefined;
1583
+ rootTaskRunId?: string | undefined;
1584
+ durationMs?: number | undefined;
1585
+ costInCents?: number | undefined;
1586
+ }>, z.ZodObject<{
1587
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1588
+ }, "strip", z.ZodTypeAny, {
1589
+ traceContext?: Record<string, unknown> | undefined;
1590
+ }, {
1591
+ traceContext?: Record<string, unknown> | undefined;
1592
+ }>>;
1593
+ }, "strip", z.ZodTypeAny, {
1594
+ task: {
1595
+ id: string;
1596
+ filePath: string;
1597
+ } & {
1598
+ [k: string]: unknown;
1599
+ };
1600
+ queue: {
1601
+ name: string;
1602
+ id: string;
1603
+ };
1604
+ environment: {
1605
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1606
+ id: string;
1607
+ slug: string;
1608
+ branchName?: string | undefined;
1609
+ git?: {
1610
+ dirty?: boolean | undefined;
1611
+ commitAuthorName?: string | undefined;
1612
+ commitMessage?: string | undefined;
1613
+ commitRef?: string | undefined;
1614
+ commitSha?: string | undefined;
1615
+ remoteUrl?: string | undefined;
1616
+ pullRequestNumber?: number | undefined;
1617
+ pullRequestTitle?: string | undefined;
1618
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1619
+ } | undefined;
1620
+ };
1621
+ organization: {
1622
+ name: string;
1623
+ id: string;
1624
+ slug: string;
1625
+ };
1626
+ project: {
1627
+ name: string;
1628
+ id: string;
1629
+ slug: string;
1630
+ ref: string;
1631
+ };
1632
+ machine: {
1633
+ cpu: number;
1634
+ memory: number;
1635
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1636
+ centsPerMs: number;
1637
+ };
1638
+ attempt: {
1639
+ number: number;
1640
+ startedAt: Date;
1641
+ } & {
1642
+ [k: string]: unknown;
1643
+ };
1644
+ run: {
1645
+ payload: string;
1646
+ id: string;
1647
+ payloadType: string;
1648
+ tags: string[];
1649
+ isTest: boolean;
1650
+ createdAt: Date;
1651
+ startedAt: Date;
1652
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
1653
+ idempotencyKey?: string | undefined;
1654
+ maxAttempts?: number | undefined;
1655
+ version?: string | undefined;
1656
+ maxDuration?: number | undefined;
1657
+ priority?: number | undefined;
1658
+ baseCostInCents?: number | undefined;
1659
+ parentTaskRunId?: string | undefined;
1660
+ rootTaskRunId?: string | undefined;
1661
+ durationMs?: number | undefined;
1662
+ costInCents?: number | undefined;
1663
+ } & {
1664
+ traceContext?: Record<string, unknown> | undefined;
1665
+ };
1666
+ batch?: {
1667
+ id: string;
1668
+ } | undefined;
1669
+ deployment?: {
1670
+ id: string;
1671
+ version: string;
1672
+ shortCode: string;
1673
+ runtime: string;
1674
+ runtimeVersion: string;
1675
+ git?: {
1676
+ dirty?: boolean | undefined;
1677
+ commitAuthorName?: string | undefined;
1678
+ commitMessage?: string | undefined;
1679
+ commitRef?: string | undefined;
1680
+ commitSha?: string | undefined;
1681
+ remoteUrl?: string | undefined;
1682
+ pullRequestNumber?: number | undefined;
1683
+ pullRequestTitle?: string | undefined;
1684
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1685
+ } | undefined;
1686
+ } | undefined;
1687
+ }, {
1688
+ task: {
1689
+ id: string;
1690
+ filePath: string;
1691
+ } & {
1692
+ [k: string]: unknown;
1693
+ };
1694
+ queue: {
1695
+ name: string;
1696
+ id: string;
1697
+ };
1698
+ environment: {
1699
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1700
+ id: string;
1701
+ slug: string;
1702
+ branchName?: string | undefined;
1703
+ git?: {
1704
+ dirty?: boolean | undefined;
1705
+ commitAuthorName?: string | undefined;
1706
+ commitMessage?: string | undefined;
1707
+ commitRef?: string | undefined;
1708
+ commitSha?: string | undefined;
1709
+ remoteUrl?: string | undefined;
1710
+ pullRequestNumber?: number | undefined;
1711
+ pullRequestTitle?: string | undefined;
1712
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1713
+ } | undefined;
1714
+ };
1715
+ organization: {
1716
+ name: string;
1717
+ id: string;
1718
+ slug: string;
1719
+ };
1720
+ project: {
1721
+ name: string;
1722
+ id: string;
1723
+ slug: string;
1724
+ ref: string;
1725
+ };
1726
+ machine: {
1727
+ cpu: number;
1728
+ memory: number;
1729
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1730
+ centsPerMs: number;
1731
+ };
1732
+ attempt: {
1733
+ number: number;
1734
+ startedAt: Date;
1735
+ } & {
1736
+ [k: string]: unknown;
1737
+ };
1738
+ run: {
1739
+ payload: string;
1740
+ id: string;
1741
+ payloadType: string;
1742
+ tags: string[];
1743
+ createdAt: Date;
1744
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
1745
+ isTest?: boolean | undefined;
1746
+ startedAt?: Date | undefined;
1747
+ idempotencyKey?: string | undefined;
1748
+ maxAttempts?: number | undefined;
1749
+ version?: string | undefined;
1750
+ maxDuration?: number | undefined;
1751
+ priority?: number | undefined;
1752
+ baseCostInCents?: number | undefined;
1753
+ parentTaskRunId?: string | undefined;
1754
+ rootTaskRunId?: string | undefined;
1755
+ durationMs?: number | undefined;
1756
+ costInCents?: number | undefined;
1757
+ } & {
1758
+ traceContext?: Record<string, unknown> | undefined;
1759
+ };
1760
+ batch?: {
1761
+ id: string;
1762
+ } | undefined;
1763
+ deployment?: {
1764
+ id: string;
1765
+ version: string;
1766
+ shortCode: string;
1767
+ runtime: string;
1768
+ runtimeVersion: string;
1769
+ git?: {
1770
+ dirty?: boolean | undefined;
1771
+ commitAuthorName?: string | undefined;
1772
+ commitMessage?: string | undefined;
1773
+ commitRef?: string | undefined;
1774
+ commitSha?: string | undefined;
1775
+ remoteUrl?: string | undefined;
1776
+ pullRequestNumber?: number | undefined;
1777
+ pullRequestTitle?: string | undefined;
1778
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
1779
+ } | undefined;
1780
+ } | undefined;
1781
+ }>;
1782
+ export type TaskRunExecution = z.infer<typeof TaskRunExecution>;
1783
+ export declare const V3TaskRunExecutionTask: z.ZodObject<{
1784
+ id: z.ZodString;
1785
+ filePath: z.ZodString;
1786
+ exportName: z.ZodOptional<z.ZodString>;
1787
+ }, "strip", z.ZodTypeAny, {
1788
+ id: string;
1789
+ filePath: string;
1790
+ exportName?: string | undefined;
1791
+ }, {
1792
+ id: string;
1793
+ filePath: string;
1794
+ exportName?: string | undefined;
1795
+ }>;
1796
+ export type V3TaskRunExecutionTask = z.infer<typeof V3TaskRunExecutionTask>;
1797
+ export declare const V3TaskRunExecutionAttempt: z.ZodObject<{
1798
+ number: z.ZodNumber;
1799
+ startedAt: z.ZodDate;
1800
+ id: z.ZodString;
1801
+ backgroundWorkerId: z.ZodString;
1802
+ backgroundWorkerTaskId: z.ZodString;
1803
+ status: z.ZodString;
1804
+ }, "strip", z.ZodTypeAny, {
1805
+ number: number;
1806
+ status: string;
1807
+ id: string;
1808
+ startedAt: Date;
1809
+ backgroundWorkerId: string;
1810
+ backgroundWorkerTaskId: string;
1811
+ }, {
1812
+ number: number;
1813
+ status: string;
1814
+ id: string;
1815
+ startedAt: Date;
1816
+ backgroundWorkerId: string;
1817
+ backgroundWorkerTaskId: string;
1818
+ }>;
1819
+ export type V3TaskRunExecutionAttempt = z.infer<typeof V3TaskRunExecutionAttempt>;
1820
+ export declare const V3TaskRun: z.ZodObject<{
1821
+ id: z.ZodString;
1822
+ payload: z.ZodString;
1823
+ payloadType: z.ZodString;
1824
+ tags: z.ZodArray<z.ZodString, "many">;
1825
+ isTest: z.ZodDefault<z.ZodBoolean>;
1826
+ createdAt: z.ZodDate;
1827
+ startedAt: z.ZodDefault<z.ZodDate>;
1828
+ idempotencyKey: z.ZodOptional<z.ZodString>;
1829
+ maxAttempts: z.ZodOptional<z.ZodNumber>;
1830
+ version: z.ZodOptional<z.ZodString>;
1831
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
1832
+ maxDuration: z.ZodOptional<z.ZodNumber>;
1833
+ context: z.ZodUnknown;
1834
+ durationMs: z.ZodNumber;
1835
+ costInCents: z.ZodNumber;
1836
+ baseCostInCents: z.ZodNumber;
1837
+ }, "strip", z.ZodTypeAny, {
1838
+ payload: string;
1839
+ id: string;
1840
+ payloadType: string;
1841
+ tags: string[];
1842
+ isTest: boolean;
1843
+ createdAt: Date;
1844
+ startedAt: Date;
1845
+ baseCostInCents: number;
1846
+ durationMs: number;
1847
+ costInCents: number;
1848
+ context?: unknown;
1849
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
1850
+ idempotencyKey?: string | undefined;
1851
+ maxAttempts?: number | undefined;
1852
+ version?: string | undefined;
1853
+ maxDuration?: number | undefined;
1854
+ }, {
1855
+ payload: string;
1856
+ id: string;
1857
+ payloadType: string;
1858
+ tags: string[];
1859
+ createdAt: Date;
1860
+ baseCostInCents: number;
1861
+ durationMs: number;
1862
+ costInCents: number;
1863
+ context?: unknown;
1864
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
1865
+ isTest?: boolean | undefined;
1866
+ startedAt?: Date | undefined;
1867
+ idempotencyKey?: string | undefined;
1868
+ maxAttempts?: number | undefined;
1869
+ version?: string | undefined;
1870
+ maxDuration?: number | undefined;
1871
+ }>;
1872
+ export type V3TaskRun = z.infer<typeof V3TaskRun>;
1873
+ export declare const V3TaskRunExecution: z.ZodObject<{
1874
+ task: z.ZodObject<{
1875
+ id: z.ZodString;
1876
+ filePath: z.ZodString;
1877
+ exportName: z.ZodOptional<z.ZodString>;
1878
+ }, "strip", z.ZodTypeAny, {
1879
+ id: string;
1880
+ filePath: string;
1881
+ exportName?: string | undefined;
1882
+ }, {
1883
+ id: string;
1884
+ filePath: string;
1885
+ exportName?: string | undefined;
1886
+ }>;
1887
+ attempt: z.ZodObject<{
1888
+ number: z.ZodNumber;
1889
+ startedAt: z.ZodDate;
1890
+ id: z.ZodString;
1891
+ backgroundWorkerId: z.ZodString;
1892
+ backgroundWorkerTaskId: z.ZodString;
1893
+ status: z.ZodString;
1894
+ }, "strip", z.ZodTypeAny, {
1895
+ number: number;
1896
+ status: string;
1897
+ id: string;
1898
+ startedAt: Date;
1899
+ backgroundWorkerId: string;
1900
+ backgroundWorkerTaskId: string;
1901
+ }, {
1902
+ number: number;
1903
+ status: string;
1904
+ id: string;
1905
+ startedAt: Date;
1906
+ backgroundWorkerId: string;
1907
+ backgroundWorkerTaskId: string;
1908
+ }>;
1909
+ run: z.ZodIntersection<z.ZodObject<{
1910
+ id: z.ZodString;
1911
+ payload: z.ZodString;
1912
+ payloadType: z.ZodString;
1913
+ tags: z.ZodArray<z.ZodString, "many">;
1914
+ isTest: z.ZodDefault<z.ZodBoolean>;
1915
+ createdAt: z.ZodDate;
1916
+ startedAt: z.ZodDefault<z.ZodDate>;
1917
+ idempotencyKey: z.ZodOptional<z.ZodString>;
1918
+ maxAttempts: z.ZodOptional<z.ZodNumber>;
1919
+ version: z.ZodOptional<z.ZodString>;
1920
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
1921
+ maxDuration: z.ZodOptional<z.ZodNumber>;
1922
+ context: z.ZodUnknown;
1923
+ durationMs: z.ZodNumber;
1924
+ costInCents: z.ZodNumber;
1925
+ baseCostInCents: z.ZodNumber;
1926
+ }, "strip", z.ZodTypeAny, {
1927
+ payload: string;
1928
+ id: string;
1929
+ payloadType: string;
1930
+ tags: string[];
1931
+ isTest: boolean;
1932
+ createdAt: Date;
1933
+ startedAt: Date;
1934
+ baseCostInCents: number;
1935
+ durationMs: number;
1936
+ costInCents: number;
1937
+ context?: unknown;
1938
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
1939
+ idempotencyKey?: string | undefined;
1940
+ maxAttempts?: number | undefined;
1941
+ version?: string | undefined;
1942
+ maxDuration?: number | undefined;
1943
+ }, {
1944
+ payload: string;
1945
+ id: string;
1946
+ payloadType: string;
1947
+ tags: string[];
1948
+ createdAt: Date;
1949
+ baseCostInCents: number;
1950
+ durationMs: number;
1951
+ costInCents: number;
1952
+ context?: unknown;
1953
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
1954
+ isTest?: boolean | undefined;
1955
+ startedAt?: Date | undefined;
1956
+ idempotencyKey?: string | undefined;
1957
+ maxAttempts?: number | undefined;
1958
+ version?: string | undefined;
1959
+ maxDuration?: number | undefined;
1960
+ }>, z.ZodObject<{
1961
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1962
+ }, "strip", z.ZodTypeAny, {
1963
+ traceContext?: Record<string, unknown> | undefined;
1964
+ }, {
1965
+ traceContext?: Record<string, unknown> | undefined;
1966
+ }>>;
1967
+ queue: z.ZodObject<{
1968
+ id: z.ZodString;
1969
+ name: z.ZodString;
1970
+ }, "strip", z.ZodTypeAny, {
1971
+ name: string;
1972
+ id: string;
1973
+ }, {
1974
+ name: string;
1975
+ id: string;
1976
+ }>;
1977
+ environment: z.ZodObject<{
1978
+ id: z.ZodString;
1979
+ slug: z.ZodString;
1980
+ type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
1981
+ branchName: z.ZodOptional<z.ZodString>;
1982
+ git: z.ZodOptional<z.ZodObject<{
1983
+ commitAuthorName: z.ZodOptional<z.ZodString>;
1984
+ commitMessage: z.ZodOptional<z.ZodString>;
1985
+ commitRef: z.ZodOptional<z.ZodString>;
1986
+ commitSha: z.ZodOptional<z.ZodString>;
1987
+ dirty: z.ZodOptional<z.ZodBoolean>;
1988
+ remoteUrl: z.ZodOptional<z.ZodString>;
1989
+ pullRequestNumber: z.ZodOptional<z.ZodNumber>;
1990
+ pullRequestTitle: z.ZodOptional<z.ZodString>;
1991
+ pullRequestState: z.ZodOptional<z.ZodEnum<["open", "closed", "merged"]>>;
1992
+ }, "strip", z.ZodTypeAny, {
1993
+ dirty?: boolean | undefined;
1994
+ commitAuthorName?: string | undefined;
1995
+ commitMessage?: string | undefined;
1996
+ commitRef?: string | undefined;
1997
+ commitSha?: string | undefined;
1998
+ remoteUrl?: string | undefined;
1999
+ pullRequestNumber?: number | undefined;
2000
+ pullRequestTitle?: string | undefined;
2001
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2002
+ }, {
2003
+ dirty?: boolean | undefined;
2004
+ commitAuthorName?: string | undefined;
2005
+ commitMessage?: string | undefined;
2006
+ commitRef?: string | undefined;
2007
+ commitSha?: string | undefined;
2008
+ remoteUrl?: string | undefined;
2009
+ pullRequestNumber?: number | undefined;
2010
+ pullRequestTitle?: string | undefined;
2011
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2012
+ }>>;
2013
+ }, "strip", z.ZodTypeAny, {
2014
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
2015
+ id: string;
2016
+ slug: string;
2017
+ branchName?: string | undefined;
2018
+ git?: {
2019
+ dirty?: boolean | undefined;
2020
+ commitAuthorName?: string | undefined;
2021
+ commitMessage?: string | undefined;
2022
+ commitRef?: string | undefined;
2023
+ commitSha?: string | undefined;
2024
+ remoteUrl?: string | undefined;
2025
+ pullRequestNumber?: number | undefined;
2026
+ pullRequestTitle?: string | undefined;
2027
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2028
+ } | undefined;
2029
+ }, {
2030
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
2031
+ id: string;
2032
+ slug: string;
2033
+ branchName?: string | undefined;
2034
+ git?: {
2035
+ dirty?: boolean | undefined;
2036
+ commitAuthorName?: string | undefined;
2037
+ commitMessage?: string | undefined;
2038
+ commitRef?: string | undefined;
2039
+ commitSha?: string | undefined;
2040
+ remoteUrl?: string | undefined;
2041
+ pullRequestNumber?: number | undefined;
2042
+ pullRequestTitle?: string | undefined;
2043
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2044
+ } | undefined;
2045
+ }>;
2046
+ organization: z.ZodObject<{
2047
+ id: z.ZodString;
2048
+ slug: z.ZodString;
2049
+ name: z.ZodString;
2050
+ }, "strip", z.ZodTypeAny, {
2051
+ name: string;
2052
+ id: string;
2053
+ slug: string;
2054
+ }, {
2055
+ name: string;
2056
+ id: string;
2057
+ slug: string;
2058
+ }>;
2059
+ project: z.ZodObject<{
2060
+ id: z.ZodString;
2061
+ ref: z.ZodString;
2062
+ slug: z.ZodString;
2063
+ name: z.ZodString;
2064
+ }, "strip", z.ZodTypeAny, {
2065
+ name: string;
2066
+ id: string;
2067
+ slug: string;
2068
+ ref: string;
2069
+ }, {
2070
+ name: string;
2071
+ id: string;
2072
+ slug: string;
2073
+ ref: string;
2074
+ }>;
2075
+ machine: z.ZodObject<{
2076
+ name: z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>;
2077
+ /** unit: vCPU */
2078
+ cpu: z.ZodNumber;
2079
+ /** unit: GB */
2080
+ memory: z.ZodNumber;
2081
+ centsPerMs: z.ZodNumber;
2082
+ }, "strip", z.ZodTypeAny, {
2083
+ cpu: number;
2084
+ memory: number;
2085
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2086
+ centsPerMs: number;
2087
+ }, {
2088
+ cpu: number;
2089
+ memory: number;
2090
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2091
+ centsPerMs: number;
2092
+ }>;
2093
+ batch: z.ZodOptional<z.ZodObject<{
2094
+ id: z.ZodString;
2095
+ }, "strip", z.ZodTypeAny, {
2096
+ id: string;
2097
+ }, {
2098
+ id: string;
2099
+ }>>;
2100
+ }, "strip", z.ZodTypeAny, {
2101
+ task: {
2102
+ id: string;
2103
+ filePath: string;
2104
+ exportName?: string | undefined;
2105
+ };
2106
+ queue: {
2107
+ name: string;
2108
+ id: string;
2109
+ };
2110
+ environment: {
2111
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
2112
+ id: string;
2113
+ slug: string;
2114
+ branchName?: string | undefined;
2115
+ git?: {
2116
+ dirty?: boolean | undefined;
2117
+ commitAuthorName?: string | undefined;
2118
+ commitMessage?: string | undefined;
2119
+ commitRef?: string | undefined;
2120
+ commitSha?: string | undefined;
2121
+ remoteUrl?: string | undefined;
2122
+ pullRequestNumber?: number | undefined;
2123
+ pullRequestTitle?: string | undefined;
2124
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2125
+ } | undefined;
2126
+ };
2127
+ organization: {
2128
+ name: string;
2129
+ id: string;
2130
+ slug: string;
2131
+ };
2132
+ project: {
2133
+ name: string;
2134
+ id: string;
2135
+ slug: string;
2136
+ ref: string;
2137
+ };
2138
+ machine: {
2139
+ cpu: number;
2140
+ memory: number;
2141
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2142
+ centsPerMs: number;
2143
+ };
2144
+ attempt: {
2145
+ number: number;
2146
+ status: string;
2147
+ id: string;
2148
+ startedAt: Date;
2149
+ backgroundWorkerId: string;
2150
+ backgroundWorkerTaskId: string;
2151
+ };
2152
+ run: {
2153
+ payload: string;
2154
+ id: string;
2155
+ payloadType: string;
2156
+ tags: string[];
2157
+ isTest: boolean;
2158
+ createdAt: Date;
2159
+ startedAt: Date;
2160
+ baseCostInCents: number;
2161
+ durationMs: number;
2162
+ costInCents: number;
2163
+ context?: unknown;
2164
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
2165
+ idempotencyKey?: string | undefined;
2166
+ maxAttempts?: number | undefined;
2167
+ version?: string | undefined;
2168
+ maxDuration?: number | undefined;
2169
+ } & {
2170
+ traceContext?: Record<string, unknown> | undefined;
2171
+ };
2172
+ batch?: {
2173
+ id: string;
2174
+ } | undefined;
2175
+ }, {
2176
+ task: {
2177
+ id: string;
2178
+ filePath: string;
2179
+ exportName?: string | undefined;
2180
+ };
2181
+ queue: {
2182
+ name: string;
2183
+ id: string;
2184
+ };
2185
+ environment: {
2186
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
2187
+ id: string;
2188
+ slug: string;
2189
+ branchName?: string | undefined;
2190
+ git?: {
2191
+ dirty?: boolean | undefined;
2192
+ commitAuthorName?: string | undefined;
2193
+ commitMessage?: string | undefined;
2194
+ commitRef?: string | undefined;
2195
+ commitSha?: string | undefined;
2196
+ remoteUrl?: string | undefined;
2197
+ pullRequestNumber?: number | undefined;
2198
+ pullRequestTitle?: string | undefined;
2199
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2200
+ } | undefined;
2201
+ };
2202
+ organization: {
2203
+ name: string;
2204
+ id: string;
2205
+ slug: string;
2206
+ };
2207
+ project: {
2208
+ name: string;
2209
+ id: string;
2210
+ slug: string;
2211
+ ref: string;
2212
+ };
2213
+ machine: {
2214
+ cpu: number;
2215
+ memory: number;
2216
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2217
+ centsPerMs: number;
2218
+ };
2219
+ attempt: {
2220
+ number: number;
2221
+ status: string;
2222
+ id: string;
2223
+ startedAt: Date;
2224
+ backgroundWorkerId: string;
2225
+ backgroundWorkerTaskId: string;
2226
+ };
2227
+ run: {
2228
+ payload: string;
2229
+ id: string;
2230
+ payloadType: string;
2231
+ tags: string[];
2232
+ createdAt: Date;
2233
+ baseCostInCents: number;
2234
+ durationMs: number;
2235
+ costInCents: number;
2236
+ context?: unknown;
2237
+ metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
2238
+ isTest?: boolean | undefined;
2239
+ startedAt?: Date | undefined;
2240
+ idempotencyKey?: string | undefined;
2241
+ maxAttempts?: number | undefined;
2242
+ version?: string | undefined;
2243
+ maxDuration?: number | undefined;
2244
+ } & {
1189
2245
  traceContext?: Record<string, unknown> | undefined;
1190
2246
  };
2247
+ batch?: {
2248
+ id: string;
2249
+ } | undefined;
2250
+ }>;
2251
+ export type V3TaskRunExecution = z.infer<typeof V3TaskRunExecution>;
2252
+ export declare const TaskRunContext: z.ZodObject<{
2253
+ task: z.ZodObject<{
2254
+ id: z.ZodString;
2255
+ filePath: z.ZodString;
2256
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2257
+ id: z.ZodString;
2258
+ filePath: z.ZodString;
2259
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2260
+ id: z.ZodString;
2261
+ filePath: z.ZodString;
2262
+ }, z.ZodTypeAny, "passthrough">>;
2263
+ queue: z.ZodObject<{
2264
+ id: z.ZodString;
2265
+ name: z.ZodString;
2266
+ }, "strip", z.ZodTypeAny, {
2267
+ name: string;
2268
+ id: string;
2269
+ }, {
2270
+ name: string;
2271
+ id: string;
2272
+ }>;
2273
+ environment: z.ZodObject<{
2274
+ id: z.ZodString;
2275
+ slug: z.ZodString;
2276
+ type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
2277
+ branchName: z.ZodOptional<z.ZodString>;
2278
+ git: z.ZodOptional<z.ZodObject<{
2279
+ commitAuthorName: z.ZodOptional<z.ZodString>;
2280
+ commitMessage: z.ZodOptional<z.ZodString>;
2281
+ commitRef: z.ZodOptional<z.ZodString>;
2282
+ commitSha: z.ZodOptional<z.ZodString>;
2283
+ dirty: z.ZodOptional<z.ZodBoolean>;
2284
+ remoteUrl: z.ZodOptional<z.ZodString>;
2285
+ pullRequestNumber: z.ZodOptional<z.ZodNumber>;
2286
+ pullRequestTitle: z.ZodOptional<z.ZodString>;
2287
+ pullRequestState: z.ZodOptional<z.ZodEnum<["open", "closed", "merged"]>>;
2288
+ }, "strip", z.ZodTypeAny, {
2289
+ dirty?: boolean | undefined;
2290
+ commitAuthorName?: string | undefined;
2291
+ commitMessage?: string | undefined;
2292
+ commitRef?: string | undefined;
2293
+ commitSha?: string | undefined;
2294
+ remoteUrl?: string | undefined;
2295
+ pullRequestNumber?: number | undefined;
2296
+ pullRequestTitle?: string | undefined;
2297
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2298
+ }, {
2299
+ dirty?: boolean | undefined;
2300
+ commitAuthorName?: string | undefined;
2301
+ commitMessage?: string | undefined;
2302
+ commitRef?: string | undefined;
2303
+ commitSha?: string | undefined;
2304
+ remoteUrl?: string | undefined;
2305
+ pullRequestNumber?: number | undefined;
2306
+ pullRequestTitle?: string | undefined;
2307
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2308
+ }>>;
2309
+ }, "strip", z.ZodTypeAny, {
2310
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
2311
+ id: string;
2312
+ slug: string;
2313
+ branchName?: string | undefined;
2314
+ git?: {
2315
+ dirty?: boolean | undefined;
2316
+ commitAuthorName?: string | undefined;
2317
+ commitMessage?: string | undefined;
2318
+ commitRef?: string | undefined;
2319
+ commitSha?: string | undefined;
2320
+ remoteUrl?: string | undefined;
2321
+ pullRequestNumber?: number | undefined;
2322
+ pullRequestTitle?: string | undefined;
2323
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2324
+ } | undefined;
2325
+ }, {
2326
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
2327
+ id: string;
2328
+ slug: string;
2329
+ branchName?: string | undefined;
2330
+ git?: {
2331
+ dirty?: boolean | undefined;
2332
+ commitAuthorName?: string | undefined;
2333
+ commitMessage?: string | undefined;
2334
+ commitRef?: string | undefined;
2335
+ commitSha?: string | undefined;
2336
+ remoteUrl?: string | undefined;
2337
+ pullRequestNumber?: number | undefined;
2338
+ pullRequestTitle?: string | undefined;
2339
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2340
+ } | undefined;
2341
+ }>;
2342
+ organization: z.ZodObject<{
2343
+ id: z.ZodString;
2344
+ slug: z.ZodString;
2345
+ name: z.ZodString;
2346
+ }, "strip", z.ZodTypeAny, {
2347
+ name: string;
2348
+ id: string;
2349
+ slug: string;
2350
+ }, {
2351
+ name: string;
2352
+ id: string;
2353
+ slug: string;
2354
+ }>;
2355
+ project: z.ZodObject<{
2356
+ id: z.ZodString;
2357
+ ref: z.ZodString;
2358
+ slug: z.ZodString;
2359
+ name: z.ZodString;
2360
+ }, "strip", z.ZodTypeAny, {
2361
+ name: string;
2362
+ id: string;
2363
+ slug: string;
2364
+ ref: string;
2365
+ }, {
2366
+ name: string;
2367
+ id: string;
2368
+ slug: string;
2369
+ ref: string;
2370
+ }>;
2371
+ machine: z.ZodObject<{
2372
+ name: z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>;
2373
+ /** unit: vCPU */
2374
+ cpu: z.ZodNumber;
2375
+ /** unit: GB */
2376
+ memory: z.ZodNumber;
2377
+ centsPerMs: z.ZodNumber;
2378
+ }, "strip", z.ZodTypeAny, {
2379
+ cpu: number;
2380
+ memory: number;
2381
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2382
+ centsPerMs: number;
2383
+ }, {
2384
+ cpu: number;
2385
+ memory: number;
2386
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2387
+ centsPerMs: number;
2388
+ }>;
2389
+ batch: z.ZodOptional<z.ZodObject<{
2390
+ id: z.ZodString;
2391
+ }, "strip", z.ZodTypeAny, {
2392
+ id: string;
2393
+ }, {
2394
+ id: string;
2395
+ }>>;
2396
+ deployment: z.ZodOptional<z.ZodObject<{
2397
+ id: z.ZodString;
2398
+ shortCode: z.ZodString;
2399
+ version: z.ZodString;
2400
+ runtime: z.ZodString;
2401
+ runtimeVersion: z.ZodString;
2402
+ git: z.ZodOptional<z.ZodObject<{
2403
+ commitAuthorName: z.ZodOptional<z.ZodString>;
2404
+ commitMessage: z.ZodOptional<z.ZodString>;
2405
+ commitRef: z.ZodOptional<z.ZodString>;
2406
+ commitSha: z.ZodOptional<z.ZodString>;
2407
+ dirty: z.ZodOptional<z.ZodBoolean>;
2408
+ remoteUrl: z.ZodOptional<z.ZodString>;
2409
+ pullRequestNumber: z.ZodOptional<z.ZodNumber>;
2410
+ pullRequestTitle: z.ZodOptional<z.ZodString>;
2411
+ pullRequestState: z.ZodOptional<z.ZodEnum<["open", "closed", "merged"]>>;
2412
+ }, "strip", z.ZodTypeAny, {
2413
+ dirty?: boolean | undefined;
2414
+ commitAuthorName?: string | undefined;
2415
+ commitMessage?: string | undefined;
2416
+ commitRef?: string | undefined;
2417
+ commitSha?: string | undefined;
2418
+ remoteUrl?: string | undefined;
2419
+ pullRequestNumber?: number | undefined;
2420
+ pullRequestTitle?: string | undefined;
2421
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2422
+ }, {
2423
+ dirty?: boolean | undefined;
2424
+ commitAuthorName?: string | undefined;
2425
+ commitMessage?: string | undefined;
2426
+ commitRef?: string | undefined;
2427
+ commitSha?: string | undefined;
2428
+ remoteUrl?: string | undefined;
2429
+ pullRequestNumber?: number | undefined;
2430
+ pullRequestTitle?: string | undefined;
2431
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2432
+ }>>;
2433
+ }, "strip", z.ZodTypeAny, {
2434
+ id: string;
2435
+ version: string;
2436
+ shortCode: string;
2437
+ runtime: string;
2438
+ runtimeVersion: string;
2439
+ git?: {
2440
+ dirty?: boolean | undefined;
2441
+ commitAuthorName?: string | undefined;
2442
+ commitMessage?: string | undefined;
2443
+ commitRef?: string | undefined;
2444
+ commitSha?: string | undefined;
2445
+ remoteUrl?: string | undefined;
2446
+ pullRequestNumber?: number | undefined;
2447
+ pullRequestTitle?: string | undefined;
2448
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2449
+ } | undefined;
2450
+ }, {
2451
+ id: string;
2452
+ version: string;
2453
+ shortCode: string;
2454
+ runtime: string;
2455
+ runtimeVersion: string;
2456
+ git?: {
2457
+ dirty?: boolean | undefined;
2458
+ commitAuthorName?: string | undefined;
2459
+ commitMessage?: string | undefined;
2460
+ commitRef?: string | undefined;
2461
+ commitSha?: string | undefined;
2462
+ remoteUrl?: string | undefined;
2463
+ pullRequestNumber?: number | undefined;
2464
+ pullRequestTitle?: string | undefined;
2465
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2466
+ } | undefined;
2467
+ }>>;
2468
+ attempt: z.ZodObject<{
2469
+ number: z.ZodNumber;
2470
+ startedAt: z.ZodDate;
2471
+ }, "strip", z.ZodTypeAny, {
2472
+ number: number;
2473
+ startedAt: Date;
2474
+ }, {
2475
+ number: number;
2476
+ startedAt: Date;
2477
+ }>;
2478
+ run: z.ZodObject<Omit<{
2479
+ id: z.ZodString;
2480
+ payload: z.ZodString;
2481
+ payloadType: z.ZodString;
2482
+ tags: z.ZodArray<z.ZodString, "many">;
2483
+ isTest: z.ZodDefault<z.ZodBoolean>;
2484
+ createdAt: z.ZodDate;
2485
+ startedAt: z.ZodDefault<z.ZodDate>;
2486
+ idempotencyKey: z.ZodOptional<z.ZodString>;
2487
+ maxAttempts: z.ZodOptional<z.ZodNumber>;
2488
+ version: z.ZodOptional<z.ZodString>;
2489
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
2490
+ maxDuration: z.ZodOptional<z.ZodNumber>;
2491
+ /** The priority of the run. Wih a value of 10 it will be dequeued before runs that were triggered 9 seconds before it (assuming they had no priority set). */
2492
+ priority: z.ZodOptional<z.ZodNumber>;
2493
+ baseCostInCents: z.ZodOptional<z.ZodNumber>;
2494
+ parentTaskRunId: z.ZodOptional<z.ZodString>;
2495
+ rootTaskRunId: z.ZodOptional<z.ZodString>;
2496
+ durationMs: z.ZodOptional<z.ZodNumber>;
2497
+ costInCents: z.ZodOptional<z.ZodNumber>;
2498
+ }, "payload" | "metadata" | "payloadType" | "durationMs" | "costInCents">, "strip", z.ZodTypeAny, {
2499
+ id: string;
2500
+ tags: string[];
2501
+ isTest: boolean;
2502
+ createdAt: Date;
2503
+ startedAt: Date;
2504
+ idempotencyKey?: string | undefined;
2505
+ maxAttempts?: number | undefined;
2506
+ version?: string | undefined;
2507
+ maxDuration?: number | undefined;
2508
+ priority?: number | undefined;
2509
+ baseCostInCents?: number | undefined;
2510
+ parentTaskRunId?: string | undefined;
2511
+ rootTaskRunId?: string | undefined;
2512
+ }, {
2513
+ id: string;
2514
+ tags: string[];
2515
+ createdAt: Date;
2516
+ isTest?: boolean | undefined;
2517
+ startedAt?: Date | undefined;
2518
+ idempotencyKey?: string | undefined;
2519
+ maxAttempts?: number | undefined;
2520
+ version?: string | undefined;
2521
+ maxDuration?: number | undefined;
2522
+ priority?: number | undefined;
2523
+ baseCostInCents?: number | undefined;
2524
+ parentTaskRunId?: string | undefined;
2525
+ rootTaskRunId?: string | undefined;
2526
+ }>;
2527
+ }, "strip", z.ZodTypeAny, {
2528
+ task: {
2529
+ id: string;
2530
+ filePath: string;
2531
+ } & {
2532
+ [k: string]: unknown;
2533
+ };
1191
2534
  queue: {
1192
2535
  name: string;
1193
2536
  id: string;
@@ -1226,43 +2569,52 @@ export declare const TaskRunExecution: z.ZodObject<{
1226
2569
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1227
2570
  centsPerMs: number;
1228
2571
  };
1229
- batch?: {
1230
- id: string;
1231
- } | undefined;
1232
- }, {
1233
- task: {
1234
- id: string;
1235
- filePath: string;
1236
- exportName?: string | undefined;
1237
- };
1238
2572
  attempt: {
1239
2573
  number: number;
1240
- status: string;
1241
- id: string;
1242
2574
  startedAt: Date;
1243
- backgroundWorkerId: string;
1244
- backgroundWorkerTaskId: string;
1245
2575
  };
1246
2576
  run: {
1247
- payload: string;
1248
2577
  id: string;
1249
- payloadType: string;
1250
2578
  tags: string[];
2579
+ isTest: boolean;
1251
2580
  createdAt: Date;
1252
- context?: any;
1253
- metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
1254
- isTest?: boolean | undefined;
1255
- startedAt?: Date | undefined;
2581
+ startedAt: Date;
1256
2582
  idempotencyKey?: string | undefined;
1257
2583
  maxAttempts?: number | undefined;
1258
2584
  version?: string | undefined;
1259
2585
  maxDuration?: number | undefined;
1260
- durationMs?: number | undefined;
1261
- costInCents?: number | undefined;
1262
- baseCostInCents?: number | undefined;
1263
2586
  priority?: number | undefined;
2587
+ baseCostInCents?: number | undefined;
2588
+ parentTaskRunId?: string | undefined;
2589
+ rootTaskRunId?: string | undefined;
2590
+ };
2591
+ batch?: {
2592
+ id: string;
2593
+ } | undefined;
2594
+ deployment?: {
2595
+ id: string;
2596
+ version: string;
2597
+ shortCode: string;
2598
+ runtime: string;
2599
+ runtimeVersion: string;
2600
+ git?: {
2601
+ dirty?: boolean | undefined;
2602
+ commitAuthorName?: string | undefined;
2603
+ commitMessage?: string | undefined;
2604
+ commitRef?: string | undefined;
2605
+ commitSha?: string | undefined;
2606
+ remoteUrl?: string | undefined;
2607
+ pullRequestNumber?: number | undefined;
2608
+ pullRequestTitle?: string | undefined;
2609
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2610
+ } | undefined;
2611
+ } | undefined;
2612
+ }, {
2613
+ task: {
2614
+ id: string;
2615
+ filePath: string;
1264
2616
  } & {
1265
- traceContext?: Record<string, unknown> | undefined;
2617
+ [k: string]: unknown;
1266
2618
  };
1267
2619
  queue: {
1268
2620
  name: string;
@@ -1302,35 +2654,69 @@ export declare const TaskRunExecution: z.ZodObject<{
1302
2654
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1303
2655
  centsPerMs: number;
1304
2656
  };
2657
+ attempt: {
2658
+ number: number;
2659
+ startedAt: Date;
2660
+ };
2661
+ run: {
2662
+ id: string;
2663
+ tags: string[];
2664
+ createdAt: Date;
2665
+ isTest?: boolean | undefined;
2666
+ startedAt?: Date | undefined;
2667
+ idempotencyKey?: string | undefined;
2668
+ maxAttempts?: number | undefined;
2669
+ version?: string | undefined;
2670
+ maxDuration?: number | undefined;
2671
+ priority?: number | undefined;
2672
+ baseCostInCents?: number | undefined;
2673
+ parentTaskRunId?: string | undefined;
2674
+ rootTaskRunId?: string | undefined;
2675
+ };
1305
2676
  batch?: {
1306
2677
  id: string;
1307
2678
  } | undefined;
1308
- }>;
1309
- export type TaskRunExecution = z.infer<typeof TaskRunExecution>;
1310
- export declare const TaskRunContext: z.ZodObject<{
1311
- task: z.ZodObject<{
1312
- id: z.ZodString;
1313
- filePath: z.ZodString;
1314
- exportName: z.ZodOptional<z.ZodString>;
1315
- }, "strip", z.ZodTypeAny, {
1316
- id: string;
1317
- filePath: string;
1318
- exportName?: string | undefined;
1319
- }, {
2679
+ deployment?: {
1320
2680
  id: string;
1321
- filePath: string;
1322
- exportName?: string | undefined;
1323
- }>;
2681
+ version: string;
2682
+ shortCode: string;
2683
+ runtime: string;
2684
+ runtimeVersion: string;
2685
+ git?: {
2686
+ dirty?: boolean | undefined;
2687
+ commitAuthorName?: string | undefined;
2688
+ commitMessage?: string | undefined;
2689
+ commitRef?: string | undefined;
2690
+ commitSha?: string | undefined;
2691
+ remoteUrl?: string | undefined;
2692
+ pullRequestNumber?: number | undefined;
2693
+ pullRequestTitle?: string | undefined;
2694
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
2695
+ } | undefined;
2696
+ } | undefined;
2697
+ }>;
2698
+ export type TaskRunContext = z.infer<typeof TaskRunContext>;
2699
+ export declare const V3TaskRunExecutionEnvironment: z.ZodObject<{
2700
+ id: z.ZodString;
2701
+ slug: z.ZodString;
2702
+ type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
2703
+ }, "strip", z.ZodTypeAny, {
2704
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
2705
+ id: string;
2706
+ slug: string;
2707
+ }, {
2708
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
2709
+ id: string;
2710
+ slug: string;
2711
+ }>;
2712
+ export type V3TaskRunExecutionEnvironment = z.infer<typeof V3TaskRunExecutionEnvironment>;
2713
+ export declare const V3TaskRunContext: z.ZodObject<{
1324
2714
  attempt: z.ZodObject<Omit<{
1325
2715
  number: z.ZodNumber;
1326
2716
  startedAt: z.ZodDate;
1327
- /** @deprecated */
1328
2717
  id: z.ZodString;
1329
- /** @deprecated */
1330
2718
  backgroundWorkerId: z.ZodString;
1331
- /** @deprecated */
1332
2719
  backgroundWorkerTaskId: z.ZodString;
1333
- /** @deprecated */
1334
2720
  status: z.ZodString;
1335
2721
  }, "backgroundWorkerId" | "backgroundWorkerTaskId">, "strip", z.ZodTypeAny, {
1336
2722
  number: number;
@@ -1356,55 +2742,51 @@ export declare const TaskRunContext: z.ZodObject<{
1356
2742
  version: z.ZodOptional<z.ZodString>;
1357
2743
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
1358
2744
  maxDuration: z.ZodOptional<z.ZodNumber>;
1359
- /** @deprecated */
1360
- context: z.ZodAny;
1361
- /**
1362
- * @deprecated For live values use the `usage` SDK functions
1363
- * @link https://trigger.dev/docs/run-usage
1364
- */
1365
- durationMs: z.ZodDefault<z.ZodNumber>;
1366
- /**
1367
- * @deprecated For live values use the `usage` SDK functions
1368
- * @link https://trigger.dev/docs/run-usage
1369
- */
1370
- costInCents: z.ZodDefault<z.ZodNumber>;
1371
- /**
1372
- * @deprecated For live values use the `usage` SDK functions
1373
- * @link https://trigger.dev/docs/run-usage
1374
- */
1375
- baseCostInCents: z.ZodDefault<z.ZodNumber>;
1376
- /** The priority of the run. Wih a value of 10 it will be dequeued before runs that were triggered 9 seconds before it (assuming they had no priority set). */
1377
- priority: z.ZodOptional<z.ZodNumber>;
2745
+ context: z.ZodUnknown;
2746
+ durationMs: z.ZodNumber;
2747
+ costInCents: z.ZodNumber;
2748
+ baseCostInCents: z.ZodNumber;
1378
2749
  }, "payload" | "metadata" | "payloadType">, "strip", z.ZodTypeAny, {
1379
2750
  id: string;
1380
2751
  tags: string[];
1381
2752
  isTest: boolean;
1382
2753
  createdAt: Date;
1383
2754
  startedAt: Date;
2755
+ baseCostInCents: number;
1384
2756
  durationMs: number;
1385
2757
  costInCents: number;
1386
- baseCostInCents: number;
1387
- context?: any;
2758
+ context?: unknown;
1388
2759
  idempotencyKey?: string | undefined;
1389
2760
  maxAttempts?: number | undefined;
1390
2761
  version?: string | undefined;
1391
2762
  maxDuration?: number | undefined;
1392
- priority?: number | undefined;
1393
2763
  }, {
1394
2764
  id: string;
1395
2765
  tags: string[];
1396
2766
  createdAt: Date;
1397
- context?: any;
2767
+ baseCostInCents: number;
2768
+ durationMs: number;
2769
+ costInCents: number;
2770
+ context?: unknown;
1398
2771
  isTest?: boolean | undefined;
1399
2772
  startedAt?: Date | undefined;
1400
2773
  idempotencyKey?: string | undefined;
1401
2774
  maxAttempts?: number | undefined;
1402
2775
  version?: string | undefined;
1403
2776
  maxDuration?: number | undefined;
1404
- durationMs?: number | undefined;
1405
- costInCents?: number | undefined;
1406
- baseCostInCents?: number | undefined;
1407
- priority?: number | undefined;
2777
+ }>;
2778
+ task: z.ZodObject<{
2779
+ id: z.ZodString;
2780
+ filePath: z.ZodString;
2781
+ exportName: z.ZodOptional<z.ZodString>;
2782
+ }, "strip", z.ZodTypeAny, {
2783
+ id: string;
2784
+ filePath: string;
2785
+ exportName?: string | undefined;
2786
+ }, {
2787
+ id: string;
2788
+ filePath: string;
2789
+ exportName?: string | undefined;
1408
2790
  }>;
1409
2791
  queue: z.ZodObject<{
1410
2792
  id: z.ZodString;
@@ -1420,70 +2802,14 @@ export declare const TaskRunContext: z.ZodObject<{
1420
2802
  id: z.ZodString;
1421
2803
  slug: z.ZodString;
1422
2804
  type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
1423
- branchName: z.ZodOptional<z.ZodString>;
1424
- git: z.ZodOptional<z.ZodObject<{
1425
- commitAuthorName: z.ZodOptional<z.ZodString>;
1426
- commitMessage: z.ZodOptional<z.ZodString>;
1427
- commitRef: z.ZodOptional<z.ZodString>;
1428
- commitSha: z.ZodOptional<z.ZodString>;
1429
- dirty: z.ZodOptional<z.ZodBoolean>;
1430
- remoteUrl: z.ZodOptional<z.ZodString>;
1431
- pullRequestNumber: z.ZodOptional<z.ZodNumber>;
1432
- pullRequestTitle: z.ZodOptional<z.ZodString>;
1433
- pullRequestState: z.ZodOptional<z.ZodEnum<["open", "closed", "merged"]>>;
1434
- }, "strip", z.ZodTypeAny, {
1435
- dirty?: boolean | undefined;
1436
- commitAuthorName?: string | undefined;
1437
- commitMessage?: string | undefined;
1438
- commitRef?: string | undefined;
1439
- commitSha?: string | undefined;
1440
- remoteUrl?: string | undefined;
1441
- pullRequestNumber?: number | undefined;
1442
- pullRequestTitle?: string | undefined;
1443
- pullRequestState?: "open" | "closed" | "merged" | undefined;
1444
- }, {
1445
- dirty?: boolean | undefined;
1446
- commitAuthorName?: string | undefined;
1447
- commitMessage?: string | undefined;
1448
- commitRef?: string | undefined;
1449
- commitSha?: string | undefined;
1450
- remoteUrl?: string | undefined;
1451
- pullRequestNumber?: number | undefined;
1452
- pullRequestTitle?: string | undefined;
1453
- pullRequestState?: "open" | "closed" | "merged" | undefined;
1454
- }>>;
1455
2805
  }, "strip", z.ZodTypeAny, {
1456
2806
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1457
2807
  id: string;
1458
2808
  slug: string;
1459
- branchName?: string | undefined;
1460
- git?: {
1461
- dirty?: boolean | undefined;
1462
- commitAuthorName?: string | undefined;
1463
- commitMessage?: string | undefined;
1464
- commitRef?: string | undefined;
1465
- commitSha?: string | undefined;
1466
- remoteUrl?: string | undefined;
1467
- pullRequestNumber?: number | undefined;
1468
- pullRequestTitle?: string | undefined;
1469
- pullRequestState?: "open" | "closed" | "merged" | undefined;
1470
- } | undefined;
1471
2809
  }, {
1472
2810
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1473
2811
  id: string;
1474
2812
  slug: string;
1475
- branchName?: string | undefined;
1476
- git?: {
1477
- dirty?: boolean | undefined;
1478
- commitAuthorName?: string | undefined;
1479
- commitMessage?: string | undefined;
1480
- commitRef?: string | undefined;
1481
- commitSha?: string | undefined;
1482
- remoteUrl?: string | undefined;
1483
- pullRequestNumber?: number | undefined;
1484
- pullRequestTitle?: string | undefined;
1485
- pullRequestState?: "open" | "closed" | "merged" | undefined;
1486
- } | undefined;
1487
2813
  }>;
1488
2814
  organization: z.ZodObject<{
1489
2815
  id: z.ZodString;
@@ -1545,28 +2871,6 @@ export declare const TaskRunContext: z.ZodObject<{
1545
2871
  filePath: string;
1546
2872
  exportName?: string | undefined;
1547
2873
  };
1548
- attempt: {
1549
- number: number;
1550
- status: string;
1551
- id: string;
1552
- startedAt: Date;
1553
- };
1554
- run: {
1555
- id: string;
1556
- tags: string[];
1557
- isTest: boolean;
1558
- createdAt: Date;
1559
- startedAt: Date;
1560
- durationMs: number;
1561
- costInCents: number;
1562
- baseCostInCents: number;
1563
- context?: any;
1564
- idempotencyKey?: string | undefined;
1565
- maxAttempts?: number | undefined;
1566
- version?: string | undefined;
1567
- maxDuration?: number | undefined;
1568
- priority?: number | undefined;
1569
- };
1570
2874
  queue: {
1571
2875
  name: string;
1572
2876
  id: string;
@@ -1575,18 +2879,6 @@ export declare const TaskRunContext: z.ZodObject<{
1575
2879
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1576
2880
  id: string;
1577
2881
  slug: string;
1578
- branchName?: string | undefined;
1579
- git?: {
1580
- dirty?: boolean | undefined;
1581
- commitAuthorName?: string | undefined;
1582
- commitMessage?: string | undefined;
1583
- commitRef?: string | undefined;
1584
- commitSha?: string | undefined;
1585
- remoteUrl?: string | undefined;
1586
- pullRequestNumber?: number | undefined;
1587
- pullRequestTitle?: string | undefined;
1588
- pullRequestState?: "open" | "closed" | "merged" | undefined;
1589
- } | undefined;
1590
2882
  };
1591
2883
  organization: {
1592
2884
  name: string;
@@ -1599,21 +2891,6 @@ export declare const TaskRunContext: z.ZodObject<{
1599
2891
  slug: string;
1600
2892
  ref: string;
1601
2893
  };
1602
- batch?: {
1603
- id: string;
1604
- } | undefined;
1605
- machine?: {
1606
- cpu: number;
1607
- memory: number;
1608
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1609
- centsPerMs: number;
1610
- } | undefined;
1611
- }, {
1612
- task: {
1613
- id: string;
1614
- filePath: string;
1615
- exportName?: string | undefined;
1616
- };
1617
2894
  attempt: {
1618
2895
  number: number;
1619
2896
  status: string;
@@ -1623,18 +2900,32 @@ export declare const TaskRunContext: z.ZodObject<{
1623
2900
  run: {
1624
2901
  id: string;
1625
2902
  tags: string[];
2903
+ isTest: boolean;
1626
2904
  createdAt: Date;
1627
- context?: any;
1628
- isTest?: boolean | undefined;
1629
- startedAt?: Date | undefined;
2905
+ startedAt: Date;
2906
+ baseCostInCents: number;
2907
+ durationMs: number;
2908
+ costInCents: number;
2909
+ context?: unknown;
1630
2910
  idempotencyKey?: string | undefined;
1631
2911
  maxAttempts?: number | undefined;
1632
2912
  version?: string | undefined;
1633
2913
  maxDuration?: number | undefined;
1634
- durationMs?: number | undefined;
1635
- costInCents?: number | undefined;
1636
- baseCostInCents?: number | undefined;
1637
- priority?: number | undefined;
2914
+ };
2915
+ machine?: {
2916
+ cpu: number;
2917
+ memory: number;
2918
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2919
+ centsPerMs: number;
2920
+ } | undefined;
2921
+ batch?: {
2922
+ id: string;
2923
+ } | undefined;
2924
+ }, {
2925
+ task: {
2926
+ id: string;
2927
+ filePath: string;
2928
+ exportName?: string | undefined;
1638
2929
  };
1639
2930
  queue: {
1640
2931
  name: string;
@@ -1644,18 +2935,6 @@ export declare const TaskRunContext: z.ZodObject<{
1644
2935
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1645
2936
  id: string;
1646
2937
  slug: string;
1647
- branchName?: string | undefined;
1648
- git?: {
1649
- dirty?: boolean | undefined;
1650
- commitAuthorName?: string | undefined;
1651
- commitMessage?: string | undefined;
1652
- commitRef?: string | undefined;
1653
- commitSha?: string | undefined;
1654
- remoteUrl?: string | undefined;
1655
- pullRequestNumber?: number | undefined;
1656
- pullRequestTitle?: string | undefined;
1657
- pullRequestState?: "open" | "closed" | "merged" | undefined;
1658
- } | undefined;
1659
2938
  };
1660
2939
  organization: {
1661
2940
  name: string;
@@ -1668,17 +2947,38 @@ export declare const TaskRunContext: z.ZodObject<{
1668
2947
  slug: string;
1669
2948
  ref: string;
1670
2949
  };
1671
- batch?: {
2950
+ attempt: {
2951
+ number: number;
2952
+ status: string;
1672
2953
  id: string;
1673
- } | undefined;
2954
+ startedAt: Date;
2955
+ };
2956
+ run: {
2957
+ id: string;
2958
+ tags: string[];
2959
+ createdAt: Date;
2960
+ baseCostInCents: number;
2961
+ durationMs: number;
2962
+ costInCents: number;
2963
+ context?: unknown;
2964
+ isTest?: boolean | undefined;
2965
+ startedAt?: Date | undefined;
2966
+ idempotencyKey?: string | undefined;
2967
+ maxAttempts?: number | undefined;
2968
+ version?: string | undefined;
2969
+ maxDuration?: number | undefined;
2970
+ };
1674
2971
  machine?: {
1675
2972
  cpu: number;
1676
2973
  memory: number;
1677
2974
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1678
2975
  centsPerMs: number;
1679
2976
  } | undefined;
2977
+ batch?: {
2978
+ id: string;
2979
+ } | undefined;
1680
2980
  }>;
1681
- export type TaskRunContext = z.infer<typeof TaskRunContext>;
2981
+ export type V3TaskRunContext = z.infer<typeof V3TaskRunContext>;
1682
2982
  export declare const TaskRunExecutionRetry: z.ZodObject<{
1683
2983
  timestamp: z.ZodNumber;
1684
2984
  /** Retry delay in milliseconds */