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

Description

Orchestrates the full lifecycle of an encrypted assignment from creation through delivery confirmation. Handles encryption of sensitive payloads before persistence, dispatches assignments to peer mentors, processes delivery and read-receipt webhooks, and schedules automatic reminders for uncontacted assignments.

Feature: Encrypted Assignment Dispatch

encrypted-assignment-service

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

  • Encrypt sensitive personal data using EncryptionProvider before dispatch
  • Dispatch assignment to designated peer mentor and record initial status
  • Process inbound delivery and read-receipt events and update assignment status
  • Schedule and trigger automatic reminder notifications after 10-day inactivity
  • Validate coordinator authorization before allowing access or mutation of assignments

Interfaces

createAssignment(payload: AssignmentPayload, mentorId: string): Promise<Assignment>
dispatchAssignment(assignmentId: string): Promise<DispatchResult>
handleDeliveryEvent(event: DeliveryEvent): Promise<void>
handleReadReceipt(event: ReadReceiptEvent): Promise<void>
triggerReminder(assignmentId: string): Promise<void>
revokeAssignment(assignmentId: string): Promise<void>