fix: better metrics for cache hit rates (#3609)
Maintain Release Merge PR / update-release-pr (push) Canceled after 0s
Notify HeyPuter / notify (push) Canceled after 0s
release-please / release-please (push) Canceled after 0s

* fix: better metrics for cache hit rates

* chore: type + docs
This commit is contained in:
Daniel Salazar
2026-08-19 11:38:14 -07:00
committed by GitHub
parent c04827fd3f
commit a552ce0b87
5 changed files with 113 additions and 23 deletions
+6 -4
View File
@@ -37,7 +37,7 @@ import * as utils from '../lib/utils.js';
* @typedef {Object} EmailSendResult
* @property {string | null} messageId First transport message id reported for this send, when available.
* @property {number} cost Total charge for this send, in microcents.
* @property {string[]} suppressed Recipients omitted because they opted out of this sender's mail.
* @property {string[]} suppressed Recipients omitted because they opted out of this app's mail.
* @property {string[]} failed Recipients whose delivery attempt failed. Everyone else got their copy —
* retry with just these addresses. A send where every delivery fails rejects instead.
*/
@@ -66,9 +66,11 @@ import * as utils from '../lib/utils.js';
* Positional form: `await puter.email.send(to, subject, body)`.
*
* Every mail automatically gets an unsubscribe / report-abuse footer.
* Recipients who unsubscribe are dropped from future sends — they come
* back in the result's `suppressed` array — and a send whose `to` list
* is entirely unsubscribed is rejected.
* Unsubscribing is per app: a recipient who opts out stops hearing from
* the app they opted out of, and still hears from the other apps the same
* account runs. Opted-out recipients are dropped from that app's future
* sends — they come back in the result's `suppressed` array — and a send
* whose `to` list is entirely opted out is rejected.
*
* Each recipient gets a private delivery. A recipient whose delivery
* fails comes back in the result's `failed` array (everyone else got