Communication: hbf-notifications
1-hop view of how this service communicates with its siblings. For the full system view, see service-communication.md.
Calls Out To
| Service | Protocol | Purpose | Key calls / queues |
|---|---|---|---|
| hbf-core | HTTP via hbf-core-api SDK + got | Org lookup, user auth | OrganizationsClient.find(), GET /users/me |
Called By
| Service | Protocol | How |
|---|---|---|
| hbf-core | HTTP POST | POST /organizations/:orgId/notifications/ -- create notification (JWT auth) |
| hbf-nlp | HTTP POST | POST /organizations/:orgId/notifications/ -- training notifications (JWT auth) |
| hbf-console | SSE | GET /organizations/:orgId/notifications/events?userId= -- real-time stream (HBF auth) |
| hbf-console | HTTP | GET/PATCH for notification management |
Contracts
Inbound
POST /organizations/:orgId/notifications/-- create notification (JWT auth). Body: CreateNotificationDtoGET /organizations/:orgId/notifications/-- list paginated (HBF auth). Returns:{notifications, total, unreadNotificationCount}GET /organizations/:orgId/notifications/unread-count-- unread countPATCH /organizations/:orgId/notifications/read/:id-- mark read. Body:{userId}PATCH /organizations/:orgId/notifications/readAll-- mark all read. Body:{userId}DELETE /organizations/:orgId/notifications/:id-- deleteGET /organizations/:orgId/notifications/events-- SSE stream (HBF auth). Emits:{event: 'notification', data: Notification}
Outbound
- hbf-core: SDK and HTTP calls for org lookup and auth validation
Env vars:
CORE_URL-> hbf-coreCORE_TOKEN-> hbf-coreJWT_SECRET-> JWT validationTYPEORM_*-> MySQL
Flows Involving This Service
(Supporting service. No primary flow.)