Summary
Refactors the notification system by replacing the is_core/core_* concept with a cleaner use_app_defaults pattern and introduces a new V3 API endpoint for notification preferences.
Key Changes
- Conceptual Simplification
Renamed is_core → use_app_defaults for clearer semantics
Renamed core_web/core_email/core_push → web/email/push
Notifications now either inherit app-level defaults or define their own settings
2. Code Cleanup
Removed redundant code across multiple files
Consolidated default preference logic into get_default_values_of_preferences()
Simplified create_notification_preference() function
Enhanced NotificationPreference model with is_grouped and config properties
3. New V3 API Endpoint
GET /api/notifications/v3/configurations/ - Retrieve preferences with cleaner structure
PUT /api/notifications/v3/configurations/ - Update individual or grouped preferences
Groups notifications using use_app_defaults under grouped_notification key
Maintains backward compatibility (V2 endpoint unchanged)
4. Improved Utilities
Refactored create_account_notification_pref_if_not_exists() to handle multiple notification types
Simplified is_notification_type_channel_editable() to remove redundant parameters
Better separation of concerns in email utilities
Testing
Added comprehensive tests for V3 API
Migration Notes
No database schema changes required
Settings override system fully compatible
V2 API remains functional for gradual frontend migration
Summary
Refactors the notification system by replacing the is_core/core_* concept with a cleaner use_app_defaults pattern and introduces a new V3 API endpoint for notification preferences.
Key Changes
Renamed is_core → use_app_defaults for clearer semantics
Renamed core_web/core_email/core_push → web/email/push
Notifications now either inherit app-level defaults or define their own settings
2. Code Cleanup
Removed redundant code across multiple files
Consolidated default preference logic into get_default_values_of_preferences()
Simplified create_notification_preference() function
Enhanced NotificationPreference model with is_grouped and config properties
3. New V3 API Endpoint
GET /api/notifications/v3/configurations/ - Retrieve preferences with cleaner structure
PUT /api/notifications/v3/configurations/ - Update individual or grouped preferences
Groups notifications using use_app_defaults under grouped_notification key
Maintains backward compatibility (V2 endpoint unchanged)
4. Improved Utilities
Refactored create_account_notification_pref_if_not_exists() to handle multiple notification types
Simplified is_notification_type_channel_editable() to remove redundant parameters
Better separation of concerns in email utilities
Testing
Added comprehensive tests for V3 API
Migration Notes
No database schema changes required
Settings override system fully compatible
V2 API remains functional for gradual frontend migration