@trigger.dev/core 0.0.0-prerelease-20250212002625 → 0.0.0-python-preview-20250226140121

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 (161) hide show
  1. package/dist/commonjs/schemas/api.d.ts +1999 -1999
  2. package/dist/commonjs/schemas/events.d.ts +8 -8
  3. package/dist/commonjs/schemas/fetch.d.ts +54 -54
  4. package/dist/commonjs/schemas/integrations.d.ts +4 -4
  5. package/dist/commonjs/schemas/notifications.d.ts +80 -80
  6. package/dist/commonjs/schemas/properties.d.ts +4 -4
  7. package/dist/commonjs/schemas/request.d.ts +4 -4
  8. package/dist/commonjs/schemas/requestFilter.d.ts +2 -2
  9. package/dist/commonjs/schemas/runs.d.ts +39 -39
  10. package/dist/commonjs/schemas/schedules.d.ts +12 -12
  11. package/dist/commonjs/schemas/statuses.d.ts +24 -24
  12. package/dist/commonjs/schemas/tasks.d.ts +50 -50
  13. package/dist/commonjs/schemas/triggers.d.ts +36 -36
  14. package/dist/commonjs/v3/apiClient/index.d.ts +72 -72
  15. package/dist/commonjs/v3/apiClientManager/index.d.ts +1 -1
  16. package/dist/commonjs/v3/apps/provider.d.ts +1 -0
  17. package/dist/commonjs/v3/apps/provider.js +1 -0
  18. package/dist/commonjs/v3/apps/provider.js.map +1 -1
  19. package/dist/commonjs/v3/errors.d.ts +1 -0
  20. package/dist/commonjs/v3/errors.js +31 -0
  21. package/dist/commonjs/v3/errors.js.map +1 -1
  22. package/dist/commonjs/v3/index.d.ts +1 -0
  23. package/dist/commonjs/v3/index.js +1 -0
  24. package/dist/commonjs/v3/index.js.map +1 -1
  25. package/dist/commonjs/v3/links.d.ts +3 -0
  26. package/dist/commonjs/v3/links.js +3 -0
  27. package/dist/commonjs/v3/links.js.map +1 -1
  28. package/dist/commonjs/v3/run-timeline-metrics-api.d.ts +2 -0
  29. package/dist/commonjs/v3/run-timeline-metrics-api.js +8 -0
  30. package/dist/commonjs/v3/run-timeline-metrics-api.js.map +1 -0
  31. package/dist/commonjs/v3/runTimelineMetrics/index.d.ts +23 -0
  32. package/dist/commonjs/v3/runTimelineMetrics/index.js +160 -0
  33. package/dist/commonjs/v3/runTimelineMetrics/index.js.map +1 -0
  34. package/dist/commonjs/v3/runTimelineMetrics/runTimelineMetricsManager.d.ts +13 -0
  35. package/dist/commonjs/v3/runTimelineMetrics/runTimelineMetricsManager.js +52 -0
  36. package/dist/commonjs/v3/runTimelineMetrics/runTimelineMetricsManager.js.map +1 -0
  37. package/dist/commonjs/v3/runTimelineMetrics/types.d.ts +11 -0
  38. package/dist/commonjs/v3/runTimelineMetrics/types.js +3 -0
  39. package/dist/commonjs/v3/runTimelineMetrics/types.js.map +1 -0
  40. package/dist/commonjs/v3/schemas/api.d.ts +403 -403
  41. package/dist/commonjs/v3/schemas/build.d.ts +168 -168
  42. package/dist/commonjs/v3/schemas/common.d.ts +24 -24
  43. package/dist/commonjs/v3/schemas/common.js +1 -0
  44. package/dist/commonjs/v3/schemas/common.js.map +1 -1
  45. package/dist/commonjs/v3/schemas/fetch.d.ts +13 -13
  46. package/dist/commonjs/v3/schemas/index.d.ts +1 -0
  47. package/dist/commonjs/v3/schemas/index.js +1 -0
  48. package/dist/commonjs/v3/schemas/index.js.map +1 -1
  49. package/dist/commonjs/v3/schemas/messages.d.ts +6213 -3727
  50. package/dist/commonjs/v3/schemas/messages.js +22 -0
  51. package/dist/commonjs/v3/schemas/messages.js.map +1 -1
  52. package/dist/commonjs/v3/schemas/openTelemetry.d.ts +20 -20
  53. package/dist/commonjs/v3/schemas/resources.d.ts +58 -58
  54. package/dist/commonjs/v3/schemas/schemas.d.ts +386 -253
  55. package/dist/commonjs/v3/schemas/schemas.js +17 -1
  56. package/dist/commonjs/v3/schemas/schemas.js.map +1 -1
  57. package/dist/commonjs/v3/schemas/webhooks.d.ts +1612 -0
  58. package/dist/commonjs/v3/schemas/webhooks.js +187 -0
  59. package/dist/commonjs/v3/schemas/webhooks.js.map +1 -0
  60. package/dist/commonjs/v3/semanticInternalAttributes.d.ts +1 -0
  61. package/dist/commonjs/v3/semanticInternalAttributes.js +1 -0
  62. package/dist/commonjs/v3/semanticInternalAttributes.js.map +1 -1
  63. package/dist/commonjs/v3/taskContext/index.js +1 -1
  64. package/dist/commonjs/v3/taskContext/index.js.map +1 -1
  65. package/dist/commonjs/v3/tracer.d.ts +10 -2
  66. package/dist/commonjs/v3/tracer.js +13 -4
  67. package/dist/commonjs/v3/tracer.js.map +1 -1
  68. package/dist/commonjs/v3/utils/flattenAttributes.js.map +1 -1
  69. package/dist/commonjs/v3/utils/globals.d.ts +2 -0
  70. package/dist/commonjs/v3/utils/globals.js.map +1 -1
  71. package/dist/commonjs/v3/workers/index.d.ts +1 -0
  72. package/dist/commonjs/v3/workers/index.js +3 -1
  73. package/dist/commonjs/v3/workers/index.js.map +1 -1
  74. package/dist/commonjs/v3/workers/taskExecutor.js +19 -9
  75. package/dist/commonjs/v3/workers/taskExecutor.js.map +1 -1
  76. package/dist/commonjs/v3/zodMessageHandler.d.ts +2 -2
  77. package/dist/commonjs/v3/zodSocket.d.ts +2 -2
  78. package/dist/commonjs/v3/zodSocket.js +3 -2
  79. package/dist/commonjs/v3/zodSocket.js.map +1 -1
  80. package/dist/commonjs/version.js +1 -1
  81. package/dist/esm/schemas/api.d.ts +2001 -2001
  82. package/dist/esm/schemas/events.d.ts +8 -8
  83. package/dist/esm/schemas/fetch.d.ts +54 -54
  84. package/dist/esm/schemas/integrations.d.ts +4 -4
  85. package/dist/esm/schemas/notifications.d.ts +80 -80
  86. package/dist/esm/schemas/properties.d.ts +4 -4
  87. package/dist/esm/schemas/request.d.ts +4 -4
  88. package/dist/esm/schemas/requestFilter.d.ts +2 -2
  89. package/dist/esm/schemas/runs.d.ts +39 -39
  90. package/dist/esm/schemas/schedules.d.ts +12 -12
  91. package/dist/esm/schemas/statuses.d.ts +24 -24
  92. package/dist/esm/schemas/tasks.d.ts +50 -50
  93. package/dist/esm/schemas/triggers.d.ts +36 -36
  94. package/dist/esm/v3/apiClient/index.d.ts +72 -72
  95. package/dist/esm/v3/apiClientManager/index.d.ts +1 -1
  96. package/dist/esm/v3/apps/provider.d.ts +1 -0
  97. package/dist/esm/v3/apps/provider.js +1 -0
  98. package/dist/esm/v3/apps/provider.js.map +1 -1
  99. package/dist/esm/v3/errors.d.ts +1 -0
  100. package/dist/esm/v3/errors.js +30 -0
  101. package/dist/esm/v3/errors.js.map +1 -1
  102. package/dist/esm/v3/index.d.ts +1 -0
  103. package/dist/esm/v3/index.js +1 -0
  104. package/dist/esm/v3/index.js.map +1 -1
  105. package/dist/esm/v3/links.d.ts +3 -0
  106. package/dist/esm/v3/links.js +3 -0
  107. package/dist/esm/v3/links.js.map +1 -1
  108. package/dist/esm/v3/run-timeline-metrics-api.d.ts +2 -0
  109. package/dist/esm/v3/run-timeline-metrics-api.js +5 -0
  110. package/dist/esm/v3/run-timeline-metrics-api.js.map +1 -0
  111. package/dist/esm/v3/runTimelineMetrics/index.d.ts +23 -0
  112. package/dist/esm/v3/runTimelineMetrics/index.js +156 -0
  113. package/dist/esm/v3/runTimelineMetrics/index.js.map +1 -0
  114. package/dist/esm/v3/runTimelineMetrics/runTimelineMetricsManager.d.ts +13 -0
  115. package/dist/esm/v3/runTimelineMetrics/runTimelineMetricsManager.js +47 -0
  116. package/dist/esm/v3/runTimelineMetrics/runTimelineMetricsManager.js.map +1 -0
  117. package/dist/esm/v3/runTimelineMetrics/types.d.ts +11 -0
  118. package/dist/esm/v3/runTimelineMetrics/types.js +2 -0
  119. package/dist/esm/v3/runTimelineMetrics/types.js.map +1 -0
  120. package/dist/esm/v3/schemas/api.d.ts +403 -403
  121. package/dist/esm/v3/schemas/build.d.ts +168 -168
  122. package/dist/esm/v3/schemas/common.d.ts +24 -24
  123. package/dist/esm/v3/schemas/common.js +1 -0
  124. package/dist/esm/v3/schemas/common.js.map +1 -1
  125. package/dist/esm/v3/schemas/fetch.d.ts +13 -13
  126. package/dist/esm/v3/schemas/index.d.ts +1 -0
  127. package/dist/esm/v3/schemas/index.js +1 -0
  128. package/dist/esm/v3/schemas/index.js.map +1 -1
  129. package/dist/esm/v3/schemas/messages.d.ts +6213 -3727
  130. package/dist/esm/v3/schemas/messages.js +23 -1
  131. package/dist/esm/v3/schemas/messages.js.map +1 -1
  132. package/dist/esm/v3/schemas/openTelemetry.d.ts +20 -20
  133. package/dist/esm/v3/schemas/resources.d.ts +58 -58
  134. package/dist/esm/v3/schemas/schemas.d.ts +386 -253
  135. package/dist/esm/v3/schemas/schemas.js +16 -0
  136. package/dist/esm/v3/schemas/schemas.js.map +1 -1
  137. package/dist/esm/v3/schemas/webhooks.d.ts +1612 -0
  138. package/dist/esm/v3/schemas/webhooks.js +184 -0
  139. package/dist/esm/v3/schemas/webhooks.js.map +1 -0
  140. package/dist/esm/v3/semanticInternalAttributes.d.ts +1 -0
  141. package/dist/esm/v3/semanticInternalAttributes.js +1 -0
  142. package/dist/esm/v3/semanticInternalAttributes.js.map +1 -1
  143. package/dist/esm/v3/taskContext/index.js +1 -1
  144. package/dist/esm/v3/taskContext/index.js.map +1 -1
  145. package/dist/esm/v3/tracer.d.ts +10 -2
  146. package/dist/esm/v3/tracer.js +13 -4
  147. package/dist/esm/v3/tracer.js.map +1 -1
  148. package/dist/esm/v3/utils/flattenAttributes.js.map +1 -1
  149. package/dist/esm/v3/utils/globals.d.ts +2 -0
  150. package/dist/esm/v3/utils/globals.js.map +1 -1
  151. package/dist/esm/v3/workers/index.d.ts +1 -0
  152. package/dist/esm/v3/workers/index.js +1 -0
  153. package/dist/esm/v3/workers/index.js.map +1 -1
  154. package/dist/esm/v3/workers/taskExecutor.js +20 -10
  155. package/dist/esm/v3/workers/taskExecutor.js.map +1 -1
  156. package/dist/esm/v3/zodMessageHandler.d.ts +2 -2
  157. package/dist/esm/v3/zodSocket.d.ts +2 -2
  158. package/dist/esm/v3/zodSocket.js +3 -2
  159. package/dist/esm/v3/zodSocket.js.map +1 -1
  160. package/dist/esm/version.js +1 -1
  161. package/package.json +1 -1
