Interface OutboxDelivery

One event's delivery to one destination.

interface OutboxDelivery {
    id: string;
    runId: string;
    destinationRef: string;
    eventId: string;
    type: MeetingEventType;
    payload: string;
    attempts: number;
    firstAttemptAt?: number;
    nextAt: number;
    state: "pending" | "delivered" | "dead";
    purged: boolean;
    kind: "event" | "mail";
    expiresAt?: number;
}

Properties

id: string

The delivery's id.

runId: string

The run the event belongs to.

destinationRef: string

The product's reference for where it goes (a webhook registration).

eventId: string

The event the delivery carries.

The event's type; bot:purged once a purge emptied the delivery.

payload: string

The body to send; empty once a purge emptied the delivery, and empty once a mail delivery ended (delivered, dead, cancelled or expired), so a mail's body outlives no pending delivery.

attempts: number

The failed attempts so far.

firstAttemptAt?: number

When the first failed attempt was recorded; a delivery still failing a day later is given up.

nextAt: number

When the next attempt is due.

state: "pending" | "delivered" | "dead"

pending until the destination takes it, or until it is given up as dead.

purged: boolean

Set when a purge emptied the delivery.

kind: "event" | "mail"

What the delivery is: a run event to a webhook registration (event, the default), or a mail the host renders and sends (mail).

expiresAt?: number

A mail delivery's expiry: it is not due after it, and markFailed ends it dead at it. Absent on an event delivery.