@trigger.dev/sdk 3.0.0-beta.35 → 3.0.0-beta.37

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,6 +1,7 @@
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';
1
+ import { RetryOptions, FetchRetryOptions, TaskRunContext, QueueOptions, InitOutput, MachineCpu, MachineMemory, RunFnParams, InitFnParams, HandleErrorFnParams, HandleErrorResult, MiddlewareFnParams, StartFnParams, SuccessFnParams, FailureFnParams, ListProjectRunsQueryParams, ListRunResponseItem, ListRunsQueryParams, ApiPromise, ReplayRunResponse, CanceledRunResponse, RetrieveRunResponse, ScheduledTaskPayload, CreateScheduleOptions, ScheduleObject, UpdateScheduleOptions, DeletedScheduleObject, ListScheduleOptions, ImportEnvironmentVariablesParams, EnvironmentVariableResponseBody, EnvironmentVariables, CreateEnvironmentVariableParams, EnvironmentVariableValue, UpdateEnvironmentVariableParams, ApiClientConfiguration } from '@trigger.dev/core/v3';
2
+ export { ApiClientConfiguration, ApiError, 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
+ import { CursorPagePromise, OffsetLimitPagePromise } from '@trigger.dev/core/v3/apiClient/core';
4
5
 
5
6
  type CacheMetadata = {
6
7
  createdTime: number;
@@ -331,14 +332,18 @@ declare const wait: {
331
332
  }) => Promise<void>;
332
333
  };
333
334
 
335
+ type RetrieveRunResult = RetrieveRunResponse;
334
336
  declare const runs: {
335
337
  replay: typeof replayRun;
336
338
  cancel: typeof cancelRun;
337
339
  retrieve: typeof retrieveRun;
340
+ list: typeof listRuns;
338
341
  };
339
- declare function retrieveRun(runId: string): Promise<RetrieveRunResponse>;
340
- declare function replayRun(runId: string): Promise<ReplayRunResponse>;
341
- declare function cancelRun(runId: string): Promise<CanceledRunResponse>;
342
+ declare function listRuns(projectRef: string, params?: ListProjectRunsQueryParams): CursorPagePromise<typeof ListRunResponseItem>;
343
+ declare function listRuns(params?: ListRunsQueryParams): CursorPagePromise<typeof ListRunResponseItem>;
344
+ declare function retrieveRun(runId: string): ApiPromise<RetrieveRunResult>;
345
+ declare function replayRun(runId: string): ApiPromise<ReplayRunResponse>;
346
+ declare function cancelRun(runId: string): ApiPromise<CanceledRunResponse>;
342
347
 
343
348
  declare function task<TOutput, TInitOutput extends InitOutput>(params: TaskOptions<ScheduledTaskPayload, TOutput, TInitOutput>): Task<ScheduledTaskPayload, TOutput>;
344
349
  /**
@@ -350,13 +355,13 @@ declare function task<TOutput, TInitOutput extends InitOutput>(params: TaskOptio
350
355
  * @param options.deduplicationKey - An optional deduplication key for the schedule
351
356
  * @returns The created schedule
352
357
  */
353
- declare function create$1(options: CreateScheduleOptions): Promise<ScheduleObject>;
358
+ declare function create$1(options: CreateScheduleOptions): ApiPromise<ScheduleObject>;
354
359
  /**
355
360
  * Retrieves a schedule
356
361
  * @param scheduleId - The ID of the schedule to retrieve
357
362
  * @returns The retrieved schedule
358
363
  */
359
- declare function retrieve$1(scheduleId: string): Promise<ScheduleObject>;
364
+ declare function retrieve$1(scheduleId: string): ApiPromise<ScheduleObject>;
360
365
  /**
361
366
  * Updates a schedule
362
367
  * @param scheduleId - The ID of the schedule to update
@@ -366,22 +371,22 @@ declare function retrieve$1(scheduleId: string): Promise<ScheduleObject>;
366
371
  * @param options.externalId - An optional external identifier for the schedule
367
372
  * @returns The updated schedule
368
373
  */
369
- declare function update$1(scheduleId: string, options: UpdateScheduleOptions): Promise<ScheduleObject>;
374
+ declare function update$1(scheduleId: string, options: UpdateScheduleOptions): ApiPromise<ScheduleObject>;
370
375
  /**
371
376
  * Deletes a schedule
372
377
  * @param scheduleId - The ID of the schedule to delete
373
378
  */
