Data Layer low complexity Shared Component backend
0
Dependencies
3
Dependents
1
Entities
0
Integrations

Description

Persistence layer for user-level notification preference records keyed by user ID and scenario type. Provides fast upsert semantics so a missing row is treated as opted-in by default.

Feature: Scenario-Based Engagement Push Notifications

notification-preferences-repository

Responsibilities

  • Upsert preference record for a user-scenario pair
  • Fetch all preferences for a given user
  • Return default opted-in state when no record exists

Interfaces

upsertPreference(userId, scenarioType, optedOut)
getPreferencesForUser(userId)
getPreference(userId, scenarioType)
deletePreferencesForUser(userId)

Related Data Entities (1)

Data entities managed by this component

API Contract

View full contract →
REST /api/v1/notification-preferences 7 endpoints
GET /api/v1/notification-preferences
GET /api/v1/notification-preferences/:id
POST /api/v1/notification-preferences
PUT /api/v1/notification-preferences/:id
DELETE /api/v1/notification-preferences/:id
GET /api/v1/notification-preferences/user/:user_id
+1 more