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