Skip to content

Interface: BulkCreateTermsRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / BulkCreateTermsRequest

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

What TermsClient.bulkCreateTerms takes.

BulkAddTermsRequest with the features relaxed: each row’s features may be plain JS values ("Alice", 30, true, null, [...]), which the client tags into ValueDto before it sends them. Pre-built Value.* output passes through untouched.

dryRun and partial are inherited from BulkAddTermsRequest, with their meaning documented there.

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

BulkAddTermsRequest.dryRun


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

BulkAddTermsRequest.partial


terms: CreateTermInputWithPlainFeatures[]

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

The rows to create, features as plain values or as Value.* output.