@trigger.dev/core 3.0.0-beta.49 → 3.0.0-beta.50

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.
Files changed (39) hide show
  1. package/dist/{catalog-U7_q4XsM.d.mts → catalog-H7yFiZ60.d.mts} +1 -1
  2. package/dist/{catalog-bSnBE19I.d.ts → catalog-h79CG5Wy.d.ts} +1 -1
  3. package/dist/{messages-I-h-zZN9.d.mts → messages-JvHJ83wv.d.mts} +172 -0
  4. package/dist/{messages-I-h-zZN9.d.ts → messages-JvHJ83wv.d.ts} +172 -0
  5. package/dist/{schemas-WHkFakb3.d.mts → schemas-C9ssfehv.d.mts} +47 -1
  6. package/dist/{schemas-WHkFakb3.d.ts → schemas-C9ssfehv.d.ts} +47 -1
  7. package/dist/v3/index.d.mts +15 -7
  8. package/dist/v3/index.d.ts +15 -7
  9. package/dist/v3/index.js +24 -3
  10. package/dist/v3/index.js.map +1 -1
  11. package/dist/v3/index.mjs +23 -4
  12. package/dist/v3/index.mjs.map +1 -1
  13. package/dist/v3/otel/index.js +1 -1
  14. package/dist/v3/otel/index.js.map +1 -1
  15. package/dist/v3/otel/index.mjs +1 -1
  16. package/dist/v3/otel/index.mjs.map +1 -1
  17. package/dist/v3/prod/index.d.mts +1 -1
  18. package/dist/v3/prod/index.d.ts +1 -1
  19. package/dist/v3/schemas/index.d.mts +100 -4
  20. package/dist/v3/schemas/index.d.ts +100 -4
  21. package/dist/v3/schemas/index.js +23 -2
  22. package/dist/v3/schemas/index.js.map +1 -1
  23. package/dist/v3/schemas/index.mjs +22 -3
  24. package/dist/v3/schemas/index.mjs.map +1 -1
  25. package/dist/v3/utils/ioSerialization.js +22 -3
  26. package/dist/v3/utils/ioSerialization.js.map +1 -1
  27. package/dist/v3/utils/ioSerialization.mjs +22 -3
  28. package/dist/v3/utils/ioSerialization.mjs.map +1 -1
  29. package/dist/v3/utils/retries.d.mts +1 -1
  30. package/dist/v3/utils/retries.d.ts +1 -1
  31. package/dist/v3/workers/index.d.mts +4 -4
  32. package/dist/v3/workers/index.d.ts +4 -4
  33. package/dist/v3/workers/index.js +22 -3
  34. package/dist/v3/workers/index.js.map +1 -1
  35. package/dist/v3/workers/index.mjs +22 -3
  36. package/dist/v3/workers/index.mjs.map +1 -1
  37. package/dist/v3/zodfetch.d.mts +1 -1
  38. package/dist/v3/zodfetch.d.ts +1 -1
  39. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { R as RetryOptions } from '../../schemas-WHkFakb3.mjs';
1
+ import { R as RetryOptions } from '../../schemas-C9ssfehv.mjs';
2
2
  import 'zod';
3
3
 
