@trigger.dev/core 0.0.0-v3-trigger-dirs-20240423123825 → 0.0.0-v3-update-command-20240423125505

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 (65) hide show
  1. package/dist/v3/index.d.mts +17310 -260
  2. package/dist/v3/index.d.ts +17310 -260
  3. package/dist/v3/index.js +2569 -794
  4. package/dist/v3/index.js.map +1 -1
  5. package/dist/v3/index.mjs +2545 -796
  6. package/dist/v3/index.mjs.map +1 -1
  7. package/dist/v3/otel/index.js +38 -62
  8. package/dist/v3/otel/index.js.map +1 -1
  9. package/dist/v3/otel/index.mjs +38 -62
  10. package/dist/v3/otel/index.mjs.map +1 -1
  11. package/package.json +7 -71
  12. package/dist/catalog-e2OUDZEa.d.mts +0 -6645
  13. package/dist/catalog-ndN7py2b.d.ts +0 -6645
  14. package/dist/manager-M9GLDnhJ.d.mts +0 -1158
  15. package/dist/manager-M9GLDnhJ.d.ts +0 -1158
  16. package/dist/messages-AriaDDm0.d.mts +0 -8696
  17. package/dist/messages-AriaDDm0.d.ts +0 -8696
  18. package/dist/v3/dev/index.d.mts +0 -28
  19. package/dist/v3/dev/index.d.ts +0 -28
  20. package/dist/v3/dev/index.js +0 -93
  21. package/dist/v3/dev/index.js.map +0 -1
  22. package/dist/v3/dev/index.mjs +0 -91
  23. package/dist/v3/dev/index.mjs.map +0 -1
  24. package/dist/v3/prod/index.d.mts +0 -45
  25. package/dist/v3/prod/index.d.ts +0 -45
  26. package/dist/v3/prod/index.js +0 -205
  27. package/dist/v3/prod/index.js.map +0 -1
  28. package/dist/v3/prod/index.mjs +0 -203
  29. package/dist/v3/prod/index.mjs.map +0 -1
  30. package/dist/v3/utils/structuredLogger.d.mts +0 -31
  31. package/dist/v3/utils/structuredLogger.d.ts +0 -31
  32. package/dist/v3/utils/structuredLogger.js +0 -88
  33. package/dist/v3/utils/structuredLogger.js.map +0 -1
  34. package/dist/v3/utils/structuredLogger.mjs +0 -86
  35. package/dist/v3/utils/structuredLogger.mjs.map +0 -1
  36. package/dist/v3/workers/index.d.mts +0 -94
  37. package/dist/v3/workers/index.d.ts +0 -94
  38. package/dist/v3/workers/index.js +0 -2660
  39. package/dist/v3/workers/index.js.map +0 -1
  40. package/dist/v3/workers/index.mjs +0 -2644
  41. package/dist/v3/workers/index.mjs.map +0 -1
  42. package/dist/v3/zodIpc.d.mts +0 -32
  43. package/dist/v3/zodIpc.d.ts +0 -32
  44. package/dist/v3/zodIpc.js +0 -268
  45. package/dist/v3/zodIpc.js.map +0 -1
  46. package/dist/v3/zodIpc.mjs +0 -266
  47. package/dist/v3/zodIpc.mjs.map +0 -1
  48. package/dist/v3/zodMessageHandler.d.mts +0 -69
  49. package/dist/v3/zodMessageHandler.d.ts +0 -69
  50. package/dist/v3/zodMessageHandler.js +0 -168
  51. package/dist/v3/zodMessageHandler.js.map +0 -1
  52. package/dist/v3/zodMessageHandler.mjs +0 -163
  53. package/dist/v3/zodMessageHandler.mjs.map +0 -1
  54. package/dist/v3/zodNamespace.d.mts +0 -3663
  55. package/dist/v3/zodNamespace.d.ts +0 -3663
  56. package/dist/v3/zodNamespace.js +0 -356
  57. package/dist/v3/zodNamespace.js.map +0 -1
  58. package/dist/v3/zodNamespace.mjs +0 -354
  59. package/dist/v3/zodNamespace.mjs.map +0 -1
  60. package/dist/v3/zodSocket.d.mts +0 -88
  61. package/dist/v3/zodSocket.d.ts +0 -88
  62. package/dist/v3/zodSocket.js +0 -309
  63. package/dist/v3/zodSocket.js.map +0 -1
  64. package/dist/v3/zodSocket.mjs +0 -305
  65. package/dist/v3/zodSocket.mjs.map +0 -1
