/** * Room connection details returned by the Trillet web-call endpoints and consumed * by `TrilletAgent.joinRoom`. The `connection` object is the stable contract that * both the authenticated and public endpoints return. */ interface TrilletRoomDetails { connection: { url: string; token: string; }; call_id?: string; room_name?: string; status?: string; /** * Human-facing identity of who the caller is talking to. Returned by both the * authenticated and public web-call endpoints. All three keys are always present; * any individual value may be `null`. Consumed by the widget header. */ display?: { agent_name?: string | null; call_flow_name?: string | null; workspace_name?: string | null; }; } interface CreateCallConfig { apiKey: string; agentId: string; mode?: 'voice' | 'text' | 'multimodal'; /** Multimodal only: which side the conversation starts on. */ initialModality?: 'voice' | 'text'; variables?: Record; callbackUrl?: string; /** Override the API host (defaults to https://api.trillet.ai). */ apiBaseUrl?: string; } /** * **Server-side only — requires an API key, do not call from the browser.** * * Performs the authenticated `POST /v1/api/web-call` request with the `X-API-KEY` * header and returns the room {@link TrilletRoomDetails}. Makes no LiveKit * connection, requests no microphone, and touches no browser APIs — safe to run * in Node on the customer's backend. Pass the returned `connection` object to the * browser and call `agent.joinRoom(roomDetails)` there. */ declare function createCall(config: CreateCallConfig): Promise; export { type CreateCallConfig, type TrilletRoomDetails, createCall };