Data Layer low complexity Shared Component backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Database component managing the export_logs table, which tracks every Bufdir export job across its full lifecycle. Stores triggering user, organization, reporting period, job status, object storage path, and signed URL expiry. Shared with the mobile Bufdir Export feature since both consumers use the same backend endpoint and job tracking table.

Feature: Bufdir Export

export-logs-table

Responsibilities

  • Create and update export job records with status transitions
  • Store object storage path and signed URL expiry metadata
  • Provide paginated history queries scoped to an organization
  • Enforce foreign key relationship to bufdir_reports

Interfaces

createExportJob(orgId: string, period: DateRange, userId: string): Promise<ExportLog>
updateJobStatus(jobId: string, status: ExportStatus, meta?: Partial<ExportLog>): Promise<void>
getJobById(jobId: string): Promise<ExportLog>
listJobsByOrg(orgId: string, pagination: Pagination): Promise<ExportLog[]>