hume 0.11.0 → 0.11.2

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 (242) hide show
  1. package/.mock/definition/empathic-voice/__package__.yml +39 -36
  2. package/.mock/definition/empathic-voice/chat.yml +18 -3
  3. package/.mock/definition/empathic-voice/chatGroups.yml +14 -10
  4. package/.mock/definition/empathic-voice/chatWebhooks.yml +2 -0
  5. package/.mock/definition/empathic-voice/chats.yml +2 -0
  6. package/.mock/definition/empathic-voice/configs.yml +4 -0
  7. package/.mock/definition/empathic-voice/customVoices.yml +1 -0
  8. package/.mock/definition/empathic-voice/prompts.yml +2 -0
  9. package/.mock/definition/empathic-voice/tools.yml +2 -0
  10. package/.mock/definition/expression-measurement/batch/__package__.yml +10 -10
  11. package/.mock/definition/expression-measurement/stream/stream.yml +1 -1
  12. package/.mock/definition/tts/__package__.yml +98 -55
  13. package/.mock/definition/tts/voices.yml +20 -9
  14. package/.mock/fern.config.json +1 -1
  15. package/Client.d.ts +11 -7
  16. package/Client.js +54 -6
  17. package/api/resources/empathicVoice/errors/BadRequestError.d.ts +2 -1
  18. package/api/resources/empathicVoice/errors/BadRequestError.js +2 -1
  19. package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +4 -2
  20. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +76 -42
  21. package/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.ts +4 -4
  22. package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +2 -1
  23. package/api/resources/empathicVoice/resources/chats/client/Client.js +57 -32
  24. package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +14 -7
  25. package/api/resources/empathicVoice/resources/configs/client/Client.js +136 -66
  26. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +1 -0
  27. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +1 -0
  28. package/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +10 -5
  29. package/api/resources/empathicVoice/resources/customVoices/client/Client.js +89 -42
  30. package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +16 -8
  31. package/api/resources/empathicVoice/resources/prompts/client/Client.js +134 -63
  32. package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +14 -7
  33. package/api/resources/empathicVoice/resources/tools/client/Client.js +136 -66
  34. package/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -1
  35. package/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -1
  36. package/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -1
  37. package/api/resources/empathicVoice/types/PostedNudgeSpec.d.ts +12 -0
  38. package/api/resources/empathicVoice/types/ReturnConfig.d.ts +1 -0
  39. package/api/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +12 -0
  40. package/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -1
  41. package/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +2 -2
  42. package/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +3 -3
  43. package/api/resources/empathicVoice/types/UserInput.d.ts +1 -1
  44. package/api/resources/empathicVoice/types/UserMessage.d.ts +3 -3
  45. package/api/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +2 -1
  46. package/api/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  47. package/api/resources/empathicVoice/types/index.d.ts +2 -4
  48. package/api/resources/empathicVoice/types/index.js +2 -4
  49. package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +12 -6
  50. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +89 -38
  51. package/api/resources/tts/client/Client.d.ts +28 -22
  52. package/api/resources/tts/client/Client.js +88 -50
  53. package/api/resources/tts/client/index.d.ts +1 -1
  54. package/api/resources/tts/client/index.js +15 -0
  55. package/api/resources/tts/client/requests/SynthesizeJsonRequest.d.ts +36 -0
  56. package/api/resources/tts/client/requests/index.d.ts +1 -0
  57. package/api/resources/tts/client/requests/index.js +2 -0
  58. package/api/resources/tts/errors/BadRequestError.d.ts +2 -1
  59. package/api/resources/tts/errors/BadRequestError.js +2 -1
  60. package/api/resources/tts/errors/UnprocessableEntityError.d.ts +2 -1
  61. package/api/resources/tts/errors/UnprocessableEntityError.js +2 -1
  62. package/api/resources/tts/resources/voices/client/Client.d.ts +9 -5
  63. package/api/resources/tts/resources/voices/client/Client.js +51 -26
  64. package/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.ts +4 -1
  65. package/api/resources/tts/types/PostedTts.d.ts +6 -6
  66. package/api/resources/tts/types/PostedUtterance.d.ts +5 -5
  67. package/api/resources/tts/types/PostedUtteranceVoiceWithId.d.ts +6 -7
  68. package/api/resources/tts/types/PostedUtteranceVoiceWithName.d.ts +6 -7
  69. package/api/resources/tts/types/ReturnGeneration.d.ts +1 -1
  70. package/api/resources/tts/types/ReturnTts.d.ts +1 -1
  71. package/api/resources/tts/types/ReturnVoice.d.ts +2 -8
  72. package/api/resources/tts/types/Snippet.d.ts +2 -0
  73. package/api/resources/tts/types/SnippetAudioChunk.d.ts +2 -0
  74. package/core/fetcher/APIResponse.d.ts +10 -0
  75. package/core/fetcher/Fetcher.js +7 -0
  76. package/core/fetcher/Headers.d.ts +2 -0
  77. package/core/fetcher/Headers.js +84 -0
  78. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  79. package/core/fetcher/HttpResponsePromise.js +103 -0
  80. package/core/fetcher/RawResponse.d.ts +29 -0
  81. package/core/fetcher/RawResponse.js +44 -0
  82. package/core/fetcher/index.d.ts +3 -0
  83. package/core/fetcher/index.js +7 -1
  84. package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  85. package/core/form-data-utils/FormDataWrapper.js +48 -9
  86. package/core/pagination/Page.d.ts +5 -2
  87. package/core/pagination/Page.js +5 -2
  88. package/core/pagination/Pageable.d.ts +2 -0
  89. package/dist/Client.d.ts +11 -7
  90. package/dist/Client.js +54 -6
  91. package/dist/api/resources/empathicVoice/errors/BadRequestError.d.ts +2 -1
  92. package/dist/api/resources/empathicVoice/errors/BadRequestError.js +2 -1
  93. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +4 -2
  94. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +76 -42
  95. package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsGetAudioRequest.d.ts +4 -4
  96. package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +2 -1
  97. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +57 -32
  98. package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +14 -7
  99. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +136 -66
  100. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +1 -0
  101. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +1 -0
  102. package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +10 -5
  103. package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.js +89 -42
  104. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +16 -8
  105. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +134 -63
  106. package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +14 -7
  107. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +136 -66
  108. package/dist/api/resources/empathicVoice/types/AssistantInput.d.ts +1 -1
  109. package/dist/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -1
  110. package/dist/api/resources/empathicVoice/types/PauseAssistantMessage.d.ts +1 -1
  111. package/dist/api/resources/empathicVoice/types/PostedNudgeSpec.d.ts +12 -0
  112. package/dist/api/resources/empathicVoice/types/ReturnConfig.d.ts +1 -0
  113. package/dist/api/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +12 -0
  114. package/dist/api/resources/empathicVoice/types/ToolCallMessage.d.ts +1 -1
  115. package/dist/api/resources/empathicVoice/types/ToolErrorMessage.d.ts +2 -2
  116. package/dist/api/resources/empathicVoice/types/ToolResponseMessage.d.ts +3 -3
  117. package/dist/api/resources/empathicVoice/types/UserInput.d.ts +1 -1
  118. package/dist/api/resources/empathicVoice/types/UserMessage.d.ts +3 -3
  119. package/dist/api/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +2 -1
  120. package/dist/api/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  121. package/dist/api/resources/empathicVoice/types/index.d.ts +2 -4
  122. package/dist/api/resources/empathicVoice/types/index.js +2 -4
  123. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +12 -6
  124. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +89 -38
  125. package/dist/api/resources/tts/client/Client.d.ts +28 -22
  126. package/dist/api/resources/tts/client/Client.js +88 -50
  127. package/dist/api/resources/tts/client/index.d.ts +1 -1
  128. package/dist/api/resources/tts/client/index.js +15 -0
  129. package/dist/api/resources/tts/client/requests/SynthesizeJsonRequest.d.ts +36 -0
  130. package/dist/api/resources/tts/client/requests/index.d.ts +1 -0
  131. package/dist/api/resources/tts/client/requests/index.js +2 -0
  132. package/dist/api/resources/tts/errors/BadRequestError.d.ts +2 -1
  133. package/dist/api/resources/tts/errors/BadRequestError.js +2 -1
  134. package/dist/api/resources/tts/errors/UnprocessableEntityError.d.ts +2 -1
  135. package/dist/api/resources/tts/errors/UnprocessableEntityError.js +2 -1
  136. package/dist/api/resources/tts/resources/voices/client/Client.d.ts +9 -5
  137. package/dist/api/resources/tts/resources/voices/client/Client.js +51 -26
  138. package/dist/api/resources/tts/resources/voices/client/requests/VoicesListRequest.d.ts +4 -1
  139. package/dist/api/resources/tts/types/PostedTts.d.ts +6 -6
  140. package/dist/api/resources/tts/types/PostedUtterance.d.ts +5 -5
  141. package/dist/api/resources/tts/types/PostedUtteranceVoiceWithId.d.ts +6 -7
  142. package/dist/api/resources/tts/types/PostedUtteranceVoiceWithName.d.ts +6 -7
  143. package/dist/api/resources/tts/types/ReturnGeneration.d.ts +1 -1
  144. package/dist/api/resources/tts/types/ReturnTts.d.ts +1 -1
  145. package/dist/api/resources/tts/types/ReturnVoice.d.ts +2 -8
  146. package/dist/api/resources/tts/types/Snippet.d.ts +2 -0
  147. package/dist/api/resources/tts/types/SnippetAudioChunk.d.ts +2 -0
  148. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  149. package/dist/core/fetcher/Fetcher.js +7 -0
  150. package/dist/core/fetcher/Headers.d.ts +2 -0
  151. package/dist/core/fetcher/Headers.js +84 -0
  152. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  153. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  154. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  155. package/dist/core/fetcher/RawResponse.js +44 -0
  156. package/dist/core/fetcher/index.d.ts +3 -0
  157. package/dist/core/fetcher/index.js +7 -1
  158. package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  159. package/dist/core/form-data-utils/FormDataWrapper.js +48 -9
  160. package/dist/core/pagination/Page.d.ts +5 -2
  161. package/dist/core/pagination/Page.js +5 -2
  162. package/dist/core/pagination/Pageable.d.ts +2 -0
  163. package/dist/errors/HumeError.d.ts +7 -2
  164. package/dist/errors/HumeError.js +10 -10
  165. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -0
  166. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -0
  167. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -0
  168. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -0
  169. package/dist/serialization/resources/empathicVoice/types/PostedNudgeSpec.d.ts +13 -0
  170. package/dist/serialization/resources/empathicVoice/types/{TextInput.js → PostedNudgeSpec.js} +4 -3
  171. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -0
  172. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.js +2 -0
  173. package/dist/serialization/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +13 -0
  174. package/dist/serialization/resources/empathicVoice/types/{FunctionCallResponseInput.js → ReturnNudgeSpec.js} +4 -3
  175. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +1 -1
  176. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  177. package/dist/serialization/resources/empathicVoice/types/index.d.ts +2 -4
  178. package/dist/serialization/resources/empathicVoice/types/index.js +2 -4
  179. package/dist/serialization/resources/tts/types/Snippet.d.ts +1 -0
  180. package/dist/serialization/resources/tts/types/Snippet.js +1 -0
  181. package/dist/serialization/resources/tts/types/SnippetAudioChunk.d.ts +1 -0
  182. package/dist/serialization/resources/tts/types/SnippetAudioChunk.js +1 -0
  183. package/dist/version.d.ts +1 -1
  184. package/dist/version.js +1 -1
  185. package/dist/wrapper/expressionMeasurement/ExpressionMeasurementClient.js +2 -0
  186. package/dist/wrapper/expressionMeasurement/batch/BatchClient.d.ts +2 -1
  187. package/dist/wrapper/expressionMeasurement/batch/BatchClient.js +43 -17
  188. package/errors/HumeError.d.ts +7 -2
  189. package/errors/HumeError.js +10 -10
  190. package/package.json +3 -2
  191. package/reference.md +26 -22
  192. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -0
  193. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -0
  194. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -0
  195. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -0
  196. package/serialization/resources/empathicVoice/types/PostedNudgeSpec.d.ts +13 -0
  197. package/{dist/serialization/resources/empathicVoice/types/TtsInput.js → serialization/resources/empathicVoice/types/PostedNudgeSpec.js} +4 -3
  198. package/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -0
  199. package/serialization/resources/empathicVoice/types/ReturnConfig.js +2 -0
  200. package/serialization/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +13 -0
  201. package/{dist/serialization/resources/empathicVoice/types/PostedPromptSpec.js → serialization/resources/empathicVoice/types/ReturnNudgeSpec.js} +4 -3
  202. package/serialization/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +1 -1
  203. package/serialization/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  204. package/serialization/resources/empathicVoice/types/index.d.ts +2 -4
  205. package/serialization/resources/empathicVoice/types/index.js +2 -4
  206. package/serialization/resources/tts/types/Snippet.d.ts +1 -0
  207. package/serialization/resources/tts/types/Snippet.js +1 -0
  208. package/serialization/resources/tts/types/SnippetAudioChunk.d.ts +1 -0
  209. package/serialization/resources/tts/types/SnippetAudioChunk.js +1 -0
  210. package/version.d.ts +1 -1
  211. package/version.js +1 -1
  212. package/wrapper/expressionMeasurement/ExpressionMeasurementClient.js +2 -0
  213. package/wrapper/expressionMeasurement/batch/BatchClient.d.ts +2 -1
  214. package/wrapper/expressionMeasurement/batch/BatchClient.js +43 -17
  215. package/api/resources/empathicVoice/types/FunctionCallResponseInput.d.ts +0 -6
  216. package/api/resources/empathicVoice/types/PostedPromptSpec.d.ts +0 -9
  217. package/api/resources/empathicVoice/types/TextInput.d.ts +0 -6
  218. package/api/resources/empathicVoice/types/TtsInput.d.ts +0 -6
  219. package/dist/api/resources/empathicVoice/types/FunctionCallResponseInput.d.ts +0 -6
  220. package/dist/api/resources/empathicVoice/types/PostedPromptSpec.d.ts +0 -9
  221. package/dist/api/resources/empathicVoice/types/TextInput.d.ts +0 -6
  222. package/dist/api/resources/empathicVoice/types/TextInput.js +0 -5
  223. package/dist/api/resources/empathicVoice/types/TtsInput.d.ts +0 -6
  224. package/dist/api/resources/empathicVoice/types/TtsInput.js +0 -5
  225. package/dist/serialization/resources/empathicVoice/types/FunctionCallResponseInput.d.ts +0 -12
  226. package/dist/serialization/resources/empathicVoice/types/PostedPromptSpec.d.ts +0 -12
  227. package/dist/serialization/resources/empathicVoice/types/TextInput.d.ts +0 -12
  228. package/dist/serialization/resources/empathicVoice/types/TtsInput.d.ts +0 -12
  229. package/serialization/resources/empathicVoice/types/FunctionCallResponseInput.d.ts +0 -12
  230. package/serialization/resources/empathicVoice/types/FunctionCallResponseInput.js +0 -43
  231. package/serialization/resources/empathicVoice/types/PostedPromptSpec.d.ts +0 -12
  232. package/serialization/resources/empathicVoice/types/PostedPromptSpec.js +0 -43
  233. package/serialization/resources/empathicVoice/types/TextInput.d.ts +0 -12
  234. package/serialization/resources/empathicVoice/types/TextInput.js +0 -43
  235. package/serialization/resources/empathicVoice/types/TtsInput.d.ts +0 -12
  236. package/serialization/resources/empathicVoice/types/TtsInput.js +0 -43
  237. /package/api/resources/empathicVoice/types/{FunctionCallResponseInput.js → PostedNudgeSpec.js} +0 -0
  238. /package/api/resources/empathicVoice/types/{PostedPromptSpec.js → ReturnNudgeSpec.js} +0 -0
  239. /package/api/resources/{empathicVoice/types/TextInput.js → tts/client/requests/SynthesizeJsonRequest.js} +0 -0
  240. /package/{api/resources/empathicVoice/types/TtsInput.js → dist/api/resources/empathicVoice/types/PostedNudgeSpec.js} +0 -0
  241. /package/dist/api/resources/empathicVoice/types/{FunctionCallResponseInput.js → ReturnNudgeSpec.js} +0 -0
  242. /package/dist/api/resources/{empathicVoice/types/PostedPromptSpec.js → tts/client/requests/SynthesizeJsonRequest.js} +0 -0
