feat(subscriptions): publisher/group-level updates (PR 6/7) - #518
Open
sarthak688 wants to merge 1 commit into
Open
feat(subscriptions): publisher/group-level updates (PR 6/7)#518sarthak688 wants to merge 1 commit into
sarthak688 wants to merge 1 commit into
Conversation
This was referenced Jun 12, 2026
Contributor
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
1 similar comment
Contributor
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
Contributor
|
in PR description u mentioned docs/oauth scopes have also changed but i dont see it , is that part of another dependent PR? |
sarthak688
force-pushed
the
feat/subscriptions-topic-updates
branch
3 times, most recently
from
July 21, 2026 08:12
41e8fbc to
08dd985
Compare
…ers, updateTopicGroups) [internal] Adds publisher-level opt-in/out and topic-group subscription writes. Each method takes an array of update entries, batching many toggles into one request. - updatePublishers: POST notificationservice_/.../UserSubscription/PublisherSubscription - updateTopicGroups: POST notificationservice_/.../UserSubscription/TopicGroupSubscription 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). Entity scoping uses a dedicated SubscriptionEntityUpdate input type so callers only supply id/type/isSubscribed rather than server-resolved discovery fields. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sarthak688
force-pushed
the
feat/subscriptions-publisher-updates
branch
from
July 22, 2026 06:15
6544536 to
71115d6
Compare
Contributor
|
Review summary: posted 1 new finding — |
Sarath1018
approved these changes
Jul 28, 2026
| }); | ||
| }); | ||
|
|
||
| describe('updateTopicGroups', () => { |
Contributor
There was a problem hiding this comment.
unit test lacks entities-scoping coverage
Contributor
|
plz address claude comment |
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 6/7 in the Notification SDK stack. Stacked on top of #517.
Adds the two broader-scope subscription writes — publisher-level opt-in/out and topic-group entity scoping.
Methods Added
subscriptions.updatePublisher()updatePublisher(tenantId: string, subscriptions: PublisherSubscriptionUpdate[]): Promise<SubscriptionUpdatePublisherResponse>subscriptions.updateTopicGroup()updateTopicGroup(tenantId: string, subscriptions: TopicGroupSubscriptionUpdate[]): Promise<SubscriptionUpdateTopicGroupResponse>Endpoints Called
updatePublisher()notificationservice_/usersubscriptionservice/api/v1/UserSubscription/PublisherSubscriptionNotificationServiceupdateTopicGroup()notificationservice_/usersubscriptionservice/api/v1/UserSubscription/TopicGroupSubscriptionNotificationServicepublisherID(sic), notpublisherId. The SDK's public surface uses the clean spelling; the rename happens at send time insideupdatePublisher.updatePublishersupports optional entity scoping (e.g. opt in for two specific folders only);updateTopicGroupalways scopes a named topic group to a list of entities.Example Usage
Verification
npm run typechecknpm run lintnpm run test:unitIntegration:
updatePublisherround-trip — flip the user's opt-in for the first visible publisher, then restore.updateTopicGroupis unit-only because it needs a configured topic group on the test tenant.Files
src/utils/constants/endpoints/notification.ts(UPDATE_PUBLISHER,UPDATE_TOPIC_GROUP)src/models/notification/subscriptions.types.ts(PublisherSubscriptionUpdate,TopicGroupSubscriptionUpdate)src/models/notification/subscriptions.models.ts(response types + ServiceModel methods)src/services/notification/subscriptions.tstests/unit/services/notification/subscriptions.test.ts(+5 tests)tests/integration/shared/notification/subscriptions.integration.test.ts(+1 round-trip test)docs/oauth-scopes.mdPR Stack
feat/notifications-sdkfeat/notifications-mark-readfeat/notifications-deletefeat/subscriptions-sdkfeat/subscriptions-topic-updatesfeat/subscriptions-publisher-updates(this PR)feat/subscriptions-mode-reset🤖 Generated with Claude Code