Keep one of two documents
Keep one of two documents on a live `duplicate_document` case. A duplicate takes `{ artifactId }`, the case's own artifact or the one it duplicates (`missingInfo.existing.artifactId`): keeping the existing one closes the case `evidence` and the new artifact stays evidence only, unless the other document is booked (its file read again onto the existing one's number): that booking is withdrawn, the existing one is booked if it was not, and the case closes `corrected` naming the withdrawing version; keeping the new one makes its newest reading the next version of the existing event, the artifact stapled as its evidence, and closes the case `corrected`. A contested file of one document (`missingInfo.documentId`) takes the file or the one the document's figures are read from: keeping the file closes `corrected` with the version its reading mints, keeping the other closes `evidence`. On a document not yet booked, a kept file whose reading its gate stops is still the one kept (the other `rejected`) and the case closes `evidence`, its gate case opened as what you answer next (`waitsOnCaseId`): the booking waits on it as any gated file's does, as it does on the case a still-unbooked document's figures' file already waits in. On a booked document that keep is refused, `keep_needs_check`, nothing moving: keep the booked file, then correct the booking's entry to what the file states. An invoice that could replace two receipts takes `{ receiptCaseId }`, one of `missingInfo.receipts[].caseId`: the invoice replaces that receipt and both cases close. 409, the case staying live: anything the case does not name is `document_not_in_case`; keeping the new one of a duplicate when its own document is booked onto another event is `keep_new_booked`; keeping the new one of a duplicate whose reading the gate still stops, or a document the world moved under the case, is `case_not_correctable`. Not a signed act: it posts nothing itself. The firm's alone ( (q)): a client seat is 403 `authority-required`. A case the Assembler closed because its document was booked from another of its files (a scan's gate case its e-invoice booked) is 409 `case_booked_from_file`, in words naming the kind of file it was booked from.