/** * Session Recording Wrapper * * Extends ToggleableLazyFeature to handle lazy-loading the rrweb recorder * script and delegating to the heavy LazyLoadedSessionRecording instance. * * @see docs/patterns/tracker-feature-lifecycle.md */ import type { VTilt } from "../../vtilt"; import type { VTiltConfig } from "../../types"; import type { SessionRecordingConfig, SessionStartReason } from "./types"; import { ToggleableLazyFeature } from "../../feature"; import { LazyLoadedSessionRecordingInterface } from "../../utils/globals"; export declare const LAZY_LOADING: "lazy_loading"; export type SessionRecordingStatus = "disabled" | "buffering" | "active" | "paused" | "sampled" | "trigger_pending" | typeof LAZY_LOADING; export type { LazyLoadedSessionRecordingInterface }; export declare class SessionRecordingWrapper extends ToggleableLazyFeature { readonly name = "SessionRecording"; readonly scriptName = "recorder"; constructor(instance: VTilt, config?: SessionRecordingConfig); static extractConfig(config: VTiltConfig): SessionRecordingConfig; get isEnabled(): boolean; get isStarted(): boolean; startIfEnabled(): void; startIfEnabledOrStop(trigger?: SessionStartReason): void; stop(): void; onConfigUpdate(config: VTiltConfig): void; protected _createLoaded(): LazyLoadedSessionRecordingInterface; protected _onLoaded(loaded: LazyLoadedSessionRecordingInterface, trigger?: SessionStartReason): void; get started(): boolean; get status(): SessionRecordingStatus; get sessionId(): string; stopRecording(): void; log(message: string, level?: "log" | "warn" | "error"): void; setLastHref(href: string): void; updateConfig(config: Partial): void; }