374
- declare function del$1(scheduleId: string): Promise<DeletedScheduleObject>;
379
+ declare function del$1(scheduleId: string): ApiPromise<DeletedScheduleObject>;
375
380
  /**
376
381
  * Deactivates a schedule
377
382
  * @param scheduleId - The ID of the schedule to deactivate
378
383
  */
379
- declare function deactivate(scheduleId: string): Promise<ScheduleObject>;
384
+ declare function deactivate(scheduleId: string): ApiPromise<ScheduleObject>;
380
385
  /**
381
386
  * Activates a schedule
382
387
  * @param scheduleId - The ID of the schedule to activate
383
388
  */
384
- declare function activate(scheduleId: string): Promise<ScheduleObject>;
389
+ declare function activate(scheduleId: string): ApiPromise<ScheduleObject>;
385
390
  /**
386
391
  * Lists schedules
387
392
  * @param options - The list options
@@ -389,7 +394,7 @@ declare function activate(scheduleId: string): Promise<ScheduleObject>;
389
394
  * @param options.perPage - The number of schedules per page
390
395
  * @returns The list of schedules
391
396
  */
392
- declare function list$1(options?: ListScheduleOptions): Promise<ListSchedulesResult>;
397
+ declare function list$1(options?: ListScheduleOptions): OffsetLimitPagePromise<typeof ScheduleObject>;
393
398
 
394
399
  declare const index_activate: typeof activate;
395
400
  declare const index_deactivate: typeof deactivate;
@@ -398,18 +403,18 @@ declare namespace index {
398
403
  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
404
  }
400
405
 
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>;
406
+ declare function upload(projectRef: string, slug: string, params: ImportEnvironmentVariablesParams): ApiPromise<EnvironmentVariableResponseBody>;
407
+ declare function upload(params: ImportEnvironmentVariablesParams): ApiPromise<EnvironmentVariableResponseBody>;
408
+ declare function list(projectRef: string, slug: string): ApiPromise<EnvironmentVariables>;
409
+ declare function list(): ApiPromise<EnvironmentVariables>;
410
+ declare function create(projectRef: string, slug: string, params: CreateEnvironmentVariableParams): ApiPromise<EnvironmentVariableResponseBody>;
411
+ declare function create(params: CreateEnvironmentVariableParams): ApiPromise<EnvironmentVariableResponseBody>;
412
+ declare function retrieve(projectRef: string, slug: string, name: string): ApiPromise<EnvironmentVariableValue>;
413
+ declare function retrieve(name: string): ApiPromise<EnvironmentVariableValue>;
414
+ declare function del(projectRef: string, slug: string, name: string): ApiPromise<EnvironmentVariableResponseBody>;
415
+ declare function del(name: string): ApiPromise<EnvironmentVariableResponseBody>;
416
+ declare function update(projectRef: string, slug: string, name: string, params: UpdateEnvironmentVariableParams): ApiPromise<EnvironmentVariableResponseBody>;
417
+ declare function update(name: string, params: UpdateEnvironmentVariableParams): ApiPromise<EnvironmentVariableResponseBody>;
413
418
 
414
419
  declare const envvars_CreateEnvironmentVariableParams: typeof CreateEnvironmentVariableParams;
415
420
  declare const envvars_ImportEnvironmentVariablesParams: typeof ImportEnvironmentVariablesParams;
@@ -1,6 +1,7 @@
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';
1
+ import { RetryOptions, FetchRetryOptions, TaskRunContext, QueueOptions, InitOutput, MachineCpu, MachineMemory, RunFnParams, InitFnParams, HandleErrorFnParams, HandleErrorResult, MiddlewareFnParams, StartFnParams, SuccessFnParams, FailureFnParams, ListProjectRunsQueryParams, ListRunResponseItem, ListRunsQueryParams, ApiPromise, ReplayRunResponse, CanceledRunResponse, RetrieveRunResponse, ScheduledTaskPayload, CreateScheduleOptions, ScheduleObject, UpdateScheduleOptions, DeletedScheduleObject, ListScheduleOptions, ImportEnvironmentVariablesParams, EnvironmentVariableResponseBody, EnvironmentVariables, CreateEnvironmentVariableParams, EnvironmentVariableValue, UpdateEnvironmentVariableParams, ApiClientConfiguration } from '@trigger.dev/core/v3';
2
+ export { ApiClientConfiguration, ApiError, 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
+ import { CursorPagePromise, OffsetLimitPagePromise } from '@trigger.dev/core/v3/apiClient/core';
4
5
 
5
6
  type CacheMetadata = {
6
7
  createdTime: number;
@@ -331,14 +332,18 @@ declare const wait: {
331
332
  }) => Promise<void>;
332
333
  };
