Service Layer medium complexity backend
0
Dependencies
0
Dependents
3
Entities
0
Integrations

Description

Orchestrates the generation and packaging of a Bufdir-formatted export file from a completed and reviewed report. It applies the required Bufdir submission format, delegates file persistence to storage infrastructure, and returns a download URL to the caller.

Feature: Bufdir Export

bufdir-export-service

Sources & reasoning

The source frames Bufdir reporting as a one-button export (line 46). Line 342 places export in Phase 2 alongside generation. Line 144 marks it MUST HAVE Phase 2 (v1.0). Blueprint assigns v1.0, consistent with Phase 2. Export is architecturally distinct from generation to allow preview before commit and independent audit-trail entries.

  • docs/source/likeperson.md · line 46
    Alle fire organisasjoner mottar Bufdir-tilskudd og bruker mye tid på rapportering. Ønsket er det samme: trykk på én knapp og få ut det Bufdir trenger.
  • docs/source/likeperson.md · line 342
    Bufdir-rapportering og eksport med ett klikk (kun i Admin Web Portal; mobilen bidrar med selve aktivitetsregistreringen)
  • docs/source/likeperson.md · line 144
    Bufdir-rapportering (eksport, admin) | ✓ | ✓ | ✓ | ✓ | ✓ | MUST HAVE | 2

Responsibilities

  • Retrieve reviewed report data and validate it is ready for export
  • Transform report data into the required Bufdir submission format
  • Coordinate with ExportFileStorageService to persist the generated file
  • Return a signed or direct download URL for the exported file
  • Log export events for audit purposes

Interfaces

exportReport(reportId: string): Promise<ExportResult>
getExportStatus(reportId: string): ExportStatus
getDownloadUrl(exportId: string): string