import type { ConversationSetupMessage } from '@repo/play-conversation-domain/src/public/services/conversation/startConversation/ConversationInputMessage'; import { type ConversationEndedBy, type ConversationId } from '@repo/play-conversation-domain/src/public/types/Conversation'; interface SetupParams { apiKey: string; agentId: string; customGreeting?: ConversationSetupMessage['customGreeting']; prompt?: ConversationSetupMessage['prompt']; continueConversation?: string; events?: ConversationSetupMessage['events']; utteranceEndThreshold?: ConversationSetupMessage['utteranceEndThreshold']; inputEncoding?: ConversationSetupMessage['inputEncoding']; inputSampleRate?: ConversationSetupMessage['inputSampleRate']; outputFormat?: ConversationSetupMessage['outputFormat']; outputSampleRate?: ConversationSetupMessage['outputSampleRate']; } interface ListenersParams { onUserTranscript?: (transcript: string) => void; onAgentTranscript?: (transcript: string) => void; onUserStartedSpeaking?: () => void; onUserStoppedSpeaking?: () => void; onAgentStartedSpeaking?: () => void; onAgentStoppedSpeaking?: () => void; onAgentDecidedToSpeak?: () => void; onHangup?: (endedBy: ConversationEndedBy) => void; onError?: (ev: ErrorDuringConversation) => void; } interface ErrorDuringConversation { description: string; isFatal: boolean; serverCode?: number; wsEvent?: Event; cause?: Error; } export interface StartConversationWithAgentParams extends SetupParams { listeners?: ListenersParams; debug?: boolean; } export interface ConversationController { conversationId: ConversationId; mute: () => void; unmute: () => void; hangup: () => void; } export declare function startConversationWithAgent({ listeners, debug, ...setupParams }: StartConversationWithAgentParams): Promise; export {};