declare enum EventType { INIT = "INIT", VIEW = "VIEW", REQUEST = "REQUEST" } interface Event$1 { event: string; projectId?: number; source?: string; ident?: number; userId?: string; sessionId?: string; device?: Device; countryCode?: string; props?: { [key: string]: string; }; nums?: { [key: string]: number; }; } interface Device { type: string; os: string; osVersion: string; browser: string; browserVersion: string; } interface Auth { jwt?: string; headers?: { [key: string]: string; }; } interface Event extends Event$1 { event: keyof typeof EventType | K; } interface DatabeatOptions { defaultEnabled?: boolean; projectId?: number; privacy?: PrivacyOptions; userIdentTracking?: boolean; strictMode?: boolean; flushInterval?: number; noop?: boolean; initProps?: () => {}; } interface PrivacyOptions { userIdHash?: boolean; userAgentSalt?: boolean; extraSalt?: string; } declare enum Ident { ANON = 0, PRIVATE = 1, USER = 2 } declare class Databeat { private rpc; private auth; private options; private enabled; private ident; private userId; private sessionId; private allowUserTracking; private projectId; private queue; private flushTimeout; private defaultProps; private dedupeIdentKey; private dedupeViewKey; private ts?; constructor(host: string, auth: Auth | string, options?: DatabeatOptions); private init; reset(skipInit?: boolean): void; identify(userId?: string, options?: PrivacyOptions & { allowTracking?: boolean; }): void; allowTracking(allowTracking: boolean): void; track(events: Event | Event[], options?: { flush?: boolean; }): Promise; trackView(props?: { [key: string]: string; }): void; flush: () => Promise; isEnabled(): boolean; isAnon(): boolean; getIdent(): Ident; getUserId(): string; getSessionId(): string; getStorageTS(): number | undefined; enable(): void; disable(): void; private dedupedQueue; } declare const isBrowser: () => boolean; interface StorageVal { on: boolean; id: string | null; it: Ident; ut: boolean | null; ts?: number; } declare const getStorageVal: () => StorageVal | null; declare const genUserId: (seed: string, allowUserTracking: boolean, options: DatabeatOptions) => { userId: string; ident: Ident; }; declare const genSessionId: () => string; export { type Auth, Databeat, type DatabeatOptions, type Event, Ident, type PrivacyOptions, genSessionId, genUserId, getStorageVal, isBrowser };