export declare type PointTuple = [number, number]; export declare type BoundsTuple = [PointTuple, PointTuple]; export interface LatLng { lat: number; lng: number; } export interface SearchResult { x: number; y: number; label: string; bounds: BoundsTuple | null; raw: TRawResult; } export interface ProviderParams { [key: string]: string | number | boolean; } export interface ProviderOptions { params?: ProviderParams; } export declare enum RequestType { SEARCH = 0, REVERSE = 1 } export interface EndpointArgument { query: string | { [key: string]: string | number | boolean; }; type?: RequestType; } export interface SearchArgument { query: string; } export interface ParseArgument { data: TData; } export interface Provider { options: ProviderOptions; endpoint(options: EndpointArgument): string; getParamString(params: ProviderParams): string; parse(response: ParseArgument): SearchResult[]; search(options: SearchArgument): Promise[]>; } export default abstract class AbstractProvider implements Provider { options: ProviderOptions; constructor(options?: ProviderOptions); abstract endpoint(options: EndpointArgument): string; abstract parse(response: ParseArgument): SearchResult[]; getParamString(params?: ProviderParams): string; getUrl(url: string, params?: ProviderParams): string; search(options: SearchArgument): Promise[]>; }