Skip to content

Interface: BulkAddTermsRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / BulkAddTermsRequest

Defined in: src/types/terms.ts:295

Request to bulk-create terms.

optional dryRun?: boolean

Defined in: src/types/terms.ts:318

Run every check the write runs, then write nothing.

Conversion, declarations, coreference and events all run, inside the write lock, and the store and facade are put back before the route answers. Nothing persists, nothing is notified, no derivation is queued.

A clean dry run answers the count the batch WOULD have produced and no BulkAddTermsResponse.termIds: the rollback already discarded every id it minted, and a later real write mints different ones — so the vector would have named nothing. The ids that DO outlive a dry run are the entities a @key coreference would have merged into, and those come back as BulkAddTermsResponse.coreferencedTermIds.

A refused dry run answers the same per-row refusals the real write answers with, as BulkRefusedError.

false


optional partial?: boolean

Defined in: src/types/terms.ts:343

Write the rows the checks did NOT refuse, instead of refusing the batch because one row failed.

Without it a batch holding one bad record has to be resent minus that record — a second full call, a second full round of constraint evaluation, and a window in which a survivor’s reference target can be deleted between the two — although the engine already names every bad row by index in one pass and therefore already knows which ones were fine.

With it the answer is 201 when anything was written, and BulkAddTermsResponse.termIds carries one id per ACCEPTED row with BulkAddTermsResponse.errors beside it. When every row was refused the answer is still a BulkRefusedError, because nothing was written and that is a refusal.

Two failures stay batch-wide even under this flag, because neither can be attributed to a row: the end-of-batch constraint propagation answers one 409 for the whole batch, and a persistence failure reverts what the batch inserted.

false


terms: CreateTermInput[]

Defined in: src/types/terms.ts:297

Terms to create, each naming its sort by id or by name.