import type { ApiClientConfiguration, Transport } from '../lib'; import { ApiClient } from '../lib'; import type { Bounds, Coordinates } from './response.model'; export interface AutosuggestSuggestion { country: string; nearestPlace: string; words: string; distanceToFocusKm: number; rank: number; language: string; } export interface AutosuggestResponse { suggestions: AutosuggestSuggestion[]; } export declare enum AutosuggestInputType { Text = "text", VoconHybrid = "vocon-hybrid", NMDP_ASR = "nmdp-asr", GenericVoice = "generic-voice" } export interface AutosuggestOptions { input: string; nResults?: number; focus?: Coordinates; nFocusResults?: number; clipToCountry?: string[]; clipToBoundingBox?: Bounds; clipToCircle?: { center: Coordinates; radius: number; }; clipToPolygon?: Coordinates[]; inputType?: AutosuggestInputType; language?: string; preferLand?: boolean; } export declare class AutosuggestClient extends ApiClient { private lastReqOpts; protected readonly url = "/autosuggest"; protected readonly method = "get"; static init(apiKey?: string, config?: ApiClientConfiguration, transport?: Transport): AutosuggestClient; protected query(options: AutosuggestOptions): { input: string; }; protected validate(options: AutosuggestOptions): Promise<{ valid: boolean; message: string | undefined; }>; private autosuggestOptionsToQuery; /** * An analytics handler to transmit successful autosuggest selections * @param {AutosuggestSuggestion} selected * @param {AutosuggestOptions} initialRequestOptions * @return {Promise} */ onSelected(selected: AutosuggestSuggestion, initialRequestOptions?: AutosuggestOptions): Promise; /** * Searches the string passed in for all substrings in the form of a three word address. This does not validate whther it is a real address as it will return x.x.x as a result * @param {string} text * @returns {string[]} * @since 5.1.1 */ findPossible3wa(text: string): string[]; /** * Determines of the string passed in is the form of a three word address. This does not validate whther it is a real address as it returns True for x.x.x * @param {string} text * @returns {boolean} * @since 5.1.1 */ isPossible3wa(text: string): boolean; /** * Determines of the string passed in is a real three word address. It calls the API to verify it refers to an actual plac eon earth. * @param {string} text * @returns {boolean} * @since 5.1.1 */ isValid3wa(text: string): Promise; }