Interview Scheduling
Schedule an interview with credit reservation, frozen snapshot, and join credentials; Daily room is created when the bot starts.
Sequence
sequenceDiagram
autonumber
participant Web as Recruiter UI
participant API as Hono API
participant IntSvc as interview.service
participant Repo as interview.repo
participant Credit as LedgerCreditsProvider
participant Ledger as credit.service
participant Invite as DevInvitationProvider
participant Mongo as MongoDB
Web->>API: POST /v1/interviews
IntSvc->>Mongo: validate Position, Candidate, resume text
IntSvc->>Credit: quote(duration)
Credit->>Ledger: quoteCredits
IntSvc->>Repo: createInterview SCHEDULED + snapshot
Repo->>Mongo: insert Interview
IntSvc->>Credit: reserve(interviewId, cost)
Credit->>Ledger: reserveCredits (lots)
alt sendNotification
IntSvc->>Invite: send(joinUrl, password)
Invite-->>IntSvc: delivered false (dev log)
end
IntSvc-->>Web: 201 interviewSteps
- Recruiter schedules against an active position and candidate with parsed resume text.
- System quotes and reserves credits for the interview duration.
- Interview is saved as scheduled with hashed join token, password, and immutable snapshot.
- Optional invitation sends join URL and access password (logged in dev until email is wired).
- Credits stay reserved until completion, cancel, delete, or failed settlement.