Skip to main content

Data Model: hbf-data-retention

Domain objects used by this service. Full schemas: docs/domain-model.md

Objects This Service Uses

ObjectAccessKey Fields Used
Organizationreads via hbf-core-apiid, dataRetentionPeriod, auditLogsRetentionPeriod
Tenantreads via hbf-core-apiid, dataRetentionPeriod

Operations on Core Objects

OperationViaDescription
Delete organization datahbf-core-api OrganizationsClient.deleteData()Deletes chat-sessions, forms, subscribers, elasticsearch data
Delete tenant datahbf-core-api TenantsClient.deleteData()Same as above, scoped to tenant
Delete audit logshbf-core-api OrganizationsClient.deleteAuditLogs()Deletes audit logs per retention policy
Delete attachmentsAttachmentsServiceDeletes 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 dataRetentionPeriod or auditLogsRetentionPeriod set.
  • Retries failed deletions up to a configurable threshold (THRESHOLD_OF_DELETION_RETIRES).
  • Uses hbf-core-api HBFCoreApi client for all interactions.