/** * Common types shared across the Hostex API */ /** * Common response structure for all Hostex API endpoints */ export interface HostexApiResponse { /** Unique identifier for the request */ request_id: string; /** Error code. 200 indicates success */ error_code: number; /** Status message */ error_msg: string; /** Response data (present on successful requests) */ data?: T; } /** * Channel types supported by Hostex */ export type ChannelType = | 'airbnb' | 'booking.com' | 'agoda' | 'expedia' | 'vrbo' | 'trip.com' | 'booking_site' | 'tujia_intl' | 'hostex_direct' | 'tujia' | 'xiaozhu' | 'meituan_bnb' | 'meituan_hotel' | 'muniao' | 'fliggy' | 'zhukeyun' | 'tiktok' | 'xiaohongshu' | 'ctrip' | 'houfy'; /** * Channel types that can be used in API requests */ export type ChannelTypeParam = | 'airbnb' | 'booking.com' | 'agoda' | 'expedia' | 'vrbo' | 'trip.com' | 'booking_site' | 'tujia_intl' | 'houfy'; /** * The unique identifier for different channels * For example, the listing id for Airbnb is the Airbnb listing id, * and the listing id for Booking.com is the Booking.com room id - rateplan id */ export type ListingId = string; /** * Pagination parameters */ export interface PaginationParams { /** The starting point from which to begin returning results */ offset?: number; /** The maximum number of results to return. Maximum value is 100 */ limit?: number; } /** * Channel and listing identifier */ export interface ChannelListing { /** The type of the channel */ channel_type: ChannelType; /** The listing ID */ listing_id: ListingId; /** The currency code for the reservation amounts */ currency?: string; } /** * Money amount with currency */ export interface MoneyAmount { /** Currency code */ currency: string; /** Amount */ amount: number; } /** * Time with hour and minute */ export interface TimeOfDay { hour: number; minute: number; }