export declare enum VariableSource { api = "api", dashboard = "dashboard", clientSDK = "clientSDK", serverSDK = "serverSDK" } /** * Variable model, defines the project-level variables used in SDKs to change functionality. */ export declare class Variable { /** * Mongo primary _id. */ _id: IdType; /** * Variable schema type */ type: VariableType; /** * Unique key by Project. Used in the SDKs as the main reference for variables. * Must only contain lower-case characters and `_` or `-`. */ key: string; } /** * Supported variable types */ export declare enum VariableType { string = "String", boolean = "Boolean", number = "Number", json = "JSON" } /** * Supported variable values */ type JSONValue = string | number | boolean | null | JSONObject | JSONArray; type JSONObject = { [key: string]: JSONValue; }; type JSONArray = JSONValue[]; export type DVCJSON = JSONObject; export type DevCycleJSON = JSONObject; export type VariableValue = string | boolean | number | DVCJSON; type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; type IsUnion = [T] extends [UnionToIntersection] ? false : true; export type VariableTypeAlias = IsUnion extends true ? T : T extends boolean ? boolean : T extends number ? number : T extends string ? string : T extends DVCJSON ? DVCJSON : never; export {};