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

Description

Backend service that handles reactivation of a paused peer mentor account. Validates blocking conditions, flips the mentor's status back to active, restores them to matching and roster pools, and notifies the coordinator of the change.

Feature: Resume Function

resume-service

Sources & reasoning

Resume is the mandatory inverse half of the pause lifecycle called out for Phase 2 / Core Product. Source ties pause to coordinator notification and to certification (HLF), so resume must validate certification before reactivation.

  • Pausefunksjon for likepersoner (NHF + HLF + Barnekreftforeningen). Likepersoner skal kunne sette seg på pause (midlertidig deaktivering) uten å melde seg ut.
  • Pausefunksjon og bulkregistrering for koordinatorer

Responsibilities

  • Validate that the mentor is currently paused and eligible to resume
  • Check blocking conditions such as unexpired certification before allowing resume
  • Update mentor status to active and restore inclusion in matching and assignment dispatch
  • Emit a coordinator notification when a mentor resumes
  • Return a clear, structured error when resume is not allowed

Interfaces

checkResumeEligibility(mentorId): ResumeEligibility
resumeMentor(mentorId): ResumeResult
notifyCoordinatorOfResume(mentorId): void