Skip to content

Type Alias: VocabularyRecordOperation

@kortexya/reasoninglayer


@kortexya/reasoninglayer / VocabularyRecordOperation

VocabularyRecordOperation = { op: "upsert"; record: VocabularyRecordInput; } | { op: "remove"; recordId: string; } | { op: "upsert_migration_step"; step: VocabularyDataMigrationStepInput; } | { definedOnly?: boolean; op: "accept_proposals"; }

Defined in: src/types/vocabulary.ts:1347

One operation of a change set, applied in order: insert or replace a record, remove one, or accept every proposal of the change set.

{ op: "upsert"; record: VocabularyRecordInput; }

op: "upsert"

Discriminator: insert or replace.

record: VocabularyRecordInput

The record.


{ op: "remove"; recordId: string; }

op: "remove"

Discriminator: remove.

recordId: string

The record to remove (UUID).


{ op: "upsert_migration_step"; step: VocabularyDataMigrationStepInput; }

op: "upsert_migration_step"

Discriminator: insert or replace a data migration step.

step: VocabularyDataMigrationStepInput

The step.


{ definedOnly?: boolean; op: "accept_proposals"; }

optional definedOnly?: boolean

Accept only defined concepts and the proposals they connect. Defaults to false.

op: "accept_proposals"

Discriminator: accept every proposal of the change set.

Wire format: internally tagged by op. accept_proposals accepts an optional definedOnly flag; without it the engine accepts every draft concept and every proposed membership, concept relation, concept mapping and collection of the change set as it stands at that operation. Deprecated, rejected and baseline records are unchanged.