feat: add emails metrics command
Merged
DI
2mo ago+350+350+012345678901234567890123456789-1-1-0123456789
Adds resend emails metrics for account-level email metrics โ period/domain/email/broadcast dimensions, domain_id/email_id/broadcast_id filters (broadcast and email mutually exclusive), all granularities.
Mirrors https://github.com/resend/resend-node/pull/1079.
Summary by cubic
Adds resend emails metrics to fetch account-level email metrics. Previously there was no metrics command; now users can query totals and optional breakdowns, with JSON in non-interactive mode and readable tables in interactive mode. Upgrades resend to 6.22.0 to enable emails.metrics.
- Wires the
metricssubcommand intoemails, updates help/examples, and documents it inskills/resend-cli/SKILL.mdandskills/resend-cli/references/emails.md. - Supports dimensions: period, domain, email, broadcast; validates
--granularityvia choices: hourly/daily/weekly/monthly. - Supports filters:
--domain-id,--email-id,--broadcast-id; enforces email vs. broadcast mutual exclusivity by option presence (explicitly empty values count) and returnsinvalid_optionswithout calling the SDK.