@trigger.dev/core 0.0.0-prerelease-20250116195421 → 0.0.0-prerelease-20250210232715

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 (62) hide show
  1. package/dist/commonjs/logger.js +38 -0
  2. package/dist/commonjs/logger.js.map +1 -1
  3. package/dist/commonjs/schemas/api.d.ts +121 -121
  4. package/dist/commonjs/schemas/tasks.d.ts +4 -4
  5. package/dist/commonjs/v3/apiClient/core.d.ts +26 -2
  6. package/dist/commonjs/v3/apiClient/core.js +51 -1
  7. package/dist/commonjs/v3/apiClient/core.js.map +1 -1
  8. package/dist/commonjs/v3/apiClient/index.d.ts +67 -67
  9. package/dist/commonjs/v3/apiClient/index.js.map +1 -1
  10. package/dist/commonjs/v3/apiClient/runStream.js +2 -2
  11. package/dist/commonjs/v3/build/runtime.js +15 -1
  12. package/dist/commonjs/v3/build/runtime.js.map +1 -1
  13. package/dist/commonjs/v3/runtime/preventMultipleWaits.d.ts +1 -0
  14. package/dist/commonjs/v3/schemas/api.d.ts +549 -515
  15. package/dist/commonjs/v3/schemas/api.js +22 -21
  16. package/dist/commonjs/v3/schemas/api.js.map +1 -1
  17. package/dist/commonjs/v3/schemas/build.d.ts +264 -202
  18. package/dist/commonjs/v3/schemas/fetch.d.ts +115 -0
  19. package/dist/commonjs/v3/schemas/messages.d.ts +3906 -3721
  20. package/dist/commonjs/v3/schemas/messages.js +4 -4
  21. package/dist/commonjs/v3/schemas/messages.js.map +1 -1
  22. package/dist/commonjs/v3/schemas/resources.d.ts +108 -64
  23. package/dist/commonjs/v3/schemas/schemas.d.ts +354 -262
  24. package/dist/commonjs/v3/schemas/schemas.js +11 -2
  25. package/dist/commonjs/v3/schemas/schemas.js.map +1 -1
  26. package/dist/commonjs/v3/schemas/style.d.ts +10 -10
  27. package/dist/commonjs/v3/types/tasks.d.ts +2 -5
  28. package/dist/commonjs/v3/zodMessageHandler.d.ts +2 -0
  29. package/dist/commonjs/v3/zodMessageHandler.js +8 -0
  30. package/dist/commonjs/v3/zodMessageHandler.js.map +1 -1
  31. package/dist/commonjs/version.js +1 -1
  32. package/dist/esm/logger.js +38 -0
  33. package/dist/esm/logger.js.map +1 -1
  34. package/dist/esm/schemas/api.d.ts +121 -121
  35. package/dist/esm/schemas/tasks.d.ts +4 -4
  36. package/dist/esm/v3/apiClient/core.d.ts +26 -2
  37. package/dist/esm/v3/apiClient/core.js +48 -0
  38. package/dist/esm/v3/apiClient/core.js.map +1 -1
  39. package/dist/esm/v3/apiClient/index.d.ts +67 -67
  40. package/dist/esm/v3/apiClient/index.js.map +1 -1
  41. package/dist/esm/v3/apiClient/runStream.js +2 -2
  42. package/dist/esm/v3/build/runtime.js +15 -1
  43. package/dist/esm/v3/build/runtime.js.map +1 -1
  44. package/dist/esm/v3/schemas/api.d.ts +549 -515
  45. package/dist/esm/v3/schemas/api.js +22 -21
  46. package/dist/esm/v3/schemas/api.js.map +1 -1
  47. package/dist/esm/v3/schemas/build.d.ts +264 -202
  48. package/dist/esm/v3/schemas/fetch.d.ts +115 -0
  49. package/dist/esm/v3/schemas/messages.d.ts +3906 -3721
  50. package/dist/esm/v3/schemas/messages.js +3 -3
  51. package/dist/esm/v3/schemas/messages.js.map +1 -1
  52. package/dist/esm/v3/schemas/resources.d.ts +108 -64
  53. package/dist/esm/v3/schemas/schemas.d.ts +354 -262
  54. package/dist/esm/v3/schemas/schemas.js +12 -3
  55. package/dist/esm/v3/schemas/schemas.js.map +1 -1
  56. package/dist/esm/v3/schemas/style.d.ts +10 -10
  57. package/dist/esm/v3/types/tasks.d.ts +2 -5
  58. package/dist/esm/v3/zodMessageHandler.d.ts +2 -0
  59. package/dist/esm/v3/zodMessageHandler.js +8 -0
  60. package/dist/esm/v3/zodMessageHandler.js.map +1 -1
  61. package/dist/esm/version.js +1 -1
  62. package/package.json +2 -1
@@ -10,12 +10,12 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
10
10
  exportName: z.ZodString;
11
11
  }, "strip", z.ZodTypeAny, {
12
12
  id: string;
13
- exportName: string;
14
13
  filePath: string;
14
+ exportName: string;
15
15
  }, {
16
16
  id: string;
17
- exportName: string;
18
17
  filePath: string;
18
+ exportName: string;
19
19
  }>;
20
20
  attempt: z.ZodObject<{
21
21
  id: z.ZodString;
@@ -26,15 +26,15 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
26
26
  status: z.ZodString;
27
27
  }, "strip", z.ZodTypeAny, {
28
28
  number: number;
29
- id: string;
30
29
  status: string;
30
+ id: string;
31
31
  startedAt: Date;
32
32
  backgroundWorkerId: string;
33
33
  backgroundWorkerTaskId: string;
34
34
  }, {
35
35
  number: number;
36
- id: string;
37
36
  status: string;
37
+ id: string;
38
38
  startedAt: Date;
39
39
  backgroundWorkerId: string;
40
40
  backgroundWorkerTaskId: string;
@@ -67,51 +67,51 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
67
67
  durationMs: number;
68
68
  costInCents: number;
69
69
  baseCostInCents: number;
70
- maxAttempts?: number | undefined;
71
- maxDuration?: number | undefined;
72
- version?: string | undefined;
73
70
  context?: any;
74
71
  idempotencyKey?: string | undefined;
72
+ maxAttempts?: number | undefined;
73
+ version?: string | undefined;
75
74
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
75
+ maxDuration?: number | undefined;
76
76
  }, {
77
77
  id: string;
78
78
  payload: string;
79
79
  payloadType: string;
80
80
  tags: string[];
81
81
  createdAt: Date;
82
- maxAttempts?: number | undefined;
83
- maxDuration?: number | undefined;
84
- version?: string | undefined;
85
82
  startedAt?: Date | undefined;
86
83
  context?: any;
87
84
  isTest?: boolean | undefined;
88
85
  idempotencyKey?: string | undefined;
86
+ maxAttempts?: number | undefined;
89
87
  durationMs?: number | undefined;
90
88
  costInCents?: number | undefined;
91
89
  baseCostInCents?: number | undefined;
90
+ version?: string | undefined;
92
91
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
92
+ maxDuration?: number | undefined;
93
93
  }>;
94
94
  queue: z.ZodObject<{
95
95
  id: z.ZodString;
96
96
  name: z.ZodString;
97
97
  }, "strip", z.ZodTypeAny, {
98
- id: string;
99
98
  name: string;
100
- }, {
101
99
  id: string;
100
+ }, {
102
101
  name: string;
102
+ id: string;
103
103
  }>;