@@ -2,6 +2,40 @@ import { z } from "zod";
2
2
  import { RequireKeys } from "../types/index.js";
3
3
  export declare const EnvironmentType: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
4
4
  export type EnvironmentType = z.infer<typeof EnvironmentType>;
5
+ export declare const TaskRunExecutionMetric: z.ZodObject<{
6
+ name: z.ZodString;
7
+ event: z.ZodString;
8
+ timestamp: z.ZodNumber;
9
+ duration: z.ZodNumber;
10
+ }, "strip", z.ZodTypeAny, {
11
+ name: string;
12
+ event: string;
13
+ timestamp: number;
14
+ duration: number;
15
+ }, {
16
+ name: string;
17
+ event: string;
18
+ timestamp: number;
19
+ duration: number;
20
+ }>;
21
+ export type TaskRunExecutionMetric = z.infer<typeof TaskRunExecutionMetric>;
22
+ export declare const TaskRunExecutionMetrics: z.ZodArray<z.ZodObject<{
23
+ name: z.ZodString;
24
+ event: z.ZodString;
25
+ timestamp: z.ZodNumber;
26
+ duration: z.ZodNumber;
27
+ }, "strip", z.ZodTypeAny, {
28
+ name: string;
29
+ event: string;
30
+ timestamp: number;
31
+ duration: number;
32
+ }, {
33
+ name: string;
34
+ event: string;
35
+ timestamp: number;
36
+ duration: number;
37
+ }>, "many">;
38
+ export type TaskRunExecutionMetrics = z.infer<typeof TaskRunExecutionMetrics>;
5
39
  export declare const TaskRunExecutionPayload: z.ZodObject<{
6
40
  execution: z.ZodObject<{
7
41
  task: z.ZodObject<{
@@ -10,12 +44,12 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
10
44
  exportName: z.ZodString;
11
45
  }, "strip", z.ZodTypeAny, {
12
46
  id: string;
13
- exportName: string;
14
47
  filePath: string;
48
+ exportName: string;
15
49
  }, {
16
50
  id: string;
17
- exportName: string;
18
51
  filePath: string;
52
+ exportName: string;
19
53
  }>;
20
54
  attempt: z.ZodObject<{
21
55
  id: z.ZodString;
@@ -26,15 +60,15 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
26
60
  status: z.ZodString;
27
61
  }, "strip", z.ZodTypeAny, {
28
62
  number: number;
29
- id: string;
30
63
  status: string;
64
+ id: string;
31
65
  startedAt: Date;
32
66
  backgroundWorkerId: string;
33
67
  backgroundWorkerTaskId: string;
34
68
  }, {
35
69
  number: number;
36
- id: string;
37
70
  status: string;
71
+ id: string;
38
72
  startedAt: Date;
39
73
  backgroundWorkerId: string;
40
74
  backgroundWorkerTaskId: string;
@@ -67,51 +101,51 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
67
101
  durationMs: number;
68
102
  costInCents: number;
69
103
  baseCostInCents: number;
70
- maxAttempts?: number | undefined;
71
- maxDuration?: number | undefined;
72
- version?: string | undefined;
73
104
  context?: any;
74
105
  idempotencyKey?: string | undefined;
106
+ maxAttempts?: number | undefined;
107
+ version?: string | undefined;
75
108
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
109
+ maxDuration?: number | undefined;
76
110
  }, {
77
111
  id: string;
78
112
  payload: string;
79
113
  payloadType: string;
80
114
  tags: string[];
81
115
  createdAt: Date;
82
- maxAttempts?: number | undefined;
83
- maxDuration?: number | undefined;
84
- version?: string | undefined;
85
116
  startedAt?: Date | undefined;
86
117
  context?: any;
87
118
  isTest?: boolean | undefined;
88
119
  idempotencyKey?: string | undefined;
120
+ maxAttempts?: number | undefined;
89
121
  durationMs?: number | undefined;
90
122
  costInCents?: number | undefined;
91
123
  baseCostInCents?: number | undefined;
124
+ version?: string | undefined;
92
125
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
126
+ maxDuration?: number | undefined;
93
127
  }>;
94
128
  queue: z.ZodObject<{
95
129
  id: z.ZodString;
96
130
  name: z.ZodString;
97
131
  }, "strip", z.ZodTypeAny, {
98
- id: string;
99
132
  name: string;
100
- }, {
101
133
  id: string;
134
+ }, {
102
135
  name: string;
136
+ id: string;
103
137
  }>;
104
138
  environment: z.ZodObject<{
105
139
  id: z.ZodString;
106
140
  slug: z.ZodString;
107
141
  type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
108
142
  }, "strip", z.ZodTypeAny, {
109
- id: string;
110
143
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
144
+ id: string;
111
145
  slug: string;
112
146
  }, {
113
- id: string;
114
147
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
148
+ id: string;
115
149
  slug: string;
116
150
  }>;
117
151
  organization: z.ZodObject<{
@@ -119,12 +153,12 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
119
153
  slug: z.ZodString;
120
154
  name: z.ZodString;
121
155
  }, "strip", z.ZodTypeAny, {
122
- id: string;
123
156
  name: string;
157
+ id: string;
124
158
  slug: string;
125
159
  }, {
126
- id: string;
127
160
  name: string;
161
+ id: string;
128
162
  slug: string;
129
163
  }>;
130
164
  project: z.ZodObject<{
@@ -133,13 +167,13 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
133
167
  slug: z.ZodString;
134
168
  name: z.ZodString;
135
169
  }, "strip", z.ZodTypeAny, {
136
- id: string;
137
170
  name: string;
171
+ id: string;
138
172
  slug: string;
139
173
  ref: string;
140
174
  }, {
141
- id: string;
142
175
  name: string;
176
+ id: string;
143
177
  slug: string;
144
178
  ref: string;
145
179
  }>;
@@ -167,19 +201,15 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
167
201
  centsPerMs: number;
168
202
  }>>;
169
203
  }, "strip", z.ZodTypeAny, {
170
- queue: {
171
- id: string;
172
- name: string;
173
- };
174
204
  task: {
175
205
  id: string;
176
- exportName: string;
177
206
  filePath: string;
207
+ exportName: string;
178
208
  };
179
209
  attempt: {
180
210
  number: number;
181
- id: string;
182
211
  status: string;
212
+ id: string;
183
213
  startedAt: Date;
184
214
  backgroundWorkerId: string;
185
215
  backgroundWorkerTaskId: string;
@@ -195,52 +225,52 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
195
225
  durationMs: number;
196
226
  costInCents: number;
197
227
  baseCostInCents: number;
198
- maxAttempts?: number | undefined;
199
- maxDuration?: number | undefined;
200
- version?: string | undefined;
201
228
  context?: any;
202
229
  idempotencyKey?: string | undefined;
230
+ maxAttempts?: number | undefined;
231
+ version?: string | undefined;
203
232
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
233
+ maxDuration?: number | undefined;
204
234
  };
205
- environment: {
235
+ queue: {
236
+ name: string;
206
237
  id: string;
238
+ };
239
+ environment: {
207
240
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
241
+ id: string;
208
242
  slug: string;
209
243
  };
210
244
  organization: {
211
- id: string;
212
245
  name: string;
246
+ id: string;
213
247
  slug: string;
214
248
  };
215
249
  project: {
216
- id: string;
217
250
  name: string;
251
+ id: string;
218
252
  slug: string;
219
253
  ref: string;
220
254
  };
255
+ batch?: {
256
+ id: string;
257
+ } | undefined;
221
258
  machine?: {
222
259
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
223
260
  cpu: number;
224
261
  memory: number;
225
262
  centsPerMs: number;
226
263
  } | undefined;
227
- batch?: {
228
- id: string;
229
- } | undefined;
230
264
  }, {
231
- queue: {
232
- id: string;
233
- name: string;
234
- };
235
265
  task: {
236
266
  id: string;
237
- exportName: string;
238
267
  filePath: string;
268
+ exportName: string;
239
269
  };
240
270
  attempt: {
241
271
  number: number;
242
- id: string;
243
272
  status: string;
273
+ id: string;
244
274
  startedAt: Date;
245
275
  backgroundWorkerId: string;
246
276
  backgroundWorkerTaskId: string;
@@ -251,61 +281,77 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
251
281
  payloadType: string;
252
282
  tags: string[];
253
283
  createdAt: Date;
254
- maxAttempts?: number | undefined;
255
- maxDuration?: number | undefined;
256
- version?: string | undefined;
257
284
  startedAt?: Date | undefined;
258
285
  context?: any;
259
286
  isTest?: boolean | undefined;
260
287
  idempotencyKey?: string | undefined;
288
+ maxAttempts?: number | undefined;
261
289
  durationMs?: number | undefined;
262
290
  costInCents?: number | undefined;
263
291
  baseCostInCents?: number | undefined;
292
+ version?: string | undefined;
264
293
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
294
+ maxDuration?: number | undefined;
265
295
  };
266
- environment: {
296
+ queue: {
297
+ name: string;
267
298
  id: string;
299
+ };
300
+ environment: {
268
301
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
302
+ id: string;
269
303
  slug: string;
270
304
  };
271
305
  organization: {
272
- id: string;
273
306
  name: string;
307
+ id: string;
274
308
  slug: string;
275
309
  };
276
310
  project: {
277
- id: string;
278
311
  name: string;
312
+ id: string;
279
313
  slug: string;
280
314
  ref: string;
281
315
  };
316
+ batch?: {
317
+ id: string;
318
+ } | undefined;
282
319
  machine?: {
283
320
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
284
321
  cpu: number;
285
322
  memory: number;
286
323
  centsPerMs: number;
287
324
  } | undefined;
288
- batch?: {
289
- id: string;
290
- } | undefined;
291
325
  }>;
292
326
  traceContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
293
327
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
328
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
329
+ name: z.ZodString;
330
+ event: z.ZodString;
331
+ timestamp: z.ZodNumber;
332
+ duration: z.ZodNumber;
333
+ }, "strip", z.ZodTypeAny, {
334
+ name: string;
335
+ event: string;
336
+ timestamp: number;
337
+ duration: number;
338
+ }, {
339
+ name: string;
340
+ event: string;
341
+ timestamp: number;
342
+ duration: number;
343
+ }>, "many">>;
294
344
  }, "strip", z.ZodTypeAny, {
295
345
  execution: {
296
- queue: {
297
- id: string;
298
- name: string;
299
- };
300
346
  task: {
301
347
  id: string;
302
- exportName: string;
303
348
  filePath: string;
349
+ exportName: string;
304
350
  };
305
351
  attempt: {
306
352
  number: number;
307
- id: string;
308
353
  status: string;
354
+ id: string;
309
355
  startedAt: Date;
310
356
  backgroundWorkerId: string;
311
357
  backgroundWorkerTaskId: string;
@@ -321,56 +367,62 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
321
367
  durationMs: number;
322
368
  costInCents: number;
323
369
  baseCostInCents: number;
324
- maxAttempts?: number | undefined;
325
- maxDuration?: number | undefined;
326
- version?: string | undefined;
327
370
  context?: any;
328
371
  idempotencyKey?: string | undefined;
372
+ maxAttempts?: number | undefined;
373
+ version?: string | undefined;
329
374
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
375
+ maxDuration?: number | undefined;
330
376
  };
331
- environment: {
377
+ queue: {
378
+ name: string;
332
379
  id: string;
380
+ };
381
+ environment: {
333
382
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
383
+ id: string;
334
384
  slug: string;
335
385
  };
336
386
  organization: {
337
- id: string;
338
387
  name: string;
388
+ id: string;
339
389
  slug: string;
340
390
  };
341
391
  project: {
342
- id: string;
343
392
  name: string;
393
+ id: string;
344
394
  slug: string;
345
395
  ref: string;
346
396
  };
397
+ batch?: {
398
+ id: string;
399
+ } | undefined;
347
400
  machine?: {
348
401
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
349
402
  cpu: number;
350
403
  memory: number;
351
404
  centsPerMs: number;
352
405
  } | undefined;
353
- batch?: {
354
- id: string;
355
- } | undefined;
356
406
  };
357
407
  traceContext: Record<string, unknown>;
358
408
  environment?: Record<string, string> | undefined;
409
+ metrics?: {
410
+ name: string;
411
+ event: string;
412
+ timestamp: number;
413
+ duration: number;
414
+ }[] | undefined;
359
415
  }, {
360
416
  execution: {
361
- queue: {
362
- id: string;
363
- name: string;
364
- };
365
417
  task: {
366
418
  id: string;
367
- exportName: string;
368
419
  filePath: string;
420
+ exportName: string;
369
421
  };
370
422
  attempt: {
371
423
  number: number;
372
- id: string;
373
424
  status: string;
425
+ id: string;
374
426
  startedAt: Date;
375
427
  backgroundWorkerId: string;
376
428
  backgroundWorkerTaskId: string;
@@ -381,46 +433,56 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
381
433
  payloadType: string;
382
434
  tags: string[];
383
435
  createdAt: Date;
384
- maxAttempts?: number | undefined;
385
- maxDuration?: number | undefined;
386
- version?: string | undefined;
387
436
  startedAt?: Date | undefined;
388
437
  context?: any;
389
438
  isTest?: boolean | undefined;
390
439
  idempotencyKey?: string | undefined;
440
+ maxAttempts?: number | undefined;
391
441
  durationMs?: number | undefined;
392
442
  costInCents?: number | undefined;
393
443
  baseCostInCents?: number | undefined;
444
+ version?: string | undefined;
394
445
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
446
+ maxDuration?: number | undefined;
395
447
  };
396
- environment: {
448
+ queue: {
449
+ name: string;
397
450
  id: string;
451
+ };
452
+ environment: {
398
453
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
454
+ id: string;
399
455
  slug: string;
400
456
  };
401
457
  organization: {
402
- id: string;
403
458
  name: string;
459
+ id: string;
404
460
  slug: string;
405
461
  };
406
462
  project: {
407
- id: string;
408
463
  name: string;
464
+ id: string;
409
465
  slug: string;
410
466
  ref: string;
411
467
  };
468
+ batch?: {
469
+ id: string;
470
+ } | undefined;
412
471
  machine?: {
413
472
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
414
473
  cpu: number;
415
474
  memory: number;
416
475
  centsPerMs: number;
417
476
  } | undefined;
418
- batch?: {
419
- id: string;
420
- } | undefined;
421
477
  };
422
478
  traceContext: Record<string, unknown>;
423
479
  environment?: Record<string, string> | undefined;
480
+ metrics?: {
481
+ name: string;
482
+ event: string;
483
+ timestamp: number;
484
+ duration: number;
485
+ }[] | undefined;
424
486
  }>;
425
487
  export type TaskRunExecutionPayload = z.infer<typeof TaskRunExecutionPayload>;
426
488
  export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<{
@@ -430,12 +492,12 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
430
492
  exportName: z.ZodString;
431
493
  }, "strip", z.ZodTypeAny, {
432
494
  id: string;
433
- exportName: string;
434
495
  filePath: string;
496
+ exportName: string;
435
497
  }, {
436
498
  id: string;
437
- exportName: string;
438
499
  filePath: string;
500
+ exportName: string;
439
501
  }>;
440
502
  attempt: z.ZodObject<{
441
503
  id: z.ZodString;
@@ -446,15 +508,15 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
446
508
  status: z.ZodString;
447
509
  }, "strip", z.ZodTypeAny, {
448
510
  number: number;
449
- id: string;
450
511
  status: string;
512
+ id: string;
451
513
  startedAt: Date;
452
514
  backgroundWorkerId: string;
453
515
  backgroundWorkerTaskId: string;
454
516
  }, {
455
517
  number: number;
456
- id: string;
457
518
  status: string;
519
+ id: string;
458
520
  startedAt: Date;
459
521
  backgroundWorkerId: string;
460
522
  backgroundWorkerTaskId: string;
@@ -487,51 +549,51 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
487
549
  durationMs: number;
488
550
  costInCents: number;
489
551
  baseCostInCents: number;
490
- maxAttempts?: number | undefined;
491
- maxDuration?: number | undefined;
492
- version?: string | undefined;
493
552
  context?: any;
494
553
  idempotencyKey?: string | undefined;
554
+ maxAttempts?: number | undefined;
555
+ version?: string | undefined;
495
556
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
557
+ maxDuration?: number | undefined;
496
558
  }, {
497
559
  id: string;
498
560
  payload: string;
499
561
  payloadType: string;
500
562
  tags: string[];
501
563
  createdAt: Date;
502
- maxAttempts?: number | undefined;
503
- maxDuration?: number | undefined;
504
- version?: string | undefined;
505
564
  startedAt?: Date | undefined;
506
565
  context?: any;
507
566
  isTest?: boolean | undefined;
508
567
  idempotencyKey?: string | undefined;
568
+ maxAttempts?: number | undefined;
509
569
  durationMs?: number | undefined;
510
570
  costInCents?: number | undefined;
511
571
  baseCostInCents?: number | undefined;
572
+ version?: string | undefined;
512
573
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
574
+ maxDuration?: number | undefined;
513
575
  }>;
514
576
  queue: z.ZodObject<{
515
577
  id: z.ZodString;
516
578
  name: z.ZodString;
517
579
  }, "strip", z.ZodTypeAny, {
518
- id: string;
519
580
  name: string;
520
- }, {
521
581
  id: string;
582
+ }, {
522
583
  name: string;
584
+ id: string;
523
585
  }>;
524
586
  environment: z.ZodObject<{
525
587
  id: z.ZodString;
526
588
  slug: z.ZodString;
527
589
  type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
528
590
  }, "strip", z.ZodTypeAny, {
529
- id: string;
530
591
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
592
+ id: string;
531
593
  slug: string;
532
594
  }, {
533
- id: string;
534
595
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
596
+ id: string;
535
597
  slug: string;
536
598
  }>;
537
599
  organization: z.ZodObject<{
@@ -539,12 +601,12 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
539
601
  slug: z.ZodString;
540
602
  name: z.ZodString;
541
603
  }, "strip", z.ZodTypeAny, {
542
- id: string;
543
604
  name: string;
605
+ id: string;
544
606
  slug: string;
545
607
  }, {
546
- id: string;
547
608
  name: string;
609
+ id: string;
548
610
  slug: string;
549
611
  }>;
550
612
  project: z.ZodObject<{
@@ -553,13 +615,13 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
553
615
  slug: z.ZodString;
554
616
  name: z.ZodString;
555
617
  }, "strip", z.ZodTypeAny, {
556
- id: string;
557
618
  name: string;
619
+ id: string;
558
620
  slug: string;
559
621
  ref: string;
560
622
  }, {
561
- id: string;
562
623
  name: string;
624
+ id: string;
563
625
  slug: string;
564
626
  ref: string;
565
627
  }>;
@@ -617,25 +679,15 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
617
679
  centsPerMs: number;
618
680
  }>>;
619
681
  }>, "strip", z.ZodTypeAny, {
620
- machine: {
621
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
622
- cpu: number;
623
- memory: number;
624
- centsPerMs: number;
625
- };
626
- queue: {
627
- id: string;
628
- name: string;
629
- };
630
682
  task: {
631
683
  id: string;
632
- exportName: string;
633
684
  filePath: string;
685
+ exportName: string;
634
686
  };
635
687
  attempt: {
636
688
  number: number;
637
- id: string;
638
689
  status: string;
690
+ id: string;
639
691
  startedAt: Date;
640
692
  backgroundWorkerId: string;
641
693
  backgroundWorkerTaskId: string;
@@ -651,29 +703,39 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
651
703
  durationMs: number;
652
704
  costInCents: number;
653
705
  baseCostInCents: number;
654
- maxAttempts?: number | undefined;
655
- maxDuration?: number | undefined;
656
- version?: string | undefined;
657
706
  context?: any;
658
707
  idempotencyKey?: string | undefined;
708
+ maxAttempts?: number | undefined;
709
+ version?: string | undefined;
659
710
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
711
+ maxDuration?: number | undefined;
660
712
  };
661
- environment: {
713
+ queue: {
714
+ name: string;
662
715
  id: string;
716
+ };
717
+ environment: {
663
718
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
719
+ id: string;
664
720
  slug: string;
665
721
  };
666
722
  organization: {
667
- id: string;
668
723
  name: string;
724
+ id: string;
669
725
  slug: string;
670
726
  };
671
727
  project: {
672
- id: string;
673
728
  name: string;
729
+ id: string;
674
730
  slug: string;
675
731
  ref: string;
676
732
  };
733
+ machine: {
734
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
735
+ cpu: number;
736
+ memory: number;
737
+ centsPerMs: number;
738
+ };
677
739
  worker: {
678
740
  id: string;
679
741
  version: string;
@@ -683,19 +745,15 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
683
745
  id: string;
684
746
  } | undefined;
685
747
  }, {
686
- queue: {
687
- id: string;
688
- name: string;
689
- };
690
748
  task: {
691
749
  id: string;
692
- exportName: string;
693
750
  filePath: string;
751
+ exportName: string;
694
752
  };
695
753
  attempt: {
696
754
  number: number;
697
- id: string;
698
755
  status: string;
756
+ id: string;
699
757
  startedAt: Date;
700
758
  backgroundWorkerId: string;
701
759
  backgroundWorkerTaskId: string;
@@ -706,31 +764,35 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
706
764
  payloadType: string;
707
765
  tags: string[];
708
766
  createdAt: Date;
709
- maxAttempts?: number | undefined;
710
- maxDuration?: number | undefined;
711
- version?: string | undefined;
712
767
  startedAt?: Date | undefined;
713
768
  context?: any;
714
769
  isTest?: boolean | undefined;
715
770
  idempotencyKey?: string | undefined;
771
+ maxAttempts?: number | undefined;
716
772
  durationMs?: number | undefined;
717
773
  costInCents?: number | undefined;
718
774
  baseCostInCents?: number | undefined;
775
+ version?: string | undefined;
719
776
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
777
+ maxDuration?: number | undefined;
720
778
  };
721
- environment: {
779
+ queue: {
780
+ name: string;
722
781
  id: string;
782
+ };
783
+ environment: {
723
784
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
785
+ id: string;
724
786
  slug: string;
725
787
  };
726
788
  organization: {
727
- id: string;
728
789
  name: string;
790
+ id: string;
729
791
  slug: string;
730
792
  };
731
793
  project: {
732
- id: string;
733
794
  name: string;
795
+ id: string;
734
796
  slug: string;
735
797
  ref: string;
736
798
  };
@@ -739,15 +801,15 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
739
801
  version: string;
740
802
  contentHash: string;
741
803
  };
804
+ batch?: {
805
+ id: string;
806
+ } | undefined;
742
807
  machine?: {
743
808
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
744
809
  cpu: number;
745
810
  memory: number;
746
811
  centsPerMs: number;
747
812
  } | undefined;
748
- batch?: {
749
- id: string;
750
- } | undefined;
751
813
  }>;
752
814
  export type ProdTaskRunExecution = z.infer<typeof ProdTaskRunExecution>;
753
815
  export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
@@ -758,12 +820,12 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
758
820
  exportName: z.ZodString;
759
821
  }, "strip", z.ZodTypeAny, {
760
822
  id: string;
761
- exportName: string;
762
823
  filePath: string;
824
+ exportName: string;
763
825
  }, {
764
826
  id: string;
765
- exportName: string;
766
827
  filePath: string;
828
+ exportName: string;
767
829
  }>;
