MCPcopy
hub / github.com/triggerdotdev/trigger.dev / importEnvVars

Method importEnvVars

packages/core/src/v3/apiClient/index.ts:333–355  ·  view source on GitHub ↗
(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams)

Source from the content-addressed store, hash-verified

331 }
332
333 importEnvVars(projectRef: string, slug: string, body: ImportEnvironmentVariablesParams) {
334 if (isRecordLike(body.variables)) {
335 return zodfetch(
336 EnvironmentVariableResponseBody,
337 `${this.baseUrl}/api/v1/projects/${projectRef}/envvars/${slug}/import`,
338 {
339 method: "POST",
340 headers: this.#getHeaders(false),
341 body: JSON.stringify(body),
342 }
343 );
344 } else {
345 return zodupload(
346 EnvironmentVariableResponseBody,
347 `${this.baseUrl}/api/v1/projects/${projectRef}/envvars/${slug}/import`,
348 body,
349 {
350 method: "POST",
351 headers: this.#getHeaders(false),
352 }
353 );
354 }
355 }
356
357 retrieveEnvVar(projectRef: string, slug: string, key: string) {
358 return zodfetch(

Callers

nothing calls this directly

Calls 4

#getHeadersMethod · 0.95
isRecordLikeFunction · 0.90
zodfetchFunction · 0.90
zoduploadFunction · 0.90

Tested by

no test coverage detected