@trigger.dev/core 0.0.0-prerelease-20241219214230 → 0.0.0-prerelease-20250110154019

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 (42) hide show
  1. package/dist/commonjs/v3/apiClient/index.d.ts +169 -165
  2. package/dist/commonjs/v3/apiClient/index.js +9 -0
  3. package/dist/commonjs/v3/apiClient/index.js.map +1 -1
  4. package/dist/commonjs/v3/apiClient/runStream.d.ts +2 -17
  5. package/dist/commonjs/v3/apiClient/runStream.js +68 -47
  6. package/dist/commonjs/v3/apiClient/runStream.js.map +1 -1
  7. package/dist/commonjs/v3/apiClientManager/index.d.ts +1 -1
  8. package/dist/commonjs/v3/config.d.ts +55 -0
  9. package/dist/commonjs/v3/runMetadata/manager.d.ts +3 -3
  10. package/dist/commonjs/v3/runMetadata/manager.js +1 -7
  11. package/dist/commonjs/v3/runMetadata/manager.js.map +1 -1
  12. package/dist/commonjs/v3/schemas/api.d.ts +820 -820
  13. package/dist/commonjs/v3/schemas/api.js +15 -7
  14. package/dist/commonjs/v3/schemas/api.js.map +1 -1
  15. package/dist/commonjs/v3/schemas/build.d.ts +250 -250
  16. package/dist/commonjs/v3/schemas/fetch.d.ts +31 -31
  17. package/dist/commonjs/v3/schemas/messages.d.ts +3714 -3714
  18. package/dist/commonjs/v3/schemas/resources.d.ts +82 -82
  19. package/dist/commonjs/v3/schemas/schemas.d.ts +424 -424
  20. package/dist/commonjs/v3/types/tasks.d.ts +1 -1
  21. package/dist/commonjs/version.js +1 -1
  22. package/dist/esm/schemas/api.d.ts +8 -8
  23. package/dist/esm/v3/apiClient/index.d.ts +141 -137
  24. package/dist/esm/v3/apiClient/index.js +10 -1
  25. package/dist/esm/v3/apiClient/index.js.map +1 -1
  26. package/dist/esm/v3/apiClient/runStream.d.ts +2 -17
  27. package/dist/esm/v3/apiClient/runStream.js +67 -44
  28. package/dist/esm/v3/apiClient/runStream.js.map +1 -1
  29. package/dist/esm/v3/config.d.ts +55 -0
  30. package/dist/esm/v3/runMetadata/manager.d.ts +3 -3
  31. package/dist/esm/v3/runMetadata/manager.js +1 -7
  32. package/dist/esm/v3/runMetadata/manager.js.map +1 -1
  33. package/dist/esm/v3/schemas/api.d.ts +712 -712
  34. package/dist/esm/v3/schemas/api.js +15 -7
  35. package/dist/esm/v3/schemas/api.js.map +1 -1
  36. package/dist/esm/v3/schemas/build.d.ts +100 -100
  37. package/dist/esm/v3/schemas/messages.d.ts +2391 -2391
  38. package/dist/esm/v3/schemas/resources.d.ts +56 -56
  39. package/dist/esm/v3/schemas/schemas.d.ts +224 -224
  40. package/dist/esm/v3/types/tasks.d.ts +1 -1
  41. package/dist/esm/version.js +1 -1
  42. package/package.json +1 -1
