@trigger.dev/core 3.0.0-beta.34 → 3.0.0-beta.36

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 (53) hide show
  1. package/dist/catalog-XTlJQaMn.d.mts +202 -0
  2. package/dist/catalog-dRKTgwQ7.d.ts +202 -0
  3. package/dist/{manager-WNMVbgHf.d.mts → manager-JkbddlcO.d.mts} +43 -42
  4. package/dist/{manager-WNMVbgHf.d.ts → manager-JkbddlcO.d.ts} +43 -42
  5. package/dist/{messages-vq7Bk4Ap.d.mts → messages-6_-q72KG.d.mts} +5970 -2067
  6. package/dist/{messages-vq7Bk4Ap.d.ts → messages-6_-q72KG.d.ts} +5970 -2067
  7. package/dist/{catalog-tX1P4jZQ.d.ts → schemas-r4ZP9S-F.d.mts} +22 -201
  8. package/dist/{catalog-Y8FyPWvh.d.mts → schemas-r4ZP9S-F.d.ts} +22 -201
  9. package/dist/v3/dev/index.d.mts +2 -2
  10. package/dist/v3/dev/index.d.ts +2 -2
  11. package/dist/v3/dev/index.js +4 -4
  12. package/dist/v3/dev/index.js.map +1 -1
  13. package/dist/v3/dev/index.mjs +4 -4
  14. package/dist/v3/dev/index.mjs.map +1 -1
  15. package/dist/v3/index.d.mts +584 -152
  16. package/dist/v3/index.d.ts +584 -152
  17. package/dist/v3/index.js +962 -350
  18. package/dist/v3/index.js.map +1 -1
  19. package/dist/v3/index.mjs +953 -350
  20. package/dist/v3/index.mjs.map +1 -1
  21. package/dist/v3/otel/index.js +1 -1
  22. package/dist/v3/otel/index.js.map +1 -1
  23. package/dist/v3/otel/index.mjs +1 -1
  24. package/dist/v3/otel/index.mjs.map +1 -1
  25. package/dist/v3/prod/index.d.mts +3 -3
  26. package/dist/v3/prod/index.d.ts +3 -3
  27. package/dist/v3/prod/index.js +90 -15
  28. package/dist/v3/prod/index.js.map +1 -1
  29. package/dist/v3/prod/index.mjs +90 -15
  30. package/dist/v3/prod/index.mjs.map +1 -1
  31. package/dist/v3/workers/index.d.mts +6 -5
  32. package/dist/v3/workers/index.d.ts +6 -5
  33. package/dist/v3/workers/index.js +476 -53
  34. package/dist/v3/workers/index.js.map +1 -1
  35. package/dist/v3/workers/index.mjs +477 -54
  36. package/dist/v3/workers/index.mjs.map +1 -1
  37. package/dist/v3/zodMessageHandler.d.mts +1 -1
  38. package/dist/v3/zodMessageHandler.d.ts +1 -1
  39. package/dist/v3/zodNamespace.js +16 -6
  40. package/dist/v3/zodNamespace.js.map +1 -1
  41. package/dist/v3/zodNamespace.mjs +17 -7
  42. package/dist/v3/zodNamespace.mjs.map +1 -1
  43. package/dist/v3/zodSocket.js +16 -6
  44. package/dist/v3/zodSocket.js.map +1 -1
  45. package/dist/v3/zodSocket.mjs +17 -7
  46. package/dist/v3/zodSocket.mjs.map +1 -1
  47. package/dist/v3/zodfetch.d.mts +262 -0
  48. package/dist/v3/zodfetch.d.ts +262 -0
  49. package/dist/v3/zodfetch.js +744 -0
  50. package/dist/v3/zodfetch.js.map +1 -0
  51. package/dist/v3/zodfetch.mjs +716 -0
  52. package/dist/v3/zodfetch.mjs.map +1 -0
  53. package/package.json +9 -1
@@ -1,14 +1,19 @@
1
+ import * as zod from 'zod';
1
2
  import { z } from 'zod';
2
- import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, a as TaskRunError, b as TaskRunContext, R as RuntimeManager } from '../manager-WNMVbgHf.js';
3
- export { h as TaskRun, c as TaskRunBuiltInError, d as TaskRunCustomErrorObject, f as TaskRunErrorCodes, p as TaskRunExecution, j as TaskRunExecutionAttempt, o as TaskRunExecutionBatch, k as TaskRunExecutionEnvironment, l as TaskRunExecutionOrganization, m as TaskRunExecutionProject, n as TaskRunExecutionQueue, q as TaskRunExecutionRetry, i as TaskRunExecutionTask, r as TaskRunFailedExecutionResult, g as TaskRunInternalError, e as TaskRunStringError, s as TaskRunSuccessfulExecutionResult } from '../manager-WNMVbgHf.js';
4
- import { Readable } from 'stream';
5
- import { P as Prettify, C as Clock, a as ClockTime, T as TaskLogger, b as TaskCatalog, c as TaskMetadataWithFunctions, d as TaskFileMetadata, e as TaskMetadataWithFilePath, R as RetryOptions, f as TriggerTracer } from '../catalog-tX1P4jZQ.js';
6
- export { p as Config, v as Context, E as EnvironmentType, x as FailureFnParams, F as FixedWindowRateLimit, A as HandleErrorArgs, H as HandleErrorFnParams, B as HandleErrorFunction, y as HandleErrorModificationOptions, z as HandleErrorResult, t as InitFnParams, I as InitOutput, L as LogLevel, h as Machine, M as MachineCpu, g as MachineMemory, s as MiddlewareFnParams, n as PostStartCauses, o as PreStopCauses, j as ProdTaskRunExecution, k as ProdTaskRunExecutionPayload, N as ProjectConfig, Q as QueueOptions, l as RateLimitOptions, K as RequireKeys, J as ResolveEnvironmentVariablesFunction, G as ResolveEnvironmentVariablesParams, D as ResolveEnvironmentVariablesResult, q as ResolvedConfig, r as RunFnParams, S as SlidingWindowRateLimit, u as StartFnParams, w as SuccessFnParams, m as TaskMetadata, i as TaskRunExecutionPayload, W as WaitReason } from '../catalog-tX1P4jZQ.js';
3
+ import { Uploadable, BlobLikePart, CursorPageParams, ApiPromise, CursorPagePromise, OffsetLimitPagePromise } from './zodfetch.js';
4
+ export { APIHeaders, ApiConnectionError, ApiError, AuthenticationError, BadRequestError, ConflictError, CursorPage, CursorPageResponse, InternalServerError, NotFoundError, OffsetLimitPage, OffsetLimitPageParams, OffsetLimitPageResponse, Page, PageResponse, PermissionDeniedError, RateLimitError, UnprocessableEntityError } from './zodfetch.js';
5
+ import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, c as TaskRunError, a as TaskRunContext, R as RuntimeManager } from '../manager-JkbddlcO.js';
6
+ export { i as TaskRun, d as TaskRunBuiltInError, e as TaskRunCustomErrorObject, g as TaskRunErrorCodes, b as TaskRunExecution, k as TaskRunExecutionAttempt, p as TaskRunExecutionBatch, l as TaskRunExecutionEnvironment, m as TaskRunExecutionOrganization, n as TaskRunExecutionProject, o as TaskRunExecutionQueue, q as TaskRunExecutionRetry, j as TaskRunExecutionTask, r as TaskRunFailedExecutionResult, h as TaskRunInternalError, f as TaskRunStringError, s as TaskRunSuccessfulExecutionResult } from '../manager-JkbddlcO.js';
7
+ import { C as Clock, b as ClockTime, d as TaskLogger, c as TaskCatalog, a as TaskMetadataWithFunctions, T as TriggerTracer } from '../catalog-dRKTgwQ7.js';
8
+ export { f as Context, F as FailureFnParams, k as HandleErrorArgs, h as HandleErrorFnParams, H as HandleErrorFunction, i as HandleErrorModificationOptions, j as HandleErrorResult, e as InitFnParams, I as InitOutput, L as LogLevel, M as MiddlewareFnParams, P as ProjectConfig, o as ResolveEnvironmentVariablesFunction, n as ResolveEnvironmentVariablesParams, m as ResolveEnvironmentVariablesResult, R as RunFnParams, S as StartFnParams, g as SuccessFnParams } from '../catalog-dRKTgwQ7.js';
7
9
  import { Attributes, Span } from '@opentelemetry/api';
