@trigger.dev/core 0.0.0-background-tasks-20230906212613 → 0.0.0-byo-auth-20230921153903

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.js CHANGED
@@ -44,7 +44,6 @@ var __privateMethod = (obj, member, method) => {
44
44
  var src_exports = {};
45
45
  __export(src_exports, {
46
46
  ApiEventLogSchema: () => ApiEventLogSchema,
47
- BackgroundTaskMetadataSchema: () => BackgroundTaskMetadataSchema,
48
47
  CachedTaskSchema: () => CachedTaskSchema,
49
48
  CommonMissingConnectionNotificationPayloadSchema: () => CommonMissingConnectionNotificationPayloadSchema,
50
49
  CommonMissingConnectionNotificationResolvedPayloadSchema: () => CommonMissingConnectionNotificationResolvedPayloadSchema,
@@ -55,7 +54,6 @@ __export(src_exports, {
55
54
  CronMetadataSchema: () => CronMetadataSchema,
56
55
  CronOptionsSchema: () => CronOptionsSchema,
57
56
  DeliverEventResponseSchema: () => DeliverEventResponseSchema,
58
- DeployBackgroundTaskRequestBodySchema: () => DeployBackgroundTaskRequestBodySchema,
59
57
  DeserializedJsonSchema: () => DeserializedJsonSchema,
60
58
  DisplayPropertiesSchema: () => DisplayPropertiesSchema,
61
59
  DisplayPropertySchema: () => DisplayPropertySchema,
@@ -132,6 +130,7 @@ __export(src_exports, {
132
130
  RunJobResumeWithTaskSchema: () => RunJobResumeWithTaskSchema,
133
131
  RunJobRetryWithTaskSchema: () => RunJobRetryWithTaskSchema,
134
132
  RunJobSuccessSchema: () => RunJobSuccessSchema,
133
+ RunJobUnresolvedAuthErrorSchema: () => RunJobUnresolvedAuthErrorSchema,
135
134
  RunSourceContextSchema: () => RunSourceContextSchema,
136
135
  RunStatusSchema: () => RunStatusSchema,
137
136
  RunTaskBodyInputSchema: () => RunTaskBodyInputSchema,
@@ -424,7 +423,8 @@ var EventRuleSchema = import_zod2.z.object({
424
423
  var import_zod3 = require("zod");
425
424
  var ConnectionAuthSchema = import_zod3.z.object({
426
425
  type: import_zod3.z.enum([
427
- "oauth2"
426
+ "oauth2",
427
+ "apiKey"
428
428
  ]),
429
429
  accessToken: import_zod3.z.string(),
430
430
  scopes: import_zod3.z.array(import_zod3.z.string()).optional(),
@@ -440,7 +440,8 @@ var IntegrationConfigSchema = import_zod3.z.object({
440
440
  metadata: IntegrationMetadataSchema,
441
441
  authSource: import_zod3.z.enum([
442
442
  "HOSTED",
443
- "LOCAL"
443
+ "LOCAL",
444
+ "RESOLVER"
444
445
  ])
445
446
  });
446
447
 
@@ -513,6 +514,8 @@ var CronOptionsSchema = import_zod6.z.object({
513
514
  var CronMetadataSchema = import_zod6.z.object({
514
515
  type: import_zod6.z.literal("cron"),
515
516
  options: CronOptionsSchema,
517
+ /** An optional Account ID to associate with runs triggered by this interval */
518
+ accountId: import_zod6.z.string().optional(),
516
519
  metadata: import_zod6.z.any()
517
520
  });
518
521
  var IntervalMetadataSchema = import_zod6.z.object({
@@ -520,6 +523,8 @@ var IntervalMetadataSchema = import_zod6.z.object({
520
523
  type: import_zod6.z.literal("interval"),
521
524
  /** An object containing options about the interval. */
522
525
  options: IntervalOptionsSchema,
526
+ /** An optional Account ID to associate with runs triggered by this interval */
527
+ accountId: import_zod6.z.string().optional(),
523
528
  /** Any additional metadata about the schedule. */
524
529
  metadata: import_zod6.z.any()
525
530
  });
@@ -815,22 +820,11 @@ var DynamicTriggerEndpointMetadataSchema = import_zod9.z.object({
815
820
  version: import_zod9.z.string()
816
821
  }).optional()
817
822
  });
818
- var BackgroundTaskMetadataSchema = import_zod9.z.object({
819
- id: import_zod9.z.string(),
820
- name: import_zod9.z.string(),
821
- version: import_zod9.z.string(),
822
- enabled: import_zod9.z.boolean(),
823
- cpu: import_zod9.z.number(),
824
- memory: import_zod9.z.number(),
825
- concurrency: import_zod9.z.number(),
826
- secrets: import_zod9.z.record(import_zod9.z.string()).optional()
827
- });
828
823
  var IndexEndpointResponseSchema = import_zod9.z.object({
829
824
  jobs: import_zod9.z.array(JobMetadataSchema),
830
825
  sources: import_zod9.z.array(SourceMetadataSchema),
831
826
  dynamicTriggers: import_zod9.z.array(DynamicTriggerEndpointMetadataSchema),
832
- dynamicSchedules: import_zod9.z.array(RegisterDynamicSchedulePayloadSchema),
833
- backgroundTasks: import_zod9.z.array(BackgroundTaskMetadataSchema).optional()
827
+ dynamicSchedules: import_zod9.z.array(RegisterDynamicSchedulePayloadSchema)
834
828
  });
835
829
  var RawEventSchema = import_zod9.z.object({
836
830
  /** The `name` property must exactly match any subscriptions you want to
@@ -946,6 +940,13 @@ var RunJobErrorSchema = import_zod9.z.object({
946
940
  error: ErrorWithStackSchema,
947
941
  task: TaskSchema.optional()
948
942
  });
943
+ var RunJobUnresolvedAuthErrorSchema = import_zod9.z.object({
944
+ status: import_zod9.z.literal("UNRESOLVED_AUTH_ERROR"),
945
+ issues: import_zod9.z.record(import_zod9.z.object({
946
+ id: import_zod9.z.string(),
947
+ error: import_zod9.z.string()
948
+ }))
949
+ });
949
950
  var RunJobResumeWithTaskSchema = import_zod9.z.object({
950
951
  status: import_zod9.z.literal("RESUME_WITH_TASK"),
951
952
  task: TaskSchema
@@ -966,6 +967,7 @@ var RunJobSuccessSchema = import_zod9.z.object({
966
967
  });
967
968
  var RunJobResponseSchema = import_zod9.z.discriminatedUnion("status", [
968
969
  RunJobErrorSchema,
970
+ RunJobUnresolvedAuthErrorSchema,
969
971
  RunJobResumeWithTaskSchema,
970
972
  RunJobRetryWithTaskSchema,
971
973
  RunJobCanceledWithTaskSchema,
@@ -1129,7 +1131,7 @@ var RegisterCommonScheduleBodySchema = import_zod9.z.object({
1129
1131
  id: import_zod9.z.string(),
1130
1132
  /** Any additional metadata about the schedule. */
1131
1133
  metadata: import_zod9.z.any(),
1132
- /** This will be used by the Trigger.dev Connect feature, which is coming soon. */
1134
+ /** An optional Account ID to associate with runs triggered by this schedule */
1133
1135
  accountId: import_zod9.z.string().optional()
1134
1136
  });
1135
1137
  var RegisterIntervalScheduleBodySchema = RegisterCommonScheduleBodySchema.merge(IntervalMetadataSchema);
@@ -1152,21 +1154,6 @@ var CreateExternalConnectionBodySchema = import_zod9.z.object({
1152
1154
  scopes: import_zod9.z.array(import_zod9.z.string()).optional(),
1153
1155
  metadata: import_zod9.z.any()
1154
1156
  });
1155
- var DeployBackgroundTaskRequestBodySchema = import_zod9.z.object({
1156
- id: import_zod9.z.string(),
1157
- version: import_zod9.z.string(),
1158
- fileName: import_zod9.z.string(),
1159
- bundle: import_zod9.z.string(),
1160
- sourcemap: import_zod9.z.object({
1161
- version: import_zod9.z.number(),
1162
- sources: import_zod9.z.array(import_zod9.z.string()),
1163
- mappings: import_zod9.z.string(),
1164
- sourcesContent: import_zod9.z.array(import_zod9.z.string()),
1165
- names: import_zod9.z.array(import_zod9.z.string())
1166
- }),
1167
- dependencies: import_zod9.z.record(import_zod9.z.string()),
1168
- nodeVersion: import_zod9.z.string()
1169
- });
1170
1157
 
1171
1158
  // src/schemas/notifications.ts
1172
1159
  var import_zod10 = require("zod");
@@ -1281,7 +1268,8 @@ var RunStatusSchema = import_zod12.z.union([
1281
1268
  import_zod12.z.literal("FAILURE"),
1282
1269
  import_zod12.z.literal("TIMED_OUT"),
1283
1270
  import_zod12.z.literal("ABORTED"),
1284
- import_zod12.z.literal("CANCELED")
1271
+ import_zod12.z.literal("CANCELED"),
1272
+ import_zod12.z.literal("UNRESOLVED_AUTH")
1285
1273
  ]);
1286
1274
  var RunTaskSchema = import_zod12.z.object({
1287
1275
  /** The Task id */