@@ -77,7 +77,7 @@ class Tools {
77
77
  */
78
78
  listTools() {
79
79
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
80
- const list = (request) => __awaiter(this, void 0, void 0, function* () {
80
+ const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
81
81
  var _a, _b, _c;
82
82
  const { pageNumber, pageSize, restrictToMostRecent, name } = request;
83
83
  const _queryParams = {};
@@ -96,7 +96,7 @@ class Tools {
96
96
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
97
97
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/evi/tools"),
98
98
  method: "GET",
99
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
99
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.2", "User-Agent": "hume/0.11.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
100
100
  contentType: "application/json",
101
101
  queryParameters: _queryParams,
102
102
  requestType: "json",
@@ -105,12 +105,15 @@ class Tools {
105
105
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
106
106
  });
107
107
  if (_response.ok) {
108
- return serializers.empathicVoice.ReturnPagedUserDefinedTools.parseOrThrow(_response.body, {
109
- unrecognizedObjectKeys: "passthrough",
110
- allowUnrecognizedUnionMembers: true,
111
- allowUnrecognizedEnumValues: true,
112
- breadcrumbsPrefix: ["response"],
113
- });
108
+ return {
109
+ data: serializers.empathicVoice.ReturnPagedUserDefinedTools.parseOrThrow(_response.body, {
110
+ unrecognizedObjectKeys: "passthrough",
111
+ allowUnrecognizedUnionMembers: true,
112
+ allowUnrecognizedEnumValues: true,
113
+ breadcrumbsPrefix: ["response"],
114
+ }),
115
+ rawResponse: _response.rawResponse,
116
+ };
114
117
  }
115
118
  if (_response.error.reason === "status-code") {
116
119
  switch (_response.error.statusCode) {
@@ -120,11 +123,12 @@ class Tools {
120
123
  allowUnrecognizedUnionMembers: true,
121
124
  allowUnrecognizedEnumValues: true,
122
125
  breadcrumbsPrefix: ["response"],
123
- }));
126
+ }), _response.rawResponse);
124
127
  default:
125
128
  throw new errors.HumeError({
126
129
  statusCode: _response.error.statusCode,
127
130
  body: _response.error.body,
131
+ rawResponse: _response.rawResponse,
128
132
  });
129
133
  }
