hume 0.15.9 → 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.
Files changed (446) hide show
  1. package/dist/cjs/BaseClient.d.ts +13 -4
  2. package/dist/cjs/BaseClient.js +59 -0
  3. package/dist/cjs/Client.d.ts +13 -13
  4. package/dist/cjs/Client.js +6 -47
  5. package/dist/cjs/api/resources/empathicVoice/client/Client.d.ts +27 -27
  6. package/dist/cjs/api/resources/empathicVoice/client/Client.js +13 -12
  7. package/dist/cjs/api/resources/empathicVoice/errors/BadRequestError.js +5 -1
  8. package/dist/cjs/api/resources/empathicVoice/errors/UnprocessableEntityError.js +5 -1
  9. package/dist/cjs/api/resources/empathicVoice/resources/chat/client/Client.d.ts +5 -5
  10. package/dist/cjs/api/resources/empathicVoice/resources/chat/client/Client.js +3 -3
  11. package/dist/cjs/api/resources/empathicVoice/resources/chat/client/index.d.ts +1 -1
  12. package/dist/cjs/api/resources/empathicVoice/resources/chat/client/index.js +2 -2
  13. package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +17 -26
  14. package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/Client.js +48 -136
  15. package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.ts +1 -1
  16. package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.d.ts +1 -1
  17. package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.d.ts +1 -1
  18. package/dist/cjs/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.d.ts +2 -6
  19. package/dist/cjs/api/resources/empathicVoice/resources/chats/client/Client.d.ts +13 -20
  20. package/dist/cjs/api/resources/empathicVoice/resources/chats/client/Client.js +32 -95
  21. package/dist/cjs/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatEventsRequest.d.ts +1 -1
  22. package/dist/cjs/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.ts +1 -1
  23. package/dist/cjs/api/resources/empathicVoice/resources/configs/client/Client.d.ts +34 -83
  24. package/dist/cjs/api/resources/empathicVoice/resources/configs/client/Client.js +64 -245
  25. package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigVersionsRequest.d.ts +1 -1
  26. package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +4 -16
  27. package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +3 -14
  28. package/dist/cjs/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.d.ts +1 -1
  29. package/dist/cjs/api/resources/empathicVoice/resources/controlPlane/client/Client.d.ts +7 -7
  30. package/dist/cjs/api/resources/empathicVoice/resources/controlPlane/client/Client.js +6 -19
  31. package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +34 -83
  32. package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/Client.js +64 -245
  33. package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.d.ts +2 -8
  34. package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.d.ts +2 -8
  35. package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.d.ts +1 -1
  36. package/dist/cjs/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptVersionsRequest.d.ts +1 -1
  37. package/dist/cjs/api/resources/empathicVoice/resources/tools/client/Client.d.ts +34 -83
  38. package/dist/cjs/api/resources/empathicVoice/resources/tools/client/Client.js +64 -245
  39. package/dist/cjs/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedTool.d.ts +4 -8
  40. package/dist/cjs/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersion.d.ts +4 -8
  41. package/dist/cjs/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersionDescription.d.ts +1 -1
  42. package/dist/cjs/api/resources/empathicVoice/types/AssistantEnd.d.ts +1 -1
  43. package/dist/cjs/api/resources/empathicVoice/types/AssistantInput.d.ts +2 -5
  44. package/dist/cjs/api/resources/empathicVoice/types/AssistantMessage.d.ts +2 -2
  45. package/dist/cjs/api/resources/empathicVoice/types/AssistantProsody.d.ts +1 -1
  46. package/dist/cjs/api/resources/empathicVoice/types/AudioInput.d.ts +6 -4
  47. package/dist/cjs/api/resources/empathicVoice/types/AudioOutput.d.ts +1 -4
  48. package/dist/cjs/api/resources/empathicVoice/types/ChatMetadata.d.ts +3 -5
  49. package/dist/cjs/api/resources/empathicVoice/types/ConnectSessionSettings.d.ts +8 -4
  50. package/dist/cjs/api/resources/empathicVoice/types/ConnectSessionSettingsAudio.d.ts +3 -3
  51. package/dist/cjs/api/resources/empathicVoice/types/ConnectSessionSettingsContext.d.ts +9 -3
  52. package/dist/cjs/api/resources/empathicVoice/types/Context.d.ts +9 -3
  53. package/dist/cjs/api/resources/empathicVoice/types/ControlPlanePublishEvent.d.ts +1 -36
  54. package/dist/cjs/api/resources/empathicVoice/types/JsonMessage.d.ts +1 -50
  55. package/dist/cjs/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +2 -4
  56. package/dist/cjs/api/resources/empathicVoice/types/PostedBuiltinTool.d.ts +1 -9
  57. package/dist/cjs/api/resources/empathicVoice/types/PostedBuiltinToolName.d.ts +0 -8
  58. package/dist/cjs/api/resources/empathicVoice/types/PostedBuiltinToolName.js +0 -8
  59. package/dist/cjs/api/resources/empathicVoice/types/PostedEllmModel.d.ts +1 -5
  60. package/dist/cjs/api/resources/empathicVoice/types/PostedEventMessageSpec.d.ts +2 -6
  61. package/dist/cjs/api/resources/empathicVoice/types/PostedEventMessageSpecs.d.ts +1 -14
  62. package/dist/cjs/api/resources/empathicVoice/types/PostedLanguageModel.d.ts +1 -7
  63. package/dist/cjs/api/resources/empathicVoice/types/PostedNudgeSpec.d.ts +2 -2
  64. package/dist/cjs/api/resources/empathicVoice/types/PostedTimeoutSpecs.d.ts +1 -13
  65. package/dist/cjs/api/resources/empathicVoice/types/PostedTimeoutSpecsInactivity.d.ts +0 -11
  66. package/dist/cjs/api/resources/empathicVoice/types/PostedTimeoutSpecsMaxDuration.d.ts +0 -11
  67. package/dist/cjs/api/resources/empathicVoice/types/PostedUserDefinedToolSpec.d.ts +1 -7
  68. package/dist/cjs/api/resources/empathicVoice/types/PostedWebhookSpec.d.ts +2 -6
  69. package/dist/cjs/api/resources/empathicVoice/types/ResumeAssistantMessage.d.ts +1 -3
  70. package/dist/cjs/api/resources/empathicVoice/types/ReturnBuiltinTool.d.ts +1 -2
  71. package/dist/cjs/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.d.ts +0 -1
  72. package/dist/cjs/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.js +0 -1
  73. package/dist/cjs/api/resources/empathicVoice/types/ReturnChat.d.ts +4 -19
  74. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatAudioReconstruction.d.ts +0 -13
  75. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.d.ts +0 -13
  76. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.js +0 -13
  77. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEvent.d.ts +5 -30
  78. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventRole.d.ts +0 -7
  79. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventRole.js +0 -7
  80. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventType.d.ts +0 -14
  81. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatEventType.js +0 -14
  82. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroup.d.ts +5 -6
  83. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructions.d.ts +1 -10
  84. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.d.ts +0 -5
  85. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.js +0 -5
  86. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.ts +6 -16
  87. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.d.ts +0 -5
  88. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.js +0 -5
  89. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.ts +3 -12
  90. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.d.ts +0 -5
  91. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.js +0 -5
  92. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEvents.d.ts +6 -30
  93. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.d.ts +0 -5
  94. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.js +0 -5
  95. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.d.ts +0 -15
  96. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.js +0 -15
  97. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatStatus.d.ts +0 -15
  98. package/dist/cjs/api/resources/empathicVoice/types/ReturnChatStatus.js +0 -15
  99. package/dist/cjs/api/resources/empathicVoice/types/ReturnConfigSpec.d.ts +2 -8
  100. package/dist/cjs/api/resources/empathicVoice/types/ReturnEllmModel.d.ts +1 -5
  101. package/dist/cjs/api/resources/empathicVoice/types/ReturnEventMessageSpec.d.ts +2 -6
  102. package/dist/cjs/api/resources/empathicVoice/types/ReturnEventMessageSpecs.d.ts +1 -14
  103. package/dist/cjs/api/resources/empathicVoice/types/ReturnLanguageModel.d.ts +1 -7
  104. package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatGroups.d.ts +2 -11
  105. package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.d.ts +0 -5
  106. package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.js +0 -5
  107. package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChats.d.ts +2 -11
  108. package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.d.ts +0 -5
  109. package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.js +0 -5
  110. package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedConfigs.d.ts +2 -6
  111. package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedPrompts.d.ts +2 -6
  112. package/dist/cjs/api/resources/empathicVoice/types/ReturnPagedUserDefinedTools.d.ts +2 -6
  113. package/dist/cjs/api/resources/empathicVoice/types/ReturnPromptVersionType.d.ts +0 -1
  114. package/dist/cjs/api/resources/empathicVoice/types/ReturnPromptVersionType.js +0 -1
  115. package/dist/cjs/api/resources/empathicVoice/types/ReturnTimeoutSpec.d.ts +2 -6
  116. package/dist/cjs/api/resources/empathicVoice/types/ReturnTimeoutSpecs.d.ts +1 -13
  117. package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.ts +7 -19
  118. package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.d.ts +0 -1
  119. package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.js +0 -1
  120. package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.d.ts +0 -1
  121. package/dist/cjs/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.js +0 -1
  122. package/dist/cjs/api/resources/empathicVoice/types/ReturnVoice.d.ts +5 -3
  123. package/dist/cjs/api/resources/empathicVoice/types/ReturnWebhookSpec.d.ts +2 -6
  124. package/dist/cjs/api/resources/empathicVoice/types/SessionSettings.d.ts +10 -19
  125. package/dist/cjs/api/resources/empathicVoice/types/SubscribeEvent.d.ts +1 -55
  126. package/dist/cjs/api/resources/empathicVoice/types/ToolCallMessage.d.ts +3 -9
  127. package/dist/cjs/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +3 -5
  128. package/dist/cjs/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +3 -11
  129. package/dist/cjs/api/resources/empathicVoice/types/UserInput.d.ts +6 -2
  130. package/dist/cjs/api/resources/empathicVoice/types/UserInterruption.d.ts +1 -3
  131. package/dist/cjs/api/resources/empathicVoice/types/UserMessage.d.ts +3 -17
  132. package/dist/cjs/api/resources/empathicVoice/types/VoiceId.d.ts +11 -2
  133. package/dist/cjs/api/resources/empathicVoice/types/VoiceName.d.ts +11 -2
  134. package/dist/cjs/api/resources/empathicVoice/types/WebSocketError.d.ts +1 -3
  135. package/dist/cjs/api/resources/expressionMeasurement/client/Client.d.ts +9 -9
  136. package/dist/cjs/api/resources/expressionMeasurement/client/Client.js +7 -6
  137. package/dist/cjs/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +17 -18
  138. package/dist/cjs/api/resources/expressionMeasurement/resources/batch/client/Client.js +63 -151
  139. package/dist/cjs/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.ts +7 -8
  140. package/dist/cjs/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.js +7 -12
  141. package/dist/cjs/api/resources/tts/client/Client.d.ts +19 -20
  142. package/dist/cjs/api/resources/tts/client/Client.js +56 -138
  143. package/dist/cjs/api/resources/tts/errors/BadRequestError.js +5 -1
  144. package/dist/cjs/api/resources/tts/errors/UnprocessableEntityError.js +5 -1
  145. package/dist/cjs/api/resources/tts/resources/streamInput/client/Client.d.ts +15 -14
  146. package/dist/cjs/api/resources/tts/resources/streamInput/client/Client.js +10 -6
  147. package/dist/cjs/api/resources/tts/resources/voices/client/Client.d.ts +13 -14
  148. package/dist/cjs/api/resources/tts/resources/voices/client/Client.js +33 -87
  149. package/dist/cjs/api/resources/tts/resources/voices/client/requests/PostedVoice.d.ts +1 -1
  150. package/dist/cjs/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.ts +1 -1
  151. package/dist/cjs/api/resources/tts/types/OctaveVersion.d.ts +7 -3
  152. package/dist/cjs/api/resources/tts/types/OctaveVersion.js +7 -3
  153. package/dist/cjs/api/resources/tts/types/PostedTts.d.ts +0 -6
  154. package/dist/cjs/api/resources/tts/types/PostedUtteranceVoiceWithId.d.ts +1 -1
  155. package/dist/cjs/api/resources/tts/types/PostedUtteranceVoiceWithName.d.ts +1 -1
  156. package/dist/cjs/api/resources/tts/types/PublishTts.d.ts +14 -4
  157. package/dist/cjs/api/resources/tts/types/ReturnPagedVoices.d.ts +5 -9
  158. package/dist/cjs/api/resources/tts/types/ReturnVoice.d.ts +3 -3
  159. package/dist/cjs/auth/HeaderAuthProvider.d.ts +26 -0
  160. package/dist/cjs/auth/HeaderAuthProvider.js +91 -0
  161. package/dist/cjs/auth/index.d.ts +1 -0
  162. package/dist/cjs/auth/index.js +5 -0
  163. package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
  164. package/dist/cjs/core/auth/AuthProvider.js +2 -0
  165. package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
  166. package/dist/cjs/core/auth/AuthRequest.js +2 -0
  167. package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
  168. package/dist/cjs/core/auth/BasicAuth.js +27 -0
  169. package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
  170. package/dist/cjs/core/auth/BearerToken.js +16 -0
  171. package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
  172. package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
  173. package/dist/cjs/core/auth/index.d.ts +5 -0
  174. package/dist/cjs/core/auth/index.js +9 -0
  175. package/dist/cjs/core/base64.d.ts +2 -0
  176. package/dist/cjs/core/base64.js +26 -0
  177. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
  178. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
  179. package/dist/cjs/core/fetcher/Fetcher.d.ts +6 -3
  180. package/dist/cjs/core/fetcher/Fetcher.js +42 -24
  181. package/dist/cjs/core/fetcher/getResponseBody.js +18 -4
  182. package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
  183. package/dist/cjs/core/fetcher/makeRequest.js +0 -2
  184. package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
  185. package/dist/cjs/core/fetcher/signals.d.ts +1 -7
  186. package/dist/cjs/core/fetcher/signals.js +0 -12
  187. package/dist/cjs/core/headers.d.ts +2 -2
  188. package/dist/cjs/core/index.d.ts +2 -0
  189. package/dist/cjs/core/index.js +2 -0
  190. package/dist/cjs/core/logging/logger.js +1 -1
  191. package/dist/cjs/core/pagination/CustomPager.d.ts +67 -0
  192. package/dist/cjs/core/pagination/CustomPager.js +194 -0
  193. package/dist/cjs/core/pagination/index.d.ts +1 -0
  194. package/dist/cjs/core/pagination/index.js +4 -1
  195. package/dist/cjs/core/runtime/runtime.js +11 -10
  196. package/dist/cjs/core/schemas/Schema.d.ts +1 -0
  197. package/dist/cjs/core/schemas/Schema.js +1 -0
  198. package/dist/cjs/core/schemas/builders/object/object.js +14 -1
  199. package/dist/cjs/core/schemas/builders/primitives/index.d.ts +1 -0
  200. package/dist/cjs/core/schemas/builders/primitives/index.js +3 -1
  201. package/dist/cjs/core/schemas/builders/primitives/never.d.ts +2 -0
  202. package/dist/cjs/core/schemas/builders/primitives/never.js +14 -0
  203. package/dist/cjs/core/url/join.js +0 -1
  204. package/dist/cjs/errors/HumeError.js +5 -1
  205. package/dist/cjs/errors/HumeTimeoutError.js +5 -1
  206. package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
  207. package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
  208. package/dist/cjs/serialization/resources/empathicVoice/types/ReturnVoice.d.ts +3 -3
  209. package/dist/cjs/serialization/resources/empathicVoice/types/ReturnVoice.js +3 -3
  210. package/dist/cjs/serialization/resources/tts/types/ReturnPagedVoices.d.ts +4 -4
  211. package/dist/cjs/serialization/resources/tts/types/ReturnPagedVoices.js +4 -4
  212. package/dist/cjs/serialization/resources/tts/types/ReturnVoice.d.ts +3 -3
  213. package/dist/cjs/serialization/resources/tts/types/ReturnVoice.js +3 -3
  214. package/dist/cjs/version.d.ts +1 -1
  215. package/dist/cjs/version.js +1 -1
  216. package/dist/cjs/wrapper/expressionMeasurement/ExpressionMeasurementClient.d.ts +1 -1
  217. package/dist/cjs/wrapper/expressionMeasurement/ExpressionMeasurementClient.js +1 -1
  218. package/dist/cjs/wrapper/expressionMeasurement/batch/BatchClient.d.ts +1 -1
  219. package/dist/cjs/wrapper/expressionMeasurement/batch/BatchClient.js +1 -1
  220. package/dist/cjs/wrapper/fetchAccessToken.js +3 -0
  221. package/dist/esm/BaseClient.d.mts +13 -4
  222. package/dist/esm/BaseClient.mjs +24 -1
  223. package/dist/esm/Client.d.mts +13 -13
  224. package/dist/esm/Client.mjs +9 -17
  225. package/dist/esm/api/resources/empathicVoice/client/Client.d.mts +27 -27
  226. package/dist/esm/api/resources/empathicVoice/client/Client.mjs +18 -17
  227. package/dist/esm/api/resources/empathicVoice/errors/BadRequestError.mjs +5 -1
  228. package/dist/esm/api/resources/empathicVoice/errors/UnprocessableEntityError.mjs +5 -1
  229. package/dist/esm/api/resources/empathicVoice/resources/chat/client/Client.d.mts +5 -5
  230. package/dist/esm/api/resources/empathicVoice/resources/chat/client/Client.mjs +1 -1
  231. package/dist/esm/api/resources/empathicVoice/resources/chat/client/index.d.mts +1 -1
  232. package/dist/esm/api/resources/empathicVoice/resources/chat/client/index.mjs +1 -1
  233. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/Client.d.mts +17 -26
  234. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/Client.mjs +47 -135
  235. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.mts +1 -1
  236. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.d.mts +1 -1
  237. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.d.mts +1 -1
  238. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.d.mts +2 -6
  239. package/dist/esm/api/resources/empathicVoice/resources/chats/client/Client.d.mts +13 -20
  240. package/dist/esm/api/resources/empathicVoice/resources/chats/client/Client.mjs +31 -94
  241. package/dist/esm/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatEventsRequest.d.mts +1 -1
  242. package/dist/esm/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.mts +1 -1
  243. package/dist/esm/api/resources/empathicVoice/resources/configs/client/Client.d.mts +34 -83
  244. package/dist/esm/api/resources/empathicVoice/resources/configs/client/Client.mjs +63 -244
  245. package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigVersionsRequest.d.mts +1 -1
  246. package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.mts +4 -16
  247. package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.mts +3 -14
  248. package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.d.mts +1 -1
  249. package/dist/esm/api/resources/empathicVoice/resources/controlPlane/client/Client.d.mts +7 -7
  250. package/dist/esm/api/resources/empathicVoice/resources/controlPlane/client/Client.mjs +4 -17
  251. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/Client.d.mts +34 -83
  252. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/Client.mjs +63 -244
  253. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.d.mts +2 -8
  254. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.d.mts +2 -8
  255. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.d.mts +1 -1
  256. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptVersionsRequest.d.mts +1 -1
  257. package/dist/esm/api/resources/empathicVoice/resources/tools/client/Client.d.mts +34 -83
  258. package/dist/esm/api/resources/empathicVoice/resources/tools/client/Client.mjs +63 -244
  259. package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedTool.d.mts +4 -8
  260. package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersion.d.mts +4 -8
  261. package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersionDescription.d.mts +1 -1
  262. package/dist/esm/api/resources/empathicVoice/types/AssistantEnd.d.mts +1 -1
  263. package/dist/esm/api/resources/empathicVoice/types/AssistantInput.d.mts +2 -5
  264. package/dist/esm/api/resources/empathicVoice/types/AssistantMessage.d.mts +2 -2
  265. package/dist/esm/api/resources/empathicVoice/types/AssistantProsody.d.mts +1 -1
  266. package/dist/esm/api/resources/empathicVoice/types/AudioInput.d.mts +6 -4
  267. package/dist/esm/api/resources/empathicVoice/types/AudioOutput.d.mts +1 -4
  268. package/dist/esm/api/resources/empathicVoice/types/ChatMetadata.d.mts +3 -5
  269. package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettings.d.mts +8 -4
  270. package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettingsAudio.d.mts +3 -3
  271. package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettingsContext.d.mts +9 -3
  272. package/dist/esm/api/resources/empathicVoice/types/Context.d.mts +9 -3
  273. package/dist/esm/api/resources/empathicVoice/types/ControlPlanePublishEvent.d.mts +1 -36
  274. package/dist/esm/api/resources/empathicVoice/types/JsonMessage.d.mts +1 -50
  275. package/dist/esm/api/resources/empathicVoice/types/PauseAssistantMessage.d.mts +2 -4
  276. package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinTool.d.mts +1 -9
  277. package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinToolName.d.mts +0 -8
  278. package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinToolName.mjs +0 -8
  279. package/dist/esm/api/resources/empathicVoice/types/PostedEllmModel.d.mts +1 -5
  280. package/dist/esm/api/resources/empathicVoice/types/PostedEventMessageSpec.d.mts +2 -6
  281. package/dist/esm/api/resources/empathicVoice/types/PostedEventMessageSpecs.d.mts +1 -14
  282. package/dist/esm/api/resources/empathicVoice/types/PostedLanguageModel.d.mts +1 -7
  283. package/dist/esm/api/resources/empathicVoice/types/PostedNudgeSpec.d.mts +2 -2
  284. package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecs.d.mts +1 -13
  285. package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecsInactivity.d.mts +0 -11
  286. package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecsMaxDuration.d.mts +0 -11
  287. package/dist/esm/api/resources/empathicVoice/types/PostedUserDefinedToolSpec.d.mts +1 -7
  288. package/dist/esm/api/resources/empathicVoice/types/PostedWebhookSpec.d.mts +2 -6
  289. package/dist/esm/api/resources/empathicVoice/types/ResumeAssistantMessage.d.mts +1 -3
  290. package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinTool.d.mts +1 -2
  291. package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.d.mts +0 -1
  292. package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.mjs +0 -1
  293. package/dist/esm/api/resources/empathicVoice/types/ReturnChat.d.mts +4 -19
  294. package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstruction.d.mts +0 -13
  295. package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.d.mts +0 -13
  296. package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.mjs +0 -13
  297. package/dist/esm/api/resources/empathicVoice/types/ReturnChatEvent.d.mts +5 -30
  298. package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventRole.d.mts +0 -7
  299. package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventRole.mjs +0 -7
  300. package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventType.d.mts +0 -14
  301. package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventType.mjs +0 -14
  302. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroup.d.mts +5 -6
  303. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructions.d.mts +1 -10
  304. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.d.mts +0 -5
  305. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.mjs +0 -5
  306. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.mts +6 -16
  307. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.d.mts +0 -5
  308. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.mjs +0 -5
  309. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.mts +3 -12
  310. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.d.mts +0 -5
  311. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.mjs +0 -5
  312. package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEvents.d.mts +6 -30
  313. package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.d.mts +0 -5
  314. package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.mjs +0 -5
  315. package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.d.mts +0 -15
  316. package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.mjs +0 -15
  317. package/dist/esm/api/resources/empathicVoice/types/ReturnChatStatus.d.mts +0 -15
  318. package/dist/esm/api/resources/empathicVoice/types/ReturnChatStatus.mjs +0 -15
  319. package/dist/esm/api/resources/empathicVoice/types/ReturnConfigSpec.d.mts +2 -8
  320. package/dist/esm/api/resources/empathicVoice/types/ReturnEllmModel.d.mts +1 -5
  321. package/dist/esm/api/resources/empathicVoice/types/ReturnEventMessageSpec.d.mts +2 -6
  322. package/dist/esm/api/resources/empathicVoice/types/ReturnEventMessageSpecs.d.mts +1 -14
  323. package/dist/esm/api/resources/empathicVoice/types/ReturnLanguageModel.d.mts +1 -7
  324. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroups.d.mts +2 -11
  325. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.d.mts +0 -5
  326. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.mjs +0 -5
  327. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChats.d.mts +2 -11
  328. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.d.mts +0 -5
  329. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.mjs +0 -5
  330. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedConfigs.d.mts +2 -6
  331. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedPrompts.d.mts +2 -6
  332. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedUserDefinedTools.d.mts +2 -6
  333. package/dist/esm/api/resources/empathicVoice/types/ReturnPromptVersionType.d.mts +0 -1
  334. package/dist/esm/api/resources/empathicVoice/types/ReturnPromptVersionType.mjs +0 -1
  335. package/dist/esm/api/resources/empathicVoice/types/ReturnTimeoutSpec.d.mts +2 -6
  336. package/dist/esm/api/resources/empathicVoice/types/ReturnTimeoutSpecs.d.mts +1 -13
  337. package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.mts +7 -19
  338. package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.d.mts +0 -1
  339. package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.mjs +0 -1
  340. package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.d.mts +0 -1
  341. package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.mjs +0 -1
  342. package/dist/esm/api/resources/empathicVoice/types/ReturnVoice.d.mts +5 -3
  343. package/dist/esm/api/resources/empathicVoice/types/ReturnWebhookSpec.d.mts +2 -6
  344. package/dist/esm/api/resources/empathicVoice/types/SessionSettings.d.mts +10 -19
  345. package/dist/esm/api/resources/empathicVoice/types/SubscribeEvent.d.mts +1 -55
  346. package/dist/esm/api/resources/empathicVoice/types/ToolCallMessage.d.mts +3 -9
  347. package/dist/esm/api/resources/empathicVoice/types/ToolErrorMessage.d.mts +3 -5
  348. package/dist/esm/api/resources/empathicVoice/types/ToolResponseMessage.d.mts +3 -11
  349. package/dist/esm/api/resources/empathicVoice/types/UserInput.d.mts +6 -2
  350. package/dist/esm/api/resources/empathicVoice/types/UserInterruption.d.mts +1 -3
  351. package/dist/esm/api/resources/empathicVoice/types/UserMessage.d.mts +3 -17
  352. package/dist/esm/api/resources/empathicVoice/types/VoiceId.d.mts +11 -2
  353. package/dist/esm/api/resources/empathicVoice/types/VoiceName.d.mts +11 -2
  354. package/dist/esm/api/resources/empathicVoice/types/WebSocketError.d.mts +1 -3
  355. package/dist/esm/api/resources/expressionMeasurement/client/Client.d.mts +9 -9
  356. package/dist/esm/api/resources/expressionMeasurement/client/Client.mjs +6 -5
  357. package/dist/esm/api/resources/expressionMeasurement/resources/batch/client/Client.d.mts +17 -18
  358. package/dist/esm/api/resources/expressionMeasurement/resources/batch/client/Client.mjs +61 -149
  359. package/dist/esm/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.mts +7 -8
  360. package/dist/esm/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.mjs +5 -10
  361. package/dist/esm/api/resources/tts/client/Client.d.mts +19 -20
  362. package/dist/esm/api/resources/tts/client/Client.mjs +56 -138
  363. package/dist/esm/api/resources/tts/errors/BadRequestError.mjs +5 -1
  364. package/dist/esm/api/resources/tts/errors/UnprocessableEntityError.mjs +5 -1
  365. package/dist/esm/api/resources/tts/resources/streamInput/client/Client.d.mts +15 -14
  366. package/dist/esm/api/resources/tts/resources/streamInput/client/Client.mjs +8 -4
  367. package/dist/esm/api/resources/tts/resources/voices/client/Client.d.mts +13 -14
  368. package/dist/esm/api/resources/tts/resources/voices/client/Client.mjs +32 -86
  369. package/dist/esm/api/resources/tts/resources/voices/client/requests/PostedVoice.d.mts +1 -1
  370. package/dist/esm/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.mts +1 -1
  371. package/dist/esm/api/resources/tts/types/OctaveVersion.d.mts +7 -3
  372. package/dist/esm/api/resources/tts/types/OctaveVersion.mjs +7 -3
  373. package/dist/esm/api/resources/tts/types/PostedTts.d.mts +0 -6
  374. package/dist/esm/api/resources/tts/types/PostedUtteranceVoiceWithId.d.mts +1 -1
  375. package/dist/esm/api/resources/tts/types/PostedUtteranceVoiceWithName.d.mts +1 -1
  376. package/dist/esm/api/resources/tts/types/PublishTts.d.mts +14 -4
  377. package/dist/esm/api/resources/tts/types/ReturnPagedVoices.d.mts +5 -9
  378. package/dist/esm/api/resources/tts/types/ReturnVoice.d.mts +3 -3
  379. package/dist/esm/auth/HeaderAuthProvider.d.mts +26 -0
  380. package/dist/esm/auth/HeaderAuthProvider.mjs +54 -0
  381. package/dist/esm/auth/index.d.mts +1 -0
  382. package/dist/esm/auth/index.mjs +1 -0
  383. package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
  384. package/dist/esm/core/auth/AuthProvider.mjs +1 -0
  385. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  386. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  387. package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
  388. package/dist/esm/core/auth/BasicAuth.mjs +24 -0
  389. package/dist/esm/core/auth/BearerToken.d.mts +7 -0
  390. package/dist/esm/core/auth/BearerToken.mjs +13 -0
  391. package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
  392. package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
  393. package/dist/esm/core/auth/index.d.mts +5 -0
  394. package/dist/esm/core/auth/index.mjs +3 -0
  395. package/dist/esm/core/base64.d.mts +2 -0
  396. package/dist/esm/core/base64.mjs +22 -0
  397. package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
  398. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
  399. package/dist/esm/core/fetcher/Fetcher.d.mts +6 -3
  400. package/dist/esm/core/fetcher/Fetcher.mjs +42 -24
  401. package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
  402. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
  403. package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
  404. package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
  405. package/dist/esm/core/fetcher/signals.d.mts +1 -7
  406. package/dist/esm/core/fetcher/signals.mjs +0 -12
  407. package/dist/esm/core/headers.d.mts +2 -2
  408. package/dist/esm/core/index.d.mts +2 -0
  409. package/dist/esm/core/index.mjs +2 -0
  410. package/dist/esm/core/logging/logger.mjs +1 -1
  411. package/dist/esm/core/pagination/CustomPager.d.mts +67 -0
  412. package/dist/esm/core/pagination/CustomPager.mjs +189 -0
  413. package/dist/esm/core/pagination/index.d.mts +1 -0
  414. package/dist/esm/core/pagination/index.mjs +1 -0
  415. package/dist/esm/core/runtime/runtime.mjs +11 -10
  416. package/dist/esm/core/schemas/Schema.d.mts +1 -0
  417. package/dist/esm/core/schemas/Schema.mjs +1 -0
  418. package/dist/esm/core/schemas/builders/object/object.mjs +14 -1
  419. package/dist/esm/core/schemas/builders/primitives/index.d.mts +1 -0
  420. package/dist/esm/core/schemas/builders/primitives/index.mjs +1 -0
  421. package/dist/esm/core/schemas/builders/primitives/never.d.mts +2 -0
  422. package/dist/esm/core/schemas/builders/primitives/never.mjs +11 -0
  423. package/dist/esm/core/url/join.mjs +0 -1
  424. package/dist/esm/errors/HumeError.mjs +5 -1
  425. package/dist/esm/errors/HumeTimeoutError.mjs +5 -1
  426. package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
  427. package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
  428. package/dist/esm/serialization/resources/empathicVoice/types/ReturnVoice.d.mts +3 -3
  429. package/dist/esm/serialization/resources/empathicVoice/types/ReturnVoice.mjs +3 -3
  430. package/dist/esm/serialization/resources/tts/types/ReturnPagedVoices.d.mts +4 -4
  431. package/dist/esm/serialization/resources/tts/types/ReturnPagedVoices.mjs +4 -4
  432. package/dist/esm/serialization/resources/tts/types/ReturnVoice.d.mts +3 -3
  433. package/dist/esm/serialization/resources/tts/types/ReturnVoice.mjs +3 -3
  434. package/dist/esm/version.d.mts +1 -1
  435. package/dist/esm/version.mjs +1 -1
  436. package/dist/esm/wrapper/expressionMeasurement/ExpressionMeasurementClient.d.mts +1 -1
  437. package/dist/esm/wrapper/expressionMeasurement/ExpressionMeasurementClient.mjs +1 -1
  438. package/dist/esm/wrapper/expressionMeasurement/batch/BatchClient.d.mts +1 -1
  439. package/dist/esm/wrapper/expressionMeasurement/batch/BatchClient.mjs +1 -1
  440. package/dist/esm/wrapper/fetchAccessToken.mjs +3 -0
  441. package/package.json +5 -2
  442. package/reference.md +85 -669
  443. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
  444. package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
  445. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
  446. package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
