/** * Enqueue for the application delivery outbox (WFT-85): validating an offered * delivery, resolving its idempotency identity, enforcing backlog capacity, * and committing the record with its indexes and fleet event. * * Enqueue is the one transition that also allocates: it advances the outbox * header's sequence and open count in the same conditional batch as the record * itself, so backlog accounting can never drift from the records it describes. * * @module core/outbox-enqueue */ import type { ApplicationDeliveryAdmission, ApplicationDeliveryInput, OutboxCapacity } from './outbox-contract.ts'; import { type OutboxRuntime } from './outbox-internals.ts'; /** Backlog accounting, shared by enqueue rejection and the public `capacity()`. */ export declare function capacityOf(runtime: OutboxRuntime, open: number, enqueued: number): OutboxCapacity; /** * Offer a delivery to the outbox. * * An exact retry of the same idempotency identity returns the original * receipt. Reusing the key with a different destination, kind, or payload * digest returns a conflict and leaves the original untouched. A full backlog * is rejected before anything is persisted. */ export declare function enqueueDelivery(runtime: OutboxRuntime, delivery: ApplicationDeliveryInput): Promise;