feat(broadcasts): list filters, account-wide stats, and link clicks - #17
Merged
Merged
Conversation
Three spec changes the CLI had not caught up with. List filters (issues #4 and #11): kit broadcasts list --status <draft|scheduled|sending|completed|aborted> kit broadcasts list --sent-after <yyyy-mm-dd> --sent-before <yyyy-mm-dd> Account-wide stats (issues #7, #11, #13). The stats subcommand now takes an optional ID. With an ID it hits /broadcasts/{id}/stats as before. Without one it hits /broadcasts/stats and prints a row per broadcast, accepting --status, --sent-after, --sent-before, --include-total-count, and the pagination flags. Link clicks (issue #13): kit broadcasts clicks <id> Single-broadcast stats output gains unsubscribe_rate, progress, and the two tracking flags, which the spec documents but the CLI dropped. Tracking prints as enabled or disabled rather than as the raw *_disabled booleans. The JSON shape is unchanged. Broadcast create now parses --tag-ids and --segment-ids with parseIdList.
This was referenced Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 4 of 8. Base: #16.
What this adds
List filters:
Account-wide stats. The
statssubcommand now takes an optional ID:Without an ID it accepts
--status,--sent-after,--sent-before,--include-total-count, and the pagination flags.Link clicks:
Design notes
Single-broadcast stats output gains
unsubscribe_rate,progress, and the two tracking flags. The spec documents all four. The CLI dropped them.Tracking prints as enabled or disabled instead of as the raw
*_disabledbooleans. The JSON shape does not change, so existing scripts keep working. A test covers this.broadcasts createnow parses--tag-idsand--segment-idswithparseIdListfrom part 1.Review notes
One subcommand covers both stats endpoints. An optional argument reads better than a second subcommand, and it keeps
kit broadcasts stats <id>working exactly as before.Tests: 232 before, 264 after.
Closes #4
Closes #7
Closes #11
Part of #13
The stack
Merge from the top down. Each part builds on the one above it.
Base branch:
mainfor part 1, the previous part's branch for the rest.GitHub retargets each base to
mainas the part below it merges.