@@ -8,23 +8,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
11
+ import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
12
+ import { mergeHeaders } from "../../../../../../core/headers.mjs";
12
13
  import * as core from "../../../../../../core/index.mjs";
13
14
  import * as environments from "../../../../../../environments.mjs";
15
+ import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
14
16
  import * as errors from "../../../../../../errors/index.mjs";
15
17
  import * as serializers from "../../../../../../serialization/index.mjs";
16
18
  import * as Hume from "../../../../../index.mjs";
17
- export class Configs {
18
- constructor(_options = {}) {
19
- this._options = _options;
19
+ export class ConfigsClient {
20
+ constructor(options = {}) {
21
+ this._options = normalizeClientOptionsWithAuth(options);
20
22
  }
21
23
  /**
22
- * Fetches a paginated list of **Configs**.
23
- *
24
- * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
25
- *
26
24
  * @param {Hume.empathicVoice.ConfigsListConfigsRequest} request
27
- * @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
25
+ * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
28
26
  *
29
27
  * @throws {@link Hume.empathicVoice.BadRequestError}
30
28
  *
@@ -39,20 +37,14 @@ export class Configs {
39
37
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
40
38
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
41
39
  const { pageNumber, pageSize, restrictToMostRecent, name } = request;
42
- const _queryParams = {};
43
- if (pageNumber != null) {
44
- _queryParams.page_number = pageNumber.toString();
45
- }
46
- if (pageSize != null) {
47
- _queryParams.page_size = pageSize.toString();
48
- }
49
- if (restrictToMostRecent != null) {
50
- _queryParams.restrict_to_most_recent = restrictToMostRecent.toString();
51
- }
52
- if (name != null) {
53
- _queryParams.name = name;
54
- }
55
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
40
+ const _queryParams = {
41
+ page_number: pageNumber,
42
+ page_size: pageSize,
43
+ restrict_to_most_recent: restrictToMostRecent,
44
+ name,
45
+ };
46
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
47
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
56
48
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
57
49
  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)
58
50
  .base, "v0/evi/configs"),
@@ -95,21 +87,7 @@ export class Configs {
95
87
  });
96
88
  }
97
89
  }
98
- switch (_response.error.reason) {
99
- case "non-json":
100
- throw new errors.HumeError({
101
- statusCode: _response.error.statusCode,
102
- body: _response.error.rawBody,
103
- rawResponse: _response.rawResponse,
104
- });
105
- case "timeout":
106
- throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/configs.");
107
- case "unknown":
108
- throw new errors.HumeError({
109
- message: _response.error.errorMessage,
110
- rawResponse: _response.rawResponse,
111
- });
112
- }
90
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/evi/configs");
113
91
  }));
114
92
  let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 0;
115
93
  const dataWithRawResponse = yield list(request).withRawResponse();
@@ -126,12 +104,8 @@ export class Configs {
126
104
  });
127
105
  }
128
106
  /**
129
- * Creates a **Config** which can be applied to EVI.
130
- *
131
- * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
132
- *
133
107
  * @param {Hume.empathicVoice.PostedConfig} request
134
- * @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
108
+ * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
135
109
  *
136
110
  * @throws {@link Hume.empathicVoice.BadRequestError}
137
111
  *
@@ -174,7 +148,8 @@ export class Configs {
174
148
  __createConfig(request, requestOptions) {
175
149
  return __awaiter(this, void 0, void 0, function* () {
176
150
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
177
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
151
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
152
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
178
153
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
179
154
  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"),
180
155
  method: "POST",
@@ -222,31 +197,13 @@ export class Configs {
222
197
  });
223
198
  }
224
199
  }
225
- switch (_response.error.reason) {
226
- case "non-json":
227
- throw new errors.HumeError({
228
- statusCode: _response.error.statusCode,
229
- body: _response.error.rawBody,
230
- rawResponse: _response.rawResponse,
231
- });
232
- case "timeout":
233
- throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/evi/configs.");
234
- case "unknown":
235
- throw new errors.HumeError({
236
- message: _response.error.errorMessage,
237
- rawResponse: _response.rawResponse,
238
- });
239
- }
200
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/evi/configs");
240
201
  });
241
202
  }
242
203
  /**
243
- * Fetches a list of a **Config's** versions.
244
- *
245
- * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
246
- *
247
- * @param {string} id - Identifier for a Config. Formatted as a UUID.
204
+ * @param {string} id - Identifier for a config. Formatted as a UUID.
248
205
  * @param {Hume.empathicVoice.ConfigsListConfigVersionsRequest} request
249
- * @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
206
+ * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
250
207
  *
251
208
  * @throws {@link Hume.empathicVoice.BadRequestError}
252
209
  *
@@ -258,17 +215,13 @@ export class Configs {
258
215
  const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
259
216
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
260
217
  const { pageNumber, pageSize, restrictToMostRecent } = request;
261
- const _queryParams = {};
262
- if (pageNumber != null) {
263
- _queryParams.page_number = pageNumber.toString();
264
- }
265
- if (pageSize != null) {
266
- _queryParams.page_size = pageSize.toString();
267
- }
268
- if (restrictToMostRecent != null) {
269
- _queryParams.restrict_to_most_recent = restrictToMostRecent.toString();
270
- }
271
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
218
+ const _queryParams = {
219
+ page_number: pageNumber,
220
+ page_size: pageSize,
221
+ restrict_to_most_recent: restrictToMostRecent,
222
+ };
223
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
224
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
272
225
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
273
226
  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)
274
227
  .base, `v0/evi/configs/${core.url.encodePathParam(id)}`),
@@ -311,21 +264,7 @@ export class Configs {
311
264
  });
312
265
  }
313
266
  }
314
- switch (_response.error.reason) {
315
- case "non-json":
316
- throw new errors.HumeError({
317
- statusCode: _response.error.statusCode,
318
- body: _response.error.rawBody,
319
- rawResponse: _response.rawResponse,
320
- });
321
- case "timeout":
322
- throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/configs/{id}.");
323
- case "unknown":
324
- throw new errors.HumeError({
325
- message: _response.error.errorMessage,
326
- rawResponse: _response.rawResponse,
327
- });
328
- }
267
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/evi/configs/{id}");
329
268
  }));
330
269
  let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 0;
331
270
  const dataWithRawResponse = yield list(request).withRawResponse();
@@ -342,13 +281,9 @@ export class Configs {
342
281
  });
343
282
  }
344
283
  /**
345
- * Updates a **Config** by creating a new version of the **Config**.
346
- *
347
- * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
348
- *
349
- * @param {string} id - Identifier for a Config. Formatted as a UUID.
284
+ * @param {string} id - Identifier for a config. Formatted as a UUID.
350
285
  * @param {Hume.empathicVoice.PostedConfigVersion} request
351
- * @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
286
+ * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
352
287
  *
353
288
  * @throws {@link Hume.empathicVoice.BadRequestError}
354
289
  *
@@ -394,7 +329,8 @@ export class Configs {
394
329
  __createConfigVersion(id, request, requestOptions) {
395
330
  return __awaiter(this, void 0, void 0, function* () {
396
331
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
397
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
332
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
333
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
398
334
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
399
335
  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)}`),
400
336
  method: "POST",
@@ -442,30 +378,12 @@ export class Configs {
442
378
  });
443
379
  }
444
380
  }
445
- switch (_response.error.reason) {
446
- case "non-json":
447
- throw new errors.HumeError({
448
- statusCode: _response.error.statusCode,
449
- body: _response.error.rawBody,
450
- rawResponse: _response.rawResponse,
451
- });
452
- case "timeout":
453
- throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/evi/configs/{id}.");
454
- case "unknown":
455
- throw new errors.HumeError({
456
- message: _response.error.errorMessage,
457
- rawResponse: _response.rawResponse,
458
- });
459
- }
381
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/evi/configs/{id}");
460
382
  });
461
383
  }
462
384
  /**
463
- * Deletes a **Config** and its versions.
464
- *
465
- * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
466
- *
467
- * @param {string} id - Identifier for a Config. Formatted as a UUID.
468
- * @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
385
+ * @param {string} id - Identifier for a config. Formatted as a UUID.
386
+ * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
469
387
  *
470
388
  * @throws {@link Hume.empathicVoice.BadRequestError}
471
389
  *
@@ -478,7 +396,8 @@ export class Configs {
478
396
  __deleteConfig(id, requestOptions) {
479
397
  return __awaiter(this, void 0, void 0, function* () {
480
398
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
481
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
399
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
400
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
482
401
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
483
402
  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)}`),
484
403
  method: "DELETE",
@@ -511,31 +430,13 @@ export class Configs {
511
430
  });
512
431
  }
513
432
  }
514
- switch (_response.error.reason) {
515
- case "non-json":
516
- throw new errors.HumeError({
517
- statusCode: _response.error.statusCode,
518
- body: _response.error.rawBody,
519
- rawResponse: _response.rawResponse,
520
- });
521
- case "timeout":
522
- throw new errors.HumeTimeoutError("Timeout exceeded when calling DELETE /v0/evi/configs/{id}.");
523
- case "unknown":
524
- throw new errors.HumeError({
525
- message: _response.error.errorMessage,
526
- rawResponse: _response.rawResponse,
527
- });
528
- }
433
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/evi/configs/{id}");
529
434
  });
530
435
  }
531
436
  /**
532
- * Updates the name of a **Config**.
533
- *
534
- * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
535
- *
536
- * @param {string} id - Identifier for a Config. Formatted as a UUID.
437
+ * @param {string} id - Identifier for a config. Formatted as a UUID.
537
438
  * @param {Hume.empathicVoice.PostedConfigName} request
538
- * @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
439
+ * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
539
440
  *
540
441
  * @throws {@link Hume.empathicVoice.BadRequestError}
541
442
  *
@@ -550,7 +451,8 @@ export class Configs {
550
451
  __updateConfigName(id, request, requestOptions) {
551
452
  return __awaiter(this, void 0, void 0, function* () {
552
453
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
553
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
454
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
455
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
554
456
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
555
457
  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)}`),
556
458
  method: "PATCH",
@@ -590,35 +492,13 @@ export class Configs {
590
492
  });
591
493
  }
592
494
  }
593
- switch (_response.error.reason) {
594
- case "non-json":
595
- throw new errors.HumeError({
596
- statusCode: _response.error.statusCode,
597
- body: _response.error.rawBody,
598
- rawResponse: _response.rawResponse,
599
- });
600
- case "timeout":
601
- throw new errors.HumeTimeoutError("Timeout exceeded when calling PATCH /v0/evi/configs/{id}.");
602
- case "unknown":
603
- throw new errors.HumeError({
604
- message: _response.error.errorMessage,
605
- rawResponse: _response.rawResponse,
606
- });
607
- }
495
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v0/evi/configs/{id}");
608
496
  });
609
497
  }
610
498
  /**
611
- * Fetches a specified version of a **Config**.
612
- *
613
- * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
614
- *
615
- * @param {string} id - Identifier for a Config. Formatted as a UUID.
616
- * @param {number} version - Version number for a Config.
617
- *
618
- * 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.
619
- *
620
- * Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number.
621
- * @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
499
+ * @param {string} id - Identifier for a config. Formatted as a UUID.
500
+ * @param {number} version - Version number for a config. Version numbers should be integers.
501
+ * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
622
502
  *
623
503
  * @throws {@link Hume.empathicVoice.BadRequestError}
624
504
  *
@@ -631,7 +511,8 @@ export class Configs {
631
511
  __getConfigVersion(id, version, requestOptions) {
632
512
  return __awaiter(this, void 0, void 0, function* () {
633
513
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
634
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
514
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
515
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
635
516
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
636
517
  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)}`),
637
518
  method: "GET",
@@ -673,35 +554,13 @@ export class Configs {
673
554
  });
674
555
  }
675
556
  }
676
- switch (_response.error.reason) {
677
- case "non-json":
678
- throw new errors.HumeError({
679
- statusCode: _response.error.statusCode,
680
- body: _response.error.rawBody,
681
- rawResponse: _response.rawResponse,
682
- });
683
- case "timeout":
684
- throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/configs/{id}/version/{version}.");
685
- case "unknown":
686
- throw new errors.HumeError({
687
- message: _response.error.errorMessage,
688
- rawResponse: _response.rawResponse,
689
- });
690
- }
557
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/evi/configs/{id}/version/{version}");
691
558
  });
692
559
  }
693
560
  /**
694
- * Deletes a specified version of a **Config**.
695
- *
696
- * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
697
- *
698
- * @param {string} id - Identifier for a Config. Formatted as a UUID.
699
- * @param {number} version - Version number for a Config.
700
- *
701
- * 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.
702
- *
703
- * Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number.
704
- * @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
561
+ * @param {string} id - Identifier for a config. Formatted as a UUID.
562
+ * @param {number} version - Version number for a config. Version numbers should be integers.
563
+ * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
705
564
  *
706
565
  * @throws {@link Hume.empathicVoice.BadRequestError}
707
566
  *
@@ -714,7 +573,8 @@ export class Configs {
714
573
  __deleteConfigVersion(id, version, requestOptions) {
715
574
  return __awaiter(this, void 0, void 0, function* () {
716
575
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
717
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
576
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
577
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
718
578
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
719
579
  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)}`),
720
580
  method: "DELETE",
@@ -747,36 +607,14 @@ export class Configs {
747
607
  });
748
608
  }
749
609
  }
750
- switch (_response.error.reason) {
751
- case "non-json":
752
- throw new errors.HumeError({
753
- statusCode: _response.error.statusCode,
754
- body: _response.error.rawBody,
755
- rawResponse: _response.rawResponse,
756
- });
757
- case "timeout":
758
- throw new errors.HumeTimeoutError("Timeout exceeded when calling DELETE /v0/evi/configs/{id}/version/{version}.");
759
- case "unknown":
760
- throw new errors.HumeError({
761
- message: _response.error.errorMessage,
762
- rawResponse: _response.rawResponse,
763
- });
764
- }
610
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/evi/configs/{id}/version/{version}");
765
611
  });
766
612
  }
767
613
  /**
768
- * Updates the description of a **Config**.
769
- *
770
- * For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
771
- *
772
- * @param {string} id - Identifier for a Config. Formatted as a UUID.
773
- * @param {number} version - Version number for a Config.
774
- *
775
- * 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.
776
- *
777
- * Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number.
614
+ * @param {string} id - Identifier for a config. Formatted as a UUID.
615
+ * @param {number} version - Version number for a config. Version numbers should be integers.
778
616
  * @param {Hume.empathicVoice.PostedConfigVersionDescription} request
779
- * @param {Configs.RequestOptions} requestOptions - Request-specific configuration.
617
+ * @param {ConfigsClient.RequestOptions} requestOptions - Request-specific configuration.
780
618
  *
781
619
  * @throws {@link Hume.empathicVoice.BadRequestError}
782
620
  *
@@ -791,7 +629,8 @@ export class Configs {
791
629
  __updateConfigDescription(id_1, version_1) {
792
630
  return __awaiter(this, arguments, void 0, function* (id, version, request = {}, requestOptions) {
793
631
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
794
- const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
632
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
633
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
795
634
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
796
635
  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)}`),
797
636
  method: "PATCH",
@@ -839,27 +678,7 @@ export class Configs {
839
678
  });
840
679
  }
841
680
  }
842
- switch (_response.error.reason) {
843
- case "non-json":
844
- throw new errors.HumeError({
845
- statusCode: _response.error.statusCode,
846
- body: _response.error.rawBody,
847
- rawResponse: _response.rawResponse,
848
- });
849
- case "timeout":
850
- throw new errors.HumeTimeoutError("Timeout exceeded when calling PATCH /v0/evi/configs/{id}/version/{version}.");
851
- case "unknown":
852
- throw new errors.HumeError({
853
- message: _response.error.errorMessage,
854
- rawResponse: _response.rawResponse,
855
- });
856
- }
857
- });
858
- }
859
- _getCustomAuthorizationHeaders() {
860
- return __awaiter(this, void 0, void 0, function* () {
861
- const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
862
- return { "X-Hume-Api-Key": apiKeyValue };
681
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v0/evi/configs/{id}/version/{version}");
863
682
  });
864
683
  }
865
684
  }
@@ -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 config. To include all versions of each config in the list, set `restrict_to_most_recent` to false. */
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
  }
@@ -34,34 +34,22 @@ import type * as Hume from "../../../../../../index.mjs";
34
34
  * }
35
35
  */
36
36
  export interface PostedConfig {
37
- /** List of built-in tools associated with this Config. */
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
- /** EVI version to use. Only versions `3` and `4-mini` are supported. */
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
- /** List of user-defined tools associated with this Config. */
49
+ /** Tool specification for a Config. */
61
50
  tools?: (Hume.empathicVoice.PostedUserDefinedToolSpec | undefined)[];
62
- /** An optional description of the Config version. */
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.mjs";
37
37
  * }
38
38
  */
39
39
  export interface PostedConfigVersion {
40
- /** List of built-in tools associated with this Config version. */
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
- /** List of user-defined tools associated with this Config version. */
50
+ /** Tool specification for a Config. */
61
51
  tools?: (Hume.empathicVoice.PostedUserDefinedToolSpec | undefined)[];
62
- /** An optional description of the Config version. */
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)[];
@@ -5,6 +5,6 @@
5
5
  * }
