@trigger.dev/core 4.0.0-v4-beta.25 → 4.0.0-v4-beta.27

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 (221) 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/core.js +0 -3
  5. package/dist/commonjs/v3/apiClient/core.js.map +1 -1
  6. package/dist/commonjs/v3/apiClient/index.d.ts +8 -8
  7. package/dist/commonjs/v3/config.d.ts +47 -35
  8. package/dist/commonjs/v3/index.d.ts +1 -0
  9. package/dist/commonjs/v3/index.js +1 -0
  10. package/dist/commonjs/v3/index.js.map +1 -1
  11. package/dist/commonjs/v3/isomorphic/friendlyId.d.ts +1 -0
  12. package/dist/commonjs/v3/isomorphic/friendlyId.js +2 -1
  13. package/dist/commonjs/v3/isomorphic/friendlyId.js.map +1 -1
  14. package/dist/commonjs/v3/isomorphic/index.d.ts +1 -0
  15. package/dist/commonjs/v3/isomorphic/index.js +1 -0
  16. package/dist/commonjs/v3/isomorphic/index.js.map +1 -1
  17. package/dist/commonjs/v3/isomorphic/traceContext.d.ts +5 -0
  18. package/dist/commonjs/v3/isomorphic/traceContext.js +25 -0
  19. package/dist/commonjs/v3/isomorphic/traceContext.js.map +1 -0
  20. package/dist/commonjs/v3/otel/tracingSDK.d.ts +1 -14
  21. package/dist/commonjs/v3/otel/tracingSDK.js +92 -84
  22. package/dist/commonjs/v3/otel/tracingSDK.js.map +1 -1
  23. package/dist/commonjs/v3/resource-catalog/catalog.d.ts +2 -1
  24. package/dist/commonjs/v3/resource-catalog/index.d.ts +2 -1
  25. package/dist/commonjs/v3/resource-catalog/index.js +3 -0
  26. package/dist/commonjs/v3/resource-catalog/index.js.map +1 -1
  27. package/dist/commonjs/v3/resource-catalog/noopResourceCatalog.d.ts +2 -1
  28. package/dist/commonjs/v3/resource-catalog/noopResourceCatalog.js +3 -0
  29. package/dist/commonjs/v3/resource-catalog/noopResourceCatalog.js.map +1 -1
  30. package/dist/commonjs/v3/resource-catalog/standardResourceCatalog.d.ts +3 -1
  31. package/dist/commonjs/v3/resource-catalog/standardResourceCatalog.js +10 -2
  32. package/dist/commonjs/v3/resource-catalog/standardResourceCatalog.js.map +1 -1
  33. package/dist/commonjs/v3/runEngineWorker/supervisor/http.d.ts +80 -61
  34. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.d.ts +628 -489
  35. package/dist/commonjs/v3/runEngineWorker/workload/http.d.ts +64 -45
  36. package/dist/commonjs/v3/runEngineWorker/workload/schemas.d.ts +625 -486
  37. package/dist/commonjs/v3/runMetadata/manager.d.ts +1 -0
  38. package/dist/commonjs/v3/runMetadata/manager.js +72 -2
  39. package/dist/commonjs/v3/runMetadata/manager.js.map +1 -1
  40. package/dist/commonjs/v3/schemas/api.d.ts +233 -196
  41. package/dist/commonjs/v3/schemas/api.js +2 -0
  42. package/dist/commonjs/v3/schemas/api.js.map +1 -1
  43. package/dist/commonjs/v3/schemas/build.d.ts +88 -76
  44. package/dist/commonjs/v3/schemas/checkpoints.d.ts +72 -72
  45. package/dist/commonjs/v3/schemas/common.d.ts +2351 -1038
  46. package/dist/commonjs/v3/schemas/common.js +102 -42
  47. package/dist/commonjs/v3/schemas/common.js.map +1 -1
  48. package/dist/commonjs/v3/schemas/fetch.d.ts +12 -12
  49. package/dist/commonjs/v3/schemas/messages.d.ts +6692 -6167
  50. package/dist/commonjs/v3/schemas/messages.js +10 -10
  51. package/dist/commonjs/v3/schemas/messages.js.map +1 -1
  52. package/dist/commonjs/v3/schemas/openTelemetry.d.ts +18 -18
  53. package/dist/commonjs/v3/schemas/resources.d.ts +44 -38
  54. package/dist/commonjs/v3/schemas/resources.js +2 -0
  55. package/dist/commonjs/v3/schemas/resources.js.map +1 -1
  56. package/dist/commonjs/v3/schemas/runEngine.d.ts +360 -221
  57. package/dist/commonjs/v3/schemas/schemas.d.ts +593 -533
  58. package/dist/commonjs/v3/schemas/schemas.js +15 -4
  59. package/dist/commonjs/v3/schemas/schemas.js.map +1 -1
  60. package/dist/commonjs/v3/schemas/webhooks.d.ts +120 -120
  61. package/dist/commonjs/v3/taskContext/index.js +0 -2
  62. package/dist/commonjs/v3/taskContext/index.js.map +1 -1
  63. package/dist/commonjs/v3/taskContext/otelProcessors.d.ts +4 -5
  64. package/dist/commonjs/v3/taskContext/otelProcessors.js +4 -3
  65. package/dist/commonjs/v3/taskContext/otelProcessors.js.map +1 -1
  66. package/dist/commonjs/v3/trace-context-api.d.ts +3 -0
  67. package/dist/commonjs/v3/trace-context-api.js +9 -0
  68. package/dist/commonjs/v3/trace-context-api.js.map +1 -0
  69. package/dist/commonjs/v3/traceContext/api.d.ts +19 -0
  70. package/dist/commonjs/v3/traceContext/api.js +59 -0
  71. package/dist/commonjs/v3/traceContext/api.js.map +1 -0
  72. package/dist/commonjs/v3/traceContext/manager.d.ts +14 -0
  73. package/dist/commonjs/v3/traceContext/manager.js +60 -0
  74. package/dist/commonjs/v3/traceContext/manager.js.map +1 -0
  75. package/dist/commonjs/v3/traceContext/types.d.ts +12 -0
  76. package/dist/commonjs/v3/traceContext/types.js +3 -0
  77. package/dist/commonjs/v3/traceContext/types.js.map +1 -0
  78. package/dist/commonjs/v3/tracer.d.ts +0 -1
  79. package/dist/commonjs/v3/tracer.js +0 -3
  80. package/dist/commonjs/v3/tracer.js.map +1 -1
  81. package/dist/commonjs/v3/types/index.d.ts +1 -0
  82. package/dist/commonjs/v3/types/index.js +1 -0
  83. package/dist/commonjs/v3/types/index.js.map +1 -1
  84. package/dist/commonjs/v3/types/jsonSchema.d.ts +51 -0
  85. package/dist/commonjs/v3/types/jsonSchema.js +3 -0
  86. package/dist/commonjs/v3/types/jsonSchema.js.map +1 -0
  87. package/dist/commonjs/v3/types/tasks.d.ts +24 -0
  88. package/dist/commonjs/v3/types/tasks.js.map +1 -1
  89. package/dist/commonjs/v3/usage/api.d.ts +2 -1
  90. package/dist/commonjs/v3/usage/api.js +3 -0
  91. package/dist/commonjs/v3/usage/api.js.map +1 -1
  92. package/dist/commonjs/v3/usage/devUsageManager.d.ts +4 -1
  93. package/dist/commonjs/v3/usage/devUsageManager.js +14 -0
  94. package/dist/commonjs/v3/usage/devUsageManager.js.map +1 -1
  95. package/dist/commonjs/v3/usage/noopUsageManager.d.ts +2 -1
  96. package/dist/commonjs/v3/usage/noopUsageManager.js +6 -0
  97. package/dist/commonjs/v3/usage/noopUsageManager.js.map +1 -1
  98. package/dist/commonjs/v3/usage/prodUsageManager.d.ts +4 -1
  99. package/dist/commonjs/v3/usage/prodUsageManager.js +14 -0
  100. package/dist/commonjs/v3/usage/prodUsageManager.js.map +1 -1
  101. package/dist/commonjs/v3/usage/types.d.ts +5 -0
  102. package/dist/commonjs/v3/utils/globals.d.ts +2 -0
  103. package/dist/commonjs/v3/utils/globals.js.map +1 -1
  104. package/dist/commonjs/v3/workers/index.d.ts +1 -0
  105. package/dist/commonjs/v3/workers/index.js +3 -1
  106. package/dist/commonjs/v3/workers/index.js.map +1 -1
  107. package/dist/commonjs/v3/workers/taskExecutor.d.ts +2 -2
  108. package/dist/commonjs/v3/workers/taskExecutor.js +3 -15
  109. package/dist/commonjs/v3/workers/taskExecutor.js.map +1 -1
  110. package/dist/commonjs/version.js +1 -1
  111. package/dist/esm/logger.d.ts +1 -0
  112. package/dist/esm/logger.js +5 -0
  113. package/dist/esm/logger.js.map +1 -1
  114. package/dist/esm/v3/apiClient/core.js +0 -3
  115. package/dist/esm/v3/apiClient/core.js.map +1 -1
  116. package/dist/esm/v3/apiClient/index.d.ts +8 -8
  117. package/dist/esm/v3/config.d.ts +47 -35
  118. package/dist/esm/v3/index.d.ts +1 -0
  119. package/dist/esm/v3/index.js +1 -0
  120. package/dist/esm/v3/index.js.map +1 -1
  121. package/dist/esm/v3/isomorphic/friendlyId.d.ts +1 -0
  122. package/dist/esm/v3/isomorphic/friendlyId.js +1 -0
  123. package/dist/esm/v3/isomorphic/friendlyId.js.map +1 -1
  124. package/dist/esm/v3/isomorphic/index.d.ts +1 -0
  125. package/dist/esm/v3/isomorphic/index.js +1 -0
  126. package/dist/esm/v3/isomorphic/index.js.map +1 -1
  127. package/dist/esm/v3/isomorphic/traceContext.d.ts +5 -0
  128. package/dist/esm/v3/isomorphic/traceContext.js +21 -0
  129. package/dist/esm/v3/isomorphic/traceContext.js.map +1 -0
  130. package/dist/esm/v3/otel/tracingSDK.d.ts +1 -14
  131. package/dist/esm/v3/otel/tracingSDK.js +93 -85
  132. package/dist/esm/v3/otel/tracingSDK.js.map +1 -1
  133. package/dist/esm/v3/resource-catalog/catalog.d.ts +2 -1
  134. package/dist/esm/v3/resource-catalog/index.d.ts +2 -1
  135. package/dist/esm/v3/resource-catalog/index.js +3 -0
  136. package/dist/esm/v3/resource-catalog/index.js.map +1 -1
  137. package/dist/esm/v3/resource-catalog/noopResourceCatalog.d.ts +2 -1
  138. package/dist/esm/v3/resource-catalog/noopResourceCatalog.js +3 -0
  139. package/dist/esm/v3/resource-catalog/noopResourceCatalog.js.map +1 -1
  140. package/dist/esm/v3/resource-catalog/standardResourceCatalog.d.ts +3 -1
  141. package/dist/esm/v3/resource-catalog/standardResourceCatalog.js +10 -2
  142. package/dist/esm/v3/resource-catalog/standardResourceCatalog.js.map +1 -1
  143. package/dist/esm/v3/runEngineWorker/supervisor/http.d.ts +80 -61
  144. package/dist/esm/v3/runEngineWorker/supervisor/schemas.d.ts +628 -489
  145. package/dist/esm/v3/runEngineWorker/workload/http.d.ts +64 -45
  146. package/dist/esm/v3/runEngineWorker/workload/schemas.d.ts +625 -486
  147. package/dist/esm/v3/runMetadata/manager.d.ts +1 -0
  148. package/dist/esm/v3/runMetadata/manager.js +72 -2
  149. package/dist/esm/v3/runMetadata/manager.js.map +1 -1
  150. package/dist/esm/v3/schemas/api.d.ts +233 -196
  151. package/dist/esm/v3/schemas/api.js +2 -0
  152. package/dist/esm/v3/schemas/api.js.map +1 -1
  153. package/dist/esm/v3/schemas/build.d.ts +88 -76
  154. package/dist/esm/v3/schemas/checkpoints.d.ts +72 -72
  155. package/dist/esm/v3/schemas/common.d.ts +2351 -1038
  156. package/dist/esm/v3/schemas/common.js +101 -41
  157. package/dist/esm/v3/schemas/common.js.map +1 -1
  158. package/dist/esm/v3/schemas/fetch.d.ts +12 -12
  159. package/dist/esm/v3/schemas/messages.d.ts +6692 -6167
  160. package/dist/esm/v3/schemas/messages.js +11 -11
  161. package/dist/esm/v3/schemas/messages.js.map +1 -1
  162. package/dist/esm/v3/schemas/openTelemetry.d.ts +18 -18
  163. package/dist/esm/v3/schemas/resources.d.ts +44 -38
  164. package/dist/esm/v3/schemas/resources.js +2 -0
  165. package/dist/esm/v3/schemas/resources.js.map +1 -1
  166. package/dist/esm/v3/schemas/runEngine.d.ts +360 -221
  167. package/dist/esm/v3/schemas/schemas.d.ts +593 -533
  168. package/dist/esm/v3/schemas/schemas.js +15 -4
  169. package/dist/esm/v3/schemas/schemas.js.map +1 -1
  170. package/dist/esm/v3/schemas/webhooks.d.ts +120 -120
  171. package/dist/esm/v3/taskContext/index.js +0 -2
  172. package/dist/esm/v3/taskContext/index.js.map +1 -1
  173. package/dist/esm/v3/taskContext/otelProcessors.d.ts +4 -5
  174. package/dist/esm/v3/taskContext/otelProcessors.js +4 -3
  175. package/dist/esm/v3/taskContext/otelProcessors.js.map +1 -1
  176. package/dist/esm/v3/trace-context-api.d.ts +3 -0
  177. package/dist/esm/v3/trace-context-api.js +6 -0
  178. package/dist/esm/v3/trace-context-api.js.map +1 -0
  179. package/dist/esm/v3/traceContext/api.d.ts +19 -0
  180. package/dist/esm/v3/traceContext/api.js +55 -0
  181. package/dist/esm/v3/traceContext/api.js.map +1 -0
  182. package/dist/esm/v3/traceContext/manager.d.ts +14 -0
  183. package/dist/esm/v3/traceContext/manager.js +56 -0
  184. package/dist/esm/v3/traceContext/manager.js.map +1 -0
  185. package/dist/esm/v3/traceContext/types.d.ts +12 -0
  186. package/dist/esm/v3/traceContext/types.js +2 -0
  187. package/dist/esm/v3/traceContext/types.js.map +1 -0
  188. package/dist/esm/v3/tracer.d.ts +0 -1
  189. package/dist/esm/v3/tracer.js +1 -4
  190. package/dist/esm/v3/tracer.js.map +1 -1
  191. package/dist/esm/v3/types/index.d.ts +1 -0
  192. package/dist/esm/v3/types/index.js +1 -0
  193. package/dist/esm/v3/types/index.js.map +1 -1
  194. package/dist/esm/v3/types/jsonSchema.d.ts +51 -0
  195. package/dist/esm/v3/types/jsonSchema.js +2 -0
  196. package/dist/esm/v3/types/jsonSchema.js.map +1 -0
  197. package/dist/esm/v3/types/tasks.d.ts +24 -0
  198. package/dist/esm/v3/types/tasks.js.map +1 -1
  199. package/dist/esm/v3/usage/api.d.ts +2 -1
  200. package/dist/esm/v3/usage/api.js +3 -0
  201. package/dist/esm/v3/usage/api.js.map +1 -1
  202. package/dist/esm/v3/usage/devUsageManager.d.ts +4 -1
  203. package/dist/esm/v3/usage/devUsageManager.js +14 -0
  204. package/dist/esm/v3/usage/devUsageManager.js.map +1 -1
  205. package/dist/esm/v3/usage/noopUsageManager.d.ts +2 -1
  206. package/dist/esm/v3/usage/noopUsageManager.js +6 -0
  207. package/dist/esm/v3/usage/noopUsageManager.js.map +1 -1
  208. package/dist/esm/v3/usage/prodUsageManager.d.ts +4 -1
  209. package/dist/esm/v3/usage/prodUsageManager.js +14 -0
  210. package/dist/esm/v3/usage/prodUsageManager.js.map +1 -1
  211. package/dist/esm/v3/usage/types.d.ts +5 -0
  212. package/dist/esm/v3/utils/globals.d.ts +2 -0
  213. package/dist/esm/v3/utils/globals.js.map +1 -1
  214. package/dist/esm/v3/workers/index.d.ts +1 -0
  215. package/dist/esm/v3/workers/index.js +1 -0
  216. package/dist/esm/v3/workers/index.js.map +1 -1
  217. package/dist/esm/v3/workers/taskExecutor.d.ts +2 -2
  218. package/dist/esm/v3/workers/taskExecutor.js +5 -17
  219. package/dist/esm/v3/workers/taskExecutor.js.map +1 -1
  220. package/dist/esm/version.js +1 -1
  221. package/package.json +12 -13
