Insert a new escrow row in status PENDING. Sets expiresAt to
createdAt + 10d (matches legacy behavior).
Look up a single escrow transfer by id across all customers. Returns
null when no row matches — per the repo "get returns T | null" rule, a
missing row is not a ServiceError.
Admin search across all customers. Mirrors the customer-scoped
EscrowTransferService.search shape with a plural customerIds filter.
OptionalcreatedAt?: DbTimestampCriteriaOptionalcustomerIds?: string[]OptionalexpiresAt?: DbTimestampCriteriaOptionalids?: string[]OptionalorderBy?: DbOrderByCriterion<Optionalpage?: numberDefaults to 1
OptionalpageSize?: numberDefaults to 50
OptionalrecipientId?: stringOptionalrecipientPhone?: stringOptionalsenderId?: stringOptionalstatuses?: EscrowTransferStatus[]OptionalupdatedAt?: DbTimestampCriteriaUpdate an escrow row by external id. If data.status is set, append a
dedup-aware history entry alongside the column write — workflows rely
on this to keep the audit trail in sync with the row's status.
Runs read + history-merge + write inside a single transaction with
SELECT ... FOR UPDATE so concurrent activities (e.g. an expire
workflow firing while cancel is in flight) serialize on the row and
neither history entry is silently overwritten.
No transition validation: workflows enforce ordering via the on-chain idempotency check. Service-level dedup drops consecutive identical entries.
Mutating admin operations. Used by Temporal activities + the backfill script.