@trigger.dev/sdk 2.0.0-next.0 → 2.0.0-next.2
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 +713 -280
- package/dist/index.js +704 -432
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
type LogLevel = "log" | "error" | "warn" | "info" | "debug";
|
|
5
5
|
declare class Logger {
|
|
6
6
|
#private;
|
|
7
|
-
constructor(name: string, level?: LogLevel, filteredKeys?: string[]);
|
|
7
|
+
constructor(name: string, level?: LogLevel, filteredKeys?: string[], jsonReplacer?: (key: string, value: unknown) => unknown);
|
|
8
8
|
filter(...keys: string[]): Logger;
|
|
9
9
|
log(...args: any[]): void;
|
|
10
10
|
error(...args: any[]): void;
|
|
@@ -67,57 +67,64 @@ declare const ServerTaskSchema: z.ZodObject<z.extendShape<{
|
|
|
67
67
|
variant?: string | undefined;
|
|
68
68
|
style: "normal" | "minimal";
|
|
69
69
|
}>>>;
|
|
70
|
+
operation: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
70
71
|
}, {
|
|
71
72
|
idempotencyKey: z.ZodString;
|
|
73
|
+
attempts: z.ZodNumber;
|
|
72
74
|
}>, "strip", z.ZodTypeAny, {
|
|
73
|
-
error?: string | null | undefined;
|
|
74
|
-
params?: DeserializedJson | undefined;
|
|
75
75
|
icon?: string | null | undefined;
|
|
76
|
-
style?: {
|
|
77
|
-
variant?: string | undefined;
|
|
78
|
-
style: "normal" | "minimal";
|
|
79
|
-
} | null | undefined;
|
|
80
76
|
startedAt?: Date | null | undefined;
|
|
81
77
|
completedAt?: Date | null | undefined;
|
|
82
78
|
delayUntil?: Date | null | undefined;
|
|
83
79
|
description?: string | null | undefined;
|
|
80
|
+
params?: DeserializedJson | undefined;
|
|
84
81
|
properties?: {
|
|
85
82
|
url?: string | undefined;
|
|
86
83
|
label: string;
|
|
87
84
|
text: string;
|
|
88
85
|
}[] | null | undefined;
|
|
89
86
|
output?: DeserializedJson | undefined;
|
|
87
|
+
error?: string | null | undefined;
|
|
90
88
|
parentId?: string | null | undefined;
|
|
91
|
-
|
|
89
|
+
style?: {
|
|
90
|
+
variant?: string | undefined;
|
|
91
|
+
style: "normal" | "minimal";
|
|
92
|
+
} | null | undefined;
|
|
93
|
+
operation?: string | null | undefined;
|
|
92
94
|
id: string;
|
|
93
95
|
name: string;
|
|
94
96
|
noop: boolean;
|
|
97
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
95
98
|
idempotencyKey: string;
|
|
99
|
+
attempts: number;
|
|
96
100
|
}, {
|
|
97
|
-
error?: string | null | undefined;
|
|
98
|
-
params?: DeserializedJson | undefined;
|
|
99
101
|
icon?: string | null | undefined;
|
|
100
|
-
style?: {
|
|
101
|
-
variant?: string | undefined;
|
|
102
|
-
style: "normal" | "minimal";
|
|
103
|
-
} | null | undefined;
|
|
104
102
|
startedAt?: Date | null | undefined;
|
|
105
103
|
completedAt?: Date | null | undefined;
|
|
106
104
|
delayUntil?: Date | null | undefined;
|
|
107
105
|
description?: string | null | undefined;
|
|
106
|
+
params?: DeserializedJson | undefined;
|
|
108
107
|
properties?: {
|
|
109
108
|
url?: string | undefined;
|
|
110
109
|
label: string;
|
|
111
110
|
text: string;
|
|
112
111
|
}[] | null | undefined;
|
|
113
112
|
output?: DeserializedJson | undefined;
|
|
113
|
+
error?: string | null | undefined;
|
|
114
114
|
parentId?: string | null | undefined;
|
|
115
|
-
|
|
115
|
+
style?: {
|
|
116
|
+
variant?: string | undefined;
|
|
117
|
+
style: "normal" | "minimal";
|
|
118
|
+
} | null | undefined;
|
|
119
|
+
operation?: string | null | undefined;
|
|
116
120
|
id: string;
|
|
117
121
|
name: string;
|
|
118
122
|
noop: boolean;
|
|
123
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
119
124
|
idempotencyKey: string;
|
|
125
|
+
attempts: number;
|
|
120
126
|
}>;
|
|
127
|
+
type ServerTask = z.infer<typeof ServerTaskSchema>;
|
|
121
128
|
declare const CachedTaskSchema: z.ZodObject<{
|
|
122
129
|
id: z.ZodString;
|
|
123
130
|
idempotencyKey: z.ZodString;
|
|
@@ -128,16 +135,16 @@ declare const CachedTaskSchema: z.ZodObject<{
|
|
|
128
135
|
}, "strip", z.ZodTypeAny, {
|
|
129
136
|
output?: DeserializedJson | undefined;
|
|
130
137
|
parentId?: string | null | undefined;
|
|
131
|
-
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
132
138
|
id: string;
|
|
133
139
|
noop: boolean;
|
|
140
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
134
141
|
idempotencyKey: string;
|
|
135
142
|
}, {
|
|
136
143
|
noop?: boolean | undefined;
|
|
137
144
|
output?: DeserializedJson | undefined;
|
|
138
145
|
parentId?: string | null | undefined;
|
|
139
|
-
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
140
146
|
id: string;
|
|
147
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
141
148
|
idempotencyKey: string;
|
|
142
149
|
}>;
|
|
143
150
|
|
|
@@ -167,11 +174,11 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
|
|
|
167
174
|
type: z.ZodLiteral<"HTTP">;
|
|
168
175
|
url: z.ZodString;
|
|
169
176
|
}, "strip", z.ZodTypeAny, {
|
|
170
|
-
type: "HTTP";
|
|
171
177
|
url: string;
|
|
172
|
-
}, {
|
|
173
178
|
type: "HTTP";
|
|
179
|
+
}, {
|
|
174
180
|
url: string;
|
|
181
|
+
type: "HTTP";
|
|
175
182
|
}>, z.ZodObject<{
|
|
176
183
|
type: z.ZodLiteral<"SMTP">;
|
|
177
184
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -187,30 +194,30 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
|
|
|
187
194
|
}>]>;
|
|
188
195
|
clientId: z.ZodOptional<z.ZodString>;
|
|
189
196
|
}, "strip", z.ZodTypeAny, {
|
|
190
|
-
data?: DeserializedJson | undefined;
|
|
191
197
|
params?: any;
|
|
198
|
+
data?: DeserializedJson | undefined;
|
|
192
199
|
clientId?: string | undefined;
|
|
193
200
|
key: string;
|
|
194
201
|
secret: string;
|
|
195
202
|
active: boolean;
|
|
196
203
|
channel: {
|
|
197
|
-
type: "HTTP";
|
|
198
204
|
url: string;
|
|
205
|
+
type: "HTTP";
|
|
199
206
|
} | {
|
|
200
207
|
type: "SMTP";
|
|
201
208
|
} | {
|
|
202
209
|
type: "SQS";
|
|
203
210
|
};
|
|
204
211
|
}, {
|
|
205
|
-
data?: DeserializedJson | undefined;
|
|
206
212
|
params?: any;
|
|
213
|
+
data?: DeserializedJson | undefined;
|
|
207
214
|
clientId?: string | undefined;
|
|
208
215
|
key: string;
|
|
209
216
|
secret: string;
|
|
210
217
|
active: boolean;
|
|
211
218
|
channel: {
|
|
212
|
-
type: "HTTP";
|
|
213
219
|
url: string;
|
|
220
|
+
type: "HTTP";
|
|
214
221
|
} | {
|
|
215
222
|
type: "SMTP";
|
|
216
223
|
} | {
|
|
@@ -225,15 +232,15 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
|
|
|
225
232
|
dynamicTriggerId?: string | undefined;
|
|
226
233
|
id: string;
|
|
227
234
|
source: {
|
|
228
|
-
data?: DeserializedJson | undefined;
|
|
229
235
|
params?: any;
|
|
236
|
+
data?: DeserializedJson | undefined;
|
|
230
237
|
clientId?: string | undefined;
|
|
231
238
|
key: string;
|
|
232
239
|
secret: string;
|
|
233
240
|
active: boolean;
|
|
234
241
|
channel: {
|
|
235
|
-
type: "HTTP";
|
|
236
242
|
url: string;
|
|
243
|
+
type: "HTTP";
|
|
237
244
|
} | {
|
|
238
245
|
type: "SMTP";
|
|
239
246
|
} | {
|
|
@@ -247,15 +254,15 @@ declare const RegisterSourceEventSchema: z.ZodObject<{
|
|
|
247
254
|
dynamicTriggerId?: string | undefined;
|
|
248
255
|
id: string;
|
|
249
256
|
source: {
|
|
250
|
-
data?: DeserializedJson | undefined;
|
|
251
257
|
params?: any;
|
|
258
|
+
data?: DeserializedJson | undefined;
|
|
252
259
|
clientId?: string | undefined;
|
|
253
260
|
key: string;
|
|
254
261
|
secret: string;
|
|
255
262
|
active: boolean;
|
|
256
263
|
channel: {
|
|
257
|
-
type: "HTTP";
|
|
258
264
|
url: string;
|
|
265
|
+
type: "HTTP";
|
|
259
266
|
} | {
|
|
260
267
|
type: "SMTP";
|
|
261
268
|
} | {
|
|
@@ -271,11 +278,11 @@ declare const TriggerSourceSchema: z.ZodObject<{
|
|
|
271
278
|
id: z.ZodString;
|
|
272
279
|
key: z.ZodString;
|
|
273
280
|
}, "strip", z.ZodTypeAny, {
|
|
274
|
-
key: string;
|
|
275
281
|
id: string;
|
|
276
|
-
}, {
|
|
277
282
|
key: string;
|
|
283
|
+
}, {
|
|
278
284
|
id: string;
|
|
285
|
+
key: string;
|
|
279
286
|
}>;
|
|
280
287
|
declare const HandleTriggerSourceSchema: z.ZodObject<{
|
|
281
288
|
key: z.ZodString;
|
|
@@ -283,13 +290,13 @@ declare const HandleTriggerSourceSchema: z.ZodObject<{
|
|
|
283
290
|
data: z.ZodAny;
|
|
284
291
|
params: z.ZodAny;
|
|
285
292
|
}, "strip", z.ZodTypeAny, {
|
|
286
|
-
data?: any;
|
|
287
293
|
params?: any;
|
|
294
|
+
data?: any;
|
|
288
295
|
key: string;
|
|
289
296
|
secret: string;
|
|
290
297
|
}, {
|
|
291
|
-
data?: any;
|
|
292
298
|
params?: any;
|
|
299
|
+
data?: any;
|
|
293
300
|
key: string;
|
|
294
301
|
secret: string;
|
|
295
302
|
}>;
|
|
@@ -330,7 +337,22 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
330
337
|
text: string;
|
|
331
338
|
}>, "many">>;
|
|
332
339
|
schema: z.ZodOptional<z.ZodAny>;
|
|
333
|
-
examples: z.ZodOptional<z.ZodArray<z.
|
|
340
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
341
|
+
id: z.ZodString;
|
|
342
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
343
|
+
name: z.ZodString;
|
|
344
|
+
payload: z.ZodAny;
|
|
345
|
+
}, "strip", z.ZodTypeAny, {
|
|
346
|
+
icon?: string | undefined;
|
|
347
|
+
payload?: any;
|
|
348
|
+
id: string;
|
|
349
|
+
name: string;
|
|
350
|
+
}, {
|
|
351
|
+
icon?: string | undefined;
|
|
352
|
+
payload?: any;
|
|
353
|
+
id: string;
|
|
354
|
+
name: string;
|
|
355
|
+
}>, "many">>;
|
|
334
356
|
}, "strip", z.ZodTypeAny, {
|
|
335
357
|
filter?: EventFilter | undefined;
|
|
336
358
|
properties?: {
|
|
@@ -339,11 +361,16 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
339
361
|
text: string;
|
|
340
362
|
}[] | undefined;
|
|
341
363
|
schema?: any;
|
|
342
|
-
examples?:
|
|
343
|
-
|
|
344
|
-
|
|
364
|
+
examples?: {
|
|
365
|
+
icon?: string | undefined;
|
|
366
|
+
payload?: any;
|
|
367
|
+
id: string;
|
|
368
|
+
name: string;
|
|
369
|
+
}[] | undefined;
|
|
345
370
|
name: string;
|
|
371
|
+
icon: string;
|
|
346
372
|
source: string;
|
|
373
|
+
title: string;
|
|
347
374
|
}, {
|
|
348
375
|
filter?: EventFilter | undefined;
|
|
349
376
|
properties?: {
|
|
@@ -352,21 +379,26 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
352
379
|
text: string;
|
|
353
380
|
}[] | undefined;
|
|
354
381
|
schema?: any;
|
|
355
|
-
examples?:
|
|
356
|
-
|
|
357
|
-
|
|
382
|
+
examples?: {
|
|
383
|
+
icon?: string | undefined;
|
|
384
|
+
payload?: any;
|
|
385
|
+
id: string;
|
|
386
|
+
name: string;
|
|
387
|
+
}[] | undefined;
|
|
358
388
|
name: string;
|
|
389
|
+
icon: string;
|
|
359
390
|
source: string;
|
|
391
|
+
title: string;
|
|
360
392
|
}>;
|
|
361
393
|
trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
362
394
|
type: z.ZodLiteral<"dynamic">;
|
|
363
395
|
id: z.ZodString;
|
|
364
396
|
}, "strip", z.ZodTypeAny, {
|
|
365
|
-
type: "dynamic";
|
|
366
397
|
id: string;
|
|
367
|
-
}, {
|
|
368
398
|
type: "dynamic";
|
|
399
|
+
}, {
|
|
369
400
|
id: string;
|
|
401
|
+
type: "dynamic";
|
|
370
402
|
}>, z.ZodObject<{
|
|
371
403
|
type: z.ZodLiteral<"static">;
|
|
372
404
|
title: z.ZodString;
|
|
@@ -508,32 +540,35 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
508
540
|
integrations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
509
541
|
id: z.ZodString;
|
|
510
542
|
metadata: z.ZodObject<{
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
543
|
+
id: z.ZodString;
|
|
544
|
+
name: z.ZodString;
|
|
545
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
514
546
|
}, "strip", z.ZodTypeAny, {
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
547
|
+
instructions?: string | undefined;
|
|
548
|
+
id: string;
|
|
549
|
+
name: string;
|
|
518
550
|
}, {
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
551
|
+
instructions?: string | undefined;
|
|
552
|
+
id: string;
|
|
553
|
+
name: string;
|
|
522
554
|
}>;
|
|
555
|
+
authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
|
|
523
556
|
}, "strip", z.ZodTypeAny, {
|
|
524
557
|
id: string;
|
|
525
558
|
metadata: {
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
559
|
+
instructions?: string | undefined;
|
|
560
|
+
id: string;
|
|
561
|
+
name: string;
|
|
529
562
|
};
|
|
563
|
+
authSource: "HOSTED" | "LOCAL";
|
|
530
564
|
}, {
|
|
531
565
|
id: string;
|
|
532
566
|
metadata: {
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
567
|
+
instructions?: string | undefined;
|
|
568
|
+
id: string;
|
|
569
|
+
name: string;
|
|
536
570
|
};
|
|
571
|
+
authSource: "HOSTED" | "LOCAL";
|
|
537
572
|
}>>;
|
|
538
573
|
internal: z.ZodDefault<z.ZodBoolean>;
|
|
539
574
|
queue: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -564,16 +599,21 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
564
599
|
text: string;
|
|
565
600
|
}[] | undefined;
|
|
566
601
|
schema?: any;
|
|
567
|
-
examples?:
|
|
568
|
-
|
|
569
|
-
|
|
602
|
+
examples?: {
|
|
603
|
+
icon?: string | undefined;
|
|
604
|
+
payload?: any;
|
|
605
|
+
id: string;
|
|
606
|
+
name: string;
|
|
607
|
+
}[] | undefined;
|
|
570
608
|
name: string;
|
|
609
|
+
icon: string;
|
|
571
610
|
source: string;
|
|
611
|
+
title: string;
|
|
572
612
|
};
|
|
573
613
|
version: string;
|
|
574
614
|
trigger: {
|
|
575
|
-
type: "dynamic";
|
|
576
615
|
id: string;
|
|
616
|
+
type: "dynamic";
|
|
577
617
|
} | {
|
|
578
618
|
properties?: {
|
|
579
619
|
url?: string | undefined;
|
|
@@ -607,10 +647,11 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
607
647
|
integrations: Record<string, {
|
|
608
648
|
id: string;
|
|
609
649
|
metadata: {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
650
|
+
instructions?: string | undefined;
|
|
651
|
+
id: string;
|
|
652
|
+
name: string;
|
|
613
653
|
};
|
|
654
|
+
authSource: "HOSTED" | "LOCAL";
|
|
614
655
|
}>;
|
|
615
656
|
internal: boolean;
|
|
616
657
|
startPosition: "initial" | "latest";
|
|
@@ -632,16 +673,21 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
632
673
|
text: string;
|
|
633
674
|
}[] | undefined;
|
|
634
675
|
schema?: any;
|
|
635
|
-
examples?:
|
|
636
|
-
|
|
637
|
-
|
|
676
|
+
examples?: {
|
|
677
|
+
icon?: string | undefined;
|
|
678
|
+
payload?: any;
|
|
679
|
+
id: string;
|
|
680
|
+
name: string;
|
|
681
|
+
}[] | undefined;
|
|
638
682
|
name: string;
|
|
683
|
+
icon: string;
|
|
639
684
|
source: string;
|
|
685
|
+
title: string;
|
|
640
686
|
};
|
|
641
687
|
version: string;
|
|
642
688
|
trigger: {
|
|
643
|
-
type: "dynamic";
|
|
644
689
|
id: string;
|
|
690
|
+
type: "dynamic";
|
|
645
691
|
} | {
|
|
646
692
|
properties?: {
|
|
647
693
|
url?: string | undefined;
|
|
@@ -675,10 +721,11 @@ declare const JobMetadataSchema: z.ZodObject<{
|
|
|
675
721
|
integrations: Record<string, {
|
|
676
722
|
id: string;
|
|
677
723
|
metadata: {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
724
|
+
instructions?: string | undefined;
|
|
725
|
+
id: string;
|
|
726
|
+
name: string;
|
|
681
727
|
};
|
|
728
|
+
authSource: "HOSTED" | "LOCAL";
|
|
682
729
|
}>;
|
|
683
730
|
startPosition: "initial" | "latest";
|
|
684
731
|
enabled: boolean;
|
|
@@ -750,7 +797,22 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
750
797
|
text: string;
|
|
751
798
|
}>, "many">>;
|
|
752
799
|
schema: z.ZodOptional<z.ZodAny>;
|
|
753
|
-
examples: z.ZodOptional<z.ZodArray<z.
|
|
800
|
+
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
801
|
+
id: z.ZodString;
|
|
802
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
803
|
+
name: z.ZodString;
|
|
804
|
+
payload: z.ZodAny;
|
|
805
|
+
}, "strip", z.ZodTypeAny, {
|
|
806
|
+
icon?: string | undefined;
|
|
807
|
+
payload?: any;
|
|
808
|
+
id: string;
|
|
809
|
+
name: string;
|
|
810
|
+
}, {
|
|
811
|
+
icon?: string | undefined;
|
|
812
|
+
payload?: any;
|
|
813
|
+
id: string;
|
|
814
|
+
name: string;
|
|
815
|
+
}>, "many">>;
|
|
754
816
|
}, "strip", z.ZodTypeAny, {
|
|
755
817
|
filter?: EventFilter | undefined;
|
|
756
818
|
properties?: {
|
|
@@ -759,11 +821,16 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
759
821
|
text: string;
|
|
760
822
|
}[] | undefined;
|
|
761
823
|
schema?: any;
|
|
762
|
-
examples?:
|
|
763
|
-
|
|
764
|
-
|
|
824
|
+
examples?: {
|
|
825
|
+
icon?: string | undefined;
|
|
826
|
+
payload?: any;
|
|
827
|
+
id: string;
|
|
828
|
+
name: string;
|
|
829
|
+
}[] | undefined;
|
|
765
830
|
name: string;
|
|
831
|
+
icon: string;
|
|
766
832
|
source: string;
|
|
833
|
+
title: string;
|
|
767
834
|
}, {
|
|
768
835
|
filter?: EventFilter | undefined;
|
|
769
836
|
properties?: {
|
|
@@ -772,21 +839,26 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
772
839
|
text: string;
|
|
773
840
|
}[] | undefined;
|
|
774
841
|
schema?: any;
|
|
775
|
-
examples?:
|
|
776
|
-
|
|
777
|
-
|
|
842
|
+
examples?: {
|
|
843
|
+
icon?: string | undefined;
|
|
844
|
+
payload?: any;
|
|
845
|
+
id: string;
|
|
846
|
+
name: string;
|
|
847
|
+
}[] | undefined;
|
|
778
848
|
name: string;
|
|
849
|
+
icon: string;
|
|
779
850
|
source: string;
|
|
851
|
+
title: string;
|
|
780
852
|
}>;
|
|
781
853
|
trigger: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
782
854
|
type: z.ZodLiteral<"dynamic">;
|
|
783
855
|
id: z.ZodString;
|
|
784
856
|
}, "strip", z.ZodTypeAny, {
|
|
785
|
-
type: "dynamic";
|
|
786
857
|
id: string;
|
|
787
|
-
}, {
|
|
788
858
|
type: "dynamic";
|
|
859
|
+
}, {
|
|
789
860
|
id: string;
|
|
861
|
+
type: "dynamic";
|
|
790
862
|
}>, z.ZodObject<{
|
|
791
863
|
type: z.ZodLiteral<"static">;
|
|
792
864
|
title: z.ZodString;
|
|
@@ -928,32 +1000,35 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
928
1000
|
integrations: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
929
1001
|
id: z.ZodString;
|
|
930
1002
|
metadata: z.ZodObject<{
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
1003
|
+
id: z.ZodString;
|
|
1004
|
+
name: z.ZodString;
|
|
1005
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
934
1006
|
}, "strip", z.ZodTypeAny, {
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
1007
|
+
instructions?: string | undefined;
|
|
1008
|
+
id: string;
|
|
1009
|
+
name: string;
|
|
938
1010
|
}, {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
1011
|
+
instructions?: string | undefined;
|
|
1012
|
+
id: string;
|
|
1013
|
+
name: string;
|
|
942
1014
|
}>;
|
|
1015
|
+
authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
|
|
943
1016
|
}, "strip", z.ZodTypeAny, {
|
|
944
1017
|
id: string;
|
|
945
1018
|
metadata: {
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
1019
|
+
instructions?: string | undefined;
|
|
1020
|
+
id: string;
|
|
1021
|
+
name: string;
|
|
949
1022
|
};
|
|
1023
|
+
authSource: "HOSTED" | "LOCAL";
|
|
950
1024
|
}, {
|
|
951
1025
|
id: string;
|
|
952
1026
|
metadata: {
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1027
|
+
instructions?: string | undefined;
|
|
1028
|
+
id: string;
|
|
1029
|
+
name: string;
|
|
956
1030
|
};
|
|
1031
|
+
authSource: "HOSTED" | "LOCAL";
|
|
957
1032
|
}>>;
|
|
958
1033
|
internal: z.ZodDefault<z.ZodBoolean>;
|
|
959
1034
|
queue: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -984,16 +1059,21 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
984
1059
|
text: string;
|
|
985
1060
|
}[] | undefined;
|
|
986
1061
|
schema?: any;
|
|
987
|
-
examples?:
|
|
988
|
-
|
|
989
|
-
|
|
1062
|
+
examples?: {
|
|
1063
|
+
icon?: string | undefined;
|
|
1064
|
+
payload?: any;
|
|
1065
|
+
id: string;
|
|
1066
|
+
name: string;
|
|
1067
|
+
}[] | undefined;
|
|
990
1068
|
name: string;
|
|
1069
|
+
icon: string;
|
|
991
1070
|
source: string;
|
|
1071
|
+
title: string;
|
|
992
1072
|
};
|
|
993
1073
|
version: string;
|
|
994
1074
|
trigger: {
|
|
995
|
-
type: "dynamic";
|
|
996
1075
|
id: string;
|
|
1076
|
+
type: "dynamic";
|
|
997
1077
|
} | {
|
|
998
1078
|
properties?: {
|
|
999
1079
|
url?: string | undefined;
|
|
@@ -1027,10 +1107,11 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1027
1107
|
integrations: Record<string, {
|
|
1028
1108
|
id: string;
|
|
1029
1109
|
metadata: {
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1110
|
+
instructions?: string | undefined;
|
|
1111
|
+
id: string;
|
|
1112
|
+
name: string;
|
|
1033
1113
|
};
|
|
1114
|
+
authSource: "HOSTED" | "LOCAL";
|
|
1034
1115
|
}>;
|
|
1035
1116
|
internal: boolean;
|
|
1036
1117
|
startPosition: "initial" | "latest";
|
|
@@ -1052,16 +1133,21 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1052
1133
|
text: string;
|
|
1053
1134
|
}[] | undefined;
|
|
1054
1135
|
schema?: any;
|
|
1055
|
-
examples?:
|
|
1056
|
-
|
|
1057
|
-
|
|
1136
|
+
examples?: {
|
|
1137
|
+
icon?: string | undefined;
|
|
1138
|
+
payload?: any;
|
|
1139
|
+
id: string;
|
|
1140
|
+
name: string;
|
|
1141
|
+
}[] | undefined;
|
|
1058
1142
|
name: string;
|
|
1143
|
+
icon: string;
|
|
1059
1144
|
source: string;
|
|
1145
|
+
title: string;
|
|
1060
1146
|
};
|
|
1061
1147
|
version: string;
|
|
1062
1148
|
trigger: {
|
|
1063
|
-
type: "dynamic";
|
|
1064
1149
|
id: string;
|
|
1150
|
+
type: "dynamic";
|
|
1065
1151
|
} | {
|
|
1066
1152
|
properties?: {
|
|
1067
1153
|
url?: string | undefined;
|
|
@@ -1095,10 +1181,11 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1095
1181
|
integrations: Record<string, {
|
|
1096
1182
|
id: string;
|
|
1097
1183
|
metadata: {
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1184
|
+
instructions?: string | undefined;
|
|
1185
|
+
id: string;
|
|
1186
|
+
name: string;
|
|
1101
1187
|
};
|
|
1188
|
+
authSource: "HOSTED" | "LOCAL";
|
|
1102
1189
|
}>;
|
|
1103
1190
|
startPosition: "initial" | "latest";
|
|
1104
1191
|
enabled: boolean;
|
|
@@ -1172,16 +1259,21 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1172
1259
|
text: string;
|
|
1173
1260
|
}[] | undefined;
|
|
1174
1261
|
schema?: any;
|
|
1175
|
-
examples?:
|
|
1176
|
-
|
|
1177
|
-
|
|
1262
|
+
examples?: {
|
|
1263
|
+
icon?: string | undefined;
|
|
1264
|
+
payload?: any;
|
|
1265
|
+
id: string;
|
|
1266
|
+
name: string;
|
|
1267
|
+
}[] | undefined;
|
|
1178
1268
|
name: string;
|
|
1269
|
+
icon: string;
|
|
1179
1270
|
source: string;
|
|
1271
|
+
title: string;
|
|
1180
1272
|
};
|
|
1181
1273
|
version: string;
|
|
1182
1274
|
trigger: {
|
|
1183
|
-
type: "dynamic";
|
|
1184
1275
|
id: string;
|
|
1276
|
+
type: "dynamic";
|
|
1185
1277
|
} | {
|
|
1186
1278
|
properties?: {
|
|
1187
1279
|
url?: string | undefined;
|
|
@@ -1215,10 +1307,11 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1215
1307
|
integrations: Record<string, {
|
|
1216
1308
|
id: string;
|
|
1217
1309
|
metadata: {
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1310
|
+
instructions?: string | undefined;
|
|
1311
|
+
id: string;
|
|
1312
|
+
name: string;
|
|
1221
1313
|
};
|
|
1314
|
+
authSource: "HOSTED" | "LOCAL";
|
|
1222
1315
|
}>;
|
|
1223
1316
|
internal: boolean;
|
|
1224
1317
|
startPosition: "initial" | "latest";
|
|
@@ -1257,16 +1350,21 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1257
1350
|
text: string;
|
|
1258
1351
|
}[] | undefined;
|
|
1259
1352
|
schema?: any;
|
|
1260
|
-
examples?:
|
|
1261
|
-
|
|
1262
|
-
|
|
1353
|
+
examples?: {
|
|
1354
|
+
icon?: string | undefined;
|
|
1355
|
+
payload?: any;
|
|
1356
|
+
id: string;
|
|
1357
|
+
name: string;
|
|
1358
|
+
}[] | undefined;
|
|
1263
1359
|
name: string;
|
|
1360
|
+
icon: string;
|
|
1264
1361
|
source: string;
|
|
1362
|
+
title: string;
|
|
1265
1363
|
};
|
|
1266
1364
|
version: string;
|
|
1267
1365
|
trigger: {
|
|
1268
|
-
type: "dynamic";
|
|
1269
1366
|
id: string;
|
|
1367
|
+
type: "dynamic";
|
|
1270
1368
|
} | {
|
|
1271
1369
|
properties?: {
|
|
1272
1370
|
url?: string | undefined;
|
|
@@ -1300,10 +1398,11 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1300
1398
|
integrations: Record<string, {
|
|
1301
1399
|
id: string;
|
|
1302
1400
|
metadata: {
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1401
|
+
instructions?: string | undefined;
|
|
1402
|
+
id: string;
|
|
1403
|
+
name: string;
|
|
1306
1404
|
};
|
|
1405
|
+
authSource: "HOSTED" | "LOCAL";
|
|
1307
1406
|
}>;
|
|
1308
1407
|
startPosition: "initial" | "latest";
|
|
1309
1408
|
enabled: boolean;
|
|
@@ -1312,27 +1411,27 @@ declare const CreateRunBodySchema: z.ZodObject<{
|
|
|
1312
1411
|
client: string;
|
|
1313
1412
|
}>;
|
|
1314
1413
|
type CreateRunBody = z.infer<typeof CreateRunBodySchema>;
|
|
1315
|
-
declare const
|
|
1316
|
-
|
|
1414
|
+
declare const RedactStringSchema: z.ZodObject<{
|
|
1415
|
+
__redactedString: z.ZodLiteral<true>;
|
|
1317
1416
|
strings: z.ZodArray<z.ZodString, "many">;
|
|
1318
1417
|
interpolations: z.ZodArray<z.ZodString, "many">;
|
|
1319
1418
|
}, "strip", z.ZodTypeAny, {
|
|
1320
|
-
|
|
1419
|
+
__redactedString: true;
|
|
1321
1420
|
strings: string[];
|
|
1322
1421
|
interpolations: string[];
|
|
1323
1422
|
}, {
|
|
1324
|
-
|
|
1423
|
+
__redactedString: true;
|
|
1325
1424
|
strings: string[];
|
|
1326
1425
|
interpolations: string[];
|
|
1327
1426
|
}>;
|
|
1328
|
-
type
|
|
1329
|
-
type ServerTask = z.output<typeof ServerTaskSchema>;
|
|
1427
|
+
type RedactString = z.infer<typeof RedactStringSchema>;
|
|
1330
1428
|
type CachedTask = z.infer<typeof CachedTaskSchema>;
|
|
1331
1429
|
declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
1332
1430
|
name: z.ZodString;
|
|
1333
1431
|
icon: z.ZodOptional<z.ZodString>;
|
|
1334
1432
|
displayKey: z.ZodOptional<z.ZodString>;
|
|
1335
1433
|
noop: z.ZodDefault<z.ZodBoolean>;
|
|
1434
|
+
operation: z.ZodOptional<z.ZodEnum<["fetch"]>>;
|
|
1336
1435
|
delayUntil: z.ZodOptional<z.ZodDate>;
|
|
1337
1436
|
description: z.ZodOptional<z.ZodString>;
|
|
1338
1437
|
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1348,16 +1447,16 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
|
1348
1447
|
label: string;
|
|
1349
1448
|
text: string;
|
|
1350
1449
|
}>, "many">>;
|
|
1351
|
-
params: z.
|
|
1450
|
+
params: z.ZodAny;
|
|
1352
1451
|
trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1353
1452
|
type: z.ZodLiteral<"dynamic">;
|
|
1354
1453
|
id: z.ZodString;
|
|
1355
1454
|
}, "strip", z.ZodTypeAny, {
|
|
1356
|
-
type: "dynamic";
|
|
1357
1455
|
id: string;
|
|
1358
|
-
}, {
|
|
1359
1456
|
type: "dynamic";
|
|
1457
|
+
}, {
|
|
1360
1458
|
id: string;
|
|
1459
|
+
type: "dynamic";
|
|
1361
1460
|
}>, z.ZodObject<{
|
|
1362
1461
|
type: z.ZodLiteral<"static">;
|
|
1363
1462
|
title: z.ZodString;
|
|
@@ -1514,23 +1613,43 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
|
1514
1613
|
variant?: string | undefined;
|
|
1515
1614
|
style: "normal" | "minimal";
|
|
1516
1615
|
}>>;
|
|
1616
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1617
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1618
|
+
factor: z.ZodOptional<z.ZodNumber>;
|
|
1619
|
+
minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
1620
|
+
maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
1621
|
+
randomize: z.ZodOptional<z.ZodBoolean>;
|
|
1622
|
+
}, "strip", z.ZodTypeAny, {
|
|
1623
|
+
limit?: number | undefined;
|
|
1624
|
+
factor?: number | undefined;
|
|
1625
|
+
minTimeoutInMs?: number | undefined;
|
|
1626
|
+
maxTimeoutInMs?: number | undefined;
|
|
1627
|
+
randomize?: boolean | undefined;
|
|
1628
|
+
}, {
|
|
1629
|
+
limit?: number | undefined;
|
|
1630
|
+
factor?: number | undefined;
|
|
1631
|
+
minTimeoutInMs?: number | undefined;
|
|
1632
|
+
maxTimeoutInMs?: number | undefined;
|
|
1633
|
+
randomize?: boolean | undefined;
|
|
1634
|
+
}>>;
|
|
1517
1635
|
}, "strip", z.ZodTypeAny, {
|
|
1518
|
-
params?: SerializableJson;
|
|
1519
1636
|
icon?: string | undefined;
|
|
1520
|
-
style?: {
|
|
1521
|
-
variant?: string | undefined;
|
|
1522
|
-
style: "normal" | "minimal";
|
|
1523
|
-
} | undefined;
|
|
1524
1637
|
delayUntil?: Date | undefined;
|
|
1525
1638
|
description?: string | undefined;
|
|
1639
|
+
params?: any;
|
|
1526
1640
|
properties?: {
|
|
1527
1641
|
url?: string | undefined;
|
|
1528
1642
|
label: string;
|
|
1529
1643
|
text: string;
|
|
1530
1644
|
}[] | undefined;
|
|
1645
|
+
style?: {
|
|
1646
|
+
variant?: string | undefined;
|
|
1647
|
+
style: "normal" | "minimal";
|
|
1648
|
+
} | undefined;
|
|
1649
|
+
operation?: "fetch" | undefined;
|
|
1531
1650
|
trigger?: {
|
|
1532
|
-
type: "dynamic";
|
|
1533
1651
|
id: string;
|
|
1652
|
+
type: "dynamic";
|
|
1534
1653
|
} | {
|
|
1535
1654
|
properties?: {
|
|
1536
1655
|
url?: string | undefined;
|
|
@@ -1566,26 +1685,34 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
|
1566
1685
|
paths: string[];
|
|
1567
1686
|
} | undefined;
|
|
1568
1687
|
connectionKey?: string | undefined;
|
|
1688
|
+
retry?: {
|
|
1689
|
+
limit?: number | undefined;
|
|
1690
|
+
factor?: number | undefined;
|
|
1691
|
+
minTimeoutInMs?: number | undefined;
|
|
1692
|
+
maxTimeoutInMs?: number | undefined;
|
|
1693
|
+
randomize?: boolean | undefined;
|
|
1694
|
+
} | undefined;
|
|
1569
1695
|
name: string;
|
|
1570
1696
|
noop: boolean;
|
|
1571
1697
|
}, {
|
|
1572
|
-
params?: SerializableJson;
|
|
1573
1698
|
icon?: string | undefined;
|
|
1574
|
-
style?: {
|
|
1575
|
-
variant?: string | undefined;
|
|
1576
|
-
style: "normal" | "minimal";
|
|
1577
|
-
} | undefined;
|
|
1578
1699
|
noop?: boolean | undefined;
|
|
1579
1700
|
delayUntil?: Date | undefined;
|
|
1580
1701
|
description?: string | undefined;
|
|
1702
|
+
params?: any;
|
|
1581
1703
|
properties?: {
|
|
1582
1704
|
url?: string | undefined;
|
|
1583
1705
|
label: string;
|
|
1584
1706
|
text: string;
|
|
1585
1707
|
}[] | undefined;
|
|
1708
|
+
style?: {
|
|
1709
|
+
variant?: string | undefined;
|
|
1710
|
+
style: "normal" | "minimal";
|
|
1711
|
+
} | undefined;
|
|
1712
|
+
operation?: "fetch" | undefined;
|
|
1586
1713
|
trigger?: {
|
|
1587
|
-
type: "dynamic";
|
|
1588
1714
|
id: string;
|
|
1715
|
+
type: "dynamic";
|
|
1589
1716
|
} | {
|
|
1590
1717
|
properties?: {
|
|
1591
1718
|
url?: string | undefined;
|
|
@@ -1621,6 +1748,13 @@ declare const RunTaskOptionsSchema: z.ZodObject<{
|
|
|
1621
1748
|
paths: string[];
|
|
1622
1749
|
} | undefined;
|
|
1623
1750
|
connectionKey?: string | undefined;
|
|
1751
|
+
retry?: {
|
|
1752
|
+
limit?: number | undefined;
|
|
1753
|
+
factor?: number | undefined;
|
|
1754
|
+
minTimeoutInMs?: number | undefined;
|
|
1755
|
+
maxTimeoutInMs?: number | undefined;
|
|
1756
|
+
randomize?: boolean | undefined;
|
|
1757
|
+
} | undefined;
|
|
1624
1758
|
name: string;
|
|
1625
1759
|
}>;
|
|
1626
1760
|
type RunTaskOptions = z.input<typeof RunTaskOptionsSchema>;
|
|
@@ -1629,6 +1763,7 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
|
|
|
1629
1763
|
icon: z.ZodOptional<z.ZodString>;
|
|
1630
1764
|
displayKey: z.ZodOptional<z.ZodString>;
|
|
1631
1765
|
noop: z.ZodDefault<z.ZodBoolean>;
|
|
1766
|
+
operation: z.ZodOptional<z.ZodEnum<["fetch"]>>;
|
|
1632
1767
|
delayUntil: z.ZodOptional<z.ZodDate>;
|
|
1633
1768
|
description: z.ZodOptional<z.ZodString>;
|
|
1634
1769
|
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1644,16 +1779,16 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
|
|
|
1644
1779
|
label: string;
|
|
1645
1780
|
text: string;
|
|
1646
1781
|
}>, "many">>;
|
|
1647
|
-
params: z.
|
|
1782
|
+
params: z.ZodAny;
|
|
1648
1783
|
trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1649
1784
|
type: z.ZodLiteral<"dynamic">;
|
|
1650
1785
|
id: z.ZodString;
|
|
1651
1786
|
}, "strip", z.ZodTypeAny, {
|
|
1652
|
-
type: "dynamic";
|
|
1653
1787
|
id: string;
|
|
1654
|
-
}, {
|
|
1655
1788
|
type: "dynamic";
|
|
1789
|
+
}, {
|
|
1656
1790
|
id: string;
|
|
1791
|
+
type: "dynamic";
|
|
1657
1792
|
}>, z.ZodObject<{
|
|
1658
1793
|
type: z.ZodLiteral<"static">;
|
|
1659
1794
|
title: z.ZodString;
|
|
@@ -1810,27 +1945,47 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
|
|
|
1810
1945
|
variant?: string | undefined;
|
|
1811
1946
|
style: "normal" | "minimal";
|
|
1812
1947
|
}>>;
|
|
1948
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
1949
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1950
|
+
factor: z.ZodOptional<z.ZodNumber>;
|
|
1951
|
+
minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
1952
|
+
maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
1953
|
+
randomize: z.ZodOptional<z.ZodBoolean>;
|
|
1954
|
+
}, "strip", z.ZodTypeAny, {
|
|
1955
|
+
limit?: number | undefined;
|
|
1956
|
+
factor?: number | undefined;
|
|
1957
|
+
minTimeoutInMs?: number | undefined;
|
|
1958
|
+
maxTimeoutInMs?: number | undefined;
|
|
1959
|
+
randomize?: boolean | undefined;
|
|
1960
|
+
}, {
|
|
1961
|
+
limit?: number | undefined;
|
|
1962
|
+
factor?: number | undefined;
|
|
1963
|
+
minTimeoutInMs?: number | undefined;
|
|
1964
|
+
maxTimeoutInMs?: number | undefined;
|
|
1965
|
+
randomize?: boolean | undefined;
|
|
1966
|
+
}>>;
|
|
1813
1967
|
}, {
|
|
1814
1968
|
idempotencyKey: z.ZodString;
|
|
1815
1969
|
parentId: z.ZodOptional<z.ZodString>;
|
|
1816
1970
|
}>, "strip", z.ZodTypeAny, {
|
|
1817
|
-
params?: SerializableJson;
|
|
1818
1971
|
icon?: string | undefined;
|
|
1819
|
-
style?: {
|
|
1820
|
-
variant?: string | undefined;
|
|
1821
|
-
style: "normal" | "minimal";
|
|
1822
|
-
} | undefined;
|
|
1823
1972
|
delayUntil?: Date | undefined;
|
|
1824
1973
|
description?: string | undefined;
|
|
1974
|
+
params?: any;
|
|
1825
1975
|
properties?: {
|
|
1826
1976
|
url?: string | undefined;
|
|
1827
1977
|
label: string;
|
|
1828
1978
|
text: string;
|
|
1829
1979
|
}[] | undefined;
|
|
1830
1980
|
parentId?: string | undefined;
|
|
1981
|
+
style?: {
|
|
1982
|
+
variant?: string | undefined;
|
|
1983
|
+
style: "normal" | "minimal";
|
|
1984
|
+
} | undefined;
|
|
1985
|
+
operation?: "fetch" | undefined;
|
|
1831
1986
|
trigger?: {
|
|
1832
|
-
type: "dynamic";
|
|
1833
1987
|
id: string;
|
|
1988
|
+
type: "dynamic";
|
|
1834
1989
|
} | {
|
|
1835
1990
|
properties?: {
|
|
1836
1991
|
url?: string | undefined;
|
|
@@ -1866,28 +2021,36 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
|
|
|
1866
2021
|
paths: string[];
|
|
1867
2022
|
} | undefined;
|
|
1868
2023
|
connectionKey?: string | undefined;
|
|
2024
|
+
retry?: {
|
|
2025
|
+
limit?: number | undefined;
|
|
2026
|
+
factor?: number | undefined;
|
|
2027
|
+
minTimeoutInMs?: number | undefined;
|
|
2028
|
+
maxTimeoutInMs?: number | undefined;
|
|
2029
|
+
randomize?: boolean | undefined;
|
|
2030
|
+
} | undefined;
|
|
1869
2031
|
name: string;
|
|
1870
2032
|
noop: boolean;
|
|
1871
2033
|
idempotencyKey: string;
|
|
1872
2034
|
}, {
|
|
1873
|
-
params?: SerializableJson;
|
|
1874
2035
|
icon?: string | undefined;
|
|
1875
|
-
style?: {
|
|
1876
|
-
variant?: string | undefined;
|
|
1877
|
-
style: "normal" | "minimal";
|
|
1878
|
-
} | undefined;
|
|
1879
2036
|
noop?: boolean | undefined;
|
|
1880
2037
|
delayUntil?: Date | undefined;
|
|
1881
2038
|
description?: string | undefined;
|
|
2039
|
+
params?: any;
|
|
1882
2040
|
properties?: {
|
|
1883
2041
|
url?: string | undefined;
|
|
1884
2042
|
label: string;
|
|
1885
2043
|
text: string;
|
|
1886
2044
|
}[] | undefined;
|
|
1887
2045
|
parentId?: string | undefined;
|
|
2046
|
+
style?: {
|
|
2047
|
+
variant?: string | undefined;
|
|
2048
|
+
style: "normal" | "minimal";
|
|
2049
|
+
} | undefined;
|
|
2050
|
+
operation?: "fetch" | undefined;
|
|
1888
2051
|
trigger?: {
|
|
1889
|
-
type: "dynamic";
|
|
1890
2052
|
id: string;
|
|
2053
|
+
type: "dynamic";
|
|
1891
2054
|
} | {
|
|
1892
2055
|
properties?: {
|
|
1893
2056
|
url?: string | undefined;
|
|
@@ -1923,6 +2086,13 @@ declare const RunTaskBodyInputSchema: z.ZodObject<z.extendShape<{
|
|
|
1923
2086
|
paths: string[];
|
|
1924
2087
|
} | undefined;
|
|
1925
2088
|
connectionKey?: string | undefined;
|
|
2089
|
+
retry?: {
|
|
2090
|
+
limit?: number | undefined;
|
|
2091
|
+
factor?: number | undefined;
|
|
2092
|
+
minTimeoutInMs?: number | undefined;
|
|
2093
|
+
maxTimeoutInMs?: number | undefined;
|
|
2094
|
+
randomize?: boolean | undefined;
|
|
2095
|
+
} | undefined;
|
|
1926
2096
|
name: string;
|
|
1927
2097
|
idempotencyKey: string;
|
|
1928
2098
|
}>;
|
|
@@ -1932,6 +2102,7 @@ declare const CompleteTaskBodyInputSchema: z.ZodObject<z.extendShape<Pick<z.exte
|
|
|
1932
2102
|
icon: z.ZodOptional<z.ZodString>;
|
|
1933
2103
|
displayKey: z.ZodOptional<z.ZodString>;
|
|
1934
2104
|
noop: z.ZodDefault<z.ZodBoolean>;
|
|
2105
|
+
operation: z.ZodOptional<z.ZodEnum<["fetch"]>>;
|
|
1935
2106
|
delayUntil: z.ZodOptional<z.ZodDate>;
|
|
1936
2107
|
description: z.ZodOptional<z.ZodString>;
|
|
1937
2108
|
properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -1947,16 +2118,16 @@ declare const CompleteTaskBodyInputSchema: z.ZodObject<z.extendShape<Pick<z.exte
|
|
|
1947
2118
|
label: string;
|
|
1948
2119
|
text: string;
|
|
1949
2120
|
}>, "many">>;
|
|
1950
|
-
params: z.
|
|
2121
|
+
params: z.ZodAny;
|
|
1951
2122
|
trigger: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
1952
2123
|
type: z.ZodLiteral<"dynamic">;
|
|
1953
2124
|
id: z.ZodString;
|
|
1954
2125
|
}, "strip", z.ZodTypeAny, {
|
|
1955
|
-
type: "dynamic";
|
|
1956
2126
|
id: string;
|
|
1957
|
-
}, {
|
|
1958
2127
|
type: "dynamic";
|
|
2128
|
+
}, {
|
|
1959
2129
|
id: string;
|
|
2130
|
+
type: "dynamic";
|
|
1960
2131
|
}>, z.ZodObject<{
|
|
1961
2132
|
type: z.ZodLiteral<"static">;
|
|
1962
2133
|
title: z.ZodString;
|
|
@@ -2113,16 +2284,35 @@ declare const CompleteTaskBodyInputSchema: z.ZodObject<z.extendShape<Pick<z.exte
|
|
|
2113
2284
|
variant?: string | undefined;
|
|
2114
2285
|
style: "normal" | "minimal";
|
|
2115
2286
|
}>>;
|
|
2287
|
+
retry: z.ZodOptional<z.ZodObject<{
|
|
2288
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
2289
|
+
factor: z.ZodOptional<z.ZodNumber>;
|
|
2290
|
+
minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
2291
|
+
maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
2292
|
+
randomize: z.ZodOptional<z.ZodBoolean>;
|
|
2293
|
+
}, "strip", z.ZodTypeAny, {
|
|
2294
|
+
limit?: number | undefined;
|
|
2295
|
+
factor?: number | undefined;
|
|
2296
|
+
minTimeoutInMs?: number | undefined;
|
|
2297
|
+
maxTimeoutInMs?: number | undefined;
|
|
2298
|
+
randomize?: boolean | undefined;
|
|
2299
|
+
}, {
|
|
2300
|
+
limit?: number | undefined;
|
|
2301
|
+
factor?: number | undefined;
|
|
2302
|
+
minTimeoutInMs?: number | undefined;
|
|
2303
|
+
maxTimeoutInMs?: number | undefined;
|
|
2304
|
+
randomize?: boolean | undefined;
|
|
2305
|
+
}>>;
|
|
2116
2306
|
}, {
|
|
2117
2307
|
idempotencyKey: z.ZodString;
|
|
2118
2308
|
parentId: z.ZodOptional<z.ZodString>;
|
|
2119
|
-
}>, "
|
|
2309
|
+
}>, "description" | "params" | "properties">, {
|
|
2120
2310
|
output: z.ZodEffects<z.ZodOptional<z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>, string | number | boolean | {
|
|
2121
2311
|
[key: string]: DeserializedJson;
|
|
2122
2312
|
} | DeserializedJson[] | null, SerializableJson>;
|
|
2123
2313
|
}>, "strip", z.ZodTypeAny, {
|
|
2124
|
-
params?: SerializableJson;
|
|
2125
2314
|
description?: string | undefined;
|
|
2315
|
+
params?: any;
|
|
2126
2316
|
properties?: {
|
|
2127
2317
|
url?: string | undefined;
|
|
2128
2318
|
label: string;
|
|
@@ -2132,8 +2322,8 @@ declare const CompleteTaskBodyInputSchema: z.ZodObject<z.extendShape<Pick<z.exte
|
|
|
2132
2322
|
[key: string]: DeserializedJson;
|
|
2133
2323
|
} | DeserializedJson[] | null;
|
|
2134
2324
|
}, {
|
|
2135
|
-
params?: SerializableJson;
|
|
2136
2325
|
description?: string | undefined;
|
|
2326
|
+
params?: any;
|
|
2137
2327
|
properties?: {
|
|
2138
2328
|
url?: string | undefined;
|
|
2139
2329
|
label: string;
|
|
@@ -2142,6 +2332,34 @@ declare const CompleteTaskBodyInputSchema: z.ZodObject<z.extendShape<Pick<z.exte
|
|
|
2142
2332
|
output?: SerializableJson;
|
|
2143
2333
|
}>;
|
|
2144
2334
|
type CompleteTaskBodyInput = z.input<typeof CompleteTaskBodyInputSchema>;
|
|
2335
|
+
declare const FailTaskBodyInputSchema: z.ZodObject<{
|
|
2336
|
+
error: z.ZodObject<{
|
|
2337
|
+
message: z.ZodString;
|
|
2338
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2339
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
2340
|
+
}, "strip", z.ZodTypeAny, {
|
|
2341
|
+
name?: string | undefined;
|
|
2342
|
+
stack?: string | undefined;
|
|
2343
|
+
message: string;
|
|
2344
|
+
}, {
|
|
2345
|
+
name?: string | undefined;
|
|
2346
|
+
stack?: string | undefined;
|
|
2347
|
+
message: string;
|
|
2348
|
+
}>;
|
|
2349
|
+
}, "strip", z.ZodTypeAny, {
|
|
2350
|
+
error: {
|
|
2351
|
+
name?: string | undefined;
|
|
2352
|
+
stack?: string | undefined;
|
|
2353
|
+
message: string;
|
|
2354
|
+
};
|
|
2355
|
+
}, {
|
|
2356
|
+
error: {
|
|
2357
|
+
name?: string | undefined;
|
|
2358
|
+
stack?: string | undefined;
|
|
2359
|
+
message: string;
|
|
2360
|
+
};
|
|
2361
|
+
}>;
|
|
2362
|
+
type FailTaskBodyInput = z.infer<typeof FailTaskBodyInputSchema>;
|
|
2145
2363
|
declare const NormalizedRequestSchema: z.ZodObject<{
|
|
2146
2364
|
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2147
2365
|
method: z.ZodString;
|
|
@@ -2195,30 +2413,86 @@ declare const RegisterTriggerBodySchema: z.ZodObject<{
|
|
|
2195
2413
|
}>;
|
|
2196
2414
|
source: z.ZodObject<{
|
|
2197
2415
|
channel: z.ZodEnum<["HTTP", "SQS", "SMTP"]>;
|
|
2416
|
+
integration: z.ZodObject<{
|
|
2417
|
+
id: z.ZodString;
|
|
2418
|
+
metadata: z.ZodObject<{
|
|
2419
|
+
id: z.ZodString;
|
|
2420
|
+
name: z.ZodString;
|
|
2421
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
2422
|
+
}, "strip", z.ZodTypeAny, {
|
|
2423
|
+
instructions?: string | undefined;
|
|
2424
|
+
id: string;
|
|
2425
|
+
name: string;
|
|
2426
|
+
}, {
|
|
2427
|
+
instructions?: string | undefined;
|
|
2428
|
+
id: string;
|
|
2429
|
+
name: string;
|
|
2430
|
+
}>;
|
|
2431
|
+
authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
|
|
2432
|
+
}, "strip", z.ZodTypeAny, {
|
|
2433
|
+
id: string;
|
|
2434
|
+
metadata: {
|
|
2435
|
+
instructions?: string | undefined;
|
|
2436
|
+
id: string;
|
|
2437
|
+
name: string;
|
|
2438
|
+
};
|
|
2439
|
+
authSource: "HOSTED" | "LOCAL";
|
|
2440
|
+
}, {
|
|
2441
|
+
id: string;
|
|
2442
|
+
metadata: {
|
|
2443
|
+
instructions?: string | undefined;
|
|
2444
|
+
id: string;
|
|
2445
|
+
name: string;
|
|
2446
|
+
};
|
|
2447
|
+
authSource: "HOSTED" | "LOCAL";
|
|
2448
|
+
}>;
|
|
2198
2449
|
key: z.ZodString;
|
|
2199
2450
|
params: z.ZodAny;
|
|
2200
2451
|
events: z.ZodArray<z.ZodString, "many">;
|
|
2201
|
-
clientId: z.ZodOptional<z.ZodString>;
|
|
2202
2452
|
}, "strip", z.ZodTypeAny, {
|
|
2203
2453
|
params?: any;
|
|
2204
|
-
clientId?: string | undefined;
|
|
2205
2454
|
key: string;
|
|
2206
2455
|
channel: "HTTP" | "SMTP" | "SQS";
|
|
2207
2456
|
events: string[];
|
|
2457
|
+
integration: {
|
|
2458
|
+
id: string;
|
|
2459
|
+
metadata: {
|
|
2460
|
+
instructions?: string | undefined;
|
|
2461
|
+
id: string;
|
|
2462
|
+
name: string;
|
|
2463
|
+
};
|
|
2464
|
+
authSource: "HOSTED" | "LOCAL";
|
|
2465
|
+
};
|
|
2208
2466
|
}, {
|
|
2209
2467
|
params?: any;
|
|
2210
|
-
clientId?: string | undefined;
|
|
2211
2468
|
key: string;
|
|
2212
2469
|
channel: "HTTP" | "SMTP" | "SQS";
|
|
2213
2470
|
events: string[];
|
|
2471
|
+
integration: {
|
|
2472
|
+
id: string;
|
|
2473
|
+
metadata: {
|
|
2474
|
+
instructions?: string | undefined;
|
|
2475
|
+
id: string;
|
|
2476
|
+
name: string;
|
|
2477
|
+
};
|
|
2478
|
+
authSource: "HOSTED" | "LOCAL";
|
|
2479
|
+
};
|
|
2214
2480
|
}>;
|
|
2215
2481
|
}, "strip", z.ZodTypeAny, {
|
|
2216
2482
|
source: {
|
|
2217
2483
|
params?: any;
|
|
2218
|
-
clientId?: string | undefined;
|
|
2219
2484
|
key: string;
|
|
2220
2485
|
channel: "HTTP" | "SMTP" | "SQS";
|
|
2221
2486
|
events: string[];
|
|
2487
|
+
integration: {
|
|
2488
|
+
id: string;
|
|
2489
|
+
metadata: {
|
|
2490
|
+
instructions?: string | undefined;
|
|
2491
|
+
id: string;
|
|
2492
|
+
name: string;
|
|
2493
|
+
};
|
|
2494
|
+
authSource: "HOSTED" | "LOCAL";
|
|
2495
|
+
};
|
|
2222
2496
|
};
|
|
2223
2497
|
rule: {
|
|
2224
2498
|
payload?: EventFilter | undefined;
|
|
@@ -2229,10 +2503,18 @@ declare const RegisterTriggerBodySchema: z.ZodObject<{
|
|
|
2229
2503
|
}, {
|
|
2230
2504
|
source: {
|
|
2231
2505
|
params?: any;
|
|
2232
|
-
clientId?: string | undefined;
|
|
2233
2506
|
key: string;
|
|
2234
2507
|
channel: "HTTP" | "SMTP" | "SQS";
|
|
2235
2508
|
events: string[];
|
|
2509
|
+
integration: {
|
|
2510
|
+
id: string;
|
|
2511
|
+
metadata: {
|
|
2512
|
+
instructions?: string | undefined;
|
|
2513
|
+
id: string;
|
|
2514
|
+
name: string;
|
|
2515
|
+
};
|
|
2516
|
+
authSource: "HOSTED" | "LOCAL";
|
|
2517
|
+
};
|
|
2236
2518
|
};
|
|
2237
2519
|
rule: {
|
|
2238
2520
|
payload?: EventFilter | undefined;
|
|
@@ -2247,11 +2529,11 @@ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
2247
2529
|
type: z.ZodLiteral<"dynamic">;
|
|
2248
2530
|
id: z.ZodString;
|
|
2249
2531
|
}, "strip", z.ZodTypeAny, {
|
|
2250
|
-
type: "dynamic";
|
|
2251
2532
|
id: string;
|
|
2252
|
-
}, {
|
|
2253
2533
|
type: "dynamic";
|
|
2534
|
+
}, {
|
|
2254
2535
|
id: string;
|
|
2536
|
+
type: "dynamic";
|
|
2255
2537
|
}>, z.ZodObject<{
|
|
2256
2538
|
type: z.ZodLiteral<"static">;
|
|
2257
2539
|
title: z.ZodString;
|
|
@@ -2392,6 +2674,21 @@ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObjec
|
|
|
2392
2674
|
}>]>;
|
|
2393
2675
|
type TriggerMetadata = z.infer<typeof TriggerMetadataSchema>;
|
|
2394
2676
|
|
|
2677
|
+
declare const ErrorWithStackSchema: z.ZodObject<{
|
|
2678
|
+
message: z.ZodString;
|
|
2679
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2680
|
+
stack: z.ZodOptional<z.ZodString>;
|
|
2681
|
+
}, "strip", z.ZodTypeAny, {
|
|
2682
|
+
name?: string | undefined;
|
|
2683
|
+
stack?: string | undefined;
|
|
2684
|
+
message: string;
|
|
2685
|
+
}, {
|
|
2686
|
+
name?: string | undefined;
|
|
2687
|
+
stack?: string | undefined;
|
|
2688
|
+
message: string;
|
|
2689
|
+
}>;
|
|
2690
|
+
type ErrorWithStack = z.infer<typeof ErrorWithStackSchema>;
|
|
2691
|
+
|
|
2395
2692
|
declare const DisplayPropertySchema: z.ZodObject<{
|
|
2396
2693
|
label: z.ZodString;
|
|
2397
2694
|
text: z.ZodString;
|
|
@@ -2425,48 +2722,51 @@ declare const ConnectionAuthSchema: z.ZodObject<{
|
|
|
2425
2722
|
}>;
|
|
2426
2723
|
type ConnectionAuth = z.infer<typeof ConnectionAuthSchema>;
|
|
2427
2724
|
declare const IntegrationMetadataSchema: z.ZodObject<{
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2725
|
+
id: z.ZodString;
|
|
2726
|
+
name: z.ZodString;
|
|
2727
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
2431
2728
|
}, "strip", z.ZodTypeAny, {
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2729
|
+
instructions?: string | undefined;
|
|
2730
|
+
id: string;
|
|
2731
|
+
name: string;
|
|
2435
2732
|
}, {
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2733
|
+
instructions?: string | undefined;
|
|
2734
|
+
id: string;
|
|
2735
|
+
name: string;
|
|
2439
2736
|
}>;
|
|
2440
2737
|
type IntegrationMetadata = z.infer<typeof IntegrationMetadataSchema>;
|
|
2441
2738
|
declare const IntegrationConfigSchema: z.ZodObject<{
|
|
2442
2739
|
id: z.ZodString;
|
|
2443
2740
|
metadata: z.ZodObject<{
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2741
|
+
id: z.ZodString;
|
|
2742
|
+
name: z.ZodString;
|
|
2743
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
2447
2744
|
}, "strip", z.ZodTypeAny, {
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2745
|
+
instructions?: string | undefined;
|
|
2746
|
+
id: string;
|
|
2747
|
+
name: string;
|
|
2451
2748
|
}, {
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2749
|
+
instructions?: string | undefined;
|
|
2750
|
+
id: string;
|
|
2751
|
+
name: string;
|
|
2455
2752
|
}>;
|
|
2753
|
+
authSource: z.ZodEnum<["HOSTED", "LOCAL"]>;
|
|
2456
2754
|
}, "strip", z.ZodTypeAny, {
|
|
2457
2755
|
id: string;
|
|
2458
2756
|
metadata: {
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2757
|
+
instructions?: string | undefined;
|
|
2758
|
+
id: string;
|
|
2759
|
+
name: string;
|
|
2462
2760
|
};
|
|
2761
|
+
authSource: "HOSTED" | "LOCAL";
|
|
2463
2762
|
}, {
|
|
2464
2763
|
id: string;
|
|
2465
2764
|
metadata: {
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2765
|
+
instructions?: string | undefined;
|
|
2766
|
+
id: string;
|
|
2767
|
+
name: string;
|
|
2469
2768
|
};
|
|
2769
|
+
authSource: "HOSTED" | "LOCAL";
|
|
2470
2770
|
}>;
|
|
2471
2771
|
type IntegrationConfig = z.infer<typeof IntegrationConfigSchema>;
|
|
2472
2772
|
|
|
@@ -2552,52 +2852,42 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
|
|
|
2552
2852
|
scopes: z.ZodArray<z.ZodString, "many">;
|
|
2553
2853
|
createdAt: z.ZodDate;
|
|
2554
2854
|
updatedAt: z.ZodDate;
|
|
2555
|
-
integrationIdentifier: z.ZodString;
|
|
2556
|
-
integrationAuthMethod: z.ZodString;
|
|
2557
2855
|
}, "strip", z.ZodTypeAny, {
|
|
2856
|
+
id: string;
|
|
2558
2857
|
scopes: string[];
|
|
2559
2858
|
title: string;
|
|
2560
|
-
id: string;
|
|
2561
2859
|
createdAt: Date;
|
|
2562
2860
|
updatedAt: Date;
|
|
2563
|
-
integrationIdentifier: string;
|
|
2564
|
-
integrationAuthMethod: string;
|
|
2565
2861
|
}, {
|
|
2862
|
+
id: string;
|
|
2566
2863
|
scopes: string[];
|
|
2567
2864
|
title: string;
|
|
2568
|
-
id: string;
|
|
2569
2865
|
createdAt: Date;
|
|
2570
2866
|
updatedAt: Date;
|
|
2571
|
-
integrationIdentifier: string;
|
|
2572
|
-
integrationAuthMethod: string;
|
|
2573
2867
|
}>;
|
|
2574
2868
|
authorizationUrl: z.ZodString;
|
|
2575
2869
|
}, {
|
|
2576
2870
|
type: z.ZodLiteral<"DEVELOPER">;
|
|
2577
2871
|
}>, "strip", z.ZodTypeAny, {
|
|
2578
|
-
type: "DEVELOPER";
|
|
2579
2872
|
id: string;
|
|
2873
|
+
type: "DEVELOPER";
|
|
2580
2874
|
client: {
|
|
2875
|
+
id: string;
|
|
2581
2876
|
scopes: string[];
|
|
2582
2877
|
title: string;
|
|
2583
|
-
id: string;
|
|
2584
2878
|
createdAt: Date;
|
|
2585
2879
|
updatedAt: Date;
|
|
2586
|
-
integrationIdentifier: string;
|
|
2587
|
-
integrationAuthMethod: string;
|
|
2588
2880
|
};
|
|
2589
2881
|
authorizationUrl: string;
|
|
2590
2882
|
}, {
|
|
2591
|
-
type: "DEVELOPER";
|
|
2592
2883
|
id: string;
|
|
2884
|
+
type: "DEVELOPER";
|
|
2593
2885
|
client: {
|
|
2886
|
+
id: string;
|
|
2594
2887
|
scopes: string[];
|
|
2595
2888
|
title: string;
|
|
2596
|
-
id: string;
|
|
2597
2889
|
createdAt: Date;
|
|
2598
2890
|
updatedAt: Date;
|
|
2599
|
-
integrationIdentifier: string;
|
|
2600
|
-
integrationAuthMethod: string;
|
|
2601
2891
|
};
|
|
2602
2892
|
authorizationUrl: string;
|
|
2603
2893
|
}>, z.ZodObject<z.extendShape<{
|
|
@@ -2608,24 +2898,18 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
|
|
|
2608
2898
|
scopes: z.ZodArray<z.ZodString, "many">;
|
|
2609
2899
|
createdAt: z.ZodDate;
|
|
2610
2900
|
updatedAt: z.ZodDate;
|
|
2611
|
-
integrationIdentifier: z.ZodString;
|
|
2612
|
-
integrationAuthMethod: z.ZodString;
|
|
2613
2901
|
}, "strip", z.ZodTypeAny, {
|
|
2902
|
+
id: string;
|
|
2614
2903
|
scopes: string[];
|
|
2615
2904
|
title: string;
|
|
2616
|
-
id: string;
|
|
2617
2905
|
createdAt: Date;
|
|
2618
2906
|
updatedAt: Date;
|
|
2619
|
-
integrationIdentifier: string;
|
|
2620
|
-
integrationAuthMethod: string;
|
|
2621
2907
|
}, {
|
|
2908
|
+
id: string;
|
|
2622
2909
|
scopes: string[];
|
|
2623
2910
|
title: string;
|
|
2624
|
-
id: string;
|
|
2625
2911
|
createdAt: Date;
|
|
2626
2912
|
updatedAt: Date;
|
|
2627
|
-
integrationIdentifier: string;
|
|
2628
|
-
integrationAuthMethod: string;
|
|
2629
2913
|
}>;
|
|
2630
2914
|
authorizationUrl: z.ZodString;
|
|
2631
2915
|
}, {
|
|
@@ -2641,37 +2925,33 @@ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnio
|
|
|
2641
2925
|
id: string;
|
|
2642
2926
|
}>;
|
|
2643
2927
|
}>, "strip", z.ZodTypeAny, {
|
|
2644
|
-
type: "EXTERNAL";
|
|
2645
2928
|
id: string;
|
|
2929
|
+
type: "EXTERNAL";
|
|
2646
2930
|
account: {
|
|
2647
2931
|
metadata?: any;
|
|
2648
2932
|
id: string;
|
|
2649
2933
|
};
|
|
2650
2934
|
client: {
|
|
2935
|
+
id: string;
|
|
2651
2936
|
scopes: string[];
|
|
2652
2937
|
title: string;
|
|
2653
|
-
id: string;
|
|
2654
2938
|
createdAt: Date;
|
|
2655
2939
|
updatedAt: Date;
|
|
2656
|
-
integrationIdentifier: string;
|
|
2657
|
-
integrationAuthMethod: string;
|
|
2658
2940
|
};
|
|
2659
2941
|
authorizationUrl: string;
|
|
2660
2942
|
}, {
|
|
2661
|
-
type: "EXTERNAL";
|
|
2662
2943
|
id: string;
|
|
2944
|
+
type: "EXTERNAL";
|
|
2663
2945
|
account: {
|
|
2664
2946
|
metadata?: any;
|
|
2665
2947
|
id: string;
|
|
2666
2948
|
};
|
|
2667
2949
|
client: {
|
|
2950
|
+
id: string;
|
|
2668
2951
|
scopes: string[];
|
|
2669
2952
|
title: string;
|
|
2670
|
-
id: string;
|
|
2671
2953
|
createdAt: Date;
|
|
2672
2954
|
updatedAt: Date;
|
|
2673
|
-
integrationIdentifier: string;
|
|
2674
|
-
integrationAuthMethod: string;
|
|
2675
2955
|
};
|
|
2676
2956
|
authorizationUrl: string;
|
|
2677
2957
|
}>]>;
|
|
@@ -2687,17 +2967,17 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
|
|
|
2687
2967
|
integrationIdentifier: z.ZodString;
|
|
2688
2968
|
integrationAuthMethod: z.ZodString;
|
|
2689
2969
|
}, "strip", z.ZodTypeAny, {
|
|
2970
|
+
id: string;
|
|
2690
2971
|
scopes: string[];
|
|
2691
2972
|
title: string;
|
|
2692
|
-
id: string;
|
|
2693
2973
|
createdAt: Date;
|
|
2694
2974
|
updatedAt: Date;
|
|
2695
2975
|
integrationIdentifier: string;
|
|
2696
2976
|
integrationAuthMethod: string;
|
|
2697
2977
|
}, {
|
|
2978
|
+
id: string;
|
|
2698
2979
|
scopes: string[];
|
|
2699
2980
|
title: string;
|
|
2700
|
-
id: string;
|
|
2701
2981
|
createdAt: Date;
|
|
2702
2982
|
updatedAt: Date;
|
|
2703
2983
|
integrationIdentifier: string;
|
|
@@ -2707,12 +2987,12 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
|
|
|
2707
2987
|
}, {
|
|
2708
2988
|
type: z.ZodLiteral<"DEVELOPER">;
|
|
2709
2989
|
}>, "strip", z.ZodTypeAny, {
|
|
2710
|
-
type: "DEVELOPER";
|
|
2711
2990
|
id: string;
|
|
2991
|
+
type: "DEVELOPER";
|
|
2712
2992
|
client: {
|
|
2993
|
+
id: string;
|
|
2713
2994
|
scopes: string[];
|
|
2714
2995
|
title: string;
|
|
2715
|
-
id: string;
|
|
2716
2996
|
createdAt: Date;
|
|
2717
2997
|
updatedAt: Date;
|
|
2718
2998
|
integrationIdentifier: string;
|
|
@@ -2720,12 +3000,12 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
|
|
|
2720
3000
|
};
|
|
2721
3001
|
expiresAt: Date;
|
|
2722
3002
|
}, {
|
|
2723
|
-
type: "DEVELOPER";
|
|
2724
3003
|
id: string;
|
|
3004
|
+
type: "DEVELOPER";
|
|
2725
3005
|
client: {
|
|
3006
|
+
id: string;
|
|
2726
3007
|
scopes: string[];
|
|
2727
3008
|
title: string;
|
|
2728
|
-
id: string;
|
|
2729
3009
|
createdAt: Date;
|
|
2730
3010
|
updatedAt: Date;
|
|
2731
3011
|
integrationIdentifier: string;
|
|
@@ -2743,17 +3023,17 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
|
|
|
2743
3023
|
integrationIdentifier: z.ZodString;
|
|
2744
3024
|
integrationAuthMethod: z.ZodString;
|
|
2745
3025
|
}, "strip", z.ZodTypeAny, {
|
|
3026
|
+
id: string;
|
|
2746
3027
|
scopes: string[];
|
|
2747
3028
|
title: string;
|
|
2748
|
-
id: string;
|
|
2749
3029
|
createdAt: Date;
|
|
2750
3030
|
updatedAt: Date;
|
|
2751
3031
|
integrationIdentifier: string;
|
|
2752
3032
|
integrationAuthMethod: string;
|
|
2753
3033
|
}, {
|
|
3034
|
+
id: string;
|
|
2754
3035
|
scopes: string[];
|
|
2755
3036
|
title: string;
|
|
2756
|
-
id: string;
|
|
2757
3037
|
createdAt: Date;
|
|
2758
3038
|
updatedAt: Date;
|
|
2759
3039
|
integrationIdentifier: string;
|
|
@@ -2773,16 +3053,16 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
|
|
|
2773
3053
|
id: string;
|
|
2774
3054
|
}>;
|
|
2775
3055
|
}>, "strip", z.ZodTypeAny, {
|
|
2776
|
-
type: "EXTERNAL";
|
|
2777
3056
|
id: string;
|
|
3057
|
+
type: "EXTERNAL";
|
|
2778
3058
|
account: {
|
|
2779
3059
|
metadata?: any;
|
|
2780
3060
|
id: string;
|
|
2781
3061
|
};
|
|
2782
3062
|
client: {
|
|
3063
|
+
id: string;
|
|
2783
3064
|
scopes: string[];
|
|
2784
3065
|
title: string;
|
|
2785
|
-
id: string;
|
|
2786
3066
|
createdAt: Date;
|
|
2787
3067
|
updatedAt: Date;
|
|
2788
3068
|
integrationIdentifier: string;
|
|
@@ -2790,16 +3070,16 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
|
|
|
2790
3070
|
};
|
|
2791
3071
|
expiresAt: Date;
|
|
2792
3072
|
}, {
|
|
2793
|
-
type: "EXTERNAL";
|
|
2794
3073
|
id: string;
|
|
3074
|
+
type: "EXTERNAL";
|
|
2795
3075
|
account: {
|
|
2796
3076
|
metadata?: any;
|
|
2797
3077
|
id: string;
|
|
2798
3078
|
};
|
|
2799
3079
|
client: {
|
|
3080
|
+
id: string;
|
|
2800
3081
|
scopes: string[];
|
|
2801
3082
|
title: string;
|
|
2802
|
-
id: string;
|
|
2803
3083
|
createdAt: Date;
|
|
2804
3084
|
updatedAt: Date;
|
|
2805
3085
|
integrationIdentifier: string;
|
|
@@ -2809,6 +3089,80 @@ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscrimin
|
|
|
2809
3089
|
}>]>;
|
|
2810
3090
|
type MissingConnectionResolvedNotificationPayload = z.infer<typeof MissingConnectionResolvedNotificationPayloadSchema>;
|
|
2811
3091
|
|
|
3092
|
+
declare const FetchRequestInitSchema: z.ZodObject<{
|
|
3093
|
+
method: z.ZodOptional<z.ZodString>;
|
|
3094
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
3095
|
+
__redactedString: z.ZodLiteral<true>;
|
|
3096
|
+
strings: z.ZodArray<z.ZodString, "many">;
|
|
3097
|
+
interpolations: z.ZodArray<z.ZodString, "many">;
|
|
3098
|
+
}, "strip", z.ZodTypeAny, {
|
|
3099
|
+
__redactedString: true;
|
|
3100
|
+
strings: string[];
|
|
3101
|
+
interpolations: string[];
|
|
3102
|
+
}, {
|
|
3103
|
+
__redactedString: true;
|
|
3104
|
+
strings: string[];
|
|
3105
|
+
interpolations: string[];
|
|
3106
|
+
}>]>>>;
|
|
3107
|
+
body: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>]>>;
|
|
3108
|
+
}, "strip", z.ZodTypeAny, {
|
|
3109
|
+
method?: string | undefined;
|
|
3110
|
+
headers?: Record<string, string | {
|
|
3111
|
+
__redactedString: true;
|
|
3112
|
+
strings: string[];
|
|
3113
|
+
interpolations: string[];
|
|
3114
|
+
}> | undefined;
|
|
3115
|
+
body?: string | ArrayBuffer | undefined;
|
|
3116
|
+
}, {
|
|
3117
|
+
method?: string | undefined;
|
|
3118
|
+
headers?: Record<string, string | {
|
|
3119
|
+
__redactedString: true;
|
|
3120
|
+
strings: string[];
|
|
3121
|
+
interpolations: string[];
|
|
3122
|
+
}> | undefined;
|
|
3123
|
+
body?: string | ArrayBuffer | undefined;
|
|
3124
|
+
}>;
|
|
3125
|
+
type FetchRequestInit = z.infer<typeof FetchRequestInitSchema>;
|
|
3126
|
+
declare const FetchRetryOptionsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"strategy", [z.ZodObject<{
|
|
3127
|
+
strategy: z.ZodLiteral<"headers">;
|
|
3128
|
+
limitHeader: z.ZodString;
|
|
3129
|
+
remainingHeader: z.ZodString;
|
|
3130
|
+
resetHeader: z.ZodString;
|
|
3131
|
+
}, "strip", z.ZodTypeAny, {
|
|
3132
|
+
strategy: "headers";
|
|
3133
|
+
limitHeader: string;
|
|
3134
|
+
remainingHeader: string;
|
|
3135
|
+
resetHeader: string;
|
|
3136
|
+
}, {
|
|
3137
|
+
strategy: "headers";
|
|
3138
|
+
limitHeader: string;
|
|
3139
|
+
remainingHeader: string;
|
|
3140
|
+
resetHeader: string;
|
|
3141
|
+
}>, z.ZodObject<z.extendShape<{
|
|
3142
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
3143
|
+
factor: z.ZodOptional<z.ZodNumber>;
|
|
3144
|
+
minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
3145
|
+
maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
|
|
3146
|
+
randomize: z.ZodOptional<z.ZodBoolean>;
|
|
3147
|
+
}, {
|
|
3148
|
+
strategy: z.ZodLiteral<"backoff">;
|
|
3149
|
+
}>, "strip", z.ZodTypeAny, {
|
|
3150
|
+
limit?: number | undefined;
|
|
3151
|
+
factor?: number | undefined;
|
|
3152
|
+
minTimeoutInMs?: number | undefined;
|
|
3153
|
+
maxTimeoutInMs?: number | undefined;
|
|
3154
|
+
randomize?: boolean | undefined;
|
|
3155
|
+
strategy: "backoff";
|
|
3156
|
+
}, {
|
|
3157
|
+
limit?: number | undefined;
|
|
3158
|
+
factor?: number | undefined;
|
|
3159
|
+
minTimeoutInMs?: number | undefined;
|
|
3160
|
+
maxTimeoutInMs?: number | undefined;
|
|
3161
|
+
randomize?: boolean | undefined;
|
|
3162
|
+
strategy: "backoff";
|
|
3163
|
+
}>]>>;
|
|
3164
|
+
type FetchRetryOptions = z.infer<typeof FetchRetryOptionsSchema>;
|
|
3165
|
+
|
|
2812
3166
|
type ApiClientOptions = {
|
|
2813
3167
|
apiKey?: string;
|
|
2814
3168
|
apiUrl?: string;
|
|
@@ -2836,54 +3190,85 @@ declare class ApiClient {
|
|
|
2836
3190
|
ok: false;
|
|
2837
3191
|
}>;
|
|
2838
3192
|
runTask(runId: string, task: RunTaskBodyInput): Promise<{
|
|
2839
|
-
error?: string | null | undefined;
|
|
2840
|
-
params?: DeserializedJson | undefined;
|
|
2841
3193
|
icon?: string | null | undefined;
|
|
2842
|
-
style?: {
|
|
2843
|
-
variant?: string | undefined;
|
|
2844
|
-
style: "normal" | "minimal";
|
|
2845
|
-
} | null | undefined;
|
|
2846
3194
|
startedAt?: Date | null | undefined;
|
|
2847
3195
|
completedAt?: Date | null | undefined;
|
|
2848
3196
|
delayUntil?: Date | null | undefined;
|
|
2849
3197
|
description?: string | null | undefined;
|
|
3198
|
+
params?: DeserializedJson | undefined;
|
|
2850
3199
|
properties?: {
|
|
2851
3200
|
url?: string | undefined;
|
|
2852
3201
|
label: string;
|
|
2853
3202
|
text: string;
|
|
2854
3203
|
}[] | null | undefined;
|
|
2855
3204
|
output?: DeserializedJson | undefined;
|
|
3205
|
+
error?: string | null | undefined;
|
|
2856
3206
|
parentId?: string | null | undefined;
|
|
2857
|
-
|
|
3207
|
+
style?: {
|
|
3208
|
+
variant?: string | undefined;
|
|
3209
|
+
style: "normal" | "minimal";
|
|
3210
|
+
} | null | undefined;
|
|
3211
|
+
operation?: string | null | undefined;
|
|
2858
3212
|
id: string;
|
|
2859
3213
|
name: string;
|
|
2860
3214
|
noop: boolean;
|
|
3215
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
2861
3216
|
idempotencyKey: string;
|
|
3217
|
+
attempts: number;
|
|
2862
3218
|
}>;
|
|
2863
3219
|
completeTask(runId: string, id: string, task: CompleteTaskBodyInput): Promise<{
|
|
2864
|
-
error?: string | null | undefined;
|
|
2865
|
-
params?: DeserializedJson | undefined;
|
|
2866
3220
|
icon?: string | null | undefined;
|
|
3221
|
+
startedAt?: Date | null | undefined;
|
|
3222
|
+
completedAt?: Date | null | undefined;
|
|
3223
|
+
delayUntil?: Date | null | undefined;
|
|
3224
|
+
description?: string | null | undefined;
|
|
3225
|
+
params?: DeserializedJson | undefined;
|
|
3226
|
+
properties?: {
|
|
3227
|
+
url?: string | undefined;
|
|
3228
|
+
label: string;
|
|
3229
|
+
text: string;
|
|
3230
|
+
}[] | null | undefined;
|
|
3231
|
+
output?: DeserializedJson | undefined;
|
|
3232
|
+
error?: string | null | undefined;
|
|
3233
|
+
parentId?: string | null | undefined;
|
|
2867
3234
|
style?: {
|
|
2868
3235
|
variant?: string | undefined;
|
|
2869
3236
|
style: "normal" | "minimal";
|
|
2870
3237
|
} | null | undefined;
|
|
3238
|
+
operation?: string | null | undefined;
|
|
3239
|
+
id: string;
|
|
3240
|
+
name: string;
|
|
3241
|
+
noop: boolean;
|
|
3242
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
3243
|
+
idempotencyKey: string;
|
|
3244
|
+
attempts: number;
|
|
3245
|
+
}>;
|
|
3246
|
+
failTask(runId: string, id: string, body: FailTaskBodyInput): Promise<{
|
|
3247
|
+
icon?: string | null | undefined;
|
|
2871
3248
|
startedAt?: Date | null | undefined;
|
|
2872
3249
|
completedAt?: Date | null | undefined;
|
|
2873
3250
|
delayUntil?: Date | null | undefined;
|
|
2874
3251
|
description?: string | null | undefined;
|
|
3252
|
+
params?: DeserializedJson | undefined;
|
|
2875
3253
|
properties?: {
|
|
2876
3254
|
url?: string | undefined;
|
|
2877
3255
|
label: string;
|
|
2878
3256
|
text: string;
|
|
2879
3257
|
}[] | null | undefined;
|
|
2880
3258
|
output?: DeserializedJson | undefined;
|
|
3259
|
+
error?: string | null | undefined;
|
|
2881
3260
|
parentId?: string | null | undefined;
|
|
2882
|
-
|
|
3261
|
+
style?: {
|
|
3262
|
+
variant?: string | undefined;
|
|
3263
|
+
style: "normal" | "minimal";
|
|
3264
|
+
} | null | undefined;
|
|
3265
|
+
operation?: string | null | undefined;
|
|
2883
3266
|
id: string;
|
|
2884
3267
|
name: string;
|
|
2885
3268
|
noop: boolean;
|
|
3269
|
+
status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED";
|
|
2886
3270
|
idempotencyKey: string;
|
|
3271
|
+
attempts: number;
|
|
2887
3272
|
}>;
|
|
2888
3273
|
sendEvent(event: SendEvent, options?: SendEventOptions): Promise<{
|
|
2889
3274
|
context?: DeserializedJson | undefined;
|
|
@@ -3003,6 +3388,12 @@ interface Trigger<TEventSpec extends EventSpecification<any>> {
|
|
|
3003
3388
|
attachToJob(triggerClient: TriggerClient, job: Job<Trigger<TEventSpec>, any>): void;
|
|
3004
3389
|
preprocessRuns: boolean;
|
|
3005
3390
|
}
|
|
3391
|
+
type EventSpecificationExample = {
|
|
3392
|
+
id: string;
|
|
3393
|
+
name: string;
|
|
3394
|
+
icon?: string;
|
|
3395
|
+
payload: any;
|
|
3396
|
+
};
|
|
3006
3397
|
interface EventSpecification<TEvent extends any> {
|
|
3007
3398
|
name: string;
|
|
3008
3399
|
title: string;
|
|
@@ -3010,7 +3401,7 @@ interface EventSpecification<TEvent extends any> {
|
|
|
3010
3401
|
icon: string;
|
|
3011
3402
|
properties?: DisplayProperty[];
|
|
3012
3403
|
schema?: any;
|
|
3013
|
-
examples?: Array<
|
|
3404
|
+
examples?: Array<EventSpecificationExample>;
|
|
3014
3405
|
filter?: EventFilter;
|
|
3015
3406
|
parsePayload: (payload: unknown) => TEvent;
|
|
3016
3407
|
runProperties?: (payload: TEvent) => DisplayProperty[];
|
|
@@ -3117,9 +3508,9 @@ declare class ExternalSource<TIntegration extends TriggerIntegration<Integration
|
|
|
3117
3508
|
get integrationConfig(): {
|
|
3118
3509
|
id: string;
|
|
3119
3510
|
metadata: {
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3511
|
+
instructions?: string | undefined;
|
|
3512
|
+
id: string;
|
|
3513
|
+
name: string;
|
|
3123
3514
|
};
|
|
3124
3515
|
};
|
|
3125
3516
|
get id(): string;
|
|
@@ -3194,15 +3585,15 @@ declare class TriggerClient {
|
|
|
3194
3585
|
dynamicTriggerId?: string | undefined;
|
|
3195
3586
|
id: string;
|
|
3196
3587
|
source: {
|
|
3197
|
-
data?: DeserializedJson | undefined;
|
|
3198
3588
|
params?: any;
|
|
3589
|
+
data?: DeserializedJson | undefined;
|
|
3199
3590
|
clientId?: string | undefined;
|
|
3200
3591
|
key: string;
|
|
3201
3592
|
secret: string;
|
|
3202
3593
|
active: boolean;
|
|
3203
3594
|
channel: {
|
|
3204
|
-
type: "HTTP";
|
|
3205
3595
|
url: string;
|
|
3596
|
+
type: "HTTP";
|
|
3206
3597
|
} | {
|
|
3207
3598
|
type: "SMTP";
|
|
3208
3599
|
} | {
|
|
@@ -3251,7 +3642,6 @@ declare class TriggerClient {
|
|
|
3251
3642
|
}>;
|
|
3252
3643
|
authorized(apiKey?: string | null): boolean;
|
|
3253
3644
|
apiKey(): string | undefined;
|
|
3254
|
-
listen(): Promise<void>;
|
|
3255
3645
|
}
|
|
3256
3646
|
|
|
3257
3647
|
type ScheduledEventSpecification = EventSpecification<ScheduledPayload>;
|
|
@@ -3263,6 +3653,15 @@ declare class IntervalTrigger implements Trigger<ScheduledEventSpecification> {
|
|
|
3263
3653
|
title: string;
|
|
3264
3654
|
source: string;
|
|
3265
3655
|
icon: string;
|
|
3656
|
+
examples: {
|
|
3657
|
+
id: string;
|
|
3658
|
+
name: string;
|
|
3659
|
+
icon: string;
|
|
3660
|
+
payload: {
|
|
3661
|
+
ts: string;
|
|
3662
|
+
lastTimestamp: string;
|
|
3663
|
+
};
|
|
3664
|
+
}[];
|
|
3266
3665
|
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3267
3666
|
lastTimestamp?: Date | undefined;
|
|
3268
3667
|
ts: Date;
|
|
@@ -3285,6 +3684,15 @@ declare class CronTrigger implements Trigger<ScheduledEventSpecification> {
|
|
|
3285
3684
|
title: string;
|
|
3286
3685
|
source: string;
|
|
3287
3686
|
icon: string;
|
|
3687
|
+
examples: {
|
|
3688
|
+
id: string;
|
|
3689
|
+
name: string;
|
|
3690
|
+
icon: string;
|
|
3691
|
+
payload: {
|
|
3692
|
+
ts: string;
|
|
3693
|
+
lastTimestamp: string;
|
|
3694
|
+
};
|
|
3695
|
+
}[];
|
|
3288
3696
|
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3289
3697
|
lastTimestamp?: Date | undefined;
|
|
3290
3698
|
ts: Date;
|
|
@@ -3312,6 +3720,15 @@ declare class DynamicSchedule implements Trigger<ScheduledEventSpecification> {
|
|
|
3312
3720
|
title: string;
|
|
3313
3721
|
source: string;
|
|
3314
3722
|
icon: string;
|
|
3723
|
+
examples: {
|
|
3724
|
+
id: string;
|
|
3725
|
+
name: string;
|
|
3726
|
+
icon: string;
|
|
3727
|
+
payload: {
|
|
3728
|
+
ts: string;
|
|
3729
|
+
lastTimestamp: string;
|
|
3730
|
+
};
|
|
3731
|
+
}[];
|
|
3315
3732
|
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3316
3733
|
lastTimestamp?: Date | undefined;
|
|
3317
3734
|
ts: Date;
|
|
@@ -3343,10 +3760,6 @@ declare class DynamicSchedule implements Trigger<ScheduledEventSpecification> {
|
|
|
3343
3760
|
toJSON(): TriggerMetadata;
|
|
3344
3761
|
}
|
|
3345
3762
|
|
|
3346
|
-
declare class ResumeWithTask {
|
|
3347
|
-
task: ServerTask;
|
|
3348
|
-
constructor(task: ServerTask);
|
|
3349
|
-
}
|
|
3350
3763
|
type IOTask = ServerTask;
|
|
3351
3764
|
type IOOptions = {
|
|
3352
3765
|
id: string;
|
|
@@ -3369,6 +3782,7 @@ declare class IO {
|
|
|
3369
3782
|
constructor(options: IOOptions);
|
|
3370
3783
|
get logger(): IOLogger;
|
|
3371
3784
|
wait(key: string | any[], seconds: number): Promise<void>;
|
|
3785
|
+
backgroundFetch<TResponseData>(key: string | any[], url: string, requestInit?: FetchRequestInit, retry?: FetchRetryOptions): Promise<TResponseData>;
|
|
3372
3786
|
sendEvent(key: string | any[], event: SendEvent, options?: SendEventOptions): Promise<{
|
|
3373
3787
|
context?: DeserializedJson | undefined;
|
|
3374
3788
|
deliverAt?: Date | null | undefined;
|
|
@@ -3381,8 +3795,8 @@ declare class IO {
|
|
|
3381
3795
|
updateSource(key: string | any[], options: {
|
|
3382
3796
|
key: string;
|
|
3383
3797
|
} & UpdateTriggerSourceBody): Promise<{
|
|
3384
|
-
key: string;
|
|
3385
3798
|
id: string;
|
|
3799
|
+
key: string;
|
|
3386
3800
|
}>;
|
|
3387
3801
|
registerInterval(key: string | any[], dynamicSchedule: DynamicSchedule, id: string, options: IntervalOptions): Promise<{
|
|
3388
3802
|
metadata?: any;
|
|
@@ -3431,7 +3845,12 @@ declare class IO {
|
|
|
3431
3845
|
key: string;
|
|
3432
3846
|
} | undefined>;
|
|
3433
3847
|
getAuth(key: string | any[], clientId?: string): Promise<ConnectionAuth | undefined>;
|
|
3434
|
-
runTask<
|
|
3848
|
+
runTask<TResult extends SerializableJson | void = void>(key: string | any[], options: RunTaskOptions, callback: (task: IOTask, io: IO) => Promise<TResult>, onError?: (error: unknown, task: IOTask, io: IO) => {
|
|
3849
|
+
retryAt: Date;
|
|
3850
|
+
error?: Error;
|
|
3851
|
+
jitter?: number;
|
|
3852
|
+
} | undefined | void): Promise<TResult>;
|
|
3853
|
+
try<TResult, TCatchResult>(tryCallback: () => Promise<TResult>, catchCallback: (error: unknown) => Promise<TCatchResult>): Promise<TResult | TCatchResult>;
|
|
3435
3854
|
}
|
|
3436
3855
|
type CallbackFunction = (level: "DEBUG" | "INFO" | "WARN" | "ERROR", message: string, properties?: Record<string, any>) => Promise<void>;
|
|
3437
3856
|
declare class IOLogger implements TaskLogger {
|
|
@@ -3449,25 +3868,30 @@ interface TriggerIntegration<TIntegrationClient extends IntegrationClient<any, a
|
|
|
3449
3868
|
id: string;
|
|
3450
3869
|
metadata: IntegrationMetadata;
|
|
3451
3870
|
}
|
|
3452
|
-
type IntegrationClient<TClient, TTasks extends Record<string, AuthenticatedTask<TClient, any, any>>> = {
|
|
3871
|
+
type IntegrationClient<TClient, TTasks extends Record<string, AuthenticatedTask<TClient, any, any, any>>> = {
|
|
3453
3872
|
usesLocalAuth: true;
|
|
3454
3873
|
client: TClient;
|
|
3455
3874
|
tasks?: TTasks;
|
|
3875
|
+
auth: any;
|
|
3456
3876
|
} | {
|
|
3457
3877
|
usesLocalAuth: false;
|
|
3458
3878
|
clientFactory: ClientFactory<TClient>;
|
|
3459
3879
|
tasks?: TTasks;
|
|
3460
3880
|
};
|
|
3461
|
-
type AuthenticatedTask<TClient, TParams, TResult> = {
|
|
3462
|
-
run: (params: TParams, client: TClient, task: ServerTask, io: IO) => Promise<TResult>;
|
|
3881
|
+
type AuthenticatedTask<TClient, TParams, TResult, TAuth = ConnectionAuth> = {
|
|
3882
|
+
run: (params: TParams, client: TClient, task: ServerTask, io: IO, auth: TAuth) => Promise<TResult>;
|
|
3463
3883
|
init: (params: TParams) => RunTaskOptions;
|
|
3884
|
+
onError?: (error: unknown, task: ServerTask) => {
|
|
3885
|
+
retryAt: Date;
|
|
3886
|
+
error?: Error;
|
|
3887
|
+
} | undefined | void;
|
|
3464
3888
|
};
|
|
3465
3889
|
declare function authenticatedTask<TClient, TParams, TResult>(options: {
|
|
3466
3890
|
run: (params: TParams, client: TClient, task: ServerTask, io: IO) => Promise<TResult>;
|
|
3467
3891
|
init: (params: TParams) => RunTaskOptions;
|
|
3468
3892
|
}): 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>>> = {
|
|
3893
|
+
type ExtractRunFunction<T> = T extends AuthenticatedTask<any, infer TParams, infer TResult, infer TAuth> ? (key: string, params: TParams) => Promise<TResult> : never;
|
|
3894
|
+
type ExtractTasks<TTasks extends Record<string, AuthenticatedTask<any, any, any, any>>> = {
|
|
3471
3895
|
[key in keyof TTasks]: ExtractRunFunction<TTasks[key]>;
|
|
3472
3896
|
};
|
|
3473
3897
|
type ExtractIntegrationClientClient<TIntegrationClient extends IntegrationClient<any, any>> = TIntegrationClient extends {
|
|
@@ -3550,33 +3974,29 @@ declare class MissingConnectionNotification implements Trigger<MissingConnection
|
|
|
3550
3974
|
source: string;
|
|
3551
3975
|
icon: string;
|
|
3552
3976
|
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3553
|
-
type: "DEVELOPER";
|
|
3554
3977
|
id: string;
|
|
3978
|
+
type: "DEVELOPER";
|
|
3555
3979
|
client: {
|
|
3980
|
+
id: string;
|
|
3556
3981
|
scopes: string[];
|
|
3557
3982
|
title: string;
|
|
3558
|
-
id: string;
|
|
3559
3983
|
createdAt: Date;
|
|
3560
3984
|
updatedAt: Date;
|
|
3561
|
-
integrationIdentifier: string;
|
|
3562
|
-
integrationAuthMethod: string;
|
|
3563
3985
|
};
|
|
3564
3986
|
authorizationUrl: string;
|
|
3565
3987
|
} | {
|
|
3566
|
-
type: "EXTERNAL";
|
|
3567
3988
|
id: string;
|
|
3989
|
+
type: "EXTERNAL";
|
|
3568
3990
|
account: {
|
|
3569
3991
|
metadata?: any;
|
|
3570
3992
|
id: string;
|
|
3571
3993
|
};
|
|
3572
3994
|
client: {
|
|
3995
|
+
id: string;
|
|
3573
3996
|
scopes: string[];
|
|
3574
3997
|
title: string;
|
|
3575
|
-
id: string;
|
|
3576
3998
|
createdAt: Date;
|
|
3577
3999
|
updatedAt: Date;
|
|
3578
|
-
integrationIdentifier: string;
|
|
3579
|
-
integrationAuthMethod: string;
|
|
3580
4000
|
};
|
|
3581
4001
|
authorizationUrl: string;
|
|
3582
4002
|
};
|
|
@@ -3599,12 +4019,12 @@ declare class MissingConnectionResolvedNotification implements Trigger<MissingCo
|
|
|
3599
4019
|
source: string;
|
|
3600
4020
|
icon: string;
|
|
3601
4021
|
parsePayload: (data: unknown, params?: Partial<zod.ParseParams> | undefined) => {
|
|
3602
|
-
type: "DEVELOPER";
|
|
3603
4022
|
id: string;
|
|
4023
|
+
type: "DEVELOPER";
|
|
3604
4024
|
client: {
|
|
4025
|
+
id: string;
|
|
3605
4026
|
scopes: string[];
|
|
3606
4027
|
title: string;
|
|
3607
|
-
id: string;
|
|
3608
4028
|
createdAt: Date;
|
|
3609
4029
|
updatedAt: Date;
|
|
3610
4030
|
integrationIdentifier: string;
|
|
@@ -3612,16 +4032,16 @@ declare class MissingConnectionResolvedNotification implements Trigger<MissingCo
|
|
|
3612
4032
|
};
|
|
3613
4033
|
expiresAt: Date;
|
|
3614
4034
|
} | {
|
|
3615
|
-
type: "EXTERNAL";
|
|
3616
4035
|
id: string;
|
|
4036
|
+
type: "EXTERNAL";
|
|
3617
4037
|
account: {
|
|
3618
4038
|
metadata?: any;
|
|
3619
4039
|
id: string;
|
|
3620
4040
|
};
|
|
3621
4041
|
client: {
|
|
4042
|
+
id: string;
|
|
3622
4043
|
scopes: string[];
|
|
3623
4044
|
title: string;
|
|
3624
|
-
id: string;
|
|
3625
4045
|
createdAt: Date;
|
|
3626
4046
|
updatedAt: Date;
|
|
3627
4047
|
integrationIdentifier: string;
|
|
@@ -3639,6 +4059,19 @@ declare class MissingConnectionResolvedNotification implements Trigger<MissingCo
|
|
|
3639
4059
|
toJSON(): TriggerMetadata;
|
|
3640
4060
|
}
|
|
3641
4061
|
|
|
3642
|
-
declare
|
|
4062
|
+
declare class ResumeWithTaskError {
|
|
4063
|
+
task: ServerTask;
|
|
4064
|
+
constructor(task: ServerTask);
|
|
4065
|
+
}
|
|
4066
|
+
declare class RetryWithTaskError {
|
|
4067
|
+
cause: ErrorWithStack;
|
|
4068
|
+
task: ServerTask;
|
|
4069
|
+
retryAt: Date;
|
|
4070
|
+
constructor(cause: ErrorWithStack, task: ServerTask, retryAt: Date);
|
|
4071
|
+
}
|
|
4072
|
+
declare function isTriggerError(err: unknown): err is ResumeWithTaskError | RetryWithTaskError;
|
|
4073
|
+
|
|
4074
|
+
type Task = ServerTask;
|
|
4075
|
+
declare function redactString(strings: TemplateStringsArray, ...interpolations: string[]): RedactString;
|
|
3643
4076
|
|
|
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,
|
|
4077
|
+
export { AuthenticatedTask, ClientFactory, CronTrigger, DynamicIntervalOptions, DynamicSchedule, DynamicTrigger, DynamicTriggerOptions, EventFilter, EventSpecification, EventSpecificationExample, EventTrigger, EventTypeFromSpecification, ExternalSource, ExternalSourceParams, ExternalSourceTrigger, ExternalSourceTriggerOptions, HandlerEvent, HttpSourceEvent, IO, IOLogger, IOOptions, IOTask, IOWithIntegrations, IntegrationClient, IntervalTrigger, Job, JobOptions, ListenOptions, Logger, MissingConnectionNotification, MissingConnectionResolvedNotification, NormalizedRequest, PreprocessResults, RedactString, Task, TaskLogger, Trigger, TriggerClient, TriggerClientOptions, TriggerContext, TriggerEventType, TriggerIntegration, TriggerPreprocessContext, authenticatedTask, cronTrigger, eventTrigger, intervalTrigger, isTriggerError, missingConnectionNotification, missingConnectionResolvedNotification, omit, redactString };
|