@@ -42,99 +42,13 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
42
42
  task: z.ZodObject<{
43
43
  id: z.ZodString;
44
44
  filePath: z.ZodString;
45
- exportName: z.ZodOptional<z.ZodString>;
46
- }, "strip", z.ZodTypeAny, {
47
- id: string;
48
- filePath: string;
49
- exportName?: string | undefined;
50
- }, {
51
- id: string;
52
- filePath: string;
53
- exportName?: string | undefined;
54
- }>;
55
- attempt: z.ZodObject<{
56
- number: z.ZodNumber;
57
- startedAt: z.ZodDate;
45
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
58
46
  id: z.ZodString;
59
- backgroundWorkerId: z.ZodString;
60
- backgroundWorkerTaskId: z.ZodString;
61
- status: z.ZodString;
62
- }, "strip", z.ZodTypeAny, {
63
- number: number;
64
- status: string;
65
- id: string;
66
- startedAt: Date;
67
- backgroundWorkerId: string;
68
- backgroundWorkerTaskId: string;
69
- }, {
70
- number: number;
71
- status: string;
72
- id: string;
73
- startedAt: Date;
74
- backgroundWorkerId: string;
75
- backgroundWorkerTaskId: string;
76
- }>;
77
- run: z.ZodIntersection<z.ZodObject<{
47
+ filePath: z.ZodString;
48
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
78
49
  id: z.ZodString;
79
- payload: z.ZodString;
80
- payloadType: z.ZodString;
81
- tags: z.ZodArray<z.ZodString, "many">;
82
- isTest: z.ZodDefault<z.ZodBoolean>;
83
- createdAt: z.ZodDate;
84
- startedAt: z.ZodDefault<z.ZodDate>;
85
- idempotencyKey: z.ZodOptional<z.ZodString>;
86
- maxAttempts: z.ZodOptional<z.ZodNumber>;
87
- version: z.ZodOptional<z.ZodString>;
88
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../index.js").DeserializedJson, z.ZodTypeDef, import("../../index.js").DeserializedJson>>>;
89
- maxDuration: z.ZodOptional<z.ZodNumber>;
90
- context: z.ZodAny;
91
- durationMs: z.ZodDefault<z.ZodNumber>;
92
- costInCents: z.ZodDefault<z.ZodNumber>;
93
- baseCostInCents: z.ZodDefault<z.ZodNumber>;
94
- priority: z.ZodOptional<z.ZodNumber>;
95
- }, "strip", z.ZodTypeAny, {
96
- payload: string;
97
- id: string;
98
- payloadType: string;
99
- tags: string[];
100
- isTest: boolean;
101
- createdAt: Date;
102
- startedAt: Date;
103
- durationMs: number;
104
- costInCents: number;
105
- baseCostInCents: number;
106
- context?: any;
107
- metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
108
- idempotencyKey?: string | undefined;
109
- maxAttempts?: number | undefined;
110
- version?: string | undefined;
111
- maxDuration?: number | undefined;
112
- priority?: number | undefined;
113
- }, {
114
- payload: string;
115
- id: string;
116
- payloadType: string;
117
- tags: string[];
118
- createdAt: Date;
119
- context?: any;
120
- metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
121
- isTest?: boolean | undefined;
122
- startedAt?: Date | undefined;
123
- idempotencyKey?: string | undefined;
124
- maxAttempts?: number | undefined;
125
- version?: string | undefined;
126
- maxDuration?: number | undefined;
127
- durationMs?: number | undefined;
128
- costInCents?: number | undefined;
129
- baseCostInCents?: number | undefined;
130
- priority?: number | undefined;
131
- }>, z.ZodObject<{
132
- traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
133
- }, "strip", z.ZodTypeAny, {
134
- traceContext?: Record<string, unknown> | undefined;
135
- }, {
136
- traceContext?: Record<string, unknown> | undefined;
137
- }>>;
50
+ filePath: z.ZodString;
51
+ }, z.ZodTypeAny, "passthrough">>;
138
52
  queue: z.ZodObject<{
139
53
  id: z.ZodString;
140
54
  name: z.ZodString;
@@ -243,13 +157,6 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
243
157
  slug: string;
244
158
  ref: string;
245
159
  }>;
