@mcmhomes/panorama-viewer
Version:
Provides React components to render panoramas.
170 lines (169 loc) • 6.18 kB
TypeScript
export function getHomeVersion(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
}): Promise<string>;
export function getHomeVersionDate(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
}): Promise<Date>;
export function getHomeRenderDate(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
}): Promise<Date>;
export function getAvailableSkusGrouped(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
styleId?: string | null | undefined;
locationId?: string | null | undefined;
}): Promise<any>;
export function getAvailableSkus(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
styleId?: string | null | undefined;
locationId?: string | null | undefined;
}): Promise<string[]>;
export function getAvailableStyleIds(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
locationId?: string | null | undefined;
}): Promise<string[]>;
export function getAvailableLocationIds(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
styleId?: string | null | undefined;
}): Promise<string[]>;
export function getDefaultSkusGrouped(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
styleId?: string | null | undefined;
locationId?: string | null | undefined;
}): Promise<any>;
export function getDefaultSkus(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
styleId?: string | null | undefined;
locationId?: string | null | undefined;
}): Promise<string[]>;
export function getDefaultStyleId(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
locationId?: string | null | undefined;
}): Promise<string>;
export function getDefaultLocationId(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
styleId?: string | null | undefined;
}): Promise<string>;
export function getCurrentSkusGrouped(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
styleId?: string | null | undefined;
locationId?: string | null | undefined;
skus?: any | null;
warnings?: boolean | null | undefined;
}): Promise<any>;
export function getCurrentSkus(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
styleId?: string | null | undefined;
locationId?: string | null | undefined;
skus?: any | null;
warnings?: boolean | null | undefined;
}): Promise<string[]>;
export function getCurrentStyleId(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
styleId?: string | null | undefined;
locationId?: string | null | undefined;
}): Promise<string>;
export function getCurrentLocationId(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
styleId?: string | null | undefined;
locationId?: string | null | undefined;
}): Promise<string>;
export function getThumbnails(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
}): Promise<ThumbnailFunctions>;
export function getNames(params: {
homeId: string;
homeVersion?: string | null | undefined;
host?: string | null | undefined;
}): Promise<NamesFunctions>;
export type ThumbnailOptions = {
/**
* Ensures the thumbnail is at least this resolution. When 0 or below, or not provided, the highest quality image is used.
*/
resolution?: number | null | undefined;
/**
* Thumbnail format preference. An array uses the first available format. If none match, falls back to the default format.
*/
format?: string | string[] | null | undefined;
/**
* If true, the thumbnail URL will be returned as a srcset string. This is useful for responsive images. If the `resolution` parameter is also provided, it will return a DevicePixelRatio srcset (1x, 2x, etc), suitable for fixed-size images. If the `resolution` parameter is NOT provided, it will return a width-based srcset (320w, 640w, etc), in that case, the corresponding `<img>` element must include a `sizes` attribute to work correctly.
*/
srcset?: boolean | null | undefined;
};
export type AvailableThumbnailFunction = () => boolean;
export type LocationThumbnailFunction = (params: {
locationId: string;
} & ThumbnailOptions) => string;
export type StyleThumbnailFunction = (params: {
styleId: string;
} & ThumbnailOptions) => string;
export type SkuGroupThumbnailFunction = (params: {
styleId: string;
groupId: string;
} & ThumbnailOptions) => string;
export type SkuThumbnailFunction = (params: {
styleId: string;
groupId: string;
sku: string;
} & ThumbnailOptions) => string;
export type ThumbnailFunctions = {
available: AvailableThumbnailFunction;
location: LocationThumbnailFunction;
style: StyleThumbnailFunction;
skuGroup: SkuGroupThumbnailFunction;
sku: SkuThumbnailFunction;
};
export type AvailableNamesFunction = () => boolean;
export type LocationNamesFunction = (params: {
locationId: string;
}) => string;
export type StyleNamesFunction = (params: {
styleId: string;
}) => string;
export type SkuGroupNamesFunction = (params: {
styleId: string;
groupId: string;
}) => string;
export type SkuNamesFunction = (params: {
styleId: string;
groupId: string;
sku: string;
}) => string;
export type NamesFunctions = {
available: AvailableNamesFunction;
location: LocationNamesFunction;
style: StyleNamesFunction;
skuGroup: SkuGroupNamesFunction;
sku: SkuNamesFunction;
};