hume 0.5.5 → 0.5.6

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 (325) hide show
  1. package/api/resources/customModels/resources/datasets/client/Client.js +9 -9
  2. package/api/resources/customModels/resources/files/client/Client.js +7 -7
  3. package/api/resources/customModels/resources/jobs/client/Client.js +2 -2
  4. package/api/resources/customModels/resources/models/client/Client.js +6 -6
  5. package/api/resources/empathicVoice/resources/chat/types/PublishEvent.d.ts +1 -1
  6. package/api/resources/empathicVoice/resources/chats/client/Client.js +2 -2
  7. package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +2 -2
  8. package/api/resources/empathicVoice/resources/configs/client/Client.js +12 -12
  9. package/api/resources/empathicVoice/{types → resources/configs/client/requests}/PostedConfig.d.ts +6 -3
  10. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.d.ts +4 -2
  11. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +14 -0
  12. package/api/resources/empathicVoice/resources/configs/client/requests/index.d.ts +2 -0
  13. package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +5 -5
  14. package/api/resources/empathicVoice/resources/prompts/client/Client.js +15 -15
  15. package/api/resources/empathicVoice/{types → resources/prompts/client/requests}/PostedPrompt.d.ts +7 -3
  16. package/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.d.ts +4 -2
  17. package/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.d.ts +15 -0
  18. package/api/resources/empathicVoice/resources/prompts/client/requests/index.d.ts +2 -0
  19. package/api/resources/empathicVoice/types/AssistantEnd.d.ts +4 -0
  20. package/api/resources/empathicVoice/types/AssistantInput.d.ts +12 -0
  21. package/api/resources/empathicVoice/types/AssistantInput.js +5 -0
  22. package/api/resources/empathicVoice/types/AssistantMessage.d.ts +6 -2
  23. package/api/resources/empathicVoice/types/AudioInput.d.ts +4 -0
  24. package/api/resources/empathicVoice/types/AudioOutput.d.ts +5 -1
  25. package/api/resources/empathicVoice/types/Error_.d.ts +4 -0
  26. package/api/resources/empathicVoice/types/PostedLanguageModelModelProvider.d.ts +2 -1
  27. package/api/resources/empathicVoice/types/PostedLanguageModelModelProvider.js +1 -0
  28. package/api/resources/empathicVoice/types/PostedPromptSpec.d.ts +2 -2
  29. package/api/resources/empathicVoice/types/PostedTool.d.ts +4 -4
  30. package/api/resources/empathicVoice/types/PostedToolName.d.ts +1 -1
  31. package/api/resources/empathicVoice/types/PostedToolSpec.d.ts +2 -2
  32. package/api/resources/empathicVoice/types/PostedToolVersion.d.ts +14 -0
  33. package/api/resources/empathicVoice/types/PostedToolVersion.js +5 -0
  34. package/api/resources/empathicVoice/types/PostedVoice.d.ts +12 -0
  35. package/api/resources/empathicVoice/types/PostedVoice.js +5 -0
  36. package/api/resources/empathicVoice/types/ReturnActiveChatCount.d.ts +4 -4
  37. package/api/resources/empathicVoice/types/ReturnActiveChatCountPerTag.d.ts +2 -2
  38. package/api/resources/empathicVoice/types/ReturnChat.d.ts +3 -3
  39. package/api/resources/empathicVoice/types/ReturnChatEvent.d.ts +4 -4
  40. package/api/resources/empathicVoice/types/ReturnChatWithPagedEvents.d.ts +6 -6
  41. package/api/resources/empathicVoice/types/ReturnConfigSpec.d.ts +1 -1
  42. package/api/resources/empathicVoice/types/ReturnPagedChats.d.ts +3 -3
  43. package/api/resources/empathicVoice/types/ReturnPagedPrompts.d.ts +3 -3
  44. package/api/resources/empathicVoice/types/ReturnPrompt.d.ts +6 -6
  45. package/api/resources/empathicVoice/types/ReturnTool.d.ts +8 -8
  46. package/api/resources/empathicVoice/types/ReturnVoice.d.ts +12 -0
  47. package/api/resources/empathicVoice/types/ReturnVoice.js +5 -0
  48. package/api/resources/empathicVoice/types/SessionSettings.d.ts +6 -1
  49. package/api/resources/empathicVoice/types/TextInput.d.ts +1 -3
  50. package/api/resources/empathicVoice/types/TtsInput.d.ts +1 -3
  51. package/api/resources/empathicVoice/types/UserInput.d.ts +12 -0
  52. package/api/resources/empathicVoice/types/UserInput.js +5 -0
  53. package/api/resources/empathicVoice/types/UserInterruption.d.ts +4 -0
  54. package/api/resources/empathicVoice/types/UserMessage.d.ts +4 -2
  55. package/api/resources/empathicVoice/types/index.d.ts +7 -4
  56. package/api/resources/empathicVoice/types/index.js +7 -4
  57. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  58. package/core/index.d.ts +1 -0
  59. package/core/index.js +1 -0
  60. package/core/websocket/WebSocket.d.ts +1 -0
  61. package/core/websocket/WebSocket.js +43 -0
  62. package/core/websocket/index.d.ts +1 -0
  63. package/core/websocket/index.js +5 -0
  64. package/dist/api/resources/customModels/resources/datasets/client/Client.js +9 -9
  65. package/dist/api/resources/customModels/resources/files/client/Client.js +7 -7
  66. package/dist/api/resources/customModels/resources/jobs/client/Client.js +2 -2
  67. package/dist/api/resources/customModels/resources/models/client/Client.js +6 -6
  68. package/dist/api/resources/empathicVoice/resources/chat/types/PublishEvent.d.ts +1 -1
  69. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +2 -2
  70. package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +2 -2
  71. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +12 -12
  72. package/dist/api/resources/empathicVoice/{types → resources/configs/client/requests}/PostedConfig.d.ts +6 -3
  73. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +5 -0
  74. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.d.ts +4 -2
  75. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +14 -0
  76. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +5 -0
  77. package/dist/api/resources/empathicVoice/resources/configs/client/requests/index.d.ts +2 -0
  78. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +5 -5
  79. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +15 -15
  80. package/dist/api/resources/empathicVoice/{types → resources/prompts/client/requests}/PostedPrompt.d.ts +7 -3
  81. package/dist/api/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.js +5 -0
  82. package/dist/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.d.ts +4 -2
  83. package/dist/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.d.ts +15 -0
  84. package/dist/api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.js +5 -0
  85. package/dist/api/resources/empathicVoice/resources/prompts/client/requests/index.d.ts +2 -0
  86. package/dist/api/resources/empathicVoice/types/AssistantEnd.d.ts +4 -0
  87. package/dist/api/resources/empathicVoice/types/AssistantInput.d.ts +12 -0
  88. package/dist/api/resources/empathicVoice/types/AssistantInput.js +5 -0
  89. package/dist/api/resources/empathicVoice/types/AssistantMessage.d.ts +6 -2
  90. package/dist/api/resources/empathicVoice/types/AudioInput.d.ts +4 -0
  91. package/dist/api/resources/empathicVoice/types/AudioOutput.d.ts +5 -1
  92. package/dist/api/resources/empathicVoice/types/Error_.d.ts +4 -0
  93. package/dist/api/resources/empathicVoice/types/PostedLanguageModelModelProvider.d.ts +2 -1
  94. package/dist/api/resources/empathicVoice/types/PostedLanguageModelModelProvider.js +1 -0
  95. package/dist/api/resources/empathicVoice/types/PostedPromptSpec.d.ts +2 -2
  96. package/dist/api/resources/empathicVoice/types/PostedTool.d.ts +4 -4
  97. package/dist/api/resources/empathicVoice/types/PostedToolName.d.ts +1 -1
  98. package/dist/api/resources/empathicVoice/types/PostedToolSpec.d.ts +2 -2
  99. package/dist/api/resources/empathicVoice/types/PostedToolVersion.d.ts +14 -0
  100. package/dist/api/resources/empathicVoice/types/PostedToolVersion.js +5 -0
  101. package/dist/api/resources/empathicVoice/types/PostedVoice.d.ts +12 -0
  102. package/dist/api/resources/empathicVoice/types/PostedVoice.js +5 -0
  103. package/dist/api/resources/empathicVoice/types/ReturnActiveChatCount.d.ts +4 -4
  104. package/dist/api/resources/empathicVoice/types/ReturnActiveChatCountPerTag.d.ts +2 -2
  105. package/dist/api/resources/empathicVoice/types/ReturnChat.d.ts +3 -3
  106. package/dist/api/resources/empathicVoice/types/ReturnChatEvent.d.ts +4 -4
  107. package/dist/api/resources/empathicVoice/types/ReturnChatWithPagedEvents.d.ts +6 -6
  108. package/dist/api/resources/empathicVoice/types/ReturnConfigSpec.d.ts +1 -1
  109. package/dist/api/resources/empathicVoice/types/ReturnPagedChats.d.ts +3 -3
  110. package/dist/api/resources/empathicVoice/types/ReturnPagedPrompts.d.ts +3 -3
  111. package/dist/api/resources/empathicVoice/types/ReturnPrompt.d.ts +6 -6
  112. package/dist/api/resources/empathicVoice/types/ReturnTool.d.ts +8 -8
  113. package/dist/api/resources/empathicVoice/types/ReturnVoice.d.ts +12 -0
  114. package/dist/api/resources/empathicVoice/types/ReturnVoice.js +5 -0
  115. package/dist/api/resources/empathicVoice/types/SessionSettings.d.ts +6 -1
  116. package/dist/api/resources/empathicVoice/types/TextInput.d.ts +1 -3
  117. package/dist/api/resources/empathicVoice/types/TtsInput.d.ts +1 -3
  118. package/dist/api/resources/empathicVoice/types/UserInput.d.ts +12 -0
  119. package/dist/api/resources/empathicVoice/types/UserInput.js +5 -0
  120. package/dist/api/resources/empathicVoice/types/UserInterruption.d.ts +4 -0
  121. package/dist/api/resources/empathicVoice/types/UserMessage.d.ts +4 -2
  122. package/dist/api/resources/empathicVoice/types/index.d.ts +7 -4
  123. package/dist/api/resources/empathicVoice/types/index.js +7 -4
  124. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +6 -6
  125. package/dist/core/index.d.ts +1 -0
  126. package/dist/core/index.js +1 -0
  127. package/dist/core/websocket/WebSocket.d.ts +1 -0
  128. package/dist/core/websocket/WebSocket.js +43 -0
  129. package/dist/core/websocket/index.d.ts +1 -0
  130. package/dist/core/websocket/index.js +5 -0
  131. package/dist/serialization/resources/empathicVoice/resources/chat/types/PublishEvent.d.ts +3 -3
  132. package/dist/serialization/resources/empathicVoice/resources/chat/types/PublishEvent.js +3 -3
  133. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +17 -0
  134. package/{serialization/resources/empathicVoice/types → dist/serialization/resources/empathicVoice/resources/configs/client/requests}/PostedConfig.js +4 -4
  135. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.d.ts +1 -1
  136. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.js +1 -1
  137. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +16 -0
  138. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +37 -0
  139. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/index.d.ts +2 -0
  140. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/index.js +5 -1
  141. package/dist/serialization/resources/empathicVoice/resources/prompts/client/addNewPromptVersion.d.ts +11 -0
  142. package/dist/serialization/resources/empathicVoice/resources/prompts/client/addNewPromptVersion.js +8 -0
  143. package/dist/serialization/resources/empathicVoice/resources/prompts/client/createNewPrompt.d.ts +11 -0
  144. package/dist/serialization/resources/empathicVoice/resources/prompts/client/createNewPrompt.js +8 -0
  145. package/dist/serialization/resources/empathicVoice/resources/prompts/client/getReturnPromptByVersionNumber.d.ts +11 -0
  146. package/dist/serialization/resources/empathicVoice/resources/prompts/client/getReturnPromptByVersionNumber.js +8 -0
  147. package/dist/serialization/resources/empathicVoice/resources/prompts/client/index.d.ts +4 -0
  148. package/dist/serialization/resources/empathicVoice/resources/prompts/client/index.js +17 -0
  149. package/dist/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.d.ts +14 -0
  150. package/dist/serialization/resources/empathicVoice/{types → resources/prompts/client/requests}/PostedPrompt.js +3 -3
  151. package/dist/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.d.ts +1 -1
  152. package/dist/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.js +1 -1
  153. package/dist/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.d.ts +13 -0
  154. package/dist/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.js +34 -0
  155. package/dist/serialization/resources/empathicVoice/resources/prompts/client/requests/index.d.ts +2 -0
  156. package/dist/serialization/resources/empathicVoice/resources/prompts/client/requests/index.js +5 -1
  157. package/dist/serialization/resources/empathicVoice/resources/prompts/client/updatePromptVersionDescription.d.ts +11 -0
  158. package/dist/serialization/resources/empathicVoice/resources/prompts/client/updatePromptVersionDescription.js +8 -0
  159. package/dist/serialization/resources/empathicVoice/types/AssistantEnd.d.ts +1 -0
  160. package/dist/serialization/resources/empathicVoice/types/AssistantEnd.js +1 -0
  161. package/dist/serialization/resources/empathicVoice/types/AssistantInput.d.ts +14 -0
  162. package/dist/serialization/resources/empathicVoice/types/AssistantInput.js +35 -0
  163. package/dist/serialization/resources/empathicVoice/types/AssistantMessage.d.ts +2 -1
  164. package/dist/serialization/resources/empathicVoice/types/AssistantMessage.js +2 -1
  165. package/dist/serialization/resources/empathicVoice/types/AudioInput.d.ts +1 -0
  166. package/dist/serialization/resources/empathicVoice/types/AudioInput.js +1 -0
  167. package/dist/serialization/resources/empathicVoice/types/AudioOutput.d.ts +1 -0
  168. package/dist/serialization/resources/empathicVoice/types/AudioOutput.js +1 -0
  169. package/dist/serialization/resources/empathicVoice/types/Error_.d.ts +1 -0
  170. package/dist/serialization/resources/empathicVoice/types/Error_.js +1 -0
  171. package/dist/serialization/resources/empathicVoice/types/PostedLanguageModelModelProvider.d.ts +1 -1
  172. package/dist/serialization/resources/empathicVoice/types/PostedLanguageModelModelProvider.js +1 -1
  173. package/dist/serialization/resources/empathicVoice/types/PostedPromptSpec.d.ts +2 -2
  174. package/dist/serialization/resources/empathicVoice/types/PostedPromptSpec.js +2 -2
  175. package/dist/serialization/resources/empathicVoice/types/PostedTool.d.ts +3 -3
  176. package/dist/serialization/resources/empathicVoice/types/PostedTool.js +3 -3
  177. package/dist/serialization/resources/empathicVoice/types/PostedToolName.d.ts +1 -1
  178. package/dist/serialization/resources/empathicVoice/types/PostedToolName.js +1 -1
  179. package/dist/serialization/resources/empathicVoice/types/PostedToolSpec.d.ts +2 -2
  180. package/dist/serialization/resources/empathicVoice/types/PostedToolSpec.js +2 -2
  181. package/dist/serialization/resources/empathicVoice/types/{PostedPrompt.d.ts → PostedToolVersion.d.ts} +4 -4
  182. package/dist/serialization/resources/empathicVoice/types/PostedToolVersion.js +35 -0
  183. package/dist/serialization/resources/empathicVoice/types/PostedVoice.d.ts +13 -0
  184. package/dist/serialization/resources/empathicVoice/types/PostedVoice.js +34 -0
  185. package/dist/serialization/resources/empathicVoice/types/ReturnActiveChatCount.d.ts +4 -4
  186. package/dist/serialization/resources/empathicVoice/types/ReturnActiveChatCount.js +4 -4
  187. package/dist/serialization/resources/empathicVoice/types/ReturnActiveChatCountPerTag.d.ts +2 -2
  188. package/dist/serialization/resources/empathicVoice/types/ReturnActiveChatCountPerTag.js +2 -2
  189. package/dist/serialization/resources/empathicVoice/types/ReturnChat.d.ts +3 -3
  190. package/dist/serialization/resources/empathicVoice/types/ReturnChat.js +3 -3
  191. package/dist/serialization/resources/empathicVoice/types/ReturnChatEvent.d.ts +4 -4
  192. package/dist/serialization/resources/empathicVoice/types/ReturnChatEvent.js +4 -4
  193. package/dist/serialization/resources/empathicVoice/types/ReturnChatWithPagedEvents.d.ts +6 -6
  194. package/dist/serialization/resources/empathicVoice/types/ReturnChatWithPagedEvents.js +6 -6
  195. package/dist/serialization/resources/empathicVoice/types/ReturnConfigSpec.d.ts +1 -1
  196. package/dist/serialization/resources/empathicVoice/types/ReturnConfigSpec.js +1 -1
  197. package/dist/serialization/resources/empathicVoice/types/ReturnPagedChats.d.ts +3 -3
  198. package/dist/serialization/resources/empathicVoice/types/ReturnPagedChats.js +3 -3
  199. package/dist/serialization/resources/empathicVoice/types/ReturnPagedPrompts.d.ts +3 -3
  200. package/dist/serialization/resources/empathicVoice/types/ReturnPagedPrompts.js +3 -3
  201. package/dist/serialization/resources/empathicVoice/types/ReturnPrompt.d.ts +6 -6
  202. package/dist/serialization/resources/empathicVoice/types/ReturnPrompt.js +6 -6
  203. package/dist/serialization/resources/empathicVoice/types/ReturnTool.d.ts +7 -7
  204. package/dist/serialization/resources/empathicVoice/types/ReturnTool.js +7 -7
  205. package/dist/serialization/resources/empathicVoice/types/ReturnVoice.d.ts +13 -0
  206. package/dist/serialization/resources/empathicVoice/types/ReturnVoice.js +34 -0
  207. package/dist/serialization/resources/empathicVoice/types/SessionSettings.d.ts +3 -1
  208. package/dist/serialization/resources/empathicVoice/types/SessionSettings.js +3 -1
  209. package/dist/serialization/resources/empathicVoice/types/TextInput.d.ts +1 -2
  210. package/dist/serialization/resources/empathicVoice/types/TextInput.js +1 -2
  211. package/dist/serialization/resources/empathicVoice/types/TtsInput.d.ts +1 -2
  212. package/dist/serialization/resources/empathicVoice/types/TtsInput.js +1 -2
  213. package/dist/serialization/resources/empathicVoice/types/UserInput.d.ts +14 -0
  214. package/dist/serialization/resources/empathicVoice/types/UserInput.js +35 -0
  215. package/dist/serialization/resources/empathicVoice/types/UserInterruption.d.ts +1 -0
  216. package/dist/serialization/resources/empathicVoice/types/UserInterruption.js +1 -0
  217. package/dist/serialization/resources/empathicVoice/types/UserMessage.d.ts +1 -1
  218. package/dist/serialization/resources/empathicVoice/types/UserMessage.js +1 -1
  219. package/dist/serialization/resources/empathicVoice/types/index.d.ts +7 -4
  220. package/dist/serialization/resources/empathicVoice/types/index.js +7 -4
  221. package/dist/wrapper/empathicVoice/chat/ChatClient.d.ts +3 -4
  222. package/dist/wrapper/empathicVoice/chat/ChatClient.js +5 -6
  223. package/dist/wrapper/empathicVoice/chat/StreamSocket.d.ts +6 -9
  224. package/dist/wrapper/empathicVoice/chat/StreamSocket.js +10 -16
  225. package/package.json +1 -1
  226. package/serialization/resources/empathicVoice/resources/chat/types/PublishEvent.d.ts +3 -3
  227. package/serialization/resources/empathicVoice/resources/chat/types/PublishEvent.js +3 -3
  228. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +17 -0
  229. package/{dist/serialization/resources/empathicVoice/types → serialization/resources/empathicVoice/resources/configs/client/requests}/PostedConfig.js +4 -4
  230. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.d.ts +1 -1
  231. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigName.js +1 -1
  232. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +16 -0
  233. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +37 -0
  234. package/serialization/resources/empathicVoice/resources/configs/client/requests/index.d.ts +2 -0
  235. package/serialization/resources/empathicVoice/resources/configs/client/requests/index.js +5 -1
  236. package/serialization/resources/empathicVoice/resources/prompts/client/addNewPromptVersion.d.ts +11 -0
  237. package/serialization/resources/empathicVoice/resources/prompts/client/addNewPromptVersion.js +8 -0
  238. package/serialization/resources/empathicVoice/resources/prompts/client/createNewPrompt.d.ts +11 -0
  239. package/serialization/resources/empathicVoice/resources/prompts/client/createNewPrompt.js +8 -0
  240. package/serialization/resources/empathicVoice/resources/prompts/client/getReturnPromptByVersionNumber.d.ts +11 -0
  241. package/serialization/resources/empathicVoice/resources/prompts/client/getReturnPromptByVersionNumber.js +8 -0
  242. package/serialization/resources/empathicVoice/resources/prompts/client/index.d.ts +4 -0
  243. package/serialization/resources/empathicVoice/resources/prompts/client/index.js +17 -0
  244. package/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPrompt.d.ts +14 -0
  245. package/serialization/resources/empathicVoice/{types → resources/prompts/client/requests}/PostedPrompt.js +3 -3
  246. package/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.d.ts +1 -1
  247. package/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptName.js +1 -1
  248. package/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.d.ts +13 -0
  249. package/serialization/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.js +34 -0
  250. package/serialization/resources/empathicVoice/resources/prompts/client/requests/index.d.ts +2 -0
  251. package/serialization/resources/empathicVoice/resources/prompts/client/requests/index.js +5 -1
  252. package/serialization/resources/empathicVoice/resources/prompts/client/updatePromptVersionDescription.d.ts +11 -0
  253. package/serialization/resources/empathicVoice/resources/prompts/client/updatePromptVersionDescription.js +8 -0
  254. package/serialization/resources/empathicVoice/types/AssistantEnd.d.ts +1 -0
  255. package/serialization/resources/empathicVoice/types/AssistantEnd.js +1 -0
  256. package/serialization/resources/empathicVoice/types/AssistantInput.d.ts +14 -0
  257. package/serialization/resources/empathicVoice/types/AssistantInput.js +35 -0
  258. package/serialization/resources/empathicVoice/types/AssistantMessage.d.ts +2 -1
  259. package/serialization/resources/empathicVoice/types/AssistantMessage.js +2 -1
  260. package/serialization/resources/empathicVoice/types/AudioInput.d.ts +1 -0
  261. package/serialization/resources/empathicVoice/types/AudioInput.js +1 -0
  262. package/serialization/resources/empathicVoice/types/AudioOutput.d.ts +1 -0
  263. package/serialization/resources/empathicVoice/types/AudioOutput.js +1 -0
  264. package/serialization/resources/empathicVoice/types/Error_.d.ts +1 -0
  265. package/serialization/resources/empathicVoice/types/Error_.js +1 -0
  266. package/serialization/resources/empathicVoice/types/PostedLanguageModelModelProvider.d.ts +1 -1
  267. package/serialization/resources/empathicVoice/types/PostedLanguageModelModelProvider.js +1 -1
  268. package/serialization/resources/empathicVoice/types/PostedPromptSpec.d.ts +2 -2
  269. package/serialization/resources/empathicVoice/types/PostedPromptSpec.js +2 -2
  270. package/serialization/resources/empathicVoice/types/PostedTool.d.ts +3 -3
  271. package/serialization/resources/empathicVoice/types/PostedTool.js +3 -3
  272. package/serialization/resources/empathicVoice/types/PostedToolName.d.ts +1 -1
  273. package/serialization/resources/empathicVoice/types/PostedToolName.js +1 -1
  274. package/serialization/resources/empathicVoice/types/PostedToolSpec.d.ts +2 -2
  275. package/serialization/resources/empathicVoice/types/PostedToolSpec.js +2 -2
  276. package/serialization/resources/empathicVoice/types/{PostedPrompt.d.ts → PostedToolVersion.d.ts} +4 -4
  277. package/serialization/resources/empathicVoice/types/PostedToolVersion.js +35 -0
  278. package/serialization/resources/empathicVoice/types/PostedVoice.d.ts +13 -0
  279. package/serialization/resources/empathicVoice/types/PostedVoice.js +34 -0
  280. package/serialization/resources/empathicVoice/types/ReturnActiveChatCount.d.ts +4 -4
  281. package/serialization/resources/empathicVoice/types/ReturnActiveChatCount.js +4 -4
  282. package/serialization/resources/empathicVoice/types/ReturnActiveChatCountPerTag.d.ts +2 -2
  283. package/serialization/resources/empathicVoice/types/ReturnActiveChatCountPerTag.js +2 -2
  284. package/serialization/resources/empathicVoice/types/ReturnChat.d.ts +3 -3
  285. package/serialization/resources/empathicVoice/types/ReturnChat.js +3 -3
  286. package/serialization/resources/empathicVoice/types/ReturnChatEvent.d.ts +4 -4
  287. package/serialization/resources/empathicVoice/types/ReturnChatEvent.js +4 -4
  288. package/serialization/resources/empathicVoice/types/ReturnChatWithPagedEvents.d.ts +6 -6
  289. package/serialization/resources/empathicVoice/types/ReturnChatWithPagedEvents.js +6 -6
  290. package/serialization/resources/empathicVoice/types/ReturnConfigSpec.d.ts +1 -1
  291. package/serialization/resources/empathicVoice/types/ReturnConfigSpec.js +1 -1
  292. package/serialization/resources/empathicVoice/types/ReturnPagedChats.d.ts +3 -3
  293. package/serialization/resources/empathicVoice/types/ReturnPagedChats.js +3 -3
  294. package/serialization/resources/empathicVoice/types/ReturnPagedPrompts.d.ts +3 -3
  295. package/serialization/resources/empathicVoice/types/ReturnPagedPrompts.js +3 -3
  296. package/serialization/resources/empathicVoice/types/ReturnPrompt.d.ts +6 -6
  297. package/serialization/resources/empathicVoice/types/ReturnPrompt.js +6 -6
  298. package/serialization/resources/empathicVoice/types/ReturnTool.d.ts +7 -7
  299. package/serialization/resources/empathicVoice/types/ReturnTool.js +7 -7
  300. package/serialization/resources/empathicVoice/types/ReturnVoice.d.ts +13 -0
  301. package/serialization/resources/empathicVoice/types/ReturnVoice.js +34 -0
  302. package/serialization/resources/empathicVoice/types/SessionSettings.d.ts +3 -1
  303. package/serialization/resources/empathicVoice/types/SessionSettings.js +3 -1
  304. package/serialization/resources/empathicVoice/types/TextInput.d.ts +1 -2
  305. package/serialization/resources/empathicVoice/types/TextInput.js +1 -2
  306. package/serialization/resources/empathicVoice/types/TtsInput.d.ts +1 -2
  307. package/serialization/resources/empathicVoice/types/TtsInput.js +1 -2
  308. package/serialization/resources/empathicVoice/types/UserInput.d.ts +14 -0
  309. package/serialization/resources/empathicVoice/types/UserInput.js +35 -0
  310. package/serialization/resources/empathicVoice/types/UserInterruption.d.ts +1 -0
  311. package/serialization/resources/empathicVoice/types/UserInterruption.js +1 -0
  312. package/serialization/resources/empathicVoice/types/UserMessage.d.ts +1 -1
  313. package/serialization/resources/empathicVoice/types/UserMessage.js +1 -1
  314. package/serialization/resources/empathicVoice/types/index.d.ts +7 -4
  315. package/serialization/resources/empathicVoice/types/index.js +7 -4
  316. package/wrapper/empathicVoice/chat/ChatClient.d.ts +3 -4
  317. package/wrapper/empathicVoice/chat/ChatClient.js +5 -6
  318. package/wrapper/empathicVoice/chat/StreamSocket.d.ts +6 -9
  319. package/wrapper/empathicVoice/chat/StreamSocket.js +10 -16
  320. package/dist/serialization/resources/empathicVoice/types/PostedConfig.d.ts +0 -17
  321. package/serialization/resources/empathicVoice/types/PostedConfig.d.ts +0 -17
  322. /package/api/resources/empathicVoice/{types → resources/configs/client/requests}/PostedConfig.js +0 -0
  323. /package/api/resources/empathicVoice/{types/PostedPrompt.js → resources/configs/client/requests/PostedConfigVersion.js} +0 -0
  324. /package/{dist/api/resources/empathicVoice/types → api/resources/empathicVoice/resources/prompts/client/requests}/PostedPrompt.js +0 -0
  325. /package/{dist/api/resources/empathicVoice/types/PostedConfig.js → api/resources/empathicVoice/resources/prompts/client/requests/PostedPromptVersion.js} +0 -0
