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

    Function recordEventCost

    • Record a fired event's cost into a sink, deduped by its dedupeKey against seen (so at-least-once delivery can't double-charge). Returns the recorded event, or null when it was a duplicate. seen is the app's dedup store (an in-memory Set for dev; a durable KV/DO for prod).

      Parameters

      Returns Promise<CostEvent | null>