@trigger.dev/core 0.0.0-prerelease-20241203170318 → 0.0.0-prerelease-20241212160659

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 (53) hide show
  1. package/dist/commonjs/v3/apiClient/index.d.ts +128 -126
  2. package/dist/commonjs/v3/apiClient/index.js +4 -0
  3. package/dist/commonjs/v3/apiClient/index.js.map +1 -1
  4. package/dist/commonjs/v3/apiClient/runStream.d.ts +28 -4
  5. package/dist/commonjs/v3/apiClient/runStream.js +104 -38
  6. package/dist/commonjs/v3/apiClient/runStream.js.map +1 -1
  7. package/dist/commonjs/v3/apiClient/stream.d.ts +6 -1
  8. package/dist/commonjs/v3/apiClient/stream.js +155 -24
  9. package/dist/commonjs/v3/apiClient/stream.js.map +1 -1
  10. package/dist/commonjs/v3/runMetadata/manager.d.ts +2 -1
  11. package/dist/commonjs/v3/runMetadata/manager.js +11 -5
  12. package/dist/commonjs/v3/runMetadata/manager.js.map +1 -1
  13. package/dist/commonjs/v3/runMetadata/metadataStream.d.ts +7 -7
  14. package/dist/commonjs/v3/runMetadata/metadataStream.js +33 -39
  15. package/dist/commonjs/v3/runMetadata/metadataStream.js.map +1 -1
  16. package/dist/commonjs/v3/schemas/api.d.ts +698 -675
  17. package/dist/commonjs/v3/schemas/api.js +9 -1
  18. package/dist/commonjs/v3/schemas/api.js.map +1 -1
  19. package/dist/commonjs/v3/schemas/build.d.ts +108 -108
  20. package/dist/commonjs/v3/schemas/messages.d.ts +2442 -2442
  21. package/dist/commonjs/v3/schemas/resources.d.ts +58 -58
  22. package/dist/commonjs/v3/schemas/schemas.d.ts +359 -359
  23. package/dist/commonjs/v3/types/tasks.d.ts +25 -1
  24. package/dist/commonjs/v3/utils/ioSerialization.d.ts +4 -1
  25. package/dist/commonjs/v3/utils/ioSerialization.js +14 -2
  26. package/dist/commonjs/v3/utils/ioSerialization.js.map +1 -1
  27. package/dist/esm/v3/apiClient/index.d.ts +128 -126
  28. package/dist/esm/v3/apiClient/index.js +4 -0
  29. package/dist/esm/v3/apiClient/index.js.map +1 -1
  30. package/dist/esm/v3/apiClient/runStream.d.ts +28 -4
  31. package/dist/esm/v3/apiClient/runStream.js +102 -39
  32. package/dist/esm/v3/apiClient/runStream.js.map +1 -1
  33. package/dist/esm/v3/apiClient/stream.d.ts +6 -1
  34. package/dist/esm/v3/apiClient/stream.js +151 -23
  35. package/dist/esm/v3/apiClient/stream.js.map +1 -1
  36. package/dist/esm/v3/runMetadata/manager.d.ts +2 -1
  37. package/dist/esm/v3/runMetadata/manager.js +11 -5
  38. package/dist/esm/v3/runMetadata/manager.js.map +1 -1
  39. package/dist/esm/v3/runMetadata/metadataStream.d.ts +7 -7
  40. package/dist/esm/v3/runMetadata/metadataStream.js +33 -39
  41. package/dist/esm/v3/runMetadata/metadataStream.js.map +1 -1
  42. package/dist/esm/v3/schemas/api.d.ts +698 -675
  43. package/dist/esm/v3/schemas/api.js +8 -0
  44. package/dist/esm/v3/schemas/api.js.map +1 -1
  45. package/dist/esm/v3/schemas/build.d.ts +108 -108
  46. package/dist/esm/v3/schemas/messages.d.ts +2442 -2442
  47. package/dist/esm/v3/schemas/resources.d.ts +58 -58
  48. package/dist/esm/v3/schemas/schemas.d.ts +359 -359
  49. package/dist/esm/v3/types/tasks.d.ts +25 -1
  50. package/dist/esm/v3/utils/ioSerialization.d.ts +4 -1
  51. package/dist/esm/v3/utils/ioSerialization.js +14 -2
  52. package/dist/esm/v3/utils/ioSerialization.js.map +1 -1
  53. package/package.json +2 -2