130
134
  }
@@ -133,18 +137,22 @@ class Tools {
133
137
  throw new errors.HumeError({
134
138
  statusCode: _response.error.statusCode,
135
139
  body: _response.error.rawBody,
140
+ rawResponse: _response.rawResponse,
136
141
  });
137
142
  case "timeout":
138
143
  throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/tools.");
139
144
  case "unknown":
140
145
  throw new errors.HumeError({
141
146
  message: _response.error.errorMessage,
147
+ rawResponse: _response.rawResponse,
142
148
  });
143
149
  }
144
- });
145
- let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 1;
150
+ }));
151
+ let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 0;
152
+ const dataWithRawResponse = yield list(request).withRawResponse();
146
153
  return new core.Pageable({
147
- response: yield list(request),
154
+ response: dataWithRawResponse.data,
155
+ rawResponse: dataWithRawResponse.rawResponse,
148
156
  hasNextPage: (response) => { var _a; return ((_a = response === null || response === void 0 ? void 0 : response.toolsPage) !== null && _a !== void 0 ? _a : []).length > 0; },
149
157
  getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.toolsPage) !== null && _a !== void 0 ? _a : []; },
150
158
  loadPage: (_response) => {
@@ -174,12 +182,15 @@ class Tools {
174
182
  * })
