@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
package/dist/esm/io.d.ts
CHANGED
|
@@ -242,13 +242,13 @@ export declare class IO {
|
|
|
242
242
|
* @param options Options for sending the event.
|
|
243
243
|
*/
|
|
244
244
|
sendEvent(cacheKey: string | any[], event: SendEvent, options?: SendEventOptions): Promise<{
|
|
245
|
+
id: string;
|
|
245
246
|
name: string;
|
|
246
247
|
payload: ((string | number | boolean | {
|
|
247
248
|
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
248
249
|
} | import("@trigger.dev/core").DeserializedJson[]) & (string | number | boolean | {
|
|
249
250
|
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
250
251
|
} | import("@trigger.dev/core").DeserializedJson[] | undefined)) | null;
|
|
251
|
-
id: string;
|
|
252
252
|
timestamp: Date;
|
|
253
253
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
254
254
|
deliverAt?: Date | null | undefined;
|
|
@@ -261,13 +261,13 @@ export declare class IO {
|
|
|
261
261
|
* @param options Options for sending the events.
|
|
262
262
|
*/
|
|
263
263
|
sendEvents(cacheKey: string | any[], events: SendEvent[], options?: SendEventOptions): Promise<{
|
|
264
|
+
id: string;
|
|
264
265
|
name: string;
|
|
265
266
|
payload: ((string | number | boolean | {
|
|
266
267
|
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
267
268
|
} | import("@trigger.dev/core").DeserializedJson[]) & (string | number | boolean | {
|
|
268
269
|
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
269
270
|
} | import("@trigger.dev/core").DeserializedJson[] | undefined)) | null;
|
|
270
|
-
id: string;
|
|
271
271
|
timestamp: Date;
|
|
272
272
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
273
273
|
deliverAt?: Date | null | undefined;
|
|
@@ -275,16 +275,16 @@ export declare class IO {
|
|
|
275
275
|
cancelledAt?: Date | null | undefined;
|
|
276
276
|
}[]>;
|
|
277
277
|
getEvent(cacheKey: string | any[], id: string): Promise<{
|
|
278
|
-
name: string;
|
|
279
278
|
id: string;
|
|
279
|
+
name: string;
|
|
280
280
|
updatedAt: Date;
|
|
281
|
+
createdAt: Date;
|
|
281
282
|
runs: {
|
|
282
|
-
status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
283
283
|
id: string;
|
|
284
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
284
285
|
startedAt?: Date | null | undefined;
|
|
285
286
|
completedAt?: Date | null | undefined;
|
|
286
287
|
}[];
|
|
287
|
-
createdAt: Date;
|
|
288
288
|
}>;
|
|
289
289
|
/** `io.cancelEvent()` allows you to cancel an event that was previously sent with `io.sendEvent()`. This will prevent any Jobs from running that are listening for that event if the event was sent with a delay
|
|
290
290
|
* @param cacheKey
|
|
@@ -292,13 +292,13 @@ export declare class IO {
|
|
|
292
292
|
* @returns
|
|
293
293
|
*/
|
|
294
294
|
cancelEvent(cacheKey: string | any[], eventId: string): Promise<{
|
|
295
|
+
id: string;
|
|
295
296
|
name: string;
|
|
296
297
|
payload: ((string | number | boolean | {
|
|
297
298
|
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
298
299
|
} | import("@trigger.dev/core").DeserializedJson[]) & (string | number | boolean | {
|
|
299
300
|
[key: string]: import("@trigger.dev/core").DeserializedJson;
|
|
300
301
|
} | import("@trigger.dev/core").DeserializedJson[] | undefined)) | null;
|
|
301
|
-
id: string;
|
|
302
302
|
timestamp: Date;
|
|
303
303
|
context?: import("@trigger.dev/core").DeserializedJson | undefined;
|
|
304
304
|
deliverAt?: Date | null | undefined;
|
|
@@ -329,16 +329,16 @@ export declare class IO {
|
|
|
329
329
|
id: string;
|
|
330
330
|
schedule: {
|
|
331
331
|
options: {
|
|
332
|
-
|
|
332
|
+
seconds: number;
|
|
333
333
|
};
|
|
334
|
-
type: "
|
|
334
|
+
type: "interval";
|
|
335
335
|
accountId?: string | undefined;
|
|
336
336
|
metadata?: any;
|
|
337
337
|
} | {
|
|
338
338
|
options: {
|
|
339
|
-
|
|
339
|
+
cron: string;
|
|
340
340
|
};
|
|
341
|
-
type: "
|
|
341
|
+
type: "cron";
|
|
342
342
|
accountId?: string | undefined;
|
|
343
343
|
metadata?: any;
|
|
344
344
|
};
|
|
@@ -365,16 +365,16 @@ export declare class IO {
|
|
|
365
365
|
id: string;
|
|
366
366
|
schedule: {
|
|
367
367
|
options: {
|
|
368
|
-
|
|
368
|
+
seconds: number;
|
|
369
369
|
};
|
|
370
|
-
type: "
|
|
370
|
+
type: "interval";
|
|
371
371
|
accountId?: string | undefined;
|
|
372
372
|
metadata?: any;
|
|
373
373
|
} | {
|
|
374
374
|
options: {
|
|
375
|
-
|
|
375
|
+
cron: string;
|
|
376
376
|
};
|
|
377
|
-
type: "
|
|
377
|
+
type: "cron";
|
|
378
378
|
accountId?: string | undefined;
|
|
379
379
|
metadata?: any;
|
|
380
380
|
};
|
|
@@ -74,21 +74,22 @@ export declare class TriggerClient {
|
|
|
74
74
|
config: TConfig;
|
|
75
75
|
}): void;
|
|
76
76
|
registerTrigger(id: string, key: string, options: RegisterTriggerBodyV2, idempotencyKey?: string): Promise<{
|
|
77
|
+
id: string;
|
|
77
78
|
options: {
|
|
78
79
|
event: {
|
|
79
|
-
desired: string[];
|
|
80
80
|
missing: string[];
|
|
81
|
+
desired: string[];
|
|
81
82
|
orphaned: string[];
|
|
82
83
|
};
|
|
83
84
|
} & Record<string, {
|
|
84
|
-
desired: string[];
|
|
85
85
|
missing: string[];
|
|
86
|
+
desired: string[];
|
|
86
87
|
orphaned: string[];
|
|
87
88
|
}>;
|
|
88
89
|
source: {
|
|
89
90
|
key: string;
|
|
90
|
-
secret: string;
|
|
91
91
|
active: boolean;
|
|
92
|
+
secret: string;
|
|
92
93
|
channel: {
|
|
93
94
|
type: "HTTP";
|
|
94
95
|
url: string;
|
|
@@ -101,7 +102,6 @@ export declare class TriggerClient {
|
|
|
101
102
|
data?: DeserializedJson | undefined;
|
|
102
103
|
clientId?: string | undefined;
|
|
103
104
|
};
|
|
104
|
-
id: string;
|
|
105
105
|
dynamicTriggerId?: string | undefined;
|
|
106
106
|
}>;
|
|
107
107
|
getAuth(id: string): Promise<{
|
|
@@ -116,13 +116,13 @@ export declare class TriggerClient {
|
|
|
116
116
|
* @returns A promise that resolves to the event details
|
|
117
117
|
*/
|
|
118
118
|
sendEvent(event: SendEvent, options?: SendEventOptions): Promise<{
|
|
119
|
+
id: string;
|
|
119
120
|
name: string;
|
|
120
121
|
payload: ((string | number | boolean | {
|
|
121
122
|
[key: string]: DeserializedJson;
|
|
122
123
|
} | DeserializedJson[]) & (string | number | boolean | {
|
|
123
124
|
[key: string]: DeserializedJson;
|
|
124
125
|
} | DeserializedJson[] | undefined)) | null;
|
|
125
|
-
id: string;
|
|
126
126
|
timestamp: Date;
|
|
127
127
|
context?: DeserializedJson | undefined;
|
|
128
128
|
deliverAt?: Date | null | undefined;
|
|
@@ -135,13 +135,13 @@ export declare class TriggerClient {
|
|
|
135
135
|
* @returns A promise that resolves to an array of event details
|
|
136
136
|
*/
|
|
137
137
|
sendEvents(events: SendEvent[], options?: SendEventOptions): Promise<{
|
|
138
|
+
id: string;
|
|
138
139
|
name: string;
|
|
139
140
|
payload: ((string | number | boolean | {
|
|
140
141
|
[key: string]: DeserializedJson;
|
|
141
142
|
} | DeserializedJson[]) & (string | number | boolean | {
|
|
142
143
|
[key: string]: DeserializedJson;
|
|
143
144
|
} | DeserializedJson[] | undefined)) | null;
|
|
144
|
-
id: string;
|
|
145
145
|
timestamp: Date;
|
|
146
146
|
context?: DeserializedJson | undefined;
|
|
147
147
|
deliverAt?: Date | null | undefined;
|
|
@@ -149,13 +149,13 @@ export declare class TriggerClient {
|
|
|
149
149
|
cancelledAt?: Date | null | undefined;
|
|
150
150
|
}[]>;
|
|
151
151
|
cancelEvent(eventId: string): Promise<{
|
|
152
|
+
id: string;
|
|
152
153
|
name: string;
|
|
153
154
|
payload: ((string | number | boolean | {
|
|
154
155
|
[key: string]: DeserializedJson;
|
|
155
156
|
} | DeserializedJson[]) & (string | number | boolean | {
|
|
156
157
|
[key: string]: DeserializedJson;
|
|
157
158
|
} | DeserializedJson[] | undefined)) | null;
|
|
158
|
-
id: string;
|
|
159
159
|
timestamp: Date;
|
|
160
160
|
context?: DeserializedJson | undefined;
|
|
161
161
|
deliverAt?: Date | null | undefined;
|
|
@@ -181,16 +181,16 @@ export declare class TriggerClient {
|
|
|
181
181
|
id: string;
|
|
182
182
|
schedule: {
|
|
183
183
|
options: {
|
|
184
|
-
|
|
184
|
+
seconds: number;
|
|
185
185
|
};
|
|
186
|
-
type: "
|
|
186
|
+
type: "interval";
|
|
187
187
|
accountId?: string | undefined;
|
|
188
188
|
metadata?: any;
|
|
189
189
|
} | {
|
|
190
190
|
options: {
|
|
191
|
-
|
|
191
|
+
cron: string;
|
|
192
192
|
};
|
|
193
|
-
type: "
|
|
193
|
+
type: "cron";
|
|
194
194
|
accountId?: string | undefined;
|
|
195
195
|
metadata?: any;
|
|
196
196
|
};
|
|
@@ -201,24 +201,22 @@ export declare class TriggerClient {
|
|
|
201
201
|
ok: boolean;
|
|
202
202
|
}>;
|
|
203
203
|
getEvent(eventId: string): Promise<{
|
|
204
|
-
name: string;
|
|
205
204
|
id: string;
|
|
205
|
+
name: string;
|
|
206
206
|
updatedAt: Date;
|
|
207
|
+
createdAt: Date;
|
|
207
208
|
runs: {
|
|
208
|
-
status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
209
209
|
id: string;
|
|
210
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
210
211
|
startedAt?: Date | null | undefined;
|
|
211
212
|
completedAt?: Date | null | undefined;
|
|
212
213
|
}[];
|
|
213
|
-
createdAt: Date;
|
|
214
214
|
}>;
|
|
215
215
|
getRun(runId: string, options?: GetRunOptionsWithTaskDetails): Promise<{
|
|
216
|
-
status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
217
216
|
id: string;
|
|
217
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
218
218
|
startedAt: Date | null;
|
|
219
219
|
completedAt: Date | null;
|
|
220
|
-
updatedAt: Date | null;
|
|
221
|
-
tasks: import("@trigger.dev/core").RunTaskWithSubtasks[];
|
|
222
220
|
statuses: {
|
|
223
221
|
label: string;
|
|
224
222
|
key: string;
|
|
@@ -230,16 +228,16 @@ export declare class TriggerClient {
|
|
|
230
228
|
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
231
229
|
state?: "loading" | "success" | "failure" | undefined;
|
|
232
230
|
}[];
|
|
231
|
+
updatedAt: Date | null;
|
|
232
|
+
tasks: import("@trigger.dev/core").RunTaskWithSubtasks[];
|
|
233
233
|
output?: any;
|
|
234
234
|
nextCursor?: string | undefined;
|
|
235
235
|
}>;
|
|
236
236
|
cancelRun(runId: string): Promise<{
|
|
237
|
-
status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
238
237
|
id: string;
|
|
238
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
239
239
|
startedAt: Date | null;
|
|
240
240
|
completedAt: Date | null;
|
|
241
|
-
updatedAt: Date | null;
|
|
242
|
-
tasks: import("@trigger.dev/core").RunTaskWithSubtasks[];
|
|
243
241
|
statuses: {
|
|
244
242
|
label: string;
|
|
245
243
|
key: string;
|
|
@@ -251,13 +249,15 @@ export declare class TriggerClient {
|
|
|
251
249
|
data?: Record<string, import("@trigger.dev/core").SerializableJson> | undefined;
|
|
252
250
|
state?: "loading" | "success" | "failure" | undefined;
|
|
253
251
|
}[];
|
|
252
|
+
updatedAt: Date | null;
|
|
253
|
+
tasks: import("@trigger.dev/core").RunTaskWithSubtasks[];
|
|
254
254
|
output?: any;
|
|
255
255
|
nextCursor?: string | undefined;
|
|
256
256
|
}>;
|
|
257
257
|
getRuns(jobSlug: string, options?: GetRunsOptions): Promise<{
|
|
258
258
|
runs: {
|
|
259
|
-
status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
260
259
|
id: string;
|
|
260
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
261
261
|
startedAt: Date | null;
|
|
262
262
|
completedAt: Date | null;
|
|
263
263
|
updatedAt: Date | null;
|
|
@@ -277,8 +277,8 @@ export declare class TriggerClient {
|
|
|
277
277
|
state?: "loading" | "success" | "failure" | undefined;
|
|
278
278
|
}[];
|
|
279
279
|
run: {
|
|
280
|
-
status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
281
280
|
id: string;
|
|
281
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
|
|
282
282
|
output?: any;
|
|
283
283
|
};
|
|
284
284
|
}>;
|
|
@@ -115,8 +115,8 @@ export declare class ExternalSource<TIntegration extends TriggerIntegration, TPa
|
|
|
115
115
|
get integrationConfig(): {
|
|
116
116
|
id: string;
|
|
117
117
|
metadata: {
|
|
118
|
-
name: string;
|
|
119
118
|
id: string;
|
|
119
|
+
name: string;
|
|
120
120
|
instructions?: string | undefined;
|
|
121
121
|
};
|
|
122
122
|
};
|
|
@@ -18,26 +18,26 @@ export declare class MissingConnectionNotification implements Trigger<MissingCon
|
|
|
18
18
|
source: string;
|
|
19
19
|
icon: string;
|
|
20
20
|
parsePayload: (data: unknown, params?: Partial<import("zod").ParseParams>) => {
|
|
21
|
-
type: "DEVELOPER";
|
|
22
21
|
id: string;
|
|
22
|
+
type: "DEVELOPER";
|
|
23
23
|
client: {
|
|
24
|
-
scopes: string[];
|
|
25
24
|
id: string;
|
|
25
|
+
scopes: string[];
|
|
26
26
|
title: string;
|
|
27
27
|
updatedAt: Date;
|
|
28
28
|
createdAt: Date;
|
|
29
29
|
};
|
|
30
30
|
authorizationUrl: string;
|
|
31
31
|
} | {
|
|
32
|
-
type: "EXTERNAL";
|
|
33
32
|
id: string;
|
|
33
|
+
type: "EXTERNAL";
|
|
34
34
|
account: {
|
|
35
35
|
id: string;
|
|
36
36
|
metadata?: any;
|
|
37
37
|
};
|
|
38
38
|
client: {
|
|
39
|
-
scopes: string[];
|
|
40
39
|
id: string;
|
|
40
|
+
scopes: string[];
|
|
41
41
|
title: string;
|
|
42
42
|
updatedAt: Date;
|
|
43
43
|
createdAt: Date;
|
|
@@ -66,11 +66,11 @@ export declare class MissingConnectionResolvedNotification implements Trigger<Mi
|
|
|
66
66
|
source: string;
|
|
67
67
|
icon: string;
|
|
68
68
|
parsePayload: (data: unknown, params?: Partial<import("zod").ParseParams>) => {
|
|
69
|
-
type: "DEVELOPER";
|
|
70
69
|
id: string;
|
|
70
|
+
type: "DEVELOPER";
|
|
71
71
|
client: {
|
|
72
|
-
scopes: string[];
|
|
73
72
|
id: string;
|
|
73
|
+
scopes: string[];
|
|
74
74
|
title: string;
|
|
75
75
|
updatedAt: Date;
|
|
76
76
|
createdAt: Date;
|
|
@@ -79,15 +79,15 @@ export declare class MissingConnectionResolvedNotification implements Trigger<Mi
|
|
|
79
79
|
};
|
|
80
80
|
expiresAt: Date;
|
|
81
81
|
} | {
|
|
82
|
-
type: "EXTERNAL";
|
|
83
82
|
id: string;
|
|
83
|
+
type: "EXTERNAL";
|
|
84
84
|
account: {
|
|
85
85
|
id: string;
|
|
86
86
|
metadata?: any;
|
|
87
87
|
};
|
|
88
88
|
client: {
|
|
89
|
-
scopes: string[];
|
|
90
89
|
id: string;
|
|
90
|
+
scopes: string[];
|
|
91
91
|
title: string;
|
|
92
92
|
updatedAt: Date;
|
|
93
93
|
createdAt: Date;
|
|
@@ -116,16 +116,16 @@ export declare class DynamicSchedule implements Trigger<ScheduledEventSpecificat
|
|
|
116
116
|
id: string;
|
|
117
117
|
schedule: {
|
|
118
118
|
options: {
|
|
119
|
-
|
|
119
|
+
seconds: number;
|
|
120
120
|
};
|
|
121
|
-
type: "
|
|
121
|
+
type: "interval";
|
|
122
122
|
accountId?: string | undefined;
|
|
123
123
|
metadata?: any;
|
|
124
124
|
} | {
|
|
125
125
|
options: {
|
|
126
|
-
|
|
126
|
+
cron: string;
|
|
127
127
|
};
|
|
128
|
-
type: "
|
|
128
|
+
type: "cron";
|
|
129
129
|
accountId?: string | undefined;
|
|
130
130
|
metadata?: any;
|
|
131
131
|
};
|
|
@@ -108,8 +108,8 @@ export declare class WebhookSource<TIntegration extends TriggerIntegration, TPar
|
|
|
108
108
|
get integrationConfig(): {
|
|
109
109
|
id: string;
|
|
110
110
|
metadata: {
|
|
111
|
-
name: string;
|
|
112
111
|
id: string;
|
|
112
|
+
name: string;
|
|
113
113
|
instructions?: string | undefined;
|
|
114
114
|
};
|
|
115
115
|
};
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -116,13 +116,13 @@ export declare const EventSpecificationExampleSchema: z.ZodObject<{
|
|
|
116
116
|
icon: z.ZodOptional<z.ZodString>;
|
|
117
117
|
payload: z.ZodAny;
|
|
118
118
|
}, "strip", z.ZodTypeAny, {
|
|
119
|
-
name: string;
|
|
120
119
|
id: string;
|
|
120
|
+
name: string;
|
|
121
121
|
icon?: string | undefined;
|
|
122
122
|
payload?: any;
|
|
123
123
|
}, {
|
|
124
|
-
name: string;
|
|
125
124
|
id: string;
|
|
125
|
+
name: string;
|
|
126
126
|
icon?: string | undefined;
|
|
127
127
|
payload?: any;
|
|
128
128
|
}>;
|
|
@@ -181,17 +181,17 @@ export declare function waitForEventSchema(schema: z.ZodTypeAny): z.ZodObject<{
|
|
|
181
181
|
context: z.ZodOptional<z.ZodAny>;
|
|
182
182
|
accountId: z.ZodOptional<z.ZodString>;
|
|
183
183
|
}, "strip", z.ZodTypeAny, {
|
|
184
|
+
id: string;
|
|
184
185
|
name: string;
|
|
185
186
|
source: string;
|
|
186
|
-
id: string;
|
|
187
187
|
timestamp: Date;
|
|
188
188
|
payload?: any;
|
|
189
189
|
context?: any;
|
|
190
190
|
accountId?: string | undefined;
|
|
191
191
|
}, {
|
|
192
|
+
id: string;
|
|
192
193
|
name: string;
|
|
193
194
|
source: string;
|
|
194
|
-
id: string;
|
|
195
195
|
timestamp: Date;
|
|
196
196
|
payload?: any;
|
|
197
197
|
context?: any;
|
package/dist/esm/v3/runs.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ 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
33
|
tags: string[];
|
|
34
34
|
isTest: boolean;
|
|
@@ -37,7 +37,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
37
37
|
costInCents: number;
|
|
38
38
|
baseCostInCents: number;
|
|
39
39
|
attempts: ({
|
|
40
|
-
status: "
|
|
40
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
41
41
|
id: string;
|
|
42
42
|
createdAt: Date;
|
|
43
43
|
updatedAt: Date;
|
|
@@ -81,7 +81,7 @@ 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
86
|
tags: string[];
|
|
87
87
|
isTest: boolean;
|
|
@@ -90,7 +90,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
90
90
|
costInCents: number;
|
|
91
91
|
baseCostInCents: number;
|
|
92
92
|
attempts: ({
|
|
93
|
-
status: "
|
|
93
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
94
94
|
id: string;
|
|
95
95
|
createdAt: Date;
|
|
96
96
|
updatedAt: Date;
|
|
@@ -134,7 +134,7 @@ 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
139
|
tags: string[];
|
|
140
140
|
isTest: boolean;
|
|
@@ -143,7 +143,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
143
143
|
costInCents: number;
|
|
144
144
|
baseCostInCents: number;
|
|
145
145
|
attempts: ({
|
|
146
|
-
status: "
|
|
146
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
147
147
|
id: string;
|
|
148
148
|
createdAt: Date;
|
|
149
149
|
updatedAt: Date;
|
|
@@ -185,7 +185,7 @@ 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
190
|
tags: string[];
|
|
191
191
|
isTest: boolean;
|
|
@@ -194,7 +194,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
194
194
|
costInCents: number;
|
|
195
195
|
baseCostInCents: number;
|
|
196
196
|
attempts: ({
|
|
197
|
-
status: "
|
|
197
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
198
198
|
id: string;
|
|
199
199
|
createdAt: Date;
|
|
200
200
|
updatedAt: Date;
|
|
@@ -238,7 +238,7 @@ 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
243
|
tags: string[];
|
|
244
244
|
isTest: boolean;
|
|
@@ -247,7 +247,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
247
247
|
costInCents: number;
|
|
248
248
|
baseCostInCents: number;
|
|
249
249
|
attempts: ({
|
|
250
|
-
status: "
|
|
250
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
251
251
|
id: string;
|
|
252
252
|
createdAt: Date;
|
|
253
253
|
updatedAt: Date;
|
|
@@ -291,7 +291,7 @@ 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
296
|
tags: string[];
|
|
297
297
|
isTest: boolean;
|
|
@@ -300,7 +300,7 @@ declare function poll<TRunId extends RunHandle<any> | AnyTask | string>(runId: R
|
|
|
300
300
|
costInCents: number;
|
|
301
301
|
baseCostInCents: number;
|
|
302
302
|
attempts: ({
|
|
303
|
-
status: "
|
|
303
|
+
status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
|
|
304
304
|
id: string;
|
|
305
305
|
createdAt: Date;
|
|
306
306
|
updatedAt: Date;
|
package/dist/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "
|
|
1
|
+
export const VERSION = "0.0.0-prerelease-20240905123715";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trigger.dev/sdk",
|
|
3
|
-
"version": "0.0.0-prerelease-
|
|
3
|
+
"version": "0.0.0-prerelease-20240905123715",
|
|
4
4
|
"description": "trigger.dev Node.JS SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -29,11 +29,18 @@
|
|
|
29
29
|
"@triggerdotdev/source"
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
|
+
"typesVersions": {
|
|
33
|
+
"*": {
|
|
34
|
+
"v3": [
|
|
35
|
+
"dist/commonjs/v3/index.d.ts"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
32
39
|
"dependencies": {
|
|
33
40
|
"@opentelemetry/api": "1.9.0",
|
|
34
41
|
"@opentelemetry/api-logs": "0.52.1",
|
|
35
42
|
"@opentelemetry/semantic-conventions": "1.25.1",
|
|
36
|
-
"@trigger.dev/core": "0.0.0-prerelease-
|
|
43
|
+
"@trigger.dev/core": "0.0.0-prerelease-20240905123715",
|
|
37
44
|
"chalk": "^5.2.0",
|
|
38
45
|
"cronstrue": "^2.21.0",
|
|
39
46
|
"debug": "^4.3.4",
|
|
@@ -47,6 +54,7 @@
|
|
|
47
54
|
"zod": "3.22.3"
|
|
48
55
|
},
|
|
49
56
|
"devDependencies": {
|
|
57
|
+
"@arethetypeswrong/cli": "^0.15.4",
|
|
50
58
|
"@types/debug": "^4.1.7",
|
|
51
59
|
"@types/node": "20.14.14",
|
|
52
60
|
"@types/slug": "^5.0.3",
|
|
@@ -56,9 +64,9 @@
|
|
|
56
64
|
"msw": "^2.2.1",
|
|
57
65
|
"rimraf": "^3.0.2",
|
|
58
66
|
"tshy": "^3.0.2",
|
|
67
|
+
"tsx": "4.17.0",
|
|
59
68
|
"typed-emitter": "^2.1.0",
|
|
60
|
-
"typescript": "^5.5.4"
|
|
61
|
-
"tsx": "4.17.0"
|
|
69
|
+
"typescript": "^5.5.4"
|
|
62
70
|
},
|
|
63
71
|
"engines": {
|
|
64
72
|
"node": ">=18.20.0"
|
|
@@ -96,6 +104,7 @@
|
|
|
96
104
|
"build": "tshy && pnpm run update-version",
|
|
97
105
|
"dev": "tshy --watch",
|
|
98
106
|
"typecheck": "tsc --noEmit",
|
|
99
|
-
"update-version": "tsx ../../scripts/updateVersion.ts"
|
|
107
|
+
"update-version": "tsx ../../scripts/updateVersion.ts",
|
|
108
|
+
"check-exports": "attw --pack ."
|
|
100
109
|
}
|
|
101
110
|
}
|