333
334
 
335
+ type RetrieveRunResult = RetrieveRunResponse;
334
336
  declare const runs: {
335
337
  replay: typeof replayRun;
336
338
  cancel: typeof cancelRun;
337
339
  retrieve: typeof retrieveRun;
340
+ list: typeof listRuns;
338
341
  };
339
- declare function retrieveRun(runId: string): Promise<RetrieveRunResponse>;
340
- declare function replayRun(runId: string): Promise<ReplayRunResponse>;
341
- declare function cancelRun(runId: string): Promise<CanceledRunResponse>;
342
+ declare function listRuns(projectRef: string, params?: ListProjectRunsQueryParams): CursorPagePromise<typeof ListRunResponseItem>;
343
+ declare function listRuns(params?: ListRunsQueryParams): CursorPagePromise<typeof ListRunResponseItem>;
344
+ declare function retrieveRun(runId: string): ApiPromise<RetrieveRunResult>;
345
+ declare function replayRun(runId: string): ApiPromise<ReplayRunResponse>;
346
+ declare function cancelRun(runId: string): ApiPromise<CanceledRunResponse>;
342
347
 
343
348
  declare function task<TOutput, TInitOutput extends InitOutput>(params: TaskOptions<ScheduledTaskPayload, TOutput, TInitOutput>): Task<ScheduledTaskPayload, TOutput>;
344
349
  /**
@@ -350,13 +355,13 @@ declare function task<TOutput, TInitOutput extends InitOutput>(params: TaskOptio
350
355
  * @param options.deduplicationKey - An optional deduplication key for the schedule
351
356
  * @returns The created schedule
352
357
  */
353
- declare function create$1(options: CreateScheduleOptions): Promise<ScheduleObject>;
358
+ declare function create$1(options: CreateScheduleOptions): ApiPromise<ScheduleObject>;
354
359
  /**
355
360
  * Retrieves a schedule
356
361
  * @param scheduleId - The ID of the schedule to retrieve
357
362
  * @returns The retrieved schedule
358
363
  */
359
- declare function retrieve$1(scheduleId: string): Promise<ScheduleObject>;
364
+ declare function retrieve$1(scheduleId: string): ApiPromise<ScheduleObject>;
360
365
  /**
361
366
  * Updates a schedule
362
367
  * @param scheduleId - The ID of the schedule to update
@@ -366,22 +371,22 @@ declare function retrieve$1(scheduleId: string): Promise<ScheduleObject>;
366
371
  * @param options.externalId - An optional external identifier for the schedule
367
372
  * @returns The updated schedule
368
373
  */
369
- declare function update$1(scheduleId: string, options: UpdateScheduleOptions): Promise<ScheduleObject>;
374
+ declare function update$1(scheduleId: string, options: UpdateScheduleOptions): ApiPromise<ScheduleObject>;
370
375
  /**
371
376
  * Deletes a schedule
372
377
  * @param scheduleId - The ID of the schedule to delete
373
378
  */
374
- declare function del$1(scheduleId: string): Promise<DeletedScheduleObject>;
379
+ declare function del$1(scheduleId: string): ApiPromise<DeletedScheduleObject>;
375
380
  /**
376
381
  * Deactivates a schedule
377
382
  * @param scheduleId - The ID of the schedule to deactivate
378
383
  */
379
- declare function deactivate(scheduleId: string): Promise<ScheduleObject>;
384
+ declare function deactivate(scheduleId: string): ApiPromise<ScheduleObject>;
380
385
  /**
381
386
  * Activates a schedule
382
387
  * @param scheduleId - The ID of the schedule to activate
383
388
  */
384
- declare function activate(scheduleId: string): Promise<ScheduleObject>;
389
+ declare function activate(scheduleId: string): ApiPromise<ScheduleObject>;
385
390
  /**
386
391
  * Lists schedules
387
392
  * @param options - The list options
@@ -389,7 +394,7 @@ declare function activate(scheduleId: string): Promise<ScheduleObject>;
389
394
  * @param options.perPage - The number of schedules per page
390
395
  * @returns The list of schedules
391
396
  */