246
- batch: z.ZodOptional<z.ZodObject<{
247
- id: z.ZodString;
248
- }, "strip", z.ZodTypeAny, {
249
- id: string;
250
- }, {
251
- id: string;
252
- }>>;
253
160
  machine: z.ZodObject<{
254
161
  name: z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>;
255
162
  cpu: z.ZodNumber;
@@ -266,21 +173,116 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
266
173
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
267
174
  centsPerMs: number;
268
175
  }>;
269
- }, "strip", z.ZodTypeAny, {
270
- task: {
176
+ batch: z.ZodOptional<z.ZodObject<{
177
+ id: z.ZodString;
178
+ }, "strip", z.ZodTypeAny, {
271
179
  id: string;
272
- filePath: string;
273
- exportName?: string | undefined;
274
- };
275
- attempt: {
276
- number: number;
277
- status: string;
180
+ }, {
278
181
  id: string;
279
- startedAt: Date;
280
- backgroundWorkerId: string;
281
- backgroundWorkerTaskId: string;
282
- };
283
- run: {
182
+ }>>;
183
+ deployment: z.ZodOptional<z.ZodObject<{
184
+ id: z.ZodString;
185
+ shortCode: z.ZodString;
186
+ version: z.ZodString;
187
+ runtime: z.ZodString;
188
+ runtimeVersion: z.ZodString;
189
+ git: z.ZodOptional<z.ZodObject<{
190
+ commitAuthorName: z.ZodOptional<z.ZodString>;
191
+ commitMessage: z.ZodOptional<z.ZodString>;
192
+ commitRef: z.ZodOptional<z.ZodString>;
193
+ commitSha: z.ZodOptional<z.ZodString>;
194
+ dirty: z.ZodOptional<z.ZodBoolean>;
195
+ remoteUrl: z.ZodOptional<z.ZodString>;
196
+ pullRequestNumber: z.ZodOptional<z.ZodNumber>;
197
+ pullRequestTitle: z.ZodOptional<z.ZodString>;
198
+ pullRequestState: z.ZodOptional<z.ZodEnum<["open", "closed", "merged"]>>;
199
+ }, "strip", z.ZodTypeAny, {
200
+ dirty?: boolean | undefined;
201
+ commitAuthorName?: string | undefined;
202
+ commitMessage?: string | undefined;
203
+ commitRef?: string | undefined;
204
+ commitSha?: string | undefined;
205
+ remoteUrl?: string | undefined;
206
+ pullRequestNumber?: number | undefined;
207
+ pullRequestTitle?: string | undefined;
208
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
209
+ }, {
210
+ dirty?: boolean | undefined;
211
+ commitAuthorName?: string | undefined;
212
+ commitMessage?: string | undefined;
213
+ commitRef?: string | undefined;
214
+ commitSha?: string | undefined;
215
+ remoteUrl?: string | undefined;
216
+ pullRequestNumber?: number | undefined;
217
+ pullRequestTitle?: string | undefined;
218
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
219
+ }>>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ id: string;
222
+ version: string;
223
+ shortCode: string;
224
+ runtime: string;
225
+ runtimeVersion: string;
226
+ git?: {
227
+ dirty?: boolean | undefined;
228
+ commitAuthorName?: string | undefined;
229
+ commitMessage?: string | undefined;
230
+ commitRef?: string | undefined;
231
+ commitSha?: string | undefined;
232
+ remoteUrl?: string | undefined;
233
+ pullRequestNumber?: number | undefined;
234
+ pullRequestTitle?: string | undefined;
235
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
236
+ } | undefined;
237
+ }, {
238
+ id: string;
239
+ version: string;
240
+ shortCode: string;
241
+ runtime: string;
242
+ runtimeVersion: string;
243
+ git?: {
244
+ dirty?: boolean | undefined;
245
+ commitAuthorName?: string | undefined;
246
+ commitMessage?: string | undefined;
247
+ commitRef?: string | undefined;
248
+ commitSha?: string | undefined;
249
+ remoteUrl?: string | undefined;
250
+ pullRequestNumber?: number | undefined;
251
+ pullRequestTitle?: string | undefined;
252
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
253
+ } | undefined;
254
+ }>>;
255
+ attempt: z.ZodObject<{
256
+ number: z.ZodNumber;
257
+ startedAt: z.ZodDate;
258
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
259
+ number: z.ZodNumber;
260
+ startedAt: z.ZodDate;
261
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
262
+ number: z.ZodNumber;
263
+ startedAt: z.ZodDate;
264
+ }, z.ZodTypeAny, "passthrough">>;
265
+ run: z.ZodIntersection<z.ZodObject<{
266
+ id: z.ZodString;
267
+ payload: z.ZodString;
268
+ payloadType: z.ZodString;
269
+ tags: z.ZodArray<z.ZodString, "many">;
270
+ isTest: z.ZodDefault<z.ZodBoolean>;
271
+ createdAt: z.ZodDate;
272
+ startedAt: z.ZodDefault<z.ZodDate>;
273
+ idempotencyKey: z.ZodOptional<z.ZodString>;
274
+ maxAttempts: z.ZodOptional<z.ZodNumber>;
275
+ version: z.ZodOptional<z.ZodString>;
276
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../index.js").DeserializedJson, z.ZodTypeDef, import("../../index.js").DeserializedJson>>>;
277
+ maxDuration: z.ZodOptional<z.ZodNumber>;
278
+ priority: z.ZodOptional<z.ZodNumber>;
279
+ baseCostInCents: z.ZodOptional<z.ZodNumber>;
280
+ parentTaskRunId: z.ZodOptional<z.ZodString>;
281
+ rootTaskRunId: z.ZodOptional<z.ZodString>;
282
+ durationMs: z.ZodOptional<z.ZodNumber>;
283
+ costInCents: z.ZodOptional<z.ZodNumber>;
284
+ region: z.ZodOptional<z.ZodString>;
285
+ }, "strip", z.ZodTypeAny, {
284
286
  payload: string;
285
287
  id: string;
286
288
  payloadType: string;
@@ -288,18 +290,51 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
288
290
  isTest: boolean;
289
291
  createdAt: Date;
290
292
  startedAt: Date;
291
- durationMs: number;
292
- costInCents: number;
293
- baseCostInCents: number;
294
- context?: any;
295
293
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
296
294
  idempotencyKey?: string | undefined;
297
295
  maxAttempts?: number | undefined;
298
296
  version?: string | undefined;
299
297
  maxDuration?: number | undefined;
300
298
  priority?: number | undefined;
301
- } & {
299
+ baseCostInCents?: number | undefined;
300
+ parentTaskRunId?: string | undefined;
301
+ rootTaskRunId?: string | undefined;
302
+ durationMs?: number | undefined;
303
+ costInCents?: number | undefined;
304
+ region?: string | undefined;
305
+ }, {
306
+ payload: string;
307
+ id: string;
308
+ payloadType: string;
309
+ tags: string[];
310
+ createdAt: Date;
311
+ metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
312
+ isTest?: boolean | undefined;
313
+ startedAt?: Date | undefined;
314
+ idempotencyKey?: string | undefined;
315
+ maxAttempts?: number | undefined;
316
+ version?: string | undefined;
317
+ maxDuration?: number | undefined;
318
+ priority?: number | undefined;
319
+ baseCostInCents?: number | undefined;
320
+ parentTaskRunId?: string | undefined;
321
+ rootTaskRunId?: string | undefined;
322
+ durationMs?: number | undefined;
323
+ costInCents?: number | undefined;
324
+ region?: string | undefined;
325
+ }>, z.ZodObject<{
326
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
327
+ }, "strip", z.ZodTypeAny, {
302
328
  traceContext?: Record<string, unknown> | undefined;
329
+ }, {
330
+ traceContext?: Record<string, unknown> | undefined;
331
+ }>>;
332
+ }, "strip", z.ZodTypeAny, {
333
+ task: {
334
+ id: string;
335
+ filePath: string;
336
+ } & {
337
+ [k: string]: unknown;
303
338
  };
304
339
  queue: {
305
340
  name: string;
@@ -339,44 +374,63 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
339
374
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
340
375
  centsPerMs: number;
341
376
  };
342
- batch?: {
343
- id: string;
344
- } | undefined;
345
- }, {
346
- task: {
347
- id: string;
348
- filePath: string;
349
- exportName?: string | undefined;
350
- };
351
377
  attempt: {
352
378
  number: number;
353
- status: string;
354
- id: string;
355
379
  startedAt: Date;
356
- backgroundWorkerId: string;
357
- backgroundWorkerTaskId: string;
380
+ } & {
381
+ [k: string]: unknown;
358
382
  };
359
383
  run: {
360
384
  payload: string;
361
385
  id: string;
362
386
  payloadType: string;
363
387
  tags: string[];
388
+ isTest: boolean;
364
389
  createdAt: Date;
365
- context?: any;
390
+ startedAt: Date;
366
391
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
367
- isTest?: boolean | undefined;
368
- startedAt?: Date | undefined;
369
392
  idempotencyKey?: string | undefined;
370
393
  maxAttempts?: number | undefined;
371
394
  version?: string | undefined;
372
395
  maxDuration?: number | undefined;
396
+ priority?: number | undefined;
397
+ baseCostInCents?: number | undefined;
398
+ parentTaskRunId?: string | undefined;
399
+ rootTaskRunId?: string | undefined;
373
400
  durationMs?: number | undefined;
374
401
  costInCents?: number | undefined;
375
- baseCostInCents?: number | undefined;
376
- priority?: number | undefined;
402
+ region?: string | undefined;
377
403
  } & {
378
404
  traceContext?: Record<string, unknown> | undefined;
379
405
  };
406
+ batch?: {
407
+ id: string;
408
+ } | undefined;
409
+ deployment?: {
410
+ id: string;
411
+ version: string;
412
+ shortCode: string;
413
+ runtime: string;
414
+ runtimeVersion: string;
415
+ git?: {
416
+ dirty?: boolean | undefined;
417
+ commitAuthorName?: string | undefined;
418
+ commitMessage?: string | undefined;
419
+ commitRef?: string | undefined;
420
+ commitSha?: string | undefined;
421
+ remoteUrl?: string | undefined;
422
+ pullRequestNumber?: number | undefined;
423
+ pullRequestTitle?: string | undefined;
424
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
425
+ } | undefined;
426
+ } | undefined;
427
+ }, {
428
+ task: {
429
+ id: string;
430
+ filePath: string;
431
+ } & {
432
+ [k: string]: unknown;
433
+ };
380
434
  queue: {
381
435
  name: string;
382
436
  id: string;
@@ -415,9 +469,56 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
415
469
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
416
470
  centsPerMs: number;
417
471
  };
472
+ attempt: {
473
+ number: number;
474
+ startedAt: Date;
475
+ } & {
476
+ [k: string]: unknown;
477
+ };
478
+ run: {
479
+ payload: string;
480
+ id: string;
481
+ payloadType: string;
482
+ tags: string[];
483
+ createdAt: Date;
484
+ metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
485
+ isTest?: boolean | undefined;
486
+ startedAt?: Date | undefined;
487
+ idempotencyKey?: string | undefined;
488
+ maxAttempts?: number | undefined;
489
+ version?: string | undefined;
490
+ maxDuration?: number | undefined;
491
+ priority?: number | undefined;
492
+ baseCostInCents?: number | undefined;
493
+ parentTaskRunId?: string | undefined;
494
+ rootTaskRunId?: string | undefined;
495
+ durationMs?: number | undefined;
496
+ costInCents?: number | undefined;
497
+ region?: string | undefined;
498
+ } & {
499
+ traceContext?: Record<string, unknown> | undefined;
500
+ };
418
501
  batch?: {
419
502
  id: string;
420
503
  } | undefined;
504
+ deployment?: {
505
+ id: string;
506
+ version: string;
507
+ shortCode: string;
508
+ runtime: string;
509
+ runtimeVersion: string;
510
+ git?: {
511
+ dirty?: boolean | undefined;
512
+ commitAuthorName?: string | undefined;
513
+ commitMessage?: string | undefined;
514
+ commitRef?: string | undefined;
515
+ commitSha?: string | undefined;
516
+ remoteUrl?: string | undefined;
517
+ pullRequestNumber?: number | undefined;
518
+ pullRequestTitle?: string | undefined;
519
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
520
+ } | undefined;
521
+ } | undefined;
421
522
  }>;
422
523
  traceContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
423
524
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -443,15 +544,52 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
443
544
  task: {
444
545
  id: string;
445
546
  filePath: string;
446
- exportName?: string | undefined;
547
+ } & {
548
+ [k: string]: unknown;
549
+ };
550
+ queue: {
551
+ name: string;
552
+ id: string;
553
+ };
554
+ environment: {
555
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
556
+ id: string;
557
+ slug: string;
558
+ branchName?: string | undefined;
559
+ git?: {
560
+ dirty?: boolean | undefined;
561
+ commitAuthorName?: string | undefined;
562
+ commitMessage?: string | undefined;
563
+ commitRef?: string | undefined;
564
+ commitSha?: string | undefined;
565
+ remoteUrl?: string | undefined;
566
+ pullRequestNumber?: number | undefined;
567
+ pullRequestTitle?: string | undefined;
568
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
569
+ } | undefined;
570
+ };
571
+ organization: {
572
+ name: string;
573
+ id: string;
574
+ slug: string;
575
+ };
576
+ project: {
577
+ name: string;
578
+ id: string;
579
+ slug: string;
580
+ ref: string;
581
+ };
582
+ machine: {
583
+ cpu: number;
584
+ memory: number;
585
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
586
+ centsPerMs: number;
447
587
  };
448
588
  attempt: {
449
589
  number: number;
450
- status: string;
451
- id: string;
452
590
  startedAt: Date;
453
- backgroundWorkerId: string;
454
- backgroundWorkerTaskId: string;
591
+ } & {
592
+ [k: string]: unknown;
455
593
  };
456
594
  run: {
457
595
  payload: string;
@@ -461,19 +599,59 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
461
599
  isTest: boolean;
462
600
  createdAt: Date;
463
601
  startedAt: Date;
464
- durationMs: number;
465
- costInCents: number;
466
- baseCostInCents: number;
467
- context?: any;
468
602
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
469
603
  idempotencyKey?: string | undefined;
470
604
  maxAttempts?: number | undefined;
471
605
  version?: string | undefined;
472
606
  maxDuration?: number | undefined;
473
607
  priority?: number | undefined;
608
+ baseCostInCents?: number | undefined;
609
+ parentTaskRunId?: string | undefined;
610
+ rootTaskRunId?: string | undefined;
611
+ durationMs?: number | undefined;
612
+ costInCents?: number | undefined;
613
+ region?: string | undefined;
474
614
  } & {
475
615
  traceContext?: Record<string, unknown> | undefined;
476
616
  };
617
+ batch?: {
618
+ id: string;
619
+ } | undefined;
620
+ deployment?: {
621
+ id: string;
622
+ version: string;
623
+ shortCode: string;
624
+ runtime: string;
625
+ runtimeVersion: string;
626
+ git?: {
627
+ dirty?: boolean | undefined;
628
+ commitAuthorName?: string | undefined;
629
+ commitMessage?: string | undefined;
630
+ commitRef?: string | undefined;
631
+ commitSha?: string | undefined;
632
+ remoteUrl?: string | undefined;
633
+ pullRequestNumber?: number | undefined;
634
+ pullRequestTitle?: string | undefined;
635
+ pullRequestState?: "open" | "closed" | "merged" | undefined;
636
+ } | undefined;
637
+ } | undefined;
638
+ };
639
+ environment?: Record<string, string> | undefined;
640
+ metrics?: {
641
+ event: string;
642
+ name: string;
643
+ timestamp: number;
644
+ duration: number;
645
+ }[] | undefined;
646
+ }, {
647
+ traceContext: Record<string, unknown>;
648
+ execution: {
649
+ task: {
650
+ id: string;
651
+ filePath: string;
652
+ } & {
653
+ [k: string]: unknown;
654
+ };
477
655
  queue: {
478
656
  name: string;
479
657
  id: string;
@@ -512,32 +690,11 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
512
690
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
513
691
  centsPerMs: number;
514
692
  };
515
- batch?: {
516
- id: string;
517
- } | undefined;
518
- };
519
- environment?: Record<string, string> | undefined;
520
- metrics?: {
521
- event: string;
522
- name: string;
523
- timestamp: number;
524
- duration: number;
525
- }[] | undefined;
526
- }, {
527
- traceContext: Record<string, unknown>;
528
- execution: {
529
- task: {
530
- id: string;
531
- filePath: string;
532
- exportName?: string | undefined;
533
- };
534
693
  attempt: {
535
694
  number: number;
536
- status: string;
537
- id: string;
538
695
  startedAt: Date;
539
- backgroundWorkerId: string;
540
- backgroundWorkerTaskId: string;
696
+ } & {
697
+ [k: string]: unknown;
541
698
  };
542
699
  run: {
543
700
  payload: string;
@@ -545,7 +702,6 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
545
702
  payloadType: string;
546
703
  tags: string[];
547
704
  createdAt: Date;
548
- context?: any;
549
705
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
550
706
  isTest?: boolean | undefined;
551
707
  startedAt?: Date | undefined;
@@ -553,22 +709,25 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
553
709
  maxAttempts?: number | undefined;
554
710
  version?: string | undefined;
555
711
  maxDuration?: number | undefined;
712
+ priority?: number | undefined;
713
+ baseCostInCents?: number | undefined;
714
+ parentTaskRunId?: string | undefined;
715
+ rootTaskRunId?: string | undefined;
556
716
  durationMs?: number | undefined;
557
717
  costInCents?: number | undefined;
558
- baseCostInCents?: number | undefined;
559
- priority?: number | undefined;
718
+ region?: string | undefined;
560
719
  } & {
561
720
  traceContext?: Record<string, unknown> | undefined;
562
721
  };
563
- queue: {
564
- name: string;
722
+ batch?: {
565
723
  id: string;
566
- };
567
- environment: {
568
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
724
+ } | undefined;
725
+ deployment?: {
569
726
  id: string;
570
- slug: string;
571
- branchName?: string | undefined;
727
+ version: string;
728
+ shortCode: string;
729
+ runtime: string;
730
+ runtimeVersion: string;
572
731
  git?: {
573
732
  dirty?: boolean | undefined;
574
733
  commitAuthorName?: string | undefined;
@@ -580,26 +739,6 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
580
739
  pullRequestTitle?: string | undefined;
581
740
  pullRequestState?: "open" | "closed" | "merged" | undefined;
582
741
  } | undefined;
583
- };
584
- organization: {
585
- name: string;
586
- id: string;
587
- slug: string;
588
- };
589
- project: {
590
- name: string;
591
- id: string;
592
- slug: string;
593
- ref: string;
594
- };
595
- machine: {
596
- cpu: number;
597
- memory: number;
598
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
599
- centsPerMs: number;
600
- };
601
- batch?: {
602
- id: string;
603
742
  } | undefined;
604
743
  };
605
744
  environment?: Record<string, string> | undefined;
@@ -611,7 +750,7 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
611
750
  }[] | undefined;
612
751
  }>;
