( projectRefOrParams: string | ImportEnvironmentVariablesParams, slug?: string, params?: ImportEnvironmentVariablesParams )
| 21 | params: ImportEnvironmentVariablesParams |
| 22 | ): ApiPromise<EnvironmentVariableResponseBody>; |
| 23 | export function upload( |
| 24 | projectRefOrParams: string | ImportEnvironmentVariablesParams, |
| 25 | slug?: string, |
| 26 | params?: ImportEnvironmentVariablesParams |
| 27 | ): ApiPromise<EnvironmentVariableResponseBody> { |
| 28 | let $projectRef: string; |
| 29 | let $params: ImportEnvironmentVariablesParams; |
| 30 | let $slug: string; |
| 31 | |
| 32 | if (taskContext.ctx) { |
| 33 | if (typeof projectRefOrParams === "string") { |
| 34 | $projectRef = projectRefOrParams; |
| 35 | $slug = slug ?? taskContext.ctx.environment.slug; |
| 36 | |
| 37 | if (!params) { |
| 38 | throw new Error("params is required"); |
| 39 | } |
| 40 | |
| 41 | $params = params; |
| 42 | } else { |
| 43 | $params = projectRefOrParams; |
| 44 | $projectRef = taskContext.ctx.project.ref; |
| 45 | $slug = taskContext.ctx.environment.slug; |
| 46 | } |
| 47 | } else { |
| 48 | if (typeof projectRefOrParams !== "string") { |
| 49 | throw new Error("projectRef is required"); |
| 50 | } |
| 51 | |
| 52 | if (!slug) { |
| 53 | throw new Error("slug is required"); |
| 54 | } |
| 55 | |
| 56 | if (!params) { |
| 57 | throw new Error("params is required"); |
| 58 | } |
| 59 | |
| 60 | $projectRef = projectRefOrParams; |
| 61 | $slug = slug; |
| 62 | $params = params; |
| 63 | } |
| 64 | |
| 65 | const apiClient = apiClientManager.client; |
| 66 | |
| 67 | if (!apiClient) { |
| 68 | throw apiClientMissingError(); |
| 69 | } |
| 70 | |
| 71 | return apiClient.importEnvVars($projectRef, $slug, $params); |
| 72 | } |
| 73 | |
| 74 | export function list(projectRef: string, slug: string): ApiPromise<EnvironmentVariables>; |
| 75 | export function list(): ApiPromise<EnvironmentVariables>; |
nothing calls this directly
no test coverage detected
searching dependent graphs…