104
104
  environment: z.ZodObject<{
105
105
  id: z.ZodString;
106
106
  slug: z.ZodString;
107
107
  type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
108
108
  }, "strip", z.ZodTypeAny, {
109
- id: string;
110
109
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
110
+ id: string;
111
111
  slug: string;
112
112
  }, {
113
- id: string;
114
113
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
114
+ id: string;
115
115
  slug: string;
116
116
  }>;
117
117
  organization: z.ZodObject<{
@@ -119,12 +119,12 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
119
119
  slug: z.ZodString;
120
120
  name: z.ZodString;
121
121
  }, "strip", z.ZodTypeAny, {
122
- id: string;
123
122
  name: string;
123
+ id: string;
124
124
  slug: string;
125
125
  }, {
126
- id: string;
127
126
  name: string;
127
+ id: string;
128
128
  slug: string;
129
129
  }>;
130
130
  project: z.ZodObject<{
@@ -133,13 +133,13 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
133
133
  slug: z.ZodString;
134
134
  name: z.ZodString;
135
135
  }, "strip", z.ZodTypeAny, {
136
- id: string;
137
136
  name: string;
137
+ id: string;
138
138
  slug: string;
139
139
  ref: string;
140
140
  }, {
141
- id: string;
142
141
  name: string;
142
+ id: string;
143
143
  slug: string;
144
144
  ref: string;
145
145
  }>;
@@ -167,19 +167,15 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
167
167
  centsPerMs: number;
168
168
  }>>;
