@trigger.dev/core 0.0.0-isomorphic-sdk-20230918151405 → 0.0.0-statuses-20230921210707
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 +300 -64
- package/dist/index.js +453 -543
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -73,6 +73,7 @@ __export(src_exports, {
|
|
|
73
73
|
FetchRetryStrategySchema: () => FetchRetryStrategySchema,
|
|
74
74
|
GetEventSchema: () => GetEventSchema,
|
|
75
75
|
GetRunSchema: () => GetRunSchema,
|
|
76
|
+
GetRunStatusesSchema: () => GetRunStatusesSchema,
|
|
76
77
|
GetRunsSchema: () => GetRunsSchema,
|
|
77
78
|
HandleTriggerSourceSchema: () => HandleTriggerSourceSchema,
|
|
78
79
|
HttpSourceRequestHeadersSchema: () => HttpSourceRequestHeadersSchema,
|
|
@@ -86,6 +87,7 @@ __export(src_exports, {
|
|
|
86
87
|
IntervalMetadataSchema: () => IntervalMetadataSchema,
|
|
87
88
|
IntervalOptionsSchema: () => IntervalOptionsSchema,
|
|
88
89
|
JobMetadataSchema: () => JobMetadataSchema,
|
|
90
|
+
JobRunStatusRecordSchema: () => JobRunStatusRecordSchema,
|
|
89
91
|
LogMessageSchema: () => LogMessageSchema,
|
|
90
92
|
Logger: () => Logger,
|
|
91
93
|
MISSING_CONNECTION_NOTIFICATION: () => MISSING_CONNECTION_NOTIFICATION,
|
|
@@ -147,6 +149,9 @@ __export(src_exports, {
|
|
|
147
149
|
ServerTaskSchema: () => ServerTaskSchema,
|
|
148
150
|
SourceMetadataV2Schema: () => SourceMetadataV2Schema,
|
|
149
151
|
StaticTriggerMetadataSchema: () => StaticTriggerMetadataSchema,
|
|
152
|
+
StatusHistorySchema: () => StatusHistorySchema,
|
|
153
|
+
StatusUpdateSchema: () => StatusUpdateSchema,
|
|
154
|
+
StatusUpdateStateSchema: () => StatusUpdateStateSchema,
|
|
150
155
|
StyleSchema: () => StyleSchema,
|
|
151
156
|
TaskSchema: () => TaskSchema,
|
|
152
157
|
TaskStatusSchema: () => TaskStatusSchema,
|
|
@@ -170,7 +175,6 @@ __export(src_exports, {
|
|
|
170
175
|
module.exports = __toCommonJS(src_exports);
|
|
171
176
|
|
|
172
177
|
// src/logger.ts
|
|
173
|
-
var import_node_buffer = require("buffer");
|
|
174
178
|
var logLevels = [
|
|
175
179
|
"log",
|
|
176
180
|
"error",
|
|
@@ -304,7 +308,7 @@ function prettyPrintBytes(value) {
|
|
|
304
308
|
if (process.env.NODE_ENV === "production") {
|
|
305
309
|
return "skipped size";
|
|
306
310
|
}
|
|
307
|
-
const sizeInBytes =
|
|
311
|
+
const sizeInBytes = Buffer.byteLength(JSON.stringify(value), "utf8");
|
|
308
312
|
if (sizeInBytes < 1024) {
|
|
309
313
|
return `${sizeInBytes} bytes`;
|
|
310
314
|
}
|
|
@@ -319,8 +323,8 @@ function prettyPrintBytes(value) {
|
|
|
319
323
|
__name(prettyPrintBytes, "prettyPrintBytes");
|
|
320
324
|
|
|
321
325
|
// src/schemas/api.ts
|
|
322
|
-
var
|
|
323
|
-
var
|
|
326
|
+
var import_ulid = require("ulid");
|
|
327
|
+
var import_zod11 = require("zod");
|
|
324
328
|
|
|
325
329
|
// src/schemas/addMissingVersionField.ts
|
|
326
330
|
function addMissingVersionField(val) {
|
|
@@ -617,456 +621,562 @@ var TriggerMetadataSchema = import_zod8.z.discriminatedUnion("type", [
|
|
|
617
621
|
ScheduledTriggerMetadataSchema
|
|
618
622
|
]);
|
|
619
623
|
|
|
624
|
+
// src/schemas/runs.ts
|
|
625
|
+
var import_zod10 = require("zod");
|
|
626
|
+
|
|
627
|
+
// src/schemas/statuses.ts
|
|
628
|
+
var import_zod9 = require("zod");
|
|
629
|
+
var StatusUpdateStateSchema = import_zod9.z.union([
|
|
630
|
+
import_zod9.z.literal("loading"),
|
|
631
|
+
import_zod9.z.literal("success"),
|
|
632
|
+
import_zod9.z.literal("failure")
|
|
633
|
+
]);
|
|
634
|
+
var StatusUpdateDataSchema = import_zod9.z.record(SerializableJsonSchema);
|
|
635
|
+
var StatusUpdateSchema = import_zod9.z.object({
|
|
636
|
+
label: import_zod9.z.string().optional(),
|
|
637
|
+
state: StatusUpdateStateSchema.optional(),
|
|
638
|
+
data: StatusUpdateDataSchema.optional()
|
|
639
|
+
});
|
|
640
|
+
var InitalStatusUpdateSchema = StatusUpdateSchema.required({
|
|
641
|
+
label: true
|
|
642
|
+
});
|
|
643
|
+
var StatusHistorySchema = import_zod9.z.array(StatusUpdateSchema);
|
|
644
|
+
var JobRunStatusRecordSchema = InitalStatusUpdateSchema.extend({
|
|
645
|
+
key: import_zod9.z.string(),
|
|
646
|
+
history: StatusHistorySchema
|
|
647
|
+
});
|
|
648
|
+
|
|
649
|
+
// src/schemas/runs.ts
|
|
650
|
+
var RunStatusSchema = import_zod10.z.union([
|
|
651
|
+
import_zod10.z.literal("PENDING"),
|
|
652
|
+
import_zod10.z.literal("QUEUED"),
|
|
653
|
+
import_zod10.z.literal("WAITING_ON_CONNECTIONS"),
|
|
654
|
+
import_zod10.z.literal("PREPROCESSING"),
|
|
655
|
+
import_zod10.z.literal("STARTED"),
|
|
656
|
+
import_zod10.z.literal("SUCCESS"),
|
|
657
|
+
import_zod10.z.literal("FAILURE"),
|
|
658
|
+
import_zod10.z.literal("TIMED_OUT"),
|
|
659
|
+
import_zod10.z.literal("ABORTED"),
|
|
660
|
+
import_zod10.z.literal("CANCELED")
|
|
661
|
+
]);
|
|
662
|
+
var RunTaskSchema = import_zod10.z.object({
|
|
663
|
+
/** The Task id */
|
|
664
|
+
id: import_zod10.z.string(),
|
|
665
|
+
/** The key that you defined when creating the Task, the first param in any task. */
|
|
666
|
+
displayKey: import_zod10.z.string().nullable(),
|
|
667
|
+
/** The Task status */
|
|
668
|
+
status: TaskStatusSchema,
|
|
669
|
+
/** The name of the Task */
|
|
670
|
+
name: import_zod10.z.string(),
|
|
671
|
+
/** The icon of the Task, a string.
|
|
672
|
+
* For integrations, this will be a lowercase name of the company.
|
|
673
|
+
* Can be used with the [@trigger.dev/companyicons](https://www.npmjs.com/package/@trigger.dev/companyicons) package to display an svg. */
|
|
674
|
+
icon: import_zod10.z.string().nullable(),
|
|
675
|
+
/** When the task started */
|
|
676
|
+
startedAt: import_zod10.z.coerce.date().nullable(),
|
|
677
|
+
/** When the task completed */
|
|
678
|
+
completedAt: import_zod10.z.coerce.date().nullable()
|
|
679
|
+
});
|
|
680
|
+
var RunTaskWithSubtasksSchema = RunTaskSchema.extend({
|
|
681
|
+
subtasks: import_zod10.z.lazy(() => RunTaskWithSubtasksSchema.array()).optional()
|
|
682
|
+
});
|
|
683
|
+
var GetRunOptionsSchema = import_zod10.z.object({
|
|
684
|
+
/** Return subtasks, which appear in a `subtasks` array on a task. @default false */
|
|
685
|
+
subtasks: import_zod10.z.boolean().optional(),
|
|
686
|
+
/** You can use this to get more tasks, if there are more than are returned in a single batch @default undefined */
|
|
687
|
+
cursor: import_zod10.z.string().optional(),
|
|
688
|
+
/** How many tasks you want to return in one go, max 50. @default 20 */
|
|
689
|
+
take: import_zod10.z.number().optional()
|
|
690
|
+
});
|
|
691
|
+
var GetRunOptionsWithTaskDetailsSchema = GetRunOptionsSchema.extend({
|
|
692
|
+
/** If `true`, it returns the `params` and `output` of all tasks. @default false */
|
|
693
|
+
taskdetails: import_zod10.z.boolean().optional()
|
|
694
|
+
});
|
|
695
|
+
var RunSchema = import_zod10.z.object({
|
|
696
|
+
/** The Run id */
|
|
697
|
+
id: import_zod10.z.string(),
|
|
698
|
+
/** The Run status */
|
|
699
|
+
status: RunStatusSchema,
|
|
700
|
+
/** When the run started */
|
|
701
|
+
startedAt: import_zod10.z.coerce.date().nullable(),
|
|
702
|
+
/** When the run was last updated */
|
|
703
|
+
updatedAt: import_zod10.z.coerce.date().nullable(),
|
|
704
|
+
/** When the run was completed */
|
|
705
|
+
completedAt: import_zod10.z.coerce.date().nullable()
|
|
706
|
+
});
|
|
707
|
+
var GetRunSchema = RunSchema.extend({
|
|
708
|
+
/** The output of the run */
|
|
709
|
+
output: import_zod10.z.any().optional(),
|
|
710
|
+
/** The tasks from the run */
|
|
711
|
+
tasks: import_zod10.z.array(RunTaskWithSubtasksSchema),
|
|
712
|
+
/** Any status updates that were published from the run */
|
|
713
|
+
statuses: import_zod10.z.array(JobRunStatusRecordSchema).default([]),
|
|
714
|
+
/** If there are more tasks, you can use this to get them */
|
|
715
|
+
nextCursor: import_zod10.z.string().optional()
|
|
716
|
+
});
|
|
717
|
+
var GetRunsOptionsSchema = import_zod10.z.object({
|
|
718
|
+
/** You can use this to get more tasks, if there are more than are returned in a single batch @default undefined */
|
|
719
|
+
cursor: import_zod10.z.string().optional(),
|
|
720
|
+
/** How many runs you want to return in one go, max 50. @default 20 */
|
|
721
|
+
take: import_zod10.z.number().optional()
|
|
722
|
+
});
|
|
723
|
+
var GetRunsSchema = import_zod10.z.object({
|
|
724
|
+
/** The runs from the query */
|
|
725
|
+
runs: RunSchema.array(),
|
|
726
|
+
/** If there are more runs, you can use this to get them */
|
|
727
|
+
nextCursor: import_zod10.z.string().optional()
|
|
728
|
+
});
|
|
729
|
+
|
|
620
730
|
// src/schemas/api.ts
|
|
621
|
-
var UpdateTriggerSourceBodyV1Schema =
|
|
622
|
-
registeredEvents:
|
|
623
|
-
secret:
|
|
731
|
+
var UpdateTriggerSourceBodyV1Schema = import_zod11.z.object({
|
|
732
|
+
registeredEvents: import_zod11.z.array(import_zod11.z.string()),
|
|
733
|
+
secret: import_zod11.z.string().optional(),
|
|
624
734
|
data: SerializableJsonSchema.optional()
|
|
625
735
|
});
|
|
626
|
-
var UpdateTriggerSourceBodyV2Schema =
|
|
627
|
-
secret:
|
|
736
|
+
var UpdateTriggerSourceBodyV2Schema = import_zod11.z.object({
|
|
737
|
+
secret: import_zod11.z.string().optional(),
|
|
628
738
|
data: SerializableJsonSchema.optional(),
|
|
629
|
-
options:
|
|
630
|
-
event:
|
|
631
|
-
}).and(
|
|
739
|
+
options: import_zod11.z.object({
|
|
740
|
+
event: import_zod11.z.array(import_zod11.z.string())
|
|
741
|
+
}).and(import_zod11.z.record(import_zod11.z.string(), import_zod11.z.array(import_zod11.z.string())).optional())
|
|
632
742
|
});
|
|
633
|
-
var RegisterHTTPTriggerSourceBodySchema =
|
|
634
|
-
type:
|
|
635
|
-
url:
|
|
743
|
+
var RegisterHTTPTriggerSourceBodySchema = import_zod11.z.object({
|
|
744
|
+
type: import_zod11.z.literal("HTTP"),
|
|
745
|
+
url: import_zod11.z.string().url()
|
|
636
746
|
});
|
|
637
|
-
var RegisterSMTPTriggerSourceBodySchema =
|
|
638
|
-
type:
|
|
747
|
+
var RegisterSMTPTriggerSourceBodySchema = import_zod11.z.object({
|
|
748
|
+
type: import_zod11.z.literal("SMTP")
|
|
639
749
|
});
|
|
640
|
-
var RegisterSQSTriggerSourceBodySchema =
|
|
641
|
-
type:
|
|
750
|
+
var RegisterSQSTriggerSourceBodySchema = import_zod11.z.object({
|
|
751
|
+
type: import_zod11.z.literal("SQS")
|
|
642
752
|
});
|
|
643
|
-
var RegisterSourceChannelBodySchema =
|
|
753
|
+
var RegisterSourceChannelBodySchema = import_zod11.z.discriminatedUnion("type", [
|
|
644
754
|
RegisterHTTPTriggerSourceBodySchema,
|
|
645
755
|
RegisterSMTPTriggerSourceBodySchema,
|
|
646
756
|
RegisterSQSTriggerSourceBodySchema
|
|
647
757
|
]);
|
|
648
758
|
var REGISTER_SOURCE_EVENT_V1 = "dev.trigger.source.register";
|
|
649
759
|
var REGISTER_SOURCE_EVENT_V2 = "dev.trigger.source.register.v2";
|
|
650
|
-
var RegisterTriggerSourceSchema =
|
|
651
|
-
key:
|
|
652
|
-
params:
|
|
653
|
-
active:
|
|
654
|
-
secret:
|
|
760
|
+
var RegisterTriggerSourceSchema = import_zod11.z.object({
|
|
761
|
+
key: import_zod11.z.string(),
|
|
762
|
+
params: import_zod11.z.any(),
|
|
763
|
+
active: import_zod11.z.boolean(),
|
|
764
|
+
secret: import_zod11.z.string(),
|
|
655
765
|
data: DeserializedJsonSchema.optional(),
|
|
656
766
|
channel: RegisterSourceChannelBodySchema,
|
|
657
|
-
clientId:
|
|
767
|
+
clientId: import_zod11.z.string().optional()
|
|
658
768
|
});
|
|
659
|
-
var SourceEventOptionSchema =
|
|
660
|
-
name:
|
|
661
|
-
value:
|
|
769
|
+
var SourceEventOptionSchema = import_zod11.z.object({
|
|
770
|
+
name: import_zod11.z.string(),
|
|
771
|
+
value: import_zod11.z.string()
|
|
662
772
|
});
|
|
663
|
-
var RegisterSourceEventSchemaV1 =
|
|
773
|
+
var RegisterSourceEventSchemaV1 = import_zod11.z.object({
|
|
664
774
|
/** The id of the source */
|
|
665
|
-
id:
|
|
775
|
+
id: import_zod11.z.string(),
|
|
666
776
|
source: RegisterTriggerSourceSchema,
|
|
667
|
-
events:
|
|
668
|
-
missingEvents:
|
|
669
|
-
orphanedEvents:
|
|
670
|
-
dynamicTriggerId:
|
|
777
|
+
events: import_zod11.z.array(import_zod11.z.string()),
|
|
778
|
+
missingEvents: import_zod11.z.array(import_zod11.z.string()),
|
|
779
|
+
orphanedEvents: import_zod11.z.array(import_zod11.z.string()),
|
|
780
|
+
dynamicTriggerId: import_zod11.z.string().optional()
|
|
671
781
|
});
|
|
672
|
-
var RegisteredOptionsDiffSchema =
|
|
673
|
-
desired:
|
|
674
|
-
missing:
|
|
675
|
-
orphaned:
|
|
782
|
+
var RegisteredOptionsDiffSchema = import_zod11.z.object({
|
|
783
|
+
desired: import_zod11.z.array(import_zod11.z.string()),
|
|
784
|
+
missing: import_zod11.z.array(import_zod11.z.string()),
|
|
785
|
+
orphaned: import_zod11.z.array(import_zod11.z.string())
|
|
676
786
|
});
|
|
677
|
-
var RegisterSourceEventOptionsSchema =
|
|
787
|
+
var RegisterSourceEventOptionsSchema = import_zod11.z.object({
|
|
678
788
|
event: RegisteredOptionsDiffSchema
|
|
679
|
-
}).and(
|
|
680
|
-
var RegisterSourceEventSchemaV2 =
|
|
789
|
+
}).and(import_zod11.z.record(import_zod11.z.string(), RegisteredOptionsDiffSchema));
|
|
790
|
+
var RegisterSourceEventSchemaV2 = import_zod11.z.object({
|
|
681
791
|
/** The id of the source */
|
|
682
|
-
id:
|
|
792
|
+
id: import_zod11.z.string(),
|
|
683
793
|
source: RegisterTriggerSourceSchema,
|
|
684
794
|
options: RegisterSourceEventOptionsSchema,
|
|
685
|
-
dynamicTriggerId:
|
|
795
|
+
dynamicTriggerId: import_zod11.z.string().optional()
|
|
686
796
|
});
|
|
687
|
-
var TriggerSourceSchema =
|
|
688
|
-
id:
|
|
689
|
-
key:
|
|
797
|
+
var TriggerSourceSchema = import_zod11.z.object({
|
|
798
|
+
id: import_zod11.z.string(),
|
|
799
|
+
key: import_zod11.z.string()
|
|
690
800
|
});
|
|
691
801
|
var HttpSourceResponseMetadataSchema = DeserializedJsonSchema;
|
|
692
|
-
var HandleTriggerSourceSchema =
|
|
693
|
-
key:
|
|
694
|
-
secret:
|
|
695
|
-
data:
|
|
696
|
-
params:
|
|
802
|
+
var HandleTriggerSourceSchema = import_zod11.z.object({
|
|
803
|
+
key: import_zod11.z.string(),
|
|
804
|
+
secret: import_zod11.z.string(),
|
|
805
|
+
data: import_zod11.z.any(),
|
|
806
|
+
params: import_zod11.z.any(),
|
|
697
807
|
auth: ConnectionAuthSchema.optional(),
|
|
698
808
|
metadata: HttpSourceResponseMetadataSchema.optional()
|
|
699
809
|
});
|
|
700
|
-
var HttpSourceRequestSchema =
|
|
701
|
-
url:
|
|
702
|
-
method:
|
|
703
|
-
headers:
|
|
704
|
-
rawBody:
|
|
705
|
-
});
|
|
706
|
-
var HttpSourceRequestHeadersSchema =
|
|
707
|
-
"x-ts-key":
|
|
708
|
-
"x-ts-dynamic-id":
|
|
709
|
-
"x-ts-secret":
|
|
710
|
-
"x-ts-data":
|
|
711
|
-
"x-ts-params":
|
|
712
|
-
"x-ts-http-url":
|
|
713
|
-
"x-ts-http-method":
|
|
714
|
-
"x-ts-http-headers":
|
|
715
|
-
"x-ts-auth":
|
|
810
|
+
var HttpSourceRequestSchema = import_zod11.z.object({
|
|
811
|
+
url: import_zod11.z.string().url(),
|
|
812
|
+
method: import_zod11.z.string(),
|
|
813
|
+
headers: import_zod11.z.record(import_zod11.z.string()),
|
|
814
|
+
rawBody: import_zod11.z.instanceof(Buffer).optional().nullable()
|
|
815
|
+
});
|
|
816
|
+
var HttpSourceRequestHeadersSchema = import_zod11.z.object({
|
|
817
|
+
"x-ts-key": import_zod11.z.string(),
|
|
818
|
+
"x-ts-dynamic-id": import_zod11.z.string().optional(),
|
|
819
|
+
"x-ts-secret": import_zod11.z.string(),
|
|
820
|
+
"x-ts-data": import_zod11.z.string().transform((s) => JSON.parse(s)),
|
|
821
|
+
"x-ts-params": import_zod11.z.string().transform((s) => JSON.parse(s)),
|
|
822
|
+
"x-ts-http-url": import_zod11.z.string(),
|
|
823
|
+
"x-ts-http-method": import_zod11.z.string(),
|
|
824
|
+
"x-ts-http-headers": import_zod11.z.string().transform((s) => import_zod11.z.record(import_zod11.z.string()).parse(JSON.parse(s))),
|
|
825
|
+
"x-ts-auth": import_zod11.z.string().optional().transform((s) => {
|
|
716
826
|
if (s === void 0)
|
|
717
827
|
return;
|
|
718
828
|
const json = JSON.parse(s);
|
|
719
829
|
return ConnectionAuthSchema.parse(json);
|
|
720
830
|
}),
|
|
721
|
-
"x-ts-metadata":
|
|
831
|
+
"x-ts-metadata": import_zod11.z.string().optional().transform((s) => {
|
|
722
832
|
if (s === void 0)
|
|
723
833
|
return;
|
|
724
834
|
const json = JSON.parse(s);
|
|
725
835
|
return DeserializedJsonSchema.parse(json);
|
|
726
836
|
})
|
|
727
837
|
});
|
|
728
|
-
var PongSuccessResponseSchema =
|
|
729
|
-
ok:
|
|
838
|
+
var PongSuccessResponseSchema = import_zod11.z.object({
|
|
839
|
+
ok: import_zod11.z.literal(true)
|
|
730
840
|
});
|
|
731
|
-
var PongErrorResponseSchema =
|
|
732
|
-
ok:
|
|
733
|
-
error:
|
|
841
|
+
var PongErrorResponseSchema = import_zod11.z.object({
|
|
842
|
+
ok: import_zod11.z.literal(false),
|
|
843
|
+
error: import_zod11.z.string()
|
|
734
844
|
});
|
|
735
|
-
var PongResponseSchema =
|
|
845
|
+
var PongResponseSchema = import_zod11.z.discriminatedUnion("ok", [
|
|
736
846
|
PongSuccessResponseSchema,
|
|
737
847
|
PongErrorResponseSchema
|
|
738
848
|
]);
|
|
739
|
-
var ValidateSuccessResponseSchema =
|
|
740
|
-
ok:
|
|
741
|
-
endpointId:
|
|
849
|
+
var ValidateSuccessResponseSchema = import_zod11.z.object({
|
|
850
|
+
ok: import_zod11.z.literal(true),
|
|
851
|
+
endpointId: import_zod11.z.string()
|
|
742
852
|
});
|
|
743
|
-
var ValidateErrorResponseSchema =
|
|
744
|
-
ok:
|
|
745
|
-
error:
|
|
853
|
+
var ValidateErrorResponseSchema = import_zod11.z.object({
|
|
854
|
+
ok: import_zod11.z.literal(false),
|
|
855
|
+
error: import_zod11.z.string()
|
|
746
856
|
});
|
|
747
|
-
var ValidateResponseSchema =
|
|
857
|
+
var ValidateResponseSchema = import_zod11.z.discriminatedUnion("ok", [
|
|
748
858
|
ValidateSuccessResponseSchema,
|
|
749
859
|
ValidateErrorResponseSchema
|
|
750
860
|
]);
|
|
751
|
-
var QueueOptionsSchema =
|
|
752
|
-
name:
|
|
753
|
-
maxConcurrent:
|
|
754
|
-
});
|
|
755
|
-
var JobMetadataSchema =
|
|
756
|
-
id:
|
|
757
|
-
name:
|
|
758
|
-
version:
|
|
861
|
+
var QueueOptionsSchema = import_zod11.z.object({
|
|
862
|
+
name: import_zod11.z.string(),
|
|
863
|
+
maxConcurrent: import_zod11.z.number().optional()
|
|
864
|
+
});
|
|
865
|
+
var JobMetadataSchema = import_zod11.z.object({
|
|
866
|
+
id: import_zod11.z.string(),
|
|
867
|
+
name: import_zod11.z.string(),
|
|
868
|
+
version: import_zod11.z.string(),
|
|
759
869
|
event: EventSpecificationSchema,
|
|
760
870
|
trigger: TriggerMetadataSchema,
|
|
761
|
-
integrations:
|
|
762
|
-
internal:
|
|
763
|
-
enabled:
|
|
764
|
-
startPosition:
|
|
871
|
+
integrations: import_zod11.z.record(IntegrationConfigSchema),
|
|
872
|
+
internal: import_zod11.z.boolean().default(false),
|
|
873
|
+
enabled: import_zod11.z.boolean(),
|
|
874
|
+
startPosition: import_zod11.z.enum([
|
|
765
875
|
"initial",
|
|
766
876
|
"latest"
|
|
767
877
|
]),
|
|
768
|
-
preprocessRuns:
|
|
878
|
+
preprocessRuns: import_zod11.z.boolean()
|
|
769
879
|
});
|
|
770
|
-
var SourceMetadataV1Schema =
|
|
771
|
-
version:
|
|
772
|
-
channel:
|
|
880
|
+
var SourceMetadataV1Schema = import_zod11.z.object({
|
|
881
|
+
version: import_zod11.z.literal("1"),
|
|
882
|
+
channel: import_zod11.z.enum([
|
|
773
883
|
"HTTP",
|
|
774
884
|
"SQS",
|
|
775
885
|
"SMTP"
|
|
776
886
|
]),
|
|
777
887
|
integration: IntegrationConfigSchema,
|
|
778
|
-
key:
|
|
779
|
-
params:
|
|
780
|
-
events:
|
|
781
|
-
registerSourceJob:
|
|
782
|
-
id:
|
|
783
|
-
version:
|
|
888
|
+
key: import_zod11.z.string(),
|
|
889
|
+
params: import_zod11.z.any(),
|
|
890
|
+
events: import_zod11.z.array(import_zod11.z.string()),
|
|
891
|
+
registerSourceJob: import_zod11.z.object({
|
|
892
|
+
id: import_zod11.z.string(),
|
|
893
|
+
version: import_zod11.z.string()
|
|
784
894
|
}).optional()
|
|
785
895
|
});
|
|
786
|
-
var SourceMetadataV2Schema =
|
|
787
|
-
version:
|
|
788
|
-
channel:
|
|
896
|
+
var SourceMetadataV2Schema = import_zod11.z.object({
|
|
897
|
+
version: import_zod11.z.literal("2"),
|
|
898
|
+
channel: import_zod11.z.enum([
|
|
789
899
|
"HTTP",
|
|
790
900
|
"SQS",
|
|
791
901
|
"SMTP"
|
|
792
902
|
]),
|
|
793
903
|
integration: IntegrationConfigSchema,
|
|
794
|
-
key:
|
|
795
|
-
params:
|
|
796
|
-
options:
|
|
797
|
-
registerSourceJob:
|
|
798
|
-
id:
|
|
799
|
-
version:
|
|
904
|
+
key: import_zod11.z.string(),
|
|
905
|
+
params: import_zod11.z.any(),
|
|
906
|
+
options: import_zod11.z.record(import_zod11.z.array(import_zod11.z.string())),
|
|
907
|
+
registerSourceJob: import_zod11.z.object({
|
|
908
|
+
id: import_zod11.z.string(),
|
|
909
|
+
version: import_zod11.z.string()
|
|
800
910
|
}).optional()
|
|
801
911
|
});
|
|
802
|
-
var SourceMetadataSchema =
|
|
912
|
+
var SourceMetadataSchema = import_zod11.z.preprocess(addMissingVersionField, import_zod11.z.discriminatedUnion("version", [
|
|
803
913
|
SourceMetadataV1Schema,
|
|
804
914
|
SourceMetadataV2Schema
|
|
805
915
|
]));
|
|
806
|
-
var DynamicTriggerEndpointMetadataSchema =
|
|
807
|
-
id:
|
|
808
|
-
jobs:
|
|
916
|
+
var DynamicTriggerEndpointMetadataSchema = import_zod11.z.object({
|
|
917
|
+
id: import_zod11.z.string(),
|
|
918
|
+
jobs: import_zod11.z.array(JobMetadataSchema.pick({
|
|
809
919
|
id: true,
|
|
810
920
|
version: true
|
|
811
921
|
})),
|
|
812
|
-
registerSourceJob:
|
|
813
|
-
id:
|
|
814
|
-
version:
|
|
922
|
+
registerSourceJob: import_zod11.z.object({
|
|
923
|
+
id: import_zod11.z.string(),
|
|
924
|
+
version: import_zod11.z.string()
|
|
815
925
|
}).optional()
|
|
816
926
|
});
|
|
817
|
-
var IndexEndpointResponseSchema =
|
|
818
|
-
jobs:
|
|
819
|
-
sources:
|
|
820
|
-
dynamicTriggers:
|
|
821
|
-
dynamicSchedules:
|
|
927
|
+
var IndexEndpointResponseSchema = import_zod11.z.object({
|
|
928
|
+
jobs: import_zod11.z.array(JobMetadataSchema),
|
|
929
|
+
sources: import_zod11.z.array(SourceMetadataSchema),
|
|
930
|
+
dynamicTriggers: import_zod11.z.array(DynamicTriggerEndpointMetadataSchema),
|
|
931
|
+
dynamicSchedules: import_zod11.z.array(RegisterDynamicSchedulePayloadSchema)
|
|
822
932
|
});
|
|
823
|
-
var RawEventSchema =
|
|
933
|
+
var RawEventSchema = import_zod11.z.object({
|
|
824
934
|
/** The `name` property must exactly match any subscriptions you want to
|
|
825
935
|
trigger. */
|
|
826
|
-
name:
|
|
936
|
+
name: import_zod11.z.string(),
|
|
827
937
|
/** The `payload` property will be sent to any matching Jobs and will appear
|
|
828
938
|
as the `payload` param of the `run()` function. You can leave this
|
|
829
939
|
parameter out if you just want to trigger a Job without any input data. */
|
|
830
|
-
payload:
|
|
940
|
+
payload: import_zod11.z.any(),
|
|
831
941
|
/** The optional `context` property will be sent to any matching Jobs and will
|
|
832
942
|
be passed through as the `context.event.context` param of the `run()`
|
|
833
943
|
function. This is optional but can be useful if you want to pass through
|
|
834
944
|
some additional context to the Job. */
|
|
835
|
-
context:
|
|
945
|
+
context: import_zod11.z.any().optional(),
|
|
836
946
|
/** The `id` property uniquely identify this particular event. If unset it
|
|
837
947
|
will be set automatically using `ulid`. */
|
|
838
|
-
id:
|
|
948
|
+
id: import_zod11.z.string().default(() => (0, import_ulid.ulid)()),
|
|
839
949
|
/** This is optional, it defaults to the current timestamp. Usually you would
|
|
840
950
|
only set this if you have a timestamp that you wish to pass through, e.g.
|
|
841
951
|
you receive a timestamp from a service and you want the same timestamp to
|
|
842
952
|
be used in your Job. */
|
|
843
|
-
timestamp:
|
|
953
|
+
timestamp: import_zod11.z.coerce.date().optional(),
|
|
844
954
|
/** This is optional, it defaults to "trigger.dev". It can be useful to set
|
|
845
955
|
this as you can filter events using this in the `eventTrigger()`. */
|
|
846
|
-
source:
|
|
956
|
+
source: import_zod11.z.string().optional()
|
|
847
957
|
});
|
|
848
|
-
var ApiEventLogSchema =
|
|
958
|
+
var ApiEventLogSchema = import_zod11.z.object({
|
|
849
959
|
/** The `id` of the event that was sent.
|
|
850
960
|
*/
|
|
851
|
-
id:
|
|
961
|
+
id: import_zod11.z.string(),
|
|
852
962
|
/** The `name` of the event that was sent. */
|
|
853
|
-
name:
|
|
963
|
+
name: import_zod11.z.string(),
|
|
854
964
|
/** The `payload` of the event that was sent */
|
|
855
965
|
payload: DeserializedJsonSchema,
|
|
856
966
|
/** The `context` of the event that was sent. Is `undefined` if no context was
|
|
857
967
|
set when sending the event. */
|
|
858
968
|
context: DeserializedJsonSchema.optional().nullable(),
|
|
859
969
|
/** The `timestamp` of the event that was sent */
|
|
860
|
-
timestamp:
|
|
970
|
+
timestamp: import_zod11.z.coerce.date(),
|
|
861
971
|
/** The timestamp when the event will be delivered to any matching Jobs. Is
|
|
862
972
|
`undefined` if `deliverAt` or `deliverAfter` wasn't set when sending the
|
|
863
973
|
event. */
|
|
864
|
-
deliverAt:
|
|
974
|
+
deliverAt: import_zod11.z.coerce.date().optional().nullable(),
|
|
865
975
|
/** The timestamp when the event was delivered. Is `undefined` if `deliverAt`
|
|
866
976
|
or `deliverAfter` were set when sending the event. */
|
|
867
|
-
deliveredAt:
|
|
977
|
+
deliveredAt: import_zod11.z.coerce.date().optional().nullable(),
|
|
868
978
|
/** The timestamp when the event was cancelled. Is `undefined` if the event
|
|
869
979
|
* wasn't cancelled. */
|
|
870
|
-
cancelledAt:
|
|
980
|
+
cancelledAt: import_zod11.z.coerce.date().optional().nullable()
|
|
871
981
|
});
|
|
872
|
-
var SendEventOptionsSchema =
|
|
982
|
+
var SendEventOptionsSchema = import_zod11.z.object({
|
|
873
983
|
/** An optional Date when you want the event to trigger Jobs. The event will
|
|
874
984
|
be sent to the platform immediately but won't be acted upon until the
|
|
875
985
|
specified time. */
|
|
876
|
-
deliverAt:
|
|
986
|
+
deliverAt: import_zod11.z.coerce.date().optional(),
|
|
877
987
|
/** An optional number of seconds you want to wait for the event to trigger
|
|
878
988
|
any relevant Jobs. The event will be sent to the platform immediately but
|
|
879
989
|
won't be delivered until after the elapsed number of seconds. */
|
|
880
|
-
deliverAfter:
|
|
990
|
+
deliverAfter: import_zod11.z.number().int().optional(),
|
|
881
991
|
/** This optional param will be used by Trigger.dev Connect, which
|
|
882
992
|
is coming soon. */
|
|
883
|
-
accountId:
|
|
993
|
+
accountId: import_zod11.z.string().optional()
|
|
884
994
|
});
|
|
885
|
-
var SendEventBodySchema =
|
|
995
|
+
var SendEventBodySchema = import_zod11.z.object({
|
|
886
996
|
event: RawEventSchema,
|
|
887
997
|
options: SendEventOptionsSchema.optional()
|
|
888
998
|
});
|
|
889
|
-
var DeliverEventResponseSchema =
|
|
890
|
-
deliveredAt:
|
|
999
|
+
var DeliverEventResponseSchema = import_zod11.z.object({
|
|
1000
|
+
deliveredAt: import_zod11.z.string().datetime()
|
|
891
1001
|
});
|
|
892
|
-
var RuntimeEnvironmentTypeSchema =
|
|
1002
|
+
var RuntimeEnvironmentTypeSchema = import_zod11.z.enum([
|
|
893
1003
|
"PRODUCTION",
|
|
894
1004
|
"STAGING",
|
|
895
1005
|
"DEVELOPMENT",
|
|
896
1006
|
"PREVIEW"
|
|
897
1007
|
]);
|
|
898
|
-
var RunSourceContextSchema =
|
|
899
|
-
id:
|
|
900
|
-
metadata:
|
|
1008
|
+
var RunSourceContextSchema = import_zod11.z.object({
|
|
1009
|
+
id: import_zod11.z.string(),
|
|
1010
|
+
metadata: import_zod11.z.any()
|
|
901
1011
|
});
|
|
902
|
-
var RunJobBodySchema =
|
|
1012
|
+
var RunJobBodySchema = import_zod11.z.object({
|
|
903
1013
|
event: ApiEventLogSchema,
|
|
904
|
-
job:
|
|
905
|
-
id:
|
|
906
|
-
version:
|
|
1014
|
+
job: import_zod11.z.object({
|
|
1015
|
+
id: import_zod11.z.string(),
|
|
1016
|
+
version: import_zod11.z.string()
|
|
907
1017
|
}),
|
|
908
|
-
run:
|
|
909
|
-
id:
|
|
910
|
-
isTest:
|
|
911
|
-
isRetry:
|
|
912
|
-
startedAt:
|
|
1018
|
+
run: import_zod11.z.object({
|
|
1019
|
+
id: import_zod11.z.string(),
|
|
1020
|
+
isTest: import_zod11.z.boolean(),
|
|
1021
|
+
isRetry: import_zod11.z.boolean().default(false),
|
|
1022
|
+
startedAt: import_zod11.z.coerce.date()
|
|
913
1023
|
}),
|
|
914
|
-
environment:
|
|
915
|
-
id:
|
|
916
|
-
slug:
|
|
1024
|
+
environment: import_zod11.z.object({
|
|
1025
|
+
id: import_zod11.z.string(),
|
|
1026
|
+
slug: import_zod11.z.string(),
|
|
917
1027
|
type: RuntimeEnvironmentTypeSchema
|
|
918
1028
|
}),
|
|
919
|
-
organization:
|
|
920
|
-
id:
|
|
921
|
-
title:
|
|
922
|
-
slug:
|
|
1029
|
+
organization: import_zod11.z.object({
|
|
1030
|
+
id: import_zod11.z.string(),
|
|
1031
|
+
title: import_zod11.z.string(),
|
|
1032
|
+
slug: import_zod11.z.string()
|
|
923
1033
|
}),
|
|
924
|
-
account:
|
|
925
|
-
id:
|
|
926
|
-
metadata:
|
|
1034
|
+
account: import_zod11.z.object({
|
|
1035
|
+
id: import_zod11.z.string(),
|
|
1036
|
+
metadata: import_zod11.z.any()
|
|
927
1037
|
}).optional(),
|
|
928
1038
|
source: RunSourceContextSchema.optional(),
|
|
929
|
-
tasks:
|
|
930
|
-
connections:
|
|
1039
|
+
tasks: import_zod11.z.array(CachedTaskSchema).optional(),
|
|
1040
|
+
connections: import_zod11.z.record(ConnectionAuthSchema).optional()
|
|
931
1041
|
});
|
|
932
|
-
var RunJobErrorSchema =
|
|
933
|
-
status:
|
|
1042
|
+
var RunJobErrorSchema = import_zod11.z.object({
|
|
1043
|
+
status: import_zod11.z.literal("ERROR"),
|
|
934
1044
|
error: ErrorWithStackSchema,
|
|
935
1045
|
task: TaskSchema.optional()
|
|
936
1046
|
});
|
|
937
|
-
var RunJobResumeWithTaskSchema =
|
|
938
|
-
status:
|
|
1047
|
+
var RunJobResumeWithTaskSchema = import_zod11.z.object({
|
|
1048
|
+
status: import_zod11.z.literal("RESUME_WITH_TASK"),
|
|
939
1049
|
task: TaskSchema
|
|
940
1050
|
});
|
|
941
|
-
var RunJobRetryWithTaskSchema =
|
|
942
|
-
status:
|
|
1051
|
+
var RunJobRetryWithTaskSchema = import_zod11.z.object({
|
|
1052
|
+
status: import_zod11.z.literal("RETRY_WITH_TASK"),
|
|
943
1053
|
task: TaskSchema,
|
|
944
1054
|
error: ErrorWithStackSchema,
|
|
945
|
-
retryAt:
|
|
1055
|
+
retryAt: import_zod11.z.coerce.date()
|
|
946
1056
|
});
|
|
947
|
-
var RunJobCanceledWithTaskSchema =
|
|
948
|
-
status:
|
|
1057
|
+
var RunJobCanceledWithTaskSchema = import_zod11.z.object({
|
|
1058
|
+
status: import_zod11.z.literal("CANCELED"),
|
|
949
1059
|
task: TaskSchema
|
|
950
1060
|
});
|
|
951
|
-
var RunJobSuccessSchema =
|
|
952
|
-
status:
|
|
1061
|
+
var RunJobSuccessSchema = import_zod11.z.object({
|
|
1062
|
+
status: import_zod11.z.literal("SUCCESS"),
|
|
953
1063
|
output: DeserializedJsonSchema.optional()
|
|
954
1064
|
});
|
|
955
|
-
var RunJobResponseSchema =
|
|
1065
|
+
var RunJobResponseSchema = import_zod11.z.discriminatedUnion("status", [
|
|
956
1066
|
RunJobErrorSchema,
|
|
957
1067
|
RunJobResumeWithTaskSchema,
|
|
958
1068
|
RunJobRetryWithTaskSchema,
|
|
959
1069
|
RunJobCanceledWithTaskSchema,
|
|
960
1070
|
RunJobSuccessSchema
|
|
961
1071
|
]);
|
|
962
|
-
var PreprocessRunBodySchema =
|
|
1072
|
+
var PreprocessRunBodySchema = import_zod11.z.object({
|
|
963
1073
|
event: ApiEventLogSchema,
|
|
964
|
-
job:
|
|
965
|
-
id:
|
|
966
|
-
version:
|
|
1074
|
+
job: import_zod11.z.object({
|
|
1075
|
+
id: import_zod11.z.string(),
|
|
1076
|
+
version: import_zod11.z.string()
|
|
967
1077
|
}),
|
|
968
|
-
run:
|
|
969
|
-
id:
|
|
970
|
-
isTest:
|
|
1078
|
+
run: import_zod11.z.object({
|
|
1079
|
+
id: import_zod11.z.string(),
|
|
1080
|
+
isTest: import_zod11.z.boolean()
|
|
971
1081
|
}),
|
|
972
|
-
environment:
|
|
973
|
-
id:
|
|
974
|
-
slug:
|
|
1082
|
+
environment: import_zod11.z.object({
|
|
1083
|
+
id: import_zod11.z.string(),
|
|
1084
|
+
slug: import_zod11.z.string(),
|
|
975
1085
|
type: RuntimeEnvironmentTypeSchema
|
|
976
1086
|
}),
|
|
977
|
-
organization:
|
|
978
|
-
id:
|
|
979
|
-
title:
|
|
980
|
-
slug:
|
|
1087
|
+
organization: import_zod11.z.object({
|
|
1088
|
+
id: import_zod11.z.string(),
|
|
1089
|
+
title: import_zod11.z.string(),
|
|
1090
|
+
slug: import_zod11.z.string()
|
|
981
1091
|
}),
|
|
982
|
-
account:
|
|
983
|
-
id:
|
|
984
|
-
metadata:
|
|
1092
|
+
account: import_zod11.z.object({
|
|
1093
|
+
id: import_zod11.z.string(),
|
|
1094
|
+
metadata: import_zod11.z.any()
|
|
985
1095
|
}).optional()
|
|
986
1096
|
});
|
|
987
|
-
var PreprocessRunResponseSchema =
|
|
988
|
-
abort:
|
|
989
|
-
properties:
|
|
1097
|
+
var PreprocessRunResponseSchema = import_zod11.z.object({
|
|
1098
|
+
abort: import_zod11.z.boolean(),
|
|
1099
|
+
properties: import_zod11.z.array(DisplayPropertySchema).optional()
|
|
990
1100
|
});
|
|
991
|
-
var CreateRunResponseOkSchema =
|
|
992
|
-
ok:
|
|
993
|
-
data:
|
|
994
|
-
id:
|
|
1101
|
+
var CreateRunResponseOkSchema = import_zod11.z.object({
|
|
1102
|
+
ok: import_zod11.z.literal(true),
|
|
1103
|
+
data: import_zod11.z.object({
|
|
1104
|
+
id: import_zod11.z.string()
|
|
995
1105
|
})
|
|
996
1106
|
});
|
|
997
|
-
var CreateRunResponseErrorSchema =
|
|
998
|
-
ok:
|
|
999
|
-
error:
|
|
1107
|
+
var CreateRunResponseErrorSchema = import_zod11.z.object({
|
|
1108
|
+
ok: import_zod11.z.literal(false),
|
|
1109
|
+
error: import_zod11.z.string()
|
|
1000
1110
|
});
|
|
1001
|
-
var CreateRunResponseBodySchema =
|
|
1111
|
+
var CreateRunResponseBodySchema = import_zod11.z.discriminatedUnion("ok", [
|
|
1002
1112
|
CreateRunResponseOkSchema,
|
|
1003
1113
|
CreateRunResponseErrorSchema
|
|
1004
1114
|
]);
|
|
1005
|
-
var RedactStringSchema =
|
|
1006
|
-
__redactedString:
|
|
1007
|
-
strings:
|
|
1008
|
-
interpolations:
|
|
1115
|
+
var RedactStringSchema = import_zod11.z.object({
|
|
1116
|
+
__redactedString: import_zod11.z.literal(true),
|
|
1117
|
+
strings: import_zod11.z.array(import_zod11.z.string()),
|
|
1118
|
+
interpolations: import_zod11.z.array(import_zod11.z.string())
|
|
1009
1119
|
});
|
|
1010
|
-
var LogMessageSchema =
|
|
1011
|
-
level:
|
|
1120
|
+
var LogMessageSchema = import_zod11.z.object({
|
|
1121
|
+
level: import_zod11.z.enum([
|
|
1012
1122
|
"DEBUG",
|
|
1013
1123
|
"INFO",
|
|
1014
1124
|
"WARN",
|
|
1015
1125
|
"ERROR"
|
|
1016
1126
|
]),
|
|
1017
|
-
message:
|
|
1127
|
+
message: import_zod11.z.string(),
|
|
1018
1128
|
data: SerializableJsonSchema.optional()
|
|
1019
1129
|
});
|
|
1020
|
-
var RedactSchema =
|
|
1021
|
-
paths:
|
|
1130
|
+
var RedactSchema = import_zod11.z.object({
|
|
1131
|
+
paths: import_zod11.z.array(import_zod11.z.string())
|
|
1022
1132
|
});
|
|
1023
|
-
var RetryOptionsSchema =
|
|
1133
|
+
var RetryOptionsSchema = import_zod11.z.object({
|
|
1024
1134
|
/** The maximum number of times to retry the request. */
|
|
1025
|
-
limit:
|
|
1135
|
+
limit: import_zod11.z.number().optional(),
|
|
1026
1136
|
/** The exponential factor to use when calculating the next retry time. */
|
|
1027
|
-
factor:
|
|
1137
|
+
factor: import_zod11.z.number().optional(),
|
|
1028
1138
|
/** The minimum amount of time to wait before retrying the request. */
|
|
1029
|
-
minTimeoutInMs:
|
|
1139
|
+
minTimeoutInMs: import_zod11.z.number().optional(),
|
|
1030
1140
|
/** The maximum amount of time to wait before retrying the request. */
|
|
1031
|
-
maxTimeoutInMs:
|
|
1141
|
+
maxTimeoutInMs: import_zod11.z.number().optional(),
|
|
1032
1142
|
/** Whether to randomize the retry time. */
|
|
1033
|
-
randomize:
|
|
1143
|
+
randomize: import_zod11.z.boolean().optional()
|
|
1034
1144
|
});
|
|
1035
|
-
var RunTaskOptionsSchema =
|
|
1145
|
+
var RunTaskOptionsSchema = import_zod11.z.object({
|
|
1036
1146
|
/** The name of the Task is required. This is displayed on the Task in the logs. */
|
|
1037
|
-
name:
|
|
1147
|
+
name: import_zod11.z.string().optional(),
|
|
1038
1148
|
/** The Task will wait and only start at the specified Date */
|
|
1039
|
-
delayUntil:
|
|
1149
|
+
delayUntil: import_zod11.z.coerce.date().optional(),
|
|
1040
1150
|
/** Retry options */
|
|
1041
1151
|
retry: RetryOptionsSchema.optional(),
|
|
1042
1152
|
/** The icon for the Task, it will appear in the logs.
|
|
1043
1153
|
* You can use the name of a company in lowercase, e.g. "github".
|
|
1044
1154
|
* Or any icon name that [Font Awesome](https://fontawesome.com/icons) supports. */
|
|
1045
|
-
icon:
|
|
1155
|
+
icon: import_zod11.z.string().optional(),
|
|
1046
1156
|
/** The key for the Task that you want to appear in the logs */
|
|
1047
|
-
displayKey:
|
|
1157
|
+
displayKey: import_zod11.z.string().optional(),
|
|
1048
1158
|
/** A description of the Task */
|
|
1049
|
-
description:
|
|
1159
|
+
description: import_zod11.z.string().optional(),
|
|
1050
1160
|
/** Properties that are displayed in the logs */
|
|
1051
|
-
properties:
|
|
1161
|
+
properties: import_zod11.z.array(DisplayPropertySchema).optional(),
|
|
1052
1162
|
/** The input params to the Task, will be displayed in the logs */
|
|
1053
|
-
params:
|
|
1163
|
+
params: import_zod11.z.any(),
|
|
1054
1164
|
/** The style of the log entry. */
|
|
1055
1165
|
style: StyleSchema.optional(),
|
|
1056
1166
|
/** Allows you to link the Integration connection in the logs. This is handled automatically in integrations. */
|
|
1057
|
-
connectionKey:
|
|
1167
|
+
connectionKey: import_zod11.z.string().optional(),
|
|
1058
1168
|
/** 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. */
|
|
1059
|
-
operation:
|
|
1169
|
+
operation: import_zod11.z.enum([
|
|
1060
1170
|
"fetch"
|
|
1061
1171
|
]).optional(),
|
|
1062
1172
|
/** 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). */
|
|
1063
|
-
noop:
|
|
1173
|
+
noop: import_zod11.z.boolean().default(false),
|
|
1064
1174
|
redact: RedactSchema.optional(),
|
|
1065
1175
|
trigger: TriggerMetadataSchema.optional()
|
|
1066
1176
|
});
|
|
1067
1177
|
var RunTaskBodyInputSchema = RunTaskOptionsSchema.extend({
|
|
1068
|
-
idempotencyKey:
|
|
1069
|
-
parentId:
|
|
1178
|
+
idempotencyKey: import_zod11.z.string(),
|
|
1179
|
+
parentId: import_zod11.z.string().optional()
|
|
1070
1180
|
});
|
|
1071
1181
|
var RunTaskBodyOutputSchema = RunTaskBodyInputSchema.extend({
|
|
1072
1182
|
params: DeserializedJsonSchema.optional().nullable()
|
|
@@ -1078,270 +1188,196 @@ var CompleteTaskBodyInputSchema = RunTaskBodyInputSchema.pick({
|
|
|
1078
1188
|
}).extend({
|
|
1079
1189
|
output: SerializableJsonSchema.optional().transform((v) => v ? DeserializedJsonSchema.parse(JSON.parse(JSON.stringify(v))) : {})
|
|
1080
1190
|
});
|
|
1081
|
-
var FailTaskBodyInputSchema =
|
|
1191
|
+
var FailTaskBodyInputSchema = import_zod11.z.object({
|
|
1082
1192
|
error: ErrorWithStackSchema
|
|
1083
1193
|
});
|
|
1084
|
-
var NormalizedRequestSchema =
|
|
1085
|
-
headers:
|
|
1086
|
-
method:
|
|
1087
|
-
query:
|
|
1088
|
-
url:
|
|
1089
|
-
body:
|
|
1194
|
+
var NormalizedRequestSchema = import_zod11.z.object({
|
|
1195
|
+
headers: import_zod11.z.record(import_zod11.z.string()),
|
|
1196
|
+
method: import_zod11.z.string(),
|
|
1197
|
+
query: import_zod11.z.record(import_zod11.z.string()),
|
|
1198
|
+
url: import_zod11.z.string(),
|
|
1199
|
+
body: import_zod11.z.any()
|
|
1090
1200
|
});
|
|
1091
|
-
var NormalizedResponseSchema =
|
|
1092
|
-
status:
|
|
1093
|
-
body:
|
|
1094
|
-
headers:
|
|
1201
|
+
var NormalizedResponseSchema = import_zod11.z.object({
|
|
1202
|
+
status: import_zod11.z.number(),
|
|
1203
|
+
body: import_zod11.z.any(),
|
|
1204
|
+
headers: import_zod11.z.record(import_zod11.z.string()).optional()
|
|
1095
1205
|
});
|
|
1096
|
-
var HttpSourceResponseSchema =
|
|
1206
|
+
var HttpSourceResponseSchema = import_zod11.z.object({
|
|
1097
1207
|
response: NormalizedResponseSchema,
|
|
1098
|
-
events:
|
|
1208
|
+
events: import_zod11.z.array(RawEventSchema),
|
|
1099
1209
|
metadata: HttpSourceResponseMetadataSchema.optional()
|
|
1100
1210
|
});
|
|
1101
|
-
var RegisterTriggerBodySchemaV1 =
|
|
1211
|
+
var RegisterTriggerBodySchemaV1 = import_zod11.z.object({
|
|
1102
1212
|
rule: EventRuleSchema,
|
|
1103
1213
|
source: SourceMetadataV1Schema
|
|
1104
1214
|
});
|
|
1105
|
-
var RegisterTriggerBodySchemaV2 =
|
|
1215
|
+
var RegisterTriggerBodySchemaV2 = import_zod11.z.object({
|
|
1106
1216
|
rule: EventRuleSchema,
|
|
1107
1217
|
source: SourceMetadataV2Schema
|
|
1108
1218
|
});
|
|
1109
|
-
var InitializeTriggerBodySchema =
|
|
1110
|
-
id:
|
|
1111
|
-
params:
|
|
1112
|
-
accountId:
|
|
1113
|
-
metadata:
|
|
1219
|
+
var InitializeTriggerBodySchema = import_zod11.z.object({
|
|
1220
|
+
id: import_zod11.z.string(),
|
|
1221
|
+
params: import_zod11.z.any(),
|
|
1222
|
+
accountId: import_zod11.z.string().optional(),
|
|
1223
|
+
metadata: import_zod11.z.any().optional()
|
|
1114
1224
|
});
|
|
1115
|
-
var RegisterCommonScheduleBodySchema =
|
|
1225
|
+
var RegisterCommonScheduleBodySchema = import_zod11.z.object({
|
|
1116
1226
|
/** A unique id for the schedule. This is used to identify and unregister the schedule later. */
|
|
1117
|
-
id:
|
|
1227
|
+
id: import_zod11.z.string(),
|
|
1118
1228
|
/** Any additional metadata about the schedule. */
|
|
1119
|
-
metadata:
|
|
1229
|
+
metadata: import_zod11.z.any(),
|
|
1120
1230
|
/** This will be used by the Trigger.dev Connect feature, which is coming soon. */
|
|
1121
|
-
accountId:
|
|
1231
|
+
accountId: import_zod11.z.string().optional()
|
|
1122
1232
|
});
|
|
1123
1233
|
var RegisterIntervalScheduleBodySchema = RegisterCommonScheduleBodySchema.merge(IntervalMetadataSchema);
|
|
1124
1234
|
var InitializeCronScheduleBodySchema = RegisterCommonScheduleBodySchema.merge(CronMetadataSchema);
|
|
1125
|
-
var RegisterScheduleBodySchema =
|
|
1235
|
+
var RegisterScheduleBodySchema = import_zod11.z.discriminatedUnion("type", [
|
|
1126
1236
|
RegisterIntervalScheduleBodySchema,
|
|
1127
1237
|
InitializeCronScheduleBodySchema
|
|
1128
1238
|
]);
|
|
1129
|
-
var RegisterScheduleResponseBodySchema =
|
|
1130
|
-
id:
|
|
1239
|
+
var RegisterScheduleResponseBodySchema = import_zod11.z.object({
|
|
1240
|
+
id: import_zod11.z.string(),
|
|
1131
1241
|
schedule: ScheduleMetadataSchema,
|
|
1132
|
-
metadata:
|
|
1133
|
-
active:
|
|
1242
|
+
metadata: import_zod11.z.any(),
|
|
1243
|
+
active: import_zod11.z.boolean()
|
|
1134
1244
|
});
|
|
1135
|
-
var CreateExternalConnectionBodySchema =
|
|
1136
|
-
accessToken:
|
|
1137
|
-
type:
|
|
1245
|
+
var CreateExternalConnectionBodySchema = import_zod11.z.object({
|
|
1246
|
+
accessToken: import_zod11.z.string(),
|
|
1247
|
+
type: import_zod11.z.enum([
|
|
1138
1248
|
"oauth2"
|
|
1139
1249
|
]),
|
|
1140
|
-
scopes:
|
|
1141
|
-
metadata:
|
|
1250
|
+
scopes: import_zod11.z.array(import_zod11.z.string()).optional(),
|
|
1251
|
+
metadata: import_zod11.z.any()
|
|
1252
|
+
});
|
|
1253
|
+
var GetRunStatusesSchema = import_zod11.z.object({
|
|
1254
|
+
run: import_zod11.z.object({
|
|
1255
|
+
id: import_zod11.z.string(),
|
|
1256
|
+
status: RunStatusSchema,
|
|
1257
|
+
output: import_zod11.z.any().optional()
|
|
1258
|
+
}),
|
|
1259
|
+
statuses: import_zod11.z.array(JobRunStatusRecordSchema)
|
|
1142
1260
|
});
|
|
1143
1261
|
|
|
1144
1262
|
// src/schemas/notifications.ts
|
|
1145
|
-
var
|
|
1263
|
+
var import_zod12 = require("zod");
|
|
1146
1264
|
var MISSING_CONNECTION_NOTIFICATION = "dev.trigger.notifications.missingConnection";
|
|
1147
1265
|
var MISSING_CONNECTION_RESOLVED_NOTIFICATION = "dev.trigger.notifications.missingConnectionResolved";
|
|
1148
|
-
var CommonMissingConnectionNotificationPayloadSchema =
|
|
1149
|
-
id:
|
|
1150
|
-
client:
|
|
1151
|
-
id:
|
|
1152
|
-
title:
|
|
1153
|
-
scopes:
|
|
1154
|
-
createdAt:
|
|
1155
|
-
updatedAt:
|
|
1266
|
+
var CommonMissingConnectionNotificationPayloadSchema = import_zod12.z.object({
|
|
1267
|
+
id: import_zod12.z.string(),
|
|
1268
|
+
client: import_zod12.z.object({
|
|
1269
|
+
id: import_zod12.z.string(),
|
|
1270
|
+
title: import_zod12.z.string(),
|
|
1271
|
+
scopes: import_zod12.z.array(import_zod12.z.string()),
|
|
1272
|
+
createdAt: import_zod12.z.coerce.date(),
|
|
1273
|
+
updatedAt: import_zod12.z.coerce.date()
|
|
1156
1274
|
}),
|
|
1157
|
-
authorizationUrl:
|
|
1275
|
+
authorizationUrl: import_zod12.z.string()
|
|
1158
1276
|
});
|
|
1159
1277
|
var MissingDeveloperConnectionNotificationPayloadSchema = CommonMissingConnectionNotificationPayloadSchema.extend({
|
|
1160
|
-
type:
|
|
1278
|
+
type: import_zod12.z.literal("DEVELOPER")
|
|
1161
1279
|
});
|
|
1162
1280
|
var MissingExternalConnectionNotificationPayloadSchema = CommonMissingConnectionNotificationPayloadSchema.extend({
|
|
1163
|
-
type:
|
|
1164
|
-
account:
|
|
1165
|
-
id:
|
|
1166
|
-
metadata:
|
|
1281
|
+
type: import_zod12.z.literal("EXTERNAL"),
|
|
1282
|
+
account: import_zod12.z.object({
|
|
1283
|
+
id: import_zod12.z.string(),
|
|
1284
|
+
metadata: import_zod12.z.any()
|
|
1167
1285
|
})
|
|
1168
1286
|
});
|
|
1169
|
-
var MissingConnectionNotificationPayloadSchema =
|
|
1287
|
+
var MissingConnectionNotificationPayloadSchema = import_zod12.z.discriminatedUnion("type", [
|
|
1170
1288
|
MissingDeveloperConnectionNotificationPayloadSchema,
|
|
1171
1289
|
MissingExternalConnectionNotificationPayloadSchema
|
|
1172
1290
|
]);
|
|
1173
|
-
var CommonMissingConnectionNotificationResolvedPayloadSchema =
|
|
1174
|
-
id:
|
|
1175
|
-
client:
|
|
1176
|
-
id:
|
|
1177
|
-
title:
|
|
1178
|
-
scopes:
|
|
1179
|
-
createdAt:
|
|
1180
|
-
updatedAt:
|
|
1181
|
-
integrationIdentifier:
|
|
1182
|
-
integrationAuthMethod:
|
|
1291
|
+
var CommonMissingConnectionNotificationResolvedPayloadSchema = import_zod12.z.object({
|
|
1292
|
+
id: import_zod12.z.string(),
|
|
1293
|
+
client: import_zod12.z.object({
|
|
1294
|
+
id: import_zod12.z.string(),
|
|
1295
|
+
title: import_zod12.z.string(),
|
|
1296
|
+
scopes: import_zod12.z.array(import_zod12.z.string()),
|
|
1297
|
+
createdAt: import_zod12.z.coerce.date(),
|
|
1298
|
+
updatedAt: import_zod12.z.coerce.date(),
|
|
1299
|
+
integrationIdentifier: import_zod12.z.string(),
|
|
1300
|
+
integrationAuthMethod: import_zod12.z.string()
|
|
1183
1301
|
}),
|
|
1184
|
-
expiresAt:
|
|
1302
|
+
expiresAt: import_zod12.z.coerce.date()
|
|
1185
1303
|
});
|
|
1186
1304
|
var MissingDeveloperConnectionResolvedNotificationPayloadSchema = CommonMissingConnectionNotificationResolvedPayloadSchema.extend({
|
|
1187
|
-
type:
|
|
1305
|
+
type: import_zod12.z.literal("DEVELOPER")
|
|
1188
1306
|
});
|
|
1189
1307
|
var MissingExternalConnectionResolvedNotificationPayloadSchema = CommonMissingConnectionNotificationResolvedPayloadSchema.extend({
|
|
1190
|
-
type:
|
|
1191
|
-
account:
|
|
1192
|
-
id:
|
|
1193
|
-
metadata:
|
|
1308
|
+
type: import_zod12.z.literal("EXTERNAL"),
|
|
1309
|
+
account: import_zod12.z.object({
|
|
1310
|
+
id: import_zod12.z.string(),
|
|
1311
|
+
metadata: import_zod12.z.any()
|
|
1194
1312
|
})
|
|
1195
1313
|
});
|
|
1196
|
-
var MissingConnectionResolvedNotificationPayloadSchema =
|
|
1314
|
+
var MissingConnectionResolvedNotificationPayloadSchema = import_zod12.z.discriminatedUnion("type", [
|
|
1197
1315
|
MissingDeveloperConnectionResolvedNotificationPayloadSchema,
|
|
1198
1316
|
MissingExternalConnectionResolvedNotificationPayloadSchema
|
|
1199
1317
|
]);
|
|
1200
1318
|
|
|
1201
1319
|
// src/schemas/fetch.ts
|
|
1202
|
-
var
|
|
1203
|
-
var FetchRetryHeadersStrategySchema =
|
|
1320
|
+
var import_zod13 = require("zod");
|
|
1321
|
+
var FetchRetryHeadersStrategySchema = import_zod13.z.object({
|
|
1204
1322
|
/** The `headers` strategy retries the request using info from the response headers. */
|
|
1205
|
-
strategy:
|
|
1323
|
+
strategy: import_zod13.z.literal("headers"),
|
|
1206
1324
|
/** The header to use to determine the maximum number of times to retry the request. */
|
|
1207
|
-
limitHeader:
|
|
1325
|
+
limitHeader: import_zod13.z.string(),
|
|
1208
1326
|
/** The header to use to determine the number of remaining retries. */
|
|
1209
|
-
remainingHeader:
|
|
1327
|
+
remainingHeader: import_zod13.z.string(),
|
|
1210
1328
|
/** The header to use to determine the time when the number of remaining retries will be reset. */
|
|
1211
|
-
resetHeader:
|
|
1329
|
+
resetHeader: import_zod13.z.string()
|
|
1212
1330
|
});
|
|
1213
1331
|
var FetchRetryBackoffStrategySchema = RetryOptionsSchema.extend({
|
|
1214
1332
|
/** The `backoff` strategy retries the request with an exponential backoff. */
|
|
1215
|
-
strategy:
|
|
1333
|
+
strategy: import_zod13.z.literal("backoff")
|
|
1216
1334
|
});
|
|
1217
|
-
var FetchRetryStrategySchema =
|
|
1335
|
+
var FetchRetryStrategySchema = import_zod13.z.discriminatedUnion("strategy", [
|
|
1218
1336
|
FetchRetryHeadersStrategySchema,
|
|
1219
1337
|
FetchRetryBackoffStrategySchema
|
|
1220
1338
|
]);
|
|
1221
|
-
var FetchRequestInitSchema =
|
|
1339
|
+
var FetchRequestInitSchema = import_zod13.z.object({
|
|
1222
1340
|
/** The HTTP method to use for the request. */
|
|
1223
|
-
method:
|
|
1341
|
+
method: import_zod13.z.string().optional(),
|
|
1224
1342
|
/** 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. */
|
|
1225
|
-
headers:
|
|
1226
|
-
|
|
1343
|
+
headers: import_zod13.z.record(import_zod13.z.union([
|
|
1344
|
+
import_zod13.z.string(),
|
|
1227
1345
|
RedactStringSchema
|
|
1228
1346
|
])).optional(),
|
|
1229
1347
|
/** The body of the request. */
|
|
1230
|
-
body:
|
|
1231
|
-
|
|
1232
|
-
|
|
1348
|
+
body: import_zod13.z.union([
|
|
1349
|
+
import_zod13.z.string(),
|
|
1350
|
+
import_zod13.z.instanceof(ArrayBuffer)
|
|
1233
1351
|
]).optional()
|
|
1234
1352
|
});
|
|
1235
|
-
var FetchRetryOptionsSchema =
|
|
1236
|
-
var FetchOperationSchema =
|
|
1237
|
-
url:
|
|
1353
|
+
var FetchRetryOptionsSchema = import_zod13.z.record(FetchRetryStrategySchema);
|
|
1354
|
+
var FetchOperationSchema = import_zod13.z.object({
|
|
1355
|
+
url: import_zod13.z.string(),
|
|
1238
1356
|
requestInit: FetchRequestInitSchema.optional(),
|
|
1239
|
-
retry:
|
|
1357
|
+
retry: import_zod13.z.record(FetchRetryStrategySchema).optional()
|
|
1240
1358
|
});
|
|
1241
1359
|
|
|
1242
1360
|
// src/schemas/events.ts
|
|
1243
|
-
var
|
|
1244
|
-
|
|
1245
|
-
// src/schemas/runs.ts
|
|
1246
|
-
var import_zod12 = require("zod");
|
|
1247
|
-
var RunStatusSchema = import_zod12.z.union([
|
|
1248
|
-
import_zod12.z.literal("PENDING"),
|
|
1249
|
-
import_zod12.z.literal("QUEUED"),
|
|
1250
|
-
import_zod12.z.literal("WAITING_ON_CONNECTIONS"),
|
|
1251
|
-
import_zod12.z.literal("PREPROCESSING"),
|
|
1252
|
-
import_zod12.z.literal("STARTED"),
|
|
1253
|
-
import_zod12.z.literal("SUCCESS"),
|
|
1254
|
-
import_zod12.z.literal("FAILURE"),
|
|
1255
|
-
import_zod12.z.literal("TIMED_OUT"),
|
|
1256
|
-
import_zod12.z.literal("ABORTED"),
|
|
1257
|
-
import_zod12.z.literal("CANCELED")
|
|
1258
|
-
]);
|
|
1259
|
-
var RunTaskSchema = import_zod12.z.object({
|
|
1260
|
-
/** The Task id */
|
|
1261
|
-
id: import_zod12.z.string(),
|
|
1262
|
-
/** The key that you defined when creating the Task, the first param in any task. */
|
|
1263
|
-
displayKey: import_zod12.z.string().nullable(),
|
|
1264
|
-
/** The Task status */
|
|
1265
|
-
status: TaskStatusSchema,
|
|
1266
|
-
/** The name of the Task */
|
|
1267
|
-
name: import_zod12.z.string(),
|
|
1268
|
-
/** The icon of the Task, a string.
|
|
1269
|
-
* For integrations, this will be a lowercase name of the company.
|
|
1270
|
-
* Can be used with the [@trigger.dev/companyicons](https://www.npmjs.com/package/@trigger.dev/companyicons) package to display an svg. */
|
|
1271
|
-
icon: import_zod12.z.string().nullable(),
|
|
1272
|
-
/** When the task started */
|
|
1273
|
-
startedAt: import_zod12.z.coerce.date().nullable(),
|
|
1274
|
-
/** When the task completed */
|
|
1275
|
-
completedAt: import_zod12.z.coerce.date().nullable()
|
|
1276
|
-
});
|
|
1277
|
-
var RunTaskWithSubtasksSchema = RunTaskSchema.extend({
|
|
1278
|
-
subtasks: import_zod12.z.lazy(() => RunTaskWithSubtasksSchema.array()).optional()
|
|
1279
|
-
});
|
|
1280
|
-
var GetRunOptionsSchema = import_zod12.z.object({
|
|
1281
|
-
/** Return subtasks, which appear in a `subtasks` array on a task. @default false */
|
|
1282
|
-
subtasks: import_zod12.z.boolean().optional(),
|
|
1283
|
-
/** You can use this to get more tasks, if there are more than are returned in a single batch @default undefined */
|
|
1284
|
-
cursor: import_zod12.z.string().optional(),
|
|
1285
|
-
/** How many tasks you want to return in one go, max 50. @default 20 */
|
|
1286
|
-
take: import_zod12.z.number().optional()
|
|
1287
|
-
});
|
|
1288
|
-
var GetRunOptionsWithTaskDetailsSchema = GetRunOptionsSchema.extend({
|
|
1289
|
-
/** If `true`, it returns the `params` and `output` of all tasks. @default false */
|
|
1290
|
-
taskdetails: import_zod12.z.boolean().optional()
|
|
1291
|
-
});
|
|
1292
|
-
var RunSchema = import_zod12.z.object({
|
|
1293
|
-
/** The Run id */
|
|
1294
|
-
id: import_zod12.z.string(),
|
|
1295
|
-
/** The Run status */
|
|
1296
|
-
status: RunStatusSchema,
|
|
1297
|
-
/** When the run started */
|
|
1298
|
-
startedAt: import_zod12.z.coerce.date().nullable(),
|
|
1299
|
-
/** When the run was last updated */
|
|
1300
|
-
updatedAt: import_zod12.z.coerce.date().nullable(),
|
|
1301
|
-
/** When the run was completed */
|
|
1302
|
-
completedAt: import_zod12.z.coerce.date().nullable()
|
|
1303
|
-
});
|
|
1304
|
-
var GetRunSchema = RunSchema.extend({
|
|
1305
|
-
/** The output of the run */
|
|
1306
|
-
output: import_zod12.z.any().optional(),
|
|
1307
|
-
/** The tasks from the run */
|
|
1308
|
-
tasks: import_zod12.z.array(RunTaskWithSubtasksSchema),
|
|
1309
|
-
/** If there are more tasks, you can use this to get them */
|
|
1310
|
-
nextCursor: import_zod12.z.string().optional()
|
|
1311
|
-
});
|
|
1312
|
-
var GetRunsOptionsSchema = import_zod12.z.object({
|
|
1313
|
-
/** You can use this to get more tasks, if there are more than are returned in a single batch @default undefined */
|
|
1314
|
-
cursor: import_zod12.z.string().optional(),
|
|
1315
|
-
/** How many runs you want to return in one go, max 50. @default 20 */
|
|
1316
|
-
take: import_zod12.z.number().optional()
|
|
1317
|
-
});
|
|
1318
|
-
var GetRunsSchema = import_zod12.z.object({
|
|
1319
|
-
/** The runs from the query */
|
|
1320
|
-
runs: RunSchema.array(),
|
|
1321
|
-
/** If there are more runs, you can use this to get them */
|
|
1322
|
-
nextCursor: import_zod12.z.string().optional()
|
|
1323
|
-
});
|
|
1324
|
-
|
|
1325
|
-
// src/schemas/events.ts
|
|
1326
|
-
var GetEventSchema = import_zod13.z.object({
|
|
1361
|
+
var import_zod14 = require("zod");
|
|
1362
|
+
var GetEventSchema = import_zod14.z.object({
|
|
1327
1363
|
/** The event id */
|
|
1328
|
-
id:
|
|
1364
|
+
id: import_zod14.z.string(),
|
|
1329
1365
|
/** The event name */
|
|
1330
|
-
name:
|
|
1366
|
+
name: import_zod14.z.string(),
|
|
1331
1367
|
/** When the event was created */
|
|
1332
|
-
createdAt:
|
|
1368
|
+
createdAt: import_zod14.z.coerce.date(),
|
|
1333
1369
|
/** When the event was last updated */
|
|
1334
|
-
updatedAt:
|
|
1370
|
+
updatedAt: import_zod14.z.coerce.date(),
|
|
1335
1371
|
/** The runs that were triggered by the event */
|
|
1336
|
-
runs:
|
|
1372
|
+
runs: import_zod14.z.array(import_zod14.z.object({
|
|
1337
1373
|
/** The Run id */
|
|
1338
|
-
id:
|
|
1374
|
+
id: import_zod14.z.string(),
|
|
1339
1375
|
/** The Run status */
|
|
1340
1376
|
status: RunStatusSchema,
|
|
1341
1377
|
/** When the run started */
|
|
1342
|
-
startedAt:
|
|
1378
|
+
startedAt: import_zod14.z.coerce.date().optional().nullable(),
|
|
1343
1379
|
/** When the run completed */
|
|
1344
|
-
completedAt:
|
|
1380
|
+
completedAt: import_zod14.z.coerce.date().optional().nullable()
|
|
1345
1381
|
}))
|
|
1346
1382
|
});
|
|
1347
1383
|
|
|
@@ -1568,130 +1604,4 @@ function contentFilterMatches(actualValue, contentFilter) {
|
|
|
1568
1604
|
return true;
|
|
1569
1605
|
}
|
|
1570
1606
|
__name(contentFilterMatches, "contentFilterMatches");
|
|
1571
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
1572
|
-
0 && (module.exports = {
|
|
1573
|
-
ApiEventLogSchema,
|
|
1574
|
-
CachedTaskSchema,
|
|
1575
|
-
CommonMissingConnectionNotificationPayloadSchema,
|
|
1576
|
-
CommonMissingConnectionNotificationResolvedPayloadSchema,
|
|
1577
|
-
CompleteTaskBodyInputSchema,
|
|
1578
|
-
ConnectionAuthSchema,
|
|
1579
|
-
CreateExternalConnectionBodySchema,
|
|
1580
|
-
CreateRunResponseBodySchema,
|
|
1581
|
-
CronMetadataSchema,
|
|
1582
|
-
CronOptionsSchema,
|
|
1583
|
-
DeliverEventResponseSchema,
|
|
1584
|
-
DeserializedJsonSchema,
|
|
1585
|
-
DisplayPropertiesSchema,
|
|
1586
|
-
DisplayPropertySchema,
|
|
1587
|
-
DynamicTriggerEndpointMetadataSchema,
|
|
1588
|
-
DynamicTriggerMetadataSchema,
|
|
1589
|
-
ErrorWithStackSchema,
|
|
1590
|
-
EventExampleSchema,
|
|
1591
|
-
EventFilterSchema,
|
|
1592
|
-
EventRuleSchema,
|
|
1593
|
-
EventSpecificationSchema,
|
|
1594
|
-
FailTaskBodyInputSchema,
|
|
1595
|
-
FetchOperationSchema,
|
|
1596
|
-
FetchRequestInitSchema,
|
|
1597
|
-
FetchRetryBackoffStrategySchema,
|
|
1598
|
-
FetchRetryHeadersStrategySchema,
|
|
1599
|
-
FetchRetryOptionsSchema,
|
|
1600
|
-
FetchRetryStrategySchema,
|
|
1601
|
-
GetEventSchema,
|
|
1602
|
-
GetRunSchema,
|
|
1603
|
-
GetRunsSchema,
|
|
1604
|
-
HandleTriggerSourceSchema,
|
|
1605
|
-
HttpSourceRequestHeadersSchema,
|
|
1606
|
-
HttpSourceRequestSchema,
|
|
1607
|
-
HttpSourceResponseSchema,
|
|
1608
|
-
IndexEndpointResponseSchema,
|
|
1609
|
-
InitializeCronScheduleBodySchema,
|
|
1610
|
-
InitializeTriggerBodySchema,
|
|
1611
|
-
IntegrationConfigSchema,
|
|
1612
|
-
IntegrationMetadataSchema,
|
|
1613
|
-
IntervalMetadataSchema,
|
|
1614
|
-
IntervalOptionsSchema,
|
|
1615
|
-
JobMetadataSchema,
|
|
1616
|
-
LogMessageSchema,
|
|
1617
|
-
Logger,
|
|
1618
|
-
MISSING_CONNECTION_NOTIFICATION,
|
|
1619
|
-
MISSING_CONNECTION_RESOLVED_NOTIFICATION,
|
|
1620
|
-
MissingConnectionNotificationPayloadSchema,
|
|
1621
|
-
MissingConnectionResolvedNotificationPayloadSchema,
|
|
1622
|
-
MissingDeveloperConnectionNotificationPayloadSchema,
|
|
1623
|
-
MissingDeveloperConnectionResolvedNotificationPayloadSchema,
|
|
1624
|
-
MissingExternalConnectionNotificationPayloadSchema,
|
|
1625
|
-
MissingExternalConnectionResolvedNotificationPayloadSchema,
|
|
1626
|
-
NormalizedRequestSchema,
|
|
1627
|
-
NormalizedResponseSchema,
|
|
1628
|
-
PongErrorResponseSchema,
|
|
1629
|
-
PongResponseSchema,
|
|
1630
|
-
PongSuccessResponseSchema,
|
|
1631
|
-
PreprocessRunBodySchema,
|
|
1632
|
-
PreprocessRunResponseSchema,
|
|
1633
|
-
QueueOptionsSchema,
|
|
1634
|
-
REGISTER_SOURCE_EVENT_V1,
|
|
1635
|
-
REGISTER_SOURCE_EVENT_V2,
|
|
1636
|
-
RawEventSchema,
|
|
1637
|
-
RedactSchema,
|
|
1638
|
-
RedactStringSchema,
|
|
1639
|
-
RegisterDynamicSchedulePayloadSchema,
|
|
1640
|
-
RegisterHTTPTriggerSourceBodySchema,
|
|
1641
|
-
RegisterIntervalScheduleBodySchema,
|
|
1642
|
-
RegisterSMTPTriggerSourceBodySchema,
|
|
1643
|
-
RegisterSQSTriggerSourceBodySchema,
|
|
1644
|
-
RegisterScheduleBodySchema,
|
|
1645
|
-
RegisterScheduleResponseBodySchema,
|
|
1646
|
-
RegisterSourceChannelBodySchema,
|
|
1647
|
-
RegisterSourceEventSchemaV1,
|
|
1648
|
-
RegisterSourceEventSchemaV2,
|
|
1649
|
-
RegisterTriggerBodySchemaV1,
|
|
1650
|
-
RegisterTriggerBodySchemaV2,
|
|
1651
|
-
RegisterTriggerSourceSchema,
|
|
1652
|
-
RetryOptionsSchema,
|
|
1653
|
-
RunJobBodySchema,
|
|
1654
|
-
RunJobCanceledWithTaskSchema,
|
|
1655
|
-
RunJobErrorSchema,
|
|
1656
|
-
RunJobResponseSchema,
|
|
1657
|
-
RunJobResumeWithTaskSchema,
|
|
1658
|
-
RunJobRetryWithTaskSchema,
|
|
1659
|
-
RunJobSuccessSchema,
|
|
1660
|
-
RunSourceContextSchema,
|
|
1661
|
-
RunStatusSchema,
|
|
1662
|
-
RunTaskBodyInputSchema,
|
|
1663
|
-
RunTaskBodyOutputSchema,
|
|
1664
|
-
RunTaskOptionsSchema,
|
|
1665
|
-
RunTaskSchema,
|
|
1666
|
-
RuntimeEnvironmentTypeSchema,
|
|
1667
|
-
SCHEDULED_EVENT,
|
|
1668
|
-
ScheduleMetadataSchema,
|
|
1669
|
-
ScheduledPayloadSchema,
|
|
1670
|
-
ScheduledTriggerMetadataSchema,
|
|
1671
|
-
SendEventBodySchema,
|
|
1672
|
-
SendEventOptionsSchema,
|
|
1673
|
-
SerializableJsonSchema,
|
|
1674
|
-
ServerTaskSchema,
|
|
1675
|
-
SourceMetadataV2Schema,
|
|
1676
|
-
StaticTriggerMetadataSchema,
|
|
1677
|
-
StyleSchema,
|
|
1678
|
-
TaskSchema,
|
|
1679
|
-
TaskStatusSchema,
|
|
1680
|
-
TriggerMetadataSchema,
|
|
1681
|
-
TriggerSourceSchema,
|
|
1682
|
-
UpdateTriggerSourceBodyV1Schema,
|
|
1683
|
-
UpdateTriggerSourceBodyV2Schema,
|
|
1684
|
-
ValidateErrorResponseSchema,
|
|
1685
|
-
ValidateResponseSchema,
|
|
1686
|
-
ValidateSuccessResponseSchema,
|
|
1687
|
-
addMissingVersionField,
|
|
1688
|
-
calculateRetryAt,
|
|
1689
|
-
currentDate,
|
|
1690
|
-
currentTimestampMilliseconds,
|
|
1691
|
-
currentTimestampSeconds,
|
|
1692
|
-
deepMergeFilters,
|
|
1693
|
-
eventFilterMatches,
|
|
1694
|
-
replacements,
|
|
1695
|
-
urlWithSearchParams
|
|
1696
|
-
});
|
|
1697
1607
|
//# sourceMappingURL=index.js.map
|