You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users should control which notifications they receive and through which channel. A user who handles checkouts daily may not want an email every time — just an in-app ping. This settings layer sits between the notification dispatcher (BE-56) and the actual delivery.
Context
Depends on BE-55 and BE-56 (notification infrastructure)
Preferences should default to all-enabled so new users get all notifications out of the box
GET /users/me/notification-preferences — returns all event types with current preference settings. If no record exists for an event type, return the default (both enabled)
PUT /users/me/notification-preferences body: [{ eventType, emailEnabled, inAppEnabled }] — upserts all preferences in a single request
Modify NotificationDispatchService from BE-56 to check preferences before dispatching: await preferenceService.shouldSend(userId, eventType, channel)
POST /users/me/notification-preferences/reset — resets all preferences to default (all enabled)
Overview
Users should control which notifications they receive and through which channel. A user who handles checkouts daily may not want an email every time — just an in-app ping. This settings layer sits between the notification dispatcher (BE-56) and the actual delivery.
Context
Acceptance Criteria
NotificationPreferenceentity:id,userId,eventType(NotificationEventfrom BE-56),emailEnabled(boolean, default true),inAppEnabled(boolean, default true),updatedAtGET /users/me/notification-preferences— returns all event types with current preference settings. If no record exists for an event type, return the default (both enabled)PUT /users/me/notification-preferencesbody:[{ eventType, emailEnabled, inAppEnabled }]— upserts all preferences in a single requestNotificationDispatchServicefrom BE-56 to check preferences before dispatching:await preferenceService.shouldSend(userId, eventType, channel)POST /users/me/notification-preferences/reset— resets all preferences to default (all enabled)