@@ -31,15 +31,15 @@ const core = __importStar(require("../../../../core"));
31
31
  const ReturnChatEvent_1 = require("./ReturnChatEvent");
32
32
  const ReturnConfigSpec_1 = require("./ReturnConfigSpec");
33
33
  exports.ReturnChatWithPagedEvents = core.serialization.object({
34
- id: core.serialization.string().optional(),
34
+ id: core.serialization.string(),
35
35
  resumedFromId: core.serialization.property("resumed_from_id", core.serialization.string().optional()),
36
36
  tag: core.serialization.string().optional(),
37
- status: core.serialization.string().optional(),
38
- startTimestamp: core.serialization.property("start_timestamp", core.serialization.number().optional()),
37
+ status: core.serialization.string(),
38
+ startTimestamp: core.serialization.property("start_timestamp", core.serialization.number()),
39
39
  endTimestamp: core.serialization.property("end_timestamp", core.serialization.number().optional()),
40
- eventsPage: core.serialization.property("events_page", core.serialization.list(ReturnChatEvent_1.ReturnChatEvent).optional()),
40
+ eventsPage: core.serialization.property("events_page", core.serialization.list(ReturnChatEvent_1.ReturnChatEvent)),
41
41
  metadata: core.serialization.string().optional(),
42
- pageNumber: core.serialization.property("page_number", core.serialization.number().optional()),
43
- pageSize: core.serialization.property("page_size", core.serialization.number().optional()),
42
+ pageNumber: core.serialization.property("page_number", core.serialization.number()),
43
+ pageSize: core.serialization.property("page_size", core.serialization.number()),
44
44
  config: ReturnConfigSpec_1.ReturnConfigSpec.optional(),
45
45
  });
