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

Description

Handles business logic for confidentiality declaration lifecycle, including determining when a declaration is required, submitting new declarations, and verifying that a valid declaration exists before expense persistence. Acts as the intermediary between UI interactions and the repository layer.

Feature: Confidentiality Declarations

confidentiality-service

Sources & reasoning

Line 71 explicitly lists driver honoraria and confidentiality declarations as a Blindeforbundet requirement within the expense registration flow. The parent area is Fase 2 in the priority matrix at line 148, mapping to v1.0. The feature is compliance-driven, not optional UX.

Responsibilities

  • Evaluate whether a given expense type requires a declaration
  • Submit a new declaration with timestamp, user reference, organization, and declaration type
  • Verify the presence of a valid existing declaration for a user before allowing expense save
  • Expose declaration requirement check as a server-enforced gate independent of client flow

Interfaces

requiresDeclaration(expenseType: ExpenseType): boolean
submitDeclaration(userId: string, orgId: string, declarationType: DeclarationType): Promise<Declaration>
hasValidDeclaration(userId: string, declarationType: DeclarationType): Promise<boolean>
getDeclarationHistory(userId: string): Promise<Declaration[]>

Related Data Entities (1)

Data entities managed by this component