392
- declare function list$1(options?: ListScheduleOptions): Promise<ListSchedulesResult>;
397
+ declare function list$1(options?: ListScheduleOptions): OffsetLimitPagePromise<typeof ScheduleObject>;
393
398
 
394
399
  declare const index_activate: typeof activate;
395
400
  declare const index_deactivate: typeof deactivate;
@@ -398,18 +403,18 @@ declare namespace index {
398
403
  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
404
  }
400
405
 
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>;
406
+ declare function upload(projectRef: string, slug: string, params: ImportEnvironmentVariablesParams): ApiPromise<EnvironmentVariableResponseBody>;
407
+ declare function upload(params: ImportEnvironmentVariablesParams): ApiPromise<EnvironmentVariableResponseBody>;
408
+ declare function list(projectRef: string, slug: string): ApiPromise<EnvironmentVariables>;
409
+ declare function list(): ApiPromise<EnvironmentVariables>;
410
+ declare function create(projectRef: string, slug: string, params: CreateEnvironmentVariableParams): ApiPromise<EnvironmentVariableResponseBody>;
411
+ declare function create(params: CreateEnvironmentVariableParams): ApiPromise<EnvironmentVariableResponseBody>;
412
+ declare function retrieve(projectRef: string, slug: string, name: string): ApiPromise<EnvironmentVariableValue>;
413
+ declare function retrieve(name: string): ApiPromise<EnvironmentVariableValue>;
414
+ declare function del(projectRef: string, slug: string, name: string): ApiPromise<EnvironmentVariableResponseBody>;
415
+ declare function del(name: string): ApiPromise<EnvironmentVariableResponseBody>;
416
+ declare function update(projectRef: string, slug: string, name: string, params: UpdateEnvironmentVariableParams): ApiPromise<EnvironmentVariableResponseBody>;
417
+ declare function update(name: string, params: UpdateEnvironmentVariableParams): ApiPromise<EnvironmentVariableResponseBody>;
413
418
 
414
419
  declare const envvars_CreateEnvironmentVariableParams: typeof CreateEnvironmentVariableParams;
415
420
  declare const envvars_ImportEnvironmentVariablesParams: typeof ImportEnvironmentVariablesParams;
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.35";
21
+ var version = "3.0.0-beta.37";
22
22
 
23
23
  // src/v3/tracer.ts
