/** * Property-related types */ import { ChannelListing, PaginationParams } from './common.js'; /** * Property query parameters */ export interface PropertiesQueryParams extends PaginationParams { /** The id of the property */ id?: number; /** Filter properties belonging to the given group id */ group_id?: number; /** Filter properties attached to the given tag id */ tag_id?: number; } /** * A group a property belongs to */ export interface PropertyGroupRef { /** Unique identifier for the group */ id: number; /** Name of the group */ name: string; } /** * A tag attached to a property */ export interface PropertyTagRef { /** Unique identifier for the tag */ id: number; /** Name of the tag */ name: string; /** Color of the tag, in hex format (e.g. #FD587B) */ color?: string; } /** * Property information */ export interface Property { /** Unique identifier for the property */ id: number; /** Title of the property */ title: string; /** List of channels associated with the property */ channels: ChannelListing[]; /** Address of the property */ address?: string; /** Longitude of the property */ longitude?: string; /** Latitude of the property */ latitude?: string; /** IANA timezone of the property (e.g. 'America/Toronto') */ timezone?: string; /** Default check-in time (e.g. '15:00') */ default_checkin_time?: string; /** Default check-out time (e.g. '11:00') */ default_checkout_time?: string; /** Groups the property belongs to */ groups?: PropertyGroupRef[]; /** Tags attached to the property */ tags?: PropertyTagRef[]; } /** * Properties response data */ export interface PropertiesData { /** List of properties */ properties: Property[]; /** Total number of properties */ total: number; } /** * Create property parameters */ export interface CreatePropertyParams { /** Title of the new property. Must be unique within the operator. */ title: string; } /** * Create property response data */ export interface CreatePropertyData { /** Unique identifier of the newly created property */ property_id: number; }