UNPKG

overpoweredjs

Version:

OverpoweredJS is a browser fingerprinting API designed to identify and track browser instances. It helps website operators distinguish unique users, detect potential bots and enhance website security.

76 lines (71 loc) 1.55 kB
/* eslint-disable no-trailing-spaces */ interface BrowserTraits { type: string; browserName: string; platformName: string; modelName: string; hasCanvasNoise: boolean; isIncognito: boolean; possibleCountryCodes: string[]; isWebView: boolean; isAndroidWebView: boolean; isFakeUserAgent: boolean; isRootedDevice: boolean; } interface ResponseData { /** * [API](https://overpoweredjs.com/docs/response/clusterUUID) */ clusterUUID: string; /** * [API](https://overpoweredjs.com/docs/response/botScore) */ botScore: number; /** * [API](https://overpoweredjs.com/docs/response/browserTraits) */ browserTraits: BrowserTraits; /** * [API](https://overpoweredjs.com/docs/response/authToken) */ authToken: string; lastSeen: number; debug: { hash: string; performance: string; }; networkTraits: { ip: string; countryCode: string; isAnonymous: boolean; ipWasRecentlyMalicious: boolean; vpn: boolean; tor: boolean; }; /** * deprecated */ uniquenessScore: number; } declare module 'overpoweredjs' { const opjs: (options: { /** * API Key * * [Create an API Key](https://overpoweredjs.com/dashboard?tab=config) */ API_KEY: string; /** * API Key * * [Custom Subdomain](https://overpoweredjs.com/docs/integrations/custom-subdomain) */ ENDPOINT?: string; }) => Promise<ResponseData>; export { opjs }; } declare global { interface Window { opjs: typeof import('overpoweredjs'); } }