@@ -7,7 +7,7 @@ import * as core from "../../../../core";
7
7
  export declare const ReturnConfigSpec: core.serialization.ObjectSchema<serializers.empathicVoice.ReturnConfigSpec.Raw, Hume.empathicVoice.ReturnConfigSpec>;
8
8
  export declare namespace ReturnConfigSpec {
9
9
  interface Raw {
10
- id?: string | null;
10
+ id: string;
11
11
  version?: number | null;
12
12
  }
13
13
  }
@@ -29,6 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ReturnConfigSpec = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
31
  exports.ReturnConfigSpec = core.serialization.object({
32
- id: core.serialization.string().optional(),
32
+ id: core.serialization.string(),
33
33
  version: core.serialization.number().optional(),
34
34
  });
@@ -8,8 +8,8 @@ import { ReturnChat } from "./ReturnChat";
8
8
  export declare const ReturnPagedChats: core.serialization.ObjectSchema<serializers.empathicVoice.ReturnPagedChats.Raw, Hume.empathicVoice.ReturnPagedChats>;
9
9
  export declare namespace ReturnPagedChats {
10
10
  interface Raw {
11
- page_number?: number | null;
12
- page_size?: number | null;
13
- chats_page?: ReturnChat.Raw[] | null;
11
+ page_number: number;
12
+ page_size: number;
13
+ chats_page: ReturnChat.Raw[];
14
14
  }
15
15
  }
