Communication: hbf-event-publisher
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 got) | User token validation | GET /users/me |
| Power Automate | HTTP POST | Flow trigger execution | POST to trigger URLs per FlowAssociation |
| Firebase FCM | firebase-admin SDK | Batch push notifications (up to 500 tokens) | getMessaging().sendMulticast() |
Called By
| Service | Protocol | How |
|---|---|---|
| hbf-bot | HTTP POST | POST /connectors/flows:trigger -- trigger flows |
| hbf-lcm | HTTP POST | POST /connectors/flows:trigger -- livechat flow triggers |
| hbf-lcg | HTTP POST | POST /connectors/flows:trigger -- livechat gateway flow triggers (via publisher-client.service.ts) |
| hbf-session-manager | HTTP POST | POST /connectors/flows:trigger -- session completion triggers |
Contracts
Inbound
Flow management (JWT auth):
POST /connectors/power-automate/flows/type/:type-- create flowGET /connectors/flows-- list flows (HBF auth)DELETE /connectors/flows/:flowId-- delete flow
Flow trigger (HBF auth):
POST /connectors/flows:trigger-- trigger flows
Trigger callback (JWT auth):
PATCH /connectors/triggers/:flowId-- update trigger status
Push notifications (JWT auth):
POST /push/{impl}/register-- device token registrationPOST /push/{impl}/unregister-- device token invalidationPOST /push/{impl}/send-- single pushPOST /push/{impl}/send-to-many-- multi pushPOST /push/{impl}/send-batch-- batch to single userPOST /push/{impl}/send-batch-to-many-- batch to many
Outbound
- hbf-core:
GET {HBF_CORE_URL}/users/mewith caller's Bearer token (passthrough via HBFGuard) - Power Automate:
POST {triggerUrl}with custom headers and body - Firebase FCM: multicast to device tokens
Env vars:
HBF_CORE_URL-> hbf-coreGOOGLE_APPLICATION_CREDENTIALS-> FirebaseJWT_SECRET-> JWT signing
Flows Involving This Service
- Message Processing (as trigger target)
- Live Chat Handover (as trigger target)