export declare const LOCATION_ORACLE_URL = "https://cdn.optimizely.com/geo4.json"; /** * @typedef {Object} LocationResponse * @property {String} ip * The IP address whose location was resolved. * @property {Geolocation} location * Geolocation data for `ip`. */ export type LocationResponse = { ip: string; location: Geolocation; }; /** * A record of geolocation data, sourced from Akamai EdgeScape. * See https://developer.akamai.com/edgescape * @typedef {Object} Geolocation * * @property {String} continent * EdgeScape's two-letter continent code * @property {String} country * ISO-3166's two-letter country code * @property {String} region * ISO-3166's two-letter code for a country subdivision * (e.g., state, province, region) * @property {String} city * EdgeScape's name for a nearby city */ export type Geolocation = { continent: string; country: string; region: string; city: string; dma: string; }; /** * @param {String} ip * The IP address to resolve to a geolocation. * @returns {Promise.} * Rejects in the event of a cache miss followed by a failed subrequest to * resolve geolocation. Fulfills otherwise, with either a cached value or a * fresh one. * * Also includes a Symbol(CacheAccessId) property, which can be used to look up * information about the underlying cache access. */ export declare function getByIp(ip: string): Promise; declare const _default: { getByIp: typeof getByIp; }; export default _default;