import { ILogger } from '@amplitude/analytics-core'; import { TargetingParameters } from '@amplitude/targeting'; import { LoggingConfig, SessionReplayJoinedConfig, SessionReplayJoinedConfigGenerator } from './config/types'; import { CustomRRwebEvent } from './constants'; import { EventCompressor } from './events/event-compressor'; import { AmplitudeSessionReplay, SessionReplayEventsManager as AmplitudeSessionReplayEventsManager, SessionIdentifiers as ISessionIdentifiers, SessionReplayOptions } from './typings/session-replay'; import type { RecordFunction } from './utils/rrweb'; type PageLeaveFn = (e: PageTransitionEvent | Event) => void; export declare class SessionReplay implements AmplitudeSessionReplay { name: string; config: SessionReplayJoinedConfig | undefined; joinedConfigGenerator: SessionReplayJoinedConfigGenerator | undefined; identifiers: ISessionIdentifiers | undefined; eventsManager?: AmplitudeSessionReplayEventsManager<'replay' | 'interaction', string>; loggerProvider: ILogger; recordCancelCallback: ReturnType | null; eventCount: number; eventCompressor: EventCompressor | undefined; sessionTargetingMatch: boolean; private lastTargetingParams?; private lastShouldRecordDecision?; pageLeaveFns: PageLeaveFn[]; private scrollHook?; private clickHandler?; private networkObservers?; private metadata; private recordFunction; constructor(); init(apiKey: string, options: SessionReplayOptions): import("@amplitude/analytics-core").AmplitudeReturn; private teardownEventListeners; protected _init(apiKey: string, options: SessionReplayOptions): Promise; setSessionId(sessionId: string | number, deviceId?: string): import("@amplitude/analytics-core").AmplitudeReturn; asyncSetSessionId(sessionId: string | number, deviceId?: string, options?: { userProperties?: { [key: string]: any; }; }): Promise; getSessionReplayProperties(): { [key: string]: string | null; }; blurListener: () => void; focusListener: () => void; /** * This is an instance member so that if init is called multiple times * it doesn't add another listener to the page leave event. This is to * prevent duplicate listener actions from firing. */ private pageLeaveListener; evaluateTargetingAndCapture: (targetingParams: Pick, isInit?: boolean, forceRestart?: boolean) => Promise; sendEvents(sessionId?: string | number): void; initialize(shouldSendStoredEvents?: boolean): Promise; shouldOptOut(): boolean | undefined; getShouldRecord(): boolean; getBlockSelectors(): string | string[] | undefined; getMaskTextSelectors(): string | undefined; getRecordingPlugins(loggingConfig: LoggingConfig | undefined): Promise<(import("@amplitude/rrweb-types").RecordPlugin | import("@amplitude/rrweb-types").RecordPlugin)[] | undefined>; private getRecordFunction; recordEvents(shouldLogMetadata?: boolean): Promise; addCustomRRWebEvent: (eventName: CustomRRwebEvent, eventData?: { [key: string]: any; }, addStorageInfo?: boolean) => Promise; stopRecordingEvents: () => void; getDeviceId(): string | undefined; getSessionId(): string | number | undefined; flush(useRetry?: boolean): Promise; shutdown(): void; private mapSDKType; private setMetadata; private initializeNetworkObservers; } export {}; //# sourceMappingURL=session-replay.d.ts.map