768
830
  attempt: z.ZodObject<{
769
831
  id: z.ZodString;
@@ -774,15 +836,15 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
774
836
  status: z.ZodString;
775
837
  }, "strip", z.ZodTypeAny, {
776
838
  number: number;
777
- id: string;
778
839
  status: string;
840
+ id: string;
779
841
  startedAt: Date;
780
842
  backgroundWorkerId: string;
781
843
  backgroundWorkerTaskId: string;
782
844
  }, {
783
845
  number: number;
784
- id: string;
785
846
  status: string;
847
+ id: string;
786
848
  startedAt: Date;
787
849
  backgroundWorkerId: string;
788
850
  backgroundWorkerTaskId: string;
@@ -815,51 +877,51 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
815
877
  durationMs: number;
816
878
  costInCents: number;
817
879
  baseCostInCents: number;
818
- maxAttempts?: number | undefined;
819
- maxDuration?: number | undefined;
820
- version?: string | undefined;
821
880
  context?: any;
822
881
  idempotencyKey?: string | undefined;
882
+ maxAttempts?: number | undefined;
883
+ version?: string | undefined;
823
884
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
885
+ maxDuration?: number | undefined;
824
886
  }, {
825
887
  id: string;
826
888
  payload: string;
827
889
  payloadType: string;
828
890
  tags: string[];
829
891
  createdAt: Date;
830
- maxAttempts?: number | undefined;
831
- maxDuration?: number | undefined;
832
- version?: string | undefined;
833
892
  startedAt?: Date | undefined;
834
893
  context?: any;
835
894
  isTest?: boolean | undefined;
836
895
  idempotencyKey?: string | undefined;
896
+ maxAttempts?: number | undefined;
837
897
  durationMs?: number | undefined;
838
898
  costInCents?: number | undefined;
839
899
  baseCostInCents?: number | undefined;
900
+ version?: string | undefined;
840
901
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
902
+ maxDuration?: number | undefined;
841
903
  }>;