6
6
  */
7
7
  export interface PostedConfigVersionDescription {
8
- /** An optional description of the Config version. */
8
+ /** Description that is appended to a specific version of a Config. */
9
9
  versionDescription?: string;
10
10
  }
@@ -2,7 +2,7 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../Ba
2
2
  import * as core from "../../../../../../core/index.mjs";
3
3
  import * as Hume from "../../../../../index.mjs";
4
4
  import { ControlPlaneSocket } from "./Socket.mjs";
5
- export declare namespace ControlPlane {
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 ControlPlane {
22
- protected readonly _options: ControlPlane.Options;
23
- constructor(_options?: ControlPlane.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 {ControlPlane.RequestOptions} requestOptions - Request-specific configuration.
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?: ControlPlane.RequestOptions): core.HttpResponsePromise<void>;
38
+ send(chatId: string, request: Hume.empathicVoice.ControlPlanePublishEvent, requestOptions?: ControlPlaneClient.RequestOptions): core.HttpResponsePromise<void>;
39
39
  private __send;
40
- connect(args: ControlPlane.ConnectArgs): Promise<ControlPlaneSocket>;
40
+ connect(args: ControlPlaneClient.ConnectArgs): Promise<ControlPlaneSocket>;
41
41
  protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | null | undefined>>;
42
42
  }