@suluk/cost - v0.2.0
    Preparing search index...

    Interface CostEvent

    What a single request actually cost — the rawest record, attributed all the way down.

    interface CostEvent {
        at: number;
        principal?: string;
        operation: string;
        action?: string;
        trigger?: CostTrigger;
        dedupeKey?: string;
        reconciled?: boolean;
        breakdown: { source: string; microUsd: number }[];
        totalMicroUsd: number;
    }
    Index

    Properties

    at: number

    Wall-clock ms (an input, never read ambiently — pass it in, so events are reproducible/testable).

    principal?: string

    Who incurred it (the principal/user id), if known.

    operation: string

    Which operation (the v4 by-name handle).

    action?: string

    The frontend action that triggered it (a button-click id), if the client tagged the request.

    trigger?: CostTrigger

    How this cost fired (C024; default "synchronous"). A non-sync value marks a background charge.

    dedupeKey?: string

    Dedupe id for at-least-once event delivery — two events with the same key are the SAME charge (C024).

    reconciled?: boolean

    true ⇒ totalMicroUsd is the third party's ACTUAL charge read from the event (C026), not a declared estimate.

    breakdown: { source: string; microUsd: number }[]

    Per-source breakdown (µ$).

    totalMicroUsd: number

    Total µ$ for the request.