@@ -1,1158 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- declare const TaskRunBuiltInError: z.ZodObject<{
4
- type: z.ZodLiteral<"BUILT_IN_ERROR">;
5
- name: z.ZodString;
6
- message: z.ZodString;
7
- stackTrace: z.ZodString;
8
- }, "strip", z.ZodTypeAny, {
9
- type: "BUILT_IN_ERROR";
10
- message: string;
11
- name: string;
12
- stackTrace: string;
13
- }, {
14
- type: "BUILT_IN_ERROR";
15
- message: string;
16
- name: string;
17
- stackTrace: string;
18
- }>;
19
- type TaskRunBuiltInError = z.infer<typeof TaskRunBuiltInError>;
20
- declare const TaskRunCustomErrorObject: z.ZodObject<{
21
- type: z.ZodLiteral<"CUSTOM_ERROR">;
22
- raw: z.ZodString;
23
- }, "strip", z.ZodTypeAny, {
24
- type: "CUSTOM_ERROR";
25
- raw: string;
26
- }, {
27
- type: "CUSTOM_ERROR";
28
- raw: string;
29
- }>;
30
- type TaskRunCustomErrorObject = z.infer<typeof TaskRunCustomErrorObject>;
31
- declare const TaskRunStringError: z.ZodObject<{
32
- type: z.ZodLiteral<"STRING_ERROR">;
33
- raw: z.ZodString;
34
- }, "strip", z.ZodTypeAny, {
35
- type: "STRING_ERROR";
36
- raw: string;
37
- }, {
38
- type: "STRING_ERROR";
39
- raw: string;
40
- }>;
41
- type TaskRunStringError = z.infer<typeof TaskRunStringError>;
42
- declare const TaskRunErrorCodes: {
43
- readonly COULD_NOT_FIND_EXECUTOR: "COULD_NOT_FIND_EXECUTOR";
44
- readonly COULD_NOT_FIND_TASK: "COULD_NOT_FIND_TASK";
45
- readonly CONFIGURED_INCORRECTLY: "CONFIGURED_INCORRECTLY";
46
- readonly TASK_ALREADY_RUNNING: "TASK_ALREADY_RUNNING";
47
- readonly TASK_EXECUTION_FAILED: "TASK_EXECUTION_FAILED";
48
- readonly TASK_EXECUTION_ABORTED: "TASK_EXECUTION_ABORTED";
49
- readonly TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE: "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE";
50
- readonly TASK_RUN_CANCELLED: "TASK_RUN_CANCELLED";
51
- readonly TASK_OUTPUT_ERROR: "TASK_OUTPUT_ERROR";
52
- readonly HANDLE_ERROR_ERROR: "HANDLE_ERROR_ERROR";
53
- readonly GRACEFUL_EXIT_TIMEOUT: "GRACEFUL_EXIT_TIMEOUT";
54
- };
55
- declare const TaskRunInternalError: z.ZodObject<{
56
- type: z.ZodLiteral<"INTERNAL_ERROR">;
57
- code: z.ZodEnum<["COULD_NOT_FIND_EXECUTOR", "COULD_NOT_FIND_TASK", "CONFIGURED_INCORRECTLY", "TASK_ALREADY_RUNNING", "TASK_EXECUTION_FAILED", "TASK_EXECUTION_ABORTED", "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE", "TASK_RUN_CANCELLED", "TASK_OUTPUT_ERROR", "HANDLE_ERROR_ERROR", "GRACEFUL_EXIT_TIMEOUT"]>;
58
- message: z.ZodOptional<z.ZodString>;
59
- }, "strip", z.ZodTypeAny, {
60
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
61
- type: "INTERNAL_ERROR";
62
- message?: string | undefined;
63
- }, {
64
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
65
- type: "INTERNAL_ERROR";
66
- message?: string | undefined;
67
- }>;
68
- type TaskRunInternalError = z.infer<typeof TaskRunInternalError>;
69
- declare const TaskRunError: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
70
- type: z.ZodLiteral<"BUILT_IN_ERROR">;
71
- name: z.ZodString;
72
- message: z.ZodString;
73
- stackTrace: z.ZodString;
74
- }, "strip", z.ZodTypeAny, {
75
- type: "BUILT_IN_ERROR";
76
- message: string;
77
- name: string;
78
- stackTrace: string;
79
- }, {
80
- type: "BUILT_IN_ERROR";
81
- message: string;
82
- name: string;
83
- stackTrace: string;
84
- }>, z.ZodObject<{
85
- type: z.ZodLiteral<"CUSTOM_ERROR">;
86
- raw: z.ZodString;
87
- }, "strip", z.ZodTypeAny, {
88
- type: "CUSTOM_ERROR";
89
- raw: string;
90
- }, {
91
- type: "CUSTOM_ERROR";
92
- raw: string;
93
- }>, z.ZodObject<{
94
- type: z.ZodLiteral<"STRING_ERROR">;
95
- raw: z.ZodString;
96
- }, "strip", z.ZodTypeAny, {
97
- type: "STRING_ERROR";
98
- raw: string;
99
- }, {
100
- type: "STRING_ERROR";
101
- raw: string;
102
- }>, z.ZodObject<{
103
- type: z.ZodLiteral<"INTERNAL_ERROR">;
104
- code: z.ZodEnum<["COULD_NOT_FIND_EXECUTOR", "COULD_NOT_FIND_TASK", "CONFIGURED_INCORRECTLY", "TASK_ALREADY_RUNNING", "TASK_EXECUTION_FAILED", "TASK_EXECUTION_ABORTED", "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE", "TASK_RUN_CANCELLED", "TASK_OUTPUT_ERROR", "HANDLE_ERROR_ERROR", "GRACEFUL_EXIT_TIMEOUT"]>;
105
- message: z.ZodOptional<z.ZodString>;
106
- }, "strip", z.ZodTypeAny, {
107
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
108
- type: "INTERNAL_ERROR";
109
- message?: string | undefined;
110
- }, {
111
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
112
- type: "INTERNAL_ERROR";
113
- message?: string | undefined;
114
- }>]>;
115
- type TaskRunError = z.infer<typeof TaskRunError>;
116
- declare const TaskRun: z.ZodObject<{
117
- id: z.ZodString;
118
- payload: z.ZodString;
119
- payloadType: z.ZodString;
120
- context: z.ZodAny;
121
- tags: z.ZodArray<z.ZodString, "many">;
122
- isTest: z.ZodDefault<z.ZodBoolean>;
123
- createdAt: z.ZodDate;
124
- idempotencyKey: z.ZodOptional<z.ZodString>;
125
- }, "strip", z.ZodTypeAny, {
126
- id: string;
127
- payload: string;
128
- payloadType: string;
129
- tags: string[];
130
- isTest: boolean;
131
- createdAt: Date;
132
- context?: any;
133
- idempotencyKey?: string | undefined;
134
- }, {
135
- id: string;
136
- payload: string;
137
- payloadType: string;
138
- tags: string[];
139
- createdAt: Date;
140
- context?: any;
141
- isTest?: boolean | undefined;
142
- idempotencyKey?: string | undefined;
143
- }>;
144
- type TaskRun = z.infer<typeof TaskRun>;
145
- declare const TaskRunExecutionTask: z.ZodObject<{
146
- id: z.ZodString;
147
- filePath: z.ZodString;
148
- exportName: z.ZodString;
149
- }, "strip", z.ZodTypeAny, {
150
- id: string;
151
- filePath: string;
152
- exportName: string;
153
- }, {
154
- id: string;
155
- filePath: string;
156
- exportName: string;
157
- }>;
158
- type TaskRunExecutionTask = z.infer<typeof TaskRunExecutionTask>;
159
- declare const TaskRunExecutionAttempt: z.ZodObject<{
160
- id: z.ZodString;
161
- number: z.ZodNumber;
162
- startedAt: z.ZodDate;
163
- backgroundWorkerId: z.ZodString;
164
- backgroundWorkerTaskId: z.ZodString;
165
- status: z.ZodString;
166
- }, "strip", z.ZodTypeAny, {
167
- number: number;
168
- status: string;
169
- id: string;
170
- startedAt: Date;
171
- backgroundWorkerId: string;
172
- backgroundWorkerTaskId: string;
173
- }, {
174
- number: number;
175
- status: string;
176
- id: string;
177
- startedAt: Date;
178
- backgroundWorkerId: string;
179
- backgroundWorkerTaskId: string;
180
- }>;
181
- type TaskRunExecutionAttempt = z.infer<typeof TaskRunExecutionAttempt>;
182
- declare const TaskRunExecutionEnvironment: z.ZodObject<{
183
- id: z.ZodString;
184
- slug: z.ZodString;
185
- type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
186
- }, "strip", z.ZodTypeAny, {
187
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
188
- id: string;
189
- slug: string;
190
- }, {
191
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
192
- id: string;
193
- slug: string;
194
- }>;
195
- type TaskRunExecutionEnvironment = z.infer<typeof TaskRunExecutionEnvironment>;
196
- declare const TaskRunExecutionOrganization: z.ZodObject<{
197
- id: z.ZodString;
198
- slug: z.ZodString;
199
- name: z.ZodString;
200
- }, "strip", z.ZodTypeAny, {
201
- name: string;
202
- id: string;
203
- slug: string;
204
- }, {
205
- name: string;
206
- id: string;
207
- slug: string;
208
- }>;
209
- type TaskRunExecutionOrganization = z.infer<typeof TaskRunExecutionOrganization>;
210
- declare const TaskRunExecutionProject: z.ZodObject<{
211
- id: z.ZodString;
212
- ref: z.ZodString;
213
- slug: z.ZodString;
214
- name: z.ZodString;
215
- }, "strip", z.ZodTypeAny, {
216
- name: string;
217
- id: string;
218
- slug: string;
219
- ref: string;
220
- }, {
221
- name: string;
222
- id: string;
223
- slug: string;
224
- ref: string;
225
- }>;
226
- type TaskRunExecutionProject = z.infer<typeof TaskRunExecutionProject>;
227
- declare const TaskRunExecutionQueue: z.ZodObject<{
228
- id: z.ZodString;
229
- name: z.ZodString;
230
- }, "strip", z.ZodTypeAny, {
231
- name: string;
232
- id: string;
233
- }, {
234
- name: string;
235
- id: string;
236
- }>;
237
- type TaskRunExecutionQueue = z.infer<typeof TaskRunExecutionQueue>;
238
- declare const TaskRunExecutionBatch: z.ZodObject<{
239
- id: z.ZodString;
240
- }, "strip", z.ZodTypeAny, {
241
- id: string;
242
- }, {
243
- id: string;
244
- }>;
245
- declare const TaskRunExecution: z.ZodObject<{
246
- task: z.ZodObject<{
247
- id: z.ZodString;
248
- filePath: z.ZodString;
249
- exportName: z.ZodString;
250
- }, "strip", z.ZodTypeAny, {
251
- id: string;
252
- filePath: string;
253
- exportName: string;
254
- }, {
255
- id: string;
256
- filePath: string;
257
- exportName: string;
258
- }>;
259
- attempt: z.ZodObject<{
260
- id: z.ZodString;
261
- number: z.ZodNumber;
262
- startedAt: z.ZodDate;
263
- backgroundWorkerId: z.ZodString;
264
- backgroundWorkerTaskId: z.ZodString;
265
- status: z.ZodString;
266
- }, "strip", z.ZodTypeAny, {
267
- number: number;
268
- status: string;
269
- id: string;
270
- startedAt: Date;
271
- backgroundWorkerId: string;
272
- backgroundWorkerTaskId: string;
273
- }, {
274
- number: number;
275
- status: string;
276
- id: string;
277
- startedAt: Date;
278
- backgroundWorkerId: string;
279
- backgroundWorkerTaskId: string;
280
- }>;
281
- run: z.ZodObject<{
282
- id: z.ZodString;
283
- payload: z.ZodString;
284
- payloadType: z.ZodString;
285
- context: z.ZodAny;
286
- tags: z.ZodArray<z.ZodString, "many">;
287
- isTest: z.ZodDefault<z.ZodBoolean>;
288
- createdAt: z.ZodDate;
289
- idempotencyKey: z.ZodOptional<z.ZodString>;
290
- }, "strip", z.ZodTypeAny, {
291
- id: string;
292
- payload: string;
293
- payloadType: string;
294
- tags: string[];
295
- isTest: boolean;
296
- createdAt: Date;
297
- context?: any;
298
- idempotencyKey?: string | undefined;
299
- }, {
300
- id: string;
301
- payload: string;
302
- payloadType: string;
303
- tags: string[];
304
- createdAt: Date;
305
- context?: any;
306
- isTest?: boolean | undefined;
307
- idempotencyKey?: string | undefined;
308
- }>;
309
- queue: z.ZodObject<{
310
- id: z.ZodString;
311
- name: z.ZodString;
312
- }, "strip", z.ZodTypeAny, {
313
- name: string;
314
- id: string;
315
- }, {
316
- name: string;
317
- id: string;
318
- }>;
319
- environment: z.ZodObject<{
320
- id: z.ZodString;
321
- slug: z.ZodString;
322
- type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
323
- }, "strip", z.ZodTypeAny, {
324
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
325
- id: string;
326
- slug: string;
327
- }, {
328
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
329
- id: string;
330
- slug: string;
331
- }>;
332
- organization: z.ZodObject<{
333
- id: z.ZodString;
334
- slug: z.ZodString;
335
- name: z.ZodString;
336
- }, "strip", z.ZodTypeAny, {
337
- name: string;
338
- id: string;
339
- slug: string;
340
- }, {
341
- name: string;
342
- id: string;
343
- slug: string;
344
- }>;
345
- project: z.ZodObject<{
346
- id: z.ZodString;
347
- ref: z.ZodString;
348
- slug: z.ZodString;
349
- name: z.ZodString;
350
- }, "strip", z.ZodTypeAny, {
351
- name: string;
352
- id: string;
353
- slug: string;
354
- ref: string;
355
- }, {
356
- name: string;
357
- id: string;
358
- slug: string;
359
- ref: string;
360
- }>;
361
- batch: z.ZodOptional<z.ZodObject<{
362
- id: z.ZodString;
363
- }, "strip", z.ZodTypeAny, {
364
- id: string;
365
- }, {
366
- id: string;
367
- }>>;
368
- }, "strip", z.ZodTypeAny, {
369
- task: {
370
- id: string;
371
- filePath: string;
372
- exportName: string;
373
- };
374
- attempt: {
375
- number: number;
376
- status: string;
377
- id: string;
378
- startedAt: Date;
379
- backgroundWorkerId: string;
380
- backgroundWorkerTaskId: string;
381
- };
382
- run: {
383
- id: string;
384
- payload: string;
385
- payloadType: string;
386
- tags: string[];
387
- isTest: boolean;
388
- createdAt: Date;
389
- context?: any;
390
- idempotencyKey?: string | undefined;
391
- };
392
- queue: {
393
- name: string;
394
- id: string;
395
- };
396
- environment: {
397
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
398
- id: string;
399
- slug: string;
400
- };
401
- organization: {
402
- name: string;
403
- id: string;
404
- slug: string;
405
- };
406
- project: {
407
- name: string;
408
- id: string;
409
- slug: string;
410
- ref: string;
411
- };
412
- batch?: {
413
- id: string;
414
- } | undefined;
415
- }, {
416
- task: {
417
- id: string;
418
- filePath: string;
419
- exportName: string;
420
- };
421
- attempt: {
422
- number: number;
423
- status: string;
424
- id: string;
425
- startedAt: Date;
426
- backgroundWorkerId: string;
427
- backgroundWorkerTaskId: string;
428
- };
429
- run: {
430
- id: string;
431
- payload: string;
432
- payloadType: string;
433
- tags: string[];
434
- createdAt: Date;
435
- context?: any;
436
- isTest?: boolean | undefined;
437
- idempotencyKey?: string | undefined;
438
- };
439
- queue: {
440
- name: string;
441
- id: string;
442
- };
443
- environment: {
444
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
445
- id: string;
446
- slug: string;
447
- };
448
- organization: {
449
- name: string;
450
- id: string;
451
- slug: string;
452
- };
453
- project: {
454
- name: string;
455
- id: string;
456
- slug: string;
457
- ref: string;
458
- };
459
- batch?: {
460
- id: string;
461
- } | undefined;
462
- }>;
463
- type TaskRunExecution = z.infer<typeof TaskRunExecution>;
464
- declare const TaskRunContext: z.ZodObject<{
465
- task: z.ZodObject<{
466
- id: z.ZodString;
467
- filePath: z.ZodString;
468
- exportName: z.ZodString;
469
- }, "strip", z.ZodTypeAny, {
470
- id: string;
471
- filePath: string;
472
- exportName: string;
473
- }, {
474
- id: string;
475
- filePath: string;
476
- exportName: string;
477
- }>;
478
- attempt: z.ZodObject<Omit<{
479
- id: z.ZodString;
480
- number: z.ZodNumber;
481
- startedAt: z.ZodDate;
482
- backgroundWorkerId: z.ZodString;
483
- backgroundWorkerTaskId: z.ZodString;
484
- status: z.ZodString;
485
- }, "backgroundWorkerId" | "backgroundWorkerTaskId">, "strip", z.ZodTypeAny, {
486
- number: number;
487
- status: string;
488
- id: string;
489
- startedAt: Date;
490
- }, {
491
- number: number;
492
- status: string;
493
- id: string;
494
- startedAt: Date;
495
- }>;
496
- run: z.ZodObject<Omit<{
497
- id: z.ZodString;
498
- payload: z.ZodString;
499
- payloadType: z.ZodString;
500
- context: z.ZodAny;
501
- tags: z.ZodArray<z.ZodString, "many">;
502
- isTest: z.ZodDefault<z.ZodBoolean>;
503
- createdAt: z.ZodDate;
504
- idempotencyKey: z.ZodOptional<z.ZodString>;
505
- }, "payload" | "payloadType">, "strip", z.ZodTypeAny, {
506
- id: string;
507
- tags: string[];
508
- isTest: boolean;
509
- createdAt: Date;
510
- context?: any;
511
- idempotencyKey?: string | undefined;
512
- }, {
513
- id: string;
514
- tags: string[];
515
- createdAt: Date;
516
- context?: any;
517
- isTest?: boolean | undefined;
518
- idempotencyKey?: string | undefined;
519
- }>;
520
- queue: z.ZodObject<{
521
- id: z.ZodString;
522
- name: z.ZodString;
523
- }, "strip", z.ZodTypeAny, {
524
- name: string;
525
- id: string;
526
- }, {
527
- name: string;
528
- id: string;
529
- }>;
530
- environment: z.ZodObject<{
531
- id: z.ZodString;
532
- slug: z.ZodString;
533
- type: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
534
- }, "strip", z.ZodTypeAny, {
535
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
536
- id: string;
537
- slug: string;
538
- }, {
539
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
540
- id: string;
541
- slug: string;
542
- }>;
543
- organization: z.ZodObject<{
544
- id: z.ZodString;
545
- slug: z.ZodString;
546
- name: z.ZodString;
547
- }, "strip", z.ZodTypeAny, {
548
- name: string;
549
- id: string;
550
- slug: string;
551
- }, {
552
- name: string;
553
- id: string;
554
- slug: string;
555
- }>;
556
- project: z.ZodObject<{
557
- id: z.ZodString;
558
- ref: z.ZodString;
559
- slug: z.ZodString;
560
- name: z.ZodString;
561
- }, "strip", z.ZodTypeAny, {
562
- name: string;
563
- id: string;
564
- slug: string;
565
- ref: string;
566
- }, {
567
- name: string;
568
- id: string;
569
- slug: string;
570
- ref: string;
571
- }>;
572
- batch: z.ZodOptional<z.ZodObject<{
573
- id: z.ZodString;
574
- }, "strip", z.ZodTypeAny, {
575
- id: string;
576
- }, {
577
- id: string;
578
- }>>;
579
- }, "strip", z.ZodTypeAny, {
580
- task: {
581
- id: string;
582
- filePath: string;
583
- exportName: string;
584
- };
585
- attempt: {
586
- number: number;
587
- status: string;
588
- id: string;
589
- startedAt: Date;
590
- };
591
- run: {
592
- id: string;
593
- tags: string[];
594
- isTest: boolean;
595
- createdAt: Date;
596
- context?: any;
597
- idempotencyKey?: string | undefined;
598
- };
599
- queue: {
600
- name: string;
601
- id: string;
602
- };
603
- environment: {
604
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
605
- id: string;
606
- slug: string;
607
- };
608
- organization: {
609
- name: string;
610
- id: string;
611
- slug: string;
612
- };
613
- project: {
614
- name: string;
615
- id: string;
616
- slug: string;
617
- ref: string;
618
- };
619
- batch?: {
620
- id: string;
621
- } | undefined;
622
- }, {
623
- task: {
624
- id: string;
625
- filePath: string;
626
- exportName: string;
627
- };
628
- attempt: {
629
- number: number;
630
- status: string;
631
- id: string;
632
- startedAt: Date;
633
- };
634
- run: {
635
- id: string;
636
- tags: string[];
637
- createdAt: Date;
638
- context?: any;
639
- isTest?: boolean | undefined;
640
- idempotencyKey?: string | undefined;
641
- };
642
- queue: {
643
- name: string;
644
- id: string;
645
- };
646
- environment: {
647
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
648
- id: string;
649
- slug: string;
650
- };
651
- organization: {
652
- name: string;
653
- id: string;
654
- slug: string;
655
- };
656
- project: {
657
- name: string;
658
- id: string;
659
- slug: string;
660
- ref: string;
661
- };
662
- batch?: {
663
- id: string;
664
- } | undefined;
665
- }>;
666
- type TaskRunContext = z.infer<typeof TaskRunContext>;
667
- declare const TaskRunExecutionRetry: z.ZodObject<{
668
- timestamp: z.ZodNumber;
669
- delay: z.ZodNumber;
670
- error: z.ZodOptional<z.ZodUnknown>;
671
- }, "strip", z.ZodTypeAny, {
672
- timestamp: number;
673
- delay: number;
674
- error?: unknown;
675
- }, {
676
- timestamp: number;
677
- delay: number;
678
- error?: unknown;
679
- }>;
680
- type TaskRunExecutionRetry = z.infer<typeof TaskRunExecutionRetry>;
681
- declare const TaskRunFailedExecutionResult: z.ZodObject<{
682
- ok: z.ZodLiteral<false>;
683
- id: z.ZodString;
684
- error: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
685
- type: z.ZodLiteral<"BUILT_IN_ERROR">;
686
- name: z.ZodString;
687
- message: z.ZodString;
688
- stackTrace: z.ZodString;
689
- }, "strip", z.ZodTypeAny, {
690
- type: "BUILT_IN_ERROR";
691
- message: string;
692
- name: string;
693
- stackTrace: string;
694
- }, {
695
- type: "BUILT_IN_ERROR";
696
- message: string;
697
- name: string;
698
- stackTrace: string;
699
- }>, z.ZodObject<{
700
- type: z.ZodLiteral<"CUSTOM_ERROR">;
701
- raw: z.ZodString;
702
- }, "strip", z.ZodTypeAny, {
703
- type: "CUSTOM_ERROR";
704
- raw: string;
705
- }, {
706
- type: "CUSTOM_ERROR";
707
- raw: string;
708
- }>, z.ZodObject<{
709
- type: z.ZodLiteral<"STRING_ERROR">;
710
- raw: z.ZodString;
711
- }, "strip", z.ZodTypeAny, {
712
- type: "STRING_ERROR";
713
- raw: string;
714
- }, {
715
- type: "STRING_ERROR";
716
- raw: string;
717
- }>, z.ZodObject<{
718
- type: z.ZodLiteral<"INTERNAL_ERROR">;
719
- code: z.ZodEnum<["COULD_NOT_FIND_EXECUTOR", "COULD_NOT_FIND_TASK", "CONFIGURED_INCORRECTLY", "TASK_ALREADY_RUNNING", "TASK_EXECUTION_FAILED", "TASK_EXECUTION_ABORTED", "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE", "TASK_RUN_CANCELLED", "TASK_OUTPUT_ERROR", "HANDLE_ERROR_ERROR", "GRACEFUL_EXIT_TIMEOUT"]>;
720
- message: z.ZodOptional<z.ZodString>;
721
- }, "strip", z.ZodTypeAny, {
722
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
723
- type: "INTERNAL_ERROR";
724
- message?: string | undefined;
725
- }, {
726
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
727
- type: "INTERNAL_ERROR";
728
- message?: string | undefined;
729
- }>]>;
730
- retry: z.ZodOptional<z.ZodObject<{
731
- timestamp: z.ZodNumber;
732
- delay: z.ZodNumber;
733
- error: z.ZodOptional<z.ZodUnknown>;
734
- }, "strip", z.ZodTypeAny, {
735
- timestamp: number;
736
- delay: number;
737
- error?: unknown;
738
- }, {
739
- timestamp: number;
740
- delay: number;
741
- error?: unknown;
742
- }>>;
743
- skippedRetrying: z.ZodOptional<z.ZodBoolean>;
744
- }, "strip", z.ZodTypeAny, {
745
- error: {
746
- type: "BUILT_IN_ERROR";
747
- message: string;
748
- name: string;
749
- stackTrace: string;
750
- } | {
751
- type: "CUSTOM_ERROR";
752
- raw: string;
753
- } | {
754
- type: "STRING_ERROR";
755
- raw: string;
756
- } | {
757
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
758
- type: "INTERNAL_ERROR";
759
- message?: string | undefined;
760
- };
761
- id: string;
762
- ok: false;
763
- retry?: {
764
- timestamp: number;
765
- delay: number;
766
- error?: unknown;
767
- } | undefined;
768
- skippedRetrying?: boolean | undefined;
769
- }, {
770
- error: {
771
- type: "BUILT_IN_ERROR";
772
- message: string;
773
- name: string;
774
- stackTrace: string;
775
- } | {
776
- type: "CUSTOM_ERROR";
777
- raw: string;
778
- } | {
779
- type: "STRING_ERROR";
780
- raw: string;
781
- } | {
782
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
783
- type: "INTERNAL_ERROR";
784
- message?: string | undefined;
785
- };
786
- id: string;
787
- ok: false;
788
- retry?: {
789
- timestamp: number;
790
- delay: number;
791
- error?: unknown;
792
- } | undefined;
793
- skippedRetrying?: boolean | undefined;
794
- }>;
795
- type TaskRunFailedExecutionResult = z.infer<typeof TaskRunFailedExecutionResult>;
796
- declare const TaskRunSuccessfulExecutionResult: z.ZodObject<{
797
- ok: z.ZodLiteral<true>;
798
- id: z.ZodString;
799
- output: z.ZodOptional<z.ZodString>;
800
- outputType: z.ZodString;
801
- }, "strip", z.ZodTypeAny, {
802
- id: string;
803
- ok: true;
804
- outputType: string;
805
- output?: string | undefined;
806
- }, {
807
- id: string;
808
- ok: true;
809
- outputType: string;
810
- output?: string | undefined;
811
- }>;
812
- type TaskRunSuccessfulExecutionResult = z.infer<typeof TaskRunSuccessfulExecutionResult>;
813
- declare const TaskRunExecutionResult: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
814
- ok: z.ZodLiteral<true>;
815
- id: z.ZodString;
816
- output: z.ZodOptional<z.ZodString>;
817
- outputType: z.ZodString;
818
- }, "strip", z.ZodTypeAny, {
819
- id: string;
820
- ok: true;
821
- outputType: string;
822
- output?: string | undefined;
823
- }, {
824
- id: string;
825
- ok: true;
826
- outputType: string;
827
- output?: string | undefined;
828
- }>, z.ZodObject<{
829
- ok: z.ZodLiteral<false>;
830
- id: z.ZodString;
831
- error: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
832
- type: z.ZodLiteral<"BUILT_IN_ERROR">;
833
- name: z.ZodString;
834
- message: z.ZodString;
835
- stackTrace: z.ZodString;
836
- }, "strip", z.ZodTypeAny, {
837
- type: "BUILT_IN_ERROR";
838
- message: string;
839
- name: string;
840
- stackTrace: string;
841
- }, {
842
- type: "BUILT_IN_ERROR";
843
- message: string;
844
- name: string;
845
- stackTrace: string;
846
- }>, z.ZodObject<{
847
- type: z.ZodLiteral<"CUSTOM_ERROR">;
848
- raw: z.ZodString;
849
- }, "strip", z.ZodTypeAny, {
850
- type: "CUSTOM_ERROR";
851
- raw: string;
852
- }, {
853
- type: "CUSTOM_ERROR";
854
- raw: string;
855
- }>, z.ZodObject<{
856
- type: z.ZodLiteral<"STRING_ERROR">;
857
- raw: z.ZodString;
858
- }, "strip", z.ZodTypeAny, {
859
- type: "STRING_ERROR";
860
- raw: string;
861
- }, {
862
- type: "STRING_ERROR";
863
- raw: string;
864
- }>, z.ZodObject<{
865
- type: z.ZodLiteral<"INTERNAL_ERROR">;
866
- code: z.ZodEnum<["COULD_NOT_FIND_EXECUTOR", "COULD_NOT_FIND_TASK", "CONFIGURED_INCORRECTLY", "TASK_ALREADY_RUNNING", "TASK_EXECUTION_FAILED", "TASK_EXECUTION_ABORTED", "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE", "TASK_RUN_CANCELLED", "TASK_OUTPUT_ERROR", "HANDLE_ERROR_ERROR", "GRACEFUL_EXIT_TIMEOUT"]>;
867
- message: z.ZodOptional<z.ZodString>;
868
- }, "strip", z.ZodTypeAny, {
869
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
870
- type: "INTERNAL_ERROR";
871
- message?: string | undefined;
872
- }, {
873
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
874
- type: "INTERNAL_ERROR";
875
- message?: string | undefined;
876
- }>]>;
877
- retry: z.ZodOptional<z.ZodObject<{
878
- timestamp: z.ZodNumber;
879
- delay: z.ZodNumber;
880
- error: z.ZodOptional<z.ZodUnknown>;
881
- }, "strip", z.ZodTypeAny, {
882
- timestamp: number;
883
- delay: number;
884
- error?: unknown;
885
- }, {
886
- timestamp: number;
887
- delay: number;
888
- error?: unknown;
889
- }>>;
890
- skippedRetrying: z.ZodOptional<z.ZodBoolean>;
891
- }, "strip", z.ZodTypeAny, {
892
- error: {
893
- type: "BUILT_IN_ERROR";
894
- message: string;
895
- name: string;
896
- stackTrace: string;
897
- } | {
898
- type: "CUSTOM_ERROR";
899
- raw: string;
900
- } | {
901
- type: "STRING_ERROR";
902
- raw: string;
903
- } | {
904
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
905
- type: "INTERNAL_ERROR";
906
- message?: string | undefined;
907
- };
908
- id: string;
909
- ok: false;
910
- retry?: {
911
- timestamp: number;
912
- delay: number;
913
- error?: unknown;
914
- } | undefined;
915
- skippedRetrying?: boolean | undefined;
916
- }, {
917
- error: {
918
- type: "BUILT_IN_ERROR";
919
- message: string;
920
- name: string;
921
- stackTrace: string;
922
- } | {
923
- type: "CUSTOM_ERROR";
924
- raw: string;
925
- } | {
926
- type: "STRING_ERROR";
927
- raw: string;
928
- } | {
929
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
930
- type: "INTERNAL_ERROR";
931
- message?: string | undefined;
932
- };
933
- id: string;
934
- ok: false;
935
- retry?: {
936
- timestamp: number;
937
- delay: number;
938
- error?: unknown;
939
- } | undefined;
940
- skippedRetrying?: boolean | undefined;
941
- }>]>;
942
- type TaskRunExecutionResult = z.infer<typeof TaskRunExecutionResult>;
943
- declare const BatchTaskRunExecutionResult: z.ZodObject<{
944
- id: z.ZodString;
945
- items: z.ZodArray<z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
946
- ok: z.ZodLiteral<true>;
947
- id: z.ZodString;
948
- output: z.ZodOptional<z.ZodString>;
949
- outputType: z.ZodString;
950
- }, "strip", z.ZodTypeAny, {
951
- id: string;
952
- ok: true;
953
- outputType: string;
954
- output?: string | undefined;
955
- }, {
956
- id: string;
957
- ok: true;
958
- outputType: string;
959
- output?: string | undefined;
960
- }>, z.ZodObject<{
961
- ok: z.ZodLiteral<false>;
962
- id: z.ZodString;
963
- error: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
964
- type: z.ZodLiteral<"BUILT_IN_ERROR">;
965
- name: z.ZodString;
966
- message: z.ZodString;
967
- stackTrace: z.ZodString;
968
- }, "strip", z.ZodTypeAny, {
969
- type: "BUILT_IN_ERROR";
970
- message: string;
971
- name: string;
972
- stackTrace: string;
973
- }, {
974
- type: "BUILT_IN_ERROR";
975
- message: string;
976
- name: string;
977
- stackTrace: string;
978
- }>, z.ZodObject<{
979
- type: z.ZodLiteral<"CUSTOM_ERROR">;
980
- raw: z.ZodString;
981
- }, "strip", z.ZodTypeAny, {
982
- type: "CUSTOM_ERROR";
983
- raw: string;
984
- }, {
985
- type: "CUSTOM_ERROR";
986
- raw: string;
987
- }>, z.ZodObject<{
988
- type: z.ZodLiteral<"STRING_ERROR">;
989
- raw: z.ZodString;
990
- }, "strip", z.ZodTypeAny, {
991
- type: "STRING_ERROR";
992
- raw: string;
993
- }, {
994
- type: "STRING_ERROR";
995
- raw: string;
996
- }>, z.ZodObject<{
997
- type: z.ZodLiteral<"INTERNAL_ERROR">;
998
- code: z.ZodEnum<["COULD_NOT_FIND_EXECUTOR", "COULD_NOT_FIND_TASK", "CONFIGURED_INCORRECTLY", "TASK_ALREADY_RUNNING", "TASK_EXECUTION_FAILED", "TASK_EXECUTION_ABORTED", "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE", "TASK_RUN_CANCELLED", "TASK_OUTPUT_ERROR", "HANDLE_ERROR_ERROR", "GRACEFUL_EXIT_TIMEOUT"]>;
999
- message: z.ZodOptional<z.ZodString>;
1000
- }, "strip", z.ZodTypeAny, {
1001
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
1002
- type: "INTERNAL_ERROR";
1003
- message?: string | undefined;
1004
- }, {
1005
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
1006
- type: "INTERNAL_ERROR";
1007
- message?: string | undefined;
1008
- }>]>;
1009
- retry: z.ZodOptional<z.ZodObject<{
1010
- timestamp: z.ZodNumber;
1011
- delay: z.ZodNumber;
1012
- error: z.ZodOptional<z.ZodUnknown>;
1013
- }, "strip", z.ZodTypeAny, {
1014
- timestamp: number;
1015
- delay: number;
1016
- error?: unknown;
1017
- }, {
1018
- timestamp: number;
1019
- delay: number;
1020
- error?: unknown;
1021
- }>>;
1022
- skippedRetrying: z.ZodOptional<z.ZodBoolean>;
1023
- }, "strip", z.ZodTypeAny, {
1024
- error: {
1025
- type: "BUILT_IN_ERROR";
1026
- message: string;
1027
- name: string;
1028
- stackTrace: string;
1029
- } | {
1030
- type: "CUSTOM_ERROR";
1031
- raw: string;
1032
- } | {
1033
- type: "STRING_ERROR";
1034
- raw: string;
1035
- } | {
1036
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
1037
- type: "INTERNAL_ERROR";
1038
- message?: string | undefined;
1039
- };
1040
- id: string;
1041
- ok: false;
1042
- retry?: {
1043
- timestamp: number;
1044
- delay: number;
1045
- error?: unknown;
1046
- } | undefined;
1047
- skippedRetrying?: boolean | undefined;
1048
- }, {
1049
- error: {
1050
- type: "BUILT_IN_ERROR";
1051
- message: string;
1052
- name: string;
1053
- stackTrace: string;
1054
- } | {
1055
- type: "CUSTOM_ERROR";
1056
- raw: string;
1057
- } | {
1058
- type: "STRING_ERROR";
1059
- raw: string;
1060
- } | {
1061
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
1062
- type: "INTERNAL_ERROR";
1063
- message?: string | undefined;
1064
- };
1065
- id: string;
1066
- ok: false;
1067
- retry?: {
1068
- timestamp: number;
1069
- delay: number;
1070
- error?: unknown;
1071
- } | undefined;
1072
- skippedRetrying?: boolean | undefined;
1073
- }>]>, "many">;
1074
- }, "strip", z.ZodTypeAny, {
1075
- id: string;
1076
- items: ({
1077
- error: {
1078
- type: "BUILT_IN_ERROR";
1079
- message: string;
1080
- name: string;
1081
- stackTrace: string;
1082
- } | {
1083
- type: "CUSTOM_ERROR";
1084
- raw: string;
1085
- } | {
1086
- type: "STRING_ERROR";
1087
- raw: string;
1088
- } | {
1089
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
1090
- type: "INTERNAL_ERROR";
1091
- message?: string | undefined;
1092
- };
1093
- id: string;
1094
- ok: false;
1095
- retry?: {
1096
- timestamp: number;
1097
- delay: number;
1098
- error?: unknown;
1099
- } | undefined;
1100
- skippedRetrying?: boolean | undefined;
1101
- } | {
1102
- id: string;
1103
- ok: true;
1104
- outputType: string;
1105
- output?: string | undefined;
1106
- })[];
1107
- }, {
1108
- id: string;
1109
- items: ({
1110
- error: {
1111
- type: "BUILT_IN_ERROR";
1112
- message: string;
1113
- name: string;
1114
- stackTrace: string;
1115
- } | {
1116
- type: "CUSTOM_ERROR";
1117
- raw: string;
1118
- } | {
1119
- type: "STRING_ERROR";
1120
- raw: string;
1121
- } | {
1122
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT";
1123
- type: "INTERNAL_ERROR";
1124
- message?: string | undefined;
1125
- };
1126
- id: string;
1127
- ok: false;
1128
- retry?: {
1129
- timestamp: number;
1130
- delay: number;
1131
- error?: unknown;
1132
- } | undefined;
1133
- skippedRetrying?: boolean | undefined;
1134
- } | {
1135
- id: string;
1136
- ok: true;
1137
- outputType: string;
1138
- output?: string | undefined;
1139
- })[];
1140
- }>;
1141
- type BatchTaskRunExecutionResult = z.infer<typeof BatchTaskRunExecutionResult>;
1142
-
1143
- interface RuntimeManager {
1144
- disable(): void;
1145
- waitUntil(date: Date): Promise<void>;
1146
- waitForDuration(ms: number): Promise<void>;
1147
- waitForTask(params: {
1148
- id: string;
1149
- ctx: TaskRunContext;
1150
- }): Promise<TaskRunExecutionResult>;
1151
- waitForBatch(params: {
1152
- id: string;
1153
- runs: string[];
1154
- ctx: TaskRunContext;
1155
- }): Promise<BatchTaskRunExecutionResult>;
1156
- }
1157
-
1158
- export { BatchTaskRunExecutionResult as B, type RuntimeManager as R, TaskRunExecutionResult as T, TaskRunError as a, TaskRunContext as b, TaskRunBuiltInError as c, TaskRunCustomErrorObject as d, TaskRunStringError as e, TaskRunErrorCodes as f, TaskRunInternalError as g, TaskRun as h, TaskRunExecutionTask as i, TaskRunExecutionAttempt as j, TaskRunExecutionEnvironment as k, TaskRunExecutionOrganization as l, TaskRunExecutionProject as m, TaskRunExecutionQueue as n, TaskRunExecutionBatch as o, TaskRunExecution as p, TaskRunExecutionRetry as q, TaskRunFailedExecutionResult as r, TaskRunSuccessfulExecutionResult as s };