Type Alias: OsfqlValue
@kortexya/reasoninglayer / Osfql / OsfqlValue
Type Alias: OsfqlValue
OsfqlValue = {
type:"null"; } | {type:"integer";value:number; } | {type:"float";value:number; } | {type:"string";value:string; } | {type:"boolean";value:boolean; } | {type:"list";value:OsfqlValue[]; } | {type:"term_ref";value:string; } | {type:"term";value:OsfqlTermValue; }
Defined in: src/types/osfql.ts:79
A bound value from OSFQL execution.
Remarks
Uses a tagged discriminated union with type as the discriminant. The discriminants are
lowercase on the wire ("string", not "String") — this is not the tagged
ValueDto format used by term CRUD, and not the untagged FeatureValueDto inference
format. The Rust DTO is adjacently tagged (#[serde(tag = "type", content = "value")]),
so every non-null variant carries its payload under a single value key.
The union is genuinely recursive: list holds Vec<OsfqlValueDto> and a term’s
features hold BTreeMap<String, OsfqlValueDto>. The backend erases both with
#[schema(value_type = ...Object)], so the SDK hand-writes the recursion against the
Rust source rather than degrading the nested payloads to object.
The property-graph endpoints return this exact DTO — PropertyGraphValue is an alias of this type.
Example
const text: OsfqlValue = { type: 'string', value: 'Alice' };const list: OsfqlValue = { type: 'list', value: [{ type: 'integer', value: 1 }] };const term: OsfqlValue = { type: 'term', value: { sort: 'person', features: { name: text } },};