175
183
  */
176
184
  createTool(request, requestOptions) {
185
+ return core.HttpResponsePromise.fromPromise(this.__createTool(request, requestOptions));
186
+ }
187
+ __createTool(request, requestOptions) {
177
188
  return __awaiter(this, void 0, void 0, function* () {
178
189
  var _a, _b, _c;
179
190
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
180
191
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/evi/tools"),
181
192
  method: "POST",
182
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
193
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.2", "User-Agent": "hume/0.11.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
183
194
  contentType: "application/json",
184
195
  requestType: "json",
185
196
  body: serializers.empathicVoice.PostedUserDefinedTool.jsonOrThrow(request, {
@@ -190,12 +201,15 @@ class Tools {
190
201
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
191
202
  });
192
203
  if (_response.ok) {
193
- return serializers.empathicVoice.tools.createTool.Response.parseOrThrow(_response.body, {
194
- unrecognizedObjectKeys: "passthrough",
195
- allowUnrecognizedUnionMembers: true,
196
- allowUnrecognizedEnumValues: true,
197
- breadcrumbsPrefix: ["response"],
198
- });
204
+ return {
205
+ data: serializers.empathicVoice.tools.createTool.Response.parseOrThrow(_response.body, {
206
+ unrecognizedObjectKeys: "passthrough",
207
+ allowUnrecognizedUnionMembers: true,
208
+ allowUnrecognizedEnumValues: true,
209
+ breadcrumbsPrefix: ["response"],
210
+ }),
211
+ rawResponse: _response.rawResponse,
212
+ };
199
213
  }
200
214
  if (_response.error.reason === "status-code") {
201
215
  switch (_response.error.statusCode) {
@@ -205,11 +219,12 @@ class Tools {
205
219
  allowUnrecognizedUnionMembers: true,
206
220
  allowUnrecognizedEnumValues: true,
207
221
  breadcrumbsPrefix: ["response"],
208
- }));
222
+ }), _response.rawResponse);
209
223
  default:
210
224
  throw new errors.HumeError({
211
225
  statusCode: _response.error.statusCode,
212
226
  body: _response.error.body,
227
+ rawResponse: _response.rawResponse,
213
228
  });
214
229
  }
215
230
  }
