(
projectRef: string,
slug: "dev" | "prod" | "staging",
params: ImportEnvironmentVariablesRequestBody
)
| 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) { |
no test coverage detected