@elevenlabs/elevenlabs-js 2.46.0 → 2.48.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/.fern/metadata.json +1 -1
- package/BaseClient.js +2 -2
- package/Client.d.ts +3 -0
- package/Client.js +31 -26
- package/README.md +92 -0
- package/api/resources/conversationalAi/conversation/Conversation.js +1 -0
- package/api/resources/conversationalAi/conversation/ConversationConfig.d.ts +2 -0
- package/api/resources/conversationalAi/conversation/events.d.ts +1 -0
- package/api/resources/conversationalAi/resources/agents/client/Client.d.ts +3 -0
- package/api/resources/conversationalAi/resources/agents/client/Client.js +7 -2
- package/api/resources/conversationalAi/resources/agents/resources/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/agents/resources/index.js +2 -1
- package/api/resources/conversationalAi/resources/agents/resources/versions/client/Client.d.ts +27 -0
- package/api/resources/conversationalAi/resources/agents/resources/versions/client/Client.js +116 -0
- package/api/resources/conversationalAi/resources/agents/resources/versions/client/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/agents/resources/versions/client/index.js +2 -0
- package/api/resources/conversationalAi/resources/agents/resources/versions/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/agents/resources/versions/index.js +17 -0
- package/api/resources/conversationalAi/resources/conversations/client/Client.d.ts +3 -2
- package/api/resources/conversationalAi/resources/conversations/client/Client.js +7 -3
- package/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsGetSignedUrlRequest.d.ts +2 -2
- package/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsGetWebrtcTokenRequest.d.ts +2 -2
- package/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +3 -1
- package/api/resources/conversationalAi/resources/conversations/resources/messages/client/Client.d.ts +1 -0
- package/api/resources/conversationalAi/resources/conversations/resources/messages/client/Client.js +5 -1
- package/api/resources/conversationalAi/resources/conversations/resources/messages/client/requests/MessagesSearchRequest.d.ts +1 -1
- package/api/resources/conversationalAi/resources/conversations/resources/messages/client/requests/MessagesTextSearchRequest.d.ts +3 -1
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.d.ts +17 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.js +65 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/requests/BodyUpdateFileDocumentV1ConvaiKnowledgeBaseDocumentationIdUpdateFilePatch.d.ts +11 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/requests/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/document/types/DocumentUpdateFileResponse.d.ts +16 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/document/types/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/document/types/index.js +1 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.d.ts +6 -5
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.js +12 -9
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyUpdateDocumentV1ConvaiKnowledgeBaseDocumentationIdPatch.d.ts +4 -4
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/Client.d.ts +31 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/Client.js +131 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/index.js +17 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/requests/ChunksListRequest.d.ts +17 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/requests/ChunksListRequest.js +3 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/requests/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/requests/index.js +2 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/index.js +17 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/index.d.ts +2 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/index.js +3 -1
- package/api/resources/conversationalAi/resources/phoneNumbers/client/requests/UpdatePhoneNumberRequest.d.ts +4 -0
- package/api/resources/conversationalAi/resources/users/client/requests/UsersListRequest.d.ts +1 -1
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/serviceAccounts/resources/apiKeys/client/requests/BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPost.d.ts +2 -0
- package/api/resources/serviceAccounts/resources/apiKeys/client/requests/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatch.d.ts +2 -0
- package/api/resources/serviceAccounts/resources/apiKeys/types/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchAllowedIps.d.ts +4 -0
- package/api/resources/serviceAccounts/resources/apiKeys/types/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchAllowedIps.js +3 -0
- package/api/resources/serviceAccounts/resources/apiKeys/types/index.d.ts +1 -0
- package/api/resources/serviceAccounts/resources/apiKeys/types/index.js +1 -0
- package/api/resources/speechEngine/client/Client.d.ts +89 -0
- package/api/resources/speechEngine/client/Client.js +363 -0
- package/api/resources/speechEngine/client/index.d.ts +1 -0
- package/api/resources/speechEngine/client/index.js +17 -0
- package/api/resources/speechEngine/client/requests/CreateSpeechEngineRequest.d.ts +31 -0
- package/api/resources/speechEngine/client/requests/CreateSpeechEngineRequest.js +3 -0
- package/api/resources/speechEngine/client/requests/SpeechEngineListRequest.d.ts +23 -0
- package/api/resources/speechEngine/client/requests/SpeechEngineListRequest.js +3 -0
- package/api/resources/speechEngine/client/requests/UpdateSpeechEngineRequest.d.ts +17 -0
- package/api/resources/speechEngine/client/requests/UpdateSpeechEngineRequest.js +3 -0
- package/api/resources/speechEngine/client/requests/index.d.ts +3 -0
- package/api/resources/speechEngine/client/requests/index.js +2 -0
- package/api/resources/speechEngine/index.d.ts +1 -0
- package/api/resources/speechEngine/index.js +17 -0
- package/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost.d.ts +1 -1
- package/api/resources/speechToSpeech/types/SpeechToSpeechConvertRequestOutputFormat.d.ts +17 -10
- package/api/resources/speechToSpeech/types/SpeechToSpeechConvertRequestOutputFormat.js +17 -10
- package/api/resources/voices/client/Client.js +3 -0
- package/api/resources/voices/client/requests/BodyEditVoiceV1VoicesVoiceIdEditPost.d.ts +2 -0
- package/api/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +2 -0
- package/api/resources/workspace/client/Client.d.ts +3 -0
- package/api/resources/workspace/client/Client.js +19 -14
- package/api/resources/workspace/resources/analytics/client/Client.d.ts +12 -0
- package/api/resources/workspace/resources/analytics/client/Client.js +16 -0
- package/api/resources/workspace/resources/analytics/client/index.d.ts +1 -0
- package/api/resources/workspace/resources/analytics/client/index.js +2 -0
- package/api/resources/workspace/resources/analytics/index.d.ts +2 -0
- package/api/resources/workspace/resources/analytics/index.js +18 -0
- package/api/resources/workspace/resources/analytics/resources/index.d.ts +3 -0
- package/api/resources/workspace/resources/analytics/resources/index.js +42 -0
- package/api/resources/workspace/resources/analytics/resources/requests/client/Client.d.ts +26 -0
- package/api/resources/workspace/resources/analytics/resources/requests/client/Client.js +118 -0
- package/api/resources/workspace/resources/analytics/resources/requests/client/index.d.ts +1 -0
- package/api/resources/workspace/resources/analytics/resources/requests/client/index.js +17 -0
- package/api/resources/workspace/resources/analytics/resources/requests/client/requests/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPost.d.ts +16 -0
- package/api/resources/workspace/resources/analytics/resources/requests/client/requests/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPost.js +3 -0
- package/api/resources/workspace/resources/analytics/resources/requests/client/requests/index.d.ts +1 -0
- package/api/resources/workspace/resources/analytics/resources/requests/client/requests/index.js +2 -0
- package/api/resources/workspace/resources/analytics/resources/requests/index.d.ts +2 -0
- package/api/resources/workspace/resources/analytics/resources/requests/index.js +18 -0
- package/api/resources/workspace/resources/analytics/resources/requests/types/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPostSort.d.ts +5 -0
- package/api/resources/workspace/resources/analytics/resources/requests/types/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPostSort.js +8 -0
- package/api/resources/workspace/resources/analytics/resources/requests/types/index.d.ts +1 -0
- package/api/resources/workspace/resources/analytics/resources/requests/types/index.js +17 -0
- package/api/resources/workspace/resources/authConnections/client/Client.d.ts +16 -0
- package/api/resources/workspace/resources/authConnections/client/Client.js +63 -0
- package/api/resources/workspace/resources/authConnections/types/AuthConnectionsCreateRequestBody.d.ts +4 -1
- package/api/resources/workspace/resources/authConnections/types/AuthConnectionsCreateResponse.d.ts +4 -1
- package/api/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateRequestBody.d.ts +16 -0
- package/api/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateRequestBody.js +3 -0
- package/api/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateResponse.d.ts +40 -0
- package/api/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateResponse.js +3 -0
- package/api/resources/workspace/resources/authConnections/types/index.d.ts +2 -0
- package/api/resources/workspace/resources/authConnections/types/index.js +2 -0
- package/api/resources/workspace/resources/index.d.ts +1 -0
- package/api/resources/workspace/resources/index.js +2 -1
- package/api/types/AgentAlertingMonitorConfig.d.ts +6 -0
- package/api/types/AgentAlertingMonitorConfig.js +3 -0
- package/api/types/AgentAlertingSettings.d.ts +7 -0
- package/api/types/AgentAlertingSettings.js +3 -0
- package/api/types/AgentMetadataDbModel.d.ts +7 -0
- package/api/types/AgentMetadataDbModel.js +3 -0
- package/api/types/AgentPlatformSettingsRequestModel.d.ts +1 -0
- package/api/types/AgentPlatformSettingsResponseModel.d.ts +1 -0
- package/api/types/AgentTopicResponseModel.d.ts +3 -0
- package/api/types/AudioIsolationHistoryItemResponseModel.d.ts +1 -0
- package/api/types/BackgroundMusicPresetId.d.ts +4 -0
- package/api/types/BackgroundMusicPresetId.js +4 -0
- package/api/types/BaseTurnConfig.d.ts +17 -0
- package/api/types/BaseTurnConfig.js +3 -0
- package/api/types/ClientEvent.d.ts +1 -0
- package/api/types/ClientEvent.js +1 -0
- package/api/types/CodeToolAllowedDomain.d.ts +6 -0
- package/api/types/CodeToolAllowedDomain.js +3 -0
- package/api/types/ConversationInitiationSource.d.ts +1 -0
- package/api/types/ConversationInitiationSource.js +1 -0
- package/api/types/{ConversationTokenDbModel.d.ts → ConversationTokenResponseModel.d.ts} +2 -2
- package/api/types/ConversationTokenResponseModel.js +3 -0
- package/api/types/CreateBearerAuthRequest.d.ts +8 -0
- package/api/types/CreateBearerAuthRequest.js +3 -0
- package/api/types/CreateSpeechEngineResponse.d.ts +4 -0
- package/api/types/CreateSpeechEngineResponse.js +3 -0
- package/api/types/GetAgentLinkResponseModel.d.ts +1 -1
- package/api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +2 -0
- package/api/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts +2 -0
- package/api/types/InboundSipTrunkConfigRequestModel.d.ts +2 -0
- package/api/types/KnowledgeBaseDocumentChunksResponseModel.d.ts +5 -0
- package/api/types/KnowledgeBaseDocumentChunksResponseModel.js +3 -0
- package/api/types/ListAuthConnectionsResponseAuthConnectionsItem.d.ts +4 -1
- package/api/types/ListCustomerFacingAgentsParams.d.ts +11 -0
- package/api/types/ListCustomerFacingAgentsParams.js +3 -0
- package/api/types/ListSpeechEnginesResponse.d.ts +9 -0
- package/api/types/ListSpeechEnginesResponse.js +3 -0
- package/api/types/Llm.d.ts +6 -0
- package/api/types/Llm.js +6 -0
- package/api/types/LlmInfoModelInput.d.ts +2 -0
- package/api/types/LlmInfoModelOutput.d.ts +2 -0
- package/api/types/LoadProcedureToolConfig.d.ts +4 -0
- package/api/types/LoadProcedureToolConfig.js +3 -0
- package/api/types/LoadProcedureToolErrorStatus.d.ts +5 -0
- package/api/types/LoadProcedureToolErrorStatus.js +8 -0
- package/api/types/Monitor.d.ts +5 -0
- package/api/types/Monitor.js +8 -0
- package/api/types/OAuth2ClientCredsResponse.d.ts +2 -0
- package/api/types/OutboundSipTrunkConfigRequestModel.d.ts +2 -0
- package/api/types/PhoneNumberAgentInfo.d.ts +4 -0
- package/api/types/ProcedureAtVersion.d.ts +12 -0
- package/api/types/ProcedureAtVersion.js +3 -0
- package/api/types/ProcedureCompilerMode.d.ts +1 -1
- package/api/types/ProcedureCompilerMode.js +1 -1
- package/api/types/PromptAgentApiModelInput.d.ts +2 -2
- package/api/types/PromptAgentApiModelOutput.d.ts +2 -2
- package/api/types/PromptAgentApiModelWorkflowOverrideInput.d.ts +2 -2
- package/api/types/PromptAgentApiModelWorkflowOverrideOutput.d.ts +2 -2
- package/api/types/ReadMetadataChapterDbModel.d.ts +1 -0
- package/api/types/RegionalProcessingSurchargeInfo.d.ts +4 -0
- package/api/types/RegionalProcessingSurchargeInfo.js +3 -0
- package/api/types/ReportKnowledgeGapParams.d.ts +3 -0
- package/api/types/ReportKnowledgeGapParams.js +3 -0
- package/api/types/SlackBotAuthResponse.d.ts +10 -0
- package/api/types/SlackBotAuthResponse.js +3 -0
- package/api/types/SpeechEngineResponse.d.ts +27 -0
- package/api/types/SpeechEngineResponse.js +3 -0
- package/api/types/SpeechEngineSummaryResponse.d.ts +10 -0
- package/api/types/SpeechEngineSummaryResponse.js +3 -0
- package/api/types/SystemToolConfigInputParams.d.ts +4 -1
- package/api/types/SystemToolConfigOutputParams.d.ts +4 -1
- package/api/types/TurnConfig.d.ts +2 -2
- package/api/types/TurnConfigWorkflowOverride.d.ts +2 -2
- package/api/types/UpdateBasicAuthRequest.d.ts +5 -0
- package/api/types/UpdateBasicAuthRequest.js +3 -0
- package/api/types/UpdateOAuth2ClientCredsRequest.d.ts +9 -0
- package/api/types/UpdateOAuth2ClientCredsRequest.js +3 -0
- package/api/types/UpdateOAuth2JwtRequest.d.ts +14 -0
- package/api/types/UpdateOAuth2JwtRequest.js +3 -0
- package/api/types/UpdateOAuth2JwtRequestAlgorithm.d.ts +9 -0
- package/api/types/UpdateOAuth2JwtRequestAlgorithm.js +12 -0
- package/api/types/UpdateOAuth2JwtRequestTokenResponseField.d.ts +5 -0
- package/api/types/UpdateOAuth2JwtRequestTokenResponseField.js +8 -0
- package/api/types/WebhookHmacSettings.d.ts +2 -0
- package/api/types/WorkspaceApiKeyResponseModel.d.ts +1 -0
- package/api/types/WorkspaceGroupPermission.d.ts +2 -0
- package/api/types/WorkspaceGroupPermission.js +2 -0
- package/api/types/WorkspaceResourceType.d.ts +2 -0
- package/api/types/WorkspaceResourceType.js +2 -0
- package/api/types/index.d.ts +25 -1
- package/api/types/index.js +25 -1
- package/dist/BaseClient.js +2 -2
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +31 -26
- package/dist/api/resources/conversationalAi/conversation/Conversation.js +1 -0
- package/dist/api/resources/conversationalAi/conversation/ConversationConfig.d.ts +2 -0
- package/dist/api/resources/conversationalAi/conversation/events.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/agents/client/Client.d.ts +3 -0
- package/dist/api/resources/conversationalAi/resources/agents/client/Client.js +7 -2
- package/dist/api/resources/conversationalAi/resources/agents/resources/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/agents/resources/index.js +2 -1
- package/dist/api/resources/conversationalAi/resources/agents/resources/versions/client/Client.d.ts +27 -0
- package/dist/api/resources/conversationalAi/resources/agents/resources/versions/client/Client.js +116 -0
- package/dist/api/resources/conversationalAi/resources/agents/resources/versions/client/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/agents/resources/versions/client/index.js +2 -0
- package/dist/api/resources/conversationalAi/resources/agents/resources/versions/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/agents/resources/versions/index.js +17 -0
- package/dist/api/resources/conversationalAi/resources/conversations/client/Client.d.ts +3 -2
- package/dist/api/resources/conversationalAi/resources/conversations/client/Client.js +7 -3
- package/dist/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsGetSignedUrlRequest.d.ts +2 -2
- package/dist/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsGetWebrtcTokenRequest.d.ts +2 -2
- package/dist/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +3 -1
- package/dist/api/resources/conversationalAi/resources/conversations/resources/messages/client/Client.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/conversations/resources/messages/client/Client.js +5 -1
- package/dist/api/resources/conversationalAi/resources/conversations/resources/messages/client/requests/MessagesSearchRequest.d.ts +1 -1
- package/dist/api/resources/conversationalAi/resources/conversations/resources/messages/client/requests/MessagesTextSearchRequest.d.ts +3 -1
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.d.ts +17 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.js +65 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/requests/BodyUpdateFileDocumentV1ConvaiKnowledgeBaseDocumentationIdUpdateFilePatch.d.ts +11 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/requests/BodyUpdateFileDocumentV1ConvaiKnowledgeBaseDocumentationIdUpdateFilePatch.js +3 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/requests/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/types/DocumentUpdateFileResponse.d.ts +16 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/types/DocumentUpdateFileResponse.js +3 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/types/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/types/index.js +1 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.d.ts +6 -5
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.js +12 -9
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyUpdateDocumentV1ConvaiKnowledgeBaseDocumentationIdPatch.d.ts +4 -4
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/Client.d.ts +31 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/Client.js +131 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/index.js +17 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/requests/ChunksListRequest.d.ts +17 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/requests/ChunksListRequest.js +3 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/requests/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/client/requests/index.js +2 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunks/index.js +17 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/index.d.ts +2 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/index.js +3 -1
- package/dist/api/resources/conversationalAi/resources/phoneNumbers/client/requests/UpdatePhoneNumberRequest.d.ts +4 -0
- package/dist/api/resources/conversationalAi/resources/users/client/requests/UsersListRequest.d.ts +1 -1
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/serviceAccounts/resources/apiKeys/client/requests/BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPost.d.ts +2 -0
- package/dist/api/resources/serviceAccounts/resources/apiKeys/client/requests/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatch.d.ts +2 -0
- package/dist/api/resources/serviceAccounts/resources/apiKeys/types/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchAllowedIps.d.ts +4 -0
- package/dist/api/resources/serviceAccounts/resources/apiKeys/types/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchAllowedIps.js +3 -0
- package/dist/api/resources/serviceAccounts/resources/apiKeys/types/index.d.ts +1 -0
- package/dist/api/resources/serviceAccounts/resources/apiKeys/types/index.js +1 -0
- package/dist/api/resources/speechEngine/client/Client.d.ts +89 -0
- package/dist/api/resources/speechEngine/client/Client.js +363 -0
- package/dist/api/resources/speechEngine/client/index.d.ts +1 -0
- package/dist/api/resources/speechEngine/client/index.js +17 -0
- package/dist/api/resources/speechEngine/client/requests/CreateSpeechEngineRequest.d.ts +31 -0
- package/dist/api/resources/speechEngine/client/requests/CreateSpeechEngineRequest.js +3 -0
- package/dist/api/resources/speechEngine/client/requests/SpeechEngineListRequest.d.ts +23 -0
- package/dist/api/resources/speechEngine/client/requests/SpeechEngineListRequest.js +3 -0
- package/dist/api/resources/speechEngine/client/requests/UpdateSpeechEngineRequest.d.ts +17 -0
- package/dist/api/resources/speechEngine/client/requests/UpdateSpeechEngineRequest.js +3 -0
- package/dist/api/resources/speechEngine/client/requests/index.d.ts +3 -0
- package/dist/api/resources/speechEngine/client/requests/index.js +2 -0
- package/dist/api/resources/speechEngine/index.d.ts +1 -0
- package/dist/api/resources/speechEngine/index.js +17 -0
- package/dist/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost.d.ts +1 -1
- package/dist/api/resources/speechToSpeech/types/SpeechToSpeechConvertRequestOutputFormat.d.ts +17 -10
- package/dist/api/resources/speechToSpeech/types/SpeechToSpeechConvertRequestOutputFormat.js +17 -10
- package/dist/api/resources/voices/client/Client.js +3 -0
- package/dist/api/resources/voices/client/requests/BodyEditVoiceV1VoicesVoiceIdEditPost.d.ts +2 -0
- package/dist/api/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +2 -0
- package/dist/api/resources/workspace/client/Client.d.ts +3 -0
- package/dist/api/resources/workspace/client/Client.js +19 -14
- package/dist/api/resources/workspace/resources/analytics/client/Client.d.ts +12 -0
- package/dist/api/resources/workspace/resources/analytics/client/Client.js +16 -0
- package/dist/api/resources/workspace/resources/analytics/client/index.d.ts +1 -0
- package/dist/api/resources/workspace/resources/analytics/client/index.js +2 -0
- package/dist/api/resources/workspace/resources/analytics/index.d.ts +2 -0
- package/dist/api/resources/workspace/resources/analytics/index.js +18 -0
- package/dist/api/resources/workspace/resources/analytics/resources/index.d.ts +3 -0
- package/dist/api/resources/workspace/resources/analytics/resources/index.js +42 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/client/Client.d.ts +26 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/client/Client.js +118 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/client/index.d.ts +1 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/client/index.js +17 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/client/requests/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPost.d.ts +16 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/client/requests/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPost.js +3 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/client/requests/index.d.ts +1 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/client/requests/index.js +2 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/index.d.ts +2 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/index.js +18 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/types/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPostSort.d.ts +5 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/types/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPostSort.js +8 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/types/index.d.ts +1 -0
- package/dist/api/resources/workspace/resources/analytics/resources/requests/types/index.js +17 -0
- package/dist/api/resources/workspace/resources/authConnections/client/Client.d.ts +16 -0
- package/dist/api/resources/workspace/resources/authConnections/client/Client.js +63 -0
- package/dist/api/resources/workspace/resources/authConnections/types/AuthConnectionsCreateRequestBody.d.ts +4 -1
- package/dist/api/resources/workspace/resources/authConnections/types/AuthConnectionsCreateResponse.d.ts +4 -1
- package/dist/api/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateRequestBody.d.ts +16 -0
- package/dist/api/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateRequestBody.js +3 -0
- package/dist/api/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateResponse.d.ts +40 -0
- package/dist/api/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateResponse.js +3 -0
- package/dist/api/resources/workspace/resources/authConnections/types/index.d.ts +2 -0
- package/dist/api/resources/workspace/resources/authConnections/types/index.js +2 -0
- package/dist/api/resources/workspace/resources/index.d.ts +1 -0
- package/dist/api/resources/workspace/resources/index.js +2 -1
- package/dist/api/types/AgentAlertingMonitorConfig.d.ts +6 -0
- package/dist/api/types/AgentAlertingMonitorConfig.js +3 -0
- package/dist/api/types/AgentAlertingSettings.d.ts +7 -0
- package/dist/api/types/AgentAlertingSettings.js +3 -0
- package/dist/api/types/AgentMetadataDbModel.d.ts +7 -0
- package/dist/api/types/AgentMetadataDbModel.js +3 -0
- package/dist/api/types/AgentPlatformSettingsRequestModel.d.ts +1 -0
- package/dist/api/types/AgentPlatformSettingsResponseModel.d.ts +1 -0
- package/dist/api/types/AgentTopicResponseModel.d.ts +3 -0
- package/dist/api/types/AudioIsolationHistoryItemResponseModel.d.ts +1 -0
- package/dist/api/types/BackgroundMusicPresetId.d.ts +4 -0
- package/dist/api/types/BackgroundMusicPresetId.js +4 -0
- package/dist/api/types/BaseTurnConfig.d.ts +17 -0
- package/dist/api/types/BaseTurnConfig.js +3 -0
- package/dist/api/types/ClientEvent.d.ts +1 -0
- package/dist/api/types/ClientEvent.js +1 -0
- package/dist/api/types/CodeToolAllowedDomain.d.ts +6 -0
- package/dist/api/types/CodeToolAllowedDomain.js +3 -0
- package/dist/api/types/ConversationInitiationSource.d.ts +1 -0
- package/dist/api/types/ConversationInitiationSource.js +1 -0
- package/dist/api/types/{ConversationTokenDbModel.d.ts → ConversationTokenResponseModel.d.ts} +2 -2
- package/dist/api/types/ConversationTokenResponseModel.js +3 -0
- package/dist/api/types/CreateBearerAuthRequest.d.ts +8 -0
- package/dist/api/types/CreateBearerAuthRequest.js +3 -0
- package/dist/api/types/CreateSpeechEngineResponse.d.ts +4 -0
- package/dist/api/types/CreateSpeechEngineResponse.js +3 -0
- package/dist/api/types/GetAgentLinkResponseModel.d.ts +1 -1
- package/dist/api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +2 -0
- package/dist/api/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts +2 -0
- package/dist/api/types/InboundSipTrunkConfigRequestModel.d.ts +2 -0
- package/dist/api/types/KnowledgeBaseDocumentChunksResponseModel.d.ts +5 -0
- package/dist/api/types/KnowledgeBaseDocumentChunksResponseModel.js +3 -0
- package/dist/api/types/ListAuthConnectionsResponseAuthConnectionsItem.d.ts +4 -1
- package/dist/api/types/ListCustomerFacingAgentsParams.d.ts +11 -0
- package/dist/api/types/ListCustomerFacingAgentsParams.js +3 -0
- package/dist/api/types/ListSpeechEnginesResponse.d.ts +9 -0
- package/dist/api/types/ListSpeechEnginesResponse.js +3 -0
- package/dist/api/types/Llm.d.ts +6 -0
- package/dist/api/types/Llm.js +6 -0
- package/dist/api/types/LlmInfoModelInput.d.ts +2 -0
- package/dist/api/types/LlmInfoModelOutput.d.ts +2 -0
- package/dist/api/types/LoadProcedureToolConfig.d.ts +4 -0
- package/dist/api/types/LoadProcedureToolConfig.js +3 -0
- package/dist/api/types/LoadProcedureToolErrorStatus.d.ts +5 -0
- package/dist/api/types/LoadProcedureToolErrorStatus.js +8 -0
- package/dist/api/types/Monitor.d.ts +5 -0
- package/dist/api/types/Monitor.js +8 -0
- package/dist/api/types/OAuth2ClientCredsResponse.d.ts +2 -0
- package/dist/api/types/OutboundSipTrunkConfigRequestModel.d.ts +2 -0
- package/dist/api/types/PhoneNumberAgentInfo.d.ts +4 -0
- package/dist/api/types/ProcedureAtVersion.d.ts +12 -0
- package/dist/api/types/ProcedureAtVersion.js +3 -0
- package/dist/api/types/ProcedureCompilerMode.d.ts +1 -1
- package/dist/api/types/ProcedureCompilerMode.js +1 -1
- package/dist/api/types/PromptAgentApiModelInput.d.ts +2 -2
- package/dist/api/types/PromptAgentApiModelOutput.d.ts +2 -2
- package/dist/api/types/PromptAgentApiModelWorkflowOverrideInput.d.ts +2 -2
- package/dist/api/types/PromptAgentApiModelWorkflowOverrideOutput.d.ts +2 -2
- package/dist/api/types/ReadMetadataChapterDbModel.d.ts +1 -0
- package/dist/api/types/RegionalProcessingSurchargeInfo.d.ts +4 -0
- package/dist/api/types/RegionalProcessingSurchargeInfo.js +3 -0
- package/dist/api/types/ReportKnowledgeGapParams.d.ts +3 -0
- package/dist/api/types/ReportKnowledgeGapParams.js +3 -0
- package/dist/api/types/SlackBotAuthResponse.d.ts +10 -0
- package/dist/api/types/SlackBotAuthResponse.js +3 -0
- package/dist/api/types/SpeechEngineResponse.d.ts +27 -0
- package/dist/api/types/SpeechEngineResponse.js +3 -0
- package/dist/api/types/SpeechEngineSummaryResponse.d.ts +10 -0
- package/dist/api/types/SpeechEngineSummaryResponse.js +3 -0
- package/dist/api/types/SystemToolConfigInputParams.d.ts +4 -1
- package/dist/api/types/SystemToolConfigOutputParams.d.ts +4 -1
- package/dist/api/types/TurnConfig.d.ts +2 -2
- package/dist/api/types/TurnConfigWorkflowOverride.d.ts +2 -2
- package/dist/api/types/UpdateBasicAuthRequest.d.ts +5 -0
- package/dist/api/types/UpdateBasicAuthRequest.js +3 -0
- package/dist/api/types/UpdateOAuth2ClientCredsRequest.d.ts +9 -0
- package/dist/api/types/UpdateOAuth2ClientCredsRequest.js +3 -0
- package/dist/api/types/UpdateOAuth2JwtRequest.d.ts +14 -0
- package/dist/api/types/UpdateOAuth2JwtRequest.js +3 -0
- package/dist/api/types/UpdateOAuth2JwtRequestAlgorithm.d.ts +9 -0
- package/dist/api/types/UpdateOAuth2JwtRequestAlgorithm.js +12 -0
- package/dist/api/types/UpdateOAuth2JwtRequestTokenResponseField.d.ts +5 -0
- package/dist/api/types/UpdateOAuth2JwtRequestTokenResponseField.js +8 -0
- package/dist/api/types/WebhookHmacSettings.d.ts +2 -0
- package/dist/api/types/WorkspaceApiKeyResponseModel.d.ts +1 -0
- package/dist/api/types/WorkspaceGroupPermission.d.ts +2 -0
- package/dist/api/types/WorkspaceGroupPermission.js +2 -0
- package/dist/api/types/WorkspaceResourceType.d.ts +2 -0
- package/dist/api/types/WorkspaceResourceType.js +2 -0
- package/dist/api/types/index.d.ts +25 -1
- package/dist/api/types/index.js +25 -1
- package/dist/serialization/resources/conversationalAi/resources/knowledgeBase/resources/document/types/DocumentUpdateFileResponse.d.ts +23 -0
- package/dist/serialization/resources/conversationalAi/resources/knowledgeBase/resources/document/types/DocumentUpdateFileResponse.js +53 -0
- package/dist/serialization/resources/conversationalAi/resources/knowledgeBase/resources/document/types/index.d.ts +1 -0
- package/dist/serialization/resources/conversationalAi/resources/knowledgeBase/resources/document/types/index.js +1 -0
- package/dist/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyUpdateDocumentV1ConvaiKnowledgeBaseDocumentationIdPatch.d.ts +2 -1
- package/dist/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyUpdateDocumentV1ConvaiKnowledgeBaseDocumentationIdPatch.js +2 -1
- package/dist/serialization/resources/conversationalAi/resources/phoneNumbers/client/requests/UpdatePhoneNumberRequest.d.ts +2 -0
- package/dist/serialization/resources/conversationalAi/resources/phoneNumbers/client/requests/UpdatePhoneNumberRequest.js +2 -0
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +3 -1
- package/dist/serialization/resources/serviceAccounts/resources/apiKeys/client/requests/BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPost.d.ts +1 -0
- package/dist/serialization/resources/serviceAccounts/resources/apiKeys/client/requests/BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPost.js +1 -0
- package/dist/serialization/resources/serviceAccounts/resources/apiKeys/client/requests/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatch.d.ts +2 -0
- package/dist/serialization/resources/serviceAccounts/resources/apiKeys/client/requests/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatch.js +2 -0
- package/dist/serialization/resources/serviceAccounts/resources/apiKeys/types/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchAllowedIps.d.ts +7 -0
- package/dist/serialization/resources/serviceAccounts/resources/apiKeys/types/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchAllowedIps.js +43 -0
- package/dist/serialization/resources/serviceAccounts/resources/apiKeys/types/index.d.ts +1 -0
- package/dist/serialization/resources/serviceAccounts/resources/apiKeys/types/index.js +1 -0
- package/dist/serialization/resources/speechEngine/client/index.d.ts +1 -0
- package/dist/serialization/resources/speechEngine/client/index.js +17 -0
- package/dist/serialization/resources/speechEngine/client/requests/CreateSpeechEngineRequest.d.ts +25 -0
- package/dist/serialization/resources/speechEngine/client/requests/CreateSpeechEngineRequest.js +57 -0
- package/dist/serialization/resources/speechEngine/client/requests/UpdateSpeechEngineRequest.d.ts +25 -0
- package/dist/serialization/resources/speechEngine/client/requests/UpdateSpeechEngineRequest.js +57 -0
- package/dist/serialization/resources/speechEngine/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/speechEngine/client/requests/index.js +7 -0
- package/dist/serialization/resources/speechEngine/index.d.ts +1 -0
- package/dist/serialization/resources/speechEngine/index.js +17 -0
- package/dist/serialization/resources/speechToSpeech/types/SpeechToSpeechConvertRequestOutputFormat.d.ts +1 -1
- package/dist/serialization/resources/speechToSpeech/types/SpeechToSpeechConvertRequestOutputFormat.js +16 -9
- package/dist/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +1 -0
- package/dist/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.js +1 -0
- package/dist/serialization/resources/workspace/resources/analytics/index.d.ts +1 -0
- package/dist/serialization/resources/workspace/resources/analytics/index.js +17 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/index.d.ts +3 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/index.js +42 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/client/index.d.ts +1 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/client/index.js +17 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/client/requests/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPost.d.ts +16 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/client/requests/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPost.js +48 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/client/requests/index.js +5 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/index.d.ts +2 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/index.js +18 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/types/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPostSort.d.ts +7 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/types/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPostSort.js +39 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/types/index.d.ts +1 -0
- package/dist/serialization/resources/workspace/resources/analytics/resources/requests/types/index.js +17 -0
- package/dist/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsCreateRequestBody.d.ts +5 -1
- package/dist/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsCreateRequestBody.js +2 -0
- package/dist/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsCreateResponse.d.ts +5 -1
- package/dist/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsCreateResponse.js +2 -0
- package/dist/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateRequestBody.d.ts +19 -0
- package/dist/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateRequestBody.js +51 -0
- package/dist/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateResponse.d.ts +51 -0
- package/dist/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateResponse.js +67 -0
- package/dist/serialization/resources/workspace/resources/authConnections/types/index.d.ts +2 -0
- package/dist/serialization/resources/workspace/resources/authConnections/types/index.js +2 -0
- package/dist/serialization/resources/workspace/resources/index.d.ts +1 -0
- package/dist/serialization/resources/workspace/resources/index.js +2 -1
- package/dist/serialization/types/AgentAlertingMonitorConfig.d.ts +10 -0
- package/dist/serialization/types/AgentAlertingMonitorConfig.js +42 -0
- package/dist/serialization/types/AgentAlertingSettings.d.ts +11 -0
- package/dist/serialization/types/AgentAlertingSettings.js +43 -0
- package/dist/serialization/types/AgentMetadataDbModel.d.ts +13 -0
- package/dist/serialization/types/AgentMetadataDbModel.js +45 -0
- 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/AgentTopicResponseModel.d.ts +3 -0
- package/dist/serialization/types/AgentTopicResponseModel.js +3 -0
- package/dist/serialization/types/AudioIsolationHistoryItemResponseModel.d.ts +1 -0
- package/dist/serialization/types/AudioIsolationHistoryItemResponseModel.js +1 -0
- package/dist/serialization/types/BackgroundMusicPresetId.d.ts +1 -1
- package/dist/serialization/types/BackgroundMusicPresetId.js +11 -1
- package/dist/serialization/types/BaseTurnConfig.d.ts +17 -0
- package/dist/serialization/types/BaseTurnConfig.js +49 -0
- package/dist/serialization/types/ClientEvent.d.ts +1 -1
- package/dist/serialization/types/ClientEvent.js +1 -0
- package/dist/serialization/types/CodeToolAllowedDomain.d.ts +10 -0
- package/dist/serialization/types/CodeToolAllowedDomain.js +42 -0
- package/dist/serialization/types/ConversationInitiationSource.d.ts +1 -1
- package/dist/serialization/types/ConversationInitiationSource.js +1 -0
- package/dist/serialization/types/{ConversationTokenDbModel.d.ts → ConversationTokenResponseModel.d.ts} +3 -3
- package/dist/serialization/types/{ConversationTokenDbModel.js → ConversationTokenResponseModel.js} +3 -3
- package/dist/serialization/types/CreateBearerAuthRequest.d.ts +11 -0
- package/dist/serialization/types/CreateBearerAuthRequest.js +43 -0
- package/dist/serialization/types/CreateSpeechEngineResponse.d.ts +9 -0
- package/dist/serialization/types/CreateSpeechEngineResponse.js +41 -0
- package/dist/serialization/types/GetAgentLinkResponseModel.d.ts +2 -2
- package/dist/serialization/types/GetAgentLinkResponseModel.js +2 -2
- package/dist/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +1 -0
- package/dist/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js +1 -0
- package/dist/serialization/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts +1 -0
- package/dist/serialization/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.js +1 -0
- package/dist/serialization/types/InboundSipTrunkConfigRequestModel.d.ts +1 -0
- package/dist/serialization/types/InboundSipTrunkConfigRequestModel.js +1 -0
- package/dist/serialization/types/KnowledgeBaseDocumentChunksResponseModel.d.ts +11 -0
- package/dist/serialization/types/KnowledgeBaseDocumentChunksResponseModel.js +43 -0
- package/dist/serialization/types/ListAuthConnectionsResponseAuthConnectionsItem.d.ts +5 -1
- package/dist/serialization/types/ListAuthConnectionsResponseAuthConnectionsItem.js +2 -0
- package/dist/serialization/types/ListCustomerFacingAgentsParams.d.ts +9 -0
- package/dist/serialization/types/ListCustomerFacingAgentsParams.js +41 -0
- package/dist/serialization/types/ListSpeechEnginesResponse.d.ts +12 -0
- package/dist/serialization/types/ListSpeechEnginesResponse.js +44 -0
- package/dist/serialization/types/Llm.d.ts +1 -1
- package/dist/serialization/types/Llm.js +6 -0
- package/dist/serialization/types/LlmInfoModelInput.d.ts +2 -0
- package/dist/serialization/types/LlmInfoModelInput.js +2 -0
- package/dist/serialization/types/LlmInfoModelOutput.d.ts +2 -0
- package/dist/serialization/types/LlmInfoModelOutput.js +2 -0
- package/dist/serialization/types/LoadProcedureToolConfig.d.ts +10 -0
- package/dist/serialization/types/LoadProcedureToolConfig.js +42 -0
- package/dist/serialization/types/LoadProcedureToolErrorStatus.d.ts +7 -0
- package/dist/serialization/types/LoadProcedureToolErrorStatus.js +39 -0
- package/dist/serialization/types/Monitor.d.ts +7 -0
- package/dist/serialization/types/Monitor.js +39 -0
- package/dist/serialization/types/OAuth2ClientCredsResponse.d.ts +1 -0
- package/dist/serialization/types/OAuth2ClientCredsResponse.js +1 -0
- package/dist/serialization/types/OutboundSipTrunkConfigRequestModel.d.ts +1 -0
- package/dist/serialization/types/OutboundSipTrunkConfigRequestModel.js +1 -0
- package/dist/serialization/types/PhoneNumberAgentInfo.d.ts +2 -0
- package/dist/serialization/types/PhoneNumberAgentInfo.js +2 -0
- package/dist/serialization/types/ProcedureAtVersion.d.ts +13 -0
- package/dist/serialization/types/ProcedureAtVersion.js +45 -0
- package/dist/serialization/types/ProcedureCompilerMode.d.ts +1 -1
- package/dist/serialization/types/ProcedureCompilerMode.js +1 -1
- package/dist/serialization/types/ReadMetadataChapterDbModel.d.ts +1 -0
- package/dist/serialization/types/ReadMetadataChapterDbModel.js +1 -0
- package/dist/serialization/types/RegionalProcessingSurchargeInfo.d.ts +9 -0
- package/dist/serialization/types/RegionalProcessingSurchargeInfo.js +41 -0
- package/dist/serialization/types/ReportKnowledgeGapParams.d.ts +9 -0
- package/dist/serialization/types/ReportKnowledgeGapParams.js +41 -0
- package/dist/serialization/types/SlackBotAuthResponse.d.ts +13 -0
- package/dist/serialization/types/SlackBotAuthResponse.js +45 -0
- package/dist/serialization/types/SpeechEngineResponse.d.ts +28 -0
- package/dist/serialization/types/SpeechEngineResponse.js +60 -0
- package/dist/serialization/types/SpeechEngineSummaryResponse.d.ts +12 -0
- package/dist/serialization/types/SpeechEngineSummaryResponse.js +44 -0
- package/dist/serialization/types/SystemToolConfigInputParams.d.ts +5 -1
- package/dist/serialization/types/SystemToolConfigInputParams.js +2 -0
- package/dist/serialization/types/SystemToolConfigOutputParams.d.ts +5 -1
- package/dist/serialization/types/SystemToolConfigOutputParams.js +2 -0
- package/dist/serialization/types/TurnConfig.d.ts +1 -1
- package/dist/serialization/types/TurnConfig.js +1 -1
- package/dist/serialization/types/TurnConfigWorkflowOverride.d.ts +1 -1
- package/dist/serialization/types/TurnConfigWorkflowOverride.js +1 -1
- package/dist/serialization/types/UpdateBasicAuthRequest.d.ts +11 -0
- package/dist/serialization/types/UpdateBasicAuthRequest.js +43 -0
- package/dist/serialization/types/UpdateOAuth2ClientCredsRequest.d.ts +15 -0
- package/dist/serialization/types/UpdateOAuth2ClientCredsRequest.js +47 -0
- package/dist/serialization/types/UpdateOAuth2JwtRequest.d.ts +21 -0
- package/dist/serialization/types/UpdateOAuth2JwtRequest.js +53 -0
- package/dist/serialization/types/UpdateOAuth2JwtRequestAlgorithm.d.ts +7 -0
- package/dist/serialization/types/UpdateOAuth2JwtRequestAlgorithm.js +39 -0
- package/dist/serialization/types/UpdateOAuth2JwtRequestTokenResponseField.d.ts +7 -0
- package/dist/serialization/types/UpdateOAuth2JwtRequestTokenResponseField.js +39 -0
- package/dist/serialization/types/WebhookHmacSettings.d.ts +1 -0
- package/dist/serialization/types/WebhookHmacSettings.js +1 -0
- package/dist/serialization/types/WorkspaceApiKeyResponseModel.d.ts +1 -0
- package/dist/serialization/types/WorkspaceApiKeyResponseModel.js +1 -0
- package/dist/serialization/types/WorkspaceGroupPermission.d.ts +1 -1
- package/dist/serialization/types/WorkspaceGroupPermission.js +2 -0
- package/dist/serialization/types/WorkspaceResourceType.d.ts +1 -1
- package/dist/serialization/types/WorkspaceResourceType.js +2 -0
- package/dist/serialization/types/index.d.ts +25 -1
- package/dist/serialization/types/index.js +25 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/ElevenLabsClient.d.ts +5 -2
- package/dist/wrapper/ElevenLabsClient.js +9 -1
- package/dist/wrapper/index.d.ts +1 -0
- package/dist/wrapper/index.js +8 -1
- package/dist/wrapper/speech-engine/SpeechEngineAttachment.d.ts +21 -0
- package/dist/wrapper/speech-engine/SpeechEngineAttachment.js +34 -0
- package/dist/wrapper/speech-engine/SpeechEngineClientWrapper.d.ts +103 -0
- package/dist/wrapper/speech-engine/SpeechEngineClientWrapper.js +140 -0
- package/dist/wrapper/speech-engine/SpeechEngineResource.d.ts +78 -0
- package/dist/wrapper/speech-engine/SpeechEngineResource.js +261 -0
- package/dist/wrapper/speech-engine/SpeechEngineServer.d.ts +54 -0
- package/dist/wrapper/speech-engine/SpeechEngineServer.js +135 -0
- package/dist/wrapper/speech-engine/SpeechEngineSession.d.ts +79 -0
- package/dist/wrapper/speech-engine/SpeechEngineSession.js +300 -0
- package/dist/wrapper/speech-engine/index.d.ts +7 -0
- package/dist/wrapper/speech-engine/index.js +47 -0
- package/dist/wrapper/speech-engine/namespace.d.ts +27 -0
- package/dist/wrapper/speech-engine/namespace.js +37 -0
- package/dist/wrapper/speech-engine/types.d.ts +67 -0
- package/dist/wrapper/speech-engine/types.js +15 -0
- package/package.json +1 -1
- package/reference.md +725 -33
- package/serialization/resources/conversationalAi/resources/knowledgeBase/resources/document/types/DocumentUpdateFileResponse.d.ts +23 -0
- package/serialization/resources/conversationalAi/resources/knowledgeBase/resources/document/types/DocumentUpdateFileResponse.js +53 -0
- package/serialization/resources/conversationalAi/resources/knowledgeBase/resources/document/types/index.d.ts +1 -0
- package/serialization/resources/conversationalAi/resources/knowledgeBase/resources/document/types/index.js +1 -0
- package/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyUpdateDocumentV1ConvaiKnowledgeBaseDocumentationIdPatch.d.ts +2 -1
- package/serialization/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyUpdateDocumentV1ConvaiKnowledgeBaseDocumentationIdPatch.js +2 -1
- package/serialization/resources/conversationalAi/resources/phoneNumbers/client/requests/UpdatePhoneNumberRequest.d.ts +2 -0
- package/serialization/resources/conversationalAi/resources/phoneNumbers/client/requests/UpdatePhoneNumberRequest.js +2 -0
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +3 -1
- package/serialization/resources/serviceAccounts/resources/apiKeys/client/requests/BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPost.d.ts +1 -0
- package/serialization/resources/serviceAccounts/resources/apiKeys/client/requests/BodyCreateServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysPost.js +1 -0
- package/serialization/resources/serviceAccounts/resources/apiKeys/client/requests/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatch.d.ts +2 -0
- package/serialization/resources/serviceAccounts/resources/apiKeys/client/requests/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatch.js +2 -0
- package/serialization/resources/serviceAccounts/resources/apiKeys/types/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchAllowedIps.d.ts +7 -0
- package/serialization/resources/serviceAccounts/resources/apiKeys/types/BodyEditServiceAccountApiKeyV1ServiceAccountsServiceAccountUserIdApiKeysApiKeyIdPatchAllowedIps.js +43 -0
- package/serialization/resources/serviceAccounts/resources/apiKeys/types/index.d.ts +1 -0
- package/serialization/resources/serviceAccounts/resources/apiKeys/types/index.js +1 -0
- package/serialization/resources/speechEngine/client/index.d.ts +1 -0
- package/serialization/resources/speechEngine/client/index.js +17 -0
- package/serialization/resources/speechEngine/client/requests/CreateSpeechEngineRequest.d.ts +25 -0
- package/serialization/resources/speechEngine/client/requests/CreateSpeechEngineRequest.js +57 -0
- package/serialization/resources/speechEngine/client/requests/UpdateSpeechEngineRequest.d.ts +25 -0
- package/serialization/resources/speechEngine/client/requests/UpdateSpeechEngineRequest.js +57 -0
- package/serialization/resources/speechEngine/client/requests/index.d.ts +2 -0
- package/serialization/resources/speechEngine/client/requests/index.js +7 -0
- package/serialization/resources/speechEngine/index.d.ts +1 -0
- package/serialization/resources/speechEngine/index.js +17 -0
- package/serialization/resources/speechToSpeech/types/SpeechToSpeechConvertRequestOutputFormat.d.ts +1 -1
- package/serialization/resources/speechToSpeech/types/SpeechToSpeechConvertRequestOutputFormat.js +16 -9
- package/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +1 -0
- package/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.js +1 -0
- package/serialization/resources/workspace/resources/analytics/index.d.ts +1 -0
- package/serialization/resources/workspace/resources/analytics/index.js +17 -0
- package/serialization/resources/workspace/resources/analytics/resources/index.d.ts +3 -0
- package/serialization/resources/workspace/resources/analytics/resources/index.js +42 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/client/index.d.ts +1 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/client/index.js +17 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/client/requests/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPost.d.ts +16 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/client/requests/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPost.js +48 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/client/requests/index.d.ts +1 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/client/requests/index.js +5 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/index.d.ts +2 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/index.js +18 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/types/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPostSort.d.ts +7 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/types/BodyListApiRequestsV1WorkspaceAnalyticsRequestsPostSort.js +39 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/types/index.d.ts +1 -0
- package/serialization/resources/workspace/resources/analytics/resources/requests/types/index.js +17 -0
- package/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsCreateRequestBody.d.ts +5 -1
- package/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsCreateRequestBody.js +2 -0
- package/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsCreateResponse.d.ts +5 -1
- package/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsCreateResponse.js +2 -0
- package/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateRequestBody.d.ts +19 -0
- package/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateRequestBody.js +51 -0
- package/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateResponse.d.ts +51 -0
- package/serialization/resources/workspace/resources/authConnections/types/AuthConnectionsUpdateResponse.js +67 -0
- package/serialization/resources/workspace/resources/authConnections/types/index.d.ts +2 -0
- package/serialization/resources/workspace/resources/authConnections/types/index.js +2 -0
- package/serialization/resources/workspace/resources/index.d.ts +1 -0
- package/serialization/resources/workspace/resources/index.js +2 -1
- package/serialization/types/AgentAlertingMonitorConfig.d.ts +10 -0
- package/serialization/types/AgentAlertingMonitorConfig.js +42 -0
- package/serialization/types/AgentAlertingSettings.d.ts +11 -0
- package/serialization/types/AgentAlertingSettings.js +43 -0
- package/serialization/types/AgentMetadataDbModel.d.ts +13 -0
- package/serialization/types/AgentMetadataDbModel.js +45 -0
- 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/AgentTopicResponseModel.d.ts +3 -0
- package/serialization/types/AgentTopicResponseModel.js +3 -0
- package/serialization/types/AudioIsolationHistoryItemResponseModel.d.ts +1 -0
- package/serialization/types/AudioIsolationHistoryItemResponseModel.js +1 -0
- package/serialization/types/BackgroundMusicPresetId.d.ts +1 -1
- package/serialization/types/BackgroundMusicPresetId.js +11 -1
- package/serialization/types/BaseTurnConfig.d.ts +17 -0
- package/serialization/types/BaseTurnConfig.js +49 -0
- package/serialization/types/ClientEvent.d.ts +1 -1
- package/serialization/types/ClientEvent.js +1 -0
- package/serialization/types/CodeToolAllowedDomain.d.ts +10 -0
- package/serialization/types/CodeToolAllowedDomain.js +42 -0
- package/serialization/types/ConversationInitiationSource.d.ts +1 -1
- package/serialization/types/ConversationInitiationSource.js +1 -0
- package/serialization/types/{ConversationTokenDbModel.d.ts → ConversationTokenResponseModel.d.ts} +3 -3
- package/serialization/types/{ConversationTokenDbModel.js → ConversationTokenResponseModel.js} +3 -3
- package/serialization/types/CreateBearerAuthRequest.d.ts +11 -0
- package/serialization/types/CreateBearerAuthRequest.js +43 -0
- package/serialization/types/CreateSpeechEngineResponse.d.ts +9 -0
- package/serialization/types/CreateSpeechEngineResponse.js +41 -0
- package/serialization/types/GetAgentLinkResponseModel.d.ts +2 -2
- package/serialization/types/GetAgentLinkResponseModel.js +2 -2
- package/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +1 -0
- package/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js +1 -0
- package/serialization/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts +1 -0
- package/serialization/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.js +1 -0
- package/serialization/types/InboundSipTrunkConfigRequestModel.d.ts +1 -0
- package/serialization/types/InboundSipTrunkConfigRequestModel.js +1 -0
- package/serialization/types/KnowledgeBaseDocumentChunksResponseModel.d.ts +11 -0
- package/serialization/types/KnowledgeBaseDocumentChunksResponseModel.js +43 -0
- package/serialization/types/ListAuthConnectionsResponseAuthConnectionsItem.d.ts +5 -1
- package/serialization/types/ListAuthConnectionsResponseAuthConnectionsItem.js +2 -0
- package/serialization/types/ListCustomerFacingAgentsParams.d.ts +9 -0
- package/serialization/types/ListCustomerFacingAgentsParams.js +41 -0
- package/serialization/types/ListSpeechEnginesResponse.d.ts +12 -0
- package/serialization/types/ListSpeechEnginesResponse.js +44 -0
- package/serialization/types/Llm.d.ts +1 -1
- package/serialization/types/Llm.js +6 -0
- package/serialization/types/LlmInfoModelInput.d.ts +2 -0
- package/serialization/types/LlmInfoModelInput.js +2 -0
- package/serialization/types/LlmInfoModelOutput.d.ts +2 -0
- package/serialization/types/LlmInfoModelOutput.js +2 -0
- package/serialization/types/LoadProcedureToolConfig.d.ts +10 -0
- package/serialization/types/LoadProcedureToolConfig.js +42 -0
- package/serialization/types/LoadProcedureToolErrorStatus.d.ts +7 -0
- package/serialization/types/LoadProcedureToolErrorStatus.js +39 -0
- package/serialization/types/Monitor.d.ts +7 -0
- package/serialization/types/Monitor.js +39 -0
- package/serialization/types/OAuth2ClientCredsResponse.d.ts +1 -0
- package/serialization/types/OAuth2ClientCredsResponse.js +1 -0
- package/serialization/types/OutboundSipTrunkConfigRequestModel.d.ts +1 -0
- package/serialization/types/OutboundSipTrunkConfigRequestModel.js +1 -0
- package/serialization/types/PhoneNumberAgentInfo.d.ts +2 -0
- package/serialization/types/PhoneNumberAgentInfo.js +2 -0
- package/serialization/types/ProcedureAtVersion.d.ts +13 -0
- package/serialization/types/ProcedureAtVersion.js +45 -0
- package/serialization/types/ProcedureCompilerMode.d.ts +1 -1
- package/serialization/types/ProcedureCompilerMode.js +1 -1
- package/serialization/types/ReadMetadataChapterDbModel.d.ts +1 -0
- package/serialization/types/ReadMetadataChapterDbModel.js +1 -0
- package/serialization/types/RegionalProcessingSurchargeInfo.d.ts +9 -0
- package/serialization/types/RegionalProcessingSurchargeInfo.js +41 -0
- package/serialization/types/ReportKnowledgeGapParams.d.ts +9 -0
- package/serialization/types/ReportKnowledgeGapParams.js +41 -0
- package/serialization/types/SlackBotAuthResponse.d.ts +13 -0
- package/serialization/types/SlackBotAuthResponse.js +45 -0
- package/serialization/types/SpeechEngineResponse.d.ts +28 -0
- package/serialization/types/SpeechEngineResponse.js +60 -0
- package/serialization/types/SpeechEngineSummaryResponse.d.ts +12 -0
- package/serialization/types/SpeechEngineSummaryResponse.js +44 -0
- package/serialization/types/SystemToolConfigInputParams.d.ts +5 -1
- package/serialization/types/SystemToolConfigInputParams.js +2 -0
- package/serialization/types/SystemToolConfigOutputParams.d.ts +5 -1
- package/serialization/types/SystemToolConfigOutputParams.js +2 -0
- package/serialization/types/TurnConfig.d.ts +1 -1
- package/serialization/types/TurnConfig.js +1 -1
- package/serialization/types/TurnConfigWorkflowOverride.d.ts +1 -1
- package/serialization/types/TurnConfigWorkflowOverride.js +1 -1
- package/serialization/types/UpdateBasicAuthRequest.d.ts +11 -0
- package/serialization/types/UpdateBasicAuthRequest.js +43 -0
- package/serialization/types/UpdateOAuth2ClientCredsRequest.d.ts +15 -0
- package/serialization/types/UpdateOAuth2ClientCredsRequest.js +47 -0
- package/serialization/types/UpdateOAuth2JwtRequest.d.ts +21 -0
- package/serialization/types/UpdateOAuth2JwtRequest.js +53 -0
- package/serialization/types/UpdateOAuth2JwtRequestAlgorithm.d.ts +7 -0
- package/serialization/types/UpdateOAuth2JwtRequestAlgorithm.js +39 -0
- package/serialization/types/UpdateOAuth2JwtRequestTokenResponseField.d.ts +7 -0
- package/serialization/types/UpdateOAuth2JwtRequestTokenResponseField.js +39 -0
- package/serialization/types/WebhookHmacSettings.d.ts +1 -0
- package/serialization/types/WebhookHmacSettings.js +1 -0
- package/serialization/types/WorkspaceApiKeyResponseModel.d.ts +1 -0
- package/serialization/types/WorkspaceApiKeyResponseModel.js +1 -0
- package/serialization/types/WorkspaceGroupPermission.d.ts +1 -1
- package/serialization/types/WorkspaceGroupPermission.js +2 -0
- package/serialization/types/WorkspaceResourceType.d.ts +1 -1
- package/serialization/types/WorkspaceResourceType.js +2 -0
- package/serialization/types/index.d.ts +25 -1
- package/serialization/types/index.js +25 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/ElevenLabsClient.d.ts +5 -2
- package/wrapper/ElevenLabsClient.js +9 -1
- package/wrapper/index.d.ts +1 -0
- package/wrapper/index.js +8 -1
- package/wrapper/speech-engine/SpeechEngineAttachment.d.ts +21 -0
- package/wrapper/speech-engine/SpeechEngineAttachment.js +34 -0
- package/wrapper/speech-engine/SpeechEngineClientWrapper.d.ts +103 -0
- package/wrapper/speech-engine/SpeechEngineClientWrapper.js +140 -0
- package/wrapper/speech-engine/SpeechEngineResource.d.ts +78 -0
- package/wrapper/speech-engine/SpeechEngineResource.js +261 -0
- package/wrapper/speech-engine/SpeechEngineServer.d.ts +54 -0
- package/wrapper/speech-engine/SpeechEngineServer.js +135 -0
- package/wrapper/speech-engine/SpeechEngineSession.d.ts +79 -0
- package/wrapper/speech-engine/SpeechEngineSession.js +300 -0
- package/wrapper/speech-engine/index.d.ts +7 -0
- package/wrapper/speech-engine/index.js +47 -0
- package/wrapper/speech-engine/namespace.d.ts +27 -0
- package/wrapper/speech-engine/namespace.js +37 -0
- package/wrapper/speech-engine/types.d.ts +67 -0
- package/wrapper/speech-engine/types.js +15 -0
- /package/api/{types/ConversationTokenDbModel.js → resources/conversationalAi/resources/knowledgeBase/resources/document/client/requests/BodyUpdateFileDocumentV1ConvaiKnowledgeBaseDocumentationIdUpdateFilePatch.js} +0 -0
- /package/{dist/api/types/ConversationTokenDbModel.js → api/resources/conversationalAi/resources/knowledgeBase/resources/document/types/DocumentUpdateFileResponse.js} +0 -0
|
@@ -0,0 +1,300 @@
|
|
|
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
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
12
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
13
|
+
var m = o[Symbol.asyncIterator], i;
|
|
14
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
15
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
16
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
17
|
+
};
|
|
18
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.SpeechEngineSession = void 0;
|
|
23
|
+
const node_events_1 = require("node:events");
|
|
24
|
+
const ws_1 = __importDefault(require("ws"));
|
|
25
|
+
const types_1 = require("./types");
|
|
26
|
+
/**
|
|
27
|
+
* Wraps a WebSocket connection from the ElevenLabs Speech Engine API into a
|
|
28
|
+
* typed, event-driven session.
|
|
29
|
+
*
|
|
30
|
+
* The ElevenLabs API connects to the developer's server via WebSocket. Each
|
|
31
|
+
* connection represents one conversation. The session emits events for
|
|
32
|
+
* transcripts and lifecycle changes, and provides methods to send LLM
|
|
33
|
+
* responses back. When a new transcript arrives, the previous transcript's
|
|
34
|
+
* abort signal is fired automatically, cancelling any in-flight LLM call.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* import { SpeechEngine } from "@elevenlabs/elevenlabs-js";
|
|
39
|
+
*
|
|
40
|
+
* wss.on("connection", (ws) => {
|
|
41
|
+
* const session = new SpeechEngine.Session(ws);
|
|
42
|
+
*
|
|
43
|
+
* session.on(SpeechEngine.USER_TRANSCRIPT, async (transcript, { signal }) => {
|
|
44
|
+
* const response = await llm.generate(transcript, { signal });
|
|
45
|
+
* session.sendResponse(response);
|
|
46
|
+
* });
|
|
47
|
+
* });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
class SpeechEngineSession {
|
|
51
|
+
constructor(ws, options) {
|
|
52
|
+
this.emitter = new node_events_1.EventEmitter();
|
|
53
|
+
this.currentAbortController = null;
|
|
54
|
+
this.inTranscriptHandler = false;
|
|
55
|
+
this.closed = false;
|
|
56
|
+
this.ws = ws;
|
|
57
|
+
this.log = (options === null || options === void 0 ? void 0 : options.debug) ? (...args) => console.log("[SpeechEngine]", ...args) : () => { };
|
|
58
|
+
this.setupWebSocket();
|
|
59
|
+
}
|
|
60
|
+
// -----------------------------------------------------------------------
|
|
61
|
+
// Event emitter interface
|
|
62
|
+
// -----------------------------------------------------------------------
|
|
63
|
+
on(event, listener) {
|
|
64
|
+
this.emitter.on(event, listener);
|
|
65
|
+
return this;
|
|
66
|
+
}
|
|
67
|
+
off(event, listener) {
|
|
68
|
+
this.emitter.off(event, listener);
|
|
69
|
+
return this;
|
|
70
|
+
}
|
|
71
|
+
once(event, listener) {
|
|
72
|
+
this.emitter.once(event, listener);
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
// -----------------------------------------------------------------------
|
|
76
|
+
// Sending responses
|
|
77
|
+
// -----------------------------------------------------------------------
|
|
78
|
+
/**
|
|
79
|
+
* Send an LLM response back to the Speech Engine API for TTS synthesis.
|
|
80
|
+
*
|
|
81
|
+
* Accepts a complete string, an `AsyncIterable<string>` for streaming
|
|
82
|
+
* token-by-token responses, or an LLM stream that yields event objects
|
|
83
|
+
* (e.g. an OpenAI Responses API stream). Event objects are automatically
|
|
84
|
+
* parsed to extract text deltas.
|
|
85
|
+
*/
|
|
86
|
+
sendResponse(response) {
|
|
87
|
+
if (this.closed) {
|
|
88
|
+
throw new Error("Cannot send response: session is closed");
|
|
89
|
+
}
|
|
90
|
+
if (!this.inTranscriptHandler) {
|
|
91
|
+
console.warn("[SpeechEngine] sendResponse() called outside of an onTranscript handler. " +
|
|
92
|
+
"Responses can only be sent in reply to a user transcript. " +
|
|
93
|
+
"To have the agent speak first, set a first message in your Speech Engine conversation config on the client.");
|
|
94
|
+
return Promise.resolve();
|
|
95
|
+
}
|
|
96
|
+
if (typeof response === "string") {
|
|
97
|
+
this.log(`sending string response: "${response}", event_id=${this.currentEventId}`);
|
|
98
|
+
this.sendAgentResponse(response, false);
|
|
99
|
+
this.sendAgentResponse("", true);
|
|
100
|
+
return Promise.resolve();
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.log(`starting streamed response, event_id=${this.currentEventId}`);
|
|
104
|
+
return this.streamResponse(response).catch((err) => {
|
|
105
|
+
if ((0, types_1.isAbortError)(err))
|
|
106
|
+
return;
|
|
107
|
+
this.emitter.emit("error", err instanceof Error ? err : new Error(String(err)));
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Close the session and the underlying WebSocket connection.
|
|
113
|
+
*/
|
|
114
|
+
close() {
|
|
115
|
+
if (this.closed)
|
|
116
|
+
return;
|
|
117
|
+
this.closed = true;
|
|
118
|
+
this.inTranscriptHandler = false;
|
|
119
|
+
this.abortCurrent();
|
|
120
|
+
this.ws.close();
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The conversation ID assigned by the Speech Engine API, available after
|
|
124
|
+
* the `init` event.
|
|
125
|
+
*/
|
|
126
|
+
get conversationId() {
|
|
127
|
+
return this._conversationId;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Whether the session is still open.
|
|
131
|
+
*/
|
|
132
|
+
get isOpen() {
|
|
133
|
+
return !this.closed && this.ws.readyState === ws_1.default.OPEN;
|
|
134
|
+
}
|
|
135
|
+
// -----------------------------------------------------------------------
|
|
136
|
+
// Internals
|
|
137
|
+
// -----------------------------------------------------------------------
|
|
138
|
+
setupWebSocket() {
|
|
139
|
+
this.ws.on("message", (data) => {
|
|
140
|
+
try {
|
|
141
|
+
const msg = JSON.parse(data.toString());
|
|
142
|
+
this.handleMessage(msg);
|
|
143
|
+
}
|
|
144
|
+
catch (err) {
|
|
145
|
+
this.emitter.emit("error", err instanceof Error ? err : new Error(String(err)));
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
this.ws.on("close", () => {
|
|
149
|
+
this.closed = true;
|
|
150
|
+
this.inTranscriptHandler = false;
|
|
151
|
+
this.abortCurrent();
|
|
152
|
+
this.emitter.emit("disconnected");
|
|
153
|
+
});
|
|
154
|
+
this.ws.on("error", (err) => {
|
|
155
|
+
this.emitter.emit("error", err);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
handleMessage(msg) {
|
|
159
|
+
switch (msg.type) {
|
|
160
|
+
case "init": {
|
|
161
|
+
this._conversationId = msg.conversation_id;
|
|
162
|
+
this.log(`session initialized, conversation_id=${msg.conversation_id}`);
|
|
163
|
+
this.emitter.emit("init", msg.conversation_id);
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
case "user_transcript": {
|
|
167
|
+
if (msg.event_id !== undefined && msg.event_id === this.currentEventId && this.currentAbortController !== null) {
|
|
168
|
+
this.log(`skipping duplicate transcript, event_id=${msg.event_id}`);
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
const wasActive = this.currentAbortController !== null;
|
|
172
|
+
this.abortCurrent();
|
|
173
|
+
if (wasActive) {
|
|
174
|
+
this.log(`interrupted: aborting previous response (event_id=${this.currentEventId}) for new transcript (event_id=${msg.event_id})`);
|
|
175
|
+
}
|
|
176
|
+
this.currentAbortController = new AbortController();
|
|
177
|
+
this.currentEventId = msg.event_id;
|
|
178
|
+
this.log(`received transcript, event_id=${msg.event_id}, messages=${msg.user_transcript.length}`);
|
|
179
|
+
this.inTranscriptHandler = true;
|
|
180
|
+
this.emitter.emit("user_transcript", msg.user_transcript, this.currentAbortController.signal);
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
case "ping": {
|
|
184
|
+
this.send({ type: "pong" });
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
case "close": {
|
|
188
|
+
this.inTranscriptHandler = false;
|
|
189
|
+
this.abortCurrent();
|
|
190
|
+
this.emitter.emit("close");
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
case "error": {
|
|
194
|
+
this.emitter.emit("error", new Error(msg.message));
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
default: {
|
|
198
|
+
// Unknown message types are silently ignored so the SDK
|
|
199
|
+
// stays forward-compatible as the protocol evolves.
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
streamResponse(stream) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
var _a, stream_1, stream_1_1;
|
|
207
|
+
var _b, e_1, _c, _d;
|
|
208
|
+
const eventId = this.currentEventId;
|
|
209
|
+
let chunks = 0;
|
|
210
|
+
try {
|
|
211
|
+
for (_a = true, stream_1 = __asyncValues(stream); stream_1_1 = yield stream_1.next(), _b = stream_1_1.done, !_b; _a = true) {
|
|
212
|
+
_d = stream_1_1.value;
|
|
213
|
+
_a = false;
|
|
214
|
+
const chunk = _d;
|
|
215
|
+
if (this.closed) {
|
|
216
|
+
this.log(`stream stopped: session closed after ${chunks} chunks, event_id=${eventId}`);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
const text = this.extractText(chunk);
|
|
220
|
+
if (text) {
|
|
221
|
+
chunks++;
|
|
222
|
+
this.sendAgentResponse(text, false, eventId);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
227
|
+
finally {
|
|
228
|
+
try {
|
|
229
|
+
if (!_a && !_b && (_c = stream_1.return)) yield _c.call(stream_1);
|
|
230
|
+
}
|
|
231
|
+
finally { if (e_1) throw e_1.error; }
|
|
232
|
+
}
|
|
233
|
+
if (!this.closed) {
|
|
234
|
+
this.log(`stream complete: ${chunks} chunks sent, event_id=${eventId}`);
|
|
235
|
+
this.sendAgentResponse("", true, eventId);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Extract text content from a stream chunk. Handles plain strings and
|
|
241
|
+
* common LLM stream event formats:
|
|
242
|
+
*
|
|
243
|
+
* - OpenAI Responses API (`response.output_text.delta`)
|
|
244
|
+
* - OpenAI Chat Completions API (`choices[0].delta.content`)
|
|
245
|
+
* - Anthropic Messages API (`content_block_delta` with `text_delta`)
|
|
246
|
+
* - Google Gemini API (`candidates[0].content.parts[0].text`)
|
|
247
|
+
*/
|
|
248
|
+
extractText(chunk) {
|
|
249
|
+
var _a, _b, _c;
|
|
250
|
+
if (typeof chunk === "string")
|
|
251
|
+
return chunk;
|
|
252
|
+
if (typeof chunk !== "object" || chunk === null)
|
|
253
|
+
return null;
|
|
254
|
+
const event = chunk;
|
|
255
|
+
// OpenAI Responses API: { type: "response.output_text.delta", delta: "text" }
|
|
256
|
+
if (event.type === "response.output_text.delta" && typeof event.delta === "string") {
|
|
257
|
+
return event.delta;
|
|
258
|
+
}
|
|
259
|
+
// OpenAI Chat Completions API: { choices: [{ delta: { content: "text" } }] }
|
|
260
|
+
if (Array.isArray(event.choices)) {
|
|
261
|
+
const content = (_a = event.choices[0]) === null || _a === void 0 ? void 0 : _a.delta;
|
|
262
|
+
if (typeof content === "object" && content !== null && typeof content.content === "string") {
|
|
263
|
+
return content.content;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
// Anthropic Messages API: { type: "content_block_delta", delta: { type: "text_delta", text: "text" } }
|
|
267
|
+
if (event.type === "content_block_delta" && typeof event.delta === "object" && event.delta !== null) {
|
|
268
|
+
const delta = event.delta;
|
|
269
|
+
if (delta.type === "text_delta" && typeof delta.text === "string") {
|
|
270
|
+
return delta.text;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
// Google Gemini API: { candidates: [{ content: { parts: [{ text: "text" }] } }] }
|
|
274
|
+
if (Array.isArray(event.candidates)) {
|
|
275
|
+
const content = (_b = event.candidates[0]) === null || _b === void 0 ? void 0 : _b.content;
|
|
276
|
+
if (typeof content === "object" && content !== null) {
|
|
277
|
+
const parts = content.parts;
|
|
278
|
+
if (Array.isArray(parts) && typeof ((_c = parts[0]) === null || _c === void 0 ? void 0 : _c.text) === "string") {
|
|
279
|
+
return parts[0].text;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return null;
|
|
284
|
+
}
|
|
285
|
+
sendAgentResponse(content, isFinal, eventId) {
|
|
286
|
+
this.send({ type: "agent_response", content, event_id: eventId !== null && eventId !== void 0 ? eventId : this.currentEventId, is_final: isFinal });
|
|
287
|
+
}
|
|
288
|
+
send(msg) {
|
|
289
|
+
if (this.closed)
|
|
290
|
+
return;
|
|
291
|
+
this.ws.send(JSON.stringify(msg));
|
|
292
|
+
}
|
|
293
|
+
abortCurrent() {
|
|
294
|
+
if (this.currentAbortController) {
|
|
295
|
+
this.currentAbortController.abort();
|
|
296
|
+
this.currentAbortController = null;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
exports.SpeechEngineSession = SpeechEngineSession;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * as SpeechEngine from "./namespace";
|
|
2
|
+
export { SpeechEngineSession } from "./SpeechEngineSession";
|
|
3
|
+
export { SpeechEngineServer, type SpeechEngineServerOptions } from "./SpeechEngineServer";
|
|
4
|
+
export { SpeechEngineResource } from "./SpeechEngineResource";
|
|
5
|
+
export { SpeechEngineAttachment } from "./SpeechEngineAttachment";
|
|
6
|
+
export { SpeechEngineClientWrapper } from "./SpeechEngineClientWrapper";
|
|
7
|
+
export type { TranscriptMessage, InitMessage, UserTranscriptMessage, PingMessage, CloseMessage, ErrorMessage, IncomingMessage, AgentResponseMessage, PongMessage, OutgoingMessage, SpeechEngineEventMap, SpeechEngineEventName, SpeechEngineCallbacks, WebSocketLike, } from "./types";
|
|
@@ -0,0 +1,47 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SpeechEngineClientWrapper = exports.SpeechEngineAttachment = exports.SpeechEngineResource = exports.SpeechEngineServer = exports.SpeechEngineSession = exports.SpeechEngine = void 0;
|
|
37
|
+
exports.SpeechEngine = __importStar(require("./namespace"));
|
|
38
|
+
var SpeechEngineSession_1 = require("./SpeechEngineSession");
|
|
39
|
+
Object.defineProperty(exports, "SpeechEngineSession", { enumerable: true, get: function () { return SpeechEngineSession_1.SpeechEngineSession; } });
|
|
40
|
+
var SpeechEngineServer_1 = require("./SpeechEngineServer");
|
|
41
|
+
Object.defineProperty(exports, "SpeechEngineServer", { enumerable: true, get: function () { return SpeechEngineServer_1.SpeechEngineServer; } });
|
|
42
|
+
var SpeechEngineResource_1 = require("./SpeechEngineResource");
|
|
43
|
+
Object.defineProperty(exports, "SpeechEngineResource", { enumerable: true, get: function () { return SpeechEngineResource_1.SpeechEngineResource; } });
|
|
44
|
+
var SpeechEngineAttachment_1 = require("./SpeechEngineAttachment");
|
|
45
|
+
Object.defineProperty(exports, "SpeechEngineAttachment", { enumerable: true, get: function () { return SpeechEngineAttachment_1.SpeechEngineAttachment; } });
|
|
46
|
+
var SpeechEngineClientWrapper_1 = require("./SpeechEngineClientWrapper");
|
|
47
|
+
Object.defineProperty(exports, "SpeechEngineClientWrapper", { enumerable: true, get: function () { return SpeechEngineClientWrapper_1.SpeechEngineClientWrapper; } });
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Speech Engine namespace — provides event constants and classes for handling
|
|
3
|
+
* incoming WebSocket connections from the ElevenLabs Speech Engine API.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* import { SpeechEngine } from "@elevenlabs/elevenlabs-js";
|
|
8
|
+
*
|
|
9
|
+
* const session = new SpeechEngine.Session(ws);
|
|
10
|
+
* session.on(SpeechEngine.USER_TRANSCRIPT, async (transcript, signal) => { ... });
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
/** Fired when the session is initialized with a conversation ID. */
|
|
14
|
+
export declare const INIT: "init";
|
|
15
|
+
/** Fired when the Speech Engine API sends a user transcript. */
|
|
16
|
+
export declare const USER_TRANSCRIPT: "user_transcript";
|
|
17
|
+
/** Fired when the user disconnects the call. */
|
|
18
|
+
export declare const CLOSE: "close";
|
|
19
|
+
/** Fired when an error occurs (protocol or WebSocket level). */
|
|
20
|
+
export declare const ERROR: "error";
|
|
21
|
+
/** Fired when the underlying WebSocket connection drops. */
|
|
22
|
+
export declare const DISCONNECTED: "disconnected";
|
|
23
|
+
export { SpeechEngineSession as Session } from "./SpeechEngineSession";
|
|
24
|
+
export { SpeechEngineServer as Server, type SpeechEngineServerOptions as ServerOptions } from "./SpeechEngineServer";
|
|
25
|
+
export { SpeechEngineAttachment as Attachment } from "./SpeechEngineAttachment";
|
|
26
|
+
export { SpeechEngineResource as Resource } from "./SpeechEngineResource";
|
|
27
|
+
export { SpeechEngineClientWrapper as Client } from "./SpeechEngineClientWrapper";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Speech Engine namespace — provides event constants and classes for handling
|
|
4
|
+
* incoming WebSocket connections from the ElevenLabs Speech Engine API.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import { SpeechEngine } from "@elevenlabs/elevenlabs-js";
|
|
9
|
+
*
|
|
10
|
+
* const session = new SpeechEngine.Session(ws);
|
|
11
|
+
* session.on(SpeechEngine.USER_TRANSCRIPT, async (transcript, signal) => { ... });
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Client = exports.Resource = exports.Attachment = exports.Server = exports.Session = exports.DISCONNECTED = exports.ERROR = exports.CLOSE = exports.USER_TRANSCRIPT = exports.INIT = void 0;
|
|
16
|
+
// -- Event name constants (use these with session.on) -------------------------
|
|
17
|
+
/** Fired when the session is initialized with a conversation ID. */
|
|
18
|
+
exports.INIT = "init";
|
|
19
|
+
/** Fired when the Speech Engine API sends a user transcript. */
|
|
20
|
+
exports.USER_TRANSCRIPT = "user_transcript";
|
|
21
|
+
/** Fired when the user disconnects the call. */
|
|
22
|
+
exports.CLOSE = "close";
|
|
23
|
+
/** Fired when an error occurs (protocol or WebSocket level). */
|
|
24
|
+
exports.ERROR = "error";
|
|
25
|
+
/** Fired when the underlying WebSocket connection drops. */
|
|
26
|
+
exports.DISCONNECTED = "disconnected";
|
|
27
|
+
// -- Re-exported classes ------------------------------------------------------
|
|
28
|
+
var SpeechEngineSession_1 = require("./SpeechEngineSession");
|
|
29
|
+
Object.defineProperty(exports, "Session", { enumerable: true, get: function () { return SpeechEngineSession_1.SpeechEngineSession; } });
|
|
30
|
+
var SpeechEngineServer_1 = require("./SpeechEngineServer");
|
|
31
|
+
Object.defineProperty(exports, "Server", { enumerable: true, get: function () { return SpeechEngineServer_1.SpeechEngineServer; } });
|
|
32
|
+
var SpeechEngineAttachment_1 = require("./SpeechEngineAttachment");
|
|
33
|
+
Object.defineProperty(exports, "Attachment", { enumerable: true, get: function () { return SpeechEngineAttachment_1.SpeechEngineAttachment; } });
|
|
34
|
+
var SpeechEngineResource_1 = require("./SpeechEngineResource");
|
|
35
|
+
Object.defineProperty(exports, "Resource", { enumerable: true, get: function () { return SpeechEngineResource_1.SpeechEngineResource; } });
|
|
36
|
+
var SpeechEngineClientWrapper_1 = require("./SpeechEngineClientWrapper");
|
|
37
|
+
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return SpeechEngineClientWrapper_1.SpeechEngineClientWrapper; } });
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type WebSocket from "ws";
|
|
2
|
+
import type { SpeechEngineSession } from "./SpeechEngineSession";
|
|
3
|
+
export interface InitMessage {
|
|
4
|
+
type: "init";
|
|
5
|
+
conversation_id: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TranscriptMessage {
|
|
8
|
+
role: "user" | "agent";
|
|
9
|
+
content: string;
|
|
10
|
+
}
|
|
11
|
+
export interface UserTranscriptMessage {
|
|
12
|
+
type: "user_transcript";
|
|
13
|
+
user_transcript: TranscriptMessage[];
|
|
14
|
+
event_id?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface PingMessage {
|
|
17
|
+
type: "ping";
|
|
18
|
+
}
|
|
19
|
+
export interface CloseMessage {
|
|
20
|
+
type: "close";
|
|
21
|
+
}
|
|
22
|
+
export interface ErrorMessage {
|
|
23
|
+
type: "error";
|
|
24
|
+
message: string;
|
|
25
|
+
}
|
|
26
|
+
export type IncomingMessage = InitMessage | UserTranscriptMessage | PingMessage | CloseMessage | ErrorMessage;
|
|
27
|
+
export interface AgentResponseMessage {
|
|
28
|
+
type: "agent_response";
|
|
29
|
+
content: string;
|
|
30
|
+
event_id: number | undefined;
|
|
31
|
+
is_final: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface PongMessage {
|
|
34
|
+
type: "pong";
|
|
35
|
+
}
|
|
36
|
+
export type OutgoingMessage = AgentResponseMessage | PongMessage;
|
|
37
|
+
export interface SpeechEngineEventMap {
|
|
38
|
+
user_transcript: [transcript: TranscriptMessage[], signal: AbortSignal];
|
|
39
|
+
init: [conversationId: string];
|
|
40
|
+
close: [];
|
|
41
|
+
error: [error: Error];
|
|
42
|
+
disconnected: [];
|
|
43
|
+
}
|
|
44
|
+
export type SpeechEngineEventName = keyof SpeechEngineEventMap;
|
|
45
|
+
export interface SpeechEngineCallbacks {
|
|
46
|
+
/** Enable debug logging. */
|
|
47
|
+
debug?: boolean;
|
|
48
|
+
/** Fired once when the session is initialized with a conversation ID. */
|
|
49
|
+
onInit?(conversationId: string, session: SpeechEngineSession): void;
|
|
50
|
+
/** Fired each time the Speech Engine API sends a user transcript. */
|
|
51
|
+
onTranscript?(transcript: TranscriptMessage[], signal: AbortSignal, session: SpeechEngineSession): void;
|
|
52
|
+
/** Fired when ElevenLabs sends a clean close message ending the conversation. */
|
|
53
|
+
onClose?(session: SpeechEngineSession): void;
|
|
54
|
+
/** Fired when the underlying WebSocket drops unexpectedly. */
|
|
55
|
+
onDisconnect?(session: SpeechEngineSession): void;
|
|
56
|
+
/** Fired on protocol-level or WebSocket-level errors. */
|
|
57
|
+
onError?(error: Error, session: SpeechEngineSession): void;
|
|
58
|
+
}
|
|
59
|
+
export declare function isAbortError(err: unknown): boolean;
|
|
60
|
+
export interface WebSocketLike {
|
|
61
|
+
on(event: "message", listener: (data: WebSocket.Data) => void): void;
|
|
62
|
+
on(event: "close", listener: (code: number, reason: Buffer) => void): void;
|
|
63
|
+
on(event: "error", listener: (err: Error) => void): void;
|
|
64
|
+
send(data: string): void;
|
|
65
|
+
close(): void;
|
|
66
|
+
readyState: number;
|
|
67
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isAbortError = isAbortError;
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Abort detection
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
function isAbortError(err) {
|
|
8
|
+
if (err instanceof DOMException && err.name === "AbortError")
|
|
9
|
+
return true;
|
|
10
|
+
if (err instanceof Error && err.name === "AbortError")
|
|
11
|
+
return true;
|
|
12
|
+
if (err instanceof Error && /\babort/i.test(err.message))
|
|
13
|
+
return true;
|
|
14
|
+
return false;
|
|
15
|
+
}
|