842
904
  queue: z.ZodObject<{
843
905
  id: z.ZodString;
844
906
  name: z.ZodString;
845
907
  }, "strip", z.ZodTypeAny, {
846
- id: string;
847
908
  name: string;
848
- }, {
849
909
  id: string;
910
+ }, {
850
911
  name: string;
912
+ id: string;
851
913
  }>;
852
914
  environment: z.ZodObject<{
853
915
  id: z.ZodString;
854
916
  slug: z.ZodString;
855
917
  type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
856
918
  }, "strip", z.ZodTypeAny, {
857
- id: string;
858
919
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
920
+ id: string;
859
921
  slug: string;
860
922
  }, {
861
- id: string;
862
923
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
924
+ id: string;
863
925
  slug: string;
864
926
  }>;
865
927
  organization: z.ZodObject<{
@@ -867,12 +929,12 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
867
929
  slug: z.ZodString;
868
930
  name: z.ZodString;
869
931
  }, "strip", z.ZodTypeAny, {
870
- id: string;
871
932
  name: string;
933
+ id: string;
872
934
  slug: string;
873
935
  }, {
874
- id: string;
875
936
  name: string;
937
+ id: string;
876
938
  slug: string;
877
939
  }>;
878
940
  project: z.ZodObject<{
@@ -881,13 +943,13 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
881
943
  slug: z.ZodString;
882
944
  name: z.ZodString;
883
945
  }, "strip", z.ZodTypeAny, {
884
- id: string;
885
946
  name: string;
947
+ id: string;
886
948
  slug: string;
887
949
  ref: string;
888
950
  }, {
889
- id: string;
890
951
  name: string;
952
+ id: string;
891
953
  slug: string;
892
954
  ref: string;
893
955
  }>;
