@trigger.dev/sdk 0.2.22-next.0 → 2.0.0-next.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/dist/index.d.ts +3533 -426
- package/dist/index.js +2417 -2034
- package/dist/index.js.map +1 -1
- package/package.json +6 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,371 +1,1317 @@
|
|
|
1
1
|
import * as zod from 'zod';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
type LogLevel = "log" | "error" | "warn" | "info" | "debug";
|
|
5
|
+
declare class Logger {
|
|
6
|
+
#private;
|
|
7
|
+
constructor(name: string, level?: LogLevel, filteredKeys?: string[]);
|
|
8
|
+
filter(...keys: string[]): Logger;
|
|
9
|
+
log(...args: any[]): void;
|
|
10
|
+
error(...args: any[]): void;
|
|
11
|
+
warn(...args: any[]): void;
|
|
12
|
+
info(...args: any[]): void;
|
|
13
|
+
debug(message: string, ...args: Array<Record<string, unknown> | undefined>): void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const EventMatcherSchema: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodBoolean, "many">]>;
|
|
17
|
+
type EventMatcher = z.infer<typeof EventMatcherSchema>;
|
|
18
|
+
type EventFilter = {
|
|
19
|
+
[key: string]: EventMatcher | EventFilter;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
declare const LiteralSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
23
|
+
type Literal = z.infer<typeof LiteralSchema>;
|
|
24
|
+
type DeserializedJson = Literal | {
|
|
25
|
+
[key: string]: DeserializedJson;
|
|
26
|
+
} | DeserializedJson[];
|
|
27
|
+
declare const SerializableSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodDate, z.ZodUndefined, z.ZodSymbol]>;
|
|
5
28
|
type Serializable = z.infer<typeof SerializableSchema>;
|
|
6
29
|
type SerializableJson = Serializable | {
|
|
7
30
|
[key: string]: SerializableJson;
|
|
8
31
|
} | SerializableJson[];
|
|
9
|
-
declare const SerializableJsonSchema: z.ZodType<SerializableJson>;
|
|
10
32
|
|
|
11
|
-
declare const
|
|
33
|
+
declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
|
|
34
|
+
id: z.ZodString;
|
|
12
35
|
name: z.ZodString;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
delay: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
25
|
-
seconds: z.ZodNumber;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
seconds: number;
|
|
28
|
-
}, {
|
|
29
|
-
seconds: number;
|
|
30
|
-
}>, z.ZodObject<{
|
|
31
|
-
minutes: z.ZodNumber;
|
|
36
|
+
icon: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
37
|
+
noop: z.ZodBoolean;
|
|
38
|
+
startedAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
39
|
+
completedAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
40
|
+
delayUntil: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
41
|
+
status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED"]>;
|
|
42
|
+
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
43
|
+
properties: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
|
+
label: z.ZodString;
|
|
45
|
+
text: z.ZodString;
|
|
46
|
+
url: z.ZodOptional<z.ZodString>;
|
|
32
47
|
}, "strip", z.ZodTypeAny, {
|
|
33
|
-
|
|
48
|
+
url?: string | undefined;
|
|
49
|
+
label: string;
|
|
50
|
+
text: string;
|
|
34
51
|
}, {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
url?: string | undefined;
|
|
53
|
+
label: string;
|
|
54
|
+
text: string;
|
|
55
|
+
}>, "many">>>;
|
|
56
|
+
params: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
|
|
57
|
+
output: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
|
|
58
|
+
error: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
59
|
+
parentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
60
|
+
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
61
|
+
style: z.ZodEnum<["normal", "minimal"]>;
|
|
62
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
44
63
|
}, "strip", z.ZodTypeAny, {
|
|
45
|
-
|
|
64
|
+
variant?: string | undefined;
|
|
65
|
+
style: "normal" | "minimal";
|
|
46
66
|
}, {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
67
|
+
variant?: string | undefined;
|
|
68
|
+
style: "normal" | "minimal";
|
|
69
|
+
}>>>;
|
|
70
|
+
}, {
|
|
71
|
+
idempotencyKey: z.ZodString;
|
|
72
|
+
}>, "strip", z.ZodTypeAny, {
|
|
73
|
+
error?: string | null | undefined;
|
|
74
|
+
params?: DeserializedJson | undefined;
|
|
75
|
+
icon?: string | null | undefined;
|
|
76
|
+
style?: {
|
|
77
|
+
variant?: string | undefined;
|
|
78
|
+
style: "normal" | "minimal";
|
|
79
|
+
} | null | undefined;
|
|
80
|
+
startedAt?: Date | null | undefined;
|
|
81
|
+
completedAt?: Date | null | undefined;
|
|
82
|
+
delayUntil?: Date | null | undefined;
|
|
83
|
+
description?: string | null | undefined;
|
|
84
|
+
properties?: {
|
|
85
|
+
url?: string | undefined;
|
|
86
|
+
label: string;
|
|
87
|
+
text: string;
|
|
88
|
+
}[] | null | undefined;
|
|
89
|
+
output?: DeserializedJson | undefined;
|
|
90
|
+
parentId?: string | null | undefined;
|
|
91
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
92
|
+
id: string;
|
|
93
|
+
name: string;
|
|
94
|
+
noop: boolean;
|
|
95
|
+
idempotencyKey: string;
|
|
96
|
+
}, {
|
|
97
|
+
error?: string | null | undefined;
|
|
98
|
+
params?: DeserializedJson | undefined;
|
|
99
|
+
icon?: string | null | undefined;
|
|
100
|
+
style?: {
|
|
101
|
+
variant?: string | undefined;
|
|
102
|
+
style: "normal" | "minimal";
|
|
103
|
+
} | null | undefined;
|
|
104
|
+
startedAt?: Date | null | undefined;
|
|
105
|
+
completedAt?: Date | null | undefined;
|
|
106
|
+
delayUntil?: Date | null | undefined;
|
|
107
|
+
description?: string | null | undefined;
|
|
108
|
+
properties?: {
|
|
109
|
+
url?: string | undefined;
|
|
110
|
+
label: string;
|
|
111
|
+
text: string;
|
|
112
|
+
}[] | null | undefined;
|
|
113
|
+
output?: DeserializedJson | undefined;
|
|
114
|
+
parentId?: string | null | undefined;
|
|
115
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
noop: boolean;
|
|
119
|
+
idempotencyKey: string;
|
|
120
|
+
}>;
|
|
121
|
+
declare const CachedTaskSchema: z.ZodObject<{
|
|
122
|
+
id: z.ZodString;
|
|
123
|
+
idempotencyKey: z.ZodString;
|
|
124
|
+
status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED"]>;
|
|
125
|
+
noop: z.ZodDefault<z.ZodBoolean>;
|
|
126
|
+
output: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
|
|
127
|
+
parentId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
|
129
|
+
output?: DeserializedJson | undefined;
|
|
130
|
+
parentId?: string | null | undefined;
|
|
131
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
132
|
+
id: string;
|
|
133
|
+
noop: boolean;
|
|
134
|
+
idempotencyKey: string;
|
|
135
|
+
}, {
|
|
136
|
+
noop?: boolean | undefined;
|
|
137
|
+
output?: DeserializedJson | undefined;
|
|
138
|
+
parentId?: string | null | undefined;
|
|
139
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
140
|
+
id: string;
|
|
141
|
+
idempotencyKey: string;
|
|
142
|
+
}>;
|
|
143
|
+
|
|
144
|
+
declare const UpdateTriggerSourceBodySchema: z.ZodObject<{
|
|
145
|
+
registeredEvents: z.ZodArray<z.ZodString, "many">;
|
|
146
|
+
secret: z.ZodOptional<z.ZodString>;
|
|
147
|
+
data: z.ZodOptional<z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>;
|
|
148
|
+
}, "strip", z.ZodTypeAny, {
|
|
149
|
+
data?: SerializableJson;
|
|
150
|
+
secret?: string | undefined;
|
|
151
|
+
registeredEvents: string[];
|
|
152
|
+
}, {
|
|
153
|
+
data?: SerializableJson;
|
|
154
|
+
secret?: string | undefined;
|
|
155
|
+
registeredEvents: string[];
|
|
156
|
+
}>;
|
|
157
|
+
type UpdateTriggerSourceBody = z.infer<typeof UpdateTriggerSourceBodySchema>;
|
|
158
|
+
declare const RegisterSourceEventSchema: z.ZodObject<{
|
|
159
|
+
id: z.ZodString;
|
|
160
|
+
source: z.ZodObject<{
|
|
161
|
+
key: z.ZodString;
|
|
162
|
+
params: z.ZodAny;
|
|
163
|
+
active: z.ZodBoolean;
|
|
164
|
+
secret: z.ZodString;
|
|
165
|
+
data: z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>;
|
|
166
|
+
channel: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
167
|
+
type: z.ZodLiteral<"HTTP">;
|
|
168
|
+
url: z.ZodString;
|
|
169
|
+
}, "strip", z.ZodTypeAny, {
|
|
170
|
+
type: "HTTP";
|
|
171
|
+
url: string;
|
|
172
|
+
}, {
|
|
173
|
+
type: "HTTP";
|
|
174
|
+
url: string;
|
|
175
|
+
}>, z.ZodObject<{
|
|
176
|
+
type: z.ZodLiteral<"SMTP">;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
type: "SMTP";
|
|
179
|
+
}, {
|
|
180
|
+
type: "SMTP";
|
|
181
|
+
}>, z.ZodObject<{
|
|
182
|
+
type: z.ZodLiteral<"SQS">;
|
|
183
|
+
}, "strip", z.ZodTypeAny, {
|
|
184
|
+
type: "SQS";
|
|
185
|
+
}, {
|
|
186
|
+
type: "SQS";
|
|
187
|
+
}>]>;
|
|
188
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
50
189
|
}, "strip", z.ZodTypeAny, {
|
|
51
|
-
|
|
190
|
+
data?: DeserializedJson | undefined;
|
|
191
|
+
params?: any;
|
|
192
|
+
clientId?: string | undefined;
|
|
193
|
+
key: string;
|
|
194
|
+
secret: string;
|
|
195
|
+
active: boolean;
|
|
196
|
+
channel: {
|
|
197
|
+
type: "HTTP";
|
|
198
|
+
url: string;
|
|
199
|
+
} | {
|
|
200
|
+
type: "SMTP";
|
|
201
|
+
} | {
|
|
202
|
+
type: "SQS";
|
|
203
|
+
};
|
|
52
204
|
}, {
|
|
53
|
-
|
|
54
|
-
|
|
205
|
+
data?: DeserializedJson | undefined;
|
|
206
|
+
params?: any;
|
|
207
|
+
clientId?: string | undefined;
|
|
208
|
+
key: string;
|
|
209
|
+
secret: string;
|
|
210
|
+
active: boolean;
|
|
211
|
+
channel: {
|
|
212
|
+
type: "HTTP";
|
|
213
|
+
url: string;
|
|
214
|
+
} | {
|
|
215
|
+
type: "SMTP";
|
|
216
|
+
} | {
|
|
217
|
+
type: "SQS";
|
|
218
|
+
};
|
|
219
|
+
}>;
|
|
220
|
+
events: z.ZodArray<z.ZodString, "many">;
|
|
221
|
+
missingEvents: z.ZodArray<z.ZodString, "many">;
|
|
222
|
+
orphanedEvents: z.ZodArray<z.ZodString, "many">;
|
|
223
|
+
dynamicTriggerId: z.ZodOptional<z.ZodString>;
|
|
55
224
|
}, "strip", z.ZodTypeAny, {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
225
|
+
dynamicTriggerId?: string | undefined;
|
|
226
|
+
id: string;
|
|
227
|
+
source: {
|
|
228
|
+
data?: DeserializedJson | undefined;
|
|
229
|
+
params?: any;
|
|
230
|
+
clientId?: string | undefined;
|
|
231
|
+
key: string;
|
|
232
|
+
secret: string;
|
|
233
|
+
active: boolean;
|
|
234
|
+
channel: {
|
|
235
|
+
type: "HTTP";
|
|
236
|
+
url: string;
|
|
237
|
+
} | {
|
|
238
|
+
type: "SMTP";
|
|
239
|
+
} | {
|
|
240
|
+
type: "SQS";
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
events: string[];
|
|
244
|
+
missingEvents: string[];
|
|
245
|
+
orphanedEvents: string[];
|
|
75
246
|
}, {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
247
|
+
dynamicTriggerId?: string | undefined;
|
|
248
|
+
id: string;
|
|
249
|
+
source: {
|
|
250
|
+
data?: DeserializedJson | undefined;
|
|
251
|
+
params?: any;
|
|
252
|
+
clientId?: string | undefined;
|
|
253
|
+
key: string;
|
|
254
|
+
secret: string;
|
|
255
|
+
active: boolean;
|
|
256
|
+
channel: {
|
|
257
|
+
type: "HTTP";
|
|
258
|
+
url: string;
|
|
259
|
+
} | {
|
|
260
|
+
type: "SMTP";
|
|
261
|
+
} | {
|
|
262
|
+
type: "SQS";
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
events: string[];
|
|
266
|
+
missingEvents: string[];
|
|
267
|
+
orphanedEvents: string[];
|
|
95
268
|
}>;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
269
|
+
type RegisterSourceEvent = z.infer<typeof RegisterSourceEventSchema>;
|
|
270
|
+
declare const TriggerSourceSchema: z.ZodObject<{
|
|
271
|
+
id: z.ZodString;
|
|
272
|
+
key: z.ZodString;
|
|
273
|
+
}, "strip", z.ZodTypeAny, {
|
|
274
|
+
key: string;
|
|
275
|
+
id: string;
|
|
276
|
+
}, {
|
|
277
|
+
key: string;
|
|
278
|
+
id: string;
|
|
279
|
+
}>;
|
|
280
|
+
declare const HandleTriggerSourceSchema: z.ZodObject<{
|
|
281
|
+
key: z.ZodString;
|
|
282
|
+
secret: z.ZodString;
|
|
283
|
+
data: z.ZodAny;
|
|
284
|
+
params: z.ZodAny;
|
|
285
|
+
}, "strip", z.ZodTypeAny, {
|
|
286
|
+
data?: any;
|
|
287
|
+
params?: any;
|
|
288
|
+
key: string;
|
|
289
|
+
secret: string;
|
|
290
|
+
}, {
|
|
291
|
+
data?: any;
|
|
292
|
+
params?: any;
|
|
293
|
+
key: string;
|
|
294
|
+
secret: string;
|
|
295
|
+
}>;
|
|
296
|
+
type HandleTriggerSource = z.infer<typeof HandleTriggerSourceSchema>;
|
|
297
|
+
type TriggerSource = z.infer<typeof TriggerSourceSchema>;
|
|
298
|
+
declare const QueueOptionsSchema: z.ZodObject<{
|
|
299
|
+
name: z.ZodString;
|
|
300
|
+
maxConcurrent: z.ZodOptional<z.ZodNumber>;
|
|
105
301
|
}, "strip", z.ZodTypeAny, {
|
|
106
|
-
|
|
107
|
-
|
|
302
|
+
maxConcurrent?: number | undefined;
|
|
303
|
+
name: string;
|
|
108
304
|
}, {
|
|
109
|
-
|
|
110
|
-
|
|
305
|
+
maxConcurrent?: number | undefined;
|
|
306
|
+
name: string;
|
|
111
307
|
}>;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
308
|
+
type QueueOptions = z.infer<typeof QueueOptionsSchema>;
|
|
309
|
+
declare const JobMetadataSchema: z.ZodObject<{
|
|
310
|
+
id: z.ZodString;
|
|
311
|
+
name: z.ZodString;
|
|
312
|
+
version: z.ZodString;
|
|
313
|
+
event: z.ZodObject<{
|
|
314
|
+
name: z.ZodString;
|
|
315
|
+
title: z.ZodString;
|
|
316
|
+
source: z.ZodString;
|
|
317
|
+
icon: z.ZodString;
|
|
318
|
+
filter: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
319
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
320
|
+
label: z.ZodString;
|
|
321
|
+
text: z.ZodString;
|
|
322
|
+
url: z.ZodOptional<z.ZodString>;
|
|
323
|
+
}, "strip", z.ZodTypeAny, {
|
|
324
|
+
url?: string | undefined;
|
|
325
|
+
label: string;
|
|
326
|
+
text: string;
|
|
327
|
+
}, {
|
|
328
|
+
url?: string | undefined;
|
|
329
|
+
label: string;
|
|
330
|
+
text: string;
|
|
331
|
+
}>, "many">>;
|
|
332
|
+
schema: z.ZodOptional<z.ZodAny>;
|
|
333
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
334
|
+
}, "strip", z.ZodTypeAny, {
|
|
335
|
+
filter?: EventFilter | undefined;
|
|
336
|
+
properties?: {
|
|
337
|
+
url?: string | undefined;
|
|
338
|
+
label: string;
|
|
339
|
+
text: string;
|
|
340
|
+
}[] | undefined;
|
|
341
|
+
schema?: any;
|
|
342
|
+
examples?: any[] | undefined;
|
|
343
|
+
title: string;
|
|
344
|
+
icon: string;
|
|
345
|
+
name: string;
|
|
346
|
+
source: string;
|
|
347
|
+
}, {
|
|
348
|
+
filter?: EventFilter | undefined;
|
|
349
|
+
properties?: {
|
|
350
|
+
url?: string | undefined;
|
|
351
|
+
label: string;
|
|
352
|
+
text: string;
|
|
353
|
+
}[] | undefined;
|
|
354
|
+
schema?: any;
|
|
355
|
+
examples?: any[] | undefined;
|
|
356
|
+
title: string;
|
|
357
|
+
icon: string;
|
|
358
|
+
name: string;
|
|
359
|
+
source: string;
|
|
360
|
+
}>;
|
|
361
|
+
trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
362
|
+
type: z.ZodLiteral<"dynamic">;
|
|
363
|
+
id: z.ZodString;
|
|
115
364
|
}, "strip", z.ZodTypeAny, {
|
|
116
|
-
|
|
365
|
+
type: "dynamic";
|
|
366
|
+
id: string;
|
|
117
367
|
}, {
|
|
118
|
-
|
|
368
|
+
type: "dynamic";
|
|
369
|
+
id: string;
|
|
119
370
|
}>, z.ZodObject<{
|
|
120
|
-
|
|
371
|
+
type: z.ZodLiteral<"static">;
|
|
372
|
+
title: z.ZodString;
|
|
373
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
374
|
+
label: z.ZodString;
|
|
375
|
+
text: z.ZodString;
|
|
376
|
+
url: z.ZodOptional<z.ZodString>;
|
|
377
|
+
}, "strip", z.ZodTypeAny, {
|
|
378
|
+
url?: string | undefined;
|
|
379
|
+
label: string;
|
|
380
|
+
text: string;
|
|
381
|
+
}, {
|
|
382
|
+
url?: string | undefined;
|
|
383
|
+
label: string;
|
|
384
|
+
text: string;
|
|
385
|
+
}>, "many">>;
|
|
386
|
+
rule: z.ZodObject<{
|
|
387
|
+
event: z.ZodString;
|
|
388
|
+
source: z.ZodString;
|
|
389
|
+
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
390
|
+
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
391
|
+
}, "strip", z.ZodTypeAny, {
|
|
392
|
+
payload?: EventFilter | undefined;
|
|
393
|
+
context?: EventFilter | undefined;
|
|
394
|
+
event: string;
|
|
395
|
+
source: string;
|
|
396
|
+
}, {
|
|
397
|
+
payload?: EventFilter | undefined;
|
|
398
|
+
context?: EventFilter | undefined;
|
|
399
|
+
event: string;
|
|
400
|
+
source: string;
|
|
401
|
+
}>;
|
|
121
402
|
}, "strip", z.ZodTypeAny, {
|
|
122
|
-
|
|
403
|
+
properties?: {
|
|
404
|
+
url?: string | undefined;
|
|
405
|
+
label: string;
|
|
406
|
+
text: string;
|
|
407
|
+
}[] | undefined;
|
|
408
|
+
type: "static";
|
|
409
|
+
title: string;
|
|
410
|
+
rule: {
|
|
411
|
+
payload?: EventFilter | undefined;
|
|
412
|
+
context?: EventFilter | undefined;
|
|
413
|
+
event: string;
|
|
414
|
+
source: string;
|
|
415
|
+
};
|
|
123
416
|
}, {
|
|
124
|
-
|
|
417
|
+
properties?: {
|
|
418
|
+
url?: string | undefined;
|
|
419
|
+
label: string;
|
|
420
|
+
text: string;
|
|
421
|
+
}[] | undefined;
|
|
422
|
+
type: "static";
|
|
423
|
+
title: string;
|
|
424
|
+
rule: {
|
|
425
|
+
payload?: EventFilter | undefined;
|
|
426
|
+
context?: EventFilter | undefined;
|
|
427
|
+
event: string;
|
|
428
|
+
source: string;
|
|
429
|
+
};
|
|
125
430
|
}>, z.ZodObject<{
|
|
126
|
-
|
|
431
|
+
type: z.ZodLiteral<"scheduled">;
|
|
432
|
+
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
433
|
+
type: z.ZodLiteral<"interval">;
|
|
434
|
+
options: z.ZodObject<{
|
|
435
|
+
seconds: z.ZodNumber;
|
|
436
|
+
}, "strip", z.ZodTypeAny, {
|
|
437
|
+
seconds: number;
|
|
438
|
+
}, {
|
|
439
|
+
seconds: number;
|
|
440
|
+
}>;
|
|
441
|
+
metadata: z.ZodAny;
|
|
442
|
+
}, "strip", z.ZodTypeAny, {
|
|
443
|
+
metadata?: any;
|
|
444
|
+
options: {
|
|
445
|
+
seconds: number;
|
|
446
|
+
};
|
|
447
|
+
type: "interval";
|
|
448
|
+
}, {
|
|
449
|
+
metadata?: any;
|
|
450
|
+
options: {
|
|
451
|
+
seconds: number;
|
|
452
|
+
};
|
|
453
|
+
type: "interval";
|
|
454
|
+
}>, z.ZodObject<{
|
|
455
|
+
type: z.ZodLiteral<"cron">;
|
|
456
|
+
options: z.ZodObject<{
|
|
457
|
+
cron: z.ZodString;
|
|
458
|
+
}, "strip", z.ZodTypeAny, {
|
|
459
|
+
cron: string;
|
|
460
|
+
}, {
|
|
461
|
+
cron: string;
|
|
462
|
+
}>;
|
|
463
|
+
metadata: z.ZodAny;
|
|
464
|
+
}, "strip", z.ZodTypeAny, {
|
|
465
|
+
metadata?: any;
|
|
466
|
+
options: {
|
|
467
|
+
cron: string;
|
|
468
|
+
};
|
|
469
|
+
type: "cron";
|
|
470
|
+
}, {
|
|
471
|
+
metadata?: any;
|
|
472
|
+
options: {
|
|
473
|
+
cron: string;
|
|
474
|
+
};
|
|
475
|
+
type: "cron";
|
|
476
|
+
}>]>;
|
|
127
477
|
}, "strip", z.ZodTypeAny, {
|
|
128
|
-
|
|
478
|
+
type: "scheduled";
|
|
479
|
+
schedule: {
|
|
480
|
+
metadata?: any;
|
|
481
|
+
options: {
|
|
482
|
+
cron: string;
|
|
483
|
+
};
|
|
484
|
+
type: "cron";
|
|
485
|
+
} | {
|
|
486
|
+
metadata?: any;
|
|
487
|
+
options: {
|
|
488
|
+
seconds: number;
|
|
489
|
+
};
|
|
490
|
+
type: "interval";
|
|
491
|
+
};
|
|
129
492
|
}, {
|
|
130
|
-
|
|
493
|
+
type: "scheduled";
|
|
494
|
+
schedule: {
|
|
495
|
+
metadata?: any;
|
|
496
|
+
options: {
|
|
497
|
+
cron: string;
|
|
498
|
+
};
|
|
499
|
+
type: "cron";
|
|
500
|
+
} | {
|
|
501
|
+
metadata?: any;
|
|
502
|
+
options: {
|
|
503
|
+
seconds: number;
|
|
504
|
+
};
|
|
505
|
+
type: "interval";
|
|
506
|
+
};
|
|
131
507
|
}>]>;
|
|
508
|
+
integrations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
509
|
+
id: z.ZodString;
|
|
510
|
+
metadata: z.ZodObject<{
|
|
511
|
+
key: z.ZodString;
|
|
512
|
+
title: z.ZodString;
|
|
513
|
+
icon: z.ZodString;
|
|
514
|
+
}, "strip", z.ZodTypeAny, {
|
|
515
|
+
key: string;
|
|
516
|
+
title: string;
|
|
517
|
+
icon: string;
|
|
518
|
+
}, {
|
|
519
|
+
key: string;
|
|
520
|
+
title: string;
|
|
521
|
+
icon: string;
|
|
522
|
+
}>;
|
|
523
|
+
}, "strip", z.ZodTypeAny, {
|
|
524
|
+
id: string;
|
|
525
|
+
metadata: {
|
|
526
|
+
key: string;
|
|
527
|
+
title: string;
|
|
528
|
+
icon: string;
|
|
529
|
+
};
|
|
530
|
+
}, {
|
|
531
|
+
id: string;
|
|
532
|
+
metadata: {
|
|
533
|
+
key: string;
|
|
534
|
+
title: string;
|
|
535
|
+
icon: string;
|
|
536
|
+
};
|
|
537
|
+
}>>;
|
|
538
|
+
internal: z.ZodDefault<z.ZodBoolean>;
|
|
539
|
+
queue: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
540
|
+
name: z.ZodString;
|
|
541
|
+
maxConcurrent: z.ZodOptional<z.ZodNumber>;
|
|
542
|
+
}, "strip", z.ZodTypeAny, {
|
|
543
|
+
maxConcurrent?: number | undefined;
|
|
544
|
+
name: string;
|
|
545
|
+
}, {
|
|
546
|
+
maxConcurrent?: number | undefined;
|
|
547
|
+
name: string;
|
|
548
|
+
}>, z.ZodString]>>;
|
|
549
|
+
startPosition: z.ZodEnum<["initial", "latest"]>;
|
|
550
|
+
enabled: z.ZodBoolean;
|
|
551
|
+
preprocessRuns: z.ZodBoolean;
|
|
132
552
|
}, "strip", z.ZodTypeAny, {
|
|
133
|
-
|
|
134
|
-
|
|
553
|
+
queue?: string | {
|
|
554
|
+
maxConcurrent?: number | undefined;
|
|
555
|
+
name: string;
|
|
556
|
+
} | undefined;
|
|
557
|
+
id: string;
|
|
558
|
+
name: string;
|
|
559
|
+
event: {
|
|
560
|
+
filter?: EventFilter | undefined;
|
|
561
|
+
properties?: {
|
|
562
|
+
url?: string | undefined;
|
|
563
|
+
label: string;
|
|
564
|
+
text: string;
|
|
565
|
+
}[] | undefined;
|
|
566
|
+
schema?: any;
|
|
567
|
+
examples?: any[] | undefined;
|
|
568
|
+
title: string;
|
|
569
|
+
icon: string;
|
|
570
|
+
name: string;
|
|
571
|
+
source: string;
|
|
572
|
+
};
|
|
573
|
+
version: string;
|
|
574
|
+
trigger: {
|
|
575
|
+
type: "dynamic";
|
|
576
|
+
id: string;
|
|
135
577
|
} | {
|
|
136
|
-
|
|
578
|
+
properties?: {
|
|
579
|
+
url?: string | undefined;
|
|
580
|
+
label: string;
|
|
581
|
+
text: string;
|
|
582
|
+
}[] | undefined;
|
|
583
|
+
type: "static";
|
|
584
|
+
title: string;
|
|
585
|
+
rule: {
|
|
586
|
+
payload?: EventFilter | undefined;
|
|
587
|
+
context?: EventFilter | undefined;
|
|
588
|
+
event: string;
|
|
589
|
+
source: string;
|
|
590
|
+
};
|
|
137
591
|
} | {
|
|
138
|
-
|
|
592
|
+
type: "scheduled";
|
|
593
|
+
schedule: {
|
|
594
|
+
metadata?: any;
|
|
595
|
+
options: {
|
|
596
|
+
cron: string;
|
|
597
|
+
};
|
|
598
|
+
type: "cron";
|
|
599
|
+
} | {
|
|
600
|
+
metadata?: any;
|
|
601
|
+
options: {
|
|
602
|
+
seconds: number;
|
|
603
|
+
};
|
|
604
|
+
type: "interval";
|
|
605
|
+
};
|
|
139
606
|
};
|
|
607
|
+
integrations: Record<string, {
|
|
608
|
+
id: string;
|
|
609
|
+
metadata: {
|
|
610
|
+
key: string;
|
|
611
|
+
title: string;
|
|
612
|
+
icon: string;
|
|
613
|
+
};
|
|
614
|
+
}>;
|
|
615
|
+
internal: boolean;
|
|
616
|
+
startPosition: "initial" | "latest";
|
|
617
|
+
enabled: boolean;
|
|
618
|
+
preprocessRuns: boolean;
|
|
140
619
|
}, {
|
|
141
|
-
|
|
142
|
-
|
|
620
|
+
internal?: boolean | undefined;
|
|
621
|
+
queue?: string | {
|
|
622
|
+
maxConcurrent?: number | undefined;
|
|
623
|
+
name: string;
|
|
624
|
+
} | undefined;
|
|
625
|
+
id: string;
|
|
626
|
+
name: string;
|
|
627
|
+
event: {
|
|
628
|
+
filter?: EventFilter | undefined;
|
|
629
|
+
properties?: {
|
|
630
|
+
url?: string | undefined;
|
|
631
|
+
label: string;
|
|
632
|
+
text: string;
|
|
633
|
+
}[] | undefined;
|
|
634
|
+
schema?: any;
|
|
635
|
+
examples?: any[] | undefined;
|
|
636
|
+
title: string;
|
|
637
|
+
icon: string;
|
|
638
|
+
name: string;
|
|
639
|
+
source: string;
|
|
640
|
+
};
|
|
641
|
+
version: string;
|
|
642
|
+
trigger: {
|
|
643
|
+
type: "dynamic";
|
|
644
|
+
id: string;
|
|
143
645
|
} | {
|
|
144
|
-
|
|
646
|
+
properties?: {
|
|
647
|
+
url?: string | undefined;
|
|
648
|
+
label: string;
|
|
649
|
+
text: string;
|
|
650
|
+
}[] | undefined;
|
|
651
|
+
type: "static";
|
|
652
|
+
title: string;
|
|
653
|
+
rule: {
|
|
654
|
+
payload?: EventFilter | undefined;
|
|
655
|
+
context?: EventFilter | undefined;
|
|
656
|
+
event: string;
|
|
657
|
+
source: string;
|
|
658
|
+
};
|
|
145
659
|
} | {
|
|
146
|
-
|
|
660
|
+
type: "scheduled";
|
|
661
|
+
schedule: {
|
|
662
|
+
metadata?: any;
|
|
663
|
+
options: {
|
|
664
|
+
cron: string;
|
|
665
|
+
};
|
|
666
|
+
type: "cron";
|
|
667
|
+
} | {
|
|
668
|
+
metadata?: any;
|
|
669
|
+
options: {
|
|
670
|
+
seconds: number;
|
|
671
|
+
};
|
|
672
|
+
type: "interval";
|
|
673
|
+
};
|
|
147
674
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
675
|
+
integrations: Record<string, {
|
|
676
|
+
id: string;
|
|
677
|
+
metadata: {
|
|
678
|
+
key: string;
|
|
679
|
+
title: string;
|
|
680
|
+
icon: string;
|
|
681
|
+
};
|
|
682
|
+
}>;
|
|
683
|
+
startPosition: "initial" | "latest";
|
|
684
|
+
enabled: boolean;
|
|
685
|
+
preprocessRuns: boolean;
|
|
686
|
+
}>;
|
|
687
|
+
type JobMetadata = z.infer<typeof JobMetadataSchema>;
|
|
688
|
+
declare const RawEventSchema: z.ZodObject<{
|
|
689
|
+
id: z.ZodDefault<z.ZodString>;
|
|
159
690
|
name: z.ZodString;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
165
|
-
} | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null>>;
|
|
691
|
+
source: z.ZodOptional<z.ZodString>;
|
|
692
|
+
payload: z.ZodAny;
|
|
693
|
+
context: z.ZodOptional<z.ZodAny>;
|
|
694
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
166
695
|
}, "strip", z.ZodTypeAny, {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
696
|
+
source?: string | undefined;
|
|
697
|
+
payload?: any;
|
|
698
|
+
context?: any;
|
|
699
|
+
timestamp?: string | undefined;
|
|
700
|
+
id: string;
|
|
172
701
|
name: string;
|
|
173
|
-
service: "trigger";
|
|
174
702
|
}, {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
name: string;
|
|
181
|
-
service: "trigger";
|
|
182
|
-
}>, z.ZodObject<{
|
|
183
|
-
type: z.ZodLiteral<"WEBHOOK">;
|
|
184
|
-
service: z.ZodString;
|
|
185
|
-
name: z.ZodString;
|
|
186
|
-
filter: z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>;
|
|
187
|
-
source: z.ZodOptional<z.ZodType<string | number | boolean | {
|
|
188
|
-
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
189
|
-
} | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null, z.ZodTypeDef, string | number | boolean | {
|
|
190
|
-
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
191
|
-
} | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null>>;
|
|
192
|
-
manualRegistration: z.ZodDefault<z.ZodBoolean>;
|
|
193
|
-
schema: z.ZodOptional<z.ZodType<string | number | boolean | {
|
|
194
|
-
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
195
|
-
} | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null, z.ZodTypeDef, string | number | boolean | {
|
|
196
|
-
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
197
|
-
} | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null>>;
|
|
198
|
-
}, "strip", z.ZodTypeAny, {
|
|
199
|
-
schema?: (string | number | boolean | {
|
|
200
|
-
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
201
|
-
} | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null) | undefined;
|
|
202
|
-
source?: (string | number | boolean | {
|
|
203
|
-
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
204
|
-
} | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null) | undefined;
|
|
205
|
-
filter: EventFilter;
|
|
206
|
-
type: "WEBHOOK";
|
|
207
|
-
name: string;
|
|
208
|
-
service: string;
|
|
209
|
-
manualRegistration: boolean;
|
|
210
|
-
}, {
|
|
211
|
-
schema?: (string | number | boolean | {
|
|
212
|
-
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
213
|
-
} | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null) | undefined;
|
|
214
|
-
source?: (string | number | boolean | {
|
|
215
|
-
[key: string]: string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null;
|
|
216
|
-
} | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | (string | number | boolean | any | any | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null)[] | null) | undefined;
|
|
217
|
-
manualRegistration?: boolean | undefined;
|
|
218
|
-
filter: EventFilter;
|
|
219
|
-
type: "WEBHOOK";
|
|
703
|
+
id?: string | undefined;
|
|
704
|
+
source?: string | undefined;
|
|
705
|
+
payload?: any;
|
|
706
|
+
context?: any;
|
|
707
|
+
timestamp?: string | undefined;
|
|
220
708
|
name: string;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
709
|
+
}>;
|
|
710
|
+
type SendEvent = z.input<typeof RawEventSchema>;
|
|
711
|
+
declare const SendEventOptionsSchema: z.ZodObject<{
|
|
712
|
+
deliverAt: z.ZodOptional<z.ZodString>;
|
|
713
|
+
deliverAfter: z.ZodOptional<z.ZodNumber>;
|
|
714
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
227
715
|
}, "strip", z.ZodTypeAny, {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
service: "trigger";
|
|
716
|
+
deliverAt?: string | undefined;
|
|
717
|
+
deliverAfter?: number | undefined;
|
|
718
|
+
accountId?: string | undefined;
|
|
232
719
|
}, {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
720
|
+
deliverAt?: string | undefined;
|
|
721
|
+
deliverAfter?: number | undefined;
|
|
722
|
+
accountId?: string | undefined;
|
|
723
|
+
}>;
|
|
724
|
+
type SendEventOptions = z.infer<typeof SendEventOptionsSchema>;
|
|
725
|
+
declare const RuntimeEnvironmentTypeSchema: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
|
|
726
|
+
type RuntimeEnvironmentType = z.infer<typeof RuntimeEnvironmentTypeSchema>;
|
|
727
|
+
declare const CreateRunBodySchema: z.ZodObject<{
|
|
728
|
+
client: z.ZodString;
|
|
729
|
+
job: z.ZodObject<{
|
|
730
|
+
id: z.ZodString;
|
|
731
|
+
name: z.ZodString;
|
|
732
|
+
version: z.ZodString;
|
|
733
|
+
event: z.ZodObject<{
|
|
734
|
+
name: z.ZodString;
|
|
735
|
+
title: z.ZodString;
|
|
736
|
+
source: z.ZodString;
|
|
737
|
+
icon: z.ZodString;
|
|
738
|
+
filter: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
739
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
740
|
+
label: z.ZodString;
|
|
741
|
+
text: z.ZodString;
|
|
742
|
+
url: z.ZodOptional<z.ZodString>;
|
|
743
|
+
}, "strip", z.ZodTypeAny, {
|
|
744
|
+
url?: string | undefined;
|
|
745
|
+
label: string;
|
|
746
|
+
text: string;
|
|
747
|
+
}, {
|
|
748
|
+
url?: string | undefined;
|
|
749
|
+
label: string;
|
|
750
|
+
text: string;
|
|
751
|
+
}>, "many">>;
|
|
752
|
+
schema: z.ZodOptional<z.ZodAny>;
|
|
753
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
754
|
+
}, "strip", z.ZodTypeAny, {
|
|
755
|
+
filter?: EventFilter | undefined;
|
|
756
|
+
properties?: {
|
|
757
|
+
url?: string | undefined;
|
|
758
|
+
label: string;
|
|
759
|
+
text: string;
|
|
760
|
+
}[] | undefined;
|
|
761
|
+
schema?: any;
|
|
762
|
+
examples?: any[] | undefined;
|
|
763
|
+
title: string;
|
|
764
|
+
icon: string;
|
|
765
|
+
name: string;
|
|
766
|
+
source: string;
|
|
767
|
+
}, {
|
|
768
|
+
filter?: EventFilter | undefined;
|
|
769
|
+
properties?: {
|
|
770
|
+
url?: string | undefined;
|
|
771
|
+
label: string;
|
|
772
|
+
text: string;
|
|
773
|
+
}[] | undefined;
|
|
774
|
+
schema?: any;
|
|
775
|
+
examples?: any[] | undefined;
|
|
776
|
+
title: string;
|
|
777
|
+
icon: string;
|
|
778
|
+
name: string;
|
|
779
|
+
source: string;
|
|
780
|
+
}>;
|
|
781
|
+
trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
782
|
+
type: z.ZodLiteral<"dynamic">;
|
|
783
|
+
id: z.ZodString;
|
|
244
784
|
}, "strip", z.ZodTypeAny, {
|
|
245
|
-
|
|
785
|
+
type: "dynamic";
|
|
786
|
+
id: string;
|
|
246
787
|
}, {
|
|
247
|
-
|
|
788
|
+
type: "dynamic";
|
|
789
|
+
id: string;
|
|
248
790
|
}>, z.ZodObject<{
|
|
249
|
-
|
|
791
|
+
type: z.ZodLiteral<"static">;
|
|
792
|
+
title: z.ZodString;
|
|
793
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
794
|
+
label: z.ZodString;
|
|
795
|
+
text: z.ZodString;
|
|
796
|
+
url: z.ZodOptional<z.ZodString>;
|
|
797
|
+
}, "strip", z.ZodTypeAny, {
|
|
798
|
+
url?: string | undefined;
|
|
799
|
+
label: string;
|
|
800
|
+
text: string;
|
|
801
|
+
}, {
|
|
802
|
+
url?: string | undefined;
|
|
803
|
+
label: string;
|
|
804
|
+
text: string;
|
|
805
|
+
}>, "many">>;
|
|
806
|
+
rule: z.ZodObject<{
|
|
807
|
+
event: z.ZodString;
|
|
808
|
+
source: z.ZodString;
|
|
809
|
+
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
810
|
+
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
811
|
+
}, "strip", z.ZodTypeAny, {
|
|
812
|
+
payload?: EventFilter | undefined;
|
|
813
|
+
context?: EventFilter | undefined;
|
|
814
|
+
event: string;
|
|
815
|
+
source: string;
|
|
816
|
+
}, {
|
|
817
|
+
payload?: EventFilter | undefined;
|
|
818
|
+
context?: EventFilter | undefined;
|
|
819
|
+
event: string;
|
|
820
|
+
source: string;
|
|
821
|
+
}>;
|
|
250
822
|
}, "strip", z.ZodTypeAny, {
|
|
251
|
-
|
|
823
|
+
properties?: {
|
|
824
|
+
url?: string | undefined;
|
|
825
|
+
label: string;
|
|
826
|
+
text: string;
|
|
827
|
+
}[] | undefined;
|
|
828
|
+
type: "static";
|
|
829
|
+
title: string;
|
|
830
|
+
rule: {
|
|
831
|
+
payload?: EventFilter | undefined;
|
|
832
|
+
context?: EventFilter | undefined;
|
|
833
|
+
event: string;
|
|
834
|
+
source: string;
|
|
835
|
+
};
|
|
252
836
|
}, {
|
|
253
|
-
|
|
837
|
+
properties?: {
|
|
838
|
+
url?: string | undefined;
|
|
839
|
+
label: string;
|
|
840
|
+
text: string;
|
|
841
|
+
}[] | undefined;
|
|
842
|
+
type: "static";
|
|
843
|
+
title: string;
|
|
844
|
+
rule: {
|
|
845
|
+
payload?: EventFilter | undefined;
|
|
846
|
+
context?: EventFilter | undefined;
|
|
847
|
+
event: string;
|
|
848
|
+
source: string;
|
|
849
|
+
};
|
|
254
850
|
}>, z.ZodObject<{
|
|
255
|
-
|
|
851
|
+
type: z.ZodLiteral<"scheduled">;
|
|
852
|
+
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
853
|
+
type: z.ZodLiteral<"interval">;
|
|
854
|
+
options: z.ZodObject<{
|
|
855
|
+
seconds: z.ZodNumber;
|
|
856
|
+
}, "strip", z.ZodTypeAny, {
|
|
857
|
+
seconds: number;
|
|
858
|
+
}, {
|
|
859
|
+
seconds: number;
|
|
860
|
+
}>;
|
|
861
|
+
metadata: z.ZodAny;
|
|
862
|
+
}, "strip", z.ZodTypeAny, {
|
|
863
|
+
metadata?: any;
|
|
864
|
+
options: {
|
|
865
|
+
seconds: number;
|
|
866
|
+
};
|
|
867
|
+
type: "interval";
|
|
868
|
+
}, {
|
|
869
|
+
metadata?: any;
|
|
870
|
+
options: {
|
|
871
|
+
seconds: number;
|
|
872
|
+
};
|
|
873
|
+
type: "interval";
|
|
874
|
+
}>, z.ZodObject<{
|
|
875
|
+
type: z.ZodLiteral<"cron">;
|
|
876
|
+
options: z.ZodObject<{
|
|
877
|
+
cron: z.ZodString;
|
|
878
|
+
}, "strip", z.ZodTypeAny, {
|
|
879
|
+
cron: string;
|
|
880
|
+
}, {
|
|
881
|
+
cron: string;
|
|
882
|
+
}>;
|
|
883
|
+
metadata: z.ZodAny;
|
|
884
|
+
}, "strip", z.ZodTypeAny, {
|
|
885
|
+
metadata?: any;
|
|
886
|
+
options: {
|
|
887
|
+
cron: string;
|
|
888
|
+
};
|
|
889
|
+
type: "cron";
|
|
890
|
+
}, {
|
|
891
|
+
metadata?: any;
|
|
892
|
+
options: {
|
|
893
|
+
cron: string;
|
|
894
|
+
};
|
|
895
|
+
type: "cron";
|
|
896
|
+
}>]>;
|
|
256
897
|
}, "strip", z.ZodTypeAny, {
|
|
257
|
-
|
|
898
|
+
type: "scheduled";
|
|
899
|
+
schedule: {
|
|
900
|
+
metadata?: any;
|
|
901
|
+
options: {
|
|
902
|
+
cron: string;
|
|
903
|
+
};
|
|
904
|
+
type: "cron";
|
|
905
|
+
} | {
|
|
906
|
+
metadata?: any;
|
|
907
|
+
options: {
|
|
908
|
+
seconds: number;
|
|
909
|
+
};
|
|
910
|
+
type: "interval";
|
|
911
|
+
};
|
|
258
912
|
}, {
|
|
259
|
-
|
|
913
|
+
type: "scheduled";
|
|
914
|
+
schedule: {
|
|
915
|
+
metadata?: any;
|
|
916
|
+
options: {
|
|
917
|
+
cron: string;
|
|
918
|
+
};
|
|
919
|
+
type: "cron";
|
|
920
|
+
} | {
|
|
921
|
+
metadata?: any;
|
|
922
|
+
options: {
|
|
923
|
+
seconds: number;
|
|
924
|
+
};
|
|
925
|
+
type: "interval";
|
|
926
|
+
};
|
|
260
927
|
}>]>;
|
|
928
|
+
integrations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
929
|
+
id: z.ZodString;
|
|
930
|
+
metadata: z.ZodObject<{
|
|
931
|
+
key: z.ZodString;
|
|
932
|
+
title: z.ZodString;
|
|
933
|
+
icon: z.ZodString;
|
|
934
|
+
}, "strip", z.ZodTypeAny, {
|
|
935
|
+
key: string;
|
|
936
|
+
title: string;
|
|
937
|
+
icon: string;
|
|
938
|
+
}, {
|
|
939
|
+
key: string;
|
|
940
|
+
title: string;
|
|
941
|
+
icon: string;
|
|
942
|
+
}>;
|
|
943
|
+
}, "strip", z.ZodTypeAny, {
|
|
944
|
+
id: string;
|
|
945
|
+
metadata: {
|
|
946
|
+
key: string;
|
|
947
|
+
title: string;
|
|
948
|
+
icon: string;
|
|
949
|
+
};
|
|
950
|
+
}, {
|
|
951
|
+
id: string;
|
|
952
|
+
metadata: {
|
|
953
|
+
key: string;
|
|
954
|
+
title: string;
|
|
955
|
+
icon: string;
|
|
956
|
+
};
|
|
957
|
+
}>>;
|
|
958
|
+
internal: z.ZodDefault<z.ZodBoolean>;
|
|
959
|
+
queue: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
960
|
+
name: z.ZodString;
|
|
961
|
+
maxConcurrent: z.ZodOptional<z.ZodNumber>;
|
|
962
|
+
}, "strip", z.ZodTypeAny, {
|
|
963
|
+
maxConcurrent?: number | undefined;
|
|
964
|
+
name: string;
|
|
965
|
+
}, {
|
|
966
|
+
maxConcurrent?: number | undefined;
|
|
967
|
+
name: string;
|
|
968
|
+
}>, z.ZodString]>>;
|
|
969
|
+
startPosition: z.ZodEnum<["initial", "latest"]>;
|
|
970
|
+
enabled: z.ZodBoolean;
|
|
971
|
+
preprocessRuns: z.ZodBoolean;
|
|
261
972
|
}, "strip", z.ZodTypeAny, {
|
|
262
|
-
|
|
263
|
-
|
|
973
|
+
queue?: string | {
|
|
974
|
+
maxConcurrent?: number | undefined;
|
|
975
|
+
name: string;
|
|
976
|
+
} | undefined;
|
|
977
|
+
id: string;
|
|
978
|
+
name: string;
|
|
979
|
+
event: {
|
|
980
|
+
filter?: EventFilter | undefined;
|
|
981
|
+
properties?: {
|
|
982
|
+
url?: string | undefined;
|
|
983
|
+
label: string;
|
|
984
|
+
text: string;
|
|
985
|
+
}[] | undefined;
|
|
986
|
+
schema?: any;
|
|
987
|
+
examples?: any[] | undefined;
|
|
988
|
+
title: string;
|
|
989
|
+
icon: string;
|
|
990
|
+
name: string;
|
|
991
|
+
source: string;
|
|
992
|
+
};
|
|
993
|
+
version: string;
|
|
994
|
+
trigger: {
|
|
995
|
+
type: "dynamic";
|
|
996
|
+
id: string;
|
|
264
997
|
} | {
|
|
265
|
-
|
|
998
|
+
properties?: {
|
|
999
|
+
url?: string | undefined;
|
|
1000
|
+
label: string;
|
|
1001
|
+
text: string;
|
|
1002
|
+
}[] | undefined;
|
|
1003
|
+
type: "static";
|
|
1004
|
+
title: string;
|
|
1005
|
+
rule: {
|
|
1006
|
+
payload?: EventFilter | undefined;
|
|
1007
|
+
context?: EventFilter | undefined;
|
|
1008
|
+
event: string;
|
|
1009
|
+
source: string;
|
|
1010
|
+
};
|
|
266
1011
|
} | {
|
|
267
|
-
|
|
1012
|
+
type: "scheduled";
|
|
1013
|
+
schedule: {
|
|
1014
|
+
metadata?: any;
|
|
1015
|
+
options: {
|
|
1016
|
+
cron: string;
|
|
1017
|
+
};
|
|
1018
|
+
type: "cron";
|
|
1019
|
+
} | {
|
|
1020
|
+
metadata?: any;
|
|
1021
|
+
options: {
|
|
1022
|
+
seconds: number;
|
|
1023
|
+
};
|
|
1024
|
+
type: "interval";
|
|
1025
|
+
};
|
|
268
1026
|
};
|
|
1027
|
+
integrations: Record<string, {
|
|
1028
|
+
id: string;
|
|
1029
|
+
metadata: {
|
|
1030
|
+
key: string;
|
|
1031
|
+
title: string;
|
|
1032
|
+
icon: string;
|
|
1033
|
+
};
|
|
1034
|
+
}>;
|
|
1035
|
+
internal: boolean;
|
|
1036
|
+
startPosition: "initial" | "latest";
|
|
1037
|
+
enabled: boolean;
|
|
1038
|
+
preprocessRuns: boolean;
|
|
269
1039
|
}, {
|
|
270
|
-
|
|
271
|
-
|
|
1040
|
+
internal?: boolean | undefined;
|
|
1041
|
+
queue?: string | {
|
|
1042
|
+
maxConcurrent?: number | undefined;
|
|
1043
|
+
name: string;
|
|
1044
|
+
} | undefined;
|
|
1045
|
+
id: string;
|
|
1046
|
+
name: string;
|
|
1047
|
+
event: {
|
|
1048
|
+
filter?: EventFilter | undefined;
|
|
1049
|
+
properties?: {
|
|
1050
|
+
url?: string | undefined;
|
|
1051
|
+
label: string;
|
|
1052
|
+
text: string;
|
|
1053
|
+
}[] | undefined;
|
|
1054
|
+
schema?: any;
|
|
1055
|
+
examples?: any[] | undefined;
|
|
1056
|
+
title: string;
|
|
1057
|
+
icon: string;
|
|
1058
|
+
name: string;
|
|
1059
|
+
source: string;
|
|
1060
|
+
};
|
|
1061
|
+
version: string;
|
|
1062
|
+
trigger: {
|
|
1063
|
+
type: "dynamic";
|
|
1064
|
+
id: string;
|
|
272
1065
|
} | {
|
|
273
|
-
|
|
1066
|
+
properties?: {
|
|
1067
|
+
url?: string | undefined;
|
|
1068
|
+
label: string;
|
|
1069
|
+
text: string;
|
|
1070
|
+
}[] | undefined;
|
|
1071
|
+
type: "static";
|
|
1072
|
+
title: string;
|
|
1073
|
+
rule: {
|
|
1074
|
+
payload?: EventFilter | undefined;
|
|
1075
|
+
context?: EventFilter | undefined;
|
|
1076
|
+
event: string;
|
|
1077
|
+
source: string;
|
|
1078
|
+
};
|
|
274
1079
|
} | {
|
|
275
|
-
|
|
1080
|
+
type: "scheduled";
|
|
1081
|
+
schedule: {
|
|
1082
|
+
metadata?: any;
|
|
1083
|
+
options: {
|
|
1084
|
+
cron: string;
|
|
1085
|
+
};
|
|
1086
|
+
type: "cron";
|
|
1087
|
+
} | {
|
|
1088
|
+
metadata?: any;
|
|
1089
|
+
options: {
|
|
1090
|
+
seconds: number;
|
|
1091
|
+
};
|
|
1092
|
+
type: "interval";
|
|
1093
|
+
};
|
|
276
1094
|
};
|
|
277
|
-
|
|
278
|
-
|
|
1095
|
+
integrations: Record<string, {
|
|
1096
|
+
id: string;
|
|
1097
|
+
metadata: {
|
|
1098
|
+
key: string;
|
|
1099
|
+
title: string;
|
|
1100
|
+
icon: string;
|
|
1101
|
+
};
|
|
1102
|
+
}>;
|
|
1103
|
+
startPosition: "initial" | "latest";
|
|
1104
|
+
enabled: boolean;
|
|
1105
|
+
preprocessRuns: boolean;
|
|
1106
|
+
}>;
|
|
1107
|
+
event: z.ZodObject<{
|
|
1108
|
+
id: z.ZodString;
|
|
1109
|
+
name: z.ZodString;
|
|
1110
|
+
payload: z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>;
|
|
1111
|
+
context: z.ZodNullable<z.ZodOptional<z.ZodType<DeserializedJson, z.ZodTypeDef, DeserializedJson>>>;
|
|
1112
|
+
timestamp: z.ZodDate;
|
|
1113
|
+
deliverAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
1114
|
+
deliveredAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
|
|
279
1115
|
}, "strip", z.ZodTypeAny, {
|
|
280
|
-
|
|
1116
|
+
context?: DeserializedJson | undefined;
|
|
1117
|
+
deliverAt?: Date | null | undefined;
|
|
1118
|
+
deliveredAt?: Date | null | undefined;
|
|
1119
|
+
id: string;
|
|
1120
|
+
name: string;
|
|
1121
|
+
payload: DeserializedJson;
|
|
1122
|
+
timestamp: Date;
|
|
281
1123
|
}, {
|
|
282
|
-
|
|
283
|
-
|
|
1124
|
+
context?: DeserializedJson | undefined;
|
|
1125
|
+
deliverAt?: Date | null | undefined;
|
|
1126
|
+
deliveredAt?: Date | null | undefined;
|
|
1127
|
+
id: string;
|
|
1128
|
+
name: string;
|
|
1129
|
+
payload: DeserializedJson;
|
|
1130
|
+
timestamp: Date;
|
|
1131
|
+
}>;
|
|
1132
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1133
|
+
label: z.ZodString;
|
|
1134
|
+
text: z.ZodString;
|
|
1135
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1136
|
+
}, "strip", z.ZodTypeAny, {
|
|
1137
|
+
url?: string | undefined;
|
|
1138
|
+
label: string;
|
|
1139
|
+
text: string;
|
|
1140
|
+
}, {
|
|
1141
|
+
url?: string | undefined;
|
|
1142
|
+
label: string;
|
|
1143
|
+
text: string;
|
|
1144
|
+
}>, "many">>;
|
|
284
1145
|
}, "strip", z.ZodTypeAny, {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
1146
|
+
properties?: {
|
|
1147
|
+
url?: string | undefined;
|
|
1148
|
+
label: string;
|
|
1149
|
+
text: string;
|
|
1150
|
+
}[] | undefined;
|
|
1151
|
+
event: {
|
|
1152
|
+
context?: DeserializedJson | undefined;
|
|
1153
|
+
deliverAt?: Date | null | undefined;
|
|
1154
|
+
deliveredAt?: Date | null | undefined;
|
|
1155
|
+
id: string;
|
|
1156
|
+
name: string;
|
|
1157
|
+
payload: DeserializedJson;
|
|
1158
|
+
timestamp: Date;
|
|
1159
|
+
};
|
|
1160
|
+
job: {
|
|
1161
|
+
queue?: string | {
|
|
1162
|
+
maxConcurrent?: number | undefined;
|
|
1163
|
+
name: string;
|
|
1164
|
+
} | undefined;
|
|
1165
|
+
id: string;
|
|
1166
|
+
name: string;
|
|
1167
|
+
event: {
|
|
1168
|
+
filter?: EventFilter | undefined;
|
|
1169
|
+
properties?: {
|
|
1170
|
+
url?: string | undefined;
|
|
1171
|
+
label: string;
|
|
1172
|
+
text: string;
|
|
1173
|
+
}[] | undefined;
|
|
1174
|
+
schema?: any;
|
|
1175
|
+
examples?: any[] | undefined;
|
|
1176
|
+
title: string;
|
|
1177
|
+
icon: string;
|
|
1178
|
+
name: string;
|
|
1179
|
+
source: string;
|
|
1180
|
+
};
|
|
1181
|
+
version: string;
|
|
1182
|
+
trigger: {
|
|
1183
|
+
type: "dynamic";
|
|
1184
|
+
id: string;
|
|
291
1185
|
} | {
|
|
292
|
-
|
|
1186
|
+
properties?: {
|
|
1187
|
+
url?: string | undefined;
|
|
1188
|
+
label: string;
|
|
1189
|
+
text: string;
|
|
1190
|
+
}[] | undefined;
|
|
1191
|
+
type: "static";
|
|
1192
|
+
title: string;
|
|
1193
|
+
rule: {
|
|
1194
|
+
payload?: EventFilter | undefined;
|
|
1195
|
+
context?: EventFilter | undefined;
|
|
1196
|
+
event: string;
|
|
1197
|
+
source: string;
|
|
1198
|
+
};
|
|
293
1199
|
} | {
|
|
294
|
-
|
|
1200
|
+
type: "scheduled";
|
|
1201
|
+
schedule: {
|
|
1202
|
+
metadata?: any;
|
|
1203
|
+
options: {
|
|
1204
|
+
cron: string;
|
|
1205
|
+
};
|
|
1206
|
+
type: "cron";
|
|
1207
|
+
} | {
|
|
1208
|
+
metadata?: any;
|
|
1209
|
+
options: {
|
|
1210
|
+
seconds: number;
|
|
1211
|
+
};
|
|
1212
|
+
type: "interval";
|
|
1213
|
+
};
|
|
295
1214
|
};
|
|
296
|
-
|
|
297
|
-
|
|
1215
|
+
integrations: Record<string, {
|
|
1216
|
+
id: string;
|
|
1217
|
+
metadata: {
|
|
1218
|
+
key: string;
|
|
1219
|
+
title: string;
|
|
1220
|
+
icon: string;
|
|
1221
|
+
};
|
|
1222
|
+
}>;
|
|
1223
|
+
internal: boolean;
|
|
1224
|
+
startPosition: "initial" | "latest";
|
|
1225
|
+
enabled: boolean;
|
|
1226
|
+
preprocessRuns: boolean;
|
|
298
1227
|
};
|
|
1228
|
+
client: string;
|
|
299
1229
|
}, {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
1230
|
+
properties?: {
|
|
1231
|
+
url?: string | undefined;
|
|
1232
|
+
label: string;
|
|
1233
|
+
text: string;
|
|
1234
|
+
}[] | undefined;
|
|
1235
|
+
event: {
|
|
1236
|
+
context?: DeserializedJson | undefined;
|
|
1237
|
+
deliverAt?: Date | null | undefined;
|
|
1238
|
+
deliveredAt?: Date | null | undefined;
|
|
1239
|
+
id: string;
|
|
1240
|
+
name: string;
|
|
1241
|
+
payload: DeserializedJson;
|
|
1242
|
+
timestamp: Date;
|
|
1243
|
+
};
|
|
1244
|
+
job: {
|
|
1245
|
+
internal?: boolean | undefined;
|
|
1246
|
+
queue?: string | {
|
|
1247
|
+
maxConcurrent?: number | undefined;
|
|
1248
|
+
name: string;
|
|
1249
|
+
} | undefined;
|
|
1250
|
+
id: string;
|
|
1251
|
+
name: string;
|
|
1252
|
+
event: {
|
|
1253
|
+
filter?: EventFilter | undefined;
|
|
1254
|
+
properties?: {
|
|
1255
|
+
url?: string | undefined;
|
|
1256
|
+
label: string;
|
|
1257
|
+
text: string;
|
|
1258
|
+
}[] | undefined;
|
|
1259
|
+
schema?: any;
|
|
1260
|
+
examples?: any[] | undefined;
|
|
1261
|
+
title: string;
|
|
1262
|
+
icon: string;
|
|
1263
|
+
name: string;
|
|
1264
|
+
source: string;
|
|
1265
|
+
};
|
|
1266
|
+
version: string;
|
|
1267
|
+
trigger: {
|
|
1268
|
+
type: "dynamic";
|
|
1269
|
+
id: string;
|
|
306
1270
|
} | {
|
|
307
|
-
|
|
1271
|
+
properties?: {
|
|
1272
|
+
url?: string | undefined;
|
|
1273
|
+
label: string;
|
|
1274
|
+
text: string;
|
|
1275
|
+
}[] | undefined;
|
|
1276
|
+
type: "static";
|
|
1277
|
+
title: string;
|
|
1278
|
+
rule: {
|
|
1279
|
+
payload?: EventFilter | undefined;
|
|
1280
|
+
context?: EventFilter | undefined;
|
|
1281
|
+
event: string;
|
|
1282
|
+
source: string;
|
|
1283
|
+
};
|
|
308
1284
|
} | {
|
|
309
|
-
|
|
1285
|
+
type: "scheduled";
|
|
1286
|
+
schedule: {
|
|
1287
|
+
metadata?: any;
|
|
1288
|
+
options: {
|
|
1289
|
+
cron: string;
|
|
1290
|
+
};
|
|
1291
|
+
type: "cron";
|
|
1292
|
+
} | {
|
|
1293
|
+
metadata?: any;
|
|
1294
|
+
options: {
|
|
1295
|
+
seconds: number;
|
|
1296
|
+
};
|
|
1297
|
+
type: "interval";
|
|
1298
|
+
};
|
|
310
1299
|
};
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
actionIds: z.ZodArray<z.ZodString, "many">;
|
|
323
|
-
}, "strip", z.ZodTypeAny, {
|
|
324
|
-
type: "block_action";
|
|
325
|
-
blockId: string;
|
|
326
|
-
actionIds: string[];
|
|
327
|
-
}, {
|
|
328
|
-
type: "block_action";
|
|
329
|
-
blockId: string;
|
|
330
|
-
actionIds: string[];
|
|
331
|
-
}>, z.ZodObject<{
|
|
332
|
-
type: z.ZodLiteral<"view_submission">;
|
|
333
|
-
callbackIds: z.ZodArray<z.ZodString, "many">;
|
|
334
|
-
}, "strip", z.ZodTypeAny, {
|
|
335
|
-
type: "view_submission";
|
|
336
|
-
callbackIds: string[];
|
|
337
|
-
}, {
|
|
338
|
-
type: "view_submission";
|
|
339
|
-
callbackIds: string[];
|
|
340
|
-
}>]>;
|
|
341
|
-
}, "strip", z.ZodTypeAny, {
|
|
342
|
-
filter: EventFilter;
|
|
343
|
-
type: "SLACK_INTERACTION";
|
|
344
|
-
name: string;
|
|
345
|
-
service: "slack";
|
|
346
|
-
source: {
|
|
347
|
-
type: "block_action";
|
|
348
|
-
blockId: string;
|
|
349
|
-
actionIds: string[];
|
|
350
|
-
} | {
|
|
351
|
-
type: "view_submission";
|
|
352
|
-
callbackIds: string[];
|
|
353
|
-
};
|
|
354
|
-
}, {
|
|
355
|
-
filter: EventFilter;
|
|
356
|
-
type: "SLACK_INTERACTION";
|
|
357
|
-
name: string;
|
|
358
|
-
service: "slack";
|
|
359
|
-
source: {
|
|
360
|
-
type: "block_action";
|
|
361
|
-
blockId: string;
|
|
362
|
-
actionIds: string[];
|
|
363
|
-
} | {
|
|
364
|
-
type: "view_submission";
|
|
365
|
-
callbackIds: string[];
|
|
1300
|
+
integrations: Record<string, {
|
|
1301
|
+
id: string;
|
|
1302
|
+
metadata: {
|
|
1303
|
+
key: string;
|
|
1304
|
+
title: string;
|
|
1305
|
+
icon: string;
|
|
1306
|
+
};
|
|
1307
|
+
}>;
|
|
1308
|
+
startPosition: "initial" | "latest";
|
|
1309
|
+
enabled: boolean;
|
|
1310
|
+
preprocessRuns: boolean;
|
|
366
1311
|
};
|
|
367
|
-
|
|
368
|
-
|
|
1312
|
+
client: string;
|
|
1313
|
+
}>;
|
|
1314
|
+
type CreateRunBody = z.infer<typeof CreateRunBodySchema>;
|
|
369
1315
|
declare const SecureStringSchema: z.ZodObject<{
|
|
370
1316
|
__secureString: z.ZodLiteral<true>;
|
|
371
1317
|
strings: z.ZodArray<z.ZodString, "many">;
|
|
@@ -380,158 +1326,2319 @@ declare const SecureStringSchema: z.ZodObject<{
|
|
|
380
1326
|
interpolations: string[];
|
|
381
1327
|
}>;
|
|
382
1328
|
type SecureString = z.infer<typeof SecureStringSchema>;
|
|
383
|
-
|
|
384
|
-
type
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
1329
|
+
type ServerTask = z.output<typeof ServerTaskSchema>;
|
|
1330
|
+
type CachedTask = z.infer<typeof CachedTaskSchema>;
|
|
1331
|
+
declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
1332
|
+
name: z.ZodString;
|
|
1333
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1334
|
+
displayKey: z.ZodOptional<z.ZodString>;
|
|
1335
|
+
noop: z.ZodDefault<z.ZodBoolean>;
|
|
1336
|
+
delayUntil: z.ZodOptional<z.ZodDate>;
|
|
1337
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1338
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1339
|
+
label: z.ZodString;
|
|
1340
|
+
text: z.ZodString;
|
|
1341
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1342
|
+
}, "strip", z.ZodTypeAny, {
|
|
1343
|
+
url?: string | undefined;
|
|
1344
|
+
label: string;
|
|
1345
|
+
text: string;
|
|
1346
|
+
}, {
|
|
1347
|
+
url?: string | undefined;
|
|
1348
|
+
label: string;
|
|
1349
|
+
text: string;
|
|
1350
|
+
}>, "many">>;
|
|
1351
|
+
params: z.ZodOptional<z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>;
|
|
1352
|
+
trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1353
|
+
type: z.ZodLiteral<"dynamic">;
|
|
1354
|
+
id: z.ZodString;
|
|
1355
|
+
}, "strip", z.ZodTypeAny, {
|
|
1356
|
+
type: "dynamic";
|
|
1357
|
+
id: string;
|
|
1358
|
+
}, {
|
|
1359
|
+
type: "dynamic";
|
|
1360
|
+
id: string;
|
|
1361
|
+
}>, z.ZodObject<{
|
|
1362
|
+
type: z.ZodLiteral<"static">;
|
|
1363
|
+
title: z.ZodString;
|
|
1364
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1365
|
+
label: z.ZodString;
|
|
1366
|
+
text: z.ZodString;
|
|
1367
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1368
|
+
}, "strip", z.ZodTypeAny, {
|
|
1369
|
+
url?: string | undefined;
|
|
1370
|
+
label: string;
|
|
1371
|
+
text: string;
|
|
1372
|
+
}, {
|
|
1373
|
+
url?: string | undefined;
|
|
1374
|
+
label: string;
|
|
1375
|
+
text: string;
|
|
1376
|
+
}>, "many">>;
|
|
1377
|
+
rule: z.ZodObject<{
|
|
1378
|
+
event: z.ZodString;
|
|
1379
|
+
source: z.ZodString;
|
|
1380
|
+
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
1381
|
+
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
1382
|
+
}, "strip", z.ZodTypeAny, {
|
|
1383
|
+
payload?: EventFilter | undefined;
|
|
1384
|
+
context?: EventFilter | undefined;
|
|
1385
|
+
event: string;
|
|
1386
|
+
source: string;
|
|
1387
|
+
}, {
|
|
1388
|
+
payload?: EventFilter | undefined;
|
|
1389
|
+
context?: EventFilter | undefined;
|
|
1390
|
+
event: string;
|
|
1391
|
+
source: string;
|
|
1392
|
+
}>;
|
|
1393
|
+
}, "strip", z.ZodTypeAny, {
|
|
1394
|
+
properties?: {
|
|
1395
|
+
url?: string | undefined;
|
|
1396
|
+
label: string;
|
|
1397
|
+
text: string;
|
|
1398
|
+
}[] | undefined;
|
|
1399
|
+
type: "static";
|
|
1400
|
+
title: string;
|
|
1401
|
+
rule: {
|
|
1402
|
+
payload?: EventFilter | undefined;
|
|
1403
|
+
context?: EventFilter | undefined;
|
|
1404
|
+
event: string;
|
|
1405
|
+
source: string;
|
|
1406
|
+
};
|
|
1407
|
+
}, {
|
|
1408
|
+
properties?: {
|
|
1409
|
+
url?: string | undefined;
|
|
1410
|
+
label: string;
|
|
1411
|
+
text: string;
|
|
1412
|
+
}[] | undefined;
|
|
1413
|
+
type: "static";
|
|
1414
|
+
title: string;
|
|
1415
|
+
rule: {
|
|
1416
|
+
payload?: EventFilter | undefined;
|
|
1417
|
+
context?: EventFilter | undefined;
|
|
1418
|
+
event: string;
|
|
1419
|
+
source: string;
|
|
1420
|
+
};
|
|
1421
|
+
}>, z.ZodObject<{
|
|
1422
|
+
type: z.ZodLiteral<"scheduled">;
|
|
1423
|
+
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1424
|
+
type: z.ZodLiteral<"interval">;
|
|
1425
|
+
options: z.ZodObject<{
|
|
1426
|
+
seconds: z.ZodNumber;
|
|
1427
|
+
}, "strip", z.ZodTypeAny, {
|
|
1428
|
+
seconds: number;
|
|
1429
|
+
}, {
|
|
1430
|
+
seconds: number;
|
|
1431
|
+
}>;
|
|
1432
|
+
metadata: z.ZodAny;
|
|
1433
|
+
}, "strip", z.ZodTypeAny, {
|
|
1434
|
+
metadata?: any;
|
|
1435
|
+
options: {
|
|
1436
|
+
seconds: number;
|
|
1437
|
+
};
|
|
1438
|
+
type: "interval";
|
|
1439
|
+
}, {
|
|
1440
|
+
metadata?: any;
|
|
1441
|
+
options: {
|
|
1442
|
+
seconds: number;
|
|
1443
|
+
};
|
|
1444
|
+
type: "interval";
|
|
1445
|
+
}>, z.ZodObject<{
|
|
1446
|
+
type: z.ZodLiteral<"cron">;
|
|
1447
|
+
options: z.ZodObject<{
|
|
1448
|
+
cron: z.ZodString;
|
|
1449
|
+
}, "strip", z.ZodTypeAny, {
|
|
1450
|
+
cron: string;
|
|
1451
|
+
}, {
|
|
1452
|
+
cron: string;
|
|
1453
|
+
}>;
|
|
1454
|
+
metadata: z.ZodAny;
|
|
1455
|
+
}, "strip", z.ZodTypeAny, {
|
|
1456
|
+
metadata?: any;
|
|
1457
|
+
options: {
|
|
1458
|
+
cron: string;
|
|
1459
|
+
};
|
|
1460
|
+
type: "cron";
|
|
1461
|
+
}, {
|
|
1462
|
+
metadata?: any;
|
|
1463
|
+
options: {
|
|
1464
|
+
cron: string;
|
|
1465
|
+
};
|
|
1466
|
+
type: "cron";
|
|
1467
|
+
}>]>;
|
|
1468
|
+
}, "strip", z.ZodTypeAny, {
|
|
1469
|
+
type: "scheduled";
|
|
1470
|
+
schedule: {
|
|
1471
|
+
metadata?: any;
|
|
1472
|
+
options: {
|
|
1473
|
+
cron: string;
|
|
1474
|
+
};
|
|
1475
|
+
type: "cron";
|
|
1476
|
+
} | {
|
|
1477
|
+
metadata?: any;
|
|
1478
|
+
options: {
|
|
1479
|
+
seconds: number;
|
|
1480
|
+
};
|
|
1481
|
+
type: "interval";
|
|
1482
|
+
};
|
|
1483
|
+
}, {
|
|
1484
|
+
type: "scheduled";
|
|
1485
|
+
schedule: {
|
|
1486
|
+
metadata?: any;
|
|
1487
|
+
options: {
|
|
1488
|
+
cron: string;
|
|
1489
|
+
};
|
|
1490
|
+
type: "cron";
|
|
1491
|
+
} | {
|
|
1492
|
+
metadata?: any;
|
|
1493
|
+
options: {
|
|
1494
|
+
seconds: number;
|
|
1495
|
+
};
|
|
1496
|
+
type: "interval";
|
|
1497
|
+
};
|
|
1498
|
+
}>]>>;
|
|
1499
|
+
redact: z.ZodOptional<z.ZodObject<{
|
|
1500
|
+
paths: z.ZodArray<z.ZodString, "many">;
|
|
1501
|
+
}, "strip", z.ZodTypeAny, {
|
|
1502
|
+
paths: string[];
|
|
1503
|
+
}, {
|
|
1504
|
+
paths: string[];
|
|
1505
|
+
}>>;
|
|
1506
|
+
connectionKey: z.ZodOptional<z.ZodString>;
|
|
1507
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
1508
|
+
style: z.ZodEnum<["normal", "minimal"]>;
|
|
1509
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1510
|
+
}, "strip", z.ZodTypeAny, {
|
|
1511
|
+
variant?: string | undefined;
|
|
1512
|
+
style: "normal" | "minimal";
|
|
1513
|
+
}, {
|
|
1514
|
+
variant?: string | undefined;
|
|
1515
|
+
style: "normal" | "minimal";
|
|
1516
|
+
}>>;
|
|
1517
|
+
}, "strip", z.ZodTypeAny, {
|
|
1518
|
+
params?: SerializableJson;
|
|
1519
|
+
icon?: string | undefined;
|
|
1520
|
+
style?: {
|
|
1521
|
+
variant?: string | undefined;
|
|
1522
|
+
style: "normal" | "minimal";
|
|
1523
|
+
} | undefined;
|
|
1524
|
+
delayUntil?: Date | undefined;
|
|
1525
|
+
description?: string | undefined;
|
|
1526
|
+
properties?: {
|
|
1527
|
+
url?: string | undefined;
|
|
1528
|
+
label: string;
|
|
1529
|
+
text: string;
|
|
1530
|
+
}[] | undefined;
|
|
1531
|
+
trigger?: {
|
|
1532
|
+
type: "dynamic";
|
|
1533
|
+
id: string;
|
|
1534
|
+
} | {
|
|
1535
|
+
properties?: {
|
|
1536
|
+
url?: string | undefined;
|
|
1537
|
+
label: string;
|
|
1538
|
+
text: string;
|
|
1539
|
+
}[] | undefined;
|
|
1540
|
+
type: "static";
|
|
1541
|
+
title: string;
|
|
1542
|
+
rule: {
|
|
1543
|
+
payload?: EventFilter | undefined;
|
|
1544
|
+
context?: EventFilter | undefined;
|
|
1545
|
+
event: string;
|
|
1546
|
+
source: string;
|
|
1547
|
+
};
|
|
1548
|
+
} | {
|
|
1549
|
+
type: "scheduled";
|
|
1550
|
+
schedule: {
|
|
1551
|
+
metadata?: any;
|
|
1552
|
+
options: {
|
|
1553
|
+
cron: string;
|
|
1554
|
+
};
|
|
1555
|
+
type: "cron";
|
|
1556
|
+
} | {
|
|
1557
|
+
metadata?: any;
|
|
1558
|
+
options: {
|
|
1559
|
+
seconds: number;
|
|
1560
|
+
};
|
|
1561
|
+
type: "interval";
|
|
1562
|
+
};
|
|
1563
|
+
} | undefined;
|
|
1564
|
+
displayKey?: string | undefined;
|
|
1565
|
+
redact?: {
|
|
1566
|
+
paths: string[];
|
|
1567
|
+
} | undefined;
|
|
1568
|
+
connectionKey?: string | undefined;
|
|
1569
|
+
name: string;
|
|
1570
|
+
noop: boolean;
|
|
1571
|
+
}, {
|
|
1572
|
+
params?: SerializableJson;
|
|
1573
|
+
icon?: string | undefined;
|
|
1574
|
+
style?: {
|
|
1575
|
+
variant?: string | undefined;
|
|
1576
|
+
style: "normal" | "minimal";
|
|
1577
|
+
} | undefined;
|
|
1578
|
+
noop?: boolean | undefined;
|
|
1579
|
+
delayUntil?: Date | undefined;
|
|
1580
|
+
description?: string | undefined;
|
|
1581
|
+
properties?: {
|
|
1582
|
+
url?: string | undefined;
|
|
1583
|
+
label: string;
|
|
1584
|
+
text: string;
|
|
1585
|
+
}[] | undefined;
|
|
1586
|
+
trigger?: {
|
|
1587
|
+
type: "dynamic";
|
|
1588
|
+
id: string;
|
|
1589
|
+
} | {
|
|
1590
|
+
properties?: {
|
|
1591
|
+
url?: string | undefined;
|
|
1592
|
+
label: string;
|
|
1593
|
+
text: string;
|
|
1594
|
+
}[] | undefined;
|
|
1595
|
+
type: "static";
|
|
1596
|
+
title: string;
|
|
1597
|
+
rule: {
|
|
1598
|
+
payload?: EventFilter | undefined;
|
|
1599
|
+
context?: EventFilter | undefined;
|
|
1600
|
+
event: string;
|
|
1601
|
+
source: string;
|
|
1602
|
+
};
|
|
1603
|
+
} | {
|
|
1604
|
+
type: "scheduled";
|
|
1605
|
+
schedule: {
|
|
1606
|
+
metadata?: any;
|
|
1607
|
+
options: {
|
|
1608
|
+
cron: string;
|
|
1609
|
+
};
|
|
1610
|
+
type: "cron";
|
|
1611
|
+
} | {
|
|
1612
|
+
metadata?: any;
|
|
1613
|
+
options: {
|
|
1614
|
+
seconds: number;
|
|
1615
|
+
};
|
|
1616
|
+
type: "interval";
|
|
1617
|
+
};
|
|
1618
|
+
} | undefined;
|
|
1619
|
+
displayKey?: string | undefined;
|
|
1620
|
+
redact?: {
|
|
1621
|
+
paths: string[];
|
|
1622
|
+
} | undefined;
|
|
1623
|
+
connectionKey?: string | undefined;
|
|
1624
|
+
name: string;
|
|
1625
|
+
}>;
|
|
1626
|
+
type RunTaskOptions = z.input<typeof RunTaskOptionsSchema>;
|
|
1627
|
+
declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
|
|
1628
|
+
name: z.ZodString;
|
|
1629
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1630
|
+
displayKey: z.ZodOptional<z.ZodString>;
|
|
1631
|
+
noop: z.ZodDefault<z.ZodBoolean>;
|
|
1632
|
+
delayUntil: z.ZodOptional<z.ZodDate>;
|
|
1633
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1634
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1635
|
+
label: z.ZodString;
|
|
1636
|
+
text: z.ZodString;
|
|
1637
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
}, "strip", z.ZodTypeAny, {
|
|
1639
|
+
url?: string | undefined;
|
|
1640
|
+
label: string;
|
|
1641
|
+
text: string;
|
|
1642
|
+
}, {
|
|
1643
|
+
url?: string | undefined;
|
|
1644
|
+
label: string;
|
|
1645
|
+
text: string;
|
|
1646
|
+
}>, "many">>;
|
|
1647
|
+
params: z.ZodOptional<z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>;
|
|
1648
|
+
trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1649
|
+
type: z.ZodLiteral<"dynamic">;
|
|
1650
|
+
id: z.ZodString;
|
|
1651
|
+
}, "strip", z.ZodTypeAny, {
|
|
1652
|
+
type: "dynamic";
|
|
1653
|
+
id: string;
|
|
1654
|
+
}, {
|
|
1655
|
+
type: "dynamic";
|
|
1656
|
+
id: string;
|
|
1657
|
+
}>, z.ZodObject<{
|
|
1658
|
+
type: z.ZodLiteral<"static">;
|
|
1659
|
+
title: z.ZodString;
|
|
1660
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1661
|
+
label: z.ZodString;
|
|
1662
|
+
text: z.ZodString;
|
|
1663
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1664
|
+
}, "strip", z.ZodTypeAny, {
|
|
1665
|
+
url?: string | undefined;
|
|
1666
|
+
label: string;
|
|
1667
|
+
text: string;
|
|
1668
|
+
}, {
|
|
1669
|
+
url?: string | undefined;
|
|
1670
|
+
label: string;
|
|
1671
|
+
text: string;
|
|
1672
|
+
}>, "many">>;
|
|
1673
|
+
rule: z.ZodObject<{
|
|
1674
|
+
event: z.ZodString;
|
|
1675
|
+
source: z.ZodString;
|
|
1676
|
+
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
1677
|
+
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
1678
|
+
}, "strip", z.ZodTypeAny, {
|
|
1679
|
+
payload?: EventFilter | undefined;
|
|
1680
|
+
context?: EventFilter | undefined;
|
|
1681
|
+
event: string;
|
|
1682
|
+
source: string;
|
|
1683
|
+
}, {
|
|
1684
|
+
payload?: EventFilter | undefined;
|
|
1685
|
+
context?: EventFilter | undefined;
|
|
1686
|
+
event: string;
|
|
1687
|
+
source: string;
|
|
1688
|
+
}>;
|
|
1689
|
+
}, "strip", z.ZodTypeAny, {
|
|
1690
|
+
properties?: {
|
|
1691
|
+
url?: string | undefined;
|
|
1692
|
+
label: string;
|
|
1693
|
+
text: string;
|
|
1694
|
+
}[] | undefined;
|
|
1695
|
+
type: "static";
|
|
1696
|
+
title: string;
|
|
1697
|
+
rule: {
|
|
1698
|
+
payload?: EventFilter | undefined;
|
|
1699
|
+
context?: EventFilter | undefined;
|
|
1700
|
+
event: string;
|
|
1701
|
+
source: string;
|
|
1702
|
+
};
|
|
1703
|
+
}, {
|
|
1704
|
+
properties?: {
|
|
1705
|
+
url?: string | undefined;
|
|
1706
|
+
label: string;
|
|
1707
|
+
text: string;
|
|
1708
|
+
}[] | undefined;
|
|
1709
|
+
type: "static";
|
|
1710
|
+
title: string;
|
|
1711
|
+
rule: {
|
|
1712
|
+
payload?: EventFilter | undefined;
|
|
1713
|
+
context?: EventFilter | undefined;
|
|
1714
|
+
event: string;
|
|
1715
|
+
source: string;
|
|
1716
|
+
};
|
|
1717
|
+
}>, z.ZodObject<{
|
|
1718
|
+
type: z.ZodLiteral<"scheduled">;
|
|
1719
|
+
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1720
|
+
type: z.ZodLiteral<"interval">;
|
|
1721
|
+
options: z.ZodObject<{
|
|
1722
|
+
seconds: z.ZodNumber;
|
|
1723
|
+
}, "strip", z.ZodTypeAny, {
|
|
1724
|
+
seconds: number;
|
|
1725
|
+
}, {
|
|
1726
|
+
seconds: number;
|
|
1727
|
+
}>;
|
|
1728
|
+
metadata: z.ZodAny;
|
|
1729
|
+
}, "strip", z.ZodTypeAny, {
|
|
1730
|
+
metadata?: any;
|
|
1731
|
+
options: {
|
|
1732
|
+
seconds: number;
|
|
1733
|
+
};
|
|
1734
|
+
type: "interval";
|
|
1735
|
+
}, {
|
|
1736
|
+
metadata?: any;
|
|
1737
|
+
options: {
|
|
1738
|
+
seconds: number;
|
|
1739
|
+
};
|
|
1740
|
+
type: "interval";
|
|
1741
|
+
}>, z.ZodObject<{
|
|
1742
|
+
type: z.ZodLiteral<"cron">;
|
|
1743
|
+
options: z.ZodObject<{
|
|
1744
|
+
cron: z.ZodString;
|
|
1745
|
+
}, "strip", z.ZodTypeAny, {
|
|
1746
|
+
cron: string;
|
|
1747
|
+
}, {
|
|
1748
|
+
cron: string;
|
|
1749
|
+
}>;
|
|
1750
|
+
metadata: z.ZodAny;
|
|
1751
|
+
}, "strip", z.ZodTypeAny, {
|
|
1752
|
+
metadata?: any;
|
|
1753
|
+
options: {
|
|
1754
|
+
cron: string;
|
|
1755
|
+
};
|
|
1756
|
+
type: "cron";
|
|
1757
|
+
}, {
|
|
1758
|
+
metadata?: any;
|
|
1759
|
+
options: {
|
|
1760
|
+
cron: string;
|
|
1761
|
+
};
|
|
1762
|
+
type: "cron";
|
|
1763
|
+
}>]>;
|
|
1764
|
+
}, "strip", z.ZodTypeAny, {
|
|
1765
|
+
type: "scheduled";
|
|
1766
|
+
schedule: {
|
|
1767
|
+
metadata?: any;
|
|
1768
|
+
options: {
|
|
1769
|
+
cron: string;
|
|
1770
|
+
};
|
|
1771
|
+
type: "cron";
|
|
1772
|
+
} | {
|
|
1773
|
+
metadata?: any;
|
|
1774
|
+
options: {
|
|
1775
|
+
seconds: number;
|
|
1776
|
+
};
|
|
1777
|
+
type: "interval";
|
|
1778
|
+
};
|
|
1779
|
+
}, {
|
|
1780
|
+
type: "scheduled";
|
|
1781
|
+
schedule: {
|
|
1782
|
+
metadata?: any;
|
|
1783
|
+
options: {
|
|
1784
|
+
cron: string;
|
|
1785
|
+
};
|
|
1786
|
+
type: "cron";
|
|
1787
|
+
} | {
|
|
1788
|
+
metadata?: any;
|
|
1789
|
+
options: {
|
|
1790
|
+
seconds: number;
|
|
1791
|
+
};
|
|
1792
|
+
type: "interval";
|
|
1793
|
+
};
|
|
1794
|
+
}>]>>;
|
|
1795
|
+
redact: z.ZodOptional<z.ZodObject<{
|
|
1796
|
+
paths: z.ZodArray<z.ZodString, "many">;
|
|
1797
|
+
}, "strip", z.ZodTypeAny, {
|
|
1798
|
+
paths: string[];
|
|
1799
|
+
}, {
|
|
1800
|
+
paths: string[];
|
|
1801
|
+
}>>;
|
|
1802
|
+
connectionKey: z.ZodOptional<z.ZodString>;
|
|
1803
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
1804
|
+
style: z.ZodEnum<["normal", "minimal"]>;
|
|
1805
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1806
|
+
}, "strip", z.ZodTypeAny, {
|
|
1807
|
+
variant?: string | undefined;
|
|
1808
|
+
style: "normal" | "minimal";
|
|
1809
|
+
}, {
|
|
1810
|
+
variant?: string | undefined;
|
|
1811
|
+
style: "normal" | "minimal";
|
|
1812
|
+
}>>;
|
|
1813
|
+
}, {
|
|
1814
|
+
idempotencyKey: z.ZodString;
|
|
1815
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
1816
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1817
|
+
params?: SerializableJson;
|
|
1818
|
+
icon?: string | undefined;
|
|
1819
|
+
style?: {
|
|
1820
|
+
variant?: string | undefined;
|
|
1821
|
+
style: "normal" | "minimal";
|
|
1822
|
+
} | undefined;
|
|
1823
|
+
delayUntil?: Date | undefined;
|
|
1824
|
+
description?: string | undefined;
|
|
1825
|
+
properties?: {
|
|
1826
|
+
url?: string | undefined;
|
|
1827
|
+
label: string;
|
|
1828
|
+
text: string;
|
|
1829
|
+
}[] | undefined;
|
|
1830
|
+
parentId?: string | undefined;
|
|
1831
|
+
trigger?: {
|
|
1832
|
+
type: "dynamic";
|
|
1833
|
+
id: string;
|
|
1834
|
+
} | {
|
|
1835
|
+
properties?: {
|
|
1836
|
+
url?: string | undefined;
|
|
1837
|
+
label: string;
|
|
1838
|
+
text: string;
|
|
1839
|
+
}[] | undefined;
|
|
1840
|
+
type: "static";
|
|
1841
|
+
title: string;
|
|
1842
|
+
rule: {
|
|
1843
|
+
payload?: EventFilter | undefined;
|
|
1844
|
+
context?: EventFilter | undefined;
|
|
1845
|
+
event: string;
|
|
1846
|
+
source: string;
|
|
1847
|
+
};
|
|
1848
|
+
} | {
|
|
1849
|
+
type: "scheduled";
|
|
1850
|
+
schedule: {
|
|
1851
|
+
metadata?: any;
|
|
1852
|
+
options: {
|
|
1853
|
+
cron: string;
|
|
1854
|
+
};
|
|
1855
|
+
type: "cron";
|
|
1856
|
+
} | {
|
|
1857
|
+
metadata?: any;
|
|
1858
|
+
options: {
|
|
1859
|
+
seconds: number;
|
|
1860
|
+
};
|
|
1861
|
+
type: "interval";
|
|
1862
|
+
};
|
|
1863
|
+
} | undefined;
|
|
1864
|
+
displayKey?: string | undefined;
|
|
1865
|
+
redact?: {
|
|
1866
|
+
paths: string[];
|
|
1867
|
+
} | undefined;
|
|
1868
|
+
connectionKey?: string | undefined;
|
|
1869
|
+
name: string;
|
|
1870
|
+
noop: boolean;
|
|
1871
|
+
idempotencyKey: string;
|
|
1872
|
+
}, {
|
|
1873
|
+
params?: SerializableJson;
|
|
1874
|
+
icon?: string | undefined;
|
|
1875
|
+
style?: {
|
|
1876
|
+
variant?: string | undefined;
|
|
1877
|
+
style: "normal" | "minimal";
|
|
1878
|
+
} | undefined;
|
|
1879
|
+
noop?: boolean | undefined;
|
|
1880
|
+
delayUntil?: Date | undefined;
|
|
1881
|
+
description?: string | undefined;
|
|
1882
|
+
properties?: {
|
|
1883
|
+
url?: string | undefined;
|
|
1884
|
+
label: string;
|
|
1885
|
+
text: string;
|
|
1886
|
+
}[] | undefined;
|
|
1887
|
+
parentId?: string | undefined;
|
|
1888
|
+
trigger?: {
|
|
1889
|
+
type: "dynamic";
|
|
1890
|
+
id: string;
|
|
1891
|
+
} | {
|
|
1892
|
+
properties?: {
|
|
1893
|
+
url?: string | undefined;
|
|
1894
|
+
label: string;
|
|
1895
|
+
text: string;
|
|
1896
|
+
}[] | undefined;
|
|
1897
|
+
type: "static";
|
|
1898
|
+
title: string;
|
|
1899
|
+
rule: {
|
|
1900
|
+
payload?: EventFilter | undefined;
|
|
1901
|
+
context?: EventFilter | undefined;
|
|
1902
|
+
event: string;
|
|
1903
|
+
source: string;
|
|
1904
|
+
};
|
|
1905
|
+
} | {
|
|
1906
|
+
type: "scheduled";
|
|
1907
|
+
schedule: {
|
|
1908
|
+
metadata?: any;
|
|
1909
|
+
options: {
|
|
1910
|
+
cron: string;
|
|
1911
|
+
};
|
|
1912
|
+
type: "cron";
|
|
1913
|
+
} | {
|
|
1914
|
+
metadata?: any;
|
|
1915
|
+
options: {
|
|
1916
|
+
seconds: number;
|
|
1917
|
+
};
|
|
1918
|
+
type: "interval";
|
|
1919
|
+
};
|
|
1920
|
+
} | undefined;
|
|
1921
|
+
displayKey?: string | undefined;
|
|
1922
|
+
redact?: {
|
|
1923
|
+
paths: string[];
|
|
1924
|
+
} | undefined;
|
|
1925
|
+
connectionKey?: string | undefined;
|
|
1926
|
+
name: string;
|
|
1927
|
+
idempotencyKey: string;
|
|
1928
|
+
}>;
|
|
1929
|
+
type RunTaskBodyInput = z.infer<typeof RunTaskBodyInputSchema>;
|
|
1930
|
+
declare const CompleteTaskBodyInputSchema: z.ZodObject<z.extendShape<Pick<z.extendShape<{
|
|
1931
|
+
name: z.ZodString;
|
|
1932
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
1933
|
+
displayKey: z.ZodOptional<z.ZodString>;
|
|
1934
|
+
noop: z.ZodDefault<z.ZodBoolean>;
|
|
1935
|
+
delayUntil: z.ZodOptional<z.ZodDate>;
|
|
1936
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1937
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1938
|
+
label: z.ZodString;
|
|
1939
|
+
text: z.ZodString;
|
|
1940
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1941
|
+
}, "strip", z.ZodTypeAny, {
|
|
1942
|
+
url?: string | undefined;
|
|
1943
|
+
label: string;
|
|
1944
|
+
text: string;
|
|
1945
|
+
}, {
|
|
1946
|
+
url?: string | undefined;
|
|
1947
|
+
label: string;
|
|
1948
|
+
text: string;
|
|
1949
|
+
}>, "many">>;
|
|
1950
|
+
params: z.ZodOptional<z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>;
|
|
1951
|
+
trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1952
|
+
type: z.ZodLiteral<"dynamic">;
|
|
1953
|
+
id: z.ZodString;
|
|
1954
|
+
}, "strip", z.ZodTypeAny, {
|
|
1955
|
+
type: "dynamic";
|
|
1956
|
+
id: string;
|
|
1957
|
+
}, {
|
|
1958
|
+
type: "dynamic";
|
|
1959
|
+
id: string;
|
|
1960
|
+
}>, z.ZodObject<{
|
|
1961
|
+
type: z.ZodLiteral<"static">;
|
|
1962
|
+
title: z.ZodString;
|
|
1963
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1964
|
+
label: z.ZodString;
|
|
1965
|
+
text: z.ZodString;
|
|
1966
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1967
|
+
}, "strip", z.ZodTypeAny, {
|
|
1968
|
+
url?: string | undefined;
|
|
1969
|
+
label: string;
|
|
1970
|
+
text: string;
|
|
1971
|
+
}, {
|
|
1972
|
+
url?: string | undefined;
|
|
1973
|
+
label: string;
|
|
1974
|
+
text: string;
|
|
1975
|
+
}>, "many">>;
|
|
1976
|
+
rule: z.ZodObject<{
|
|
1977
|
+
event: z.ZodString;
|
|
1978
|
+
source: z.ZodString;
|
|
1979
|
+
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
1980
|
+
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
1981
|
+
}, "strip", z.ZodTypeAny, {
|
|
1982
|
+
payload?: EventFilter | undefined;
|
|
1983
|
+
context?: EventFilter | undefined;
|
|
1984
|
+
event: string;
|
|
1985
|
+
source: string;
|
|
1986
|
+
}, {
|
|
1987
|
+
payload?: EventFilter | undefined;
|
|
1988
|
+
context?: EventFilter | undefined;
|
|
1989
|
+
event: string;
|
|
1990
|
+
source: string;
|
|
1991
|
+
}>;
|
|
1992
|
+
}, "strip", z.ZodTypeAny, {
|
|
1993
|
+
properties?: {
|
|
1994
|
+
url?: string | undefined;
|
|
1995
|
+
label: string;
|
|
1996
|
+
text: string;
|
|
1997
|
+
}[] | undefined;
|
|
1998
|
+
type: "static";
|
|
1999
|
+
title: string;
|
|
2000
|
+
rule: {
|
|
2001
|
+
payload?: EventFilter | undefined;
|
|
2002
|
+
context?: EventFilter | undefined;
|
|
2003
|
+
event: string;
|
|
2004
|
+
source: string;
|
|
2005
|
+
};
|
|
2006
|
+
}, {
|
|
2007
|
+
properties?: {
|
|
2008
|
+
url?: string | undefined;
|
|
2009
|
+
label: string;
|
|
2010
|
+
text: string;
|
|
2011
|
+
}[] | undefined;
|
|
2012
|
+
type: "static";
|
|
2013
|
+
title: string;
|
|
2014
|
+
rule: {
|
|
2015
|
+
payload?: EventFilter | undefined;
|
|
2016
|
+
context?: EventFilter | undefined;
|
|
2017
|
+
event: string;
|
|
2018
|
+
source: string;
|
|
2019
|
+
};
|
|
2020
|
+
}>, z.ZodObject<{
|
|
2021
|
+
type: z.ZodLiteral<"scheduled">;
|
|
2022
|
+
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2023
|
+
type: z.ZodLiteral<"interval">;
|
|
2024
|
+
options: z.ZodObject<{
|
|
2025
|
+
seconds: z.ZodNumber;
|
|
2026
|
+
}, "strip", z.ZodTypeAny, {
|
|
2027
|
+
seconds: number;
|
|
2028
|
+
}, {
|
|
2029
|
+
seconds: number;
|
|
2030
|
+
}>;
|
|
2031
|
+
metadata: z.ZodAny;
|
|
2032
|
+
}, "strip", z.ZodTypeAny, {
|
|
2033
|
+
metadata?: any;
|
|
2034
|
+
options: {
|
|
2035
|
+
seconds: number;
|
|
2036
|
+
};
|
|
2037
|
+
type: "interval";
|
|
2038
|
+
}, {
|
|
2039
|
+
metadata?: any;
|
|
2040
|
+
options: {
|
|
2041
|
+
seconds: number;
|
|
2042
|
+
};
|
|
2043
|
+
type: "interval";
|
|
2044
|
+
}>, z.ZodObject<{
|
|
2045
|
+
type: z.ZodLiteral<"cron">;
|
|
2046
|
+
options: z.ZodObject<{
|
|
2047
|
+
cron: z.ZodString;
|
|
2048
|
+
}, "strip", z.ZodTypeAny, {
|
|
2049
|
+
cron: string;
|
|
2050
|
+
}, {
|
|
2051
|
+
cron: string;
|
|
2052
|
+
}>;
|
|
2053
|
+
metadata: z.ZodAny;
|
|
2054
|
+
}, "strip", z.ZodTypeAny, {
|
|
2055
|
+
metadata?: any;
|
|
2056
|
+
options: {
|
|
2057
|
+
cron: string;
|
|
2058
|
+
};
|
|
2059
|
+
type: "cron";
|
|
2060
|
+
}, {
|
|
2061
|
+
metadata?: any;
|
|
2062
|
+
options: {
|
|
2063
|
+
cron: string;
|
|
2064
|
+
};
|
|
2065
|
+
type: "cron";
|
|
2066
|
+
}>]>;
|
|
2067
|
+
}, "strip", z.ZodTypeAny, {
|
|
2068
|
+
type: "scheduled";
|
|
2069
|
+
schedule: {
|
|
2070
|
+
metadata?: any;
|
|
2071
|
+
options: {
|
|
2072
|
+
cron: string;
|
|
2073
|
+
};
|
|
2074
|
+
type: "cron";
|
|
2075
|
+
} | {
|
|
2076
|
+
metadata?: any;
|
|
2077
|
+
options: {
|
|
2078
|
+
seconds: number;
|
|
2079
|
+
};
|
|
2080
|
+
type: "interval";
|
|
2081
|
+
};
|
|
2082
|
+
}, {
|
|
2083
|
+
type: "scheduled";
|
|
2084
|
+
schedule: {
|
|
2085
|
+
metadata?: any;
|
|
2086
|
+
options: {
|
|
2087
|
+
cron: string;
|
|
2088
|
+
};
|
|
2089
|
+
type: "cron";
|
|
2090
|
+
} | {
|
|
2091
|
+
metadata?: any;
|
|
2092
|
+
options: {
|
|
2093
|
+
seconds: number;
|
|
2094
|
+
};
|
|
2095
|
+
type: "interval";
|
|
2096
|
+
};
|
|
2097
|
+
}>]>>;
|
|
2098
|
+
redact: z.ZodOptional<z.ZodObject<{
|
|
2099
|
+
paths: z.ZodArray<z.ZodString, "many">;
|
|
2100
|
+
}, "strip", z.ZodTypeAny, {
|
|
2101
|
+
paths: string[];
|
|
2102
|
+
}, {
|
|
2103
|
+
paths: string[];
|
|
2104
|
+
}>>;
|
|
2105
|
+
connectionKey: z.ZodOptional<z.ZodString>;
|
|
2106
|
+
style: z.ZodOptional<z.ZodObject<{
|
|
2107
|
+
style: z.ZodEnum<["normal", "minimal"]>;
|
|
2108
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
2109
|
+
}, "strip", z.ZodTypeAny, {
|
|
2110
|
+
variant?: string | undefined;
|
|
2111
|
+
style: "normal" | "minimal";
|
|
2112
|
+
}, {
|
|
2113
|
+
variant?: string | undefined;
|
|
2114
|
+
style: "normal" | "minimal";
|
|
2115
|
+
}>>;
|
|
2116
|
+
}, {
|
|
2117
|
+
idempotencyKey: z.ZodString;
|
|
2118
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
2119
|
+
}>, "params" | "description" | "properties">, {
|
|
2120
|
+
output: z.ZodEffects<z.ZodOptional<z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>, string | number | boolean | {
|
|
2121
|
+
[key: string]: DeserializedJson;
|
|
2122
|
+
} | DeserializedJson[] | null, SerializableJson>;
|
|
2123
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2124
|
+
params?: SerializableJson;
|
|
2125
|
+
description?: string | undefined;
|
|
2126
|
+
properties?: {
|
|
2127
|
+
url?: string | undefined;
|
|
2128
|
+
label: string;
|
|
2129
|
+
text: string;
|
|
2130
|
+
}[] | undefined;
|
|
2131
|
+
output: string | number | boolean | {
|
|
2132
|
+
[key: string]: DeserializedJson;
|
|
2133
|
+
} | DeserializedJson[] | null;
|
|
2134
|
+
}, {
|
|
2135
|
+
params?: SerializableJson;
|
|
2136
|
+
description?: string | undefined;
|
|
2137
|
+
properties?: {
|
|
2138
|
+
url?: string | undefined;
|
|
2139
|
+
label: string;
|
|
2140
|
+
text: string;
|
|
2141
|
+
}[] | undefined;
|
|
2142
|
+
output?: SerializableJson;
|
|
2143
|
+
}>;
|
|
2144
|
+
type CompleteTaskBodyInput = z.input<typeof CompleteTaskBodyInputSchema>;
|
|
2145
|
+
declare const NormalizedRequestSchema: z.ZodObject<{
|
|
2146
|
+
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2147
|
+
method: z.ZodString;
|
|
2148
|
+
query: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2149
|
+
url: z.ZodString;
|
|
2150
|
+
body: z.ZodAny;
|
|
2151
|
+
}, "strip", z.ZodTypeAny, {
|
|
2152
|
+
body?: any;
|
|
2153
|
+
url: string;
|
|
2154
|
+
method: string;
|
|
2155
|
+
headers: Record<string, string>;
|
|
2156
|
+
query: Record<string, string>;
|
|
2157
|
+
}, {
|
|
2158
|
+
body?: any;
|
|
2159
|
+
url: string;
|
|
2160
|
+
method: string;
|
|
2161
|
+
headers: Record<string, string>;
|
|
2162
|
+
query: Record<string, string>;
|
|
2163
|
+
}>;
|
|
2164
|
+
type NormalizedRequest = z.infer<typeof NormalizedRequestSchema>;
|
|
2165
|
+
declare const NormalizedResponseSchema: z.ZodObject<{
|
|
2166
|
+
status: z.ZodNumber;
|
|
2167
|
+
body: z.ZodAny;
|
|
2168
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2169
|
+
}, "strip", z.ZodTypeAny, {
|
|
2170
|
+
headers?: Record<string, string> | undefined;
|
|
2171
|
+
body?: any;
|
|
2172
|
+
status: number;
|
|
2173
|
+
}, {
|
|
2174
|
+
headers?: Record<string, string> | undefined;
|
|
2175
|
+
body?: any;
|
|
2176
|
+
status: number;
|
|
2177
|
+
}>;
|
|
2178
|
+
type NormalizedResponse = z.infer<typeof NormalizedResponseSchema>;
|
|
2179
|
+
declare const RegisterTriggerBodySchema: z.ZodObject<{
|
|
2180
|
+
rule: z.ZodObject<{
|
|
2181
|
+
event: z.ZodString;
|
|
2182
|
+
source: z.ZodString;
|
|
2183
|
+
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
2184
|
+
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
2185
|
+
}, "strip", z.ZodTypeAny, {
|
|
2186
|
+
payload?: EventFilter | undefined;
|
|
2187
|
+
context?: EventFilter | undefined;
|
|
2188
|
+
event: string;
|
|
2189
|
+
source: string;
|
|
2190
|
+
}, {
|
|
2191
|
+
payload?: EventFilter | undefined;
|
|
2192
|
+
context?: EventFilter | undefined;
|
|
2193
|
+
event: string;
|
|
2194
|
+
source: string;
|
|
2195
|
+
}>;
|
|
2196
|
+
source: z.ZodObject<{
|
|
2197
|
+
channel: z.ZodEnum<["HTTP", "SQS", "SMTP"]>;
|
|
2198
|
+
key: z.ZodString;
|
|
2199
|
+
params: z.ZodAny;
|
|
2200
|
+
events: z.ZodArray<z.ZodString, "many">;
|
|
2201
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
2202
|
+
}, "strip", z.ZodTypeAny, {
|
|
2203
|
+
params?: any;
|
|
2204
|
+
clientId?: string | undefined;
|
|
2205
|
+
key: string;
|
|
2206
|
+
channel: "HTTP" | "SMTP" | "SQS";
|
|
2207
|
+
events: string[];
|
|
2208
|
+
}, {
|
|
2209
|
+
params?: any;
|
|
2210
|
+
clientId?: string | undefined;
|
|
2211
|
+
key: string;
|
|
2212
|
+
channel: "HTTP" | "SMTP" | "SQS";
|
|
2213
|
+
events: string[];
|
|
2214
|
+
}>;
|
|
2215
|
+
}, "strip", z.ZodTypeAny, {
|
|
2216
|
+
source: {
|
|
2217
|
+
params?: any;
|
|
2218
|
+
clientId?: string | undefined;
|
|
2219
|
+
key: string;
|
|
2220
|
+
channel: "HTTP" | "SMTP" | "SQS";
|
|
2221
|
+
events: string[];
|
|
2222
|
+
};
|
|
2223
|
+
rule: {
|
|
2224
|
+
payload?: EventFilter | undefined;
|
|
2225
|
+
context?: EventFilter | undefined;
|
|
2226
|
+
event: string;
|
|
2227
|
+
source: string;
|
|
2228
|
+
};
|
|
2229
|
+
}, {
|
|
2230
|
+
source: {
|
|
2231
|
+
params?: any;
|
|
2232
|
+
clientId?: string | undefined;
|
|
2233
|
+
key: string;
|
|
2234
|
+
channel: "HTTP" | "SMTP" | "SQS";
|
|
2235
|
+
events: string[];
|
|
2236
|
+
};
|
|
2237
|
+
rule: {
|
|
2238
|
+
payload?: EventFilter | undefined;
|
|
2239
|
+
context?: EventFilter | undefined;
|
|
2240
|
+
event: string;
|
|
2241
|
+
source: string;
|
|
2242
|
+
};
|
|
2243
|
+
}>;
|
|
2244
|
+
type RegisterTriggerBody = z.infer<typeof RegisterTriggerBodySchema>;
|
|
2245
|
+
|
|
2246
|
+
declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2247
|
+
type: z.ZodLiteral<"dynamic">;
|
|
2248
|
+
id: z.ZodString;
|
|
2249
|
+
}, "strip", z.ZodTypeAny, {
|
|
2250
|
+
type: "dynamic";
|
|
2251
|
+
id: string;
|
|
2252
|
+
}, {
|
|
2253
|
+
type: "dynamic";
|
|
2254
|
+
id: string;
|
|
2255
|
+
}>, z.ZodObject<{
|
|
2256
|
+
type: z.ZodLiteral<"static">;
|
|
2257
|
+
title: z.ZodString;
|
|
2258
|
+
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2259
|
+
label: z.ZodString;
|
|
2260
|
+
text: z.ZodString;
|
|
2261
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2262
|
+
}, "strip", z.ZodTypeAny, {
|
|
2263
|
+
url?: string | undefined;
|
|
2264
|
+
label: string;
|
|
2265
|
+
text: string;
|
|
2266
|
+
}, {
|
|
2267
|
+
url?: string | undefined;
|
|
2268
|
+
label: string;
|
|
2269
|
+
text: string;
|
|
2270
|
+
}>, "many">>;
|
|
2271
|
+
rule: z.ZodObject<{
|
|
2272
|
+
event: z.ZodString;
|
|
2273
|
+
source: z.ZodString;
|
|
2274
|
+
payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
2275
|
+
context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
|
|
2276
|
+
}, "strip", z.ZodTypeAny, {
|
|
2277
|
+
payload?: EventFilter | undefined;
|
|
2278
|
+
context?: EventFilter | undefined;
|
|
2279
|
+
event: string;
|
|
2280
|
+
source: string;
|
|
2281
|
+
}, {
|
|
2282
|
+
payload?: EventFilter | undefined;
|
|
2283
|
+
context?: EventFilter | undefined;
|
|
2284
|
+
event: string;
|
|
2285
|
+
source: string;
|
|
2286
|
+
}>;
|
|
2287
|
+
}, "strip", z.ZodTypeAny, {
|
|
2288
|
+
properties?: {
|
|
2289
|
+
url?: string | undefined;
|
|
2290
|
+
label: string;
|
|
2291
|
+
text: string;
|
|
2292
|
+
}[] | undefined;
|
|
2293
|
+
type: "static";
|
|
2294
|
+
title: string;
|
|
2295
|
+
rule: {
|
|
2296
|
+
payload?: EventFilter | undefined;
|
|
2297
|
+
context?: EventFilter | undefined;
|
|
2298
|
+
event: string;
|
|
2299
|
+
source: string;
|
|
2300
|
+
};
|
|
2301
|
+
}, {
|
|
2302
|
+
properties?: {
|
|
2303
|
+
url?: string | undefined;
|
|
2304
|
+
label: string;
|
|
2305
|
+
text: string;
|
|
2306
|
+
}[] | undefined;
|
|
2307
|
+
type: "static";
|
|
2308
|
+
title: string;
|
|
2309
|
+
rule: {
|
|
2310
|
+
payload?: EventFilter | undefined;
|
|
2311
|
+
context?: EventFilter | undefined;
|
|
2312
|
+
event: string;
|
|
2313
|
+
source: string;
|
|
2314
|
+
};
|
|
2315
|
+
}>, z.ZodObject<{
|
|
2316
|
+
type: z.ZodLiteral<"scheduled">;
|
|
2317
|
+
schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2318
|
+
type: z.ZodLiteral<"interval">;
|
|
2319
|
+
options: z.ZodObject<{
|
|
2320
|
+
seconds: z.ZodNumber;
|
|
2321
|
+
}, "strip", z.ZodTypeAny, {
|
|
2322
|
+
seconds: number;
|
|
2323
|
+
}, {
|
|
2324
|
+
seconds: number;
|
|
2325
|
+
}>;
|
|
2326
|
+
metadata: z.ZodAny;
|
|
2327
|
+
}, "strip", z.ZodTypeAny, {
|
|
2328
|
+
metadata?: any;
|
|
2329
|
+
options: {
|
|
2330
|
+
seconds: number;
|
|
2331
|
+
};
|
|
2332
|
+
type: "interval";
|
|
2333
|
+
}, {
|
|
2334
|
+
metadata?: any;
|
|
2335
|
+
options: {
|
|
2336
|
+
seconds: number;
|
|
2337
|
+
};
|
|
2338
|
+
type: "interval";
|
|
2339
|
+
}>, z.ZodObject<{
|
|
2340
|
+
type: z.ZodLiteral<"cron">;
|
|
2341
|
+
options: z.ZodObject<{
|
|
2342
|
+
cron: z.ZodString;
|
|
2343
|
+
}, "strip", z.ZodTypeAny, {
|
|
2344
|
+
cron: string;
|
|
2345
|
+
}, {
|
|
2346
|
+
cron: string;
|
|
2347
|
+
}>;
|
|
2348
|
+
metadata: z.ZodAny;
|
|
2349
|
+
}, "strip", z.ZodTypeAny, {
|
|
2350
|
+
metadata?: any;
|
|
2351
|
+
options: {
|
|
2352
|
+
cron: string;
|
|
2353
|
+
};
|
|
2354
|
+
type: "cron";
|
|
2355
|
+
}, {
|
|
2356
|
+
metadata?: any;
|
|
2357
|
+
options: {
|
|
2358
|
+
cron: string;
|
|
2359
|
+
};
|
|
2360
|
+
type: "cron";
|
|
2361
|
+
}>]>;
|
|
2362
|
+
}, "strip", z.ZodTypeAny, {
|
|
2363
|
+
type: "scheduled";
|
|
2364
|
+
schedule: {
|
|
2365
|
+
metadata?: any;
|
|
2366
|
+
options: {
|
|
2367
|
+
cron: string;
|
|
2368
|
+
};
|
|
2369
|
+
type: "cron";
|
|
2370
|
+
} | {
|
|
2371
|
+
metadata?: any;
|
|
2372
|
+
options: {
|
|
2373
|
+
seconds: number;
|
|
2374
|
+
};
|
|
2375
|
+
type: "interval";
|
|
2376
|
+
};
|
|
2377
|
+
}, {
|
|
2378
|
+
type: "scheduled";
|
|
2379
|
+
schedule: {
|
|
2380
|
+
metadata?: any;
|
|
2381
|
+
options: {
|
|
2382
|
+
cron: string;
|
|
2383
|
+
};
|
|
2384
|
+
type: "cron";
|
|
2385
|
+
} | {
|
|
2386
|
+
metadata?: any;
|
|
2387
|
+
options: {
|
|
2388
|
+
seconds: number;
|
|
2389
|
+
};
|
|
2390
|
+
type: "interval";
|
|
2391
|
+
};
|
|
2392
|
+
}>]>;
|
|
2393
|
+
type TriggerMetadata = z.infer<typeof TriggerMetadataSchema>;
|
|
2394
|
+
|
|
2395
|
+
declare const DisplayPropertySchema: z.ZodObject<{
|
|
2396
|
+
label: z.ZodString;
|
|
2397
|
+
text: z.ZodString;
|
|
2398
|
+
url: z.ZodOptional<z.ZodString>;
|
|
2399
|
+
}, "strip", z.ZodTypeAny, {
|
|
2400
|
+
url?: string | undefined;
|
|
2401
|
+
label: string;
|
|
2402
|
+
text: string;
|
|
2403
|
+
}, {
|
|
2404
|
+
url?: string | undefined;
|
|
2405
|
+
label: string;
|
|
2406
|
+
text: string;
|
|
2407
|
+
}>;
|
|
2408
|
+
type DisplayProperty = z.infer<typeof DisplayPropertySchema>;
|
|
2409
|
+
|
|
2410
|
+
declare const ConnectionAuthSchema: z.ZodObject<{
|
|
2411
|
+
type: z.ZodEnum<["oauth2"]>;
|
|
2412
|
+
accessToken: z.ZodString;
|
|
2413
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2414
|
+
additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2415
|
+
}, "strip", z.ZodTypeAny, {
|
|
2416
|
+
scopes?: string[] | undefined;
|
|
2417
|
+
additionalFields?: Record<string, string> | undefined;
|
|
2418
|
+
type: "oauth2";
|
|
2419
|
+
accessToken: string;
|
|
2420
|
+
}, {
|
|
2421
|
+
scopes?: string[] | undefined;
|
|
2422
|
+
additionalFields?: Record<string, string> | undefined;
|
|
2423
|
+
type: "oauth2";
|
|
2424
|
+
accessToken: string;
|
|
2425
|
+
}>;
|
|
2426
|
+
type ConnectionAuth = z.infer<typeof ConnectionAuthSchema>;
|
|
2427
|
+
declare const IntegrationMetadataSchema: z.ZodObject<{
|
|
2428
|
+
key: z.ZodString;
|
|
2429
|
+
title: z.ZodString;
|
|
2430
|
+
icon: z.ZodString;
|
|
2431
|
+
}, "strip", z.ZodTypeAny, {
|
|
2432
|
+
key: string;
|
|
2433
|
+
title: string;
|
|
2434
|
+
icon: string;
|
|
2435
|
+
}, {
|
|
2436
|
+
key: string;
|
|
2437
|
+
title: string;
|
|
2438
|
+
icon: string;
|
|
2439
|
+
}>;
|
|
2440
|
+
type IntegrationMetadata = z.infer<typeof IntegrationMetadataSchema>;
|
|
2441
|
+
declare const IntegrationConfigSchema: z.ZodObject<{
|
|
2442
|
+
id: z.ZodString;
|
|
2443
|
+
metadata: z.ZodObject<{
|
|
2444
|
+
key: z.ZodString;
|
|
2445
|
+
title: z.ZodString;
|
|
2446
|
+
icon: z.ZodString;
|
|
2447
|
+
}, "strip", z.ZodTypeAny, {
|
|
2448
|
+
key: string;
|
|
2449
|
+
title: string;
|
|
2450
|
+
icon: string;
|
|
2451
|
+
}, {
|
|
2452
|
+
key: string;
|
|
2453
|
+
title: string;
|
|
2454
|
+
icon: string;
|
|
2455
|
+
}>;
|
|
2456
|
+
}, "strip", z.ZodTypeAny, {
|
|
2457
|
+
id: string;
|
|
2458
|
+
metadata: {
|
|
2459
|
+
key: string;
|
|
2460
|
+
title: string;
|
|
2461
|
+
icon: string;
|
|
2462
|
+
};
|
|
2463
|
+
}, {
|
|
2464
|
+
id: string;
|
|
2465
|
+
metadata: {
|
|
2466
|
+
key: string;
|
|
2467
|
+
title: string;
|
|
2468
|
+
icon: string;
|
|
2469
|
+
};
|
|
2470
|
+
}>;
|
|
2471
|
+
type IntegrationConfig = z.infer<typeof IntegrationConfigSchema>;
|
|
2472
|
+
|
|
2473
|
+
declare const ScheduledPayloadSchema: z.ZodObject<{
|
|
2474
|
+
ts: z.ZodDate;
|
|
2475
|
+
lastTimestamp: z.ZodOptional<z.ZodDate>;
|
|
2476
|
+
}, "strip", z.ZodTypeAny, {
|
|
2477
|
+
lastTimestamp?: Date | undefined;
|
|
2478
|
+
ts: Date;
|
|
2479
|
+
}, {
|
|
2480
|
+
lastTimestamp?: Date | undefined;
|
|
2481
|
+
ts: Date;
|
|
2482
|
+
}>;
|
|
2483
|
+
type ScheduledPayload = z.infer<typeof ScheduledPayloadSchema>;
|
|
2484
|
+
declare const IntervalOptionsSchema: z.ZodObject<{
|
|
2485
|
+
seconds: z.ZodNumber;
|
|
2486
|
+
}, "strip", z.ZodTypeAny, {
|
|
2487
|
+
seconds: number;
|
|
2488
|
+
}, {
|
|
2489
|
+
seconds: number;
|
|
2490
|
+
}>;
|
|
2491
|
+
type IntervalOptions = z.infer<typeof IntervalOptionsSchema>;
|
|
2492
|
+
declare const CronOptionsSchema: z.ZodObject<{
|
|
2493
|
+
cron: z.ZodString;
|
|
2494
|
+
}, "strip", z.ZodTypeAny, {
|
|
2495
|
+
cron: string;
|
|
2496
|
+
}, {
|
|
2497
|
+
cron: string;
|
|
2498
|
+
}>;
|
|
2499
|
+
type CronOptions = z.infer<typeof CronOptionsSchema>;
|
|
2500
|
+
declare const ScheduleMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
2501
|
+
type: z.ZodLiteral<"interval">;
|
|
2502
|
+
options: z.ZodObject<{
|
|
2503
|
+
seconds: z.ZodNumber;
|
|
2504
|
+
}, "strip", z.ZodTypeAny, {
|
|
2505
|
+
seconds: number;
|
|
2506
|
+
}, {
|
|
2507
|
+
seconds: number;
|
|
2508
|
+
}>;
|
|
2509
|
+
metadata: z.ZodAny;
|
|
2510
|
+
}, "strip", z.ZodTypeAny, {
|
|
2511
|
+
metadata?: any;
|
|
2512
|
+
options: {
|
|
2513
|
+
seconds: number;
|
|
2514
|
+
};
|
|
2515
|
+
type: "interval";
|
|
2516
|
+
}, {
|
|
2517
|
+
metadata?: any;
|
|
2518
|
+
options: {
|
|
2519
|
+
seconds: number;
|
|
2520
|
+
};
|
|
2521
|
+
type: "interval";
|
|
2522
|
+
}>, z.ZodObject<{
|
|
2523
|
+
type: z.ZodLiteral<"cron">;
|
|
2524
|
+
options: z.ZodObject<{
|
|
2525
|
+
cron: z.ZodString;
|
|
2526
|
+
}, "strip", z.ZodTypeAny, {
|
|
2527
|
+
cron: string;
|
|
2528
|
+
}, {
|
|
2529
|
+
cron: string;
|
|
2530
|
+
}>;
|
|
2531
|
+
metadata: z.ZodAny;
|
|
2532
|
+
}, "strip", z.ZodTypeAny, {
|
|
2533
|
+
metadata?: any;
|
|
2534
|
+
options: {
|
|
2535
|
+
cron: string;
|
|
2536
|
+
};
|
|
2537
|
+
type: "cron";
|
|
2538
|
+
}, {
|
|
2539
|
+
metadata?: any;
|
|
2540
|
+
options: {
|
|
2541
|
+
cron: string;
|
|
2542
|
+
};
|
|
2543
|
+
type: "cron";
|
|
2544
|
+
}>]>;
|
|
2545
|
+
type ScheduleMetadata = z.infer<typeof ScheduleMetadataSchema>;
|
|
2546
|
+
|
|
2547
|
+
declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.extendShape<{
|
|
2548
|
+
id: z.ZodString;
|
|
2549
|
+
client: z.ZodObject<{
|
|
2550
|
+
id: z.ZodString;
|
|
2551
|
+
title: z.ZodString;
|
|
2552
|
+
scopes: z.ZodArray<z.ZodString, "many">;
|
|
2553
|
+
createdAt: z.ZodDate;
|
|
2554
|
+
updatedAt: z.ZodDate;
|
|
2555
|
+
integrationIdentifier: z.ZodString;
|
|
2556
|
+
integrationAuthMethod: z.ZodString;
|
|
2557
|
+
}, "strip", z.ZodTypeAny, {
|
|
2558
|
+
scopes: string[];
|
|
2559
|
+
title: string;
|
|
2560
|
+
id: string;
|
|
2561
|
+
createdAt: Date;
|
|
2562
|
+
updatedAt: Date;
|
|
2563
|
+
integrationIdentifier: string;
|
|
2564
|
+
integrationAuthMethod: string;
|
|
2565
|
+
}, {
|
|
2566
|
+
scopes: string[];
|
|
2567
|
+
title: string;
|
|
2568
|
+
id: string;
|
|
2569
|
+
createdAt: Date;
|
|
2570
|
+
updatedAt: Date;
|
|
2571
|
+
integrationIdentifier: string;
|
|
2572
|
+
integrationAuthMethod: string;
|
|
2573
|
+
}>;
|
|
2574
|
+
authorizationUrl: z.ZodString;
|
|
2575
|
+
}, {
|
|
2576
|
+
type: z.ZodLiteral<"DEVELOPER">;
|
|
2577
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2578
|
+
type: "DEVELOPER";
|
|
2579
|
+
id: string;
|
|
2580
|
+
client: {
|
|
2581
|
+
scopes: string[];
|
|
2582
|
+
title: string;
|
|
2583
|
+
id: string;
|
|
2584
|
+
createdAt: Date;
|
|
2585
|
+
updatedAt: Date;
|
|
2586
|
+
integrationIdentifier: string;
|
|
2587
|
+
integrationAuthMethod: string;
|
|
2588
|
+
};
|
|
2589
|
+
authorizationUrl: string;
|
|
2590
|
+
}, {
|
|
2591
|
+
type: "DEVELOPER";
|
|
2592
|
+
id: string;
|
|
2593
|
+
client: {
|
|
2594
|
+
scopes: string[];
|
|
2595
|
+
title: string;
|
|
2596
|
+
id: string;
|
|
2597
|
+
createdAt: Date;
|
|
2598
|
+
updatedAt: Date;
|
|
2599
|
+
integrationIdentifier: string;
|
|
2600
|
+
integrationAuthMethod: string;
|
|
2601
|
+
};
|
|
2602
|
+
authorizationUrl: string;
|
|
2603
|
+
}>, z.ZodObject<z.extendShape<{
|
|
2604
|
+
id: z.ZodString;
|
|
2605
|
+
client: z.ZodObject<{
|
|
2606
|
+
id: z.ZodString;
|
|
2607
|
+
title: z.ZodString;
|
|
2608
|
+
scopes: z.ZodArray<z.ZodString, "many">;
|
|
2609
|
+
createdAt: z.ZodDate;
|
|
2610
|
+
updatedAt: z.ZodDate;
|
|
2611
|
+
integrationIdentifier: z.ZodString;
|
|
2612
|
+
integrationAuthMethod: z.ZodString;
|
|
2613
|
+
}, "strip", z.ZodTypeAny, {
|
|
2614
|
+
scopes: string[];
|
|
2615
|
+
title: string;
|
|
2616
|
+
id: string;
|
|
2617
|
+
createdAt: Date;
|
|
2618
|
+
updatedAt: Date;
|
|
2619
|
+
integrationIdentifier: string;
|
|
2620
|
+
integrationAuthMethod: string;
|
|
2621
|
+
}, {
|
|
2622
|
+
scopes: string[];
|
|
2623
|
+
title: string;
|
|
2624
|
+
id: string;
|
|
2625
|
+
createdAt: Date;
|
|
2626
|
+
updatedAt: Date;
|
|
2627
|
+
integrationIdentifier: string;
|
|
2628
|
+
integrationAuthMethod: string;
|
|
2629
|
+
}>;
|
|
2630
|
+
authorizationUrl: z.ZodString;
|
|
2631
|
+
}, {
|
|
2632
|
+
type: z.ZodLiteral<"EXTERNAL">;
|
|
2633
|
+
account: z.ZodObject<{
|
|
2634
|
+
id: z.ZodString;
|
|
2635
|
+
metadata: z.ZodAny;
|
|
2636
|
+
}, "strip", z.ZodTypeAny, {
|
|
2637
|
+
metadata?: any;
|
|
2638
|
+
id: string;
|
|
2639
|
+
}, {
|
|
2640
|
+
metadata?: any;
|
|
2641
|
+
id: string;
|
|
2642
|
+
}>;
|
|
2643
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2644
|
+
type: "EXTERNAL";
|
|
2645
|
+
id: string;
|
|
2646
|
+
account: {
|
|
2647
|
+
metadata?: any;
|
|
2648
|
+
id: string;
|
|
2649
|
+
};
|
|
2650
|
+
client: {
|
|
2651
|
+
scopes: string[];
|
|
2652
|
+
title: string;
|
|
2653
|
+
id: string;
|
|
2654
|
+
createdAt: Date;
|
|
2655
|
+
updatedAt: Date;
|
|
2656
|
+
integrationIdentifier: string;
|
|
2657
|
+
integrationAuthMethod: string;
|
|
2658
|
+
};
|
|
2659
|
+
authorizationUrl: string;
|
|
2660
|
+
}, {
|
|
2661
|
+
type: "EXTERNAL";
|
|
2662
|
+
id: string;
|
|
2663
|
+
account: {
|
|
2664
|
+
metadata?: any;
|
|
2665
|
+
id: string;
|
|
2666
|
+
};
|
|
2667
|
+
client: {
|
|
2668
|
+
scopes: string[];
|
|
2669
|
+
title: string;
|
|
2670
|
+
id: string;
|
|
2671
|
+
createdAt: Date;
|
|
2672
|
+
updatedAt: Date;
|
|
2673
|
+
integrationIdentifier: string;
|
|
2674
|
+
integrationAuthMethod: string;
|
|
2675
|
+
};
|
|
2676
|
+
authorizationUrl: string;
|
|
2677
|
+
}>]>;
|
|
2678
|
+
type MissingConnectionNotificationPayload = z.infer<typeof MissingConnectionNotificationPayloadSchema>;
|
|
2679
|
+
declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<z.extendShape<{
|
|
2680
|
+
id: z.ZodString;
|
|
2681
|
+
client: z.ZodObject<{
|
|
2682
|
+
id: z.ZodString;
|
|
2683
|
+
title: z.ZodString;
|
|
2684
|
+
scopes: z.ZodArray<z.ZodString, "many">;
|
|
2685
|
+
createdAt: z.ZodDate;
|
|
2686
|
+
updatedAt: z.ZodDate;
|
|
2687
|
+
integrationIdentifier: z.ZodString;
|
|
2688
|
+
integrationAuthMethod: z.ZodString;
|
|
2689
|
+
}, "strip", z.ZodTypeAny, {
|
|
2690
|
+
scopes: string[];
|
|
2691
|
+
title: string;
|
|
2692
|
+
id: string;
|
|
2693
|
+
createdAt: Date;
|
|
2694
|
+
updatedAt: Date;
|
|
2695
|
+
integrationIdentifier: string;
|
|
2696
|
+
integrationAuthMethod: string;
|
|
2697
|
+
}, {
|
|
2698
|
+
scopes: string[];
|
|
2699
|
+
title: string;
|
|
2700
|
+
id: string;
|
|
2701
|
+
createdAt: Date;
|
|
2702
|
+
updatedAt: Date;
|
|
2703
|
+
integrationIdentifier: string;
|
|
2704
|
+
integrationAuthMethod: string;
|
|
2705
|
+
}>;
|
|
2706
|
+
expiresAt: z.ZodDate;
|
|
2707
|
+
}, {
|
|
2708
|
+
type: z.ZodLiteral<"DEVELOPER">;
|
|
2709
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2710
|
+
type: "DEVELOPER";
|
|
2711
|
+
id: string;
|
|
2712
|
+
client: {
|
|
2713
|
+
scopes: string[];
|
|
2714
|
+
title: string;
|
|
2715
|
+
id: string;
|
|
2716
|
+
createdAt: Date;
|
|
2717
|
+
updatedAt: Date;
|
|
2718
|
+
integrationIdentifier: string;
|
|
2719
|
+
integrationAuthMethod: string;
|
|
2720
|
+
};
|
|
2721
|
+
expiresAt: Date;
|
|
2722
|
+
}, {
|
|
2723
|
+
type: "DEVELOPER";
|
|
2724
|
+
id: string;
|
|
2725
|
+
client: {
|
|
2726
|
+
scopes: string[];
|
|
2727
|
+
title: string;
|
|
2728
|
+
id: string;
|
|
2729
|
+
createdAt: Date;
|
|
2730
|
+
updatedAt: Date;
|
|
2731
|
+
integrationIdentifier: string;
|
|
2732
|
+
integrationAuthMethod: string;
|
|
2733
|
+
};
|
|
2734
|
+
expiresAt: Date;
|
|
2735
|
+
}>, z.ZodObject<z.extendShape<{
|
|
2736
|
+
id: z.ZodString;
|
|
2737
|
+
client: z.ZodObject<{
|
|
2738
|
+
id: z.ZodString;
|
|
2739
|
+
title: z.ZodString;
|
|
2740
|
+
scopes: z.ZodArray<z.ZodString, "many">;
|
|
2741
|
+
createdAt: z.ZodDate;
|
|
2742
|
+
updatedAt: z.ZodDate;
|
|
2743
|
+
integrationIdentifier: z.ZodString;
|
|
2744
|
+
integrationAuthMethod: z.ZodString;
|
|
2745
|
+
}, "strip", z.ZodTypeAny, {
|
|
2746
|
+
scopes: string[];
|
|
2747
|
+
title: string;
|
|
2748
|
+
id: string;
|
|
2749
|
+
createdAt: Date;
|
|
2750
|
+
updatedAt: Date;
|
|
2751
|
+
integrationIdentifier: string;
|
|
2752
|
+
integrationAuthMethod: string;
|
|
2753
|
+
}, {
|
|
2754
|
+
scopes: string[];
|
|
2755
|
+
title: string;
|
|
2756
|
+
id: string;
|
|
2757
|
+
createdAt: Date;
|
|
2758
|
+
updatedAt: Date;
|
|
2759
|
+
integrationIdentifier: string;
|
|
2760
|
+
integrationAuthMethod: string;
|
|
2761
|
+
}>;
|
|
2762
|
+
expiresAt: z.ZodDate;
|
|
2763
|
+
}, {
|
|
2764
|
+
type: z.ZodLiteral<"EXTERNAL">;
|
|
2765
|
+
account: z.ZodObject<{
|
|
2766
|
+
id: z.ZodString;
|
|
2767
|
+
metadata: z.ZodAny;
|
|
2768
|
+
}, "strip", z.ZodTypeAny, {
|
|
2769
|
+
metadata?: any;
|
|
2770
|
+
id: string;
|
|
2771
|
+
}, {
|
|
2772
|
+
metadata?: any;
|
|
2773
|
+
id: string;
|
|
2774
|
+
}>;
|
|
2775
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2776
|
+
type: "EXTERNAL";
|
|
2777
|
+
id: string;
|
|
2778
|
+
account: {
|
|
2779
|
+
metadata?: any;
|
|
2780
|
+
id: string;
|
|
2781
|
+
};
|
|
2782
|
+
client: {
|
|
2783
|
+
scopes: string[];
|
|
2784
|
+
title: string;
|
|
2785
|
+
id: string;
|
|
2786
|
+
createdAt: Date;
|
|
2787
|
+
updatedAt: Date;
|
|
2788
|
+
integrationIdentifier: string;
|
|
2789
|
+
integrationAuthMethod: string;
|
|
2790
|
+
};
|
|
2791
|
+
expiresAt: Date;
|
|
2792
|
+
}, {
|
|
2793
|
+
type: "EXTERNAL";
|
|
2794
|
+
id: string;
|
|
2795
|
+
account: {
|
|
2796
|
+
metadata?: any;
|
|
2797
|
+
id: string;
|
|
2798
|
+
};
|
|
2799
|
+
client: {
|
|
2800
|
+
scopes: string[];
|
|
2801
|
+
title: string;
|
|
2802
|
+
id: string;
|
|
2803
|
+
createdAt: Date;
|
|
2804
|
+
updatedAt: Date;
|
|
2805
|
+
integrationIdentifier: string;
|
|
2806
|
+
integrationAuthMethod: string;
|
|
2807
|
+
};
|
|
2808
|
+
expiresAt: Date;
|
|
2809
|
+
}>]>;
|
|
2810
|
+
type MissingConnectionResolvedNotificationPayload = z.infer<typeof MissingConnectionResolvedNotificationPayloadSchema>;
|
|
2811
|
+
|
|
2812
|
+
type ApiClientOptions = {
|
|
2813
|
+
apiKey?: string;
|
|
2814
|
+
apiUrl?: string;
|
|
2815
|
+
logLevel?: LogLevel;
|
|
446
2816
|
};
|
|
447
|
-
type
|
|
2817
|
+
type EndpointRecord = {
|
|
2818
|
+
id: string;
|
|
448
2819
|
name: string;
|
|
449
|
-
|
|
450
|
-
|
|
2820
|
+
url: string;
|
|
2821
|
+
};
|
|
2822
|
+
declare class ApiClient {
|
|
2823
|
+
#private;
|
|
2824
|
+
constructor(options: ApiClientOptions);
|
|
2825
|
+
registerEndpoint(options: {
|
|
2826
|
+
url: string;
|
|
2827
|
+
name: string;
|
|
2828
|
+
}): Promise<EndpointRecord>;
|
|
2829
|
+
createRun(params: CreateRunBody): Promise<{
|
|
2830
|
+
data: {
|
|
2831
|
+
id: string;
|
|
2832
|
+
};
|
|
2833
|
+
ok: true;
|
|
2834
|
+
} | {
|
|
2835
|
+
error: string;
|
|
2836
|
+
ok: false;
|
|
2837
|
+
}>;
|
|
2838
|
+
runTask(runId: string, task: RunTaskBodyInput): Promise<{
|
|
2839
|
+
error?: string | null | undefined;
|
|
2840
|
+
params?: DeserializedJson | undefined;
|
|
2841
|
+
icon?: string | null | undefined;
|
|
2842
|
+
style?: {
|
|
2843
|
+
variant?: string | undefined;
|
|
2844
|
+
style: "normal" | "minimal";
|
|
2845
|
+
} | null | undefined;
|
|
2846
|
+
startedAt?: Date | null | undefined;
|
|
2847
|
+
completedAt?: Date | null | undefined;
|
|
2848
|
+
delayUntil?: Date | null | undefined;
|
|
2849
|
+
description?: string | null | undefined;
|
|
2850
|
+
properties?: {
|
|
2851
|
+
url?: string | undefined;
|
|
2852
|
+
label: string;
|
|
2853
|
+
text: string;
|
|
2854
|
+
}[] | null | undefined;
|
|
2855
|
+
output?: DeserializedJson | undefined;
|
|
2856
|
+
parentId?: string | null | undefined;
|
|
2857
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
2858
|
+
id: string;
|
|
2859
|
+
name: string;
|
|
2860
|
+
noop: boolean;
|
|
2861
|
+
idempotencyKey: string;
|
|
2862
|
+
}>;
|
|
2863
|
+
completeTask(runId: string, id: string, task: CompleteTaskBodyInput): Promise<{
|
|
2864
|
+
error?: string | null | undefined;
|
|
2865
|
+
params?: DeserializedJson | undefined;
|
|
2866
|
+
icon?: string | null | undefined;
|
|
2867
|
+
style?: {
|
|
2868
|
+
variant?: string | undefined;
|
|
2869
|
+
style: "normal" | "minimal";
|
|
2870
|
+
} | null | undefined;
|
|
2871
|
+
startedAt?: Date | null | undefined;
|
|
2872
|
+
completedAt?: Date | null | undefined;
|
|
2873
|
+
delayUntil?: Date | null | undefined;
|
|
2874
|
+
description?: string | null | undefined;
|
|
2875
|
+
properties?: {
|
|
2876
|
+
url?: string | undefined;
|
|
2877
|
+
label: string;
|
|
2878
|
+
text: string;
|
|
2879
|
+
}[] | null | undefined;
|
|
2880
|
+
output?: DeserializedJson | undefined;
|
|
2881
|
+
parentId?: string | null | undefined;
|
|
2882
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
2883
|
+
id: string;
|
|
2884
|
+
name: string;
|
|
2885
|
+
noop: boolean;
|
|
2886
|
+
idempotencyKey: string;
|
|
2887
|
+
}>;
|
|
2888
|
+
sendEvent(event: SendEvent, options?: SendEventOptions): Promise<{
|
|
2889
|
+
context?: DeserializedJson | undefined;
|
|
2890
|
+
deliverAt?: Date | null | undefined;
|
|
2891
|
+
deliveredAt?: Date | null | undefined;
|
|
2892
|
+
id: string;
|
|
2893
|
+
name: string;
|
|
2894
|
+
payload: DeserializedJson;
|
|
2895
|
+
timestamp: Date;
|
|
2896
|
+
}>;
|
|
2897
|
+
updateSource(client: string, key: string, source: UpdateTriggerSourceBody): Promise<TriggerSource>;
|
|
2898
|
+
registerTrigger(client: string, id: string, key: string, payload: RegisterTriggerBody): Promise<RegisterSourceEvent>;
|
|
2899
|
+
registerSchedule(client: string, id: string, key: string, payload: ScheduleMetadata): Promise<{
|
|
2900
|
+
metadata?: any;
|
|
2901
|
+
id: string;
|
|
2902
|
+
schedule: {
|
|
2903
|
+
metadata?: any;
|
|
2904
|
+
options: {
|
|
2905
|
+
cron: string;
|
|
2906
|
+
};
|
|
2907
|
+
type: "cron";
|
|
2908
|
+
} | {
|
|
2909
|
+
metadata?: any;
|
|
2910
|
+
options: {
|
|
2911
|
+
seconds: number;
|
|
2912
|
+
};
|
|
2913
|
+
type: "interval";
|
|
2914
|
+
};
|
|
2915
|
+
active: boolean;
|
|
2916
|
+
}>;
|
|
2917
|
+
unregisterSchedule(client: string, id: string, key: string): Promise<{
|
|
2918
|
+
ok: boolean;
|
|
2919
|
+
}>;
|
|
2920
|
+
getAuth(client: string, id: string): Promise<{
|
|
2921
|
+
scopes?: string[] | undefined;
|
|
2922
|
+
additionalFields?: Record<string, string> | undefined;
|
|
2923
|
+
type: "oauth2";
|
|
2924
|
+
accessToken: string;
|
|
2925
|
+
} | undefined>;
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
interface TriggerContext {
|
|
2929
|
+
job: {
|
|
2930
|
+
id: string;
|
|
2931
|
+
version: string;
|
|
2932
|
+
};
|
|
2933
|
+
environment: {
|
|
2934
|
+
slug: string;
|
|
2935
|
+
id: string;
|
|
2936
|
+
type: RuntimeEnvironmentType;
|
|
2937
|
+
};
|
|
2938
|
+
organization: {
|
|
2939
|
+
slug: string;
|
|
2940
|
+
id: string;
|
|
2941
|
+
title: string;
|
|
2942
|
+
};
|
|
2943
|
+
run: {
|
|
2944
|
+
id: string;
|
|
2945
|
+
isTest: boolean;
|
|
2946
|
+
startedAt: Date;
|
|
2947
|
+
};
|
|
2948
|
+
event: {
|
|
2949
|
+
id: string;
|
|
2950
|
+
name: string;
|
|
2951
|
+
context: any;
|
|
2952
|
+
timestamp: Date;
|
|
2953
|
+
};
|
|
2954
|
+
account?: {
|
|
2955
|
+
id: string;
|
|
2956
|
+
metadata?: any;
|
|
2957
|
+
};
|
|
2958
|
+
}
|
|
2959
|
+
interface TriggerPreprocessContext {
|
|
2960
|
+
job: {
|
|
2961
|
+
id: string;
|
|
2962
|
+
version: string;
|
|
2963
|
+
};
|
|
2964
|
+
environment: {
|
|
2965
|
+
slug: string;
|
|
2966
|
+
id: string;
|
|
2967
|
+
type: RuntimeEnvironmentType;
|
|
2968
|
+
};
|
|
2969
|
+
organization: {
|
|
2970
|
+
slug: string;
|
|
2971
|
+
id: string;
|
|
2972
|
+
title: string;
|
|
2973
|
+
};
|
|
2974
|
+
run: {
|
|
2975
|
+
id: string;
|
|
2976
|
+
isTest: boolean;
|
|
2977
|
+
};
|
|
2978
|
+
event: {
|
|
2979
|
+
id: string;
|
|
2980
|
+
name: string;
|
|
2981
|
+
context: any;
|
|
2982
|
+
timestamp: Date;
|
|
2983
|
+
};
|
|
2984
|
+
account?: {
|
|
2985
|
+
id: string;
|
|
2986
|
+
metadata?: any;
|
|
2987
|
+
};
|
|
2988
|
+
}
|
|
2989
|
+
interface TaskLogger {
|
|
2990
|
+
debug(message: string, properties?: Record<string, any>): Promise<void>;
|
|
2991
|
+
info(message: string, properties?: Record<string, any>): Promise<void>;
|
|
2992
|
+
warn(message: string, properties?: Record<string, any>): Promise<void>;
|
|
2993
|
+
error(message: string, properties?: Record<string, any>): Promise<void>;
|
|
2994
|
+
}
|
|
2995
|
+
type PreprocessResults = {
|
|
2996
|
+
abort: boolean;
|
|
2997
|
+
properties: DisplayProperty[];
|
|
451
2998
|
};
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
2999
|
+
type TriggerEventType<TTrigger extends Trigger<any>> = TTrigger extends Trigger<infer TEventSpec> ? ReturnType<TEventSpec["parsePayload"]> : never;
|
|
3000
|
+
interface Trigger<TEventSpec extends EventSpecification<any>> {
|
|
3001
|
+
event: TEventSpec;
|
|
3002
|
+
toJSON(): TriggerMetadata;
|
|
3003
|
+
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<TEventSpec>, any>): void;
|
|
3004
|
+
preprocessRuns: boolean;
|
|
3005
|
+
}
|
|
3006
|
+
interface EventSpecification<TEvent extends any> {
|
|
3007
|
+
name: string;
|
|
3008
|
+
title: string;
|
|
3009
|
+
source: string;
|
|
3010
|
+
icon: string;
|
|
3011
|
+
properties?: DisplayProperty[];
|
|
3012
|
+
schema?: any;
|
|
3013
|
+
examples?: Array<TEvent>;
|
|
459
3014
|
filter?: EventFilter;
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
3015
|
+
parsePayload: (payload: unknown) => TEvent;
|
|
3016
|
+
runProperties?: (payload: TEvent) => DisplayProperty[];
|
|
3017
|
+
}
|
|
3018
|
+
type EventTypeFromSpecification<TEventSpec extends EventSpecification<any>> = TEventSpec extends EventSpecification<infer TEvent> ? TEvent : never;
|
|
3019
|
+
|
|
3020
|
+
type HttpSourceEvent = {
|
|
3021
|
+
url: string;
|
|
3022
|
+
method: string;
|
|
3023
|
+
headers: Record<string, string>;
|
|
3024
|
+
rawBody?: Buffer | null;
|
|
3025
|
+
};
|
|
3026
|
+
type SmtpSourceEvent = {
|
|
3027
|
+
from: string;
|
|
3028
|
+
to: string;
|
|
3029
|
+
subject: string;
|
|
3030
|
+
body: string;
|
|
3031
|
+
};
|
|
3032
|
+
type SqsSourceEvent = {
|
|
3033
|
+
body: string;
|
|
3034
|
+
};
|
|
3035
|
+
type ExternalSourceChannelMap = {
|
|
3036
|
+
HTTP: {
|
|
3037
|
+
event: Request;
|
|
3038
|
+
register: {
|
|
3039
|
+
url: string;
|
|
3040
|
+
};
|
|
463
3041
|
};
|
|
3042
|
+
SMTP: {
|
|
3043
|
+
event: SmtpSourceEvent;
|
|
3044
|
+
register: {};
|
|
3045
|
+
};
|
|
3046
|
+
SQS: {
|
|
3047
|
+
event: SqsSourceEvent;
|
|
3048
|
+
register: {};
|
|
3049
|
+
};
|
|
3050
|
+
};
|
|
3051
|
+
type ChannelNames = keyof ExternalSourceChannelMap;
|
|
3052
|
+
type RegisterFunctionEvent<TChannel extends ChannelNames, TParams extends any> = {
|
|
3053
|
+
events: Array<string>;
|
|
3054
|
+
missingEvents: Array<string>;
|
|
3055
|
+
orphanedEvents: Array<string>;
|
|
3056
|
+
source: {
|
|
3057
|
+
active: boolean;
|
|
3058
|
+
data?: any;
|
|
3059
|
+
secret: string;
|
|
3060
|
+
} & ExternalSourceChannelMap[TChannel]["register"];
|
|
3061
|
+
params: TParams;
|
|
3062
|
+
};
|
|
3063
|
+
type RegisterFunction<TIntegration extends TriggerIntegration<IntegrationClient<any, any>>, TParams extends any, TChannel extends ChannelNames> = (event: RegisterFunctionEvent<TChannel, TParams>, io: IOWithIntegrations<{
|
|
3064
|
+
integration: TIntegration;
|
|
3065
|
+
}>, ctx: TriggerContext) => Promise<UpdateTriggerSourceBody | undefined>;
|
|
3066
|
+
type HandlerEvent<TChannel extends ChannelNames, TParams extends any = any> = {
|
|
3067
|
+
rawEvent: ExternalSourceChannelMap[TChannel]["event"];
|
|
3068
|
+
source: HandleTriggerSource & {
|
|
3069
|
+
params: TParams;
|
|
3070
|
+
};
|
|
3071
|
+
};
|
|
3072
|
+
type HandlerFunction<TChannel extends ChannelNames, TParams extends any> = (event: HandlerEvent<TChannel, TParams>, logger: Logger) => Promise<{
|
|
3073
|
+
events: SendEvent[];
|
|
3074
|
+
response?: NormalizedResponse;
|
|
3075
|
+
} | void>;
|
|
3076
|
+
type KeyFunction<TParams extends any> = (params: TParams) => string;
|
|
3077
|
+
type FilterFunction<TParams extends any> = (params: TParams) => EventFilter;
|
|
3078
|
+
type ExternalSourceOptions<TChannel extends ChannelNames, TIntegration extends TriggerIntegration<IntegrationClient<any, any>>, TParams extends any> = {
|
|
3079
|
+
id: string;
|
|
3080
|
+
version: string;
|
|
3081
|
+
schema: z.Schema<TParams>;
|
|
3082
|
+
integration: TIntegration;
|
|
3083
|
+
register: RegisterFunction<TIntegration, TParams, TChannel>;
|
|
3084
|
+
filter: FilterFunction<TParams>;
|
|
3085
|
+
handler: HandlerFunction<TChannel, TParams>;
|
|
3086
|
+
key: KeyFunction<TParams>;
|
|
3087
|
+
properties?: (params: TParams) => DisplayProperty[];
|
|
3088
|
+
};
|
|
3089
|
+
declare class ExternalSource<TIntegration extends TriggerIntegration<IntegrationClient<any, any>>, TParams extends any, TChannel extends ChannelNames = ChannelNames> {
|
|
3090
|
+
private options;
|
|
3091
|
+
channel: TChannel;
|
|
3092
|
+
constructor(channel: TChannel, options: ExternalSourceOptions<TChannel, TIntegration, TParams>);
|
|
3093
|
+
handle(source: HandleTriggerSource, rawEvent: ExternalSourceChannelMap[TChannel]["event"], logger: Logger): Promise<void | {
|
|
3094
|
+
events: {
|
|
3095
|
+
id?: string | undefined;
|
|
3096
|
+
source?: string | undefined;
|
|
3097
|
+
payload?: any;
|
|
3098
|
+
context?: any;
|
|
3099
|
+
timestamp?: string | undefined;
|
|
3100
|
+
name: string;
|
|
3101
|
+
}[];
|
|
3102
|
+
response?: {
|
|
3103
|
+
headers?: Record<string, string> | undefined;
|
|
3104
|
+
body?: any;
|
|
3105
|
+
status: number;
|
|
3106
|
+
} | undefined;
|
|
3107
|
+
}>;
|
|
3108
|
+
filter(params: TParams): EventFilter;
|
|
3109
|
+
properties(params: TParams): DisplayProperty[];
|
|
3110
|
+
register(params: TParams, registerEvent: RegisterSourceEvent, io: IO, ctx: TriggerContext): Promise<{
|
|
3111
|
+
data?: SerializableJson;
|
|
3112
|
+
secret?: string | undefined;
|
|
3113
|
+
registeredEvents: string[];
|
|
3114
|
+
} | undefined>;
|
|
3115
|
+
key(params: TParams): string;
|
|
3116
|
+
get integration(): TIntegration;
|
|
3117
|
+
get integrationConfig(): {
|
|
3118
|
+
id: string;
|
|
3119
|
+
metadata: {
|
|
3120
|
+
key: string;
|
|
3121
|
+
title: string;
|
|
3122
|
+
icon: string;
|
|
3123
|
+
};
|
|
3124
|
+
};
|
|
3125
|
+
get id(): string;
|
|
3126
|
+
get version(): string;
|
|
3127
|
+
}
|
|
3128
|
+
type ExternalSourceParams<TExternalSource extends ExternalSource<any, any, any>> = TExternalSource extends ExternalSource<any, infer TParams, any> ? TParams : never;
|
|
3129
|
+
type ExternalSourceTriggerOptions<TEventSpecification extends EventSpecification<any>, TEventSource extends ExternalSource<any, any, any>> = {
|
|
3130
|
+
event: TEventSpecification;
|
|
3131
|
+
source: TEventSource;
|
|
3132
|
+
params: ExternalSourceParams<TEventSource>;
|
|
3133
|
+
};
|
|
3134
|
+
declare class ExternalSourceTrigger<TEventSpecification extends EventSpecification<any>, TEventSource extends ExternalSource<any, any, any>> implements Trigger<TEventSpecification> {
|
|
3135
|
+
private options;
|
|
3136
|
+
constructor(options: ExternalSourceTriggerOptions<TEventSpecification, TEventSource>);
|
|
3137
|
+
get event(): TEventSpecification;
|
|
3138
|
+
toJSON(): TriggerMetadata;
|
|
3139
|
+
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<TEventSpecification>, any>): void;
|
|
3140
|
+
get preprocessRuns(): boolean;
|
|
3141
|
+
}
|
|
3142
|
+
declare function omit<T extends Record<string, unknown>, K extends keyof T>(obj: T, key: K): {
|
|
3143
|
+
result: Omit<T, K>;
|
|
3144
|
+
ommited: T[K];
|
|
464
3145
|
};
|
|
465
|
-
declare function webhookEvent<TSchema extends z.ZodTypeAny>(options: TriggerWebhookEventOptions<TSchema>): TriggerEvent<TSchema>;
|
|
466
3146
|
|
|
467
|
-
|
|
468
|
-
|
|
3147
|
+
type DynamicTriggerOptions<TEventSpec extends EventSpecification<any>, TExternalSource extends ExternalSource<any, any, any>> = {
|
|
3148
|
+
id: string;
|
|
3149
|
+
event: TEventSpec;
|
|
3150
|
+
source: TExternalSource;
|
|
3151
|
+
};
|
|
3152
|
+
declare class DynamicTrigger<TEventSpec extends EventSpecification<any>, TExternalSource extends ExternalSource<any, any, any>> implements Trigger<TEventSpec> {
|
|
3153
|
+
#private;
|
|
3154
|
+
source: TExternalSource;
|
|
3155
|
+
constructor(client: TriggerClient, options: DynamicTriggerOptions<TEventSpec, TExternalSource>);
|
|
3156
|
+
toJSON(): TriggerMetadata;
|
|
3157
|
+
get id(): string;
|
|
3158
|
+
get event(): TEventSpec;
|
|
3159
|
+
registeredTriggerForParams(params: ExternalSourceParams<TExternalSource>): RegisterTriggerBody;
|
|
3160
|
+
register(key: string, params: ExternalSourceParams<TExternalSource>): Promise<RegisterSourceEvent>;
|
|
3161
|
+
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<TEventSpec>, any>): void;
|
|
3162
|
+
get preprocessRuns(): boolean;
|
|
3163
|
+
}
|
|
469
3164
|
|
|
470
|
-
type
|
|
3165
|
+
type TriggerClientOptions = {
|
|
471
3166
|
id: string;
|
|
472
|
-
|
|
473
|
-
on: TriggerEvent<TSchema>;
|
|
3167
|
+
url?: string;
|
|
474
3168
|
apiKey?: string;
|
|
475
|
-
|
|
3169
|
+
apiUrl?: string;
|
|
476
3170
|
logLevel?: LogLevel;
|
|
477
|
-
/**
|
|
478
|
-
* The TTL for the trigger in seconds. If the trigger is not run within this time, it will be aborted. Defaults to 3600 seconds (1 hour).
|
|
479
|
-
* @type {number}
|
|
480
|
-
*/
|
|
481
|
-
triggerTTL?: number;
|
|
482
|
-
run: (event: z.infer<TSchema>, ctx: TriggerContext) => Promise<any>;
|
|
483
3171
|
};
|
|
484
|
-
|
|
3172
|
+
type ListenOptions = {
|
|
3173
|
+
url: string;
|
|
3174
|
+
};
|
|
3175
|
+
declare class TriggerClient {
|
|
485
3176
|
#private;
|
|
486
|
-
|
|
487
|
-
|
|
3177
|
+
private _url;
|
|
3178
|
+
id: string;
|
|
3179
|
+
path?: string;
|
|
3180
|
+
constructor(options: TriggerClientOptions);
|
|
3181
|
+
get url(): string;
|
|
3182
|
+
handleRequest(request: Request): Promise<NormalizedResponse>;
|
|
3183
|
+
attach(job: Job<Trigger<any>, any>): void;
|
|
3184
|
+
attachDynamicTrigger(trigger: DynamicTrigger<any, any>): void;
|
|
3185
|
+
attachJobToDynamicTrigger(job: Job<Trigger<any>, any>, trigger: DynamicTrigger<any, any>): void;
|
|
3186
|
+
attachSource(options: {
|
|
3187
|
+
key: string;
|
|
3188
|
+
source: ExternalSource<any, any>;
|
|
3189
|
+
event: EventSpecification<any>;
|
|
3190
|
+
params: any;
|
|
3191
|
+
}): void;
|
|
3192
|
+
attachDynamicSchedule(key: string, job: Job<Trigger<any>, any>): void;
|
|
3193
|
+
registerTrigger(id: string, key: string, options: RegisterTriggerBody): Promise<{
|
|
3194
|
+
dynamicTriggerId?: string | undefined;
|
|
3195
|
+
id: string;
|
|
3196
|
+
source: {
|
|
3197
|
+
data?: DeserializedJson | undefined;
|
|
3198
|
+
params?: any;
|
|
3199
|
+
clientId?: string | undefined;
|
|
3200
|
+
key: string;
|
|
3201
|
+
secret: string;
|
|
3202
|
+
active: boolean;
|
|
3203
|
+
channel: {
|
|
3204
|
+
type: "HTTP";
|
|
3205
|
+
url: string;
|
|
3206
|
+
} | {
|
|
3207
|
+
type: "SMTP";
|
|
3208
|
+
} | {
|
|
3209
|
+
type: "SQS";
|
|
3210
|
+
};
|
|
3211
|
+
};
|
|
3212
|
+
events: string[];
|
|
3213
|
+
missingEvents: string[];
|
|
3214
|
+
orphanedEvents: string[];
|
|
3215
|
+
}>;
|
|
3216
|
+
getAuth(id: string): Promise<{
|
|
3217
|
+
scopes?: string[] | undefined;
|
|
3218
|
+
additionalFields?: Record<string, string> | undefined;
|
|
3219
|
+
type: "oauth2";
|
|
3220
|
+
accessToken: string;
|
|
3221
|
+
} | undefined>;
|
|
3222
|
+
sendEvent(event: SendEvent, options?: SendEventOptions): Promise<{
|
|
3223
|
+
context?: DeserializedJson | undefined;
|
|
3224
|
+
deliverAt?: Date | null | undefined;
|
|
3225
|
+
deliveredAt?: Date | null | undefined;
|
|
3226
|
+
id: string;
|
|
3227
|
+
name: string;
|
|
3228
|
+
payload: DeserializedJson;
|
|
3229
|
+
timestamp: Date;
|
|
3230
|
+
}>;
|
|
3231
|
+
registerSchedule(id: string, key: string, schedule: ScheduleMetadata): Promise<{
|
|
3232
|
+
metadata?: any;
|
|
3233
|
+
id: string;
|
|
3234
|
+
schedule: {
|
|
3235
|
+
metadata?: any;
|
|
3236
|
+
options: {
|
|
3237
|
+
cron: string;
|
|
3238
|
+
};
|
|
3239
|
+
type: "cron";
|
|
3240
|
+
} | {
|
|
3241
|
+
metadata?: any;
|
|
3242
|
+
options: {
|
|
3243
|
+
seconds: number;
|
|
3244
|
+
};
|
|
3245
|
+
type: "interval";
|
|
3246
|
+
};
|
|
3247
|
+
active: boolean;
|
|
3248
|
+
}>;
|
|
3249
|
+
unregisterSchedule(id: string, key: string): Promise<{
|
|
3250
|
+
ok: boolean;
|
|
3251
|
+
}>;
|
|
3252
|
+
authorized(apiKey?: string | null): boolean;
|
|
3253
|
+
apiKey(): string | undefined;
|
|
488
3254
|
listen(): Promise<void>;
|
|
489
|
-
get id(): string;
|
|
490
|
-
get name(): string;
|
|
491
|
-
get endpoint(): string | undefined;
|
|
492
|
-
get on(): TriggerEvent<TSchema>;
|
|
493
3255
|
}
|
|
494
3256
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
3257
|
+
type ScheduledEventSpecification = EventSpecification<ScheduledPayload>;
|
|
3258
|
+
declare class IntervalTrigger implements Trigger<ScheduledEventSpecification> {
|
|
3259
|
+
private options;
|
|
3260
|
+
constructor(options: IntervalOptions);
|
|
3261
|
+
get event(): {
|
|
3262
|
+
name: string;
|
|
3263
|
+
title: string;
|
|
3264
|
+
source: string;
|
|
3265
|
+
icon: string;
|
|
3266
|
+
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3267
|
+
lastTimestamp?: Date | undefined;
|
|
3268
|
+
ts: Date;
|
|
3269
|
+
};
|
|
3270
|
+
properties: {
|
|
3271
|
+
label: string;
|
|
3272
|
+
text: string;
|
|
3273
|
+
}[];
|
|
3274
|
+
};
|
|
3275
|
+
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<ScheduledEventSpecification>, any>): void;
|
|
3276
|
+
get preprocessRuns(): boolean;
|
|
3277
|
+
toJSON(): TriggerMetadata;
|
|
3278
|
+
}
|
|
3279
|
+
declare function intervalTrigger(options: IntervalOptions): IntervalTrigger;
|
|
3280
|
+
declare class CronTrigger implements Trigger<ScheduledEventSpecification> {
|
|
3281
|
+
private options;
|
|
3282
|
+
constructor(options: CronOptions);
|
|
3283
|
+
get event(): {
|
|
3284
|
+
name: string;
|
|
3285
|
+
title: string;
|
|
3286
|
+
source: string;
|
|
3287
|
+
icon: string;
|
|
3288
|
+
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3289
|
+
lastTimestamp?: Date | undefined;
|
|
3290
|
+
ts: Date;
|
|
3291
|
+
};
|
|
3292
|
+
properties: {
|
|
3293
|
+
label: string;
|
|
3294
|
+
text: string;
|
|
3295
|
+
}[];
|
|
3296
|
+
};
|
|
3297
|
+
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<ScheduledEventSpecification>, any>): void;
|
|
3298
|
+
get preprocessRuns(): boolean;
|
|
3299
|
+
toJSON(): TriggerMetadata;
|
|
3300
|
+
}
|
|
3301
|
+
declare function cronTrigger(options: CronOptions): CronTrigger;
|
|
3302
|
+
type DynamicIntervalOptions = {
|
|
3303
|
+
id: string;
|
|
3304
|
+
};
|
|
3305
|
+
declare class DynamicSchedule implements Trigger<ScheduledEventSpecification> {
|
|
3306
|
+
private client;
|
|
3307
|
+
private options;
|
|
3308
|
+
constructor(client: TriggerClient, options: DynamicIntervalOptions);
|
|
3309
|
+
get id(): string;
|
|
3310
|
+
get event(): {
|
|
3311
|
+
name: string;
|
|
3312
|
+
title: string;
|
|
3313
|
+
source: string;
|
|
3314
|
+
icon: string;
|
|
3315
|
+
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3316
|
+
lastTimestamp?: Date | undefined;
|
|
3317
|
+
ts: Date;
|
|
3318
|
+
};
|
|
3319
|
+
};
|
|
3320
|
+
register(key: string, metadata: ScheduleMetadata): Promise<{
|
|
3321
|
+
metadata?: any;
|
|
3322
|
+
id: string;
|
|
3323
|
+
schedule: {
|
|
3324
|
+
metadata?: any;
|
|
3325
|
+
options: {
|
|
3326
|
+
cron: string;
|
|
3327
|
+
};
|
|
3328
|
+
type: "cron";
|
|
519
3329
|
} | {
|
|
520
|
-
|
|
3330
|
+
metadata?: any;
|
|
3331
|
+
options: {
|
|
3332
|
+
seconds: number;
|
|
3333
|
+
};
|
|
3334
|
+
type: "interval";
|
|
3335
|
+
};
|
|
3336
|
+
active: boolean;
|
|
3337
|
+
}>;
|
|
3338
|
+
unregister(key: string): Promise<{
|
|
3339
|
+
ok: boolean;
|
|
3340
|
+
}>;
|
|
3341
|
+
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<ScheduledEventSpecification>, any>): void;
|
|
3342
|
+
get preprocessRuns(): boolean;
|
|
3343
|
+
toJSON(): TriggerMetadata;
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3346
|
+
declare class ResumeWithTask {
|
|
3347
|
+
task: ServerTask;
|
|
3348
|
+
constructor(task: ServerTask);
|
|
3349
|
+
}
|
|
3350
|
+
type IOTask = ServerTask;
|
|
3351
|
+
type IOOptions = {
|
|
3352
|
+
id: string;
|
|
3353
|
+
apiClient: ApiClient;
|
|
3354
|
+
client: TriggerClient;
|
|
3355
|
+
context: TriggerContext;
|
|
3356
|
+
logger?: Logger;
|
|
3357
|
+
logLevel?: LogLevel;
|
|
3358
|
+
cachedTasks?: Array<CachedTask>;
|
|
3359
|
+
};
|
|
3360
|
+
declare class IO {
|
|
3361
|
+
#private;
|
|
3362
|
+
private _id;
|
|
3363
|
+
private _apiClient;
|
|
3364
|
+
private _triggerClient;
|
|
3365
|
+
private _logger;
|
|
3366
|
+
private _cachedTasks;
|
|
3367
|
+
private _taskStorage;
|
|
3368
|
+
private _context;
|
|
3369
|
+
constructor(options: IOOptions);
|
|
3370
|
+
get logger(): IOLogger;
|
|
3371
|
+
wait(key: string | any[], seconds: number): Promise<void>;
|
|
3372
|
+
sendEvent(key: string | any[], event: SendEvent, options?: SendEventOptions): Promise<{
|
|
3373
|
+
context?: DeserializedJson | undefined;
|
|
3374
|
+
deliverAt?: Date | null | undefined;
|
|
3375
|
+
deliveredAt?: Date | null | undefined;
|
|
3376
|
+
id: string;
|
|
3377
|
+
name: string;
|
|
3378
|
+
payload: DeserializedJson;
|
|
3379
|
+
timestamp: Date;
|
|
3380
|
+
}>;
|
|
3381
|
+
updateSource(key: string | any[], options: {
|
|
3382
|
+
key: string;
|
|
3383
|
+
} & UpdateTriggerSourceBody): Promise<{
|
|
3384
|
+
key: string;
|
|
3385
|
+
id: string;
|
|
3386
|
+
}>;
|
|
3387
|
+
registerInterval(key: string | any[], dynamicSchedule: DynamicSchedule, id: string, options: IntervalOptions): Promise<{
|
|
3388
|
+
metadata?: any;
|
|
3389
|
+
id: string;
|
|
3390
|
+
schedule: {
|
|
3391
|
+
metadata?: any;
|
|
3392
|
+
options: {
|
|
3393
|
+
cron: string;
|
|
3394
|
+
};
|
|
3395
|
+
type: "cron";
|
|
521
3396
|
} | {
|
|
522
|
-
|
|
3397
|
+
metadata?: any;
|
|
3398
|
+
options: {
|
|
3399
|
+
seconds: number;
|
|
3400
|
+
};
|
|
3401
|
+
type: "interval";
|
|
3402
|
+
};
|
|
3403
|
+
active: boolean;
|
|
3404
|
+
}>;
|
|
3405
|
+
unregisterInterval(key: string | any[], dynamicSchedule: DynamicSchedule, id: string): Promise<{
|
|
3406
|
+
ok: boolean;
|
|
3407
|
+
}>;
|
|
3408
|
+
registerCron(key: string | any[], dynamicSchedule: DynamicSchedule, id: string, options: CronOptions): Promise<{
|
|
3409
|
+
metadata?: any;
|
|
3410
|
+
id: string;
|
|
3411
|
+
schedule: {
|
|
3412
|
+
metadata?: any;
|
|
3413
|
+
options: {
|
|
3414
|
+
cron: string;
|
|
3415
|
+
};
|
|
3416
|
+
type: "cron";
|
|
523
3417
|
} | {
|
|
524
|
-
|
|
3418
|
+
metadata?: any;
|
|
3419
|
+
options: {
|
|
3420
|
+
seconds: number;
|
|
3421
|
+
};
|
|
3422
|
+
type: "interval";
|
|
3423
|
+
};
|
|
3424
|
+
active: boolean;
|
|
3425
|
+
}>;
|
|
3426
|
+
unregisterCron(key: string | any[], dynamicSchedule: DynamicSchedule, id: string): Promise<{
|
|
3427
|
+
ok: boolean;
|
|
3428
|
+
}>;
|
|
3429
|
+
registerTrigger<TTrigger extends DynamicTrigger<EventSpecification<any>, ExternalSource<any, any, any>>>(key: string | any[], trigger: TTrigger, id: string, params: ExternalSourceParams<TTrigger["source"]>): Promise<{
|
|
3430
|
+
id: string;
|
|
3431
|
+
key: string;
|
|
3432
|
+
} | undefined>;
|
|
3433
|
+
getAuth(key: string | any[], clientId?: string): Promise<ConnectionAuth | undefined>;
|
|
3434
|
+
runTask<T extends SerializableJson | void = void>(key: string | any[], options: RunTaskOptions, callback: (task: IOTask, io: IO) => Promise<T>): Promise<T>;
|
|
3435
|
+
}
|
|
3436
|
+
type CallbackFunction = (level: "DEBUG" | "INFO" | "WARN" | "ERROR", message: string, properties?: Record<string, any>) => Promise<void>;
|
|
3437
|
+
declare class IOLogger implements TaskLogger {
|
|
3438
|
+
private callback;
|
|
3439
|
+
constructor(callback: CallbackFunction);
|
|
3440
|
+
debug(message: string, properties?: Record<string, any>): Promise<void>;
|
|
3441
|
+
info(message: string, properties?: Record<string, any>): Promise<void>;
|
|
3442
|
+
warn(message: string, properties?: Record<string, any>): Promise<void>;
|
|
3443
|
+
error(message: string, properties?: Record<string, any>): Promise<void>;
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
type ClientFactory<TClient> = (auth: ConnectionAuth) => TClient;
|
|
3447
|
+
interface TriggerIntegration<TIntegrationClient extends IntegrationClient<any, any> = IntegrationClient<any, any>> {
|
|
3448
|
+
client: TIntegrationClient;
|
|
3449
|
+
id: string;
|
|
3450
|
+
metadata: IntegrationMetadata;
|
|
3451
|
+
}
|
|
3452
|
+
type IntegrationClient<TClient, TTasks extends Record<string, AuthenticatedTask<TClient, any, any>>> = {
|
|
3453
|
+
usesLocalAuth: true;
|
|
3454
|
+
client: TClient;
|
|
3455
|
+
tasks?: TTasks;
|
|
3456
|
+
} | {
|
|
3457
|
+
usesLocalAuth: false;
|
|
3458
|
+
clientFactory: ClientFactory<TClient>;
|
|
3459
|
+
tasks?: TTasks;
|
|
3460
|
+
};
|
|
3461
|
+
type AuthenticatedTask<TClient, TParams, TResult> = {
|
|
3462
|
+
run: (params: TParams, client: TClient, task: ServerTask, io: IO) => Promise<TResult>;
|
|
3463
|
+
init: (params: TParams) => RunTaskOptions;
|
|
3464
|
+
};
|
|
3465
|
+
declare function authenticatedTask<TClient, TParams, TResult>(options: {
|
|
3466
|
+
run: (params: TParams, client: TClient, task: ServerTask, io: IO) => Promise<TResult>;
|
|
3467
|
+
init: (params: TParams) => RunTaskOptions;
|
|
3468
|
+
}): AuthenticatedTask<TClient, TParams, TResult>;
|
|
3469
|
+
type ExtractRunFunction<T> = T extends AuthenticatedTask<any, infer TParams, infer TResult> ? (key: string, params: TParams) => Promise<TResult> : never;
|
|
3470
|
+
type ExtractTasks<TTasks extends Record<string, AuthenticatedTask<any, any, any>>> = {
|
|
3471
|
+
[key in keyof TTasks]: ExtractRunFunction<TTasks[key]>;
|
|
3472
|
+
};
|
|
3473
|
+
type ExtractIntegrationClientClient<TIntegrationClient extends IntegrationClient<any, any>> = TIntegrationClient extends {
|
|
3474
|
+
usesLocalAuth: true;
|
|
3475
|
+
client: infer TClient;
|
|
3476
|
+
} ? {
|
|
3477
|
+
client: TClient;
|
|
3478
|
+
} : TIntegrationClient extends {
|
|
3479
|
+
usesLocalAuth: false;
|
|
3480
|
+
clientFactory: ClientFactory<infer TClient>;
|
|
3481
|
+
} ? {
|
|
3482
|
+
client: TClient;
|
|
3483
|
+
} : never;
|
|
3484
|
+
type ExtractIntegrationClient<TIntegrationClient extends IntegrationClient<any, any>> = ExtractIntegrationClientClient<TIntegrationClient> & ExtractTasks<TIntegrationClient["tasks"]>;
|
|
3485
|
+
type ExtractIntegrations<TIntegrations extends Record<string, TriggerIntegration<IntegrationClient<any, any>>>> = {
|
|
3486
|
+
[key in keyof TIntegrations]: ExtractIntegrationClient<TIntegrations[key]["client"]>;
|
|
3487
|
+
};
|
|
3488
|
+
type IOWithIntegrations<TIntegrations extends Record<string, TriggerIntegration<IntegrationClient<any, any>>>> = IO & ExtractIntegrations<TIntegrations>;
|
|
3489
|
+
|
|
3490
|
+
type JobOptions<TTrigger extends Trigger<EventSpecification<any>>, TIntegrations extends Record<string, TriggerIntegration<IntegrationClient<any, any>>> = {}> = {
|
|
3491
|
+
id: string;
|
|
3492
|
+
name: string;
|
|
3493
|
+
version: string;
|
|
3494
|
+
trigger: TTrigger;
|
|
3495
|
+
logLevel?: LogLevel;
|
|
3496
|
+
integrations?: TIntegrations;
|
|
3497
|
+
queue?: QueueOptions | string;
|
|
3498
|
+
startPosition?: "initial" | "latest";
|
|
3499
|
+
enabled?: boolean;
|
|
3500
|
+
run: (event: TriggerEventType<TTrigger>, io: IOWithIntegrations<TIntegrations>, ctx: TriggerContext) => Promise<any>;
|
|
3501
|
+
};
|
|
3502
|
+
declare class Job<TTrigger extends Trigger<EventSpecification<any>>, TIntegrations extends Record<string, TriggerIntegration<IntegrationClient<any, any>>> = {}> {
|
|
3503
|
+
#private;
|
|
3504
|
+
readonly options: JobOptions<TTrigger, TIntegrations>;
|
|
3505
|
+
client: TriggerClient;
|
|
3506
|
+
constructor(client: TriggerClient, options: JobOptions<TTrigger, TIntegrations>);
|
|
3507
|
+
get id(): string;
|
|
3508
|
+
get enabled(): boolean;
|
|
3509
|
+
get name(): string;
|
|
3510
|
+
get trigger(): TTrigger;
|
|
3511
|
+
get version(): string;
|
|
3512
|
+
get integrations(): Record<string, IntegrationConfig>;
|
|
3513
|
+
toJSON(): JobMetadata;
|
|
3514
|
+
}
|
|
3515
|
+
|
|
3516
|
+
type EventTriggerOptions<TEventSpecification extends EventSpecification<any>> = {
|
|
3517
|
+
event: TEventSpecification;
|
|
3518
|
+
name?: string;
|
|
3519
|
+
source?: string;
|
|
3520
|
+
filter?: EventFilter;
|
|
3521
|
+
};
|
|
3522
|
+
declare class EventTrigger<TEventSpecification extends EventSpecification<any>> implements Trigger<TEventSpecification> {
|
|
3523
|
+
#private;
|
|
3524
|
+
constructor(options: EventTriggerOptions<TEventSpecification>);
|
|
3525
|
+
toJSON(): TriggerMetadata;
|
|
3526
|
+
get event(): TEventSpecification;
|
|
3527
|
+
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<TEventSpecification>, any>): void;
|
|
3528
|
+
get preprocessRuns(): boolean;
|
|
3529
|
+
}
|
|
3530
|
+
type TriggerOptions<TEvent> = {
|
|
3531
|
+
name: string;
|
|
3532
|
+
schema?: z.Schema<TEvent>;
|
|
3533
|
+
source?: string;
|
|
3534
|
+
filter?: EventFilter;
|
|
3535
|
+
};
|
|
3536
|
+
declare function eventTrigger<TEvent extends any = any>(options: TriggerOptions<TEvent>): Trigger<EventSpecification<TEvent>>;
|
|
3537
|
+
|
|
3538
|
+
declare function missingConnectionNotification(integrations: Array<TriggerIntegration>): MissingConnectionNotification;
|
|
3539
|
+
declare function missingConnectionResolvedNotification(integrations: Array<TriggerIntegration>): MissingConnectionResolvedNotification;
|
|
3540
|
+
type MissingConnectionNotificationSpecification = EventSpecification<MissingConnectionNotificationPayload>;
|
|
3541
|
+
type MissingConnectionNotificationOptions = {
|
|
3542
|
+
integrations: Array<TriggerIntegration>;
|
|
3543
|
+
};
|
|
3544
|
+
declare class MissingConnectionNotification implements Trigger<MissingConnectionNotificationSpecification> {
|
|
3545
|
+
private options;
|
|
3546
|
+
constructor(options: MissingConnectionNotificationOptions);
|
|
3547
|
+
get event(): {
|
|
3548
|
+
name: string;
|
|
3549
|
+
title: string;
|
|
3550
|
+
source: string;
|
|
3551
|
+
icon: string;
|
|
3552
|
+
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3553
|
+
type: "DEVELOPER";
|
|
3554
|
+
id: string;
|
|
3555
|
+
client: {
|
|
3556
|
+
scopes: string[];
|
|
3557
|
+
title: string;
|
|
3558
|
+
id: string;
|
|
3559
|
+
createdAt: Date;
|
|
3560
|
+
updatedAt: Date;
|
|
3561
|
+
integrationIdentifier: string;
|
|
3562
|
+
integrationAuthMethod: string;
|
|
3563
|
+
};
|
|
3564
|
+
authorizationUrl: string;
|
|
525
3565
|
} | {
|
|
526
|
-
|
|
527
|
-
|
|
3566
|
+
type: "EXTERNAL";
|
|
3567
|
+
id: string;
|
|
3568
|
+
account: {
|
|
3569
|
+
metadata?: any;
|
|
3570
|
+
id: string;
|
|
3571
|
+
};
|
|
3572
|
+
client: {
|
|
3573
|
+
scopes: string[];
|
|
3574
|
+
title: string;
|
|
3575
|
+
id: string;
|
|
3576
|
+
createdAt: Date;
|
|
3577
|
+
updatedAt: Date;
|
|
3578
|
+
integrationIdentifier: string;
|
|
3579
|
+
integrationAuthMethod: string;
|
|
3580
|
+
};
|
|
3581
|
+
authorizationUrl: string;
|
|
3582
|
+
};
|
|
3583
|
+
properties: {
|
|
3584
|
+
label: string;
|
|
3585
|
+
text: string;
|
|
3586
|
+
}[];
|
|
3587
|
+
};
|
|
3588
|
+
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<MissingConnectionNotificationSpecification>, any>): void;
|
|
3589
|
+
get preprocessRuns(): boolean;
|
|
3590
|
+
toJSON(): TriggerMetadata;
|
|
3591
|
+
}
|
|
3592
|
+
type MissingConnectionResolvedNotificationSpecification = EventSpecification<MissingConnectionResolvedNotificationPayload>;
|
|
3593
|
+
declare class MissingConnectionResolvedNotification implements Trigger<MissingConnectionResolvedNotificationSpecification> {
|
|
3594
|
+
private options;
|
|
3595
|
+
constructor(options: MissingConnectionNotificationOptions);
|
|
3596
|
+
get event(): {
|
|
528
3597
|
name: string;
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
3598
|
+
title: string;
|
|
3599
|
+
source: string;
|
|
3600
|
+
icon: string;
|
|
3601
|
+
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3602
|
+
type: "DEVELOPER";
|
|
3603
|
+
id: string;
|
|
3604
|
+
client: {
|
|
3605
|
+
scopes: string[];
|
|
3606
|
+
title: string;
|
|
3607
|
+
id: string;
|
|
3608
|
+
createdAt: Date;
|
|
3609
|
+
updatedAt: Date;
|
|
3610
|
+
integrationIdentifier: string;
|
|
3611
|
+
integrationAuthMethod: string;
|
|
3612
|
+
};
|
|
3613
|
+
expiresAt: Date;
|
|
3614
|
+
} | {
|
|
3615
|
+
type: "EXTERNAL";
|
|
3616
|
+
id: string;
|
|
3617
|
+
account: {
|
|
3618
|
+
metadata?: any;
|
|
3619
|
+
id: string;
|
|
3620
|
+
};
|
|
3621
|
+
client: {
|
|
3622
|
+
scopes: string[];
|
|
3623
|
+
title: string;
|
|
3624
|
+
id: string;
|
|
3625
|
+
createdAt: Date;
|
|
3626
|
+
updatedAt: Date;
|
|
3627
|
+
integrationIdentifier: string;
|
|
3628
|
+
integrationAuthMethod: string;
|
|
3629
|
+
};
|
|
3630
|
+
expiresAt: Date;
|
|
3631
|
+
};
|
|
3632
|
+
properties: {
|
|
3633
|
+
label: string;
|
|
3634
|
+
text: string;
|
|
3635
|
+
}[];
|
|
3636
|
+
};
|
|
3637
|
+
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<MissingConnectionResolvedNotificationSpecification>, any>): void;
|
|
3638
|
+
get preprocessRuns(): boolean;
|
|
3639
|
+
toJSON(): TriggerMetadata;
|
|
3640
|
+
}
|
|
3641
|
+
|
|
535
3642
|
declare function secureString(strings: TemplateStringsArray, ...interpolations: string[]): SecureString;
|
|
536
3643
|
|
|
537
|
-
export {
|
|
3644
|
+
export { AuthenticatedTask, ClientFactory, CronTrigger, DynamicIntervalOptions, DynamicSchedule, DynamicTrigger, DynamicTriggerOptions, EventFilter, EventSpecification, EventTrigger, EventTypeFromSpecification, ExternalSource, ExternalSourceParams, ExternalSourceTrigger, ExternalSourceTriggerOptions, HandlerEvent, HttpSourceEvent, IO, IOLogger, IOOptions, IOTask, IOWithIntegrations, IntegrationClient, IntervalTrigger, Job, JobOptions, ListenOptions, Logger, MissingConnectionNotification, MissingConnectionResolvedNotification, NormalizedRequest, PreprocessResults, ResumeWithTask, SecureString, TaskLogger, Trigger, TriggerClient, TriggerClientOptions, TriggerContext, TriggerEventType, TriggerIntegration, TriggerPreprocessContext, authenticatedTask, cronTrigger, eventTrigger, intervalTrigger, missingConnectionNotification, missingConnectionResolvedNotification, omit, secureString };
|