@@ -218,12 +233,14 @@ class Tools {
218
233
  throw new errors.HumeError({
219
234
  statusCode: _response.error.statusCode,
220
235
  body: _response.error.rawBody,
236
+ rawResponse: _response.rawResponse,
221
237
  });
222
238
  case "timeout":
223
239
  throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/evi/tools.");
224
240
  case "unknown":
225
241
  throw new errors.HumeError({
226
242
  message: _response.error.errorMessage,
243
+ rawResponse: _response.rawResponse,
227
244
  });
228
245
  }
229
246
  });
@@ -244,7 +261,7 @@ class Tools {
244
261
  */
245
262
  listToolVersions(id_1) {
246
263
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
247
- const list = (request) => __awaiter(this, void 0, void 0, function* () {
264
+ const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
248
265
  var _a, _b, _c;
249
266
  const { pageNumber, pageSize, restrictToMostRecent } = request;
250
267
  const _queryParams = {};
@@ -260,7 +277,7 @@ class Tools {
260
277
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
261
278
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
262
279
  method: "GET",
263
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
280
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.2", "User-Agent": "hume/0.11.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
264
281
  contentType: "application/json",
265
282
  queryParameters: _queryParams,
266
283
  requestType: "json",
@@ -269,12 +286,15 @@ class Tools {
269
286
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
270
287
  });
271
288
  if (_response.ok) {
272
- return serializers.empathicVoice.ReturnPagedUserDefinedTools.parseOrThrow(_response.body, {
273
- unrecognizedObjectKeys: "passthrough",
274
- allowUnrecognizedUnionMembers: true,
275
- allowUnrecognizedEnumValues: true,
276
- breadcrumbsPrefix: ["response"],
277
- });
289
+ return {
290
+ data: serializers.empathicVoice.ReturnPagedUserDefinedTools.parseOrThrow(_response.body, {
291
+ unrecognizedObjectKeys: "passthrough",
292
+ allowUnrecognizedUnionMembers: true,
293
+ allowUnrecognizedEnumValues: true,
294
+ breadcrumbsPrefix: ["response"],
295
+ }),
296
+ rawResponse: _response.rawResponse,
297
+ };
278
298
  }
279
299
  if (_response.error.reason === "status-code") {
280
300
  switch (_response.error.statusCode) {
@@ -284,11 +304,12 @@ class Tools {
284
304
  allowUnrecognizedUnionMembers: true,
285
305
  allowUnrecognizedEnumValues: true,
286
306
  breadcrumbsPrefix: ["response"],
287
- }));
307
+ }), _response.rawResponse);
288
308
  default:
289
309
  throw new errors.HumeError({
290
310
  statusCode: _response.error.statusCode,
291
311
  body: _response.error.body,
312
+ rawResponse: _response.rawResponse,
292
313
  });
293
314
  }
294
315
  }
@@ -297,18 +318,22 @@ class Tools {
297
318
  throw new errors.HumeError({
298
319
  statusCode: _response.error.statusCode,
299
320
  body: _response.error.rawBody,
321
+ rawResponse: _response.rawResponse,
300
322
  });
301
323
  case "timeout":
302
324
  throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/tools/{id}.");
303
325
  case "unknown":
304
326
  throw new errors.HumeError({
305
327
  message: _response.error.errorMessage,
328
+ rawResponse: _response.rawResponse,
306
329
  });
307
330
  }
308
- });
309
- let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 1;
331
+ }));
332
+ let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 0;
333
+ const dataWithRawResponse = yield list(request).withRawResponse();
310
334
  return new core.Pageable({
311
- response: yield list(request),
335
+ response: dataWithRawResponse.data,
336
+ rawResponse: dataWithRawResponse.rawResponse,
312
337
  hasNextPage: (response) => { var _a; return ((_a = response === null || response === void 0 ? void 0 : response.toolsPage) !== null && _a !== void 0 ? _a : []).length > 0; },
313
338
  getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.toolsPage) !== null && _a !== void 0 ? _a : []; },
314
339
  loadPage: (_response) => {
@@ -338,12 +363,15 @@ class Tools {
338
363
  * })
339
364
  */
340
365
  createToolVersion(id, request, requestOptions) {
366
+ return core.HttpResponsePromise.fromPromise(this.__createToolVersion(id, request, requestOptions));
367
+ }
368
+ __createToolVersion(id, request, requestOptions) {
341
369
  return __awaiter(this, void 0, void 0, function* () {
342
370
  var _a, _b, _c;
343
371
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
344
372
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
345
373
  method: "POST",
346
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
374
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.2", "User-Agent": "hume/0.11.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
347
375
  contentType: "application/json",
348
376
  requestType: "json",
349
377
  body: serializers.empathicVoice.PostedUserDefinedToolVersion.jsonOrThrow(request, {
@@ -354,12 +382,15 @@ class Tools {
354
382
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
355
383
  });
356
384
  if (_response.ok) {
357
- return serializers.empathicVoice.tools.createToolVersion.Response.parseOrThrow(_response.body, {
358
- unrecognizedObjectKeys: "passthrough",
359
- allowUnrecognizedUnionMembers: true,
360
- allowUnrecognizedEnumValues: true,
361
- breadcrumbsPrefix: ["response"],
362
- });
385
+ return {
386
+ data: serializers.empathicVoice.tools.createToolVersion.Response.parseOrThrow(_response.body, {
387
+ unrecognizedObjectKeys: "passthrough",
388
+ allowUnrecognizedUnionMembers: true,
389
+ allowUnrecognizedEnumValues: true,
390
+ breadcrumbsPrefix: ["response"],
391
+ }),
392
+ rawResponse: _response.rawResponse,
393
+ };
363
394
  }
364
395
  if (_response.error.reason === "status-code") {
365
396
  switch (_response.error.statusCode) {
@@ -369,11 +400,12 @@ class Tools {
369
400
  allowUnrecognizedUnionMembers: true,
370
401
  allowUnrecognizedEnumValues: true,
371
402
  breadcrumbsPrefix: ["response"],
372
- }));
403
+ }), _response.rawResponse);
373
404
  default:
374
405
  throw new errors.HumeError({
375
406
  statusCode: _response.error.statusCode,
376
407
  body: _response.error.body,
408
+ rawResponse: _response.rawResponse,
377
409
  });
378
410
  }