613
752
  export type TaskRunExecutionPayload = z.infer<typeof TaskRunExecutionPayload>;
614
- export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<{
753
+ export declare const V3ProdTaskRunExecution: z.ZodObject<{
615
754
  task: z.ZodObject<{
616
755
  id: z.ZodString;
617
756
  filePath: z.ZodString;
@@ -660,11 +799,10 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
660
799
  version: z.ZodOptional<z.ZodString>;
661
800
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../index.js").DeserializedJson, z.ZodTypeDef, import("../../index.js").DeserializedJson>>>;
662
801
  maxDuration: z.ZodOptional<z.ZodNumber>;
663
- context: z.ZodAny;
664
- durationMs: z.ZodDefault<z.ZodNumber>;
665
- costInCents: z.ZodDefault<z.ZodNumber>;
666
- baseCostInCents: z.ZodDefault<z.ZodNumber>;
667
- priority: z.ZodOptional<z.ZodNumber>;
802
+ context: z.ZodUnknown;
803
+ durationMs: z.ZodNumber;
804
+ costInCents: z.ZodNumber;
805
+ baseCostInCents: z.ZodNumber;
668
806
  }, "strip", z.ZodTypeAny, {
669
807
  payload: string;
670
808
  id: string;
@@ -673,23 +811,25 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
673
811
  isTest: boolean;
674
812
  createdAt: Date;
675
813
  startedAt: Date;
814
+ baseCostInCents: number;
676
815
  durationMs: number;
677
816
  costInCents: number;
678
- baseCostInCents: number;
679
- context?: any;
817
+ context?: unknown;
680
818
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
681
819
  idempotencyKey?: string | undefined;
682
820
  maxAttempts?: number | undefined;
683
821
  version?: string | undefined;
684
822
  maxDuration?: number | undefined;
685
- priority?: number | undefined;
686
823
  }, {
687
824
  payload: string;
688
825
  id: string;
689
826
  payloadType: string;
690
827
  tags: string[];
691
828
  createdAt: Date;
692
- context?: any;
829
+ baseCostInCents: number;
830
+ durationMs: number;
831
+ costInCents: number;
832
+ context?: unknown;
693
833
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
694
834
  isTest?: boolean | undefined;
695
835
  startedAt?: Date | undefined;
@@ -697,10 +837,6 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
697
837
  maxAttempts?: number | undefined;
698
838
  version?: string | undefined;
699
839
  maxDuration?: number | undefined;
700
- durationMs?: number | undefined;
701
- costInCents?: number | undefined;
702
- baseCostInCents?: number | undefined;
703
- priority?: number | undefined;
704
840
  }>, z.ZodObject<{
705
841
  traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
706
842
  }, "strip", z.ZodTypeAny, {
@@ -823,23 +959,7 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
823
959
  }, {
824
960
  id: string;
825
961
  }>>;
826
- machine: z.ZodObject<{
827
- name: z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>;
828
- cpu: z.ZodNumber;
829
- memory: z.ZodNumber;
830
- centsPerMs: z.ZodNumber;
831
- }, "strip", z.ZodTypeAny, {
832
- cpu: number;
833
- memory: number;
834
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
835
- centsPerMs: number;
836
- }, {
837
- cpu: number;
838
- memory: number;
839
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
840
- centsPerMs: number;
841
- }>;
842
- }, {
962
+ } & {
843
963
  worker: z.ZodObject<{
844
964
  id: z.ZodString;
845
965
  contentHash: z.ZodString;
@@ -872,41 +992,12 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
872
992
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
873
993
  centsPerMs: number;
874
994
  }>>;
875
- }>, "strip", z.ZodTypeAny, {
995
+ }, "strip", z.ZodTypeAny, {
876
996
  task: {
877
997
  id: string;
878
998
  filePath: string;
879
999
  exportName?: string | undefined;
880
1000
  };
881
- attempt: {
882
- number: number;
883
- status: string;
884
- id: string;
885
- startedAt: Date;
886
- backgroundWorkerId: string;
887
- backgroundWorkerTaskId: string;
888
- };
889
- run: {
890
- payload: string;
891
- id: string;
892
- payloadType: string;
893
- tags: string[];
894
- isTest: boolean;
895
- createdAt: Date;
896
- startedAt: Date;
897
- durationMs: number;
898
- costInCents: number;
899
- baseCostInCents: number;
900
- context?: any;
901
- metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
902
- idempotencyKey?: string | undefined;
903
- maxAttempts?: number | undefined;
904
- version?: string | undefined;
905
- maxDuration?: number | undefined;
906
- priority?: number | undefined;
907
- } & {
908
- traceContext?: Record<string, unknown> | undefined;
909
- };
910
1001
  queue: {
911
1002
  name: string;
912
1003
  id: string;
@@ -945,21 +1036,6 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
945
1036
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
946
1037
  centsPerMs: number;
947
1038
  };
948
- worker: {
949
- id: string;
950
- version: string;
951
- contentHash: string;
952
- type?: "V1" | "V2" | undefined;
953
- };
954
- batch?: {
955
- id: string;
956
- } | undefined;
957
- }, {
958
- task: {
959
- id: string;
960
- filePath: string;
961
- exportName?: string | undefined;
962
- };
963
1039
  attempt: {
964
1040
  number: number;
965
1041
  status: string;
@@ -973,22 +1049,36 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
973
1049
  id: string;
974
1050
  payloadType: string;
975
1051
  tags: string[];
1052
+ isTest: boolean;
976
1053
  createdAt: Date;
977
- context?: any;
1054
+ startedAt: Date;
1055
+ baseCostInCents: number;
1056
+ durationMs: number;
1057
+ costInCents: number;
1058
+ context?: unknown;
978
1059
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
979
- isTest?: boolean | undefined;
980
- startedAt?: Date | undefined;
981
1060
  idempotencyKey?: string | undefined;
982
1061
  maxAttempts?: number | undefined;
983
1062
  version?: string | undefined;
984
1063
  maxDuration?: number | undefined;
985
- durationMs?: number | undefined;
986
- costInCents?: number | undefined;
987
- baseCostInCents?: number | undefined;
988
- priority?: number | undefined;
989
1064
  } & {
990
1065
  traceContext?: Record<string, unknown> | undefined;
991
1066
  };
1067
+ worker: {
1068
+ id: string;
1069
+ version: string;
1070
+ contentHash: string;
1071
+ type?: "V1" | "V2" | undefined;
1072
+ };
1073
+ batch?: {
1074
+ id: string;
1075
+ } | undefined;
1076
+ }, {
1077
+ task: {
1078
+ id: string;
1079
+ filePath: string;
1080
+ exportName?: string | undefined;
1081
+ };
992
1082
  queue: {
993
1083
  name: string;
994
1084
  id: string;
@@ -1021,25 +1111,53 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
1021
1111
  slug: string;
1022
1112
  ref: string;
1023
1113
  };
1114
+ attempt: {
1115
+ number: number;
1116
+ status: string;
1117
+ id: string;
1118
+ startedAt: Date;
1119
+ backgroundWorkerId: string;
1120
+ backgroundWorkerTaskId: string;
1121
+ };
1122
+ run: {
1123
+ payload: string;
1124
+ id: string;
1125
+ payloadType: string;
1126
+ tags: string[];
1127
+ createdAt: Date;
1128
+ baseCostInCents: number;
1129
+ durationMs: number;
1130
+ costInCents: number;
1131
+ context?: unknown;
1132
+ metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1133
+ isTest?: boolean | undefined;
1134
+ startedAt?: Date | undefined;
1135
+ idempotencyKey?: string | undefined;
1136
+ maxAttempts?: number | undefined;
1137
+ version?: string | undefined;
1138
+ maxDuration?: number | undefined;
1139
+ } & {
1140
+ traceContext?: Record<string, unknown> | undefined;
1141
+ };
1024
1142
  worker: {
1025
1143
  id: string;
1026
1144
  version: string;
1027
1145
  contentHash: string;
1028
1146
  type?: "V1" | "V2" | undefined;
1029
1147
  };
1030
- batch?: {
1031
- id: string;
1032
- } | undefined;
1033
1148
  machine?: {
1034
1149
  cpu: number;
1035
1150
  memory: number;
1036
1151
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1037
1152
  centsPerMs: number;
1038
1153
  } | undefined;
1154
+ batch?: {
1155
+ id: string;
1156
+ } | undefined;
1039
1157
  }>;
1040
- export type ProdTaskRunExecution = z.infer<typeof ProdTaskRunExecution>;
1041
- export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1042
- execution: z.ZodObject<z.objectUtil.extendShape<{
1158
+ export type V3ProdTaskRunExecution = z.infer<typeof V3ProdTaskRunExecution>;
1159
+ export declare const V3ProdTaskRunExecutionPayload: z.ZodObject<{
1160
+ execution: z.ZodObject<{
1043
1161
  task: z.ZodObject<{
1044
1162
  id: z.ZodString;
1045
1163
  filePath: z.ZodString;
@@ -1088,11 +1206,10 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1088
1206
  version: z.ZodOptional<z.ZodString>;
1089
1207
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../index.js").DeserializedJson, z.ZodTypeDef, import("../../index.js").DeserializedJson>>>;
1090
1208
  maxDuration: z.ZodOptional<z.ZodNumber>;
1091
- context: z.ZodAny;
1092
- durationMs: z.ZodDefault<z.ZodNumber>;
1093
- costInCents: z.ZodDefault<z.ZodNumber>;
1094
- baseCostInCents: z.ZodDefault<z.ZodNumber>;
1095
- priority: z.ZodOptional<z.ZodNumber>;
1209
+ context: z.ZodUnknown;
1210
+ durationMs: z.ZodNumber;
1211
+ costInCents: z.ZodNumber;
1212
+ baseCostInCents: z.ZodNumber;
1096
1213
  }, "strip", z.ZodTypeAny, {
1097
1214
  payload: string;
1098
1215
  id: string;
@@ -1101,23 +1218,25 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1101
1218
  isTest: boolean;
1102
1219
  createdAt: Date;
1103
1220
  startedAt: Date;
1221
+ baseCostInCents: number;
1104
1222
  durationMs: number;
1105
1223
  costInCents: number;
1106
- baseCostInCents: number;
1107
- context?: any;
1224
+ context?: unknown;
1108
1225
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1109
1226
  idempotencyKey?: string | undefined;
1110
1227
  maxAttempts?: number | undefined;
1111
1228
  version?: string | undefined;
1112
1229
  maxDuration?: number | undefined;
1113
- priority?: number | undefined;
1114
1230
  }, {
1115
1231
  payload: string;
1116
1232
  id: string;
1117
1233
  payloadType: string;
1118
1234
  tags: string[];
1119
1235
  createdAt: Date;
1120
- context?: any;
1236
+ baseCostInCents: number;
1237
+ durationMs: number;
1238
+ costInCents: number;
1239
+ context?: unknown;
1121
1240
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1122
1241
  isTest?: boolean | undefined;
1123
1242
  startedAt?: Date | undefined;
@@ -1125,10 +1244,6 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1125
1244
  maxAttempts?: number | undefined;
1126
1245
  version?: string | undefined;
1127
1246
  maxDuration?: number | undefined;
1128
- durationMs?: number | undefined;
1129
- costInCents?: number | undefined;
1130
- baseCostInCents?: number | undefined;
1131
- priority?: number | undefined;
1132
1247
  }>, z.ZodObject<{
1133
1248
  traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1134
1249
  }, "strip", z.ZodTypeAny, {
@@ -1244,30 +1359,14 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1244
1359
  slug: string;
1245
1360
  ref: string;
1246
1361
  }>;
1247
- batch: z.ZodOptional<z.ZodObject<{
1248
- id: z.ZodString;
1249
- }, "strip", z.ZodTypeAny, {
1250
- id: string;
1251
- }, {
1252
- id: string;
1253
- }>>;
1254
- machine: z.ZodObject<{
1255
- name: z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>;
1256
- cpu: z.ZodNumber;
1257
- memory: z.ZodNumber;
1258
- centsPerMs: z.ZodNumber;
1259
- }, "strip", z.ZodTypeAny, {
1260
- cpu: number;
1261
- memory: number;
1262
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1263
- centsPerMs: number;
1264
- }, {
1265
- cpu: number;
1266
- memory: number;
1267
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1268
- centsPerMs: number;
1269
- }>;
1270
- }, {
1362
+ batch: z.ZodOptional<z.ZodObject<{
1363
+ id: z.ZodString;
1364
+ }, "strip", z.ZodTypeAny, {
1365
+ id: string;
1366
+ }, {
1367
+ id: string;
1368
+ }>>;
1369
+ } & {
1271
1370
  worker: z.ZodObject<{
1272
1371
  id: z.ZodString;
1273
1372
  contentHash: z.ZodString;
@@ -1300,41 +1399,12 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1300
1399
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1301
1400
  centsPerMs: number;
1302
1401
  }>>;
1303
- }>, "strip", z.ZodTypeAny, {
1402
+ }, "strip", z.ZodTypeAny, {
1304
1403
  task: {
1305
1404
  id: string;
1306
1405
  filePath: string;
1307
1406
  exportName?: string | undefined;
1308
1407
  };
1309
- attempt: {
1310
- number: number;
1311
- status: string;
1312
- id: string;
1313
- startedAt: Date;
1314
- backgroundWorkerId: string;
1315
- backgroundWorkerTaskId: string;
1316
- };
1317
- run: {
1318
- payload: string;
1319
- id: string;
1320
- payloadType: string;
1321
- tags: string[];
1322
- isTest: boolean;
1323
- createdAt: Date;
1324
- startedAt: Date;
1325
- durationMs: number;
1326
- costInCents: number;
1327
- baseCostInCents: number;
1328
- context?: any;
1329
- metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1330
- idempotencyKey?: string | undefined;
1331
- maxAttempts?: number | undefined;
1332
- version?: string | undefined;
1333
- maxDuration?: number | undefined;
1334
- priority?: number | undefined;
1335
- } & {
1336
- traceContext?: Record<string, unknown> | undefined;
1337
- };
1338
1408
  queue: {
1339
1409
  name: string;
1340
1410
  id: string;
@@ -1373,21 +1443,6 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1373
1443
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1374
1444
  centsPerMs: number;
1375
1445
  };
1376
- worker: {
1377
- id: string;
1378
- version: string;
1379
- contentHash: string;
1380
- type?: "V1" | "V2" | undefined;
1381
- };
1382
- batch?: {
1383
- id: string;
1384
- } | undefined;
1385
- }, {
1386
- task: {
1387
- id: string;
1388
- filePath: string;
1389
- exportName?: string | undefined;
1390
- };
1391
1446
  attempt: {
1392
1447
  number: number;
1393
1448
  status: string;
@@ -1401,22 +1456,36 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1401
1456
  id: string;
1402
1457
  payloadType: string;
1403
1458
  tags: string[];
1459
+ isTest: boolean;
1404
1460
  createdAt: Date;
1405
- context?: any;
1461
+ startedAt: Date;
1462
+ baseCostInCents: number;
1463
+ durationMs: number;
1464
+ costInCents: number;
1465
+ context?: unknown;
1406
1466
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1407
- isTest?: boolean | undefined;
1408
- startedAt?: Date | undefined;
1409
1467
  idempotencyKey?: string | undefined;
1410
1468
  maxAttempts?: number | undefined;
1411
1469
  version?: string | undefined;
1412
1470
  maxDuration?: number | undefined;
1413
- durationMs?: number | undefined;
1414
- costInCents?: number | undefined;
1415
- baseCostInCents?: number | undefined;
1416
- priority?: number | undefined;
1417
1471
  } & {
1418
1472
  traceContext?: Record<string, unknown> | undefined;
1419
1473
  };
1474
+ worker: {
1475
+ id: string;
1476
+ version: string;
1477
+ contentHash: string;
1478
+ type?: "V1" | "V2" | undefined;
1479
+ };
1480
+ batch?: {
1481
+ id: string;
1482
+ } | undefined;
1483
+ }, {
1484
+ task: {
1485
+ id: string;
1486
+ filePath: string;
1487
+ exportName?: string | undefined;
1488
+ };
1420
1489
  queue: {
1421
1490
  name: string;
1422
1491
  id: string;
@@ -1449,21 +1518,49 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1449
1518
  slug: string;
1450
1519
  ref: string;
1451
1520
  };
1521
+ attempt: {
1522
+ number: number;
1523
+ status: string;
1524
+ id: string;
1525
+ startedAt: Date;
1526
+ backgroundWorkerId: string;
1527
+ backgroundWorkerTaskId: string;
1528
+ };
1529
+ run: {
1530
+ payload: string;
1531
+ id: string;
1532
+ payloadType: string;
1533
+ tags: string[];
1534
+ createdAt: Date;
1535
+ baseCostInCents: number;
1536
+ durationMs: number;
1537
+ costInCents: number;
1538
+ context?: unknown;
1539
+ metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1540
+ isTest?: boolean | undefined;
1541
+ startedAt?: Date | undefined;
1542
+ idempotencyKey?: string | undefined;
1543
+ maxAttempts?: number | undefined;
1544
+ version?: string | undefined;
1545
+ maxDuration?: number | undefined;
1546
+ } & {
1547
+ traceContext?: Record<string, unknown> | undefined;
1548
+ };
1452
1549
  worker: {
1453
1550
  id: string;
1454
1551
  version: string;
1455
1552
  contentHash: string;
1456
1553
  type?: "V1" | "V2" | undefined;
1457
1554
  };
1458
- batch?: {
1459
- id: string;
1460
- } | undefined;
1461
1555
  machine?: {
1462
1556
  cpu: number;
1463
1557
  memory: number;
1464
1558
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1465
1559
  centsPerMs: number;
1466
1560
  } | undefined;
1561
+ batch?: {
1562
+ id: string;
1563
+ } | undefined;
1467
1564
  }>;
1468
1565
  traceContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1469
1566
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -1491,35 +1588,6 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1491
1588
  filePath: string;
1492
1589
  exportName?: string | undefined;
1493
1590
  };
1494
- attempt: {
1495
- number: number;
1496
- status: string;
1497
- id: string;
1498
- startedAt: Date;
1499
- backgroundWorkerId: string;
1500
- backgroundWorkerTaskId: string;
1501
- };
1502
- run: {
1503
- payload: string;
1504
- id: string;
1505
- payloadType: string;
1506
- tags: string[];
1507
- isTest: boolean;
1508
- createdAt: Date;
1509
- startedAt: Date;
1510
- durationMs: number;
1511
- costInCents: number;
1512
- baseCostInCents: number;
1513
- context?: any;
1514
- metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1515
- idempotencyKey?: string | undefined;
1516
- maxAttempts?: number | undefined;
1517
- version?: string | undefined;
1518
- maxDuration?: number | undefined;
1519
- priority?: number | undefined;
1520
- } & {
1521
- traceContext?: Record<string, unknown> | undefined;
1522
- };
1523
1591
  queue: {
1524
1592
  name: string;
1525
1593
  id: string;
@@ -1558,6 +1626,34 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1558
1626
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1559
1627
  centsPerMs: number;
1560
1628
  };
1629
+ attempt: {
1630
+ number: number;
1631
+ status: string;
1632
+ id: string;
1633
+ startedAt: Date;
1634
+ backgroundWorkerId: string;
1635
+ backgroundWorkerTaskId: string;
1636
+ };
1637
+ run: {
1638
+ payload: string;
1639
+ id: string;
1640
+ payloadType: string;
1641
+ tags: string[];
1642
+ isTest: boolean;
1643
+ createdAt: Date;
1644
+ startedAt: Date;
1645
+ baseCostInCents: number;
1646
+ durationMs: number;
1647
+ costInCents: number;
1648
+ context?: unknown;
1649
+ metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1650
+ idempotencyKey?: string | undefined;
1651
+ maxAttempts?: number | undefined;
1652
+ version?: string | undefined;
1653
+ maxDuration?: number | undefined;
1654
+ } & {
1655
+ traceContext?: Record<string, unknown> | undefined;
1656
+ };
1561
1657
  worker: {
1562
1658
  id: string;
1563
1659
  version: string;
@@ -1583,35 +1679,6 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1583
1679
  filePath: string;
1584
1680
  exportName?: string | undefined;
1585
1681
  };
1586
- attempt: {
1587
- number: number;
1588
- status: string;
1589
- id: string;
1590
- startedAt: Date;
1591
- backgroundWorkerId: string;
1592
- backgroundWorkerTaskId: string;
1593
- };
1594
- run: {
1595
- payload: string;
1596
- id: string;
1597
- payloadType: string;
1598
- tags: string[];
1599
- createdAt: Date;
1600
- context?: any;
1601
- metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1602
- isTest?: boolean | undefined;
1603
- startedAt?: Date | undefined;
1604
- idempotencyKey?: string | undefined;
1605
- maxAttempts?: number | undefined;
1606
- version?: string | undefined;
1607
- maxDuration?: number | undefined;
1608
- durationMs?: number | undefined;
1609
- costInCents?: number | undefined;
1610
- baseCostInCents?: number | undefined;
1611
- priority?: number | undefined;
1612
- } & {
1613
- traceContext?: Record<string, unknown> | undefined;
1614
- };
1615
1682
  queue: {
1616
1683
  name: string;
1617
1684
  id: string;
@@ -1644,21 +1711,49 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1644
1711
  slug: string;
1645
1712
  ref: string;
1646
1713
  };
1714
+ attempt: {
1715
+ number: number;
1716
+ status: string;
1717
+ id: string;
1718
+ startedAt: Date;
1719
+ backgroundWorkerId: string;
1720
+ backgroundWorkerTaskId: string;
1721
+ };
1722
+ run: {
1723
+ payload: string;
1724
+ id: string;
1725
+ payloadType: string;
1726
+ tags: string[];
1727
+ createdAt: Date;
1728
+ baseCostInCents: number;
1729
+ durationMs: number;
1730
+ costInCents: number;
1731
+ context?: unknown;
1732
+ metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1733
+ isTest?: boolean | undefined;
1734
+ startedAt?: Date | undefined;
1735
+ idempotencyKey?: string | undefined;
1736
+ maxAttempts?: number | undefined;
1737
+ version?: string | undefined;
1738
+ maxDuration?: number | undefined;
1739
+ } & {
1740
+ traceContext?: Record<string, unknown> | undefined;
1741
+ };
1647
1742
  worker: {
1648
1743
  id: string;
1649
1744
  version: string;
1650
1745
  contentHash: string;
1651
1746
  type?: "V1" | "V2" | undefined;
1652
1747
  };
1653
- batch?: {
1654
- id: string;
1655
- } | undefined;
1656
1748
  machine?: {
1657
1749
  cpu: number;
1658
1750
  memory: number;
1659
1751
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1660
1752
  centsPerMs: number;
1661
1753
  } | undefined;
1754
+ batch?: {
1755
+ id: string;
1756
+ } | undefined;
1662
1757
  };
1663
1758
  environment?: Record<string, string> | undefined;
1664
1759
  metrics?: {
@@ -1668,7 +1763,7 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1668
1763
  duration: number;
1669
1764
  }[] | undefined;
1670
1765
  }>;
