@trigger.dev/sdk 3.0.13 → 3.1.1
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.
- package/dist/commonjs/v3/auth.d.ts +104 -0
- package/dist/commonjs/v3/auth.js +99 -0
- package/dist/commonjs/v3/auth.js.map +1 -0
- package/dist/commonjs/v3/idempotencyKeys.d.ts +2 -7
- package/dist/commonjs/v3/idempotencyKeys.js.map +1 -1
- package/dist/commonjs/v3/index.d.ts +2 -19
- package/dist/commonjs/v3/index.js +16 -35
- package/dist/commonjs/v3/index.js.map +1 -1
- package/dist/commonjs/v3/metadata.d.ts +20 -12
- package/dist/commonjs/v3/metadata.js +28 -53
- package/dist/commonjs/v3/metadata.js.map +1 -1
- package/dist/commonjs/v3/runs.d.ts +36 -759
- package/dist/commonjs/v3/runs.js +12 -1
- package/dist/commonjs/v3/runs.js.map +1 -1
- package/dist/commonjs/v3/shared.d.ts +9 -380
- package/dist/commonjs/v3/shared.js +99 -54
- package/dist/commonjs/v3/shared.js.map +1 -1
- package/dist/commonjs/v3/tasks.d.ts +5 -5
- package/dist/commonjs/v3/tasks.js +3 -5
- package/dist/commonjs/v3/tasks.js.map +1 -1
- package/dist/commonjs/v3/tracer.d.ts +1 -1
- package/dist/commonjs/v3/tracer.js +2 -2
- package/dist/commonjs/v3/tracer.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/v3/auth.d.ts +104 -0
- package/dist/esm/v3/auth.js +95 -0
- package/dist/esm/v3/auth.js.map +1 -0
- package/dist/esm/v3/idempotencyKeys.d.ts +2 -7
- package/dist/esm/v3/idempotencyKeys.js.map +1 -1
- package/dist/esm/v3/index-browser.d.mts +2 -0
- package/dist/esm/v3/index-browser.mjs +3 -0
- package/dist/esm/v3/index-browser.mjs.map +1 -0
- package/dist/esm/v3/index.d.ts +2 -19
- package/dist/esm/v3/index.js +2 -22
- package/dist/esm/v3/index.js.map +1 -1
- package/dist/esm/v3/metadata.d.ts +20 -12
- package/dist/esm/v3/metadata.js +29 -54
- package/dist/esm/v3/metadata.js.map +1 -1
- package/dist/esm/v3/runs.d.ts +34 -757
- package/dist/esm/v3/runs.js +12 -1
- package/dist/esm/v3/runs.js.map +1 -1
- package/dist/esm/v3/shared.d.ts +9 -380
- package/dist/esm/v3/shared.js +96 -51
- package/dist/esm/v3/shared.js.map +1 -1
- package/dist/esm/v3/tasks.d.ts +5 -5
- package/dist/esm/v3/tasks.js +3 -4
- package/dist/esm/v3/tasks.js.map +1 -1
- package/dist/esm/v3/tracer.d.ts +1 -1
- package/dist/esm/v3/tracer.js +1 -1
- package/dist/esm/v3/tracer.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import type { ApiRequestOptions, ListProjectRunsQueryParams, ListRunsQueryParams, RescheduleRunRequestBody } from "@trigger.dev/core/v3";
|
|
1
|
+
import type { AnyRetrieveRunResult, AnyRunShape, ApiRequestOptions, InferRunTypes, ListProjectRunsQueryParams, ListRunsQueryParams, RescheduleRunRequestBody, RetrieveRunResult, RunShape, RunSubscription, TaskRunShape } from "@trigger.dev/core/v3";
|
|
2
2
|
import { ApiPromise, CanceledRunResponse, CursorPagePromise, ListRunResponseItem, ReplayRunResponse, RetrieveRunResponse } from "@trigger.dev/core/v3";
|
|
3
|
-
import {
|
|
4
|
-
export type
|
|
5
|
-
output?: TOutput;
|
|
6
|
-
} : TRunId extends Task<string, any, infer TTaskOutput> ? Omit<RetrieveRunResponse, "output"> & {
|
|
7
|
-
output?: TTaskOutput;
|
|
8
|
-
} : TRunId extends string ? RetrieveRunResponse : never>;
|
|
3
|
+
import { AnyRunHandle, AnyTask } from "./shared.js";
|
|
4
|
+
export type { AnyRetrieveRunResult, AnyRunShape, RetrieveRunResult, RunShape, TaskRunShape };
|
|
9
5
|
export declare const runs: {
|
|
10
6
|
replay: typeof replayRun;
|
|
11
7
|
cancel: typeof cancelRun;
|
|
@@ -13,581 +9,37 @@ export declare const runs: {
|
|
|
13
9
|
list: typeof listRuns;
|
|
14
10
|
reschedule: typeof rescheduleRun;
|
|
15
11
|
poll: typeof poll;
|
|
12
|
+
subscribeToRun: typeof subscribeToRun;
|
|
13
|
+
subscribeToRunsWithTag: typeof subscribeToRunsWithTag;
|
|
16
14
|
};
|
|
17
15
|
export type ListRunsItem = ListRunResponseItem;
|
|
18
16
|
declare function listRuns(projectRef: string, params?: ListProjectRunsQueryParams, requestOptions?: ApiRequestOptions): CursorPagePromise<typeof ListRunResponseItem>;
|
|
19
17
|
declare function listRuns(params?: ListRunsQueryParams, requestOptions?: ApiRequestOptions): CursorPagePromise<typeof ListRunResponseItem>;
|
|
20
|
-
type RunId<TRunId> = TRunId extends
|
|
21
|
-
declare function retrieveRun<TRunId extends
|
|
18
|
+
type RunId<TRunId> = TRunId extends AnyRunHandle ? TRunId : TRunId extends AnyTask ? string : TRunId extends string ? TRunId : never;
|
|
19
|
+
declare function retrieveRun<TRunId extends AnyRunHandle | AnyTask | string>(runId: RunId<TRunId>, requestOptions?: ApiRequestOptions): ApiPromise<RetrieveRunResult<TRunId>>;
|
|
22
20
|
declare function replayRun(runId: string, requestOptions?: ApiRequestOptions): ApiPromise<ReplayRunResponse>;
|
|
23
21
|
declare function cancelRun(runId: string, requestOptions?: ApiRequestOptions): ApiPromise<CanceledRunResponse>;
|
|
24
22
|
declare function rescheduleRun(runId: string, body: RescheduleRunRequestBody, requestOptions?: ApiRequestOptions): ApiPromise<RetrieveRunResponse>;
|
|
25
23
|
export type PollOptions = {
|
|
26
24
|
pollIntervalMs?: number;
|
|
27
25
|
};
|
|
28
|
-
declare function poll<TRunId extends
|
|
26
|
+
declare function poll<TRunId extends AnyRunHandle | AnyTask | string>(runId: RunId<TRunId>, options?: {
|
|
29
27
|
pollIntervalMs?: number;
|
|
30
|
-
}, requestOptions?: ApiRequestOptions): Promise<
|
|
31
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "
|
|
28
|
+
}, requestOptions?: ApiRequestOptions): Promise<{
|
|
29
|
+
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
32
30
|
id: string;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} | undefined)[];
|
|
46
|
-
updatedAt: Date;
|
|
47
|
-
isTest: boolean;
|
|
48
|
-
createdAt: Date;
|
|
49
|
-
tags: string[];
|
|
50
|
-
durationMs: number;
|
|
51
|
-
costInCents: number;
|
|
52
|
-
baseCostInCents: number;
|
|
53
|
-
depth: number;
|
|
54
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
55
|
-
taskIdentifier: string;
|
|
56
|
-
isQueued: boolean;
|
|
57
|
-
isExecuting: boolean;
|
|
58
|
-
isCompleted: boolean;
|
|
59
|
-
isSuccess: boolean;
|
|
60
|
-
isFailed: boolean;
|
|
61
|
-
isCancelled: boolean;
|
|
62
|
-
relatedRuns: {
|
|
63
|
-
root?: {
|
|
64
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
65
|
-
id: string;
|
|
66
|
-
updatedAt: Date;
|
|
67
|
-
isTest: boolean;
|
|
68
|
-
createdAt: Date;
|
|
69
|
-
tags: string[];
|
|
70
|
-
durationMs: number;
|
|
71
|
-
costInCents: number;
|
|
72
|
-
baseCostInCents: number;
|
|
73
|
-
depth: number;
|
|
74
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
75
|
-
taskIdentifier: string;
|
|
76
|
-
isQueued: boolean;
|
|
77
|
-
isExecuting: boolean;
|
|
78
|
-
isCompleted: boolean;
|
|
79
|
-
isSuccess: boolean;
|
|
80
|
-
isFailed: boolean;
|
|
81
|
-
isCancelled: boolean;
|
|
82
|
-
batchId?: string | undefined;
|
|
83
|
-
idempotencyKey?: string | undefined;
|
|
84
|
-
version?: string | undefined;
|
|
85
|
-
startedAt?: Date | undefined;
|
|
86
|
-
finishedAt?: Date | undefined;
|
|
87
|
-
delayedUntil?: Date | undefined;
|
|
88
|
-
ttl?: string | undefined;
|
|
89
|
-
expiredAt?: Date | undefined;
|
|
90
|
-
metadata?: Record<string, any> | undefined;
|
|
91
|
-
} | undefined;
|
|
92
|
-
parent?: {
|
|
93
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
94
|
-
id: string;
|
|
95
|
-
updatedAt: Date;
|
|
96
|
-
isTest: boolean;
|
|
97
|
-
createdAt: Date;
|
|
98
|
-
tags: string[];
|
|
99
|
-
durationMs: number;
|
|
100
|
-
costInCents: number;
|
|
101
|
-
baseCostInCents: number;
|
|
102
|
-
depth: number;
|
|
103
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
104
|
-
taskIdentifier: string;
|
|
105
|
-
isQueued: boolean;
|
|
106
|
-
isExecuting: boolean;
|
|
107
|
-
isCompleted: boolean;
|
|
108
|
-
isSuccess: boolean;
|
|
109
|
-
isFailed: boolean;
|
|
110
|
-
isCancelled: boolean;
|
|
111
|
-
batchId?: string | undefined;
|
|
112
|
-
idempotencyKey?: string | undefined;
|
|
113
|
-
version?: string | undefined;
|
|
114
|
-
startedAt?: Date | undefined;
|
|
115
|
-
finishedAt?: Date | undefined;
|
|
116
|
-
delayedUntil?: Date | undefined;
|
|
117
|
-
ttl?: string | undefined;
|
|
118
|
-
expiredAt?: Date | undefined;
|
|
119
|
-
metadata?: Record<string, any> | undefined;
|
|
120
|
-
} | undefined;
|
|
121
|
-
children?: {
|
|
122
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
123
|
-
id: string;
|
|
124
|
-
updatedAt: Date;
|
|
125
|
-
isTest: boolean;
|
|
126
|
-
createdAt: Date;
|
|
127
|
-
tags: string[];
|
|
128
|
-
durationMs: number;
|
|
129
|
-
costInCents: number;
|
|
130
|
-
baseCostInCents: number;
|
|
131
|
-
depth: number;
|
|
132
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
133
|
-
taskIdentifier: string;
|
|
134
|
-
isQueued: boolean;
|
|
135
|
-
isExecuting: boolean;
|
|
136
|
-
isCompleted: boolean;
|
|
137
|
-
isSuccess: boolean;
|
|
138
|
-
isFailed: boolean;
|
|
139
|
-
isCancelled: boolean;
|
|
140
|
-
batchId?: string | undefined;
|
|
141
|
-
idempotencyKey?: string | undefined;
|
|
142
|
-
version?: string | undefined;
|
|
143
|
-
startedAt?: Date | undefined;
|
|
144
|
-
finishedAt?: Date | undefined;
|
|
145
|
-
delayedUntil?: Date | undefined;
|
|
146
|
-
ttl?: string | undefined;
|
|
147
|
-
expiredAt?: Date | undefined;
|
|
148
|
-
metadata?: Record<string, any> | undefined;
|
|
149
|
-
}[] | undefined;
|
|
150
|
-
};
|
|
151
|
-
payload?: any;
|
|
152
|
-
payloadPresignedUrl?: string | undefined;
|
|
153
|
-
output?: any;
|
|
154
|
-
outputPresignedUrl?: string | undefined;
|
|
155
|
-
schedule?: {
|
|
156
|
-
id: string;
|
|
157
|
-
generator: {
|
|
158
|
-
type: "CRON";
|
|
159
|
-
description: string;
|
|
160
|
-
expression: string;
|
|
161
|
-
};
|
|
162
|
-
externalId?: string | undefined;
|
|
163
|
-
deduplicationKey?: string | undefined;
|
|
164
|
-
} | undefined;
|
|
165
|
-
batchId?: string | undefined;
|
|
166
|
-
idempotencyKey?: string | undefined;
|
|
167
|
-
version?: string | undefined;
|
|
168
|
-
startedAt?: Date | undefined;
|
|
169
|
-
finishedAt?: Date | undefined;
|
|
170
|
-
delayedUntil?: Date | undefined;
|
|
171
|
-
ttl?: string | undefined;
|
|
172
|
-
expiredAt?: Date | undefined;
|
|
173
|
-
metadata?: Record<string, any> | undefined;
|
|
174
|
-
}, "output"> & {
|
|
175
|
-
output?: TOutput;
|
|
176
|
-
} : TRunId extends Task<string, any, infer TTaskOutput> ? Omit<{
|
|
177
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
178
|
-
id: string;
|
|
179
|
-
attempts: ({
|
|
180
|
-
status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
|
|
181
|
-
id: string;
|
|
182
|
-
updatedAt: Date;
|
|
183
|
-
createdAt: Date;
|
|
184
|
-
startedAt?: Date | undefined;
|
|
185
|
-
completedAt?: Date | undefined;
|
|
186
|
-
error?: {
|
|
187
|
-
message: string;
|
|
188
|
-
name?: string | undefined;
|
|
189
|
-
stackTrace?: string | undefined;
|
|
190
|
-
} | undefined;
|
|
191
|
-
} | undefined)[];
|
|
192
|
-
updatedAt: Date;
|
|
193
|
-
isTest: boolean;
|
|
194
|
-
createdAt: Date;
|
|
195
|
-
tags: string[];
|
|
196
|
-
durationMs: number;
|
|
197
|
-
costInCents: number;
|
|
198
|
-
baseCostInCents: number;
|
|
199
|
-
depth: number;
|
|
200
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
201
|
-
taskIdentifier: string;
|
|
202
|
-
isQueued: boolean;
|
|
203
|
-
isExecuting: boolean;
|
|
204
|
-
isCompleted: boolean;
|
|
205
|
-
isSuccess: boolean;
|
|
206
|
-
isFailed: boolean;
|
|
207
|
-
isCancelled: boolean;
|
|
208
|
-
relatedRuns: {
|
|
209
|
-
root?: {
|
|
210
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
211
|
-
id: string;
|
|
212
|
-
updatedAt: Date;
|
|
213
|
-
isTest: boolean;
|
|
214
|
-
createdAt: Date;
|
|
215
|
-
tags: string[];
|
|
216
|
-
durationMs: number;
|
|
217
|
-
costInCents: number;
|
|
218
|
-
baseCostInCents: number;
|
|
219
|
-
depth: number;
|
|
220
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
221
|
-
taskIdentifier: string;
|
|
222
|
-
isQueued: boolean;
|
|
223
|
-
isExecuting: boolean;
|
|
224
|
-
isCompleted: boolean;
|
|
225
|
-
isSuccess: boolean;
|
|
226
|
-
isFailed: boolean;
|
|
227
|
-
isCancelled: boolean;
|
|
228
|
-
batchId?: string | undefined;
|
|
229
|
-
idempotencyKey?: string | undefined;
|
|
230
|
-
version?: string | undefined;
|
|
231
|
-
startedAt?: Date | undefined;
|
|
232
|
-
finishedAt?: Date | undefined;
|
|
233
|
-
delayedUntil?: Date | undefined;
|
|
234
|
-
ttl?: string | undefined;
|
|
235
|
-
expiredAt?: Date | undefined;
|
|
236
|
-
metadata?: Record<string, any> | undefined;
|
|
237
|
-
} | undefined;
|
|
238
|
-
parent?: {
|
|
239
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
240
|
-
id: string;
|
|
241
|
-
updatedAt: Date;
|
|
242
|
-
isTest: boolean;
|
|
243
|
-
createdAt: Date;
|
|
244
|
-
tags: string[];
|
|
245
|
-
durationMs: number;
|
|
246
|
-
costInCents: number;
|
|
247
|
-
baseCostInCents: number;
|
|
248
|
-
depth: number;
|
|
249
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
250
|
-
taskIdentifier: string;
|
|
251
|
-
isQueued: boolean;
|
|
252
|
-
isExecuting: boolean;
|
|
253
|
-
isCompleted: boolean;
|
|
254
|
-
isSuccess: boolean;
|
|
255
|
-
isFailed: boolean;
|
|
256
|
-
isCancelled: boolean;
|
|
257
|
-
batchId?: string | undefined;
|
|
258
|
-
idempotencyKey?: string | undefined;
|
|
259
|
-
version?: string | undefined;
|
|
260
|
-
startedAt?: Date | undefined;
|
|
261
|
-
finishedAt?: Date | undefined;
|
|
262
|
-
delayedUntil?: Date | undefined;
|
|
263
|
-
ttl?: string | undefined;
|
|
264
|
-
expiredAt?: Date | undefined;
|
|
265
|
-
metadata?: Record<string, any> | undefined;
|
|
266
|
-
} | undefined;
|
|
267
|
-
children?: {
|
|
268
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
269
|
-
id: string;
|
|
270
|
-
updatedAt: Date;
|
|
271
|
-
isTest: boolean;
|
|
272
|
-
createdAt: Date;
|
|
273
|
-
tags: string[];
|
|
274
|
-
durationMs: number;
|
|
275
|
-
costInCents: number;
|
|
276
|
-
baseCostInCents: number;
|
|
277
|
-
depth: number;
|
|
278
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
279
|
-
taskIdentifier: string;
|
|
280
|
-
isQueued: boolean;
|
|
281
|
-
isExecuting: boolean;
|
|
282
|
-
isCompleted: boolean;
|
|
283
|
-
isSuccess: boolean;
|
|
284
|
-
isFailed: boolean;
|
|
285
|
-
isCancelled: boolean;
|
|
286
|
-
batchId?: string | undefined;
|
|
287
|
-
idempotencyKey?: string | undefined;
|
|
288
|
-
version?: string | undefined;
|
|
289
|
-
startedAt?: Date | undefined;
|
|
290
|
-
finishedAt?: Date | undefined;
|
|
291
|
-
delayedUntil?: Date | undefined;
|
|
292
|
-
ttl?: string | undefined;
|
|
293
|
-
expiredAt?: Date | undefined;
|
|
294
|
-
metadata?: Record<string, any> | undefined;
|
|
295
|
-
}[] | undefined;
|
|
296
|
-
};
|
|
297
|
-
payload?: any;
|
|
298
|
-
payloadPresignedUrl?: string | undefined;
|
|
299
|
-
output?: any;
|
|
300
|
-
outputPresignedUrl?: string | undefined;
|
|
301
|
-
schedule?: {
|
|
302
|
-
id: string;
|
|
303
|
-
generator: {
|
|
304
|
-
type: "CRON";
|
|
305
|
-
description: string;
|
|
306
|
-
expression: string;
|
|
307
|
-
};
|
|
308
|
-
externalId?: string | undefined;
|
|
309
|
-
deduplicationKey?: string | undefined;
|
|
310
|
-
} | undefined;
|
|
311
|
-
batchId?: string | undefined;
|
|
312
|
-
idempotencyKey?: string | undefined;
|
|
313
|
-
version?: string | undefined;
|
|
314
|
-
startedAt?: Date | undefined;
|
|
315
|
-
finishedAt?: Date | undefined;
|
|
316
|
-
delayedUntil?: Date | undefined;
|
|
317
|
-
ttl?: string | undefined;
|
|
318
|
-
expiredAt?: Date | undefined;
|
|
319
|
-
metadata?: Record<string, any> | undefined;
|
|
320
|
-
}, "output"> & {
|
|
321
|
-
output?: TTaskOutput;
|
|
322
|
-
} : TRunId extends string ? {
|
|
323
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
324
|
-
id: string;
|
|
325
|
-
attempts: ({
|
|
326
|
-
status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
|
|
327
|
-
id: string;
|
|
328
|
-
updatedAt: Date;
|
|
329
|
-
createdAt: Date;
|
|
330
|
-
startedAt?: Date | undefined;
|
|
331
|
-
completedAt?: Date | undefined;
|
|
332
|
-
error?: {
|
|
333
|
-
message: string;
|
|
334
|
-
name?: string | undefined;
|
|
335
|
-
stackTrace?: string | undefined;
|
|
336
|
-
} | undefined;
|
|
337
|
-
} | undefined)[];
|
|
338
|
-
updatedAt: Date;
|
|
339
|
-
isTest: boolean;
|
|
340
|
-
createdAt: Date;
|
|
341
|
-
tags: string[];
|
|
342
|
-
durationMs: number;
|
|
343
|
-
costInCents: number;
|
|
344
|
-
baseCostInCents: number;
|
|
345
|
-
depth: number;
|
|
346
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
347
|
-
taskIdentifier: string;
|
|
348
|
-
isQueued: boolean;
|
|
349
|
-
isExecuting: boolean;
|
|
350
|
-
isCompleted: boolean;
|
|
351
|
-
isSuccess: boolean;
|
|
352
|
-
isFailed: boolean;
|
|
353
|
-
isCancelled: boolean;
|
|
354
|
-
relatedRuns: {
|
|
355
|
-
root?: {
|
|
356
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
357
|
-
id: string;
|
|
358
|
-
updatedAt: Date;
|
|
359
|
-
isTest: boolean;
|
|
360
|
-
createdAt: Date;
|
|
361
|
-
tags: string[];
|
|
362
|
-
durationMs: number;
|
|
363
|
-
costInCents: number;
|
|
364
|
-
baseCostInCents: number;
|
|
365
|
-
depth: number;
|
|
366
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
367
|
-
taskIdentifier: string;
|
|
368
|
-
isQueued: boolean;
|
|
369
|
-
isExecuting: boolean;
|
|
370
|
-
isCompleted: boolean;
|
|
371
|
-
isSuccess: boolean;
|
|
372
|
-
isFailed: boolean;
|
|
373
|
-
isCancelled: boolean;
|
|
374
|
-
batchId?: string | undefined;
|
|
375
|
-
idempotencyKey?: string | undefined;
|
|
376
|
-
version?: string | undefined;
|
|
377
|
-
startedAt?: Date | undefined;
|
|
378
|
-
finishedAt?: Date | undefined;
|
|
379
|
-
delayedUntil?: Date | undefined;
|
|
380
|
-
ttl?: string | undefined;
|
|
381
|
-
expiredAt?: Date | undefined;
|
|
382
|
-
metadata?: Record<string, any> | undefined;
|
|
383
|
-
} | undefined;
|
|
384
|
-
parent?: {
|
|
385
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
386
|
-
id: string;
|
|
387
|
-
updatedAt: Date;
|
|
388
|
-
isTest: boolean;
|
|
389
|
-
createdAt: Date;
|
|
390
|
-
tags: string[];
|
|
391
|
-
durationMs: number;
|
|
392
|
-
costInCents: number;
|
|
393
|
-
baseCostInCents: number;
|
|
394
|
-
depth: number;
|
|
395
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
396
|
-
taskIdentifier: string;
|
|
397
|
-
isQueued: boolean;
|
|
398
|
-
isExecuting: boolean;
|
|
399
|
-
isCompleted: boolean;
|
|
400
|
-
isSuccess: boolean;
|
|
401
|
-
isFailed: boolean;
|
|
402
|
-
isCancelled: boolean;
|
|
403
|
-
batchId?: string | undefined;
|
|
404
|
-
idempotencyKey?: string | undefined;
|
|
405
|
-
version?: string | undefined;
|
|
406
|
-
startedAt?: Date | undefined;
|
|
407
|
-
finishedAt?: Date | undefined;
|
|
408
|
-
delayedUntil?: Date | undefined;
|
|
409
|
-
ttl?: string | undefined;
|
|
410
|
-
expiredAt?: Date | undefined;
|
|
411
|
-
metadata?: Record<string, any> | undefined;
|
|
412
|
-
} | undefined;
|
|
413
|
-
children?: {
|
|
414
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
415
|
-
id: string;
|
|
416
|
-
updatedAt: Date;
|
|
417
|
-
isTest: boolean;
|
|
418
|
-
createdAt: Date;
|
|
419
|
-
tags: string[];
|
|
420
|
-
durationMs: number;
|
|
421
|
-
costInCents: number;
|
|
422
|
-
baseCostInCents: number;
|
|
423
|
-
depth: number;
|
|
424
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
425
|
-
taskIdentifier: string;
|
|
426
|
-
isQueued: boolean;
|
|
427
|
-
isExecuting: boolean;
|
|
428
|
-
isCompleted: boolean;
|
|
429
|
-
isSuccess: boolean;
|
|
430
|
-
isFailed: boolean;
|
|
431
|
-
isCancelled: boolean;
|
|
432
|
-
batchId?: string | undefined;
|
|
433
|
-
idempotencyKey?: string | undefined;
|
|
434
|
-
version?: string | undefined;
|
|
435
|
-
startedAt?: Date | undefined;
|
|
436
|
-
finishedAt?: Date | undefined;
|
|
437
|
-
delayedUntil?: Date | undefined;
|
|
438
|
-
ttl?: string | undefined;
|
|
439
|
-
expiredAt?: Date | undefined;
|
|
440
|
-
metadata?: Record<string, any> | undefined;
|
|
441
|
-
}[] | undefined;
|
|
442
|
-
};
|
|
443
|
-
payload?: any;
|
|
444
|
-
payloadPresignedUrl?: string | undefined;
|
|
445
|
-
output?: any;
|
|
446
|
-
outputPresignedUrl?: string | undefined;
|
|
447
|
-
schedule?: {
|
|
448
|
-
id: string;
|
|
449
|
-
generator: {
|
|
450
|
-
type: "CRON";
|
|
451
|
-
description: string;
|
|
452
|
-
expression: string;
|
|
453
|
-
};
|
|
454
|
-
externalId?: string | undefined;
|
|
455
|
-
deduplicationKey?: string | undefined;
|
|
456
|
-
} | undefined;
|
|
457
|
-
batchId?: string | undefined;
|
|
458
|
-
idempotencyKey?: string | undefined;
|
|
459
|
-
version?: string | undefined;
|
|
460
|
-
startedAt?: Date | undefined;
|
|
461
|
-
finishedAt?: Date | undefined;
|
|
462
|
-
delayedUntil?: Date | undefined;
|
|
463
|
-
ttl?: string | undefined;
|
|
464
|
-
expiredAt?: Date | undefined;
|
|
465
|
-
metadata?: Record<string, any> | undefined;
|
|
466
|
-
} : never) extends infer T ? { [K in keyof T]: (TRunId extends RunHandle<infer TOutput> ? Omit<{
|
|
467
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
468
|
-
id: string;
|
|
469
|
-
attempts: ({
|
|
470
|
-
status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
|
|
471
|
-
id: string;
|
|
472
|
-
updatedAt: Date;
|
|
473
|
-
createdAt: Date;
|
|
474
|
-
startedAt?: Date | undefined;
|
|
475
|
-
completedAt?: Date | undefined;
|
|
476
|
-
error?: {
|
|
477
|
-
message: string;
|
|
478
|
-
name?: string | undefined;
|
|
479
|
-
stackTrace?: string | undefined;
|
|
480
|
-
} | undefined;
|
|
481
|
-
} | undefined)[];
|
|
482
|
-
updatedAt: Date;
|
|
483
|
-
isTest: boolean;
|
|
484
|
-
createdAt: Date;
|
|
485
|
-
tags: string[];
|
|
486
|
-
durationMs: number;
|
|
487
|
-
costInCents: number;
|
|
488
|
-
baseCostInCents: number;
|
|
489
|
-
depth: number;
|
|
490
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
491
|
-
taskIdentifier: string;
|
|
492
|
-
isQueued: boolean;
|
|
493
|
-
isExecuting: boolean;
|
|
494
|
-
isCompleted: boolean;
|
|
495
|
-
isSuccess: boolean;
|
|
496
|
-
isFailed: boolean;
|
|
497
|
-
isCancelled: boolean;
|
|
498
|
-
relatedRuns: {
|
|
499
|
-
root?: {
|
|
500
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
501
|
-
id: string;
|
|
502
|
-
updatedAt: Date;
|
|
503
|
-
isTest: boolean;
|
|
504
|
-
createdAt: Date;
|
|
505
|
-
tags: string[];
|
|
506
|
-
durationMs: number;
|
|
507
|
-
costInCents: number;
|
|
508
|
-
baseCostInCents: number;
|
|
509
|
-
depth: number;
|
|
510
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
511
|
-
taskIdentifier: string;
|
|
512
|
-
isQueued: boolean;
|
|
513
|
-
isExecuting: boolean;
|
|
514
|
-
isCompleted: boolean;
|
|
515
|
-
isSuccess: boolean;
|
|
516
|
-
isFailed: boolean;
|
|
517
|
-
isCancelled: boolean;
|
|
518
|
-
batchId?: string | undefined;
|
|
519
|
-
idempotencyKey?: string | undefined;
|
|
520
|
-
version?: string | undefined;
|
|
521
|
-
startedAt?: Date | undefined;
|
|
522
|
-
finishedAt?: Date | undefined;
|
|
523
|
-
delayedUntil?: Date | undefined;
|
|
524
|
-
ttl?: string | undefined;
|
|
525
|
-
expiredAt?: Date | undefined;
|
|
526
|
-
metadata?: Record<string, any> | undefined;
|
|
527
|
-
} | undefined;
|
|
528
|
-
parent?: {
|
|
529
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
530
|
-
id: string;
|
|
531
|
-
updatedAt: Date;
|
|
532
|
-
isTest: boolean;
|
|
533
|
-
createdAt: Date;
|
|
534
|
-
tags: string[];
|
|
535
|
-
durationMs: number;
|
|
536
|
-
costInCents: number;
|
|
537
|
-
baseCostInCents: number;
|
|
538
|
-
depth: number;
|
|
539
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
540
|
-
taskIdentifier: string;
|
|
541
|
-
isQueued: boolean;
|
|
542
|
-
isExecuting: boolean;
|
|
543
|
-
isCompleted: boolean;
|
|
544
|
-
isSuccess: boolean;
|
|
545
|
-
isFailed: boolean;
|
|
546
|
-
isCancelled: boolean;
|
|
547
|
-
batchId?: string | undefined;
|
|
548
|
-
idempotencyKey?: string | undefined;
|
|
549
|
-
version?: string | undefined;
|
|
550
|
-
startedAt?: Date | undefined;
|
|
551
|
-
finishedAt?: Date | undefined;
|
|
552
|
-
delayedUntil?: Date | undefined;
|
|
553
|
-
ttl?: string | undefined;
|
|
554
|
-
expiredAt?: Date | undefined;
|
|
555
|
-
metadata?: Record<string, any> | undefined;
|
|
556
|
-
} | undefined;
|
|
557
|
-
children?: {
|
|
558
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
559
|
-
id: string;
|
|
560
|
-
updatedAt: Date;
|
|
561
|
-
isTest: boolean;
|
|
562
|
-
createdAt: Date;
|
|
563
|
-
tags: string[];
|
|
564
|
-
durationMs: number;
|
|
565
|
-
costInCents: number;
|
|
566
|
-
baseCostInCents: number;
|
|
567
|
-
depth: number;
|
|
568
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
569
|
-
taskIdentifier: string;
|
|
570
|
-
isQueued: boolean;
|
|
571
|
-
isExecuting: boolean;
|
|
572
|
-
isCompleted: boolean;
|
|
573
|
-
isSuccess: boolean;
|
|
574
|
-
isFailed: boolean;
|
|
575
|
-
isCancelled: boolean;
|
|
576
|
-
batchId?: string | undefined;
|
|
577
|
-
idempotencyKey?: string | undefined;
|
|
578
|
-
version?: string | undefined;
|
|
579
|
-
startedAt?: Date | undefined;
|
|
580
|
-
finishedAt?: Date | undefined;
|
|
581
|
-
delayedUntil?: Date | undefined;
|
|
582
|
-
ttl?: string | undefined;
|
|
583
|
-
expiredAt?: Date | undefined;
|
|
584
|
-
metadata?: Record<string, any> | undefined;
|
|
585
|
-
}[] | undefined;
|
|
586
|
-
};
|
|
587
|
-
payload?: any;
|
|
588
|
-
payloadPresignedUrl?: string | undefined;
|
|
589
|
-
output?: any;
|
|
590
|
-
outputPresignedUrl?: string | undefined;
|
|
31
|
+
error?: {
|
|
32
|
+
message: string;
|
|
33
|
+
name?: string | undefined;
|
|
34
|
+
stackTrace?: string | undefined;
|
|
35
|
+
} | undefined;
|
|
36
|
+
idempotencyKey?: string | undefined;
|
|
37
|
+
startedAt?: Date | undefined;
|
|
38
|
+
updatedAt: Date;
|
|
39
|
+
isTest: boolean;
|
|
40
|
+
version?: string | undefined;
|
|
41
|
+
metadata?: Record<string, any> | undefined;
|
|
42
|
+
createdAt: Date;
|
|
591
43
|
schedule?: {
|
|
592
44
|
id: string;
|
|
593
45
|
generator: {
|
|
@@ -598,20 +50,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
598
50
|
externalId?: string | undefined;
|
|
599
51
|
deduplicationKey?: string | undefined;
|
|
600
52
|
} | undefined;
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
version?: string | undefined;
|
|
604
|
-
startedAt?: Date | undefined;
|
|
605
|
-
finishedAt?: Date | undefined;
|
|
606
|
-
delayedUntil?: Date | undefined;
|
|
607
|
-
ttl?: string | undefined;
|
|
608
|
-
expiredAt?: Date | undefined;
|
|
609
|
-
metadata?: Record<string, any> | undefined;
|
|
610
|
-
}, "output"> & {
|
|
611
|
-
output?: TOutput;
|
|
612
|
-
} : TRunId extends Task<string, any, infer TTaskOutput> ? Omit<{
|
|
613
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
614
|
-
id: string;
|
|
53
|
+
tags: string[];
|
|
54
|
+
taskIdentifier: string;
|
|
615
55
|
attempts: ({
|
|
616
56
|
status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
|
|
617
57
|
id: string;
|
|
@@ -625,25 +65,12 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
625
65
|
stackTrace?: string | undefined;
|
|
626
66
|
} | undefined;
|
|
627
67
|
} | undefined)[];
|
|
628
|
-
updatedAt: Date;
|
|
629
|
-
isTest: boolean;
|
|
630
|
-
createdAt: Date;
|
|
631
|
-
tags: string[];
|
|
632
68
|
durationMs: number;
|
|
633
69
|
costInCents: number;
|
|
634
70
|
baseCostInCents: number;
|
|
635
|
-
depth: number;
|
|
636
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
637
|
-
taskIdentifier: string;
|
|
638
|
-
isQueued: boolean;
|
|
639
|
-
isExecuting: boolean;
|
|
640
|
-
isCompleted: boolean;
|
|
641
|
-
isSuccess: boolean;
|
|
642
|
-
isFailed: boolean;
|
|
643
|
-
isCancelled: boolean;
|
|
644
71
|
relatedRuns: {
|
|
645
72
|
root?: {
|
|
646
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "
|
|
73
|
+
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
647
74
|
id: string;
|
|
648
75
|
updatedAt: Date;
|
|
649
76
|
isTest: boolean;
|
|
@@ -652,9 +79,9 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
652
79
|
durationMs: number;
|
|
653
80
|
costInCents: number;
|
|
654
81
|
baseCostInCents: number;
|
|
82
|
+
taskIdentifier: string;
|
|
655
83
|
depth: number;
|
|
656
84
|
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
657
|
-
taskIdentifier: string;
|
|
658
85
|
isQueued: boolean;
|
|
659
86
|
isExecuting: boolean;
|
|
660
87
|
isCompleted: boolean;
|
|
@@ -672,7 +99,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
672
99
|
metadata?: Record<string, any> | undefined;
|
|
673
100
|
} | undefined;
|
|
674
101
|
parent?: {
|
|
675
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "
|
|
102
|
+
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
676
103
|
id: string;
|
|
677
104
|
updatedAt: Date;
|
|
678
105
|
isTest: boolean;
|
|
@@ -681,9 +108,9 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
681
108
|
durationMs: number;
|
|
682
109
|
costInCents: number;
|
|
683
110
|
baseCostInCents: number;
|
|
111
|
+
taskIdentifier: string;
|
|
684
112
|
depth: number;
|
|
685
113
|
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
686
|
-
taskIdentifier: string;
|
|
687
114
|
isQueued: boolean;
|
|
688
115
|
isExecuting: boolean;
|
|
689
116
|
isCompleted: boolean;
|
|
@@ -701,7 +128,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
701
128
|
metadata?: Record<string, any> | undefined;
|
|
702
129
|
} | undefined;
|
|
703
130
|
children?: {
|
|
704
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "
|
|
131
|
+
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "FAILED" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
705
132
|
id: string;
|
|
706
133
|
updatedAt: Date;
|
|
707
134
|
isTest: boolean;
|
|
@@ -710,9 +137,9 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
710
137
|
durationMs: number;
|
|
711
138
|
costInCents: number;
|
|
712
139
|
baseCostInCents: number;
|
|
140
|
+
taskIdentifier: string;
|
|
713
141
|
depth: number;
|
|
714
142
|
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
715
|
-
taskIdentifier: string;
|
|
716
143
|
isQueued: boolean;
|
|
717
144
|
isExecuting: boolean;
|
|
718
145
|
isCompleted: boolean;
|
|
@@ -730,174 +157,24 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
730
157
|
metadata?: Record<string, any> | undefined;
|
|
731
158
|
}[] | undefined;
|
|
732
159
|
};
|
|
733
|
-
payload?: any;
|
|
734
|
-
payloadPresignedUrl?: string | undefined;
|
|
735
|
-
output?: any;
|
|
736
|
-
outputPresignedUrl?: string | undefined;
|
|
737
|
-
schedule?: {
|
|
738
|
-
id: string;
|
|
739
|
-
generator: {
|
|
740
|
-
type: "CRON";
|
|
741
|
-
description: string;
|
|
742
|
-
expression: string;
|
|
743
|
-
};
|
|
744
|
-
externalId?: string | undefined;
|
|
745
|
-
deduplicationKey?: string | undefined;
|
|
746
|
-
} | undefined;
|
|
747
|
-
batchId?: string | undefined;
|
|
748
|
-
idempotencyKey?: string | undefined;
|
|
749
|
-
version?: string | undefined;
|
|
750
|
-
startedAt?: Date | undefined;
|
|
751
|
-
finishedAt?: Date | undefined;
|
|
752
|
-
delayedUntil?: Date | undefined;
|
|
753
|
-
ttl?: string | undefined;
|
|
754
|
-
expiredAt?: Date | undefined;
|
|
755
|
-
metadata?: Record<string, any> | undefined;
|
|
756
|
-
}, "output"> & {
|
|
757
|
-
output?: TTaskOutput;
|
|
758
|
-
} : TRunId extends string ? {
|
|
759
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
760
|
-
id: string;
|
|
761
|
-
attempts: ({
|
|
762
|
-
status: "PENDING" | "COMPLETED" | "CANCELED" | "EXECUTING" | "FAILED" | "PAUSED";
|
|
763
|
-
id: string;
|
|
764
|
-
updatedAt: Date;
|
|
765
|
-
createdAt: Date;
|
|
766
|
-
startedAt?: Date | undefined;
|
|
767
|
-
completedAt?: Date | undefined;
|
|
768
|
-
error?: {
|
|
769
|
-
message: string;
|
|
770
|
-
name?: string | undefined;
|
|
771
|
-
stackTrace?: string | undefined;
|
|
772
|
-
} | undefined;
|
|
773
|
-
} | undefined)[];
|
|
774
|
-
updatedAt: Date;
|
|
775
|
-
isTest: boolean;
|
|
776
|
-
createdAt: Date;
|
|
777
|
-
tags: string[];
|
|
778
|
-
durationMs: number;
|
|
779
|
-
costInCents: number;
|
|
780
|
-
baseCostInCents: number;
|
|
781
160
|
depth: number;
|
|
782
161
|
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
783
|
-
taskIdentifier: string;
|
|
784
162
|
isQueued: boolean;
|
|
785
163
|
isExecuting: boolean;
|
|
786
164
|
isCompleted: boolean;
|
|
787
165
|
isSuccess: boolean;
|
|
788
166
|
isFailed: boolean;
|
|
789
167
|
isCancelled: boolean;
|
|
790
|
-
|
|
791
|
-
root?: {
|
|
792
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
793
|
-
id: string;
|
|
794
|
-
updatedAt: Date;
|
|
795
|
-
isTest: boolean;
|
|
796
|
-
createdAt: Date;
|
|
797
|
-
tags: string[];
|
|
798
|
-
durationMs: number;
|
|
799
|
-
costInCents: number;
|
|
800
|
-
baseCostInCents: number;
|
|
801
|
-
depth: number;
|
|
802
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
803
|
-
taskIdentifier: string;
|
|
804
|
-
isQueued: boolean;
|
|
805
|
-
isExecuting: boolean;
|
|
806
|
-
isCompleted: boolean;
|
|
807
|
-
isSuccess: boolean;
|
|
808
|
-
isFailed: boolean;
|
|
809
|
-
isCancelled: boolean;
|
|
810
|
-
batchId?: string | undefined;
|
|
811
|
-
idempotencyKey?: string | undefined;
|
|
812
|
-
version?: string | undefined;
|
|
813
|
-
startedAt?: Date | undefined;
|
|
814
|
-
finishedAt?: Date | undefined;
|
|
815
|
-
delayedUntil?: Date | undefined;
|
|
816
|
-
ttl?: string | undefined;
|
|
817
|
-
expiredAt?: Date | undefined;
|
|
818
|
-
metadata?: Record<string, any> | undefined;
|
|
819
|
-
} | undefined;
|
|
820
|
-
parent?: {
|
|
821
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
822
|
-
id: string;
|
|
823
|
-
updatedAt: Date;
|
|
824
|
-
isTest: boolean;
|
|
825
|
-
createdAt: Date;
|
|
826
|
-
tags: string[];
|
|
827
|
-
durationMs: number;
|
|
828
|
-
costInCents: number;
|
|
829
|
-
baseCostInCents: number;
|
|
830
|
-
depth: number;
|
|
831
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
832
|
-
taskIdentifier: string;
|
|
833
|
-
isQueued: boolean;
|
|
834
|
-
isExecuting: boolean;
|
|
835
|
-
isCompleted: boolean;
|
|
836
|
-
isSuccess: boolean;
|
|
837
|
-
isFailed: boolean;
|
|
838
|
-
isCancelled: boolean;
|
|
839
|
-
batchId?: string | undefined;
|
|
840
|
-
idempotencyKey?: string | undefined;
|
|
841
|
-
version?: string | undefined;
|
|
842
|
-
startedAt?: Date | undefined;
|
|
843
|
-
finishedAt?: Date | undefined;
|
|
844
|
-
delayedUntil?: Date | undefined;
|
|
845
|
-
ttl?: string | undefined;
|
|
846
|
-
expiredAt?: Date | undefined;
|
|
847
|
-
metadata?: Record<string, any> | undefined;
|
|
848
|
-
} | undefined;
|
|
849
|
-
children?: {
|
|
850
|
-
status: "COMPLETED" | "CANCELED" | "QUEUED" | "TIMED_OUT" | "EXECUTING" | "FAILED" | "WAITING_FOR_DEPLOY" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
851
|
-
id: string;
|
|
852
|
-
updatedAt: Date;
|
|
853
|
-
isTest: boolean;
|
|
854
|
-
createdAt: Date;
|
|
855
|
-
tags: string[];
|
|
856
|
-
durationMs: number;
|
|
857
|
-
costInCents: number;
|
|
858
|
-
baseCostInCents: number;
|
|
859
|
-
depth: number;
|
|
860
|
-
triggerFunction: "trigger" | "triggerAndWait" | "batchTriggerAndWait" | "batchTrigger";
|
|
861
|
-
taskIdentifier: string;
|
|
862
|
-
isQueued: boolean;
|
|
863
|
-
isExecuting: boolean;
|
|
864
|
-
isCompleted: boolean;
|
|
865
|
-
isSuccess: boolean;
|
|
866
|
-
isFailed: boolean;
|
|
867
|
-
isCancelled: boolean;
|
|
868
|
-
batchId?: string | undefined;
|
|
869
|
-
idempotencyKey?: string | undefined;
|
|
870
|
-
version?: string | undefined;
|
|
871
|
-
startedAt?: Date | undefined;
|
|
872
|
-
finishedAt?: Date | undefined;
|
|
873
|
-
delayedUntil?: Date | undefined;
|
|
874
|
-
ttl?: string | undefined;
|
|
875
|
-
expiredAt?: Date | undefined;
|
|
876
|
-
metadata?: Record<string, any> | undefined;
|
|
877
|
-
}[] | undefined;
|
|
878
|
-
};
|
|
879
|
-
payload?: any;
|
|
168
|
+
attemptCount: number;
|
|
880
169
|
payloadPresignedUrl?: string | undefined;
|
|
881
|
-
output?: any;
|
|
882
170
|
outputPresignedUrl?: string | undefined;
|
|
883
|
-
schedule?: {
|
|
884
|
-
id: string;
|
|
885
|
-
generator: {
|
|
886
|
-
type: "CRON";
|
|
887
|
-
description: string;
|
|
888
|
-
expression: string;
|
|
889
|
-
};
|
|
890
|
-
externalId?: string | undefined;
|
|
891
|
-
deduplicationKey?: string | undefined;
|
|
892
|
-
} | undefined;
|
|
893
171
|
batchId?: string | undefined;
|
|
894
|
-
idempotencyKey?: string | undefined;
|
|
895
|
-
version?: string | undefined;
|
|
896
|
-
startedAt?: Date | undefined;
|
|
897
172
|
finishedAt?: Date | undefined;
|
|
898
173
|
delayedUntil?: Date | undefined;
|
|
899
174
|
ttl?: string | undefined;
|
|
900
175
|
expiredAt?: Date | undefined;
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
176
|
+
output?: InferRunTypes<TRunId>["output"] | undefined;
|
|
177
|
+
payload?: InferRunTypes<TRunId>["payload"] | undefined;
|
|
178
|
+
}>;
|
|
179
|
+
declare function subscribeToRun<TRunId extends AnyRunHandle | AnyTask | string>(runId: RunId<TRunId>): RunSubscription<InferRunTypes<TRunId>>;
|
|
180
|
+
declare function subscribeToRunsWithTag<TTasks extends AnyTask>(tag: string | string[]): RunSubscription<InferRunTypes<TTasks>>;
|