import type { BookingStatus } from "./state-machine.js"; export interface BookingStatusDispatchTarget { /** * Path of the verb endpoint to POST to, including `/v1/admin/bookings/:id` prefix. * Always begins with a `/`. */ path: string; /** * JSON body the server expects for the resolved verb. * * - For named verbs (`/confirm`, `/expire`, `/start`, `/complete`, `/cancel`) * this is `{ note }` when a note is provided, otherwise an empty object. * - For `/override-status` it is `{ status, reason, note? }`. When callers * do not provide a note, the dispatcher supplies a non-empty audit reason. */ body: Record; } /** * Map (currentStatus, targetStatus) → which verb endpoint to call. Lifecycle * arrows that have a named verb on the server go to that verb; everything else * (non-adjacent jumps, e.g. cancelled → confirmed for data correction) falls * through to /override-status, which requires a reason. The note text is used * as the reason when provided; otherwise a non-empty audit reason is generated. * * Framework-agnostic: returns the URL + body to send. Callers own the * transport (fetch, axios, the React hook, server-to-server scripts, etc). */ export declare function dispatchBookingStatusChange(bookingId: string, current: BookingStatus, target: BookingStatus, note?: string | null, options?: { suppressNotifications?: boolean; suppressLifecycleEvents?: boolean; }): BookingStatusDispatchTarget;