export declare const SEND_STARTED = "send:started"; export declare const SEND_COMPLETED = "send:completed"; export declare const QUEUE_COMPLETED = "queue:completed"; export declare const QUEUE_CONTINUED = "queue:continued"; export declare const VISITOR_TOKEN_KEY = "wt_visitor_token"; export declare const PAGE_UUID_KEY = "wt_page_uuid"; type WTConfig = { cookieOptions?: Cookies.CookieAttributes; visitorToken?: string; fetchConfig?: Omit & { headers?: Record; }; trackerDomain?: string; onError?: (payload: WTPayload, error: unknown) => void; debounce?: { min?: number; max?: number; }; }; type WTEvent = { kind?: string; category?: string; action?: string; label?: string; value?: string | number | boolean | null; page_name?: string; container?: string; position?: string | number; object_type?: string; object_name?: string; metadata?: Record; url: string; referrer: string | undefined; page_uuid: string | null; ts: number; }; export type WTEventParams = { kind?: string; category?: string; action?: string; label?: string; value?: string | number | boolean | null; pageName?: string; container?: string; position?: string | number; objectType?: string; objectName?: string; metadata?: Record; schema?: string; }; export type WTPayload = { visitor_token?: string; events: WTEvent[]; dimensions: { width: number; height: number; }; agent: string; rts: number; wvt: string | undefined; }; export declare class FailedFetchError extends Error { } export declare class WT { loading: boolean; private emitter; private wtConfig; private paramDefaults; private eventQueue; private pageUuid; private context; private processEventsDebounced; constructor(context: WTContext); initialize(config: WTConfig | ((config: WTConfig) => WTConfig)): void; getVisitorToken(): string; getUUIDToken(): string; track(kindOrParams: string | WTEventParams): void; flush(): void; clear(): void; set(defaults: WTEventParams): void; config(config: WTConfig | ((currentConfig: WTConfig) => WTConfig)): void; subscribe(eventName: string, cb: () => void): () => void; private addToQueue; private getRoot; private sendToServer; private getRequestEnvironmentArgs; private getEventEnvironmentArgs; private processEvents; private updateProcessEventsDebounced; } export declare function withContext(context: WTContext): WT; declare const _default: WT; export default _default;