Protected ReadonlycacheProtected ReadonlydbStaticinstanceThe process default: built from each dependency's own instance().
Optionaldata?: Omit<OptionalonCancelled?: "return" | "recreate"What to do when the key already resolves to a CANCELLED deposit. A live deposit under the key is returned idempotently on both.
"return" (default) hands back the terminal row. The public accept
path takes a customer-supplied key, and idempotency there means the
same key always answers the same thing."recreate" inserts a fresh deposit and leaves the cancelled row as
history. Only the processFromBankTransaction rails ask for this,
where the key is a bankTransactionId and a re-drive means "process
this credit", not "give me the previous answer". Throws
DepositCancelledAfterMintError when the dead deposit already minted.Reviving a cancelled deposit is not one of the modes: the Green Dot
AUTH arm of the consumption drain does that itself, where the
authorisation sequence it belongs to is readable.
Optionaltx?: PgAsyncTransaction<NodePgQueryResultHKT, EmptyRelations>Every deposit on an ACH batch with its status, read from the database.
Batch reconciliation rewrites the credit's DEPOSIT_IDS from these, so
a cached status would put back a deposit that has cancelled.
The fee transfer a deposit already recorded and when the row last changed,
read from the database, or null without the deposit. The mint reads it so
a retry records its fee once.
The deposit while it is still in one of statuses, read from the
database. For a guard that acts on that status, where a stale cached
status would let it act on a deposit that has since settled or cancelled.
Clear each customer's membership tag and each record tag wherever cached,
and always this namespace's collection tag. keys are exact deletes in this
instance's key space: the only bust a null client honours.
ProtectedsearchTags for a page: the scope its query searched (each customer's membership
tag, else the collection tag), so an empty page is bustable too, plus the
records it projects and the fields that chose or ordered its rows.
OptionalbankTransactionId?: stringThe bank transaction (an ACH return) that made this transition, recorded beside reason.
OptionalexpectedStatuses?: ("PENDING" | "CANCELLED" | "PROCESSING" | "COMPLETED" | "RETURNED")[]Compare-and-set: from any other status nothing is written or published.
Optionalreason?: stringWhy the status changed, recorded on the transition and surfaced as
failure_reason. Set by operators and by the machine paths that cancel
a deposit — a CANCELLED write without one is indistinguishable from the
others on the history row.
OptionalunlessInAchFile?: booleanRefuse while the deposit's ACH batch is on an unarchived file, whose NACHA contents already carry its entry. Checked under locks file creation waits on.
StaticadminThe key get reads through on the admin surface: { ids: [id], includeHistory, pageSize: 1 } plus search's page default. Writers pass
both includeHistory variants so read-after-write holds under a null client.
Owns
deposit-search.DepositAdminServiceis the only deposit writer; a deposit row embeds its quote, so quote writers bust it through DepositQuoteCache.