Data Layer medium complexity backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Persistence layer for per-user notification preference records. Stores category opt-ins, channel selections and quiet-hours windows keyed by user.

Feature: Notification Settings

notification-pref-store

Sources & reasoning

Notification preferences are implied by the WCAG 2.2 AA mandate (line 16) and the accessibility touch-target requirement (line 21), and required to deliver the per-scenario channel choices in notification-scenarios. As baseline privacy/UX hygiene it belongs in MVP alongside push.

  • Appen SKAL oppfylle WCAG 2.2 nivå AA som minimumskrav for alle skjermer og interaksjoner - fra dag én, for alle organisasjoner.
  • Touch targets: Minimum 24x24 CSS-piksler for alle interaktive elementer (WCAG 2.2 target size).

Responsibilities

  • Store and retrieve notification preference records by user id
  • Persist channel selections per scenario category
  • Persist quiet-hours window per user
  • Support upsert semantics so partial updates do not wipe other fields
  • Provide fast lookup for the dispatcher's pre-delivery check

Interfaces

findByUserId(userId): NotificationPreferenceRecord
upsert(userId, record): NotificationPreferenceRecord
deleteByUserId(userId): void