@elevenlabs/elevenlabs-js 2.5.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +1 -1
- package/Client.js +4 -4
- package/api/resources/audioIsolation/client/Client.d.ts +1 -1
- package/api/resources/audioIsolation/client/Client.js +5 -9
- package/api/resources/audioNative/client/Client.d.ts +1 -1
- package/api/resources/audioNative/client/Client.js +7 -11
- package/api/resources/conversationalAi/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/client/Client.js +11 -15
- package/api/resources/conversationalAi/conversation/AudioInterface.d.ts +44 -0
- package/api/resources/conversationalAi/conversation/AudioInterface.js +12 -0
- package/api/resources/conversationalAi/conversation/ClientTools.d.ts +60 -0
- package/api/resources/conversationalAi/conversation/ClientTools.js +132 -0
- package/api/resources/conversationalAi/conversation/Conversation.d.ts +94 -0
- package/api/resources/conversationalAi/conversation/Conversation.js +283 -0
- package/api/resources/conversationalAi/conversation/ConversationConfig.d.ts +18 -0
- package/api/resources/conversationalAi/conversation/ConversationConfig.js +16 -0
- package/api/resources/conversationalAi/conversation/DefaultAudioInterface.d.ts +63 -0
- package/api/resources/conversationalAi/conversation/DefaultAudioInterface.js +126 -0
- package/api/resources/conversationalAi/conversation/__tests__/Conversation.test.d.ts +1 -0
- package/api/resources/conversationalAi/conversation/__tests__/Conversation.test.js +358 -0
- package/api/resources/conversationalAi/conversation/events.d.ts +84 -0
- package/api/resources/conversationalAi/conversation/events.js +19 -0
- package/api/resources/conversationalAi/conversation/index.d.ts +6 -0
- package/api/resources/conversationalAi/conversation/index.js +22 -0
- package/api/resources/conversationalAi/conversation/interfaces/ConversationClient.d.ts +11 -0
- package/api/resources/conversationalAi/conversation/interfaces/ConversationClient.js +2 -0
- package/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.d.ts +12 -0
- package/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.js +13 -0
- package/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.d.ts +15 -0
- package/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.js +28 -0
- package/api/resources/conversationalAi/conversation/mocks/MockConversation.d.ts +43 -0
- package/api/resources/conversationalAi/conversation/mocks/MockConversation.js +108 -0
- package/api/resources/conversationalAi/conversation/mocks/index.d.ts +2 -0
- package/api/resources/conversationalAi/conversation/mocks/index.js +18 -0
- package/api/resources/conversationalAi/resources/agents/client/Client.d.ts +5 -5
- package/api/resources/conversationalAi/resources/agents/client/Client.js +21 -25
- package/api/resources/conversationalAi/resources/agents/client/requests/BodyCreateAgentV1ConvaiAgentsCreatePost.d.ts +1 -0
- package/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationStreamV1ConvaiAgentsAgentIdSimulateConversationStreamPost.d.ts +2 -2
- package/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationV1ConvaiAgentsAgentIdSimulateConversationPost.d.ts +2 -2
- package/api/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.d.ts +1 -0
- package/api/resources/conversationalAi/resources/agents/resources/knowledgeBase/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/agents/resources/knowledgeBase/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/agents/resources/link/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/agents/resources/link/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/agents/resources/llmUsage/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/agents/resources/llmUsage/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/agents/resources/widget/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/agents/resources/widget/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/batchCalls/client/Client.d.ts +2 -2
- package/api/resources/conversationalAi/resources/batchCalls/client/Client.js +12 -16
- package/api/resources/conversationalAi/resources/conversations/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/conversations/client/Client.js +9 -13
- package/api/resources/conversationalAi/resources/conversations/resources/audio/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/conversations/resources/audio/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/conversations/resources/feedback/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/conversations/resources/feedback/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/dashboard/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/dashboard/resources/settings/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/dashboard/resources/settings/client/Client.js +5 -9
- package/api/resources/conversationalAi/resources/knowledgeBase/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/knowledgeBase/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.js +17 -21
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunk/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunk/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/llmUsage/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/llmUsage/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/mcpServers/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/mcpServers/client/Client.js +7 -11
- package/api/resources/conversationalAi/resources/mcpServers/resources/approvalPolicy/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/mcpServers/resources/approvalPolicy/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/mcpServers/resources/toolApprovals/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/mcpServers/resources/toolApprovals/client/Client.js +5 -9
- package/api/resources/conversationalAi/resources/mcpServers/resources/tools/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/mcpServers/resources/tools/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/phoneNumbers/client/Client.d.ts +13 -13
- package/api/resources/conversationalAi/resources/phoneNumbers/client/Client.js +79 -83
- package/api/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
- package/api/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
- package/api/resources/conversationalAi/resources/secrets/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/secrets/client/Client.js +7 -11
- package/api/resources/conversationalAi/resources/settings/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/settings/client/Client.js +5 -9
- package/api/resources/conversationalAi/resources/sipTrunk/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/sipTrunk/client/Client.js +3 -7
- package/api/resources/conversationalAi/resources/tools/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/tools/client/Client.js +13 -17
- package/api/resources/conversationalAi/resources/twilio/client/Client.d.ts +1 -1
- package/api/resources/conversationalAi/resources/twilio/client/Client.js +3 -7
- package/api/resources/dubbing/client/Client.d.ts +14 -1
- package/api/resources/dubbing/client/Client.js +94 -11
- package/api/resources/dubbing/client/requests/DubbingListRequest.d.ts +26 -0
- package/api/resources/dubbing/client/requests/index.d.ts +1 -0
- package/api/resources/dubbing/index.d.ts +1 -0
- package/api/resources/dubbing/index.js +1 -0
- package/api/resources/dubbing/resources/audio/client/Client.d.ts +1 -1
- package/api/resources/dubbing/resources/audio/client/Client.js +3 -7
- package/api/resources/dubbing/resources/resource/client/Client.d.ts +1 -1
- package/api/resources/dubbing/resources/resource/client/Client.js +11 -15
- package/api/resources/dubbing/resources/resource/resources/language/client/Client.d.ts +1 -1
- package/api/resources/dubbing/resources/resource/resources/language/client/Client.js +3 -7
- package/api/resources/dubbing/resources/resource/resources/segment/client/Client.d.ts +1 -1
- package/api/resources/dubbing/resources/resource/resources/segment/client/Client.js +5 -9
- package/api/resources/dubbing/resources/resource/resources/speaker/client/Client.d.ts +1 -1
- package/api/resources/dubbing/resources/resource/resources/speaker/client/Client.js +5 -9
- package/api/resources/dubbing/resources/resource/resources/speaker/resources/segment/client/Client.d.ts +1 -1
- package/api/resources/dubbing/resources/resource/resources/speaker/resources/segment/client/Client.js +3 -7
- package/api/resources/dubbing/resources/transcript/client/Client.d.ts +1 -1
- package/api/resources/dubbing/resources/transcript/client/Client.js +3 -7
- package/api/resources/dubbing/types/DubbingListRequestDubbingStatus.d.ts +12 -0
- package/api/resources/dubbing/types/DubbingListRequestDubbingStatus.js +11 -0
- package/api/resources/dubbing/types/DubbingListRequestFilterByCreator.d.ts +12 -0
- package/api/resources/dubbing/types/DubbingListRequestFilterByCreator.js +11 -0
- package/api/resources/dubbing/types/index.d.ts +2 -0
- package/api/resources/dubbing/types/index.js +18 -0
- package/api/resources/forcedAlignment/client/Client.d.ts +1 -1
- package/api/resources/forcedAlignment/client/Client.js +3 -7
- package/api/resources/history/client/Client.d.ts +1 -1
- package/api/resources/history/client/Client.js +11 -15
- package/api/resources/index.d.ts +2 -1
- package/api/resources/index.js +3 -2
- package/api/resources/models/client/Client.d.ts +1 -1
- package/api/resources/models/client/Client.js +3 -7
- package/api/resources/pronunciationDictionaries/client/Client.d.ts +1 -1
- package/api/resources/pronunciationDictionaries/client/Client.js +11 -15
- package/api/resources/pronunciationDictionaries/resources/rules/client/Client.d.ts +1 -1
- package/api/resources/pronunciationDictionaries/resources/rules/client/Client.js +5 -9
- package/api/resources/samples/client/Client.d.ts +1 -1
- package/api/resources/samples/client/Client.js +3 -7
- package/api/resources/speechToSpeech/client/Client.d.ts +1 -1
- package/api/resources/speechToSpeech/client/Client.js +5 -9
- package/api/resources/speechToText/client/Client.d.ts +1 -1
- package/api/resources/speechToText/client/Client.js +9 -7
- package/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +4 -0
- package/api/resources/studio/client/Client.d.ts +1 -1
- package/api/resources/studio/client/Client.js +3 -7
- package/api/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +6 -0
- package/api/resources/studio/resources/projects/client/Client.d.ts +1 -1
- package/api/resources/studio/resources/projects/client/Client.js +13 -17
- package/api/resources/studio/resources/projects/resources/chapters/client/Client.d.ts +1 -1
- package/api/resources/studio/resources/projects/resources/chapters/client/Client.js +13 -17
- package/api/resources/studio/resources/projects/resources/chapters/resources/snapshots/client/Client.d.ts +1 -1
- package/api/resources/studio/resources/projects/resources/chapters/resources/snapshots/client/Client.js +7 -11
- package/api/resources/studio/resources/projects/resources/content/client/Client.d.ts +1 -1
- package/api/resources/studio/resources/projects/resources/content/client/Client.js +3 -7
- package/api/resources/studio/resources/projects/resources/pronunciationDictionaries/client/Client.d.ts +1 -1
- package/api/resources/studio/resources/projects/resources/pronunciationDictionaries/client/Client.js +3 -7
- package/api/resources/studio/resources/projects/resources/snapshots/client/Client.d.ts +1 -1
- package/api/resources/studio/resources/projects/resources/snapshots/client/Client.js +9 -13
- package/api/resources/textToDialogue/client/Client.d.ts +1 -1
- package/api/resources/textToDialogue/client/Client.js +5 -9
- package/api/resources/textToSoundEffects/client/Client.d.ts +1 -1
- package/api/resources/textToSoundEffects/client/Client.js +3 -7
- package/api/resources/textToSpeech/client/Client.d.ts +1 -1
- package/api/resources/textToSpeech/client/Client.js +9 -13
- package/api/resources/textToVoice/client/Client.d.ts +4 -1
- package/api/resources/textToVoice/client/Client.js +14 -13
- package/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +2 -0
- package/api/resources/textToVoice/index.d.ts +1 -0
- package/api/resources/textToVoice/index.js +1 -0
- package/api/resources/textToVoice/resources/index.d.ts +1 -0
- package/api/resources/textToVoice/resources/index.js +37 -0
- package/api/resources/textToVoice/resources/preview/client/Client.d.ts +38 -0
- package/api/resources/textToVoice/resources/preview/client/Client.js +116 -0
- package/api/resources/textToVoice/resources/preview/client/index.d.ts +1 -0
- package/api/resources/textToVoice/resources/preview/client/index.js +2 -0
- package/api/resources/textToVoice/resources/preview/index.d.ts +1 -0
- package/api/resources/textToVoice/resources/preview/index.js +17 -0
- package/api/resources/usage/client/Client.d.ts +1 -1
- package/api/resources/usage/client/Client.js +3 -7
- package/api/resources/user/client/Client.d.ts +1 -1
- package/api/resources/user/client/Client.js +3 -7
- package/api/resources/user/resources/subscription/client/Client.d.ts +1 -1
- package/api/resources/user/resources/subscription/client/Client.js +3 -7
- package/api/resources/voices/client/Client.d.ts +1 -1
- package/api/resources/voices/client/Client.js +17 -21
- package/api/resources/voices/resources/ivc/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/ivc/client/Client.js +3 -7
- package/api/resources/voices/resources/pvc/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/pvc/client/Client.js +7 -11
- package/api/resources/voices/resources/pvc/resources/samples/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/pvc/resources/samples/client/Client.js +7 -11
- package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.js +3 -7
- package/api/resources/voices/resources/pvc/resources/samples/resources/speakers/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/pvc/resources/samples/resources/speakers/client/Client.js +5 -9
- package/api/resources/voices/resources/pvc/resources/samples/resources/speakers/resources/audio/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/pvc/resources/samples/resources/speakers/resources/audio/client/Client.js +3 -7
- package/api/resources/voices/resources/pvc/resources/samples/resources/waveform/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/pvc/resources/samples/resources/waveform/client/Client.js +3 -7
- package/api/resources/voices/resources/pvc/resources/verification/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/pvc/resources/verification/client/Client.js +3 -7
- package/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/Client.js +5 -9
- package/api/resources/voices/resources/samples/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/samples/resources/audio/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/samples/resources/audio/client/Client.js +3 -7
- package/api/resources/voices/resources/settings/client/Client.d.ts +1 -1
- package/api/resources/voices/resources/settings/client/Client.js +7 -11
- package/api/resources/webhooks/client/Client.d.ts +1 -1
- package/api/resources/webhooks/client/Client.js +3 -7
- package/api/resources/workspace/client/Client.d.ts +1 -1
- package/api/resources/workspace/resources/groups/client/Client.d.ts +1 -1
- package/api/resources/workspace/resources/groups/client/Client.js +3 -7
- package/api/resources/workspace/resources/groups/resources/members/client/Client.d.ts +1 -1
- package/api/resources/workspace/resources/groups/resources/members/client/Client.js +5 -9
- package/api/resources/workspace/resources/invites/client/Client.d.ts +1 -1
- package/api/resources/workspace/resources/invites/client/Client.js +7 -11
- package/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +3 -1
- package/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
- package/api/resources/workspace/resources/members/client/Client.d.ts +1 -1
- package/api/resources/workspace/resources/members/client/Client.js +5 -9
- package/api/resources/workspace/resources/resources/client/Client.d.ts +1 -1
- package/api/resources/workspace/resources/resources/client/Client.js +7 -11
- package/api/types/AgentConfig.d.ts +1 -10
- package/api/types/AgentPlatformSettingsRequestModel.d.ts +2 -0
- package/api/types/AgentPlatformSettingsResponseModel.d.ts +2 -0
- package/api/types/AgentTestingSettings.d.ts +10 -0
- package/api/types/AgentTransfer.d.ts +3 -0
- package/api/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +6 -0
- package/api/types/BreakdownTypes.d.ts +2 -1
- package/api/types/BreakdownTypes.js +1 -0
- package/api/types/ClientToolConfigInput.d.ts +1 -1
- package/api/types/ClientToolConfigOutput.d.ts +1 -1
- package/api/types/ConvAiWebhooks.d.ts +2 -0
- package/api/types/ConversationHistoryElevenAssistantCommonModel.d.ts +6 -0
- package/api/types/ConversationHistoryMetadataCommonModel.d.ts +5 -0
- package/api/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +4 -1
- package/api/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +13 -0
- package/api/types/ConversationInitiationClientDataInternal.d.ts +2 -0
- package/api/types/ConversationInitiationClientDataRequestInput.d.ts +2 -0
- package/api/types/ConversationInitiationClientDataRequestOutput.d.ts +2 -0
- package/api/types/ConversationInitiationSource.d.ts +20 -0
- package/api/types/ConversationInitiationSource.js +19 -0
- package/api/types/ConversationSimulationSpecification.d.ts +1 -1
- package/api/types/ConversationalConfig.d.ts +1 -1
- package/api/types/CreateSipTrunkPhoneNumberRequest.d.ts +6 -21
- package/api/types/CreateTwilioPhoneNumberRequest.d.ts +4 -0
- package/api/types/CustomLlm.d.ts +2 -0
- package/api/types/DubbingMetadataPageResponseModel.d.ts +9 -0
- package/api/types/DubbingMetadataResponse.d.ts +4 -0
- package/api/types/GetAgentResponseModel.d.ts +1 -0
- package/api/types/GetConversationResponseModel.d.ts +1 -0
- package/api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +15 -0
- package/api/types/{SipTrunkConfigResponseModel.d.ts → GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +1 -1
- package/api/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.js +5 -0
- package/api/types/GetPhoneNumberSipTrunkResponseModel.d.ts +9 -1
- package/api/types/GetPhoneNumberTwilioResponseModel.d.ts +4 -0
- package/api/types/InboundSipTrunkConfigRequestModel.d.ts +14 -0
- package/api/types/InboundSipTrunkConfigRequestModel.js +5 -0
- package/api/types/Llm.d.ts +1 -3
- package/api/types/Llm.js +0 -2
- package/api/types/OutboundSipTrunkConfigRequestModel.d.ts +16 -0
- package/api/types/OutboundSipTrunkConfigRequestModel.js +5 -0
- package/api/types/PhoneNumberTransfer.d.ts +4 -1
- package/api/types/PhoneNumberTransferDestination.d.ts +6 -0
- package/api/types/PhoneNumberTransferDestination.js +5 -0
- package/api/types/PhoneNumberTransferTransferDestination.d.ts +13 -0
- package/api/types/PhoneNumberTransferTransferDestination.js +5 -0
- package/api/types/PromptAgentApiModelInput.d.ts +3 -1
- package/api/types/PromptAgentApiModelOutput.d.ts +3 -1
- package/api/types/PromptAgentDbModel.d.ts +0 -26
- package/{dist/api/types/SipTrunkCredentials.d.ts → api/types/SipTrunkCredentialsRequestModel.d.ts} +1 -1
- package/api/types/SipTrunkCredentialsRequestModel.js +5 -0
- package/api/types/SipUriTransferDestination.d.ts +6 -0
- package/api/types/SipUriTransferDestination.js +5 -0
- package/api/types/SubscriptionStatusType.d.ts +1 -3
- package/api/types/SubscriptionStatusType.js +0 -2
- package/api/types/SystemToolConfigInputParams.d.ts +1 -1
- package/api/types/SystemToolConfigOutputParams.d.ts +1 -1
- package/api/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +1 -1
- package/api/types/TransferToNumberToolConfigInput.js +5 -0
- package/api/types/TransferToNumberToolConfigOutput.d.ts +9 -0
- package/api/types/TransferToNumberToolConfigOutput.js +5 -0
- package/api/types/TransferTypeEnum.d.ts +8 -0
- package/api/types/TransferTypeEnum.js +10 -0
- package/api/types/WidgetTextContents.d.ts +8 -0
- package/api/types/WorkspaceResourceType.d.ts +2 -1
- package/api/types/WorkspaceResourceType.js +1 -0
- package/api/types/index.d.ts +17 -4
- package/api/types/index.js +17 -4
- package/core/fetcher/BinaryResponse.d.ts +7 -4
- package/core/fetcher/BinaryResponse.js +5 -2
- package/core/fetcher/Fetcher.js +3 -3
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +3 -7
- package/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/core/fetcher/getErrorResponseBody.js +44 -0
- package/core/fetcher/getResponseBody.js +2 -1
- package/core/form-data-utils/FormDataWrapper.js +4 -4
- package/core/form-data-utils/encodeAsFormParameter.d.ts +0 -3
- package/core/form-data-utils/encodeAsFormParameter.js +2 -8
- package/core/headers.d.ts +1 -1
- package/core/index.d.ts +1 -0
- package/core/index.js +2 -1
- package/core/url/index.d.ts +2 -0
- package/core/url/index.js +7 -0
- package/core/url/join.d.ts +1 -0
- package/core/url/join.js +49 -0
- package/core/url/qs.d.ts +6 -0
- package/core/url/qs.js +64 -0
- package/dist/Client.d.ts +1 -1
- package/dist/Client.js +4 -4
- package/dist/api/resources/audioIsolation/client/Client.d.ts +1 -1
- package/dist/api/resources/audioIsolation/client/Client.js +5 -9
- package/dist/api/resources/audioNative/client/Client.d.ts +1 -1
- package/dist/api/resources/audioNative/client/Client.js +7 -11
- package/dist/api/resources/conversationalAi/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/client/Client.js +11 -15
- package/dist/api/resources/conversationalAi/conversation/AudioInterface.d.ts +44 -0
- package/dist/api/resources/conversationalAi/conversation/AudioInterface.js +12 -0
- package/dist/api/resources/conversationalAi/conversation/ClientTools.d.ts +60 -0
- package/dist/api/resources/conversationalAi/conversation/ClientTools.js +132 -0
- package/dist/api/resources/conversationalAi/conversation/Conversation.d.ts +94 -0
- package/dist/api/resources/conversationalAi/conversation/Conversation.js +283 -0
- package/dist/api/resources/conversationalAi/conversation/ConversationConfig.d.ts +18 -0
- package/dist/api/resources/conversationalAi/conversation/ConversationConfig.js +16 -0
- package/dist/api/resources/conversationalAi/conversation/DefaultAudioInterface.d.ts +63 -0
- package/dist/api/resources/conversationalAi/conversation/DefaultAudioInterface.js +126 -0
- package/dist/api/resources/conversationalAi/conversation/__tests__/Conversation.test.d.ts +1 -0
- package/dist/api/resources/conversationalAi/conversation/__tests__/Conversation.test.js +358 -0
- package/dist/api/resources/conversationalAi/conversation/events.d.ts +84 -0
- package/dist/api/resources/conversationalAi/conversation/events.js +19 -0
- package/dist/api/resources/conversationalAi/conversation/index.d.ts +6 -0
- package/dist/api/resources/conversationalAi/conversation/index.js +22 -0
- package/dist/api/resources/conversationalAi/conversation/interfaces/ConversationClient.d.ts +11 -0
- package/dist/api/resources/conversationalAi/conversation/interfaces/ConversationClient.js +2 -0
- package/dist/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.d.ts +12 -0
- package/dist/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.js +13 -0
- package/dist/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.d.ts +15 -0
- package/dist/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.js +28 -0
- package/dist/api/resources/conversationalAi/conversation/mocks/MockConversation.d.ts +43 -0
- package/dist/api/resources/conversationalAi/conversation/mocks/MockConversation.js +108 -0
- package/dist/api/resources/conversationalAi/conversation/mocks/index.d.ts +2 -0
- package/dist/api/resources/conversationalAi/conversation/mocks/index.js +18 -0
- package/dist/api/resources/conversationalAi/resources/agents/client/Client.d.ts +5 -5
- package/dist/api/resources/conversationalAi/resources/agents/client/Client.js +21 -25
- package/dist/api/resources/conversationalAi/resources/agents/client/requests/BodyCreateAgentV1ConvaiAgentsCreatePost.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationStreamV1ConvaiAgentsAgentIdSimulateConversationStreamPost.d.ts +2 -2
- package/dist/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationV1ConvaiAgentsAgentIdSimulateConversationPost.d.ts +2 -2
- package/dist/api/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/agents/resources/knowledgeBase/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/agents/resources/knowledgeBase/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/agents/resources/link/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/agents/resources/link/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/agents/resources/llmUsage/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/agents/resources/llmUsage/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/agents/resources/widget/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/agents/resources/widget/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/batchCalls/client/Client.d.ts +2 -2
- package/dist/api/resources/conversationalAi/resources/batchCalls/client/Client.js +12 -16
- package/dist/api/resources/conversationalAi/resources/conversations/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/conversations/client/Client.js +9 -13
- package/dist/api/resources/conversationalAi/resources/conversations/resources/audio/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/conversations/resources/audio/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/conversations/resources/feedback/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/conversations/resources/feedback/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/dashboard/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/dashboard/resources/settings/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/dashboard/resources/settings/client/Client.js +5 -9
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.js +17 -21
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunk/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunk/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/llmUsage/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/llmUsage/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.js +7 -11
- package/dist/api/resources/conversationalAi/resources/mcpServers/resources/approvalPolicy/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/mcpServers/resources/approvalPolicy/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolApprovals/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolApprovals/client/Client.js +5 -9
- package/dist/api/resources/conversationalAi/resources/mcpServers/resources/tools/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/mcpServers/resources/tools/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/phoneNumbers/client/Client.d.ts +13 -13
- package/dist/api/resources/conversationalAi/resources/phoneNumbers/client/Client.js +79 -83
- package/dist/api/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
- package/dist/api/resources/conversationalAi/resources/secrets/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/secrets/client/Client.js +7 -11
- package/dist/api/resources/conversationalAi/resources/settings/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/settings/client/Client.js +5 -9
- package/dist/api/resources/conversationalAi/resources/sipTrunk/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/sipTrunk/client/Client.js +3 -7
- package/dist/api/resources/conversationalAi/resources/tools/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/tools/client/Client.js +13 -17
- package/dist/api/resources/conversationalAi/resources/twilio/client/Client.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/twilio/client/Client.js +3 -7
- package/dist/api/resources/dubbing/client/Client.d.ts +14 -1
- package/dist/api/resources/dubbing/client/Client.js +94 -11
- package/dist/api/resources/dubbing/client/requests/DubbingListRequest.d.ts +26 -0
- package/dist/api/resources/dubbing/client/requests/DubbingListRequest.js +5 -0
- package/dist/api/resources/dubbing/client/requests/index.d.ts +1 -0
- package/dist/api/resources/dubbing/index.d.ts +1 -0
- package/dist/api/resources/dubbing/index.js +1 -0
- package/dist/api/resources/dubbing/resources/audio/client/Client.d.ts +1 -1
- package/dist/api/resources/dubbing/resources/audio/client/Client.js +3 -7
- package/dist/api/resources/dubbing/resources/resource/client/Client.d.ts +1 -1
- package/dist/api/resources/dubbing/resources/resource/client/Client.js +11 -15
- package/dist/api/resources/dubbing/resources/resource/resources/language/client/Client.d.ts +1 -1
- package/dist/api/resources/dubbing/resources/resource/resources/language/client/Client.js +3 -7
- package/dist/api/resources/dubbing/resources/resource/resources/segment/client/Client.d.ts +1 -1
- package/dist/api/resources/dubbing/resources/resource/resources/segment/client/Client.js +5 -9
- package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/Client.d.ts +1 -1
- package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/Client.js +5 -9
- package/dist/api/resources/dubbing/resources/resource/resources/speaker/resources/segment/client/Client.d.ts +1 -1
- package/dist/api/resources/dubbing/resources/resource/resources/speaker/resources/segment/client/Client.js +3 -7
- package/dist/api/resources/dubbing/resources/transcript/client/Client.d.ts +1 -1
- package/dist/api/resources/dubbing/resources/transcript/client/Client.js +3 -7
- package/dist/api/resources/dubbing/types/DubbingListRequestDubbingStatus.d.ts +12 -0
- package/dist/api/resources/dubbing/types/DubbingListRequestDubbingStatus.js +11 -0
- package/dist/api/resources/dubbing/types/DubbingListRequestFilterByCreator.d.ts +12 -0
- package/dist/api/resources/dubbing/types/DubbingListRequestFilterByCreator.js +11 -0
- package/dist/api/resources/dubbing/types/index.d.ts +2 -0
- package/dist/api/resources/dubbing/types/index.js +18 -0
- package/dist/api/resources/forcedAlignment/client/Client.d.ts +1 -1
- package/dist/api/resources/forcedAlignment/client/Client.js +3 -7
- package/dist/api/resources/history/client/Client.d.ts +1 -1
- package/dist/api/resources/history/client/Client.js +11 -15
- package/dist/api/resources/index.d.ts +2 -1
- package/dist/api/resources/index.js +3 -2
- package/dist/api/resources/models/client/Client.d.ts +1 -1
- package/dist/api/resources/models/client/Client.js +3 -7
- package/dist/api/resources/pronunciationDictionaries/client/Client.d.ts +1 -1
- package/dist/api/resources/pronunciationDictionaries/client/Client.js +11 -15
- package/dist/api/resources/pronunciationDictionaries/resources/rules/client/Client.d.ts +1 -1
- package/dist/api/resources/pronunciationDictionaries/resources/rules/client/Client.js +5 -9
- package/dist/api/resources/samples/client/Client.d.ts +1 -1
- package/dist/api/resources/samples/client/Client.js +3 -7
- package/dist/api/resources/speechToSpeech/client/Client.d.ts +1 -1
- package/dist/api/resources/speechToSpeech/client/Client.js +5 -9
- package/dist/api/resources/speechToText/client/Client.d.ts +1 -1
- package/dist/api/resources/speechToText/client/Client.js +9 -7
- package/dist/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +4 -0
- package/dist/api/resources/studio/client/Client.d.ts +1 -1
- package/dist/api/resources/studio/client/Client.js +3 -7
- package/dist/api/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +6 -0
- package/dist/api/resources/studio/resources/projects/client/Client.d.ts +1 -1
- package/dist/api/resources/studio/resources/projects/client/Client.js +13 -17
- package/dist/api/resources/studio/resources/projects/resources/chapters/client/Client.d.ts +1 -1
- package/dist/api/resources/studio/resources/projects/resources/chapters/client/Client.js +13 -17
- package/dist/api/resources/studio/resources/projects/resources/chapters/resources/snapshots/client/Client.d.ts +1 -1
- package/dist/api/resources/studio/resources/projects/resources/chapters/resources/snapshots/client/Client.js +7 -11
- package/dist/api/resources/studio/resources/projects/resources/content/client/Client.d.ts +1 -1
- package/dist/api/resources/studio/resources/projects/resources/content/client/Client.js +3 -7
- package/dist/api/resources/studio/resources/projects/resources/pronunciationDictionaries/client/Client.d.ts +1 -1
- package/dist/api/resources/studio/resources/projects/resources/pronunciationDictionaries/client/Client.js +3 -7
- package/dist/api/resources/studio/resources/projects/resources/snapshots/client/Client.d.ts +1 -1
- package/dist/api/resources/studio/resources/projects/resources/snapshots/client/Client.js +9 -13
- package/dist/api/resources/textToDialogue/client/Client.d.ts +1 -1
- package/dist/api/resources/textToDialogue/client/Client.js +5 -9
- package/dist/api/resources/textToSoundEffects/client/Client.d.ts +1 -1
- package/dist/api/resources/textToSoundEffects/client/Client.js +3 -7
- package/dist/api/resources/textToSpeech/client/Client.d.ts +1 -1
- package/dist/api/resources/textToSpeech/client/Client.js +9 -13
- package/dist/api/resources/textToVoice/client/Client.d.ts +4 -1
- package/dist/api/resources/textToVoice/client/Client.js +14 -13
- package/dist/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +2 -0
- package/dist/api/resources/textToVoice/index.d.ts +1 -0
- package/dist/api/resources/textToVoice/index.js +1 -0
- package/dist/api/resources/textToVoice/resources/index.d.ts +1 -0
- package/dist/api/resources/textToVoice/resources/index.js +37 -0
- package/dist/api/resources/textToVoice/resources/preview/client/Client.d.ts +38 -0
- package/dist/api/resources/textToVoice/resources/preview/client/Client.js +116 -0
- package/dist/api/resources/textToVoice/resources/preview/client/index.d.ts +1 -0
- package/dist/api/resources/textToVoice/resources/preview/client/index.js +2 -0
- package/dist/api/resources/textToVoice/resources/preview/index.d.ts +1 -0
- package/dist/api/resources/textToVoice/resources/preview/index.js +17 -0
- package/dist/api/resources/usage/client/Client.d.ts +1 -1
- package/dist/api/resources/usage/client/Client.js +3 -7
- package/dist/api/resources/user/client/Client.d.ts +1 -1
- package/dist/api/resources/user/client/Client.js +3 -7
- package/dist/api/resources/user/resources/subscription/client/Client.d.ts +1 -1
- package/dist/api/resources/user/resources/subscription/client/Client.js +3 -7
- package/dist/api/resources/voices/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/client/Client.js +17 -21
- package/dist/api/resources/voices/resources/ivc/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/ivc/client/Client.js +3 -7
- package/dist/api/resources/voices/resources/pvc/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/pvc/client/Client.js +7 -11
- package/dist/api/resources/voices/resources/pvc/resources/samples/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/pvc/resources/samples/client/Client.js +7 -11
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.js +3 -7
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/speakers/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/speakers/client/Client.js +5 -9
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/speakers/resources/audio/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/speakers/resources/audio/client/Client.js +3 -7
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/waveform/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/waveform/client/Client.js +3 -7
- package/dist/api/resources/voices/resources/pvc/resources/verification/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/pvc/resources/verification/client/Client.js +3 -7
- package/dist/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/Client.js +5 -9
- package/dist/api/resources/voices/resources/samples/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/samples/resources/audio/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/samples/resources/audio/client/Client.js +3 -7
- package/dist/api/resources/voices/resources/settings/client/Client.d.ts +1 -1
- package/dist/api/resources/voices/resources/settings/client/Client.js +7 -11
- package/dist/api/resources/webhooks/client/Client.d.ts +1 -1
- package/dist/api/resources/webhooks/client/Client.js +3 -7
- package/dist/api/resources/workspace/client/Client.d.ts +1 -1
- package/dist/api/resources/workspace/resources/groups/client/Client.d.ts +1 -1
- package/dist/api/resources/workspace/resources/groups/client/Client.js +3 -7
- package/dist/api/resources/workspace/resources/groups/resources/members/client/Client.d.ts +1 -1
- package/dist/api/resources/workspace/resources/groups/resources/members/client/Client.js +5 -9
- package/dist/api/resources/workspace/resources/invites/client/Client.d.ts +1 -1
- package/dist/api/resources/workspace/resources/invites/client/Client.js +7 -11
- package/dist/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +3 -1
- package/dist/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
- package/dist/api/resources/workspace/resources/members/client/Client.d.ts +1 -1
- package/dist/api/resources/workspace/resources/members/client/Client.js +5 -9
- package/dist/api/resources/workspace/resources/resources/client/Client.d.ts +1 -1
- package/dist/api/resources/workspace/resources/resources/client/Client.js +7 -11
- package/dist/api/types/AgentConfig.d.ts +1 -10
- package/dist/api/types/AgentPlatformSettingsRequestModel.d.ts +2 -0
- package/dist/api/types/AgentPlatformSettingsResponseModel.d.ts +2 -0
- package/dist/api/types/AgentTestingSettings.d.ts +10 -0
- package/dist/api/types/AgentTestingSettings.js +5 -0
- package/dist/api/types/AgentTransfer.d.ts +3 -0
- package/dist/api/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +6 -0
- package/dist/api/types/BreakdownTypes.d.ts +2 -1
- package/dist/api/types/BreakdownTypes.js +1 -0
- package/dist/api/types/ClientToolConfigInput.d.ts +1 -1
- package/dist/api/types/ClientToolConfigOutput.d.ts +1 -1
- package/dist/api/types/ConvAiWebhooks.d.ts +2 -0
- package/dist/api/types/ConversationHistoryElevenAssistantCommonModel.d.ts +6 -0
- package/dist/api/types/ConversationHistoryElevenAssistantCommonModel.js +5 -0
- package/dist/api/types/ConversationHistoryMetadataCommonModel.d.ts +5 -0
- package/dist/api/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +4 -1
- package/dist/api/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +13 -0
- package/dist/api/types/ConversationHistoryTranscriptToolCallMcpDetails.js +5 -0
- package/dist/api/types/ConversationInitiationClientDataInternal.d.ts +2 -0
- package/dist/api/types/ConversationInitiationClientDataRequestInput.d.ts +2 -0
- package/dist/api/types/ConversationInitiationClientDataRequestOutput.d.ts +2 -0
- package/dist/api/types/ConversationInitiationSource.d.ts +20 -0
- package/dist/api/types/ConversationInitiationSource.js +19 -0
- package/dist/api/types/ConversationSimulationSpecification.d.ts +1 -1
- package/dist/api/types/ConversationalConfig.d.ts +1 -1
- package/dist/api/types/CreateSipTrunkPhoneNumberRequest.d.ts +6 -21
- package/dist/api/types/CreateTwilioPhoneNumberRequest.d.ts +4 -0
- package/dist/api/types/CustomLlm.d.ts +2 -0
- package/dist/api/types/DubbingMetadataPageResponseModel.d.ts +9 -0
- package/dist/api/types/DubbingMetadataPageResponseModel.js +5 -0
- package/dist/api/types/DubbingMetadataResponse.d.ts +4 -0
- package/dist/api/types/GetAgentResponseModel.d.ts +1 -0
- package/dist/api/types/GetConversationResponseModel.d.ts +1 -0
- package/dist/api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +15 -0
- package/dist/api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js +5 -0
- package/dist/api/types/{SipTrunkConfigResponseModel.d.ts → GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +1 -1
- package/dist/api/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.js +5 -0
- package/dist/api/types/GetPhoneNumberSipTrunkResponseModel.d.ts +9 -1
- package/dist/api/types/GetPhoneNumberTwilioResponseModel.d.ts +4 -0
- package/dist/api/types/InboundSipTrunkConfigRequestModel.d.ts +14 -0
- package/dist/api/types/InboundSipTrunkConfigRequestModel.js +5 -0
- package/dist/api/types/Llm.d.ts +1 -3
- package/dist/api/types/Llm.js +0 -2
- package/dist/api/types/OutboundSipTrunkConfigRequestModel.d.ts +16 -0
- package/dist/api/types/OutboundSipTrunkConfigRequestModel.js +5 -0
- package/dist/api/types/PhoneNumberTransfer.d.ts +4 -1
- package/dist/api/types/PhoneNumberTransferDestination.d.ts +6 -0
- package/dist/api/types/PhoneNumberTransferDestination.js +5 -0
- package/dist/api/types/PhoneNumberTransferTransferDestination.d.ts +13 -0
- package/dist/api/types/PhoneNumberTransferTransferDestination.js +5 -0
- package/dist/api/types/PromptAgentApiModelInput.d.ts +3 -1
- package/dist/api/types/PromptAgentApiModelOutput.d.ts +3 -1
- package/dist/api/types/PromptAgentDbModel.d.ts +0 -26
- package/{api/types/SipTrunkCredentials.d.ts → dist/api/types/SipTrunkCredentialsRequestModel.d.ts} +1 -1
- package/dist/api/types/SipTrunkCredentialsRequestModel.js +5 -0
- package/dist/api/types/SipUriTransferDestination.d.ts +6 -0
- package/dist/api/types/SipUriTransferDestination.js +5 -0
- package/dist/api/types/SubscriptionStatusType.d.ts +1 -3
- package/dist/api/types/SubscriptionStatusType.js +0 -2
- package/dist/api/types/SystemToolConfigInputParams.d.ts +1 -1
- package/dist/api/types/SystemToolConfigOutputParams.d.ts +1 -1
- package/dist/api/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +1 -1
- package/dist/api/types/TransferToNumberToolConfigInput.js +5 -0
- package/dist/api/types/TransferToNumberToolConfigOutput.d.ts +9 -0
- package/dist/api/types/TransferToNumberToolConfigOutput.js +5 -0
- package/dist/api/types/TransferTypeEnum.d.ts +8 -0
- package/dist/api/types/TransferTypeEnum.js +10 -0
- package/dist/api/types/WidgetTextContents.d.ts +8 -0
- package/dist/api/types/WorkspaceResourceType.d.ts +2 -1
- package/dist/api/types/WorkspaceResourceType.js +1 -0
- package/dist/api/types/index.d.ts +17 -4
- package/dist/api/types/index.js +17 -4
- package/dist/core/fetcher/BinaryResponse.d.ts +7 -4
- package/dist/core/fetcher/BinaryResponse.js +5 -2
- package/dist/core/fetcher/Fetcher.js +3 -3
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +3 -7
- package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/core/fetcher/getErrorResponseBody.js +44 -0
- package/dist/core/fetcher/getResponseBody.js +2 -1
- package/dist/core/form-data-utils/FormDataWrapper.js +4 -4
- package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +0 -3
- package/dist/core/form-data-utils/encodeAsFormParameter.js +2 -8
- package/dist/core/headers.d.ts +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +2 -1
- package/dist/core/url/index.d.ts +2 -0
- package/dist/core/url/index.js +7 -0
- package/dist/core/url/join.d.ts +1 -0
- package/dist/core/url/join.js +49 -0
- package/dist/core/url/qs.d.ts +6 -0
- package/dist/core/url/qs.js +64 -0
- package/dist/environments.d.ts +4 -20
- package/dist/environments.js +4 -16
- package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/BodyCreateAgentV1ConvaiAgentsCreatePost.d.ts +1 -0
- package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/BodyCreateAgentV1ConvaiAgentsCreatePost.js +1 -0
- package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.d.ts +1 -0
- package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.js +1 -0
- package/dist/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
- package/dist/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
- package/dist/serialization/resources/dubbing/index.d.ts +1 -0
- package/dist/serialization/resources/dubbing/index.js +1 -0
- package/dist/serialization/resources/dubbing/types/DubbingListRequestDubbingStatus.d.ts +10 -0
- package/dist/serialization/resources/dubbing/types/DubbingListRequestDubbingStatus.js +41 -0
- package/dist/serialization/resources/dubbing/types/DubbingListRequestFilterByCreator.d.ts +10 -0
- package/dist/serialization/resources/dubbing/types/DubbingListRequestFilterByCreator.js +41 -0
- package/dist/serialization/resources/dubbing/types/index.d.ts +2 -0
- package/dist/serialization/resources/dubbing/types/index.js +18 -0
- package/dist/serialization/resources/index.d.ts +2 -1
- package/dist/serialization/resources/index.js +3 -2
- package/dist/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +3 -0
- package/dist/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.js +3 -0
- package/dist/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +1 -0
- package/dist/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.js +1 -0
- package/dist/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +1 -1
- package/dist/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
- package/dist/serialization/types/AgentConfig.d.ts +2 -9
- package/dist/serialization/types/AgentConfig.js +1 -8
- package/dist/serialization/types/AgentPlatformSettingsRequestModel.d.ts +2 -0
- package/dist/serialization/types/AgentPlatformSettingsRequestModel.js +2 -0
- package/dist/serialization/types/AgentPlatformSettingsResponseModel.d.ts +2 -0
- package/dist/serialization/types/AgentPlatformSettingsResponseModel.js +2 -0
- package/dist/serialization/types/AgentTestingSettings.d.ts +12 -0
- package/dist/serialization/types/AgentTestingSettings.js +43 -0
- package/dist/serialization/types/AgentTransfer.d.ts +3 -0
- package/dist/serialization/types/AgentTransfer.js +3 -0
- package/dist/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +3 -0
- package/dist/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.js +3 -0
- package/dist/serialization/types/BreakdownTypes.d.ts +1 -1
- package/dist/serialization/types/BreakdownTypes.js +1 -0
- package/dist/serialization/types/ConvAiWebhooks.d.ts +1 -0
- package/dist/serialization/types/ConvAiWebhooks.js +1 -0
- package/dist/serialization/types/ConversationHistoryElevenAssistantCommonModel.d.ts +12 -0
- package/dist/serialization/types/ConversationHistoryElevenAssistantCommonModel.js +43 -0
- package/dist/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +7 -0
- package/dist/serialization/types/ConversationHistoryMetadataCommonModel.js +7 -0
- package/dist/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +5 -1
- package/dist/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.js +2 -0
- package/dist/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +19 -0
- package/dist/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.js +50 -0
- package/dist/serialization/types/ConversationInitiationClientDataInternal.d.ts +1 -0
- package/dist/serialization/types/ConversationInitiationClientDataInternal.js +1 -0
- package/dist/serialization/types/ConversationInitiationClientDataRequestInput.d.ts +1 -0
- package/dist/serialization/types/ConversationInitiationClientDataRequestInput.js +1 -0
- package/dist/serialization/types/ConversationInitiationClientDataRequestOutput.d.ts +1 -0
- package/dist/serialization/types/ConversationInitiationClientDataRequestOutput.js +1 -0
- package/dist/serialization/types/ConversationInitiationSource.d.ts +10 -0
- package/dist/serialization/types/ConversationInitiationSource.js +53 -0
- package/dist/serialization/types/ConversationSimulationSpecification.d.ts +1 -1
- package/dist/serialization/types/ConversationalConfig.d.ts +1 -1
- package/dist/serialization/types/CreateSipTrunkPhoneNumberRequest.d.ts +6 -10
- package/dist/serialization/types/CreateSipTrunkPhoneNumberRequest.js +6 -10
- package/dist/serialization/types/CreateTwilioPhoneNumberRequest.d.ts +2 -0
- package/dist/serialization/types/CreateTwilioPhoneNumberRequest.js +2 -0
- package/dist/serialization/types/CustomLlm.d.ts +1 -0
- package/dist/serialization/types/CustomLlm.js +1 -0
- package/dist/serialization/types/DubbingMetadataPageResponseModel.d.ts +15 -0
- package/dist/serialization/types/DubbingMetadataPageResponseModel.js +46 -0
- package/dist/serialization/types/DubbingMetadataResponse.d.ts +2 -0
- package/dist/serialization/types/DubbingMetadataResponse.js +2 -0
- package/dist/serialization/types/GetAgentResponseModel.d.ts +1 -0
- package/dist/serialization/types/GetAgentResponseModel.js +1 -0
- package/dist/serialization/types/GetConversationResponseModel.d.ts +1 -0
- package/dist/serialization/types/GetConversationResponseModel.js +1 -0
- package/dist/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +17 -0
- package/dist/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js +48 -0
- package/{serialization/types/SipTrunkConfigResponseModel.d.ts → dist/serialization/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +2 -2
- package/dist/serialization/types/{SipTrunkConfigResponseModel.js → GetPhoneNumberOutboundSipTrunkConfigResponseModel.js} +2 -2
- package/dist/serialization/types/GetPhoneNumberSipTrunkResponseModel.d.ts +7 -2
- package/dist/serialization/types/GetPhoneNumberSipTrunkResponseModel.js +7 -2
- package/dist/serialization/types/GetPhoneNumberTwilioResponseModel.d.ts +2 -0
- package/dist/serialization/types/GetPhoneNumberTwilioResponseModel.js +2 -0
- package/dist/serialization/types/InboundSipTrunkConfigRequestModel.d.ts +17 -0
- package/dist/serialization/types/InboundSipTrunkConfigRequestModel.js +48 -0
- package/dist/serialization/types/Llm.d.ts +1 -1
- package/dist/serialization/types/Llm.js +0 -2
- package/dist/serialization/types/OutboundSipTrunkConfigRequestModel.d.ts +19 -0
- package/dist/serialization/types/OutboundSipTrunkConfigRequestModel.js +50 -0
- package/dist/serialization/types/PhoneNumberTransfer.d.ts +5 -1
- package/dist/serialization/types/PhoneNumberTransfer.js +5 -1
- package/dist/serialization/types/PhoneNumberTransferDestination.d.ts +12 -0
- package/dist/serialization/types/PhoneNumberTransferDestination.js +43 -0
- package/dist/serialization/types/PhoneNumberTransferTransferDestination.d.ts +18 -0
- package/dist/serialization/types/PhoneNumberTransferTransferDestination.js +51 -0
- package/dist/serialization/types/PromptAgentApiModelInput.d.ts +1 -0
- package/dist/serialization/types/PromptAgentApiModelInput.js +1 -0
- package/dist/serialization/types/PromptAgentApiModelOutput.d.ts +1 -0
- package/dist/serialization/types/PromptAgentApiModelOutput.js +1 -0
- package/dist/serialization/types/PromptAgentDbModel.d.ts +0 -18
- package/dist/serialization/types/PromptAgentDbModel.js +0 -18
- package/{serialization/types/SipTrunkCredentials.d.ts → dist/serialization/types/SipTrunkCredentialsRequestModel.d.ts} +2 -2
- package/{serialization/types/SipTrunkCredentials.js → dist/serialization/types/SipTrunkCredentialsRequestModel.js} +2 -2
- package/dist/serialization/types/SipUriTransferDestination.d.ts +12 -0
- package/dist/serialization/types/SipUriTransferDestination.js +43 -0
- package/dist/serialization/types/SubscriptionStatusType.d.ts +1 -1
- package/dist/serialization/types/SubscriptionStatusType.js +1 -10
- package/dist/serialization/types/SystemToolConfigInputParams.d.ts +2 -2
- package/dist/serialization/types/SystemToolConfigInputParams.js +2 -2
- package/dist/serialization/types/SystemToolConfigOutputParams.d.ts +2 -2
- package/dist/serialization/types/SystemToolConfigOutputParams.js +2 -2
- package/dist/serialization/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +2 -2
- package/dist/serialization/types/{TransferToNumberToolConfig.js → TransferToNumberToolConfigInput.js} +2 -2
- package/dist/serialization/types/TransferToNumberToolConfigOutput.d.ts +14 -0
- package/dist/serialization/types/TransferToNumberToolConfigOutput.js +45 -0
- package/dist/serialization/types/TransferTypeEnum.d.ts +10 -0
- package/dist/serialization/types/TransferTypeEnum.js +41 -0
- package/dist/serialization/types/WidgetTextContents.d.ts +4 -0
- package/dist/serialization/types/WidgetTextContents.js +4 -0
- package/dist/serialization/types/WorkspaceResourceType.d.ts +1 -1
- package/dist/serialization/types/WorkspaceResourceType.js +1 -0
- package/dist/serialization/types/index.d.ts +17 -4
- package/dist/serialization/types/index.js +17 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +4 -20
- package/environments.js +4 -16
- package/jest.config.mjs +36 -6
- package/package.json +21 -20
- package/reference.md +106 -41
- package/serialization/resources/conversationalAi/resources/agents/client/requests/BodyCreateAgentV1ConvaiAgentsCreatePost.d.ts +1 -0
- package/serialization/resources/conversationalAi/resources/agents/client/requests/BodyCreateAgentV1ConvaiAgentsCreatePost.js +1 -0
- package/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.d.ts +1 -0
- package/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.js +1 -0
- package/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
- package/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
- package/serialization/resources/dubbing/index.d.ts +1 -0
- package/serialization/resources/dubbing/index.js +1 -0
- package/serialization/resources/dubbing/types/DubbingListRequestDubbingStatus.d.ts +10 -0
- package/serialization/resources/dubbing/types/DubbingListRequestDubbingStatus.js +41 -0
- package/serialization/resources/dubbing/types/DubbingListRequestFilterByCreator.d.ts +10 -0
- package/serialization/resources/dubbing/types/DubbingListRequestFilterByCreator.js +41 -0
- package/serialization/resources/dubbing/types/index.d.ts +2 -0
- package/serialization/resources/dubbing/types/index.js +18 -0
- package/serialization/resources/index.d.ts +2 -1
- package/serialization/resources/index.js +3 -2
- package/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +3 -0
- package/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.js +3 -0
- package/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +1 -0
- package/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.js +1 -0
- package/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +1 -1
- package/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
- package/serialization/types/AgentConfig.d.ts +2 -9
- package/serialization/types/AgentConfig.js +1 -8
- package/serialization/types/AgentPlatformSettingsRequestModel.d.ts +2 -0
- package/serialization/types/AgentPlatformSettingsRequestModel.js +2 -0
- package/serialization/types/AgentPlatformSettingsResponseModel.d.ts +2 -0
- package/serialization/types/AgentPlatformSettingsResponseModel.js +2 -0
- package/serialization/types/AgentTestingSettings.d.ts +12 -0
- package/serialization/types/AgentTestingSettings.js +43 -0
- package/serialization/types/AgentTransfer.d.ts +3 -0
- package/serialization/types/AgentTransfer.js +3 -0
- package/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +3 -0
- package/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.js +3 -0
- package/serialization/types/BreakdownTypes.d.ts +1 -1
- package/serialization/types/BreakdownTypes.js +1 -0
- package/serialization/types/ConvAiWebhooks.d.ts +1 -0
- package/serialization/types/ConvAiWebhooks.js +1 -0
- package/serialization/types/ConversationHistoryElevenAssistantCommonModel.d.ts +12 -0
- package/serialization/types/ConversationHistoryElevenAssistantCommonModel.js +43 -0
- package/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +7 -0
- package/serialization/types/ConversationHistoryMetadataCommonModel.js +7 -0
- package/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +5 -1
- package/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.js +2 -0
- package/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +19 -0
- package/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.js +50 -0
- package/serialization/types/ConversationInitiationClientDataInternal.d.ts +1 -0
- package/serialization/types/ConversationInitiationClientDataInternal.js +1 -0
- package/serialization/types/ConversationInitiationClientDataRequestInput.d.ts +1 -0
- package/serialization/types/ConversationInitiationClientDataRequestInput.js +1 -0
- package/serialization/types/ConversationInitiationClientDataRequestOutput.d.ts +1 -0
- package/serialization/types/ConversationInitiationClientDataRequestOutput.js +1 -0
- package/serialization/types/ConversationInitiationSource.d.ts +10 -0
- package/serialization/types/ConversationInitiationSource.js +53 -0
- package/serialization/types/ConversationSimulationSpecification.d.ts +1 -1
- package/serialization/types/ConversationalConfig.d.ts +1 -1
- package/serialization/types/CreateSipTrunkPhoneNumberRequest.d.ts +6 -10
- package/serialization/types/CreateSipTrunkPhoneNumberRequest.js +6 -10
- package/serialization/types/CreateTwilioPhoneNumberRequest.d.ts +2 -0
- package/serialization/types/CreateTwilioPhoneNumberRequest.js +2 -0
- package/serialization/types/CustomLlm.d.ts +1 -0
- package/serialization/types/CustomLlm.js +1 -0
- package/serialization/types/DubbingMetadataPageResponseModel.d.ts +15 -0
- package/serialization/types/DubbingMetadataPageResponseModel.js +46 -0
- package/serialization/types/DubbingMetadataResponse.d.ts +2 -0
- package/serialization/types/DubbingMetadataResponse.js +2 -0
- package/serialization/types/GetAgentResponseModel.d.ts +1 -0
- package/serialization/types/GetAgentResponseModel.js +1 -0
- package/serialization/types/GetConversationResponseModel.d.ts +1 -0
- package/serialization/types/GetConversationResponseModel.js +1 -0
- package/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +17 -0
- package/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js +48 -0
- package/{dist/serialization/types/SipTrunkConfigResponseModel.d.ts → serialization/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +2 -2
- package/serialization/types/{SipTrunkConfigResponseModel.js → GetPhoneNumberOutboundSipTrunkConfigResponseModel.js} +2 -2
- package/serialization/types/GetPhoneNumberSipTrunkResponseModel.d.ts +7 -2
- package/serialization/types/GetPhoneNumberSipTrunkResponseModel.js +7 -2
- package/serialization/types/GetPhoneNumberTwilioResponseModel.d.ts +2 -0
- package/serialization/types/GetPhoneNumberTwilioResponseModel.js +2 -0
- package/serialization/types/InboundSipTrunkConfigRequestModel.d.ts +17 -0
- package/serialization/types/InboundSipTrunkConfigRequestModel.js +48 -0
- package/serialization/types/Llm.d.ts +1 -1
- package/serialization/types/Llm.js +0 -2
- package/serialization/types/OutboundSipTrunkConfigRequestModel.d.ts +19 -0
- package/serialization/types/OutboundSipTrunkConfigRequestModel.js +50 -0
- package/serialization/types/PhoneNumberTransfer.d.ts +5 -1
- package/serialization/types/PhoneNumberTransfer.js +5 -1
- package/serialization/types/PhoneNumberTransferDestination.d.ts +12 -0
- package/serialization/types/PhoneNumberTransferDestination.js +43 -0
- package/serialization/types/PhoneNumberTransferTransferDestination.d.ts +18 -0
- package/serialization/types/PhoneNumberTransferTransferDestination.js +51 -0
- package/serialization/types/PromptAgentApiModelInput.d.ts +1 -0
- package/serialization/types/PromptAgentApiModelInput.js +1 -0
- package/serialization/types/PromptAgentApiModelOutput.d.ts +1 -0
- package/serialization/types/PromptAgentApiModelOutput.js +1 -0
- package/serialization/types/PromptAgentDbModel.d.ts +0 -18
- package/serialization/types/PromptAgentDbModel.js +0 -18
- package/{dist/serialization/types/SipTrunkCredentials.d.ts → serialization/types/SipTrunkCredentialsRequestModel.d.ts} +2 -2
- package/{dist/serialization/types/SipTrunkCredentials.js → serialization/types/SipTrunkCredentialsRequestModel.js} +2 -2
- package/serialization/types/SipUriTransferDestination.d.ts +12 -0
- package/serialization/types/SipUriTransferDestination.js +43 -0
- package/serialization/types/SubscriptionStatusType.d.ts +1 -1
- package/serialization/types/SubscriptionStatusType.js +1 -10
- package/serialization/types/SystemToolConfigInputParams.d.ts +2 -2
- package/serialization/types/SystemToolConfigInputParams.js +2 -2
- package/serialization/types/SystemToolConfigOutputParams.d.ts +2 -2
- package/serialization/types/SystemToolConfigOutputParams.js +2 -2
- package/serialization/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +2 -2
- package/serialization/types/{TransferToNumberToolConfig.js → TransferToNumberToolConfigInput.js} +2 -2
- package/serialization/types/TransferToNumberToolConfigOutput.d.ts +14 -0
- package/serialization/types/TransferToNumberToolConfigOutput.js +45 -0
- package/serialization/types/TransferTypeEnum.d.ts +10 -0
- package/serialization/types/TransferTypeEnum.js +41 -0
- package/serialization/types/WidgetTextContents.d.ts +4 -0
- package/serialization/types/WidgetTextContents.js +4 -0
- package/serialization/types/WorkspaceResourceType.d.ts +1 -1
- package/serialization/types/WorkspaceResourceType.js +1 -0
- package/serialization/types/index.d.ts +17 -4
- package/serialization/types/index.js +17 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/jest.browser.config.mjs +0 -10
- /package/api/{types/SipTrunkConfigResponseModel.js → resources/dubbing/client/requests/DubbingListRequest.js} +0 -0
- /package/api/types/{SipTrunkCredentials.js → AgentTestingSettings.js} +0 -0
- /package/api/types/{TransferToNumberToolConfig.js → ConversationHistoryElevenAssistantCommonModel.js} +0 -0
- /package/{dist/api/types/SipTrunkConfigResponseModel.js → api/types/ConversationHistoryTranscriptToolCallMcpDetails.js} +0 -0
- /package/{dist/api/types/SipTrunkCredentials.js → api/types/DubbingMetadataPageResponseModel.js} +0 -0
- /package/{dist/api/types/TransferToNumberToolConfig.js → api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js} +0 -0
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const Conversation_1 = require("../Conversation");
|
|
13
|
+
const AudioInterface_1 = require("../AudioInterface");
|
|
14
|
+
const ClientTools_1 = require("../ClientTools");
|
|
15
|
+
// Mock WebSocket
|
|
16
|
+
jest.mock("ws", () => {
|
|
17
|
+
return jest.fn().mockImplementation(() => ({
|
|
18
|
+
on: jest.fn(),
|
|
19
|
+
send: jest.fn(),
|
|
20
|
+
close: jest.fn(),
|
|
21
|
+
readyState: 1, // OPEN
|
|
22
|
+
OPEN: 1,
|
|
23
|
+
}));
|
|
24
|
+
});
|
|
25
|
+
// Mock ElevenLabsClient
|
|
26
|
+
const mockClient = {
|
|
27
|
+
conversationalAi: {
|
|
28
|
+
conversations: {
|
|
29
|
+
getSignedUrl: jest.fn().mockResolvedValue({ signedUrl: "wss://test.com/signed" }),
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
// Mock AudioInterface
|
|
34
|
+
class MockAudioInterface extends AudioInterface_1.AudioInterface {
|
|
35
|
+
start(inputCallback) {
|
|
36
|
+
this.inputCallback = inputCallback;
|
|
37
|
+
}
|
|
38
|
+
stop() {
|
|
39
|
+
this.inputCallback = undefined;
|
|
40
|
+
}
|
|
41
|
+
output(audio) {
|
|
42
|
+
// Mock output
|
|
43
|
+
}
|
|
44
|
+
interrupt() {
|
|
45
|
+
// Mock interrupt
|
|
46
|
+
}
|
|
47
|
+
simulateInput(audio) {
|
|
48
|
+
if (this.inputCallback) {
|
|
49
|
+
this.inputCallback(audio);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
describe("Conversation", () => {
|
|
54
|
+
let conversation;
|
|
55
|
+
let mockAudioInterface;
|
|
56
|
+
let mockClientTools;
|
|
57
|
+
let mockWebSocket;
|
|
58
|
+
beforeEach(() => {
|
|
59
|
+
// Reset all mocks
|
|
60
|
+
jest.clearAllMocks();
|
|
61
|
+
// Create mock instances
|
|
62
|
+
mockAudioInterface = new MockAudioInterface();
|
|
63
|
+
mockClientTools = new ClientTools_1.ClientTools();
|
|
64
|
+
// Mock WebSocket constructor
|
|
65
|
+
const WebSocket = require("ws");
|
|
66
|
+
mockWebSocket = {
|
|
67
|
+
on: jest.fn(),
|
|
68
|
+
send: jest.fn(),
|
|
69
|
+
close: jest.fn(),
|
|
70
|
+
readyState: 1, // OPEN
|
|
71
|
+
};
|
|
72
|
+
WebSocket.mockImplementation(() => mockWebSocket);
|
|
73
|
+
WebSocket.OPEN = 1;
|
|
74
|
+
// Create conversation instance
|
|
75
|
+
conversation = new Conversation_1.Conversation({
|
|
76
|
+
client: mockClient,
|
|
77
|
+
agentId: "test-agent-id",
|
|
78
|
+
requiresAuth: false,
|
|
79
|
+
audioInterface: mockAudioInterface,
|
|
80
|
+
clientTools: mockClientTools,
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
afterEach(() => {
|
|
84
|
+
conversation.endSession();
|
|
85
|
+
});
|
|
86
|
+
describe("constructor", () => {
|
|
87
|
+
it("should initialize with correct properties", () => {
|
|
88
|
+
expect(conversation.getConversationId()).toBeUndefined();
|
|
89
|
+
expect(conversation.isSessionActive()).toBe(false);
|
|
90
|
+
});
|
|
91
|
+
it("should accept callback functions", () => {
|
|
92
|
+
const agentResponseCallback = jest.fn();
|
|
93
|
+
const userTranscriptCallback = jest.fn();
|
|
94
|
+
const conversationWithCallbacks = new Conversation_1.Conversation({
|
|
95
|
+
client: mockClient,
|
|
96
|
+
agentId: "test-agent-id",
|
|
97
|
+
requiresAuth: false,
|
|
98
|
+
audioInterface: mockAudioInterface,
|
|
99
|
+
callbackAgentResponse: agentResponseCallback,
|
|
100
|
+
callbackUserTranscript: userTranscriptCallback,
|
|
101
|
+
});
|
|
102
|
+
expect(conversationWithCallbacks).toBeDefined();
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
describe("startSession", () => {
|
|
106
|
+
it("should start a session without auth", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
107
|
+
// Mock WebSocket events
|
|
108
|
+
mockWebSocket.on.mockImplementation((event, callback) => {
|
|
109
|
+
if (event === "open") {
|
|
110
|
+
setTimeout(() => callback(), 0);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
yield conversation.startSession();
|
|
114
|
+
expect(mockWebSocket.on).toHaveBeenCalledWith("open", expect.any(Function));
|
|
115
|
+
expect(mockWebSocket.on).toHaveBeenCalledWith("message", expect.any(Function));
|
|
116
|
+
expect(mockWebSocket.on).toHaveBeenCalledWith("error", expect.any(Function));
|
|
117
|
+
expect(mockWebSocket.on).toHaveBeenCalledWith("close", expect.any(Function));
|
|
118
|
+
}));
|
|
119
|
+
it("should start a session with auth", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
120
|
+
const authConversation = new Conversation_1.Conversation({
|
|
121
|
+
client: mockClient,
|
|
122
|
+
agentId: "test-agent-id",
|
|
123
|
+
requiresAuth: true,
|
|
124
|
+
audioInterface: mockAudioInterface,
|
|
125
|
+
});
|
|
126
|
+
mockWebSocket.on.mockImplementation((event, callback) => {
|
|
127
|
+
if (event === "open") {
|
|
128
|
+
setTimeout(() => callback(), 0);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
yield authConversation.startSession();
|
|
132
|
+
expect(mockClient.conversationalAi.conversations.getSignedUrl).toHaveBeenCalledWith({
|
|
133
|
+
agentId: "test-agent-id",
|
|
134
|
+
});
|
|
135
|
+
}));
|
|
136
|
+
it("should throw error if session already started", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
137
|
+
mockWebSocket.on.mockImplementation((event, callback) => {
|
|
138
|
+
if (event === "open") {
|
|
139
|
+
setTimeout(() => callback(), 0);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
yield conversation.startSession();
|
|
143
|
+
yield expect(conversation.startSession()).rejects.toThrow("Session already started");
|
|
144
|
+
}));
|
|
145
|
+
});
|
|
146
|
+
describe("message handling", () => {
|
|
147
|
+
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
148
|
+
mockWebSocket.on.mockImplementation((event, callback) => {
|
|
149
|
+
if (event === "open") {
|
|
150
|
+
setTimeout(() => callback(), 0);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
yield conversation.startSession();
|
|
154
|
+
}));
|
|
155
|
+
it("should send user messages", () => {
|
|
156
|
+
conversation.sendUserMessage("Hello, how are you?");
|
|
157
|
+
expect(mockWebSocket.send).toHaveBeenCalledWith(JSON.stringify({
|
|
158
|
+
type: "user_message",
|
|
159
|
+
text: "Hello, how are you?",
|
|
160
|
+
}));
|
|
161
|
+
});
|
|
162
|
+
it("should register user activity", () => {
|
|
163
|
+
conversation.registerUserActivity();
|
|
164
|
+
expect(mockWebSocket.send).toHaveBeenCalledWith(JSON.stringify({
|
|
165
|
+
type: "user_activity",
|
|
166
|
+
}));
|
|
167
|
+
});
|
|
168
|
+
it("should send contextual updates", () => {
|
|
169
|
+
conversation.sendContextualUpdate("User is looking at product page");
|
|
170
|
+
expect(mockWebSocket.send).toHaveBeenCalledWith(JSON.stringify({
|
|
171
|
+
type: "contextual_update",
|
|
172
|
+
text: "User is looking at product page",
|
|
173
|
+
}));
|
|
174
|
+
});
|
|
175
|
+
it("should throw error when sending message without active session", () => {
|
|
176
|
+
conversation.endSession();
|
|
177
|
+
expect(() => conversation.sendUserMessage("test")).toThrow("Session not started or websocket not connected");
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
describe("message receiving", () => {
|
|
181
|
+
let messageHandler;
|
|
182
|
+
let agentResponseCallback;
|
|
183
|
+
let userTranscriptCallback;
|
|
184
|
+
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
185
|
+
agentResponseCallback = jest.fn();
|
|
186
|
+
userTranscriptCallback = jest.fn();
|
|
187
|
+
conversation = new Conversation_1.Conversation({
|
|
188
|
+
client: mockClient,
|
|
189
|
+
agentId: "test-agent-id",
|
|
190
|
+
requiresAuth: false,
|
|
191
|
+
audioInterface: mockAudioInterface,
|
|
192
|
+
callbackAgentResponse: agentResponseCallback,
|
|
193
|
+
callbackUserTranscript: userTranscriptCallback,
|
|
194
|
+
});
|
|
195
|
+
mockWebSocket.on.mockImplementation((event, callback) => {
|
|
196
|
+
if (event === "open") {
|
|
197
|
+
setTimeout(() => callback(), 0);
|
|
198
|
+
}
|
|
199
|
+
else if (event === "message") {
|
|
200
|
+
messageHandler = callback;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
yield conversation.startSession();
|
|
204
|
+
}));
|
|
205
|
+
it("should handle conversation initiation metadata", () => {
|
|
206
|
+
const message = {
|
|
207
|
+
type: "conversation_initiation_metadata",
|
|
208
|
+
conversation_initiation_metadata_event: {
|
|
209
|
+
conversation_id: "test-conversation-123",
|
|
210
|
+
},
|
|
211
|
+
};
|
|
212
|
+
messageHandler(Buffer.from(JSON.stringify(message)));
|
|
213
|
+
expect(conversation.getConversationId()).toBe("test-conversation-123");
|
|
214
|
+
});
|
|
215
|
+
it("should handle agent responses", () => {
|
|
216
|
+
const message = {
|
|
217
|
+
type: "agent_response",
|
|
218
|
+
agent_response_event: {
|
|
219
|
+
agent_response: " Hello! How can I help you today? ",
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
messageHandler(Buffer.from(JSON.stringify(message)));
|
|
223
|
+
expect(agentResponseCallback).toHaveBeenCalledWith("Hello! How can I help you today?");
|
|
224
|
+
});
|
|
225
|
+
it("should handle user transcripts", () => {
|
|
226
|
+
const message = {
|
|
227
|
+
type: "user_transcript",
|
|
228
|
+
user_transcription_event: {
|
|
229
|
+
user_transcript: " Hello, I need help ",
|
|
230
|
+
},
|
|
231
|
+
};
|
|
232
|
+
messageHandler(Buffer.from(JSON.stringify(message)));
|
|
233
|
+
expect(userTranscriptCallback).toHaveBeenCalledWith("Hello, I need help");
|
|
234
|
+
});
|
|
235
|
+
it("should handle audio messages", () => {
|
|
236
|
+
const audioData = Buffer.from("test audio data").toString("base64");
|
|
237
|
+
const message = {
|
|
238
|
+
type: "audio",
|
|
239
|
+
audio_event: {
|
|
240
|
+
event_id: "1",
|
|
241
|
+
audio_base_64: audioData,
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
const outputSpy = jest.spyOn(mockAudioInterface, "output");
|
|
245
|
+
messageHandler(Buffer.from(JSON.stringify(message)));
|
|
246
|
+
expect(outputSpy).toHaveBeenCalledWith(Buffer.from("test audio data"));
|
|
247
|
+
});
|
|
248
|
+
it("should handle ping messages", () => {
|
|
249
|
+
const message = {
|
|
250
|
+
type: "ping",
|
|
251
|
+
ping_event: {
|
|
252
|
+
event_id: "ping-123",
|
|
253
|
+
ping_ms: "50",
|
|
254
|
+
},
|
|
255
|
+
};
|
|
256
|
+
messageHandler(Buffer.from(JSON.stringify(message)));
|
|
257
|
+
expect(mockWebSocket.send).toHaveBeenCalledWith(JSON.stringify({
|
|
258
|
+
type: "pong",
|
|
259
|
+
event_id: "ping-123",
|
|
260
|
+
}));
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
describe("client tools integration", () => {
|
|
264
|
+
let messageHandler;
|
|
265
|
+
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
266
|
+
mockWebSocket.on.mockImplementation((event, callback) => {
|
|
267
|
+
if (event === "open") {
|
|
268
|
+
setTimeout(() => callback(), 0);
|
|
269
|
+
}
|
|
270
|
+
else if (event === "message") {
|
|
271
|
+
messageHandler = callback;
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
yield conversation.startSession();
|
|
275
|
+
}));
|
|
276
|
+
it("should handle client tool calls", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
277
|
+
// Register a test tool
|
|
278
|
+
mockClientTools.register("test_tool", (params) => {
|
|
279
|
+
return `Tool called with: ${params.input}`;
|
|
280
|
+
});
|
|
281
|
+
const message = {
|
|
282
|
+
type: "client_tool_call",
|
|
283
|
+
client_tool_call: {
|
|
284
|
+
tool_name: "test_tool",
|
|
285
|
+
tool_call_id: "call-123",
|
|
286
|
+
parameters: {
|
|
287
|
+
input: "test input",
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
messageHandler(Buffer.from(JSON.stringify(message)));
|
|
292
|
+
// Wait for async tool execution
|
|
293
|
+
yield new Promise(resolve => setTimeout(resolve, 10));
|
|
294
|
+
expect(mockWebSocket.send).toHaveBeenLastCalledWith(JSON.stringify({
|
|
295
|
+
type: "client_tool_result",
|
|
296
|
+
tool_call_id: "call-123",
|
|
297
|
+
result: "Tool called with: test input",
|
|
298
|
+
is_error: false,
|
|
299
|
+
}));
|
|
300
|
+
}));
|
|
301
|
+
});
|
|
302
|
+
describe("session management", () => {
|
|
303
|
+
it("should properly end session", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
304
|
+
mockWebSocket.on.mockImplementation((event, callback) => {
|
|
305
|
+
if (event === "open") {
|
|
306
|
+
setTimeout(() => callback(), 0);
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
yield conversation.startSession();
|
|
310
|
+
// Wait for session to be fully started
|
|
311
|
+
yield new Promise(resolve => setTimeout(resolve, 10));
|
|
312
|
+
expect(conversation.isSessionActive()).toBe(true);
|
|
313
|
+
conversation.endSession();
|
|
314
|
+
expect(conversation.isSessionActive()).toBe(false);
|
|
315
|
+
expect(mockWebSocket.close).toHaveBeenCalled();
|
|
316
|
+
}));
|
|
317
|
+
it("should emit session events", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
318
|
+
const sessionStartedSpy = jest.fn();
|
|
319
|
+
const sessionEndedSpy = jest.fn();
|
|
320
|
+
conversation.on("session_started", sessionStartedSpy);
|
|
321
|
+
conversation.on("session_ended", sessionEndedSpy);
|
|
322
|
+
mockWebSocket.on.mockImplementation((event, callback) => {
|
|
323
|
+
if (event === "open") {
|
|
324
|
+
setTimeout(() => callback(), 0);
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
yield conversation.startSession();
|
|
328
|
+
conversation.endSession();
|
|
329
|
+
// Wait for events to be emitted
|
|
330
|
+
yield new Promise(resolve => setTimeout(resolve, 10));
|
|
331
|
+
expect(sessionStartedSpy).toHaveBeenCalled();
|
|
332
|
+
expect(sessionEndedSpy).toHaveBeenCalled();
|
|
333
|
+
}));
|
|
334
|
+
});
|
|
335
|
+
describe("audio integration", () => {
|
|
336
|
+
it("should start audio interface on session start", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
337
|
+
const startSpy = jest.spyOn(mockAudioInterface, "start");
|
|
338
|
+
mockWebSocket.on.mockImplementation((event, callback) => {
|
|
339
|
+
if (event === "open") {
|
|
340
|
+
setTimeout(() => callback(), 0);
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
yield conversation.startSession();
|
|
344
|
+
expect(startSpy).toHaveBeenCalled();
|
|
345
|
+
}));
|
|
346
|
+
it("should stop audio interface on session end", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
347
|
+
const stopSpy = jest.spyOn(mockAudioInterface, "stop");
|
|
348
|
+
mockWebSocket.on.mockImplementation((event, callback) => {
|
|
349
|
+
if (event === "open") {
|
|
350
|
+
setTimeout(() => callback(), 0);
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
yield conversation.startSession();
|
|
354
|
+
conversation.endSession();
|
|
355
|
+
expect(stopSpy).toHaveBeenCalled();
|
|
356
|
+
}));
|
|
357
|
+
});
|
|
358
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event types that can be sent from client to orchestrator.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum ClientToOrchestratorEvent {
|
|
5
|
+
/** Response to a ping request. */
|
|
6
|
+
PONG = "pong",
|
|
7
|
+
CLIENT_TOOL_RESULT = "client_tool_result",
|
|
8
|
+
CONVERSATION_INITIATION_CLIENT_DATA = "conversation_initiation_client_data",
|
|
9
|
+
FEEDBACK = "feedback",
|
|
10
|
+
/** Non-interrupting content that is sent to the server to update the conversation state. */
|
|
11
|
+
CONTEXTUAL_UPDATE = "contextual_update",
|
|
12
|
+
/** User text message. */
|
|
13
|
+
USER_MESSAGE = "user_message",
|
|
14
|
+
USER_ACTIVITY = "user_activity"
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Base interface for all client-to-orchestrator events.
|
|
18
|
+
*/
|
|
19
|
+
export interface BaseClientToOrchestratorEvent {
|
|
20
|
+
type: ClientToOrchestratorEvent;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Event for sending user text messages.
|
|
24
|
+
*/
|
|
25
|
+
export interface UserMessageClientToOrchestratorEvent extends BaseClientToOrchestratorEvent {
|
|
26
|
+
type: ClientToOrchestratorEvent.USER_MESSAGE;
|
|
27
|
+
text?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Event for registering user activity (ping to prevent timeout).
|
|
31
|
+
*/
|
|
32
|
+
export interface UserActivityClientToOrchestratorEvent extends BaseClientToOrchestratorEvent {
|
|
33
|
+
type: ClientToOrchestratorEvent.USER_ACTIVITY;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Event for sending non-interrupting contextual updates to the conversation state.
|
|
37
|
+
*/
|
|
38
|
+
export interface ContextualUpdateClientToOrchestratorEvent extends BaseClientToOrchestratorEvent {
|
|
39
|
+
type: ClientToOrchestratorEvent.CONTEXTUAL_UPDATE;
|
|
40
|
+
text: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Event for conversation initiation with client data.
|
|
44
|
+
*/
|
|
45
|
+
export interface ConversationInitiationClientDataEvent extends BaseClientToOrchestratorEvent {
|
|
46
|
+
type: ClientToOrchestratorEvent.CONVERSATION_INITIATION_CLIENT_DATA;
|
|
47
|
+
custom_llm_extra_body?: Record<string, any>;
|
|
48
|
+
conversation_config_override?: Record<string, any>;
|
|
49
|
+
dynamic_variables?: Record<string, any>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Event for client tool results.
|
|
53
|
+
*/
|
|
54
|
+
export interface ClientToolResultEvent extends BaseClientToOrchestratorEvent {
|
|
55
|
+
type: ClientToOrchestratorEvent.CLIENT_TOOL_RESULT;
|
|
56
|
+
tool_call_id?: string;
|
|
57
|
+
result: any;
|
|
58
|
+
is_error: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Event for pong response.
|
|
62
|
+
*/
|
|
63
|
+
export interface PongEvent extends BaseClientToOrchestratorEvent {
|
|
64
|
+
type: ClientToOrchestratorEvent.PONG;
|
|
65
|
+
event_id: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Event for sending feedback.
|
|
69
|
+
*/
|
|
70
|
+
export interface FeedbackEvent extends BaseClientToOrchestratorEvent {
|
|
71
|
+
type: ClientToOrchestratorEvent.FEEDBACK;
|
|
72
|
+
feedback: string;
|
|
73
|
+
rating?: number;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Event for sending user audio chunks.
|
|
77
|
+
*/
|
|
78
|
+
export interface UserAudioChunkEvent {
|
|
79
|
+
user_audio_chunk: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Union type for all client-to-orchestrator events.
|
|
83
|
+
*/
|
|
84
|
+
export type ClientToOrchestratorEventUnion = UserMessageClientToOrchestratorEvent | UserActivityClientToOrchestratorEvent | ContextualUpdateClientToOrchestratorEvent | ConversationInitiationClientDataEvent | ClientToolResultEvent | PongEvent | FeedbackEvent;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientToOrchestratorEvent = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Event types that can be sent from client to orchestrator.
|
|
6
|
+
*/
|
|
7
|
+
var ClientToOrchestratorEvent;
|
|
8
|
+
(function (ClientToOrchestratorEvent) {
|
|
9
|
+
/** Response to a ping request. */
|
|
10
|
+
ClientToOrchestratorEvent["PONG"] = "pong";
|
|
11
|
+
ClientToOrchestratorEvent["CLIENT_TOOL_RESULT"] = "client_tool_result";
|
|
12
|
+
ClientToOrchestratorEvent["CONVERSATION_INITIATION_CLIENT_DATA"] = "conversation_initiation_client_data";
|
|
13
|
+
ClientToOrchestratorEvent["FEEDBACK"] = "feedback";
|
|
14
|
+
/** Non-interrupting content that is sent to the server to update the conversation state. */
|
|
15
|
+
ClientToOrchestratorEvent["CONTEXTUAL_UPDATE"] = "contextual_update";
|
|
16
|
+
/** User text message. */
|
|
17
|
+
ClientToOrchestratorEvent["USER_MESSAGE"] = "user_message";
|
|
18
|
+
ClientToOrchestratorEvent["USER_ACTIVITY"] = "user_activity";
|
|
19
|
+
})(ClientToOrchestratorEvent || (exports.ClientToOrchestratorEvent = ClientToOrchestratorEvent = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Conversation"), exports);
|
|
18
|
+
__exportStar(require("./ClientTools"), exports);
|
|
19
|
+
__exportStar(require("./events"), exports);
|
|
20
|
+
__exportStar(require("./ConversationConfig"), exports);
|
|
21
|
+
__exportStar(require("./DefaultAudioInterface"), exports);
|
|
22
|
+
__exportStar(require("./AudioInterface"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from "events";
|
|
2
|
+
export interface WebSocketInterface extends EventEmitter {
|
|
3
|
+
readyState: number;
|
|
4
|
+
send(data: string): void;
|
|
5
|
+
close(): void;
|
|
6
|
+
}
|
|
7
|
+
export interface WebSocketFactory {
|
|
8
|
+
create(url: string, options?: any): WebSocketInterface;
|
|
9
|
+
}
|
|
10
|
+
export declare class DefaultWebSocketFactory implements WebSocketFactory {
|
|
11
|
+
create(url: string, options?: any): WebSocketInterface;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DefaultWebSocketFactory = void 0;
|
|
7
|
+
const ws_1 = __importDefault(require("ws"));
|
|
8
|
+
class DefaultWebSocketFactory {
|
|
9
|
+
create(url, options) {
|
|
10
|
+
return new ws_1.default(url, options);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.DefaultWebSocketFactory = DefaultWebSocketFactory;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Conversation } from "../Conversation";
|
|
2
|
+
import { MockAudioInterface, MockConversationClient, MockWebSocket } from "./MockConversation";
|
|
3
|
+
import { ClientTools } from "../ClientTools";
|
|
4
|
+
export interface TestConversationSetup {
|
|
5
|
+
conversation: Conversation;
|
|
6
|
+
mockWebSocket: MockWebSocket;
|
|
7
|
+
mockAudio: MockAudioInterface;
|
|
8
|
+
mockClient: MockConversationClient;
|
|
9
|
+
mockTools: ClientTools;
|
|
10
|
+
}
|
|
11
|
+
export declare function createTestConversation(options?: {
|
|
12
|
+
agentId?: string;
|
|
13
|
+
requiresAuth?: boolean;
|
|
14
|
+
config?: any;
|
|
15
|
+
}): TestConversationSetup;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTestConversation = createTestConversation;
|
|
4
|
+
const Conversation_1 = require("../Conversation");
|
|
5
|
+
const MockConversation_1 = require("./MockConversation");
|
|
6
|
+
const ClientTools_1 = require("../ClientTools");
|
|
7
|
+
function createTestConversation(options = {}) {
|
|
8
|
+
const mockWebSocketFactory = new MockConversation_1.MockWebSocketFactory();
|
|
9
|
+
const mockAudio = new MockConversation_1.MockAudioInterface();
|
|
10
|
+
const mockClient = new MockConversation_1.MockConversationClient();
|
|
11
|
+
const mockTools = new ClientTools_1.ClientTools();
|
|
12
|
+
const conversation = new Conversation_1.Conversation({
|
|
13
|
+
conversationClient: mockClient,
|
|
14
|
+
webSocketFactory: mockWebSocketFactory,
|
|
15
|
+
agentId: options.agentId || "test-agent-id",
|
|
16
|
+
requiresAuth: options.requiresAuth || false,
|
|
17
|
+
audioInterface: mockAudio,
|
|
18
|
+
clientTools: mockTools,
|
|
19
|
+
config: options.config
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
conversation,
|
|
23
|
+
mockWebSocket: mockWebSocketFactory.getMockWebSocket(),
|
|
24
|
+
mockAudio,
|
|
25
|
+
mockClient,
|
|
26
|
+
mockTools
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { EventEmitter } from "events";
|
|
2
|
+
import { WebSocketInterface, WebSocketFactory } from "../interfaces/WebSocketInterface";
|
|
3
|
+
import { ConversationClient } from "../interfaces/ConversationClient";
|
|
4
|
+
import { AudioInterface } from "../AudioInterface";
|
|
5
|
+
export declare class MockWebSocket extends EventEmitter implements WebSocketInterface {
|
|
6
|
+
readyState: number;
|
|
7
|
+
private mockMessages;
|
|
8
|
+
send(data: string): void;
|
|
9
|
+
close(): void;
|
|
10
|
+
simulateMessage(message: any): void;
|
|
11
|
+
simulateError(error: Error): void;
|
|
12
|
+
simulateOpen(): void;
|
|
13
|
+
getSentMessages(): any[];
|
|
14
|
+
getLastMessage(): any;
|
|
15
|
+
clearMessages(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare class MockWebSocketFactory implements WebSocketFactory {
|
|
18
|
+
private mockWebSocket;
|
|
19
|
+
create(url: string, options?: any): WebSocketInterface;
|
|
20
|
+
getMockWebSocket(): MockWebSocket;
|
|
21
|
+
}
|
|
22
|
+
export declare class MockAudioInterface extends AudioInterface {
|
|
23
|
+
private inputCallback?;
|
|
24
|
+
private outputBuffer;
|
|
25
|
+
private isStarted;
|
|
26
|
+
start(inputCallback: (audio: Buffer) => void): void;
|
|
27
|
+
stop(): void;
|
|
28
|
+
output(audio: Buffer): void;
|
|
29
|
+
interrupt(): void;
|
|
30
|
+
simulateAudioInput(audio: Buffer): void;
|
|
31
|
+
getOutputBuffer(): Buffer[];
|
|
32
|
+
clearOutputBuffer(): void;
|
|
33
|
+
isAudioStarted(): boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare class MockConversationClient implements ConversationClient {
|
|
36
|
+
private mockSignedUrl;
|
|
37
|
+
conversationalAi: {
|
|
38
|
+
conversations: {
|
|
39
|
+
getSignedUrl: jest.Mock<any, any, any>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
setMockSignedUrl(url: string): void;
|
|
43
|
+
}
|