379
411
  }
@@ -382,12 +414,14 @@ class Tools {
382
414
  throw new errors.HumeError({
383
415
  statusCode: _response.error.statusCode,
384
416
  body: _response.error.rawBody,
417
+ rawResponse: _response.rawResponse,
385
418
  });
386
419
  case "timeout":
387
420
  throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/evi/tools/{id}.");
388
421
  case "unknown":
389
422
  throw new errors.HumeError({
390
423
  message: _response.error.errorMessage,
424
+ rawResponse: _response.rawResponse,
391
425
  });
392
426
  }
393
427
  });
@@ -406,12 +440,15 @@ class Tools {
406
440
  * await client.empathicVoice.tools.deleteTool("00183a3f-79ba-413d-9f3b-609864268bea")
407
441
  */
408
442
  deleteTool(id, requestOptions) {
443
+ return core.HttpResponsePromise.fromPromise(this.__deleteTool(id, requestOptions));
444
+ }
445
+ __deleteTool(id, requestOptions) {
409
446
  return __awaiter(this, void 0, void 0, function* () {
410
447
  var _a, _b, _c;
411
448
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
412
449
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
413
450
  method: "DELETE",
414
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
451
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.2", "User-Agent": "hume/0.11.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
415
452
  contentType: "application/json",
416
453
  requestType: "json",
417
454
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -419,7 +456,7 @@ class Tools {
419
456
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
420
457
  });
421
458
  if (_response.ok) {
422
- return;
459
+ return { data: undefined, rawResponse: _response.rawResponse };
423
460
  }
424
461
  if (_response.error.reason === "status-code") {
425
462
  switch (_response.error.statusCode) {
@@ -429,11 +466,12 @@ class Tools {
429
466
  allowUnrecognizedUnionMembers: true,
430
467
  allowUnrecognizedEnumValues: true,
431
468
  breadcrumbsPrefix: ["response"],
432
- }));
469
+ }), _response.rawResponse);
433
470
  default:
434
471
  throw new errors.HumeError({
435
472
  statusCode: _response.error.statusCode,
436
473
  body: _response.error.body,
474
+ rawResponse: _response.rawResponse,
437
475
  });
438
476
  }
439
477
  }
@@ -442,12 +480,14 @@ class Tools {
442
480
  throw new errors.HumeError({
443
481
  statusCode: _response.error.statusCode,
444
482
  body: _response.error.rawBody,
483
+ rawResponse: _response.rawResponse,
445
484
  });
446
485
  case "timeout":
447
486
  throw new errors.HumeTimeoutError("Timeout exceeded when calling DELETE /v0/evi/tools/{id}.");
448
487
  case "unknown":
449
488
  throw new errors.HumeError({
450
489
  message: _response.error.errorMessage,
490
+ rawResponse: _response.rawResponse,
451
491
  });
452
492
  }
453
493
  });
@@ -469,12 +509,15 @@ class Tools {
469
509
  * })
470
510
  */
471
511
  updateToolName(id, request, requestOptions) {
512
+ return core.HttpResponsePromise.fromPromise(this.__updateToolName(id, request, requestOptions));
513
+ }
514
+ __updateToolName(id, request, requestOptions) {
472
515
  return __awaiter(this, void 0, void 0, function* () {
473
516
  var _a, _b, _c;
474
517
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
475
518
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
476
519
  method: "PATCH",
477
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
520
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.2", "User-Agent": "hume/0.11.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
478
521
  contentType: "application/json",
479
522
  requestType: "json",
480
523
  body: serializers.empathicVoice.PostedUserDefinedToolName.jsonOrThrow(request, {
@@ -486,7 +529,7 @@ class Tools {
486
529
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
487
530
  });
488
531
  if (_response.ok) {
489
- return _response.body;
532
+ return { data: _response.body, rawResponse: _response.rawResponse };
490
533
  }
491
534
  if (_response.error.reason === "status-code") {
492
535
  switch (_response.error.statusCode) {
@@ -496,11 +539,12 @@ class Tools {
496
539
  allowUnrecognizedUnionMembers: true,
497
540
  allowUnrecognizedEnumValues: true,
498
541
  breadcrumbsPrefix: ["response"],
499
- }));
542
+ }), _response.rawResponse);
500
543
  default:
501
544
  throw new errors.HumeError({
502
545
  statusCode: _response.error.statusCode,
503
546
  body: _response.error.body,
547
+ rawResponse: _response.rawResponse,
504
548
  });
505
549
  }
506
550
  }
@@ -509,12 +553,14 @@ class Tools {
509
553
  throw new errors.HumeError({
510
554
  statusCode: _response.error.statusCode,
511
555
  body: _response.error.rawBody,
556
+ rawResponse: _response.rawResponse,
512
557
  });
513
558
  case "timeout":
514
559
  throw new errors.HumeTimeoutError("Timeout exceeded when calling PATCH /v0/evi/tools/{id}.");
515
560
  case "unknown":
516
561
  throw new errors.HumeError({
517
562
  message: _response.error.errorMessage,
563
+ rawResponse: _response.rawResponse,
518
564
  });
519
565
  }
