@trigger.dev/core 3.0.0-beta.35 → 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 (37) hide show
  1. package/dist/{catalog-BUwiuDbt.d.mts → catalog-XTlJQaMn.d.mts} +3 -3
  2. package/dist/{catalog-eKgqBHUA.d.ts → catalog-dRKTgwQ7.d.ts} +3 -3
  3. package/dist/{manager-uPyMRN8k.d.mts → manager-JkbddlcO.d.mts} +19 -19
  4. package/dist/{manager-uPyMRN8k.d.ts → manager-JkbddlcO.d.ts} +19 -19
  5. package/dist/{messages-l9PdIyKF.d.mts → messages-6_-q72KG.d.mts} +119 -119
  6. package/dist/{messages-l9PdIyKF.d.ts → messages-6_-q72KG.d.ts} +119 -119
  7. package/dist/{schemas-b8tRw8dX.d.mts → schemas-r4ZP9S-F.d.mts} +2 -2
  8. package/dist/{schemas-b8tRw8dX.d.ts → schemas-r4ZP9S-F.d.ts} +2 -2
  9. package/dist/v3/dev/index.d.mts +1 -1
  10. package/dist/v3/dev/index.d.ts +1 -1
  11. package/dist/v3/index.d.mts +579 -122
  12. package/dist/v3/index.d.ts +579 -122
  13. package/dist/v3/index.js +739 -319
  14. package/dist/v3/index.js.map +1 -1
  15. package/dist/v3/index.mjs +730 -318
  16. package/dist/v3/index.mjs.map +1 -1
  17. package/dist/v3/otel/index.js +1 -1
  18. package/dist/v3/otel/index.js.map +1 -1
  19. package/dist/v3/otel/index.mjs +1 -1
  20. package/dist/v3/otel/index.mjs.map +1 -1
  21. package/dist/v3/prod/index.d.mts +2 -2
  22. package/dist/v3/prod/index.d.ts +2 -2
  23. package/dist/v3/workers/index.d.mts +6 -6
  24. package/dist/v3/workers/index.d.ts +6 -6
  25. package/dist/v3/workers/index.js +463 -51
  26. package/dist/v3/workers/index.js.map +1 -1
  27. package/dist/v3/workers/index.mjs +463 -51
  28. package/dist/v3/workers/index.mjs.map +1 -1
  29. package/dist/v3/zodMessageHandler.d.mts +1 -1
  30. package/dist/v3/zodMessageHandler.d.ts +1 -1
  31. package/dist/v3/zodfetch.d.mts +194 -10
  32. package/dist/v3/zodfetch.d.ts +194 -10
  33. package/dist/v3/zodfetch.js +336 -38
  34. package/dist/v3/zodfetch.js.map +1 -1
  35. package/dist/v3/zodfetch.mjs +320 -37
  36. package/dist/v3/zodfetch.mjs.map +1 -1
  37. package/package.json +1 -1
@@ -1,14 +1,16 @@
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-uPyMRN8k.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-uPyMRN8k.js';
4
- import { Uploadable, BlobLikePart } from './zodfetch.js';
5
- import { C as Clock, a as ClockTime, T as TaskLogger, b as TaskCatalog, c as TaskMetadataWithFunctions, d as TriggerTracer } from '../catalog-eKgqBHUA.js';
6
- export { f as Context, F as FailureFnParams, j as HandleErrorArgs, H as HandleErrorFnParams, k as HandleErrorFunction, h as HandleErrorModificationOptions, i as HandleErrorResult, e as InitFnParams, I as InitOutput, L as LogLevel, M as MiddlewareFnParams, P as ProjectConfig, n as ResolveEnvironmentVariablesFunction, m as ResolveEnvironmentVariablesParams, l as ResolveEnvironmentVariablesResult, R as RunFnParams, S as StartFnParams, g as SuccessFnParams } from '../catalog-eKgqBHUA.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-l9PdIyKF.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-l9PdIyKF.js';
10
- import { P as Prettify, T as TaskFileMetadata, a as TaskMetadataWithFilePath, R as RetryOptions } from '../schemas-b8tRw8dX.js';
11
- export { C as Config, E as EnvironmentType, F as FixedWindowRateLimit, c as Machine, M as MachineCpu, b as MachineMemory, i as PostStartCauses, j as PreStopCauses, e as ProdTaskRunExecution, f as ProdTaskRunExecutionPayload, Q as QueueOptions, g as RateLimitOptions, m as RequireKeys, k as ResolvedConfig, S as SlidingWindowRateLimit, h as TaskMetadata, l as TaskRunExecutionLazyAttemptPayload, d as TaskRunExecutionPayload, W as WaitReason } from '../schemas-b8tRw8dX.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';
12
14
  import { Unit } from 'humanize-duration';
