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

Description

Resolves the geographic coordinates for an assignment target contact, bridging between the encrypted-assignment-dispatch dependency and the local coordinate format. Handles decryption of contact location fields and falls back to cached coordinates when the dispatch service is unreachable.

Feature: Assignment Matching by Geography

assignment-target-adapter

Sources & reasoning

Line 99 directly ties geographic visualization to matching and assignment dispatch (oppdragstildeling), providing the provenance for this feature as a distinct matching capability beyond simple map display. Line 358 places it in Fase 3, normalizing to v1.1. The blueprint lists this feature under Geographic Map View at [v1.1]. Kept as a separate feature from peer-mentor-map because matching logic and the dispatch integration are distinct from rendering the map layer.

Responsibilities

  • Fetch and decrypt assignment target location from dispatch service
  • Normalise location to internal Coordinates type
  • Cache resolved coordinates per assignment ID with short TTL
  • Return null with diagnostic code when location cannot be resolved
  • Log resolution failures for ops monitoring

Interfaces

resolveCoordinates(assignmentId: string): Promise<Coordinates | null>
clearCache(assignmentId: string): void
getResolutionStatus(assignmentId: string): ResolutionStatus

Related Data Entities (1)

Data entities managed by this component