/** * Availability-related types */ /** * Availability for a specific date */ export interface Availability { /** The date (YYYY-MM-DD) */ date: string; /** Whether the date is available */ available: boolean; /** Remarks for the date */ remarks: string; } /** * Property availability */ export interface PropertyAvailability { /** The unique identifier for the property */ id: number; /** A list of availability objects */ availabilities: Availability[]; } /** * Availabilities query parameters */ export interface AvailabilitiesQueryParams { /** Property IDs (comma-separated or array). Max 100 properties */ property_ids: string | number[]; /** Start date (YYYY-MM-DD, within 1 year from now) */ start_date: string; /** End date (YYYY-MM-DD, within 3 years from now) */ end_date: string; } /** * Availabilities response data * Note: OpenAPI spec has inconsistency - required field is "properties" * but schema defines field as "listings". We support both for safety. */ export interface AvailabilitiesData { /** List of property availabilities (per schema definition) */ // listings?: PropertyAvailability[]; /** List of property availabilities (per required field) */ properties?: PropertyAvailability[]; } /** * Update availabilities parameters */ export interface UpdateAvailabilitiesParams { /** Property IDs to update */ property_ids: number[]; /** Start date (YYYY-MM-DD). Either this+end_date OR dates must be provided */ start_date?: string; /** End date (YYYY-MM-DD). Either this+start_date OR dates must be provided */ end_date?: string; /** List of specific dates (YYYY-MM-DD). Either this OR start_date+end_date must be provided */ dates?: string[]; /** Availability status (true = available, false = unavailable) */ available: boolean; }