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

Description

Provides persistent storage and retrieval of encrypted assignments, their status history, and receipt events. All sensitive fields are stored in encrypted form and the repository enforces access scoping so coordinators can only query their own assignments. Supports efficient status-based queries for the reminder scheduler.

Feature: Encrypted Assignment Dispatch

assignment-repository

Sources & reasoning

Lines 94-95 explicitly describe Blindeforbundet's requirement for encrypted sensitive data dispatch with delivery and read receipts plus a 10-day reminder. The priority matrix (line 153) classifies this MUST for Blindeforbundet, Phase 2, which maps to target_release v1.0.

  • - **Kryptert oppdragshÃ¥ndtering:** Sende sensitive personopplysninger (navn, adresse, epikrise) til likepersoner med leveringsbekreftelse og lesebekreftelse. Statusoversikt over Ã¥pne oppdrag.
  • - Automatisk pÃ¥minnelse etter 10 dager dersom kontakt ikke er opprettet.
  • | Kryptert oppdragshÃ¥ndtering | - | - | ✓ | - | ✓ | MUST (Blindeforbundet) | 2 |

Responsibilities

  • Persist new assignments with encrypted payloads and initial status
  • Update assignment status and append timestamped status-history records
  • Query assignments by coordinator, status, and inactivity window for reminder processing
  • Store and retrieve delivery and read-receipt event records
  • Enforce row-level access control tied to coordinator identity

Interfaces

save(assignment: Assignment): Promise<Assignment>
findById(assignmentId: string): Promise<Assignment | null>
findByCoordinator(coordinatorId: string, filters: AssignmentFilters): Promise<Assignment[]>
findUncontactedOlderThan(days: number): Promise<Assignment[]>
updateStatus(assignmentId: string, event: StatusEvent): Promise<void>

Related Data Entities (1)

Data entities managed by this component