feat(broadcasts): add recipients command

Merged
DI
2mo ago
+451-0

Adds `resend broadcasts recipients ` for GET /broadcasts/{id}/recipients.

Tests: 1114 passed. Lint/typecheck clean.


Summary by cubic

Adds resend broadcasts recipients <id> to list a broadcast’s recipients by event type, enabling recipient inspection that was previously not possible. Uses resend 6.22.0 to call broadcasts.recipients().

  • Flags: --type is required (non-interactive) with sent|delivered|opened|clicked|bounced|complained|unsubscribed|suppressed. Optional --email (substring filter) and --bounce-type (permanent|transient|undetermined, only meaningful with --type bounced).
  • Pagination and UX: supports --limit (1–100, default 20), --after, --before. Interactive mode prints a table and pagination hints; hints do not shell-quote --email. Table renders missing counts as -.
  • Output and docs/tests: non-interactive returns the JSON list (type-specific fields like count, bounce_type, clicked_links). Adds docs and tests for validation, pagination, and SDK errors. Note: responses may be cached for up to 15 minutes.