@botmesh/core - v2.0.0-alpha.2
    Preparing search index...

    Interface OutboxRecord

    One journaled outbound send.

    interface OutboxRecord {
        key: string;
        chatId: string;
        causationId?: string;
        op: "send";
        content: JsonValue;
        options?: JsonValue;
        state: OutboxState;
        attempts: number;
        nextAttemptAt: number;
        leaseUntil?: number;
        owner?: string;
        fencingToken: number;
        result?: { ref: MessageRef };
        fingerprint?: string;
        previousPart?: string;
        createdAt: number;
        sentAt?: number;
        completedAt?: number;
        lastError?: OutboxError;
    }
    Index
    key: string

    Idempotency key: explicit, derived from the inbound being handled, or random.

    chatId: string
    causationId?: string

    The inbound record (or job) whose handling produced this send.

    op: "send"
    content: JsonValue

    Encoded OutboundContent (Buffers base64-encoded).

    options?: JsonValue

    Encoded SendOptions (without idempotencyKey).

    attempts: number

    Provider attempts so far.

    nextAttemptAt: number
    leaseUntil?: number
    owner?: string
    fencingToken: number
    result?: { ref: MessageRef }

    The provider's message ref, written by the same operation that sets sent.

    fingerprint?: string

    Hash of the chat + encoded content the record was journaled with (before before('send') hooks). A replay whose derived key matches but whose content differs is a new send.

    previousPart?: string

    The key of the record that must be sent before this one: set on the later parts of a split text (<key>#2 follows <key>, <key>#3 follows <key>#2…). The sweeper never sends a record while that one is still to be sent, and dead-letters it when that one is dead. A key ending in #<n> chosen by the caller has no such link.

    createdAt: number
    sentAt?: number
    completedAt?: number

    When the record reached a terminal state (sent, dead, unknown).

    lastError?: OutboxError