@@ -30,7 +30,7 @@ exports.ReturnPagedChats = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
31
  const ReturnChat_1 = require("./ReturnChat");
32
32
  exports.ReturnPagedChats = core.serialization.object({
33
- pageNumber: core.serialization.property("page_number", core.serialization.number().optional()),
34
- pageSize: core.serialization.property("page_size", core.serialization.number().optional()),
35
- chatsPage: core.serialization.property("chats_page", core.serialization.list(ReturnChat_1.ReturnChat).optional()),
33
+ pageNumber: core.serialization.property("page_number", core.serialization.number()),
34
+ pageSize: core.serialization.property("page_size", core.serialization.number()),
35
+ chatsPage: core.serialization.property("chats_page", core.serialization.list(ReturnChat_1.ReturnChat)),
36
36
  });
@@ -8,8 +8,8 @@ import { ReturnPrompt } from "./ReturnPrompt";
8
8
  export declare const ReturnPagedPrompts: core.serialization.ObjectSchema<serializers.empathicVoice.ReturnPagedPrompts.Raw, Hume.empathicVoice.ReturnPagedPrompts>;
9
9
  export declare namespace ReturnPagedPrompts {
10
10
  interface Raw {
11
- page_number?: number | null;
12
- page_size?: number | null;
13
- prompts_page?: ReturnPrompt.Raw[] | null;
11
+ page_number: number;
12
+ page_size: number;
13
+ prompts_page: (ReturnPrompt.Raw | null | undefined)[];
14
14
  }
15
15
  }
