@trigger.dev/core 0.0.0-v3-prerelease-20240523152756 → 0.0.0-v3-prerelease-20240612084127

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 (51) 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-9lty-Du5.d.mts} +5320 -1444
  6. package/dist/{messages-vq7Bk4Ap.d.ts → messages-9lty-Du5.d.ts} +5320 -1444
  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 +592 -152
  16. package/dist/v3/index.d.ts +592 -152
  17. package/dist/v3/index.js +974 -381
  18. package/dist/v3/index.js.map +1 -1
  19. package/dist/v3/index.mjs +965 -381
  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 +478 -54
  34. package/dist/v3/workers/index.js.map +1 -1
  35. package/dist/v3/workers/index.mjs +479 -55
  36. package/dist/v3/workers/index.mjs.map +1 -1
  37. package/dist/v3/zodNamespace.js +16 -6
  38. package/dist/v3/zodNamespace.js.map +1 -1
  39. package/dist/v3/zodNamespace.mjs +17 -7
  40. package/dist/v3/zodNamespace.mjs.map +1 -1
  41. package/dist/v3/zodSocket.js +16 -6
  42. package/dist/v3/zodSocket.js.map +1 -1
  43. package/dist/v3/zodSocket.mjs +17 -7
  44. package/dist/v3/zodSocket.mjs.map +1 -1
  45. package/dist/v3/zodfetch.d.mts +262 -0
  46. package/dist/v3/zodfetch.d.ts +262 -0
  47. package/dist/v3/zodfetch.js +744 -0
  48. package/dist/v3/zodfetch.js.map +1 -0
  49. package/dist/v3/zodfetch.mjs +716 -0
  50. package/dist/v3/zodfetch.mjs.map +1 -0
  51. 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-9lty-Du5.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-9lty-Du5.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<{
@@ -1811,14 +1819,17 @@ declare const DeploymentErrorData: z.ZodObject<{
1811
1819
  name: z.ZodString;
1812
1820
  message: z.ZodString;
1813
1821
  stack: z.ZodOptional<z.ZodString>;
1822
+ stderr: z.ZodOptional<z.ZodString>;
1814
1823
  }, "strip", z.ZodTypeAny, {
1815
1824
  message: string;
1816
1825
  name: string;
1817
1826
  stack?: string | undefined;
1827
+ stderr?: string | undefined;
1818
1828
  }, {
1819
1829
  message: string;
1820
1830
  name: string;
1821
1831
  stack?: string | undefined;
1832
+ stderr?: string | undefined;
1822
1833
  }>;
1823
1834
  declare const GetDeploymentResponseBody: z.ZodObject<{
1824
1835
  id: z.ZodString;
@@ -1831,14 +1842,17 @@ declare const GetDeploymentResponseBody: z.ZodObject<{
1831
1842
  name: z.ZodString;
1832
1843
  message: z.ZodString;
1833
1844
  stack: z.ZodOptional<z.ZodString>;
1845
+ stderr: z.ZodOptional<z.ZodString>;
1834
1846
  }, "strip", z.ZodTypeAny, {
1835
1847
  message: string;
1836
1848
  name: string;
1837
1849
  stack?: string | undefined;
1850
+ stderr?: string | undefined;
1838
1851
  }, {
1839
1852
  message: string;
1840
1853
  name: string;
1841
1854
  stack?: string | undefined;
1855
+ stderr?: string | undefined;
1842
1856
  }>>>;
1843
1857
  worker: z.ZodOptional<z.ZodObject<{
1844
1858
  id: z.ZodString;
@@ -1889,6 +1903,7 @@ declare const GetDeploymentResponseBody: z.ZodObject<{
1889
1903
  message: string;
1890
1904
  name: string;
1891
1905
  stack?: string | undefined;
1906
+ stderr?: string | undefined;
1892
1907
  } | null | undefined;
1893
1908
  worker?: {
1894
1909
  id: string;
@@ -1911,6 +1926,7 @@ declare const GetDeploymentResponseBody: z.ZodObject<{
1911
1926
  message: string;
1912
1927
  name: string;
1913
1928
  stack?: string | undefined;
1929
+ stderr?: string | undefined;
1914
1930
  } | null | undefined;
1915
1931
  worker?: {
1916
1932
  id: string;
@@ -1941,11 +1957,11 @@ declare const ReplayRunResponse: z.ZodObject<{
1941
1957
  }>;
1942
1958
  type ReplayRunResponse = z.infer<typeof ReplayRunResponse>;
1943
1959
  declare const CanceledRunResponse: z.ZodObject<{
1944
- message: z.ZodString;
1960
+ id: z.ZodString;
1945
1961
  }, "strip", z.ZodTypeAny, {
1946
- message: string;
1962
+ id: string;
1947
1963
  }, {
1948
- message: string;
1964
+ id: string;
1949
1965
  }>;
1950
1966
  type CanceledRunResponse = z.infer<typeof CanceledRunResponse>;
1951
1967
  declare const ScheduledTaskPayload: z.ZodObject<{
@@ -2060,6 +2076,20 @@ declare const UpdateScheduleOptions: z.ZodObject<{
2060
2076
  externalId?: string | undefined;
2061
2077
  }>;
2062
2078
  type UpdateScheduleOptions = z.infer<typeof UpdateScheduleOptions>;
2079
+ declare const ScheduleGenerator: z.ZodObject<{
2080
+ type: z.ZodLiteral<"CRON">;
2081
+ expression: z.ZodString;
2082
+ description: z.ZodString;
2083
+ }, "strip", z.ZodTypeAny, {
2084
+ type: "CRON";
2085
+ expression: string;
2086
+ description: string;
2087
+ }, {
2088
+ type: "CRON";
2089
+ expression: string;
2090
+ description: string;
2091
+ }>;
2092
+ type ScheduleGenerator = z.infer<typeof ScheduleGenerator>;
2063
2093
  declare const ScheduleObject: z.ZodObject<{
2064
2094
  id: z.ZodString;
2065
2095
  task: z.ZodString;
@@ -2280,18 +2310,100 @@ declare const ListScheduleOptions: z.ZodObject<{
2280
2310
  perPage?: number | undefined;
2281
2311
  }>;
2282
2312
  type ListScheduleOptions = z.infer<typeof ListScheduleOptions>;
2283
- declare const RunStatus: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
2313
+ declare const RunStatus: z.ZodEnum<["WAITING_FOR_DEPLOY", "QUEUED", "EXECUTING", "REATTEMPTING", "FROZEN", "COMPLETED", "CANCELED", "FAILED", "CRASHED", "INTERRUPTED", "SYSTEM_FAILURE"]>;
2284
2314
  type RunStatus = z.infer<typeof RunStatus>;
2285
2315
  declare const AttemptStatus: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
2286
2316
  type AttemptStatus = z.infer<typeof AttemptStatus>;
2287
- declare const RetrieveRunResponse: z.ZodObject<{
2317
+ declare const RunEnvironmentDetails: z.ZodObject<{
2288
2318
  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;
2319
+ name: z.ZodString;
2320
+ user: z.ZodOptional<z.ZodString>;
2321
+ }, "strip", z.ZodTypeAny, {
2322
+ id: string;
2323
+ name: string;
2324
+ user?: string | undefined;
2325
+ }, {
2326
+ id: string;
2327
+ name: string;
2328
+ user?: string | undefined;
2329
+ }>;
2330
+ type RunEnvironmentDetails = z.infer<typeof RunEnvironmentDetails>;
2331
+ declare const RunScheduleDetails: z.ZodObject<{
2332
+ id: z.ZodString;
2333
+ externalId: z.ZodOptional<z.ZodString>;
2334
+ deduplicationKey: z.ZodOptional<z.ZodString>;
2335
+ generator: z.ZodObject<{
2336
+ type: z.ZodLiteral<"CRON">;
2337
+ expression: z.ZodString;
2338
+ description: z.ZodString;
2339
+ }, "strip", z.ZodTypeAny, {
2340
+ type: "CRON";
2341
+ expression: string;
2342
+ description: string;
2343
+ }, {
2344
+ type: "CRON";
2345
+ expression: string;
2346
+ description: string;
2347
+ }>;
2348
+ }, "strip", z.ZodTypeAny, {
2349
+ id: string;
2350
+ generator: {
2351
+ type: "CRON";
2352
+ expression: string;
2353
+ description: string;
2354
+ };
2355
+ externalId?: string | undefined;
2356
+ deduplicationKey?: string | undefined;
2357
+ }, {
2358
+ id: string;
2359
+ generator: {
2360
+ type: "CRON";
2361
+ expression: string;
2362
+ description: string;
2363
+ };
2364
+ externalId?: string | undefined;
2365
+ deduplicationKey?: string | undefined;
2366
+ }>;
2367
+ type RunScheduleDetails = z.infer<typeof RunScheduleDetails>;
2368
+ declare const RetrieveRunResponse: z.ZodObject<{
2369
+ payload: z.ZodOptional<z.ZodAny>;
2370
+ output: z.ZodOptional<z.ZodAny>;
2371
+ schedule: z.ZodOptional<z.ZodObject<{
2372
+ id: z.ZodString;
2373
+ externalId: z.ZodOptional<z.ZodString>;
2374
+ deduplicationKey: z.ZodOptional<z.ZodString>;
2375
+ generator: z.ZodObject<{
2376
+ type: z.ZodLiteral<"CRON">;
2377
+ expression: z.ZodString;
2378
+ description: z.ZodString;
2379
+ }, "strip", z.ZodTypeAny, {
2380
+ type: "CRON";
2381
+ expression: string;
2382
+ description: string;
2383
+ }, {
2384
+ type: "CRON";
2385
+ expression: string;
2386
+ description: string;
2387
+ }>;
2388
+ }, "strip", z.ZodTypeAny, {
2389
+ id: string;
2390
+ generator: {
2391
+ type: "CRON";
2392
+ expression: string;
2393
+ description: string;
2394
+ };
2395
+ externalId?: string | undefined;
2396
+ deduplicationKey?: string | undefined;
2397
+ }, {
2398
+ id: string;
2399
+ generator: {
2400
+ type: "CRON";
2401
+ expression: string;
2402
+ description: string;
2403
+ };
2404
+ externalId?: string | undefined;
2405
+ deduplicationKey?: string | undefined;
2406
+ }>>;
2295
2407
  attempts: z.ZodArray<z.ZodOptional<z.ZodObject<{
2296
2408
  id: z.ZodString;
2297
2409
  status: z.ZodEnum<["PENDING", "EXECUTING", "PAUSED", "COMPLETED", "FAILED", "CANCELED"]>;
@@ -2299,6 +2411,19 @@ declare const RetrieveRunResponse: z.ZodObject<{
2299
2411
  updatedAt: z.ZodDate;
2300
2412
  startedAt: z.ZodOptional<z.ZodDate>;
2301
2413
  completedAt: z.ZodOptional<z.ZodDate>;
2414
+ error: z.ZodOptional<z.ZodObject<{
2415
+ message: z.ZodString;
2416
+ name: z.ZodOptional<z.ZodString>;
2417
+ stackTrace: z.ZodOptional<z.ZodString>;
2418
+ }, "strip", z.ZodTypeAny, {
2419
+ message: string;
2420
+ name?: string | undefined;
2421
+ stackTrace?: string | undefined;
2422
+ }, {
2423
+ message: string;
2424
+ name?: string | undefined;
2425
+ stackTrace?: string | undefined;
2426
+ }>>;
2302
2427
  }, "strip", z.ZodTypeAny, {
2303
2428
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2304
2429
  id: string;
@@ -2306,6 +2431,11 @@ declare const RetrieveRunResponse: z.ZodObject<{
2306
2431
  updatedAt: Date;
2307
2432
  startedAt?: Date | undefined;
2308
2433
  completedAt?: Date | undefined;
2434
+ error?: {
2435
+ message: string;
2436
+ name?: string | undefined;
2437
+ stackTrace?: string | undefined;
2438
+ } | undefined;
2309
2439
  }, {
2310
2440
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2311
2441
  id: string;
@@ -2313,13 +2443,33 @@ declare const RetrieveRunResponse: z.ZodObject<{
2313
2443
  updatedAt: Date;
2314
2444
  startedAt?: Date | undefined;
2315
2445
  completedAt?: Date | undefined;
2446
+ error?: {
2447
+ message: string;
2448
+ name?: string | undefined;
2449
+ stackTrace?: string | undefined;
2450
+ } | undefined;
2316
2451
  }>>, "many">;
2452
+ id: z.ZodString;
2453
+ status: z.ZodEnum<["WAITING_FOR_DEPLOY", "QUEUED", "EXECUTING", "REATTEMPTING", "FROZEN", "COMPLETED", "CANCELED", "FAILED", "CRASHED", "INTERRUPTED", "SYSTEM_FAILURE"]>;
2454
+ taskIdentifier: z.ZodString;
2455
+ idempotencyKey: z.ZodOptional<z.ZodString>;
2456
+ version: z.ZodOptional<z.ZodString>;
2457
+ isQueued: z.ZodBoolean;
2458
+ isExecuting: z.ZodBoolean;
2459
+ isCompleted: z.ZodBoolean;
2460
+ isSuccess: z.ZodBoolean;
2461
+ isFailed: z.ZodBoolean;
2462
+ isCancelled: z.ZodBoolean;
2463
+ isTest: z.ZodBoolean;
2464
+ createdAt: z.ZodDate;
2465
+ updatedAt: z.ZodDate;
2466
+ startedAt: z.ZodOptional<z.ZodDate>;
2467
+ finishedAt: z.ZodOptional<z.ZodDate>;
2317
2468
  }, "strip", z.ZodTypeAny, {
2318
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2469
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2319
2470
  id: string;
2471
+ isTest: boolean;
2320
2472
  createdAt: Date;
2321
- taskIdentifier: string;
2322
- updatedAt: Date;
2323
2473
  attempts: ({
2324
2474
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2325
2475
  id: string;
@@ -2327,15 +2477,41 @@ declare const RetrieveRunResponse: z.ZodObject<{
2327
2477
  updatedAt: Date;
2328
2478
  startedAt?: Date | undefined;
2329
2479
  completedAt?: Date | undefined;
2480
+ error?: {
2481
+ message: string;
2482
+ name?: string | undefined;
2483
+ stackTrace?: string | undefined;
2484
+ } | undefined;
2330
2485
  } | undefined)[];
2486
+ updatedAt: Date;
2487
+ taskIdentifier: string;
2488
+ isQueued: boolean;
2489
+ isExecuting: boolean;
2490
+ isCompleted: boolean;
2491
+ isSuccess: boolean;
2492
+ isFailed: boolean;
2493
+ isCancelled: boolean;
2494
+ payload?: any;
2495
+ output?: any;
2496
+ schedule?: {
2497
+ id: string;
2498
+ generator: {
2499
+ type: "CRON";
2500
+ expression: string;
2501
+ description: string;
2502
+ };
2503
+ externalId?: string | undefined;
2504
+ deduplicationKey?: string | undefined;
2505
+ } | undefined;
2331
2506
  idempotencyKey?: string | undefined;
2332
2507
  version?: string | undefined;
2508
+ startedAt?: Date | undefined;
2509
+ finishedAt?: Date | undefined;
2333
2510
  }, {
2334
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2511
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2335
2512
  id: string;
2513
+ isTest: boolean;
2336
2514
  createdAt: Date;
2337
- taskIdentifier: string;
2338
- updatedAt: Date;
2339
2515
  attempts: ({
2340
2516
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
2341
2517
  id: string;
@@ -2343,11 +2519,258 @@ declare const RetrieveRunResponse: z.ZodObject<{
2343
2519
  updatedAt: Date;
2344
2520
  startedAt?: Date | undefined;
2345
2521
  completedAt?: Date | undefined;
2522
+ error?: {
2523
+ message: string;
2524
+ name?: string | undefined;
2525
+ stackTrace?: string | undefined;
2526
+ } | undefined;
2346
2527
  } | undefined)[];
2528
+ updatedAt: Date;
2529
+ taskIdentifier: string;
2530
+ isQueued: boolean;
2531
+ isExecuting: boolean;
2532
+ isCompleted: boolean;
2533
+ isSuccess: boolean;
2534
+ isFailed: boolean;
2535
+ isCancelled: boolean;
2536
+ payload?: any;
2537
+ output?: any;
2538
+ schedule?: {
2539
+ id: string;
2540
+ generator: {
2541
+ type: "CRON";
2542
+ expression: string;
2543
+ description: string;
2544
+ };
2545
+ externalId?: string | undefined;
2546
+ deduplicationKey?: string | undefined;
2547
+ } | undefined;
2347
2548
  idempotencyKey?: string | undefined;
2348
2549
  version?: string | undefined;
2550
+ startedAt?: Date | undefined;
2551
+ finishedAt?: Date | undefined;
2349
2552
  }>;
2350
2553
  type RetrieveRunResponse = z.infer<typeof RetrieveRunResponse>;
2554
+ declare const ListRunResponseItem: z.ZodObject<{
2555
+ env: z.ZodObject<{
2556
+ id: z.ZodString;
2557
+ name: z.ZodString;
2558
+ user: z.ZodOptional<z.ZodString>;
2559
+ }, "strip", z.ZodTypeAny, {
2560
+ id: string;
2561
+ name: string;
2562
+ user?: string | undefined;
2563
+ }, {
2564
+ id: string;
2565
+ name: string;
2566
+ user?: string | undefined;
2567
+ }>;
2568
+ id: z.ZodString;
2569
+ status: z.ZodEnum<["WAITING_FOR_DEPLOY", "QUEUED", "EXECUTING", "REATTEMPTING", "FROZEN", "COMPLETED", "CANCELED", "FAILED", "CRASHED", "INTERRUPTED", "SYSTEM_FAILURE"]>;
2570
+ taskIdentifier: z.ZodString;
2571
+ idempotencyKey: z.ZodOptional<z.ZodString>;
2572
+ version: z.ZodOptional<z.ZodString>;
2573
+ isQueued: z.ZodBoolean;
2574
+ isExecuting: z.ZodBoolean;
2575
+ isCompleted: z.ZodBoolean;
2576
+ isSuccess: z.ZodBoolean;
2577
+ isFailed: z.ZodBoolean;
2578
+ isCancelled: z.ZodBoolean;
2579
+ isTest: z.ZodBoolean;
2580
+ createdAt: z.ZodDate;
2581
+ updatedAt: z.ZodDate;
2582
+ startedAt: z.ZodOptional<z.ZodDate>;
2583
+ finishedAt: z.ZodOptional<z.ZodDate>;
2584
+ }, "strip", z.ZodTypeAny, {
2585
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2586
+ id: string;
2587
+ isTest: boolean;
2588
+ createdAt: Date;
2589
+ updatedAt: Date;
2590
+ taskIdentifier: string;
2591
+ isQueued: boolean;
2592
+ isExecuting: boolean;
2593
+ isCompleted: boolean;
2594
+ isSuccess: boolean;
2595
+ isFailed: boolean;
2596
+ isCancelled: boolean;
2597
+ env: {
2598
+ id: string;
2599
+ name: string;
2600
+ user?: string | undefined;
2601
+ };
2602
+ idempotencyKey?: string | undefined;
2603
+ version?: string | undefined;
2604
+ startedAt?: Date | undefined;
2605
+ finishedAt?: Date | undefined;
2606
+ }, {
2607
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2608
+ id: string;
2609
+ isTest: boolean;
2610
+ createdAt: Date;
2611
+ updatedAt: Date;
2612
+ taskIdentifier: string;
2613
+ isQueued: boolean;
2614
+ isExecuting: boolean;
2615
+ isCompleted: boolean;
2616
+ isSuccess: boolean;
2617
+ isFailed: boolean;
2618
+ isCancelled: boolean;
2619
+ env: {
2620
+ id: string;
2621
+ name: string;
2622
+ user?: string | undefined;
2623
+ };
2624
+ idempotencyKey?: string | undefined;
2625
+ version?: string | undefined;
2626
+ startedAt?: Date | undefined;
2627
+ finishedAt?: Date | undefined;
2628
+ }>;
2629
+ type ListRunResponseItem = z.infer<typeof ListRunResponseItem>;
2630
+ declare const ListRunResponse: z.ZodObject<{
2631
+ data: z.ZodArray<z.ZodObject<{
2632
+ env: z.ZodObject<{
2633
+ id: z.ZodString;
2634
+ name: z.ZodString;
2635
+ user: z.ZodOptional<z.ZodString>;
2636
+ }, "strip", z.ZodTypeAny, {
2637
+ id: string;
2638
+ name: string;
2639
+ user?: string | undefined;
2640
+ }, {
2641
+ id: string;
2642
+ name: string;
2643
+ user?: string | undefined;
2644
+ }>;
2645
+ id: z.ZodString;
2646
+ status: z.ZodEnum<["WAITING_FOR_DEPLOY", "QUEUED", "EXECUTING", "REATTEMPTING", "FROZEN", "COMPLETED", "CANCELED", "FAILED", "CRASHED", "INTERRUPTED", "SYSTEM_FAILURE"]>;
2647
+ taskIdentifier: z.ZodString;
2648
+ idempotencyKey: z.ZodOptional<z.ZodString>;
2649
+ version: z.ZodOptional<z.ZodString>;
2650
+ isQueued: z.ZodBoolean;
2651
+ isExecuting: z.ZodBoolean;
2652
+ isCompleted: z.ZodBoolean;
2653
+ isSuccess: z.ZodBoolean;
2654
+ isFailed: z.ZodBoolean;
2655
+ isCancelled: z.ZodBoolean;
2656
+ isTest: z.ZodBoolean;
2657
+ createdAt: z.ZodDate;
2658
+ updatedAt: z.ZodDate;
2659
+ startedAt: z.ZodOptional<z.ZodDate>;
2660
+ finishedAt: z.ZodOptional<z.ZodDate>;
2661
+ }, "strip", z.ZodTypeAny, {
2662
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2663
+ id: string;
2664
+ isTest: boolean;
2665
+ createdAt: Date;
2666
+ updatedAt: Date;
2667
+ taskIdentifier: string;
2668
+ isQueued: boolean;
2669
+ isExecuting: boolean;
2670
+ isCompleted: boolean;
2671
+ isSuccess: boolean;
2672
+ isFailed: boolean;
2673
+ isCancelled: boolean;
2674
+ env: {
2675
+ id: string;
2676
+ name: string;
2677
+ user?: string | undefined;
2678
+ };
2679
+ idempotencyKey?: string | undefined;
2680
+ version?: string | undefined;
2681
+ startedAt?: Date | undefined;
2682
+ finishedAt?: Date | undefined;
2683
+ }, {
2684
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2685
+ id: string;
2686
+ isTest: boolean;
2687
+ createdAt: Date;
2688
+ updatedAt: Date;
2689
+ taskIdentifier: string;
2690
+ isQueued: boolean;
2691
+ isExecuting: boolean;
2692
+ isCompleted: boolean;
2693
+ isSuccess: boolean;
2694
+ isFailed: boolean;
2695
+ isCancelled: boolean;
2696
+ env: {
2697
+ id: string;
2698
+ name: string;
2699
+ user?: string | undefined;
2700
+ };
2701
+ idempotencyKey?: string | undefined;
2702
+ version?: string | undefined;
2703
+ startedAt?: Date | undefined;
2704
+ finishedAt?: Date | undefined;
2705
+ }>, "many">;
2706
+ pagination: z.ZodObject<{
2707
+ next: z.ZodOptional<z.ZodString>;
2708
+ previous: z.ZodOptional<z.ZodString>;
2709
+ }, "strip", z.ZodTypeAny, {
2710
+ next?: string | undefined;
2711
+ previous?: string | undefined;
2712
+ }, {
2713
+ next?: string | undefined;
2714
+ previous?: string | undefined;
2715
+ }>;
2716
+ }, "strip", z.ZodTypeAny, {
2717
+ data: {
2718
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2719
+ id: string;
2720
+ isTest: boolean;
2721
+ createdAt: Date;
2722
+ updatedAt: Date;
2723
+ taskIdentifier: string;
2724
+ isQueued: boolean;
2725
+ isExecuting: boolean;
2726
+ isCompleted: boolean;
2727
+ isSuccess: boolean;
2728
+ isFailed: boolean;
2729
+ isCancelled: boolean;
2730
+ env: {
2731
+ id: string;
2732
+ name: string;
2733
+ user?: string | undefined;
2734
+ };
2735
+ idempotencyKey?: string | undefined;
2736
+ version?: string | undefined;
2737
+ startedAt?: Date | undefined;
2738
+ finishedAt?: Date | undefined;
2739
+ }[];
2740
+ pagination: {
2741
+ next?: string | undefined;
2742
+ previous?: string | undefined;
2743
+ };
2744
+ }, {
2745
+ data: {
2746
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
2747
+ id: string;
2748
+ isTest: boolean;
2749
+ createdAt: Date;
2750
+ updatedAt: Date;
2751
+ taskIdentifier: string;
2752
+ isQueued: boolean;
2753
+ isExecuting: boolean;
2754
+ isCompleted: boolean;
2755
+ isSuccess: boolean;
2756
+ isFailed: boolean;
2757
+ isCancelled: boolean;
2758
+ env: {
2759
+ id: string;
2760
+ name: string;
2761
+ user?: string | undefined;
2762
+ };
2763
+ idempotencyKey?: string | undefined;
2764
+ version?: string | undefined;
2765
+ startedAt?: Date | undefined;
2766
+ finishedAt?: Date | undefined;
2767
+ }[];
2768
+ pagination: {
2769
+ next?: string | undefined;
2770
+ previous?: string | undefined;
2771
+ };
2772
+ }>;
2773
+ type ListRunResponse = z.infer<typeof ListRunResponse>;
2351
2774
  declare const CreateEnvironmentVariableRequestBody: z.ZodObject<{
2352
2775
  name: z.ZodString;
2353
2776
  value: z.ZodString;
@@ -4089,38 +4512,6 @@ declare const SpanMessagingEvent: z.ZodObject<{
4089
4512
  }>;
4090
4513
  type SpanMessagingEvent = z.infer<typeof SpanMessagingEvent>;
4091
4514
 
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
4515
  interface ImportEnvironmentVariablesParams {
4125
4516
  /**
4126
4517
  * The variables to be imported. If a variable with the same key already exists, it will be overwritten when `override` is `true`.
@@ -4140,6 +4531,20 @@ interface CreateEnvironmentVariableParams {
4140
4531
  interface UpdateEnvironmentVariableParams {
4141
4532
  value: string;
4142
4533
  }
4534
+ interface ListRunsQueryParams extends CursorPageParams {
4535
+ status?: Array<RunStatus> | RunStatus;
4536
+ taskIdentifier?: Array<string> | string;
4537
+ version?: Array<string> | string;
4538
+ from?: Date | number;
4539
+ to?: Date | number;
4540
+ period?: string;
4541
+ bulkAction?: string;
4542
+ schedule?: string;
4543
+ isTest?: boolean;
4544
+ }
4545
+ interface ListProjectRunsQueryParams extends CursorPageParams, ListRunsQueryParams {
4546
+ env?: Array<"dev" | "staging" | "prod"> | "dev" | "staging" | "prod";
4547
+ }
4143
4548
 
4144
4549
  type TriggerOptions = {
4145
4550
  spanParentAsLink?: boolean;
@@ -4154,25 +4559,24 @@ declare class ApiClient {
4154
4559
  constructor(baseUrl: string, accessToken: string);
4155
4560
  getRunResult(runId: string): Promise<TaskRunExecutionResult | undefined>;
4156
4561
  getBatchResults(batchId: string): Promise<BatchTaskRunExecutionResult | undefined>;
4157
- triggerTask(taskId: string, body: TriggerTaskRequestBody, options?: TriggerOptions): Promise<{
4562
+ triggerTask(taskId: string, body: TriggerTaskRequestBody, options?: TriggerOptions): ApiPromise<{
4158
4563
  id: string;
4159
4564
  }>;
4160
- batchTriggerTask(taskId: string, body: BatchTriggerTaskRequestBody, options?: TriggerOptions): Promise<{
4565
+ batchTriggerTask(taskId: string, body: BatchTriggerTaskRequestBody, options?: TriggerOptions): ApiPromise<{
4161
4566
  batchId: string;
4162
4567
  runs: string[];
4163
4568
  }>;
4164
- createUploadPayloadUrl(filename: string): Promise<{
4569
+ createUploadPayloadUrl(filename: string): ApiPromise<{
4165
4570
  presignedUrl: string;
4166
4571
  }>;
4167
- getPayloadUrl(filename: string): Promise<{
4572
+ getPayloadUrl(filename: string): ApiPromise<{
4168
4573
  presignedUrl: string;
4169
4574
  }>;
4170
- retrieveRun(runId: string): Promise<{
4171
- status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
4575
+ retrieveRun(runId: string): ApiPromise<{
4576
+ status: "CANCELED" | "COMPLETED" | "FAILED" | "WAITING_FOR_DEPLOY" | "QUEUED" | "EXECUTING" | "REATTEMPTING" | "FROZEN" | "CRASHED" | "INTERRUPTED" | "SYSTEM_FAILURE";
4172
4577
  id: string;
4578
+ isTest: boolean;
4173
4579
  createdAt: Date;
4174
- taskIdentifier: string;
4175
- updatedAt: Date;
4176
4580
  attempts: ({
4177
4581
  status: "PENDING" | "CANCELED" | "COMPLETED" | "FAILED" | "EXECUTING" | "PAUSED";
4178
4582
  id: string;
@@ -4180,17 +4584,46 @@ declare class ApiClient {
4180
4584
  updatedAt: Date;
4181
4585
  startedAt?: Date | undefined;
4182
4586
  completedAt?: Date | undefined;
4587
+ error?: {
4588
+ message: string;
4589
+ name?: string | undefined;
4590
+ stackTrace?: string | undefined;
4591
+ } | undefined;
4183
4592
  } | undefined)[];
4593
+ updatedAt: Date;
4594
+ taskIdentifier: string;
4595
+ isQueued: boolean;
4596
+ isExecuting: boolean;
4597
+ isCompleted: boolean;
4598
+ isSuccess: boolean;
4599
+ isFailed: boolean;
4600
+ isCancelled: boolean;
4601
+ payload?: any;
4602
+ output?: any;
4603
+ schedule?: {
4604
+ id: string;
4605
+ generator: {
4606
+ type: "CRON";
4607
+ expression: string;
4608
+ description: string;
4609
+ };
4610
+ externalId?: string | undefined;
4611
+ deduplicationKey?: string | undefined;
4612
+ } | undefined;
4184
4613
  idempotencyKey?: string | undefined;
4185
4614
  version?: string | undefined;
4615
+ startedAt?: Date | undefined;
4616
+ finishedAt?: Date | undefined;
4186
4617
  }>;
4187
- replayRun(runId: string): Promise<{
4618
+ listRuns(query?: ListRunsQueryParams): CursorPagePromise<typeof ListRunResponseItem>;
4619
+ listProjectRuns(projectRef: string, query?: ListProjectRunsQueryParams): CursorPagePromise<typeof ListRunResponseItem>;
4620
+ replayRun(runId: string): ApiPromise<{
4188
4621
  id: string;
4189
4622
  }>;
4190
- cancelRun(runId: string): Promise<{
4191
- message: string;
4623
+ cancelRun(runId: string): ApiPromise<{
4624
+ id: string;
4192
4625
  }>;
4193
- createSchedule(options: CreateScheduleOptions): Promise<{
4626
+ createSchedule(options: CreateScheduleOptions): ApiPromise<{
4194
4627
  id: string;
4195
4628
  task: string;
4196
4629
  active: boolean;
@@ -4208,32 +4641,75 @@ declare class ApiClient {
4208
4641
  externalId?: string | null | undefined;
4209
4642
  nextRun?: Date | null | undefined;
4210
4643
  }>;
4211
- listSchedules(options?: ListScheduleOptions): Promise<{
4212
- data: {
4644
+ listSchedules(options?: ListScheduleOptions): OffsetLimitPagePromise<zod.ZodObject<{
4645
+ id: zod.ZodString;
4646
+ task: zod.ZodString;
4647
+ active: zod.ZodBoolean;
4648
+ deduplicationKey: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
4649
+ externalId: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
4650
+ generator: zod.ZodObject<{
4651
+ type: zod.ZodLiteral<"CRON">;
4652
+ expression: zod.ZodString;
4653
+ description: zod.ZodString;
4654
+ }, "strip", zod.ZodTypeAny, {
4655
+ type: "CRON";
4656
+ expression: string;
4657
+ description: string;
4658
+ }, {
4659
+ type: "CRON";
4660
+ expression: string;
4661
+ description: string;
4662
+ }>;
4663
+ nextRun: zod.ZodOptional<zod.ZodNullable<zod.ZodDate>>;
4664
+ environments: zod.ZodArray<zod.ZodObject<{
4665
+ id: zod.ZodString;
4666
+ type: zod.ZodString;
4667
+ userName: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
4668
+ }, "strip", zod.ZodTypeAny, {
4669
+ type: string;
4213
4670
  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;
4671
+ userName?: string | null | undefined;
4672
+ }, {
4673
+ type: string;
4674
+ id: string;
4675
+ userName?: string | null | undefined;
4676
+ }>, "many">;
4677
+ }, "strip", zod.ZodTypeAny, {
4678
+ id: string;
4679
+ task: string;
4680
+ active: boolean;
4681
+ generator: {
4682
+ type: "CRON";
4683
+ expression: string;
4684
+ description: string;
4685
+ };
4686
+ environments: {
4687
+ type: string;
4688
+ id: string;
4689
+ userName?: string | null | undefined;
4229
4690
  }[];
4230
- pagination: {
4231
- currentPage: number;
4232
- totalPages: number;
4233
- count: number;
4691
+ deduplicationKey?: string | null | undefined;
4692
+ externalId?: string | null | undefined;
4693
+ nextRun?: Date | null | undefined;
4694
+ }, {
4695
+ id: string;
4696
+ task: string;
4697
+ active: boolean;
4698
+ generator: {
4699
+ type: "CRON";
4700
+ expression: string;
4701
+ description: string;
4234
4702
  };
4235
- }>;
4236
- retrieveSchedule(scheduleId: string): Promise<{
4703
+ environments: {
4704
+ type: string;
4705
+ id: string;
4706
+ userName?: string | null | undefined;
4707
+ }[];
4708
+ deduplicationKey?: string | null | undefined;
4709
+ externalId?: string | null | undefined;
4710
+ nextRun?: Date | null | undefined;
4711
+ }>>;
4712
+ retrieveSchedule(scheduleId: string): ApiPromise<{
4237
4713
  id: string;
4238
4714
  task: string;
4239
4715
  active: boolean;
@@ -4251,7 +4727,7 @@ declare class ApiClient {
4251
4727
  externalId?: string | null | undefined;
4252
4728
  nextRun?: Date | null | undefined;
4253
4729
  }>;
4254
- updateSchedule(scheduleId: string, options: UpdateScheduleOptions): Promise<{
4730
+ updateSchedule(scheduleId: string, options: UpdateScheduleOptions): ApiPromise<{
4255
4731
  id: string;
4256
4732
  task: string;
4257
4733
  active: boolean;
@@ -4269,7 +4745,7 @@ declare class ApiClient {
4269
4745
  externalId?: string | null | undefined;
4270
4746
  nextRun?: Date | null | undefined;
4271
4747
  }>;
4272
- deactivateSchedule(scheduleId: string): Promise<{
4748
+ deactivateSchedule(scheduleId: string): ApiPromise<{
4273
4749
  id: string;
4274
4750
  task: string;
4275
4751
  active: boolean;
@@ -4287,7 +4763,7 @@ declare class ApiClient {
4287
4763
  externalId?: string | null | undefined;
4288
4764
  nextRun?: Date | null | undefined;
4289
4765
  }>;
4290
- activateSchedule(scheduleId: string): Promise<{
4766
+ activateSchedule(scheduleId: string): ApiPromise<{
4291
4767
  id: string;
4292
4768
  task: string;
4293
4769
  active: boolean;
@@ -4305,73 +4781,30 @@ declare class ApiClient {
4305
4781
  externalId?: string | null | undefined;
4306
4782
  nextRun?: Date | null | undefined;
4307
4783
  }>;
4308
- deleteSchedule(scheduleId: string): Promise<{
4784
+ deleteSchedule(scheduleId: string): ApiPromise<{
4309
4785
  id: string;
4310
4786
  }>;
4311
- listEnvVars(projectRef: string, slug: string): Promise<{
4787
+ listEnvVars(projectRef: string, slug: string): ApiPromise<{
4312
4788
  value: string;
4313
4789
  name: string;
4314
4790
  }[]>;
4315
- importEnvVars(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams): Promise<{
4791
+ importEnvVars(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams): ApiPromise<{
4316
4792
  success: boolean;
4317
4793
  }>;
4318
- retrieveEnvVar(projectRef: string, slug: string, key: string): Promise<{
4794
+ retrieveEnvVar(projectRef: string, slug: string, key: string): ApiPromise<{
4319
4795
  value: string;
4320
4796
  }>;
4321
- createEnvVar(projectRef: string, slug: string, body: CreateEnvironmentVariableRequestBody): Promise<{
4797
+ createEnvVar(projectRef: string, slug: string, body: CreateEnvironmentVariableRequestBody): ApiPromise<{
4322
4798
  success: boolean;
4323
4799
  }>;
4324
- updateEnvVar(projectRef: string, slug: string, key: string, body: UpdateEnvironmentVariableRequestBody): Promise<{
4800
+ updateEnvVar(projectRef: string, slug: string, key: string, body: UpdateEnvironmentVariableRequestBody): ApiPromise<{
4325
4801
  success: boolean;
4326
4802
  }>;
4327
- deleteEnvVar(projectRef: string, slug: string, key: string): Promise<{
4803
+ deleteEnvVar(projectRef: string, slug: string, key: string): ApiPromise<{
4328
4804
  success: boolean;
4329
4805
  }>;
4330
4806
  }
4331
4807
 
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
4808
  declare class ClockAPI {
4376
4809
  #private;
4377
4810
  private static _instance?;
@@ -4387,17 +4820,24 @@ declare const clock: ClockAPI;
4387
4820
 
4388
4821
  declare function parseError(error: unknown): TaskRunError;
4389
4822
  declare function createErrorTaskError(error: TaskRunError): any;
4390
- declare function createJsonErrorObject(error: TaskRunError): {
4391
- name: string;
4823
+ declare const SerializedError: z.ZodObject<{
4824
+ message: z.ZodString;
4825
+ name: z.ZodOptional<z.ZodString>;
4826
+ stackTrace: z.ZodOptional<z.ZodString>;
4827
+ }, "strip", z.ZodTypeAny, {
4392
4828
  message: string;
4393
- stackTrace: string;
4394
- } | {
4829
+ name?: string | undefined;
4830
+ stackTrace?: string | undefined;
4831
+ }, {
4395
4832
  message: string;
4396
- name?: undefined;
4397
- stackTrace?: undefined;
4398
- };
4833
+ name?: string | undefined;
4834
+ stackTrace?: string | undefined;
4835
+ }>;
4836
+ type SerializedError = z.infer<typeof SerializedError>;
4837
+ declare function createJsonErrorObject(error: TaskRunError): SerializedError;
4399
4838
  declare function correctErrorStackTrace(stackTrace: string, projectDir?: string, options?: {
4400
4839
  removeFirstLine?: boolean;
4840
+ isDev?: boolean;
4401
4841
  }): string;
4402
4842
  declare function groupTaskMetadataIssuesByTask(tasks: any, issues: z.ZodIssue[]): Record<number, {
4403
4843
  id: any;
@@ -4650,4 +5090,4 @@ declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataT
4650
5090
  declare function createPacketAttributesAsJson(data: any, dataType: string): Promise<Attributes>;
4651
5091
  declare function prettyPrintPacket(rawData: any, dataType?: string): Promise<string>;
4652
5092
 
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 };
5093
+ 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 };