/** * When true, the booking-requests domain is served by the in-memory mock (`apis/mockApi.ts`) behind the * `BookingRequestsApi` seam. * * **Mock is primary this phase.** The b8 endpoints are live server-side, but every *input* to a request * — the nurse (search, f6), the patient (patients, f2), the address (addresses, f3) — is itself served by * a **mock-primary** client domain today, so a real `booking_requests/create` would reference ids that * exist only in those in-memory stores. Running the whole flow end-to-end (create → nurse inbox → accept * → the customer's C5 flips → expiry) therefore needs a mock that shares the same session state. The mock * drives exactly that. Additionally the contract DTO omits the variant price the summary card renders * (REQ-013). Flip to `false` once the upstream domains are live and REQ-013 lands — no hook/component * change (see `dev/shared-working-context/reports/frontend-phase-7-report.md`). */ export const USE_BOOKING_REQUESTS_MOCK = false; /** * The customer's C5 and the nurse inbox **poll** while a request is non-terminal so a transition * (accept / reject / expire) surfaces without a manual refresh; polling **stops** on a terminal/`converted` * status (see the hooks' `refetchInterval` guard). 15s balances freshness against request volume. */ export const BOOKING_REQUEST_POLL_MS = 15 * 1000; /** A single request is cheap and changes only on the other party's action — a short stale window. */ export const BOOKING_REQUEST_STALE_TIME = 10 * 1000; export const BOOKING_REQUEST_GC_TIME = 5 * 60 * 1000; /** api-conventions default/max page sizes (max 100 server-side); an inbox page. */ export const BOOKING_REQUEST_PAGE_SIZE = 20; /** `customerNotes` limit (contract: ≤ 1000) — enforced client-side before the CTA. */ export const CUSTOMER_NOTES_MAX_LENGTH = 1000; /** `nurseRejectionReason` limit (contract: ≤ 500) — enforced client-side in the reject dialog. */ export const REJECTION_REASON_MAX_LENGTH = 500; /** * Mock-only deadline windows. The **payment** window is contract-accurate (30 min); the **response** * window is a demo-shortened stand-in for the server's real 24h so a session can observe the * `expired_no_response` terminal path. Neither is used on the real path — the server freezes the true * deadlines from `IPlatformConfig`. Documented in the phase report + mocks note. */ export const MOCK_RESPONSE_DEADLINE_MINUTES = 30; export const MOCK_PAYMENT_DEADLINE_MINUTES = 30;