import { BiwaveEvent, BiwaveClient } from '@biwave/core'; export { BiwaveClient, UserInfo } from '@biwave/core'; /** * Biwave Stream (session replay) config, passed via `init({ stream: {...} })`. * `platform`/`capture_mode` are fixed to 'web'/'dom' for @biwave/browser — * 'wireframe'/'screenshot' are mobile-SDK capture modes, out of scope here. */ interface StreamOptions { enabled?: boolean; /** 0-1, probability a session is actively recorded+uploaded. Default 0.1. */ sessionSampleRate?: number; /** 0-1, probability a non-sampled session is kept in a ring buffer for error-triggered promotion. Default 1.0. */ errorSampleRate?: number; /** Ring buffer retention window, in seconds. Default 60. */ bufferSeconds?: number; /** Default false — text is recorded as-is (LogRocket-style; only passwords are masked). Set true to mask all text nodes (per-element opt-out via the 'biwave-unmask' class). */ maskAllText?: boolean; /** Default true — captures console/network/click/navigation as discrete, countable session events (LogRocket-style timeline). */ captureEvents?: boolean; } type StreamEndReason = 'normal' | 'crash' | 'user_optout'; /** Ends the active Stream session early, e.g. on user consent withdrawal. A no-op if Stream isn't active. */ declare function requestStreamStop(reason?: StreamEndReason): void; interface BiwaveBrowserOptions { clientId: string; endpoint?: string; environment?: string; release?: string; dist?: string; maxBreadcrumbs?: number; logBatchSize?: number; logFlushInterval?: number; logMaxMemoryEvents?: number; pulseBatchSize?: number; pulseFlushInterval?: number; pulseMaxMemoryEvents?: number; beforeSend?: (event: BiwaveEvent) => BiwaveEvent | null; /** Biwave Stream (session replay) — off by default. Lazy-loaded: apps that don't enable this never load rrweb. */ stream?: StreamOptions; } declare function init(options: BiwaveBrowserOptions): BiwaveClient; export { type BiwaveBrowserOptions, type StreamOptions, init, requestStreamStop };