@trigger.dev/core 0.0.0-v3-prerelease-20240629184757 → 0.0.0-v3-prerelease-20240701153550

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/v3/index.js CHANGED
@@ -33,7 +33,7 @@ var __privateMethod = (obj, member, method) => {
33
33
  };
34
34
 
35
35
  // package.json
36
- var version = "0.0.0-v3-prerelease-20240629184757";
36
+ var version = "0.0.0-v3-prerelease-20240701153550";
37
37
  var dependencies = {
38
38
  "@google-cloud/precise-date": "^4.0.0",
39
39
  "@opentelemetry/api": "^1.8.0",
@@ -677,7 +677,9 @@ var TriggerTaskRequestBody = zod.z.object({
677
677
  concurrencyKey: zod.z.string().optional(),
678
678
  idempotencyKey: zod.z.string().optional(),
679
679
  test: zod.z.boolean().optional(),
680
- payloadType: zod.z.string().optional()
680
+ payloadType: zod.z.string().optional(),
681
+ delay: zod.z.string().or(zod.z.coerce.date()).optional(),
682
+ ttl: zod.z.string().or(zod.z.number().nonnegative().int()).optional()
681
683
  }).optional()
682
684
  });
683
685
  var TriggerTaskResponse = zod.z.object({
@@ -704,6 +706,9 @@ var GetBatchResponseBody = zod.z.object({
704
706
  ])
705
707
  }))
706
708
  });
709
+ var RescheduleRunRequestBody = zod.z.object({
710
+ delay: zod.z.string().or(zod.z.coerce.date())
711
+ });
707
712
  var GetEnvironmentVariablesResponseBody = zod.z.object({
708
713
  variables: zod.z.record(zod.z.string())
709
714
  });
@@ -907,7 +912,11 @@ var RunStatus = zod.z.enum([
907
912
  /// Task was interrupted during execution, mostly this happens in development environments
908
913
  "INTERRUPTED",
909
914
  /// Task has failed to complete, due to an error in the system
910
- "SYSTEM_FAILURE"
915
+ "SYSTEM_FAILURE",
916
+ /// Task has been scheduled to run at a specific time
917
+ "DELAYED",
918
+ /// Task has expired and won't be executed
919
+ "EXPIRED"
911
920
  ]);
912
921
  var AttemptStatus = zod.z.enum([
913
922
  "PENDING",
@@ -944,7 +953,10 @@ var CommonRunFields = {
944
953
  createdAt: zod.z.coerce.date(),
945
954
  updatedAt: zod.z.coerce.date(),
946
955
  startedAt: zod.z.coerce.date().optional(),
947
- finishedAt: zod.z.coerce.date().optional()
956
+ finishedAt: zod.z.coerce.date().optional(),
957
+ delayedUntil: zod.z.coerce.date().optional(),
958
+ ttl: zod.z.string().optional(),
959
+ expiredAt: zod.z.coerce.date().optional()
948
960
  };
949
961
  var RetrieveRunResponse = zod.z.object({
950
962
  ...CommonRunFields,
@@ -2992,6 +3004,13 @@ var _ApiClient = class _ApiClient {
2992
3004
  headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
2993
3005
  }, zodFetchOptions);
2994
3006
  }
3007
+ rescheduleRun(runId, body) {
3008
+ return zodfetch(RetrieveRunResponse, `${this.baseUrl}/api/v1/runs/${runId}/reschedule`, {
3009
+ method: "POST",
3010
+ headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false),
3011
+ body: JSON.stringify(body)
3012
+ }, zodFetchOptions);
3013
+ }
2995
3014
  createSchedule(options) {
2996
3015
  return zodfetch(ScheduleObject, `${this.baseUrl}/api/v1/schedules`, {
2997
3016
  method: "POST",
@@ -4391,6 +4410,7 @@ exports.QueueOptions = QueueOptions;
4391
4410
  exports.RateLimitError = RateLimitError;
4392
4411
  exports.RateLimitOptions = RateLimitOptions;
4393
4412
  exports.ReplayRunResponse = ReplayRunResponse;
4413
+ exports.RescheduleRunRequestBody = RescheduleRunRequestBody;
4394
4414
  exports.RetrieveRunResponse = RetrieveRunResponse;
4395
4415
  exports.RetryOptions = RetryOptions;
4396
4416
  exports.RunEnvironmentDetails = RunEnvironmentDetails;