Types and stubs for environment variables feature.

This commit is contained in:
mike12345567 2023-01-06 16:41:45 +00:00
parent 1e046b9d7f
commit 701e2ff860
6 changed files with 33 additions and 5 deletions

View File

@ -482,11 +482,6 @@
qs "^6.11.0"
tough-cookie "^4.1.2"
"@budibase/types@2.2.10-alpha.13":
version "2.2.10-alpha.13"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.10-alpha.13.tgz#abc1a5bd9295a0fa63db67912c6520d12e8d6f66"
integrity sha512-XRmLQXCLKdOADxEoGB3h4QOrHlPIqbk9jOSxyOK2RDQIy8NdQ+aXanPw3TEHkgrDIYxrClVcf4KXrujqNnrk6g==
"@cspotcode/source-map-support@^0.8.0":
version "0.8.1"
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"

View File

@ -0,0 +1,14 @@
export interface CreateEnvironmentVariableRequest {
name: string
production: string
development: string
}
export interface UpdateEnvironmentVariableRequest {
production: string
development: string
}
export interface GetEnvironmentVariablesResponse {
variables: string[]
}

View File

@ -0,0 +1 @@
export * from "./environmentVariables"

View File

@ -3,3 +3,4 @@ export * from "./user"
export * from "./errors"
export * from "./schedule"
export * from "./app"
export * from "./global"

View File

@ -0,0 +1,16 @@
import { Document } from "../document"
export interface EnvironmentVariablesDoc extends Document {
variables: string
}
export type EnvironmentVariableValue = {
production: string
development: string
}
// what comes out of the "variables" when it is decrypted
export type EnvironmentVariablesDecrypted = Record<
string,
EnvironmentVariableValue
>

View File

@ -5,3 +5,4 @@ export * from "./plugin"
export * from "./quotas"
export * from "./schedule"
export * from "./templates"
export * from "./environmentVariables"