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.
Files changed (454) 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 +8 -49
  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/SilenceFiller.d.ts +64 -10
  217. package/dist/cjs/wrapper/SilenceFiller.js +109 -26
  218. package/dist/cjs/wrapper/expressionMeasurement/ExpressionMeasurementClient.d.ts +1 -1
  219. package/dist/cjs/wrapper/expressionMeasurement/ExpressionMeasurementClient.js +1 -1
  220. package/dist/cjs/wrapper/expressionMeasurement/batch/BatchClient.d.ts +1 -1
  221. package/dist/cjs/wrapper/expressionMeasurement/batch/BatchClient.js +1 -1
  222. package/dist/cjs/wrapper/fetchAccessToken.js +3 -0
  223. package/dist/cjs/wrapper/index.d.ts +5 -0
  224. package/dist/cjs/wrapper/index.js +6 -6
  225. package/dist/esm/BaseClient.d.mts +13 -4
  226. package/dist/esm/BaseClient.mjs +24 -1
  227. package/dist/esm/Client.d.mts +13 -13
  228. package/dist/esm/Client.mjs +11 -19
  229. package/dist/esm/api/resources/empathicVoice/client/Client.d.mts +27 -27
  230. package/dist/esm/api/resources/empathicVoice/client/Client.mjs +18 -17
  231. package/dist/esm/api/resources/empathicVoice/errors/BadRequestError.mjs +5 -1
  232. package/dist/esm/api/resources/empathicVoice/errors/UnprocessableEntityError.mjs +5 -1
  233. package/dist/esm/api/resources/empathicVoice/resources/chat/client/Client.d.mts +5 -5
  234. package/dist/esm/api/resources/empathicVoice/resources/chat/client/Client.mjs +1 -1
  235. package/dist/esm/api/resources/empathicVoice/resources/chat/client/index.d.mts +1 -1
  236. package/dist/esm/api/resources/empathicVoice/resources/chat/client/index.mjs +1 -1
  237. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/Client.d.mts +17 -26
  238. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/Client.mjs +47 -135
  239. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.mts +1 -1
  240. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetChatGroupRequest.d.mts +1 -1
  241. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.d.mts +1 -1
  242. package/dist/esm/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.d.mts +2 -6
  243. package/dist/esm/api/resources/empathicVoice/resources/chats/client/Client.d.mts +13 -20
  244. package/dist/esm/api/resources/empathicVoice/resources/chats/client/Client.mjs +31 -94
  245. package/dist/esm/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatEventsRequest.d.mts +1 -1
  246. package/dist/esm/api/resources/empathicVoice/resources/chats/client/requests/ChatsListChatsRequest.d.mts +1 -1
  247. package/dist/esm/api/resources/empathicVoice/resources/configs/client/Client.d.mts +34 -83
  248. package/dist/esm/api/resources/empathicVoice/resources/configs/client/Client.mjs +63 -244
  249. package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/ConfigsListConfigVersionsRequest.d.mts +1 -1
  250. package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.mts +4 -16
  251. package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.mts +3 -14
  252. package/dist/esm/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersionDescription.d.mts +1 -1
  253. package/dist/esm/api/resources/empathicVoice/resources/controlPlane/client/Client.d.mts +7 -7
  254. package/dist/esm/api/resources/empathicVoice/resources/controlPlane/client/Client.mjs +4 -17
  255. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/Client.d.mts +34 -83
  256. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/Client.mjs +63 -244
  257. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.d.mts +2 -8
  258. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.d.mts +2 -8
  259. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersionDescription.d.mts +1 -1
  260. package/dist/esm/api/resources/empathicVoice/resources/prompts/client/requests/PromptsListPromptVersionsRequest.d.mts +1 -1
  261. package/dist/esm/api/resources/empathicVoice/resources/tools/client/Client.d.mts +34 -83
  262. package/dist/esm/api/resources/empathicVoice/resources/tools/client/Client.mjs +63 -244
  263. package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedTool.d.mts +4 -8
  264. package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersion.d.mts +4 -8
  265. package/dist/esm/api/resources/empathicVoice/resources/tools/client/requests/PostedUserDefinedToolVersionDescription.d.mts +1 -1
  266. package/dist/esm/api/resources/empathicVoice/types/AssistantEnd.d.mts +1 -1
  267. package/dist/esm/api/resources/empathicVoice/types/AssistantInput.d.mts +2 -5
  268. package/dist/esm/api/resources/empathicVoice/types/AssistantMessage.d.mts +2 -2
  269. package/dist/esm/api/resources/empathicVoice/types/AssistantProsody.d.mts +1 -1
  270. package/dist/esm/api/resources/empathicVoice/types/AudioInput.d.mts +6 -4
  271. package/dist/esm/api/resources/empathicVoice/types/AudioOutput.d.mts +1 -4
  272. package/dist/esm/api/resources/empathicVoice/types/ChatMetadata.d.mts +3 -5
  273. package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettings.d.mts +8 -4
  274. package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettingsAudio.d.mts +3 -3
  275. package/dist/esm/api/resources/empathicVoice/types/ConnectSessionSettingsContext.d.mts +9 -3
  276. package/dist/esm/api/resources/empathicVoice/types/Context.d.mts +9 -3
  277. package/dist/esm/api/resources/empathicVoice/types/ControlPlanePublishEvent.d.mts +1 -36
  278. package/dist/esm/api/resources/empathicVoice/types/JsonMessage.d.mts +1 -50
  279. package/dist/esm/api/resources/empathicVoice/types/PauseAssistantMessage.d.mts +2 -4
  280. package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinTool.d.mts +1 -9
  281. package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinToolName.d.mts +0 -8
  282. package/dist/esm/api/resources/empathicVoice/types/PostedBuiltinToolName.mjs +0 -8
  283. package/dist/esm/api/resources/empathicVoice/types/PostedEllmModel.d.mts +1 -5
  284. package/dist/esm/api/resources/empathicVoice/types/PostedEventMessageSpec.d.mts +2 -6
  285. package/dist/esm/api/resources/empathicVoice/types/PostedEventMessageSpecs.d.mts +1 -14
  286. package/dist/esm/api/resources/empathicVoice/types/PostedLanguageModel.d.mts +1 -7
  287. package/dist/esm/api/resources/empathicVoice/types/PostedNudgeSpec.d.mts +2 -2
  288. package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecs.d.mts +1 -13
  289. package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecsInactivity.d.mts +0 -11
  290. package/dist/esm/api/resources/empathicVoice/types/PostedTimeoutSpecsMaxDuration.d.mts +0 -11
  291. package/dist/esm/api/resources/empathicVoice/types/PostedUserDefinedToolSpec.d.mts +1 -7
  292. package/dist/esm/api/resources/empathicVoice/types/PostedWebhookSpec.d.mts +2 -6
  293. package/dist/esm/api/resources/empathicVoice/types/ResumeAssistantMessage.d.mts +1 -3
  294. package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinTool.d.mts +1 -2
  295. package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.d.mts +0 -1
  296. package/dist/esm/api/resources/empathicVoice/types/ReturnBuiltinToolToolType.mjs +0 -1
  297. package/dist/esm/api/resources/empathicVoice/types/ReturnChat.d.mts +4 -19
  298. package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstruction.d.mts +0 -13
  299. package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.d.mts +0 -13
  300. package/dist/esm/api/resources/empathicVoice/types/ReturnChatAudioReconstructionStatus.mjs +0 -13
  301. package/dist/esm/api/resources/empathicVoice/types/ReturnChatEvent.d.mts +5 -30
  302. package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventRole.d.mts +0 -7
  303. package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventRole.mjs +0 -7
  304. package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventType.d.mts +0 -14
  305. package/dist/esm/api/resources/empathicVoice/types/ReturnChatEventType.mjs +0 -14
  306. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroup.d.mts +5 -6
  307. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructions.d.mts +1 -10
  308. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.d.mts +0 -5
  309. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedAudioReconstructionsPaginationDirection.mjs +0 -5
  310. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.mts +6 -16
  311. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.d.mts +0 -5
  312. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedChatsPaginationDirection.mjs +0 -5
  313. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.mts +3 -12
  314. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.d.mts +0 -5
  315. package/dist/esm/api/resources/empathicVoice/types/ReturnChatGroupPagedEventsPaginationDirection.mjs +0 -5
  316. package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEvents.d.mts +6 -30
  317. package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.d.mts +0 -5
  318. package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsPaginationDirection.mjs +0 -5
  319. package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.d.mts +0 -15
  320. package/dist/esm/api/resources/empathicVoice/types/ReturnChatPagedEventsStatus.mjs +0 -15
  321. package/dist/esm/api/resources/empathicVoice/types/ReturnChatStatus.d.mts +0 -15
  322. package/dist/esm/api/resources/empathicVoice/types/ReturnChatStatus.mjs +0 -15
  323. package/dist/esm/api/resources/empathicVoice/types/ReturnConfigSpec.d.mts +2 -8
  324. package/dist/esm/api/resources/empathicVoice/types/ReturnEllmModel.d.mts +1 -5
  325. package/dist/esm/api/resources/empathicVoice/types/ReturnEventMessageSpec.d.mts +2 -6
  326. package/dist/esm/api/resources/empathicVoice/types/ReturnEventMessageSpecs.d.mts +1 -14
  327. package/dist/esm/api/resources/empathicVoice/types/ReturnLanguageModel.d.mts +1 -7
  328. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroups.d.mts +2 -11
  329. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.d.mts +0 -5
  330. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatGroupsPaginationDirection.mjs +0 -5
  331. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChats.d.mts +2 -11
  332. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.d.mts +0 -5
  333. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedChatsPaginationDirection.mjs +0 -5
  334. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedConfigs.d.mts +2 -6
  335. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedPrompts.d.mts +2 -6
  336. package/dist/esm/api/resources/empathicVoice/types/ReturnPagedUserDefinedTools.d.mts +2 -6
  337. package/dist/esm/api/resources/empathicVoice/types/ReturnPromptVersionType.d.mts +0 -1
  338. package/dist/esm/api/resources/empathicVoice/types/ReturnPromptVersionType.mjs +0 -1
  339. package/dist/esm/api/resources/empathicVoice/types/ReturnTimeoutSpec.d.mts +2 -6
  340. package/dist/esm/api/resources/empathicVoice/types/ReturnTimeoutSpecs.d.mts +1 -13
  341. package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedTool.d.mts +7 -19
  342. package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.d.mts +0 -1
  343. package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolToolType.mjs +0 -1
  344. package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.d.mts +0 -1
  345. package/dist/esm/api/resources/empathicVoice/types/ReturnUserDefinedToolVersionType.mjs +0 -1
  346. package/dist/esm/api/resources/empathicVoice/types/ReturnVoice.d.mts +5 -3
  347. package/dist/esm/api/resources/empathicVoice/types/ReturnWebhookSpec.d.mts +2 -6
  348. package/dist/esm/api/resources/empathicVoice/types/SessionSettings.d.mts +10 -19
  349. package/dist/esm/api/resources/empathicVoice/types/SubscribeEvent.d.mts +1 -55
  350. package/dist/esm/api/resources/empathicVoice/types/ToolCallMessage.d.mts +3 -9
  351. package/dist/esm/api/resources/empathicVoice/types/ToolErrorMessage.d.mts +3 -5
  352. package/dist/esm/api/resources/empathicVoice/types/ToolResponseMessage.d.mts +3 -11
  353. package/dist/esm/api/resources/empathicVoice/types/UserInput.d.mts +6 -2
  354. package/dist/esm/api/resources/empathicVoice/types/UserInterruption.d.mts +1 -3
  355. package/dist/esm/api/resources/empathicVoice/types/UserMessage.d.mts +3 -17
  356. package/dist/esm/api/resources/empathicVoice/types/VoiceId.d.mts +11 -2
  357. package/dist/esm/api/resources/empathicVoice/types/VoiceName.d.mts +11 -2
  358. package/dist/esm/api/resources/empathicVoice/types/WebSocketError.d.mts +1 -3
  359. package/dist/esm/api/resources/expressionMeasurement/client/Client.d.mts +9 -9
  360. package/dist/esm/api/resources/expressionMeasurement/client/Client.mjs +6 -5
  361. package/dist/esm/api/resources/expressionMeasurement/resources/batch/client/Client.d.mts +17 -18
  362. package/dist/esm/api/resources/expressionMeasurement/resources/batch/client/Client.mjs +61 -149
  363. package/dist/esm/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.d.mts +7 -8
  364. package/dist/esm/api/resources/expressionMeasurement/resources/stream/resources/stream/client/Client.mjs +5 -10
  365. package/dist/esm/api/resources/tts/client/Client.d.mts +19 -20
  366. package/dist/esm/api/resources/tts/client/Client.mjs +56 -138
  367. package/dist/esm/api/resources/tts/errors/BadRequestError.mjs +5 -1
  368. package/dist/esm/api/resources/tts/errors/UnprocessableEntityError.mjs +5 -1
  369. package/dist/esm/api/resources/tts/resources/streamInput/client/Client.d.mts +15 -14
  370. package/dist/esm/api/resources/tts/resources/streamInput/client/Client.mjs +8 -4
  371. package/dist/esm/api/resources/tts/resources/voices/client/Client.d.mts +13 -14
  372. package/dist/esm/api/resources/tts/resources/voices/client/Client.mjs +32 -86
  373. package/dist/esm/api/resources/tts/resources/voices/client/requests/PostedVoice.d.mts +1 -1
  374. package/dist/esm/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.mts +1 -1
  375. package/dist/esm/api/resources/tts/types/OctaveVersion.d.mts +7 -3
  376. package/dist/esm/api/resources/tts/types/OctaveVersion.mjs +7 -3
  377. package/dist/esm/api/resources/tts/types/PostedTts.d.mts +0 -6
  378. package/dist/esm/api/resources/tts/types/PostedUtteranceVoiceWithId.d.mts +1 -1
  379. package/dist/esm/api/resources/tts/types/PostedUtteranceVoiceWithName.d.mts +1 -1
  380. package/dist/esm/api/resources/tts/types/PublishTts.d.mts +14 -4
  381. package/dist/esm/api/resources/tts/types/ReturnPagedVoices.d.mts +5 -9
  382. package/dist/esm/api/resources/tts/types/ReturnVoice.d.mts +3 -3
  383. package/dist/esm/auth/HeaderAuthProvider.d.mts +26 -0
  384. package/dist/esm/auth/HeaderAuthProvider.mjs +54 -0
  385. package/dist/esm/auth/index.d.mts +1 -0
  386. package/dist/esm/auth/index.mjs +1 -0
  387. package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
  388. package/dist/esm/core/auth/AuthProvider.mjs +1 -0
  389. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  390. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  391. package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
  392. package/dist/esm/core/auth/BasicAuth.mjs +24 -0
  393. package/dist/esm/core/auth/BearerToken.d.mts +7 -0
  394. package/dist/esm/core/auth/BearerToken.mjs +13 -0
  395. package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
  396. package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
  397. package/dist/esm/core/auth/index.d.mts +5 -0
  398. package/dist/esm/core/auth/index.mjs +3 -0
  399. package/dist/esm/core/base64.d.mts +2 -0
  400. package/dist/esm/core/base64.mjs +22 -0
  401. package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
  402. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
  403. package/dist/esm/core/fetcher/Fetcher.d.mts +6 -3
  404. package/dist/esm/core/fetcher/Fetcher.mjs +42 -24
  405. package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
  406. package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
  407. package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
  408. package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
  409. package/dist/esm/core/fetcher/signals.d.mts +1 -7
  410. package/dist/esm/core/fetcher/signals.mjs +0 -12
  411. package/dist/esm/core/headers.d.mts +2 -2
  412. package/dist/esm/core/index.d.mts +2 -0
  413. package/dist/esm/core/index.mjs +2 -0
  414. package/dist/esm/core/logging/logger.mjs +1 -1
  415. package/dist/esm/core/pagination/CustomPager.d.mts +67 -0
  416. package/dist/esm/core/pagination/CustomPager.mjs +189 -0
  417. package/dist/esm/core/pagination/index.d.mts +1 -0
  418. package/dist/esm/core/pagination/index.mjs +1 -0
  419. package/dist/esm/core/runtime/runtime.mjs +11 -10
  420. package/dist/esm/core/schemas/Schema.d.mts +1 -0
  421. package/dist/esm/core/schemas/Schema.mjs +1 -0
  422. package/dist/esm/core/schemas/builders/object/object.mjs +14 -1
  423. package/dist/esm/core/schemas/builders/primitives/index.d.mts +1 -0
  424. package/dist/esm/core/schemas/builders/primitives/index.mjs +1 -0
  425. package/dist/esm/core/schemas/builders/primitives/never.d.mts +2 -0
  426. package/dist/esm/core/schemas/builders/primitives/never.mjs +11 -0
  427. package/dist/esm/core/url/join.mjs +0 -1
  428. package/dist/esm/errors/HumeError.mjs +5 -1
  429. package/dist/esm/errors/HumeTimeoutError.mjs +5 -1
  430. package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
  431. package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
  432. package/dist/esm/serialization/resources/empathicVoice/types/ReturnVoice.d.mts +3 -3
  433. package/dist/esm/serialization/resources/empathicVoice/types/ReturnVoice.mjs +3 -3
  434. package/dist/esm/serialization/resources/tts/types/ReturnPagedVoices.d.mts +4 -4
  435. package/dist/esm/serialization/resources/tts/types/ReturnPagedVoices.mjs +4 -4
  436. package/dist/esm/serialization/resources/tts/types/ReturnVoice.d.mts +3 -3
  437. package/dist/esm/serialization/resources/tts/types/ReturnVoice.mjs +3 -3
  438. package/dist/esm/version.d.mts +1 -1
  439. package/dist/esm/version.mjs +1 -1
  440. package/dist/esm/wrapper/SilenceFiller.d.mts +64 -10
  441. package/dist/esm/wrapper/SilenceFiller.mjs +109 -26
  442. package/dist/esm/wrapper/expressionMeasurement/ExpressionMeasurementClient.d.mts +1 -1
  443. package/dist/esm/wrapper/expressionMeasurement/ExpressionMeasurementClient.mjs +1 -1
  444. package/dist/esm/wrapper/expressionMeasurement/batch/BatchClient.d.mts +1 -1
  445. package/dist/esm/wrapper/expressionMeasurement/batch/BatchClient.mjs +1 -1
  446. package/dist/esm/wrapper/fetchAccessToken.mjs +3 -0
  447. package/dist/esm/wrapper/index.d.mts +5 -0
  448. package/dist/esm/wrapper/index.mjs +4 -5
  449. package/package.json +5 -2
  450. package/reference.md +621 -1205
  451. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
  452. package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
  453. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
  454. package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