520
566
  });
@@ -538,12 +584,15 @@ class Tools {
538
584
  * await client.empathicVoice.tools.getToolVersion("00183a3f-79ba-413d-9f3b-609864268bea", 1)
539
585
  */
540
586
  getToolVersion(id, version, requestOptions) {
587
+ return core.HttpResponsePromise.fromPromise(this.__getToolVersion(id, version, requestOptions));
588
+ }
589
+ __getToolVersion(id, version, requestOptions) {
541
590
  return __awaiter(this, void 0, void 0, function* () {
542
591
  var _a, _b, _c;
543
592
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
544
593
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
545
594
  method: "GET",
546
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
595
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.2", "User-Agent": "hume/0.11.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
547
596
  contentType: "application/json",
548
597
  requestType: "json",
549
598
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -551,12 +600,15 @@ class Tools {
551
600
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
552
601
  });
553
602
  if (_response.ok) {
554
- return serializers.empathicVoice.tools.getToolVersion.Response.parseOrThrow(_response.body, {
555
- unrecognizedObjectKeys: "passthrough",
556
- allowUnrecognizedUnionMembers: true,
557
- allowUnrecognizedEnumValues: true,
558
- breadcrumbsPrefix: ["response"],
559
- });
603
+ return {
604
+ data: serializers.empathicVoice.tools.getToolVersion.Response.parseOrThrow(_response.body, {
605
+ unrecognizedObjectKeys: "passthrough",
606
+ allowUnrecognizedUnionMembers: true,
607
+ allowUnrecognizedEnumValues: true,
608
+ breadcrumbsPrefix: ["response"],
609
+ }),
610
+ rawResponse: _response.rawResponse,
611
+ };
560
612
  }
561
613
  if (_response.error.reason === "status-code") {
562
614
  switch (_response.error.statusCode) {
@@ -566,11 +618,12 @@ class Tools {
566
618
  allowUnrecognizedUnionMembers: true,
567
619
  allowUnrecognizedEnumValues: true,
568
620
  breadcrumbsPrefix: ["response"],
569
- }));
621
+ }), _response.rawResponse);
570
622
  default:
571
623
  throw new errors.HumeError({
572
624
  statusCode: _response.error.statusCode,
573
625
  body: _response.error.body,
626
+ rawResponse: _response.rawResponse,
574
627
  });
575
628
  }
576
629
  }
@@ -579,12 +632,14 @@ class Tools {
579
632
  throw new errors.HumeError({
580
633
  statusCode: _response.error.statusCode,
581
634
  body: _response.error.rawBody,
635
+ rawResponse: _response.rawResponse,
582
636
  });
583
637
  case "timeout":
584
638
  throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/tools/{id}/version/{version}.");
585
639
  case "unknown":
586
640
  throw new errors.HumeError({
587
641
  message: _response.error.errorMessage,
642
+ rawResponse: _response.rawResponse,
588
643
  });
589
644
  }
590
645
  });
@@ -608,12 +663,15 @@ class Tools {
608
663
  * await client.empathicVoice.tools.deleteToolVersion("00183a3f-79ba-413d-9f3b-609864268bea", 1)
609
664
  */
610
665
  deleteToolVersion(id, version, requestOptions) {
666
+ return core.HttpResponsePromise.fromPromise(this.__deleteToolVersion(id, version, requestOptions));
667
+ }
668
+ __deleteToolVersion(id, version, requestOptions) {
611
669
  return __awaiter(this, void 0, void 0, function* () {
612
670
  var _a, _b, _c;
613
671
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
614
672
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
615
673
  method: "DELETE",
616
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
674
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.2", "User-Agent": "hume/0.11.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
617
675
  contentType: "application/json",
618
676
  requestType: "json",
619
677
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -621,7 +679,7 @@ class Tools {
621
679
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
622
680
  });
623
681
  if (_response.ok) {
624
- return;
682
+ return { data: undefined, rawResponse: _response.rawResponse };
625
683
  }
626
684
  if (_response.error.reason === "status-code") {
627
685
  switch (_response.error.statusCode) {
@@ -631,11 +689,12 @@ class Tools {
631
689
  allowUnrecognizedUnionMembers: true,
632
690
  allowUnrecognizedEnumValues: true,
633
691
  breadcrumbsPrefix: ["response"],
634
- }));
692
+ }), _response.rawResponse);
635
693
  default:
636
694
  throw new errors.HumeError({
637
695
  statusCode: _response.error.statusCode,
638
696
  body: _response.error.body,
697
+ rawResponse: _response.rawResponse,
639
698
  });
640
699
  }
641
700
  }
@@ -644,12 +703,14 @@ class Tools {
644
703
  throw new errors.HumeError({
645
704
  statusCode: _response.error.statusCode,
646
705
  body: _response.error.rawBody,
706
+ rawResponse: _response.rawResponse,
647
707
  });
648
708
  case "timeout":
649
709
  throw new errors.HumeTimeoutError("Timeout exceeded when calling DELETE /v0/evi/tools/{id}/version/{version}.");
650
710
  case "unknown":
651
711
  throw new errors.HumeError({
652
712
  message: _response.error.errorMessage,
713
+ rawResponse: _response.rawResponse,
653
714
  });
654
715
  }
655
716
  });
@@ -675,13 +736,16 @@ class Tools {
675
736
  * versionDescription: "Fetches current temperature, precipitation, wind speed, AQI, and other weather conditions. Uses Celsius, Fahrenheit, or kelvin depending on user's region."
676
737
  * })
677
738
  */
