Interface: ReferenceDesignator
@kortexya/reasoninglayer / ReferenceDesignator
Interface: ReferenceDesignator
Section titled “Interface: ReferenceDesignator”Defined in: src/types/values.ts:103
A designator that names a stored term by its @key values instead of by id.
Remarks
Section titled “Remarks”⚠️ Pass sortName. The sort_name spelling shown for the wire is NOT
accepted here. The two spellings are not interchangeable through the SDK,
and the compiler does not catch the swap: ReferenceValue.value is
string | ReferenceDesignator, so an object carrying the wrong key stays
assignable at a real call site. A designator sits INSIDE a features map,
and features is carried verbatim by the request bridge, so nothing
snake_cases sortName for you — and nothing camelCases sort_name either.
Measured 2026-09-21. The same row, twice:
{type:"Reference", value:{sort_name:"customer", features:{…}}} → 422 Failed to deserialize the JSON body into the target type: terms[0]: data did not match any variant of untagged enum CreateTermInput{type:"Reference", value:{sortName:"customer", features:{…}}} → 201 {"termIds":["ba3b487e-…"],"termsAdded":1}The refusal names a byte offset and no feature, so nothing in it points at
the key. Every caller migrating off a raw fetch holds the sort_name
spelling, which is how this reaches production.
features is a USER-KEYED map — its keys are the OSF feature names the sort
declares, so they are carried verbatim through the request bridge (features
is in USER_DATA_FIELDS) and a camelCase feature such as invoiceNumber is
NOT snake_cased.
Every named feature must be declared @key on that sort, and the
designator must name at least one. Measured against the engine on
2026-09-18:
- a feature that is not
@key→422 feature 'label' of sort 'nokey' is not a @key feature; a designator addresses a term only through its @key - an empty map →
422 a reference designator for sort 'invoice' names no feature - an unknown sort →
422 reference designator names unknown sort 'no_such_sort' - no term carrying the key →
422 no term of sort 'invoice' carries @key 'number' = "INV-NOPE"; a reference designator names an existing term, it never creates one
Example
Section titled “Example”const designator: ReferenceDesignator = { sortName: 'invoice', features: { number: { type: 'String', value: 'INV-1' } },};Properties
Section titled “Properties”features
Section titled “features”features:
Record<string,ValueDto>
Defined in: src/types/values.ts:107
The @key feature values that pick one term out of that extent.
sortName
Section titled “sortName”sortName:
string
Defined in: src/types/values.ts:105
The sort whose extent the designator addresses.