@trigger.dev/sdk 0.0.0-prerelease-20240825150620 → 0.0.0-prerelease-20240905123715
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/runs.d.ts +60 -60
- package/dist/commonjs/v3/shared.d.ts +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/apiClient.d.ts +138 -138
- package/dist/esm/io.d.ts +14 -14
- package/dist/esm/triggerClient.d.ts +22 -22
- package/dist/esm/triggers/externalSource.d.ts +1 -1
- package/dist/esm/triggers/invokeTrigger.d.ts +1 -1
- package/dist/esm/triggers/notifications.d.ts +8 -8
- package/dist/esm/triggers/scheduled.d.ts +4 -4
- package/dist/esm/triggers/webhook.d.ts +1 -1
- package/dist/esm/types.d.ts +4 -4
- package/dist/esm/v3/runs.d.ts +12 -12
- package/dist/esm/version.js +1 -1
- package/package.json +14 -5
|
@@ -28,13 +28,19 @@ export type PollOptions = {
|
|
|
28
28
|
declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: RunId<TRunId>, options?: {
|
|
29
29
|
pollIntervalMs?: number;
|
|
30
30
|
}, requestOptions?: ApiRequestOptions): Promise<(TRunId extends RunHandle<infer TOutput> ? Omit<{
|
|
31
|
-
status: "
|
|
31
|
+
status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
32
32
|
id: string;
|
|
33
|
+
tags: string[];
|
|
34
|
+
isTest: boolean;
|
|
35
|
+
createdAt: Date;
|
|
36
|
+
durationMs: number;
|
|
37
|
+
costInCents: number;
|
|
38
|
+
baseCostInCents: number;
|
|
33
39
|
attempts: ({
|
|
34
|
-
status: "PENDING" | "
|
|
40
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
35
41
|
id: string;
|
|
36
|
-
updatedAt: Date;
|
|
37
42
|
createdAt: Date;
|
|
43
|
+
updatedAt: Date;
|
|
38
44
|
startedAt?: Date | undefined;
|
|
39
45
|
completedAt?: Date | undefined;
|
|
40
46
|
error?: {
|
|
@@ -44,12 +50,6 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
44
50
|
} | undefined;
|
|
45
51
|
} | undefined)[];
|
|
46
52
|
updatedAt: Date;
|
|
47
|
-
isTest: boolean;
|
|
48
|
-
createdAt: Date;
|
|
49
|
-
tags: string[];
|
|
50
|
-
durationMs: number;
|
|
51
|
-
costInCents: number;
|
|
52
|
-
baseCostInCents: number;
|
|
53
53
|
taskIdentifier: string;
|
|
54
54
|
isQueued: boolean;
|
|
55
55
|
isExecuting: boolean;
|
|
@@ -65,8 +65,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
65
65
|
id: string;
|
|
66
66
|
generator: {
|
|
67
67
|
type: "CRON";
|
|
68
|
-
description: string;
|
|
69
68
|
expression: string;
|
|
69
|
+
description: string;
|
|
70
70
|
};
|
|
71
71
|
externalId?: string | undefined;
|
|
72
72
|
deduplicationKey?: string | undefined;
|
|
@@ -81,13 +81,19 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
81
81
|
}, "output"> & {
|
|
82
82
|
output?: TOutput;
|
|
83
83
|
} : TRunId extends Task<string, any, infer TTaskOutput> ? Omit<{
|
|
84
|
-
status: "
|
|
84
|
+
status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
85
85
|
id: string;
|
|
86
|
+
tags: string[];
|
|
87
|
+
isTest: boolean;
|
|
88
|
+
createdAt: Date;
|
|
89
|
+
durationMs: number;
|
|
90
|
+
costInCents: number;
|
|
91
|
+
baseCostInCents: number;
|
|
86
92
|
attempts: ({
|
|
87
|
-
status: "PENDING" | "
|
|
93
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
88
94
|
id: string;
|
|
89
|
-
updatedAt: Date;
|
|
90
95
|
createdAt: Date;
|
|
96
|
+
updatedAt: Date;
|
|
91
97
|
startedAt?: Date | undefined;
|
|
92
98
|
completedAt?: Date | undefined;
|
|
93
99
|
error?: {
|
|
@@ -97,12 +103,6 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
97
103
|
} | undefined;
|
|
98
104
|
} | undefined)[];
|
|
99
105
|
updatedAt: Date;
|
|
100
|
-
isTest: boolean;
|
|
101
|
-
createdAt: Date;
|
|
102
|
-
tags: string[];
|
|
103
|
-
durationMs: number;
|
|
104
|
-
costInCents: number;
|
|
105
|
-
baseCostInCents: number;
|
|
106
106
|
taskIdentifier: string;
|
|
107
107
|
isQueued: boolean;
|
|
108
108
|
isExecuting: boolean;
|
|
@@ -118,8 +118,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
118
118
|
id: string;
|
|
119
119
|
generator: {
|
|
120
120
|
type: "CRON";
|
|
121
|
-
description: string;
|
|
122
121
|
expression: string;
|
|
122
|
+
description: string;
|
|
123
123
|
};
|
|
124
124
|
externalId?: string | undefined;
|
|
125
125
|
deduplicationKey?: string | undefined;
|
|
@@ -134,13 +134,19 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
134
134
|
}, "output"> & {
|
|
135
135
|
output?: TTaskOutput;
|
|
136
136
|
} : TRunId extends string ? {
|
|
137
|
-
status: "
|
|
137
|
+
status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
138
138
|
id: string;
|
|
139
|
+
tags: string[];
|
|
140
|
+
isTest: boolean;
|
|
141
|
+
createdAt: Date;
|
|
142
|
+
durationMs: number;
|
|
143
|
+
costInCents: number;
|
|
144
|
+
baseCostInCents: number;
|
|
139
145
|
attempts: ({
|
|
140
|
-
status: "PENDING" | "
|
|
146
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
141
147
|
id: string;
|
|
142
|
-
updatedAt: Date;
|
|
143
148
|
createdAt: Date;
|
|
149
|
+
updatedAt: Date;
|
|
144
150
|
startedAt?: Date | undefined;
|
|
145
151
|
completedAt?: Date | undefined;
|
|
146
152
|
error?: {
|
|
@@ -150,12 +156,6 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
150
156
|
} | undefined;
|
|
151
157
|
} | undefined)[];
|
|
152
158
|
updatedAt: Date;
|
|
153
|
-
isTest: boolean;
|
|
154
|
-
createdAt: Date;
|
|
155
|
-
tags: string[];
|
|
156
|
-
durationMs: number;
|
|
157
|
-
costInCents: number;
|
|
158
|
-
baseCostInCents: number;
|
|
159
159
|
taskIdentifier: string;
|
|
160
160
|
isQueued: boolean;
|
|
161
161
|
isExecuting: boolean;
|
|
@@ -171,8 +171,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
171
171
|
id: string;
|
|
172
172
|
generator: {
|
|
173
173
|
type: "CRON";
|
|
174
|
-
description: string;
|
|
175
174
|
expression: string;
|
|
175
|
+
description: string;
|
|
176
176
|
};
|
|
177
177
|
externalId?: string | undefined;
|
|
178
178
|
deduplicationKey?: string | undefined;
|
|
@@ -185,13 +185,19 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
185
185
|
ttl?: string | undefined;
|
|
186
186
|
expiredAt?: Date | undefined;
|
|
187
187
|
} : never) extends infer T ? { [K in keyof T]: (TRunId extends RunHandle<infer TOutput> ? Omit<{
|
|
188
|
-
status: "
|
|
188
|
+
status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
189
189
|
id: string;
|
|
190
|
+
tags: string[];
|
|
191
|
+
isTest: boolean;
|
|
192
|
+
createdAt: Date;
|
|
193
|
+
durationMs: number;
|
|
194
|
+
costInCents: number;
|
|
195
|
+
baseCostInCents: number;
|
|
190
196
|
attempts: ({
|
|
191
|
-
status: "PENDING" | "
|
|
197
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
192
198
|
id: string;
|
|
193
|
-
updatedAt: Date;
|
|
194
199
|
createdAt: Date;
|
|
200
|
+
updatedAt: Date;
|
|
195
201
|
startedAt?: Date | undefined;
|
|
196
202
|
completedAt?: Date | undefined;
|
|
197
203
|
error?: {
|
|
@@ -201,12 +207,6 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
201
207
|
} | undefined;
|
|
202
208
|
} | undefined)[];
|
|
203
209
|
updatedAt: Date;
|
|
204
|
-
isTest: boolean;
|
|
205
|
-
createdAt: Date;
|
|
206
|
-
tags: string[];
|
|
207
|
-
durationMs: number;
|
|
208
|
-
costInCents: number;
|
|
209
|
-
baseCostInCents: number;
|
|
210
210
|
taskIdentifier: string;
|
|
211
211
|
isQueued: boolean;
|
|
212
212
|
isExecuting: boolean;
|
|
@@ -222,8 +222,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
222
222
|
id: string;
|
|
223
223
|
generator: {
|
|
224
224
|
type: "CRON";
|
|
225
|
-
description: string;
|
|
226
225
|
expression: string;
|
|
226
|
+
description: string;
|
|
227
227
|
};
|
|
228
228
|
externalId?: string | undefined;
|
|
229
229
|
deduplicationKey?: string | undefined;
|
|
@@ -238,13 +238,19 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
238
238
|
}, "output"> & {
|
|
239
239
|
output?: TOutput;
|
|
240
240
|
} : TRunId extends Task<string, any, infer TTaskOutput> ? Omit<{
|
|
241
|
-
status: "
|
|
241
|
+
status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
242
242
|
id: string;
|
|
243
|
+
tags: string[];
|
|
244
|
+
isTest: boolean;
|
|
245
|
+
createdAt: Date;
|
|
246
|
+
durationMs: number;
|
|
247
|
+
costInCents: number;
|
|
248
|
+
baseCostInCents: number;
|
|
243
249
|
attempts: ({
|
|
244
|
-
status: "PENDING" | "
|
|
250
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
245
251
|
id: string;
|
|
246
|
-
updatedAt: Date;
|
|
247
252
|
createdAt: Date;
|
|
253
|
+
updatedAt: Date;
|
|
248
254
|
startedAt?: Date | undefined;
|
|
249
255
|
completedAt?: Date | undefined;
|
|
250
256
|
error?: {
|
|
@@ -254,12 +260,6 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
254
260
|
} | undefined;
|
|
255
261
|
} | undefined)[];
|
|
256
262
|
updatedAt: Date;
|
|
257
|
-
isTest: boolean;
|
|
258
|
-
createdAt: Date;
|
|
259
|
-
tags: string[];
|
|
260
|
-
durationMs: number;
|
|
261
|
-
costInCents: number;
|
|
262
|
-
baseCostInCents: number;
|
|
263
263
|
taskIdentifier: string;
|
|
264
264
|
isQueued: boolean;
|
|
265
265
|
isExecuting: boolean;
|
|
@@ -275,8 +275,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
275
275
|
id: string;
|
|
276
276
|
generator: {
|
|
277
277
|
type: "CRON";
|
|
278
|
-
description: string;
|
|
279
278
|
expression: string;
|
|
279
|
+
description: string;
|
|
280
280
|
};
|
|
281
281
|
externalId?: string | undefined;
|
|
282
282
|
deduplicationKey?: string | undefined;
|
|
@@ -291,13 +291,19 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
291
291
|
}, "output"> & {
|
|
292
292
|
output?: TTaskOutput;
|
|
293
293
|
} : TRunId extends string ? {
|
|
294
|
-
status: "
|
|
294
|
+
status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE" | "DELAYED" | "EXPIRED";
|
|
295
295
|
id: string;
|
|
296
|
+
tags: string[];
|
|
297
|
+
isTest: boolean;
|
|
298
|
+
createdAt: Date;
|
|
299
|
+
durationMs: number;
|
|
300
|
+
costInCents: number;
|
|
301
|
+
baseCostInCents: number;
|
|
296
302
|
attempts: ({
|
|
297
|
-
status: "PENDING" | "
|
|
303
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
298
304
|
id: string;
|
|
299
|
-
updatedAt: Date;
|
|
300
305
|
createdAt: Date;
|
|
306
|
+
updatedAt: Date;
|
|
301
307
|
startedAt?: Date | undefined;
|
|
302
308
|
completedAt?: Date | undefined;
|
|
303
309
|
error?: {
|
|
@@ -307,12 +313,6 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
307
313
|
} | undefined;
|
|
308
314
|
} | undefined)[];
|
|
309
315
|
updatedAt: Date;
|
|
310
|
-
isTest: boolean;
|
|
311
|
-
createdAt: Date;
|
|
312
|
-
tags: string[];
|
|
313
|
-
durationMs: number;
|
|
314
|
-
costInCents: number;
|
|
315
|
-
baseCostInCents: number;
|
|
316
316
|
taskIdentifier: string;
|
|
317
317
|
isQueued: boolean;
|
|
318
318
|
isExecuting: boolean;
|
|
@@ -328,8 +328,8 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
328
328
|
id: string;
|
|
329
329
|
generator: {
|
|
330
330
|
type: "CRON";
|
|
331
|
-
description: string;
|
|
332
331
|
expression: string;
|
|
332
|
+
description: string;
|
|
333
333
|
};
|
|
334
334
|
externalId?: string | undefined;
|
|
335
335
|
deduplicationKey?: string | undefined;
|
|
@@ -428,5 +428,5 @@ export declare function batchTriggerAndWait<TTask extends AnyTask>(id: TaskIdent
|
|
|
428
428
|
*/
|
|
429
429
|
export declare function triggerAndPoll<TTask extends AnyTask>(id: TaskIdentifier<TTask>, payload: TaskPayload<TTask>, options?: TaskRunOptions & PollOptions, requestOptions?: ApiRequestOptions): Promise<RetrieveRunResult<RunHandle<TaskOutput<TTask>>>>;
|
|
430
430
|
export declare function batchTrigger<TTask extends AnyTask>(id: TaskIdentifier<TTask>, items: Array<BatchItem<TaskPayload<TTask>>>, requestOptions?: ApiRequestOptions): Promise<BatchRunHandle<TaskOutput<TTask>>>;
|
|
431
|
-
export declare function apiClientMissingError(): "You need to set the TRIGGER_API_URL and TRIGGER_SECRET_KEY environment variables." | "You need to set the TRIGGER_API_URL environment variable." | "You need to set the TRIGGER_SECRET_KEY environment variable."
|
|
431
|
+
export declare function apiClientMissingError(): "Unknown error" | "You need to set the TRIGGER_API_URL and TRIGGER_SECRET_KEY environment variables." | "You need to set the TRIGGER_API_URL environment variable." | "You need to set the TRIGGER_SECRET_KEY environment variable.";
|
|
432
432
|
export {};
|
package/dist/commonjs/version.js
CHANGED