ConfidentialityService
Component Detail
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.
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.
-
docs/source/likeperson.md · line 71Sjåfærhonorarer og taushetseerklæringer for sjåfører (Blindeforbundet).
-
docs/source/likeperson.md · line 148Reiserefusjon / utleggsregistrering | - | - | ✓ | ✓ | ✓ | SHOULD HAVE | 2
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[]>