wix-style-react
Version:
wix-style-react
31 lines • 1.89 kB
TypeScript
export const BASE_ATLAS_URL: "/wix-atlas-service-web";
export default useAtlasClient;
declare function useAtlasClient({ baseUrl, token, language, locale, }?: {
baseUrl?: string | undefined;
}): {
/** callback that fetches predictions from Atlas
* @param {string} value Input text we want predictions for.
* @param {AtlasRequestOptions} requestOptions (optional) Options to customize predictions: {
* @property { filterType: "zip_code" | "country_code", filterValue: string } filterBy
(optional) filter results by country or zip code;
* @property {latitude: number, longitude: number} location
(optional) the point around which you wish to retrieve place information;
* @property {latitude: number, longitude: number} origin
(optional) the origin point from which to calculate straight-line distance to the destination;
* @property {number} radius (optional) the distance (in meters) within which to return place results;
* }
* @returns {Promise<Prediction[]>} */
fetchPredictions: (value: any, requestOptions: any) => Promise<import("@wix/ambassador-wix-atlas-service-web/types").V2Prediction[] | undefined>;
/** callback that fetches details for a place given its atlas `searchId`
* @param {string} searchId identifier for atlas prediction result we want to get additional details for
* @returns {Promise<Address>} */
getAddress: (searchId: any) => Promise<any>;
/** callback that searches for addresses matching given value
* @param {string} query Input text to search address for
* @returns {Promise<Address[]>}
*/
searchAddresses: (query: any) => Promise<(import("@wix/ambassador-wix-atlas-service-web/types").CommonAddress | undefined)[]>;
/** whether component is ready */
ready: boolean;
};
//# sourceMappingURL=useAtlasClient.d.ts.map