feat: added api to update all notification preferences for user#35795
Merged
AhtishamShahid merged 2 commits intomasterfrom Dec 19, 2024
Merged
feat: added api to update all notification preferences for user#35795AhtishamShahid merged 2 commits intomasterfrom
AhtishamShahid merged 2 commits intomasterfrom
Conversation
fix: resolved linter errors fix: resolved linter errors fix: resolved linter errors feat: added new api to get aggregated user preferences fix: resolved linter errors fix: resolved linter errors fix: updated notification type validator fix: updated validation logic fix: updated validation and fixed unit tests fix: updated validation and fixed unit tests fix: added new cadence type fix: removed extra tests fix: resolved logical issue in email cadence fix: resolved linter errors fix: resolved none value for cadence issue
c8d7f5e to
bd70ce7
Compare
muhammadadeeltajamul
approved these changes
Dec 19, 2024
5eb865f to
3bf3f0c
Compare
Contributor
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
Contributor
|
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
Contributor
|
2U Release Notice: This PR has been deployed to the edX production environment. |
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.
Description
Added new APIs to update all user's preferences and get aggregated notification preferences.
To get Aggregated preferences use this API
http://localhost:18000/api/notifications/configurations/Response :
{ "status": "success", "message": "Notification preferences retrieved", "data": { "grading": { "enabled": true, "non_editable": {}, "notification_types": { "core": { "web": true, "push": true, "email": true, "email_cadence": "Daily" }, "ora_grade_assigned": { "web": true, "push": false, "email": true, "email_cadence": "Daily" }, "ora_staff_notification": { "web": true, "push": false, "email": false, "email_cadence": "Daily" } }, "core_notification_types": [] }, "updates": { "enabled": true, "non_editable": {}, "notification_types": { "core": { "web": true, "push": true, "email": true, "email_cadence": "Daily" }, "course_updates": { "web": true, "push": true, "email": false, "email_cadence": "Daily" } }, "core_notification_types": [] }, "discussion": { "enabled": true, "non_editable": { "core": [ "web" ] }, "notification_types": { "core": { "web": false, "push": true, "email": true, "email_cadence": "Daily" }, "content_reported": { "web": true, "push": true, "email": true, "email_cadence": "Daily" }, "new_question_post": { "web": true, "push": false, "email": false, "email_cadence": "Daily" }, "new_discussion_post": { "web": true, "push": false, "email": false, "email_cadence": "Daily" } }, "core_notification_types": [ "new_response", "response_endorsed_on_thread", "comment_on_followed_post", "response_on_followed_post", "response_endorsed", "new_comment_on_response", "new_comment" ] } } }Update API
http://localhost:18000/api/notifications/preferences/update-all/Params :
{ "notification_app":"discussions", // Required "notification_type":"new_post", // Required "notification_channel":"web", // Required if not updating cadence "value":"true", // Required if not updating cadence "email_cadence":"Daily" // Required in case updating email cadence }Ticket
https://2u-internal.atlassian.net/browse/INF-1687