169
169
  }, "strip", z.ZodTypeAny, {
170
- queue: {
171
- id: string;
172
- name: string;
173
- };
174
170
  task: {
175
171
  id: string;
176
- exportName: string;
177
172
  filePath: string;
173
+ exportName: string;
178
174
  };
179
175
  attempt: {
180
176
  number: number;
181
- id: string;
182
177
  status: string;
178
+ id: string;
183
179
  startedAt: Date;
184
180
  backgroundWorkerId: string;
185
181
  backgroundWorkerTaskId: string;
@@ -195,52 +191,52 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
195
191
  durationMs: number;
196
192
  costInCents: number;
197
193
  baseCostInCents: number;
198
- maxAttempts?: number | undefined;
199
- maxDuration?: number | undefined;
200
- version?: string | undefined;
201
194
  context?: any;
202
195
  idempotencyKey?: string | undefined;
196
+ maxAttempts?: number | undefined;
197
+ version?: string | undefined;
203
198
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
199
+ maxDuration?: number | undefined;
204
200
  };
205
- environment: {
201
+ queue: {
202
+ name: string;
206
203
  id: string;
204
+ };
205
+ environment: {
207
206
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
207
+ id: string;
208
208
  slug: string;
209
209
  };
210
210
  organization: {
211
- id: string;
212
211
  name: string;
212
+ id: string;
213
213
  slug: string;
214
214
  };
215
215
  project: {
216
- id: string;
217
216
  name: string;
217
+ id: string;
218
218
  slug: string;
219
219
  ref: string;
220
220
  };
221
+ batch?: {
222
+ id: string;
223
+ } | undefined;
221
224
  machine?: {
222
225
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
223
226
  cpu: number;
224
227
  memory: number;
225
228
  centsPerMs: number;
226
229
  } | undefined;
227
- batch?: {
228
- id: string;
229
- } | undefined;
230
230
  }, {
231
- queue: {
232
- id: string;
233
- name: string;
234
- };
235
231
  task: {
236
232
  id: string;
237
- exportName: string;
238
233
  filePath: string;
234
+ exportName: string;
239
235
  };
240
236
  attempt: {
241
237
  number: number;
242
- id: string;
243
238
  status: string;
239
+ id: string;
244
240
  startedAt: Date;
245
241
  backgroundWorkerId: string;
246
242
  backgroundWorkerTaskId: string;
@@ -251,61 +247,61 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
251
247
  payloadType: string;
252
248
  tags: string[];
253
249
  createdAt: Date;
254
- maxAttempts?: number | undefined;
255
- maxDuration?: number | undefined;
256
- version?: string | undefined;
257
250
  startedAt?: Date | undefined;
258
251
  context?: any;
259
252
  isTest?: boolean | undefined;
260
253
  idempotencyKey?: string | undefined;
254
+ maxAttempts?: number | undefined;
261
255
  durationMs?: number | undefined;
262
256
  costInCents?: number | undefined;
263
257
  baseCostInCents?: number | undefined;
258
+ version?: string | undefined;
264
259
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
260
+ maxDuration?: number | undefined;
265
261
  };
266
- environment: {
262
+ queue: {
263
+ name: string;
267
264
  id: string;
265
+ };
266
+ environment: {
268
267
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
268
+ id: string;
269
269
  slug: string;
270
270
  };
271
271
  organization: {
272
- id: string;
273
272
  name: string;
273
+ id: string;
274
274
  slug: string;
275
275
  };
276
276
  project: {
277
- id: string;
278
277
  name: string;
278
+ id: string;
279
279
  slug: string;
280
280
  ref: string;
281
281
  };
282
+ batch?: {
283
+ id: string;
284
+ } | undefined;
282
285
  machine?: {
283
286
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
284
287
  cpu: number;
285
288
  memory: number;
286
289
  centsPerMs: number;
287
290
  } | undefined;
288
- batch?: {
289
- id: string;
290
- } | undefined;
291
291
  }>;
292
292
  traceContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
293
293
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
294
294
  }, "strip", z.ZodTypeAny, {
295
295
  execution: {
296
- queue: {
297
- id: string;
298
- name: string;
299
- };
300
296
  task: {
301
297
  id: string;
302
- exportName: string;
303
298
  filePath: string;
299
+ exportName: string;
304
300
  };
305
301
  attempt: {
306
302
  number: number;
307
- id: string;
308
303
  status: string;
304
+ id: string;
309
305
  startedAt: Date;
310
306
  backgroundWorkerId: string;
311
307
  backgroundWorkerTaskId: string;
@@ -321,56 +317,56 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
321
317
  durationMs: number;
322
318
  costInCents: number;
323
319
  baseCostInCents: number;
324
- maxAttempts?: number | undefined;
325
- maxDuration?: number | undefined;
326
- version?: string | undefined;
327
320
  context?: any;
328
321
  idempotencyKey?: string | undefined;
322
+ maxAttempts?: number | undefined;
323
+ version?: string | undefined;
329
324
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
325
+ maxDuration?: number | undefined;
330
326
  };
331
- environment: {
327
+ queue: {
328
+ name: string;
332
329
  id: string;
330
+ };
331
+ environment: {
333
332
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
333
+ id: string;
334
334
  slug: string;
335
335
  };
336
336
  organization: {
337
- id: string;
338
337
  name: string;
338
+ id: string;
339
339
  slug: string;
340
340
  };
341
341
  project: {
342
- id: string;
343
342
  name: string;
343
+ id: string;
344
344
  slug: string;
345
345
  ref: string;
346
346
  };
347
+ batch?: {
348
+ id: string;
349
+ } | undefined;
347
350
  machine?: {
348
351
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
349
352
  cpu: number;
350
353
  memory: number;
351
354
  centsPerMs: number;
352
355
  } | undefined;
353
- batch?: {
354
- id: string;
355
- } | undefined;
356
356
  };
357
357
  traceContext: Record<string, unknown>;
358
358
  environment?: Record<string, string> | undefined;
359
359
  }, {
360
360
  execution: {
361
- queue: {
362
- id: string;
363
- name: string;
364
- };
365
361
  task: {
366
362
  id: string;
367
- exportName: string;
368
363
  filePath: string;
364
+ exportName: string;
369
365
  };
370
366
  attempt: {
371
367
  number: number;
372
- id: string;
373
368
  status: string;
369
+ id: string;
374
370
  startedAt: Date;
375
371
  backgroundWorkerId: string;
376
372
  backgroundWorkerTaskId: string;
@@ -381,43 +377,47 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
381
377
  payloadType: string;
382
378
  tags: string[];
383
379
  createdAt: Date;
384
- maxAttempts?: number | undefined;
385
- maxDuration?: number | undefined;
386
- version?: string | undefined;
387
380
  startedAt?: Date | undefined;
388
381
  context?: any;
389
382
  isTest?: boolean | undefined;
390
383
  idempotencyKey?: string | undefined;
384
+ maxAttempts?: number | undefined;
391
385
  durationMs?: number | undefined;
392
386
  costInCents?: number | undefined;
393
387
  baseCostInCents?: number | undefined;
388
+ version?: string | undefined;
394
389
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
390
+ maxDuration?: number | undefined;
395
391
  };
396
- environment: {
392
+ queue: {
393
+ name: string;
397
394
  id: string;
395
+ };
396
+ environment: {
398
397
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
398
+ id: string;
399
399
  slug: string;
400
400
  };
401
401
  organization: {
402
- id: string;
403
402
  name: string;
403
+ id: string;
404
404
  slug: string;
405
405
  };
406
406
  project: {
407
- id: string;
408
407
  name: string;
408
+ id: string;
409
409
  slug: string;
410
410
  ref: string;
411
411
  };
412
+ batch?: {
413
+ id: string;
414
+ } | undefined;
412
415
  machine?: {
413
416
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
414
417
  cpu: number;
415
418
  memory: number;
416
419
  centsPerMs: number;
417
420
  } | undefined;
418
- batch?: {
419
- id: string;
420
- } | undefined;
421
421
  };
422
422
  traceContext: Record<string, unknown>;
423
423
  environment?: Record<string, string> | undefined;
@@ -430,12 +430,12 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
430
430
  exportName: z.ZodString;
431
431
  }, "strip", z.ZodTypeAny, {
432
432
  id: string;
433
- exportName: string;
434
433
  filePath: string;
434
+ exportName: string;
435
435
  }, {
436
436
  id: string;
437
- exportName: string;
438
437
  filePath: string;
438
+ exportName: string;
439
439
  }>;
440
440
  attempt: z.ZodObject<{
441
441
  id: z.ZodString;
@@ -446,15 +446,15 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
446
446
  status: z.ZodString;
447
447
  }, "strip", z.ZodTypeAny, {
448
448
  number: number;
449
- id: string;
450
449
  status: string;
450
+ id: string;
451
451
  startedAt: Date;
452
452
  backgroundWorkerId: string;
453
453
  backgroundWorkerTaskId: string;
454
454
  }, {
455
455
  number: number;
456
- id: string;
457
456
  status: string;
457
+ id: string;
458
458
  startedAt: Date;
459
459
  backgroundWorkerId: string;
460
460
  backgroundWorkerTaskId: string;
@@ -487,51 +487,51 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
487
487
  durationMs: number;
488
488
  costInCents: number;
489
489
  baseCostInCents: number;
490
- maxAttempts?: number | undefined;
491
- maxDuration?: number | undefined;
492
- version?: string | undefined;
493
490
  context?: any;
494
491
  idempotencyKey?: string | undefined;
492
+ maxAttempts?: number | undefined;
493
+ version?: string | undefined;
495
494
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
495
+ maxDuration?: number | undefined;
496
496
  }, {
497
497
  id: string;
498
498
  payload: string;
499
499
  payloadType: string;
500
500
  tags: string[];
501
501
  createdAt: Date;
502
- maxAttempts?: number | undefined;
503
- maxDuration?: number | undefined;
504
- version?: string | undefined;
505
502
  startedAt?: Date | undefined;
506
503
  context?: any;
507
504
  isTest?: boolean | undefined;
508
505
  idempotencyKey?: string | undefined;
506
+ maxAttempts?: number | undefined;
509
507
  durationMs?: number | undefined;
510
508
  costInCents?: number | undefined;
511
509
  baseCostInCents?: number | undefined;
510
+ version?: string | undefined;
512
511
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
512
+ maxDuration?: number | undefined;
513
513
  }>;
514
514
  queue: z.ZodObject<{
515
515
  id: z.ZodString;
516
516
  name: z.ZodString;
517
517
  }, "strip", z.ZodTypeAny, {
518
- id: string;
519
518
  name: string;
520
- }, {
521
519
  id: string;
520
+ }, {
522
521
  name: string;
522
+ id: string;
523
523
  }>;
524
524
  environment: z.ZodObject<{
525
525
  id: z.ZodString;
526
526
  slug: z.ZodString;
527
527
  type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
528
528
  }, "strip", z.ZodTypeAny, {
529
- id: string;
530
529
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
530
+ id: string;
531
531
  slug: string;
532
532
  }, {
533
- id: string;
534
533
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
534
+ id: string;
535
535
  slug: string;
536
536
  }>;
537
537
  organization: z.ZodObject<{
@@ -539,12 +539,12 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
539
539
  slug: z.ZodString;
540
540
  name: z.ZodString;
541
541
  }, "strip", z.ZodTypeAny, {
542
- id: string;
543
542
  name: string;
543
+ id: string;
544
544
  slug: string;
545
545
  }, {
546
- id: string;
547
546
  name: string;
547
+ id: string;
548
548
  slug: string;
549
549
  }>;
550
550
  project: z.ZodObject<{
@@ -553,13 +553,13 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
553
553
  slug: z.ZodString;
554
554
  name: z.ZodString;
555
555
  }, "strip", z.ZodTypeAny, {
556
- id: string;
557
556
  name: string;
557
+ id: string;
558
558
  slug: string;
559
559
  ref: string;
560
560
  }, {
561
- id: string;
562
561
  name: string;
562
+ id: string;
563
563
  slug: string;
564
564
  ref: string;
565
565
  }>;
@@ -617,25 +617,15 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
617
617
  centsPerMs: number;
618
618
  }>>;
619
619
  }>, "strip", z.ZodTypeAny, {
620
- queue: {
621
- id: string;
622
- name: string;
623
- };
624
- machine: {
625
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
626
- cpu: number;
627
- memory: number;
628
- centsPerMs: number;
629
- };
630
620
  task: {
631
621
  id: string;
632
- exportName: string;
633
622
  filePath: string;
623
+ exportName: string;
634
624
  };
635
625
  attempt: {
636
626
  number: number;
637
- id: string;
638
627
  status: string;
628
+ id: string;
639
629
  startedAt: Date;
640
630
  backgroundWorkerId: string;
641
631
  backgroundWorkerTaskId: string;
@@ -651,29 +641,39 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
651
641
  durationMs: number;
652
642
  costInCents: number;
653
643
  baseCostInCents: number;
654
- maxAttempts?: number | undefined;
655
- maxDuration?: number | undefined;
656
- version?: string | undefined;
657
644
  context?: any;
658
645
  idempotencyKey?: string | undefined;
646
+ maxAttempts?: number | undefined;
647
+ version?: string | undefined;
659
648
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
649
+ maxDuration?: number | undefined;
660
650
  };
661
- environment: {
651
+ queue: {
652
+ name: string;
662
653
  id: string;
654
+ };
655
+ environment: {
663
656
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
657
+ id: string;
664
658
  slug: string;
665
659
  };
666
660
  organization: {
667
- id: string;
668
661
  name: string;
662
+ id: string;
669
663
  slug: string;
670
664
  };
671
665
  project: {
672
- id: string;
673
666
  name: string;
667
+ id: string;
674
668
  slug: string;
675
669
  ref: string;
676
670
  };
671
+ machine: {
672
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
673
+ cpu: number;
674
+ memory: number;
675
+ centsPerMs: number;
676
+ };
677
677
  worker: {
678
678
  id: string;
679
679
  version: string;
@@ -683,19 +683,15 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
683
683
  id: string;
684
684
  } | undefined;
685
685
  }, {
686
- queue: {
687
- id: string;
688
- name: string;
689
- };
690
686
  task: {
691
687
  id: string;
692
- exportName: string;
693
688
  filePath: string;
689
+ exportName: string;
694
690
  };
695
691
  attempt: {
696
692
  number: number;
697
- id: string;
698
693
  status: string;
694
+ id: string;
699
695
  startedAt: Date;
700
696
  backgroundWorkerId: string;
701
697
  backgroundWorkerTaskId: string;
@@ -706,31 +702,35 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
706
702
  payloadType: string;
707
703
  tags: string[];
708
704
  createdAt: Date;
709
- maxAttempts?: number | undefined;
710
- maxDuration?: number | undefined;
711
- version?: string | undefined;
712
705
  startedAt?: Date | undefined;
713
706
  context?: any;
714
707
  isTest?: boolean | undefined;
715
708
  idempotencyKey?: string | undefined;
709
+ maxAttempts?: number | undefined;
716
710
  durationMs?: number | undefined;
717
711
  costInCents?: number | undefined;
718
712
  baseCostInCents?: number | undefined;
713
+ version?: string | undefined;
719
714
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
715
+ maxDuration?: number | undefined;
720
716
  };
721
- environment: {
717
+ queue: {
718
+ name: string;
722
719
  id: string;
720
+ };
721
+ environment: {
723
722
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
723
+ id: string;
724
724
  slug: string;
725
725
  };
726
726
  organization: {
727
- id: string;
728
727
  name: string;
728
+ id: string;
729
729
  slug: string;
730
730
  };
731
731
  project: {
732
- id: string;
733
732
  name: string;
733
+ id: string;
734
734
  slug: string;
735
735
  ref: string;
736
736
  };
@@ -739,14 +739,14 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
739
739
  version: string;
740
740
  contentHash: string;
741
741
  };
742
+ batch?: {
743
+ id: string;
744
+ } | undefined;
742
745
  machine?: {
743
746
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
744
747
  cpu: number;
745
748
  memory: number;
746
- centsPerMs: number;
747
- } | undefined;
748
- batch?: {
749
- id: string;
749
+ centsPerMs: number;
750
750
  } | undefined;
751
751
  }>;
752
752
  export type ProdTaskRunExecution = z.infer<typeof ProdTaskRunExecution>;
@@ -758,12 +758,12 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
758
758
  exportName: z.ZodString;
759
759
  }, "strip", z.ZodTypeAny, {
760
760
  id: string;
761
- exportName: string;
762
761
  filePath: string;
762
+ exportName: string;
763
763
  }, {
764
764
  id: string;
765
- exportName: string;
766
765
  filePath: string;
766
+ exportName: string;
767
767
  }>;
768
768
  attempt: z.ZodObject<{
769
769
  id: z.ZodString;
@@ -774,15 +774,15 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
774
774
  status: z.ZodString;
775
775
  }, "strip", z.ZodTypeAny, {
776
776
  number: number;
777
- id: string;
778
777
  status: string;
778
+ id: string;
779
779
  startedAt: Date;
780
780
  backgroundWorkerId: string;
781
781
  backgroundWorkerTaskId: string;
782
782
  }, {
783
783
  number: number;
784
- id: string;
785
784
  status: string;
785
+ id: string;
786
786
  startedAt: Date;
787
787
  backgroundWorkerId: string;
788
788
  backgroundWorkerTaskId: string;
@@ -815,51 +815,51 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
815
815
  durationMs: number;
816
816
  costInCents: number;
817
817
  baseCostInCents: number;
818
- maxAttempts?: number | undefined;
819
- maxDuration?: number | undefined;
820
- version?: string | undefined;
821
818
  context?: any;
822
819
  idempotencyKey?: string | undefined;
820
+ maxAttempts?: number | undefined;
821
+ version?: string | undefined;
823
822
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
823
+ maxDuration?: number | undefined;
824
824
  }, {
825
825
  id: string;
826
826
  payload: string;
827
827
  payloadType: string;
828
828
  tags: string[];
829
829
  createdAt: Date;
830
- maxAttempts?: number | undefined;
831
- maxDuration?: number | undefined;
832
- version?: string | undefined;
833
830
  startedAt?: Date | undefined;
834
831
  context?: any;
835
832
  isTest?: boolean | undefined;
836
833
  idempotencyKey?: string | undefined;
834
+ maxAttempts?: number | undefined;
837
835
  durationMs?: number | undefined;
838
836
  costInCents?: number | undefined;
839
837
  baseCostInCents?: number | undefined;
838
+ version?: string | undefined;
840
839
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
840
+ maxDuration?: number | undefined;
841
841
  }>;
842
842
  queue: z.ZodObject<{
843
843
  id: z.ZodString;
844
844
  name: z.ZodString;
845
845
  }, "strip", z.ZodTypeAny, {
846
- id: string;
847
846
  name: string;
848
- }, {
849
847
  id: string;
848
+ }, {
850
849
  name: string;
850
+ id: string;
851
851
  }>;
852
852
  environment: z.ZodObject<{
853
853
  id: z.ZodString;
854
854
  slug: z.ZodString;
855
855
  type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
856
856
  }, "strip", z.ZodTypeAny, {
857
- id: string;
858
857
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
858
+ id: string;
859
859
  slug: string;
860
860
  }, {
861
- id: string;
862
861
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
862
+ id: string;
863
863
  slug: string;
864
864
  }>;
865
865
  organization: z.ZodObject<{
@@ -867,12 +867,12 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
867
867
  slug: z.ZodString;
868
868
  name: z.ZodString;
869
869
  }, "strip", z.ZodTypeAny, {
870
- id: string;
871
870
  name: string;
871
+ id: string;
872
872
  slug: string;
873
873
  }, {
874
- id: string;
875
874
  name: string;
875
+ id: string;
876
876
  slug: string;
877
877
  }>;
878
878
  project: z.ZodObject<{
@@ -881,13 +881,13 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
881
881
  slug: z.ZodString;
882
882
  name: z.ZodString;
883
883
  }, "strip", z.ZodTypeAny, {
884
- id: string;
885
884
  name: string;
885
+ id: string;
886
886
  slug: string;
887
887
  ref: string;
888
888
  }, {
889
- id: string;
890
889
  name: string;
890
+ id: string;
891
891
  slug: string;
892
892
  ref: string;
893
893
  }>;
@@ -945,25 +945,15 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
945
945
  centsPerMs: number;
946
946
  }>>;
