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

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.
@@ -1,8 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, a as TaskRunError, b as TaskRunContext, R as RuntimeManager } from '../manager-WNMVbgHf.mjs';
3
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.mjs';
4
- 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-ck7x04PV.mjs';
5
- 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, G as ProjectConfig, Q as QueueOptions, l as RateLimitOptions, D as RequireKeys, 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-ck7x04PV.mjs';
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-Y8FyPWvh.mjs';
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-Y8FyPWvh.mjs';
6
7
  import { Attributes, Span } from '@opentelemetry/api';
7
8
  import { B as BackgroundWorkerProperties } from '../messages-vq7Bk4Ap.mjs';
8
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.mjs';
@@ -2347,6 +2348,73 @@ declare const RetrieveRunResponse: z.ZodObject<{
2347
2348
  version?: string | undefined;
2348
2349
  }>;
2349
2350
  type RetrieveRunResponse = z.infer<typeof RetrieveRunResponse>;
2351
+ declare const CreateEnvironmentVariableRequestBody: z.ZodObject<{
2352
+ name: z.ZodString;
2353
+ value: z.ZodString;
2354
+ }, "strip", z.ZodTypeAny, {
2355
+ value: string;
2356
+ name: string;
2357
+ }, {
2358
+ value: string;
2359
+ name: string;
2360
+ }>;
2361
+ type CreateEnvironmentVariableRequestBody = z.infer<typeof CreateEnvironmentVariableRequestBody>;
2362
+ declare const UpdateEnvironmentVariableRequestBody: z.ZodObject<{
2363
+ value: z.ZodString;
2364
+ }, "strip", z.ZodTypeAny, {
2365
+ value: string;
2366
+ }, {
2367
+ value: string;
2368
+ }>;
2369
+ type UpdateEnvironmentVariableRequestBody = z.infer<typeof UpdateEnvironmentVariableRequestBody>;
2370
+ declare const ImportEnvironmentVariablesRequestBody: z.ZodObject<{
2371
+ variables: z.ZodRecord<z.ZodString, z.ZodString>;
2372
+ override: z.ZodOptional<z.ZodBoolean>;
2373
+ }, "strip", z.ZodTypeAny, {
2374
+ variables: Record<string, string>;
2375
+ override?: boolean | undefined;
2376
+ }, {
2377
+ variables: Record<string, string>;
2378
+ override?: boolean | undefined;
2379
+ }>;
2380
+ type ImportEnvironmentVariablesRequestBody = z.infer<typeof ImportEnvironmentVariablesRequestBody>;
2381
+ declare const EnvironmentVariableResponseBody: z.ZodObject<{
2382
+ success: z.ZodBoolean;
2383
+ }, "strip", z.ZodTypeAny, {
2384
+ success: boolean;
2385
+ }, {
2386
+ success: boolean;
2387
+ }>;
2388
+ type EnvironmentVariableResponseBody = z.infer<typeof EnvironmentVariableResponseBody>;
2389
+ declare const EnvironmentVariableValue: z.ZodObject<{
2390
+ value: z.ZodString;
2391
+ }, "strip", z.ZodTypeAny, {
2392
+ value: string;
2393
+ }, {
2394
+ value: string;
2395
+ }>;
2396
+ type EnvironmentVariableValue = z.infer<typeof EnvironmentVariableValue>;
2397
+ declare const EnvironmentVariable: z.ZodObject<{
2398
+ name: z.ZodString;
2399
+ value: z.ZodString;
2400
+ }, "strip", z.ZodTypeAny, {
2401
+ value: string;
2402
+ name: string;
2403
+ }, {
2404
+ value: string;
2405
+ name: string;
2406
+ }>;
2407
+ declare const EnvironmentVariables: z.ZodArray<z.ZodObject<{
2408
+ name: z.ZodString;
2409
+ value: z.ZodString;
2410
+ }, "strip", z.ZodTypeAny, {
2411
+ value: string;
2412
+ name: string;
2413
+ }, {
2414
+ value: string;
2415
+ name: string;
2416
+ }>, "many">;
2417
+ type EnvironmentVariables = z.infer<typeof EnvironmentVariables>;
2350
2418
 
