replay-tracker
Version:
A lightweight session replay tracker for websites using rrweb
34 lines (32 loc) • 899 B
text/typescript
interface RRWebEvent {
type: number;
data?: any;
timestamp: number;
[key: string]: any;
}
interface WasabiConfig {
accessKeyId: string;
secretAccessKey: string;
endpoint: string;
bucket: string;
region?: string;
}
interface TrackerOptions {
apiKey?: string;
endpoint?: string;
sampleRate?: number;
maskText?: boolean;
wasabi?: Partial<WasabiConfig>;
autoUpload?: boolean;
debug?: boolean;
rrwebInstance?: any;
}
interface Tracker {
start(): Promise<void>;
stop(): void;
uploadToWasabi(filename?: string): Promise<string | undefined>;
getRecording(filename: string): Promise<any>;
replay(events: RRWebEvent[], container: HTMLElement, options?: any): Promise<void>;
}
declare function createTracker(opts?: TrackerOptions): Tracker;
export { type Tracker, type TrackerOptions, type WasabiConfig, createTracker };