947
947
  }>, "strip", z.ZodTypeAny, {
948
- queue: {
949
- id: string;
950
- name: string;
951
- };
952
- machine: {
953
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
954
- cpu: number;
955
- memory: number;
956
- centsPerMs: number;
957
- };
958
948
  task: {
959
949
  id: string;
960
- exportName: string;
961
950
  filePath: string;
951
+ exportName: string;
962
952
  };
963
953
  attempt: {
964
954
  number: number;
965
- id: string;
966
955
  status: string;
956
+ id: string;
967
957
  startedAt: Date;
968
958
  backgroundWorkerId: string;
969
959
  backgroundWorkerTaskId: string;
@@ -979,29 +969,39 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
979
969
  durationMs: number;
980
970
  costInCents: number;
981
971
  baseCostInCents: number;
982
- maxAttempts?: number | undefined;
983
- maxDuration?: number | undefined;
984
- version?: string | undefined;
985
972
  context?: any;
986
973
  idempotencyKey?: string | undefined;
974
+ maxAttempts?: number | undefined;
975
+ version?: string | undefined;
987
976
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
977
+ maxDuration?: number | undefined;
988
978
  };
989
- environment: {
979
+ queue: {
980
+ name: string;
990
981
  id: string;
982
+ };
983
+ environment: {
991
984
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
985
+ id: string;
992
986
  slug: string;
993
987
  };
994
988
  organization: {
995
- id: string;
996
989
  name: string;
990
+ id: string;
997
991
  slug: string;
998
992
  };
999
993
  project: {
1000
- id: string;
1001
994
  name: string;
995
+ id: string;
1002
996
  slug: string;
1003
997
  ref: string;
1004
998
  };
999
+ machine: {
1000
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1001
+ cpu: number;
1002
+ memory: number;
1003
+ centsPerMs: number;
1004
+ };
1005
1005
  worker: {
1006
1006
  id: string;
1007
1007
  version: string;
@@ -1011,19 +1011,15 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1011
1011
  id: string;
1012
1012
  } | undefined;
1013
1013
  }, {
1014
- queue: {
1015
- id: string;
1016
- name: string;
1017
- };
1018
1014
  task: {
1019
1015
  id: string;
1020
- exportName: string;
1021
1016
  filePath: string;
1017
+ exportName: string;
1022
1018
  };
1023
1019
  attempt: {
1024
1020
  number: number;
1025
- id: string;
1026
1021
  status: string;
1022
+ id: string;
1027
1023
  startedAt: Date;
1028
1024
  backgroundWorkerId: string;
1029
1025
  backgroundWorkerTaskId: string;
@@ -1034,31 +1030,35 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1034
1030
  payloadType: string;
1035
1031
  tags: string[];
1036
1032
  createdAt: Date;
1037
- maxAttempts?: number | undefined;
1038
- maxDuration?: number | undefined;
1039
- version?: string | undefined;
1040
1033
  startedAt?: Date | undefined;
1041
1034
  context?: any;
1042
1035
  isTest?: boolean | undefined;
1043
1036
  idempotencyKey?: string | undefined;
1037
+ maxAttempts?: number | undefined;
1044
1038
  durationMs?: number | undefined;
1045
1039
  costInCents?: number | undefined;
1046
1040
  baseCostInCents?: number | undefined;
1041
+ version?: string | undefined;
1047
1042
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1043
+ maxDuration?: number | undefined;
1048
1044
  };
1049
- environment: {
1045
+ queue: {
1046
+ name: string;
1050
1047
  id: string;
1048
+ };
1049
+ environment: {
1051
1050
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1051
+ id: string;
1052
1052
  slug: string;
1053
1053
  };
1054
1054
  organization: {
1055
- id: string;
1056
1055
  name: string;
1056
+ id: string;
1057
1057
  slug: string;
1058
1058
  };
1059
1059
  project: {
1060
- id: string;
1061
1060
  name: string;
1061
+ id: string;
1062
1062
  slug: string;
1063
1063
  ref: string;
1064
1064
  };
@@ -1067,39 +1067,29 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1067
1067
  version: string;
1068
1068
  contentHash: string;
1069
1069
  };
1070
+ batch?: {
1071
+ id: string;
1072
+ } | undefined;
1070
1073
  machine?: {
1071
1074
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1072
1075
  cpu: number;
1073
1076
  memory: number;
1074
1077
  centsPerMs: number;
1075
1078
  } | undefined;
1076
- batch?: {
1077
- id: string;
1078
- } | undefined;
1079
1079
  }>;
1080
1080
  traceContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1081
1081
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1082
1082
  }, "strip", z.ZodTypeAny, {
1083
1083
  execution: {
1084
- queue: {
1085
- id: string;
1086
- name: string;
1087
- };
1088
- machine: {
1089
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1090
- cpu: number;
1091
- memory: number;
1092
- centsPerMs: number;
1093
- };
1094
1084
  task: {
1095
1085
  id: string;
1096
- exportName: string;
1097
1086
  filePath: string;
1087
+ exportName: string;
1098
1088
  };
1099
1089
  attempt: {
1100
1090
  number: number;
1101
- id: string;
1102
1091
  status: string;
1092
+ id: string;
1103
1093
  startedAt: Date;
1104
1094
  backgroundWorkerId: string;
1105
1095
  backgroundWorkerTaskId: string;
@@ -1115,29 +1105,39 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1115
1105
  durationMs: number;
1116
1106
  costInCents: number;
1117
1107
  baseCostInCents: number;
1118
- maxAttempts?: number | undefined;
1119
- maxDuration?: number | undefined;
1120
- version?: string | undefined;
1121
1108
  context?: any;
1122
1109
  idempotencyKey?: string | undefined;
1110
+ maxAttempts?: number | undefined;
1111
+ version?: string | undefined;
1123
1112
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1113
+ maxDuration?: number | undefined;
1124
1114
  };
1125
- environment: {
1115
+ queue: {
1116
+ name: string;
1126
1117
  id: string;
1118
+ };
1119
+ environment: {
1127
1120
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1121
+ id: string;
1128
1122
  slug: string;
1129
1123
  };
1130
1124
  organization: {
1131
- id: string;
1132
1125
  name: string;
1126
+ id: string;
1133
1127
  slug: string;
1134
1128
  };
1135
1129
  project: {
1136
- id: string;
1137
1130
  name: string;
1131
+ id: string;
1138
1132
  slug: string;
1139
1133
  ref: string;
1140
1134
  };
1135
+ machine: {
1136
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1137
+ cpu: number;
1138
+ memory: number;
1139
+ centsPerMs: number;
1140
+ };
1141
1141
  worker: {
1142
1142
  id: string;
1143
1143
  version: string;
@@ -1151,19 +1151,15 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1151
1151
  environment?: Record<string, string> | undefined;
1152
1152
  }, {
1153
1153
  execution: {
1154
- queue: {
1155
- id: string;
1156
- name: string;
1157
- };
1158
1154
  task: {
1159
1155
  id: string;
1160
- exportName: string;
1161
1156
  filePath: string;
1157
+ exportName: string;
1162
1158
  };
1163
1159
  attempt: {
1164
1160
  number: number;
1165
- id: string;
1166
1161
  status: string;
1162
+ id: string;
1167
1163
  startedAt: Date;
1168
1164
  backgroundWorkerId: string;
1169
1165
  backgroundWorkerTaskId: string;
@@ -1174,31 +1170,35 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1174
1170
  payloadType: string;
1175
1171
  tags: string[];
1176
1172
  createdAt: Date;
1177
- maxAttempts?: number | undefined;
1178
- maxDuration?: number | undefined;
1179
- version?: string | undefined;
1180
1173
  startedAt?: Date | undefined;
1181
1174
  context?: any;
1182
1175
  isTest?: boolean | undefined;
1183
1176
  idempotencyKey?: string | undefined;
1177
+ maxAttempts?: number | undefined;
1184
1178
  durationMs?: number | undefined;
1185
1179
  costInCents?: number | undefined;
1186
1180
  baseCostInCents?: number | undefined;
1181
+ version?: string | undefined;
1187
1182
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1183
+ maxDuration?: number | undefined;
1188
1184
  };
1189
- environment: {
1185
+ queue: {
1186
+ name: string;
1190
1187
  id: string;
1188
+ };
1189
+ environment: {
1191
1190
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1191
+ id: string;
1192
1192
  slug: string;
1193
1193
  };
1194
1194
  organization: {
1195
- id: string;
1196
1195
  name: string;
1196
+ id: string;
1197
1197
  slug: string;
1198
1198
  };
1199
1199
  project: {
1200
- id: string;
1201
1200
  name: string;
1201
+ id: string;
1202
1202
  slug: string;
1203
1203
  ref: string;
1204
1204
  };
@@ -1207,15 +1207,15 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1207
1207
  version: string;
1208
1208
  contentHash: string;
1209
1209
  };
1210
+ batch?: {
1211
+ id: string;
1212
+ } | undefined;
1210
1213
  machine?: {
1211
1214
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1212
1215
  cpu: number;
1213
1216
  memory: number;
1214
1217
  centsPerMs: number;
1215
1218
  } | undefined;
1216
- batch?: {
1217
- id: string;
1218
- } | undefined;
1219
1219
  };
1220
1220
  traceContext: Record<string, unknown>;
1221
1221
  environment?: Record<string, string> | undefined;
@@ -1410,18 +1410,35 @@ export declare const RetryOptions: z.ZodObject<{
1410
1410
  * This can be useful to prevent the thundering herd problem where all retries happen at the same time.
1411
1411
  */
1412
1412
  randomize: z.ZodOptional<z.ZodBoolean>;
1413
+ /** If a run fails with an Out Of Memory (OOM) error and you have this set, it will retry with the machine you specify.
1414
+ * Note: it will not default to this [machine](https://trigger.dev/docs/machines) for new runs, only for failures caused by OOM errors.
1415
+ * So if you frequently have attempts failing with OOM errors, you should set the [default machine](https://trigger.dev/docs/machines) to be higher.
1416
+ */
1417
+ outOfMemory: z.ZodOptional<z.ZodObject<{
1418
+ machine: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1419
+ }, "strip", z.ZodTypeAny, {
1420
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1421
+ }, {
1422
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1423
+ }>>;
1413
1424
  }, "strip", z.ZodTypeAny, {
1414
1425
  maxAttempts?: number | undefined;
1415
1426
  factor?: number | undefined;
1416
1427
  minTimeoutInMs?: number | undefined;
1417
1428
  maxTimeoutInMs?: number | undefined;
1418
1429
  randomize?: boolean | undefined;
1430
+ outOfMemory?: {
1431
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1432
+ } | undefined;
1419
1433
  }, {
1420
1434
  maxAttempts?: number | undefined;
1421
1435
  factor?: number | undefined;
1422
1436
  minTimeoutInMs?: number | undefined;
1423
1437
  maxTimeoutInMs?: number | undefined;
1424
1438
  randomize?: boolean | undefined;
1439
+ outOfMemory?: {
1440
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1441
+ } | undefined;
1425
1442
  }>;
1426
1443
  export type RetryOptions = z.infer<typeof RetryOptions>;
1427
1444
  export declare const QueueOptions: z.ZodObject<{
@@ -1459,14 +1476,14 @@ export declare const QueueOptions: z.ZodObject<{
1459
1476
  name: z.ZodOptional<z.ZodString>;
1460
1477
  /** An optional property that specifies the maximum number of concurrent run executions.
1461
1478
  *
1462
- * If this property is omitted, the task can potentially use up the full concurrency of an environment. */
1463
- concurrencyLimit: z.ZodOptional<z.ZodNumber>;
1479
+ * If this property is omitted, the task can potentially use up the full concurrency of an environment */
1480
+ concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1464
1481
  }, "strip", z.ZodTypeAny, {
1465
1482
  name?: string | undefined;
1466
- concurrencyLimit?: number | undefined;
1483
+ concurrencyLimit?: number | null | undefined;
1467
1484
  }, {
1468
1485
  name?: string | undefined;
1469
- concurrencyLimit?: number | undefined;
1486
+ concurrencyLimit?: number | null | undefined;
1470
1487
  }>;
1471
1488
  export type QueueOptions = z.infer<typeof QueueOptions>;
1472
1489
  export declare const ScheduleMetadata: z.ZodObject<{
@@ -1517,14 +1534,14 @@ export declare const TaskMetadata: z.ZodObject<{
1517
1534
  name: z.ZodOptional<z.ZodString>;
1518
1535
  /** An optional property that specifies the maximum number of concurrent run executions.
1519
1536
  *
1520
- * If this property is omitted, the task can potentially use up the full concurrency of an environment. */
1521
- concurrencyLimit: z.ZodOptional<z.ZodNumber>;
1537
+ * If this property is omitted, the task can potentially use up the full concurrency of an environment */
1538
+ concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1522
1539
  }, "strip", z.ZodTypeAny, {
1523
1540
  name?: string | undefined;
1524
- concurrencyLimit?: number | undefined;
1541
+ concurrencyLimit?: number | null | undefined;
1525
1542
  }, {
1526
1543
  name?: string | undefined;
1527
- concurrencyLimit?: number | undefined;
1544
+ concurrencyLimit?: number | null | undefined;
1528
1545
  }>>;
1529
1546
  retry: z.ZodOptional<z.ZodObject<{
1530
1547
  /** The number of attempts before giving up */
@@ -1543,18 +1560,35 @@ export declare const TaskMetadata: z.ZodObject<{
1543
1560
  * This can be useful to prevent the thundering herd problem where all retries happen at the same time.
1544
1561
  */
1545
1562
  randomize: z.ZodOptional<z.ZodBoolean>;
1563
+ /** If a run fails with an Out Of Memory (OOM) error and you have this set, it will retry with the machine you specify.
1564
+ * Note: it will not default to this [machine](https://trigger.dev/docs/machines) for new runs, only for failures caused by OOM errors.
1565
+ * So if you frequently have attempts failing with OOM errors, you should set the [default machine](https://trigger.dev/docs/machines) to be higher.
1566
+ */
1567
+ outOfMemory: z.ZodOptional<z.ZodObject<{
1568
+ machine: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1569
+ }, "strip", z.ZodTypeAny, {
1570
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1571
+ }, {
1572
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1573
+ }>>;
1546
1574
  }, "strip", z.ZodTypeAny, {
1547
1575
  maxAttempts?: number | undefined;
1548
1576
  factor?: number | undefined;
1549
1577
  minTimeoutInMs?: number | undefined;
1550
1578
  maxTimeoutInMs?: number | undefined;
1551
1579
  randomize?: boolean | undefined;
1580
+ outOfMemory?: {
1581
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1582
+ } | undefined;
1552
1583
  }, {
1553
1584
  maxAttempts?: number | undefined;
1554
1585
  factor?: number | undefined;
1555
1586
  minTimeoutInMs?: number | undefined;
1556
1587
  maxTimeoutInMs?: number | undefined;
1557
1588
  randomize?: boolean | undefined;
1589
+ outOfMemory?: {
1590
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1591
+ } | undefined;
1558
1592
  }>>;
1559
1593
  machine: z.ZodOptional<z.ZodObject<{
1560
1594
  cpu: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
@@ -1583,10 +1617,15 @@ export declare const TaskMetadata: z.ZodObject<{
1583
1617
  maxDuration: z.ZodOptional<z.ZodNumber>;
1584
1618
  }, "strip", z.ZodTypeAny, {
1585
1619
  id: string;
1586
- description?: string | undefined;
1620
+ maxDuration?: number | undefined;
1587
1621
  queue?: {
1588
1622
  name?: string | undefined;
1589
- concurrencyLimit?: number | undefined;
1623
+ concurrencyLimit?: number | null | undefined;
1624
+ } | undefined;
1625
+ machine?: {
1626
+ cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1627
+ memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1628
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1590
1629
  } | undefined;
1591
1630
  retry?: {
1592
1631
  maxAttempts?: number | undefined;
@@ -1594,24 +1633,27 @@ export declare const TaskMetadata: z.ZodObject<{
1594
1633
  minTimeoutInMs?: number | undefined;
1595
1634
  maxTimeoutInMs?: number | undefined;
1596
1635
  randomize?: boolean | undefined;
1636
+ outOfMemory?: {
1637
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1638
+ } | undefined;
1597
1639
  } | undefined;
1598
- machine?: {
1599
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1600
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1601
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1602
- } | undefined;
1640
+ description?: string | undefined;
1603
1641
  triggerSource?: string | undefined;
1604
1642
  schedule?: {
1605
1643
  cron: string;
1606
1644
  timezone: string;
1607
1645
  } | undefined;
1608
- maxDuration?: number | undefined;
1609
1646
  }, {
1610
1647
  id: string;
1611
- description?: string | undefined;
1648
+ maxDuration?: number | undefined;
1612
1649
  queue?: {
1613
1650
  name?: string | undefined;
1614
- concurrencyLimit?: number | undefined;
1651
+ concurrencyLimit?: number | null | undefined;
1652
+ } | undefined;
1653
+ machine?: {
1654
+ cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1655
+ memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1656
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1615
1657
  } | undefined;
1616
1658
  retry?: {
1617
1659
  maxAttempts?: number | undefined;
@@ -1619,18 +1661,16 @@ export declare const TaskMetadata: z.ZodObject<{
1619
1661
  minTimeoutInMs?: number | undefined;
1620
1662
  maxTimeoutInMs?: number | undefined;
1621
1663
  randomize?: boolean | undefined;
1664
+ outOfMemory?: {
1665
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1666
+ } | undefined;
1622
1667
  } | undefined;
1623
- machine?: {
1624
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1625
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1626
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1627
- } | undefined;
1668
+ description?: string | undefined;
1628
1669
  triggerSource?: string | undefined;
1629
1670
  schedule?: {
1630
1671
  cron: string;
1631
1672
  timezone: string;
1632
1673
  } | undefined;
1633
- maxDuration?: number | undefined;
1634
1674
  }>;
1635
1675
  export type TaskMetadata = z.infer<typeof TaskMetadata>;
1636
1676
  export declare const TaskFile: z.ZodObject<{
@@ -1649,12 +1689,12 @@ export declare const TaskFileMetadata: z.ZodObject<{
1649
1689
  exportName: z.ZodString;
1650
1690
  entryPoint: z.ZodString;
1651
1691
  }, "strip", z.ZodTypeAny, {
1652
- exportName: string;
1653
1692
  filePath: string;
1693
+ exportName: string;
1654
1694
  entryPoint: string;
1655
1695
  }, {
1656
- exportName: string;
1657
1696
  filePath: string;
1697
+ exportName: string;
1658
1698
  entryPoint: string;
1659
1699
  }>;
1660
1700
  export type TaskFileMetadata = z.infer<typeof TaskFileMetadata>;
@@ -1699,14 +1739,14 @@ export declare const TaskManifest: z.ZodObject<{
1699
1739
  name: z.ZodOptional<z.ZodString>;
1700
1740
  /** An optional property that specifies the maximum number of concurrent run executions.
1701
1741
  *
1702
- * If this property is omitted, the task can potentially use up the full concurrency of an environment. */
1703
- concurrencyLimit: z.ZodOptional<z.ZodNumber>;
1742
+ * If this property is omitted, the task can potentially use up the full concurrency of an environment */
1743
+ concurrencyLimit: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1704
1744
  }, "strip", z.ZodTypeAny, {
1705
1745
  name?: string | undefined;
1706
- concurrencyLimit?: number | undefined;
1746
+ concurrencyLimit?: number | null | undefined;
1707
1747
  }, {
1708
1748
  name?: string | undefined;
1709
- concurrencyLimit?: number | undefined;
1749
+ concurrencyLimit?: number | null | undefined;
1710
1750
  }>>;
1711
1751
  retry: z.ZodOptional<z.ZodObject<{
1712
1752
  /** The number of attempts before giving up */
@@ -1725,18 +1765,35 @@ export declare const TaskManifest: z.ZodObject<{
1725
1765
  * This can be useful to prevent the thundering herd problem where all retries happen at the same time.
1726
1766
  */
1727
1767
  randomize: z.ZodOptional<z.ZodBoolean>;
1768
+ /** If a run fails with an Out Of Memory (OOM) error and you have this set, it will retry with the machine you specify.
1769
+ * Note: it will not default to this [machine](https://trigger.dev/docs/machines) for new runs, only for failures caused by OOM errors.
1770
+ * So if you frequently have attempts failing with OOM errors, you should set the [default machine](https://trigger.dev/docs/machines) to be higher.
1771
+ */
1772
+ outOfMemory: z.ZodOptional<z.ZodObject<{
1773
+ machine: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1774
+ }, "strip", z.ZodTypeAny, {
1775
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1776
+ }, {
1777
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1778
+ }>>;
1728
1779
  }, "strip", z.ZodTypeAny, {
1729
1780
  maxAttempts?: number | undefined;
1730
1781
  factor?: number | undefined;
1731
1782
  minTimeoutInMs?: number | undefined;
1732
1783
  maxTimeoutInMs?: number | undefined;
1733
1784
  randomize?: boolean | undefined;
1785
+ outOfMemory?: {
1786
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1787
+ } | undefined;
1734
1788
  }, {
1735
1789
  maxAttempts?: number | undefined;
1736
1790
  factor?: number | undefined;
1737
1791
  minTimeoutInMs?: number | undefined;
1738
1792
  maxTimeoutInMs?: number | undefined;
1739
1793
  randomize?: boolean | undefined;
1794
+ outOfMemory?: {
1795
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1796
+ } | undefined;
1740
1797
  }>>;
1741
1798
  machine: z.ZodOptional<z.ZodObject<{
1742
1799
  cpu: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
@@ -1765,13 +1822,18 @@ export declare const TaskManifest: z.ZodObject<{
1765
1822
  maxDuration: z.ZodOptional<z.ZodNumber>;
1766
1823
  }, "strip", z.ZodTypeAny, {
1767
1824
  id: string;
1768
- exportName: string;
1769
1825
  filePath: string;
1826
+ exportName: string;
1770
1827
  entryPoint: string;
1771
- description?: string | undefined;
1828
+ maxDuration?: number | undefined;
1772
1829
  queue?: {
1773
1830
  name?: string | undefined;
1774
- concurrencyLimit?: number | undefined;
1831
+ concurrencyLimit?: number | null | undefined;
1832
+ } | undefined;
1833
+ machine?: {
1834
+ cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1835
+ memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1836
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1775
1837
  } | undefined;
1776
1838
  retry?: {
1777
1839
  maxAttempts?: number | undefined;
@@ -1779,27 +1841,30 @@ export declare const TaskManifest: z.ZodObject<{
1779
1841
  minTimeoutInMs?: number | undefined;
1780
1842
  maxTimeoutInMs?: number | undefined;
1781
1843
  randomize?: boolean | undefined;
1844
+ outOfMemory?: {
1845
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1846
+ } | undefined;
1782
1847
  } | undefined;
1783
- machine?: {
1784
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1785
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1786
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1787
- } | undefined;
1848
+ description?: string | undefined;
1788
1849
  triggerSource?: string | undefined;
1789
1850
  schedule?: {
1790
1851
  cron: string;
1791
1852
  timezone: string;
1792
1853
  } | undefined;
1793
- maxDuration?: number | undefined;
1794
1854
  }, {
1795
1855
  id: string;
1796
- exportName: string;
1797
1856
  filePath: string;
1857
+ exportName: string;
1798
1858
  entryPoint: string;
1799
- description?: string | undefined;
1859
+ maxDuration?: number | undefined;
1800
1860
  queue?: {
1801
1861
  name?: string | undefined;
1802
- concurrencyLimit?: number | undefined;
1862
+ concurrencyLimit?: number | null | undefined;
1863
+ } | undefined;
1864
+ machine?: {
1865
+ cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1866
+ memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1867
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1803
1868
  } | undefined;
1804
1869
  retry?: {
1805
1870
  maxAttempts?: number | undefined;
@@ -1807,18 +1872,16 @@ export declare const TaskManifest: z.ZodObject<{
1807
1872
  minTimeoutInMs?: number | undefined;
1808
1873
  maxTimeoutInMs?: number | undefined;
1809
1874
  randomize?: boolean | undefined;
1875
+ outOfMemory?: {
1876
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1877
+ } | undefined;
1810
1878
  } | undefined;
1811
- machine?: {
1812
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1813
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1814
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1815
- } | undefined;
1879
+ description?: string | undefined;
1816
1880
  triggerSource?: string | undefined;
1817
1881
  schedule?: {
1818
1882
  cron: string;
1819
1883
  timezone: string;
1820
1884
  } | undefined;
1821
- maxDuration?: number | undefined;
1822
1885
  }>;
1823
1886
  export type TaskManifest = z.infer<typeof TaskManifest>;
1824
1887
  export declare const PostStartCauses: z.ZodEnum<["index", "create", "restore"]>;
@@ -1850,18 +1913,35 @@ export declare const Config: z.ZodObject<{
1850
1913
  * This can be useful to prevent the thundering herd problem where all retries happen at the same time.
1851
1914
  */
1852
1915
  randomize: z.ZodOptional<z.ZodBoolean>;
1916
+ /** If a run fails with an Out Of Memory (OOM) error and you have this set, it will retry with the machine you specify.
1917
+ * Note: it will not default to this [machine](https://trigger.dev/docs/machines) for new runs, only for failures caused by OOM errors.
1918
+ * So if you frequently have attempts failing with OOM errors, you should set the [default machine](https://trigger.dev/docs/machines) to be higher.
1919
+ */
1920
+ outOfMemory: z.ZodOptional<z.ZodObject<{
1921
+ machine: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1922
+ }, "strip", z.ZodTypeAny, {
1923
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1924
+ }, {
1925
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1926
+ }>>;
1853
1927
  }, "strip", z.ZodTypeAny, {
1854
1928
  maxAttempts?: number | undefined;
1855
1929
  factor?: number | undefined;
1856
1930
  minTimeoutInMs?: number | undefined;
1857
1931
  maxTimeoutInMs?: number | undefined;
1858
1932
  randomize?: boolean | undefined;
1933
+ outOfMemory?: {
1934
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1935
+ } | undefined;
1859
1936
  }, {
1860
1937
  maxAttempts?: number | undefined;
1861
1938
  factor?: number | undefined;
1862
1939
  minTimeoutInMs?: number | undefined;
1863
1940
  maxTimeoutInMs?: number | undefined;
1864
1941
  randomize?: boolean | undefined;
1942
+ outOfMemory?: {
1943
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1944
+ } | undefined;
1865
1945
  }>>;
1866
1946
  }, "strip", z.ZodTypeAny, {
1867
1947
  enabledInDev: boolean;
@@ -1871,6 +1951,9 @@ export declare const Config: z.ZodObject<{
1871
1951
  minTimeoutInMs?: number | undefined;
1872
1952
  maxTimeoutInMs?: number | undefined;
1873
1953
  randomize?: boolean | undefined;
1954
+ outOfMemory?: {
1955
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1956
+ } | undefined;
1874
1957
  } | undefined;
1875
1958
  }, {
1876
1959
  enabledInDev?: boolean | undefined;
@@ -1880,6 +1963,9 @@ export declare const Config: z.ZodObject<{
1880
1963
  minTimeoutInMs?: number | undefined;
1881
1964
  maxTimeoutInMs?: number | undefined;
1882
1965
  randomize?: boolean | undefined;
1966
+ outOfMemory?: {
1967
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1968
+ } | undefined;
1883
1969
  } | undefined;
1884
1970
  }>>;
1885
1971
  additionalPackages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -1903,6 +1989,9 @@ export declare const Config: z.ZodObject<{
1903
1989
  minTimeoutInMs?: number | undefined;
1904
1990
  maxTimeoutInMs?: number | undefined;
1905
1991
  randomize?: boolean | undefined;
1992
+ outOfMemory?: {
1993
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1994
+ } | undefined;
1906
1995
  } | undefined;
1907
1996
  } | undefined;
1908
1997
  additionalPackages?: string[] | undefined;
@@ -1926,6 +2015,9 @@ export declare const Config: z.ZodObject<{
1926
2015
  minTimeoutInMs?: number | undefined;
1927
2016
  maxTimeoutInMs?: number | undefined;
1928
2017
  randomize?: boolean | undefined;
2018
+ outOfMemory?: {
2019
+ machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
2020
+ } | undefined;
1929
2021
  } | undefined;
1930
2022
  } | undefined;
1931
2023
  additionalPackages?: string[] | undefined;