678
- updateToolDescription(id_1, version_1) {
739
+ updateToolDescription(id, version, request = {}, requestOptions) {
740
+ return core.HttpResponsePromise.fromPromise(this.__updateToolDescription(id, version, request, requestOptions));
741
+ }
742
+ __updateToolDescription(id_1, version_1) {
679
743
  return __awaiter(this, arguments, void 0, function* (id, version, request = {}, requestOptions) {
680
744
  var _a, _b, _c;
681
745
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
682
746
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
683
747
  method: "PATCH",
684
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.10.3", "User-Agent": "hume/0.10.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
748
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.2", "User-Agent": "hume/0.11.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
685
749
  contentType: "application/json",
686
750
  requestType: "json",
687
751
  body: serializers.empathicVoice.PostedUserDefinedToolVersionDescription.jsonOrThrow(request, {
@@ -692,12 +756,15 @@ class Tools {
692
756
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
693
757
  });
694
758
  if (_response.ok) {
695
- return serializers.empathicVoice.tools.updateToolDescription.Response.parseOrThrow(_response.body, {
696
- unrecognizedObjectKeys: "passthrough",
697
- allowUnrecognizedUnionMembers: true,
698
- allowUnrecognizedEnumValues: true,
699
- breadcrumbsPrefix: ["response"],
700
- });
759
+ return {
760
+ data: serializers.empathicVoice.tools.updateToolDescription.Response.parseOrThrow(_response.body, {
761
+ unrecognizedObjectKeys: "passthrough",
762
+ allowUnrecognizedUnionMembers: true,
763
+ allowUnrecognizedEnumValues: true,
764
+ breadcrumbsPrefix: ["response"],
765
+ }),
766
+ rawResponse: _response.rawResponse,
767
+ };
701
768
  }
702
769
  if (_response.error.reason === "status-code") {
703
770
  switch (_response.error.statusCode) {
@@ -707,11 +774,12 @@ class Tools {
707
774
  allowUnrecognizedUnionMembers: true,
708
775
  allowUnrecognizedEnumValues: true,
709
776
  breadcrumbsPrefix: ["response"],
710
- }));
777
+ }), _response.rawResponse);
711
778
  default:
712
779
  throw new errors.HumeError({
713
780
  statusCode: _response.error.statusCode,
714
781
  body: _response.error.body,
782
+ rawResponse: _response.rawResponse,
715
783
  });
716
784
  }
717
785
  }
@@ -720,12 +788,14 @@ class Tools {
720
788
  throw new errors.HumeError({
721
789
  statusCode: _response.error.statusCode,
722
790
  body: _response.error.rawBody,
791
+ rawResponse: _response.rawResponse,
723
792
  });
724
793
  case "timeout":
725
794
  throw new errors.HumeTimeoutError("Timeout exceeded when calling PATCH /v0/evi/tools/{id}/version/{version}.");
726
795
  case "unknown":
727
796
  throw new errors.HumeError({
728
797
  message: _response.error.errorMessage,
798
+ rawResponse: _response.rawResponse,
729
799
  });
730
800
  }
731
801
  });
@@ -10,7 +10,7 @@ export interface AssistantInput {
10
10
  /**
11
11
  * Assistant text to synthesize into spoken audio and insert into the conversation.
12
12
  *
13
- * EVI uses this text to generate spoken audio using our proprietary expressive text-to-speech model. Our model adds appropriate emotional inflections and tones to the text based on the user’s expressions and the context of the conversation. The synthesized audio is streamed back to the user as an [Assistant Message](/reference/empathic-voice-interface-evi/chat/chat#receive.Assistant%20Message.type).
13
+ * EVI uses this text to generate spoken audio using our proprietary expressive text-to-speech model. Our model adds appropriate emotional inflections and tones to the text based on the user’s expressions and the context of the conversation. The synthesized audio is streamed back to the user as an [Assistant Message](/reference/empathic-voice-interface-evi/chat/chat#receive.AssistantMessage.type).
14
14
  */
15
15
  text: string;
16
16
  /** The type of message sent through the socket; must be `assistant_input` for our server to correctly identify and process it as an Assistant Input message. */
@@ -8,7 +8,7 @@ import * as Hume from "../../../index";
8
8
  export interface AssistantMessage {
9
9
  /** Used to manage conversational state, correlate frontend and backend data, and persist conversations across EVI sessions. */
10
10
  customSessionId?: string;
11
- /** Indicates if this message was inserted into the conversation as text from an [Assistant Input message](/reference/empathic-voice-interface-evi/chat/chat#send.Assistant%20Input.text). */
11
+ /** Indicates if this message was inserted into the conversation as text from an [Assistant Input message](/reference/empathic-voice-interface-evi/chat/chat#send.AssistantInput.text). */
12
12
  fromText: boolean;
13
13
  /** ID of the assistant message. Allows the Assistant Message to be tracked and referenced. */
14
14
  id?: string;
@@ -10,7 +10,7 @@ export interface PauseAssistantMessage {
10
10
  /**
11
11
  * The type of message sent through the socket; must be `pause_assistant_message` for our server to correctly identify and process it as a Pause Assistant message.
12
12
  *
13
- * Once this message is sent, EVI will not respond until a [Resume Assistant message](/reference/empathic-voice-interface-evi/chat/chat#send.Resume%20Assistant%20Message.type) is sent. When paused, EVI won’t respond, but transcriptions of your audio inputs will still be recorded.
13
+ * Once this message is sent, EVI will not respond until a [Resume Assistant message](/reference/empathic-voice-interface-evi/chat/chat#send.ResumeAssistantMessage.type) is sent. When paused, EVI won’t respond, but transcriptions of your audio inputs will still be recorded.
14
14
  */
15
15
  type: "pause_assistant_message";
16
16
  }