8
- import { B as BackgroundWorkerProperties } from '../messages-vq7Bk4Ap.js';
9
- export { b as BackgroundWorkerClientMessages, a as BackgroundWorkerServerMessages, i as ClientToSharedQueueMessages, C as CoordinatorToPlatformMessages, k as CoordinatorToProdWorkerMessages, h as PlatformToCoordinatorMessages, g as PlatformToProviderMessages, P as ProdChildToWorkerMessages, l as ProdWorkerSocketData, e as ProdWorkerToChildMessages, j as ProdWorkerToCoordinatorMessages, f as ProviderToPlatformMessages, S as SharedQueueToClientMessages, T as TaskMetadataFailedToParseData, U as UncaughtExceptionMessage, d as childToWorkerMessages, c as clientWebsocketMessages, s as serverWebsocketMessages, w as workerToChildMessages } from '../messages-vq7Bk4Ap.js';
10
+ import { B as BackgroundWorkerProperties } from '../messages-6_-q72KG.js';
11
+ export { c as BackgroundWorkerClientMessages, b as BackgroundWorkerServerMessages, i as ClientToSharedQueueMessages, C as CoordinatorToPlatformMessages, k as CoordinatorToProdWorkerMessages, h as PlatformToCoordinatorMessages, g as PlatformToProviderMessages, a as ProdChildToWorkerMessages, l as ProdWorkerSocketData, P as ProdWorkerToChildMessages, j as ProdWorkerToCoordinatorMessages, f as ProviderToPlatformMessages, S as SharedQueueToClientMessages, T as TaskMetadataFailedToParseData, U as UncaughtExceptionMessage, e as childToWorkerMessages, d as clientWebsocketMessages, s as serverWebsocketMessages, w as workerToChildMessages } from '../messages-6_-q72KG.js';
12
+ import { P as Prettify, T as TaskFileMetadata, a as TaskMetadataWithFilePath, R as RetryOptions } from '../schemas-r4ZP9S-F.js';
13
+ export { C as Config, E as EnvironmentType, F as FixedWindowRateLimit, d as Machine, M as MachineCpu, c as MachineMemory, i as PostStartCauses, j as PreStopCauses, f as ProdTaskRunExecution, g as ProdTaskRunExecutionPayload, Q as QueueOptions, h as RateLimitOptions, m as RequireKeys, k as ResolvedConfig, S as SlidingWindowRateLimit, b as TaskMetadata, l as TaskRunExecutionLazyAttemptPayload, e as TaskRunExecutionPayload, W as WaitReason } from '../schemas-r4ZP9S-F.js';
10
14
  import { Unit } from 'humanize-duration';
11
15
  export { e as eventFilterMatches } from '../eventFilterMatches-2kHImluE.js';
16
+ import 'node:stream';
12
17
  import '@opentelemetry/api-logs';
13
18
  import '@opentelemetry/instrumentation';
14
19
 
@@ -635,6 +640,7 @@ declare const CreateBackgroundWorkerRequestBody: z.ZodObject<{
635
640
  }[];
636
641
  cliPackageVersion?: string | undefined;
637
642
  }>;
643
+ supportsLazyAttempts: z.ZodOptional<z.ZodBoolean>;
638
644
  }, "strip", z.ZodTypeAny, {
639
645
  localOnly: boolean;
640
646
  metadata: {
@@ -697,6 +703,7 @@ declare const CreateBackgroundWorkerRequestBody: z.ZodObject<{
697
703
  }[];
698
704
  cliPackageVersion?: string | undefined;
699
705
  };
706
+ supportsLazyAttempts?: boolean | undefined;
700
707
  }, {
701
708
  localOnly: boolean;
702
709
  metadata: {
@@ -759,6 +766,7 @@ declare const CreateBackgroundWorkerRequestBody: z.ZodObject<{
759
766
  }[];
760
767
  cliPackageVersion?: string | undefined;
761
768
  };
769
+ supportsLazyAttempts?: boolean | undefined;
762
770
  }>;
763
771
  type CreateBackgroundWorkerRequestBody = z.infer<typeof CreateBackgroundWorkerRequestBody>;
