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

Method importEnvVars

packages/cli-v3/src/apiClient.ts:164–185  ·  view source on GitHub ↗
(
    projectRef: string,
    slug: "dev" | "prod" | "staging",
    params: ImportEnvironmentVariablesRequestBody
  )

Source from the content-addressed store, hash-verified

162 }
163
164 async importEnvVars(
165 projectRef: string,
166 slug: "dev" | "prod" | "staging",
167 params: ImportEnvironmentVariablesRequestBody
168 ) {
169 if (!this.accessToken) {
170 throw new Error("importEnvVars: No access token");
171 }
172
173 return wrapZodFetch(
174 EnvironmentVariableResponseBody,
175 `${this.apiURL}/api/v1/projects/${projectRef}/envvars/${slug}/import`,
176 {
177 method: "POST",
178 headers: {
179 Authorization: `Bearer ${this.accessToken}`,
180 "Content-Type": "application/json",
181 },
182 body: JSON.stringify(params),
183 }
184 );
185 }
186
187 async initializeDeployment(body: InitializeDeploymentRequestBody) {
188 if (!this.accessToken) {

Callers 2

uploadFunction · 0.45

Calls 1

wrapZodFetchFunction · 0.85

Tested by

no test coverage detected