@@ -30,7 +30,7 @@ exports.ReturnPagedPrompts = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
31
  const ReturnPrompt_1 = require("./ReturnPrompt");
32
32
  exports.ReturnPagedPrompts = core.serialization.object({
33
- pageNumber: core.serialization.property("page_number", core.serialization.number().optional()),
34
- pageSize: core.serialization.property("page_size", core.serialization.number().optional()),
35
- promptsPage: core.serialization.property("prompts_page", core.serialization.list(ReturnPrompt_1.ReturnPrompt).optional()),
33
+ pageNumber: core.serialization.property("page_number", core.serialization.number()),
34
+ pageSize: core.serialization.property("page_size", core.serialization.number()),
35
+ promptsPage: core.serialization.property("prompts_page", core.serialization.list(ReturnPrompt_1.ReturnPrompt.optional())),
36
36
  });
@@ -7,12 +7,12 @@ import * as core from "../../../../core";
7
7
  export declare const ReturnPrompt: core.serialization.ObjectSchema<serializers.empathicVoice.ReturnPrompt.Raw, Hume.empathicVoice.ReturnPrompt>;
8
8
  export declare namespace ReturnPrompt {
9
9
  interface Raw {
10
- id?: string | null;
11
- version?: number | null;
10
+ id: string;
11
+ version: number;
12
12
  version_description?: string | null;
13
- name?: string | null;
14
- created_on?: number | null;
15
- modified_on?: number | null;
16
- text?: string | null;
13
+ name: string;
14
+ created_on: number;
15
+ modified_on: number;
16
+ text: string;
17
17
  }
18
18
  }
