NotificationPreferencesRepository
Component Detail
Data Layer
medium complexity
mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Persistence layer that stores and retrieves notification preference records for each user. Abstracts the underlying storage mechanism, providing a clean interface for the service layer. Ensures preferences survive app restarts and are available offline when needed.
notification-preferences-repository
Sources & reasoning
Notification settings are a necessary companion to the push and scenario features documented at line 116. HLF's Phase 2 scenario-based notifications imply user control over alert frequency and channel. Blueprint marks this [v1.0], aligning with the Phase 2 placement in the source roadmap (→ v1.0).
-
docs/source/likeperson.md · line 116Oppfølging av likepersoner: 40 % var ikke fornøyd med oppfølgingen i spørreundersøkelse. Scenariobaserte push-meldinger og kalendersynkronisering.
Responsibilities
- Store notification preference records keyed by user and category
- Retrieve full preference set for a given user
- Update individual preference entries atomically
- Clear or reset preferences on user sign-out
Interfaces
findByUserId(userId: string): Promise<NotificationPreferences>
save(userId: string, preferences: NotificationPreferences): Promise<void>
updateOne(userId: string, category: string, channel: string, enabled: boolean): Promise<void>
deleteByUserId(userId: string): Promise<void>
Related Data Entities (1)
Data entities managed by this component