@trigger.dev/sdk 2.0.0-next.9 → 2.0.0
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/README.md +2 -2
- package/dist/index.d.ts +1006 -931
- package/dist/index.js +299 -121
- package/dist/index.js.map +1 -1
- package/package.json +20 -19
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
|
-
import { z } from 'zod';
|
|
2
|
+
import { z, ZodObject } from 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Represents different log levels.
|
|
@@ -15,10 +15,10 @@ declare class Logger {
|
|
|
15
15
|
constructor(name: string, level?: LogLevel, filteredKeys?: string[], jsonReplacer?: (key: string, value: unknown) => unknown);
|
|
16
16
|
filter(...keys: string[]): Logger;
|
|
17
17
|
static satisfiesLogLevel(logLevel: LogLevel, setLevel: LogLevel): boolean;
|
|
18
|
-
log(...args:
|
|
19
|
-
error(...args:
|
|
20
|
-
warn(...args:
|
|
21
|
-
info(...args:
|
|
18
|
+
log(message: string, ...args: Array<Record<string, unknown> | undefined>): void;
|
|
19
|
+
error(message: string, ...args: Array<Record<string, unknown> | undefined>): void;
|
|
20
|
+
warn(message: string, ...args: Array<Record<string, unknown> | undefined>): void;
|
|
21
|
+
info(message: string, ...args: Array<Record<string, unknown> | undefined>): void;
|
|
22
22
|
debug(message: string, ...args: Array<Record<string, unknown> | undefined>): void;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -40,7 +40,7 @@ type SerializableJson = Serializable | {
|
|
|
40
40
|
[key: string]: SerializableJson;
|
|
41
41
|
} | SerializableJson[];
|
|
42
42
|
|
|
43
|
-
declare const ServerTaskSchema: z.ZodObject<
|
|
43
|
+
declare const ServerTaskSchema: z.ZodObject<{
|
|
44
44
|
id: z.ZodString;
|
|
45
45
|
name: z.ZodString;
|
|
46
46
|
icon: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -48,22 +48,35 @@ declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
|
|
|
48
48
|
startedAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
49
49
|
completedAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
50
50
|
delayUntil: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
51
|
-
status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED"]>;
|
|
51
|
+
status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED", "CANCELED"]>;
|
|
52
52
|
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
53
|
+
params: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
|
|
53
54
|
properties: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
55
|
label: z.ZodString;
|
|
55
56
|
text: z.ZodString;
|
|
56
57
|
url: z.ZodOptional<z.ZodString>;
|
|
57
58
|
}, "strip", z.ZodTypeAny, {
|
|
58
|
-
url?: string | undefined;
|
|
59
59
|
label: string;
|
|
60
60
|
text: string;
|
|
61
|
+
url?: string | undefined;
|
|
61
62
|
}, {
|
|
63
|
+
label: string;
|
|
64
|
+
text: string;
|
|
65
|
+
url?: string | undefined;
|
|
66
|
+
}>, "many">>>;
|
|
67
|
+
outputProperties: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
68
|
+
label: z.ZodString;
|
|
69
|
+
text: z.ZodString;
|
|
70
|
+
url: z.ZodOptional<z.ZodString>;
|
|
71
|
+
}, "strip", z.ZodTypeAny, {
|
|
72
|
+
label: string;
|
|
73
|
+
text: string;
|
|
62
74
|
url?: string | undefined;
|
|
75
|
+
}, {
|
|
63
76
|
label: string;
|
|
64
77
|
text: string;
|
|
78
|
+
url?: string | undefined;
|
|
65
79
|
}>, "many">>>;
|
|
66
|
-
params: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
|
|
67
80
|
output: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
|
|
68
81
|
error: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
69
82
|
parentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -71,17 +84,22 @@ declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
|
|
|
71
84
|
style: z.ZodEnum<["normal", "minimal"]>;
|
|
72
85
|
variant: z.ZodOptional<z.ZodString>;
|
|
73
86
|
}, "strip", z.ZodTypeAny, {
|
|
74
|
-
variant?: string | undefined;
|
|
75
87
|
style: "normal" | "minimal";
|
|
76
|
-
}, {
|
|
77
88
|
variant?: string | undefined;
|
|
89
|
+
}, {
|
|
78
90
|
style: "normal" | "minimal";
|
|
91
|
+
variant?: string | undefined;
|
|
79
92
|
}>>>;
|
|
80
93
|
operation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
81
|
-
}, {
|
|
82
94
|
idempotencyKey: z.ZodString;
|
|
83
95
|
attempts: z.ZodNumber;
|
|
84
|
-
}
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
id: string;
|
|
98
|
+
name: string;
|
|
99
|
+
noop: boolean;
|
|
100
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
101
|
+
idempotencyKey: string;
|
|
102
|
+
attempts: number;
|
|
85
103
|
icon?: string | null | undefined;
|
|
86
104
|
startedAt?: Date | null | undefined;
|
|
87
105
|
completedAt?: Date | null | undefined;
|
|
@@ -89,25 +107,30 @@ declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
|
|
|
89
107
|
description?: string | null | undefined;
|
|
90
108
|
params?: DeserializedJson | undefined;
|
|
91
109
|
properties?: {
|
|
110
|
+
label: string;
|
|
111
|
+
text: string;
|
|
92
112
|
url?: string | undefined;
|
|
113
|
+
}[] | null | undefined;
|
|
114
|
+
outputProperties?: {
|
|
93
115
|
label: string;
|
|
94
116
|
text: string;
|
|
117
|
+
url?: string | undefined;
|
|
95
118
|
}[] | null | undefined;
|
|
96
119
|
output?: DeserializedJson | undefined;
|
|
97
120
|
error?: string | null | undefined;
|
|
98
121
|
parentId?: string | null | undefined;
|
|
99
122
|
style?: {
|
|
100
|
-
variant?: string | undefined;
|
|
101
123
|
style: "normal" | "minimal";
|
|
124
|
+
variant?: string | undefined;
|
|
102
125
|
} | null | undefined;
|
|
103
126
|
operation?: string | null | undefined;
|
|
127
|
+
}, {
|
|
104
128
|
id: string;
|
|
105
129
|
name: string;
|
|
106
130
|
noop: boolean;
|
|
107
|
-
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
131
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
108
132
|
idempotencyKey: string;
|
|
109
133
|
attempts: number;
|
|
110
|
-
}, {
|
|
111
134
|
icon?: string | null | undefined;
|
|
112
135
|
startedAt?: Date | null | undefined;
|
|
113
136
|
completedAt?: Date | null | undefined;
|
|
@@ -115,64 +138,68 @@ declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
|
|
|
115
138
|
description?: string | null | undefined;
|
|
116
139
|
params?: DeserializedJson | undefined;
|
|
117
140
|
properties?: {
|
|
141
|
+
label: string;
|
|
142
|
+
text: string;
|
|
118
143
|
url?: string | undefined;
|
|
144
|
+
}[] | null | undefined;
|
|
145
|
+
outputProperties?: {
|
|
119
146
|
label: string;
|
|
120
147
|
text: string;
|
|
148
|
+
url?: string | undefined;
|
|
121
149
|
}[] | null | undefined;
|
|
122
150
|
output?: DeserializedJson | undefined;
|
|
123
151
|
error?: string | null | undefined;
|
|
124
152
|
parentId?: string | null | undefined;
|
|
125
153
|
style?: {
|
|
126
|
-
variant?: string | undefined;
|
|
127
154
|
style: "normal" | "minimal";
|
|
155
|
+
variant?: string | undefined;
|
|
128
156
|
} | null | undefined;
|
|
129
157
|
operation?: string | null | undefined;
|
|
130
|
-
id: string;
|
|
131
|
-
name: string;
|
|
132
|
-
noop: boolean;
|
|
133
|
-
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
134
|
-
idempotencyKey: string;
|
|
135
|
-
attempts: number;
|
|
136
158
|
}>;
|
|
137
159
|
type ServerTask = z.infer<typeof ServerTaskSchema>;
|
|
138
160
|
declare const CachedTaskSchema: z.ZodObject<{
|
|
139
161
|
id: z.ZodString;
|
|
140
162
|
idempotencyKey: z.ZodString;
|
|
141
|
-
status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED"]>;
|
|
163
|
+
status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED", "CANCELED"]>;
|
|
142
164
|
noop: z.ZodDefault<z.ZodBoolean>;
|
|
143
165
|
output: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
|
|
144
166
|
parentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
145
167
|
}, "strip", z.ZodTypeAny, {
|
|
146
|
-
output?: DeserializedJson | undefined;
|
|
147
|
-
parentId?: string | null | undefined;
|
|
148
168
|
id: string;
|
|
149
169
|
noop: boolean;
|
|
150
|
-
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
170
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
151
171
|
idempotencyKey: string;
|
|
152
|
-
}, {
|
|
153
|
-
noop?: boolean | undefined;
|
|
154
172
|
output?: DeserializedJson | undefined;
|
|
155
173
|
parentId?: string | null | undefined;
|
|
174
|
+
}, {
|
|
156
175
|
id: string;
|
|
157
|
-
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
176
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
158
177
|
idempotencyKey: string;
|
|
178
|
+
noop?: boolean | undefined;
|
|
179
|
+
output?: DeserializedJson | undefined;
|
|
180
|
+
parentId?: string | null | undefined;
|
|
159
181
|
}>;
|
|
160
182
|
|
|
183
|
+
type Prettify<T> = {
|
|
184
|
+
[K in keyof T]: T[K];
|
|
185
|
+
} & {};
|
|
186
|
+
|
|
161
187
|
declare const UpdateTriggerSourceBodySchema: z.ZodObject<{
|
|
162
188
|
registeredEvents: z.ZodArray<z.ZodString, "many">;
|
|
163
189
|
secret: z.ZodOptional<z.ZodString>;
|
|
164
190
|
data: z.ZodOptional<z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>;
|
|
165
191
|
}, "strip", z.ZodTypeAny, {
|
|
166
|
-
data?: SerializableJson;
|
|
167
|
-
secret?: string | undefined;
|
|
168
192
|
registeredEvents: string[];
|
|
169
|
-
}, {
|
|
170
|
-
data?: SerializableJson;
|
|
171
193
|
secret?: string | undefined;
|
|
194
|
+
data?: SerializableJson;
|
|
195
|
+
}, {
|
|
172
196
|
registeredEvents: string[];
|
|
197
|
+
secret?: string | undefined;
|
|
198
|
+
data?: SerializableJson;
|
|
173
199
|
}>;
|
|
174
200
|
type UpdateTriggerSourceBody = z.infer<typeof UpdateTriggerSourceBodySchema>;
|
|
175
201
|
declare const RegisterSourceEventSchema: z.ZodObject<{
|
|
202
|
+
/** The id of the source */
|
|
176
203
|
id: z.ZodString;
|
|
177
204
|
source: z.ZodObject<{
|
|
178
205
|
key: z.ZodString;
|
|
@@ -204,9 +231,6 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
|
|
|
204
231
|
}>]>;
|
|
205
232
|
clientId: z.ZodOptional<z.ZodString>;
|
|
206
233
|
}, "strip", z.ZodTypeAny, {
|
|
207
|
-
params?: any;
|
|
208
|
-
data?: DeserializedJson | undefined;
|
|
209
|
-
clientId?: string | undefined;
|
|
210
234
|
key: string;
|
|
211
235
|
secret: string;
|
|
212
236
|
active: boolean;
|
|
@@ -218,10 +242,10 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
|
|
|
218
242
|
} | {
|
|
219
243
|
type: "SQS";
|
|
220
244
|
};
|
|
221
|
-
}, {
|
|
222
245
|
params?: any;
|
|
223
246
|
data?: DeserializedJson | undefined;
|
|
224
247
|
clientId?: string | undefined;
|
|
248
|
+
}, {
|
|
225
249
|
key: string;
|
|
226
250
|
secret: string;
|
|
227
251
|
active: boolean;
|
|
@@ -233,18 +257,17 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
|
|
|
233
257
|
} | {
|
|
234
258
|
type: "SQS";
|
|
235
259
|
};
|
|
260
|
+
params?: any;
|
|
261
|
+
data?: DeserializedJson | undefined;
|
|
262
|
+
clientId?: string | undefined;
|
|
236
263
|
}>;
|
|
237
264
|
events: z.ZodArray<z.ZodString, "many">;
|
|
238
265
|
missingEvents: z.ZodArray<z.ZodString, "many">;
|
|
239
266
|
orphanedEvents: z.ZodArray<z.ZodString, "many">;
|
|
240
267
|
dynamicTriggerId: z.ZodOptional<z.ZodString>;
|
|
241
268
|
}, "strip", z.ZodTypeAny, {
|
|
242
|
-
dynamicTriggerId?: string | undefined;
|
|
243
269
|
id: string;
|
|
244
270
|
source: {
|
|
245
|
-
params?: any;
|
|
246
|
-
data?: DeserializedJson | undefined;
|
|
247
|
-
clientId?: string | undefined;
|
|
248
271
|
key: string;
|
|
249
272
|
secret: string;
|
|
250
273
|
active: boolean;
|
|
@@ -256,17 +279,17 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
|
|
|
256
279
|
} | {
|
|
257
280
|
type: "SQS";
|
|
258
281
|
};
|
|
282
|
+
params?: any;
|
|
283
|
+
data?: DeserializedJson | undefined;
|
|
284
|
+
clientId?: string | undefined;
|
|
259
285
|
};
|
|
260
286
|
events: string[];
|
|
261
287
|
missingEvents: string[];
|
|
262
288
|
orphanedEvents: string[];
|
|
263
|
-
}, {
|
|
264
289
|
dynamicTriggerId?: string | undefined;
|
|
290
|
+
}, {
|
|
265
291
|
id: string;
|
|
266
292
|
source: {
|
|
267
|
-
params?: any;
|
|
268
|
-
data?: DeserializedJson | undefined;
|
|
269
|
-
clientId?: string | undefined;
|
|
270
293
|
key: string;
|
|
271
294
|
secret: string;
|
|
272
295
|
active: boolean;
|
|
@@ -278,10 +301,14 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
|
|
|
278
301
|
} | {
|
|
279
302
|
type: "SQS";
|
|
280
303
|
};
|
|
304
|
+
params?: any;
|
|
305
|
+
data?: DeserializedJson | undefined;
|
|
306
|
+
clientId?: string | undefined;
|
|
281
307
|
};
|
|
282
308
|
events: string[];
|
|
283
309
|
missingEvents: string[];
|
|
284
310
|
orphanedEvents: string[];
|
|
311
|
+
dynamicTriggerId?: string | undefined;
|
|
285
312
|
}>;
|
|
286
313
|
type RegisterSourceEvent = z.infer<typeof RegisterSourceEventSchema>;
|
|
287
314
|
declare const TriggerSourceSchema: z.ZodObject<{
|
|
@@ -300,15 +327,15 @@ declare const HandleTriggerSourceSchema: z.ZodObject<{
|
|
|
300
327
|
data: z.ZodAny;
|
|
301
328
|
params: z.ZodAny;
|
|
302
329
|
}, "strip", z.ZodTypeAny, {
|
|
303
|
-
params?: any;
|
|
304
|
-
data?: any;
|
|
305
330
|
key: string;
|
|
306
331
|
secret: string;
|
|
307
|
-
}, {
|
|
308
|
-
params?: any;
|
|
309
332
|
data?: any;
|
|
333
|
+
params?: any;
|
|
334
|
+
}, {
|
|
310
335
|
key: string;
|
|
311
336
|
secret: string;
|
|
337
|
+
data?: any;
|
|
338
|
+
params?: any;
|
|
312
339
|
}>;
|
|
313
340
|
type HandleTriggerSource = z.infer<typeof HandleTriggerSourceSchema>;
|
|
314
341
|
type TriggerSource = z.infer<typeof TriggerSourceSchema>;
|
|
@@ -316,11 +343,11 @@ declare const QueueOptionsSchema: z.ZodObject<{
|
|
|
316
343
|
name: z.ZodString;
|
|
317
344
|
maxConcurrent: z.ZodOptional<z.ZodNumber>;
|
|
318
345
|
}, "strip", z.ZodTypeAny, {
|
|
319
|
-
maxConcurrent?: number | undefined;
|
|
320
346
|
name: string;
|
|
321
|
-
}, {
|
|
322
347
|
maxConcurrent?: number | undefined;
|
|
348
|
+
}, {
|
|
323
349
|
name: string;
|
|
350
|
+
maxConcurrent?: number | undefined;
|
|
324
351
|
}>;
|
|
325
352
|
type QueueOptions = z.infer<typeof QueueOptionsSchema>;
|
|
326
353
|
declare const JobMetadataSchema: z.ZodObject<{
|
|
@@ -328,7 +355,7 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
328
355
|
name: z.ZodString;
|
|
329
356
|
version: z.ZodString;
|
|
330
357
|
event: z.ZodObject<{
|
|
331
|
-
name: z.ZodString
|
|
358
|
+
name: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
332
359
|
title: z.ZodString;
|
|
333
360
|
source: z.ZodString;
|
|
334
361
|
icon: z.ZodString;
|
|
@@ -338,13 +365,13 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
338
365
|
text: z.ZodString;
|
|
339
366
|
url: z.ZodOptional<z.ZodString>;
|
|
340
367
|
}, "strip", z.ZodTypeAny, {
|
|
341
|
-
url?: string | undefined;
|
|
342
368
|
label: string;
|
|
343
369
|
text: string;
|
|
344
|
-
}, {
|
|
345
370
|
url?: string | undefined;
|
|
371
|
+
}, {
|
|
346
372
|
label: string;
|
|
347
373
|
text: string;
|
|
374
|
+
url?: string | undefined;
|
|
348
375
|
}>, "many">>;
|
|
349
376
|
schema: z.ZodOptional<z.ZodAny>;
|
|
350
377
|
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -353,52 +380,52 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
353
380
|
name: z.ZodString;
|
|
354
381
|
payload: z.ZodAny;
|
|
355
382
|
}, "strip", z.ZodTypeAny, {
|
|
356
|
-
icon?: string | undefined;
|
|
357
|
-
payload?: any;
|
|
358
383
|
id: string;
|
|
359
384
|
name: string;
|
|
360
|
-
}, {
|
|
361
385
|
icon?: string | undefined;
|
|
362
386
|
payload?: any;
|
|
387
|
+
}, {
|
|
363
388
|
id: string;
|
|
364
389
|
name: string;
|
|
390
|
+
icon?: string | undefined;
|
|
391
|
+
payload?: any;
|
|
365
392
|
}>, "many">>;
|
|
366
393
|
}, "strip", z.ZodTypeAny, {
|
|
394
|
+
name: (string | string[]) & (string | string[] | undefined);
|
|
395
|
+
icon: string;
|
|
396
|
+
source: string;
|
|
397
|
+
title: string;
|
|
367
398
|
filter?: EventFilter | undefined;
|
|
368
399
|
properties?: {
|
|
369
|
-
url?: string | undefined;
|
|
370
400
|
label: string;
|
|
371
401
|
text: string;
|
|
402
|
+
url?: string | undefined;
|
|
372
403
|
}[] | undefined;
|
|
373
404
|
schema?: any;
|
|
374
405
|
examples?: {
|
|
375
|
-
icon?: string | undefined;
|
|
376
|
-
payload?: any;
|
|
377
406
|
id: string;
|
|
378
407
|
name: string;
|
|
408
|
+
icon?: string | undefined;
|
|
409
|
+
payload?: any;
|
|
379
410
|
}[] | undefined;
|
|
380
|
-
|
|
411
|
+
}, {
|
|
412
|
+
name: (string | string[]) & (string | string[] | undefined);
|
|
381
413
|
icon: string;
|
|
382
414
|
source: string;
|
|
383
415
|
title: string;
|
|
384
|
-
}, {
|
|
385
416
|
filter?: EventFilter | undefined;
|
|
386
417
|
properties?: {
|
|
387
|
-
url?: string | undefined;
|
|
388
418
|
label: string;
|
|
389
419
|
text: string;
|
|
420
|
+
url?: string | undefined;
|
|
390
421
|
}[] | undefined;
|
|
391
422
|
schema?: any;
|
|
392
423
|
examples?: {
|
|
393
|
-
icon?: string | undefined;
|
|
394
|
-
payload?: any;
|
|
395
424
|
id: string;
|
|
396
425
|
name: string;
|
|
426
|
+
icon?: string | undefined;
|
|
427
|
+
payload?: any;
|
|
397
428
|
}[] | undefined;
|
|
398
|
-
name: string;
|
|
399
|
-
icon: string;
|
|
400
|
-
source: string;
|
|
401
|
-
title: string;
|
|
402
429
|
}>;
|
|
403
430
|
trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
404
431
|
type: z.ZodLiteral<"dynamic">;
|
|
@@ -411,64 +438,64 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
411
438
|
type: "dynamic";
|
|
412
439
|
}>, z.ZodObject<{
|
|
413
440
|
type: z.ZodLiteral<"static">;
|
|
414
|
-
title: z.ZodString
|
|
441
|
+
title: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
415
442
|
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
416
443
|
label: z.ZodString;
|
|
417
444
|
text: z.ZodString;
|
|
418
445
|
url: z.ZodOptional<z.ZodString>;
|
|
419
446
|
}, "strip", z.ZodTypeAny, {
|
|
420
|
-
url?: string | undefined;
|
|
421
447
|
label: string;
|
|
422
448
|
text: string;
|
|
423
|
-
}, {
|
|
424
449
|
url?: string | undefined;
|
|
450
|
+
}, {
|
|
425
451
|
label: string;
|
|
426
452
|
text: string;
|
|
453
|
+
url?: string | undefined;
|
|
427
454
|
}>, "many">>;
|
|
428
455
|
rule: z.ZodObject<{
|
|
429
|
-
event: z.ZodString
|
|
456
|
+
event: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
430
457
|
source: z.ZodString;
|
|
431
458
|
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
432
459
|
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
433
460
|
}, "strip", z.ZodTypeAny, {
|
|
461
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
462
|
+
source: string;
|
|
434
463
|
payload?: EventFilter | undefined;
|
|
435
464
|
context?: EventFilter | undefined;
|
|
436
|
-
event: string;
|
|
437
|
-
source: string;
|
|
438
465
|
}, {
|
|
466
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
467
|
+
source: string;
|
|
439
468
|
payload?: EventFilter | undefined;
|
|
440
469
|
context?: EventFilter | undefined;
|
|
441
|
-
event: string;
|
|
442
|
-
source: string;
|
|
443
470
|
}>;
|
|
444
471
|
}, "strip", z.ZodTypeAny, {
|
|
445
|
-
properties?: {
|
|
446
|
-
url?: string | undefined;
|
|
447
|
-
label: string;
|
|
448
|
-
text: string;
|
|
449
|
-
}[] | undefined;
|
|
450
472
|
type: "static";
|
|
451
|
-
title: string;
|
|
473
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
452
474
|
rule: {
|
|
475
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
476
|
+
source: string;
|
|
453
477
|
payload?: EventFilter | undefined;
|
|
454
478
|
context?: EventFilter | undefined;
|
|
455
|
-
event: string;
|
|
456
|
-
source: string;
|
|
457
479
|
};
|
|
458
|
-
}, {
|
|
459
480
|
properties?: {
|
|
460
|
-
url?: string | undefined;
|
|
461
481
|
label: string;
|
|
462
482
|
text: string;
|
|
483
|
+
url?: string | undefined;
|
|
463
484
|
}[] | undefined;
|
|
485
|
+
}, {
|
|
464
486
|
type: "static";
|
|
465
|
-
title: string;
|
|
487
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
466
488
|
rule: {
|
|
489
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
490
|
+
source: string;
|
|
467
491
|
payload?: EventFilter | undefined;
|
|
468
492
|
context?: EventFilter | undefined;
|
|
469
|
-
event: string;
|
|
470
|
-
source: string;
|
|
471
493
|
};
|
|
494
|
+
properties?: {
|
|
495
|
+
label: string;
|
|
496
|
+
text: string;
|
|
497
|
+
url?: string | undefined;
|
|
498
|
+
}[] | undefined;
|
|
472
499
|
}>, z.ZodObject<{
|
|
473
500
|
type: z.ZodLiteral<"scheduled">;
|
|
474
501
|
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -482,17 +509,17 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
482
509
|
}>;
|
|
483
510
|
metadata: z.ZodAny;
|
|
484
511
|
}, "strip", z.ZodTypeAny, {
|
|
485
|
-
metadata?: any;
|
|
486
512
|
options: {
|
|
487
513
|
seconds: number;
|
|
488
514
|
};
|
|
489
515
|
type: "interval";
|
|
490
|
-
}, {
|
|
491
516
|
metadata?: any;
|
|
517
|
+
}, {
|
|
492
518
|
options: {
|
|
493
519
|
seconds: number;
|
|
494
520
|
};
|
|
495
521
|
type: "interval";
|
|
522
|
+
metadata?: any;
|
|
496
523
|
}>, z.ZodObject<{
|
|
497
524
|
type: z.ZodLiteral<"cron">;
|
|
498
525
|
options: z.ZodObject<{
|
|
@@ -504,47 +531,47 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
504
531
|
}>;
|
|
505
532
|
metadata: z.ZodAny;
|
|
506
533
|
}, "strip", z.ZodTypeAny, {
|
|
507
|
-
metadata?: any;
|
|
508
534
|
options: {
|
|
509
535
|
cron: string;
|
|
510
536
|
};
|
|
511
537
|
type: "cron";
|
|
512
|
-
}, {
|
|
513
538
|
metadata?: any;
|
|
539
|
+
}, {
|
|
514
540
|
options: {
|
|
515
541
|
cron: string;
|
|
516
542
|
};
|
|
517
543
|
type: "cron";
|
|
544
|
+
metadata?: any;
|
|
518
545
|
}>]>;
|
|
519
546
|
}, "strip", z.ZodTypeAny, {
|
|
520
547
|
type: "scheduled";
|
|
521
548
|
schedule: {
|
|
522
|
-
metadata?: any;
|
|
523
549
|
options: {
|
|
524
550
|
cron: string;
|
|
525
551
|
};
|
|
526
552
|
type: "cron";
|
|
527
|
-
} | {
|
|
528
553
|
metadata?: any;
|
|
554
|
+
} | {
|
|
529
555
|
options: {
|
|
530
556
|
seconds: number;
|
|
531
557
|
};
|
|
532
558
|
type: "interval";
|
|
559
|
+
metadata?: any;
|
|
533
560
|
};
|
|
534
561
|
}, {
|
|
535
562
|
type: "scheduled";
|
|
536
563
|
schedule: {
|
|
537
|
-
metadata?: any;
|
|
538
564
|
options: {
|
|
539
565
|
cron: string;
|
|
540
566
|
};
|
|
541
567
|
type: "cron";
|
|
542
|
-
} | {
|
|
543
568
|
metadata?: any;
|
|
569
|
+
} | {
|
|
544
570
|
options: {
|
|
545
571
|
seconds: number;
|
|
546
572
|
};
|
|
547
573
|
type: "interval";
|
|
574
|
+
metadata?: any;
|
|
548
575
|
};
|
|
549
576
|
}>]>;
|
|
550
577
|
integrations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -554,29 +581,29 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
554
581
|
name: z.ZodString;
|
|
555
582
|
instructions: z.ZodOptional<z.ZodString>;
|
|
556
583
|
}, "strip", z.ZodTypeAny, {
|
|
557
|
-
instructions?: string | undefined;
|
|
558
584
|
id: string;
|
|
559
585
|
name: string;
|
|
560
|
-
}, {
|
|
561
586
|
instructions?: string | undefined;
|
|
587
|
+
}, {
|
|
562
588
|
id: string;
|
|
563
589
|
name: string;
|
|
590
|
+
instructions?: string | undefined;
|
|
564
591
|
}>;
|
|
565
592
|
authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
|
|
566
593
|
}, "strip", z.ZodTypeAny, {
|
|
567
594
|
id: string;
|
|
568
595
|
metadata: {
|
|
569
|
-
instructions?: string | undefined;
|
|
570
596
|
id: string;
|
|
571
597
|
name: string;
|
|
598
|
+
instructions?: string | undefined;
|
|
572
599
|
};
|
|
573
600
|
authSource: "HOSTED" | "LOCAL";
|
|
574
601
|
}, {
|
|
575
602
|
id: string;
|
|
576
603
|
metadata: {
|
|
577
|
-
instructions?: string | undefined;
|
|
578
604
|
id: string;
|
|
579
605
|
name: string;
|
|
606
|
+
instructions?: string | undefined;
|
|
580
607
|
};
|
|
581
608
|
authSource: "HOSTED" | "LOCAL";
|
|
582
609
|
}>>;
|
|
@@ -585,81 +612,77 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
585
612
|
name: z.ZodString;
|
|
586
613
|
maxConcurrent: z.ZodOptional<z.ZodNumber>;
|
|
587
614
|
}, "strip", z.ZodTypeAny, {
|
|
588
|
-
maxConcurrent?: number | undefined;
|
|
589
615
|
name: string;
|
|
590
|
-
}, {
|
|
591
616
|
maxConcurrent?: number | undefined;
|
|
617
|
+
}, {
|
|
592
618
|
name: string;
|
|
619
|
+
maxConcurrent?: number | undefined;
|
|
593
620
|
}>, z.ZodString]>>;
|
|
594
621
|
startPosition: z.ZodEnum<["initial", "latest"]>;
|
|
595
622
|
enabled: z.ZodBoolean;
|
|
596
623
|
preprocessRuns: z.ZodBoolean;
|
|
597
624
|
}, "strip", z.ZodTypeAny, {
|
|
598
|
-
queue?: string | {
|
|
599
|
-
maxConcurrent?: number | undefined;
|
|
600
|
-
name: string;
|
|
601
|
-
} | undefined;
|
|
602
625
|
id: string;
|
|
603
626
|
name: string;
|
|
604
627
|
event: {
|
|
628
|
+
name: (string | string[]) & (string | string[] | undefined);
|
|
629
|
+
icon: string;
|
|
630
|
+
source: string;
|
|
631
|
+
title: string;
|
|
605
632
|
filter?: EventFilter | undefined;
|
|
606
633
|
properties?: {
|
|
607
|
-
url?: string | undefined;
|
|
608
634
|
label: string;
|
|
609
635
|
text: string;
|
|
636
|
+
url?: string | undefined;
|
|
610
637
|
}[] | undefined;
|
|
611
638
|
schema?: any;
|
|
612
639
|
examples?: {
|
|
613
|
-
icon?: string | undefined;
|
|
614
|
-
payload?: any;
|
|
615
640
|
id: string;
|
|
616
641
|
name: string;
|
|
642
|
+
icon?: string | undefined;
|
|
643
|
+
payload?: any;
|
|
617
644
|
}[] | undefined;
|
|
618
|
-
name: string;
|
|
619
|
-
icon: string;
|
|
620
|
-
source: string;
|
|
621
|
-
title: string;
|
|
622
645
|
};
|
|
623
646
|
version: string;
|
|
624
647
|
trigger: {
|
|
625
648
|
id: string;
|
|
626
649
|
type: "dynamic";
|
|
627
650
|
} | {
|
|
628
|
-
properties?: {
|
|
629
|
-
url?: string | undefined;
|
|
630
|
-
label: string;
|
|
631
|
-
text: string;
|
|
632
|
-
}[] | undefined;
|
|
633
651
|
type: "static";
|
|
634
|
-
title: string;
|
|
652
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
635
653
|
rule: {
|
|
654
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
655
|
+
source: string;
|
|
636
656
|
payload?: EventFilter | undefined;
|
|
637
657
|
context?: EventFilter | undefined;
|
|
638
|
-
event: string;
|
|
639
|
-
source: string;
|
|
640
658
|
};
|
|
659
|
+
properties?: {
|
|
660
|
+
label: string;
|
|
661
|
+
text: string;
|
|
662
|
+
url?: string | undefined;
|
|
663
|
+
}[] | undefined;
|
|
641
664
|
} | {
|
|
642
665
|
type: "scheduled";
|
|
643
666
|
schedule: {
|
|
644
|
-
metadata?: any;
|
|
645
667
|
options: {
|
|
646
668
|
cron: string;
|
|
647
669
|
};
|
|
648
670
|
type: "cron";
|
|
649
|
-
} | {
|
|
650
671
|
metadata?: any;
|
|
672
|
+
} | {
|
|
651
673
|
options: {
|
|
652
674
|
seconds: number;
|
|
653
675
|
};
|
|
654
676
|
type: "interval";
|
|
677
|
+
metadata?: any;
|
|
655
678
|
};
|
|
656
679
|
};
|
|
657
680
|
integrations: Record<string, {
|
|
658
681
|
id: string;
|
|
659
682
|
metadata: {
|
|
660
|
-
instructions?: string | undefined;
|
|
661
683
|
id: string;
|
|
662
684
|
name: string;
|
|
685
|
+
instructions?: string | undefined;
|
|
663
686
|
};
|
|
664
687
|
authSource: "HOSTED" | "LOCAL";
|
|
665
688
|
}>;
|
|
@@ -667,79 +690,83 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
667
690
|
startPosition: "initial" | "latest";
|
|
668
691
|
enabled: boolean;
|
|
669
692
|
preprocessRuns: boolean;
|
|
670
|
-
}, {
|
|
671
|
-
internal?: boolean | undefined;
|
|
672
693
|
queue?: string | {
|
|
673
|
-
maxConcurrent?: number | undefined;
|
|
674
694
|
name: string;
|
|
695
|
+
maxConcurrent?: number | undefined;
|
|
675
696
|
} | undefined;
|
|
697
|
+
}, {
|
|
676
698
|
id: string;
|
|
677
699
|
name: string;
|
|
678
700
|
event: {
|
|
701
|
+
name: (string | string[]) & (string | string[] | undefined);
|
|
702
|
+
icon: string;
|
|
703
|
+
source: string;
|
|
704
|
+
title: string;
|
|
679
705
|
filter?: EventFilter | undefined;
|
|
680
706
|
properties?: {
|
|
681
|
-
url?: string | undefined;
|
|
682
707
|
label: string;
|
|
683
708
|
text: string;
|
|
709
|
+
url?: string | undefined;
|
|
684
710
|
}[] | undefined;
|
|
685
711
|
schema?: any;
|
|
686
712
|
examples?: {
|
|
687
|
-
icon?: string | undefined;
|
|
688
|
-
payload?: any;
|
|
689
713
|
id: string;
|
|
690
714
|
name: string;
|
|
715
|
+
icon?: string | undefined;
|
|
716
|
+
payload?: any;
|
|
691
717
|
}[] | undefined;
|
|
692
|
-
name: string;
|
|
693
|
-
icon: string;
|
|
694
|
-
source: string;
|
|
695
|
-
title: string;
|
|
696
718
|
};
|
|
697
719
|
version: string;
|
|
698
720
|
trigger: {
|
|
699
721
|
id: string;
|
|
700
722
|
type: "dynamic";
|
|
701
723
|
} | {
|
|
702
|
-
properties?: {
|
|
703
|
-
url?: string | undefined;
|
|
704
|
-
label: string;
|
|
705
|
-
text: string;
|
|
706
|
-
}[] | undefined;
|
|
707
724
|
type: "static";
|
|
708
|
-
title: string;
|
|
725
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
709
726
|
rule: {
|
|
727
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
728
|
+
source: string;
|
|
710
729
|
payload?: EventFilter | undefined;
|
|
711
730
|
context?: EventFilter | undefined;
|
|
712
|
-
event: string;
|
|
713
|
-
source: string;
|
|
714
731
|
};
|
|
715
|
-
|
|
716
|
-
|
|
732
|
+
properties?: {
|
|
733
|
+
label: string;
|
|
734
|
+
text: string;
|
|
735
|
+
url?: string | undefined;
|
|
736
|
+
}[] | undefined;
|
|
737
|
+
} | {
|
|
738
|
+
type: "scheduled";
|
|
717
739
|
schedule: {
|
|
718
|
-
metadata?: any;
|
|
719
740
|
options: {
|
|
720
741
|
cron: string;
|
|
721
742
|
};
|
|
722
743
|
type: "cron";
|
|
723
|
-
} | {
|
|
724
744
|
metadata?: any;
|
|
745
|
+
} | {
|
|
725
746
|
options: {
|
|
726
747
|
seconds: number;
|
|
727
748
|
};
|
|
728
749
|
type: "interval";
|
|
750
|
+
metadata?: any;
|
|
729
751
|
};
|
|
730
752
|
};
|
|
731
753
|
integrations: Record<string, {
|
|
732
754
|
id: string;
|
|
733
755
|
metadata: {
|
|
734
|
-
instructions?: string | undefined;
|
|
735
756
|
id: string;
|
|
736
757
|
name: string;
|
|
758
|
+
instructions?: string | undefined;
|
|
737
759
|
};
|
|
738
760
|
authSource: "HOSTED" | "LOCAL";
|
|
739
761
|
}>;
|
|
740
762
|
startPosition: "initial" | "latest";
|
|
741
763
|
enabled: boolean;
|
|
742
764
|
preprocessRuns: boolean;
|
|
765
|
+
internal?: boolean | undefined;
|
|
766
|
+
queue?: string | {
|
|
767
|
+
name: string;
|
|
768
|
+
maxConcurrent?: number | undefined;
|
|
769
|
+
} | undefined;
|
|
743
770
|
}>;
|
|
744
771
|
type JobMetadata = z.infer<typeof JobMetadataSchema>;
|
|
745
772
|
declare const RawEventSchema: z.ZodObject<{
|
|
@@ -767,22 +794,69 @@ declare const RawEventSchema: z.ZodObject<{
|
|
|
767
794
|
this as you can filter events using this in the `eventTrigger()`. */
|
|
768
795
|
source: z.ZodOptional<z.ZodString>;
|
|
769
796
|
}, "strip", z.ZodTypeAny, {
|
|
770
|
-
|
|
797
|
+
id: string;
|
|
798
|
+
name: string;
|
|
771
799
|
payload?: any;
|
|
772
800
|
context?: any;
|
|
773
801
|
timestamp?: Date | undefined;
|
|
774
|
-
id: string;
|
|
775
|
-
name: string;
|
|
776
|
-
}, {
|
|
777
|
-
id?: string | undefined;
|
|
778
802
|
source?: string | undefined;
|
|
803
|
+
}, {
|
|
804
|
+
name: string;
|
|
779
805
|
payload?: any;
|
|
780
806
|
context?: any;
|
|
807
|
+
id?: string | undefined;
|
|
781
808
|
timestamp?: Date | undefined;
|
|
782
|
-
|
|
809
|
+
source?: string | undefined;
|
|
783
810
|
}>;
|
|
784
811
|
/** The event you wish to send to Trigger a Job */
|
|
785
812
|
type SendEvent = z.input<typeof RawEventSchema>;
|
|
813
|
+
/** The event that was sent */
|
|
814
|
+
declare const ApiEventLogSchema: z.ZodObject<{
|
|
815
|
+
/** The `id` of the event that was sent.
|
|
816
|
+
*/
|
|
817
|
+
id: z.ZodString;
|
|
818
|
+
/** The `name` of the event that was sent. */
|
|
819
|
+
name: z.ZodString;
|
|
820
|
+
/** The `payload` of the event that was sent */
|
|
821
|
+
payload: z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>;
|
|
822
|
+
/** The `context` of the event that was sent. Is `undefined` if no context was
|
|
823
|
+
set when sending the event. */
|
|
824
|
+
context: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
|
|
825
|
+
/** The `timestamp` of the event that was sent */
|
|
826
|
+
timestamp: z.ZodDate;
|
|
827
|
+
/** The timestamp when the event will be delivered to any matching Jobs. Is
|
|
828
|
+
`undefined` if `deliverAt` or `deliverAfter` wasn't set when sending the
|
|
829
|
+
event. */
|
|
830
|
+
deliverAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
831
|
+
/** The timestamp when the event was delivered. Is `undefined` if `deliverAt`
|
|
832
|
+
or `deliverAfter` were set when sending the event. */
|
|
833
|
+
deliveredAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
834
|
+
}, "strip", z.ZodTypeAny, {
|
|
835
|
+
id: string;
|
|
836
|
+
name: string;
|
|
837
|
+
payload: ((string | number | boolean | {
|
|
838
|
+
[key: string]: DeserializedJson;
|
|
839
|
+
} | DeserializedJson[]) & (string | number | boolean | {
|
|
840
|
+
[key: string]: DeserializedJson;
|
|
841
|
+
} | DeserializedJson[] | undefined)) | null;
|
|
842
|
+
timestamp: Date;
|
|
843
|
+
context?: DeserializedJson | undefined;
|
|
844
|
+
deliverAt?: Date | null | undefined;
|
|
845
|
+
deliveredAt?: Date | null | undefined;
|
|
846
|
+
}, {
|
|
847
|
+
id: string;
|
|
848
|
+
name: string;
|
|
849
|
+
payload: ((string | number | boolean | {
|
|
850
|
+
[key: string]: DeserializedJson;
|
|
851
|
+
} | DeserializedJson[]) & (string | number | boolean | {
|
|
852
|
+
[key: string]: DeserializedJson;
|
|
853
|
+
} | DeserializedJson[] | undefined)) | null;
|
|
854
|
+
timestamp: Date;
|
|
855
|
+
context?: DeserializedJson | undefined;
|
|
856
|
+
deliverAt?: Date | null | undefined;
|
|
857
|
+
deliveredAt?: Date | null | undefined;
|
|
858
|
+
}>;
|
|
859
|
+
type ApiEventLog = z.infer<typeof ApiEventLogSchema>;
|
|
786
860
|
/** Options to control the delivery of the event */
|
|
787
861
|
declare const SendEventOptionsSchema: z.ZodObject<{
|
|
788
862
|
/** An optional Date when you want the event to trigger Jobs. The event will
|
|
@@ -815,7 +889,7 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
815
889
|
name: z.ZodString;
|
|
816
890
|
version: z.ZodString;
|
|
817
891
|
event: z.ZodObject<{
|
|
818
|
-
name: z.ZodString
|
|
892
|
+
name: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
819
893
|
title: z.ZodString;
|
|
820
894
|
source: z.ZodString;
|
|
821
895
|
icon: z.ZodString;
|
|
@@ -825,13 +899,13 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
825
899
|
text: z.ZodString;
|
|
826
900
|
url: z.ZodOptional<z.ZodString>;
|
|
827
901
|
}, "strip", z.ZodTypeAny, {
|
|
828
|
-
url?: string | undefined;
|
|
829
902
|
label: string;
|
|
830
903
|
text: string;
|
|
831
|
-
}, {
|
|
832
904
|
url?: string | undefined;
|
|
905
|
+
}, {
|
|
833
906
|
label: string;
|
|
834
907
|
text: string;
|
|
908
|
+
url?: string | undefined;
|
|
835
909
|
}>, "many">>;
|
|
836
910
|
schema: z.ZodOptional<z.ZodAny>;
|
|
837
911
|
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -840,52 +914,52 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
840
914
|
name: z.ZodString;
|
|
841
915
|
payload: z.ZodAny;
|
|
842
916
|
}, "strip", z.ZodTypeAny, {
|
|
843
|
-
icon?: string | undefined;
|
|
844
|
-
payload?: any;
|
|
845
917
|
id: string;
|
|
846
918
|
name: string;
|
|
847
|
-
}, {
|
|
848
919
|
icon?: string | undefined;
|
|
849
920
|
payload?: any;
|
|
921
|
+
}, {
|
|
850
922
|
id: string;
|
|
851
923
|
name: string;
|
|
924
|
+
icon?: string | undefined;
|
|
925
|
+
payload?: any;
|
|
852
926
|
}>, "many">>;
|
|
853
927
|
}, "strip", z.ZodTypeAny, {
|
|
928
|
+
name: (string | string[]) & (string | string[] | undefined);
|
|
929
|
+
icon: string;
|
|
930
|
+
source: string;
|
|
931
|
+
title: string;
|
|
854
932
|
filter?: EventFilter | undefined;
|
|
855
933
|
properties?: {
|
|
856
|
-
url?: string | undefined;
|
|
857
934
|
label: string;
|
|
858
935
|
text: string;
|
|
936
|
+
url?: string | undefined;
|
|
859
937
|
}[] | undefined;
|
|
860
938
|
schema?: any;
|
|
861
939
|
examples?: {
|
|
862
|
-
icon?: string | undefined;
|
|
863
|
-
payload?: any;
|
|
864
940
|
id: string;
|
|
865
941
|
name: string;
|
|
942
|
+
icon?: string | undefined;
|
|
943
|
+
payload?: any;
|
|
866
944
|
}[] | undefined;
|
|
867
|
-
|
|
945
|
+
}, {
|
|
946
|
+
name: (string | string[]) & (string | string[] | undefined);
|
|
868
947
|
icon: string;
|
|
869
948
|
source: string;
|
|
870
949
|
title: string;
|
|
871
|
-
}, {
|
|
872
950
|
filter?: EventFilter | undefined;
|
|
873
951
|
properties?: {
|
|
874
|
-
url?: string | undefined;
|
|
875
952
|
label: string;
|
|
876
953
|
text: string;
|
|
954
|
+
url?: string | undefined;
|
|
877
955
|
}[] | undefined;
|
|
878
956
|
schema?: any;
|
|
879
957
|
examples?: {
|
|
880
|
-
icon?: string | undefined;
|
|
881
|
-
payload?: any;
|
|
882
958
|
id: string;
|
|
883
959
|
name: string;
|
|
960
|
+
icon?: string | undefined;
|
|
961
|
+
payload?: any;
|
|
884
962
|
}[] | undefined;
|
|
885
|
-
name: string;
|
|
886
|
-
icon: string;
|
|
887
|
-
source: string;
|
|
888
|
-
title: string;
|
|
889
963
|
}>;
|
|
890
964
|
trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
891
965
|
type: z.ZodLiteral<"dynamic">;
|
|
@@ -898,64 +972,64 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
898
972
|
type: "dynamic";
|
|
899
973
|
}>, z.ZodObject<{
|
|
900
974
|
type: z.ZodLiteral<"static">;
|
|
901
|
-
title: z.ZodString
|
|
975
|
+
title: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
902
976
|
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
903
977
|
label: z.ZodString;
|
|
904
978
|
text: z.ZodString;
|
|
905
979
|
url: z.ZodOptional<z.ZodString>;
|
|
906
980
|
}, "strip", z.ZodTypeAny, {
|
|
907
|
-
url?: string | undefined;
|
|
908
981
|
label: string;
|
|
909
982
|
text: string;
|
|
910
|
-
}, {
|
|
911
983
|
url?: string | undefined;
|
|
984
|
+
}, {
|
|
912
985
|
label: string;
|
|
913
986
|
text: string;
|
|
987
|
+
url?: string | undefined;
|
|
914
988
|
}>, "many">>;
|
|
915
989
|
rule: z.ZodObject<{
|
|
916
|
-
event: z.ZodString
|
|
990
|
+
event: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
917
991
|
source: z.ZodString;
|
|
918
992
|
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
919
993
|
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
920
994
|
}, "strip", z.ZodTypeAny, {
|
|
995
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
996
|
+
source: string;
|
|
921
997
|
payload?: EventFilter | undefined;
|
|
922
998
|
context?: EventFilter | undefined;
|
|
923
|
-
event: string;
|
|
924
|
-
source: string;
|
|
925
999
|
}, {
|
|
1000
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1001
|
+
source: string;
|
|
926
1002
|
payload?: EventFilter | undefined;
|
|
927
1003
|
context?: EventFilter | undefined;
|
|
928
|
-
event: string;
|
|
929
|
-
source: string;
|
|
930
1004
|
}>;
|
|
931
1005
|
}, "strip", z.ZodTypeAny, {
|
|
932
|
-
properties?: {
|
|
933
|
-
url?: string | undefined;
|
|
934
|
-
label: string;
|
|
935
|
-
text: string;
|
|
936
|
-
}[] | undefined;
|
|
937
1006
|
type: "static";
|
|
938
|
-
title: string;
|
|
1007
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
939
1008
|
rule: {
|
|
1009
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1010
|
+
source: string;
|
|
940
1011
|
payload?: EventFilter | undefined;
|
|
941
1012
|
context?: EventFilter | undefined;
|
|
942
|
-
event: string;
|
|
943
|
-
source: string;
|
|
944
1013
|
};
|
|
945
|
-
}, {
|
|
946
1014
|
properties?: {
|
|
947
|
-
url?: string | undefined;
|
|
948
1015
|
label: string;
|
|
949
1016
|
text: string;
|
|
1017
|
+
url?: string | undefined;
|
|
950
1018
|
}[] | undefined;
|
|
1019
|
+
}, {
|
|
951
1020
|
type: "static";
|
|
952
|
-
title: string;
|
|
1021
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
953
1022
|
rule: {
|
|
1023
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1024
|
+
source: string;
|
|
954
1025
|
payload?: EventFilter | undefined;
|
|
955
1026
|
context?: EventFilter | undefined;
|
|
956
|
-
event: string;
|
|
957
|
-
source: string;
|
|
958
1027
|
};
|
|
1028
|
+
properties?: {
|
|
1029
|
+
label: string;
|
|
1030
|
+
text: string;
|
|
1031
|
+
url?: string | undefined;
|
|
1032
|
+
}[] | undefined;
|
|
959
1033
|
}>, z.ZodObject<{
|
|
960
1034
|
type: z.ZodLiteral<"scheduled">;
|
|
961
1035
|
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -969,17 +1043,17 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
969
1043
|
}>;
|
|
970
1044
|
metadata: z.ZodAny;
|
|
971
1045
|
}, "strip", z.ZodTypeAny, {
|
|
972
|
-
metadata?: any;
|
|
973
1046
|
options: {
|
|
974
1047
|
seconds: number;
|
|
975
1048
|
};
|
|
976
1049
|
type: "interval";
|
|
977
|
-
}, {
|
|
978
1050
|
metadata?: any;
|
|
1051
|
+
}, {
|
|
979
1052
|
options: {
|
|
980
1053
|
seconds: number;
|
|
981
1054
|
};
|
|
982
1055
|
type: "interval";
|
|
1056
|
+
metadata?: any;
|
|
983
1057
|
}>, z.ZodObject<{
|
|
984
1058
|
type: z.ZodLiteral<"cron">;
|
|
985
1059
|
options: z.ZodObject<{
|
|
@@ -991,47 +1065,47 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
991
1065
|
}>;
|
|
992
1066
|
metadata: z.ZodAny;
|
|
993
1067
|
}, "strip", z.ZodTypeAny, {
|
|
994
|
-
metadata?: any;
|
|
995
1068
|
options: {
|
|
996
1069
|
cron: string;
|
|
997
1070
|
};
|
|
998
1071
|
type: "cron";
|
|
999
|
-
}, {
|
|
1000
1072
|
metadata?: any;
|
|
1073
|
+
}, {
|
|
1001
1074
|
options: {
|
|
1002
1075
|
cron: string;
|
|
1003
1076
|
};
|
|
1004
1077
|
type: "cron";
|
|
1078
|
+
metadata?: any;
|
|
1005
1079
|
}>]>;
|
|
1006
1080
|
}, "strip", z.ZodTypeAny, {
|
|
1007
1081
|
type: "scheduled";
|
|
1008
1082
|
schedule: {
|
|
1009
|
-
metadata?: any;
|
|
1010
1083
|
options: {
|
|
1011
1084
|
cron: string;
|
|
1012
1085
|
};
|
|
1013
1086
|
type: "cron";
|
|
1014
|
-
} | {
|
|
1015
1087
|
metadata?: any;
|
|
1088
|
+
} | {
|
|
1016
1089
|
options: {
|
|
1017
1090
|
seconds: number;
|
|
1018
1091
|
};
|
|
1019
1092
|
type: "interval";
|
|
1093
|
+
metadata?: any;
|
|
1020
1094
|
};
|
|
1021
1095
|
}, {
|
|
1022
1096
|
type: "scheduled";
|
|
1023
1097
|
schedule: {
|
|
1024
|
-
metadata?: any;
|
|
1025
1098
|
options: {
|
|
1026
1099
|
cron: string;
|
|
1027
1100
|
};
|
|
1028
1101
|
type: "cron";
|
|
1029
|
-
} | {
|
|
1030
1102
|
metadata?: any;
|
|
1103
|
+
} | {
|
|
1031
1104
|
options: {
|
|
1032
1105
|
seconds: number;
|
|
1033
1106
|
};
|
|
1034
1107
|
type: "interval";
|
|
1108
|
+
metadata?: any;
|
|
1035
1109
|
};
|
|
1036
1110
|
}>]>;
|
|
1037
1111
|
integrations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -1041,29 +1115,29 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1041
1115
|
name: z.ZodString;
|
|
1042
1116
|
instructions: z.ZodOptional<z.ZodString>;
|
|
1043
1117
|
}, "strip", z.ZodTypeAny, {
|
|
1044
|
-
instructions?: string | undefined;
|
|
1045
1118
|
id: string;
|
|
1046
1119
|
name: string;
|
|
1047
|
-
}, {
|
|
1048
1120
|
instructions?: string | undefined;
|
|
1121
|
+
}, {
|
|
1049
1122
|
id: string;
|
|
1050
1123
|
name: string;
|
|
1124
|
+
instructions?: string | undefined;
|
|
1051
1125
|
}>;
|
|
1052
1126
|
authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
|
|
1053
1127
|
}, "strip", z.ZodTypeAny, {
|
|
1054
1128
|
id: string;
|
|
1055
1129
|
metadata: {
|
|
1056
|
-
instructions?: string | undefined;
|
|
1057
1130
|
id: string;
|
|
1058
1131
|
name: string;
|
|
1132
|
+
instructions?: string | undefined;
|
|
1059
1133
|
};
|
|
1060
1134
|
authSource: "HOSTED" | "LOCAL";
|
|
1061
1135
|
}, {
|
|
1062
1136
|
id: string;
|
|
1063
1137
|
metadata: {
|
|
1064
|
-
instructions?: string | undefined;
|
|
1065
1138
|
id: string;
|
|
1066
1139
|
name: string;
|
|
1140
|
+
instructions?: string | undefined;
|
|
1067
1141
|
};
|
|
1068
1142
|
authSource: "HOSTED" | "LOCAL";
|
|
1069
1143
|
}>>;
|
|
@@ -1072,81 +1146,77 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1072
1146
|
name: z.ZodString;
|
|
1073
1147
|
maxConcurrent: z.ZodOptional<z.ZodNumber>;
|
|
1074
1148
|
}, "strip", z.ZodTypeAny, {
|
|
1075
|
-
maxConcurrent?: number | undefined;
|
|
1076
1149
|
name: string;
|
|
1077
|
-
}, {
|
|
1078
1150
|
maxConcurrent?: number | undefined;
|
|
1151
|
+
}, {
|
|
1079
1152
|
name: string;
|
|
1153
|
+
maxConcurrent?: number | undefined;
|
|
1080
1154
|
}>, z.ZodString]>>;
|
|
1081
1155
|
startPosition: z.ZodEnum<["initial", "latest"]>;
|
|
1082
1156
|
enabled: z.ZodBoolean;
|
|
1083
1157
|
preprocessRuns: z.ZodBoolean;
|
|
1084
1158
|
}, "strip", z.ZodTypeAny, {
|
|
1085
|
-
queue?: string | {
|
|
1086
|
-
maxConcurrent?: number | undefined;
|
|
1087
|
-
name: string;
|
|
1088
|
-
} | undefined;
|
|
1089
1159
|
id: string;
|
|
1090
1160
|
name: string;
|
|
1091
1161
|
event: {
|
|
1162
|
+
name: (string | string[]) & (string | string[] | undefined);
|
|
1163
|
+
icon: string;
|
|
1164
|
+
source: string;
|
|
1165
|
+
title: string;
|
|
1092
1166
|
filter?: EventFilter | undefined;
|
|
1093
1167
|
properties?: {
|
|
1094
|
-
url?: string | undefined;
|
|
1095
1168
|
label: string;
|
|
1096
1169
|
text: string;
|
|
1170
|
+
url?: string | undefined;
|
|
1097
1171
|
}[] | undefined;
|
|
1098
1172
|
schema?: any;
|
|
1099
1173
|
examples?: {
|
|
1100
|
-
icon?: string | undefined;
|
|
1101
|
-
payload?: any;
|
|
1102
1174
|
id: string;
|
|
1103
1175
|
name: string;
|
|
1176
|
+
icon?: string | undefined;
|
|
1177
|
+
payload?: any;
|
|
1104
1178
|
}[] | undefined;
|
|
1105
|
-
name: string;
|
|
1106
|
-
icon: string;
|
|
1107
|
-
source: string;
|
|
1108
|
-
title: string;
|
|
1109
1179
|
};
|
|
1110
1180
|
version: string;
|
|
1111
1181
|
trigger: {
|
|
1112
1182
|
id: string;
|
|
1113
1183
|
type: "dynamic";
|
|
1114
1184
|
} | {
|
|
1115
|
-
properties?: {
|
|
1116
|
-
url?: string | undefined;
|
|
1117
|
-
label: string;
|
|
1118
|
-
text: string;
|
|
1119
|
-
}[] | undefined;
|
|
1120
1185
|
type: "static";
|
|
1121
|
-
title: string;
|
|
1186
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
1122
1187
|
rule: {
|
|
1188
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1189
|
+
source: string;
|
|
1123
1190
|
payload?: EventFilter | undefined;
|
|
1124
1191
|
context?: EventFilter | undefined;
|
|
1125
|
-
event: string;
|
|
1126
|
-
source: string;
|
|
1127
1192
|
};
|
|
1193
|
+
properties?: {
|
|
1194
|
+
label: string;
|
|
1195
|
+
text: string;
|
|
1196
|
+
url?: string | undefined;
|
|
1197
|
+
}[] | undefined;
|
|
1128
1198
|
} | {
|
|
1129
1199
|
type: "scheduled";
|
|
1130
1200
|
schedule: {
|
|
1131
|
-
metadata?: any;
|
|
1132
1201
|
options: {
|
|
1133
1202
|
cron: string;
|
|
1134
1203
|
};
|
|
1135
1204
|
type: "cron";
|
|
1136
|
-
} | {
|
|
1137
1205
|
metadata?: any;
|
|
1206
|
+
} | {
|
|
1138
1207
|
options: {
|
|
1139
1208
|
seconds: number;
|
|
1140
1209
|
};
|
|
1141
1210
|
type: "interval";
|
|
1211
|
+
metadata?: any;
|
|
1142
1212
|
};
|
|
1143
1213
|
};
|
|
1144
1214
|
integrations: Record<string, {
|
|
1145
1215
|
id: string;
|
|
1146
1216
|
metadata: {
|
|
1147
|
-
instructions?: string | undefined;
|
|
1148
1217
|
id: string;
|
|
1149
1218
|
name: string;
|
|
1219
|
+
instructions?: string | undefined;
|
|
1150
1220
|
};
|
|
1151
1221
|
authSource: "HOSTED" | "LOCAL";
|
|
1152
1222
|
}>;
|
|
@@ -1154,79 +1224,83 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1154
1224
|
startPosition: "initial" | "latest";
|
|
1155
1225
|
enabled: boolean;
|
|
1156
1226
|
preprocessRuns: boolean;
|
|
1157
|
-
}, {
|
|
1158
|
-
internal?: boolean | undefined;
|
|
1159
1227
|
queue?: string | {
|
|
1160
|
-
maxConcurrent?: number | undefined;
|
|
1161
1228
|
name: string;
|
|
1229
|
+
maxConcurrent?: number | undefined;
|
|
1162
1230
|
} | undefined;
|
|
1231
|
+
}, {
|
|
1163
1232
|
id: string;
|
|
1164
1233
|
name: string;
|
|
1165
1234
|
event: {
|
|
1235
|
+
name: (string | string[]) & (string | string[] | undefined);
|
|
1236
|
+
icon: string;
|
|
1237
|
+
source: string;
|
|
1238
|
+
title: string;
|
|
1166
1239
|
filter?: EventFilter | undefined;
|
|
1167
1240
|
properties?: {
|
|
1168
|
-
url?: string | undefined;
|
|
1169
1241
|
label: string;
|
|
1170
1242
|
text: string;
|
|
1243
|
+
url?: string | undefined;
|
|
1171
1244
|
}[] | undefined;
|
|
1172
1245
|
schema?: any;
|
|
1173
1246
|
examples?: {
|
|
1174
|
-
icon?: string | undefined;
|
|
1175
|
-
payload?: any;
|
|
1176
1247
|
id: string;
|
|
1177
1248
|
name: string;
|
|
1249
|
+
icon?: string | undefined;
|
|
1250
|
+
payload?: any;
|
|
1178
1251
|
}[] | undefined;
|
|
1179
|
-
name: string;
|
|
1180
|
-
icon: string;
|
|
1181
|
-
source: string;
|
|
1182
|
-
title: string;
|
|
1183
1252
|
};
|
|
1184
1253
|
version: string;
|
|
1185
1254
|
trigger: {
|
|
1186
1255
|
id: string;
|
|
1187
1256
|
type: "dynamic";
|
|
1188
1257
|
} | {
|
|
1189
|
-
properties?: {
|
|
1190
|
-
url?: string | undefined;
|
|
1191
|
-
label: string;
|
|
1192
|
-
text: string;
|
|
1193
|
-
}[] | undefined;
|
|
1194
1258
|
type: "static";
|
|
1195
|
-
title: string;
|
|
1259
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
1196
1260
|
rule: {
|
|
1261
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1262
|
+
source: string;
|
|
1197
1263
|
payload?: EventFilter | undefined;
|
|
1198
1264
|
context?: EventFilter | undefined;
|
|
1199
|
-
event: string;
|
|
1200
|
-
source: string;
|
|
1201
1265
|
};
|
|
1266
|
+
properties?: {
|
|
1267
|
+
label: string;
|
|
1268
|
+
text: string;
|
|
1269
|
+
url?: string | undefined;
|
|
1270
|
+
}[] | undefined;
|
|
1202
1271
|
} | {
|
|
1203
1272
|
type: "scheduled";
|
|
1204
1273
|
schedule: {
|
|
1205
|
-
metadata?: any;
|
|
1206
1274
|
options: {
|
|
1207
1275
|
cron: string;
|
|
1208
1276
|
};
|
|
1209
1277
|
type: "cron";
|
|
1210
|
-
} | {
|
|
1211
1278
|
metadata?: any;
|
|
1279
|
+
} | {
|
|
1212
1280
|
options: {
|
|
1213
1281
|
seconds: number;
|
|
1214
1282
|
};
|
|
1215
1283
|
type: "interval";
|
|
1284
|
+
metadata?: any;
|
|
1216
1285
|
};
|
|
1217
1286
|
};
|
|
1218
1287
|
integrations: Record<string, {
|
|
1219
1288
|
id: string;
|
|
1220
1289
|
metadata: {
|
|
1221
|
-
instructions?: string | undefined;
|
|
1222
1290
|
id: string;
|
|
1223
1291
|
name: string;
|
|
1292
|
+
instructions?: string | undefined;
|
|
1224
1293
|
};
|
|
1225
1294
|
authSource: "HOSTED" | "LOCAL";
|
|
1226
1295
|
}>;
|
|
1227
1296
|
startPosition: "initial" | "latest";
|
|
1228
1297
|
enabled: boolean;
|
|
1229
1298
|
preprocessRuns: boolean;
|
|
1299
|
+
internal?: boolean | undefined;
|
|
1300
|
+
queue?: string | {
|
|
1301
|
+
name: string;
|
|
1302
|
+
maxConcurrent?: number | undefined;
|
|
1303
|
+
} | undefined;
|
|
1230
1304
|
}>;
|
|
1231
1305
|
event: z.ZodObject<{
|
|
1232
1306
|
/** The `id` of the event that was sent.
|
|
@@ -1249,116 +1323,119 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1249
1323
|
or `deliverAfter` were set when sending the event. */
|
|
1250
1324
|
deliveredAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
1251
1325
|
}, "strip", z.ZodTypeAny, {
|
|
1252
|
-
context?: DeserializedJson | undefined;
|
|
1253
|
-
deliverAt?: Date | null | undefined;
|
|
1254
|
-
deliveredAt?: Date | null | undefined;
|
|
1255
1326
|
id: string;
|
|
1256
1327
|
name: string;
|
|
1257
|
-
payload:
|
|
1328
|
+
payload: ((string | number | boolean | {
|
|
1329
|
+
[key: string]: DeserializedJson;
|
|
1330
|
+
} | DeserializedJson[]) & (string | number | boolean | {
|
|
1331
|
+
[key: string]: DeserializedJson;
|
|
1332
|
+
} | DeserializedJson[] | undefined)) | null;
|
|
1258
1333
|
timestamp: Date;
|
|
1259
|
-
}, {
|
|
1260
1334
|
context?: DeserializedJson | undefined;
|
|
1261
1335
|
deliverAt?: Date | null | undefined;
|
|
1262
1336
|
deliveredAt?: Date | null | undefined;
|
|
1337
|
+
}, {
|
|
1263
1338
|
id: string;
|
|
1264
1339
|
name: string;
|
|
1265
|
-
payload:
|
|
1340
|
+
payload: ((string | number | boolean | {
|
|
1341
|
+
[key: string]: DeserializedJson;
|
|
1342
|
+
} | DeserializedJson[]) & (string | number | boolean | {
|
|
1343
|
+
[key: string]: DeserializedJson;
|
|
1344
|
+
} | DeserializedJson[] | undefined)) | null;
|
|
1266
1345
|
timestamp: Date;
|
|
1346
|
+
context?: DeserializedJson | undefined;
|
|
1347
|
+
deliverAt?: Date | null | undefined;
|
|
1348
|
+
deliveredAt?: Date | null | undefined;
|
|
1267
1349
|
}>;
|
|
1268
1350
|
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1269
1351
|
label: z.ZodString;
|
|
1270
1352
|
text: z.ZodString;
|
|
1271
1353
|
url: z.ZodOptional<z.ZodString>;
|
|
1272
1354
|
}, "strip", z.ZodTypeAny, {
|
|
1273
|
-
url?: string | undefined;
|
|
1274
1355
|
label: string;
|
|
1275
1356
|
text: string;
|
|
1276
|
-
}, {
|
|
1277
1357
|
url?: string | undefined;
|
|
1358
|
+
}, {
|
|
1278
1359
|
label: string;
|
|
1279
1360
|
text: string;
|
|
1361
|
+
url?: string | undefined;
|
|
1280
1362
|
}>, "many">>;
|
|
1281
1363
|
}, "strip", z.ZodTypeAny, {
|
|
1282
|
-
properties?: {
|
|
1283
|
-
url?: string | undefined;
|
|
1284
|
-
label: string;
|
|
1285
|
-
text: string;
|
|
1286
|
-
}[] | undefined;
|
|
1287
1364
|
event: {
|
|
1288
|
-
context?: DeserializedJson | undefined;
|
|
1289
|
-
deliverAt?: Date | null | undefined;
|
|
1290
|
-
deliveredAt?: Date | null | undefined;
|
|
1291
1365
|
id: string;
|
|
1292
1366
|
name: string;
|
|
1293
|
-
payload:
|
|
1367
|
+
payload: ((string | number | boolean | {
|
|
1368
|
+
[key: string]: DeserializedJson;
|
|
1369
|
+
} | DeserializedJson[]) & (string | number | boolean | {
|
|
1370
|
+
[key: string]: DeserializedJson;
|
|
1371
|
+
} | DeserializedJson[] | undefined)) | null;
|
|
1294
1372
|
timestamp: Date;
|
|
1373
|
+
context?: DeserializedJson | undefined;
|
|
1374
|
+
deliverAt?: Date | null | undefined;
|
|
1375
|
+
deliveredAt?: Date | null | undefined;
|
|
1295
1376
|
};
|
|
1296
1377
|
job: {
|
|
1297
|
-
queue?: string | {
|
|
1298
|
-
maxConcurrent?: number | undefined;
|
|
1299
|
-
name: string;
|
|
1300
|
-
} | undefined;
|
|
1301
1378
|
id: string;
|
|
1302
1379
|
name: string;
|
|
1303
1380
|
event: {
|
|
1381
|
+
name: (string | string[]) & (string | string[] | undefined);
|
|
1382
|
+
icon: string;
|
|
1383
|
+
source: string;
|
|
1384
|
+
title: string;
|
|
1304
1385
|
filter?: EventFilter | undefined;
|
|
1305
1386
|
properties?: {
|
|
1306
|
-
url?: string | undefined;
|
|
1307
1387
|
label: string;
|
|
1308
1388
|
text: string;
|
|
1389
|
+
url?: string | undefined;
|
|
1309
1390
|
}[] | undefined;
|
|
1310
1391
|
schema?: any;
|
|
1311
1392
|
examples?: {
|
|
1312
|
-
icon?: string | undefined;
|
|
1313
|
-
payload?: any;
|
|
1314
1393
|
id: string;
|
|
1315
1394
|
name: string;
|
|
1395
|
+
icon?: string | undefined;
|
|
1396
|
+
payload?: any;
|
|
1316
1397
|
}[] | undefined;
|
|
1317
|
-
name: string;
|
|
1318
|
-
icon: string;
|
|
1319
|
-
source: string;
|
|
1320
|
-
title: string;
|
|
1321
1398
|
};
|
|
1322
1399
|
version: string;
|
|
1323
1400
|
trigger: {
|
|
1324
1401
|
id: string;
|
|
1325
1402
|
type: "dynamic";
|
|
1326
1403
|
} | {
|
|
1327
|
-
properties?: {
|
|
1328
|
-
url?: string | undefined;
|
|
1329
|
-
label: string;
|
|
1330
|
-
text: string;
|
|
1331
|
-
}[] | undefined;
|
|
1332
1404
|
type: "static";
|
|
1333
|
-
title: string;
|
|
1405
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
1334
1406
|
rule: {
|
|
1407
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1408
|
+
source: string;
|
|
1335
1409
|
payload?: EventFilter | undefined;
|
|
1336
1410
|
context?: EventFilter | undefined;
|
|
1337
|
-
event: string;
|
|
1338
|
-
source: string;
|
|
1339
1411
|
};
|
|
1412
|
+
properties?: {
|
|
1413
|
+
label: string;
|
|
1414
|
+
text: string;
|
|
1415
|
+
url?: string | undefined;
|
|
1416
|
+
}[] | undefined;
|
|
1340
1417
|
} | {
|
|
1341
1418
|
type: "scheduled";
|
|
1342
1419
|
schedule: {
|
|
1343
|
-
metadata?: any;
|
|
1344
1420
|
options: {
|
|
1345
1421
|
cron: string;
|
|
1346
1422
|
};
|
|
1347
1423
|
type: "cron";
|
|
1348
|
-
} | {
|
|
1349
1424
|
metadata?: any;
|
|
1425
|
+
} | {
|
|
1350
1426
|
options: {
|
|
1351
1427
|
seconds: number;
|
|
1352
1428
|
};
|
|
1353
1429
|
type: "interval";
|
|
1430
|
+
metadata?: any;
|
|
1354
1431
|
};
|
|
1355
1432
|
};
|
|
1356
1433
|
integrations: Record<string, {
|
|
1357
1434
|
id: string;
|
|
1358
1435
|
metadata: {
|
|
1359
|
-
instructions?: string | undefined;
|
|
1360
1436
|
id: string;
|
|
1361
1437
|
name: string;
|
|
1438
|
+
instructions?: string | undefined;
|
|
1362
1439
|
};
|
|
1363
1440
|
authSource: "HOSTED" | "LOCAL";
|
|
1364
1441
|
}>;
|
|
@@ -1366,98 +1443,111 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1366
1443
|
startPosition: "initial" | "latest";
|
|
1367
1444
|
enabled: boolean;
|
|
1368
1445
|
preprocessRuns: boolean;
|
|
1446
|
+
queue?: string | {
|
|
1447
|
+
name: string;
|
|
1448
|
+
maxConcurrent?: number | undefined;
|
|
1449
|
+
} | undefined;
|
|
1369
1450
|
};
|
|
1370
1451
|
client: string;
|
|
1371
|
-
}, {
|
|
1372
1452
|
properties?: {
|
|
1373
|
-
url?: string | undefined;
|
|
1374
1453
|
label: string;
|
|
1375
1454
|
text: string;
|
|
1455
|
+
url?: string | undefined;
|
|
1376
1456
|
}[] | undefined;
|
|
1457
|
+
}, {
|
|
1377
1458
|
event: {
|
|
1378
|
-
context?: DeserializedJson | undefined;
|
|
1379
|
-
deliverAt?: Date | null | undefined;
|
|
1380
|
-
deliveredAt?: Date | null | undefined;
|
|
1381
1459
|
id: string;
|
|
1382
1460
|
name: string;
|
|
1383
|
-
payload:
|
|
1461
|
+
payload: ((string | number | boolean | {
|
|
1462
|
+
[key: string]: DeserializedJson;
|
|
1463
|
+
} | DeserializedJson[]) & (string | number | boolean | {
|
|
1464
|
+
[key: string]: DeserializedJson;
|
|
1465
|
+
} | DeserializedJson[] | undefined)) | null;
|
|
1384
1466
|
timestamp: Date;
|
|
1467
|
+
context?: DeserializedJson | undefined;
|
|
1468
|
+
deliverAt?: Date | null | undefined;
|
|
1469
|
+
deliveredAt?: Date | null | undefined;
|
|
1385
1470
|
};
|
|
1386
1471
|
job: {
|
|
1387
|
-
internal?: boolean | undefined;
|
|
1388
|
-
queue?: string | {
|
|
1389
|
-
maxConcurrent?: number | undefined;
|
|
1390
|
-
name: string;
|
|
1391
|
-
} | undefined;
|
|
1392
1472
|
id: string;
|
|
1393
1473
|
name: string;
|
|
1394
1474
|
event: {
|
|
1475
|
+
name: (string | string[]) & (string | string[] | undefined);
|
|
1476
|
+
icon: string;
|
|
1477
|
+
source: string;
|
|
1478
|
+
title: string;
|
|
1395
1479
|
filter?: EventFilter | undefined;
|
|
1396
1480
|
properties?: {
|
|
1397
|
-
url?: string | undefined;
|
|
1398
1481
|
label: string;
|
|
1399
1482
|
text: string;
|
|
1483
|
+
url?: string | undefined;
|
|
1400
1484
|
}[] | undefined;
|
|
1401
1485
|
schema?: any;
|
|
1402
1486
|
examples?: {
|
|
1403
|
-
icon?: string | undefined;
|
|
1404
|
-
payload?: any;
|
|
1405
1487
|
id: string;
|
|
1406
1488
|
name: string;
|
|
1489
|
+
icon?: string | undefined;
|
|
1490
|
+
payload?: any;
|
|
1407
1491
|
}[] | undefined;
|
|
1408
|
-
name: string;
|
|
1409
|
-
icon: string;
|
|
1410
|
-
source: string;
|
|
1411
|
-
title: string;
|
|
1412
1492
|
};
|
|
1413
1493
|
version: string;
|
|
1414
1494
|
trigger: {
|
|
1415
1495
|
id: string;
|
|
1416
1496
|
type: "dynamic";
|
|
1417
1497
|
} | {
|
|
1418
|
-
properties?: {
|
|
1419
|
-
url?: string | undefined;
|
|
1420
|
-
label: string;
|
|
1421
|
-
text: string;
|
|
1422
|
-
}[] | undefined;
|
|
1423
1498
|
type: "static";
|
|
1424
|
-
title: string;
|
|
1499
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
1425
1500
|
rule: {
|
|
1501
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1502
|
+
source: string;
|
|
1426
1503
|
payload?: EventFilter | undefined;
|
|
1427
1504
|
context?: EventFilter | undefined;
|
|
1428
|
-
event: string;
|
|
1429
|
-
source: string;
|
|
1430
1505
|
};
|
|
1506
|
+
properties?: {
|
|
1507
|
+
label: string;
|
|
1508
|
+
text: string;
|
|
1509
|
+
url?: string | undefined;
|
|
1510
|
+
}[] | undefined;
|
|
1431
1511
|
} | {
|
|
1432
1512
|
type: "scheduled";
|
|
1433
1513
|
schedule: {
|
|
1434
|
-
metadata?: any;
|
|
1435
1514
|
options: {
|
|
1436
1515
|
cron: string;
|
|
1437
1516
|
};
|
|
1438
1517
|
type: "cron";
|
|
1439
|
-
} | {
|
|
1440
1518
|
metadata?: any;
|
|
1519
|
+
} | {
|
|
1441
1520
|
options: {
|
|
1442
1521
|
seconds: number;
|
|
1443
1522
|
};
|
|
1444
1523
|
type: "interval";
|
|
1524
|
+
metadata?: any;
|
|
1445
1525
|
};
|
|
1446
1526
|
};
|
|
1447
1527
|
integrations: Record<string, {
|
|
1448
1528
|
id: string;
|
|
1449
1529
|
metadata: {
|
|
1450
|
-
instructions?: string | undefined;
|
|
1451
1530
|
id: string;
|
|
1452
1531
|
name: string;
|
|
1532
|
+
instructions?: string | undefined;
|
|
1453
1533
|
};
|
|
1454
1534
|
authSource: "HOSTED" | "LOCAL";
|
|
1455
1535
|
}>;
|
|
1456
1536
|
startPosition: "initial" | "latest";
|
|
1457
1537
|
enabled: boolean;
|
|
1458
1538
|
preprocessRuns: boolean;
|
|
1539
|
+
internal?: boolean | undefined;
|
|
1540
|
+
queue?: string | {
|
|
1541
|
+
name: string;
|
|
1542
|
+
maxConcurrent?: number | undefined;
|
|
1543
|
+
} | undefined;
|
|
1459
1544
|
};
|
|
1460
1545
|
client: string;
|
|
1546
|
+
properties?: {
|
|
1547
|
+
label: string;
|
|
1548
|
+
text: string;
|
|
1549
|
+
url?: string | undefined;
|
|
1550
|
+
}[] | undefined;
|
|
1461
1551
|
}>;
|
|
1462
1552
|
type CreateRunBody = z.infer<typeof CreateRunBodySchema>;
|
|
1463
1553
|
declare const RedactStringSchema: z.ZodObject<{
|
|
@@ -1519,13 +1609,13 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
|
1519
1609
|
text: z.ZodString;
|
|
1520
1610
|
url: z.ZodOptional<z.ZodString>;
|
|
1521
1611
|
}, "strip", z.ZodTypeAny, {
|
|
1522
|
-
url?: string | undefined;
|
|
1523
1612
|
label: string;
|
|
1524
1613
|
text: string;
|
|
1525
|
-
}, {
|
|
1526
1614
|
url?: string | undefined;
|
|
1615
|
+
}, {
|
|
1527
1616
|
label: string;
|
|
1528
1617
|
text: string;
|
|
1618
|
+
url?: string | undefined;
|
|
1529
1619
|
}>, "many">>;
|
|
1530
1620
|
/** The input params to the Task, will be displayed in the logs */
|
|
1531
1621
|
params: z.ZodAny;
|
|
@@ -1534,11 +1624,11 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
|
1534
1624
|
style: z.ZodEnum<["normal", "minimal"]>;
|
|
1535
1625
|
variant: z.ZodOptional<z.ZodString>;
|
|
1536
1626
|
}, "strip", z.ZodTypeAny, {
|
|
1537
|
-
variant?: string | undefined;
|
|
1538
1627
|
style: "normal" | "minimal";
|
|
1539
|
-
}, {
|
|
1540
1628
|
variant?: string | undefined;
|
|
1629
|
+
}, {
|
|
1541
1630
|
style: "normal" | "minimal";
|
|
1631
|
+
variant?: string | undefined;
|
|
1542
1632
|
}>>;
|
|
1543
1633
|
/** Allows you to link the Integration connection in the logs. This is handled automatically in integrations. */
|
|
1544
1634
|
connectionKey: z.ZodOptional<z.ZodString>;
|
|
@@ -1564,64 +1654,64 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
|
1564
1654
|
type: "dynamic";
|
|
1565
1655
|
}>, z.ZodObject<{
|
|
1566
1656
|
type: z.ZodLiteral<"static">;
|
|
1567
|
-
title: z.ZodString
|
|
1657
|
+
title: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1568
1658
|
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1569
1659
|
label: z.ZodString;
|
|
1570
1660
|
text: z.ZodString;
|
|
1571
1661
|
url: z.ZodOptional<z.ZodString>;
|
|
1572
1662
|
}, "strip", z.ZodTypeAny, {
|
|
1573
|
-
url?: string | undefined;
|
|
1574
1663
|
label: string;
|
|
1575
1664
|
text: string;
|
|
1576
|
-
}, {
|
|
1577
1665
|
url?: string | undefined;
|
|
1666
|
+
}, {
|
|
1578
1667
|
label: string;
|
|
1579
1668
|
text: string;
|
|
1669
|
+
url?: string | undefined;
|
|
1580
1670
|
}>, "many">>;
|
|
1581
1671
|
rule: z.ZodObject<{
|
|
1582
|
-
event: z.ZodString
|
|
1672
|
+
event: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1583
1673
|
source: z.ZodString;
|
|
1584
1674
|
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
1585
1675
|
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
1586
1676
|
}, "strip", z.ZodTypeAny, {
|
|
1677
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1678
|
+
source: string;
|
|
1587
1679
|
payload?: EventFilter | undefined;
|
|
1588
1680
|
context?: EventFilter | undefined;
|
|
1589
|
-
event: string;
|
|
1590
|
-
source: string;
|
|
1591
1681
|
}, {
|
|
1682
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1683
|
+
source: string;
|
|
1592
1684
|
payload?: EventFilter | undefined;
|
|
1593
1685
|
context?: EventFilter | undefined;
|
|
1594
|
-
event: string;
|
|
1595
|
-
source: string;
|
|
1596
1686
|
}>;
|
|
1597
1687
|
}, "strip", z.ZodTypeAny, {
|
|
1598
|
-
properties?: {
|
|
1599
|
-
url?: string | undefined;
|
|
1600
|
-
label: string;
|
|
1601
|
-
text: string;
|
|
1602
|
-
}[] | undefined;
|
|
1603
1688
|
type: "static";
|
|
1604
|
-
title: string;
|
|
1689
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
1605
1690
|
rule: {
|
|
1691
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1692
|
+
source: string;
|
|
1606
1693
|
payload?: EventFilter | undefined;
|
|
1607
1694
|
context?: EventFilter | undefined;
|
|
1608
|
-
event: string;
|
|
1609
|
-
source: string;
|
|
1610
1695
|
};
|
|
1611
|
-
}, {
|
|
1612
1696
|
properties?: {
|
|
1613
|
-
url?: string | undefined;
|
|
1614
1697
|
label: string;
|
|
1615
1698
|
text: string;
|
|
1699
|
+
url?: string | undefined;
|
|
1616
1700
|
}[] | undefined;
|
|
1701
|
+
}, {
|
|
1617
1702
|
type: "static";
|
|
1618
|
-
title: string;
|
|
1703
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
1619
1704
|
rule: {
|
|
1705
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1706
|
+
source: string;
|
|
1620
1707
|
payload?: EventFilter | undefined;
|
|
1621
1708
|
context?: EventFilter | undefined;
|
|
1622
|
-
event: string;
|
|
1623
|
-
source: string;
|
|
1624
1709
|
};
|
|
1710
|
+
properties?: {
|
|
1711
|
+
label: string;
|
|
1712
|
+
text: string;
|
|
1713
|
+
url?: string | undefined;
|
|
1714
|
+
}[] | undefined;
|
|
1625
1715
|
}>, z.ZodObject<{
|
|
1626
1716
|
type: z.ZodLiteral<"scheduled">;
|
|
1627
1717
|
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -1635,17 +1725,17 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
|
1635
1725
|
}>;
|
|
1636
1726
|
metadata: z.ZodAny;
|
|
1637
1727
|
}, "strip", z.ZodTypeAny, {
|
|
1638
|
-
metadata?: any;
|
|
1639
1728
|
options: {
|
|
1640
1729
|
seconds: number;
|
|
1641
1730
|
};
|
|
1642
1731
|
type: "interval";
|
|
1643
|
-
}, {
|
|
1644
1732
|
metadata?: any;
|
|
1733
|
+
}, {
|
|
1645
1734
|
options: {
|
|
1646
1735
|
seconds: number;
|
|
1647
1736
|
};
|
|
1648
1737
|
type: "interval";
|
|
1738
|
+
metadata?: any;
|
|
1649
1739
|
}>, z.ZodObject<{
|
|
1650
1740
|
type: z.ZodLiteral<"cron">;
|
|
1651
1741
|
options: z.ZodObject<{
|
|
@@ -1657,97 +1747,114 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
|
1657
1747
|
}>;
|
|
1658
1748
|
metadata: z.ZodAny;
|
|
1659
1749
|
}, "strip", z.ZodTypeAny, {
|
|
1660
|
-
metadata?: any;
|
|
1661
1750
|
options: {
|
|
1662
1751
|
cron: string;
|
|
1663
1752
|
};
|
|
1664
1753
|
type: "cron";
|
|
1665
|
-
}, {
|
|
1666
1754
|
metadata?: any;
|
|
1755
|
+
}, {
|
|
1667
1756
|
options: {
|
|
1668
1757
|
cron: string;
|
|
1669
1758
|
};
|
|
1670
1759
|
type: "cron";
|
|
1760
|
+
metadata?: any;
|
|
1671
1761
|
}>]>;
|
|
1672
1762
|
}, "strip", z.ZodTypeAny, {
|
|
1673
1763
|
type: "scheduled";
|
|
1674
1764
|
schedule: {
|
|
1675
|
-
metadata?: any;
|
|
1676
1765
|
options: {
|
|
1677
1766
|
cron: string;
|
|
1678
1767
|
};
|
|
1679
1768
|
type: "cron";
|
|
1680
|
-
} | {
|
|
1681
1769
|
metadata?: any;
|
|
1770
|
+
} | {
|
|
1682
1771
|
options: {
|
|
1683
1772
|
seconds: number;
|
|
1684
1773
|
};
|
|
1685
1774
|
type: "interval";
|
|
1775
|
+
metadata?: any;
|
|
1686
1776
|
};
|
|
1687
1777
|
}, {
|
|
1688
1778
|
type: "scheduled";
|
|
1689
1779
|
schedule: {
|
|
1690
|
-
metadata?: any;
|
|
1691
1780
|
options: {
|
|
1692
1781
|
cron: string;
|
|
1693
1782
|
};
|
|
1694
1783
|
type: "cron";
|
|
1695
|
-
} | {
|
|
1696
1784
|
metadata?: any;
|
|
1785
|
+
} | {
|
|
1697
1786
|
options: {
|
|
1698
1787
|
seconds: number;
|
|
1699
1788
|
};
|
|
1700
1789
|
type: "interval";
|
|
1790
|
+
metadata?: any;
|
|
1701
1791
|
};
|
|
1702
1792
|
}>]>>;
|
|
1703
1793
|
}, "strip", z.ZodTypeAny, {
|
|
1704
|
-
|
|
1794
|
+
name: string;
|
|
1795
|
+
noop: boolean;
|
|
1705
1796
|
delayUntil?: Date | undefined;
|
|
1797
|
+
retry?: {
|
|
1798
|
+
limit?: number | undefined;
|
|
1799
|
+
factor?: number | undefined;
|
|
1800
|
+
minTimeoutInMs?: number | undefined;
|
|
1801
|
+
maxTimeoutInMs?: number | undefined;
|
|
1802
|
+
randomize?: boolean | undefined;
|
|
1803
|
+
} | undefined;
|
|
1804
|
+
icon?: string | undefined;
|
|
1805
|
+
displayKey?: string | undefined;
|
|
1706
1806
|
description?: string | undefined;
|
|
1707
|
-
params?: any;
|
|
1708
1807
|
properties?: {
|
|
1709
|
-
url?: string | undefined;
|
|
1710
1808
|
label: string;
|
|
1711
1809
|
text: string;
|
|
1810
|
+
url?: string | undefined;
|
|
1712
1811
|
}[] | undefined;
|
|
1812
|
+
params?: any;
|
|
1713
1813
|
style?: {
|
|
1714
|
-
variant?: string | undefined;
|
|
1715
1814
|
style: "normal" | "minimal";
|
|
1815
|
+
variant?: string | undefined;
|
|
1716
1816
|
} | undefined;
|
|
1817
|
+
connectionKey?: string | undefined;
|
|
1717
1818
|
operation?: "fetch" | undefined;
|
|
1819
|
+
redact?: {
|
|
1820
|
+
paths: string[];
|
|
1821
|
+
} | undefined;
|
|
1718
1822
|
trigger?: {
|
|
1719
1823
|
id: string;
|
|
1720
1824
|
type: "dynamic";
|
|
1721
1825
|
} | {
|
|
1722
|
-
properties?: {
|
|
1723
|
-
url?: string | undefined;
|
|
1724
|
-
label: string;
|
|
1725
|
-
text: string;
|
|
1726
|
-
}[] | undefined;
|
|
1727
1826
|
type: "static";
|
|
1728
|
-
title: string;
|
|
1827
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
1729
1828
|
rule: {
|
|
1829
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1830
|
+
source: string;
|
|
1730
1831
|
payload?: EventFilter | undefined;
|
|
1731
1832
|
context?: EventFilter | undefined;
|
|
1732
|
-
event: string;
|
|
1733
|
-
source: string;
|
|
1734
1833
|
};
|
|
1834
|
+
properties?: {
|
|
1835
|
+
label: string;
|
|
1836
|
+
text: string;
|
|
1837
|
+
url?: string | undefined;
|
|
1838
|
+
}[] | undefined;
|
|
1735
1839
|
} | {
|
|
1736
1840
|
type: "scheduled";
|
|
1737
1841
|
schedule: {
|
|
1738
|
-
metadata?: any;
|
|
1739
1842
|
options: {
|
|
1740
1843
|
cron: string;
|
|
1741
1844
|
};
|
|
1742
1845
|
type: "cron";
|
|
1743
|
-
} | {
|
|
1744
1846
|
metadata?: any;
|
|
1847
|
+
} | {
|
|
1745
1848
|
options: {
|
|
1746
1849
|
seconds: number;
|
|
1747
1850
|
};
|
|
1748
1851
|
type: "interval";
|
|
1852
|
+
metadata?: any;
|
|
1749
1853
|
};
|
|
1750
1854
|
} | undefined;
|
|
1855
|
+
}, {
|
|
1856
|
+
name: string;
|
|
1857
|
+
delayUntil?: Date | undefined;
|
|
1751
1858
|
retry?: {
|
|
1752
1859
|
limit?: number | undefined;
|
|
1753
1860
|
factor?: number | undefined;
|
|
@@ -1755,155 +1862,91 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
|
1755
1862
|
maxTimeoutInMs?: number | undefined;
|
|
1756
1863
|
randomize?: boolean | undefined;
|
|
1757
1864
|
} | undefined;
|
|
1758
|
-
displayKey?: string | undefined;
|
|
1759
|
-
connectionKey?: string | undefined;
|
|
1760
|
-
redact?: {
|
|
1761
|
-
paths: string[];
|
|
1762
|
-
} | undefined;
|
|
1763
|
-
name: string;
|
|
1764
|
-
noop: boolean;
|
|
1765
|
-
}, {
|
|
1766
1865
|
icon?: string | undefined;
|
|
1767
|
-
|
|
1768
|
-
delayUntil?: Date | undefined;
|
|
1866
|
+
displayKey?: string | undefined;
|
|
1769
1867
|
description?: string | undefined;
|
|
1770
|
-
params?: any;
|
|
1771
1868
|
properties?: {
|
|
1772
|
-
url?: string | undefined;
|
|
1773
1869
|
label: string;
|
|
1774
1870
|
text: string;
|
|
1871
|
+
url?: string | undefined;
|
|
1775
1872
|
}[] | undefined;
|
|
1873
|
+
params?: any;
|
|
1776
1874
|
style?: {
|
|
1777
|
-
variant?: string | undefined;
|
|
1778
1875
|
style: "normal" | "minimal";
|
|
1876
|
+
variant?: string | undefined;
|
|
1779
1877
|
} | undefined;
|
|
1878
|
+
connectionKey?: string | undefined;
|
|
1780
1879
|
operation?: "fetch" | undefined;
|
|
1880
|
+
noop?: boolean | undefined;
|
|
1881
|
+
redact?: {
|
|
1882
|
+
paths: string[];
|
|
1883
|
+
} | undefined;
|
|
1781
1884
|
trigger?: {
|
|
1782
1885
|
id: string;
|
|
1783
1886
|
type: "dynamic";
|
|
1784
1887
|
} | {
|
|
1785
|
-
properties?: {
|
|
1786
|
-
url?: string | undefined;
|
|
1787
|
-
label: string;
|
|
1788
|
-
text: string;
|
|
1789
|
-
}[] | undefined;
|
|
1790
1888
|
type: "static";
|
|
1791
|
-
title: string;
|
|
1889
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
1792
1890
|
rule: {
|
|
1891
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1892
|
+
source: string;
|
|
1793
1893
|
payload?: EventFilter | undefined;
|
|
1794
1894
|
context?: EventFilter | undefined;
|
|
1795
|
-
event: string;
|
|
1796
|
-
source: string;
|
|
1797
1895
|
};
|
|
1896
|
+
properties?: {
|
|
1897
|
+
label: string;
|
|
1898
|
+
text: string;
|
|
1899
|
+
url?: string | undefined;
|
|
1900
|
+
}[] | undefined;
|
|
1798
1901
|
} | {
|
|
1799
1902
|
type: "scheduled";
|
|
1800
1903
|
schedule: {
|
|
1801
|
-
metadata?: any;
|
|
1802
1904
|
options: {
|
|
1803
1905
|
cron: string;
|
|
1804
1906
|
};
|
|
1805
1907
|
type: "cron";
|
|
1806
|
-
} | {
|
|
1807
1908
|
metadata?: any;
|
|
1909
|
+
} | {
|
|
1808
1910
|
options: {
|
|
1809
1911
|
seconds: number;
|
|
1810
1912
|
};
|
|
1811
1913
|
type: "interval";
|
|
1914
|
+
metadata?: any;
|
|
1812
1915
|
};
|
|
1813
1916
|
} | undefined;
|
|
1814
|
-
retry?: {
|
|
1815
|
-
limit?: number | undefined;
|
|
1816
|
-
factor?: number | undefined;
|
|
1817
|
-
minTimeoutInMs?: number | undefined;
|
|
1818
|
-
maxTimeoutInMs?: number | undefined;
|
|
1819
|
-
randomize?: boolean | undefined;
|
|
1820
|
-
} | undefined;
|
|
1821
|
-
displayKey?: string | undefined;
|
|
1822
|
-
connectionKey?: string | undefined;
|
|
1823
|
-
redact?: {
|
|
1824
|
-
paths: string[];
|
|
1825
|
-
} | undefined;
|
|
1826
|
-
name: string;
|
|
1827
1917
|
}>;
|
|
1828
1918
|
type RunTaskOptions = z.input<typeof RunTaskOptionsSchema>;
|
|
1829
|
-
declare const RunTaskBodyInputSchema: z.ZodObject<
|
|
1830
|
-
/** The name of the Task is required. This is displayed on the Task in the logs. */
|
|
1919
|
+
declare const RunTaskBodyInputSchema: z.ZodObject<{
|
|
1831
1920
|
name: z.ZodString;
|
|
1832
|
-
|
|
1921
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1922
|
+
noop: z.ZodDefault<z.ZodBoolean>;
|
|
1833
1923
|
delayUntil: z.ZodOptional<z.ZodDate>;
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
/** The minimum amount of time to wait before retrying the request. */
|
|
1841
|
-
minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
1842
|
-
/** The maximum amount of time to wait before retrying the request. */
|
|
1843
|
-
maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
1844
|
-
/** Whether to randomize the retry time. */
|
|
1845
|
-
randomize: z.ZodOptional<z.ZodBoolean>;
|
|
1924
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1925
|
+
params: z.ZodAny;
|
|
1926
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1927
|
+
label: z.ZodString;
|
|
1928
|
+
text: z.ZodString;
|
|
1929
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1846
1930
|
}, "strip", z.ZodTypeAny, {
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
maxTimeoutInMs?: number | undefined;
|
|
1851
|
-
randomize?: boolean | undefined;
|
|
1931
|
+
label: string;
|
|
1932
|
+
text: string;
|
|
1933
|
+
url?: string | undefined;
|
|
1852
1934
|
}, {
|
|
1853
|
-
limit?: number | undefined;
|
|
1854
|
-
factor?: number | undefined;
|
|
1855
|
-
minTimeoutInMs?: number | undefined;
|
|
1856
|
-
maxTimeoutInMs?: number | undefined;
|
|
1857
|
-
randomize?: boolean | undefined;
|
|
1858
|
-
}>>;
|
|
1859
|
-
/** The icon for the Task, it will appear in the logs.
|
|
1860
|
-
* You can use the name of a company in lowercase, e.g. "github".
|
|
1861
|
-
* Or any icon name that [Font Awesome](https://fontawesome.com/icons) supports. */
|
|
1862
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
1863
|
-
/** The key for the Task that you want to appear in the logs */
|
|
1864
|
-
displayKey: z.ZodOptional<z.ZodString>;
|
|
1865
|
-
/** A description of the Task */
|
|
1866
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1867
|
-
/** Properties that are displayed in the logs */
|
|
1868
|
-
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1869
|
-
label: z.ZodString;
|
|
1870
|
-
text: z.ZodString;
|
|
1871
|
-
url: z.ZodOptional<z.ZodString>;
|
|
1872
|
-
}, "strip", z.ZodTypeAny, {
|
|
1873
|
-
url?: string | undefined;
|
|
1874
1935
|
label: string;
|
|
1875
1936
|
text: string;
|
|
1876
|
-
}, {
|
|
1877
1937
|
url?: string | undefined;
|
|
1878
|
-
label: string;
|
|
1879
|
-
text: string;
|
|
1880
1938
|
}>, "many">>;
|
|
1881
|
-
/** The input params to the Task, will be displayed in the logs */
|
|
1882
|
-
params: z.ZodAny;
|
|
1883
|
-
/** The style of the log entry. */
|
|
1884
1939
|
style: z.ZodOptional<z.ZodObject<{
|
|
1885
1940
|
style: z.ZodEnum<["normal", "minimal"]>;
|
|
1886
1941
|
variant: z.ZodOptional<z.ZodString>;
|
|
1887
1942
|
}, "strip", z.ZodTypeAny, {
|
|
1888
|
-
variant?: string | undefined;
|
|
1889
1943
|
style: "normal" | "minimal";
|
|
1890
|
-
}, {
|
|
1891
1944
|
variant?: string | undefined;
|
|
1945
|
+
}, {
|
|
1892
1946
|
style: "normal" | "minimal";
|
|
1947
|
+
variant?: string | undefined;
|
|
1893
1948
|
}>>;
|
|
1894
|
-
/** Allows you to link the Integration connection in the logs. This is handled automatically in integrations. */
|
|
1895
|
-
connectionKey: z.ZodOptional<z.ZodString>;
|
|
1896
|
-
/** An operation you want to perform on the Trigger.dev platform, current only "fetch" is supported. If you wish to `fetch` use [`io.backgroundFetch()`](https://trigger.dev/docs/sdk/io/backgroundfetch) instead. */
|
|
1897
1949
|
operation: z.ZodOptional<z.ZodEnum<["fetch"]>>;
|
|
1898
|
-
/** A No Operation means that the code won't be executed. This is used internally to implement features like [io.wait()](https://trigger.dev/docs/sdk/io/wait). */
|
|
1899
|
-
noop: z.ZodDefault<z.ZodBoolean>;
|
|
1900
|
-
redact: z.ZodOptional<z.ZodObject<{
|
|
1901
|
-
paths: z.ZodArray<z.ZodString, "many">;
|
|
1902
|
-
}, "strip", z.ZodTypeAny, {
|
|
1903
|
-
paths: string[];
|
|
1904
|
-
}, {
|
|
1905
|
-
paths: string[];
|
|
1906
|
-
}>>;
|
|
1907
1950
|
trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1908
1951
|
type: z.ZodLiteral<"dynamic">;
|
|
1909
1952
|
id: z.ZodString;
|
|
@@ -1915,64 +1958,64 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
|
|
|
1915
1958
|
type: "dynamic";
|
|
1916
1959
|
}>, z.ZodObject<{
|
|
1917
1960
|
type: z.ZodLiteral<"static">;
|
|
1918
|
-
title: z.ZodString
|
|
1961
|
+
title: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1919
1962
|
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1920
1963
|
label: z.ZodString;
|
|
1921
1964
|
text: z.ZodString;
|
|
1922
1965
|
url: z.ZodOptional<z.ZodString>;
|
|
1923
1966
|
}, "strip", z.ZodTypeAny, {
|
|
1924
|
-
url?: string | undefined;
|
|
1925
1967
|
label: string;
|
|
1926
1968
|
text: string;
|
|
1927
|
-
}, {
|
|
1928
1969
|
url?: string | undefined;
|
|
1970
|
+
}, {
|
|
1929
1971
|
label: string;
|
|
1930
1972
|
text: string;
|
|
1973
|
+
url?: string | undefined;
|
|
1931
1974
|
}>, "many">>;
|
|
1932
1975
|
rule: z.ZodObject<{
|
|
1933
|
-
event: z.ZodString
|
|
1976
|
+
event: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1934
1977
|
source: z.ZodString;
|
|
1935
1978
|
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
1936
1979
|
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
1937
1980
|
}, "strip", z.ZodTypeAny, {
|
|
1981
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1982
|
+
source: string;
|
|
1938
1983
|
payload?: EventFilter | undefined;
|
|
1939
1984
|
context?: EventFilter | undefined;
|
|
1940
|
-
event: string;
|
|
1941
|
-
source: string;
|
|
1942
1985
|
}, {
|
|
1986
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1987
|
+
source: string;
|
|
1943
1988
|
payload?: EventFilter | undefined;
|
|
1944
1989
|
context?: EventFilter | undefined;
|
|
1945
|
-
event: string;
|
|
1946
|
-
source: string;
|
|
1947
1990
|
}>;
|
|
1948
1991
|
}, "strip", z.ZodTypeAny, {
|
|
1949
|
-
properties?: {
|
|
1950
|
-
url?: string | undefined;
|
|
1951
|
-
label: string;
|
|
1952
|
-
text: string;
|
|
1953
|
-
}[] | undefined;
|
|
1954
1992
|
type: "static";
|
|
1955
|
-
title: string;
|
|
1993
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
1956
1994
|
rule: {
|
|
1995
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
1996
|
+
source: string;
|
|
1957
1997
|
payload?: EventFilter | undefined;
|
|
1958
1998
|
context?: EventFilter | undefined;
|
|
1959
|
-
event: string;
|
|
1960
|
-
source: string;
|
|
1961
1999
|
};
|
|
1962
|
-
}, {
|
|
1963
2000
|
properties?: {
|
|
1964
|
-
url?: string | undefined;
|
|
1965
2001
|
label: string;
|
|
1966
2002
|
text: string;
|
|
2003
|
+
url?: string | undefined;
|
|
1967
2004
|
}[] | undefined;
|
|
2005
|
+
}, {
|
|
1968
2006
|
type: "static";
|
|
1969
|
-
title: string;
|
|
2007
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
1970
2008
|
rule: {
|
|
2009
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
2010
|
+
source: string;
|
|
1971
2011
|
payload?: EventFilter | undefined;
|
|
1972
2012
|
context?: EventFilter | undefined;
|
|
1973
|
-
event: string;
|
|
1974
|
-
source: string;
|
|
1975
2013
|
};
|
|
2014
|
+
properties?: {
|
|
2015
|
+
label: string;
|
|
2016
|
+
text: string;
|
|
2017
|
+
url?: string | undefined;
|
|
2018
|
+
}[] | undefined;
|
|
1976
2019
|
}>, z.ZodObject<{
|
|
1977
2020
|
type: z.ZodLiteral<"scheduled">;
|
|
1978
2021
|
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -1986,17 +2029,17 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
|
|
|
1986
2029
|
}>;
|
|
1987
2030
|
metadata: z.ZodAny;
|
|
1988
2031
|
}, "strip", z.ZodTypeAny, {
|
|
1989
|
-
metadata?: any;
|
|
1990
2032
|
options: {
|
|
1991
2033
|
seconds: number;
|
|
1992
2034
|
};
|
|
1993
2035
|
type: "interval";
|
|
1994
|
-
}, {
|
|
1995
2036
|
metadata?: any;
|
|
2037
|
+
}, {
|
|
1996
2038
|
options: {
|
|
1997
2039
|
seconds: number;
|
|
1998
2040
|
};
|
|
1999
2041
|
type: "interval";
|
|
2042
|
+
metadata?: any;
|
|
2000
2043
|
}>, z.ZodObject<{
|
|
2001
2044
|
type: z.ZodLiteral<"cron">;
|
|
2002
2045
|
options: z.ZodObject<{
|
|
@@ -2008,99 +2051,133 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
|
|
|
2008
2051
|
}>;
|
|
2009
2052
|
metadata: z.ZodAny;
|
|
2010
2053
|
}, "strip", z.ZodTypeAny, {
|
|
2011
|
-
metadata?: any;
|
|
2012
2054
|
options: {
|
|
2013
2055
|
cron: string;
|
|
2014
2056
|
};
|
|
2015
2057
|
type: "cron";
|
|
2016
|
-
}, {
|
|
2017
2058
|
metadata?: any;
|
|
2059
|
+
}, {
|
|
2018
2060
|
options: {
|
|
2019
2061
|
cron: string;
|
|
2020
2062
|
};
|
|
2021
2063
|
type: "cron";
|
|
2064
|
+
metadata?: any;
|
|
2022
2065
|
}>]>;
|
|
2023
2066
|
}, "strip", z.ZodTypeAny, {
|
|
2024
2067
|
type: "scheduled";
|
|
2025
2068
|
schedule: {
|
|
2026
|
-
metadata?: any;
|
|
2027
2069
|
options: {
|
|
2028
2070
|
cron: string;
|
|
2029
2071
|
};
|
|
2030
2072
|
type: "cron";
|
|
2031
|
-
} | {
|
|
2032
2073
|
metadata?: any;
|
|
2074
|
+
} | {
|
|
2033
2075
|
options: {
|
|
2034
2076
|
seconds: number;
|
|
2035
2077
|
};
|
|
2036
2078
|
type: "interval";
|
|
2079
|
+
metadata?: any;
|
|
2037
2080
|
};
|
|
2038
2081
|
}, {
|
|
2039
2082
|
type: "scheduled";
|
|
2040
2083
|
schedule: {
|
|
2041
|
-
metadata?: any;
|
|
2042
2084
|
options: {
|
|
2043
2085
|
cron: string;
|
|
2044
2086
|
};
|
|
2045
2087
|
type: "cron";
|
|
2046
|
-
} | {
|
|
2047
2088
|
metadata?: any;
|
|
2089
|
+
} | {
|
|
2048
2090
|
options: {
|
|
2049
2091
|
seconds: number;
|
|
2050
2092
|
};
|
|
2051
2093
|
type: "interval";
|
|
2094
|
+
metadata?: any;
|
|
2052
2095
|
};
|
|
2053
2096
|
}>]>>;
|
|
2054
|
-
|
|
2097
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
2098
|
+
/** The maximum number of times to retry the request. */
|
|
2099
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
2100
|
+
/** The exponential factor to use when calculating the next retry time. */
|
|
2101
|
+
factor: z.ZodOptional<z.ZodNumber>;
|
|
2102
|
+
/** The minimum amount of time to wait before retrying the request. */
|
|
2103
|
+
minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
2104
|
+
/** The maximum amount of time to wait before retrying the request. */
|
|
2105
|
+
maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
2106
|
+
/** Whether to randomize the retry time. */
|
|
2107
|
+
randomize: z.ZodOptional<z.ZodBoolean>;
|
|
2108
|
+
}, "strip", z.ZodTypeAny, {
|
|
2109
|
+
limit?: number | undefined;
|
|
2110
|
+
factor?: number | undefined;
|
|
2111
|
+
minTimeoutInMs?: number | undefined;
|
|
2112
|
+
maxTimeoutInMs?: number | undefined;
|
|
2113
|
+
randomize?: boolean | undefined;
|
|
2114
|
+
}, {
|
|
2115
|
+
limit?: number | undefined;
|
|
2116
|
+
factor?: number | undefined;
|
|
2117
|
+
minTimeoutInMs?: number | undefined;
|
|
2118
|
+
maxTimeoutInMs?: number | undefined;
|
|
2119
|
+
randomize?: boolean | undefined;
|
|
2120
|
+
}>>;
|
|
2121
|
+
displayKey: z.ZodOptional<z.ZodString>;
|
|
2122
|
+
connectionKey: z.ZodOptional<z.ZodString>;
|
|
2123
|
+
redact: z.ZodOptional<z.ZodObject<{
|
|
2124
|
+
paths: z.ZodArray<z.ZodString, "many">;
|
|
2125
|
+
}, "strip", z.ZodTypeAny, {
|
|
2126
|
+
paths: string[];
|
|
2127
|
+
}, {
|
|
2128
|
+
paths: string[];
|
|
2129
|
+
}>>;
|
|
2055
2130
|
idempotencyKey: z.ZodString;
|
|
2056
2131
|
parentId: z.ZodOptional<z.ZodString>;
|
|
2057
|
-
}
|
|
2132
|
+
}, "strip", z.ZodTypeAny, {
|
|
2133
|
+
name: string;
|
|
2134
|
+
noop: boolean;
|
|
2135
|
+
idempotencyKey: string;
|
|
2058
2136
|
icon?: string | undefined;
|
|
2059
2137
|
delayUntil?: Date | undefined;
|
|
2060
2138
|
description?: string | undefined;
|
|
2061
2139
|
params?: any;
|
|
2062
2140
|
properties?: {
|
|
2063
|
-
url?: string | undefined;
|
|
2064
2141
|
label: string;
|
|
2065
2142
|
text: string;
|
|
2143
|
+
url?: string | undefined;
|
|
2066
2144
|
}[] | undefined;
|
|
2067
|
-
parentId?: string | undefined;
|
|
2068
2145
|
style?: {
|
|
2069
|
-
variant?: string | undefined;
|
|
2070
2146
|
style: "normal" | "minimal";
|
|
2147
|
+
variant?: string | undefined;
|
|
2071
2148
|
} | undefined;
|
|
2072
2149
|
operation?: "fetch" | undefined;
|
|
2073
2150
|
trigger?: {
|
|
2074
2151
|
id: string;
|
|
2075
2152
|
type: "dynamic";
|
|
2076
2153
|
} | {
|
|
2077
|
-
properties?: {
|
|
2078
|
-
url?: string | undefined;
|
|
2079
|
-
label: string;
|
|
2080
|
-
text: string;
|
|
2081
|
-
}[] | undefined;
|
|
2082
2154
|
type: "static";
|
|
2083
|
-
title: string;
|
|
2155
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
2084
2156
|
rule: {
|
|
2157
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
2158
|
+
source: string;
|
|
2085
2159
|
payload?: EventFilter | undefined;
|
|
2086
2160
|
context?: EventFilter | undefined;
|
|
2087
|
-
event: string;
|
|
2088
|
-
source: string;
|
|
2089
2161
|
};
|
|
2162
|
+
properties?: {
|
|
2163
|
+
label: string;
|
|
2164
|
+
text: string;
|
|
2165
|
+
url?: string | undefined;
|
|
2166
|
+
}[] | undefined;
|
|
2090
2167
|
} | {
|
|
2091
2168
|
type: "scheduled";
|
|
2092
2169
|
schedule: {
|
|
2093
|
-
metadata?: any;
|
|
2094
2170
|
options: {
|
|
2095
2171
|
cron: string;
|
|
2096
2172
|
};
|
|
2097
2173
|
type: "cron";
|
|
2098
|
-
} | {
|
|
2099
2174
|
metadata?: any;
|
|
2175
|
+
} | {
|
|
2100
2176
|
options: {
|
|
2101
2177
|
seconds: number;
|
|
2102
2178
|
};
|
|
2103
2179
|
type: "interval";
|
|
2180
|
+
metadata?: any;
|
|
2104
2181
|
};
|
|
2105
2182
|
} | undefined;
|
|
2106
2183
|
retry?: {
|
|
@@ -2115,57 +2192,56 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
|
|
|
2115
2192
|
redact?: {
|
|
2116
2193
|
paths: string[];
|
|
2117
2194
|
} | undefined;
|
|
2195
|
+
parentId?: string | undefined;
|
|
2196
|
+
}, {
|
|
2118
2197
|
name: string;
|
|
2119
|
-
noop: boolean;
|
|
2120
2198
|
idempotencyKey: string;
|
|
2121
|
-
}, {
|
|
2122
2199
|
icon?: string | undefined;
|
|
2123
2200
|
noop?: boolean | undefined;
|
|
2124
2201
|
delayUntil?: Date | undefined;
|
|
2125
2202
|
description?: string | undefined;
|
|
2126
2203
|
params?: any;
|
|
2127
2204
|
properties?: {
|
|
2128
|
-
url?: string | undefined;
|
|
2129
2205
|
label: string;
|
|
2130
2206
|
text: string;
|
|
2207
|
+
url?: string | undefined;
|
|
2131
2208
|
}[] | undefined;
|
|
2132
|
-
parentId?: string | undefined;
|
|
2133
2209
|
style?: {
|
|
2134
|
-
variant?: string | undefined;
|
|
2135
2210
|
style: "normal" | "minimal";
|
|
2211
|
+
variant?: string | undefined;
|
|
2136
2212
|
} | undefined;
|
|
2137
2213
|
operation?: "fetch" | undefined;
|
|
2138
2214
|
trigger?: {
|
|
2139
2215
|
id: string;
|
|
2140
2216
|
type: "dynamic";
|
|
2141
2217
|
} | {
|
|
2142
|
-
properties?: {
|
|
2143
|
-
url?: string | undefined;
|
|
2144
|
-
label: string;
|
|
2145
|
-
text: string;
|
|
2146
|
-
}[] | undefined;
|
|
2147
2218
|
type: "static";
|
|
2148
|
-
title: string;
|
|
2219
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
2149
2220
|
rule: {
|
|
2221
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
2222
|
+
source: string;
|
|
2150
2223
|
payload?: EventFilter | undefined;
|
|
2151
2224
|
context?: EventFilter | undefined;
|
|
2152
|
-
event: string;
|
|
2153
|
-
source: string;
|
|
2154
2225
|
};
|
|
2226
|
+
properties?: {
|
|
2227
|
+
label: string;
|
|
2228
|
+
text: string;
|
|
2229
|
+
url?: string | undefined;
|
|
2230
|
+
}[] | undefined;
|
|
2155
2231
|
} | {
|
|
2156
2232
|
type: "scheduled";
|
|
2157
2233
|
schedule: {
|
|
2158
|
-
metadata?: any;
|
|
2159
2234
|
options: {
|
|
2160
2235
|
cron: string;
|
|
2161
2236
|
};
|
|
2162
2237
|
type: "cron";
|
|
2163
|
-
} | {
|
|
2164
2238
|
metadata?: any;
|
|
2239
|
+
} | {
|
|
2165
2240
|
options: {
|
|
2166
2241
|
seconds: number;
|
|
2167
2242
|
};
|
|
2168
2243
|
type: "interval";
|
|
2244
|
+
metadata?: any;
|
|
2169
2245
|
};
|
|
2170
2246
|
} | undefined;
|
|
2171
2247
|
retry?: {
|
|
@@ -2180,289 +2256,77 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
|
|
|
2180
2256
|
redact?: {
|
|
2181
2257
|
paths: string[];
|
|
2182
2258
|
} | undefined;
|
|
2183
|
-
|
|
2184
|
-
idempotencyKey: string;
|
|
2259
|
+
parentId?: string | undefined;
|
|
2185
2260
|
}>;
|
|
2186
2261
|
type RunTaskBodyInput = z.infer<typeof RunTaskBodyInputSchema>;
|
|
2187
|
-
declare const CompleteTaskBodyInputSchema: z.ZodObject<
|
|
2188
|
-
/** The name of the Task is required. This is displayed on the Task in the logs. */
|
|
2189
|
-
name: z.ZodString;
|
|
2190
|
-
/** The Task will wait and only start at the specified Date */
|
|
2191
|
-
delayUntil: z.ZodOptional<z.ZodDate>;
|
|
2192
|
-
/** Retry options */
|
|
2193
|
-
retry: z.ZodOptional<z.ZodObject<{
|
|
2194
|
-
/** The maximum number of times to retry the request. */
|
|
2195
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
2196
|
-
/** The exponential factor to use when calculating the next retry time. */
|
|
2197
|
-
factor: z.ZodOptional<z.ZodNumber>;
|
|
2198
|
-
/** The minimum amount of time to wait before retrying the request. */
|
|
2199
|
-
minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
2200
|
-
/** The maximum amount of time to wait before retrying the request. */
|
|
2201
|
-
maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
2202
|
-
/** Whether to randomize the retry time. */
|
|
2203
|
-
randomize: z.ZodOptional<z.ZodBoolean>;
|
|
2204
|
-
}, "strip", z.ZodTypeAny, {
|
|
2205
|
-
limit?: number | undefined;
|
|
2206
|
-
factor?: number | undefined;
|
|
2207
|
-
minTimeoutInMs?: number | undefined;
|
|
2208
|
-
maxTimeoutInMs?: number | undefined;
|
|
2209
|
-
randomize?: boolean | undefined;
|
|
2210
|
-
}, {
|
|
2211
|
-
limit?: number | undefined;
|
|
2212
|
-
factor?: number | undefined;
|
|
2213
|
-
minTimeoutInMs?: number | undefined;
|
|
2214
|
-
maxTimeoutInMs?: number | undefined;
|
|
2215
|
-
randomize?: boolean | undefined;
|
|
2216
|
-
}>>;
|
|
2217
|
-
/** The icon for the Task, it will appear in the logs.
|
|
2218
|
-
* You can use the name of a company in lowercase, e.g. "github".
|
|
2219
|
-
* Or any icon name that [Font Awesome](https://fontawesome.com/icons) supports. */
|
|
2220
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
2221
|
-
/** The key for the Task that you want to appear in the logs */
|
|
2222
|
-
displayKey: z.ZodOptional<z.ZodString>;
|
|
2223
|
-
/** A description of the Task */
|
|
2262
|
+
declare const CompleteTaskBodyInputSchema: z.ZodObject<{
|
|
2224
2263
|
description: z.ZodOptional<z.ZodString>;
|
|
2225
|
-
|
|
2264
|
+
params: z.ZodAny;
|
|
2226
2265
|
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2227
2266
|
label: z.ZodString;
|
|
2228
2267
|
text: z.ZodString;
|
|
2229
2268
|
url: z.ZodOptional<z.ZodString>;
|
|
2230
2269
|
}, "strip", z.ZodTypeAny, {
|
|
2231
|
-
url?: string | undefined;
|
|
2232
2270
|
label: string;
|
|
2233
2271
|
text: string;
|
|
2234
|
-
}, {
|
|
2235
2272
|
url?: string | undefined;
|
|
2273
|
+
}, {
|
|
2236
2274
|
label: string;
|
|
2237
2275
|
text: string;
|
|
2276
|
+
url?: string | undefined;
|
|
2238
2277
|
}>, "many">>;
|
|
2239
|
-
/** The input params to the Task, will be displayed in the logs */
|
|
2240
|
-
params: z.ZodAny;
|
|
2241
|
-
/** The style of the log entry. */
|
|
2242
|
-
style: z.ZodOptional<z.ZodObject<{
|
|
2243
|
-
style: z.ZodEnum<["normal", "minimal"]>;
|
|
2244
|
-
variant: z.ZodOptional<z.ZodString>;
|
|
2245
|
-
}, "strip", z.ZodTypeAny, {
|
|
2246
|
-
variant?: string | undefined;
|
|
2247
|
-
style: "normal" | "minimal";
|
|
2248
|
-
}, {
|
|
2249
|
-
variant?: string | undefined;
|
|
2250
|
-
style: "normal" | "minimal";
|
|
2251
|
-
}>>;
|
|
2252
|
-
/** Allows you to link the Integration connection in the logs. This is handled automatically in integrations. */
|
|
2253
|
-
connectionKey: z.ZodOptional<z.ZodString>;
|
|
2254
|
-
/** An operation you want to perform on the Trigger.dev platform, current only "fetch" is supported. If you wish to `fetch` use [`io.backgroundFetch()`](https://trigger.dev/docs/sdk/io/backgroundfetch) instead. */
|
|
2255
|
-
operation: z.ZodOptional<z.ZodEnum<["fetch"]>>;
|
|
2256
|
-
/** A No Operation means that the code won't be executed. This is used internally to implement features like [io.wait()](https://trigger.dev/docs/sdk/io/wait). */
|
|
2257
|
-
noop: z.ZodDefault<z.ZodBoolean>;
|
|
2258
|
-
redact: z.ZodOptional<z.ZodObject<{
|
|
2259
|
-
paths: z.ZodArray<z.ZodString, "many">;
|
|
2260
|
-
}, "strip", z.ZodTypeAny, {
|
|
2261
|
-
paths: string[];
|
|
2262
|
-
}, {
|
|
2263
|
-
paths: string[];
|
|
2264
|
-
}>>;
|
|
2265
|
-
trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2266
|
-
type: z.ZodLiteral<"dynamic">;
|
|
2267
|
-
id: z.ZodString;
|
|
2268
|
-
}, "strip", z.ZodTypeAny, {
|
|
2269
|
-
id: string;
|
|
2270
|
-
type: "dynamic";
|
|
2271
|
-
}, {
|
|
2272
|
-
id: string;
|
|
2273
|
-
type: "dynamic";
|
|
2274
|
-
}>, z.ZodObject<{
|
|
2275
|
-
type: z.ZodLiteral<"static">;
|
|
2276
|
-
title: z.ZodString;
|
|
2277
|
-
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2278
|
-
label: z.ZodString;
|
|
2279
|
-
text: z.ZodString;
|
|
2280
|
-
url: z.ZodOptional<z.ZodString>;
|
|
2281
|
-
}, "strip", z.ZodTypeAny, {
|
|
2282
|
-
url?: string | undefined;
|
|
2283
|
-
label: string;
|
|
2284
|
-
text: string;
|
|
2285
|
-
}, {
|
|
2286
|
-
url?: string | undefined;
|
|
2287
|
-
label: string;
|
|
2288
|
-
text: string;
|
|
2289
|
-
}>, "many">>;
|
|
2290
|
-
rule: z.ZodObject<{
|
|
2291
|
-
event: z.ZodString;
|
|
2292
|
-
source: z.ZodString;
|
|
2293
|
-
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
2294
|
-
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
2295
|
-
}, "strip", z.ZodTypeAny, {
|
|
2296
|
-
payload?: EventFilter | undefined;
|
|
2297
|
-
context?: EventFilter | undefined;
|
|
2298
|
-
event: string;
|
|
2299
|
-
source: string;
|
|
2300
|
-
}, {
|
|
2301
|
-
payload?: EventFilter | undefined;
|
|
2302
|
-
context?: EventFilter | undefined;
|
|
2303
|
-
event: string;
|
|
2304
|
-
source: string;
|
|
2305
|
-
}>;
|
|
2306
|
-
}, "strip", z.ZodTypeAny, {
|
|
2307
|
-
properties?: {
|
|
2308
|
-
url?: string | undefined;
|
|
2309
|
-
label: string;
|
|
2310
|
-
text: string;
|
|
2311
|
-
}[] | undefined;
|
|
2312
|
-
type: "static";
|
|
2313
|
-
title: string;
|
|
2314
|
-
rule: {
|
|
2315
|
-
payload?: EventFilter | undefined;
|
|
2316
|
-
context?: EventFilter | undefined;
|
|
2317
|
-
event: string;
|
|
2318
|
-
source: string;
|
|
2319
|
-
};
|
|
2320
|
-
}, {
|
|
2321
|
-
properties?: {
|
|
2322
|
-
url?: string | undefined;
|
|
2323
|
-
label: string;
|
|
2324
|
-
text: string;
|
|
2325
|
-
}[] | undefined;
|
|
2326
|
-
type: "static";
|
|
2327
|
-
title: string;
|
|
2328
|
-
rule: {
|
|
2329
|
-
payload?: EventFilter | undefined;
|
|
2330
|
-
context?: EventFilter | undefined;
|
|
2331
|
-
event: string;
|
|
2332
|
-
source: string;
|
|
2333
|
-
};
|
|
2334
|
-
}>, z.ZodObject<{
|
|
2335
|
-
type: z.ZodLiteral<"scheduled">;
|
|
2336
|
-
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2337
|
-
type: z.ZodLiteral<"interval">;
|
|
2338
|
-
options: z.ZodObject<{
|
|
2339
|
-
seconds: z.ZodNumber;
|
|
2340
|
-
}, "strip", z.ZodTypeAny, {
|
|
2341
|
-
seconds: number;
|
|
2342
|
-
}, {
|
|
2343
|
-
seconds: number;
|
|
2344
|
-
}>;
|
|
2345
|
-
metadata: z.ZodAny;
|
|
2346
|
-
}, "strip", z.ZodTypeAny, {
|
|
2347
|
-
metadata?: any;
|
|
2348
|
-
options: {
|
|
2349
|
-
seconds: number;
|
|
2350
|
-
};
|
|
2351
|
-
type: "interval";
|
|
2352
|
-
}, {
|
|
2353
|
-
metadata?: any;
|
|
2354
|
-
options: {
|
|
2355
|
-
seconds: number;
|
|
2356
|
-
};
|
|
2357
|
-
type: "interval";
|
|
2358
|
-
}>, z.ZodObject<{
|
|
2359
|
-
type: z.ZodLiteral<"cron">;
|
|
2360
|
-
options: z.ZodObject<{
|
|
2361
|
-
cron: z.ZodString;
|
|
2362
|
-
}, "strip", z.ZodTypeAny, {
|
|
2363
|
-
cron: string;
|
|
2364
|
-
}, {
|
|
2365
|
-
cron: string;
|
|
2366
|
-
}>;
|
|
2367
|
-
metadata: z.ZodAny;
|
|
2368
|
-
}, "strip", z.ZodTypeAny, {
|
|
2369
|
-
metadata?: any;
|
|
2370
|
-
options: {
|
|
2371
|
-
cron: string;
|
|
2372
|
-
};
|
|
2373
|
-
type: "cron";
|
|
2374
|
-
}, {
|
|
2375
|
-
metadata?: any;
|
|
2376
|
-
options: {
|
|
2377
|
-
cron: string;
|
|
2378
|
-
};
|
|
2379
|
-
type: "cron";
|
|
2380
|
-
}>]>;
|
|
2381
|
-
}, "strip", z.ZodTypeAny, {
|
|
2382
|
-
type: "scheduled";
|
|
2383
|
-
schedule: {
|
|
2384
|
-
metadata?: any;
|
|
2385
|
-
options: {
|
|
2386
|
-
cron: string;
|
|
2387
|
-
};
|
|
2388
|
-
type: "cron";
|
|
2389
|
-
} | {
|
|
2390
|
-
metadata?: any;
|
|
2391
|
-
options: {
|
|
2392
|
-
seconds: number;
|
|
2393
|
-
};
|
|
2394
|
-
type: "interval";
|
|
2395
|
-
};
|
|
2396
|
-
}, {
|
|
2397
|
-
type: "scheduled";
|
|
2398
|
-
schedule: {
|
|
2399
|
-
metadata?: any;
|
|
2400
|
-
options: {
|
|
2401
|
-
cron: string;
|
|
2402
|
-
};
|
|
2403
|
-
type: "cron";
|
|
2404
|
-
} | {
|
|
2405
|
-
metadata?: any;
|
|
2406
|
-
options: {
|
|
2407
|
-
seconds: number;
|
|
2408
|
-
};
|
|
2409
|
-
type: "interval";
|
|
2410
|
-
};
|
|
2411
|
-
}>]>>;
|
|
2412
|
-
}, {
|
|
2413
|
-
idempotencyKey: z.ZodString;
|
|
2414
|
-
parentId: z.ZodOptional<z.ZodString>;
|
|
2415
|
-
}>, "description" | "params" | "properties">, {
|
|
2416
2278
|
output: z.ZodEffects<z.ZodOptional<z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>, string | number | boolean | {
|
|
2417
2279
|
[key: string]: DeserializedJson;
|
|
2418
2280
|
} | DeserializedJson[] | null, SerializableJson>;
|
|
2419
|
-
}
|
|
2281
|
+
}, "strip", z.ZodTypeAny, {
|
|
2282
|
+
output: ((string | number | boolean | {
|
|
2283
|
+
[key: string]: DeserializedJson;
|
|
2284
|
+
} | DeserializedJson[]) & (string | number | boolean | {
|
|
2285
|
+
[key: string]: DeserializedJson;
|
|
2286
|
+
} | DeserializedJson[] | undefined)) | null;
|
|
2420
2287
|
description?: string | undefined;
|
|
2421
2288
|
params?: any;
|
|
2422
2289
|
properties?: {
|
|
2423
|
-
url?: string | undefined;
|
|
2424
2290
|
label: string;
|
|
2425
2291
|
text: string;
|
|
2292
|
+
url?: string | undefined;
|
|
2426
2293
|
}[] | undefined;
|
|
2427
|
-
output: string | number | boolean | {
|
|
2428
|
-
[key: string]: DeserializedJson;
|
|
2429
|
-
} | DeserializedJson[] | null;
|
|
2430
2294
|
}, {
|
|
2431
2295
|
description?: string | undefined;
|
|
2432
2296
|
params?: any;
|
|
2433
2297
|
properties?: {
|
|
2434
|
-
url?: string | undefined;
|
|
2435
2298
|
label: string;
|
|
2436
2299
|
text: string;
|
|
2300
|
+
url?: string | undefined;
|
|
2437
2301
|
}[] | undefined;
|
|
2438
2302
|
output?: SerializableJson;
|
|
2439
2303
|
}>;
|
|
2440
|
-
type CompleteTaskBodyInput = z.input<typeof CompleteTaskBodyInputSchema
|
|
2304
|
+
type CompleteTaskBodyInput = Prettify<z.input<typeof CompleteTaskBodyInputSchema>>;
|
|
2441
2305
|
declare const FailTaskBodyInputSchema: z.ZodObject<{
|
|
2442
2306
|
error: z.ZodObject<{
|
|
2443
2307
|
message: z.ZodString;
|
|
2444
2308
|
name: z.ZodOptional<z.ZodString>;
|
|
2445
2309
|
stack: z.ZodOptional<z.ZodString>;
|
|
2446
2310
|
}, "strip", z.ZodTypeAny, {
|
|
2311
|
+
message: string;
|
|
2447
2312
|
name?: string | undefined;
|
|
2448
2313
|
stack?: string | undefined;
|
|
2449
|
-
message: string;
|
|
2450
2314
|
}, {
|
|
2315
|
+
message: string;
|
|
2451
2316
|
name?: string | undefined;
|
|
2452
2317
|
stack?: string | undefined;
|
|
2453
|
-
message: string;
|
|
2454
2318
|
}>;
|
|
2455
2319
|
}, "strip", z.ZodTypeAny, {
|
|
2456
2320
|
error: {
|
|
2321
|
+
message: string;
|
|
2457
2322
|
name?: string | undefined;
|
|
2458
2323
|
stack?: string | undefined;
|
|
2459
|
-
message: string;
|
|
2460
2324
|
};
|
|
2461
2325
|
}, {
|
|
2462
2326
|
error: {
|
|
2327
|
+
message: string;
|
|
2463
2328
|
name?: string | undefined;
|
|
2464
2329
|
stack?: string | undefined;
|
|
2465
|
-
message: string;
|
|
2466
2330
|
};
|
|
2467
2331
|
}>;
|
|
2468
2332
|
type FailTaskBodyInput = z.infer<typeof FailTaskBodyInputSchema>;
|
|
@@ -2473,17 +2337,17 @@ declare const NormalizedRequestSchema: z.ZodObject<{
|
|
|
2473
2337
|
url: z.ZodString;
|
|
2474
2338
|
body: z.ZodAny;
|
|
2475
2339
|
}, "strip", z.ZodTypeAny, {
|
|
2476
|
-
body?: any;
|
|
2477
2340
|
url: string;
|
|
2478
2341
|
method: string;
|
|
2479
2342
|
headers: Record<string, string>;
|
|
2480
2343
|
query: Record<string, string>;
|
|
2481
|
-
}, {
|
|
2482
2344
|
body?: any;
|
|
2345
|
+
}, {
|
|
2483
2346
|
url: string;
|
|
2484
2347
|
method: string;
|
|
2485
2348
|
headers: Record<string, string>;
|
|
2486
2349
|
query: Record<string, string>;
|
|
2350
|
+
body?: any;
|
|
2487
2351
|
}>;
|
|
2488
2352
|
type NormalizedRequest = z.infer<typeof NormalizedRequestSchema>;
|
|
2489
2353
|
declare const NormalizedResponseSchema: z.ZodObject<{
|
|
@@ -2491,31 +2355,31 @@ declare const NormalizedResponseSchema: z.ZodObject<{
|
|
|
2491
2355
|
body: z.ZodAny;
|
|
2492
2356
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2493
2357
|
}, "strip", z.ZodTypeAny, {
|
|
2494
|
-
headers?: Record<string, string> | undefined;
|
|
2495
|
-
body?: any;
|
|
2496
2358
|
status: number;
|
|
2497
|
-
}, {
|
|
2498
|
-
headers?: Record<string, string> | undefined;
|
|
2499
2359
|
body?: any;
|
|
2360
|
+
headers?: Record<string, string> | undefined;
|
|
2361
|
+
}, {
|
|
2500
2362
|
status: number;
|
|
2363
|
+
body?: any;
|
|
2364
|
+
headers?: Record<string, string> | undefined;
|
|
2501
2365
|
}>;
|
|
2502
2366
|
type NormalizedResponse = z.infer<typeof NormalizedResponseSchema>;
|
|
2503
2367
|
declare const RegisterTriggerBodySchema: z.ZodObject<{
|
|
2504
2368
|
rule: z.ZodObject<{
|
|
2505
|
-
event: z.ZodString
|
|
2369
|
+
event: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
2506
2370
|
source: z.ZodString;
|
|
2507
2371
|
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
2508
2372
|
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
2509
2373
|
}, "strip", z.ZodTypeAny, {
|
|
2374
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
2375
|
+
source: string;
|
|
2510
2376
|
payload?: EventFilter | undefined;
|
|
2511
2377
|
context?: EventFilter | undefined;
|
|
2512
|
-
event: string;
|
|
2513
|
-
source: string;
|
|
2514
2378
|
}, {
|
|
2379
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
2380
|
+
source: string;
|
|
2515
2381
|
payload?: EventFilter | undefined;
|
|
2516
2382
|
context?: EventFilter | undefined;
|
|
2517
|
-
event: string;
|
|
2518
|
-
source: string;
|
|
2519
2383
|
}>;
|
|
2520
2384
|
source: z.ZodObject<{
|
|
2521
2385
|
channel: z.ZodEnum<["HTTP", "SQS", "SMTP"]>;
|
|
@@ -2526,107 +2390,133 @@ declare const RegisterTriggerBodySchema: z.ZodObject<{
|
|
|
2526
2390
|
name: z.ZodString;
|
|
2527
2391
|
instructions: z.ZodOptional<z.ZodString>;
|
|
2528
2392
|
}, "strip", z.ZodTypeAny, {
|
|
2529
|
-
instructions?: string | undefined;
|
|
2530
2393
|
id: string;
|
|
2531
2394
|
name: string;
|
|
2532
|
-
}, {
|
|
2533
2395
|
instructions?: string | undefined;
|
|
2396
|
+
}, {
|
|
2534
2397
|
id: string;
|
|
2535
2398
|
name: string;
|
|
2399
|
+
instructions?: string | undefined;
|
|
2536
2400
|
}>;
|
|
2537
2401
|
authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
|
|
2538
2402
|
}, "strip", z.ZodTypeAny, {
|
|
2539
2403
|
id: string;
|
|
2540
2404
|
metadata: {
|
|
2541
|
-
instructions?: string | undefined;
|
|
2542
2405
|
id: string;
|
|
2543
2406
|
name: string;
|
|
2407
|
+
instructions?: string | undefined;
|
|
2544
2408
|
};
|
|
2545
2409
|
authSource: "HOSTED" | "LOCAL";
|
|
2546
2410
|
}, {
|
|
2547
2411
|
id: string;
|
|
2548
2412
|
metadata: {
|
|
2549
|
-
instructions?: string | undefined;
|
|
2550
2413
|
id: string;
|
|
2551
2414
|
name: string;
|
|
2415
|
+
instructions?: string | undefined;
|
|
2552
2416
|
};
|
|
2553
2417
|
authSource: "HOSTED" | "LOCAL";
|
|
2554
2418
|
}>;
|
|
2555
2419
|
key: z.ZodString;
|
|
2556
2420
|
params: z.ZodAny;
|
|
2557
2421
|
events: z.ZodArray<z.ZodString, "many">;
|
|
2422
|
+
registerSourceJob: z.ZodOptional<z.ZodObject<{
|
|
2423
|
+
id: z.ZodString;
|
|
2424
|
+
version: z.ZodString;
|
|
2425
|
+
}, "strip", z.ZodTypeAny, {
|
|
2426
|
+
id: string;
|
|
2427
|
+
version: string;
|
|
2428
|
+
}, {
|
|
2429
|
+
id: string;
|
|
2430
|
+
version: string;
|
|
2431
|
+
}>>;
|
|
2558
2432
|
}, "strip", z.ZodTypeAny, {
|
|
2559
|
-
params?: any;
|
|
2560
2433
|
key: string;
|
|
2561
2434
|
channel: "HTTP" | "SMTP" | "SQS";
|
|
2562
2435
|
events: string[];
|
|
2563
2436
|
integration: {
|
|
2564
2437
|
id: string;
|
|
2565
2438
|
metadata: {
|
|
2566
|
-
instructions?: string | undefined;
|
|
2567
2439
|
id: string;
|
|
2568
2440
|
name: string;
|
|
2441
|
+
instructions?: string | undefined;
|
|
2569
2442
|
};
|
|
2570
2443
|
authSource: "HOSTED" | "LOCAL";
|
|
2571
2444
|
};
|
|
2572
|
-
}, {
|
|
2573
2445
|
params?: any;
|
|
2446
|
+
registerSourceJob?: {
|
|
2447
|
+
id: string;
|
|
2448
|
+
version: string;
|
|
2449
|
+
} | undefined;
|
|
2450
|
+
}, {
|
|
2574
2451
|
key: string;
|
|
2575
2452
|
channel: "HTTP" | "SMTP" | "SQS";
|
|
2576
2453
|
events: string[];
|
|
2577
2454
|
integration: {
|
|
2578
2455
|
id: string;
|
|
2579
2456
|
metadata: {
|
|
2580
|
-
instructions?: string | undefined;
|
|
2581
2457
|
id: string;
|
|
2582
2458
|
name: string;
|
|
2459
|
+
instructions?: string | undefined;
|
|
2583
2460
|
};
|
|
2584
2461
|
authSource: "HOSTED" | "LOCAL";
|
|
2585
2462
|
};
|
|
2463
|
+
params?: any;
|
|
2464
|
+
registerSourceJob?: {
|
|
2465
|
+
id: string;
|
|
2466
|
+
version: string;
|
|
2467
|
+
} | undefined;
|
|
2586
2468
|
}>;
|
|
2587
2469
|
}, "strip", z.ZodTypeAny, {
|
|
2588
2470
|
source: {
|
|
2589
|
-
params?: any;
|
|
2590
2471
|
key: string;
|
|
2591
2472
|
channel: "HTTP" | "SMTP" | "SQS";
|
|
2592
2473
|
events: string[];
|
|
2593
2474
|
integration: {
|
|
2594
2475
|
id: string;
|
|
2595
2476
|
metadata: {
|
|
2596
|
-
instructions?: string | undefined;
|
|
2597
2477
|
id: string;
|
|
2598
2478
|
name: string;
|
|
2479
|
+
instructions?: string | undefined;
|
|
2599
2480
|
};
|
|
2600
2481
|
authSource: "HOSTED" | "LOCAL";
|
|
2601
2482
|
};
|
|
2483
|
+
params?: any;
|
|
2484
|
+
registerSourceJob?: {
|
|
2485
|
+
id: string;
|
|
2486
|
+
version: string;
|
|
2487
|
+
} | undefined;
|
|
2602
2488
|
};
|
|
2603
2489
|
rule: {
|
|
2490
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
2491
|
+
source: string;
|
|
2604
2492
|
payload?: EventFilter | undefined;
|
|
2605
2493
|
context?: EventFilter | undefined;
|
|
2606
|
-
event: string;
|
|
2607
|
-
source: string;
|
|
2608
2494
|
};
|
|
2609
2495
|
}, {
|
|
2610
2496
|
source: {
|
|
2611
|
-
params?: any;
|
|
2612
2497
|
key: string;
|
|
2613
2498
|
channel: "HTTP" | "SMTP" | "SQS";
|
|
2614
2499
|
events: string[];
|
|
2615
2500
|
integration: {
|
|
2616
2501
|
id: string;
|
|
2617
2502
|
metadata: {
|
|
2618
|
-
instructions?: string | undefined;
|
|
2619
2503
|
id: string;
|
|
2620
2504
|
name: string;
|
|
2505
|
+
instructions?: string | undefined;
|
|
2621
2506
|
};
|
|
2622
2507
|
authSource: "HOSTED" | "LOCAL";
|
|
2623
2508
|
};
|
|
2509
|
+
params?: any;
|
|
2510
|
+
registerSourceJob?: {
|
|
2511
|
+
id: string;
|
|
2512
|
+
version: string;
|
|
2513
|
+
} | undefined;
|
|
2624
2514
|
};
|
|
2625
2515
|
rule: {
|
|
2516
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
2517
|
+
source: string;
|
|
2626
2518
|
payload?: EventFilter | undefined;
|
|
2627
2519
|
context?: EventFilter | undefined;
|
|
2628
|
-
event: string;
|
|
2629
|
-
source: string;
|
|
2630
2520
|
};
|
|
2631
2521
|
}>;
|
|
2632
2522
|
type RegisterTriggerBody = z.infer<typeof RegisterTriggerBodySchema>;
|
|
@@ -2642,64 +2532,64 @@ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
2642
2532
|
type: "dynamic";
|
|
2643
2533
|
}>, z.ZodObject<{
|
|
2644
2534
|
type: z.ZodLiteral<"static">;
|
|
2645
|
-
title: z.ZodString
|
|
2535
|
+
title: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
2646
2536
|
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2647
2537
|
label: z.ZodString;
|
|
2648
2538
|
text: z.ZodString;
|
|
2649
2539
|
url: z.ZodOptional<z.ZodString>;
|
|
2650
2540
|
}, "strip", z.ZodTypeAny, {
|
|
2651
|
-
url?: string | undefined;
|
|
2652
2541
|
label: string;
|
|
2653
2542
|
text: string;
|
|
2654
|
-
}, {
|
|
2655
2543
|
url?: string | undefined;
|
|
2544
|
+
}, {
|
|
2656
2545
|
label: string;
|
|
2657
2546
|
text: string;
|
|
2547
|
+
url?: string | undefined;
|
|
2658
2548
|
}>, "many">>;
|
|
2659
2549
|
rule: z.ZodObject<{
|
|
2660
|
-
event: z.ZodString
|
|
2550
|
+
event: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
2661
2551
|
source: z.ZodString;
|
|
2662
2552
|
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
2663
2553
|
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
2664
2554
|
}, "strip", z.ZodTypeAny, {
|
|
2555
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
2556
|
+
source: string;
|
|
2665
2557
|
payload?: EventFilter | undefined;
|
|
2666
2558
|
context?: EventFilter | undefined;
|
|
2667
|
-
event: string;
|
|
2668
|
-
source: string;
|
|
2669
2559
|
}, {
|
|
2560
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
2561
|
+
source: string;
|
|
2670
2562
|
payload?: EventFilter | undefined;
|
|
2671
2563
|
context?: EventFilter | undefined;
|
|
2672
|
-
event: string;
|
|
2673
|
-
source: string;
|
|
2674
2564
|
}>;
|
|
2675
2565
|
}, "strip", z.ZodTypeAny, {
|
|
2676
|
-
properties?: {
|
|
2677
|
-
url?: string | undefined;
|
|
2678
|
-
label: string;
|
|
2679
|
-
text: string;
|
|
2680
|
-
}[] | undefined;
|
|
2681
2566
|
type: "static";
|
|
2682
|
-
title: string;
|
|
2567
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
2683
2568
|
rule: {
|
|
2569
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
2570
|
+
source: string;
|
|
2684
2571
|
payload?: EventFilter | undefined;
|
|
2685
2572
|
context?: EventFilter | undefined;
|
|
2686
|
-
event: string;
|
|
2687
|
-
source: string;
|
|
2688
2573
|
};
|
|
2689
|
-
}, {
|
|
2690
2574
|
properties?: {
|
|
2691
|
-
url?: string | undefined;
|
|
2692
2575
|
label: string;
|
|
2693
2576
|
text: string;
|
|
2577
|
+
url?: string | undefined;
|
|
2694
2578
|
}[] | undefined;
|
|
2579
|
+
}, {
|
|
2695
2580
|
type: "static";
|
|
2696
|
-
title: string;
|
|
2581
|
+
title: (string | string[]) & (string | string[] | undefined);
|
|
2697
2582
|
rule: {
|
|
2583
|
+
event: (string | string[]) & (string | string[] | undefined);
|
|
2584
|
+
source: string;
|
|
2698
2585
|
payload?: EventFilter | undefined;
|
|
2699
2586
|
context?: EventFilter | undefined;
|
|
2700
|
-
event: string;
|
|
2701
|
-
source: string;
|
|
2702
2587
|
};
|
|
2588
|
+
properties?: {
|
|
2589
|
+
label: string;
|
|
2590
|
+
text: string;
|
|
2591
|
+
url?: string | undefined;
|
|
2592
|
+
}[] | undefined;
|
|
2703
2593
|
}>, z.ZodObject<{
|
|
2704
2594
|
type: z.ZodLiteral<"scheduled">;
|
|
2705
2595
|
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -2713,17 +2603,17 @@ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
2713
2603
|
}>;
|
|
2714
2604
|
metadata: z.ZodAny;
|
|
2715
2605
|
}, "strip", z.ZodTypeAny, {
|
|
2716
|
-
metadata?: any;
|
|
2717
2606
|
options: {
|
|
2718
2607
|
seconds: number;
|
|
2719
2608
|
};
|
|
2720
2609
|
type: "interval";
|
|
2721
|
-
}, {
|
|
2722
2610
|
metadata?: any;
|
|
2611
|
+
}, {
|
|
2723
2612
|
options: {
|
|
2724
2613
|
seconds: number;
|
|
2725
2614
|
};
|
|
2726
2615
|
type: "interval";
|
|
2616
|
+
metadata?: any;
|
|
2727
2617
|
}>, z.ZodObject<{
|
|
2728
2618
|
type: z.ZodLiteral<"cron">;
|
|
2729
2619
|
options: z.ZodObject<{
|
|
@@ -2735,47 +2625,47 @@ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
2735
2625
|
}>;
|
|
2736
2626
|
metadata: z.ZodAny;
|
|
2737
2627
|
}, "strip", z.ZodTypeAny, {
|
|
2738
|
-
metadata?: any;
|
|
2739
2628
|
options: {
|
|
2740
2629
|
cron: string;
|
|
2741
2630
|
};
|
|
2742
2631
|
type: "cron";
|
|
2743
|
-
}, {
|
|
2744
2632
|
metadata?: any;
|
|
2633
|
+
}, {
|
|
2745
2634
|
options: {
|
|
2746
2635
|
cron: string;
|
|
2747
2636
|
};
|
|
2748
2637
|
type: "cron";
|
|
2638
|
+
metadata?: any;
|
|
2749
2639
|
}>]>;
|
|
2750
2640
|
}, "strip", z.ZodTypeAny, {
|
|
2751
2641
|
type: "scheduled";
|
|
2752
2642
|
schedule: {
|
|
2753
|
-
metadata?: any;
|
|
2754
2643
|
options: {
|
|
2755
2644
|
cron: string;
|
|
2756
2645
|
};
|
|
2757
2646
|
type: "cron";
|
|
2758
|
-
} | {
|
|
2759
2647
|
metadata?: any;
|
|
2648
|
+
} | {
|
|
2760
2649
|
options: {
|
|
2761
2650
|
seconds: number;
|
|
2762
2651
|
};
|
|
2763
2652
|
type: "interval";
|
|
2653
|
+
metadata?: any;
|
|
2764
2654
|
};
|
|
2765
2655
|
}, {
|
|
2766
2656
|
type: "scheduled";
|
|
2767
2657
|
schedule: {
|
|
2768
|
-
metadata?: any;
|
|
2769
2658
|
options: {
|
|
2770
2659
|
cron: string;
|
|
2771
2660
|
};
|
|
2772
2661
|
type: "cron";
|
|
2773
|
-
} | {
|
|
2774
2662
|
metadata?: any;
|
|
2663
|
+
} | {
|
|
2775
2664
|
options: {
|
|
2776
2665
|
seconds: number;
|
|
2777
2666
|
};
|
|
2778
2667
|
type: "interval";
|
|
2668
|
+
metadata?: any;
|
|
2779
2669
|
};
|
|
2780
2670
|
}>]>;
|
|
2781
2671
|
type TriggerMetadata = z.infer<typeof TriggerMetadataSchema>;
|
|
@@ -2785,13 +2675,13 @@ declare const ErrorWithStackSchema: z.ZodObject<{
|
|
|
2785
2675
|
name: z.ZodOptional<z.ZodString>;
|
|
2786
2676
|
stack: z.ZodOptional<z.ZodString>;
|
|
2787
2677
|
}, "strip", z.ZodTypeAny, {
|
|
2678
|
+
message: string;
|
|
2788
2679
|
name?: string | undefined;
|
|
2789
2680
|
stack?: string | undefined;
|
|
2790
|
-
message: string;
|
|
2791
2681
|
}, {
|
|
2682
|
+
message: string;
|
|
2792
2683
|
name?: string | undefined;
|
|
2793
2684
|
stack?: string | undefined;
|
|
2794
|
-
message: string;
|
|
2795
2685
|
}>;
|
|
2796
2686
|
type ErrorWithStack = z.infer<typeof ErrorWithStackSchema>;
|
|
2797
2687
|
|
|
@@ -2804,13 +2694,13 @@ declare const DisplayPropertySchema: z.ZodObject<{
|
|
|
2804
2694
|
/** The URL to link to when the property is clicked */
|
|
2805
2695
|
url: z.ZodOptional<z.ZodString>;
|
|
2806
2696
|
}, "strip", z.ZodTypeAny, {
|
|
2807
|
-
url?: string | undefined;
|
|
2808
2697
|
label: string;
|
|
2809
2698
|
text: string;
|
|
2810
|
-
}, {
|
|
2811
2699
|
url?: string | undefined;
|
|
2700
|
+
}, {
|
|
2812
2701
|
label: string;
|
|
2813
2702
|
text: string;
|
|
2703
|
+
url?: string | undefined;
|
|
2814
2704
|
}>;
|
|
2815
2705
|
type DisplayProperty = z.infer<typeof DisplayPropertySchema>;
|
|
2816
2706
|
|
|
@@ -2820,15 +2710,15 @@ declare const ConnectionAuthSchema: z.ZodObject<{
|
|
|
2820
2710
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2821
2711
|
additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2822
2712
|
}, "strip", z.ZodTypeAny, {
|
|
2823
|
-
scopes?: string[] | undefined;
|
|
2824
|
-
additionalFields?: Record<string, string> | undefined;
|
|
2825
2713
|
type: "oauth2";
|
|
2826
2714
|
accessToken: string;
|
|
2827
|
-
}, {
|
|
2828
2715
|
scopes?: string[] | undefined;
|
|
2829
2716
|
additionalFields?: Record<string, string> | undefined;
|
|
2717
|
+
}, {
|
|
2830
2718
|
type: "oauth2";
|
|
2831
2719
|
accessToken: string;
|
|
2720
|
+
scopes?: string[] | undefined;
|
|
2721
|
+
additionalFields?: Record<string, string> | undefined;
|
|
2832
2722
|
}>;
|
|
2833
2723
|
type ConnectionAuth = z.infer<typeof ConnectionAuthSchema>;
|
|
2834
2724
|
declare const IntegrationMetadataSchema: z.ZodObject<{
|
|
@@ -2836,13 +2726,13 @@ declare const IntegrationMetadataSchema: z.ZodObject<{
|
|
|
2836
2726
|
name: z.ZodString;
|
|
2837
2727
|
instructions: z.ZodOptional<z.ZodString>;
|
|
2838
2728
|
}, "strip", z.ZodTypeAny, {
|
|
2839
|
-
instructions?: string | undefined;
|
|
2840
2729
|
id: string;
|
|
2841
2730
|
name: string;
|
|
2842
|
-
}, {
|
|
2843
2731
|
instructions?: string | undefined;
|
|
2732
|
+
}, {
|
|
2844
2733
|
id: string;
|
|
2845
2734
|
name: string;
|
|
2735
|
+
instructions?: string | undefined;
|
|
2846
2736
|
}>;
|
|
2847
2737
|
type IntegrationMetadata = z.infer<typeof IntegrationMetadataSchema>;
|
|
2848
2738
|
declare const IntegrationConfigSchema: z.ZodObject<{
|
|
@@ -2852,29 +2742,29 @@ declare const IntegrationConfigSchema: z.ZodObject<{
|
|
|
2852
2742
|
name: z.ZodString;
|
|
2853
2743
|
instructions: z.ZodOptional<z.ZodString>;
|
|
2854
2744
|
}, "strip", z.ZodTypeAny, {
|
|
2855
|
-
instructions?: string | undefined;
|
|
2856
2745
|
id: string;
|
|
2857
2746
|
name: string;
|
|
2858
|
-
}, {
|
|
2859
2747
|
instructions?: string | undefined;
|
|
2748
|
+
}, {
|
|
2860
2749
|
id: string;
|
|
2861
2750
|
name: string;
|
|
2751
|
+
instructions?: string | undefined;
|
|
2862
2752
|
}>;
|
|
2863
2753
|
authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
|
|
2864
2754
|
}, "strip", z.ZodTypeAny, {
|
|
2865
2755
|
id: string;
|
|
2866
2756
|
metadata: {
|
|
2867
|
-
instructions?: string | undefined;
|
|
2868
2757
|
id: string;
|
|
2869
2758
|
name: string;
|
|
2759
|
+
instructions?: string | undefined;
|
|
2870
2760
|
};
|
|
2871
2761
|
authSource: "HOSTED" | "LOCAL";
|
|
2872
2762
|
}, {
|
|
2873
2763
|
id: string;
|
|
2874
2764
|
metadata: {
|
|
2875
|
-
instructions?: string | undefined;
|
|
2876
2765
|
id: string;
|
|
2877
2766
|
name: string;
|
|
2767
|
+
instructions?: string | undefined;
|
|
2878
2768
|
};
|
|
2879
2769
|
authSource: "HOSTED" | "LOCAL";
|
|
2880
2770
|
}>;
|
|
@@ -2884,11 +2774,11 @@ declare const ScheduledPayloadSchema: z.ZodObject<{
|
|
|
2884
2774
|
ts: z.ZodDate;
|
|
2885
2775
|
lastTimestamp: z.ZodOptional<z.ZodDate>;
|
|
2886
2776
|
}, "strip", z.ZodTypeAny, {
|
|
2887
|
-
lastTimestamp?: Date | undefined;
|
|
2888
2777
|
ts: Date;
|
|
2889
|
-
}, {
|
|
2890
2778
|
lastTimestamp?: Date | undefined;
|
|
2779
|
+
}, {
|
|
2891
2780
|
ts: Date;
|
|
2781
|
+
lastTimestamp?: Date | undefined;
|
|
2892
2782
|
}>;
|
|
2893
2783
|
type ScheduledPayload = z.infer<typeof ScheduledPayloadSchema>;
|
|
2894
2784
|
declare const IntervalOptionsSchema: z.ZodObject<{
|
|
@@ -2911,6 +2801,7 @@ declare const CronOptionsSchema: z.ZodObject<{
|
|
|
2911
2801
|
}, {
|
|
2912
2802
|
cron: string;
|
|
2913
2803
|
}>;
|
|
2804
|
+
/** The options for a `cronTrigger()` */
|
|
2914
2805
|
type CronOptions = z.infer<typeof CronOptionsSchema>;
|
|
2915
2806
|
declare const ScheduleMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2916
2807
|
/** An interval reoccurs at the specified number of seconds */
|
|
@@ -2927,17 +2818,17 @@ declare const ScheduleMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2927
2818
|
/** Any additional metadata about the schedule. */
|
|
2928
2819
|
metadata: z.ZodAny;
|
|
2929
2820
|
}, "strip", z.ZodTypeAny, {
|
|
2930
|
-
metadata?: any;
|
|
2931
2821
|
options: {
|
|
2932
2822
|
seconds: number;
|
|
2933
2823
|
};
|
|
2934
2824
|
type: "interval";
|
|
2935
|
-
}, {
|
|
2936
2825
|
metadata?: any;
|
|
2826
|
+
}, {
|
|
2937
2827
|
options: {
|
|
2938
2828
|
seconds: number;
|
|
2939
2829
|
};
|
|
2940
2830
|
type: "interval";
|
|
2831
|
+
metadata?: any;
|
|
2941
2832
|
}>, z.ZodObject<{
|
|
2942
2833
|
type: z.ZodLiteral<"cron">;
|
|
2943
2834
|
options: z.ZodObject<{
|
|
@@ -2952,21 +2843,21 @@ declare const ScheduleMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
|
|
|
2952
2843
|
}>;
|
|
2953
2844
|
metadata: z.ZodAny;
|
|
2954
2845
|
}, "strip", z.ZodTypeAny, {
|
|
2955
|
-
metadata?: any;
|
|
2956
2846
|
options: {
|
|
2957
2847
|
cron: string;
|
|
2958
2848
|
};
|
|
2959
2849
|
type: "cron";
|
|
2960
|
-
}, {
|
|
2961
2850
|
metadata?: any;
|
|
2851
|
+
}, {
|
|
2962
2852
|
options: {
|
|
2963
2853
|
cron: string;
|
|
2964
2854
|
};
|
|
2965
2855
|
type: "cron";
|
|
2856
|
+
metadata?: any;
|
|
2966
2857
|
}>]>;
|
|
2967
2858
|
type ScheduleMetadata = z.infer<typeof ScheduleMetadataSchema>;
|
|
2968
2859
|
|
|
2969
|
-
declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
2860
|
+
declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2970
2861
|
id: z.ZodString;
|
|
2971
2862
|
client: z.ZodObject<{
|
|
2972
2863
|
id: z.ZodString;
|
|
@@ -2988,9 +2879,8 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
|
|
|
2988
2879
|
updatedAt: Date;
|
|
2989
2880
|
}>;
|
|
2990
2881
|
authorizationUrl: z.ZodString;
|
|
2991
|
-
}, {
|
|
2992
2882
|
type: z.ZodLiteral<"DEVELOPER">;
|
|
2993
|
-
}
|
|
2883
|
+
}, "strip", z.ZodTypeAny, {
|
|
2994
2884
|
id: string;
|
|
2995
2885
|
type: "DEVELOPER";
|
|
2996
2886
|
client: {
|
|
@@ -3012,7 +2902,7 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
|
|
|
3012
2902
|
updatedAt: Date;
|
|
3013
2903
|
};
|
|
3014
2904
|
authorizationUrl: string;
|
|
3015
|
-
}>, z.ZodObject<
|
|
2905
|
+
}>, z.ZodObject<{
|
|
3016
2906
|
id: z.ZodString;
|
|
3017
2907
|
client: z.ZodObject<{
|
|
3018
2908
|
id: z.ZodString;
|
|
@@ -3034,24 +2924,23 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
|
|
|
3034
2924
|
updatedAt: Date;
|
|
3035
2925
|
}>;
|
|
3036
2926
|
authorizationUrl: z.ZodString;
|
|
3037
|
-
}, {
|
|
3038
2927
|
type: z.ZodLiteral<"EXTERNAL">;
|
|
3039
2928
|
account: z.ZodObject<{
|
|
3040
2929
|
id: z.ZodString;
|
|
3041
2930
|
metadata: z.ZodAny;
|
|
3042
2931
|
}, "strip", z.ZodTypeAny, {
|
|
3043
|
-
metadata?: any;
|
|
3044
2932
|
id: string;
|
|
3045
|
-
}, {
|
|
3046
2933
|
metadata?: any;
|
|
2934
|
+
}, {
|
|
3047
2935
|
id: string;
|
|
2936
|
+
metadata?: any;
|
|
3048
2937
|
}>;
|
|
3049
|
-
}
|
|
2938
|
+
}, "strip", z.ZodTypeAny, {
|
|
3050
2939
|
id: string;
|
|
3051
2940
|
type: "EXTERNAL";
|
|
3052
2941
|
account: {
|
|
3053
|
-
metadata?: any;
|
|
3054
2942
|
id: string;
|
|
2943
|
+
metadata?: any;
|
|
3055
2944
|
};
|
|
3056
2945
|
client: {
|
|
3057
2946
|
id: string;
|
|
@@ -3065,8 +2954,8 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
|
|
|
3065
2954
|
id: string;
|
|
3066
2955
|
type: "EXTERNAL";
|
|
3067
2956
|
account: {
|
|
3068
|
-
metadata?: any;
|
|
3069
2957
|
id: string;
|
|
2958
|
+
metadata?: any;
|
|
3070
2959
|
};
|
|
3071
2960
|
client: {
|
|
3072
2961
|
id: string;
|
|
@@ -3078,7 +2967,7 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
|
|
|
3078
2967
|
authorizationUrl: string;
|
|
3079
2968
|
}>]>;
|
|
3080
2969
|
type MissingConnectionNotificationPayload = z.infer<typeof MissingConnectionNotificationPayloadSchema>;
|
|
3081
|
-
declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<
|
|
2970
|
+
declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3082
2971
|
id: z.ZodString;
|
|
3083
2972
|
client: z.ZodObject<{
|
|
3084
2973
|
id: z.ZodString;
|
|
@@ -3106,9 +2995,8 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
|
|
|
3106
2995
|
integrationAuthMethod: string;
|
|
3107
2996
|
}>;
|
|
3108
2997
|
expiresAt: z.ZodDate;
|
|
3109
|
-
}, {
|
|
3110
2998
|
type: z.ZodLiteral<"DEVELOPER">;
|
|
3111
|
-
}
|
|
2999
|
+
}, "strip", z.ZodTypeAny, {
|
|
3112
3000
|
id: string;
|
|
3113
3001
|
type: "DEVELOPER";
|
|
3114
3002
|
client: {
|
|
@@ -3134,7 +3022,7 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
|
|
|
3134
3022
|
integrationAuthMethod: string;
|
|
3135
3023
|
};
|
|
3136
3024
|
expiresAt: Date;
|
|
3137
|
-
}>, z.ZodObject<
|
|
3025
|
+
}>, z.ZodObject<{
|
|
3138
3026
|
id: z.ZodString;
|
|
3139
3027
|
client: z.ZodObject<{
|
|
3140
3028
|
id: z.ZodString;
|
|
@@ -3162,24 +3050,23 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
|
|
|
3162
3050
|
integrationAuthMethod: string;
|
|
3163
3051
|
}>;
|
|
3164
3052
|
expiresAt: z.ZodDate;
|
|
3165
|
-
}, {
|
|
3166
3053
|
type: z.ZodLiteral<"EXTERNAL">;
|
|
3167
3054
|
account: z.ZodObject<{
|
|
3168
3055
|
id: z.ZodString;
|
|
3169
3056
|
metadata: z.ZodAny;
|
|
3170
3057
|
}, "strip", z.ZodTypeAny, {
|
|
3171
|
-
metadata?: any;
|
|
3172
3058
|
id: string;
|
|
3173
|
-
}, {
|
|
3174
3059
|
metadata?: any;
|
|
3060
|
+
}, {
|
|
3175
3061
|
id: string;
|
|
3062
|
+
metadata?: any;
|
|
3176
3063
|
}>;
|
|
3177
|
-
}
|
|
3064
|
+
}, "strip", z.ZodTypeAny, {
|
|
3178
3065
|
id: string;
|
|
3179
3066
|
type: "EXTERNAL";
|
|
3180
3067
|
account: {
|
|
3181
|
-
metadata?: any;
|
|
3182
3068
|
id: string;
|
|
3069
|
+
metadata?: any;
|
|
3183
3070
|
};
|
|
3184
3071
|
client: {
|
|
3185
3072
|
id: string;
|
|
@@ -3195,8 +3082,8 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
|
|
|
3195
3082
|
id: string;
|
|
3196
3083
|
type: "EXTERNAL";
|
|
3197
3084
|
account: {
|
|
3198
|
-
metadata?: any;
|
|
3199
3085
|
id: string;
|
|
3086
|
+
metadata?: any;
|
|
3200
3087
|
};
|
|
3201
3088
|
client: {
|
|
3202
3089
|
id: string;
|
|
@@ -3269,29 +3156,27 @@ declare const FetchRetryOptionsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminat
|
|
|
3269
3156
|
limitHeader: string;
|
|
3270
3157
|
remainingHeader: string;
|
|
3271
3158
|
resetHeader: string;
|
|
3272
|
-
}>, z.ZodObject<
|
|
3159
|
+
}>, z.ZodObject<{
|
|
3273
3160
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
3274
3161
|
factor: z.ZodOptional<z.ZodNumber>;
|
|
3275
3162
|
minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
3276
3163
|
maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
3277
3164
|
randomize: z.ZodOptional<z.ZodBoolean>;
|
|
3278
|
-
}, {
|
|
3279
|
-
/** The `backoff` strategy retries the request with an exponential backoff. */
|
|
3280
3165
|
strategy: z.ZodLiteral<"backoff">;
|
|
3281
|
-
}
|
|
3166
|
+
}, "strip", z.ZodTypeAny, {
|
|
3167
|
+
strategy: "backoff";
|
|
3282
3168
|
limit?: number | undefined;
|
|
3283
3169
|
factor?: number | undefined;
|
|
3284
3170
|
minTimeoutInMs?: number | undefined;
|
|
3285
3171
|
maxTimeoutInMs?: number | undefined;
|
|
3286
3172
|
randomize?: boolean | undefined;
|
|
3287
|
-
strategy: "backoff";
|
|
3288
3173
|
}, {
|
|
3174
|
+
strategy: "backoff";
|
|
3289
3175
|
limit?: number | undefined;
|
|
3290
3176
|
factor?: number | undefined;
|
|
3291
3177
|
minTimeoutInMs?: number | undefined;
|
|
3292
3178
|
maxTimeoutInMs?: number | undefined;
|
|
3293
3179
|
randomize?: boolean | undefined;
|
|
3294
|
-
strategy: "backoff";
|
|
3295
3180
|
}>]>>;
|
|
3296
3181
|
/** An object where the key is a status code pattern and the value is a retrying strategy. Supported patterns are:
|
|
3297
3182
|
- Specific status codes: 429
|
|
@@ -3300,9 +3185,36 @@ declare const FetchRetryOptionsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminat
|
|
|
3300
3185
|
*/
|
|
3301
3186
|
type FetchRetryOptions = z.infer<typeof FetchRetryOptionsSchema>;
|
|
3302
3187
|
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3188
|
+
declare const GetRunOptionsWithTaskDetailsSchema: ZodObject<{
|
|
3189
|
+
subtasks: z.ZodOptional<z.ZodBoolean>;
|
|
3190
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
3191
|
+
take: z.ZodOptional<z.ZodNumber>;
|
|
3192
|
+
taskdetails: z.ZodOptional<z.ZodBoolean>;
|
|
3193
|
+
}, "strip", z.ZodTypeAny, {
|
|
3194
|
+
subtasks?: boolean | undefined;
|
|
3195
|
+
cursor?: string | undefined;
|
|
3196
|
+
take?: number | undefined;
|
|
3197
|
+
taskdetails?: boolean | undefined;
|
|
3198
|
+
}, {
|
|
3199
|
+
subtasks?: boolean | undefined;
|
|
3200
|
+
cursor?: string | undefined;
|
|
3201
|
+
take?: number | undefined;
|
|
3202
|
+
taskdetails?: boolean | undefined;
|
|
3203
|
+
}>;
|
|
3204
|
+
type GetRunOptionsWithTaskDetails = z.infer<typeof GetRunOptionsWithTaskDetailsSchema>;
|
|
3205
|
+
declare const GetRunsOptionsSchema: ZodObject<{
|
|
3206
|
+
/** You can use this to get more tasks, if there are more than are returned in a single batch @default undefined */
|
|
3207
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
3208
|
+
/** How many runs you want to return in one go, max 50. @default 20 */
|
|
3209
|
+
take: z.ZodOptional<z.ZodNumber>;
|
|
3210
|
+
}, "strip", z.ZodTypeAny, {
|
|
3211
|
+
cursor?: string | undefined;
|
|
3212
|
+
take?: number | undefined;
|
|
3213
|
+
}, {
|
|
3214
|
+
cursor?: string | undefined;
|
|
3215
|
+
take?: number | undefined;
|
|
3216
|
+
}>;
|
|
3217
|
+
type GetRunsOptions = z.infer<typeof GetRunsOptionsSchema>;
|
|
3306
3218
|
|
|
3307
3219
|
type ApiClientOptions = {
|
|
3308
3220
|
apiKey?: string;
|
|
@@ -3331,6 +3243,12 @@ declare class ApiClient {
|
|
|
3331
3243
|
ok: false;
|
|
3332
3244
|
}>;
|
|
3333
3245
|
runTask(runId: string, task: RunTaskBodyInput): Promise<{
|
|
3246
|
+
id: string;
|
|
3247
|
+
name: string;
|
|
3248
|
+
noop: boolean;
|
|
3249
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
3250
|
+
idempotencyKey: string;
|
|
3251
|
+
attempts: number;
|
|
3334
3252
|
icon?: string | null | undefined;
|
|
3335
3253
|
startedAt?: Date | null | undefined;
|
|
3336
3254
|
completedAt?: Date | null | undefined;
|
|
@@ -3338,26 +3256,31 @@ declare class ApiClient {
|
|
|
3338
3256
|
description?: string | null | undefined;
|
|
3339
3257
|
params?: DeserializedJson | undefined;
|
|
3340
3258
|
properties?: {
|
|
3259
|
+
label: string;
|
|
3260
|
+
text: string;
|
|
3341
3261
|
url?: string | undefined;
|
|
3262
|
+
}[] | null | undefined;
|
|
3263
|
+
outputProperties?: {
|
|
3342
3264
|
label: string;
|
|
3343
3265
|
text: string;
|
|
3266
|
+
url?: string | undefined;
|
|
3344
3267
|
}[] | null | undefined;
|
|
3345
3268
|
output?: DeserializedJson | undefined;
|
|
3346
3269
|
error?: string | null | undefined;
|
|
3347
3270
|
parentId?: string | null | undefined;
|
|
3348
3271
|
style?: {
|
|
3349
|
-
variant?: string | undefined;
|
|
3350
3272
|
style: "normal" | "minimal";
|
|
3273
|
+
variant?: string | undefined;
|
|
3351
3274
|
} | null | undefined;
|
|
3352
3275
|
operation?: string | null | undefined;
|
|
3276
|
+
}>;
|
|
3277
|
+
completeTask(runId: string, id: string, task: CompleteTaskBodyInput): Promise<{
|
|
3353
3278
|
id: string;
|
|
3354
3279
|
name: string;
|
|
3355
3280
|
noop: boolean;
|
|
3356
|
-
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
3281
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
3357
3282
|
idempotencyKey: string;
|
|
3358
3283
|
attempts: number;
|
|
3359
|
-
}>;
|
|
3360
|
-
completeTask(runId: string, id: string, task: CompleteTaskBodyInput): Promise<{
|
|
3361
3284
|
icon?: string | null | undefined;
|
|
3362
3285
|
startedAt?: Date | null | undefined;
|
|
3363
3286
|
completedAt?: Date | null | undefined;
|
|
@@ -3365,26 +3288,31 @@ declare class ApiClient {
|
|
|
3365
3288
|
description?: string | null | undefined;
|
|
3366
3289
|
params?: DeserializedJson | undefined;
|
|
3367
3290
|
properties?: {
|
|
3291
|
+
label: string;
|
|
3292
|
+
text: string;
|
|
3368
3293
|
url?: string | undefined;
|
|
3294
|
+
}[] | null | undefined;
|
|
3295
|
+
outputProperties?: {
|
|
3369
3296
|
label: string;
|
|
3370
3297
|
text: string;
|
|
3298
|
+
url?: string | undefined;
|
|
3371
3299
|
}[] | null | undefined;
|
|
3372
3300
|
output?: DeserializedJson | undefined;
|
|
3373
3301
|
error?: string | null | undefined;
|
|
3374
3302
|
parentId?: string | null | undefined;
|
|
3375
3303
|
style?: {
|
|
3376
|
-
variant?: string | undefined;
|
|
3377
3304
|
style: "normal" | "minimal";
|
|
3305
|
+
variant?: string | undefined;
|
|
3378
3306
|
} | null | undefined;
|
|
3379
3307
|
operation?: string | null | undefined;
|
|
3308
|
+
}>;
|
|
3309
|
+
failTask(runId: string, id: string, body: FailTaskBodyInput): Promise<{
|
|
3380
3310
|
id: string;
|
|
3381
3311
|
name: string;
|
|
3382
3312
|
noop: boolean;
|
|
3383
|
-
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
3313
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
3384
3314
|
idempotencyKey: string;
|
|
3385
3315
|
attempts: number;
|
|
3386
|
-
}>;
|
|
3387
|
-
failTask(runId: string, id: string, body: FailTaskBodyInput): Promise<{
|
|
3388
3316
|
icon?: string | null | undefined;
|
|
3389
3317
|
startedAt?: Date | null | undefined;
|
|
3390
3318
|
completedAt?: Date | null | undefined;
|
|
@@ -3392,63 +3320,106 @@ declare class ApiClient {
|
|
|
3392
3320
|
description?: string | null | undefined;
|
|
3393
3321
|
params?: DeserializedJson | undefined;
|
|
3394
3322
|
properties?: {
|
|
3323
|
+
label: string;
|
|
3324
|
+
text: string;
|
|
3395
3325
|
url?: string | undefined;
|
|
3326
|
+
}[] | null | undefined;
|
|
3327
|
+
outputProperties?: {
|
|
3396
3328
|
label: string;
|
|
3397
3329
|
text: string;
|
|
3330
|
+
url?: string | undefined;
|
|
3398
3331
|
}[] | null | undefined;
|
|
3399
3332
|
output?: DeserializedJson | undefined;
|
|
3400
3333
|
error?: string | null | undefined;
|
|
3401
3334
|
parentId?: string | null | undefined;
|
|
3402
3335
|
style?: {
|
|
3403
|
-
variant?: string | undefined;
|
|
3404
3336
|
style: "normal" | "minimal";
|
|
3337
|
+
variant?: string | undefined;
|
|
3405
3338
|
} | null | undefined;
|
|
3406
3339
|
operation?: string | null | undefined;
|
|
3407
|
-
id: string;
|
|
3408
|
-
name: string;
|
|
3409
|
-
noop: boolean;
|
|
3410
|
-
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
3411
|
-
idempotencyKey: string;
|
|
3412
|
-
attempts: number;
|
|
3413
3340
|
}>;
|
|
3414
3341
|
sendEvent(event: SendEvent, options?: SendEventOptions): Promise<{
|
|
3415
|
-
context?: DeserializedJson | undefined;
|
|
3416
|
-
deliverAt?: Date | null | undefined;
|
|
3417
|
-
deliveredAt?: Date | null | undefined;
|
|
3418
3342
|
id: string;
|
|
3419
3343
|
name: string;
|
|
3420
|
-
payload:
|
|
3344
|
+
payload: ((string | number | boolean | {
|
|
3345
|
+
[key: string]: DeserializedJson;
|
|
3346
|
+
} | DeserializedJson[]) & (string | number | boolean | {
|
|
3347
|
+
[key: string]: DeserializedJson;
|
|
3348
|
+
} | DeserializedJson[] | undefined)) | null;
|
|
3421
3349
|
timestamp: Date;
|
|
3350
|
+
context?: DeserializedJson | undefined;
|
|
3351
|
+
deliverAt?: Date | null | undefined;
|
|
3352
|
+
deliveredAt?: Date | null | undefined;
|
|
3422
3353
|
}>;
|
|
3423
3354
|
updateSource(client: string, key: string, source: UpdateTriggerSourceBody): Promise<TriggerSource>;
|
|
3424
3355
|
registerTrigger(client: string, id: string, key: string, payload: RegisterTriggerBody): Promise<RegisterSourceEvent>;
|
|
3425
3356
|
registerSchedule(client: string, id: string, key: string, payload: ScheduleMetadata): Promise<{
|
|
3426
|
-
metadata?: any;
|
|
3427
3357
|
id: string;
|
|
3428
3358
|
schedule: {
|
|
3429
|
-
metadata?: any;
|
|
3430
3359
|
options: {
|
|
3431
3360
|
cron: string;
|
|
3432
3361
|
};
|
|
3433
3362
|
type: "cron";
|
|
3434
|
-
} | {
|
|
3435
3363
|
metadata?: any;
|
|
3364
|
+
} | {
|
|
3436
3365
|
options: {
|
|
3437
3366
|
seconds: number;
|
|
3438
3367
|
};
|
|
3439
3368
|
type: "interval";
|
|
3369
|
+
metadata?: any;
|
|
3440
3370
|
};
|
|
3441
3371
|
active: boolean;
|
|
3372
|
+
metadata?: any;
|
|
3442
3373
|
}>;
|
|
3443
3374
|
unregisterSchedule(client: string, id: string, key: string): Promise<{
|
|
3444
3375
|
ok: boolean;
|
|
3445
3376
|
}>;
|
|
3446
3377
|
getAuth(client: string, id: string): Promise<{
|
|
3447
|
-
scopes?: string[] | undefined;
|
|
3448
|
-
additionalFields?: Record<string, string> | undefined;
|
|
3449
3378
|
type: "oauth2";
|
|
3450
3379
|
accessToken: string;
|
|
3380
|
+
scopes?: string[] | undefined;
|
|
3381
|
+
additionalFields?: Record<string, string> | undefined;
|
|
3451
3382
|
} | undefined>;
|
|
3383
|
+
getEvent(eventId: string): Promise<{
|
|
3384
|
+
id: string;
|
|
3385
|
+
name: string;
|
|
3386
|
+
createdAt: Date;
|
|
3387
|
+
updatedAt: Date;
|
|
3388
|
+
runs: {
|
|
3389
|
+
id: string;
|
|
3390
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "FAILURE" | "TIMED_OUT" | "ABORTED";
|
|
3391
|
+
startedAt?: Date | null | undefined;
|
|
3392
|
+
completedAt?: Date | null | undefined;
|
|
3393
|
+
}[];
|
|
3394
|
+
}>;
|
|
3395
|
+
getRun(runId: string, options?: GetRunOptionsWithTaskDetails): Promise<{
|
|
3396
|
+
id: string;
|
|
3397
|
+
startedAt: Date | null;
|
|
3398
|
+
completedAt: Date | null;
|
|
3399
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "FAILURE" | "TIMED_OUT" | "ABORTED";
|
|
3400
|
+
tasks: {
|
|
3401
|
+
id: string;
|
|
3402
|
+
name: string;
|
|
3403
|
+
icon: string | null;
|
|
3404
|
+
startedAt: Date | null;
|
|
3405
|
+
completedAt: Date | null;
|
|
3406
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
3407
|
+
displayKey: string | null;
|
|
3408
|
+
}[];
|
|
3409
|
+
updatedAt: Date | null;
|
|
3410
|
+
output?: any;
|
|
3411
|
+
nextCursor?: string | undefined;
|
|
3412
|
+
}>;
|
|
3413
|
+
getRuns(jobSlug: string, options?: GetRunsOptions): Promise<{
|
|
3414
|
+
runs: {
|
|
3415
|
+
id: string;
|
|
3416
|
+
startedAt: Date | null;
|
|
3417
|
+
completedAt: Date | null;
|
|
3418
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "FAILURE" | "TIMED_OUT" | "ABORTED";
|
|
3419
|
+
updatedAt: Date | null;
|
|
3420
|
+
}[];
|
|
3421
|
+
nextCursor?: string | undefined;
|
|
3422
|
+
}>;
|
|
3452
3423
|
}
|
|
3453
3424
|
|
|
3454
3425
|
interface TriggerContext {
|
|
@@ -3474,6 +3445,7 @@ interface TriggerContext {
|
|
|
3474
3445
|
id: string;
|
|
3475
3446
|
isTest: boolean;
|
|
3476
3447
|
startedAt: Date;
|
|
3448
|
+
isRetry: boolean;
|
|
3477
3449
|
};
|
|
3478
3450
|
/** Event metadata */
|
|
3479
3451
|
event: {
|
|
@@ -3540,6 +3512,7 @@ interface Trigger<TEventSpec extends EventSpecification<any>> {
|
|
|
3540
3512
|
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<TEventSpec>, any>): void;
|
|
3541
3513
|
preprocessRuns: boolean;
|
|
3542
3514
|
}
|
|
3515
|
+
type TriggerPayload<TTrigger> = TTrigger extends Trigger<EventSpecification<infer TEvent>> ? TEvent : never;
|
|
3543
3516
|
type EventSpecificationExample = {
|
|
3544
3517
|
id: string;
|
|
3545
3518
|
name: string;
|
|
@@ -3547,7 +3520,7 @@ type EventSpecificationExample = {
|
|
|
3547
3520
|
payload: any;
|
|
3548
3521
|
};
|
|
3549
3522
|
interface EventSpecification<TEvent extends any> {
|
|
3550
|
-
name: string;
|
|
3523
|
+
name: string | string[];
|
|
3551
3524
|
title: string;
|
|
3552
3525
|
source: string;
|
|
3553
3526
|
icon: string;
|
|
@@ -3624,7 +3597,7 @@ type ExternalSourceOptions<TChannel extends ChannelNames, TIntegration extends T
|
|
|
3624
3597
|
schema: z.Schema<TParams>;
|
|
3625
3598
|
integration: TIntegration;
|
|
3626
3599
|
register: RegisterFunction<TIntegration, TParams, TChannel>;
|
|
3627
|
-
filter
|
|
3600
|
+
filter?: FilterFunction<TParams>;
|
|
3628
3601
|
handler: HandlerFunction<TChannel, TParams>;
|
|
3629
3602
|
key: KeyFunction<TParams>;
|
|
3630
3603
|
properties?: (params: TParams) => DisplayProperty[];
|
|
@@ -3635,40 +3608,42 @@ declare class ExternalSource<TIntegration extends TriggerIntegration<Integration
|
|
|
3635
3608
|
constructor(channel: TChannel, options: ExternalSourceOptions<TChannel, TIntegration, TParams>);
|
|
3636
3609
|
handle(source: HandleTriggerSource, rawEvent: ExternalSourceChannelMap[TChannel]["event"], logger: Logger): Promise<void | {
|
|
3637
3610
|
events: {
|
|
3638
|
-
|
|
3639
|
-
source?: string | undefined;
|
|
3611
|
+
name: string;
|
|
3640
3612
|
payload?: any;
|
|
3641
3613
|
context?: any;
|
|
3614
|
+
id?: string | undefined;
|
|
3642
3615
|
timestamp?: Date | undefined;
|
|
3643
|
-
|
|
3616
|
+
source?: string | undefined;
|
|
3644
3617
|
}[];
|
|
3645
3618
|
response?: {
|
|
3646
|
-
headers?: Record<string, string> | undefined;
|
|
3647
|
-
body?: any;
|
|
3648
3619
|
status: number;
|
|
3620
|
+
body?: any;
|
|
3621
|
+
headers?: Record<string, string> | undefined;
|
|
3649
3622
|
} | undefined;
|
|
3650
3623
|
}>;
|
|
3651
3624
|
filter(params: TParams): EventFilter;
|
|
3652
3625
|
properties(params: TParams): DisplayProperty[];
|
|
3653
3626
|
register(params: TParams, registerEvent: RegisterSourceEvent, io: IO, ctx: TriggerContext): Promise<{
|
|
3654
|
-
data?: SerializableJson;
|
|
3655
|
-
secret?: string | undefined;
|
|
3656
3627
|
registeredEvents: string[];
|
|
3628
|
+
secret?: string | undefined;
|
|
3629
|
+
data?: SerializableJson;
|
|
3657
3630
|
} | undefined>;
|
|
3658
3631
|
key(params: TParams): string;
|
|
3659
3632
|
get integration(): TIntegration;
|
|
3660
3633
|
get integrationConfig(): {
|
|
3661
3634
|
id: string;
|
|
3662
3635
|
metadata: {
|
|
3663
|
-
instructions?: string | undefined;
|
|
3664
3636
|
id: string;
|
|
3665
3637
|
name: string;
|
|
3638
|
+
instructions?: string | undefined;
|
|
3666
3639
|
};
|
|
3667
3640
|
};
|
|
3668
3641
|
get id(): string;
|
|
3669
3642
|
get version(): string;
|
|
3670
3643
|
}
|
|
3671
|
-
type ExternalSourceParams<TExternalSource extends ExternalSource<any, any, any>> = TExternalSource extends ExternalSource<any, infer TParams, any> ? TParams
|
|
3644
|
+
type ExternalSourceParams<TExternalSource extends ExternalSource<any, any, any>> = TExternalSource extends ExternalSource<any, infer TParams, any> ? TParams & {
|
|
3645
|
+
filter?: EventFilter;
|
|
3646
|
+
} : never;
|
|
3672
3647
|
type ExternalSourceTriggerOptions<TEventSpecification extends EventSpecification<any>, TEventSource extends ExternalSource<any, any, any>> = {
|
|
3673
3648
|
event: TEventSpecification;
|
|
3674
3649
|
source: TEventSource;
|
|
@@ -3687,19 +3662,43 @@ declare function omit<T extends Record<string, unknown>, K extends keyof T>(obj:
|
|
|
3687
3662
|
ommited: T[K];
|
|
3688
3663
|
};
|
|
3689
3664
|
|
|
3665
|
+
/** Options for a DynamicTrigger */
|
|
3690
3666
|
type DynamicTriggerOptions<TEventSpec extends EventSpecification<any>, TExternalSource extends ExternalSource<any, any, any>> = {
|
|
3667
|
+
/** Used to uniquely identify a DynamicTrigger */
|
|
3691
3668
|
id: string;
|
|
3669
|
+
/** An event from an [Integration](https://trigger.dev/docs/integrations) package that you want to attach to the DynamicTrigger. The event types will come through to the payload in your Job's run. */
|
|
3692
3670
|
event: TEventSpec;
|
|
3671
|
+
/** An external source fron an [Integration](https://trigger.dev/docs/integrations) package
|
|
3672
|
+
* @example
|
|
3673
|
+
* ```ts
|
|
3674
|
+
* import { events } from "@trigger.dev/github";
|
|
3675
|
+
*
|
|
3676
|
+
* const dynamicOnIssueOpened = new DynamicTrigger(client, {
|
|
3677
|
+
id: "github-issue-opened",
|
|
3678
|
+
event: events.onIssueOpened,
|
|
3679
|
+
source: github.sources.repo,
|
|
3680
|
+
});
|
|
3681
|
+
* ```
|
|
3682
|
+
*/
|
|
3693
3683
|
source: TExternalSource;
|
|
3694
3684
|
};
|
|
3685
|
+
/** `DynamicTrigger` allows you to define a trigger that can be configured dynamically at runtime. */
|
|
3695
3686
|
declare class DynamicTrigger<TEventSpec extends EventSpecification<any>, TExternalSource extends ExternalSource<any, any, any>> implements Trigger<TEventSpec> {
|
|
3696
3687
|
#private;
|
|
3697
3688
|
source: TExternalSource;
|
|
3689
|
+
/** `DynamicTrigger` allows you to define a trigger that can be configured dynamically at runtime.
|
|
3690
|
+
* @param client The `TriggerClient` instance to use for registering the trigger.
|
|
3691
|
+
* @param options The options for the dynamic trigger.
|
|
3692
|
+
* */
|
|
3698
3693
|
constructor(client: TriggerClient, options: DynamicTriggerOptions<TEventSpec, TExternalSource>);
|
|
3699
3694
|
toJSON(): TriggerMetadata;
|
|
3700
3695
|
get id(): string;
|
|
3701
3696
|
get event(): TEventSpec;
|
|
3702
3697
|
registeredTriggerForParams(params: ExternalSourceParams<TExternalSource>): RegisterTriggerBody;
|
|
3698
|
+
/** Use this method to register a new configuration with the DynamicTrigger.
|
|
3699
|
+
* @param key The key for the configuration. This will be used to identify the configuration when it is triggered.
|
|
3700
|
+
* @param params The params for the configuration.
|
|
3701
|
+
*/
|
|
3703
3702
|
register(key: string, params: ExternalSourceParams<TExternalSource>): Promise<RegisterSourceEvent>;
|
|
3704
3703
|
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<TEventSpec>, any>): void;
|
|
3705
3704
|
get preprocessRuns(): boolean;
|
|
@@ -3741,12 +3740,8 @@ declare class TriggerClient {
|
|
|
3741
3740
|
}): void;
|
|
3742
3741
|
attachDynamicSchedule(key: string, job: Job<Trigger<any>, any>): void;
|
|
3743
3742
|
registerTrigger(id: string, key: string, options: RegisterTriggerBody): Promise<{
|
|
3744
|
-
dynamicTriggerId?: string | undefined;
|
|
3745
3743
|
id: string;
|
|
3746
3744
|
source: {
|
|
3747
|
-
params?: any;
|
|
3748
|
-
data?: DeserializedJson | undefined;
|
|
3749
|
-
clientId?: string | undefined;
|
|
3750
3745
|
key: string;
|
|
3751
3746
|
secret: string;
|
|
3752
3747
|
active: boolean;
|
|
@@ -3758,16 +3753,20 @@ declare class TriggerClient {
|
|
|
3758
3753
|
} | {
|
|
3759
3754
|
type: "SQS";
|
|
3760
3755
|
};
|
|
3756
|
+
params?: any;
|
|
3757
|
+
data?: DeserializedJson | undefined;
|
|
3758
|
+
clientId?: string | undefined;
|
|
3761
3759
|
};
|
|
3762
3760
|
events: string[];
|
|
3763
3761
|
missingEvents: string[];
|
|
3764
3762
|
orphanedEvents: string[];
|
|
3763
|
+
dynamicTriggerId?: string | undefined;
|
|
3765
3764
|
}>;
|
|
3766
3765
|
getAuth(id: string): Promise<{
|
|
3767
|
-
scopes?: string[] | undefined;
|
|
3768
|
-
additionalFields?: Record<string, string> | undefined;
|
|
3769
3766
|
type: "oauth2";
|
|
3770
3767
|
accessToken: string;
|
|
3768
|
+
scopes?: string[] | undefined;
|
|
3769
|
+
additionalFields?: Record<string, string> | undefined;
|
|
3771
3770
|
} | undefined>;
|
|
3772
3771
|
/** You can call this function from anywhere in your code to send an event. The other way to send an event is by using [`io.sendEvent()`](https://trigger.dev/docs/sdk/io/sendevent) from inside a `run()` function.
|
|
3773
3772
|
* @param event The event to send.
|
|
@@ -3775,37 +3774,82 @@ declare class TriggerClient {
|
|
|
3775
3774
|
* @returns A promise that resolves to the event details
|
|
3776
3775
|
*/
|
|
3777
3776
|
sendEvent(event: SendEvent, options?: SendEventOptions): Promise<{
|
|
3778
|
-
context?: DeserializedJson | undefined;
|
|
3779
|
-
deliverAt?: Date | null | undefined;
|
|
3780
|
-
deliveredAt?: Date | null | undefined;
|
|
3781
3777
|
id: string;
|
|
3782
3778
|
name: string;
|
|
3783
|
-
payload:
|
|
3779
|
+
payload: ((string | number | boolean | {
|
|
3780
|
+
[key: string]: DeserializedJson;
|
|
3781
|
+
} | DeserializedJson[]) & (string | number | boolean | {
|
|
3782
|
+
[key: string]: DeserializedJson;
|
|
3783
|
+
} | DeserializedJson[] | undefined)) | null;
|
|
3784
3784
|
timestamp: Date;
|
|
3785
|
+
context?: DeserializedJson | undefined;
|
|
3786
|
+
deliverAt?: Date | null | undefined;
|
|
3787
|
+
deliveredAt?: Date | null | undefined;
|
|
3785
3788
|
}>;
|
|
3786
3789
|
registerSchedule(id: string, key: string, schedule: ScheduleMetadata): Promise<{
|
|
3787
|
-
metadata?: any;
|
|
3788
3790
|
id: string;
|
|
3789
3791
|
schedule: {
|
|
3790
|
-
metadata?: any;
|
|
3791
3792
|
options: {
|
|
3792
3793
|
cron: string;
|
|
3793
3794
|
};
|
|
3794
3795
|
type: "cron";
|
|
3795
|
-
} | {
|
|
3796
3796
|
metadata?: any;
|
|
3797
|
+
} | {
|
|
3797
3798
|
options: {
|
|
3798
3799
|
seconds: number;
|
|
3799
3800
|
};
|
|
3800
3801
|
type: "interval";
|
|
3802
|
+
metadata?: any;
|
|
3801
3803
|
};
|
|
3802
3804
|
active: boolean;
|
|
3805
|
+
metadata?: any;
|
|
3803
3806
|
}>;
|
|
3804
3807
|
unregisterSchedule(id: string, key: string): Promise<{
|
|
3805
3808
|
ok: boolean;
|
|
3806
3809
|
}>;
|
|
3810
|
+
getEvent(eventId: string): Promise<{
|
|
3811
|
+
id: string;
|
|
3812
|
+
name: string;
|
|
3813
|
+
createdAt: Date;
|
|
3814
|
+
updatedAt: Date;
|
|
3815
|
+
runs: {
|
|
3816
|
+
id: string;
|
|
3817
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "FAILURE" | "TIMED_OUT" | "ABORTED";
|
|
3818
|
+
startedAt?: Date | null | undefined;
|
|
3819
|
+
completedAt?: Date | null | undefined;
|
|
3820
|
+
}[];
|
|
3821
|
+
}>;
|
|
3822
|
+
getRun(runId: string, options?: GetRunOptionsWithTaskDetails): Promise<{
|
|
3823
|
+
id: string;
|
|
3824
|
+
startedAt: Date | null;
|
|
3825
|
+
completedAt: Date | null;
|
|
3826
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "FAILURE" | "TIMED_OUT" | "ABORTED";
|
|
3827
|
+
tasks: {
|
|
3828
|
+
id: string;
|
|
3829
|
+
name: string;
|
|
3830
|
+
icon: string | null;
|
|
3831
|
+
startedAt: Date | null;
|
|
3832
|
+
completedAt: Date | null;
|
|
3833
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
|
|
3834
|
+
displayKey: string | null;
|
|
3835
|
+
}[];
|
|
3836
|
+
updatedAt: Date | null;
|
|
3837
|
+
output?: any;
|
|
3838
|
+
nextCursor?: string | undefined;
|
|
3839
|
+
}>;
|
|
3840
|
+
getRuns(jobSlug: string, options?: GetRunsOptions): Promise<{
|
|
3841
|
+
runs: {
|
|
3842
|
+
id: string;
|
|
3843
|
+
startedAt: Date | null;
|
|
3844
|
+
completedAt: Date | null;
|
|
3845
|
+
status: "PENDING" | "CANCELED" | "SUCCESS" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "FAILURE" | "TIMED_OUT" | "ABORTED";
|
|
3846
|
+
updatedAt: Date | null;
|
|
3847
|
+
}[];
|
|
3848
|
+
nextCursor?: string | undefined;
|
|
3849
|
+
}>;
|
|
3807
3850
|
authorized(apiKey?: string | null): "authorized" | "unauthorized" | "missing-client" | "missing-header";
|
|
3808
3851
|
apiKey(): string | undefined;
|
|
3852
|
+
defineJob<TTrigger extends Trigger<EventSpecification<any>>, TIntegrations extends Record<string, TriggerIntegration<IntegrationClient<any, any>>> = {}>(options: JobOptions<TTrigger, TIntegrations>): Job<TTrigger, TIntegrations>;
|
|
3809
3853
|
}
|
|
3810
3854
|
|
|
3811
3855
|
type ScheduledEventSpecification = EventSpecification<ScheduledPayload>;
|
|
@@ -3827,8 +3871,8 @@ declare class IntervalTrigger implements Trigger<ScheduledEventSpecification> {
|
|
|
3827
3871
|
};
|
|
3828
3872
|
}[];
|
|
3829
3873
|
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3830
|
-
lastTimestamp?: Date | undefined;
|
|
3831
3874
|
ts: Date;
|
|
3875
|
+
lastTimestamp?: Date | undefined;
|
|
3832
3876
|
};
|
|
3833
3877
|
properties: {
|
|
3834
3878
|
label: string;
|
|
@@ -3839,6 +3883,9 @@ declare class IntervalTrigger implements Trigger<ScheduledEventSpecification> {
|
|
|
3839
3883
|
get preprocessRuns(): boolean;
|
|
3840
3884
|
toJSON(): TriggerMetadata;
|
|
3841
3885
|
}
|
|
3886
|
+
/** `intervalTrigger()` is set as a [Job's trigger](/sdk/job) to trigger a Job at a recurring interval.
|
|
3887
|
+
* @param options An object containing options about the interval.
|
|
3888
|
+
*/
|
|
3842
3889
|
declare function intervalTrigger(options: IntervalOptions): IntervalTrigger;
|
|
3843
3890
|
declare class CronTrigger implements Trigger<ScheduledEventSpecification> {
|
|
3844
3891
|
private options;
|
|
@@ -3858,8 +3905,8 @@ declare class CronTrigger implements Trigger<ScheduledEventSpecification> {
|
|
|
3858
3905
|
};
|
|
3859
3906
|
}[];
|
|
3860
3907
|
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3861
|
-
lastTimestamp?: Date | undefined;
|
|
3862
3908
|
ts: Date;
|
|
3909
|
+
lastTimestamp?: Date | undefined;
|
|
3863
3910
|
};
|
|
3864
3911
|
properties: {
|
|
3865
3912
|
label: string;
|
|
@@ -3870,13 +3917,24 @@ declare class CronTrigger implements Trigger<ScheduledEventSpecification> {
|
|
|
3870
3917
|
get preprocessRuns(): boolean;
|
|
3871
3918
|
toJSON(): TriggerMetadata;
|
|
3872
3919
|
}
|
|
3920
|
+
/** `cronTrigger()` is set as a [Job's trigger](https://trigger.dev/docs/sdk/job) to trigger a Job on a recurring schedule using a CRON expression.
|
|
3921
|
+
* @param options An object containing options about the CRON schedule.
|
|
3922
|
+
*/
|
|
3873
3923
|
declare function cronTrigger(options: CronOptions): CronTrigger;
|
|
3924
|
+
/** DynamicSchedule options
|
|
3925
|
+
* @param id Used to uniquely identify a DynamicSchedule
|
|
3926
|
+
*/
|
|
3874
3927
|
type DynamicIntervalOptions = {
|
|
3875
3928
|
id: string;
|
|
3876
3929
|
};
|
|
3930
|
+
/** DynamicSchedule` allows you to define a scheduled trigger that can be configured dynamically at runtime. */
|
|
3877
3931
|
declare class DynamicSchedule implements Trigger<ScheduledEventSpecification> {
|
|
3878
3932
|
private client;
|
|
3879
3933
|
private options;
|
|
3934
|
+
/**
|
|
3935
|
+
* @param client The `TriggerClient` instance to use for registering the trigger.
|
|
3936
|
+
* @param options The options for the schedule.
|
|
3937
|
+
*/
|
|
3880
3938
|
constructor(client: TriggerClient, options: DynamicIntervalOptions);
|
|
3881
3939
|
get id(): string;
|
|
3882
3940
|
get event(): {
|
|
@@ -3894,27 +3952,27 @@ declare class DynamicSchedule implements Trigger<ScheduledEventSpecification> {
|
|
|
3894
3952
|
};
|
|
3895
3953
|
}[];
|
|
3896
3954
|
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3897
|
-
lastTimestamp?: Date | undefined;
|
|
3898
3955
|
ts: Date;
|
|
3956
|
+
lastTimestamp?: Date | undefined;
|
|
3899
3957
|
};
|
|
3900
3958
|
};
|
|
3901
3959
|
register(key: string, metadata: ScheduleMetadata): Promise<{
|
|
3902
|
-
metadata?: any;
|
|
3903
3960
|
id: string;
|
|
3904
3961
|
schedule: {
|
|
3905
|
-
metadata?: any;
|
|
3906
3962
|
options: {
|
|
3907
3963
|
cron: string;
|
|
3908
3964
|
};
|
|
3909
3965
|
type: "cron";
|
|
3910
|
-
} | {
|
|
3911
3966
|
metadata?: any;
|
|
3967
|
+
} | {
|
|
3912
3968
|
options: {
|
|
3913
3969
|
seconds: number;
|
|
3914
3970
|
};
|
|
3915
3971
|
type: "interval";
|
|
3972
|
+
metadata?: any;
|
|
3916
3973
|
};
|
|
3917
3974
|
active: boolean;
|
|
3975
|
+
metadata?: any;
|
|
3918
3976
|
}>;
|
|
3919
3977
|
unregister(key: string): Promise<{
|
|
3920
3978
|
ok: boolean;
|
|
@@ -3973,13 +4031,17 @@ declare class IO {
|
|
|
3973
4031
|
* @param options Options for sending the event.
|
|
3974
4032
|
*/
|
|
3975
4033
|
sendEvent(key: string | any[], event: SendEvent, options?: SendEventOptions): Promise<{
|
|
3976
|
-
context?: DeserializedJson | undefined;
|
|
3977
|
-
deliverAt?: Date | null | undefined;
|
|
3978
|
-
deliveredAt?: Date | null | undefined;
|
|
3979
4034
|
id: string;
|
|
3980
4035
|
name: string;
|
|
3981
|
-
payload:
|
|
4036
|
+
payload: ((string | number | boolean | {
|
|
4037
|
+
[key: string]: DeserializedJson;
|
|
4038
|
+
} | DeserializedJson[]) & (string | number | boolean | {
|
|
4039
|
+
[key: string]: DeserializedJson;
|
|
4040
|
+
} | DeserializedJson[] | undefined)) | null;
|
|
3982
4041
|
timestamp: Date;
|
|
4042
|
+
context?: DeserializedJson | undefined;
|
|
4043
|
+
deliverAt?: Date | null | undefined;
|
|
4044
|
+
deliveredAt?: Date | null | undefined;
|
|
3983
4045
|
}>;
|
|
3984
4046
|
updateSource(key: string | any[], options: {
|
|
3985
4047
|
key: string;
|
|
@@ -3995,22 +4057,22 @@ declare class IO {
|
|
|
3995
4057
|
* @returns A promise that has information about the interval.
|
|
3996
4058
|
*/
|
|
3997
4059
|
registerInterval(key: string | any[], dynamicSchedule: DynamicSchedule, id: string, options: IntervalOptions): Promise<{
|
|
3998
|
-
metadata?: any;
|
|
3999
4060
|
id: string;
|
|
4000
4061
|
schedule: {
|
|
4001
|
-
metadata?: any;
|
|
4002
4062
|
options: {
|
|
4003
4063
|
cron: string;
|
|
4004
4064
|
};
|
|
4005
4065
|
type: "cron";
|
|
4006
|
-
} | {
|
|
4007
4066
|
metadata?: any;
|
|
4067
|
+
} | {
|
|
4008
4068
|
options: {
|
|
4009
4069
|
seconds: number;
|
|
4010
4070
|
};
|
|
4011
4071
|
type: "interval";
|
|
4072
|
+
metadata?: any;
|
|
4012
4073
|
};
|
|
4013
4074
|
active: boolean;
|
|
4075
|
+
metadata?: any;
|
|
4014
4076
|
}>;
|
|
4015
4077
|
/** `io.unregisterInterval()` allows you to unregister a [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) that was previously registered with `io.registerInterval()`.
|
|
4016
4078
|
* @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information.
|
|
@@ -4027,22 +4089,22 @@ declare class IO {
|
|
|
4027
4089
|
* @param options The options for the CRON schedule.
|
|
4028
4090
|
*/
|
|
4029
4091
|
registerCron(key: string | any[], dynamicSchedule: DynamicSchedule, id: string, options: CronOptions): Promise<{
|
|
4030
|
-
metadata?: any;
|
|
4031
4092
|
id: string;
|
|
4032
4093
|
schedule: {
|
|
4033
|
-
metadata?: any;
|
|
4034
4094
|
options: {
|
|
4035
4095
|
cron: string;
|
|
4036
4096
|
};
|
|
4037
4097
|
type: "cron";
|
|
4038
|
-
} | {
|
|
4039
4098
|
metadata?: any;
|
|
4099
|
+
} | {
|
|
4040
4100
|
options: {
|
|
4041
4101
|
seconds: number;
|
|
4042
4102
|
};
|
|
4043
4103
|
type: "interval";
|
|
4104
|
+
metadata?: any;
|
|
4044
4105
|
};
|
|
4045
4106
|
active: boolean;
|
|
4107
|
+
metadata?: any;
|
|
4046
4108
|
}>;
|
|
4047
4109
|
/** `io.unregisterCron()` allows you to unregister a [DynamicSchedule](https://trigger.dev/docs/sdk/dynamicschedule) that was previously registered with `io.registerCron()`.
|
|
4048
4110
|
* @param key Should be a stable and unique key inside the `run()`. See [resumability](https://trigger.dev/docs/documentation/concepts/resumability) for more information.
|
|
@@ -4075,7 +4137,7 @@ declare class IO {
|
|
|
4075
4137
|
retryAt: Date;
|
|
4076
4138
|
error?: Error;
|
|
4077
4139
|
jitter?: number;
|
|
4078
|
-
} | undefined | void): Promise<TResult>;
|
|
4140
|
+
} | Error | undefined | void): Promise<TResult>;
|
|
4079
4141
|
/** `io.try()` allows you to run Tasks and catch any errors that are thrown, it's similar to a normal `try/catch` block but works with [io.runTask()](/sdk/io/runtask).
|
|
4080
4142
|
* A regular `try/catch` block on its own won't work as expected with Tasks. Internally `runTask()` throws some special errors to control flow execution. This is necessary to deal with resumability, serverless timeouts, and retrying Tasks.
|
|
4081
4143
|
* @param tryCallback The code you wish to run
|
|
@@ -4100,6 +4162,7 @@ declare class IOLogger implements TaskLogger {
|
|
|
4100
4162
|
error(message: string, properties?: Record<string, any>): Promise<void>;
|
|
4101
4163
|
}
|
|
4102
4164
|
|
|
4165
|
+
type IntegrationRunTaskFunction<TClient> = <TResult>(key: string | any[], callback: (client: TClient, task: IOTask, io: IO) => Promise<TResult>, options?: RunTaskOptions) => Promise<TResult>;
|
|
4103
4166
|
type ClientFactory<TClient> = (auth: ConnectionAuth) => TClient;
|
|
4104
4167
|
interface TriggerIntegration<TIntegrationClient extends IntegrationClient<any, any> = IntegrationClient<any, any>> {
|
|
4105
4168
|
client: TIntegrationClient;
|
|
@@ -4122,7 +4185,7 @@ type AuthenticatedTask<TClient, TParams, TResult, TAuth = ConnectionAuth> = {
|
|
|
4122
4185
|
onError?: (error: unknown, task: ServerTask) => {
|
|
4123
4186
|
retryAt: Date;
|
|
4124
4187
|
error?: Error;
|
|
4125
|
-
} | undefined | void;
|
|
4188
|
+
} | Error | undefined | void;
|
|
4126
4189
|
};
|
|
4127
4190
|
declare function authenticatedTask<TClient, TParams, TResult>(options: {
|
|
4128
4191
|
run: (params: TParams, client: TClient, task: ServerTask, io: IO) => Promise<TResult>;
|
|
@@ -4137,13 +4200,16 @@ type ExtractIntegrationClientClient<TIntegrationClient extends IntegrationClient
|
|
|
4137
4200
|
client: infer TClient;
|
|
4138
4201
|
} ? {
|
|
4139
4202
|
client: TClient;
|
|
4203
|
+
runTask: IntegrationRunTaskFunction<TClient>;
|
|
4140
4204
|
} : TIntegrationClient extends {
|
|
4141
4205
|
usesLocalAuth: false;
|
|
4142
4206
|
clientFactory: ClientFactory<infer TClient>;
|
|
4143
4207
|
} ? {
|
|
4144
4208
|
client: TClient;
|
|
4209
|
+
runTask: IntegrationRunTaskFunction<TClient>;
|
|
4145
4210
|
} : never;
|
|
4146
4211
|
type ExtractIntegrationClient<TIntegrationClient extends IntegrationClient<any, any>> = ExtractIntegrationClientClient<TIntegrationClient> & ExtractTasks<TIntegrationClient["tasks"]>;
|
|
4212
|
+
type IntegrationIO<TIntegration extends TriggerIntegration<IntegrationClient<any, any>>> = ExtractIntegrationClient<TIntegration["client"]>;
|
|
4147
4213
|
type ExtractIntegrations<TIntegrations extends Record<string, TriggerIntegration<IntegrationClient<any, any>>>> = {
|
|
4148
4214
|
[key in keyof TIntegrations]: ExtractIntegrationClient<TIntegrations[key]["client"]>;
|
|
4149
4215
|
};
|
|
@@ -4169,7 +4235,7 @@ type JobOptions<TTrigger extends Trigger<EventSpecification<any>>, TIntegrations
|
|
|
4169
4235
|
logLevel?: LogLevel;
|
|
4170
4236
|
/** Imports the specified integrations into the Job. The integrations will be available on the `io` object in the `run()` function with the same name as the key. For example:
|
|
4171
4237
|
```ts
|
|
4172
|
-
|
|
4238
|
+
client.defineJob({
|
|
4173
4239
|
//... other options
|
|
4174
4240
|
integrations: {
|
|
4175
4241
|
slack,
|
|
@@ -4197,6 +4263,8 @@ type JobOptions<TTrigger extends Trigger<EventSpecification<any>>, TIntegrations
|
|
|
4197
4263
|
*/
|
|
4198
4264
|
run: (payload: TriggerEventType<TTrigger>, io: IOWithIntegrations<TIntegrations>, context: TriggerContext) => Promise<any>;
|
|
4199
4265
|
};
|
|
4266
|
+
type JobPayload<TJob> = TJob extends Job<Trigger<EventSpecification<infer TEvent>>, any> ? TEvent : never;
|
|
4267
|
+
type JobIO<TJob> = TJob extends Job<any, infer TIntegrations> ? IOWithIntegrations<TIntegrations> : never;
|
|
4200
4268
|
/** A [Job](https://trigger.dev/docs/documentation/concepts/jobs) is used to define the [Trigger](https://trigger.dev/docs/documentation/concepts/triggers), metadata, and what happens when it runs. */
|
|
4201
4269
|
declare class Job<TTrigger extends Trigger<EventSpecification<any>>, TIntegrations extends Record<string, TriggerIntegration<IntegrationClient<any, any>>> = {}> {
|
|
4202
4270
|
#private;
|
|
@@ -4218,7 +4286,7 @@ declare class Job<TTrigger extends Trigger<EventSpecification<any>>, TIntegratio
|
|
|
4218
4286
|
|
|
4219
4287
|
type EventTriggerOptions<TEventSpecification extends EventSpecification<any>> = {
|
|
4220
4288
|
event: TEventSpecification;
|
|
4221
|
-
name?: string;
|
|
4289
|
+
name?: string | string[];
|
|
4222
4290
|
source?: string;
|
|
4223
4291
|
filter?: EventFilter;
|
|
4224
4292
|
};
|
|
@@ -4232,8 +4300,8 @@ declare class EventTrigger<TEventSpecification extends EventSpecification<any>>
|
|
|
4232
4300
|
}
|
|
4233
4301
|
/** Configuration options for an EventTrigger */
|
|
4234
4302
|
type TriggerOptions<TEvent> = {
|
|
4235
|
-
/** The name of the event you are subscribing to. Must be an exact match (case sensitive). */
|
|
4236
|
-
name: string;
|
|
4303
|
+
/** The name of the event you are subscribing to. Must be an exact match (case sensitive). To trigger on multiple possible events, pass in an array of event names */
|
|
4304
|
+
name: string | string[];
|
|
4237
4305
|
/** A [Zod](https://trigger.dev/docs/documentation/guides/zod) schema that defines the shape of the event payload.
|
|
4238
4306
|
* The default is `z.any()` which is `any`.
|
|
4239
4307
|
* */
|
|
@@ -4260,6 +4328,7 @@ type TriggerOptions<TEvent> = {
|
|
|
4260
4328
|
* ```
|
|
4261
4329
|
*/
|
|
4262
4330
|
filter?: EventFilter;
|
|
4331
|
+
examples?: EventSpecificationExample[];
|
|
4263
4332
|
};
|
|
4264
4333
|
/** `eventTrigger()` is set as a [Job's trigger](https://trigger.dev/docs/sdk/job) to subscribe to an event a Job from [a sent event](https://trigger.dev/docs/sdk/triggerclient/instancemethods/sendevent)
|
|
4265
4334
|
* @param options options for the EventTrigger
|
|
@@ -4295,8 +4364,8 @@ declare class MissingConnectionNotification implements Trigger<MissingConnection
|
|
|
4295
4364
|
id: string;
|
|
4296
4365
|
type: "EXTERNAL";
|
|
4297
4366
|
account: {
|
|
4298
|
-
metadata?: any;
|
|
4299
4367
|
id: string;
|
|
4368
|
+
metadata?: any;
|
|
4300
4369
|
};
|
|
4301
4370
|
client: {
|
|
4302
4371
|
id: string;
|
|
@@ -4342,8 +4411,8 @@ declare class MissingConnectionResolvedNotification implements Trigger<MissingCo
|
|
|
4342
4411
|
id: string;
|
|
4343
4412
|
type: "EXTERNAL";
|
|
4344
4413
|
account: {
|
|
4345
|
-
metadata?: any;
|
|
4346
4414
|
id: string;
|
|
4415
|
+
metadata?: any;
|
|
4347
4416
|
};
|
|
4348
4417
|
client: {
|
|
4349
4418
|
id: string;
|
|
@@ -4376,15 +4445,21 @@ declare class RetryWithTaskError {
|
|
|
4376
4445
|
retryAt: Date;
|
|
4377
4446
|
constructor(cause: ErrorWithStack, task: ServerTask, retryAt: Date);
|
|
4378
4447
|
}
|
|
4448
|
+
declare class CanceledWithTaskError {
|
|
4449
|
+
task: ServerTask;
|
|
4450
|
+
constructor(task: ServerTask);
|
|
4451
|
+
}
|
|
4379
4452
|
/** Use this function if you're using a `try/catch` block to catch errors.
|
|
4380
4453
|
* It checks if a thrown error is a special internal error that you should ignore.
|
|
4381
4454
|
* If this returns `true` then you must rethrow the error: `throw err;`
|
|
4382
4455
|
* @param err The error to check
|
|
4383
4456
|
* @returns `true` if the error is a Trigger Error, `false` otherwise.
|
|
4384
4457
|
*/
|
|
4385
|
-
declare function isTriggerError(err: unknown): err is ResumeWithTaskError | RetryWithTaskError;
|
|
4458
|
+
declare function isTriggerError(err: unknown): err is ResumeWithTaskError | RetryWithTaskError | CanceledWithTaskError;
|
|
4386
4459
|
|
|
4387
4460
|
type Task = ServerTask;
|
|
4461
|
+
|
|
4462
|
+
type SentEvent = ApiEventLog;
|
|
4388
4463
|
declare function redactString(strings: TemplateStringsArray, ...interpolations: string[]): RedactString;
|
|
4389
4464
|
|
|
4390
|
-
export { AuthenticatedTask, ClientFactory, CronTrigger, DynamicIntervalOptions, DynamicSchedule, DynamicTrigger, DynamicTriggerOptions, EventFilter, EventSpecification, EventSpecificationExample, EventTrigger, EventTypeFromSpecification, ExternalSource, ExternalSourceParams, ExternalSourceTrigger, ExternalSourceTriggerOptions, HandlerEvent, HttpSourceEvent, IO, IOLogger, IOOptions, IOTask, IOWithIntegrations, IntegrationClient, IntervalTrigger, Job, JobOptions, Logger, MissingConnectionNotification, MissingConnectionResolvedNotification, NormalizedRequest, PreprocessResults, RedactString, Task, TaskLogger, Trigger, TriggerClient, TriggerClientOptions, TriggerContext, TriggerEventType, TriggerIntegration, TriggerPreprocessContext, authenticatedTask, cronTrigger, eventTrigger, intervalTrigger, isTriggerError, missingConnectionNotification, missingConnectionResolvedNotification, omit, redactString };
|
|
4465
|
+
export { AuthenticatedTask, ClientFactory, CronTrigger, DynamicIntervalOptions, DynamicSchedule, DynamicTrigger, DynamicTriggerOptions, EventFilter, EventSpecification, EventSpecificationExample, EventTrigger, EventTypeFromSpecification, ExternalSource, ExternalSourceParams, ExternalSourceTrigger, ExternalSourceTriggerOptions, HandlerEvent, HttpSourceEvent, IO, IOLogger, IOOptions, IOTask, IOWithIntegrations, IntegrationClient, IntegrationIO, IntervalTrigger, Job, JobIO, JobOptions, JobPayload, Logger, MissingConnectionNotification, MissingConnectionResolvedNotification, NormalizedRequest, PreprocessResults, RedactString, SentEvent, Task, TaskLogger, Trigger, TriggerClient, TriggerClientOptions, TriggerContext, TriggerEventType, TriggerIntegration, TriggerPayload, TriggerPreprocessContext, authenticatedTask, cronTrigger, eventTrigger, intervalTrigger, isTriggerError, missingConnectionNotification, missingConnectionResolvedNotification, omit, redactString };
|