/** * Room type-related types */ import { ChannelListing, PaginationParams } from './common.js'; import { PropertyTagRef } from './properties.js'; /** * Room type query parameters */ export interface RoomTypesQueryParams extends PaginationParams { /** Fetch a single room type by id */ id?: number; /** Filter room types attached to the given tag id */ tag_id?: number; } /** * Property reference in room type */ export interface RoomTypeProperty { /** Unique identifier for the property */ id: number; /** The title of the property */ title: string; } /** * Room type information */ export interface RoomType { /** Unique identifier for the room type */ id: number; /** Title of the room type */ title: string; /** * A list of properties associated with the room type. * The number of properties represents the maximum inventory quantity for the room type. */ properties: RoomTypeProperty[]; /** List of channels associated with the room type */ channels: ChannelListing[]; /** Tags attached to the room type */ tags?: PropertyTagRef[]; } /** * Room types response data */ export interface RoomTypesData { /** List of room types */ room_types: RoomType[]; /** Total number of room types */ total: number; } /** * Create room type parameters */ export interface CreateRoomTypeParams { /** Title of the new room type. Must be unique within the operator. */ title: string; /** Optional list of property ids to link to the new room type */ property_ids?: number[]; } /** * Create room type response data */ export interface CreateRoomTypeData { /** Unique identifier of the newly created room type */ room_type_id: number; }