@@ -0,0 +1,189 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }
11
+ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {
12
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
13
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
14
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
15
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
16
+ function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
17
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
18
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
19
+ function fulfill(value) { resume("next", value); }
20
+ function reject(value) { resume("throw", value); }
21
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
22
+ };
23
+ var __asyncValues = (this && this.__asyncValues) || function (o) {
24
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
25
+ var m = o[Symbol.asyncIterator], i;
26
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
27
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
28
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
29
+ };
30
+ /**
31
+ *
32
+ * @template TItem The type of the items in the page.
33
+ * @template TResponse The type of the API response.
34
+ */
35
+ export class CustomPager {
36
+ constructor(args) {
37
+ this.response = args.response;
38
+ this.rawResponse = args.rawResponse;
39
+ this.data = args.items;
40
+ this._hasNextPage = args.hasNextPage;
41
+ this._hasPreviousPage = args.hasPreviousPage;
42
+ this.nextRequest = args.nextRequest;
43
+ this.previousRequest = args.previousRequest;
44
+ this.sendRequest = args.sendRequest;
45
+ }
46
+ /**
47
+ * @returns whether there is a next page to load
48
+ */
49
+ hasNextPage() {
50
+ return this._hasNextPage;
51
+ }
52
+ /**
53
+ * @returns whether there is a previous page to load
54
+ */
55
+ hasPreviousPage() {
56
+ return this._hasPreviousPage;
57
+ }
58
+ /**
59
+ * Returns the current page data.
60
+ * This is an alias for the `data` property for consistency with other pagination APIs.
61
+ *
62
+ * @returns the items from the current page
63
+ */
64
+ getCurrentPage() {
65
+ return this.data;
66
+ }
67
+ /**
68
+ * Retrieves the next page of results.
69
+ * @returns this pager with updated data
70
+ * @throws Error if there is no next page
71
+ */
72
+ getNextPage() {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ if (!this._hasNextPage || !this.nextRequest) {
75
+ throw new Error("No next page available");
76
+ }
77
+ const response = yield this.sendRequest(this.nextRequest);
78
+ if (!response.ok) {
79
+ const reason = response.error.reason === "status-code" ? `HTTP ${response.error.statusCode}` : response.error.reason;
80
+ throw new Error(`Failed to fetch next page: ${reason}`);
81
+ }
82
+ const data = response.body;
83
+ const rawResponse = response.rawResponse;
84
+ const parsed = yield parse({ request: this.nextRequest, data, rawResponse });
85
+ this.response = data;
86
+ this.rawResponse = rawResponse;
87
+ this.data = parsed.items;
88
+ this._hasNextPage = parsed.hasNextPage;
89
+ this._hasPreviousPage = parsed.hasPreviousPage;
90
+ this.nextRequest = parsed.nextRequest;
91
+ this.previousRequest = parsed.previousRequest;
92
+ return this;
93
+ });
94
+ }
95
+ /**
96
+ * Retrieves the previous page of results.
97
+ * @returns this pager with updated data
98
+ * @throws Error if there is no previous page
99
+ */
100
+ getPreviousPage() {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ if (!this._hasPreviousPage || !this.previousRequest) {
103
+ throw new Error("No previous page available");
104
+ }
105
+ const response = yield this.sendRequest(this.previousRequest);
106
+ if (!response.ok) {
107
+ const reason = response.error.reason === "status-code" ? `HTTP ${response.error.statusCode}` : response.error.reason;
108
+ throw new Error(`Failed to fetch previous page: ${reason}`);
109
+ }
110
+ const data = response.body;
111
+ const rawResponse = response.rawResponse;
112
+ const parsed = yield parse({ request: this.previousRequest, data, rawResponse });
113
+ this.response = data;
114
+ this.rawResponse = rawResponse;
115
+ this.data = parsed.items;
116
+ this._hasNextPage = parsed.hasNextPage;
117
+ this._hasPreviousPage = parsed.hasPreviousPage;
118
+ this.nextRequest = parsed.nextRequest;
119
+ this.previousRequest = parsed.previousRequest;
120
+ return this;
121
+ });
122
+ }
123
+ iterMessages() {
124
+ return __asyncGenerator(this, arguments, function* iterMessages_1() {
125
+ for (const item of this.data) {
126
+ yield yield __await(item);
127
+ }
128
+ while (this.hasNextPage()) {
129
+ yield __await(this.getNextPage());
130
+ for (const item of this.data) {
131
+ yield yield __await(item);
132
+ }
133
+ }
134
+ });
135
+ }
136
+ [Symbol.asyncIterator]() {
137
+ return __asyncGenerator(this, arguments, function* _a() {
138
+ var _b, e_1, _c, _d;
139
+ try {
140
+ for (var _e = true, _f = __asyncValues(this.iterMessages()), _g; _g = yield __await(_f.next()), _b = _g.done, !_b; _e = true) {
141
+ _d = _g.value;
142
+ _e = false;
143
+ const message = _d;
144
+ yield yield __await(message);
145
+ }
146
+ }
147
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
148
+ finally {
149
+ try {
150
+ if (!_e && !_b && (_c = _f.return)) yield __await(_c.call(_f));
151
+ }
152
+ finally { if (e_1) throw e_1.error; }
153
+ }
154
+ });
155
+ }
156
+ }
157
+ export function createCustomPager(_a) {
158
+ return __awaiter(this, arguments, void 0, function* ({ sendRequest, initialHttpRequest, clientOptions, }) {
159
+ const response = yield sendRequest(initialHttpRequest);
160
+ if (!response.ok) {
161
+ const reason = response.error.reason === "status-code" ? `HTTP ${response.error.statusCode}` : response.error.reason;
162
+ throw new Error(`Failed to fetch initial page: ${reason}`);
163
+ }
164
+ const data = response.body;
165
+ const rawResponse = response.rawResponse;
166
+ const parsed = yield parse({ request: initialHttpRequest, data, rawResponse });
167
+ return new CustomPager({
168
+ response: data,
169
+ rawResponse,
170
+ items: parsed.items,
171
+ hasNextPage: parsed.hasNextPage,
172
+ hasPreviousPage: parsed.hasPreviousPage,
173
+ nextRequest: parsed.nextRequest,
174
+ previousRequest: parsed.previousRequest,
175
+ sendRequest: sendRequest,
176
+ });
177
+ });
178
+ }
179
+ function parse(_args) {
180
+ return __awaiter(this, void 0, void 0, function* () {
181
+ // Placeholder implementation.
182
+ // TODO: Replace this with actual parsing logic.
183
+ return {
184
+ items: [],
185
+ hasNextPage: false,
186
+ hasPreviousPage: false,
187
+ };
188
+ });
189
+ }
@@ -1 +1,2 @@
1
+ export { CustomPager, createCustomPager } from "./CustomPager.mjs";
1
2
  export { Page } from "./Page.mjs";
