@trigger.dev/core 3.0.0-beta.26 → 3.0.0-beta.27

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.
@@ -1081,6 +1081,39 @@ z.object({
1081
1081
  page: z.number().optional(),
1082
1082
  perPage: z.number().optional()
1083
1083
  });
1084
+ var RunStatus = z.enum([
1085
+ "PENDING",
1086
+ "EXECUTING",
1087
+ "PAUSED",
1088
+ "COMPLETED",
1089
+ "FAILED",
1090
+ "CANCELED"
1091
+ ]);
1092
+ var AttemptStatus = z.enum([
1093
+ "PENDING",
1094
+ "EXECUTING",
1095
+ "PAUSED",
1096
+ "COMPLETED",
1097
+ "FAILED",
1098
+ "CANCELED"
1099
+ ]);
1100
+ var RetrieveRunResponse = z.object({
1101
+ id: z.string(),
1102
+ status: RunStatus,
1103
+ taskIdentifier: z.string(),
1104
+ idempotencyKey: z.string().optional(),
1105
+ version: z.string().optional(),
1106
+ createdAt: z.coerce.date(),
1107
+ updatedAt: z.coerce.date(),
1108
+ attempts: z.array(z.object({
1109
+ id: z.string(),
1110
+ status: AttemptStatus,
1111
+ createdAt: z.coerce.date(),
1112
+ updatedAt: z.coerce.date(),
1113
+ startedAt: z.coerce.date().optional(),
1114
+ completedAt: z.coerce.date().optional()
1115
+ }).optional())
1116
+ });
1084
1117
 
1085
1118
  // src/v3/apiErrors.ts
1086
1119
  var _APIError = class _APIError extends Error {
@@ -1454,6 +1487,12 @@ var _ApiClient = class _ApiClient {
1454
1487
  headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
1455
1488
  }, zodFetchOptions);
1456
1489
  }
1490
+ retrieveRun(runId) {
1491
+ return zodfetch(RetrieveRunResponse, `${this.baseUrl}/api/v3/runs/${runId}`, {
1492
+ method: "GET",
1493
+ headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
1494
+ }, zodFetchOptions);
1495
+ }
1457
1496
  replayRun(runId) {
1458
1497
  return zodfetch(ReplayRunResponse, `${this.baseUrl}/api/v1/runs/${runId}/replay`, {
1459
1498
  method: "POST",
@@ -2273,7 +2312,6 @@ var logLevels = [
2273
2312
  "none",
2274
2313
  "error",
2275
2314
  "warn",
2276
- "log",
2277
2315
  "info",
2278
2316
  "debug"
2279
2317
  ];
@@ -2286,7 +2324,7 @@ var _OtelTaskLogger = class _OtelTaskLogger {
2286
2324
  this._level = logLevels.indexOf(_config.level);
2287
2325
  }
2288
2326
  debug(message, properties) {
2289
- if (this._level < 5)
2327
+ if (this._level < 4)
2290
2328
  return;
2291
2329
  __privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "debug", SeverityNumber.DEBUG, properties);
2292
2330
  }
@@ -2296,7 +2334,7 @@ var _OtelTaskLogger = class _OtelTaskLogger {
2296
2334
  __privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "log", SeverityNumber.INFO, properties);
2297
2335
  }
2298
2336
  info(message, properties) {
2299
- if (this._level < 4)
2337
+ if (this._level < 3)
2300
2338
  return;
2301
2339
  __privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "info", SeverityNumber.INFO, properties);
2302
2340
  }