feat(subscriptions): topic-level updates (PR 5/7) - #517
Merged
Conversation
Contributor
|
Review findings (1 issue): New finding posted:
|
This was referenced Jun 12, 2026
sarthak688
added a commit
that referenced
this pull request
Jun 12, 2026
…ory test Matches the parallel updateTopic error test on the same suite. Addresses review comment on PR #517. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
All findings addressed in the latest commit on this branch. Inline reply threads are resolved with commit references. |
sarthak688
force-pushed
the
feat/subscriptions-sdk
branch
3 times, most recently
from
July 9, 2026 07:15
1d382c9 to
18c7fcb
Compare
sarthak688
force-pushed
the
feat/subscriptions-sdk
branch
from
July 17, 2026 06:38
f344546 to
fa43848
Compare
Sarath1018
force-pushed
the
feat/subscriptions-sdk
branch
from
July 17, 2026 07:38
fa43848 to
12ea27d
Compare
sarthak688
force-pushed
the
feat/subscriptions-topic-updates
branch
from
July 20, 2026 05:03
3987cc2 to
67e4d40
Compare
Contributor
|
Review finding (1 new): New finding posted:
|
vnaren23
approved these changes
Jul 20, 2026
Sarath1018
reviewed
Jul 20, 2026
Collaborator
|
Remove this from PR description: |
Collaborator
|
for PR gate |
sarthak688
force-pushed
the
feat/subscriptions-topic-updates
branch
from
July 21, 2026 07:55
67e4d40 to
41e8fbc
Compare
Contributor
|
Review finding (1 new): New finding posted:
|
…egories) [internal] Adds topic- and category-scoped subscription writes. Each method takes an array of update entries, batching many subscription toggles into one request. - updateTopics: POST notificationservice_/.../UserSubscription - updateCategories: POST notificationservice_/.../UserSubscription/CategorySubscription Both methods are @internal (NotificationService is an internal scope), so no oauth-scopes.md entries. Response types live in subscriptions.types.ts and JSDoc lives only on the ServiceModel interface (inherited by the service class via `implements`, per the repo convention). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sarthak688
force-pushed
the
feat/subscriptions-topic-updates
branch
from
July 21, 2026 08:12
41e8fbc to
08dd985
Compare
Contributor
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
|
Sarath1018
approved these changes
Jul 21, 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.



PR 5/7 in the Notification SDK stack. Stacked on top of #516.
Adds the topic-scoped subscription writes. Each method takes an array of update entries, letting callers batch many subscription toggles into one request.
Methods Added
subscriptions.updateTopics()updateTopics(tenantId: string, subscriptions: TopicSubscriptionUpdate[]): Promise<SubscriptionUpdateTopicsResponse>subscriptions.updateCategories()updateCategories(tenantId: string, subscriptions: CategorySubscriptionUpdate[]): Promise<SubscriptionUpdateCategoriesResponse>Endpoints Called
updateTopics()notificationservice_/usersubscriptionservice/api/v1/UserSubscriptionNotificationServiceupdateCategories()notificationservice_/usersubscriptionservice/api/v1/UserSubscription/CategorySubscriptionNotificationServiceUPDATE_TOPICreuses the same URL asGET_ALL— POST vs GET differentiates the operation. Documented inline in the endpoint constants.updateTopicssends{ userSubscriptions: [...] };updateCategoriessends{ categorySubscriptions: [...] }.(topicId|publisherId, isSubscribed, notificationMode)triple.Example Usage
API Response vs SDK Response
updateTopics{ success: true, data: { subscriptions } }(echoes input)updateCategories{ success: true, data: { subscriptions } }(echoes input)Verification
npm run typechecknpm run lintnpm run test:unitIntegration: both
updateTopicsandupdateCategorieshave round-trip tests (flip → restore) in thedescribe.skipblock — ready to run once OAuth is wired into the integration harness (the subscription API rejects PAT auth).Files
src/utils/constants/endpoints/notification.ts(UPDATE_TOPIC,UPDATE_CATEGORY)src/models/notification/subscriptions.types.ts(TopicSubscriptionUpdate,CategorySubscriptionUpdate)src/models/notification/subscriptions.models.ts(response types + ServiceModel methods)src/services/notification/subscriptions.tstests/unit/services/notification/subscriptions.test.tstests/integration/shared/notification/subscriptions.integration.test.tstests/utils/constants/notification.ts(ERROR_SUBSCRIPTION_INVALID)PR Stack
feat/notifications-sdkfeat/notifications-mark-readfeat/notifications-deletefeat/subscriptions-sdkfeat/subscriptions-topic-updates(this PR)feat/subscriptions-publisher-updatesfeat/subscriptions-mode-reset🤖 Generated with Claude Code