@@ -29,11 +29,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ReturnPrompt = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
31
  exports.ReturnPrompt = core.serialization.object({
32
- id: core.serialization.string().optional(),
33
- version: core.serialization.number().optional(),
32
+ id: core.serialization.string(),
33
+ version: core.serialization.number(),
34
34
  versionDescription: core.serialization.property("version_description", core.serialization.string().optional()),
35
- name: core.serialization.string().optional(),
36
- createdOn: core.serialization.property("created_on", core.serialization.number().optional()),
37
- modifiedOn: core.serialization.property("modified_on", core.serialization.number().optional()),
38
- text: core.serialization.string().optional(),
35
+ name: core.serialization.string(),
36
+ createdOn: core.serialization.property("created_on", core.serialization.number()),
37
+ modifiedOn: core.serialization.property("modified_on", core.serialization.number()),
38
+ text: core.serialization.string(),
39
39
  });
@@ -7,13 +7,13 @@ import * as core from "../../../../core";
7
7
  export declare const ReturnTool: core.serialization.ObjectSchema<serializers.empathicVoice.ReturnTool.Raw, Hume.empathicVoice.ReturnTool>;
8
8
  export declare namespace ReturnTool {
9
9
  interface Raw {
10
- id?: string | null;
11
- version?: number | null;
10
+ id: string;
11
+ version: number;
12
12
  version_description?: string | null;
13
- name?: string | null;
14
- created_on?: number | null;
15
- modified_on?: number | null;
16
- docstring?: string | null;
17
- schema?: string | null;
13
+ name: string;
14
+ created_on: number;
15
+ modified_on: number;
16
+ description?: string | null;
17
+ parameters: string;
18
18
  }
19
19
  }
@@ -29,12 +29,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.ReturnTool = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
31
  exports.ReturnTool = core.serialization.object({
32
- id: core.serialization.string().optional(),
33
- version: core.serialization.number().optional(),
32
+ id: core.serialization.string(),
33
+ version: core.serialization.number(),
34
34
  versionDescription: core.serialization.property("version_description", core.serialization.string().optional()),
35
- name: core.serialization.string().optional(),
36
- createdOn: core.serialization.property("created_on", core.serialization.number().optional()),
37
- modifiedOn: core.serialization.property("modified_on", core.serialization.number().optional()),
38
- docstring: core.serialization.string().optional(),
39
- schema: core.serialization.string().optional(),
35
+ name: core.serialization.string(),
36
+ createdOn: core.serialization.property("created_on", core.serialization.number()),
37
+ modifiedOn: core.serialization.property("modified_on", core.serialization.number()),
38
+ description: core.serialization.string().optional(),
39
+ parameters: core.serialization.string(),
40
40
  });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../..";
