import { ServiceBookingError, ServiceBookingQueryStatus, ServiceBookingStatus, ServiceLocationType } from './enums'; import { Service } from './Service'; export interface ServicesBookingRetrieveOptions { reference: string; email: string; } export interface ServicesBookingCancelInput { reference: string; email: string; reason?: string; } export interface ServiceAvailabilityScheduleOptions { /** * Service handle or variant ID */ service?: string; /** Variants to combine */ variants?: (string | number)[]; date?: Date; agent?: string; timezone?: string; } export interface BookingAttendeeInput { variant: number; first_name: string; last_name: string; email: string; phone?: string; primary?: boolean; } export interface Bookable { id: string | number; name: string; variantId: string | number; serviceId: string | number; duration: number; seatsPerTimeSlot?: number; periodDays?: number; periodStartDate?: string; periodEndDate?: string; periodCountCalendarDays?: boolean; minimumBookingNotice?: number; afterBuffer?: number; beforeBuffer?: number; offsetStart?: number; slotInterval?: number; timezone?: string; } export interface ServiceMember { id: number; name: string; email: string; phone?: string; bio?: string; avatar?: string; timezone?: string; weekStart: number; bufferTime: number; locale?: string; timeFormat: "12h" | "24h"; away: boolean; allowDynamicBooking: boolean; allowSeoIndexing: boolean; } export interface AvailableSlot { time: string; members: string[]; } export type AvailableSlots = Record; export interface ServiceAvailabilitySchedule { provider: string; service: Service; services: Service[]; members: ServiceMember[]; slots?: AvailableSlots; multiServices: boolean; } export interface ServiceBookingInput { attendees: BookingAttendeeInput[]; guests?: string[]; successUrl?: string; cancelUrl?: string; provider: string; reschedule?: string; variants: number[]; date: Date; time: number; member?: string; timezone: string; location?: ServiceLocationType; customInputs?: any; additionalNotes?: string; } export interface ServiceBookingResponse { status: ServiceBookingQueryStatus; booking?: { reference: string; email: string; }; checkoutUrl?: string; errors: { codes: ServiceBookingError[]; messages: string[]; }; } export interface ServiceBookingCancelResponse { status: ServiceBookingQueryStatus; } export interface ServiceBookingAttendee { variant: number; first_name: string; last_name: string; email: string; phone?: string; host: boolean; } export interface ServiceBookingLocation { title: string; type: ServiceLocationType; value?: string; } export interface ServiceBooking { id: number; created_at: string; reference: string; name: string; status: ServiceBookingStatus; description?: string; start_time: string; end_time: string; attendees: ServiceBookingAttendee[]; location: ServiceBookingLocation; custom_inputs?: any; calendarLinks: Partial<{ google: string; yahoo: string; webOutlook: string; ics: string; }>; }