@hiero-hackers/hiero-notifications - v0.1.0
    Preparing search index...

    Interface Notification<P>

    One thing worth notifying about, from any watcher. The payload is the typed detail; text/html/subject/source are the presentation the watcher already rendered, so a Delivery never needs to know what P is.

    interface Notification<P = unknown> {
        at: string;
        html?: string;
        id: string;
        payload: P;
        source: string;
        subject: string;
        text: string;
    }

    Type Parameters

    • P = unknown
    Index
    at: string

    ISO timestamp the notification fired.

    html?: string

    Optional rich body (email / an HTML webhook).

    id: string

    Stable, unique id for THIS notification — the dedupe key. Delivery is at-least-once (a crash between deliver and cursor-save re-delivers), so consumers deduplicate on id; it also travels in webhook payloads and dead-letter lines. Convention: source:subject:event-identity, e.g. account-activity:0.0.1234:0.0.99-1721300000-000000001.

    payload: P

    The typed detail. For the account watcher this is a Receipt.

    source: string

    Which watcher produced it, e.g. "account-activity", "topic-messages".

    subject: string

    What is being watched, e.g. an account id "0.0.1234" or a topic id.

    text: string

    Human-readable body (console / chat / SMS).