Data Model: hbf-data-retention
Domain objects used by this service. Full schemas:
docs/domain-model.md
Objects This Service Uses
| Object | Access | Key Fields Used |
|---|---|---|
| Organization | reads via hbf-core-api | id, dataRetentionPeriod, auditLogsRetentionPeriod |
| Tenant | reads via hbf-core-api | id, dataRetentionPeriod |
Operations on Core Objects
| Operation | Via | Description |
|---|---|---|
| Delete organization data | hbf-core-api OrganizationsClient.deleteData() | Deletes chat-sessions, forms, subscribers, elasticsearch data |
| Delete tenant data | hbf-core-api TenantsClient.deleteData() | Same as above, scoped to tenant |
| Delete audit logs | hbf-core-api OrganizationsClient.deleteAuditLogs() | Deletes audit logs per retention policy |
| Delete attachments | AttachmentsService | Deletes file attachments for tenants with retention policies |
Notes
- No local database. All data operations are delegated to hbf-core and attachment storage.
- Runs on a configurable interval (
EXECUTION_INTERVAL_IN_HOURS). - Polls hbf-core for organizations and tenants with
dataRetentionPeriodorauditLogsRetentionPeriodset. - Retries failed deletions up to a configurable threshold (
THRESHOLD_OF_DELETION_RETIRES). - Uses hbf-core-api
HBFCoreApiclient for all interactions.