@@ -1 +1,2 @@
1
+ export { CustomPager, createCustomPager } from "./CustomPager.mjs";
1
2
  export { Page } from "./Page.mjs";
@@ -68,6 +68,17 @@ function evaluateRuntime() {
68
68
  version: Bun.version,
69
69
  };
70
70
  }
71
+ /**
72
+ * A constant that indicates whether the environment the code is running is in React-Native.
73
+ * This check should come before Node.js detection since React Native may have a process polyfill.
74
+ * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
75
+ */
76
+ const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
77
+ if (isReactNative) {
78
+ return {
79
+ type: "react-native",
80
+ };
81
+ }
71
82
  /**
72
83
  * A constant that indicates whether the environment the code is running is Node.JS.
73
84
  */
@@ -83,16 +94,6 @@ function evaluateRuntime() {
83
94
  parsedVersion: Number(process.versions.node.split(".")[0]),
84
95
  };
85
96
  }
86
- /**
87
- * A constant that indicates whether the environment the code is running is in React-Native.
88
- * https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js
89
- */
90
- const isReactNative = typeof navigator !== "undefined" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === "ReactNative";
91
- if (isReactNative) {
92
- return {
93
- type: "react-native",
94
- };
95
- }
96
97
  return {
97
98
  type: "unknown",
98
99
  };
