@trigger.dev/sdk 3.0.0-beta.32 → 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,5 +1,5 @@
1
- import { RetryOptions, FetchRetryOptions, TaskRunContext, QueueOptions, InitOutput, MachineCpu, MachineMemory, RunFnParams, InitFnParams, HandleErrorFnParams, HandleErrorResult, MiddlewareFnParams, StartFnParams, SuccessFnParams, FailureFnParams, RetrieveRunResponse, ReplayRunResponse, CanceledRunResponse, ScheduledTaskPayload, CreateScheduleOptions, ScheduleObject, UpdateScheduleOptions, DeletedScheduleObject, ListScheduleOptions, ListSchedulesResult, ApiClientConfiguration } from '@trigger.dev/core/v3';
2
- export { APIError, ApiClientConfiguration, AuthenticationError, BadRequestError, ConflictError, HandleErrorArgs, HandleErrorFunction, InternalServerError, LogLevel, NotFoundError, PermissionDeniedError, RateLimitError, RetryOptions, ProjectConfig as TriggerConfig, UnprocessableEntityError, logger } from '@trigger.dev/core/v3';
1
+ import { RetryOptions, FetchRetryOptions, TaskRunContext, QueueOptions, InitOutput, MachineCpu, MachineMemory, RunFnParams, InitFnParams, HandleErrorFnParams, HandleErrorResult, MiddlewareFnParams, StartFnParams, SuccessFnParams, FailureFnParams, RetrieveRunResponse, ReplayRunResponse, CanceledRunResponse, ScheduledTaskPayload, CreateScheduleOptions, ScheduleObject, UpdateScheduleOptions, DeletedScheduleObject, ListScheduleOptions, ListSchedulesResult, ImportEnvironmentVariablesParams, EnvironmentVariableResponseBody, EnvironmentVariables, CreateEnvironmentVariableParams, EnvironmentVariableValue, UpdateEnvironmentVariableParams, ApiClientConfiguration } from '@trigger.dev/core/v3';
2
+ export { APIError, ApiClientConfiguration, AuthenticationError, BadRequestError, ConflictError, HandleErrorArgs, HandleErrorFunction, ImportEnvironmentVariablesParams, InternalServerError, LogLevel, NotFoundError, PermissionDeniedError, RateLimitError, ResolveEnvironmentVariablesFunction, ResolveEnvironmentVariablesParams, ResolveEnvironmentVariablesResult, RetryOptions, ProjectConfig as TriggerConfig, UnprocessableEntityError, logger } from '@trigger.dev/core/v3';
3
3
  import { HttpHandler } from 'msw';
4
4
 