1671
- export type ProdTaskRunExecutionPayload = z.infer<typeof ProdTaskRunExecutionPayload>;
1766
+ export type V3ProdTaskRunExecutionPayload = z.infer<typeof V3ProdTaskRunExecutionPayload>;
1672
1767
  export declare const FixedWindowRateLimit: z.ZodObject<{
1673
1768
  type: z.ZodLiteral<"fixed-window">;
1674
1769
  limit: z.ZodNumber;
@@ -1950,46 +2045,11 @@ export declare const ScheduleMetadata: z.ZodObject<{
1950
2045
  export declare const TaskMetadata: z.ZodObject<{
1951
2046
  id: z.ZodString;
1952
2047
  description: z.ZodOptional<z.ZodString>;
1953
- queue: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
1954
- /** You can define a shared queue and then pass the name in to your task.
1955
- *
1956
- * @example
1957
- *
1958
- * ```ts
1959
- * const myQueue = queue({
1960
- name: "my-queue",
1961
- concurrencyLimit: 1,
1962
- });
1963
-
1964
- export const task1 = task({
1965
- id: "task-1",
1966
- queue: {
1967
- name: "my-queue",
1968
- },
1969
- run: async (payload: { message: string }) => {
1970
- // ...
1971
- },
1972
- });
1973
-
1974
- export const task2 = task({
1975
- id: "task-2",
1976
- queue: {
1977
- name: "my-queue",
1978
- },
1979
- run: async (payload: { message: string }) => {
1980
- // ...
1981
- },
1982
- });
1983
- * ```
1984
- */
1985
- name: z.ZodString;
1986
- /** An optional property that specifies the maximum number of concurrent run executions.
1987
- *
1988
- * If this property is omitted, the task can potentially use up the full concurrency of an environment */
2048
+ queue: z.ZodOptional<z.ZodObject<{
1989
2049
  concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1990
- }, {
2050
+ } & {
1991
2051
  name: z.ZodOptional<z.ZodString>;
1992
- }>, "strip", z.ZodTypeAny, {
2052
+ }, "strip", z.ZodTypeAny, {
1993
2053
  name?: string | undefined;
1994
2054
  concurrencyLimit?: number | null | undefined;
1995
2055
  }, {
@@ -2048,12 +2108,12 @@ export declare const TaskMetadata: z.ZodObject<{
2048
2108
  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>]>>;
2049
2109
  preset: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
2050
2110
  }, "strip", z.ZodTypeAny, {
2051
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
2052
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
2111
+ cpu?: 1 | 2 | 4 | 0.25 | 0.5 | undefined;
2112
+ memory?: 1 | 2 | 4 | 0.25 | 0.5 | 8 | undefined;
2053
2113
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
2054
2114
  }, {
2055
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
2056
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
2115
+ cpu?: 1 | 2 | 4 | 0.25 | 0.5 | undefined;
2116
+ memory?: 1 | 2 | 4 | 0.25 | 0.5 | 8 | undefined;
2057
2117
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
2058
2118
  }>>;
2059
2119
  triggerSource: z.ZodOptional<z.ZodString>;
@@ -2071,6 +2131,7 @@ export declare const TaskMetadata: z.ZodObject<{
2071
2131
  environments?: ("PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW")[] | undefined;
2072
2132
  }>>;
2073
2133
  maxDuration: z.ZodOptional<z.ZodNumber>;
2134
+ payloadSchema: z.ZodOptional<z.ZodUnknown>;
2074
2135
  }, "strip", z.ZodTypeAny, {
2075
2136
  id: string;
2076
2137
  maxDuration?: number | undefined;
@@ -2079,8 +2140,8 @@ export declare const TaskMetadata: z.ZodObject<{
2079
2140
  concurrencyLimit?: number | null | undefined;
2080
2141
  } | undefined;
2081
2142
  machine?: {
2082
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
2083
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
2143
+ cpu?: 1 | 2 | 4 | 0.25 | 0.5 | undefined;
2144
+ memory?: 1 | 2 | 4 | 0.25 | 0.5 | 8 | undefined;
2084
2145
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
2085
2146
  } | undefined;
2086
2147
  retry?: {
@@ -2100,6 +2161,7 @@ export declare const TaskMetadata: z.ZodObject<{
2100
2161
  timezone: string;
2101
2162
  environments?: ("PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW")[] | undefined;
2102
2163
  } | undefined;
2164
+ payloadSchema?: unknown;
2103
2165
  }, {
2104
2166
  id: string;
2105
2167
  maxDuration?: number | undefined;
@@ -2108,8 +2170,8 @@ export declare const TaskMetadata: z.ZodObject<{
2108
2170
  concurrencyLimit?: number | null | undefined;
2109
2171
  } | undefined;
2110
2172
  machine?: {
2111
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
2112
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
2173
+ cpu?: 1 | 2 | 4 | 0.25 | 0.5 | undefined;
2174
+ memory?: 1 | 2 | 4 | 0.25 | 0.5 | 8 | undefined;
2113
2175
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
2114
2176
  } | undefined;
2115
2177
  retry?: {
@@ -2129,6 +2191,7 @@ export declare const TaskMetadata: z.ZodObject<{
2129
2191
  timezone: string;
2130
2192
  environments?: ("PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW")[] | undefined;
2131
2193
  } | undefined;
2194
+ payloadSchema?: unknown;
2132
2195
  }>;
2133
2196
  export type TaskMetadata = z.infer<typeof TaskMetadata>;
2134
2197
  export declare const TaskFile: z.ZodObject<{
@@ -2162,46 +2225,11 @@ export declare const TaskManifest: z.ZodObject<{
2162
2225
  entryPoint: z.ZodString;
2163
2226
  id: z.ZodString;
2164
2227
  description: z.ZodOptional<z.ZodString>;
2165
- queue: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<{
2166
- /** You can define a shared queue and then pass the name in to your task.
2167
- *
2168
- * @example
2169
- *
2170
- * ```ts
2171
- * const myQueue = queue({
2172
- name: "my-queue",
2173
- concurrencyLimit: 1,
2174
- });
2175
-
2176
- export const task1 = task({
2177
- id: "task-1",
2178
- queue: {
2179
- name: "my-queue",
2180
- },
2181
- run: async (payload: { message: string }) => {
2182
- // ...
2183
- },
2184
- });
2185
-
2186
- export const task2 = task({
2187
- id: "task-2",
2188
- queue: {
2189
- name: "my-queue",
2190
- },
2191
- run: async (payload: { message: string }) => {
2192
- // ...
2193
- },
2194
- });
2195
- * ```
2196
- */
2197
- name: z.ZodString;
2198
- /** An optional property that specifies the maximum number of concurrent run executions.
2199
- *
2200
- * If this property is omitted, the task can potentially use up the full concurrency of an environment */
2228
+ queue: z.ZodOptional<z.ZodObject<{
2201
2229
  concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
2202
- }, {
2230
+ } & {
2203
2231
  name: z.ZodOptional<z.ZodString>;
2204
- }>, "strip", z.ZodTypeAny, {
2232
+ }, "strip", z.ZodTypeAny, {
2205
2233
  name?: string | undefined;
2206
2234
  concurrencyLimit?: number | null | undefined;
2207
2235
  }, {
@@ -2260,12 +2288,12 @@ export declare const TaskManifest: z.ZodObject<{
2260
2288
  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>]>>;
2261
2289
  preset: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
2262
2290
  }, "strip", z.ZodTypeAny, {
2263
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
2264
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
2291
+ cpu?: 1 | 2 | 4 | 0.25 | 0.5 | undefined;
2292
+ memory?: 1 | 2 | 4 | 0.25 | 0.5 | 8 | undefined;
2265
2293
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
2266
2294
  }, {
2267
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
2268
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
2295
+ cpu?: 1 | 2 | 4 | 0.25 | 0.5 | undefined;
2296
+ memory?: 1 | 2 | 4 | 0.25 | 0.5 | 8 | undefined;
2269
2297
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
2270
2298
  }>>;
2271
2299
  triggerSource: z.ZodOptional<z.ZodString>;
@@ -2283,21 +2311,22 @@ export declare const TaskManifest: z.ZodObject<{
2283
2311
  environments?: ("PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW")[] | undefined;
2284
2312
  }>>;
2285
2313
  maxDuration: z.ZodOptional<z.ZodNumber>;
2314
+ payloadSchema: z.ZodOptional<z.ZodUnknown>;
2286
2315
  }, "strip", z.ZodTypeAny, {
2287
2316
  id: string;
2288
2317
  filePath: string;
2289
2318
  entryPoint: string;
2290
2319
  maxDuration?: number | undefined;
2291
- exportName?: string | undefined;
2292
2320
  queue?: {
2293
2321
  name?: string | undefined;
2294
2322
  concurrencyLimit?: number | null | undefined;
2295
2323
  } | undefined;
2296
2324
  machine?: {
2297
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
2298
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
2325
+ cpu?: 1 | 2 | 4 | 0.25 | 0.5 | undefined;
2326
+ memory?: 1 | 2 | 4 | 0.25 | 0.5 | 8 | undefined;
2299
2327
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
2300
2328
  } | undefined;
2329
+ exportName?: string | undefined;
2301
2330
  retry?: {
2302
2331
  maxAttempts?: number | undefined;
2303
2332
  factor?: number | undefined;
@@ -2315,21 +2344,22 @@ export declare const TaskManifest: z.ZodObject<{
2315
2344
  timezone: string;
2316
2345
  environments?: ("PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW")[] | undefined;
2317
2346
  } | undefined;
2347
+ payloadSchema?: unknown;
2318
2348
  }, {
2319
2349
  id: string;
2320
2350
  filePath: string;
2321
2351
  entryPoint: string;
2322
2352
  maxDuration?: number | undefined;
2323
- exportName?: string | undefined;
2324
2353
  queue?: {
2325
2354
  name?: string | undefined;
2326
2355
  concurrencyLimit?: number | null | undefined;
2327
2356
  } | undefined;
2328
2357
  machine?: {
2329
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
2330
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
2358
+ cpu?: 1 | 2 | 4 | 0.25 | 0.5 | undefined;
2359
+ memory?: 1 | 2 | 4 | 0.25 | 0.5 | 8 | undefined;
2331
2360
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
2332
2361
  } | undefined;
2362
+ exportName?: string | undefined;
2333
2363
  retry?: {
2334
2364
  maxAttempts?: number | undefined;
2335
2365
  factor?: number | undefined;
@@ -2347,6 +2377,7 @@ export declare const TaskManifest: z.ZodObject<{
2347
2377
  timezone: string;
2348
2378
  environments?: ("PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW")[] | undefined;
2349
2379
  } | undefined;
2380
+ payloadSchema?: unknown;
2350
2381
  }>;
2351
2382
  export type TaskManifest = z.infer<typeof TaskManifest>;
2352
2383
  export declare const PostStartCauses: z.ZodEnum<["index", "create", "restore"]>;
@@ -2614,3 +2645,32 @@ export declare const RunChainState: z.ZodObject<{
2614
2645
  } | undefined;
2615
2646
  }>;
2616
2647
  export type RunChainState = z.infer<typeof RunChainState>;
2648
+ export declare const TriggerTraceContext: z.ZodObject<{
2649
+ traceparent: z.ZodOptional<z.ZodString>;
2650
+ tracestate: z.ZodOptional<z.ZodString>;
2651
+ external: z.ZodOptional<z.ZodObject<{
2652
+ traceparent: z.ZodOptional<z.ZodString>;
2653
+ tracestate: z.ZodOptional<z.ZodString>;
2654
+ }, "strip", z.ZodTypeAny, {
2655
+ traceparent?: string | undefined;
2656
+ tracestate?: string | undefined;
2657
+ }, {
2658
+ traceparent?: string | undefined;
2659
+ tracestate?: string | undefined;
2660
+ }>>;
2661
+ }, "strip", z.ZodTypeAny, {
2662
+ traceparent?: string | undefined;
2663
+ tracestate?: string | undefined;
2664
+ external?: {
2665
+ traceparent?: string | undefined;
2666
+ tracestate?: string | undefined;
2667
+ } | undefined;
2668
+ }, {
2669
+ traceparent?: string | undefined;
2670
+ tracestate?: string | undefined;
2671
+ external?: {
2672
+ traceparent?: string | undefined;
2673
+ tracestate?: string | undefined;
2674
+ } | undefined;
2675
+ }>;
2676
+ export type TriggerTraceContext = z.infer<typeof TriggerTraceContext>;