Data Model: hbf-event-publisher
Domain objects used by this service. Full schemas:
docs/domain-model.md
Objects This Service Uses
hbf-event-publisher does not depend on @helvia/hbf-core-api. It defines its own User/UserGroup DTOs and accesses hbf-core via a minimal HTTP client for auth only.
| Object | Access | Key Fields Used |
|---|---|---|
| User | reads via HTTP to hbf-core (auth only) | id, email, fullName, organizationRoles, tenantRoles, effectiveRoles |
| UserGroup | reads via HTTP to hbf-core (auth only) | id, name, organizationId, users |
Local Entities
| Entity | Table | DB | Key Fields |
|---|---|---|---|
| FlowAssociation | flow_association | MySQL | id (auto-increment integer), triggerType (enum), displayName, triggerUrl, externalId (indexed), organizationId, tenantId, activityId, implementation, triggersSuccess, triggersFailed |
| PushAssociation | push_association | MySQL | token (PK), platformUserId (indexed), isValid, platform (web/mobile), platformName, version |
Key Enums
| Enum | Values |
|---|---|
| TriggerType | livechat-request-missed, livechat-conversation-finished, survey-completed, automated-answer-triggered, chat-session-completed |
| Platform | web, mobile |
Notes
- FlowAssociation maps platform events to external webhook URLs (Power Automate flows or custom connectors).
- PushAssociation stores push notification tokens for web and mobile clients.
- Tracks success/failure counts per flow association for observability.
- Auth passthrough to hbf-core
/users/meendpoint. Does not use the hbf-core-api npm client.