import type { LonLatInput } from '@conveyal/lonlat'; declare type Point = { x: number; y: number; }; declare type Boundary = { rect: { maxLat: number; maxLon: number; minLat: number; minLon: number; }; }; declare type BaseQuery = { clientId?: string; clientSecret?: string; url?: string; }; declare type SuggestOption = { isCollection: boolean; magicKey: string; text: string; }; /** * Search for and address using * ESRI's {@link https://developers.arcgis.com/rest/geocode/api-reference/geocoding-suggest.htm|suggest} * service. This service does not return geojson, instead it returns the list * of address suggestions and corresponding magicKeys * * @param {Object} $0 * @param {string} [$0.clientId] * @param {string} [$0.clientSecret] * @param {Object} [$0.boundary] * @param {Object} [$0.focusPoint] * @param {string} $0.text query text * @param {string} [$0.url] optional URL to override ESRI suggest endpoint * @return {Promise} A Promise that'll get resolved with the suggest result */ export declare function autocomplete({ boundary, clientId, clientSecret, focusPoint, text, url }: BaseQuery & { boundary?: Boundary; focusPoint?: Point; text?: string; }): Promise<{ features: Array; query: { text: string; }; }>; /** * Bulk geocode a list of addresses using * ESRI's {@link https://developers.arcgis.com/rest/geocode/api-reference/geocoding-geocode-addresses.htm|geocodeAddresses} * service. * * Note: GeoJSON.FeatureCollection includes a features array * * @param {Object} $0 * @param {Array} $0.addresses Can be array of strings or objects. Strings can be addresses or coordinates in the form `lon,lat` * @param {string} $0.clientId * @param {string} $0.clientSecret * @param {Object} [$0.boundary] * @param {Object} [$0.focusPoint] * @param {string} [$0.url] * @return {Promise} A Promise that'll get resolved with the bulk geocode result */ export declare function bulk({ addresses, boundary, clientId, clientSecret, focusPoint, url }: BaseQuery & { addresses: Array; boundary?: Boundary; focusPoint?: Point; text?: string; }): Promise; /** * Reverse geocode using * ESRI's {@link https://developers.arcgis.com/rest/geocode/api-reference/geocoding-reverse-geocode.htm|reverseGeocode} * service. * * Note: GeoJSON.FeatureCollection includes a features array * * @param {Object} $0 * @param {string} [$0.clientId] * @param {string} [$0.clientSecret] * @param {boolean} [$0.forStorage=false] Specifies whether result is inteded to be stored * @param {{lat: number, lon: number}} $0.point Point to reverse geocode * @param {string} [$0.url] optional URL to override ESRI reverseGeocode endpoint * @return {Promise} A Promise that'll get resolved with reverse geocode result */ export declare function reverse({ clientId, clientSecret, forStorage, point, url }: BaseQuery & { forStorage?: boolean; point: LonLatInput; }): Promise; /** * Search for an address using * ESRI's {@link https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm|findAddressCandidates} * service. * * @param {Object} $0 * @param {string} [$0.clientId] * @param {string} [$0.clientSecret] * @param {Object} [$0.boundary] * @param {Object} [$0.focusPoint] * @param {boolean} [$0.forStorage=false] Specifies whether result is inteded to be stored * @param {string} [$0.magicKey] magicKey to use in searching as obtained from `suggest` results * @param {number} [$0.size=10] * @param {string} $0.text The address text to query for * @param {string} [$0.url] optional URL to override ESRI reverseGeocode endpoint * @return {Promise} A Promise that'll get resolved with search result */ export declare function search({ boundary, clientId, clientSecret, focusPoint, forStorage, magicKey, size, text, url }: BaseQuery & { boundary?: Boundary; focusPoint?: Point; forStorage?: boolean; magicKey?: string; size?: number; text?: string; }): Promise<{ features: GeoJSON.FeatureCollection; query: { text: string; }; }>; export {};