UNPKG

@ztimson/momentum

Version:

Client library for momentum

64 lines 1.78 kB
import { PathEventEmitter } from '@ztimson/utils'; import { Api } from './api'; export type IpTrace = { /** Ip trace target */ query: string; /** Trace result */ status: string; /** Geolocated continent */ continent: string; /** Geolocated continent shortcode */ continentCode: string; /** Geolocated country */ country: string; /** Geolocated country shortcode */ countryCode: string; /** Geolocated country region shortcode */ region: string; /** Geolocated country region */ regionName: string; /** Geolocated city */ city: string; /** Geolocated city district/suburb */ district: string; /** Geolocated postal code/zip */ zip: string; /** Geolocated latitude */ lat: number; /** Geolocate longitude */ lon: number; /** Geolocated timezone */ timezone: string; /** Geolocated timezone offset */ offset: number; /** Geolocated currency */ currency: string; /** Address provider */ isp: string; /** Registered organization */ org: string; /** AS number and organization */ as: string; /** AS organization */ asname: string; /** Cellular */ mobile: boolean; /** Known proxy, VPN or Tor exit node */ proxy: boolean; /** Known Host/Datacenter */ hosting: boolean; /** Failed trace reason */ message?: string; }; /** Audience metrics and metadata */ export declare class Analytics extends PathEventEmitter { private readonly api; constructor(api: Api | string); /** * Perform IP trace * @param {string} ip IP address to trace * @return {Promise<IpTrace>} Trace results */ ipTrace(ip: string): Promise<IpTrace>; } //# sourceMappingURL=analytics.d.ts.map