4
4
  declare const defaultRetryOptions: {
@@ -1,4 +1,4 @@
1
- import { R as RetryOptions } from '../../schemas-WHkFakb3.js';
1
+ import { R as RetryOptions } from '../../schemas-C9ssfehv.js';
2
2
  import 'zod';
3
3
 
4
4
  declare const defaultRetryOptions: {
@@ -2,10 +2,10 @@ import * as logsAPI from '@opentelemetry/api-logs';
2
2
  import { TracingSDK } from '../otel/index.mjs';
3
3
  export { TracingDiagnosticLogLevel, recordSpanException } from '../otel/index.mjs';
4
4
  import { c as TaskRunExecution, T as TaskRunExecutionResult } from '../../common-CLW82lkt.mjs';
5
- import { B as BackgroundWorkerProperties } from '../../messages-I-h-zZN9.mjs';
6
- import { C as Config, a as TaskFileMetadata, b as TaskMetadataWithFilePath } from '../../schemas-WHkFakb3.mjs';
7
- import { P as ProjectConfig, H as HandleErrorFunction, T as TaskMetadataWithFunctions, U as UsageMeasurement, C as Clock, a as ClockTime, b as TaskCatalog, c as UsageManager, d as UsageSample } from '../../catalog-U7_q4XsM.mjs';
8
- export { u as usage } from '../../catalog-U7_q4XsM.mjs';
5
+ import { B as BackgroundWorkerProperties } from '../../messages-JvHJ83wv.mjs';
6
+ import { C as Config, a as TaskFileMetadata, b as TaskMetadataWithFilePath } from '../../schemas-C9ssfehv.mjs';
7
+ import { P as ProjectConfig, H as HandleErrorFunction, T as TaskMetadataWithFunctions, U as UsageMeasurement, C as Clock, a as ClockTime, b as TaskCatalog, c as UsageManager, d as UsageSample } from '../../catalog-H7yFiZ60.mjs';
8
+ export { u as usage } from '../../catalog-H7yFiZ60.mjs';
9
9
  import { T as TriggerTracer } from '../../tracer-N0p2Fuuv.mjs';
10
10
  export { R as RuntimeManager } from '../../manager-KvCabW1a.mjs';
11
11
  import { PreciseDate } from '@google-cloud/precise-date';
@@ -2,10 +2,10 @@ import * as logsAPI from '@opentelemetry/api-logs';
2
2
  import { TracingSDK } from '../otel/index.js';
3
3
  export { TracingDiagnosticLogLevel, recordSpanException } from '../otel/index.js';
4
4
  import { c as TaskRunExecution, T as TaskRunExecutionResult } from '../../common-CLW82lkt.js';
5
- import { B as BackgroundWorkerProperties } from '../../messages-I-h-zZN9.js';
6
- import { C as Config, a as TaskFileMetadata, b as TaskMetadataWithFilePath } from '../../schemas-WHkFakb3.js';
7
- import { P as ProjectConfig, H as HandleErrorFunction, T as TaskMetadataWithFunctions, U as UsageMeasurement, C as Clock, a as ClockTime, b as TaskCatalog, c as UsageManager, d as UsageSample } from '../../catalog-bSnBE19I.js';
8
- export { u as usage } from '../../catalog-bSnBE19I.js';
5
+ import { B as BackgroundWorkerProperties } from '../../messages-JvHJ83wv.js';
6
+ import { C as Config, a as TaskFileMetadata, b as TaskMetadataWithFilePath } from '../../schemas-C9ssfehv.js';
7
+ import { P as ProjectConfig, H as HandleErrorFunction, T as TaskMetadataWithFunctions, U as UsageMeasurement, C as Clock, a as ClockTime, b as TaskCatalog, c as UsageManager, d as UsageSample } from '../../catalog-h79CG5Wy.js';
8
+ export { u as usage } from '../../catalog-h79CG5Wy.js';
9
9
  import { T as TriggerTracer } from '../../tracer-N0p2Fuuv.js';
10
10
  export { R as RuntimeManager } from '../../manager-OBA35PzR.js';
11
11
  import { PreciseDate } from '@google-cloud/precise-date';
@@ -406,7 +406,7 @@ function getEnvVar(name) {
406
406
  __name(getEnvVar, "getEnvVar");
407
407
 
408
408
  // package.json
409
- var version = "3.0.0-beta.49";
409
+ var version = "3.0.0-beta.50";
410
410
 
411
411
  // src/v3/otel/tracingSDK.ts
412
412
  var _a;
@@ -892,13 +892,18 @@ var QueueOptions = zod.z.object({
892
892
  /** @deprecated This feature is coming soon */
893
893
  rateLimit: RateLimitOptions.optional()
894
894
  });
895
+ var ScheduleMetadata = zod.z.object({
896
+ cron: zod.z.string(),
897
+ timezone: zod.z.string()
898
+ });
895
899
  zod.z.object({
896
900
  id: zod.z.string(),
897
901
  packageVersion: zod.z.string(),
898
902
  queue: QueueOptions.optional(),
899
903
  retry: RetryOptions.optional(),
900
904
  machine: MachineConfig.optional(),
901
- triggerSource: zod.z.string().optional()
905
+ triggerSource: zod.z.string().optional(),
906
+ schedule: ScheduleMetadata.optional()
902
907
  });
903
908
  zod.z.object({
904
909
  filePath: zod.z.string(),
@@ -911,6 +916,7 @@ zod.z.object({
911
916
  retry: RetryOptions.optional(),
912
917
  machine: MachineConfig.optional(),
913
918
  triggerSource: zod.z.string().optional(),
919
+ schedule: ScheduleMetadata.optional(),
914
920
  filePath: zod.z.string(),
915
921
  exportName: zod.z.string()
916
922
  });
@@ -972,7 +978,8 @@ var TaskResource = zod.z.object({
972
978
  queue: QueueOptions.optional(),
973
979
  retry: RetryOptions.optional(),
974
980
  machine: MachineConfig.optional(),
975
- triggerSource: zod.z.string().optional()
981
+ triggerSource: zod.z.string().optional(),
982
+ schedule: ScheduleMetadata.optional()
976
983
  });
977
984
  var BackgroundWorkerMetadata = zod.z.object({
978
985
  packageVersion: zod.z.string(),
@@ -1135,10 +1142,21 @@ var ReplayRunResponse = zod.z.object({
1135
1142
  var CanceledRunResponse = zod.z.object({
1136
1143
  id: zod.z.string()
1137
1144
  });
1145
+ var ScheduleType = zod.z.union([
1146
+ zod.z.literal("DECLARATIVE"),
1147
+ zod.z.literal("IMPERATIVE")
1148
+ ]);
1138
1149
  zod.z.object({
1139
1150
  /** The schedule id associated with this run (you can have many schedules for the same task).
1140
1151
  You can use this to remove the schedule, update it, etc */
1141
1152
  scheduleId: zod.z.string(),
1153
+ /** The type of schedule – `"DECLARATIVE"` or `"IMPERATIVE"`.
1154
+ *
1155
+ * **DECLARATIVE** – defined inline on your `schedules.task` using the `cron` property. They can only be created, updated or deleted by modifying the `cron` property on your task.
1156
+ *
1157
+ * **IMPERATIVE** – created using the `schedules.create` functions or in the dashboard.
1158
+ */
1159
+ type: ScheduleType,
1142
1160
  /** When the task was scheduled to run.
1143
1161
  * Note this will be slightly different from `new Date()` because it takes a few ms to run the task.
1144
1162
  *
@@ -1214,6 +1232,7 @@ var ScheduleGenerator = zod.z.object({
1214
1232
  });
1215
1233
  var ScheduleObject = zod.z.object({
1216
1234
  id: zod.z.string(),
1235
+ type: ScheduleType,
1217
1236
  task: zod.z.string(),
1218
1237
  active: zod.z.boolean(),
1219
1238
  deduplicationKey: zod.z.string().nullish(),