/** * Session Type Definitions * * Types for LiveKit session management and room connections. */ /** * Session connection state */ export type SessionState = 'idle' | 'connecting' | 'connected' | 'disconnecting' | 'disconnected' | 'error'; /** * Options for creating a new session */ export interface SessionOptions { /** * Client ID (required) - the company embedding the demo */ clientId: string; /** * Customer name for the session (optional, collected by gating form if not provided) */ customerName?: string; /** * Customer email for the session (optional, collected by gating form if not provided) */ customerEmail?: string; /** * Optional deck ID to present */ deckId?: string; /** * Session type identifier */ sessionType?: string; /** * Timeline configuration for orchestration timing */ timelineConfig?: string; /** * Use an existing deck URL instead of generating one */ useExistingDeck?: boolean; /** * Existing deck URL to use (requires useExistingDeck: true) */ deckUrl?: string; } /** * Session information returned from backend */ export interface Session { /** * Unique session ID */ sessionId: string; /** * Human-readable room name */ roomName: string; /** * LiveKit access token for customer participant */ customerToken: string; /** * LiveKit access token for voice agent */ agentToken: string; /** * LiveKit access token for screenshare bot */ screenshareToken: string; /** * LiveKit server URL (WebSocket) */ livekitUrl: string; /** * URL to the slide deck */ deckUrl?: string; /** * Current connection state */ state: SessionState; /** * Timestamp when session was created */ createdAt: Date; } /** * Backend API response from session creation */ export interface CreateSessionResponse { sessionId: string; roomName: string; customerToken: string; agentToken: string; screenshareToken: string; livekitUrl: string; deckUrl?: string; message: string; }