@@ -11,6 +11,7 @@ export type ClientTriggerOptions = {
11
11
  export type ClientBatchTriggerOptions = ClientTriggerOptions & {
12
12
  idempotencyKey?: string;
13
13
  idempotencyKeyTTL?: string;
14
+ processingStrategy?: "parallel" | "sequential";
14
15
  };
15
16
  export type TriggerRequestOptions = ZodFetchOptions & {
16
17
  publicAccessToken?: TriggerJwtOptions;
@@ -30,6 +31,7 @@ export declare class ApiClient {
30
31
  private readonly defaultRequestOptions;
31
32
  constructor(baseUrl: string, accessToken: string, requestOptions?: ApiRequestOptions);
32
33
  get fetchClient(): typeof fetch;
34
+ getHeaders(): Record<string, string>;
33
35
  getRunResult(runId: string, requestOptions?: ZodFetchOptions): Promise<TaskRunExecutionResult | undefined>;
34
36
  getBatchResults(batchId: string, requestOptions?: ZodFetchOptions): Promise<BatchTaskRunExecutionResult | undefined>;
35
37
  triggerTask(taskId: string, body: TriggerTaskRequestBody, clientOptions?: ClientTriggerOptions, requestOptions?: TriggerRequestOptions): Promise<{
@@ -42,8 +44,8 @@ export declare class ApiClient {
42
44
  isCached: boolean;
43
45
  runs: {
44
46
  id: string;
45
- isCached: boolean;
46
47
  taskIdentifier: string;
48
+ isCached: boolean;
47
49
  idempotencyKey?: string | undefined;
48
50
  }[];
49
51
  idempotencyKey?: string | undefined;
@@ -55,127 +57,134 @@ export declare class ApiClient {
55
57
  presignedUrl: string;
56
58
  }>;
57
59
  retrieveRun(runId: string, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
58
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
60
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
59
61
  id: string;
60
- createdAt: Date;
61
62
  tags: string[];
62
- taskIdentifier: string;
63
- depth: number;
64
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
65
- isQueued: boolean;
66
- isExecuting: boolean;
67
- isCompleted: boolean;
68
- isSuccess: boolean;
69
- isFailed: boolean;
70
- isCancelled: boolean;
71
63
  isTest: boolean;
72
- updatedAt: Date;
64
+ createdAt: Date;
65
+ durationMs: number;
73
66
  costInCents: number;
74
67
  baseCostInCents: number;
75
- durationMs: number;
68
+ taskIdentifier: string;
76
69
  relatedRuns: {
77
70
  root?: {
78
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
71
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
79
72
  id: string;
80
- createdAt: Date;
81
73
  tags: string[];
74
+ isTest: boolean;
75
+ createdAt: Date;
76
+ durationMs: number;
77
+ costInCents: number;
78
+ baseCostInCents: number;
82
79
  taskIdentifier: string;
83
80
  depth: number;
84
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
81
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
85
82
  isQueued: boolean;
86
83
  isExecuting: boolean;
87
84
  isCompleted: boolean;
88
85
  isSuccess: boolean;
89
86
  isFailed: boolean;
90
87
  isCancelled: boolean;
91
- isTest: boolean;
92
88
  updatedAt: Date;
93
- costInCents: number;
94
- baseCostInCents: number;
95
- durationMs: number;
96
- metadata?: Record<string, any> | undefined;
97
- version?: string | undefined;
89
+ startedAt?: Date | undefined;
98
90
  idempotencyKey?: string | undefined;
91
+ version?: string | undefined;
92
+ metadata?: Record<string, any> | undefined;
99
93
  ttl?: string | undefined;
100
94
  batchId?: string | undefined;
101
- startedAt?: Date | undefined;
102
95
  finishedAt?: Date | undefined;
103
96
  delayedUntil?: Date | undefined;
104
97
  expiredAt?: Date | undefined;
105
98
  } | undefined;
106
99
  parent?: {
107
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
100
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
108
101
  id: string;
109
- createdAt: Date;
110
102
  tags: string[];
103
+ isTest: boolean;
104
+ createdAt: Date;
105
+ durationMs: number;
106
+ costInCents: number;
107
+ baseCostInCents: number;
111
108
  taskIdentifier: string;
112
109
  depth: number;
113
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
110
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
114
111
  isQueued: boolean;
115
112
  isExecuting: boolean;
116
113
  isCompleted: boolean;
117
114
  isSuccess: boolean;
118
115
  isFailed: boolean;
119
116
  isCancelled: boolean;
120
- isTest: boolean;
121
117
  updatedAt: Date;
122
- costInCents: number;
123
- baseCostInCents: number;
124
- durationMs: number;
125
- metadata?: Record<string, any> | undefined;
126
- version?: string | undefined;
118
+ startedAt?: Date | undefined;
127
119
  idempotencyKey?: string | undefined;
120
+ version?: string | undefined;
121
+ metadata?: Record<string, any> | undefined;
128
122
  ttl?: string | undefined;
129
123
  batchId?: string | undefined;
130
- startedAt?: Date | undefined;
131
124
  finishedAt?: Date | undefined;
132
125
  delayedUntil?: Date | undefined;
133
126
  expiredAt?: Date | undefined;
134
127
  } | undefined;
135
128
  children?: {
136
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
129
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
137
130
  id: string;
138
- createdAt: Date;
139
131
  tags: string[];
132
+ isTest: boolean;
133
+ createdAt: Date;
134
+ durationMs: number;
135
+ costInCents: number;
136
+ baseCostInCents: number;
140
137
  taskIdentifier: string;
141
138
  depth: number;
142
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
139
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
143
140
  isQueued: boolean;
144
141
  isExecuting: boolean;
145
142
  isCompleted: boolean;
146
143
  isSuccess: boolean;
147
144
  isFailed: boolean;
148
145
  isCancelled: boolean;
149
- isTest: boolean;
150
146
  updatedAt: Date;
151
- costInCents: number;
152
- baseCostInCents: number;
153
- durationMs: number;
154
- metadata?: Record<string, any> | undefined;
155
- version?: string | undefined;
147
+ startedAt?: Date | undefined;
156
148
  idempotencyKey?: string | undefined;
149
+ version?: string | undefined;
150
+ metadata?: Record<string, any> | undefined;
157
151
  ttl?: string | undefined;
158
152
  batchId?: string | undefined;
159
- startedAt?: Date | undefined;
160
153
  finishedAt?: Date | undefined;
161
154
  delayedUntil?: Date | undefined;
162
155
  expiredAt?: Date | undefined;
163
156
  }[] | undefined;
164
157
  };
158
+ depth: number;
159
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
160
+ isQueued: boolean;
161
+ isExecuting: boolean;
162
+ isCompleted: boolean;
163
+ isSuccess: boolean;
164
+ isFailed: boolean;
165
+ isCancelled: boolean;
166
+ updatedAt: Date;
165
167
  attempts: ({
166
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
168
+ status: "EXECUTING" | "COMPLETED" | "CANCELED" | "FAILED" | "PENDING" | "PAUSED";
167
169
  id: string;
168
170
  createdAt: Date;
169
171
  updatedAt: Date;
172
+ startedAt?: Date | undefined;
170
173
  error?: {
171
174
  message: string;
172
175
  name?: string | undefined;
173
176
  stackTrace?: string | undefined;
174
177
  } | undefined;
175
- startedAt?: Date | undefined;
176
178
  completedAt?: Date | undefined;
177
179
  } | undefined)[];
178
180
  attemptCount: number;
181
+ output?: any;
182
+ startedAt?: Date | undefined;
183
+ payload?: any;
184
+ idempotencyKey?: string | undefined;
185
+ version?: string | undefined;
186
+ metadata?: Record<string, any> | undefined;
187
+ ttl?: string | undefined;
179
188
  schedule?: {
180
189
  id: string;
181
190
  generator: {
@@ -186,24 +195,17 @@ export declare class ApiClient {
186
195
  externalId?: string | undefined;
187
196
  deduplicationKey?: string | undefined;
188
197
  } | undefined;
189
- metadata?: Record<string, any> | undefined;
190
- version?: string | undefined;
191
- payload?: any;
192
- idempotencyKey?: string | undefined;
193
- ttl?: string | undefined;
194
- batchId?: string | undefined;
198
+ payloadPresignedUrl?: string | undefined;
199
+ outputPresignedUrl?: string | undefined;
195
200
  error?: {
196
201
  message: string;
197
202
  name?: string | undefined;
198
203
  stackTrace?: string | undefined;
199
204
  } | undefined;
200
- startedAt?: Date | undefined;
205
+ batchId?: string | undefined;
201
206
  finishedAt?: Date | undefined;
202
207
  delayedUntil?: Date | undefined;
203
208
  expiredAt?: Date | undefined;
204
- payloadPresignedUrl?: string | undefined;
205
- output?: any;
206
- outputPresignedUrl?: string | undefined;
207
209
  }>;
208
210
  listRuns(query?: ListRunsQueryParams, requestOptions?: ZodFetchOptions): CursorPagePromise<typeof ListRunResponseItem>;
209
211
  listProjectRuns(projectRef: string, query?: ListProjectRunsQueryParams, requestOptions?: ZodFetchOptions): CursorPagePromise<typeof ListRunResponseItem>;
@@ -214,127 +216,134 @@ export declare class ApiClient {
214
216
  id: string;
215
217
  }>;
216
218
  rescheduleRun(runId: string, body: RescheduleRunRequestBody, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
217
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
219
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
218
220
  id: string;
219
- createdAt: Date;
220
221
  tags: string[];
221
- taskIdentifier: string;
222
- depth: number;
223
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
224
- isQueued: boolean;
225
- isExecuting: boolean;
226
- isCompleted: boolean;
227
- isSuccess: boolean;
228
- isFailed: boolean;
229
- isCancelled: boolean;
230
222
  isTest: boolean;
231
- updatedAt: Date;
223
+ createdAt: Date;
224
+ durationMs: number;
232
225
  costInCents: number;
233
226
  baseCostInCents: number;
234
- durationMs: number;
227
+ taskIdentifier: string;
235
228
  relatedRuns: {
236
229
  root?: {
237
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
230
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
238
231
  id: string;
239
- createdAt: Date;
240
232
  tags: string[];
233
+ isTest: boolean;
234
+ createdAt: Date;
235
+ durationMs: number;
236
+ costInCents: number;
237
+ baseCostInCents: number;
241
238
  taskIdentifier: string;
242
239
  depth: number;
243
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
240
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
244
241
  isQueued: boolean;
245
242
  isExecuting: boolean;
246
243
  isCompleted: boolean;
247
244
  isSuccess: boolean;
248
245
  isFailed: boolean;
249
246
  isCancelled: boolean;
250
- isTest: boolean;
251
247
  updatedAt: Date;
252
- costInCents: number;
253
- baseCostInCents: number;
254
- durationMs: number;
255
- metadata?: Record<string, any> | undefined;
256
- version?: string | undefined;
248
+ startedAt?: Date | undefined;
257
249
  idempotencyKey?: string | undefined;
250
+ version?: string | undefined;
251
+ metadata?: Record<string, any> | undefined;
258
252
  ttl?: string | undefined;
259
253
  batchId?: string | undefined;
260
- startedAt?: Date | undefined;
261
254
  finishedAt?: Date | undefined;
262
255
  delayedUntil?: Date | undefined;
263
256
  expiredAt?: Date | undefined;
264
257
  } | undefined;
265
258
  parent?: {
266
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
259
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
267
260
  id: string;
268
- createdAt: Date;
269
261
  tags: string[];
262
+ isTest: boolean;
263
+ createdAt: Date;
264
+ durationMs: number;
265
+ costInCents: number;
266
+ baseCostInCents: number;
270
267
  taskIdentifier: string;
271
268
  depth: number;
272
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
269
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
273
270
  isQueued: boolean;
274
271
  isExecuting: boolean;
275
272
  isCompleted: boolean;
276
273
  isSuccess: boolean;
277
274
  isFailed: boolean;
278
275
  isCancelled: boolean;
279
- isTest: boolean;
280
276
  updatedAt: Date;
281
- costInCents: number;
282
- baseCostInCents: number;
283
- durationMs: number;
284
- metadata?: Record<string, any> | undefined;
285
- version?: string | undefined;
277
+ startedAt?: Date | undefined;
286
278
  idempotencyKey?: string | undefined;
279
+ version?: string | undefined;
280
+ metadata?: Record<string, any> | undefined;
287
281
  ttl?: string | undefined;
288
282
  batchId?: string | undefined;
289
- startedAt?: Date | undefined;
290
283
  finishedAt?: Date | undefined;
291
284
  delayedUntil?: Date | undefined;
292
285
  expiredAt?: Date | undefined;
293
286
  } | undefined;
294
287
  children?: {
295
- status: "CANCELED" | "COMPLETED" | "FAILED" | "TIMED_OUT" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
288
+ status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
296
289
  id: string;
297
- createdAt: Date;
298
290
  tags: string[];
291
+ isTest: boolean;
292
+ createdAt: Date;
293
+ durationMs: number;
294
+ costInCents: number;
295
+ baseCostInCents: number;
299
296
  taskIdentifier: string;
300
297
  depth: number;
301
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
298
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
302
299
  isQueued: boolean;
303
300
  isExecuting: boolean;
304
301
  isCompleted: boolean;
305
302
  isSuccess: boolean;
306
303
  isFailed: boolean;
307
304
  isCancelled: boolean;
308
- isTest: boolean;
309
305
  updatedAt: Date;
310
- costInCents: number;
311
- baseCostInCents: number;
312
- durationMs: number;
313
- metadata?: Record<string, any> | undefined;
314
- version?: string | undefined;
306
+ startedAt?: Date | undefined;
315
307
  idempotencyKey?: string | undefined;
308
+ version?: string | undefined;
309
+ metadata?: Record<string, any> | undefined;
316
310
  ttl?: string | undefined;
317
311
  batchId?: string | undefined;
318
- startedAt?: Date | undefined;
319
312
  finishedAt?: Date | undefined;
320
313
  delayedUntil?: Date | undefined;
321
314
  expiredAt?: Date | undefined;
322
315
  }[] | undefined;
323
316
  };
317
+ depth: number;
318
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
319
+ isQueued: boolean;
320
+ isExecuting: boolean;
321
+ isCompleted: boolean;
322
+ isSuccess: boolean;
323
+ isFailed: boolean;
324
+ isCancelled: boolean;
325
+ updatedAt: Date;
324
326
  attempts: ({
325
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
327
+ status: "EXECUTING" | "COMPLETED" | "CANCELED" | "FAILED" | "PENDING" | "PAUSED";
326
328
  id: string;
327
329
  createdAt: Date;
328
330
  updatedAt: Date;
331
+ startedAt?: Date | undefined;
329
332
  error?: {
330
333
  message: string;
331
334
  name?: string | undefined;
332
335
  stackTrace?: string | undefined;
333
336
  } | undefined;
334
- startedAt?: Date | undefined;
335
337
  completedAt?: Date | undefined;
336
338
  } | undefined)[];
337
339
  attemptCount: number;
340
+ output?: any;
341
+ startedAt?: Date | undefined;
342
+ payload?: any;
343
+ idempotencyKey?: string | undefined;
344
+ version?: string | undefined;
345
+ metadata?: Record<string, any> | undefined;
346
+ ttl?: string | undefined;
338
347
  schedule?: {
339
348
  id: string;
340
349
  generator: {
@@ -345,24 +354,17 @@ export declare class ApiClient {
345
354
  externalId?: string | undefined;
346
355
  deduplicationKey?: string | undefined;
347
356
  } | undefined;
348
- metadata?: Record<string, any> | undefined;
349
- version?: string | undefined;
350
- payload?: any;
351
- idempotencyKey?: string | undefined;
352
- ttl?: string | undefined;
353
- batchId?: string | undefined;
357
+ payloadPresignedUrl?: string | undefined;
358
+ outputPresignedUrl?: string | undefined;
354
359
  error?: {
355
360
  message: string;
356
361
  name?: string | undefined;
357
362
  stackTrace?: string | undefined;
358
363
  } | undefined;
359
- startedAt?: Date | undefined;
364
+ batchId?: string | undefined;
360
365
  finishedAt?: Date | undefined;
361
366
  delayedUntil?: Date | undefined;
362
367
  expiredAt?: Date | undefined;
363
- payloadPresignedUrl?: string | undefined;
364
- output?: any;
365
- outputPresignedUrl?: string | undefined;
366
368
  }>;
367
369
  addTags(runId: string, body: AddTagsRequestBody, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
368
370
  message: string;
@@ -370,14 +372,14 @@ export declare class ApiClient {
370
372
  createSchedule(options: CreateScheduleOptions, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
371
373
  type: "DECLARATIVE" | "IMPERATIVE";
372
374
  id: string;
373
- timezone: string;
374
375
  task: string;
375
- active: boolean;
376
+ timezone: string;
376
377
  generator: {
377
378
  type: "CRON";
378
379
  description: string;
379
380
  expression: string;
380
381
  };
382
+ active: boolean;
381
383
  environments: {
382
384
  type: string;
383
385
  id: string;
@@ -425,14 +427,14 @@ export declare class ApiClient {
425
427
  }, "strip", z.ZodTypeAny, {
426
428
  type: "DECLARATIVE" | "IMPERATIVE";
427
429
  id: string;
428
- timezone: string;
429
430
  task: string;
430
- active: boolean;
431
+ timezone: string;
431
432
  generator: {
432
433
  type: "CRON";
433
434
  description: string;
434
435
  expression: string;
435
436
  };
437
+ active: boolean;
436
438
  environments: {
437
439
  type: string;
438
440
  id: string;
@@ -444,14 +446,14 @@ export declare class ApiClient {
444
446
  }, {
445
447
  type: "DECLARATIVE" | "IMPERATIVE";
446
448
  id: string;
447
- timezone: string;
448
449
  task: string;
449
- active: boolean;
450
+ timezone: string;
450
451
  generator: {
451
452
  type: "CRON";
452
453
  description: string;
453
454
  expression: string;
454
455
  };
456
+ active: boolean;
455
457
  environments: {
456
458
  type: string;
457
459
  id: string;
@@ -464,14 +466,14 @@ export declare class ApiClient {
464
466
  retrieveSchedule(scheduleId: string, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
465
467
  type: "DECLARATIVE" | "IMPERATIVE";
466
468
  id: string;
467
- timezone: string;
468
469
  task: string;
469
- active: boolean;
470
+ timezone: string;
470
471
  generator: {
471
472
  type: "CRON";
472
473
  description: string;
473
474
  expression: string;
474
475
  };
476
+ active: boolean;
475
477
  environments: {
476
478
  type: string;
477
479
  id: string;
@@ -484,14 +486,14 @@ export declare class ApiClient {
484
486
  updateSchedule(scheduleId: string, options: UpdateScheduleOptions, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
485
487
  type: "DECLARATIVE" | "IMPERATIVE";
486
488
  id: string;
487
- timezone: string;
488
489
  task: string;
489
- active: boolean;
490
+ timezone: string;
490
491
  generator: {
491
492
  type: "CRON";
492
493
  description: string;
493
494
  expression: string;
494
495
  };
496
+ active: boolean;
495
497
  environments: {
496
498
  type: string;
497
499
  id: string;
@@ -504,14 +506,14 @@ export declare class ApiClient {
504
506
  deactivateSchedule(scheduleId: string, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
505
507
  type: "DECLARATIVE" | "IMPERATIVE";
506
508
  id: string;
507
- timezone: string;
508
509
  task: string;
509
- active: boolean;
510
+ timezone: string;
510
511
  generator: {
511
512
  type: "CRON";
512
513
  description: string;
513
514
  expression: string;
514
515
  };
516
+ active: boolean;
515
517
  environments: {
516
518
  type: string;
517
519
  id: string;
@@ -524,14 +526,14 @@ export declare class ApiClient {
524
526
  activateSchedule(scheduleId: string, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
525
527
  type: "DECLARATIVE" | "IMPERATIVE";
526
528
  id: string;
527
- timezone: string;
528
529
  task: string;
529
- active: boolean;
530
+ timezone: string;
530
531
  generator: {
531
532
  type: "CRON";
532
533
  description: string;
533
534
  expression: string;
534
535
  };
536
+ active: boolean;
535
537
  environments: {
536
538
  type: string;
537
539
  id: string;
@@ -577,7 +579,7 @@ export declare class ApiClient {
577
579
  }): RunSubscription<TRunTypes>;
578
580
  generateJWTClaims(requestOptions?: ZodFetchOptions): Promise<Record<string, any>>;
579
581
  retrieveBatch(batchId: string, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
580
- status: "PENDING" | "COMPLETED";
582
+ status: "COMPLETED" | "PENDING";
581
583
  id: string;
582
584
  createdAt: Date;
583
585
  updatedAt: Date;
@@ -46,6 +46,9 @@ class ApiClient {
46
46
  };
47
47
  return fetchClient;
48
48
  }
49
+ getHeaders() {
50
+ return this.#getHeaders(false);
51
+ }
49
52
  async getRunResult(runId, requestOptions) {
50
53
  try {
51
54
  return await (0, core_js_1.zodfetch)(index_js_1.TaskRunExecutionResult, `${this.baseUrl}/api/v1/runs/${runId}/result`, {
@@ -106,6 +109,7 @@ class ApiClient {
106
109
  headers: this.#getHeaders(clientOptions?.spanParentAsLink ?? false, {
107
110
  "idempotency-key": clientOptions?.idempotencyKey,
108
111
  "idempotency-key-ttl": clientOptions?.idempotencyKeyTTL,
112
+ "batch-processing-strategy": clientOptions?.processingStrategy,
109
113
  }),
110
114
  body: JSON.stringify(body),
111
115
  }, mergeRequestOptions(this.defaultRequestOptions, requestOptions))