Type Alias: FeatureInputValueDto
@kortexya/reasoninglayer / FeatureInputValueDto
Type Alias: FeatureInputValueDto
Section titled “Type Alias: FeatureInputValueDto”FeatureInputValueDto =
FeatureInputTermRef|FeatureInputSortRef|ValueDto|FeatureInputConstrainedVariable|FeatureInputVariable|FeatureInputInlineTerm|FeatureInputInlineTermByName|FeatureInputValueDto[] |string|number|boolean
Defined in: src/types/homoiconic.ts:190
Input value type for features in homoiconic inference requests.
A structural (untagged) union with 12 variants. The variant ordering matches
the Rust #[serde(untagged)] deserialization order — this ordering is critical
because Rust tries each variant in definition order.
Variants (in Rust deserialization order):
- TermRef —
{ term_id: string }— reference an existing term - SortRef —
{ sort_ref: string }— a sort as a first-class value - Typed —
{ type: "…", value: … }— a tagged ValueDto envelope - ConstrainedVariable —
{ name: string, constraint: TermInputDto }— variable with constraint - Variable —
{ name: string }— unconstrained variable (e.g.,"?X") - InlineTerm —
{ sort_id: string, features?: ..., binding?: string }— inline term by sort UUID - InlineTermByName —
{ sort_name: string, features?: ..., binding?: string }— inline term by sort name - List —
FeatureInputValueDto[]— list of feature input values - String —
string— string primitive - Integer —
number(integer) — integer primitive - Real —
number(float) — real primitive - Boolean —
boolean— boolean primitive
Remarks
Section titled “Remarks”Serialization format: Untagged (structural discrimination) — with one
deliberate exception. The Typed variant is the tagged ValueDto
envelope term CRUD takes, sent as-is: {"type":"DateTime","value":"…"}. It
is the only spelling for the scalars with no JSON literal of their own
(DateTime, BigInteger, SortId, Measurement, Geometry, fuzzy
values, ExternalRef, a Reference by designator). Prefer the untagged
variants for everything else — a plain string, number or boolean, or
{ termId } for a reference by id.
Critical ordering constraint: ConstrainedVariable MUST come before
Variable — both have name, but the constrained version also has constraint.
Rust’s serde(untagged) tries them in definition order.
An object that matches no variant is refused before the request is sent,
with a ValidationError whose field names the feature.
Do NOT use with term CRUD endpoints — use import(‘./values.js’).ValueDto instead.