feat: add broadcasts.cancel() method
Merged
DI
2mo ago+91+91+01234567890123456789-0-0-0123456789
Summary
- Adds
broadcasts.cancel(id), callingPOST /broadcasts/:id/cancelto cancel a queued or scheduled broadcast. - Returns a
validation_error/403 if the broadcast isdraft,sent, orfailed. - Mirrors
emails.cancel()'s shape exactly (no body, no options param) since the underlying endpoint is the same kind of simple id-only action.
Companion API docs: resend/resend-docs#(branch broadcasts-cancel, based on main).
Test plan
-
pnpm typecheckโ clean - lint (scoped to touched files โ the full repo-wide lint script chokes on committed
.nextbuild artifacts undere2e/, unrelated to this change) -
pnpm testโ 28/28 passing inbroadcasts.spec.ts(26 existing + 2 new: success case, 403 not-cancelable case)
๐ค Generated with Claude Code
Summary by cubic
Add broadcasts.cancel(id) to cancel queued or scheduled broadcasts via POST /broadcasts/:id/cancel, matching emails.cancel().
- New Features
- Cancels by ID with no body/options; returns
validation_error(403) if the broadcast isdraft,sent, orfailed. - Adds
CancelBroadcastResponsetypes and exports undersrc/broadcasts/interfaces.
- Cancels by ID with no body/options; returns