export interface BookingTarget { url: string; branchId: string; departmentId: string; departmentIds?: string[]; services?: string; brandId: string; } export interface BookingTime { time: string; raw: string; } export interface BookingDay { date: string; times: BookingTime[]; } export interface BookingAvailability { days: BookingDay[]; enabledDates: string[]; slotCounts: Record; first: string; last: string; } export type BookingError = { kind: 'network'; } | { kind: 'http'; status: number; } | { kind: 'payload'; }; export type BookingOutcome = { status: 'ready'; availability: BookingAvailability; } | { status: 'empty'; } | { status: 'error'; error: BookingError; } | { status: 'cancelled'; }; export interface LoadOptions { today?: string; language?: string; } export type Fetcher = (url: string, init: RequestInit) => Promise; export declare const REQUEST_DAYS = 30; export declare function parseSlot(raw: unknown): { date: string; time: string; } | null; export declare const slotValue: (raw: string) => string; export declare function parseDays(payload: unknown): BookingDay[] | null; export declare function summarise(days: BookingDay[]): BookingAvailability | null; export declare function isCompleteTarget(target: Partial | null | undefined): boolean; export declare function queryUrl(target: Partial | null | undefined, today?: string): string | null; export declare function queryUrls(target: Partial | null | undefined, today?: string): string[] | null; export declare function clearAvailabilityCache(): void; export declare function createAvailabilityLoader(fetcher?: Fetcher): { load: (target: Partial | null | undefined, options?: LoadOptions) => Promise; cancel: () => void; }; export declare function localOffset(local: string): string; export declare function slotIso(local: string, utcOffset?: string): string;