@@ -42,13 +42,13 @@ export declare class ApiClient {
42
42
  batchTriggerV2(body: BatchTriggerTaskV2RequestBody, clientOptions?: ClientBatchTriggerOptions, requestOptions?: TriggerRequestOptions): Promise<{
43
43
  publicAccessToken: string;
44
44
  id: string;
45
- isCached: boolean;
46
45
  runs: {
47
46
  id: string;
48
- isCached: boolean;
49
47
  taskIdentifier: string;
48
+ isCached: boolean;
50
49
  idempotencyKey?: string | undefined;
51
50
  }[];
51
+ isCached: boolean;
52
52
  idempotencyKey?: string | undefined;
53
53
  }>;
54
54
  createUploadPayloadUrl(filename: string, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
@@ -58,152 +58,152 @@ export declare class ApiClient {
58
58
  presignedUrl: string;
59
59
  }>;
60
60
  retrieveRun(runId: string, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
61
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
61
62
  id: string;
62
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
63
+ attempts: ({
64
+ status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
65
+ id: string;
66
+ updatedAt: Date;
67
+ createdAt: Date;
68
+ startedAt?: Date | undefined;
69
+ completedAt?: Date | undefined;
70
+ error?: {
71
+ message: string;
72
+ name?: string | undefined;
73
+ stackTrace?: string | undefined;
74
+ } | undefined;
75
+ } | undefined)[];
76
+ updatedAt: Date;
77
+ isTest: boolean;
78
+ createdAt: Date;
63
79
  tags: string[];
80
+ durationMs: number;
81
+ costInCents: number;
82
+ baseCostInCents: number;
64
83
  taskIdentifier: string;
65
84
  relatedRuns: {
66
85
  root?: {
86
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
67
87
  id: string;
68
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
88
+ updatedAt: Date;
89
+ isTest: boolean;
90
+ createdAt: Date;
69
91
  tags: string[];
92
+ durationMs: number;
93
+ costInCents: number;
94
+ baseCostInCents: number;
70
95
  taskIdentifier: string;
71
96
  depth: number;
72
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
97
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
73
98
  isQueued: boolean;
74
99
  isExecuting: boolean;
75
100
  isCompleted: boolean;
76
101
  isSuccess: boolean;
77
102
  isFailed: boolean;
78
103
  isCancelled: boolean;
79
- isTest: boolean;
80
- createdAt: Date;
81
- updatedAt: Date;
82
- costInCents: number;
83
- baseCostInCents: number;
84
- durationMs: number;
104
+ version?: string | undefined;
105
+ metadata?: Record<string, any> | undefined;
106
+ startedAt?: Date | undefined;
85
107
  idempotencyKey?: string | undefined;
86
108
  ttl?: string | undefined;
87
- metadata?: Record<string, any> | undefined;
88
109
  batchId?: string | undefined;
89
- version?: string | undefined;
90
- startedAt?: Date | undefined;
91
110
  finishedAt?: Date | undefined;
92
111
  delayedUntil?: Date | undefined;
93
112
  expiredAt?: Date | undefined;
94
113
  } | undefined;
95
114
  parent?: {
115
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
96
116
  id: string;
97
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
117
+ updatedAt: Date;
118
+ isTest: boolean;
119
+ createdAt: Date;
98
120
  tags: string[];
121
+ durationMs: number;
122
+ costInCents: number;
123
+ baseCostInCents: number;
99
124
  taskIdentifier: string;
100
125
  depth: number;
101
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
126
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
102
127
  isQueued: boolean;
103
128
  isExecuting: boolean;
104
129
  isCompleted: boolean;
105
130
  isSuccess: boolean;
106
131
  isFailed: boolean;
107
132
  isCancelled: boolean;
108
- isTest: boolean;
109
- createdAt: Date;
110
- updatedAt: Date;
111
- costInCents: number;
112
- baseCostInCents: number;
113
- durationMs: number;
133
+ version?: string | undefined;
134
+ metadata?: Record<string, any> | undefined;
135
+ startedAt?: Date | undefined;
114
136
  idempotencyKey?: string | undefined;
115
137
  ttl?: string | undefined;
116
- metadata?: Record<string, any> | undefined;
117
138
  batchId?: string | undefined;
118
- version?: string | undefined;
119
- startedAt?: Date | undefined;
120
139
  finishedAt?: Date | undefined;
121
140
  delayedUntil?: Date | undefined;
122
141
  expiredAt?: Date | undefined;
123
142
  } | undefined;
124
143
  children?: {
144
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
125
145
  id: string;
126
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
146
+ updatedAt: Date;
147
+ isTest: boolean;
148
+ createdAt: Date;
127
149
  tags: string[];
150
+ durationMs: number;
151
+ costInCents: number;
152
+ baseCostInCents: number;
128
153
  taskIdentifier: string;
129
154
  depth: number;
130
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
155
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
131
156
  isQueued: boolean;
132
157
  isExecuting: boolean;
133
158
  isCompleted: boolean;
134
159
  isSuccess: boolean;
135
160
  isFailed: boolean;
136
161
  isCancelled: boolean;
137
- isTest: boolean;
138
- createdAt: Date;
139
- updatedAt: Date;
140
- costInCents: number;
141
- baseCostInCents: number;
142
- durationMs: number;
162
+ version?: string | undefined;
163
+ metadata?: Record<string, any> | undefined;
164
+ startedAt?: Date | undefined;
143
165
  idempotencyKey?: string | undefined;
144
166
  ttl?: string | undefined;
145
- metadata?: Record<string, any> | undefined;
146
167
  batchId?: string | undefined;
147
- version?: string | undefined;
148
- startedAt?: Date | undefined;
149
168
  finishedAt?: Date | undefined;
150
169
  delayedUntil?: Date | undefined;
151
170
  expiredAt?: Date | undefined;
152
171
  }[] | undefined;
153
172
  };
154
173
  depth: number;
155
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
174
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
156
175
  isQueued: boolean;
157
176
  isExecuting: boolean;
158
177
  isCompleted: boolean;
159
178
  isSuccess: boolean;
160
179
  isFailed: boolean;
161
180
  isCancelled: boolean;
162
- isTest: boolean;
163
- createdAt: Date;
164
- updatedAt: Date;
165
- costInCents: number;
166
- baseCostInCents: number;
167
- durationMs: number;
168
- attempts: ({
169
- id: string;
170
- status: "EXECUTING" | "COMPLETED" | "CANCELED" | "FAILED" | "PENDING" | "PAUSED";
171
- createdAt: Date;
172
- updatedAt: Date;
173
- error?: {
174
- message: string;
175
- name?: string | undefined;
176
- stackTrace?: string | undefined;
177
- } | undefined;
178
- startedAt?: Date | undefined;
179
- completedAt?: Date | undefined;
180
- } | undefined)[];
181
181
  attemptCount: number;
182
182
  payload?: any;
183
- idempotencyKey?: string | undefined;
184
- ttl?: string | undefined;
183
+ version?: string | undefined;
185
184
  metadata?: Record<string, any> | undefined;
186
- payloadPresignedUrl?: string | undefined;
185
+ startedAt?: Date | undefined;
187
186
  output?: any;
188
- outputPresignedUrl?: string | undefined;
189
187
  error?: {
190
188
  message: string;
191
189
  name?: string | undefined;
192
190
  stackTrace?: string | undefined;
193
191
  } | undefined;
192
+ idempotencyKey?: string | undefined;
194
193
  schedule?: {
195
194
  id: string;
196
195
  generator: {
197
196
  type: "CRON";
198
- expression: string;
199
197
  description: string;
198
+ expression: string;
200
199
  };
201
200
  externalId?: string | undefined;
202
201
  deduplicationKey?: string | undefined;
203
202
  } | undefined;
203
+ ttl?: string | undefined;
204
+ payloadPresignedUrl?: string | undefined;
205
+ outputPresignedUrl?: string | undefined;
204
206
  batchId?: string | undefined;
205
- version?: string | undefined;
206
- startedAt?: Date | undefined;
207
207
  finishedAt?: Date | undefined;
208
208
  delayedUntil?: Date | undefined;
209
209
  expiredAt?: Date | undefined;
@@ -217,152 +217,152 @@ export declare class ApiClient {
217
217
  id: string;
218
218
  }>;
219
219
  rescheduleRun(runId: string, body: RescheduleRunRequestBody, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
220
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
220
221
  id: string;
221
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
222
+ attempts: ({
223
+ status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
224
+ id: string;
225
+ updatedAt: Date;
226
+ createdAt: Date;
227
+ startedAt?: Date | undefined;
228
+ completedAt?: Date | undefined;
229
+ error?: {
230
+ message: string;
231
+ name?: string | undefined;
232
+ stackTrace?: string | undefined;
233
+ } | undefined;
234
+ } | undefined)[];
235
+ updatedAt: Date;
236
+ isTest: boolean;
237
+ createdAt: Date;
222
238
  tags: string[];
239
+ durationMs: number;
240
+ costInCents: number;
241
+ baseCostInCents: number;
223
242
  taskIdentifier: string;
224
243
  relatedRuns: {
225
244
  root?: {
245
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
226
246
  id: string;
227
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
247
+ updatedAt: Date;
248
+ isTest: boolean;
249
+ createdAt: Date;
228
250
  tags: string[];
251
+ durationMs: number;
252
+ costInCents: number;
253
+ baseCostInCents: number;
229
254
  taskIdentifier: string;
230
255
  depth: number;
231
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
256
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
232
257
  isQueued: boolean;
233
258
  isExecuting: boolean;
234
259
  isCompleted: boolean;
235
260
  isSuccess: boolean;
236
261
  isFailed: boolean;
237
262
  isCancelled: boolean;
238
- isTest: boolean;
239
- createdAt: Date;
240
- updatedAt: Date;
241
- costInCents: number;
242
- baseCostInCents: number;
243
- durationMs: number;
263
+ version?: string | undefined;
264
+ metadata?: Record<string, any> | undefined;
265
+ startedAt?: Date | undefined;
244
266
  idempotencyKey?: string | undefined;
245
267
  ttl?: string | undefined;
246
- metadata?: Record<string, any> | undefined;
247
268
  batchId?: string | undefined;
248
- version?: string | undefined;
249
- startedAt?: Date | undefined;
250
269
  finishedAt?: Date | undefined;
251
270
  delayedUntil?: Date | undefined;
252
271
  expiredAt?: Date | undefined;
253
272
  } | undefined;
254
273
  parent?: {
274
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
255
275
  id: string;
256
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
276
+ updatedAt: Date;
277
+ isTest: boolean;
278
+ createdAt: Date;
257
279
  tags: string[];
280
+ durationMs: number;
281
+ costInCents: number;
282
+ baseCostInCents: number;
258
283
  taskIdentifier: string;
259
284
  depth: number;
260
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
285
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
261
286
  isQueued: boolean;
262
287
  isExecuting: boolean;
263
288
  isCompleted: boolean;
264
289
  isSuccess: boolean;
265
290
  isFailed: boolean;
266
291
  isCancelled: boolean;
267
- isTest: boolean;
268
- createdAt: Date;
269
- updatedAt: Date;
270
- costInCents: number;
271
- baseCostInCents: number;
272
- durationMs: number;
292
+ version?: string | undefined;
293
+ metadata?: Record<string, any> | undefined;
294
+ startedAt?: Date | undefined;
273
295
  idempotencyKey?: string | undefined;
274
296
  ttl?: string | undefined;
275
- metadata?: Record<string, any> | undefined;
276
297
  batchId?: string | undefined;
277
- version?: string | undefined;
278
- startedAt?: Date | undefined;
279
298
  finishedAt?: Date | undefined;
280
299
  delayedUntil?: Date | undefined;
281
300
  expiredAt?: Date | undefined;
282
301
  } | undefined;
283
302
  children?: {
303
+ status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
284
304
  id: string;
285
- status: "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "COMPLETED" | "CANCELED" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED" | "TIMED_OUT";
305
+ updatedAt: Date;
306
+ isTest: boolean;
307
+ createdAt: Date;
286
308
  tags: string[];
309
+ durationMs: number;
310
+ costInCents: number;
311
+ baseCostInCents: number;
287
312
  taskIdentifier: string;
288
313
  depth: number;
289
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
314
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
290
315
  isQueued: boolean;
291
316
  isExecuting: boolean;
292
317
  isCompleted: boolean;
293
318
  isSuccess: boolean;
294
319
  isFailed: boolean;
295
320
  isCancelled: boolean;
296
- isTest: boolean;
297
- createdAt: Date;
298
- updatedAt: Date;
299
- costInCents: number;
300
- baseCostInCents: number;
301
- durationMs: number;
321
+ version?: string | undefined;
322
+ metadata?: Record<string, any> | undefined;
323
+ startedAt?: Date | undefined;
302
324
  idempotencyKey?: string | undefined;
303
325
  ttl?: string | undefined;
304
- metadata?: Record<string, any> | undefined;
305
326
  batchId?: string | undefined;
306
- version?: string | undefined;
307
- startedAt?: Date | undefined;
308
327
  finishedAt?: Date | undefined;
309
328
  delayedUntil?: Date | undefined;
310
329
  expiredAt?: Date | undefined;
311
330
  }[] | undefined;
312
331
  };
313
332
  depth: number;
314
- triggerFunction: "triggerAndWait" | "trigger" | "batchTriggerAndWait" | "batchTrigger";
333
+ triggerFunction: "trigger" | "batchTrigger" | "triggerAndWait" | "batchTriggerAndWait";
315
334
  isQueued: boolean;
316
335
  isExecuting: boolean;
317
336
  isCompleted: boolean;
318
337
  isSuccess: boolean;
319
338
  isFailed: boolean;
320
339
  isCancelled: boolean;
321
- isTest: boolean;
322
- createdAt: Date;
323
- updatedAt: Date;
324
- costInCents: number;
325
- baseCostInCents: number;
326
- durationMs: number;
327
- attempts: ({
328
- id: string;
329
- status: "EXECUTING" | "COMPLETED" | "CANCELED" | "FAILED" | "PENDING" | "PAUSED";
330
- createdAt: Date;
331
- updatedAt: Date;
332
- error?: {
333
- message: string;
334
- name?: string | undefined;
335
- stackTrace?: string | undefined;
336
- } | undefined;
337
- startedAt?: Date | undefined;
338
- completedAt?: Date | undefined;
339
- } | undefined)[];
340
340
  attemptCount: number;
341
341
  payload?: any;
342
- idempotencyKey?: string | undefined;
343
- ttl?: string | undefined;
342
+ version?: string | undefined;
344
343
  metadata?: Record<string, any> | undefined;
345
- payloadPresignedUrl?: string | undefined;
344
+ startedAt?: Date | undefined;
346
345
  output?: any;
347
- outputPresignedUrl?: string | undefined;
348
346
  error?: {
349
347
  message: string;
350
348
  name?: string | undefined;
351
349
  stackTrace?: string | undefined;
352
350
  } | undefined;
351
+ idempotencyKey?: string | undefined;
353
352
  schedule?: {
354
353
  id: string;
355
354
  generator: {
356
355
  type: "CRON";
357
- expression: string;
358
356
  description: string;
357
+ expression: string;
359
358
  };
360
359
  externalId?: string | undefined;
361
360
  deduplicationKey?: string | undefined;
362
361
  } | undefined;
362
+ ttl?: string | undefined;
363
+ payloadPresignedUrl?: string | undefined;
364
+ outputPresignedUrl?: string | undefined;
363
365
  batchId?: string | undefined;
364
- version?: string | undefined;
365
- startedAt?: Date | undefined;
366
366
  finishedAt?: Date | undefined;
367
367
  delayedUntil?: Date | undefined;
368
368
  expiredAt?: Date | undefined;
@@ -371,19 +371,19 @@ export declare class ApiClient {
371
371
  message: string;
372
372
  }>;
373
373
  createSchedule(options: CreateScheduleOptions, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
374
- id: string;
375
374
  type: "DECLARATIVE" | "IMPERATIVE";
375
+ id: string;
376
+ active: boolean;
376
377
  task: string;
378
+ timezone: string;
377
379
  generator: {
378
380
  type: "CRON";
379
- expression: string;
380
381
  description: string;
382
+ expression: string;
381
383
  };
382
- active: boolean;
383
- timezone: string;
384
384
  environments: {
385
- id: string;
386
385
  type: string;
386
+ id: string;
387
387
  userName?: string | null | undefined;
388
388
  }[];
389
389
  externalId?: string | null | undefined;
@@ -403,12 +403,12 @@ export declare class ApiClient {
403
403
  description: z.ZodString;
404
404
  }, "strip", z.ZodTypeAny, {
405
405
  type: "CRON";
406
- expression: string;
407
406
  description: string;
407
+ expression: string;
408
408
  }, {
409
409
  type: "CRON";
410
- expression: string;
411
410
  description: string;
411
+ expression: string;
412
412
  }>;
413
413
  timezone: z.ZodString;
414
414
  nextRun: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
@@ -417,47 +417,47 @@ export declare class ApiClient {
417
417
  type: z.ZodString;
418
418
  userName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
419
419
  }, "strip", z.ZodTypeAny, {
420
- id: string;
421
420
  type: string;
421
+ id: string;
422
422
  userName?: string | null | undefined;
423
423
  }, {
424
- id: string;
425
424
  type: string;
425
+ id: string;
426
426
  userName?: string | null | undefined;
427
427
  }>, "many">;
428
428
  }, "strip", z.ZodTypeAny, {
429
- id: string;
430
429
  type: "DECLARATIVE" | "IMPERATIVE";
430
+ id: string;
431
+ active: boolean;
431
432
  task: string;
433
+ timezone: string;
432
434
  generator: {
433
435
  type: "CRON";
434
- expression: string;
435
436
  description: string;
437
+ expression: string;
436
438
  };
437
- active: boolean;
438
- timezone: string;
439
439
  environments: {
440
- id: string;
441
440
  type: string;
441
+ id: string;
442
442
  userName?: string | null | undefined;
443
443
  }[];
444
444
  externalId?: string | null | undefined;
445
445
  deduplicationKey?: string | null | undefined;
446
446
  nextRun?: Date | null | undefined;
447
447
  }, {
448
- id: string;
449
448
  type: "DECLARATIVE" | "IMPERATIVE";
449
+ id: string;
450
+ active: boolean;
450
451
  task: string;
452
+ timezone: string;
451
453
  generator: {
452
454
  type: "CRON";
453
- expression: string;
454
455
  description: string;
456
+ expression: string;
455
457
  };
456
- active: boolean;
457
- timezone: string;
458
458
  environments: {
459
- id: string;
460
459
  type: string;
460
+ id: string;
461
461
  userName?: string | null | undefined;
462
462
  }[];
463
463
  externalId?: string | null | undefined;
@@ -465,19 +465,19 @@ export declare class ApiClient {
465
465
  nextRun?: Date | null | undefined;
466
466
  }>>;
467
467
  retrieveSchedule(scheduleId: string, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
468
- id: string;
469
468
  type: "DECLARATIVE" | "IMPERATIVE";
469
+ id: string;
470
+ active: boolean;
470
471
  task: string;
472
+ timezone: string;
471
473
  generator: {
472
474
  type: "CRON";
473
- expression: string;
474
475
  description: string;
476
+ expression: string;
475
477
  };
476
- active: boolean;
477
- timezone: string;
478
478
  environments: {
479
- id: string;
480
479
  type: string;
480
+ id: string;
481
481
  userName?: string | null | undefined;
482
482
  }[];
483
483
  externalId?: string | null | undefined;
@@ -485,19 +485,19 @@ export declare class ApiClient {
485
485
  nextRun?: Date | null | undefined;
486
486
  }>;
487
487
  updateSchedule(scheduleId: string, options: UpdateScheduleOptions, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
488
- id: string;
489
488
  type: "DECLARATIVE" | "IMPERATIVE";
489
+ id: string;
490
+ active: boolean;
490
491
  task: string;
492
+ timezone: string;
491
493
  generator: {
492
494
  type: "CRON";
493
- expression: string;
494
495
  description: string;
496
+ expression: string;
495
497
  };
496
- active: boolean;
497
- timezone: string;
498
498
  environments: {
499
- id: string;
500
499
  type: string;
500
+ id: string;
501
501
  userName?: string | null | undefined;
502
502
  }[];
503
503
  externalId?: string | null | undefined;
@@ -505,19 +505,19 @@ export declare class ApiClient {
505
505
  nextRun?: Date | null | undefined;
506
506
  }>;
507
507
  deactivateSchedule(scheduleId: string, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
508
- id: string;
509
508
  type: "DECLARATIVE" | "IMPERATIVE";
509
+ id: string;
510
+ active: boolean;
510
511
  task: string;
512
+ timezone: string;
511
513
  generator: {
512
514
  type: "CRON";
513
- expression: string;
514
515
  description: string;
516
+ expression: string;
515
517
  };
516
- active: boolean;
517
- timezone: string;
518
518
  environments: {
519
- id: string;
520
519
  type: string;
520
+ id: string;
521
521
  userName?: string | null | undefined;
522
522
  }[];
523
523
  externalId?: string | null | undefined;
@@ -525,19 +525,19 @@ export declare class ApiClient {
525
525
  nextRun?: Date | null | undefined;
526
526
  }>;
527
527
  activateSchedule(scheduleId: string, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
528
- id: string;
529
528
  type: "DECLARATIVE" | "IMPERATIVE";
529
+ id: string;
530
+ active: boolean;
530
531
  task: string;
532
+ timezone: string;
531
533
  generator: {
532
534
  type: "CRON";
533
- expression: string;
534
535
  description: string;
536
+ expression: string;
535
537
  };
536
- active: boolean;
537
- timezone: string;
538
538
  environments: {
539
- id: string;
540
539
  type: string;
540
+ id: string;
541
541
  userName?: string | null | undefined;
542
542
  }[];
543
543
  externalId?: string | null | undefined;
@@ -582,12 +582,16 @@ export declare class ApiClient {
582
582
  subscribeToBatch<TRunTypes extends AnyRunTypes>(batchId: string, options?: {
583
583
  signal?: AbortSignal;
584
584
  }): RunSubscription<TRunTypes>;
585
+ fetchStream<T>(runId: string, streamKey: string, options?: {
586
+ signal?: AbortSignal;
587
+ baseUrl?: string;
588
+ }): Promise<AsyncIterableStream<T>>;
585
589
  generateJWTClaims(requestOptions?: ZodFetchOptions): Promise<Record<string, any>>;
586
590
  retrieveBatch(batchId: string, requestOptions?: ZodFetchOptions): import("./core.js").ApiPromise<{
591
+ status: "PENDING" | "COMPLETED";
587
592
  id: string;
588
- status: "COMPLETED" | "PENDING";
589
- createdAt: Date;
590
593
  updatedAt: Date;
594
+ createdAt: Date;
591
595
  runCount: number;
592
596
  idempotencyKey?: string | undefined;
593
597
  }>;
@@ -335,6 +335,15 @@ class ApiClient {
335
335
  signal: options?.signal,
336
336
  });
337
337
  }
338
+ async fetchStream(runId, streamKey, options) {
339
+ const streamFactory = new runStream_js_1.SSEStreamSubscriptionFactory(options?.baseUrl ?? this.baseUrl, {
340
+ headers: this.getHeaders(),
341
+ signal: options?.signal,
342
+ });
343
+ const subscription = streamFactory.createSubscription(runId, streamKey);
344
+ const stream = await subscription.subscribe();
345
+ return stream;
346
+ }
338
347
  async generateJWTClaims(requestOptions) {
339
348
  return (0, core_js_1.zodfetch)(zod_1.z.record(zod_1.z.any()), `${this.baseUrl}/api/v1/auth/jwt/claims`, {
340
349
  method: "POST",