@@ -20,6 +20,7 @@ export declare const SchemaType: {
20
20
  readonly NUMBER: "number";
21
21
  readonly STRING: "string";
22
22
  readonly UNKNOWN: "unknown";
23
+ readonly NEVER: "never";
23
24
  readonly RECORD: "record";
24
25
  readonly SET: "set";
25
26
  readonly UNION: "union";
@@ -11,6 +11,7 @@ export const SchemaType = {
11
11
  NUMBER: "number",
12
12
  STRING: "string",
13
13
  UNKNOWN: "unknown",
14
+ NEVER: "never",
14
15
  RECORD: "record",
15
16
  SET: "set",
16
17
  UNION: "union",
@@ -176,6 +176,7 @@ export function getObjectUtils(schema) {
176
176
  value: raw,
177
177
  transformBase: (rawBase) => schema.parse(rawBase, opts),
178
178
  transformExtension: (rawExtension) => extension.parse(rawExtension, opts),
179
+ breadcrumbsPrefix: opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix,
179
180
  });
180
181
  },
181
182
  json: (parsed, opts) => {
@@ -184,6 +185,7 @@ export function getObjectUtils(schema) {
184
185
  value: parsed,
185
186
  transformBase: (parsedBase) => schema.json(parsedBase, opts),
186
187
  transformExtension: (parsedExtension) => extension.json(parsedExtension, opts),
188
+ breadcrumbsPrefix: opts === null || opts === void 0 ? void 0 : opts.breadcrumbsPrefix,
187
189
  });