5
5
  type CacheMetadata = {
@@ -350,13 +350,13 @@ declare function task<TOutput, TInitOutput extends InitOutput>(params: TaskOptio
350
350
  * @param options.deduplicationKey - An optional deduplication key for the schedule
351
351
  * @returns The created schedule
352
352
  */
353
- declare function create(options: CreateScheduleOptions): Promise<ScheduleObject>;
353
+ declare function create$1(options: CreateScheduleOptions): Promise<ScheduleObject>;
354
354
  /**
355
355
  * Retrieves a schedule
356
356
  * @param scheduleId - The ID of the schedule to retrieve
357
357
  * @returns The retrieved schedule
358
358
  */
359
- declare function retrieve(scheduleId: string): Promise<ScheduleObject>;
359
+ declare function retrieve$1(scheduleId: string): Promise<ScheduleObject>;
360
360
  /**
361
361
  * Updates a schedule
362
362
  * @param scheduleId - The ID of the schedule to update
@@ -366,12 +366,12 @@ declare function retrieve(scheduleId: string): Promise<ScheduleObject>;
366
366
  * @param options.externalId - An optional external identifier for the schedule
367
367
  * @returns The updated schedule
368
368
  */
369
- declare function update(scheduleId: string, options: UpdateScheduleOptions): Promise<ScheduleObject>;
369
+ declare function update$1(scheduleId: string, options: UpdateScheduleOptions): Promise<ScheduleObject>;
370
370
  /**
371
371
  * Deletes a schedule
372
372
  * @param scheduleId - The ID of the schedule to delete
373
373
  */
374
- declare function del(scheduleId: string): Promise<DeletedScheduleObject>;
374
+ declare function del$1(scheduleId: string): Promise<DeletedScheduleObject>;
375
375
  /**
376
376
  * Deactivates a schedule
377
377
  * @param scheduleId - The ID of the schedule to deactivate
@@ -389,18 +389,38 @@ declare function activate(scheduleId: string): Promise<ScheduleObject>;
389
389
  * @param options.perPage - The number of schedules per page
390
390
  * @returns The list of schedules
391
391
  */
392
- declare function list(options?: ListScheduleOptions): Promise<ListSchedulesResult>;
392
+ declare function list$1(options?: ListScheduleOptions): Promise<ListSchedulesResult>;
393
393
 
394
394
  declare const index_activate: typeof activate;
395
- declare const index_create: typeof create;
396
395
  declare const index_deactivate: typeof deactivate;
397
- declare const index_del: typeof del;
398
- declare const index_list: typeof list;
399
- declare const index_retrieve: typeof retrieve;
400
396
  declare const index_task: typeof task;
401
- declare const index_update: typeof update;
402
397
  declare namespace index {
403
- export { index_activate as activate, index_create as create, index_deactivate as deactivate, index_del as del, index_list as list, index_retrieve as retrieve, index_task as task, index_update as update };
398
+ export { index_activate as activate, create$1 as create, index_deactivate as deactivate, del$1 as del, list$1 as list, retrieve$1 as retrieve, index_task as task, update$1 as update };
399
+ }
400
+
401
+ declare function upload(projectRef: string, slug: string, params: ImportEnvironmentVariablesParams): Promise<EnvironmentVariableResponseBody>;
402
+ declare function upload(params: ImportEnvironmentVariablesParams): Promise<EnvironmentVariableResponseBody>;
403
+ declare function list(projectRef: string, slug: string): Promise<EnvironmentVariables>;
404
+ declare function list(): Promise<EnvironmentVariables>;
405
+ declare function create(projectRef: string, slug: string, params: CreateEnvironmentVariableParams): Promise<EnvironmentVariableResponseBody>;
406
+ declare function create(params: CreateEnvironmentVariableParams): Promise<EnvironmentVariableResponseBody>;
407
+ declare function retrieve(projectRef: string, slug: string, name: string): Promise<EnvironmentVariableValue>;
408
+ declare function retrieve(name: string): Promise<EnvironmentVariableValue>;
409
+ declare function del(projectRef: string, slug: string, name: string): Promise<EnvironmentVariableResponseBody>;
410
+ declare function del(name: string): Promise<EnvironmentVariableResponseBody>;
411
+ declare function update(projectRef: string, slug: string, name: string, params: UpdateEnvironmentVariableParams): Promise<EnvironmentVariableResponseBody>;
412
+ declare function update(name: string, params: UpdateEnvironmentVariableParams): Promise<EnvironmentVariableResponseBody>;
413
+
414
+ declare const envvars_CreateEnvironmentVariableParams: typeof CreateEnvironmentVariableParams;
415
+ declare const envvars_ImportEnvironmentVariablesParams: typeof ImportEnvironmentVariablesParams;
416
+ declare const envvars_create: typeof create;
417
+ declare const envvars_del: typeof del;
418
+ declare const envvars_list: typeof list;
419
+ declare const envvars_retrieve: typeof retrieve;
420
+ declare const envvars_update: typeof update;
421
+ declare const envvars_upload: typeof upload;
422
+ declare namespace envvars {
423
+ export { envvars_CreateEnvironmentVariableParams as CreateEnvironmentVariableParams, envvars_ImportEnvironmentVariablesParams as ImportEnvironmentVariablesParams, envvars_create as create, envvars_del as del, envvars_list as list, envvars_retrieve as retrieve, envvars_update as update, envvars_upload as upload };
404
424
  }
405
425
 
406
426
  /**
@@ -422,4 +442,4 @@ declare namespace index {
422
442
  */
423
443
  declare function configure(options: ApiClientConfiguration): void;
424
444
 
425
- export { type CacheEntry, type CacheFunction, type CacheMetadata, type CacheStore, type Context, type Eventually, InMemoryCache, type Task, type TaskOptions, type WaitOptions, configure, createCache, queue, retry, runs, index as schedules, task$1 as task, wait };
445
+ export { type CacheEntry, type CacheFunction, type CacheMetadata, type CacheStore, type Context, type Eventually, InMemoryCache, type Task, type TaskOptions, type WaitOptions, configure, createCache, envvars, queue, retry, runs, index as schedules, task$1 as task, wait };
@@ -1,5 +1,5 @@
1
- import { RetryOptions, FetchRetryOptions, TaskRunContext, QueueOptions, InitOutput, MachineCpu, MachineMemory, RunFnParams, InitFnParams, HandleErrorFnParams, HandleErrorResult, MiddlewareFnParams, StartFnParams, SuccessFnParams, FailureFnParams, RetrieveRunResponse, ReplayRunResponse, CanceledRunResponse, ScheduledTaskPayload, CreateScheduleOptions, ScheduleObject, UpdateScheduleOptions, DeletedScheduleObject, ListScheduleOptions, ListSchedulesResult, ApiClientConfiguration } from '@trigger.dev/core/v3';
2
- export { APIError, ApiClientConfiguration, AuthenticationError, BadRequestError, ConflictError, HandleErrorArgs, HandleErrorFunction, InternalServerError, LogLevel, NotFoundError, PermissionDeniedError, RateLimitError, RetryOptions, ProjectConfig as TriggerConfig, UnprocessableEntityError, logger } from '@trigger.dev/core/v3';
1
+ import { RetryOptions, FetchRetryOptions, TaskRunContext, QueueOptions, InitOutput, MachineCpu, MachineMemory, RunFnParams, InitFnParams, HandleErrorFnParams, HandleErrorResult, MiddlewareFnParams, StartFnParams, SuccessFnParams, FailureFnParams, RetrieveRunResponse, ReplayRunResponse, CanceledRunResponse, ScheduledTaskPayload, CreateScheduleOptions, ScheduleObject, UpdateScheduleOptions, DeletedScheduleObject, ListScheduleOptions, ListSchedulesResult, ImportEnvironmentVariablesParams, EnvironmentVariableResponseBody, EnvironmentVariables, CreateEnvironmentVariableParams, EnvironmentVariableValue, UpdateEnvironmentVariableParams, ApiClientConfiguration } from '@trigger.dev/core/v3';
2
+ export { APIError, ApiClientConfiguration, AuthenticationError, BadRequestError, ConflictError, HandleErrorArgs, HandleErrorFunction, ImportEnvironmentVariablesParams, InternalServerError, LogLevel, NotFoundError, PermissionDeniedError, RateLimitError, ResolveEnvironmentVariablesFunction, ResolveEnvironmentVariablesParams, ResolveEnvironmentVariablesResult, RetryOptions, ProjectConfig as TriggerConfig, UnprocessableEntityError, logger } from '@trigger.dev/core/v3';
3
3
  import { HttpHandler } from 'msw';
4
4
 
5
5
  type CacheMetadata = {
@@ -350,13 +350,13 @@ declare function task<TOutput, TInitOutput extends InitOutput>(params: TaskOptio
350
350
  * @param options.deduplicationKey - An optional deduplication key for the schedule
351
351
  * @returns The created schedule
352
352
  */
353
- declare function create(options: CreateScheduleOptions): Promise<ScheduleObject>;
353
+ declare function create$1(options: CreateScheduleOptions): Promise<ScheduleObject>;
354
354
  /**
355
355
  * Retrieves a schedule
356
356
  * @param scheduleId - The ID of the schedule to retrieve
357
357
  * @returns The retrieved schedule
358
358
  */
359
- declare function retrieve(scheduleId: string): Promise<ScheduleObject>;
359
+ declare function retrieve$1(scheduleId: string): Promise<ScheduleObject>;
360
360
  /**
361
361
  * Updates a schedule
362
362
  * @param scheduleId - The ID of the schedule to update
@@ -366,12 +366,12 @@ declare function retrieve(scheduleId: string): Promise<ScheduleObject>;
366
366
  * @param options.externalId - An optional external identifier for the schedule
367
367
  * @returns The updated schedule
368
368
  */
369
- declare function update(scheduleId: string, options: UpdateScheduleOptions): Promise<ScheduleObject>;
369
+ declare function update$1(scheduleId: string, options: UpdateScheduleOptions): Promise<ScheduleObject>;
370
370
  /**
371
371
  * Deletes a schedule
372
372
  * @param scheduleId - The ID of the schedule to delete
373
373
  */
374
- declare function del(scheduleId: string): Promise<DeletedScheduleObject>;
374
+ declare function del$1(scheduleId: string): Promise<DeletedScheduleObject>;
375
375
  /**
376
376
  * Deactivates a schedule
377
377
  * @param scheduleId - The ID of the schedule to deactivate
@@ -389,18 +389,38 @@ declare function activate(scheduleId: string): Promise<ScheduleObject>;
389
389
  * @param options.perPage - The number of schedules per page
390
390
  * @returns The list of schedules
391
391
  */
392
- declare function list(options?: ListScheduleOptions): Promise<ListSchedulesResult>;
392
+ declare function list$1(options?: ListScheduleOptions): Promise<ListSchedulesResult>;
393
393
 
394
394
  declare const index_activate: typeof activate;
395
- declare const index_create: typeof create;
396
395
  declare const index_deactivate: typeof deactivate;
397
- declare const index_del: typeof del;
398
- declare const index_list: typeof list;
399
- declare const index_retrieve: typeof retrieve;
400
396
  declare const index_task: typeof task;
401
- declare const index_update: typeof update;
402
397
  declare namespace index {
403
- export { index_activate as activate, index_create as create, index_deactivate as deactivate, index_del as del, index_list as list, index_retrieve as retrieve, index_task as task, index_update as update };
398
+ export { index_activate as activate, create$1 as create, index_deactivate as deactivate, del$1 as del, list$1 as list, retrieve$1 as retrieve, index_task as task, update$1 as update };
399
+ }
400
+
401
+ declare function upload(projectRef: string, slug: string, params: ImportEnvironmentVariablesParams): Promise<EnvironmentVariableResponseBody>;
402
+ declare function upload(params: ImportEnvironmentVariablesParams): Promise<EnvironmentVariableResponseBody>;
403
+ declare function list(projectRef: string, slug: string): Promise<EnvironmentVariables>;
404
+ declare function list(): Promise<EnvironmentVariables>;
405
+ declare function create(projectRef: string, slug: string, params: CreateEnvironmentVariableParams): Promise<EnvironmentVariableResponseBody>;
406
+ declare function create(params: CreateEnvironmentVariableParams): Promise<EnvironmentVariableResponseBody>;
407
+ declare function retrieve(projectRef: string, slug: string, name: string): Promise<EnvironmentVariableValue>;
408
+ declare function retrieve(name: string): Promise<EnvironmentVariableValue>;
409
+ declare function del(projectRef: string, slug: string, name: string): Promise<EnvironmentVariableResponseBody>;
410
+ declare function del(name: string): Promise<EnvironmentVariableResponseBody>;
411
+ declare function update(projectRef: string, slug: string, name: string, params: UpdateEnvironmentVariableParams): Promise<EnvironmentVariableResponseBody>;
412
+ declare function update(name: string, params: UpdateEnvironmentVariableParams): Promise<EnvironmentVariableResponseBody>;
413
+
414
+ declare const envvars_CreateEnvironmentVariableParams: typeof CreateEnvironmentVariableParams;
415
+ declare const envvars_ImportEnvironmentVariablesParams: typeof ImportEnvironmentVariablesParams;
416
+ declare const envvars_create: typeof create;
417
+ declare const envvars_del: typeof del;
418
+ declare const envvars_list: typeof list;
419
+ declare const envvars_retrieve: typeof retrieve;
420
+ declare const envvars_update: typeof update;
421
+ declare const envvars_upload: typeof upload;
422
+ declare namespace envvars {
423
+ export { envvars_CreateEnvironmentVariableParams as CreateEnvironmentVariableParams, envvars_ImportEnvironmentVariablesParams as ImportEnvironmentVariablesParams, envvars_create as create, envvars_del as del, envvars_list as list, envvars_retrieve as retrieve, envvars_update as update, envvars_upload as upload };
404
424
  }
405
425
 
406
426
  /**
@@ -422,4 +442,4 @@ declare namespace index {
422
442
  */
423
443
  declare function configure(options: ApiClientConfiguration): void;
424
444
 
425
- export { type CacheEntry, type CacheFunction, type CacheMetadata, type CacheStore, type Context, type Eventually, InMemoryCache, type Task, type TaskOptions, type WaitOptions, configure, createCache, queue, retry, runs, index as schedules, task$1 as task, wait };
445
+ export { type CacheEntry, type CacheFunction, type CacheMetadata, type CacheStore, type Context, type Eventually, InMemoryCache, type Task, type TaskOptions, type WaitOptions, configure, createCache, envvars, queue, retry, runs, index as schedules, task$1 as task, wait };
package/dist/v3/index.js CHANGED
@@ -18,7 +18,7 @@ var __publicField = (obj, key, value) => {
18
18
  };
19
19
 
20
20
  // package.json
21
- var version = "3.0.0-beta.32";
21
+ var version = "3.0.0-beta.34";
22
22
 
23
23
  // src/v3/tracer.ts
24
24
  var tracer = new v3.TriggerTracer({
@@ -1038,6 +1038,239 @@ async function list(options) {
1038
1038
  }
1039
1039
  __name(list, "list");
1040
1040
 
1041
+ // src/v3/envvars.ts
1042
+ var envvars_exports = {};
1043
+ __export(envvars_exports, {
1044
+ create: () => create2,
1045
+ del: () => del2,
1046
+ list: () => list2,
1047
+ retrieve: () => retrieve2,
1048
+ update: () => update2,
1049
+ upload: () => upload
1050
+ });
1051
+ async function upload(projectRefOrParams, slug, params) {
1052
+ let $projectRef;
1053
+ let $params;
1054
+ let $slug;
1055
+ if (v3.taskContext.ctx) {
1056
+ if (typeof projectRefOrParams === "string") {
1057
+ $projectRef = projectRefOrParams;
1058
+ $slug = slug ?? v3.taskContext.ctx.environment.slug;
1059
+ if (!params) {
1060
+ throw new Error("params is required");
1061
+ }
1062
+ $params = params;
1063
+ } else {
1064
+ $params = projectRefOrParams;
1065
+ $projectRef = v3.taskContext.ctx.project.ref;
1066
+ $slug = v3.taskContext.ctx.environment.slug;
1067
+ }
1068
+ } else {
1069
+ if (typeof projectRefOrParams !== "string") {
1070
+ throw new Error("projectRef is required");
1071
+ }
1072
+ if (!slug) {
1073
+ throw new Error("slug is required");
1074
+ }
1075
+ if (!params) {
1076
+ throw new Error("params is required");
1077
+ }
1078
+ $projectRef = projectRefOrParams;
1079
+ $slug = slug;
1080
+ $params = params;
1081
+ }
1082
+ const apiClient = v3.apiClientManager.client;
1083
+ if (!apiClient) {
1084
+ throw apiClientMissingError();
1085
+ }
1086
+ return await tracer.startActiveSpan("envvars.upload", async (span) => {
1087
+ return await apiClient.importEnvVars($projectRef, $slug, $params);
1088
+ }, {
1089
+ attributes: {
1090
+ [v3.SemanticInternalAttributes.STYLE_ICON]: "file-upload"
1091
+ }
1092
+ });
1093
+ }
1094
+ __name(upload, "upload");
1095
+ async function list2(projectRef, slug) {
1096
+ const $projectRef = projectRef ?? v3.taskContext.ctx?.project.ref;
1097
+ const $slug = slug ?? v3.taskContext.ctx?.environment.slug;
1098
+ if (!$projectRef) {
1099
+ throw new Error("projectRef is required");
1100
+ }
1101
+ if (!$slug) {
1102
+ throw new Error("slug is required");
1103
+ }
1104
+ const apiClient = v3.apiClientManager.client;
1105
+ if (!apiClient) {
1106
+ throw apiClientMissingError();
1107
+ }
1108
+ return await tracer.startActiveSpan("envvars.list", async (span) => {
1109
+ return await apiClient.listEnvVars($projectRef, $slug);
1110
+ }, {
1111
+ attributes: {
1112
+ [v3.SemanticInternalAttributes.STYLE_ICON]: "id"
1113
+ }
1114
+ });
1115
+ }
1116
+ __name(list2, "list");
1117
+ async function create2(projectRefOrParams, slug, params) {
1118
+ let $projectRef;
1119
+ let $slug;
1120
+ let $params;
1121
+ if (v3.taskContext.ctx) {
1122
+ if (typeof projectRefOrParams === "string") {
1123
+ $projectRef = projectRefOrParams;
1124
+ $slug = slug ?? v3.taskContext.ctx.environment.slug;
1125
+ if (!params) {
1126
+ throw new Error("params is required");
1127
+ }
1128
+ $params = params;
1129
+ } else {
1130
+ $params = projectRefOrParams;
1131
+ $projectRef = v3.taskContext.ctx.project.ref;
1132
+ $slug = v3.taskContext.ctx.environment.slug;
1133
+ }
1134
+ } else {
1135
+ if (typeof projectRefOrParams !== "string") {
1136
+ throw new Error("projectRef is required");
1137
+ }
1138
+ if (!slug) {
1139
+ throw new Error("slug is required");
1140
+ }
1141
+ if (!params) {
1142
+ throw new Error("params is required");
1143
+ }
1144
+ $projectRef = projectRefOrParams;
1145
+ $slug = slug;
1146
+ $params = params;
1147
+ }
1148
+ const apiClient = v3.apiClientManager.client;
1149
+ if (!apiClient) {
1150
+ throw apiClientMissingError();
1151
+ }
1152
+ return await tracer.startActiveSpan("envvars.create", async (span) => {
1153
+ return await apiClient.createEnvVar($projectRef, $slug, $params);
1154
+ }, {
1155
+ attributes: {
1156
+ [v3.SemanticInternalAttributes.STYLE_ICON]: "id"
1157
+ }
1158
+ });
1159
+ }
1160
+ __name(create2, "create");
1161
+ async function retrieve2(projectRefOrName, slug, name) {
1162
+ let $projectRef;
1163
+ let $slug;
1164
+ let $name;
1165
+ if (typeof name === "string") {
1166
+ $projectRef = projectRefOrName;
1167
+ $slug = slug;
1168
+ $name = name;
1169
+ } else {
1170
+ $projectRef = v3.taskContext.ctx?.project.ref;
1171
+ $slug = v3.taskContext.ctx?.environment.slug;
1172
+ $name = projectRefOrName;
1173
+ }
1174
+ if (!$projectRef) {
1175
+ throw new Error("projectRef is required");
1176
+ }
1177
+ if (!$slug) {
1178
+ throw new Error("slug is required");
1179
+ }
1180
+ const apiClient = v3.apiClientManager.client;
1181
+ if (!apiClient) {
1182
+ throw apiClientMissingError();
1183
+ }
1184
+ return await tracer.startActiveSpan("envvars.retrieve", async (span) => {
1185
+ return await apiClient.retrieveEnvVar($projectRef, $slug, $name);
1186
+ }, {
1187
+ attributes: {
1188
+ [v3.SemanticInternalAttributes.STYLE_ICON]: "id"
1189
+ }
1190
+ });
1191
+ }
1192
+ __name(retrieve2, "retrieve");
1193
+ async function del2(projectRefOrName, slug, name) {
1194
+ let $projectRef;
1195
+ let $slug;
1196
+ let $name;
1197
+ if (typeof name === "string") {
1198
+ $projectRef = projectRefOrName;
1199
+ $slug = slug;
1200
+ $name = name;
1201
+ } else {
1202
+ $projectRef = v3.taskContext.ctx?.project.ref;
1203
+ $slug = v3.taskContext.ctx?.environment.slug;
1204
+ $name = projectRefOrName;
1205
+ }
1206
+ if (!$projectRef) {
1207
+ throw new Error("projectRef is required");
1208
+ }
1209
+ if (!$slug) {
1210
+ throw new Error("slug is required");
1211
+ }
1212
+ const apiClient = v3.apiClientManager.client;
1213
+ if (!apiClient) {
1214
+ throw apiClientMissingError();
1215
+ }
1216
+ return await tracer.startActiveSpan("envvars.delete", async (span) => {
1217
+ return await apiClient.deleteEnvVar($projectRef, $slug, $name);
1218
+ }, {
1219
+ attributes: {
1220
+ [v3.SemanticInternalAttributes.STYLE_ICON]: "id"
1221
+ }
1222
+ });
1223
+ }
1224
+ __name(del2, "del");
1225
+ async function update2(projectRefOrName, slugOrParams, name, params) {
1226
+ let $projectRef;
1227
+ let $slug;
1228
+ let $name;
1229
+ let $params;
1230
+ if (v3.taskContext.ctx) {
1231
+ if (typeof slugOrParams === "string") {
1232
+ $projectRef = slugOrParams;
1233
+ $slug = slugOrParams ?? v3.taskContext.ctx.environment.slug;
1234
+ $name = name;
1235
+ if (!params) {
1236
+ throw new Error("params is required");
1237
+ }
1238
+ $params = params;
1239
+ } else {
1240
+ $params = slugOrParams;
1241
+ $projectRef = v3.taskContext.ctx.project.ref;
1242
+ $slug = v3.taskContext.ctx.environment.slug;
1243
+ $name = projectRefOrName;
1244
+ }
1245
+ } else {
1246
+ if (typeof slugOrParams !== "string") {
1247
+ throw new Error("slug is required");
1248
+ }
1249
+ if (!projectRefOrName) {
1250
+ throw new Error("projectRef is required");
1251
+ }
1252
+ if (!params) {
1253
+ throw new Error("params is required");
1254
+ }
1255
+ $projectRef = projectRefOrName;
1256
+ $slug = slugOrParams;
1257
+ $name = name;
1258
+ $params = params;
1259
+ }
1260
+ const apiClient = v3.apiClientManager.client;
1261
+ if (!apiClient) {
1262
+ throw apiClientMissingError();
1263
+ }
1264
+ return await tracer.startActiveSpan("envvars.update", async (span) => {
1265
+ return await apiClient.updateEnvVar($projectRef, $slug, $name, $params);
1266
+ }, {
1267
+ attributes: {
1268
+ [v3.SemanticInternalAttributes.STYLE_ICON]: "id"
1269
+ }
1270
+ });
1271
+ }
1272
+ __name(update2, "update");
1273
+
1041
1274
  // src/v3/index.ts
1042
1275
  function configure(options) {
1043
1276
  v3.apiClientManager.setGlobalAPIClientConfiguration(options);
@@ -1087,6 +1320,7 @@ Object.defineProperty(exports, 'logger', {
1087
1320
  exports.InMemoryCache = InMemoryCache;
1088
1321
  exports.configure = configure;
1089
1322
  exports.createCache = createCache;
1323
+ exports.envvars = envvars_exports;
1090
1324
  exports.queue = queue;
1091
1325
  exports.retry = retry;
1092
1326
  exports.runs = runs;