@@ -945,25 +1007,15 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
945
1007
  centsPerMs: number;
946
1008
  }>>;
947
1009
  }>, "strip", z.ZodTypeAny, {
948
- machine: {
949
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
950
- cpu: number;
951
- memory: number;
952
- centsPerMs: number;
953
- };
954
- queue: {
955
- id: string;
956
- name: string;
957
- };
958
1010
  task: {
959
1011
  id: string;
960
- exportName: string;
961
1012
  filePath: string;
1013
+ exportName: string;
962
1014
  };
963
1015
  attempt: {
964
1016
  number: number;
965
- id: string;
966
1017
  status: string;
1018
+ id: string;
967
1019
  startedAt: Date;
968
1020
  backgroundWorkerId: string;
969
1021
  backgroundWorkerTaskId: string;
@@ -979,29 +1031,39 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
979
1031
  durationMs: number;
980
1032
  costInCents: number;
981
1033
  baseCostInCents: number;
982
- maxAttempts?: number | undefined;
983
- maxDuration?: number | undefined;
984
- version?: string | undefined;
985
1034
  context?: any;
986
1035
  idempotencyKey?: string | undefined;
1036
+ maxAttempts?: number | undefined;
1037
+ version?: string | undefined;
987
1038
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1039
+ maxDuration?: number | undefined;
988
1040
  };
989
- environment: {
1041
+ queue: {
1042
+ name: string;
990
1043
  id: string;
1044
+ };
1045
+ environment: {
991
1046
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1047
+ id: string;
992
1048
  slug: string;
993
1049
  };
994
1050
  organization: {
995
- id: string;
996
1051
  name: string;
1052
+ id: string;
997
1053
  slug: string;
998
1054
  };
999
1055
  project: {
1000
- id: string;
1001
1056
  name: string;
1057
+ id: string;
1002
1058
  slug: string;
1003
1059
  ref: string;
1004
1060
  };
1061
+ machine: {
1062
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1063
+ cpu: number;
1064
+ memory: number;
1065
+ centsPerMs: number;
1066
+ };
1005
1067
  worker: {
1006
1068
  id: string;
1007
1069
  version: string;
@@ -1011,19 +1073,15 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1011
1073
  id: string;
1012
1074
  } | undefined;
1013
1075
  }, {
1014
- queue: {
1015
- id: string;
1016
- name: string;
1017
- };
1018
1076
  task: {
1019
1077
  id: string;
1020
- exportName: string;
1021
1078
  filePath: string;
1079
+ exportName: string;
1022
1080
  };
1023
1081
  attempt: {
1024
1082
  number: number;
1025
- id: string;
1026
1083
  status: string;
1084
+ id: string;
1027
1085
  startedAt: Date;
1028
1086
  backgroundWorkerId: string;
1029
1087
  backgroundWorkerTaskId: string;
@@ -1034,31 +1092,35 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1034
1092
  payloadType: string;
1035
1093
  tags: string[];
1036
1094
  createdAt: Date;
1037
- maxAttempts?: number | undefined;
1038
- maxDuration?: number | undefined;
1039
- version?: string | undefined;
1040
1095
  startedAt?: Date | undefined;
1041
1096
  context?: any;
1042
1097
  isTest?: boolean | undefined;
1043
1098
  idempotencyKey?: string | undefined;
1099
+ maxAttempts?: number | undefined;
1044
1100
  durationMs?: number | undefined;
1045
1101
  costInCents?: number | undefined;
1046
1102
  baseCostInCents?: number | undefined;
1103
+ version?: string | undefined;
1047
1104
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1105
+ maxDuration?: number | undefined;
1048
1106
  };
1049
- environment: {
1107
+ queue: {
1108
+ name: string;
1050
1109
  id: string;
1110
+ };
1111
+ environment: {
1051
1112
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1113
+ id: string;
1052
1114
  slug: string;
1053
1115
  };
1054
1116
  organization: {
1055
- id: string;
1056
1117
  name: string;
1118
+ id: string;
1057
1119
  slug: string;
1058
1120
  };
1059
1121
  project: {
1060
- id: string;
1061
1122
  name: string;
1123
+ id: string;
1062
1124
  slug: string;
1063
1125
  ref: string;
1064
1126
  };
@@ -1067,39 +1129,45 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1067
1129
  version: string;
1068
1130
  contentHash: string;
1069
1131
  };
1132
+ batch?: {
1133
+ id: string;
1134
+ } | undefined;
1070
1135
  machine?: {
1071
1136
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1072
1137
  cpu: number;
1073
1138
  memory: number;
1074
1139
  centsPerMs: number;
1075
1140
  } | undefined;
1076
- batch?: {
1077
- id: string;
1078
- } | undefined;
1079
1141
  }>;
1080
1142
  traceContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1081
1143
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1144
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
1145
+ name: z.ZodString;
1146
+ event: z.ZodString;
1147
+ timestamp: z.ZodNumber;
1148
+ duration: z.ZodNumber;
1149
+ }, "strip", z.ZodTypeAny, {
1150
+ name: string;
1151
+ event: string;
1152
+ timestamp: number;
1153
+ duration: number;
1154
+ }, {
1155
+ name: string;
1156
+ event: string;
1157
+ timestamp: number;
1158
+ duration: number;
1159
+ }>, "many">>;
1082
1160
  }, "strip", z.ZodTypeAny, {
1083
1161
  execution: {
1084
- machine: {
1085
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1086
- cpu: number;
1087
- memory: number;
1088
- centsPerMs: number;
1089
- };
1090
- queue: {
1091
- id: string;
1092
- name: string;
1093
- };
1094
1162
  task: {
1095
1163
  id: string;
1096
- exportName: string;
1097
1164
  filePath: string;
1165
+ exportName: string;
1098
1166
  };
1099
1167
  attempt: {
1100
1168
  number: number;
1101
- id: string;
1102
1169
  status: string;
1170
+ id: string;
1103
1171
  startedAt: Date;
1104
1172
  backgroundWorkerId: string;
1105
1173
  backgroundWorkerTaskId: string;
@@ -1115,29 +1183,39 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1115
1183
  durationMs: number;
1116
1184
  costInCents: number;
1117
1185
  baseCostInCents: number;
1118
- maxAttempts?: number | undefined;
1119
- maxDuration?: number | undefined;
1120
- version?: string | undefined;
1121
1186
  context?: any;
1122
1187
  idempotencyKey?: string | undefined;
1188
+ maxAttempts?: number | undefined;
1189
+ version?: string | undefined;
1123
1190
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1191
+ maxDuration?: number | undefined;
1124
1192
  };
1125
- environment: {
1193
+ queue: {
1194
+ name: string;
1126
1195
  id: string;
1196
+ };
1197
+ environment: {
1127
1198
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1199
+ id: string;
1128
1200
  slug: string;
1129
1201
  };
1130
1202
  organization: {
1131
- id: string;
1132
1203
  name: string;
1204
+ id: string;
1133
1205
  slug: string;
1134
1206
  };
1135
1207
  project: {
1136
- id: string;
1137
1208
  name: string;
1209
+ id: string;
1138
1210
  slug: string;
1139
1211
  ref: string;
1140
1212
  };
1213
+ machine: {
1214
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1215
+ cpu: number;
1216
+ memory: number;
1217
+ centsPerMs: number;
1218
+ };
1141
1219
  worker: {
1142
1220
  id: string;
1143
1221
  version: string;
@@ -1149,21 +1227,23 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1149
1227
  };
1150
1228
  traceContext: Record<string, unknown>;
1151
1229
  environment?: Record<string, string> | undefined;
1230
+ metrics?: {
1231
+ name: string;
1232
+ event: string;
1233
+ timestamp: number;
1234
+ duration: number;
1235
+ }[] | undefined;
1152
1236
  }, {
1153
1237
  execution: {
1154
- queue: {
1155
- id: string;
1156
- name: string;
1157
- };
1158
1238
  task: {
1159
1239
  id: string;
1160
- exportName: string;
1161
1240
  filePath: string;
1241
+ exportName: string;
1162
1242
  };
1163
1243
  attempt: {
1164
1244
  number: number;
1165
- id: string;
1166
1245
  status: string;
1246
+ id: string;
1167
1247
  startedAt: Date;
1168
1248
  backgroundWorkerId: string;
1169
1249
  backgroundWorkerTaskId: string;
@@ -1174,31 +1254,35 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1174
1254
  payloadType: string;
1175
1255
  tags: string[];
1176
1256
  createdAt: Date;
1177
- maxAttempts?: number | undefined;
1178
- maxDuration?: number | undefined;
1179
- version?: string | undefined;
1180
1257
  startedAt?: Date | undefined;
1181
1258
  context?: any;
1182
1259
  isTest?: boolean | undefined;
1183
1260
  idempotencyKey?: string | undefined;
1261
+ maxAttempts?: number | undefined;
1184
1262
  durationMs?: number | undefined;
1185
1263
  costInCents?: number | undefined;
1186
1264
  baseCostInCents?: number | undefined;
1265
+ version?: string | undefined;
1187
1266
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1267
+ maxDuration?: number | undefined;
1188
1268
  };
1189
- environment: {
1269
+ queue: {
1270
+ name: string;
1190
1271
  id: string;
1272
+ };
1273
+ environment: {
1191
1274
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1275
+ id: string;
1192
1276
  slug: string;
1193
1277
  };
1194
1278
  organization: {
1195
- id: string;
1196
1279
  name: string;
1280
+ id: string;
1197
1281
  slug: string;
1198
1282
  };
1199
1283
  project: {
1200
- id: string;
1201
1284
  name: string;
1285
+ id: string;
1202
1286
  slug: string;
1203
1287
  ref: string;
1204
1288
  };
@@ -1207,18 +1291,24 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1207
1291
  version: string;
1208
1292
  contentHash: string;
1209
1293
  };
1294
+ batch?: {
1295
+ id: string;
1296
+ } | undefined;
1210
1297
  machine?: {
1211
1298
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1212
1299
  cpu: number;
1213
1300
  memory: number;
1214
1301
  centsPerMs: number;
1215
1302
  } | undefined;
1216
- batch?: {
1217
- id: string;
1218
- } | undefined;
1219
1303
  };
1220
1304
  traceContext: Record<string, unknown>;
1221
1305
  environment?: Record<string, string> | undefined;
1306
+ metrics?: {
1307
+ name: string;
1308
+ event: string;
1309
+ timestamp: number;
1310
+ duration: number;
1311
+ }[] | undefined;
1222
1312
  }>;
1223
1313
  export type ProdTaskRunExecutionPayload = z.infer<typeof ProdTaskRunExecutionPayload>;
1224
1314
  export declare const FixedWindowRateLimit: z.ZodObject<{
@@ -1595,12 +1685,12 @@ export declare const TaskMetadata: z.ZodObject<{
1595
1685
  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>]>>;
1596
1686
  preset: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1597
1687
  }, "strip", z.ZodTypeAny, {
1598
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1599
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1688
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1689
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1600
1690
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1601
1691
  }, {
1602
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1603
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1692
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1693
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1604
1694
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1605
1695
  }>>;
1606
1696
  triggerSource: z.ZodOptional<z.ZodString>;
@@ -1617,16 +1707,17 @@ export declare const TaskMetadata: z.ZodObject<{
1617
1707
  maxDuration: z.ZodOptional<z.ZodNumber>;
1618
1708
  }, "strip", z.ZodTypeAny, {
1619
1709
  id: string;
1620
- machine?: {
1621
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1622
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1623
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1624
- } | undefined;
1625
- description?: string | undefined;
1710
+ maxDuration?: number | undefined;
1626
1711
  queue?: {
1627
1712
  name?: string | undefined;
1628
1713
  concurrencyLimit?: number | null | undefined;
1629
1714
  } | undefined;
1715
+ machine?: {
1716
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1717
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1718
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1719
+ } | undefined;
1720
+ description?: string | undefined;
1630
1721
  retry?: {
1631
1722
  maxAttempts?: number | undefined;
1632
1723
  factor?: number | undefined;
@@ -1642,19 +1733,19 @@ export declare const TaskMetadata: z.ZodObject<{
1642
1733
  cron: string;
1643
1734
  timezone: string;
1644
1735
  } | undefined;
1645
- maxDuration?: number | undefined;
1646
1736
  }, {
1647
1737
  id: string;
1648
- machine?: {
1649
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1650
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1651
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1652
- } | undefined;
1653
- description?: string | undefined;
1738
+ maxDuration?: number | undefined;
1654
1739
  queue?: {
1655
1740
  name?: string | undefined;
1656
1741
  concurrencyLimit?: number | null | undefined;
1657
1742
  } | undefined;
1743
+ machine?: {
1744
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1745
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1746
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1747
+ } | undefined;
1748
+ description?: string | undefined;
1658
1749
  retry?: {
1659
1750
  maxAttempts?: number | undefined;
1660
1751
  factor?: number | undefined;
@@ -1670,7 +1761,6 @@ export declare const TaskMetadata: z.ZodObject<{
1670
1761
  cron: string;
1671
1762
  timezone: string;
1672
1763
  } | undefined;
1673
- maxDuration?: number | undefined;
1674
1764
  }>;
1675
1765
  export type TaskMetadata = z.infer<typeof TaskMetadata>;
1676
1766
  export declare const TaskFile: z.ZodObject<{
@@ -1689,12 +1779,12 @@ export declare const TaskFileMetadata: z.ZodObject<{
1689
1779
  exportName: z.ZodString;
1690
1780
  entryPoint: z.ZodString;
1691
1781
  }, "strip", z.ZodTypeAny, {
1692
- exportName: string;
1693
1782
  filePath: string;
1783
+ exportName: string;
1694
1784
  entryPoint: string;
1695
1785
  }, {
1696
- exportName: string;
1697
1786
  filePath: string;
1787
+ exportName: string;
1698
1788
  entryPoint: string;
1699
1789
  }>;
1700
1790
  export type TaskFileMetadata = z.infer<typeof TaskFileMetadata>;
@@ -1800,12 +1890,12 @@ export declare const TaskManifest: z.ZodObject<{
1800
1890
  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>]>>;
1801
1891
  preset: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1802
1892
  }, "strip", z.ZodTypeAny, {
1803
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1804
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1893
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1894
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1805
1895
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1806
1896
  }, {
1807
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1808
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1897
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1898
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1809
1899
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1810
1900
  }>>;
1811
1901
  triggerSource: z.ZodOptional<z.ZodString>;
@@ -1822,19 +1912,20 @@ export declare const TaskManifest: z.ZodObject<{
1822
1912
  maxDuration: z.ZodOptional<z.ZodNumber>;
1823
1913
  }, "strip", z.ZodTypeAny, {
1824
1914
  id: string;
1825
- exportName: string;
1826
1915
  filePath: string;
1916
+ exportName: string;
1827
1917
  entryPoint: string;
1828
- machine?: {
1829
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1830
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1831
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1832
- } | undefined;
1833
- description?: string | undefined;
1918
+ maxDuration?: number | undefined;
1834
1919
  queue?: {
1835
1920
  name?: string | undefined;
1836
1921
  concurrencyLimit?: number | null | undefined;
1837
1922
  } | undefined;
1923
+ machine?: {
1924
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1925
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1926
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1927
+ } | undefined;
1928
+ description?: string | undefined;
1838
1929
  retry?: {
1839
1930
  maxAttempts?: number | undefined;
1840
1931
  factor?: number | undefined;
@@ -1850,22 +1941,22 @@ export declare const TaskManifest: z.ZodObject<{
1850
1941
  cron: string;
1851
1942
  timezone: string;
1852
1943
  } | undefined;
1853
- maxDuration?: number | undefined;
1854
1944
  }, {
1855
1945
  id: string;
1856
- exportName: string;
1857
1946
  filePath: string;
1947
+ exportName: string;
1858
1948
  entryPoint: string;
1859
- machine?: {
1860
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1861
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1862
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1863
- } | undefined;
1864
- description?: string | undefined;
1949
+ maxDuration?: number | undefined;
1865
1950
  queue?: {
1866
1951
  name?: string | undefined;
1867
1952
  concurrencyLimit?: number | null | undefined;
1868
1953
  } | undefined;
1954
+ machine?: {
1955
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1956
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1957
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1958
+ } | undefined;
1959
+ description?: string | undefined;
1869
1960
  retry?: {
1870
1961
  maxAttempts?: number | undefined;
1871
1962
  factor?: number | undefined;
@@ -1881,7 +1972,6 @@ export declare const TaskManifest: z.ZodObject<{
1881
1972
  cron: string;
1882
1973
  timezone: string;
1883
1974
  } | undefined;
1884
- maxDuration?: number | undefined;
1885
1975
  }>;
1886
1976
  export type TaskManifest = z.infer<typeof TaskManifest>;
1887
1977
  export declare const PostStartCauses: z.ZodEnum<["index", "create", "restore"]>;
@@ -2039,12 +2129,34 @@ export declare const TaskRunExecutionLazyAttemptPayload: z.ZodObject<{
2039
2129
  isTest: z.ZodBoolean;
2040
2130
  traceContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2041
2131
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2132
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2133
+ name: z.ZodString;
2134
+ event: z.ZodString;
2135
+ timestamp: z.ZodNumber;
2136
+ duration: z.ZodNumber;
2137
+ }, "strip", z.ZodTypeAny, {
2138
+ name: string;
2139
+ event: string;
2140
+ timestamp: number;
2141
+ duration: number;
2142
+ }, {
2143
+ name: string;
2144
+ event: string;
2145
+ timestamp: number;
2146
+ duration: number;
2147
+ }>, "many">>;
2042
2148
  }, "strip", z.ZodTypeAny, {
2043
2149
  isTest: boolean;
2044
2150
  traceContext: Record<string, unknown>;
2045
2151
  runId: string;
2046
2152
  messageId: string;
2047
2153
  environment?: Record<string, string> | undefined;
2154
+ metrics?: {
2155
+ name: string;
2156
+ event: string;
2157
+ timestamp: number;
2158
+ duration: number;
2159
+ }[] | undefined;
2048
2160
  attemptCount?: number | undefined;
2049
2161
  }, {
2050
2162
  isTest: boolean;
@@ -2052,6 +2164,27 @@ export declare const TaskRunExecutionLazyAttemptPayload: z.ZodObject<{
2052
2164
  runId: string;
2053
2165
  messageId: string;
2054
2166
  environment?: Record<string, string> | undefined;
2167
+ metrics?: {
2168
+ name: string;
2169
+ event: string;
2170
+ timestamp: number;
2171
+ duration: number;
2172
+ }[] | undefined;
2055
2173
  attemptCount?: number | undefined;
2056
2174
  }>;
2057
2175
  export type TaskRunExecutionLazyAttemptPayload = z.infer<typeof TaskRunExecutionLazyAttemptPayload>;
2176
+ export declare const ManualCheckpointMetadata: z.ZodObject<{
2177
+ /** NOT a friendly ID */
2178
+ attemptId: z.ZodString;
2179
+ previousRunStatus: z.ZodString;
2180
+ previousAttemptStatus: z.ZodString;
2181
+ }, "strip", z.ZodTypeAny, {
2182
+ attemptId: string;
2183
+ previousRunStatus: string;
2184
+ previousAttemptStatus: string;
2185
+ }, {
2186
+ attemptId: string;
2187
+ previousRunStatus: string;
2188
+ previousAttemptStatus: string;
2189
+ }>;
2190
+ export type ManualCheckpointMetadata = z.infer<typeof ManualCheckpointMetadata>;