hume 0.15.8 → 0.15.10
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/dist/cjs/BaseClient.d.ts +13 -4
- package/dist/cjs/BaseClient.js +59 -0
- package/dist/cjs/Client.d.ts +13 -13
- package/dist/cjs/Client.js +8 -49
- package/dist/cjs/api/resources/empathicVoice/client/Client.d.ts +27 -27
- package/dist/cjs/api/resources/empathicVoice/client/Client.js +13 -12
- package/dist/cjs/api/resources/empathicVoice/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/empathicVoice/errors/UnprocessableEntityError.js +5 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chat/client/Client.d.ts +5 -5
- package/dist/cjs/api/resources/empathicVoice/resources/chat/client/Client.js +3 -3
- package/dist/cjs/api/resources/empathicVoice/resources/chat/client/index.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chat/client/index.js +2 -2
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +17 -26
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/Client.js +48 -136
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/resources/chats/client/Client.d.ts +13 -20
- package/dist/cjs/api/resources/empathicVoice/resources/chats/client/Client.js +32 -95
- package/dist/cjs/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatEventsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/Client.d.ts +34 -83
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/Client.js +64 -245
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigVersionsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +4 -16
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +3 -14
- package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/controlPlane/client/Client.d.ts +7 -7
- package/dist/cjs/api/resources/empathicVoice/resources/controlPlane/client/Client.js +6 -19
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +34 -83
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/Client.js +64 -245
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.d.ts +2 -8
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.d.ts +2 -8
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptVersionsRequest.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/resources/tools/client/Client.d.ts +34 -83
- package/dist/cjs/api/resources/empathicVoice/resources/tools/client/Client.js +64 -245
- package/dist/cjs/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedTool.d.ts +4 -8
- package/dist/cjs/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersion.d.ts +4 -8
- package/dist/cjs/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersionDescription.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/types/AssistantEnd.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/types/AssistantInput.d.ts +2 -5
- package/dist/cjs/api/resources/empathicVoice/types/AssistantMessage.d.ts +2 -2
- package/dist/cjs/api/resources/empathicVoice/types/AssistantProsody.d.ts +1 -1
- package/dist/cjs/api/resources/empathicVoice/types/AudioInput.d.ts +6 -4
- package/dist/cjs/api/resources/empathicVoice/types/AudioOutput.d.ts +1 -4
- package/dist/cjs/api/resources/empathicVoice/types/ChatMetadata.d.ts +3 -5
- package/dist/cjs/api/resources/empathicVoice/types/ConnectSessionSettings.d.ts +8 -4
- package/dist/cjs/api/resources/empathicVoice/types/ConnectSessionSettingsAudio.d.ts +3 -3
- package/dist/cjs/api/resources/empathicVoice/types/ConnectSessionSettingsContext.d.ts +9 -3
- package/dist/cjs/api/resources/empathicVoice/types/Context.d.ts +9 -3
- package/dist/cjs/api/resources/empathicVoice/types/ControlPlanePublishEvent.d.ts +1 -36
- package/dist/cjs/api/resources/empathicVoice/types/JsonMessage.d.ts +1 -50
- package/dist/cjs/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +2 -4
- package/dist/cjs/api/resources/empathicVoice/types/PostedBuiltinTool.d.ts +1 -9
- package/dist/cjs/api/resources/empathicVoice/types/PostedBuiltinToolName.d.ts +0 -8
- package/dist/cjs/api/resources/empathicVoice/types/PostedBuiltinToolName.js +0 -8
- package/dist/cjs/api/resources/empathicVoice/types/PostedEllmModel.d.ts +1 -5
- package/dist/cjs/api/resources/empathicVoice/types/PostedEventMessageSpec.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/PostedEventMessageSpecs.d.ts +1 -14
- package/dist/cjs/api/resources/empathicVoice/types/PostedLanguageModel.d.ts +1 -7
- package/dist/cjs/api/resources/empathicVoice/types/PostedNudgeSpec.d.ts +2 -2
- package/dist/cjs/api/resources/empathicVoice/types/PostedTimeoutSpecs.d.ts +1 -13
- package/dist/cjs/api/resources/empathicVoice/types/PostedTimeoutSpecsInactivity.d.ts +0 -11
- package/dist/cjs/api/resources/empathicVoice/types/PostedTimeoutSpecsMaxDuration.d.ts +0 -11
- package/dist/cjs/api/resources/empathicVoice/types/PostedUserDefinedToolSpec.d.ts +1 -7
- package/dist/cjs/api/resources/empathicVoice/types/PostedWebhookSpec.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -3
- package/dist/cjs/api/resources/empathicVoice/types/ReturnBuiltinTool.d.ts +1 -2
- package/dist/cjs/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.d.ts +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.js +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChat.d.ts +4 -19
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatAudioReconstruction.d.ts +0 -13
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.d.ts +0 -13
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.js +0 -13
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEvent.d.ts +5 -30
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventRole.d.ts +0 -7
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventRole.js +0 -7
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventType.d.ts +0 -14
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventType.js +0 -14
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroup.d.ts +5 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructions.d.ts +1 -10
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.ts +6 -16
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.ts +3 -12
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEvents.d.ts +6 -30
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.d.ts +0 -15
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.js +0 -15
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatStatus.d.ts +0 -15
- package/dist/cjs/api/resources/empathicVoice/types/ReturnChatStatus.js +0 -15
- package/dist/cjs/api/resources/empathicVoice/types/ReturnConfigSpec.d.ts +2 -8
- package/dist/cjs/api/resources/empathicVoice/types/ReturnEllmModel.d.ts +1 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnEventMessageSpec.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnEventMessageSpecs.d.ts +1 -14
- package/dist/cjs/api/resources/empathicVoice/types/ReturnLanguageModel.d.ts +1 -7
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatGroups.d.ts +2 -11
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChats.d.ts +2 -11
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.d.ts +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.js +0 -5
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedConfigs.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedPrompts.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedUserDefinedTools.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPromptVersionType.d.ts +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnPromptVersionType.js +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnTimeoutSpec.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/ReturnTimeoutSpecs.d.ts +1 -13
- package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.ts +7 -19
- package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.d.ts +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.js +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.d.ts +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.js +0 -1
- package/dist/cjs/api/resources/empathicVoice/types/ReturnVoice.d.ts +5 -3
- package/dist/cjs/api/resources/empathicVoice/types/ReturnWebhookSpec.d.ts +2 -6
- package/dist/cjs/api/resources/empathicVoice/types/SessionSettings.d.ts +10 -19
- package/dist/cjs/api/resources/empathicVoice/types/SubscribeEvent.d.ts +1 -55
- package/dist/cjs/api/resources/empathicVoice/types/ToolCallMessage.d.ts +3 -9
- package/dist/cjs/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +3 -5
- package/dist/cjs/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +3 -11
- package/dist/cjs/api/resources/empathicVoice/types/UserInput.d.ts +6 -2
- package/dist/cjs/api/resources/empathicVoice/types/UserInterruption.d.ts +1 -3
- package/dist/cjs/api/resources/empathicVoice/types/UserMessage.d.ts +3 -17
- package/dist/cjs/api/resources/empathicVoice/types/VoiceId.d.ts +11 -2
- package/dist/cjs/api/resources/empathicVoice/types/VoiceName.d.ts +11 -2
- package/dist/cjs/api/resources/empathicVoice/types/WebSocketError.d.ts +1 -3
- package/dist/cjs/api/resources/expressionMeasurement/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/expressionMeasurement/client/Client.js +7 -6
- package/dist/cjs/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +17 -18
- package/dist/cjs/api/resources/expressionMeasurement/resources/batch/client/Client.js +63 -151
- package/dist/cjs/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.ts +7 -8
- package/dist/cjs/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.js +7 -12
- package/dist/cjs/api/resources/tts/client/Client.d.ts +19 -20
- package/dist/cjs/api/resources/tts/client/Client.js +56 -138
- package/dist/cjs/api/resources/tts/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/resources/tts/errors/UnprocessableEntityError.js +5 -1
- package/dist/cjs/api/resources/tts/resources/streamInput/client/Client.d.ts +15 -14
- package/dist/cjs/api/resources/tts/resources/streamInput/client/Client.js +10 -6
- package/dist/cjs/api/resources/tts/resources/voices/client/Client.d.ts +13 -14
- package/dist/cjs/api/resources/tts/resources/voices/client/Client.js +33 -87
- package/dist/cjs/api/resources/tts/resources/voices/client/requests/PostedVoice.d.ts +1 -1
- package/dist/cjs/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.ts +1 -1
- package/dist/cjs/api/resources/tts/types/OctaveVersion.d.ts +7 -3
- package/dist/cjs/api/resources/tts/types/OctaveVersion.js +7 -3
- package/dist/cjs/api/resources/tts/types/PostedTts.d.ts +0 -6
- package/dist/cjs/api/resources/tts/types/PostedUtteranceVoiceWithId.d.ts +1 -1
- package/dist/cjs/api/resources/tts/types/PostedUtteranceVoiceWithName.d.ts +1 -1
- package/dist/cjs/api/resources/tts/types/PublishTts.d.ts +14 -4
- package/dist/cjs/api/resources/tts/types/ReturnPagedVoices.d.ts +5 -9
- package/dist/cjs/api/resources/tts/types/ReturnVoice.d.ts +3 -3
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +26 -0
- package/dist/cjs/auth/HeaderAuthProvider.js +91 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +27 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
- package/dist/cjs/core/auth/BearerToken.js +16 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +5 -0
- package/dist/cjs/core/auth/index.js +9 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/core/fetcher/Fetcher.d.ts +6 -3
- package/dist/cjs/core/fetcher/Fetcher.js +42 -24
- package/dist/cjs/core/fetcher/getResponseBody.js +18 -4
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/cjs/core/fetcher/makeRequest.js +0 -2
- package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
- package/dist/cjs/core/fetcher/signals.d.ts +1 -7
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/index.d.ts +2 -0
- package/dist/cjs/core/index.js +2 -0
- package/dist/cjs/core/logging/logger.js +1 -1
- package/dist/cjs/core/pagination/CustomPager.d.ts +67 -0
- package/dist/cjs/core/pagination/CustomPager.js +194 -0
- package/dist/cjs/core/pagination/index.d.ts +1 -0
- package/dist/cjs/core/pagination/index.js +4 -1
- package/dist/cjs/core/runtime/runtime.js +11 -10
- package/dist/cjs/core/schemas/Schema.d.ts +1 -0
- package/dist/cjs/core/schemas/Schema.js +1 -0
- package/dist/cjs/core/schemas/builders/object/object.js +14 -1
- package/dist/cjs/core/schemas/builders/primitives/index.d.ts +1 -0
- package/dist/cjs/core/schemas/builders/primitives/index.js +3 -1
- package/dist/cjs/core/schemas/builders/primitives/never.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/primitives/never.js +14 -0
- package/dist/cjs/core/url/join.js +0 -1
- package/dist/cjs/errors/HumeError.js +5 -1
- package/dist/cjs/errors/HumeTimeoutError.js +5 -1
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
- package/dist/cjs/serialization/resources/empathicVoice/types/ReturnVoice.d.ts +3 -3
- package/dist/cjs/serialization/resources/empathicVoice/types/ReturnVoice.js +3 -3
- package/dist/cjs/serialization/resources/tts/types/ReturnPagedVoices.d.ts +4 -4
- package/dist/cjs/serialization/resources/tts/types/ReturnPagedVoices.js +4 -4
- package/dist/cjs/serialization/resources/tts/types/ReturnVoice.d.ts +3 -3
- package/dist/cjs/serialization/resources/tts/types/ReturnVoice.js +3 -3
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrapper/SilenceFiller.d.ts +64 -10
- package/dist/cjs/wrapper/SilenceFiller.js +109 -26
- package/dist/cjs/wrapper/expressionMeasurement/ExpressionMeasurementClient.d.ts +1 -1
- package/dist/cjs/wrapper/expressionMeasurement/ExpressionMeasurementClient.js +1 -1
- package/dist/cjs/wrapper/expressionMeasurement/batch/BatchClient.d.ts +1 -1
- package/dist/cjs/wrapper/expressionMeasurement/batch/BatchClient.js +1 -1
- package/dist/cjs/wrapper/fetchAccessToken.js +3 -0
- package/dist/cjs/wrapper/index.d.ts +5 -0
- package/dist/cjs/wrapper/index.js +6 -6
- package/dist/esm/BaseClient.d.mts +13 -4
- package/dist/esm/BaseClient.mjs +24 -1
- package/dist/esm/Client.d.mts +13 -13
- package/dist/esm/Client.mjs +11 -19
- package/dist/esm/api/resources/empathicVoice/client/Client.d.mts +27 -27
- package/dist/esm/api/resources/empathicVoice/client/Client.mjs +18 -17
- package/dist/esm/api/resources/empathicVoice/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/empathicVoice/errors/UnprocessableEntityError.mjs +5 -1
- package/dist/esm/api/resources/empathicVoice/resources/chat/client/Client.d.mts +5 -5
- package/dist/esm/api/resources/empathicVoice/resources/chat/client/Client.mjs +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chat/client/index.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chat/client/index.mjs +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/Client.d.mts +17 -26
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/Client.mjs +47 -135
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/resources/chats/client/Client.d.mts +13 -20
- package/dist/esm/api/resources/empathicVoice/resources/chats/client/Client.mjs +31 -94
- package/dist/esm/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatEventsRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/Client.d.mts +34 -83
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/Client.mjs +63 -244
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigVersionsRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.mts +4 -16
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.mts +3 -14
- package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/controlPlane/client/Client.d.mts +7 -7
- package/dist/esm/api/resources/empathicVoice/resources/controlPlane/client/Client.mjs +4 -17
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/Client.d.mts +34 -83
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/Client.mjs +63 -244
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.d.mts +2 -8
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.d.mts +2 -8
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptVersionsRequest.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/resources/tools/client/Client.d.mts +34 -83
- package/dist/esm/api/resources/empathicVoice/resources/tools/client/Client.mjs +63 -244
- package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedTool.d.mts +4 -8
- package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersion.d.mts +4 -8
- package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersionDescription.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/types/AssistantEnd.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/types/AssistantInput.d.mts +2 -5
- package/dist/esm/api/resources/empathicVoice/types/AssistantMessage.d.mts +2 -2
- package/dist/esm/api/resources/empathicVoice/types/AssistantProsody.d.mts +1 -1
- package/dist/esm/api/resources/empathicVoice/types/AudioInput.d.mts +6 -4
- package/dist/esm/api/resources/empathicVoice/types/AudioOutput.d.mts +1 -4
- package/dist/esm/api/resources/empathicVoice/types/ChatMetadata.d.mts +3 -5
- package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettings.d.mts +8 -4
- package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettingsAudio.d.mts +3 -3
- package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettingsContext.d.mts +9 -3
- package/dist/esm/api/resources/empathicVoice/types/Context.d.mts +9 -3
- package/dist/esm/api/resources/empathicVoice/types/ControlPlanePublishEvent.d.mts +1 -36
- package/dist/esm/api/resources/empathicVoice/types/JsonMessage.d.mts +1 -50
- package/dist/esm/api/resources/empathicVoice/types/PauseAssistantMessage.d.mts +2 -4
- package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinTool.d.mts +1 -9
- package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinToolName.d.mts +0 -8
- package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinToolName.mjs +0 -8
- package/dist/esm/api/resources/empathicVoice/types/PostedEllmModel.d.mts +1 -5
- package/dist/esm/api/resources/empathicVoice/types/PostedEventMessageSpec.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/PostedEventMessageSpecs.d.mts +1 -14
- package/dist/esm/api/resources/empathicVoice/types/PostedLanguageModel.d.mts +1 -7
- package/dist/esm/api/resources/empathicVoice/types/PostedNudgeSpec.d.mts +2 -2
- package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecs.d.mts +1 -13
- package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecsInactivity.d.mts +0 -11
- package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecsMaxDuration.d.mts +0 -11
- package/dist/esm/api/resources/empathicVoice/types/PostedUserDefinedToolSpec.d.mts +1 -7
- package/dist/esm/api/resources/empathicVoice/types/PostedWebhookSpec.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ResumeAssistantMessage.d.mts +1 -3
- package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinTool.d.mts +1 -2
- package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.d.mts +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.mjs +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnChat.d.mts +4 -19
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstruction.d.mts +0 -13
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.d.mts +0 -13
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.mjs +0 -13
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatEvent.d.mts +5 -30
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventRole.d.mts +0 -7
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventRole.mjs +0 -7
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventType.d.mts +0 -14
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventType.mjs +0 -14
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroup.d.mts +5 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructions.d.mts +1 -10
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.mts +6 -16
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.mts +3 -12
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEvents.d.mts +6 -30
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.d.mts +0 -15
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.mjs +0 -15
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatStatus.d.mts +0 -15
- package/dist/esm/api/resources/empathicVoice/types/ReturnChatStatus.mjs +0 -15
- package/dist/esm/api/resources/empathicVoice/types/ReturnConfigSpec.d.mts +2 -8
- package/dist/esm/api/resources/empathicVoice/types/ReturnEllmModel.d.mts +1 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnEventMessageSpec.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnEventMessageSpecs.d.mts +1 -14
- package/dist/esm/api/resources/empathicVoice/types/ReturnLanguageModel.d.mts +1 -7
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroups.d.mts +2 -11
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChats.d.mts +2 -11
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.d.mts +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.mjs +0 -5
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedConfigs.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedPrompts.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnPagedUserDefinedTools.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnPromptVersionType.d.mts +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnPromptVersionType.mjs +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnTimeoutSpec.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/ReturnTimeoutSpecs.d.mts +1 -13
- package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.mts +7 -19
- package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.d.mts +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.mjs +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.d.mts +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.mjs +0 -1
- package/dist/esm/api/resources/empathicVoice/types/ReturnVoice.d.mts +5 -3
- package/dist/esm/api/resources/empathicVoice/types/ReturnWebhookSpec.d.mts +2 -6
- package/dist/esm/api/resources/empathicVoice/types/SessionSettings.d.mts +10 -19
- package/dist/esm/api/resources/empathicVoice/types/SubscribeEvent.d.mts +1 -55
- package/dist/esm/api/resources/empathicVoice/types/ToolCallMessage.d.mts +3 -9
- package/dist/esm/api/resources/empathicVoice/types/ToolErrorMessage.d.mts +3 -5
- package/dist/esm/api/resources/empathicVoice/types/ToolResponseMessage.d.mts +3 -11
- package/dist/esm/api/resources/empathicVoice/types/UserInput.d.mts +6 -2
- package/dist/esm/api/resources/empathicVoice/types/UserInterruption.d.mts +1 -3
- package/dist/esm/api/resources/empathicVoice/types/UserMessage.d.mts +3 -17
- package/dist/esm/api/resources/empathicVoice/types/VoiceId.d.mts +11 -2
- package/dist/esm/api/resources/empathicVoice/types/VoiceName.d.mts +11 -2
- package/dist/esm/api/resources/empathicVoice/types/WebSocketError.d.mts +1 -3
- package/dist/esm/api/resources/expressionMeasurement/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/expressionMeasurement/client/Client.mjs +6 -5
- package/dist/esm/api/resources/expressionMeasurement/resources/batch/client/Client.d.mts +17 -18
- package/dist/esm/api/resources/expressionMeasurement/resources/batch/client/Client.mjs +61 -149
- package/dist/esm/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.mts +7 -8
- package/dist/esm/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.mjs +5 -10
- package/dist/esm/api/resources/tts/client/Client.d.mts +19 -20
- package/dist/esm/api/resources/tts/client/Client.mjs +56 -138
- package/dist/esm/api/resources/tts/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/resources/tts/errors/UnprocessableEntityError.mjs +5 -1
- package/dist/esm/api/resources/tts/resources/streamInput/client/Client.d.mts +15 -14
- package/dist/esm/api/resources/tts/resources/streamInput/client/Client.mjs +8 -4
- package/dist/esm/api/resources/tts/resources/voices/client/Client.d.mts +13 -14
- package/dist/esm/api/resources/tts/resources/voices/client/Client.mjs +32 -86
- package/dist/esm/api/resources/tts/resources/voices/client/requests/PostedVoice.d.mts +1 -1
- package/dist/esm/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.mts +1 -1
- package/dist/esm/api/resources/tts/types/OctaveVersion.d.mts +7 -3
- package/dist/esm/api/resources/tts/types/OctaveVersion.mjs +7 -3
- package/dist/esm/api/resources/tts/types/PostedTts.d.mts +0 -6
- package/dist/esm/api/resources/tts/types/PostedUtteranceVoiceWithId.d.mts +1 -1
- package/dist/esm/api/resources/tts/types/PostedUtteranceVoiceWithName.d.mts +1 -1
- package/dist/esm/api/resources/tts/types/PublishTts.d.mts +14 -4
- package/dist/esm/api/resources/tts/types/ReturnPagedVoices.d.mts +5 -9
- package/dist/esm/api/resources/tts/types/ReturnVoice.d.mts +3 -3
- package/dist/esm/auth/HeaderAuthProvider.d.mts +26 -0
- package/dist/esm/auth/HeaderAuthProvider.mjs +54 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +24 -0
- package/dist/esm/core/auth/BearerToken.d.mts +7 -0
- package/dist/esm/core/auth/BearerToken.mjs +13 -0
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +5 -0
- package/dist/esm/core/auth/index.mjs +3 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/core/fetcher/Fetcher.d.mts +6 -3
- package/dist/esm/core/fetcher/Fetcher.mjs +42 -24
- package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
- package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
- package/dist/esm/core/fetcher/signals.d.mts +1 -7
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/index.d.mts +2 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/core/logging/logger.mjs +1 -1
- package/dist/esm/core/pagination/CustomPager.d.mts +67 -0
- package/dist/esm/core/pagination/CustomPager.mjs +189 -0
- package/dist/esm/core/pagination/index.d.mts +1 -0
- package/dist/esm/core/pagination/index.mjs +1 -0
- package/dist/esm/core/runtime/runtime.mjs +11 -10
- package/dist/esm/core/schemas/Schema.d.mts +1 -0
- package/dist/esm/core/schemas/Schema.mjs +1 -0
- package/dist/esm/core/schemas/builders/object/object.mjs +14 -1
- package/dist/esm/core/schemas/builders/primitives/index.d.mts +1 -0
- package/dist/esm/core/schemas/builders/primitives/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/primitives/never.d.mts +2 -0
- package/dist/esm/core/schemas/builders/primitives/never.mjs +11 -0
- package/dist/esm/core/url/join.mjs +0 -1
- package/dist/esm/errors/HumeError.mjs +5 -1
- package/dist/esm/errors/HumeTimeoutError.mjs +5 -1
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
- package/dist/esm/serialization/resources/empathicVoice/types/ReturnVoice.d.mts +3 -3
- package/dist/esm/serialization/resources/empathicVoice/types/ReturnVoice.mjs +3 -3
- package/dist/esm/serialization/resources/tts/types/ReturnPagedVoices.d.mts +4 -4
- package/dist/esm/serialization/resources/tts/types/ReturnPagedVoices.mjs +4 -4
- package/dist/esm/serialization/resources/tts/types/ReturnVoice.d.mts +3 -3
- package/dist/esm/serialization/resources/tts/types/ReturnVoice.mjs +3 -3
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/esm/wrapper/SilenceFiller.d.mts +64 -10
- package/dist/esm/wrapper/SilenceFiller.mjs +109 -26
- package/dist/esm/wrapper/expressionMeasurement/ExpressionMeasurementClient.d.mts +1 -1
- package/dist/esm/wrapper/expressionMeasurement/ExpressionMeasurementClient.mjs +1 -1
- package/dist/esm/wrapper/expressionMeasurement/batch/BatchClient.d.mts +1 -1
- package/dist/esm/wrapper/expressionMeasurement/batch/BatchClient.mjs +1 -1
- package/dist/esm/wrapper/fetchAccessToken.mjs +3 -0
- package/dist/esm/wrapper/index.d.mts +5 -0
- package/dist/esm/wrapper/index.mjs +4 -5
- package/package.json +5 -2
- package/reference.md +621 -1205
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
- package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
|
@@ -43,24 +43,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
46
|
+
exports.ConfigsClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../../../BaseClient.js");
|
|
47
48
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
48
49
|
const core = __importStar(require("../../../../../../core/index.js"));
|
|
49
50
|
const environments = __importStar(require("../../../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
|
|
50
52
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
51
53
|
const serializers = __importStar(require("../../../../../../serialization/index.js"));
|
|
52
54
|
const Hume = __importStar(require("../../../../../index.js"));
|
|
53
|
-
class
|
|
54
|
-
constructor(
|
|
55
|
-
this._options =
|
|
55
|
+
class ConfigsClient {
|
|
56
|
+
constructor(options = {}) {
|
|
57
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
56
58
|
}
|
|
57
59
|
/**
|
|
58
|
-
* Fetches a paginated list of **Configs**.
|
|
59
|
-
*
|
|
60
|
-
* For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
|
|
61
|
-
*
|
|
62
60
|
* @param {Hume.empathicVoice.ConfigsListConfigsRequest} request
|
|
63
|
-
* @param {
|
|
61
|
+
* @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
62
|
*
|
|
65
63
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
66
64
|
*
|
|
@@ -75,20 +73,14 @@ class Configs {
|
|
|
75
73
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
76
74
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
77
75
|
const { pageNumber, pageSize, restrictToMostRecent, name } = request;
|
|
78
|
-
const _queryParams = {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
_queryParams.restrict_to_most_recent = restrictToMostRecent.toString();
|
|
87
|
-
}
|
|
88
|
-
if (name != null) {
|
|
89
|
-
_queryParams.name = name;
|
|
90
|
-
}
|
|
91
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
76
|
+
const _queryParams = {
|
|
77
|
+
page_number: pageNumber,
|
|
78
|
+
page_size: pageSize,
|
|
79
|
+
restrict_to_most_recent: restrictToMostRecent,
|
|
80
|
+
name,
|
|
81
|
+
};
|
|
82
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
83
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
92
84
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
93
85
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod)
|
|
94
86
|
.base, "v0/evi/configs"),
|
|
@@ -131,21 +123,7 @@ class Configs {
|
|
|
131
123
|
});
|
|
132
124
|
}
|
|
133
125
|
}
|
|
134
|
-
|
|
135
|
-
case "non-json":
|
|
136
|
-
throw new errors.HumeError({
|
|
137
|
-
statusCode: _response.error.statusCode,
|
|
138
|
-
body: _response.error.rawBody,
|
|
139
|
-
rawResponse: _response.rawResponse,
|
|
140
|
-
});
|
|
141
|
-
case "timeout":
|
|
142
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/configs.");
|
|
143
|
-
case "unknown":
|
|
144
|
-
throw new errors.HumeError({
|
|
145
|
-
message: _response.error.errorMessage,
|
|
146
|
-
rawResponse: _response.rawResponse,
|
|
147
|
-
});
|
|
148
|
-
}
|
|
126
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/evi/configs");
|
|
149
127
|
}));
|
|
150
128
|
let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 0;
|
|
151
129
|
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
@@ -162,12 +140,8 @@ class Configs {
|
|
|
162
140
|
});
|
|
163
141
|
}
|
|
164
142
|
/**
|
|
165
|
-
* Creates a **Config** which can be applied to EVI.
|
|
166
|
-
*
|
|
167
|
-
* For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
|
|
168
|
-
*
|
|
169
143
|
* @param {Hume.empathicVoice.PostedConfig} request
|
|
170
|
-
* @param {
|
|
144
|
+
* @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
171
145
|
*
|
|
172
146
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
173
147
|
*
|
|
@@ -210,7 +184,8 @@ class Configs {
|
|
|
210
184
|
__createConfig(request, requestOptions) {
|
|
211
185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
212
186
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
213
|
-
const
|
|
187
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
188
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
214
189
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
215
190
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, "v0/evi/configs"),
|
|
216
191
|
method: "POST",
|
|
@@ -258,31 +233,13 @@ class Configs {
|
|
|
258
233
|
});
|
|
259
234
|
}
|
|
260
235
|
}
|
|
261
|
-
|
|
262
|
-
case "non-json":
|
|
263
|
-
throw new errors.HumeError({
|
|
264
|
-
statusCode: _response.error.statusCode,
|
|
265
|
-
body: _response.error.rawBody,
|
|
266
|
-
rawResponse: _response.rawResponse,
|
|
267
|
-
});
|
|
268
|
-
case "timeout":
|
|
269
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/evi/configs.");
|
|
270
|
-
case "unknown":
|
|
271
|
-
throw new errors.HumeError({
|
|
272
|
-
message: _response.error.errorMessage,
|
|
273
|
-
rawResponse: _response.rawResponse,
|
|
274
|
-
});
|
|
275
|
-
}
|
|
236
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/evi/configs");
|
|
276
237
|
});
|
|
277
238
|
}
|
|
278
239
|
/**
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
* For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
|
|
282
|
-
*
|
|
283
|
-
* @param {string} id - Identifier for a Config. Formatted as a UUID.
|
|
240
|
+
* @param {string} id - Identifier for a config. Formatted as a UUID.
|
|
284
241
|
* @param {Hume.empathicVoice.ConfigsListConfigVersionsRequest} request
|
|
285
|
-
* @param {
|
|
242
|
+
* @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
286
243
|
*
|
|
287
244
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
288
245
|
*
|
|
@@ -294,17 +251,13 @@ class Configs {
|
|
|
294
251
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
295
252
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
296
253
|
const { pageNumber, pageSize, restrictToMostRecent } = request;
|
|
297
|
-
const _queryParams = {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
if (restrictToMostRecent != null) {
|
|
305
|
-
_queryParams.restrict_to_most_recent = restrictToMostRecent.toString();
|
|
306
|
-
}
|
|
307
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
254
|
+
const _queryParams = {
|
|
255
|
+
page_number: pageNumber,
|
|
256
|
+
page_size: pageSize,
|
|
257
|
+
restrict_to_most_recent: restrictToMostRecent,
|
|
258
|
+
};
|
|
259
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
260
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
308
261
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
309
262
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod)
|
|
310
263
|
.base, `v0/evi/configs/${core.url.encodePathParam(id)}`),
|
|
@@ -347,21 +300,7 @@ class Configs {
|
|
|
347
300
|
});
|
|
348
301
|
}
|
|
349
302
|
}
|
|
350
|
-
|
|
351
|
-
case "non-json":
|
|
352
|
-
throw new errors.HumeError({
|
|
353
|
-
statusCode: _response.error.statusCode,
|
|
354
|
-
body: _response.error.rawBody,
|
|
355
|
-
rawResponse: _response.rawResponse,
|
|
356
|
-
});
|
|
357
|
-
case "timeout":
|
|
358
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/configs/{id}.");
|
|
359
|
-
case "unknown":
|
|
360
|
-
throw new errors.HumeError({
|
|
361
|
-
message: _response.error.errorMessage,
|
|
362
|
-
rawResponse: _response.rawResponse,
|
|
363
|
-
});
|
|
364
|
-
}
|
|
303
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/evi/configs/{id}");
|
|
365
304
|
}));
|
|
366
305
|
let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 0;
|
|
367
306
|
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
@@ -378,13 +317,9 @@ class Configs {
|
|
|
378
317
|
});
|
|
379
318
|
}
|
|
380
319
|
/**
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
* For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
|
|
384
|
-
*
|
|
385
|
-
* @param {string} id - Identifier for a Config. Formatted as a UUID.
|
|
320
|
+
* @param {string} id - Identifier for a config. Formatted as a UUID.
|
|
386
321
|
* @param {Hume.empathicVoice.PostedConfigVersion} request
|
|
387
|
-
* @param {
|
|
322
|
+
* @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
388
323
|
*
|
|
389
324
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
390
325
|
*
|
|
@@ -430,7 +365,8 @@ class Configs {
|
|
|
430
365
|
__createConfigVersion(id, request, requestOptions) {
|
|
431
366
|
return __awaiter(this, void 0, void 0, function* () {
|
|
432
367
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
433
|
-
const
|
|
368
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
369
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
434
370
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
435
371
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/configs/${core.url.encodePathParam(id)}`),
|
|
436
372
|
method: "POST",
|
|
@@ -478,30 +414,12 @@ class Configs {
|
|
|
478
414
|
});
|
|
479
415
|
}
|
|
480
416
|
}
|
|
481
|
-
|
|
482
|
-
case "non-json":
|
|
483
|
-
throw new errors.HumeError({
|
|
484
|
-
statusCode: _response.error.statusCode,
|
|
485
|
-
body: _response.error.rawBody,
|
|
486
|
-
rawResponse: _response.rawResponse,
|
|
487
|
-
});
|
|
488
|
-
case "timeout":
|
|
489
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/evi/configs/{id}.");
|
|
490
|
-
case "unknown":
|
|
491
|
-
throw new errors.HumeError({
|
|
492
|
-
message: _response.error.errorMessage,
|
|
493
|
-
rawResponse: _response.rawResponse,
|
|
494
|
-
});
|
|
495
|
-
}
|
|
417
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/evi/configs/{id}");
|
|
496
418
|
});
|
|
497
419
|
}
|
|
498
420
|
/**
|
|
499
|
-
*
|
|
500
|
-
*
|
|
501
|
-
* For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
|
|
502
|
-
*
|
|
503
|
-
* @param {string} id - Identifier for a Config. Formatted as a UUID.
|
|
504
|
-
* @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
|
|
421
|
+
* @param {string} id - Identifier for a config. Formatted as a UUID.
|
|
422
|
+
* @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
505
423
|
*
|
|
506
424
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
507
425
|
*
|
|
@@ -514,7 +432,8 @@ class Configs {
|
|
|
514
432
|
__deleteConfig(id, requestOptions) {
|
|
515
433
|
return __awaiter(this, void 0, void 0, function* () {
|
|
516
434
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
517
|
-
const
|
|
435
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
436
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
518
437
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
519
438
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/configs/${core.url.encodePathParam(id)}`),
|
|
520
439
|
method: "DELETE",
|
|
@@ -547,31 +466,13 @@ class Configs {
|
|
|
547
466
|
});
|
|
548
467
|
}
|
|
549
468
|
}
|
|
550
|
-
|
|
551
|
-
case "non-json":
|
|
552
|
-
throw new errors.HumeError({
|
|
553
|
-
statusCode: _response.error.statusCode,
|
|
554
|
-
body: _response.error.rawBody,
|
|
555
|
-
rawResponse: _response.rawResponse,
|
|
556
|
-
});
|
|
557
|
-
case "timeout":
|
|
558
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling DELETE /v0/evi/configs/{id}.");
|
|
559
|
-
case "unknown":
|
|
560
|
-
throw new errors.HumeError({
|
|
561
|
-
message: _response.error.errorMessage,
|
|
562
|
-
rawResponse: _response.rawResponse,
|
|
563
|
-
});
|
|
564
|
-
}
|
|
469
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v0/evi/configs/{id}");
|
|
565
470
|
});
|
|
566
471
|
}
|
|
567
472
|
/**
|
|
568
|
-
*
|
|
569
|
-
*
|
|
570
|
-
* For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
|
|
571
|
-
*
|
|
572
|
-
* @param {string} id - Identifier for a Config. Formatted as a UUID.
|
|
473
|
+
* @param {string} id - Identifier for a config. Formatted as a UUID.
|
|
573
474
|
* @param {Hume.empathicVoice.PostedConfigName} request
|
|
574
|
-
* @param {
|
|
475
|
+
* @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
575
476
|
*
|
|
576
477
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
577
478
|
*
|
|
@@ -586,7 +487,8 @@ class Configs {
|
|
|
586
487
|
__updateConfigName(id, request, requestOptions) {
|
|
587
488
|
return __awaiter(this, void 0, void 0, function* () {
|
|
588
489
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
589
|
-
const
|
|
490
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
491
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
590
492
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
591
493
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/configs/${core.url.encodePathParam(id)}`),
|
|
592
494
|
method: "PATCH",
|
|
@@ -626,35 +528,13 @@ class Configs {
|
|
|
626
528
|
});
|
|
627
529
|
}
|
|
628
530
|
}
|
|
629
|
-
|
|
630
|
-
case "non-json":
|
|
631
|
-
throw new errors.HumeError({
|
|
632
|
-
statusCode: _response.error.statusCode,
|
|
633
|
-
body: _response.error.rawBody,
|
|
634
|
-
rawResponse: _response.rawResponse,
|
|
635
|
-
});
|
|
636
|
-
case "timeout":
|
|
637
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling PATCH /v0/evi/configs/{id}.");
|
|
638
|
-
case "unknown":
|
|
639
|
-
throw new errors.HumeError({
|
|
640
|
-
message: _response.error.errorMessage,
|
|
641
|
-
rawResponse: _response.rawResponse,
|
|
642
|
-
});
|
|
643
|
-
}
|
|
531
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v0/evi/configs/{id}");
|
|
644
532
|
});
|
|
645
533
|
}
|
|
646
534
|
/**
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
* @param {string} id - Identifier for a Config. Formatted as a UUID.
|
|
652
|
-
* @param {number} version - Version number for a Config.
|
|
653
|
-
*
|
|
654
|
-
* Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed.
|
|
655
|
-
*
|
|
656
|
-
* Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number.
|
|
657
|
-
* @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
|
|
535
|
+
* @param {string} id - Identifier for a config. Formatted as a UUID.
|
|
536
|
+
* @param {number} version - Version number for a config. Version numbers should be integers.
|
|
537
|
+
* @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
658
538
|
*
|
|
659
539
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
660
540
|
*
|
|
@@ -667,7 +547,8 @@ class Configs {
|
|
|
667
547
|
__getConfigVersion(id, version, requestOptions) {
|
|
668
548
|
return __awaiter(this, void 0, void 0, function* () {
|
|
669
549
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
670
|
-
const
|
|
550
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
551
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
671
552
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
672
553
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/configs/${core.url.encodePathParam(id)}/version/${core.url.encodePathParam(version)}`),
|
|
673
554
|
method: "GET",
|
|
@@ -709,35 +590,13 @@ class Configs {
|
|
|
709
590
|
});
|
|
710
591
|
}
|
|
711
592
|
}
|
|
712
|
-
|
|
713
|
-
case "non-json":
|
|
714
|
-
throw new errors.HumeError({
|
|
715
|
-
statusCode: _response.error.statusCode,
|
|
716
|
-
body: _response.error.rawBody,
|
|
717
|
-
rawResponse: _response.rawResponse,
|
|
718
|
-
});
|
|
719
|
-
case "timeout":
|
|
720
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/configs/{id}/version/{version}.");
|
|
721
|
-
case "unknown":
|
|
722
|
-
throw new errors.HumeError({
|
|
723
|
-
message: _response.error.errorMessage,
|
|
724
|
-
rawResponse: _response.rawResponse,
|
|
725
|
-
});
|
|
726
|
-
}
|
|
593
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/evi/configs/{id}/version/{version}");
|
|
727
594
|
});
|
|
728
595
|
}
|
|
729
596
|
/**
|
|
730
|
-
*
|
|
731
|
-
*
|
|
732
|
-
*
|
|
733
|
-
*
|
|
734
|
-
* @param {string} id - Identifier for a Config. Formatted as a UUID.
|
|
735
|
-
* @param {number} version - Version number for a Config.
|
|
736
|
-
*
|
|
737
|
-
* Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed.
|
|
738
|
-
*
|
|
739
|
-
* Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number.
|
|
740
|
-
* @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
|
|
597
|
+
* @param {string} id - Identifier for a config. Formatted as a UUID.
|
|
598
|
+
* @param {number} version - Version number for a config. Version numbers should be integers.
|
|
599
|
+
* @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
741
600
|
*
|
|
742
601
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
743
602
|
*
|
|
@@ -750,7 +609,8 @@ class Configs {
|
|
|
750
609
|
__deleteConfigVersion(id, version, requestOptions) {
|
|
751
610
|
return __awaiter(this, void 0, void 0, function* () {
|
|
752
611
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
753
|
-
const
|
|
612
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
613
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
754
614
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
755
615
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/configs/${core.url.encodePathParam(id)}/version/${core.url.encodePathParam(version)}`),
|
|
756
616
|
method: "DELETE",
|
|
@@ -783,36 +643,14 @@ class Configs {
|
|
|
783
643
|
});
|
|
784
644
|
}
|
|
785
645
|
}
|
|
786
|
-
|
|
787
|
-
case "non-json":
|
|
788
|
-
throw new errors.HumeError({
|
|
789
|
-
statusCode: _response.error.statusCode,
|
|
790
|
-
body: _response.error.rawBody,
|
|
791
|
-
rawResponse: _response.rawResponse,
|
|
792
|
-
});
|
|
793
|
-
case "timeout":
|
|
794
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling DELETE /v0/evi/configs/{id}/version/{version}.");
|
|
795
|
-
case "unknown":
|
|
796
|
-
throw new errors.HumeError({
|
|
797
|
-
message: _response.error.errorMessage,
|
|
798
|
-
rawResponse: _response.rawResponse,
|
|
799
|
-
});
|
|
800
|
-
}
|
|
646
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v0/evi/configs/{id}/version/{version}");
|
|
801
647
|
});
|
|
802
648
|
}
|
|
803
649
|
/**
|
|
804
|
-
*
|
|
805
|
-
*
|
|
806
|
-
* For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
|
|
807
|
-
*
|
|
808
|
-
* @param {string} id - Identifier for a Config. Formatted as a UUID.
|
|
809
|
-
* @param {number} version - Version number for a Config.
|
|
810
|
-
*
|
|
811
|
-
* Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed.
|
|
812
|
-
*
|
|
813
|
-
* Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number.
|
|
650
|
+
* @param {string} id - Identifier for a config. Formatted as a UUID.
|
|
651
|
+
* @param {number} version - Version number for a config. Version numbers should be integers.
|
|
814
652
|
* @param {Hume.empathicVoice.PostedConfigVersionDescription} request
|
|
815
|
-
* @param {
|
|
653
|
+
* @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
816
654
|
*
|
|
817
655
|
* @throws {@link Hume.empathicVoice.BadRequestError}
|
|
818
656
|
*
|
|
@@ -827,7 +665,8 @@ class Configs {
|
|
|
827
665
|
__updateConfigDescription(id_1, version_1) {
|
|
828
666
|
return __awaiter(this, arguments, void 0, function* (id, version, request = {}, requestOptions) {
|
|
829
667
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
830
|
-
const
|
|
668
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
669
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
831
670
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
832
671
|
url: core.url.join((_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : ((_d = (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.HumeEnvironment.Prod).base, `v0/evi/configs/${core.url.encodePathParam(id)}/version/${core.url.encodePathParam(version)}`),
|
|
833
672
|
method: "PATCH",
|
|
@@ -875,28 +714,8 @@ class Configs {
|
|
|
875
714
|
});
|
|
876
715
|
}
|
|
877
716
|
}
|
|
878
|
-
|
|
879
|
-
case "non-json":
|
|
880
|
-
throw new errors.HumeError({
|
|
881
|
-
statusCode: _response.error.statusCode,
|
|
882
|
-
body: _response.error.rawBody,
|
|
883
|
-
rawResponse: _response.rawResponse,
|
|
884
|
-
});
|
|
885
|
-
case "timeout":
|
|
886
|
-
throw new errors.HumeTimeoutError("Timeout exceeded when calling PATCH /v0/evi/configs/{id}/version/{version}.");
|
|
887
|
-
case "unknown":
|
|
888
|
-
throw new errors.HumeError({
|
|
889
|
-
message: _response.error.errorMessage,
|
|
890
|
-
rawResponse: _response.rawResponse,
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
_getCustomAuthorizationHeaders() {
|
|
896
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
897
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
898
|
-
return { "X-Hume-Api-Key": apiKeyValue };
|
|
717
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v0/evi/configs/{id}/version/{version}");
|
|
899
718
|
});
|
|
900
719
|
}
|
|
901
720
|
}
|
|
902
|
-
exports.
|
|
721
|
+
exports.ConfigsClient = ConfigsClient;
|
|
@@ -15,6 +15,6 @@ export interface ConfigsListConfigVersionsRequest {
|
|
|
15
15
|
* For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10.
|
|
16
16
|
*/
|
|
17
17
|
pageSize?: number;
|
|
18
|
-
/** By default, `restrict_to_most_recent` is set to true, returning only the latest version of each
|
|
18
|
+
/** By default, `restrict_to_most_recent` is set to true, returning only the latest version of each tool. To include all versions of each tool in the list, set `restrict_to_most_recent` to false. */
|
|
19
19
|
restrictToMostRecent?: boolean;
|
|
20
20
|
}
|
package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts
CHANGED
|
@@ -34,34 +34,22 @@ import type * as Hume from "../../../../../../index.js";
|
|
|
34
34
|
* }
|
|
35
35
|
*/
|
|
36
36
|
export interface PostedConfig {
|
|
37
|
-
/**
|
|
37
|
+
/** Built-in tool specification for a Config. */
|
|
38
38
|
builtinTools?: (Hume.empathicVoice.PostedBuiltinTool | undefined)[];
|
|
39
|
-
/**
|
|
40
|
-
* The eLLM setup associated with this Config.
|
|
41
|
-
*
|
|
42
|
-
* Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody.
|
|
43
|
-
*/
|
|
44
39
|
ellmModel?: Hume.empathicVoice.PostedEllmModel;
|
|
45
40
|
eventMessages?: Hume.empathicVoice.PostedEventMessageSpecs;
|
|
46
|
-
/**
|
|
41
|
+
/** The version of the EVI used with this config. */
|
|
47
42
|
eviVersion: string;
|
|
48
|
-
/**
|
|
49
|
-
* The supplemental language model associated with this Config.
|
|
50
|
-
*
|
|
51
|
-
* This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI.
|
|
52
|
-
*/
|
|
53
43
|
languageModel?: Hume.empathicVoice.PostedLanguageModel;
|
|
54
44
|
/** Name applied to all versions of a particular Config. */
|
|
55
45
|
name: string;
|
|
56
|
-
/** Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. */
|
|
57
46
|
nudges?: Hume.empathicVoice.PostedNudgeSpec;
|
|
58
47
|
prompt?: Hume.empathicVoice.PostedConfigPromptSpec;
|
|
59
48
|
timeouts?: Hume.empathicVoice.PostedTimeoutSpecs;
|
|
60
|
-
/**
|
|
49
|
+
/** Tool specification for a Config. */
|
|
61
50
|
tools?: (Hume.empathicVoice.PostedUserDefinedToolSpec | undefined)[];
|
|
62
|
-
/**
|
|
51
|
+
/** Description that is appended to a specific version of a Config. */
|
|
63
52
|
versionDescription?: string;
|
|
64
|
-
/** A voice specification associated with this Config. */
|
|
65
53
|
voice?: Hume.empathicVoice.VoiceRef;
|
|
66
54
|
/** Webhook config specifications for each subscriber. */
|
|
67
55
|
webhooks?: (Hume.empathicVoice.PostedWebhookSpec | undefined)[];
|
|
@@ -37,31 +37,20 @@ import type * as Hume from "../../../../../../index.js";
|
|
|
37
37
|
* }
|
|
38
38
|
*/
|
|
39
39
|
export interface PostedConfigVersion {
|
|
40
|
-
/**
|
|
40
|
+
/** Built-in tool specification for a Config. */
|
|
41
41
|
builtinTools?: (Hume.empathicVoice.PostedBuiltinTool | undefined)[];
|
|
42
|
-
/**
|
|
43
|
-
* The eLLM setup associated with this Config version.
|
|
44
|
-
*
|
|
45
|
-
* Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody.
|
|
46
|
-
*/
|
|
47
42
|
ellmModel?: Hume.empathicVoice.PostedEllmModel;
|
|
48
43
|
eventMessages?: Hume.empathicVoice.PostedEventMessageSpecs;
|
|
49
44
|
/** The version of the EVI used with this config. */
|
|
50
45
|
eviVersion: string;
|
|
51
|
-
/**
|
|
52
|
-
* The supplemental language model associated with this Config version.
|
|
53
|
-
*
|
|
54
|
-
* This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI.
|
|
55
|
-
*/
|
|
56
46
|
languageModel?: Hume.empathicVoice.PostedLanguageModel;
|
|
57
47
|
nudges?: Hume.empathicVoice.PostedNudgeSpec;
|
|
58
48
|
prompt?: Hume.empathicVoice.PostedConfigPromptSpec;
|
|
59
49
|
timeouts?: Hume.empathicVoice.PostedTimeoutSpecs;
|
|
60
|
-
/**
|
|
50
|
+
/** Tool specification for a Config. */
|
|
61
51
|
tools?: (Hume.empathicVoice.PostedUserDefinedToolSpec | undefined)[];
|
|
62
|
-
/**
|
|
52
|
+
/** Description that is appended to a specific version of a Config. */
|
|
63
53
|
versionDescription?: string;
|
|
64
|
-
/** A voice specification associated with this Config version. */
|
|
65
54
|
voice?: Hume.empathicVoice.VoiceRef;
|
|
66
55
|
/** Webhook config specifications for each subscriber. */
|
|
67
56
|
webhooks?: (Hume.empathicVoice.PostedWebhookSpec | undefined)[];
|
|
@@ -2,7 +2,7 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../Ba
|
|
|
2
2
|
import * as core from "../../../../../../core/index.js";
|
|
3
3
|
import * as Hume from "../../../../../index.js";
|
|
4
4
|
import { ControlPlaneSocket } from "./Socket.js";
|
|
5
|
-
export declare namespace
|
|
5
|
+
export declare namespace ControlPlaneClient {
|
|
6
6
|
interface Options extends BaseClientOptions {
|
|
7
7
|
}
|
|
8
8
|
interface RequestOptions extends BaseRequestOptions {
|
|
@@ -18,15 +18,15 @@ export declare namespace ControlPlane {
|
|
|
18
18
|
reconnectAttempts?: number;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
export declare class
|
|
22
|
-
protected readonly _options:
|
|
23
|
-
constructor(_options?:
|
|
21
|
+
export declare class ControlPlaneClient {
|
|
22
|
+
protected readonly _options: ControlPlaneClient.Options;
|
|
23
|
+
constructor(_options?: ControlPlaneClient.Options);
|
|
24
24
|
/**
|
|
25
25
|
* Send a message to a specific chat.
|
|
26
26
|
*
|
|
27
27
|
* @param {string} chatId
|
|
28
28
|
* @param {Hume.empathicVoice.ControlPlanePublishEvent} request
|
|
29
|
-
* @param {
|
|
29
|
+
* @param {ControlPlaneClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
30
|
*
|
|
31
31
|
* @throws {@link Hume.empathicVoice.UnprocessableEntityError}
|
|
32
32
|
*
|
|
@@ -35,8 +35,8 @@ export declare class ControlPlane {
|
|
|
35
35
|
* type: "session_settings"
|
|
36
36
|
* })
|
|
37
37
|
*/
|
|
38
|
-
send(chatId: string, request: Hume.empathicVoice.ControlPlanePublishEvent, requestOptions?:
|
|
38
|
+
send(chatId: string, request: Hume.empathicVoice.ControlPlanePublishEvent, requestOptions?: ControlPlaneClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
39
39
|
private __send;
|
|
40
|
-
connect(args:
|
|
40
|
+
connect(args: ControlPlaneClient.ConnectArgs): Promise<ControlPlaneSocket>;
|
|
41
41
|
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | null | undefined>>;
|
|
42
42
|
}
|