/** * Hostex Pricing Ratios API types */ import { ChannelType } from './common.js'; /** * Pricing ratios query parameters — exactly one of property_id / room_type_id */ export interface PricingRatiosQueryParams { /** Id of the property to read ratios for (mutually exclusive with room_type_id) */ property_id?: number; /** Id of the room type to read ratios for (mutually exclusive with property_id) */ room_type_id?: number; } /** * Per-listing pricing ratio entry */ export interface PricingRatioChannel { /** The type of the channel */ channel_type: ChannelType; /** The channel listing id */ listing_id: string; /** Display title of the listing on the channel */ listing_title?: string; /** Pricing ratio in percent: 100 = same as base price, >100 markup, <100 discount; -1 when readonly is true (do not use for price computation) */ ratio: number; /** True when the listing's price is controlled by the channel */ readonly: boolean; } /** * Pricing ratios response data */ export interface PricingRatiosData { /** Which of property_id / room_type_id was supplied */ link_type: 'property' | 'room_type'; /** Echoes the supplied id */ link_id: number; /** One entry per OTA listing currently linked */ channels: PricingRatioChannel[]; }