2351
2419
  declare const TaskResource: z.ZodObject<{
2352
2420
  id: z.ZodString;
@@ -4021,6 +4089,58 @@ declare const SpanMessagingEvent: z.ZodObject<{
4021
4089
  }>;
4022
4090
  type SpanMessagingEvent = z.infer<typeof SpanMessagingEvent>;
4023
4091
 
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
+ interface ImportEnvironmentVariablesParams {
4125
+ /**
4126
+ * The variables to be imported. If a variable with the same key already exists, it will be overwritten when `override` is `true`.
4127
+ *
4128
+ * There are two ways to specify the variables:
4129
+ *
4130
+ * 1. As a record of key-value pairs. e.g. `{ "key1": "value1", "key2": "value2" }`
4131
+ * 2. As an "uploadable" object in dotenv format. An uploadable can be a Node readable stream, a string, or a Buffer. You can also pass the return value of a `fetch` call.
4132
+ */
4133
+ variables: Uploadable | BlobLikePart | Record<string, string>;
4134
+ override?: boolean;
4135
+ }
4136
+ interface CreateEnvironmentVariableParams {
4137
+ name: string;
4138
+ value: string;
4139
+ }
4140
+ interface UpdateEnvironmentVariableParams {
4141
+ value: string;
4142
+ }
4143
+
4024
4144
  type TriggerOptions = {
4025
4145
  spanParentAsLink?: boolean;
4026
4146
  };
@@ -4188,6 +4308,25 @@ declare class ApiClient {
4188
4308
  deleteSchedule(scheduleId: string): Promise<{
4189
4309
  id: string;
4190
4310
  }>;
4311
+ listEnvVars(projectRef: string, slug: string): Promise<{
4312
+ value: string;
4313
+ name: string;
4314
+ }[]>;
4315
+ importEnvVars(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams): Promise<{
4316
+ success: boolean;
4317
+ }>;
4318
+ retrieveEnvVar(projectRef: string, slug: string, key: string): Promise<{
4319
+ value: string;
4320
+ }>;
4321
+ createEnvVar(projectRef: string, slug: string, body: CreateEnvironmentVariableRequestBody): Promise<{
4322
+ success: boolean;
4323
+ }>;
4324
+ updateEnvVar(projectRef: string, slug: string, key: string, body: UpdateEnvironmentVariableRequestBody): Promise<{
4325
+ success: boolean;
4326
+ }>;
4327
+ deleteEnvVar(projectRef: string, slug: string, key: string): Promise<{
4328
+ success: boolean;
4329
+ }>;
4191
4330
  }
4192
4331
 
4193
4332
  type APIHeaders = Record<string, string | null | undefined>;
@@ -4511,4 +4650,4 @@ declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataT
4511
4650
  declare function createPacketAttributesAsJson(data: any, dataType: string): Promise<Attributes>;
4512
4651
  declare function prettyPrintPacket(rawData: any, dataType?: string): Promise<string>;
4513
4652
 
4514
- 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, CreateScheduleOptions, CreateUploadPayloadUrlResponseBody, DeletedScheduleObject, DeploymentErrorData, 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, 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, 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 };
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 };
@@ -1,8 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  import { T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult, a as TaskRunError, b as TaskRunContext, R as RuntimeManager } from '../manager-WNMVbgHf.js';
3
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 { 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-KbyTBoap.js';
5
- 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, G as ProjectConfig, Q as QueueOptions, l as RateLimitOptions, D as RequireKeys, 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-KbyTBoap.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';
6
7
  import { Attributes, Span } from '@opentelemetry/api';
7
8
  import { B as BackgroundWorkerProperties } from '../messages-vq7Bk4Ap.js';
8
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';
@@ -2347,6 +2348,73 @@ declare const RetrieveRunResponse: z.ZodObject<{
2347
2348
  version?: string | undefined;
2348
2349
  }>;
2349
2350
  type RetrieveRunResponse = z.infer<typeof RetrieveRunResponse>;
2351
+ declare const CreateEnvironmentVariableRequestBody: z.ZodObject<{
2352
+ name: z.ZodString;
2353
+ value: z.ZodString;
2354
+ }, "strip", z.ZodTypeAny, {
2355
+ value: string;
2356
+ name: string;
2357
+ }, {
2358
+ value: string;
2359
+ name: string;
2360
+ }>;
2361
+ type CreateEnvironmentVariableRequestBody = z.infer<typeof CreateEnvironmentVariableRequestBody>;
2362
+ declare const UpdateEnvironmentVariableRequestBody: z.ZodObject<{
2363
+ value: z.ZodString;
2364
+ }, "strip", z.ZodTypeAny, {
2365
+ value: string;
2366
+ }, {
2367
+ value: string;
2368
+ }>;
2369
+ type UpdateEnvironmentVariableRequestBody = z.infer<typeof UpdateEnvironmentVariableRequestBody>;
2370
+ declare const ImportEnvironmentVariablesRequestBody: z.ZodObject<{
2371
+ variables: z.ZodRecord<z.ZodString, z.ZodString>;
2372
+ override: z.ZodOptional<z.ZodBoolean>;
2373
+ }, "strip", z.ZodTypeAny, {
2374
+ variables: Record<string, string>;
2375
+ override?: boolean | undefined;
2376
+ }, {
2377
+ variables: Record<string, string>;
2378
+ override?: boolean | undefined;
2379
+ }>;
2380
+ type ImportEnvironmentVariablesRequestBody = z.infer<typeof ImportEnvironmentVariablesRequestBody>;
2381
+ declare const EnvironmentVariableResponseBody: z.ZodObject<{
2382
+ success: z.ZodBoolean;
2383
+ }, "strip", z.ZodTypeAny, {
2384
+ success: boolean;
2385
+ }, {
2386
+ success: boolean;
2387
+ }>;
2388
+ type EnvironmentVariableResponseBody = z.infer<typeof EnvironmentVariableResponseBody>;
2389
+ declare const EnvironmentVariableValue: z.ZodObject<{
2390
+ value: z.ZodString;
2391
+ }, "strip", z.ZodTypeAny, {
2392
+ value: string;
2393
+ }, {
2394
+ value: string;
2395
+ }>;
2396
+ type EnvironmentVariableValue = z.infer<typeof EnvironmentVariableValue>;
2397
+ declare const EnvironmentVariable: z.ZodObject<{
2398
+ name: z.ZodString;
2399
+ value: z.ZodString;
2400
+ }, "strip", z.ZodTypeAny, {
2401
+ value: string;
2402
+ name: string;
2403
+ }, {
2404
+ value: string;
2405
+ name: string;
2406
+ }>;
2407
+ declare const EnvironmentVariables: z.ZodArray<z.ZodObject<{
2408
+ name: z.ZodString;
2409
+ value: z.ZodString;
2410
+ }, "strip", z.ZodTypeAny, {
2411
+ value: string;
2412
+ name: string;
2413
+ }, {
2414
+ value: string;
2415
+ name: string;
2416
+ }>, "many">;
2417
+ type EnvironmentVariables = z.infer<typeof EnvironmentVariables>;
2350
2418
 
2351
2419
  declare const TaskResource: z.ZodObject<{
2352
2420
  id: z.ZodString;
@@ -4021,6 +4089,58 @@ declare const SpanMessagingEvent: z.ZodObject<{
4021
4089
  }>;
4022
4090
  type SpanMessagingEvent = z.infer<typeof SpanMessagingEvent>;
4023
4091
 
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
+ interface ImportEnvironmentVariablesParams {
4125
+ /**
4126
+ * The variables to be imported. If a variable with the same key already exists, it will be overwritten when `override` is `true`.
4127
+ *
4128
+ * There are two ways to specify the variables:
4129
+ *
4130
+ * 1. As a record of key-value pairs. e.g. `{ "key1": "value1", "key2": "value2" }`
4131
+ * 2. As an "uploadable" object in dotenv format. An uploadable can be a Node readable stream, a string, or a Buffer. You can also pass the return value of a `fetch` call.
4132
+ */
4133
+ variables: Uploadable | BlobLikePart | Record<string, string>;
4134
+ override?: boolean;
4135
+ }
4136
+ interface CreateEnvironmentVariableParams {
4137
+ name: string;
4138
+ value: string;
4139
+ }
4140
+ interface UpdateEnvironmentVariableParams {
4141
+ value: string;
4142
+ }
4143
+
4024
4144
  type TriggerOptions = {
4025
4145
  spanParentAsLink?: boolean;
4026
4146
  };
@@ -4188,6 +4308,25 @@ declare class ApiClient {
4188
4308
  deleteSchedule(scheduleId: string): Promise<{
4189
4309
  id: string;
4190
4310
  }>;
4311
+ listEnvVars(projectRef: string, slug: string): Promise<{
4312
+ value: string;
4313
+ name: string;
4314
+ }[]>;
4315
+ importEnvVars(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams): Promise<{
4316
+ success: boolean;
4317
+ }>;
4318
+ retrieveEnvVar(projectRef: string, slug: string, key: string): Promise<{
4319
+ value: string;
4320
+ }>;
4321
+ createEnvVar(projectRef: string, slug: string, body: CreateEnvironmentVariableRequestBody): Promise<{
4322
+ success: boolean;
4323
+ }>;
4324
+ updateEnvVar(projectRef: string, slug: string, key: string, body: UpdateEnvironmentVariableRequestBody): Promise<{
4325
+ success: boolean;
4326
+ }>;
4327
+ deleteEnvVar(projectRef: string, slug: string, key: string): Promise<{
4328
+ success: boolean;
4329
+ }>;
4191
4330
  }
4192
4331
 
4193
4332
  type APIHeaders = Record<string, string | null | undefined>;
@@ -4511,4 +4650,4 @@ declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataT
4511
4650
  declare function createPacketAttributesAsJson(data: any, dataType: string): Promise<Attributes>;
4512
4651
  declare function prettyPrintPacket(rawData: any, dataType?: string): Promise<string>;
4513
4652
 
4514
- 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, CreateScheduleOptions, CreateUploadPayloadUrlResponseBody, DeletedScheduleObject, DeploymentErrorData, 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, 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, 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 };
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 };