Natzar Partner API Reference - v1.0.0
    Preparing search index...

    Type Alias TelehealthAppointmentState

    TelehealthAppointmentState:
        | { phase: "early"; opensAt: IsoDateTime; startsAt: IsoDateTime }
        | { phase: "waiting"; startsAt: IsoDateTime; otherSidePresent: false }
        | { phase: "connecting"; startsAt: IsoDateTime; otherSidePresent: true }
        | { phase: "in_progress"; startsAt: IsoDateTime | null }
        | { phase: "missed"; startsAt: IsoDateTime }
        | { phase: "closed"; status: TelehealthStatus }

    Where a BOOKED appointment stands for the physician who opened it — the state of POST /v1/telehealth-consults/{id}/ready. Discriminate on phase; "the other side" is the patient.

    • early — the waiting room has not opened yet (it does at opensAt).
    • waiting — the physician is present, the patient is not yet.
    • connecting — both sides present; the call is being activated (the next read is in_progress with a grant).
    • in_progress — the call is live.
    • missed — the appointment window closed without a call.
    • closed — the consult is in a terminal state (status says which).