@contember/schema
Advanced tools
Comparing version 1.2.0-alpha.1 to 1.2.0-alpha.2
@@ -6,5 +6,6 @@ import Input from './input'; | ||
entity = "entity", | ||
predefined = "predefined" | ||
predefined = "predefined", | ||
condition = "condition" | ||
} | ||
type Variable = EntityVariable | PredefinedVariable; | ||
type Variable = EntityVariable | PredefinedVariable | ConditionVariable; | ||
type EntityVariable = { | ||
@@ -19,5 +20,12 @@ readonly type: VariableType.entity; | ||
}; | ||
type VariableValue = string | number | readonly (string | number)[]; | ||
type ConditionVariable = { | ||
readonly type: VariableType.condition; | ||
}; | ||
type VariableValue = readonly JSONValue[]; | ||
type VariableMapEntry = { | ||
readonly definition: Variable; | ||
readonly value: VariableValue; | ||
}; | ||
type VariablesMap = { | ||
readonly [name: string]: VariableValue; | ||
readonly [name: string]: VariableMapEntry; | ||
}; | ||
@@ -24,0 +32,0 @@ type PredicateVariable = string; |
@@ -9,2 +9,3 @@ "use strict"; | ||
VariableType["predefined"] = "predefined"; | ||
VariableType["condition"] = "condition"; | ||
// currently unsupported | ||
@@ -11,0 +12,0 @@ // enum = 'enum', |
{ | ||
"name": "@contember/schema", | ||
"version": "1.2.0-alpha.1", | ||
"version": "1.2.0-alpha.2", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -8,2 +8,3 @@ import Input from './input' | ||
predefined = 'predefined', | ||
condition = 'condition', | ||
@@ -15,9 +16,10 @@ // currently unsupported | ||
export type Variable = EntityVariable | PredefinedVariable // | EnumVariable | ColumnValueVariable | ||
export type Variable = | ||
| EntityVariable | ||
| PredefinedVariable | ||
| ConditionVariable | ||
// | EnumVariable | ColumnValueVariable | ||
// export interface EnumVariable { | ||
// type: VariableType.enum | ||
// enumName: string | ||
// } | ||
export type EntityVariable = { | ||
@@ -35,2 +37,11 @@ readonly type: VariableType.entity | ||
export type ConditionVariable = { | ||
readonly type: VariableType.condition | ||
} | ||
// export interface EnumVariable { | ||
// type: VariableType.enum | ||
// enumName: string | ||
// } | ||
// export interface ColumnValueVariable { | ||
@@ -42,6 +53,10 @@ // type: VariableType.column | ||
export type VariableValue = string | number | readonly (string | number)[] | ||
export type VariableValue = readonly JSONValue[] | ||
export type VariableMapEntry = { | ||
readonly definition: Variable | ||
readonly value: VariableValue | ||
} | ||
export type VariablesMap = { | ||
readonly [name: string]: VariableValue | ||
readonly [name: string]: VariableMapEntry | ||
} | ||
@@ -48,0 +63,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
106641
1479