Notification Preferences Repository
Component Detail
Data Layer
low complexity
backend
0
Dependencies
3
Dependents
1
Entities
0
Integrations
Description
Data access layer for the notification_preferences table, which has a one-to-one relationship with users. Handles create-on-first-access semantics and exposes typed read/write operations for category-channel preference pairs.
notification-preferences-repository
Responsibilities
- Read full preference record for a user, creating default row if absent
- Update individual category-channel flags
- Support bulk reads for notification dispatch filtering
Interfaces
findByUserId(userId: String): Future<NotificationPreferences?>
upsert(preferences: NotificationPreferences): Future<void>
updateField(userId: String, category: String, channel: String, enabled: bool): Future<void>
getEnabledChannels(userId: String, category: String): Future<List<String>>
Relationships
Dependents (3)
Components that depend on this component
Related Data Entities (1)
Data entities managed by this component