import type { AgentControls, CaptureMode } from '../context/LiveAgentContext'; import type { Message } from '../types'; export type AuthedFetch = (input: string, init?: RequestInit) => Promise; interface LiveKitConnection { livekitUrl: string; token: string; } interface UseSessionParams { captureMode?: CaptureMode | undefined; authToken?: string | undefined; appKey?: string | undefined; getUserToken?: (() => Promise) | undefined; userToken?: string | undefined; onStart?: () => void; onStartError?: () => void; onDisconnect?: () => void; } export interface StartSessionOptions { agentId: string; agentControls?: AgentControls | undefined; existingSessionId?: string | undefined; adoptionGoalId?: string | undefined; } export declare function useSession({ captureMode, authToken, appKey, getUserToken, userToken, onStart, onStartError, onDisconnect, }: UseSessionParams): { connection: LiveKitConnection | null; shouldConnect: boolean; isStarting: boolean; isDisconnecting: boolean; error: string; errorCode: number | null; startSession: ({ agentId, agentControls, existingSessionId, adoptionGoalId }: StartSessionOptions) => Promise; pauseSession: () => Promise; disconnect: () => Promise; isPaused: boolean; isPausing: boolean; pauseTimeoutSeconds: number | null; historyMessages: Message[]; pendingScreenStream: MediaStream | null; bearerToken: string | null; authedFetch: AuthedFetch; authFailed: boolean; }; export {};