24
24
  var tracer = new v3.TriggerTracer({
@@ -519,7 +519,7 @@ function createTask(params) {
519
519
  const response = await apiClient.triggerTask(params.id, {
520
520
  payload: payloadPacket.data,
521
521
  options: {
522
- queue: params.queue,
522
+ queue: options?.queue ?? params.queue,
523
523
  concurrencyKey: options?.concurrencyKey,
524
524
  test: v3.taskContext.ctx?.run.isTest,
525
525
  payloadType: payloadPacket.dataType,
@@ -616,7 +616,7 @@ function createTask(params) {
616
616
  options: {
617
617
  dependentAttempt: ctx.attempt.id,
618
618
  lockToVersion: v3.taskContext.worker?.version,
619
- queue: params.queue,
619
+ queue: options?.queue ?? params.queue,
620
620
  concurrencyKey: options?.concurrencyKey,
621
621
  test: v3.taskContext.ctx?.run.isTest,
622
622
  payloadType: payloadPacket.dataType,
@@ -934,30 +934,42 @@ __name(calculateDurationInMs, "calculateDurationInMs");
934
934
  var runs = {
935
935
  replay: replayRun,
936
936
  cancel: cancelRun,
937
- retrieve: retrieveRun
937
+ retrieve: retrieveRun,
938
+ list: listRuns
938
939
  };
939
- async function retrieveRun(runId) {
940
+ function listRuns(paramsOrProjectRef, params) {
940
941
  const apiClient = v3.apiClientManager.client;
941
942
  if (!apiClient) {
942
943
  throw apiClientMissingError();
943
944
  }
944
- return await apiClient.retrieveRun(runId);
945
+ if (typeof paramsOrProjectRef === "string") {
946
+ return apiClient.listProjectRuns(paramsOrProjectRef, params);
947
+ }
948
+ return apiClient.listRuns(params);
949
+ }
950
+ __name(listRuns, "listRuns");
951
+ function retrieveRun(runId) {
952
+ const apiClient = v3.apiClientManager.client;
953
+ if (!apiClient) {
954
+ throw apiClientMissingError();
955
+ }
956
+ return apiClient.retrieveRun(runId);
945
957
  }
946
958
  __name(retrieveRun, "retrieveRun");
947
- async function replayRun(runId) {
959
+ function replayRun(runId) {
948
960
  const apiClient = v3.apiClientManager.client;
949
961
  if (!apiClient) {
950
962
  throw apiClientMissingError();
951
963
  }
952
- return await apiClient.replayRun(runId);
964
+ return apiClient.replayRun(runId);
953
965
  }
954
966
  __name(replayRun, "replayRun");
955
- async function cancelRun(runId) {
967
+ function cancelRun(runId) {
956
968
  const apiClient = v3.apiClientManager.client;
957
969
  if (!apiClient) {
958
970
  throw apiClientMissingError();
959
971
  }
960
- return await apiClient.cancelRun(runId);
972
+ return apiClient.cancelRun(runId);
961
973
  }
962
974
  __name(cancelRun, "cancelRun");
963
975
 
@@ -981,7 +993,7 @@ function task2(params) {
981
993
  return task3;
982
994
  }
983
995
  __name(task2, "task");
984
- async function create(options) {
996
+ function create(options) {
985
997
  const apiClient = v3.apiClientManager.client;
986
998
  if (!apiClient) {
987
999
  throw apiClientMissingError();
@@ -989,7 +1001,7 @@ async function create(options) {
989
1001
  return apiClient.createSchedule(options);
990
1002
  }
991
1003
  __name(create, "create");
992
- async function retrieve(scheduleId) {
1004
+ function retrieve(scheduleId) {
993
1005
  const apiClient = v3.apiClientManager.client;
994
1006
  if (!apiClient) {
995
1007
  throw apiClientMissingError();
@@ -997,7 +1009,7 @@ async function retrieve(scheduleId) {
997
1009
  return apiClient.retrieveSchedule(scheduleId);
998
1010
  }
999
1011
  __name(retrieve, "retrieve");
1000
- async function update(scheduleId, options) {
1012
+ function update(scheduleId, options) {
1001
1013
  const apiClient = v3.apiClientManager.client;
1002
1014
  if (!apiClient) {
1003
1015
  throw apiClientMissingError();
@@ -1005,7 +1017,7 @@ async function update(scheduleId, options) {
1005
1017
  return apiClient.updateSchedule(scheduleId, options);
1006
1018
  }
1007
1019
  __name(update, "update");
1008
- async function del(scheduleId) {
1020
+ function del(scheduleId) {
1009
1021
  const apiClient = v3.apiClientManager.client;
1010
1022
  if (!apiClient) {
1011
1023
  throw apiClientMissingError();
@@ -1013,7 +1025,7 @@ async function del(scheduleId) {
1013
1025
  return apiClient.deleteSchedule(scheduleId);
1014
1026
  }
1015
1027
  __name(del, "del");
1016
- async function deactivate(scheduleId) {
1028
+ function deactivate(scheduleId) {
1017
1029
  const apiClient = v3.apiClientManager.client;
1018
1030
  if (!apiClient) {
1019
1031
  throw apiClientMissingError();
@@ -1021,7 +1033,7 @@ async function deactivate(scheduleId) {
1021
1033
  return apiClient.deactivateSchedule(scheduleId);
1022
1034
  }
1023
1035
  __name(deactivate, "deactivate");
1024
- async function activate(scheduleId) {
1036
+ function activate(scheduleId) {
1025
1037
  const apiClient = v3.apiClientManager.client;
1026
1038
  if (!apiClient) {
1027
1039
  throw apiClientMissingError();
@@ -1029,7 +1041,7 @@ async function activate(scheduleId) {
1029
1041
  return apiClient.activateSchedule(scheduleId);
1030
1042
  }
1031
1043
  __name(activate, "activate");
1032
- async function list(options) {
1044
+ function list(options) {
1033
1045
  const apiClient = v3.apiClientManager.client;
1034
1046
  if (!apiClient) {
1035
1047
  throw apiClientMissingError();
@@ -1048,7 +1060,7 @@ __export(envvars_exports, {
1048
1060
  update: () => update2,
1049
1061
  upload: () => upload
1050
1062
  });
1051
- async function upload(projectRefOrParams, slug, params) {
1063
+ function upload(projectRefOrParams, slug, params) {
1052
1064
  let $projectRef;
1053
1065
  let $params;
1054
1066
  let $slug;
@@ -1083,16 +1095,10 @@ async function upload(projectRefOrParams, slug, params) {
1083
1095
  if (!apiClient) {
1084
1096
  throw apiClientMissingError();
1085
1097
  }
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
- });
1098
+ return apiClient.importEnvVars($projectRef, $slug, $params);
1093
1099
  }
1094
1100
  __name(upload, "upload");
1095
- async function list2(projectRef, slug) {
1101
+ function list2(projectRef, slug) {
1096
1102
  const $projectRef = projectRef ?? v3.taskContext.ctx?.project.ref;
1097
1103
  const $slug = slug ?? v3.taskContext.ctx?.environment.slug;
1098
1104
  if (!$projectRef) {
@@ -1105,16 +1111,10 @@ async function list2(projectRef, slug) {
1105
1111
  if (!apiClient) {
1106
1112
  throw apiClientMissingError();
1107
1113
  }
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
- });
1114
+ return apiClient.listEnvVars($projectRef, $slug);
1115
1115
  }
1116
1116
  __name(list2, "list");
1117
- async function create2(projectRefOrParams, slug, params) {
1117
+ function create2(projectRefOrParams, slug, params) {
1118
1118
  let $projectRef;
1119
1119
  let $slug;
1120
1120
  let $params;
@@ -1149,16 +1149,10 @@ async function create2(projectRefOrParams, slug, params) {
1149
1149
  if (!apiClient) {
1150
1150
  throw apiClientMissingError();
1151
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
- });
1152
+ return apiClient.createEnvVar($projectRef, $slug, $params);
1159
1153
  }
1160
1154
  __name(create2, "create");
1161
- async function retrieve2(projectRefOrName, slug, name) {
1155
+ function retrieve2(projectRefOrName, slug, name) {
1162
1156
  let $projectRef;
1163
1157
  let $slug;
1164
1158
  let $name;
@@ -1181,16 +1175,10 @@ async function retrieve2(projectRefOrName, slug, name) {
1181
1175
  if (!apiClient) {
1182
1176
  throw apiClientMissingError();
1183
1177
  }
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
- });
1178
+ return apiClient.retrieveEnvVar($projectRef, $slug, $name);
1191
1179
  }
1192
1180
  __name(retrieve2, "retrieve");
1193
- async function del2(projectRefOrName, slug, name) {
1181
+ function del2(projectRefOrName, slug, name) {
1194
1182
  let $projectRef;
1195
1183
  let $slug;
1196
1184
  let $name;
@@ -1213,16 +1201,10 @@ async function del2(projectRefOrName, slug, name) {
1213
1201
  if (!apiClient) {
1214
1202
  throw apiClientMissingError();
1215
1203
  }
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
- });
1204
+ return apiClient.deleteEnvVar($projectRef, $slug, $name);
1223
1205
  }
1224
1206
  __name(del2, "del");
1225
- async function update2(projectRefOrName, slugOrParams, name, params) {
1207
+ function update2(projectRefOrName, slugOrParams, name, params) {
1226
1208
  let $projectRef;
1227
1209
  let $slug;
1228
1210
  let $name;
@@ -1261,13 +1243,7 @@ async function update2(projectRefOrName, slugOrParams, name, params) {
1261
1243
  if (!apiClient) {
1262
1244
  throw apiClientMissingError();
1263
1245
  }
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
- });
1246
+ return apiClient.updateEnvVar($projectRef, $slug, $name, $params);
1271
1247
  }
1272
1248
  __name(update2, "update");
1273
1249
 
@@ -1277,9 +1253,9 @@ function configure(options) {
1277
1253
  }
1278
1254
  __name(configure, "configure");
1279
1255
 
1280
- Object.defineProperty(exports, 'APIError', {
1256
+ Object.defineProperty(exports, 'ApiError', {
1281
1257
  enumerable: true,
1282
- get: function () { return v3.APIError; }
1258
+ get: function () { return v3.ApiError; }
1283
1259
  });
1284
1260
  Object.defineProperty(exports, 'AuthenticationError', {
1285
1261
  enumerable: true,