import type { PostgresJsDatabase } from "drizzle-orm/postgres-js"; export interface SlotUnitAvailability { optionUnitId: string; unitName: string; occupancyMax: number | null; /** option_units.max_quantity — `null` when no cap is configured. */ initial: number | null; /** Active reservations against this unit on this slot. */ reserved: number; /** `initial - reserved`, or `null` when the pool is unlimited. */ remaining: number | null; } /** * Returns per-option-unit availability for a slot. `reserved` is derived from * `booking_items` on active bookings that point at this slot via * `metadata.availabilitySlotId` (stamped by the product→booking convert flow) * and from the corresponding `option_unit_id` column. * * Returns `null` when the slot does not exist. The slot must have an * `optionId` for per-unit breakdown to make sense; when it's absent, the * result is an empty array. */ export declare function getSlotUnitAvailability(db: PostgresJsDatabase, slotId: string): Promise;