5
+ import * as Hume from "../../../../api";
6
+ import * as core from "../../../../core";
7
+ export declare const ReturnVoice: core.serialization.ObjectSchema<serializers.empathicVoice.ReturnVoice.Raw, Hume.empathicVoice.ReturnVoice>;
8
+ export declare namespace ReturnVoice {
9
+ interface Raw {
10
+ provider: string;
11
+ name: string;
12
+ }
13
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.ReturnVoice = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.ReturnVoice = core.serialization.object({
32
+ provider: core.serialization.string(),
33
+ name: core.serialization.string(),
34
+ });
@@ -8,8 +8,10 @@ import { AudioConfiguration } from "./AudioConfiguration";
8
8
  export declare const SessionSettings: core.serialization.ObjectSchema<serializers.empathicVoice.SessionSettings.Raw, Hume.empathicVoice.SessionSettings>;
9
9
  export declare namespace SessionSettings {
10
10
  interface Raw {
11
+ custom_session_id?: string | null;
11
12
  audio?: AudioConfiguration.Raw | null;
12
13
  language_model_api_key?: string | null;
13
- type?: "session_settings" | null;
14
+ system_prompt?: string | null;
15
+ type: "session_settings";
14
16
  }
15
17
  }
@@ -30,7 +30,9 @@ exports.SessionSettings = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
31
  const AudioConfiguration_1 = require("./AudioConfiguration");
32
32
  exports.SessionSettings = core.serialization.object({
33
+ customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
33
34
  audio: AudioConfiguration_1.AudioConfiguration.optional(),
34
35
  languageModelApiKey: core.serialization.property("language_model_api_key", core.serialization.string().optional()),
35
- type: core.serialization.stringLiteral("session_settings").optional(),
36
+ systemPrompt: core.serialization.property("system_prompt", core.serialization.string().optional()),
37
+ type: core.serialization.stringLiteral("session_settings"),
36
38
  });
@@ -7,7 +7,6 @@ import * as core from "../../../../core";
7
7
  export declare const TextInput: core.serialization.ObjectSchema<serializers.empathicVoice.TextInput.Raw, Hume.empathicVoice.TextInput>;
8
8
  export declare namespace TextInput {
9
9
  interface Raw {
10
- text: string;
11
- type: "user_input";
10
+ type?: "text_input" | null;
12
11
  }
13
12
  }
@@ -29,6 +29,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.TextInput = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
31
  exports.TextInput = core.serialization.object({
32
- text: core.serialization.string(),
33
- type: core.serialization.stringLiteral("user_input"),
32
+ type: core.serialization.stringLiteral("text_input").optional(),
34
33
  });
@@ -7,7 +7,6 @@ import * as core from "../../../../core";
7
7
  export declare const TtsInput: core.serialization.ObjectSchema<serializers.empathicVoice.TtsInput.Raw, Hume.empathicVoice.TtsInput>;
8
8
  export declare namespace TtsInput {
9
9
  interface Raw {
10
- text: string;
11
- type: "assistant_input";
10
+ type?: "tts" | null;
12
11
  }
13
12
  }
@@ -29,6 +29,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.TtsInput = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
31
  exports.TtsInput = core.serialization.object({
32
- text: core.serialization.string(),
33
- type: core.serialization.stringLiteral("assistant_input"),
32
+ type: core.serialization.stringLiteral("tts").optional(),
34
33
  });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../..";
5
+ import * as Hume from "../../../../api";
6
+ import * as core from "../../../../core";
7
+ export declare const UserInput: core.serialization.ObjectSchema<serializers.empathicVoice.UserInput.Raw, Hume.empathicVoice.UserInput>;
8
+ export declare namespace UserInput {
9
+ interface Raw {
10
+ custom_session_id?: string | null;
11
+ text: string;
12
+ type: "user_input";
13
+ }
14
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.UserInput = void 0;
30
+ const core = __importStar(require("../../../../core"));
31
+ exports.UserInput = core.serialization.object({
32
+ customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
33
+ text: core.serialization.string(),
34
+ type: core.serialization.stringLiteral("user_input"),
35
+ });
@@ -7,6 +7,7 @@ import * as core from "../../../../core";
7
7
  export declare const UserInterruption: core.serialization.ObjectSchema<serializers.empathicVoice.UserInterruption.Raw, Hume.empathicVoice.UserInterruption>;
8
8
  export declare namespace UserInterruption {
9
9
  interface Raw {
10
+ custom_session_id?: string | null;
10
11
  time: number;
11
12
  type: "user_interruption";
12
13
  }
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.UserInterruption = void 0;
30
30
  const core = __importStar(require("../../../../core"));
31
31
  exports.UserInterruption = core.serialization.object({
32
+ customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
32
33
  time: core.serialization.number(),
33
34
  type: core.serialization.stringLiteral("user_interruption"),
34
35
  });
@@ -10,10 +10,10 @@ import { MillisecondInterval } from "./MillisecondInterval";
10
10
  export declare const UserMessage: core.serialization.ObjectSchema<serializers.empathicVoice.UserMessage.Raw, Hume.empathicVoice.UserMessage>;
11
11
  export declare namespace UserMessage {
12
12
  interface Raw {
13
+ custom_session_id?: string | null;
13
14
  from_text: boolean;
14
15
  message: ChatMessage.Raw;
15
16
  models: Inference.Raw;
16
- serialized_segments: Record<string, unknown>[];
17
17
  time: MillisecondInterval.Raw;
18
18
  type: "user_message";
19
19
  }
@@ -32,10 +32,10 @@ const ChatMessage_1 = require("./ChatMessage");
32
32
  const Inference_1 = require("./Inference");
33
33
  const MillisecondInterval_1 = require("./MillisecondInterval");
34
34
  exports.UserMessage = core.serialization.object({
35
+ customSessionId: core.serialization.property("custom_session_id", core.serialization.string().optional()),
35
36
  fromText: core.serialization.property("from_text", core.serialization.boolean()),
36
37
  message: ChatMessage_1.ChatMessage,
37
38
  models: Inference_1.Inference,
38
- serializedSegments: core.serialization.property("serialized_segments", core.serialization.list(core.serialization.record(core.serialization.string(), core.serialization.unknown()))),
39
39
  time: MillisecondInterval_1.MillisecondInterval,
40
40
  type: core.serialization.stringLiteral("user_message"),
41
41
  });
@@ -1,14 +1,15 @@
1
1
  export * from "./PostedTool";
2
2
  export * from "./ReturnTool";
3
- export * from "./PostedPrompt";
3
+ export * from "./PostedToolVersion";
4
4
  export * from "./ReturnPrompt";
5
- export * from "./PostedConfig";
6
5
  export * from "./PostedLanguageModelModelProvider";
7
6
  export * from "./PostedLanguageModel";
8
7
  export * from "./PostedPromptSpec";
9
8
  export * from "./PostedToolSpec";
9
+ export * from "./PostedVoice";
10
10
  export * from "./ReturnConfig";
11
11
  export * from "./ReturnLanguageModel";
12
+ export * from "./ReturnVoice";
12
13
  export * from "./PostedToolName";
13
14
  export * from "./PostedToolVersionDescription";
14
15
  export * from "./ReturnPagedPrompts";
@@ -21,6 +22,7 @@ export * from "./ReturnChatWithPagedEvents";
21
22
  export * from "./ReturnActiveChatCount";
22
23
  export * from "./ReturnActiveChatCountPerTag";
23
24
  export * from "./AssistantEnd";
25
+ export * from "./AssistantInput";
24
26
  export * from "./AssistantMessage";
25
27
  export * from "./AudioConfiguration";
26
28
  export * from "./AudioInput";
@@ -34,8 +36,9 @@ export * from "./MillisecondInterval";
34
36
  export * from "./ProsodyInference";
35
37
  export * from "./Role";
36
38
  export * from "./SessionSettings";
37
- export * from "./TextInput";
38
- export * from "./TtsInput";
39
+ export * from "./UserInput";
39
40
  export * from "./UserInterruption";
40
41
  export * from "./UserMessage";
42
+ export * from "./TtsInput";
43
+ export * from "./TextInput";
41
44
  export * from "./FunctionCallResponseInput";
@@ -16,15 +16,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./PostedTool"), exports);
18
18
  __exportStar(require("./ReturnTool"), exports);
19
- __exportStar(require("./PostedPrompt"), exports);
19
+ __exportStar(require("./PostedToolVersion"), exports);
20
20
  __exportStar(require("./ReturnPrompt"), exports);
21
- __exportStar(require("./PostedConfig"), exports);
22
21
  __exportStar(require("./PostedLanguageModelModelProvider"), exports);
23
22
  __exportStar(require("./PostedLanguageModel"), exports);
24
23
  __exportStar(require("./PostedPromptSpec"), exports);
25
24
  __exportStar(require("./PostedToolSpec"), exports);
25
+ __exportStar(require("./PostedVoice"), exports);
26
26
  __exportStar(require("./ReturnConfig"), exports);
27
27
  __exportStar(require("./ReturnLanguageModel"), exports);
28
+ __exportStar(require("./ReturnVoice"), exports);
28
29
  __exportStar(require("./PostedToolName"), exports);
29
30
  __exportStar(require("./PostedToolVersionDescription"), exports);
30
31
  __exportStar(require("./ReturnPagedPrompts"), exports);
@@ -37,6 +38,7 @@ __exportStar(require("./ReturnChatWithPagedEvents"), exports);
37
38
  __exportStar(require("./ReturnActiveChatCount"), exports);
38
39
  __exportStar(require("./ReturnActiveChatCountPerTag"), exports);
39
40
  __exportStar(require("./AssistantEnd"), exports);
41
+ __exportStar(require("./AssistantInput"), exports);
40
42
  __exportStar(require("./AssistantMessage"), exports);
41
43
  __exportStar(require("./AudioConfiguration"), exports);
42
44
  __exportStar(require("./AudioInput"), exports);
@@ -50,8 +52,9 @@ __exportStar(require("./MillisecondInterval"), exports);
50
52
  __exportStar(require("./ProsodyInference"), exports);
51
53
  __exportStar(require("./Role"), exports);
52
54
  __exportStar(require("./SessionSettings"), exports);
53
- __exportStar(require("./TextInput"), exports);
54
- __exportStar(require("./TtsInput"), exports);
55
+ __exportStar(require("./UserInput"), exports);
55
56
  __exportStar(require("./UserInterruption"), exports);
56
57
  __exportStar(require("./UserMessage"), exports);
58
+ __exportStar(require("./TtsInput"), exports);
59
+ __exportStar(require("./TextInput"), exports);
57
60
  __exportStar(require("./FunctionCallResponseInput"), exports);
@@ -1,6 +1,5 @@
1
1
  import * as Hume from "../../../api";
2
2
  import * as core from "../../../core";
3
- import WebSocket from "ws";
4
3
  import { StreamSocket } from "./StreamSocket";
5
4
  export declare namespace ChatClient {
6
5
  interface Options {
@@ -12,10 +11,10 @@ export declare namespace ChatClient {
12
11
  configId?: string;
13
12
  /** The version of the configuration. */
14
13
  configVersion?: string;
15
- onOpen?: (event: WebSocket.Event) => void;
14
+ onOpen?: () => void;
16
15
  onMessage?: (message: Hume.empathicVoice.SubscribeEvent) => void;
17
16
  onError?: (error: Hume.empathicVoice.Error_) => void;
18
- onClose?: (event: WebSocket.Event) => void;
17
+ onClose?: () => void;
19
18
  }
20
19
  }
21
20
  export declare class ChatClient {
@@ -24,7 +23,7 @@ export declare class ChatClient {
24
23
  connect(args?: ChatClient.ConnectArgs): Promise<StreamSocket>;
25
24
  private fetchAccessToken;
26
25
  }
27
- export declare function parse(data: WebSocket.Data, args?: {
26
+ export declare function parse(data: any, args?: {
28
27
  onMessage?: (message: Hume.empathicVoice.SubscribeEvent) => void;
29
28
  onError?: (error: Hume.empathicVoice.Error_) => void;
30
29
  }): Promise<Hume.empathicVoice.SubscribeEvent | undefined>;
@@ -40,7 +40,6 @@ const serializers = __importStar(require("../../../serialization"));
40
40
  const core = __importStar(require("../../../core"));
41
41
  const errors = __importStar(require("../../../errors"));
42
42
  const qs_1 = __importDefault(require("qs"));
43
- const ws_1 = __importDefault(require("ws"));
44
43
  const base64Encode_1 = require("../../base64Encode");
45
44
  const StreamSocket_1 = require("./StreamSocket");
46
45
  class ChatClient {
@@ -58,12 +57,12 @@ class ChatClient {
58
57
  if (args.configVersion != null) {
59
58
  queryParams["config_version"] = args.configVersion;
60
59
  }
61
- const websocket = new ws_1.default(`wss://api.hume.ai/v0/evi/chat?${qs_1.default.stringify(queryParams)}`, {
60
+ const websocket = new core.WebSocket(`wss://api.hume.ai/v0/evi/chat?${qs_1.default.stringify(queryParams)}`, {
62
61
  timeout: 10,
63
62
  });
64
- websocket.addEventListener("open", (event) => {
63
+ websocket.addEventListener("open", () => {
65
64
  var _a;
66
- (_a = args.onOpen) === null || _a === void 0 ? void 0 : _a.call(args, event);
65
+ (_a = args.onOpen) === null || _a === void 0 ? void 0 : _a.call(args);
67
66
  });
68
67
  websocket.addEventListener("error", (e) => {
69
68
  var _a;
@@ -80,9 +79,9 @@ class ChatClient {
80
79
  onError: args.onError,
81
80
  });
82
81
  }));
83
- websocket.addEventListener("close", (event) => {
82
+ websocket.addEventListener("close", () => {
84
83
  var _a;
85
- (_a = args.onClose) === null || _a === void 0 ? void 0 : _a.call(args, event);
84
+ (_a = args.onClose) === null || _a === void 0 ? void 0 : _a.call(args);
86
85
  });
87
86
  return new StreamSocket_1.StreamSocket({
88
87
  websocket,
@@ -1,12 +1,11 @@
1
- import WebSocket from "ws";
2
1
  import * as Hume from "../../../api";
3
2
  export declare namespace StreamSocket {
4
3
  interface Args {
5
- websocket: WebSocket;
4
+ websocket: any;
6
5
  }
7
6
  }
8
7
  export declare class StreamSocket {
9
- readonly websocket: WebSocket;
8
+ readonly websocket: any;
10
9
  constructor({ websocket }: StreamSocket.Args);
11
10
  /**
12
11
  * Send audio input
@@ -17,15 +16,13 @@ export declare class StreamSocket {
17
16
  */
18
17
  sendSessionSettings(message: Hume.empathicVoice.SessionSettings): Promise<void>;
19
18
  /**
20
- * Send text input
19
+ * Send session settings
21
20
  */
22
- sendTextInput(text: string): Promise<void>;
21
+ sendAssistantInput(message: Hume.empathicVoice.AssistantInput): Promise<void>;
23
22
  /**
24
- *
25
- * Send TTS input
26
- *
23
+ * Send text input
27
24
  */
28
- sendTtsInput(message: Hume.empathicVoice.TtsInput): Promise<void>;
25
+ sendTextInput(text: string): Promise<void>;
29
26
  /**
30
27
  * Closes the underlying socket.
31
28
  */
@@ -31,12 +31,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
31
31
  step((generator = generator.apply(thisArg, _arguments || [])).next());
32
32
  });
33
33
  };
34
- var __importDefault = (this && this.__importDefault) || function (mod) {
35
- return (mod && mod.__esModule) ? mod : { "default": mod };
36
- };
37
34
  Object.defineProperty(exports, "__esModule", { value: true });
38
35
  exports.StreamSocket = void 0;
39
- const ws_1 = __importDefault(require("ws"));
40
36
  const serializers = __importStar(require("../../../serialization"));
41
37
  class StreamSocket {
42
38
  constructor({ websocket }) {
@@ -58,6 +54,14 @@ class StreamSocket {
58
54
  yield this.send(message);
59
55
  });
60
56
  }
57
+ /**
58
+ * Send session settings
59
+ */
60
+ sendAssistantInput(message) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ yield this.send(message);
63
+ });
64
+ }
61
65
  /**
62
66
  * Send text input
63
67
  */
@@ -69,16 +73,6 @@ class StreamSocket {
69
73
  });
70
74
  });
71
75
  }
72
- /**
73
- *
74
- * Send TTS input
75
- *
76
- */
77
- sendTtsInput(message) {
78
- return __awaiter(this, void 0, void 0, function* () {
79
- yield this.send(message);
80
- });
81
- }
82
76
  /**
83
77
  * Closes the underlying socket.
84
78
  */
@@ -88,7 +82,7 @@ class StreamSocket {
88
82
  send(payload) {
89
83
  return __awaiter(this, void 0, void 0, function* () {
90
84
  yield this.tillSocketOpen();
91
- const jsonPayload = yield serializers.expressionMeasurement.StreamData.jsonOrThrow(payload, {
85
+ const jsonPayload = yield serializers.empathicVoice.PublishEvent.jsonOrThrow(payload, {
92
86
  unrecognizedObjectKeys: "strip",
93
87
  });
94
88
  this.websocket.send(JSON.stringify(jsonPayload));
@@ -96,7 +90,7 @@ class StreamSocket {
96
90
  }
97
91
  tillSocketOpen() {
98
92
  return __awaiter(this, void 0, void 0, function* () {
99
- if (this.websocket.readyState === ws_1.default.OPEN) {
93
+ if (this.websocket.readyState === 1) {
100
94
  return this.websocket;
101
95
  }
102
96
  return new Promise((resolve, reject) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hume",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "private": false,
5
5
  "repository": "https://github.com/HumeAI/hume-typescript-sdk",
6
6
  "main": "./index.js",