@trigger.dev/core 0.0.0-statuses-20230921210707 → 0.0.0-zod-decouple-20230922213650
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 +362 -108
- package/dist/index.js +34 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -128,10 +128,12 @@ __export(src_exports, {
|
|
|
128
128
|
RunJobBodySchema: () => RunJobBodySchema,
|
|
129
129
|
RunJobCanceledWithTaskSchema: () => RunJobCanceledWithTaskSchema,
|
|
130
130
|
RunJobErrorSchema: () => RunJobErrorSchema,
|
|
131
|
+
RunJobInvalidPayloadErrorSchema: () => RunJobInvalidPayloadErrorSchema,
|
|
131
132
|
RunJobResponseSchema: () => RunJobResponseSchema,
|
|
132
133
|
RunJobResumeWithTaskSchema: () => RunJobResumeWithTaskSchema,
|
|
133
134
|
RunJobRetryWithTaskSchema: () => RunJobRetryWithTaskSchema,
|
|
134
135
|
RunJobSuccessSchema: () => RunJobSuccessSchema,
|
|
136
|
+
RunJobUnresolvedAuthErrorSchema: () => RunJobUnresolvedAuthErrorSchema,
|
|
135
137
|
RunSourceContextSchema: () => RunSourceContextSchema,
|
|
136
138
|
RunStatusSchema: () => RunStatusSchema,
|
|
137
139
|
RunTaskBodyInputSchema: () => RunTaskBodyInputSchema,
|
|
@@ -143,6 +145,7 @@ __export(src_exports, {
|
|
|
143
145
|
ScheduleMetadataSchema: () => ScheduleMetadataSchema,
|
|
144
146
|
ScheduledPayloadSchema: () => ScheduledPayloadSchema,
|
|
145
147
|
ScheduledTriggerMetadataSchema: () => ScheduledTriggerMetadataSchema,
|
|
148
|
+
SchemaErrorSchema: () => SchemaErrorSchema,
|
|
146
149
|
SendEventBodySchema: () => SendEventBodySchema,
|
|
147
150
|
SendEventOptionsSchema: () => SendEventOptionsSchema,
|
|
148
151
|
SerializableJsonSchema: () => SerializableJsonSchema,
|
|
@@ -345,6 +348,10 @@ var ErrorWithStackSchema = import_zod.z.object({
|
|
|
345
348
|
name: import_zod.z.string().optional(),
|
|
346
349
|
stack: import_zod.z.string().optional()
|
|
347
350
|
});
|
|
351
|
+
var SchemaErrorSchema = import_zod.z.object({
|
|
352
|
+
path: import_zod.z.array(import_zod.z.string()),
|
|
353
|
+
message: import_zod.z.string()
|
|
354
|
+
});
|
|
348
355
|
|
|
349
356
|
// src/schemas/eventFilter.ts
|
|
350
357
|
var import_zod2 = require("zod");
|
|
@@ -427,7 +434,8 @@ var EventRuleSchema = import_zod2.z.object({
|
|
|
427
434
|
var import_zod3 = require("zod");
|
|
428
435
|
var ConnectionAuthSchema = import_zod3.z.object({
|
|
429
436
|
type: import_zod3.z.enum([
|
|
430
|
-
"oauth2"
|
|
437
|
+
"oauth2",
|
|
438
|
+
"apiKey"
|
|
431
439
|
]),
|
|
432
440
|
accessToken: import_zod3.z.string(),
|
|
433
441
|
scopes: import_zod3.z.array(import_zod3.z.string()).optional(),
|
|
@@ -443,7 +451,8 @@ var IntegrationConfigSchema = import_zod3.z.object({
|
|
|
443
451
|
metadata: IntegrationMetadataSchema,
|
|
444
452
|
authSource: import_zod3.z.enum([
|
|
445
453
|
"HOSTED",
|
|
446
|
-
"LOCAL"
|
|
454
|
+
"LOCAL",
|
|
455
|
+
"RESOLVER"
|
|
447
456
|
])
|
|
448
457
|
});
|
|
449
458
|
|
|
@@ -516,6 +525,8 @@ var CronOptionsSchema = import_zod6.z.object({
|
|
|
516
525
|
var CronMetadataSchema = import_zod6.z.object({
|
|
517
526
|
type: import_zod6.z.literal("cron"),
|
|
518
527
|
options: CronOptionsSchema,
|
|
528
|
+
/** An optional Account ID to associate with runs triggered by this interval */
|
|
529
|
+
accountId: import_zod6.z.string().optional(),
|
|
519
530
|
metadata: import_zod6.z.any()
|
|
520
531
|
});
|
|
521
532
|
var IntervalMetadataSchema = import_zod6.z.object({
|
|
@@ -523,6 +534,8 @@ var IntervalMetadataSchema = import_zod6.z.object({
|
|
|
523
534
|
type: import_zod6.z.literal("interval"),
|
|
524
535
|
/** An object containing options about the interval. */
|
|
525
536
|
options: IntervalOptionsSchema,
|
|
537
|
+
/** An optional Account ID to associate with runs triggered by this interval */
|
|
538
|
+
accountId: import_zod6.z.string().optional(),
|
|
526
539
|
/** Any additional metadata about the schedule. */
|
|
527
540
|
metadata: import_zod6.z.any()
|
|
528
541
|
});
|
|
@@ -657,7 +670,9 @@ var RunStatusSchema = import_zod10.z.union([
|
|
|
657
670
|
import_zod10.z.literal("FAILURE"),
|
|
658
671
|
import_zod10.z.literal("TIMED_OUT"),
|
|
659
672
|
import_zod10.z.literal("ABORTED"),
|
|
660
|
-
import_zod10.z.literal("CANCELED")
|
|
673
|
+
import_zod10.z.literal("CANCELED"),
|
|
674
|
+
import_zod10.z.literal("UNRESOLVED_AUTH"),
|
|
675
|
+
import_zod10.z.literal("INVALID_PAYLOAD")
|
|
661
676
|
]);
|
|
662
677
|
var RunTaskSchema = import_zod10.z.object({
|
|
663
678
|
/** The Task id */
|
|
@@ -1044,6 +1059,17 @@ var RunJobErrorSchema = import_zod11.z.object({
|
|
|
1044
1059
|
error: ErrorWithStackSchema,
|
|
1045
1060
|
task: TaskSchema.optional()
|
|
1046
1061
|
});
|
|
1062
|
+
var RunJobInvalidPayloadErrorSchema = import_zod11.z.object({
|
|
1063
|
+
status: import_zod11.z.literal("INVALID_PAYLOAD"),
|
|
1064
|
+
errors: import_zod11.z.array(SchemaErrorSchema)
|
|
1065
|
+
});
|
|
1066
|
+
var RunJobUnresolvedAuthErrorSchema = import_zod11.z.object({
|
|
1067
|
+
status: import_zod11.z.literal("UNRESOLVED_AUTH_ERROR"),
|
|
1068
|
+
issues: import_zod11.z.record(import_zod11.z.object({
|
|
1069
|
+
id: import_zod11.z.string(),
|
|
1070
|
+
error: import_zod11.z.string()
|
|
1071
|
+
}))
|
|
1072
|
+
});
|
|
1047
1073
|
var RunJobResumeWithTaskSchema = import_zod11.z.object({
|
|
1048
1074
|
status: import_zod11.z.literal("RESUME_WITH_TASK"),
|
|
1049
1075
|
task: TaskSchema
|
|
@@ -1064,6 +1090,8 @@ var RunJobSuccessSchema = import_zod11.z.object({
|
|
|
1064
1090
|
});
|
|
1065
1091
|
var RunJobResponseSchema = import_zod11.z.discriminatedUnion("status", [
|
|
1066
1092
|
RunJobErrorSchema,
|
|
1093
|
+
RunJobUnresolvedAuthErrorSchema,
|
|
1094
|
+
RunJobInvalidPayloadErrorSchema,
|
|
1067
1095
|
RunJobResumeWithTaskSchema,
|
|
1068
1096
|
RunJobRetryWithTaskSchema,
|
|
1069
1097
|
RunJobCanceledWithTaskSchema,
|
|
@@ -1214,7 +1242,8 @@ var RegisterTriggerBodySchemaV1 = import_zod11.z.object({
|
|
|
1214
1242
|
});
|
|
1215
1243
|
var RegisterTriggerBodySchemaV2 = import_zod11.z.object({
|
|
1216
1244
|
rule: EventRuleSchema,
|
|
1217
|
-
source: SourceMetadataV2Schema
|
|
1245
|
+
source: SourceMetadataV2Schema,
|
|
1246
|
+
accountId: import_zod11.z.string().optional()
|
|
1218
1247
|
});
|
|
1219
1248
|
var InitializeTriggerBodySchema = import_zod11.z.object({
|
|
1220
1249
|
id: import_zod11.z.string(),
|
|
@@ -1227,7 +1256,7 @@ var RegisterCommonScheduleBodySchema = import_zod11.z.object({
|
|
|
1227
1256
|
id: import_zod11.z.string(),
|
|
1228
1257
|
/** Any additional metadata about the schedule. */
|
|
1229
1258
|
metadata: import_zod11.z.any(),
|
|
1230
|
-
/**
|
|
1259
|
+
/** An optional Account ID to associate with runs triggered by this schedule */
|
|
1231
1260
|
accountId: import_zod11.z.string().optional()
|
|
1232
1261
|
});
|
|
1233
1262
|
var RegisterIntervalScheduleBodySchema = RegisterCommonScheduleBodySchema.merge(IntervalMetadataSchema);
|