feat: implement stubbed NotificationsService methods (#1002) - #1098
Open
Chinonso-Peter wants to merge 1 commit into
Open
feat: implement stubbed NotificationsService methods (#1002)#1098Chinonso-Peter wants to merge 1 commit into
Chinonso-Peter wants to merge 1 commit into
Conversation
Implement create, send, sendTemplated, findForUser, markRead, markManyRead, and unsubscribe with real logic backed by TypeORM repositories and PreferencesService. - create: persist notification with DTO-provided fields - send: persist + dispatch through all enabled channels via PreferencesService - sendTemplated: render template, respect unsubscribed event types, dispatch - findForUser: paginated query (already existed, kept as-is) - markRead: ownership check + persist isRead/readAt - markManyRead: bulk ownership check + bulk UPDATE - unsubscribe: delegates to PreferencesService (global or per-event-type) - Add unsubscribe method to PreferencesService - Remove all _dto: any signatures in favour of typed DTOs
|
@Chinonso-Peter Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
Author
|
@RUKAYAT-CODER review |
Contributor
|
Well done on the job done so far! |
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.
Summary
Implements all stubbed methods in
NotificationsServiceand adds the missingunsubscribemethod toPreferencesService, making the notifications API fully functional.Changes
src/notifications/notifications.service.tscreate- persists a notification with DTO-provided fieldssend- persists + dispatches through all enabled channels viaPreferencesServicesendTemplated- renders template viaNotificationTemplateService, respects unsubscribed event types, dispatches through enabled channelsmarkRead- ownership check + persistsisRead/readAtmarkManyRead- bulk ownership check + bulkUPDATEunsubscribe- delegates toPreferencesService(global or per-event-type)_dto: anyparameter types with proper DTOssrc/notifications/preferences/preferences.service.tsunsubscribe(userId, eventType)method: setsglobalUnsubscribeforalloreventFrequency[eventType] = neverAcceptance Criteria
_dto: anysignatures remainCloses #1002