export declare interface BatchPayload { sessionId: string; batchIndex: number; visitorId: string; visitId?: string; eventCount: number; meaningful: boolean; deviceInfo?: DeviceInfo; entryUrl?: string; referrer?: string; utmParams?: Record; version?: string; sessionEnd?: boolean; exitReason?: SessionEndReason; } export declare interface ConsoleEntry { level: 'error' | 'warn'; message: string; timestamp: number; source?: string; stack?: string; } export declare interface DeviceInfo { userAgent: string; screenWidth: number; screenHeight: number; language: string; platform: string; } export declare class Flamio { private static instance; private config; private uploader; private stopRecording; private stopConsole; private stopNetwork; private stopVitals; private stopScroll; private stopNavigation; private stopVisibility; private routeSnapshotScheduler; private beforeUnloadHandler; private lastVisitTouchAt; private recordingController; private visibilityHandler; private wakeHandler; private dormant; private shedded; private debug; private privacyRules; private urlGate; private stopUrlGate; private urlRecordable; private controllerActive; private blockedLivenessAttached; private blockedLivenessHandler; private constructor(); static init(config: FlamioConfig): Flamio | null; static consent(status: 'granted' | 'denied'): void; static identify(userId: string, traits?: Record): void; static stop(): void; private startCapture; private stopCapture; private beginGatedRecording; private privacySelectors; private installUrlGate; private syncRecording; private syncBlockedLiveness; private detachBlockedLiveness; private startDomRecording; private setupRecordingController; private pauseDomRecording; private endAndSuspend; private wake; private handleShed; private touchVisitThrottled; private addInteractionListeners; private removeInteractionListeners; private attachWakeListeners; private detachWakeListeners; private setupBeforeUnload; private removeBeforeUnload; private log; } export declare interface FlamioConfig { projectKey: string; endpoint: string; /** * Optional site/release version (e.g. '1.4.2'). Attached to every session so * the dashboard can filter sitemap & analytics per version and measure * release impact. Set this at deploy time to track route/UX changes. */ version?: string; sampleRate?: number; /** * Max sessions recorded at once for this project (default 15, hard-capped at * 100 server-side). Beyond it new visitors are not recorded, protecting the * ingest servers under a traffic spike. */ maxConcurrentSessions?: number; consent?: 'granted' | 'denied' | 'wait'; maskTextContent?: boolean; /** * Client-side masking + URL gating (see README → Privacy). maskSelectors / * blockSelectors blank / omit matching elements; urlAllowlist / urlBlocklist * gate which pages record (blocklist wins; `*` is the only wildcard). */ maskSelectors?: string[]; blockSelectors?: string[]; urlAllowlist?: string[]; urlBlocklist?: string[]; checkoutEveryNms?: number; batchInterval?: number; batchMaxSize?: number; retryDelayMs?: number; debug?: boolean; } export declare interface NetworkEntry { method: string; url: string; status: number; duration: number; timestamp: number; error?: string; slow?: boolean; ttfb?: number; transferSize?: number; initiatorType?: string; } export declare interface ScrollDepthEntry { url: string; /** Deepest fraction of the page scrolled on this pageview, 0..1. */ pct: number; timestamp: number; } declare const SESSION_END_REASON: { readonly Idle: "idle"; readonly Exit: "exit"; }; declare type SessionEndReason = (typeof SESSION_END_REASON)[keyof typeof SESSION_END_REASON]; export declare interface VitalEntry { name: 'LCP' | 'INP' | 'CLS'; value: number; timestamp: number; } export { }