UNPKG

@openinc/parse-server-opendash

Version:
36 lines (35 loc) 1.29 kB
/** * Config class to handle configuration values from environment variables. * It supports different types of values (string, int, float, boolean) and provides methods to get the values. */ export interface CommonConfigValue { env: string; type: "string" | "int" | "float" | "boolean"; secret: boolean; public: boolean; required: boolean; default?: string; description: string; } /** * ConfigValue interface to define the structure of configuration values. * It extends the CommonConfigValue interface and adds a type property that can be "string", "int", or "float". */ export interface ConfigValue extends CommonConfigValue { type: "string" | "int" | "float"; } /** * ConfigBooleanValue interface to define the structure of boolean configuration values. * It extends the CommonConfigValue interface and adds a type property with the value "boolean". */ export interface ConfigBooleanValue extends CommonConfigValue { type: "boolean"; dependencies?: string[]; } /** * ConfigMap interface to define the structure of the configuration map. * It contains key-value pairs where the key is a string and the value is a ConfigValue or ConfigBooleanValue. */ export interface ConfigMap { [key: string]: ConfigValue | ConfigBooleanValue; }