MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / del

Function del

packages/trigger-sdk/src/v3/envvars.ts:204–238  ·  view source on GitHub ↗
(
  projectRefOrName: string,
  slug?: string,
  name?: string
)

Source from the content-addressed store, hash-verified

202): ApiPromise<EnvironmentVariableResponseBody>;
203export function del(name: string): ApiPromise<EnvironmentVariableResponseBody>;
204export function del(
205 projectRefOrName: string,
206 slug?: string,
207 name?: string
208): ApiPromise<EnvironmentVariableResponseBody> {
209 let $projectRef: string;
210 let $slug: string;
211 let $name: string;
212
213 if (typeof name === "string") {
214 $projectRef = projectRefOrName;
215 $slug = slug!;
216 $name = name;
217 } else {
218 $projectRef = taskContext.ctx?.project.ref!;
219 $slug = taskContext.ctx?.environment.slug!;
220 $name = projectRefOrName;
221 }
222
223 if (!$projectRef) {
224 throw new Error("projectRef is required");
225 }
226
227 if (!$slug) {
228 throw new Error("slug is required");
229 }
230
231 const apiClient = apiClientManager.client;
232
233 if (!apiClient) {
234 throw apiClientMissingError();
235 }
236
237 return apiClient.deleteEnvVar($projectRef, $slug, $name);
238}
239
240export function update(
241 projectRef: string,

Callers 5

AppliedStatusFilterFunction · 0.50
AppliedEnvironmentFilterFunction · 0.50
AppliedTaskFilterFunction · 0.50
AppliedBulkActionsFilterFunction · 0.50
AppliedPeriodFilterFunction · 0.50

Calls 2

apiClientMissingErrorFunction · 0.90
deleteEnvVarMethod · 0.80

Tested by

no test coverage detected