188
190
  },
189
191
  getType: () => SchemaType.OBJECT,
@@ -220,7 +222,18 @@ export function getObjectUtils(schema) {
220
222
  },
221
223
  };
222
224
  }
223
- function validateAndTransformExtendedObject({ extensionKeys, value, transformBase, transformExtension, }) {
225
+ function validateAndTransformExtendedObject({ extensionKeys, value, transformBase, transformExtension, breadcrumbsPrefix = [], }) {
226
+ if (!isPlainObject(value)) {
227
+ return {
228
+ ok: false,
229
+ errors: [
230
+ {
231
+ path: breadcrumbsPrefix,
232
+ message: getErrorMessageForIncorrectType(value, "object"),
233
+ },
234
+ ],
235
+ };
236
+ }
224
237
  const extensionPropertiesSet = new Set(extensionKeys);
225
238
  const [extensionProperties, baseProperties] = partition(keys(value), (key) => extensionPropertiesSet.has(key));
226
239
  const transformedBase = transformBase(filterObject(value, baseProperties));
@@ -1,5 +1,6 @@
1
1
  export { any } from "./any.mjs";
2
2
  export { boolean } from "./boolean.mjs";
3
+ export { never } from "./never.mjs";
3
4
  export { number } from "./number.mjs";
4
5
  export { string } from "./string.mjs";
5
6
  export { unknown } from "./unknown.mjs";
@@ -1,5 +1,6 @@
1
1
  export { any } from "./any.mjs";
2
2
  export { boolean } from "./boolean.mjs";
3
+ export { never } from "./never.mjs";
3
4
  export { number } from "./number.mjs";
4
5
  export { string } from "./string.mjs";
5
6
  export { unknown } from "./unknown.mjs";
@@ -0,0 +1,2 @@
1
+ import { type Schema } from "../../Schema.mjs";
2
+ export declare const never: () => Schema<never, never>;
@@ -0,0 +1,11 @@
1
+ import { SchemaType } from "../../Schema.mjs";
2
+ import { createIdentitySchemaCreator } from "../../utils/createIdentitySchemaCreator.mjs";
3
+ export const never = createIdentitySchemaCreator(SchemaType.NEVER, (_value, { breadcrumbsPrefix = [] } = {}) => ({
4
+ ok: false,
5
+ errors: [
6
+ {
7
+ path: breadcrumbsPrefix,
8
+ message: "Expected never",
9
+ },
10
+ ],
11
+ }));
@@ -11,7 +11,6 @@ export function join(base, ...segments) {
11
11
  url = new URL(base);
12
12
  }
13
13
  catch (_a) {
14
- // Fallback to path joining if URL is malformed
15
14
  return joinPath(base, ...segments);
16
15
  }
17
16
  const lastSegment = segments[segments.length - 1];
@@ -3,7 +3,11 @@ import { toJson } from "../core/json.mjs";
3
3
  export class HumeError extends Error {
4
4
  constructor({ message, statusCode, body, rawResponse, }) {
5
5
  super(buildMessage({ message, statusCode, body }));
6
- Object.setPrototypeOf(this, HumeError.prototype);
6
+ Object.setPrototypeOf(this, new.target.prototype);
7
+ if (Error.captureStackTrace) {
8
+ Error.captureStackTrace(this, this.constructor);
9
+ }
10
+ this.name = this.constructor.name;
7
11
  this.statusCode = statusCode;
8
12
  this.body = body;
9
13
  this.rawResponse = rawResponse;
@@ -2,6 +2,10 @@
2
2
  export class HumeTimeoutError extends Error {
3
3
  constructor(message) {
4
4
  super(message);
5
- Object.setPrototypeOf(this, HumeTimeoutError.prototype);
5
+ Object.setPrototypeOf(this, new.target.prototype);
6
+ if (Error.captureStackTrace) {
7
+ Error.captureStackTrace(this, this.constructor);
8
+ }
9
+ this.name = this.constructor.name;
6
10
  }
7
11
  }
@@ -0,0 +1,2 @@
1
+ import type * as core from "../core/index.mjs";
2
+ export declare function handleNonStatusCodeError(error: core.Fetcher.Error, rawResponse: core.RawResponse, method: string, path: string): never;
@@ -0,0 +1,29 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "./index.mjs";
3
+ export function handleNonStatusCodeError(error, rawResponse, method, path) {
4
+ switch (error.reason) {
5
+ case "non-json":
6
+ throw new errors.HumeError({
7
+ statusCode: error.statusCode,
8
+ body: error.rawBody,
9
+ rawResponse: rawResponse,
10
+ });
11
+ case "body-is-null":
12
+ throw new errors.HumeError({
13
+ statusCode: error.statusCode,
14
+ rawResponse: rawResponse,
15
+ });
16
+ case "timeout":
17
+ throw new errors.HumeTimeoutError(`Timeout exceeded when calling ${method} ${path}.`);
18
+ case "unknown":
19
+ throw new errors.HumeError({
20
+ message: error.errorMessage,
21
+ rawResponse: rawResponse,
22
+ });
23
+ default:
24
+ throw new errors.HumeError({
25
+ message: "Unknown error",
26
+ rawResponse: rawResponse,
27
+ });
28
+ }
29
+ }
@@ -6,8 +6,8 @@ export declare const ReturnVoice: core.serialization.ObjectSchema<serializers.em
6
6
  export declare namespace ReturnVoice {
7
7
  interface Raw {
8
8
  compatible_octave_models?: string[] | null;
9
- id?: string | null;
10
- name?: string | null;
11
- provider?: VoiceProvider.Raw | null;
9
+ id: string;
10
+ name: string;
11
+ provider: VoiceProvider.Raw;
12
12
  }
13
13
  }
@@ -3,7 +3,7 @@ import * as core from "../../../../core/index.mjs";
3
3
  import { VoiceProvider } from "./VoiceProvider.mjs";
4
4
  export const ReturnVoice = core.serialization.object({
5
5
  compatibleOctaveModels: core.serialization.property("compatible_octave_models", core.serialization.list(core.serialization.string()).optional()),
6
- id: core.serialization.string().optional(),
7
- name: core.serialization.string().optional(),
8
- provider: VoiceProvider.optional(),
6
+ id: core.serialization.string(),
7
+ name: core.serialization.string(),
8
+ provider: VoiceProvider,
9
9
  });
@@ -5,9 +5,9 @@ import { ReturnVoice } from "./ReturnVoice.mjs";
5
5
  export declare const ReturnPagedVoices: core.serialization.ObjectSchema<serializers.tts.ReturnPagedVoices.Raw, Hume.tts.ReturnPagedVoices>;
6
6
  export declare namespace ReturnPagedVoices {
7
7
  interface Raw {
8
- page_number?: number | null;
9
- page_size?: number | null;
10
- total_pages?: number | null;
11
- voices_page?: ReturnVoice.Raw[] | null;
8
+ page_number: number;
9
+ page_size: number;
10
+ total_pages: number;
11
+ voices_page: ReturnVoice.Raw[];
12
12
  }
13
13
  }
@@ -2,8 +2,8 @@
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import { ReturnVoice } from "./ReturnVoice.mjs";
4
4
  export const ReturnPagedVoices = core.serialization.object({
5
- pageNumber: core.serialization.property("page_number", core.serialization.number().optional()),
6
- pageSize: core.serialization.property("page_size", core.serialization.number().optional()),
7
- totalPages: core.serialization.property("total_pages", core.serialization.number().optional()),
8
- voicesPage: core.serialization.property("voices_page", core.serialization.list(ReturnVoice).optional()),
5
+ pageNumber: core.serialization.property("page_number", core.serialization.number()),
6
+ pageSize: core.serialization.property("page_size", core.serialization.number()),
7
+ totalPages: core.serialization.property("total_pages", core.serialization.number()),
8
+ voicesPage: core.serialization.property("voices_page", core.serialization.list(ReturnVoice)),
9
9
  });
@@ -6,8 +6,8 @@ export declare const ReturnVoice: core.serialization.ObjectSchema<serializers.tt
6
6
  export declare namespace ReturnVoice {
7
7
  interface Raw {
8
8
  compatible_octave_models?: string[] | null;
9
- id?: string | null;
10
- name?: string | null;
11
- provider?: VoiceProvider.Raw | null;
9
+ id: string;
10
+ name: string;
11
+ provider: VoiceProvider.Raw;
12
12
  }
13
13
  }
@@ -3,7 +3,7 @@ import * as core from "../../../../core/index.mjs";
3
3
  import { VoiceProvider } from "./VoiceProvider.mjs";
4
4
  export const ReturnVoice = core.serialization.object({
5
5
  compatibleOctaveModels: core.serialization.property("compatible_octave_models", core.serialization.list(core.serialization.string()).optional()),
6
- id: core.serialization.string().optional(),
7
- name: core.serialization.string().optional(),
8
- provider: VoiceProvider.optional(),
6
+ id: core.serialization.string(),
7
+ name: core.serialization.string(),
8
+ provider: VoiceProvider,
9
9
  });
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.15.8";
1
+ export declare const SDK_VERSION = "0.15.10";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.15.8";
1
+ export const SDK_VERSION = "0.15.10";
@@ -1,10 +1,24 @@
1
- import { Readable } from "stream";
2
1
  /**
3
- * SilenceFiller is a Readable stream that intersperses incoming audio data
2
+ * A minimal Writable-like interface that SilenceFiller can pipe to.
3
+ * This matches the subset of Node.js Writable that we need.
4
+ */
5
+ export interface PipeDestination {
6
+ write(chunk: Uint8Array): boolean;
7
+ end?(): void;
8
+ on?(event: "drain", listener: () => void): this;
9
+ once?(event: "drain", listener: () => void): this;
10
+ removeListener?(event: "drain", listener: () => void): this;
11
+ }
12
+ type EventListener = (...args: unknown[]) => void;
13
+ /**
14
+ * SilenceFiller is a pipeable stream that intersperses incoming audio data
4
15
  * with bytes of silence. This is important in some cases to keep an audio
5
16
  * stream "alive". Audio players, such as ffmpeg, can interpret inactivity as
6
17
  * meaning the stream is ended, or disconnected.
7
18
  *
19
+ * This implementation does not depend on Node.js built-ins and can work in
20
+ * any JavaScript environment, while still being pipeable to Node.js streams.
21
+ *
8
22
  * @example
9
23
  * ```typescript
10
24
  * import { SilenceFiller } from 'hume';
@@ -29,12 +43,15 @@ import { Readable } from "stream";
29
43
  * await silenceFiller.endStream();
30
44
  * ```
31
45
  */
32
- export declare class SilenceFiller extends Readable {
46
+ export declare class SilenceFiller {
33
47
  private unclockedSilenceFiller;
34
48
  private isStarted;
35
- private pushInterval;
49
+ private pushIntervalId;
36
50
  private bytesPerSample;
37
51
  private pushIntervalMs;
52
+ private destination;
53
+ private eventListeners;
54
+ private ended;
38
55
  /**
39
56
  * Creates a new SilenceFiller instance.
40
57
  *
@@ -46,16 +63,52 @@ export declare class SilenceFiller extends Readable {
46
63
  * playback will take longer to start.
47
64
  */
48
65
  constructor(pushIntervalMs?: number, sampleRate?: number, bytesPerSample?: number, bufferSize?: number);
66
+ /**
67
+ * Pipes the output of this SilenceFiller to a writable destination.
68
+ *
69
+ * @param destination - The destination to pipe to (e.g., a Node.js Writable stream).
70
+ * @returns The destination, for chaining.
71
+ */
72
+ pipe<T extends PipeDestination>(destination: T): T;
73
+ /**
74
+ * Registers an event listener.
75
+ *
76
+ * @param event - The event name ('error', 'end').
77
+ * @param listener - The listener function.
78
+ * @returns This instance, for chaining.
79
+ */
80
+ on(event: string, listener: EventListener): this;
81
+ /**
82
+ * Registers a one-time event listener.
83
+ *
84
+ * @param event - The event name ('error', 'end').
85
+ * @param listener - The listener function.
86
+ * @returns This instance, for chaining.
87
+ */
88
+ once(event: string, listener: EventListener): this;
89
+ /**
90
+ * Removes an event listener.
91
+ *
92
+ * @param event - The event name.
93
+ * @param listener - The listener function to remove.
94
+ * @returns This instance, for chaining.
95
+ */
96
+ off(event: string, listener: EventListener): this;
97
+ /**
98
+ * Emits an event to all registered listeners.
99
+ *
100
+ * @param event - The event name.
101
+ * @param args - Arguments to pass to listeners.
102
+ */
103
+ private emit;
49
104
  /**
50
105
  * Writes audio data to the silence filler.
51
106
  *
52
- * @param audioBuffer - The audio buffer to write.
107
+ * @param audioBuffer - The audio buffer to write (Uint8Array or Buffer).
53
108
  */
54
- writeAudio(audioBuffer: Buffer): void;
109
+ writeAudio(audioBuffer: Uint8Array): void;
55
110
  private startPushInterval;
56
111
  private pushData;
57
- _read(): void;
58
- _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
59
112
  /**
60
113
  * Ends the stream and drains all remaining audio data.
61
114
  *
@@ -80,6 +133,7 @@ export declare class UnclockedSilenceFiller {
80
133
  private sampleRate;
81
134
  private bytesPerSample;
82
135
  constructor(bufferSize: number, sampleRate: number, bytesPerSample: number);
83
- writeAudio(audioBuffer: Buffer, timestamp: number): void;
84
- readAudio(timestamp: number): Buffer | null;
136
+ writeAudio(audioBuffer: Uint8Array, timestamp: number): void;
137
+ readAudio(timestamp: number): Uint8Array | null;
85
138
  }
139
+ export {};