Notifications
Publishes and reads notifications and subscribes to real-time notification streams.
📄️ Publish Notification
Publish a notification. Resolves recipients (4-predicate union) and writes one event + N delivery rows + pg_notify per in_app user in a single PG transaction. Empty recipients → 422.
📄️ Mark Notification Read
Mark the caller's in-app notification as read. The API returns `404` both when the delivery is missing and when it belongs to another user.
📄️ Stream Notifications
Open a server-sent event stream that replays in-app notifications after `Last-Event-ID` and then delivers new notifications. If delivery is interrupted, reconnecting resumes through the replay phase.