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

Description

Backend service that orchestrates the generation of accounting export files in CSV or provider-specific formats. Coordinates with the accounting API and expense approval queue to retrieve approved expense data, applies formatting rules, and delegates file persistence to ExportFileStorageService.

Feature: Accounting Export

accounting-export-service

Sources & reasoning

The same Fase 3 roadmap entry (line 354) and accounting system requirements (line 72) motivate a manual export interface alongside the automated API. A UI-driven export is needed for reconciliation, audit fallback, and organizations not yet configured for live sync. Fase 3 maps to v1.1.

  • docs/source/likeperson.md · line 72
    API-integrasjon mot regnskapssystem (Xledger for Blindeforbundet, Dynamics-portal for HLF).
  • docs/source/likeperson.md · line 354
    Regnskapsintegrasjon (Xledger for Blindeforbundet, Dynamics accounting for HLF)

Responsibilities

  • Fetch approved expense records from accounting-api within the specified date range
  • Transform and format expense data into CSV or provider-specific export formats
  • Delegate generated file storage to ExportFileStorageService and return download references
  • Record export operations with metadata for audit and reconciliation tracking
  • Validate export parameters and enforce authorization for admin-only access

Interfaces

generateExport(orgId: string, dateRange: DateRange, exportType: ExportType): ExportJob
getExportStatus(exportId: string): ExportStatus
listExports(orgId: string, filters: ExportFilters): ExportRecord[]
getDownloadUrl(exportId: string): string