interface SchedulingService { id: string; name: string; description?: string | null; duration_minutes: number; buffer_before_minutes?: number | null; buffer_after_minutes?: number | null; price_cents?: number | null; color?: string | null; category?: string | null; active?: boolean; sort_order?: number; created_at?: string; updated_at?: string; } interface SchedulingResource { id: string; name: string; bio?: string | null; photo_url?: string | null; email?: string | null; google_calendar_id?: string | null; timezone?: string | null; active?: boolean; sort_order?: number; created_at?: string; updated_at?: string; } interface SchedulingResourceServiceLink { resource_id: string; service_id: string; created_at?: string; } interface SchedulingWorkingHours { id: string; resource_id: string | null; day_of_week: number; start_time: string; end_time: string; created_at?: string; updated_at?: string; } interface SchedulingTimeOff { id: string; resource_id: string | null; starts_at: string; ends_at: string; reason?: string | null; created_at?: string; updated_at?: string; } type SchedulingBookingStatus = 'confirmed' | 'cancelled' | 'completed' | 'no_show'; interface SchedulingBooking { id: string; service_id: string; resource_id: string; customer_name: string; customer_email: string; customer_phone?: string | null; notes?: string | null; starts_at: string; ends_at: string; status: SchedulingBookingStatus; google_event_id?: string | null; reschedule_token?: string | null; created_at?: string; updated_at?: string; } type SchedulingVerticalPreset = 'salon' | 'generic' | 'dentist' | 'tutor' | 'yoga'; interface SchedulingSettings { id: number; timezone: string; slot_granularity_minutes: number; min_lead_time_minutes: number; max_advance_days: number; cancellation_window_hours: number; vertical_preset: SchedulingVerticalPreset; labels: Record; updated_at?: string; } interface SchedulingSlot { start: string; end: string; resource_id: string; } interface SchedulingBookingDetails { customer_name: string; customer_email: string; customer_phone?: string; notes?: string; } interface SchedulingConfirmedBooking { id: string; reschedule_token?: string | null; calendar_event_link?: string | null; googleSkipped?: boolean; } type SchedulingState = { status: 'idle'; } | { status: 'service_selected'; service: SchedulingService; } | { status: 'resource_selected'; service: SchedulingService; resource: SchedulingResource | null; } | { status: 'slot_selected'; service: SchedulingService; resource: SchedulingResource | null; slot: SchedulingSlot; } | { status: 'details_filled'; service: SchedulingService; resource: SchedulingResource | null; slot: SchedulingSlot; details: SchedulingBookingDetails; } | { status: 'submitting'; service: SchedulingService; resource: SchedulingResource | null; slot: SchedulingSlot; details: SchedulingBookingDetails; } | { status: 'confirmed'; service: SchedulingService; resource: SchedulingResource | null; slot: SchedulingSlot; details: SchedulingBookingDetails; booking: SchedulingConfirmedBooking; } | { status: 'error'; error: string; }; type Service = SchedulingService; type Resource = SchedulingResource; type Slot = SchedulingSlot; type BookingDetails = SchedulingBookingDetails; interface SchedulingCalendarSummary { id: string; summary: string; primary?: boolean; backgroundColor?: string; foregroundColor?: string; accessRole?: string; } interface SchedulingMyBookingRow { id: string; service_id: string; service_name: string; resource_id: string; resource_name: string; starts_at: string; ends_at: string; status: SchedulingBookingStatus | string; notes: string | null; reschedule_token: string | null; manage_url: string | null; google_event_id?: string | null; created_at?: string | null; } export type { BookingDetails, Resource, SchedulingBooking, SchedulingBookingDetails, SchedulingBookingStatus, SchedulingCalendarSummary, SchedulingConfirmedBooking, SchedulingMyBookingRow, SchedulingResource, SchedulingResourceServiceLink, SchedulingService, SchedulingSettings, SchedulingSlot, SchedulingState, SchedulingTimeOff, SchedulingVerticalPreset, SchedulingWorkingHours, Service, Slot };