@voxket-ai/voxket-live
Version:
A React widget for embedding Voxket-powered audio/video/chat experiences.
36 lines (35 loc) • 1.09 kB
TypeScript
import { Room } from 'livekit-client';
export interface SessionLog {
timestamp: Date;
event: string;
data?: any;
sessionId?: string;
participantId?: string;
}
export interface SessionMetrics {
sessionId: string;
startTime: Date;
endTime?: Date;
duration?: number;
totalMessages: number;
connectionIssues: number;
participantCount: number;
events: SessionLog[];
}
interface UseSessionLoggingProps {
room?: Room;
onSessionEnd?: (metrics: SessionMetrics) => void;
onSessionStart?: (sessionId: string) => void;
enableConsoleLogging?: boolean;
enableLocalStorage?: boolean;
voxketSessionId?: string;
}
export declare function useSessionLogging({ room, onSessionEnd, onSessionStart, enableConsoleLogging, enableLocalStorage, voxketSessionId, }?: UseSessionLoggingProps): {
sessionMetrics: SessionMetrics | null;
sessionLogs: SessionLog[];
logEvent: (event: string, data?: any) => SessionLog;
getSessionLogs: () => any;
clearSessionLogs: () => void;
exportSessionLogs: () => void;
};
export {};