764
772
  declare const CreateBackgroundWorkerResponse: z.ZodObject<{
@@ -1941,11 +1949,11 @@ declare const ReplayRunResponse: z.ZodObject<{
1941
1949
  }>;
1942
1950
  type ReplayRunResponse = z.infer<typeof ReplayRunResponse>;
1943
1951
  declare const CanceledRunResponse: z.ZodObject<{
1944
- message: z.ZodString;
1952
+ id: z.ZodString;
1945
1953
  }, "strip", z.ZodTypeAny, {
1946
- message: string;
1954
+ id: string;
1947
1955
  }, {
1948
- message: string;
1956
+ id: string;
1949
1957
  }>;
1950
1958
  type CanceledRunResponse = z.infer<typeof CanceledRunResponse>;
1951
1959
  declare const ScheduledTaskPayload: z.ZodObject<{
@@ -2060,6 +2068,20 @@ declare const UpdateScheduleOptions: z.ZodObject<{
2060
2068
  externalId?: string | undefined;
2061
2069
  }>;
2062
2070
  type UpdateScheduleOptions = z.infer<typeof UpdateScheduleOptions>;
2071
+ declare const ScheduleGenerator: z.ZodObject<{
2072
+ type: z.ZodLiteral<"CRON">;
2073
+ expression: z.ZodString;
2074
+ description: z.ZodString;
2075
+ }, "strip", z.ZodTypeAny, {
2076
+ type: "CRON";
2077
+ expression: string;
2078
+ description: string;
2079
+ }, {
2080
+ type: "CRON";
2081
+ expression: string;
2082
+ description: string;
2083
+ }>;
2084
+ type ScheduleGenerator = z.infer<typeof ScheduleGenerator>;
2063
2085
  declare const ScheduleObject: z.ZodObject<{
2064
2086
  id: z.ZodString;
2065
2087
  task: z.ZodString;
@@ -2280,18 +2302,100 @@ declare const ListScheduleOptions: z.ZodObject<{
2280
2302
  perPage?: number | undefined;
2281
2303
  }>;
2282
2304
  type ListScheduleOptions = z.infer<typeof ListScheduleOptions>;
2283
- declare const RunStatus: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
2305
+ declare const RunStatus: z.ZodEnum<["WAITING_FOR_DEPLOY", "QUEUED", "EXECUTING", "REATTEMPTING", "FROZEN", "COMPLETED", "CANCELED", "FAILED", "CRASHED", "INTERRUPTED", "SYSTEM_FAILURE"]>;
2284
2306
  type RunStatus = z.infer<typeof RunStatus>;
2285
2307
  declare const AttemptStatus: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
2286
2308
  type AttemptStatus = z.infer<typeof AttemptStatus>;
2287
- declare const RetrieveRunResponse: z.ZodObject<{
2309
+ declare const RunEnvironmentDetails: z.ZodObject<{
2288
2310
  id: z.ZodString;
2289
- status: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
2290
- taskIdentifier: z.ZodString;
2291
- idempotencyKey: z.ZodOptional<z.ZodString>;
2292
- version: z.ZodOptional<z.ZodString>;
2293
- createdAt: z.ZodDate;
2294
- updatedAt: z.ZodDate;
2311
+ name: z.ZodString;
2312
+ user: z.ZodOptional<z.ZodString>;
2313
+ }, "strip", z.ZodTypeAny, {
2314
+ id: string;
2315
+ name: string;
2316
+ user?: string | undefined;
2317
+ }, {
2318
+ id: string;
2319
+ name: string;
2320
+ user?: string | undefined;
2321
+ }>;
2322
+ type RunEnvironmentDetails = z.infer<typeof RunEnvironmentDetails>;
2323
+ declare const RunScheduleDetails: z.ZodObject<{
2324
+ id: z.ZodString;
2325
+ externalId: z.ZodOptional<z.ZodString>;
2326
+ deduplicationKey: z.ZodOptional<z.ZodString>;
2327
+ generator: z.ZodObject<{
2328
+ type: z.ZodLiteral<"CRON">;
2329
+ expression: z.ZodString;
2330
+ description: z.ZodString;
2331
+ }, "strip", z.ZodTypeAny, {
2332
+ type: "CRON";
2333
+ expression: string;
2334
+ description: string;
2335
+ }, {
2336
+ type: "CRON";
2337
+ expression: string;
2338
+ description: string;
2339
+ }>;
2340
+ }, "strip", z.ZodTypeAny, {
2341
+ id: string;
2342
+ generator: {
2343
+ type: "CRON";
2344
+ expression: string;
2345
+ description: string;
2346
+ };
2347
+ externalId?: string | undefined;
2348
+ deduplicationKey?: string | undefined;
2349
+ }, {
2350
+ id: string;
2351
+ generator: {
2352
+ type: "CRON";
2353
+ expression: string;
2354
+ description: string;
2355
+ };
2356
+ externalId?: string | undefined;
2357
+ deduplicationKey?: string | undefined;
2358
+ }>;
2359
+ type RunScheduleDetails = z.infer<typeof RunScheduleDetails>;
2360
+ declare const RetrieveRunResponse: z.ZodObject<{
2361
+ payload: z.ZodOptional<z.ZodAny>;
2362
+ output: z.ZodOptional<z.ZodAny>;
2363
+ schedule: z.ZodOptional<z.ZodObject<{
2364
+ id: z.ZodString;
2365
+ externalId: z.ZodOptional<z.ZodString>;
2366
+ deduplicationKey: z.ZodOptional<z.ZodString>;
2367
+ generator: z.ZodObject<{
2368
+ type: z.ZodLiteral<"CRON">;
2369
+ expression: z.ZodString;
2370
+ description: z.ZodString;
2371
+ }, "strip", z.ZodTypeAny, {
2372
+ type: "CRON";
2373
+ expression: string;
2374
+ description: string;
2375
+ }, {
2376
+ type: "CRON";
2377
+ expression: string;
2378
+ description: string;
2379
+ }>;
2380
+ }, "strip", z.ZodTypeAny, {
2381
+ id: string;
2382
+ generator: {
2383
+ type: "CRON";
2384
+ expression: string;
2385
+ description: string;
2386
+ };
2387
+ externalId?: string | undefined;
2388
+ deduplicationKey?: string | undefined;
2389
+ }, {
2390
+ id: string;
2391
+ generator: {
2392
+ type: "CRON";
2393
+ expression: string;
2394
+ description: string;
2395
+ };
2396
+ externalId?: string | undefined;
2397
+ deduplicationKey?: string | undefined;
2398
+ }>>;
2295
2399
  attempts: z.ZodArray<z.ZodOptional<z.ZodObject<{
2296
2400
  id: z.ZodString;
2297
2401
  status: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
@@ -2299,6 +2403,19 @@ declare const RetrieveRunResponse: z.ZodObject<{
2299
2403
  updatedAt: z.ZodDate;
2300
2404
  startedAt: z.ZodOptional<z.ZodDate>;
2301
2405
  completedAt: z.ZodOptional<z.ZodDate>;
2406
+ error: z.ZodOptional<z.ZodObject<{
2407
+ message: z.ZodString;
2408
+ name: z.ZodOptional<z.ZodString>;
2409
+ stackTrace: z.ZodOptional<z.ZodString>;
2410
+ }, "strip", z.ZodTypeAny, {
2411
+ message: string;
2412
+ name?: string | undefined;
2413
+ stackTrace?: string | undefined;
2414
+ }, {
2415
+ message: string;
2416
+ name?: string | undefined;
2417
+ stackTrace?: string | undefined;
2418
+ }>>;
2302
2419
  }, "strip", z.ZodTypeAny, {
2303
2420
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2304
2421
  id: string;
@@ -2306,6 +2423,11 @@ declare const RetrieveRunResponse: z.ZodObject<{
2306
2423
  updatedAt: Date;
2307
2424
  startedAt?: Date | undefined;
2308
2425
  completedAt?: Date | undefined;
2426
+ error?: {
2427
+ message: string;
2428
+ name?: string | undefined;
2429
+ stackTrace?: string | undefined;
2430
+ } | undefined;
2309
2431
  }, {
2310
2432
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2311
2433
  id: string;
@@ -2313,13 +2435,33 @@ declare const RetrieveRunResponse: z.ZodObject<{
2313
2435
  updatedAt: Date;
2314
2436
  startedAt?: Date | undefined;
2315
2437
  completedAt?: Date | undefined;
2438
+ error?: {
2439
+ message: string;
2440
+ name?: string | undefined;
2441
+ stackTrace?: string | undefined;
2442
+ } | undefined;
2316
2443
  }>>, "many">;
2444
+ id: z.ZodString;
2445
+ status: z.ZodEnum<["WAITING_FOR_DEPLOY", "QUEUED", "EXECUTING", "REATTEMPTING", "FROZEN", "COMPLETED", "CANCELED", "FAILED", "CRASHED", "INTERRUPTED", "SYSTEM_FAILURE"]>;
2446
+ taskIdentifier: z.ZodString;
2447
+ idempotencyKey: z.ZodOptional<z.ZodString>;
2448
+ version: z.ZodOptional<z.ZodString>;
2449
+ isQueued: z.ZodBoolean;
2450
+ isExecuting: z.ZodBoolean;
2451
+ isCompleted: z.ZodBoolean;
2452
+ isSuccess: z.ZodBoolean;
2453
+ isFailed: z.ZodBoolean;
2454
+ isCancelled: z.ZodBoolean;
2455
+ isTest: z.ZodBoolean;
2456
+ createdAt: z.ZodDate;
2457
+ updatedAt: z.ZodDate;
2458
+ startedAt: z.ZodOptional<z.ZodDate>;
2459
+ finishedAt: z.ZodOptional<z.ZodDate>;
2317
2460
  }, "strip", z.ZodTypeAny, {
2318
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2461
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2319
2462
  id: string;
2463
+ isTest: boolean;
2320
2464
  createdAt: Date;
2321
- taskIdentifier: string;
2322
- updatedAt: Date;
2323
2465
  attempts: ({
2324
2466
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2325
2467
  id: string;
@@ -2327,15 +2469,41 @@ declare const RetrieveRunResponse: z.ZodObject<{
2327
2469
  updatedAt: Date;
2328
2470
  startedAt?: Date | undefined;
2329
2471
  completedAt?: Date | undefined;
2472
+ error?: {
2473
+ message: string;
2474
+ name?: string | undefined;
2475
+ stackTrace?: string | undefined;
2476
+ } | undefined;
2330
2477
  } | undefined)[];
2478
+ updatedAt: Date;
2479
+ taskIdentifier: string;
2480
+ isQueued: boolean;
2481
+ isExecuting: boolean;
2482
+ isCompleted: boolean;
2483
+ isSuccess: boolean;
2484
+ isFailed: boolean;
2485
+ isCancelled: boolean;
2486
+ payload?: any;
2487
+ output?: any;
2488
+ schedule?: {
2489
+ id: string;
2490
+ generator: {
2491
+ type: "CRON";
2492
+ expression: string;
2493
+ description: string;
2494
+ };
2495
+ externalId?: string | undefined;
2496
+ deduplicationKey?: string | undefined;
2497
+ } | undefined;
2331
2498
  idempotencyKey?: string | undefined;
2332
2499
  version?: string | undefined;
2500
+ startedAt?: Date | undefined;
2501
+ finishedAt?: Date | undefined;
2333
2502
  }, {
2334
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2503
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2335
2504
  id: string;
2505
+ isTest: boolean;
2336
2506
  createdAt: Date;
2337
- taskIdentifier: string;
2338
- updatedAt: Date;
2339
2507
  attempts: ({
2340
2508
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2341
2509
  id: string;
@@ -2343,11 +2511,258 @@ declare const RetrieveRunResponse: z.ZodObject<{
2343
2511
  updatedAt: Date;
2344
2512
  startedAt?: Date | undefined;
2345
2513
  completedAt?: Date | undefined;
2514
+ error?: {
2515
+ message: string;
2516
+ name?: string | undefined;
2517
+ stackTrace?: string | undefined;
2518
+ } | undefined;
2346
2519
  } | undefined)[];
2520
+ updatedAt: Date;
2521
+ taskIdentifier: string;
2522
+ isQueued: boolean;
2523
+ isExecuting: boolean;
2524
+ isCompleted: boolean;
2525
+ isSuccess: boolean;
2526
+ isFailed: boolean;
2527
+ isCancelled: boolean;
2528
+ payload?: any;
2529
+ output?: any;
2530
+ schedule?: {
2531
+ id: string;
2532
+ generator: {
2533
+ type: "CRON";
2534
+ expression: string;
2535
+ description: string;
2536
+ };
2537
+ externalId?: string | undefined;
2538
+ deduplicationKey?: string | undefined;
2539
+ } | undefined;
2347
2540
  idempotencyKey?: string | undefined;
2348
2541
  version?: string | undefined;
2542
+ startedAt?: Date | undefined;
2543
+ finishedAt?: Date | undefined;
2349
2544
  }>;
2350
2545
  type RetrieveRunResponse = z.infer<typeof RetrieveRunResponse>;
2546
+ declare const ListRunResponseItem: z.ZodObject<{
2547
+ env: z.ZodObject<{
2548
+ id: z.ZodString;
2549
+ name: z.ZodString;
2550
+ user: z.ZodOptional<z.ZodString>;
2551
+ }, "strip", z.ZodTypeAny, {
2552
+ id: string;
2553
+ name: string;
2554
+ user?: string | undefined;
2555
+ }, {
2556
+ id: string;
2557
+ name: string;
2558
+ user?: string | undefined;
2559
+ }>;
2560
+ id: z.ZodString;
2561
+ status: z.ZodEnum<["WAITING_FOR_DEPLOY", "QUEUED", "EXECUTING", "REATTEMPTING", "FROZEN", "COMPLETED", "CANCELED", "FAILED", "CRASHED", "INTERRUPTED", "SYSTEM_FAILURE"]>;
2562
+ taskIdentifier: z.ZodString;
2563
+ idempotencyKey: z.ZodOptional<z.ZodString>;
2564
+ version: z.ZodOptional<z.ZodString>;
2565
+ isQueued: z.ZodBoolean;
2566
+ isExecuting: z.ZodBoolean;
2567
+ isCompleted: z.ZodBoolean;
2568
+ isSuccess: z.ZodBoolean;
2569
+ isFailed: z.ZodBoolean;
2570
+ isCancelled: z.ZodBoolean;
2571
+ isTest: z.ZodBoolean;
2572
+ createdAt: z.ZodDate;
2573
+ updatedAt: z.ZodDate;
2574
+ startedAt: z.ZodOptional<z.ZodDate>;
2575
+ finishedAt: z.ZodOptional<z.ZodDate>;
2576
+ }, "strip", z.ZodTypeAny, {
2577
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2578
+ id: string;
2579
+ isTest: boolean;
2580
+ createdAt: Date;
2581
+ updatedAt: Date;
2582
+ taskIdentifier: string;
2583
+ isQueued: boolean;
2584
+ isExecuting: boolean;
2585
+ isCompleted: boolean;
2586
+ isSuccess: boolean;
2587
+ isFailed: boolean;
2588
+ isCancelled: boolean;
2589
+ env: {
2590
+ id: string;
2591
+ name: string;
2592
+ user?: string | undefined;
2593
+ };
2594
+ idempotencyKey?: string | undefined;
2595
+ version?: string | undefined;
2596
+ startedAt?: Date | undefined;
2597
+ finishedAt?: Date | undefined;
2598
+ }, {
2599
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2600
+ id: string;
2601
+ isTest: boolean;
2602
+ createdAt: Date;
2603
+ updatedAt: Date;
2604
+ taskIdentifier: string;
2605
+ isQueued: boolean;
2606
+ isExecuting: boolean;
2607
+ isCompleted: boolean;
2608
+ isSuccess: boolean;
2609
+ isFailed: boolean;
2610
+ isCancelled: boolean;
2611
+ env: {
2612
+ id: string;
2613
+ name: string;
2614
+ user?: string | undefined;
2615
+ };
2616
+ idempotencyKey?: string | undefined;
2617
+ version?: string | undefined;
2618
+ startedAt?: Date | undefined;
2619
+ finishedAt?: Date | undefined;
2620
+ }>;
2621
+ type ListRunResponseItem = z.infer<typeof ListRunResponseItem>;
2622
+ declare const ListRunResponse: z.ZodObject<{
2623
+ data: z.ZodArray<z.ZodObject<{
2624
+ env: z.ZodObject<{
2625
+ id: z.ZodString;
2626
+ name: z.ZodString;
2627
+ user: z.ZodOptional<z.ZodString>;
2628
+ }, "strip", z.ZodTypeAny, {
2629
+ id: string;
2630
+ name: string;
2631
+ user?: string | undefined;
2632
+ }, {
2633
+ id: string;
2634
+ name: string;
2635
+ user?: string | undefined;
2636
+ }>;
2637
+ id: z.ZodString;
2638
+ status: z.ZodEnum<["WAITING_FOR_DEPLOY", "QUEUED", "EXECUTING", "REATTEMPTING", "FROZEN", "COMPLETED", "CANCELED", "FAILED", "CRASHED", "INTERRUPTED", "SYSTEM_FAILURE"]>;
2639
+ taskIdentifier: z.ZodString;
2640
+ idempotencyKey: z.ZodOptional<z.ZodString>;
2641
+ version: z.ZodOptional<z.ZodString>;
2642
+ isQueued: z.ZodBoolean;
2643
+ isExecuting: z.ZodBoolean;
2644
+ isCompleted: z.ZodBoolean;
2645
+ isSuccess: z.ZodBoolean;
2646
+ isFailed: z.ZodBoolean;
2647
+ isCancelled: z.ZodBoolean;
2648
+ isTest: z.ZodBoolean;
2649
+ createdAt: z.ZodDate;
2650
+ updatedAt: z.ZodDate;
2651
+ startedAt: z.ZodOptional<z.ZodDate>;
2652
+ finishedAt: z.ZodOptional<z.ZodDate>;
2653
+ }, "strip", z.ZodTypeAny, {
2654
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2655
+ id: string;
2656
+ isTest: boolean;
2657
+ createdAt: Date;
2658
+ updatedAt: Date;
2659
+ taskIdentifier: string;
2660
+ isQueued: boolean;
2661
+ isExecuting: boolean;
2662
+ isCompleted: boolean;
2663
+ isSuccess: boolean;
2664
+ isFailed: boolean;
2665
+ isCancelled: boolean;
2666
+ env: {
2667
+ id: string;
2668
+ name: string;
2669
+ user?: string | undefined;
2670
+ };
2671
+ idempotencyKey?: string | undefined;
2672
+ version?: string | undefined;
2673
+ startedAt?: Date | undefined;
2674
+ finishedAt?: Date | undefined;
2675
+ }, {
2676
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2677
+ id: string;
2678
+ isTest: boolean;
2679
+ createdAt: Date;
2680
+ updatedAt: Date;
2681
+ taskIdentifier: string;
2682
+ isQueued: boolean;
2683
+ isExecuting: boolean;
2684
+ isCompleted: boolean;
2685
+ isSuccess: boolean;
2686
+ isFailed: boolean;
2687
+ isCancelled: boolean;
2688
+ env: {
2689
+ id: string;
2690
+ name: string;
2691
+ user?: string | undefined;
2692
+ };
2693
+ idempotencyKey?: string | undefined;
2694
+ version?: string | undefined;
2695
+ startedAt?: Date | undefined;
2696
+ finishedAt?: Date | undefined;
2697
+ }>, "many">;
2698
+ pagination: z.ZodObject<{
2699
+ next: z.ZodOptional<z.ZodString>;
2700
+ previous: z.ZodOptional<z.ZodString>;
2701
+ }, "strip", z.ZodTypeAny, {
2702
+ next?: string | undefined;
2703
+ previous?: string | undefined;
2704
+ }, {
2705
+ next?: string | undefined;
2706
+ previous?: string | undefined;
2707
+ }>;
2708
+ }, "strip", z.ZodTypeAny, {
2709
+ data: {
2710
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2711
+ id: string;
2712
+ isTest: boolean;
2713
+ createdAt: Date;
2714
+ updatedAt: Date;
2715
+ taskIdentifier: string;
2716
+ isQueued: boolean;
2717
+ isExecuting: boolean;
2718
+ isCompleted: boolean;
2719
+ isSuccess: boolean;
2720
+ isFailed: boolean;
2721
+ isCancelled: boolean;
2722
+ env: {
2723
+ id: string;
2724
+ name: string;
2725
+ user?: string | undefined;
2726
+ };
2727
+ idempotencyKey?: string | undefined;
2728
+ version?: string | undefined;
2729
+ startedAt?: Date | undefined;
2730
+ finishedAt?: Date | undefined;
2731
+ }[];
2732
+ pagination: {
2733
+ next?: string | undefined;
2734
+ previous?: string | undefined;
2735
+ };
2736
+ }, {
2737
+ data: {
2738
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2739
+ id: string;
2740
+ isTest: boolean;
2741
+ createdAt: Date;
2742
+ updatedAt: Date;
2743
+ taskIdentifier: string;
2744
+ isQueued: boolean;
2745
+ isExecuting: boolean;
2746
+ isCompleted: boolean;
2747
+ isSuccess: boolean;
2748
+ isFailed: boolean;
2749
+ isCancelled: boolean;
2750
+ env: {
2751
+ id: string;
2752
+ name: string;
2753
+ user?: string | undefined;
2754
+ };
2755
+ idempotencyKey?: string | undefined;
2756
+ version?: string | undefined;
2757
+ startedAt?: Date | undefined;
2758
+ finishedAt?: Date | undefined;
2759
+ }[];
2760
+ pagination: {
2761
+ next?: string | undefined;
2762
+ previous?: string | undefined;
2763
+ };
2764
+ }>;
2765
+ type ListRunResponse = z.infer<typeof ListRunResponse>;
2351
2766
  declare const CreateEnvironmentVariableRequestBody: z.ZodObject<{
2352
2767
  name: z.ZodString;
2353
2768
  value: z.ZodString;
@@ -4089,38 +4504,6 @@ declare const SpanMessagingEvent: z.ZodObject<{
4089
4504
  }>;
4090
4505
  type SpanMessagingEvent = z.infer<typeof SpanMessagingEvent>;
4091
4506
 
4092
- /**
4093
- * Intended to match web.Blob, node.Blob, node-fetch.Blob, etc.
4094
- */
4095
- interface BlobLike {
4096
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
4097
- readonly size: number;
4098
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
4099
- readonly type: string;
4100
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
4101
- text(): Promise<string>;
4102
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
4103
- slice(start?: number, end?: number): BlobLike;
4104
- }
4105
- /**
4106
- * Intended to match web.File, node.File, node-fetch.File, etc.
4107
- */
4108
- interface FileLike extends BlobLike {
4109
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
4110
- readonly lastModified: number;
4111
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
4112
- readonly name: string;
4113
- }
4114
- /**
4115
- * Intended to match web.Response, node.Response, node-fetch.Response, etc.
4116
- */
4117
- interface ResponseLike {
4118
- url: string;
4119
- blob(): Promise<BlobLike>;
4120
- }
4121
- type Uploadable = FileLike | ResponseLike | Readable;
4122
- type BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | Uint8Array | DataView;
4123
-
4124
4507
  interface ImportEnvironmentVariablesParams {
4125
4508
  /**
4126
4509
  * The variables to be imported. If a variable with the same key already exists, it will be overwritten when `override` is `true`.
@@ -4140,6 +4523,20 @@ interface CreateEnvironmentVariableParams {
4140
4523
  interface UpdateEnvironmentVariableParams {
4141
4524
  value: string;
4142
4525
  }
4526
+ interface ListRunsQueryParams extends CursorPageParams {
4527
+ status?: Array<RunStatus> | RunStatus;
4528
+ taskIdentifier?: Array<string> | string;
4529
+ version?: Array<string> | string;
4530
+ from?: Date | number;
4531
+ to?: Date | number;
4532
+ period?: string;
4533
+ bulkAction?: string;
4534
+ schedule?: string;
4535
+ isTest?: boolean;
4536
+ }
4537
+ interface ListProjectRunsQueryParams extends CursorPageParams, ListRunsQueryParams {
4538
+ env?: Array<"dev" | "staging" | "prod"> | "dev" | "staging" | "prod";
4539
+ }
4143
4540
 
4144
4541
  type TriggerOptions = {
4145
4542
  spanParentAsLink?: boolean;
@@ -4154,25 +4551,24 @@ declare class ApiClient {
4154
4551
  constructor(baseUrl: string, accessToken: string);
4155
4552
  getRunResult(runId: string): Promise<TaskRunExecutionResult | undefined>;
4156
4553
  getBatchResults(batchId: string): Promise<BatchTaskRunExecutionResult | undefined>;
4157
- triggerTask(taskId: string, body: TriggerTaskRequestBody, options?: TriggerOptions): Promise<{
4554
+ triggerTask(taskId: string, body: TriggerTaskRequestBody, options?: TriggerOptions): ApiPromise<{
4158
4555
  id: string;
4159
4556
  }>;
4160
- batchTriggerTask(taskId: string, body: BatchTriggerTaskRequestBody, options?: TriggerOptions): Promise<{
4557
+ batchTriggerTask(taskId: string, body: BatchTriggerTaskRequestBody, options?: TriggerOptions): ApiPromise<{
4161
4558
  batchId: string;
4162
4559
  runs: string[];
4163
4560
  }>;
4164
- createUploadPayloadUrl(filename: string): Promise<{
4561
+ createUploadPayloadUrl(filename: string): ApiPromise<{
4165
4562
  presignedUrl: string;
4166
4563
  }>;
4167
- getPayloadUrl(filename: string): Promise<{
4564
+ getPayloadUrl(filename: string): ApiPromise<{
4168
4565
  presignedUrl: string;
4169
4566
  }>;
4170
- retrieveRun(runId: string): Promise<{
4171
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
4567
+ retrieveRun(runId: string): ApiPromise<{
4568
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
4172
4569
  id: string;
4570
+ isTest: boolean;
4173
4571
  createdAt: Date;
4174
- taskIdentifier: string;
4175
- updatedAt: Date;
4176
4572
  attempts: ({
4177
4573
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
4178
4574
  id: string;
@@ -4180,17 +4576,46 @@ declare class ApiClient {
4180
4576
  updatedAt: Date;
4181
4577
  startedAt?: Date | undefined;
4182
4578
  completedAt?: Date | undefined;
4579
+ error?: {
4580
+ message: string;
4581
+ name?: string | undefined;
4582
+ stackTrace?: string | undefined;
4583
+ } | undefined;
4183
4584
  } | undefined)[];
4585
+ updatedAt: Date;
4586
+ taskIdentifier: string;
4587
+ isQueued: boolean;
4588
+ isExecuting: boolean;
4589
+ isCompleted: boolean;
4590
+ isSuccess: boolean;
4591
+ isFailed: boolean;
4592
+ isCancelled: boolean;
4593
+ payload?: any;
4594
+ output?: any;
4595
+ schedule?: {
4596
+ id: string;
4597
+ generator: {
4598
+ type: "CRON";
4599
+ expression: string;
4600
+ description: string;
4601
+ };
4602
+ externalId?: string | undefined;
4603
+ deduplicationKey?: string | undefined;
4604
+ } | undefined;
4184
4605
  idempotencyKey?: string | undefined;
4185
4606
  version?: string | undefined;
4607
+ startedAt?: Date | undefined;
4608
+ finishedAt?: Date | undefined;
4186
4609
  }>;
4187
- replayRun(runId: string): Promise<{
4610
+ listRuns(query?: ListRunsQueryParams): CursorPagePromise<typeof ListRunResponseItem>;
4611
+ listProjectRuns(projectRef: string, query?: ListProjectRunsQueryParams): CursorPagePromise<typeof ListRunResponseItem>;
4612
+ replayRun(runId: string): ApiPromise<{
4188
4613
  id: string;
4189
4614
  }>;
4190
- cancelRun(runId: string): Promise<{
4191
- message: string;
4615
+ cancelRun(runId: string): ApiPromise<{
4616
+ id: string;
4192
4617
  }>;
4193
- createSchedule(options: CreateScheduleOptions): Promise<{
4618
+ createSchedule(options: CreateScheduleOptions): ApiPromise<{
4194
4619
  id: string;
4195
4620
  task: string;
4196
4621
  active: boolean;
@@ -4208,32 +4633,75 @@ declare class ApiClient {
4208
4633
  externalId?: string | null | undefined;
4209
4634
  nextRun?: Date | null | undefined;
4210
4635
  }>;
4211
- listSchedules(options?: ListScheduleOptions): Promise<{
4212
- data: {
4636
+ listSchedules(options?: ListScheduleOptions): OffsetLimitPagePromise<zod.ZodObject<{
4637
+ id: zod.ZodString;
4638
+ task: zod.ZodString;
4639
+ active: zod.ZodBoolean;
4640
+ deduplicationKey: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
4641
+ externalId: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
4642
+ generator: zod.ZodObject<{
4643
+ type: zod.ZodLiteral<"CRON">;
4644
+ expression: zod.ZodString;
4645
+ description: zod.ZodString;
4646
+ }, "strip", zod.ZodTypeAny, {
4647
+ type: "CRON";
4648
+ expression: string;
4649
+ description: string;
4650
+ }, {
4651
+ type: "CRON";
4652
+ expression: string;
4653
+ description: string;
4654
+ }>;
4655
+ nextRun: zod.ZodOptional<zod.ZodNullable<zod.ZodDate>>;
4656
+ environments: zod.ZodArray<zod.ZodObject<{
4657
+ id: zod.ZodString;
4658
+ type: zod.ZodString;
4659
+ userName: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
4660
+ }, "strip", zod.ZodTypeAny, {
4661
+ type: string;
4213
4662
  id: string;
4214
- task: string;
4215
- active: boolean;
4216
- generator: {
4217
- type: "CRON";
4218
- expression: string;
4219
- description: string;
4220
- };
4221
- environments: {
4222
- type: string;
4223
- id: string;
4224
- userName?: string | null | undefined;
4225
- }[];
4226
- deduplicationKey?: string | null | undefined;
4227
- externalId?: string | null | undefined;
4228
- nextRun?: Date | null | undefined;
4663
+ userName?: string | null | undefined;
4664
+ }, {
4665
+ type: string;
4666
+ id: string;
4667
+ userName?: string | null | undefined;
4668
+ }>, "many">;
4669
+ }, "strip", zod.ZodTypeAny, {
4670
+ id: string;
4671
+ task: string;
4672
+ active: boolean;
4673
+ generator: {
4674
+ type: "CRON";
4675
+ expression: string;
4676
+ description: string;
4677
+ };
4678
+ environments: {
4679
+ type: string;
4680
+ id: string;
4681
+ userName?: string | null | undefined;
4229
4682
  }[];
4230
- pagination: {
4231
- currentPage: number;
4232
- totalPages: number;
4233
- count: number;
4683
+ deduplicationKey?: string | null | undefined;
4684
+ externalId?: string | null | undefined;
4685
+ nextRun?: Date | null | undefined;
4686
+ }, {
4687
+ id: string;
4688
+ task: string;
4689
+ active: boolean;
4690
+ generator: {
4691
+ type: "CRON";
4692
+ expression: string;
4693
+ description: string;
4234
4694
  };
4235
- }>;
4236
- retrieveSchedule(scheduleId: string): Promise<{
4695
+ environments: {
4696
+ type: string;
4697
+ id: string;
4698
+ userName?: string | null | undefined;
4699
+ }[];
4700
+ deduplicationKey?: string | null | undefined;
4701
+ externalId?: string | null | undefined;
4702
+ nextRun?: Date | null | undefined;
4703
+ }>>;
4704
+ retrieveSchedule(scheduleId: string): ApiPromise<{
4237
4705
  id: string;
4238
4706
  task: string;
4239
4707
  active: boolean;
@@ -4251,7 +4719,7 @@ declare class ApiClient {
4251
4719
  externalId?: string | null | undefined;
4252
4720
  nextRun?: Date | null | undefined;
4253
4721
  }>;
4254
- updateSchedule(scheduleId: string, options: UpdateScheduleOptions): Promise<{
4722
+ updateSchedule(scheduleId: string, options: UpdateScheduleOptions): ApiPromise<{
4255
4723
  id: string;
4256
4724
  task: string;
4257
4725
  active: boolean;
@@ -4269,7 +4737,7 @@ declare class ApiClient {
4269
4737
  externalId?: string | null | undefined;
4270
4738
  nextRun?: Date | null | undefined;
4271
4739
  }>;
4272
- deactivateSchedule(scheduleId: string): Promise<{
4740
+ deactivateSchedule(scheduleId: string): ApiPromise<{
4273
4741
  id: string;
4274
4742
  task: string;
4275
4743
  active: boolean;
@@ -4287,7 +4755,7 @@ declare class ApiClient {
4287
4755
  externalId?: string | null | undefined;
4288
4756
  nextRun?: Date | null | undefined;
4289
4757
  }>;
4290
- activateSchedule(scheduleId: string): Promise<{
4758
+ activateSchedule(scheduleId: string): ApiPromise<{
4291
4759
  id: string;
4292
4760
  task: string;
4293
4761
  active: boolean;
@@ -4305,73 +4773,30 @@ declare class ApiClient {
4305
4773
  externalId?: string | null | undefined;
4306
4774
  nextRun?: Date | null | undefined;
4307
4775
  }>;
4308
- deleteSchedule(scheduleId: string): Promise<{
4776
+ deleteSchedule(scheduleId: string): ApiPromise<{
4309
4777
  id: string;
4310
4778
  }>;
4311
- listEnvVars(projectRef: string, slug: string): Promise<{
4779
+ listEnvVars(projectRef: string, slug: string): ApiPromise<{
4312
4780
  value: string;
4313
4781
  name: string;
4314
4782
  }[]>;
4315
- importEnvVars(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams): Promise<{
4783
+ importEnvVars(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams): ApiPromise<{
4316
4784
  success: boolean;
4317
4785
  }>;
4318
- retrieveEnvVar(projectRef: string, slug: string, key: string): Promise<{
4786
+ retrieveEnvVar(projectRef: string, slug: string, key: string): ApiPromise<{
4319
4787
  value: string;
4320
4788
  }>;
4321
- createEnvVar(projectRef: string, slug: string, body: CreateEnvironmentVariableRequestBody): Promise<{
4789
+ createEnvVar(projectRef: string, slug: string, body: CreateEnvironmentVariableRequestBody): ApiPromise<{
4322
4790
  success: boolean;
4323
4791
  }>;
4324
- updateEnvVar(projectRef: string, slug: string, key: string, body: UpdateEnvironmentVariableRequestBody): Promise<{
4792
+ updateEnvVar(projectRef: string, slug: string, key: string, body: UpdateEnvironmentVariableRequestBody): ApiPromise<{
4325
4793
  success: boolean;
4326
4794
  }>;
4327
- deleteEnvVar(projectRef: string, slug: string, key: string): Promise<{
4795
+ deleteEnvVar(projectRef: string, slug: string, key: string): ApiPromise<{
4328
4796
  success: boolean;
4329
4797
  }>;
4330
4798
  }
4331
4799
 
4332
- type APIHeaders = Record<string, string | null | undefined>;
4333
- declare class APIError extends Error {
4334
- readonly status: number | undefined;
4335
- readonly headers: APIHeaders | undefined;
4336
- readonly error: Object | undefined;
4337
- readonly code: string | null | undefined;
4338
- readonly param: string | null | undefined;
4339
- readonly type: string | undefined;
4340
- constructor(status: number | undefined, error: Object | undefined, message: string | undefined, headers: APIHeaders | undefined);
4341
- private static makeMessage;
4342
- static generate(status: number | undefined, errorResponse: Object | undefined, message: string | undefined, headers: APIHeaders | undefined): APIError;
4343
- }
4344
- declare class APIConnectionError extends APIError {
4345
- readonly status: undefined;
4346
- constructor({ message, cause }: {
4347
- message?: string;
4348
- cause?: Error | undefined;
4349
- });
4350
- }
4351
- declare class BadRequestError extends APIError {
4352
- readonly status: 400;
4353
- }
4354
- declare class AuthenticationError extends APIError {
4355
- readonly status: 401;
4356
- }
4357
- declare class PermissionDeniedError extends APIError {
4358
- readonly status: 403;
4359
- }
4360
- declare class NotFoundError extends APIError {
4361
- readonly status: 404;
4362
- }
4363
- declare class ConflictError extends APIError {
4364
- readonly status: 409;
4365
- }
4366
- declare class UnprocessableEntityError extends APIError {
4367
- readonly status: 422;
4368
- }
4369
- declare class RateLimitError extends APIError {
4370
- readonly status: 429;
4371
- }
4372
- declare class InternalServerError extends APIError {
4373
- }
4374
-
4375
4800
  declare class ClockAPI {
4376
4801
  #private;
4377
4802
  private static _instance?;
@@ -4387,17 +4812,24 @@ declare const clock: ClockAPI;
4387
4812
 
4388
4813
  declare function parseError(error: unknown): TaskRunError;
4389
4814
  declare function createErrorTaskError(error: TaskRunError): any;
4390
- declare function createJsonErrorObject(error: TaskRunError): {
4391
- name: string;
4815
+ declare const SerializedError: z.ZodObject<{
4816
+ message: z.ZodString;
4817
+ name: z.ZodOptional<z.ZodString>;
4818
+ stackTrace: z.ZodOptional<z.ZodString>;
4819
+ }, "strip", z.ZodTypeAny, {
4392
4820
  message: string;
4393
- stackTrace: string;
4394
- } | {
4821
+ name?: string | undefined;
4822
+ stackTrace?: string | undefined;
4823
+ }, {
4395
4824
  message: string;
4396
- name?: undefined;
4397
- stackTrace?: undefined;
4398
- };
4825
+ name?: string | undefined;
4826
+ stackTrace?: string | undefined;
4827
+ }>;
4828
+ type SerializedError = z.infer<typeof SerializedError>;
4829
+ declare function createJsonErrorObject(error: TaskRunError): SerializedError;
4399
4830
  declare function correctErrorStackTrace(stackTrace: string, projectDir?: string, options?: {
4400
4831
  removeFirstLine?: boolean;
4832
+ isDev?: boolean;
4401
4833
  }): string;
4402
4834
  declare function groupTaskMetadataIssuesByTask(tasks: any, issues: z.ZodIssue[]): Record<number, {
4403
4835
  id: any;
@@ -4650,4 +5082,4 @@ declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataT
4650
5082
  declare function createPacketAttributesAsJson(data: any, dataType: string): Promise<Attributes>;
4651
5083
  declare function prettyPrintPacket(rawData: any, dataType?: string): Promise<string>;
4652
5084
 
4653
- export { APIConnectionError, APIError, type APIHeaders, Accessory, ApiClient, type ApiClientConfiguration, AttemptStatus, AuthenticationError, BackgroundWorkerMetadata, BackgroundWorkerProperties, BadRequestError, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CanceledRunResponse, CancellationSpanEvent, ConflictError, type CreateAuthorizationCodeResponse, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, type CreateEnvironmentVariableParams, CreateEnvironmentVariableRequestBody, CreateScheduleOptions, CreateUploadPayloadUrlResponseBody, DeletedScheduleObject, DeploymentErrorData, EnvironmentVariable, EnvironmentVariableResponseBody, EnvironmentVariableValue, EnvironmentVariables, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, type GetPersonalAccessTokenRequest, GetPersonalAccessTokenRequestSchema, type GetPersonalAccessTokenResponse, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, type IOPacket, ImageDetailsMetadata, type ImportEnvironmentVariablesParams, ImportEnvironmentVariablesRequestBody, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, InternalServerError, ListScheduleOptions, ListSchedulesResult, NULL_SENTINEL, NotFoundError, OFFLOAD_IO_PACKET_LENGTH_LIMIT, OTEL_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, OTEL_ATTRIBUTE_PER_LINK_COUNT_LIMIT, OTEL_LINK_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_EVENT_COUNT_LIMIT, OtherSpanEvent, PRIMARY_VARIANT, PermissionDeniedError, Prettify, RateLimitError, ReplayRunResponse, RetrieveRunResponse, RetryOptions, RunStatus, ScheduleObject, ScheduledTaskPayload, SemanticInternalAttributes, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskFileMetadata, TaskMetadataWithFilePath, TaskMetadataWithFunctions, TaskResource, TaskRunContext, TaskRunError, TaskRunExecutionResult, type TriggerOptions, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, UnprocessableEntityError, type UpdateEnvironmentVariableParams, UpdateEnvironmentVariableRequestBody, UpdateScheduleOptions, Variant, type WhoAmIResponse, WhoAmIResponseSchema, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError, createJsonErrorObject, createPacketAttributes, createPacketAttributesAsJson, defaultFetchRetryOptions, defaultRetryOptions, detectDependencyVersion, flattenAttributes, formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, groupTaskMetadataIssuesByTask, imposeAttributeLimits, isCancellationSpanEvent, isExceptionSpanEvent, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, packetRequiresOffloading, parseError, parsePacket, prettyPrintPacket, primitiveValueOrflattenedAttributes, runtime, stringPatternMatchers, stringifyIO, taskCatalog, taskContext, unflattenAttributes };
5085
+ export { Accessory, ApiClient, type ApiClientConfiguration, ApiPromise, AttemptStatus, BackgroundWorkerMetadata, BackgroundWorkerProperties, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CanceledRunResponse, CancellationSpanEvent, type CreateAuthorizationCodeResponse, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, type CreateEnvironmentVariableParams, CreateEnvironmentVariableRequestBody, CreateScheduleOptions, CreateUploadPayloadUrlResponseBody, CursorPageParams, DeletedScheduleObject, DeploymentErrorData, EnvironmentVariable, EnvironmentVariableResponseBody, EnvironmentVariableValue, EnvironmentVariables, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, type GetPersonalAccessTokenRequest, GetPersonalAccessTokenRequestSchema, type GetPersonalAccessTokenResponse, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, type IOPacket, ImageDetailsMetadata, type ImportEnvironmentVariablesParams, ImportEnvironmentVariablesRequestBody, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, type ListProjectRunsQueryParams, ListRunResponse, ListRunResponseItem, type ListRunsQueryParams, ListScheduleOptions, ListSchedulesResult, NULL_SENTINEL, OFFLOAD_IO_PACKET_LENGTH_LIMIT, OTEL_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, OTEL_ATTRIBUTE_PER_LINK_COUNT_LIMIT, OTEL_LINK_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_EVENT_COUNT_LIMIT, OtherSpanEvent, PRIMARY_VARIANT, Prettify, ReplayRunResponse, RetrieveRunResponse, RetryOptions, RunEnvironmentDetails, RunScheduleDetails, RunStatus, ScheduleGenerator, ScheduleObject, ScheduledTaskPayload, SemanticInternalAttributes, SerializedError, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskEventStyle, TaskFileMetadata, TaskMetadataWithFilePath, TaskMetadataWithFunctions, TaskResource, TaskRunContext, TaskRunError, TaskRunExecutionResult, type TriggerOptions, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, type UpdateEnvironmentVariableParams, UpdateEnvironmentVariableRequestBody, UpdateScheduleOptions, Variant, type WhoAmIResponse, WhoAmIResponseSchema, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError, createJsonErrorObject, createPacketAttributes, createPacketAttributesAsJson, defaultFetchRetryOptions, defaultRetryOptions, detectDependencyVersion, flattenAttributes, formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, groupTaskMetadataIssuesByTask, imposeAttributeLimits, isCancellationSpanEvent, isExceptionSpanEvent, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, packetRequiresOffloading, parseError, parsePacket, prettyPrintPacket, primitiveValueOrflattenedAttributes, runtime, stringPatternMatchers, stringifyIO, taskCatalog, taskContext, unflattenAttributes };