13
15
  export { e as eventFilterMatches } from '../eventFilterMatches-2kHImluE.js';
14
16
  import 'node:stream';
@@ -1947,11 +1949,11 @@ declare const ReplayRunResponse: z.ZodObject<{
1947
1949
  }>;
1948
1950
  type ReplayRunResponse = z.infer<typeof ReplayRunResponse>;
1949
1951
  declare const CanceledRunResponse: z.ZodObject<{
1950
- message: z.ZodString;
1952
+ id: z.ZodString;
1951
1953
  }, "strip", z.ZodTypeAny, {
1952
- message: string;
1954
+ id: string;
1953
1955
  }, {
1954
- message: string;
1956
+ id: string;
1955
1957
  }>;
1956
1958
  type CanceledRunResponse = z.infer<typeof CanceledRunResponse>;
1957
1959
  declare const ScheduledTaskPayload: z.ZodObject<{
@@ -2066,6 +2068,20 @@ declare const UpdateScheduleOptions: z.ZodObject<{
2066
2068
  externalId?: string | undefined;
2067
2069
  }>;
2068
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>;
2069
2085
  declare const ScheduleObject: z.ZodObject<{
2070
2086
  id: z.ZodString;
2071
2087
  task: z.ZodString;
@@ -2286,18 +2302,100 @@ declare const ListScheduleOptions: z.ZodObject<{
2286
2302
  perPage?: number | undefined;
2287
2303
  }>;
2288
2304
  type ListScheduleOptions = z.infer<typeof ListScheduleOptions>;
2289
- 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"]>;
2290
2306
  type RunStatus = z.infer<typeof RunStatus>;
2291
2307
  declare const AttemptStatus: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
2292
2308
  type AttemptStatus = z.infer<typeof AttemptStatus>;
2293
- declare const RetrieveRunResponse: z.ZodObject<{
2309
+ declare const RunEnvironmentDetails: z.ZodObject<{
2294
2310
  id: z.ZodString;
2295
- status: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
2296
- taskIdentifier: z.ZodString;
2297
- idempotencyKey: z.ZodOptional<z.ZodString>;
2298
- version: z.ZodOptional<z.ZodString>;
2299
- createdAt: z.ZodDate;
2300
- 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
+ }>>;
2301
2399
  attempts: z.ZodArray<z.ZodOptional<z.ZodObject<{
2302
2400
  id: z.ZodString;
2303
2401
  status: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
@@ -2305,6 +2403,19 @@ declare const RetrieveRunResponse: z.ZodObject<{
2305
2403
  updatedAt: z.ZodDate;
2306
2404
  startedAt: z.ZodOptional<z.ZodDate>;
2307
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
+ }>>;
2308
2419
  }, "strip", z.ZodTypeAny, {
2309
2420
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2310
2421
  id: string;
@@ -2312,6 +2423,11 @@ declare const RetrieveRunResponse: z.ZodObject<{
2312
2423
  updatedAt: Date;
2313
2424
  startedAt?: Date | undefined;
2314
2425
  completedAt?: Date | undefined;
2426
+ error?: {
2427
+ message: string;
2428
+ name?: string | undefined;
2429
+ stackTrace?: string | undefined;
2430
+ } | undefined;
2315
2431
  }, {
2316
2432
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2317
2433
  id: string;
@@ -2319,13 +2435,33 @@ declare const RetrieveRunResponse: z.ZodObject<{
2319
2435
  updatedAt: Date;
2320
2436
  startedAt?: Date | undefined;
2321
2437
  completedAt?: Date | undefined;
2438
+ error?: {
2439
+ message: string;
2440
+ name?: string | undefined;
2441
+ stackTrace?: string | undefined;
2442
+ } | undefined;
2322
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>;
2323
2460
  }, "strip", z.ZodTypeAny, {
2324
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2461
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2325
2462
  id: string;
2463
+ isTest: boolean;
2326
2464
  createdAt: Date;
2327
- taskIdentifier: string;
2328
- updatedAt: Date;
2329
2465
  attempts: ({
2330
2466
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2331
2467
  id: string;
@@ -2333,15 +2469,41 @@ declare const RetrieveRunResponse: z.ZodObject<{
2333
2469
  updatedAt: Date;
2334
2470
  startedAt?: Date | undefined;
2335
2471
  completedAt?: Date | undefined;
2472
+ error?: {
2473
+ message: string;
2474
+ name?: string | undefined;
2475
+ stackTrace?: string | undefined;
2476
+ } | undefined;
2336
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;
2337
2498
  idempotencyKey?: string | undefined;
2338
2499
  version?: string | undefined;
2500
+ startedAt?: Date | undefined;
2501
+ finishedAt?: Date | undefined;
2339
2502
  }, {
2340
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2503
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2341
2504
  id: string;
2505
+ isTest: boolean;
2342
2506
  createdAt: Date;
2343
- taskIdentifier: string;
2344
- updatedAt: Date;
2345
2507
  attempts: ({
2346
2508
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2347
2509
  id: string;
@@ -2349,11 +2511,258 @@ declare const RetrieveRunResponse: z.ZodObject<{
2349
2511
  updatedAt: Date;
2350
2512
  startedAt?: Date | undefined;
2351
2513
  completedAt?: Date | undefined;
2514
+ error?: {
2515
+ message: string;
2516
+ name?: string | undefined;
2517
+ stackTrace?: string | undefined;
2518
+ } | undefined;
2352
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;
2353
2540
  idempotencyKey?: string | undefined;
2354
2541
  version?: string | undefined;
2542
+ startedAt?: Date | undefined;
2543
+ finishedAt?: Date | undefined;
2355
2544
  }>;
2356
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>;
2357
2766
  declare const CreateEnvironmentVariableRequestBody: z.ZodObject<{
2358
2767
  name: z.ZodString;
2359
2768
  value: z.ZodString;
@@ -4114,6 +4523,20 @@ interface CreateEnvironmentVariableParams {
4114
4523
  interface UpdateEnvironmentVariableParams {
4115
4524
  value: string;
4116
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
+ }
4117
4540
 
4118
4541
  type TriggerOptions = {
4119
4542
  spanParentAsLink?: boolean;
@@ -4128,25 +4551,24 @@ declare class ApiClient {
4128
4551
  constructor(baseUrl: string, accessToken: string);
4129
4552
  getRunResult(runId: string): Promise<TaskRunExecutionResult | undefined>;
4130
4553
  getBatchResults(batchId: string): Promise<BatchTaskRunExecutionResult | undefined>;
4131
- triggerTask(taskId: string, body: TriggerTaskRequestBody, options?: TriggerOptions): Promise<{
4554
+ triggerTask(taskId: string, body: TriggerTaskRequestBody, options?: TriggerOptions): ApiPromise<{
4132
4555
  id: string;
4133
4556
  }>;
4134
- batchTriggerTask(taskId: string, body: BatchTriggerTaskRequestBody, options?: TriggerOptions): Promise<{
4557
+ batchTriggerTask(taskId: string, body: BatchTriggerTaskRequestBody, options?: TriggerOptions): ApiPromise<{
4135
4558
  batchId: string;
4136
4559
  runs: string[];
4137
4560
  }>;
4138
- createUploadPayloadUrl(filename: string): Promise<{
4561
+ createUploadPayloadUrl(filename: string): ApiPromise<{
4139
4562
  presignedUrl: string;
4140
4563
  }>;
4141
- getPayloadUrl(filename: string): Promise<{
4564
+ getPayloadUrl(filename: string): ApiPromise<{
4142
4565
  presignedUrl: string;
4143
4566
  }>;
4144
- retrieveRun(runId: string): Promise<{
4145
- 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";
4146
4569
  id: string;
4570
+ isTest: boolean;
4147
4571
  createdAt: Date;
4148
- taskIdentifier: string;
4149
- updatedAt: Date;
4150
4572
  attempts: ({
4151
4573
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
4152
4574
  id: string;
@@ -4154,17 +4576,46 @@ declare class ApiClient {
4154
4576
  updatedAt: Date;
4155
4577
  startedAt?: Date | undefined;
4156
4578
  completedAt?: Date | undefined;
4579
+ error?: {
4580
+ message: string;
4581
+ name?: string | undefined;
4582
+ stackTrace?: string | undefined;
4583
+ } | undefined;
4157
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;
4158
4605
  idempotencyKey?: string | undefined;
4159
4606
  version?: string | undefined;
4607
+ startedAt?: Date | undefined;
4608
+ finishedAt?: Date | undefined;
4160
4609
  }>;
4161
- 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<{
4162
4613
  id: string;
4163
4614
  }>;
4164
- cancelRun(runId: string): Promise<{
4165
- message: string;
4615
+ cancelRun(runId: string): ApiPromise<{
4616
+ id: string;
4166
4617
  }>;
4167
- createSchedule(options: CreateScheduleOptions): Promise<{
4618
+ createSchedule(options: CreateScheduleOptions): ApiPromise<{
4168
4619
  id: string;
4169
4620
  task: string;
4170
4621
  active: boolean;
@@ -4182,32 +4633,75 @@ declare class ApiClient {
4182
4633
  externalId?: string | null | undefined;
4183
4634
  nextRun?: Date | null | undefined;
4184
4635
  }>;
4185
- listSchedules(options?: ListScheduleOptions): Promise<{
4186
- 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;
4187
4662
  id: string;
4188
- task: string;
4189
- active: boolean;
4190
- generator: {
4191
- type: "CRON";
4192
- expression: string;
4193
- description: string;
4194
- };
4195
- environments: {
4196
- type: string;
4197
- id: string;
4198
- userName?: string | null | undefined;
4199
- }[];
4200
- deduplicationKey?: string | null | undefined;
4201
- externalId?: string | null | undefined;
4202
- 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;
4203
4682
  }[];
4204
- pagination: {
4205
- currentPage: number;
4206
- totalPages: number;
4207
- 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;
4208
4694
  };
4209
- }>;
4210
- 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<{
4211
4705
  id: string;
4212
4706
  task: string;
4213
4707
  active: boolean;
@@ -4225,7 +4719,7 @@ declare class ApiClient {
4225
4719
  externalId?: string | null | undefined;
4226
4720
  nextRun?: Date | null | undefined;
4227
4721
  }>;
4228
- updateSchedule(scheduleId: string, options: UpdateScheduleOptions): Promise<{
4722
+ updateSchedule(scheduleId: string, options: UpdateScheduleOptions): ApiPromise<{
4229
4723
  id: string;
4230
4724
  task: string;
4231
4725
  active: boolean;
@@ -4243,7 +4737,7 @@ declare class ApiClient {
4243
4737
  externalId?: string | null | undefined;
4244
4738
  nextRun?: Date | null | undefined;
4245
4739
  }>;
4246
- deactivateSchedule(scheduleId: string): Promise<{
4740
+ deactivateSchedule(scheduleId: string): ApiPromise<{
4247
4741
  id: string;
4248
4742
  task: string;
4249
4743
  active: boolean;
@@ -4261,7 +4755,7 @@ declare class ApiClient {
4261
4755
  externalId?: string | null | undefined;
4262
4756
  nextRun?: Date | null | undefined;
4263
4757
  }>;
4264
- activateSchedule(scheduleId: string): Promise<{
4758
+ activateSchedule(scheduleId: string): ApiPromise<{
4265
4759
  id: string;
4266
4760
  task: string;
4267
4761
  active: boolean;
@@ -4279,73 +4773,30 @@ declare class ApiClient {
4279
4773
  externalId?: string | null | undefined;
4280
4774
  nextRun?: Date | null | undefined;
4281
4775
  }>;
4282
- deleteSchedule(scheduleId: string): Promise<{
4776
+ deleteSchedule(scheduleId: string): ApiPromise<{
4283
4777
  id: string;
4284
4778
  }>;
4285
- listEnvVars(projectRef: string, slug: string): Promise<{
4779
+ listEnvVars(projectRef: string, slug: string): ApiPromise<{
4286
4780
  value: string;
4287
4781
  name: string;
4288
4782
  }[]>;
4289
- importEnvVars(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams): Promise<{
4783
+ importEnvVars(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams): ApiPromise<{
4290
4784
  success: boolean;
4291
4785
  }>;
4292
- retrieveEnvVar(projectRef: string, slug: string, key: string): Promise<{
4786
+ retrieveEnvVar(projectRef: string, slug: string, key: string): ApiPromise<{
4293
4787
  value: string;
4294
4788
  }>;
4295
- createEnvVar(projectRef: string, slug: string, body: CreateEnvironmentVariableRequestBody): Promise<{
4789
+ createEnvVar(projectRef: string, slug: string, body: CreateEnvironmentVariableRequestBody): ApiPromise<{
4296
4790
  success: boolean;
4297
4791
  }>;
4298
- updateEnvVar(projectRef: string, slug: string, key: string, body: UpdateEnvironmentVariableRequestBody): Promise<{
4792
+ updateEnvVar(projectRef: string, slug: string, key: string, body: UpdateEnvironmentVariableRequestBody): ApiPromise<{
4299
4793
  success: boolean;
4300
4794
  }>;
4301
- deleteEnvVar(projectRef: string, slug: string, key: string): Promise<{
4795
+ deleteEnvVar(projectRef: string, slug: string, key: string): ApiPromise<{
4302
4796
  success: boolean;
4303
4797
  }>;
4304
4798
  }
4305
4799
 
4306
- type APIHeaders = Record<string, string | null | undefined>;
4307
- declare class APIError extends Error {
4308
- readonly status: number | undefined;
4309
- readonly headers: APIHeaders | undefined;
4310
- readonly error: Object | undefined;
4311
- readonly code: string | null | undefined;
4312
- readonly param: string | null | undefined;
4313
- readonly type: string | undefined;
4314
- constructor(status: number | undefined, error: Object | undefined, message: string | undefined, headers: APIHeaders | undefined);
4315
- private static makeMessage;
4316
- static generate(status: number | undefined, errorResponse: Object | undefined, message: string | undefined, headers: APIHeaders | undefined): APIError;
4317
- }
4318
- declare class APIConnectionError extends APIError {
4319
- readonly status: undefined;
4320
- constructor({ message, cause }: {
4321
- message?: string;
4322
- cause?: Error | undefined;
4323
- });
4324
- }
4325
- declare class BadRequestError extends APIError {
4326
- readonly status: 400;
4327
- }
4328
- declare class AuthenticationError extends APIError {
4329
- readonly status: 401;
4330
- }
4331
- declare class PermissionDeniedError extends APIError {
4332
- readonly status: 403;
4333
- }
4334
- declare class NotFoundError extends APIError {
4335
- readonly status: 404;
4336
- }
4337
- declare class ConflictError extends APIError {
4338
- readonly status: 409;
4339
- }
4340
- declare class UnprocessableEntityError extends APIError {
4341
- readonly status: 422;
4342
- }
4343
- declare class RateLimitError extends APIError {
4344
- readonly status: 429;
4345
- }
4346
- declare class InternalServerError extends APIError {
4347
- }
4348
-
4349
4800
  declare class ClockAPI {
4350
4801
  #private;
4351
4802
  private static _instance?;
@@ -4361,15 +4812,21 @@ declare const clock: ClockAPI;
4361
4812
 
4362
4813
  declare function parseError(error: unknown): TaskRunError;
4363
4814
  declare function createErrorTaskError(error: TaskRunError): any;
4364
- declare function createJsonErrorObject(error: TaskRunError): {
4365
- 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, {
4366
4820
  message: string;
4367
- stackTrace: string;
4368
- } | {
4821
+ name?: string | undefined;
4822
+ stackTrace?: string | undefined;
4823
+ }, {
4369
4824
  message: string;
4370
- name?: undefined;
4371
- stackTrace?: undefined;
4372
- };
4825
+ name?: string | undefined;
4826
+ stackTrace?: string | undefined;
4827
+ }>;
4828
+ type SerializedError = z.infer<typeof SerializedError>;
4829
+ declare function createJsonErrorObject(error: TaskRunError): SerializedError;
4373
4830
  declare function correctErrorStackTrace(stackTrace: string, projectDir?: string, options?: {
4374
4831
  removeFirstLine?: boolean;
4375
4832
  isDev?: boolean;
@@ -4625,4 +5082,4 @@ declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataT
4625
5082
  declare function createPacketAttributesAsJson(data: any, dataType: string): Promise<Attributes>;
4626
5083
  declare function prettyPrintPacket(rawData: any, dataType?: string): Promise<string>;
4627
5084
 
4628
- 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 };