Skip to content

Add App API broadcast methods#233

Merged
mike-engel merged 2 commits into
mainfrom
cdp-6269
Jul 8, 2026
Merged

Add App API broadcast methods#233
mike-engel merged 2 commits into
mainfrom
cdp-6269

Conversation

@mike-engel

@mike-engel mike-engel commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

This is the next set of the App API backfill, which adds the broadcast endpoints to APIClient.

New methods (13)

listBroadcasts, getBroadcast, getBroadcastActions, getBroadcastAction, updateBroadcastAction, getBroadcastActionLanguage, updateBroadcastActionLanguage, getBroadcastActionMetrics, getBroadcastActionMetricsLinks, getBroadcastMetrics, getBroadcastMetricsLinks, getBroadcastMessages, getBroadcastTriggers.

Assisted by AI 🤖


Note

Low Risk
Additive SDK surface and documentation with established patterns; PUT update methods are tested in unit tests only in live runs, limiting production mutation risk.

Overview
Extends APIClient with 13 broadcast App API methods (list/get broadcast, actions, localized action content, metrics, messages, and triggers), calling /broadcasts/... via the existing resourceBase('broadcasts', ...) helper.

Adds shared DeliveryState and BroadcastMessagesOptions types (transactional delivery listing now uses DeliveryState too). docs/app.md documents the new methods; test/api.ts covers URLs, query params, and validation; test/integration/live.ts adds read-only live checks (mutating action updates stay unit-tested only).

Reviewed by Cursor Bugbot for commit f952976. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 936d0f8. Configure here.

Comment thread lib/api.ts
throw new MissingParamError('broadcastId');
}

return this.request.get(`${this.resourceBase('broadcasts', broadcastId)}/actions`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing actions pagination cursor

Medium Severity

getBroadcastActions always requests /actions with no query string, while the parallel getCampaignActions accepts an optional start cursor on the same sub-resource pattern documented via resourceBase. Broadcasts with paginated action lists cannot be fetched beyond the first page.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 936d0f8. Configure here.

@mike-engel mike-engel changed the title Add App API broadcast methods (CDP-6269) Add App API broadcast methods Jul 7, 2026
@mike-engel mike-engel self-assigned this Jul 7, 2026
yegorkay
yegorkay previously approved these changes Jul 7, 2026
Base automatically changed from cdp-6268 to main July 8, 2026 07:37
@mike-engel
mike-engel dismissed yegorkay’s stale review July 8, 2026 07:37

The base branch was changed.

mike-engel and others added 2 commits July 8, 2026 09:38
Batch 5 of the App API backfill, stacked on Batch 4 (Campaigns). Adds thirteen
broadcast methods to APIClient:

- listBroadcasts / getBroadcast
- getBroadcastActions / getBroadcastAction / updateBroadcastAction
- getBroadcastActionLanguage / updateBroadcastActionLanguage
- getBroadcastActionMetrics / getBroadcastActionMetricsLinks
- getBroadcastMetrics / getBroadcastMetricsLinks
- getBroadcastMessages / getBroadcastTriggers

Reuses the shared metric types and the private resourceBase() helper introduced
in Batch 4. Adds a BroadcastMessagesOptions type.

Includes unit tests (100% coverage), live integration coverage (gated on the
existing CIO_TEST_BROADCAST_ID), and docs in docs/app.md.

Stacked on cdp-6268; rebase onto main once Batch 4 lands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
De-duplicate the delivery-state union ('failed' | 'sent' | 'drafted' |
'attempted') into an exported DeliveryState type, used by
BroadcastMessagesOptions. TransactionalDeliveriesOptions (on the separate
cdp-6267 branch) can converge on the same type once both land on main.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mike-engel
mike-engel merged commit 071725d into main Jul 8, 2026
11 checks passed
@mike-engel
mike-engel deleted the cdp-6269 branch July 8, 2026 07:41
@mike-engel mike-engel mentioned this pull request Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants