@elevenlabs/elevenlabs-js 2.5.0 → 2.6.0

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 (580) hide show
  1. package/Client.js +4 -4
  2. package/api/resources/audioIsolation/client/Client.js +5 -9
  3. package/api/resources/audioNative/client/Client.js +7 -11
  4. package/api/resources/conversationalAi/client/Client.js +11 -15
  5. package/api/resources/conversationalAi/conversation/AudioInterface.d.ts +44 -0
  6. package/api/resources/conversationalAi/conversation/AudioInterface.js +12 -0
  7. package/api/resources/conversationalAi/conversation/ClientTools.d.ts +60 -0
  8. package/api/resources/conversationalAi/conversation/ClientTools.js +132 -0
  9. package/api/resources/conversationalAi/conversation/Conversation.d.ts +94 -0
  10. package/api/resources/conversationalAi/conversation/Conversation.js +280 -0
  11. package/api/resources/conversationalAi/conversation/ConversationConfig.d.ts +18 -0
  12. package/api/resources/conversationalAi/conversation/ConversationConfig.js +16 -0
  13. package/api/resources/conversationalAi/conversation/DefaultAudioInterface.d.ts +63 -0
  14. package/api/resources/conversationalAi/conversation/DefaultAudioInterface.js +126 -0
  15. package/api/resources/conversationalAi/conversation/__tests__/Conversation.test.d.ts +1 -0
  16. package/api/resources/conversationalAi/conversation/__tests__/Conversation.test.js +358 -0
  17. package/api/resources/conversationalAi/conversation/events.d.ts +84 -0
  18. package/api/resources/conversationalAi/conversation/events.js +19 -0
  19. package/api/resources/conversationalAi/conversation/index.d.ts +6 -0
  20. package/api/resources/conversationalAi/conversation/index.js +22 -0
  21. package/api/resources/conversationalAi/conversation/interfaces/ConversationClient.d.ts +11 -0
  22. package/api/resources/conversationalAi/conversation/interfaces/ConversationClient.js +2 -0
  23. package/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.d.ts +12 -0
  24. package/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.js +13 -0
  25. package/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.d.ts +15 -0
  26. package/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.js +28 -0
  27. package/api/resources/conversationalAi/conversation/mocks/MockConversation.d.ts +43 -0
  28. package/api/resources/conversationalAi/conversation/mocks/MockConversation.js +108 -0
  29. package/api/resources/conversationalAi/conversation/mocks/index.d.ts +2 -0
  30. package/api/resources/conversationalAi/conversation/mocks/index.js +18 -0
  31. package/api/resources/conversationalAi/resources/agents/client/Client.d.ts +4 -4
  32. package/api/resources/conversationalAi/resources/agents/client/Client.js +21 -25
  33. package/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationStreamV1ConvaiAgentsAgentIdSimulateConversationStreamPost.d.ts +2 -2
  34. package/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationV1ConvaiAgentsAgentIdSimulateConversationPost.d.ts +2 -2
  35. package/api/resources/conversationalAi/resources/agents/resources/knowledgeBase/client/Client.js +3 -7
  36. package/api/resources/conversationalAi/resources/agents/resources/link/client/Client.js +3 -7
  37. package/api/resources/conversationalAi/resources/agents/resources/llmUsage/client/Client.js +3 -7
  38. package/api/resources/conversationalAi/resources/agents/resources/widget/client/Client.js +3 -7
  39. package/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/Client.js +3 -7
  40. package/api/resources/conversationalAi/resources/batchCalls/client/Client.d.ts +1 -1
  41. package/api/resources/conversationalAi/resources/batchCalls/client/Client.js +12 -16
  42. package/api/resources/conversationalAi/resources/conversations/client/Client.js +9 -13
  43. package/api/resources/conversationalAi/resources/conversations/resources/audio/client/Client.js +3 -7
  44. package/api/resources/conversationalAi/resources/conversations/resources/feedback/client/Client.js +3 -7
  45. package/api/resources/conversationalAi/resources/dashboard/resources/settings/client/Client.js +5 -9
  46. package/api/resources/conversationalAi/resources/knowledgeBase/client/Client.js +3 -7
  47. package/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.js +3 -7
  48. package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.js +17 -21
  49. package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunk/client/Client.js +3 -7
  50. package/api/resources/conversationalAi/resources/llmUsage/client/Client.js +3 -7
  51. package/api/resources/conversationalAi/resources/mcpServers/client/Client.js +7 -11
  52. package/api/resources/conversationalAi/resources/mcpServers/resources/approvalPolicy/client/Client.js +3 -7
  53. package/api/resources/conversationalAi/resources/mcpServers/resources/toolApprovals/client/Client.js +5 -9
  54. package/api/resources/conversationalAi/resources/mcpServers/resources/tools/client/Client.js +3 -7
  55. package/api/resources/conversationalAi/resources/phoneNumbers/client/Client.d.ts +12 -12
  56. package/api/resources/conversationalAi/resources/phoneNumbers/client/Client.js +79 -83
  57. package/api/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
  58. package/api/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
  59. package/api/resources/conversationalAi/resources/secrets/client/Client.js +7 -11
  60. package/api/resources/conversationalAi/resources/settings/client/Client.js +5 -9
  61. package/api/resources/conversationalAi/resources/sipTrunk/client/Client.js +3 -7
  62. package/api/resources/conversationalAi/resources/tools/client/Client.js +13 -17
  63. package/api/resources/conversationalAi/resources/twilio/client/Client.js +3 -7
  64. package/api/resources/dubbing/client/Client.js +7 -11
  65. package/api/resources/dubbing/resources/audio/client/Client.js +3 -7
  66. package/api/resources/dubbing/resources/resource/client/Client.js +11 -15
  67. package/api/resources/dubbing/resources/resource/resources/language/client/Client.js +3 -7
  68. package/api/resources/dubbing/resources/resource/resources/segment/client/Client.js +5 -9
  69. package/api/resources/dubbing/resources/resource/resources/speaker/client/Client.js +5 -9
  70. package/api/resources/dubbing/resources/resource/resources/speaker/resources/segment/client/Client.js +3 -7
  71. package/api/resources/dubbing/resources/transcript/client/Client.js +3 -7
  72. package/api/resources/forcedAlignment/client/Client.js +3 -7
  73. package/api/resources/history/client/Client.js +11 -15
  74. package/api/resources/models/client/Client.js +3 -7
  75. package/api/resources/pronunciationDictionaries/client/Client.js +11 -15
  76. package/api/resources/pronunciationDictionaries/resources/rules/client/Client.js +5 -9
  77. package/api/resources/samples/client/Client.js +3 -7
  78. package/api/resources/speechToSpeech/client/Client.js +5 -9
  79. package/api/resources/speechToText/client/Client.js +6 -7
  80. package/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +2 -0
  81. package/api/resources/studio/client/Client.js +3 -7
  82. package/api/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +6 -0
  83. package/api/resources/studio/resources/projects/client/Client.js +13 -17
  84. package/api/resources/studio/resources/projects/resources/chapters/client/Client.js +13 -17
  85. package/api/resources/studio/resources/projects/resources/chapters/resources/snapshots/client/Client.js +7 -11
  86. package/api/resources/studio/resources/projects/resources/content/client/Client.js +3 -7
  87. package/api/resources/studio/resources/projects/resources/pronunciationDictionaries/client/Client.js +3 -7
  88. package/api/resources/studio/resources/projects/resources/snapshots/client/Client.js +9 -13
  89. package/api/resources/textToDialogue/client/Client.js +5 -9
  90. package/api/resources/textToSoundEffects/client/Client.js +3 -7
  91. package/api/resources/textToSpeech/client/Client.js +9 -13
  92. package/api/resources/textToVoice/client/Client.d.ts +3 -0
  93. package/api/resources/textToVoice/client/Client.js +14 -13
  94. package/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +2 -0
  95. package/api/resources/textToVoice/index.d.ts +1 -0
  96. package/api/resources/textToVoice/index.js +1 -0
  97. package/api/resources/textToVoice/resources/index.d.ts +1 -0
  98. package/api/resources/textToVoice/resources/index.js +37 -0
  99. package/api/resources/textToVoice/resources/preview/client/Client.d.ts +38 -0
  100. package/api/resources/textToVoice/resources/preview/client/Client.js +116 -0
  101. package/api/resources/textToVoice/resources/preview/client/index.d.ts +1 -0
  102. package/api/resources/textToVoice/resources/preview/client/index.js +2 -0
  103. package/api/resources/textToVoice/resources/preview/index.d.ts +1 -0
  104. package/api/resources/textToVoice/resources/preview/index.js +17 -0
  105. package/api/resources/usage/client/Client.js +3 -7
  106. package/api/resources/user/client/Client.js +3 -7
  107. package/api/resources/user/resources/subscription/client/Client.js +3 -7
  108. package/api/resources/voices/client/Client.js +17 -21
  109. package/api/resources/voices/resources/ivc/client/Client.js +3 -7
  110. package/api/resources/voices/resources/pvc/client/Client.js +7 -11
  111. package/api/resources/voices/resources/pvc/resources/samples/client/Client.js +7 -11
  112. package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.js +3 -7
  113. package/api/resources/voices/resources/pvc/resources/samples/resources/speakers/client/Client.js +5 -9
  114. package/api/resources/voices/resources/pvc/resources/samples/resources/speakers/resources/audio/client/Client.js +3 -7
  115. package/api/resources/voices/resources/pvc/resources/samples/resources/waveform/client/Client.js +3 -7
  116. package/api/resources/voices/resources/pvc/resources/verification/client/Client.js +3 -7
  117. package/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/Client.js +5 -9
  118. package/api/resources/voices/resources/samples/resources/audio/client/Client.js +3 -7
  119. package/api/resources/voices/resources/settings/client/Client.js +7 -11
  120. package/api/resources/webhooks/client/Client.js +3 -7
  121. package/api/resources/workspace/resources/groups/client/Client.js +3 -7
  122. package/api/resources/workspace/resources/groups/resources/members/client/Client.js +5 -9
  123. package/api/resources/workspace/resources/invites/client/Client.js +7 -11
  124. package/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +3 -1
  125. package/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
  126. package/api/resources/workspace/resources/members/client/Client.js +5 -9
  127. package/api/resources/workspace/resources/resources/client/Client.js +7 -11
  128. package/api/types/AgentConfig.d.ts +1 -10
  129. package/api/types/AgentTransfer.d.ts +3 -0
  130. package/api/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +6 -0
  131. package/api/types/BreakdownTypes.d.ts +2 -1
  132. package/api/types/BreakdownTypes.js +1 -0
  133. package/api/types/ClientToolConfigInput.d.ts +1 -1
  134. package/api/types/ClientToolConfigOutput.d.ts +1 -1
  135. package/api/types/ConvAiWebhooks.d.ts +2 -0
  136. package/api/types/ConversationHistoryElevenAssistantCommonModel.d.ts +6 -0
  137. package/api/types/ConversationHistoryMetadataCommonModel.d.ts +3 -0
  138. package/api/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +4 -1
  139. package/api/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +13 -0
  140. package/api/types/ConversationInitiationClientDataInternal.d.ts +2 -0
  141. package/api/types/ConversationInitiationClientDataRequestInput.d.ts +2 -0
  142. package/api/types/ConversationInitiationClientDataRequestOutput.d.ts +2 -0
  143. package/api/types/ConversationInitiationSource.d.ts +20 -0
  144. package/api/types/ConversationInitiationSource.js +19 -0
  145. package/api/types/ConversationSimulationSpecification.d.ts +1 -1
  146. package/api/types/ConversationalConfig.d.ts +1 -1
  147. package/api/types/CreateSipTrunkPhoneNumberRequest.d.ts +2 -21
  148. package/api/types/GetConversationResponseModel.d.ts +1 -0
  149. package/api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +15 -0
  150. package/api/types/{SipTrunkConfigResponseModel.d.ts → GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +1 -1
  151. package/api/types/GetPhoneNumberSipTrunkResponseModel.d.ts +5 -1
  152. package/api/types/InboundSipTrunkConfigRequestModel.d.ts +14 -0
  153. package/api/types/OutboundSipTrunkConfigRequestModel.d.ts +16 -0
  154. package/api/types/PhoneNumberTransfer.d.ts +4 -1
  155. package/api/types/PhoneNumberTransferDestination.d.ts +6 -0
  156. package/api/types/PhoneNumberTransferDestination.js +5 -0
  157. package/api/types/PhoneNumberTransferTransferDestination.d.ts +13 -0
  158. package/api/types/PhoneNumberTransferTransferDestination.js +5 -0
  159. package/api/types/PromptAgentApiModelInput.d.ts +1 -1
  160. package/api/types/PromptAgentApiModelOutput.d.ts +1 -1
  161. package/api/types/PromptAgentDbModel.d.ts +0 -26
  162. package/{dist/api/types/SipTrunkCredentials.d.ts → api/types/SipTrunkCredentialsRequestModel.d.ts} +1 -1
  163. package/api/types/SipTrunkCredentialsRequestModel.js +5 -0
  164. package/api/types/SipUriTransferDestination.d.ts +6 -0
  165. package/api/types/SipUriTransferDestination.js +5 -0
  166. package/api/types/SubscriptionStatusType.d.ts +1 -3
  167. package/api/types/SubscriptionStatusType.js +0 -2
  168. package/api/types/SystemToolConfigInputParams.d.ts +1 -1
  169. package/api/types/SystemToolConfigOutputParams.d.ts +1 -1
  170. package/api/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +1 -1
  171. package/api/types/TransferToNumberToolConfigInput.js +5 -0
  172. package/api/types/TransferToNumberToolConfigOutput.d.ts +9 -0
  173. package/api/types/TransferToNumberToolConfigOutput.js +5 -0
  174. package/api/types/TransferTypeEnum.d.ts +8 -0
  175. package/api/types/TransferTypeEnum.js +10 -0
  176. package/api/types/WidgetTextContents.d.ts +8 -0
  177. package/api/types/WorkspaceResourceType.d.ts +2 -1
  178. package/api/types/WorkspaceResourceType.js +1 -0
  179. package/api/types/index.d.ts +15 -4
  180. package/api/types/index.js +15 -4
  181. package/core/fetcher/BinaryResponse.d.ts +7 -4
  182. package/core/fetcher/BinaryResponse.js +5 -2
  183. package/core/fetcher/Fetcher.js +3 -3
  184. package/core/fetcher/createRequestUrl.d.ts +1 -1
  185. package/core/fetcher/createRequestUrl.js +3 -7
  186. package/core/fetcher/getErrorResponseBody.d.ts +1 -0
  187. package/core/fetcher/getErrorResponseBody.js +44 -0
  188. package/core/fetcher/getResponseBody.js +2 -1
  189. package/core/form-data-utils/FormDataWrapper.js +4 -4
  190. package/core/form-data-utils/encodeAsFormParameter.d.ts +0 -3
  191. package/core/form-data-utils/encodeAsFormParameter.js +2 -8
  192. package/core/headers.d.ts +1 -1
  193. package/core/index.d.ts +1 -0
  194. package/core/index.js +2 -1
  195. package/core/url/index.d.ts +2 -0
  196. package/core/url/index.js +7 -0
  197. package/core/url/join.d.ts +1 -0
  198. package/core/url/join.js +49 -0
  199. package/core/url/qs.d.ts +6 -0
  200. package/core/url/qs.js +64 -0
  201. package/dist/Client.js +4 -4
  202. package/dist/api/resources/audioIsolation/client/Client.js +5 -9
  203. package/dist/api/resources/audioNative/client/Client.js +7 -11
  204. package/dist/api/resources/conversationalAi/client/Client.js +11 -15
  205. package/dist/api/resources/conversationalAi/conversation/AudioInterface.d.ts +44 -0
  206. package/dist/api/resources/conversationalAi/conversation/AudioInterface.js +12 -0
  207. package/dist/api/resources/conversationalAi/conversation/ClientTools.d.ts +60 -0
  208. package/dist/api/resources/conversationalAi/conversation/ClientTools.js +132 -0
  209. package/dist/api/resources/conversationalAi/conversation/Conversation.d.ts +94 -0
  210. package/dist/api/resources/conversationalAi/conversation/Conversation.js +280 -0
  211. package/dist/api/resources/conversationalAi/conversation/ConversationConfig.d.ts +18 -0
  212. package/dist/api/resources/conversationalAi/conversation/ConversationConfig.js +16 -0
  213. package/dist/api/resources/conversationalAi/conversation/DefaultAudioInterface.d.ts +63 -0
  214. package/dist/api/resources/conversationalAi/conversation/DefaultAudioInterface.js +126 -0
  215. package/dist/api/resources/conversationalAi/conversation/__tests__/Conversation.test.d.ts +1 -0
  216. package/dist/api/resources/conversationalAi/conversation/__tests__/Conversation.test.js +358 -0
  217. package/dist/api/resources/conversationalAi/conversation/events.d.ts +84 -0
  218. package/dist/api/resources/conversationalAi/conversation/events.js +19 -0
  219. package/dist/api/resources/conversationalAi/conversation/index.d.ts +6 -0
  220. package/dist/api/resources/conversationalAi/conversation/index.js +22 -0
  221. package/dist/api/resources/conversationalAi/conversation/interfaces/ConversationClient.d.ts +11 -0
  222. package/dist/api/resources/conversationalAi/conversation/interfaces/ConversationClient.js +2 -0
  223. package/dist/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.d.ts +12 -0
  224. package/dist/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.js +13 -0
  225. package/dist/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.d.ts +15 -0
  226. package/dist/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.js +28 -0
  227. package/dist/api/resources/conversationalAi/conversation/mocks/MockConversation.d.ts +43 -0
  228. package/dist/api/resources/conversationalAi/conversation/mocks/MockConversation.js +108 -0
  229. package/dist/api/resources/conversationalAi/conversation/mocks/index.d.ts +2 -0
  230. package/dist/api/resources/conversationalAi/conversation/mocks/index.js +18 -0
  231. package/dist/api/resources/conversationalAi/resources/agents/client/Client.d.ts +4 -4
  232. package/dist/api/resources/conversationalAi/resources/agents/client/Client.js +21 -25
  233. package/dist/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationStreamV1ConvaiAgentsAgentIdSimulateConversationStreamPost.d.ts +2 -2
  234. package/dist/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationV1ConvaiAgentsAgentIdSimulateConversationPost.d.ts +2 -2
  235. package/dist/api/resources/conversationalAi/resources/agents/resources/knowledgeBase/client/Client.js +3 -7
  236. package/dist/api/resources/conversationalAi/resources/agents/resources/link/client/Client.js +3 -7
  237. package/dist/api/resources/conversationalAi/resources/agents/resources/llmUsage/client/Client.js +3 -7
  238. package/dist/api/resources/conversationalAi/resources/agents/resources/widget/client/Client.js +3 -7
  239. package/dist/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/Client.js +3 -7
  240. package/dist/api/resources/conversationalAi/resources/batchCalls/client/Client.d.ts +1 -1
  241. package/dist/api/resources/conversationalAi/resources/batchCalls/client/Client.js +12 -16
  242. package/dist/api/resources/conversationalAi/resources/conversations/client/Client.js +9 -13
  243. package/dist/api/resources/conversationalAi/resources/conversations/resources/audio/client/Client.js +3 -7
  244. package/dist/api/resources/conversationalAi/resources/conversations/resources/feedback/client/Client.js +3 -7
  245. package/dist/api/resources/conversationalAi/resources/dashboard/resources/settings/client/Client.js +5 -9
  246. package/dist/api/resources/conversationalAi/resources/knowledgeBase/client/Client.js +3 -7
  247. package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.js +3 -7
  248. package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.js +17 -21
  249. package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunk/client/Client.js +3 -7
  250. package/dist/api/resources/conversationalAi/resources/llmUsage/client/Client.js +3 -7
  251. package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.js +7 -11
  252. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/approvalPolicy/client/Client.js +3 -7
  253. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolApprovals/client/Client.js +5 -9
  254. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/tools/client/Client.js +3 -7
  255. package/dist/api/resources/conversationalAi/resources/phoneNumbers/client/Client.d.ts +12 -12
  256. package/dist/api/resources/conversationalAi/resources/phoneNumbers/client/Client.js +79 -83
  257. package/dist/api/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
  258. package/dist/api/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
  259. package/dist/api/resources/conversationalAi/resources/secrets/client/Client.js +7 -11
  260. package/dist/api/resources/conversationalAi/resources/settings/client/Client.js +5 -9
  261. package/dist/api/resources/conversationalAi/resources/sipTrunk/client/Client.js +3 -7
  262. package/dist/api/resources/conversationalAi/resources/tools/client/Client.js +13 -17
  263. package/dist/api/resources/conversationalAi/resources/twilio/client/Client.js +3 -7
  264. package/dist/api/resources/dubbing/client/Client.js +7 -11
  265. package/dist/api/resources/dubbing/resources/audio/client/Client.js +3 -7
  266. package/dist/api/resources/dubbing/resources/resource/client/Client.js +11 -15
  267. package/dist/api/resources/dubbing/resources/resource/resources/language/client/Client.js +3 -7
  268. package/dist/api/resources/dubbing/resources/resource/resources/segment/client/Client.js +5 -9
  269. package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/Client.js +5 -9
  270. package/dist/api/resources/dubbing/resources/resource/resources/speaker/resources/segment/client/Client.js +3 -7
  271. package/dist/api/resources/dubbing/resources/transcript/client/Client.js +3 -7
  272. package/dist/api/resources/forcedAlignment/client/Client.js +3 -7
  273. package/dist/api/resources/history/client/Client.js +11 -15
  274. package/dist/api/resources/models/client/Client.js +3 -7
  275. package/dist/api/resources/pronunciationDictionaries/client/Client.js +11 -15
  276. package/dist/api/resources/pronunciationDictionaries/resources/rules/client/Client.js +5 -9
  277. package/dist/api/resources/samples/client/Client.js +3 -7
  278. package/dist/api/resources/speechToSpeech/client/Client.js +5 -9
  279. package/dist/api/resources/speechToText/client/Client.js +6 -7
  280. package/dist/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +2 -0
  281. package/dist/api/resources/studio/client/Client.js +3 -7
  282. package/dist/api/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +6 -0
  283. package/dist/api/resources/studio/resources/projects/client/Client.js +13 -17
  284. package/dist/api/resources/studio/resources/projects/resources/chapters/client/Client.js +13 -17
  285. package/dist/api/resources/studio/resources/projects/resources/chapters/resources/snapshots/client/Client.js +7 -11
  286. package/dist/api/resources/studio/resources/projects/resources/content/client/Client.js +3 -7
  287. package/dist/api/resources/studio/resources/projects/resources/pronunciationDictionaries/client/Client.js +3 -7
  288. package/dist/api/resources/studio/resources/projects/resources/snapshots/client/Client.js +9 -13
  289. package/dist/api/resources/textToDialogue/client/Client.js +5 -9
  290. package/dist/api/resources/textToSoundEffects/client/Client.js +3 -7
  291. package/dist/api/resources/textToSpeech/client/Client.js +9 -13
  292. package/dist/api/resources/textToVoice/client/Client.d.ts +3 -0
  293. package/dist/api/resources/textToVoice/client/Client.js +14 -13
  294. package/dist/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +2 -0
  295. package/dist/api/resources/textToVoice/index.d.ts +1 -0
  296. package/dist/api/resources/textToVoice/index.js +1 -0
  297. package/dist/api/resources/textToVoice/resources/index.d.ts +1 -0
  298. package/dist/api/resources/textToVoice/resources/index.js +37 -0
  299. package/dist/api/resources/textToVoice/resources/preview/client/Client.d.ts +38 -0
  300. package/dist/api/resources/textToVoice/resources/preview/client/Client.js +116 -0
  301. package/dist/api/resources/textToVoice/resources/preview/client/index.d.ts +1 -0
  302. package/dist/api/resources/textToVoice/resources/preview/client/index.js +2 -0
  303. package/dist/api/resources/textToVoice/resources/preview/index.d.ts +1 -0
  304. package/dist/api/resources/textToVoice/resources/preview/index.js +17 -0
  305. package/dist/api/resources/usage/client/Client.js +3 -7
  306. package/dist/api/resources/user/client/Client.js +3 -7
  307. package/dist/api/resources/user/resources/subscription/client/Client.js +3 -7
  308. package/dist/api/resources/voices/client/Client.js +17 -21
  309. package/dist/api/resources/voices/resources/ivc/client/Client.js +3 -7
  310. package/dist/api/resources/voices/resources/pvc/client/Client.js +7 -11
  311. package/dist/api/resources/voices/resources/pvc/resources/samples/client/Client.js +7 -11
  312. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.js +3 -7
  313. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/speakers/client/Client.js +5 -9
  314. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/speakers/resources/audio/client/Client.js +3 -7
  315. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/waveform/client/Client.js +3 -7
  316. package/dist/api/resources/voices/resources/pvc/resources/verification/client/Client.js +3 -7
  317. package/dist/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/Client.js +5 -9
  318. package/dist/api/resources/voices/resources/samples/resources/audio/client/Client.js +3 -7
  319. package/dist/api/resources/voices/resources/settings/client/Client.js +7 -11
  320. package/dist/api/resources/webhooks/client/Client.js +3 -7
  321. package/dist/api/resources/workspace/resources/groups/client/Client.js +3 -7
  322. package/dist/api/resources/workspace/resources/groups/resources/members/client/Client.js +5 -9
  323. package/dist/api/resources/workspace/resources/invites/client/Client.js +7 -11
  324. package/dist/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +3 -1
  325. package/dist/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
  326. package/dist/api/resources/workspace/resources/members/client/Client.js +5 -9
  327. package/dist/api/resources/workspace/resources/resources/client/Client.js +7 -11
  328. package/dist/api/types/AgentConfig.d.ts +1 -10
  329. package/dist/api/types/AgentTransfer.d.ts +3 -0
  330. package/dist/api/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +6 -0
  331. package/dist/api/types/BreakdownTypes.d.ts +2 -1
  332. package/dist/api/types/BreakdownTypes.js +1 -0
  333. package/dist/api/types/ClientToolConfigInput.d.ts +1 -1
  334. package/dist/api/types/ClientToolConfigOutput.d.ts +1 -1
  335. package/dist/api/types/ConvAiWebhooks.d.ts +2 -0
  336. package/dist/api/types/ConversationHistoryElevenAssistantCommonModel.d.ts +6 -0
  337. package/dist/api/types/ConversationHistoryElevenAssistantCommonModel.js +5 -0
  338. package/dist/api/types/ConversationHistoryMetadataCommonModel.d.ts +3 -0
  339. package/dist/api/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +4 -1
  340. package/dist/api/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +13 -0
  341. package/dist/api/types/ConversationHistoryTranscriptToolCallMcpDetails.js +5 -0
  342. package/dist/api/types/ConversationInitiationClientDataInternal.d.ts +2 -0
  343. package/dist/api/types/ConversationInitiationClientDataRequestInput.d.ts +2 -0
  344. package/dist/api/types/ConversationInitiationClientDataRequestOutput.d.ts +2 -0
  345. package/dist/api/types/ConversationInitiationSource.d.ts +20 -0
  346. package/dist/api/types/ConversationInitiationSource.js +19 -0
  347. package/dist/api/types/ConversationSimulationSpecification.d.ts +1 -1
  348. package/dist/api/types/ConversationalConfig.d.ts +1 -1
  349. package/dist/api/types/CreateSipTrunkPhoneNumberRequest.d.ts +2 -21
  350. package/dist/api/types/GetConversationResponseModel.d.ts +1 -0
  351. package/dist/api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +15 -0
  352. package/dist/api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js +5 -0
  353. package/dist/api/types/{SipTrunkConfigResponseModel.d.ts → GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +1 -1
  354. package/dist/api/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.js +5 -0
  355. package/dist/api/types/GetPhoneNumberSipTrunkResponseModel.d.ts +5 -1
  356. package/dist/api/types/InboundSipTrunkConfigRequestModel.d.ts +14 -0
  357. package/dist/api/types/InboundSipTrunkConfigRequestModel.js +5 -0
  358. package/dist/api/types/OutboundSipTrunkConfigRequestModel.d.ts +16 -0
  359. package/dist/api/types/OutboundSipTrunkConfigRequestModel.js +5 -0
  360. package/dist/api/types/PhoneNumberTransfer.d.ts +4 -1
  361. package/dist/api/types/PhoneNumberTransferDestination.d.ts +6 -0
  362. package/dist/api/types/PhoneNumberTransferDestination.js +5 -0
  363. package/dist/api/types/PhoneNumberTransferTransferDestination.d.ts +13 -0
  364. package/dist/api/types/PhoneNumberTransferTransferDestination.js +5 -0
  365. package/dist/api/types/PromptAgentApiModelInput.d.ts +1 -1
  366. package/dist/api/types/PromptAgentApiModelOutput.d.ts +1 -1
  367. package/dist/api/types/PromptAgentDbModel.d.ts +0 -26
  368. package/{api/types/SipTrunkCredentials.d.ts → dist/api/types/SipTrunkCredentialsRequestModel.d.ts} +1 -1
  369. package/dist/api/types/SipTrunkCredentialsRequestModel.js +5 -0
  370. package/dist/api/types/SipUriTransferDestination.d.ts +6 -0
  371. package/dist/api/types/SipUriTransferDestination.js +5 -0
  372. package/dist/api/types/SubscriptionStatusType.d.ts +1 -3
  373. package/dist/api/types/SubscriptionStatusType.js +0 -2
  374. package/dist/api/types/SystemToolConfigInputParams.d.ts +1 -1
  375. package/dist/api/types/SystemToolConfigOutputParams.d.ts +1 -1
  376. package/dist/api/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +1 -1
  377. package/dist/api/types/TransferToNumberToolConfigInput.js +5 -0
  378. package/dist/api/types/TransferToNumberToolConfigOutput.d.ts +9 -0
  379. package/dist/api/types/TransferToNumberToolConfigOutput.js +5 -0
  380. package/dist/api/types/TransferTypeEnum.d.ts +8 -0
  381. package/dist/api/types/TransferTypeEnum.js +10 -0
  382. package/dist/api/types/WidgetTextContents.d.ts +8 -0
  383. package/dist/api/types/WorkspaceResourceType.d.ts +2 -1
  384. package/dist/api/types/WorkspaceResourceType.js +1 -0
  385. package/dist/api/types/index.d.ts +15 -4
  386. package/dist/api/types/index.js +15 -4
  387. package/dist/core/fetcher/BinaryResponse.d.ts +7 -4
  388. package/dist/core/fetcher/BinaryResponse.js +5 -2
  389. package/dist/core/fetcher/Fetcher.js +3 -3
  390. package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
  391. package/dist/core/fetcher/createRequestUrl.js +3 -7
  392. package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
  393. package/dist/core/fetcher/getErrorResponseBody.js +44 -0
  394. package/dist/core/fetcher/getResponseBody.js +2 -1
  395. package/dist/core/form-data-utils/FormDataWrapper.js +4 -4
  396. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +0 -3
  397. package/dist/core/form-data-utils/encodeAsFormParameter.js +2 -8
  398. package/dist/core/headers.d.ts +1 -1
  399. package/dist/core/index.d.ts +1 -0
  400. package/dist/core/index.js +2 -1
  401. package/dist/core/url/index.d.ts +2 -0
  402. package/dist/core/url/index.js +7 -0
  403. package/dist/core/url/join.d.ts +1 -0
  404. package/dist/core/url/join.js +49 -0
  405. package/dist/core/url/qs.d.ts +6 -0
  406. package/dist/core/url/qs.js +64 -0
  407. package/dist/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
  408. package/dist/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
  409. package/dist/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +3 -0
  410. package/dist/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.js +3 -0
  411. package/dist/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +1 -0
  412. package/dist/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.js +1 -0
  413. package/dist/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +1 -1
  414. package/dist/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
  415. package/dist/serialization/types/AgentConfig.d.ts +2 -9
  416. package/dist/serialization/types/AgentConfig.js +1 -8
  417. package/dist/serialization/types/AgentTransfer.d.ts +3 -0
  418. package/dist/serialization/types/AgentTransfer.js +3 -0
  419. package/dist/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +3 -0
  420. package/dist/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.js +3 -0
  421. package/dist/serialization/types/BreakdownTypes.d.ts +1 -1
  422. package/dist/serialization/types/BreakdownTypes.js +1 -0
  423. package/dist/serialization/types/ConvAiWebhooks.d.ts +1 -0
  424. package/dist/serialization/types/ConvAiWebhooks.js +1 -0
  425. package/dist/serialization/types/ConversationHistoryElevenAssistantCommonModel.d.ts +12 -0
  426. package/dist/serialization/types/ConversationHistoryElevenAssistantCommonModel.js +43 -0
  427. package/dist/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +5 -0
  428. package/dist/serialization/types/ConversationHistoryMetadataCommonModel.js +5 -0
  429. package/dist/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +5 -1
  430. package/dist/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.js +2 -0
  431. package/dist/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +19 -0
  432. package/dist/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.js +50 -0
  433. package/dist/serialization/types/ConversationInitiationClientDataInternal.d.ts +1 -0
  434. package/dist/serialization/types/ConversationInitiationClientDataInternal.js +1 -0
  435. package/dist/serialization/types/ConversationInitiationClientDataRequestInput.d.ts +1 -0
  436. package/dist/serialization/types/ConversationInitiationClientDataRequestInput.js +1 -0
  437. package/dist/serialization/types/ConversationInitiationClientDataRequestOutput.d.ts +1 -0
  438. package/dist/serialization/types/ConversationInitiationClientDataRequestOutput.js +1 -0
  439. package/dist/serialization/types/ConversationInitiationSource.d.ts +10 -0
  440. package/dist/serialization/types/ConversationInitiationSource.js +53 -0
  441. package/dist/serialization/types/ConversationSimulationSpecification.d.ts +1 -1
  442. package/dist/serialization/types/ConversationalConfig.d.ts +1 -1
  443. package/dist/serialization/types/CreateSipTrunkPhoneNumberRequest.d.ts +4 -10
  444. package/dist/serialization/types/CreateSipTrunkPhoneNumberRequest.js +4 -10
  445. package/dist/serialization/types/GetConversationResponseModel.d.ts +1 -0
  446. package/dist/serialization/types/GetConversationResponseModel.js +1 -0
  447. package/dist/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +17 -0
  448. package/dist/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js +48 -0
  449. package/{serialization/types/SipTrunkConfigResponseModel.d.ts → dist/serialization/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +2 -2
  450. package/dist/serialization/types/{SipTrunkConfigResponseModel.js → GetPhoneNumberOutboundSipTrunkConfigResponseModel.js} +2 -2
  451. package/dist/serialization/types/GetPhoneNumberSipTrunkResponseModel.d.ts +5 -2
  452. package/dist/serialization/types/GetPhoneNumberSipTrunkResponseModel.js +5 -2
  453. package/dist/serialization/types/InboundSipTrunkConfigRequestModel.d.ts +17 -0
  454. package/dist/serialization/types/InboundSipTrunkConfigRequestModel.js +48 -0
  455. package/dist/serialization/types/OutboundSipTrunkConfigRequestModel.d.ts +19 -0
  456. package/dist/serialization/types/OutboundSipTrunkConfigRequestModel.js +50 -0
  457. package/dist/serialization/types/PhoneNumberTransfer.d.ts +5 -1
  458. package/dist/serialization/types/PhoneNumberTransfer.js +5 -1
  459. package/dist/serialization/types/PhoneNumberTransferDestination.d.ts +12 -0
  460. package/dist/serialization/types/PhoneNumberTransferDestination.js +43 -0
  461. package/dist/serialization/types/PhoneNumberTransferTransferDestination.d.ts +18 -0
  462. package/dist/serialization/types/PhoneNumberTransferTransferDestination.js +51 -0
  463. package/dist/serialization/types/PromptAgentDbModel.d.ts +0 -18
  464. package/dist/serialization/types/PromptAgentDbModel.js +0 -18
  465. package/{serialization/types/SipTrunkCredentials.d.ts → dist/serialization/types/SipTrunkCredentialsRequestModel.d.ts} +2 -2
  466. package/{serialization/types/SipTrunkCredentials.js → dist/serialization/types/SipTrunkCredentialsRequestModel.js} +2 -2
  467. package/dist/serialization/types/SipUriTransferDestination.d.ts +12 -0
  468. package/dist/serialization/types/SipUriTransferDestination.js +43 -0
  469. package/dist/serialization/types/SubscriptionStatusType.d.ts +1 -1
  470. package/dist/serialization/types/SubscriptionStatusType.js +1 -10
  471. package/dist/serialization/types/SystemToolConfigInputParams.d.ts +2 -2
  472. package/dist/serialization/types/SystemToolConfigInputParams.js +2 -2
  473. package/dist/serialization/types/SystemToolConfigOutputParams.d.ts +2 -2
  474. package/dist/serialization/types/SystemToolConfigOutputParams.js +2 -2
  475. package/dist/serialization/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +2 -2
  476. package/dist/serialization/types/{TransferToNumberToolConfig.js → TransferToNumberToolConfigInput.js} +2 -2
  477. package/dist/serialization/types/TransferToNumberToolConfigOutput.d.ts +14 -0
  478. package/dist/serialization/types/TransferToNumberToolConfigOutput.js +45 -0
  479. package/dist/serialization/types/TransferTypeEnum.d.ts +10 -0
  480. package/dist/serialization/types/TransferTypeEnum.js +41 -0
  481. package/dist/serialization/types/WidgetTextContents.d.ts +4 -0
  482. package/dist/serialization/types/WidgetTextContents.js +4 -0
  483. package/dist/serialization/types/WorkspaceResourceType.d.ts +1 -1
  484. package/dist/serialization/types/WorkspaceResourceType.js +1 -0
  485. package/dist/serialization/types/index.d.ts +15 -4
  486. package/dist/serialization/types/index.js +15 -4
  487. package/dist/version.d.ts +1 -1
  488. package/dist/version.js +1 -1
  489. package/jest.config.mjs +36 -6
  490. package/package.json +21 -20
  491. package/reference.md +43 -41
  492. package/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
  493. package/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
  494. package/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +3 -0
  495. package/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.js +3 -0
  496. package/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +1 -0
  497. package/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.js +1 -0
  498. package/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +1 -1
  499. package/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
  500. package/serialization/types/AgentConfig.d.ts +2 -9
  501. package/serialization/types/AgentConfig.js +1 -8
  502. package/serialization/types/AgentTransfer.d.ts +3 -0
  503. package/serialization/types/AgentTransfer.js +3 -0
  504. package/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +3 -0
  505. package/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.js +3 -0
  506. package/serialization/types/BreakdownTypes.d.ts +1 -1
  507. package/serialization/types/BreakdownTypes.js +1 -0
  508. package/serialization/types/ConvAiWebhooks.d.ts +1 -0
  509. package/serialization/types/ConvAiWebhooks.js +1 -0
  510. package/serialization/types/ConversationHistoryElevenAssistantCommonModel.d.ts +12 -0
  511. package/serialization/types/ConversationHistoryElevenAssistantCommonModel.js +43 -0
  512. package/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +5 -0
  513. package/serialization/types/ConversationHistoryMetadataCommonModel.js +5 -0
  514. package/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +5 -1
  515. package/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.js +2 -0
  516. package/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +19 -0
  517. package/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.js +50 -0
  518. package/serialization/types/ConversationInitiationClientDataInternal.d.ts +1 -0
  519. package/serialization/types/ConversationInitiationClientDataInternal.js +1 -0
  520. package/serialization/types/ConversationInitiationClientDataRequestInput.d.ts +1 -0
  521. package/serialization/types/ConversationInitiationClientDataRequestInput.js +1 -0
  522. package/serialization/types/ConversationInitiationClientDataRequestOutput.d.ts +1 -0
  523. package/serialization/types/ConversationInitiationClientDataRequestOutput.js +1 -0
  524. package/serialization/types/ConversationInitiationSource.d.ts +10 -0
  525. package/serialization/types/ConversationInitiationSource.js +53 -0
  526. package/serialization/types/ConversationSimulationSpecification.d.ts +1 -1
  527. package/serialization/types/ConversationalConfig.d.ts +1 -1
  528. package/serialization/types/CreateSipTrunkPhoneNumberRequest.d.ts +4 -10
  529. package/serialization/types/CreateSipTrunkPhoneNumberRequest.js +4 -10
  530. package/serialization/types/GetConversationResponseModel.d.ts +1 -0
  531. package/serialization/types/GetConversationResponseModel.js +1 -0
  532. package/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +17 -0
  533. package/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js +48 -0
  534. package/{dist/serialization/types/SipTrunkConfigResponseModel.d.ts → serialization/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +2 -2
  535. package/serialization/types/{SipTrunkConfigResponseModel.js → GetPhoneNumberOutboundSipTrunkConfigResponseModel.js} +2 -2
  536. package/serialization/types/GetPhoneNumberSipTrunkResponseModel.d.ts +5 -2
  537. package/serialization/types/GetPhoneNumberSipTrunkResponseModel.js +5 -2
  538. package/serialization/types/InboundSipTrunkConfigRequestModel.d.ts +17 -0
  539. package/serialization/types/InboundSipTrunkConfigRequestModel.js +48 -0
  540. package/serialization/types/OutboundSipTrunkConfigRequestModel.d.ts +19 -0
  541. package/serialization/types/OutboundSipTrunkConfigRequestModel.js +50 -0
  542. package/serialization/types/PhoneNumberTransfer.d.ts +5 -1
  543. package/serialization/types/PhoneNumberTransfer.js +5 -1
  544. package/serialization/types/PhoneNumberTransferDestination.d.ts +12 -0
  545. package/serialization/types/PhoneNumberTransferDestination.js +43 -0
  546. package/serialization/types/PhoneNumberTransferTransferDestination.d.ts +18 -0
  547. package/serialization/types/PhoneNumberTransferTransferDestination.js +51 -0
  548. package/serialization/types/PromptAgentDbModel.d.ts +0 -18
  549. package/serialization/types/PromptAgentDbModel.js +0 -18
  550. package/{dist/serialization/types/SipTrunkCredentials.d.ts → serialization/types/SipTrunkCredentialsRequestModel.d.ts} +2 -2
  551. package/{dist/serialization/types/SipTrunkCredentials.js → serialization/types/SipTrunkCredentialsRequestModel.js} +2 -2
  552. package/serialization/types/SipUriTransferDestination.d.ts +12 -0
  553. package/serialization/types/SipUriTransferDestination.js +43 -0
  554. package/serialization/types/SubscriptionStatusType.d.ts +1 -1
  555. package/serialization/types/SubscriptionStatusType.js +1 -10
  556. package/serialization/types/SystemToolConfigInputParams.d.ts +2 -2
  557. package/serialization/types/SystemToolConfigInputParams.js +2 -2
  558. package/serialization/types/SystemToolConfigOutputParams.d.ts +2 -2
  559. package/serialization/types/SystemToolConfigOutputParams.js +2 -2
  560. package/serialization/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +2 -2
  561. package/serialization/types/{TransferToNumberToolConfig.js → TransferToNumberToolConfigInput.js} +2 -2
  562. package/serialization/types/TransferToNumberToolConfigOutput.d.ts +14 -0
  563. package/serialization/types/TransferToNumberToolConfigOutput.js +45 -0
  564. package/serialization/types/TransferTypeEnum.d.ts +10 -0
  565. package/serialization/types/TransferTypeEnum.js +41 -0
  566. package/serialization/types/WidgetTextContents.d.ts +4 -0
  567. package/serialization/types/WidgetTextContents.js +4 -0
  568. package/serialization/types/WorkspaceResourceType.d.ts +1 -1
  569. package/serialization/types/WorkspaceResourceType.js +1 -0
  570. package/serialization/types/index.d.ts +15 -4
  571. package/serialization/types/index.js +15 -4
  572. package/version.d.ts +1 -1
  573. package/version.js +1 -1
  574. package/jest.browser.config.mjs +0 -10
  575. /package/api/types/{SipTrunkConfigResponseModel.js → ConversationHistoryElevenAssistantCommonModel.js} +0 -0
  576. /package/api/types/{SipTrunkCredentials.js → ConversationHistoryTranscriptToolCallMcpDetails.js} +0 -0
  577. /package/api/types/{TransferToNumberToolConfig.js → GetPhoneNumberInboundSipTrunkConfigResponseModel.js} +0 -0
  578. /package/{dist/api/types/SipTrunkConfigResponseModel.js → api/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.js} +0 -0
  579. /package/{dist/api/types/SipTrunkCredentials.js → api/types/InboundSipTrunkConfigRequestModel.js} +0 -0
  580. /package/{dist/api/types/TransferToNumberToolConfig.js → api/types/OutboundSipTrunkConfigRequestModel.js} +0 -0
@@ -44,16 +44,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
47
  Object.defineProperty(exports, "__esModule", { value: true });
51
48
  exports.Tools = void 0;
52
49
  const environments = __importStar(require("../../../../../../../../environments"));
53
50
  const core = __importStar(require("../../../../../../../../core"));
54
51
  const ElevenLabs = __importStar(require("../../../../../../../index"));
55
- const headers_js_1 = require("../../../../../../../../core/headers.js");
56
- const url_join_1 = __importDefault(require("url-join"));
52
+ const headers_1 = require("../../../../../../../../core/headers");
57
53
  const serializers = __importStar(require("../../../../../../../../serialization/index"));
58
54
  const errors = __importStar(require("../../../../../../../../errors/index"));
59
55
  class Tools {
@@ -78,9 +74,9 @@ class Tools {
78
74
  return __awaiter(this, void 0, void 0, function* () {
79
75
  var _a, _b, _c;
80
76
  const _response = yield core.fetcher({
81
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/mcp-servers/${encodeURIComponent(mcpServerId)}/tools`),
77
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/mcp-servers/${encodeURIComponent(mcpServerId)}/tools`),
82
78
  method: "GET",
83
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
80
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
85
81
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
86
82
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -30,6 +30,18 @@ export declare namespace PhoneNumbers {
30
30
  export declare class PhoneNumbers {
31
31
  protected readonly _options: PhoneNumbers.Options;
32
32
  constructor(_options?: PhoneNumbers.Options);
33
+ /**
34
+ * Retrieve all Phone Numbers
35
+ *
36
+ * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration.
37
+ *
38
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
39
+ *
40
+ * @example
41
+ * await client.conversationalAi.phoneNumbers.list()
42
+ */
43
+ list(requestOptions?: PhoneNumbers.RequestOptions): core.HttpResponsePromise<ElevenLabs.conversationalAi.PhoneNumbersListResponseItem[]>;
44
+ private __list;
33
45
  /**
34
46
  * Import Phone Number from provider configuration (Twilio or SIP trunk)
35
47
  *
@@ -89,16 +101,4 @@ export declare class PhoneNumbers {
89
101
  */
90
102
  update(phoneNumberId: string, request?: ElevenLabs.conversationalAi.UpdatePhoneNumberRequest, requestOptions?: PhoneNumbers.RequestOptions): core.HttpResponsePromise<ElevenLabs.conversationalAi.PhoneNumbersUpdateResponse>;
91
103
  private __update;
92
- /**
93
- * Retrieve all Phone Numbers
94
- *
95
- * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration.
96
- *
97
- * @throws {@link ElevenLabs.UnprocessableEntityError}
98
- *
99
- * @example
100
- * await client.conversationalAi.phoneNumbers.list()
101
- */
102
- list(requestOptions?: PhoneNumbers.RequestOptions): core.HttpResponsePromise<ElevenLabs.conversationalAi.PhoneNumbersListResponseItem[]>;
103
- private __list;
104
104
  }
@@ -44,22 +44,87 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
47
  Object.defineProperty(exports, "__esModule", { value: true });
51
48
  exports.PhoneNumbers = void 0;
52
49
  const environments = __importStar(require("../../../../../../environments"));
53
50
  const core = __importStar(require("../../../../../../core"));
54
51
  const ElevenLabs = __importStar(require("../../../../../index"));
55
- const headers_js_1 = require("../../../../../../core/headers.js");
52
+ const headers_1 = require("../../../../../../core/headers");
56
53
  const serializers = __importStar(require("../../../../../../serialization/index"));
57
- const url_join_1 = __importDefault(require("url-join"));
58
54
  const errors = __importStar(require("../../../../../../errors/index"));
59
55
  class PhoneNumbers {
60
56
  constructor(_options = {}) {
61
57
  this._options = _options;
62
58
  }
59
+ /**
60
+ * Retrieve all Phone Numbers
61
+ *
62
+ * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.conversationalAi.phoneNumbers.list()
68
+ */
69
+ list(requestOptions) {
70
+ return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
71
+ }
72
+ __list(requestOptions) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ var _a, _b, _c;
75
+ const _response = yield core.fetcher({
76
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/phone-numbers"),
77
+ method: "GET",
78
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
80
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
81
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
82
+ });
83
+ if (_response.ok) {
84
+ return {
85
+ data: serializers.conversationalAi.phoneNumbers.list.Response.parseOrThrow(_response.body, {
86
+ unrecognizedObjectKeys: "passthrough",
87
+ allowUnrecognizedUnionMembers: true,
88
+ allowUnrecognizedEnumValues: true,
89
+ breadcrumbsPrefix: ["response"],
90
+ }),
91
+ rawResponse: _response.rawResponse,
92
+ };
93
+ }
94
+ if (_response.error.reason === "status-code") {
95
+ switch (_response.error.statusCode) {
96
+ case 422:
97
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
98
+ unrecognizedObjectKeys: "passthrough",
99
+ allowUnrecognizedUnionMembers: true,
100
+ allowUnrecognizedEnumValues: true,
101
+ breadcrumbsPrefix: ["response"],
102
+ }), _response.rawResponse);
103
+ default:
104
+ throw new errors.ElevenLabsError({
105
+ statusCode: _response.error.statusCode,
106
+ body: _response.error.body,
107
+ rawResponse: _response.rawResponse,
108
+ });
109
+ }
110
+ }
111
+ switch (_response.error.reason) {
112
+ case "non-json":
113
+ throw new errors.ElevenLabsError({
114
+ statusCode: _response.error.statusCode,
115
+ body: _response.error.rawBody,
116
+ rawResponse: _response.rawResponse,
117
+ });
118
+ case "timeout":
119
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling GET /v1/convai/phone-numbers.");
120
+ case "unknown":
121
+ throw new errors.ElevenLabsError({
122
+ message: _response.error.errorMessage,
123
+ rawResponse: _response.rawResponse,
124
+ });
125
+ }
126
+ });
127
+ }
63
128
  /**
64
129
  * Import Phone Number from provider configuration (Twilio or SIP trunk)
65
130
  *
@@ -84,9 +149,9 @@ class PhoneNumbers {
84
149
  return __awaiter(this, void 0, void 0, function* () {
85
150
  var _a, _b, _c;
86
151
  const _response = yield core.fetcher({
87
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/phone-numbers/create"),
152
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/phone-numbers"),
88
153
  method: "POST",
89
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
154
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
90
155
  contentType: "application/json",
91
156
  requestType: "json",
92
157
  body: serializers.conversationalAi.PhoneNumbersCreateRequestBody.jsonOrThrow(request, {
@@ -132,7 +197,7 @@ class PhoneNumbers {
132
197
  rawResponse: _response.rawResponse,
133
198
  });
134
199
  case "timeout":
135
- throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/convai/phone-numbers/create.");
200
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/convai/phone-numbers.");
136
201
  case "unknown":
137
202
  throw new errors.ElevenLabsError({
138
203
  message: _response.error.errorMessage,
@@ -159,9 +224,9 @@ class PhoneNumbers {
159
224
  return __awaiter(this, void 0, void 0, function* () {
160
225
  var _a, _b, _c;
161
226
  const _response = yield core.fetcher({
162
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/phone-numbers/${encodeURIComponent(phoneNumberId)}`),
227
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/phone-numbers/${encodeURIComponent(phoneNumberId)}`),
163
228
  method: "GET",
164
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
229
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
165
230
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
166
231
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
167
232
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -229,9 +294,9 @@ class PhoneNumbers {
229
294
  return __awaiter(this, void 0, void 0, function* () {
230
295
  var _a, _b, _c;
231
296
  const _response = yield core.fetcher({
232
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/phone-numbers/${encodeURIComponent(phoneNumberId)}`),
297
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/phone-numbers/${encodeURIComponent(phoneNumberId)}`),
233
298
  method: "DELETE",
234
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
299
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
235
300
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
236
301
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
237
302
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -292,9 +357,9 @@ class PhoneNumbers {
292
357
  return __awaiter(this, arguments, void 0, function* (phoneNumberId, request = {}, requestOptions) {
293
358
  var _a, _b, _c;
294
359
  const _response = yield core.fetcher({
295
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/phone-numbers/${encodeURIComponent(phoneNumberId)}`),
360
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/phone-numbers/${encodeURIComponent(phoneNumberId)}`),
296
361
  method: "PATCH",
297
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
362
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
298
363
  contentType: "application/json",
299
364
  requestType: "json",
300
365
  body: serializers.conversationalAi.UpdatePhoneNumberRequest.jsonOrThrow(request, {
@@ -349,74 +414,5 @@ class PhoneNumbers {
349
414
  }
350
415
  });
351
416
  }
352
- /**
353
- * Retrieve all Phone Numbers
354
- *
355
- * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration.
356
- *
357
- * @throws {@link ElevenLabs.UnprocessableEntityError}
358
- *
359
- * @example
360
- * await client.conversationalAi.phoneNumbers.list()
361
- */
362
- list(requestOptions) {
363
- return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
364
- }
365
- __list(requestOptions) {
366
- return __awaiter(this, void 0, void 0, function* () {
367
- var _a, _b, _c;
368
- const _response = yield core.fetcher({
369
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/phone-numbers"),
370
- method: "GET",
371
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
372
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
373
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
374
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
375
- });
376
- if (_response.ok) {
377
- return {
378
- data: serializers.conversationalAi.phoneNumbers.list.Response.parseOrThrow(_response.body, {
379
- unrecognizedObjectKeys: "passthrough",
380
- allowUnrecognizedUnionMembers: true,
381
- allowUnrecognizedEnumValues: true,
382
- breadcrumbsPrefix: ["response"],
383
- }),
384
- rawResponse: _response.rawResponse,
385
- };
386
- }
387
- if (_response.error.reason === "status-code") {
388
- switch (_response.error.statusCode) {
389
- case 422:
390
- throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
391
- unrecognizedObjectKeys: "passthrough",
392
- allowUnrecognizedUnionMembers: true,
393
- allowUnrecognizedEnumValues: true,
394
- breadcrumbsPrefix: ["response"],
395
- }), _response.rawResponse);
396
- default:
397
- throw new errors.ElevenLabsError({
398
- statusCode: _response.error.statusCode,
399
- body: _response.error.body,
400
- rawResponse: _response.rawResponse,
401
- });
402
- }
403
- }
404
- switch (_response.error.reason) {
405
- case "non-json":
406
- throw new errors.ElevenLabsError({
407
- statusCode: _response.error.statusCode,
408
- body: _response.error.rawBody,
409
- rawResponse: _response.rawResponse,
410
- });
411
- case "timeout":
412
- throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling GET /v1/convai/phone-numbers.");
413
- case "unknown":
414
- throw new errors.ElevenLabsError({
415
- message: _response.error.errorMessage,
416
- rawResponse: _response.rawResponse,
417
- });
418
- }
419
- });
420
- }
421
417
  }
422
418
  exports.PhoneNumbers = PhoneNumbers;
@@ -1,4 +1,4 @@
1
+ export * from "./PhoneNumbersListResponseItem";
1
2
  export * from "./PhoneNumbersCreateRequestBody";
2
3
  export * from "./PhoneNumbersGetResponse";
3
4
  export * from "./PhoneNumbersUpdateResponse";
4
- export * from "./PhoneNumbersListResponseItem";
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./PhoneNumbersListResponseItem"), exports);
17
18
  __exportStar(require("./PhoneNumbersCreateRequestBody"), exports);
18
19
  __exportStar(require("./PhoneNumbersGetResponse"), exports);
19
20
  __exportStar(require("./PhoneNumbersUpdateResponse"), exports);
20
- __exportStar(require("./PhoneNumbersListResponseItem"), exports);
@@ -44,16 +44,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
47
  Object.defineProperty(exports, "__esModule", { value: true });
51
48
  exports.Secrets = void 0;
52
49
  const environments = __importStar(require("../../../../../../environments"));
53
50
  const core = __importStar(require("../../../../../../core"));
54
51
  const ElevenLabs = __importStar(require("../../../../../index"));
55
- const headers_js_1 = require("../../../../../../core/headers.js");
56
- const url_join_1 = __importDefault(require("url-join"));
52
+ const headers_1 = require("../../../../../../core/headers");
57
53
  const serializers = __importStar(require("../../../../../../serialization/index"));
58
54
  const errors = __importStar(require("../../../../../../errors/index"));
59
55
  class Secrets {
@@ -77,9 +73,9 @@ class Secrets {
77
73
  return __awaiter(this, void 0, void 0, function* () {
78
74
  var _a, _b, _c;
79
75
  const _response = yield core.fetcher({
80
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/secrets"),
76
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/secrets"),
81
77
  method: "GET",
82
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
79
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
84
80
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
85
81
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -150,9 +146,9 @@ class Secrets {
150
146
  return __awaiter(this, void 0, void 0, function* () {
151
147
  var _a, _b, _c;
152
148
  const _response = yield core.fetcher({
153
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/secrets"),
149
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/secrets"),
154
150
  method: "POST",
155
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
151
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
156
152
  contentType: "application/json",
157
153
  requestType: "json",
158
154
  body: Object.assign(Object.assign({}, serializers.conversationalAi.PostWorkspaceSecretRequest.jsonOrThrow(request, {
@@ -225,9 +221,9 @@ class Secrets {
225
221
  return __awaiter(this, void 0, void 0, function* () {
226
222
  var _a, _b, _c;
227
223
  const _response = yield core.fetcher({
228
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/secrets/${encodeURIComponent(secretId)}`),
224
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/secrets/${encodeURIComponent(secretId)}`),
229
225
  method: "DELETE",
230
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
226
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
231
227
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
232
228
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
233
229
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -44,16 +44,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
47
  Object.defineProperty(exports, "__esModule", { value: true });
51
48
  exports.Settings = void 0;
52
49
  const environments = __importStar(require("../../../../../../environments"));
53
50
  const core = __importStar(require("../../../../../../core"));
54
51
  const ElevenLabs = __importStar(require("../../../../../index"));
55
- const headers_js_1 = require("../../../../../../core/headers.js");
56
- const url_join_1 = __importDefault(require("url-join"));
52
+ const headers_1 = require("../../../../../../core/headers");
57
53
  const serializers = __importStar(require("../../../../../../serialization/index"));
58
54
  const errors = __importStar(require("../../../../../../errors/index"));
59
55
  class Settings {
@@ -77,9 +73,9 @@ class Settings {
77
73
  return __awaiter(this, void 0, void 0, function* () {
78
74
  var _a, _b, _c;
79
75
  const _response = yield core.fetcher({
80
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/settings"),
76
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/settings"),
81
77
  method: "GET",
82
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
79
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
84
80
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
85
81
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -147,9 +143,9 @@ class Settings {
147
143
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
148
144
  var _a, _b, _c;
149
145
  const _response = yield core.fetcher({
150
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/settings"),
146
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/settings"),
151
147
  method: "PATCH",
152
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
148
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
153
149
  contentType: "application/json",
154
150
  requestType: "json",
155
151
  body: serializers.conversationalAi.PatchConvAiSettingsRequest.jsonOrThrow(request, {
@@ -44,17 +44,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
47
  Object.defineProperty(exports, "__esModule", { value: true });
51
48
  exports.SipTrunk = void 0;
52
49
  const environments = __importStar(require("../../../../../../environments"));
53
50
  const core = __importStar(require("../../../../../../core"));
54
51
  const ElevenLabs = __importStar(require("../../../../../index"));
55
- const headers_js_1 = require("../../../../../../core/headers.js");
52
+ const headers_1 = require("../../../../../../core/headers");
56
53
  const serializers = __importStar(require("../../../../../../serialization/index"));
57
- const url_join_1 = __importDefault(require("url-join"));
58
54
  const errors = __importStar(require("../../../../../../errors/index"));
59
55
  class SipTrunk {
60
56
  constructor(_options = {}) {
@@ -82,9 +78,9 @@ class SipTrunk {
82
78
  return __awaiter(this, void 0, void 0, function* () {
83
79
  var _a, _b, _c;
84
80
  const _response = yield core.fetcher({
85
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/sip-trunk/outbound-call"),
81
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/sip-trunk/outbound-call"),
86
82
  method: "POST",
87
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
84
  contentType: "application/json",
89
85
  requestType: "json",
90
86
  body: serializers.conversationalAi.BodyHandleAnOutboundCallViaSipTrunkV1ConvaiSipTrunkOutboundCallPost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -44,16 +44,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
47
  Object.defineProperty(exports, "__esModule", { value: true });
51
48
  exports.Tools = void 0;
52
49
  const environments = __importStar(require("../../../../../../environments"));
53
50
  const core = __importStar(require("../../../../../../core"));
54
51
  const ElevenLabs = __importStar(require("../../../../../index"));
55
- const headers_js_1 = require("../../../../../../core/headers.js");
56
- const url_join_1 = __importDefault(require("url-join"));
52
+ const headers_1 = require("../../../../../../core/headers");
57
53
  const serializers = __importStar(require("../../../../../../serialization/index"));
58
54
  const errors = __importStar(require("../../../../../../errors/index"));
59
55
  class Tools {
@@ -77,9 +73,9 @@ class Tools {
77
73
  return __awaiter(this, void 0, void 0, function* () {
78
74
  var _a, _b, _c;
79
75
  const _response = yield core.fetcher({
80
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/tools"),
76
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/tools"),
81
77
  method: "GET",
82
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
78
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
79
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
84
80
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
85
81
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -154,9 +150,9 @@ class Tools {
154
150
  return __awaiter(this, void 0, void 0, function* () {
155
151
  var _a, _b, _c;
156
152
  const _response = yield core.fetcher({
157
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/tools"),
153
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/tools"),
158
154
  method: "POST",
159
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
155
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
160
156
  contentType: "application/json",
161
157
  requestType: "json",
162
158
  body: serializers.ToolRequestModel.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -227,9 +223,9 @@ class Tools {
227
223
  return __awaiter(this, void 0, void 0, function* () {
228
224
  var _a, _b, _c;
229
225
  const _response = yield core.fetcher({
230
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/tools/${encodeURIComponent(toolId)}`),
226
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/tools/${encodeURIComponent(toolId)}`),
231
227
  method: "GET",
232
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
228
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
233
229
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
234
230
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
235
231
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -297,9 +293,9 @@ class Tools {
297
293
  return __awaiter(this, void 0, void 0, function* () {
298
294
  var _a, _b, _c;
299
295
  const _response = yield core.fetcher({
300
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/tools/${encodeURIComponent(toolId)}`),
296
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/tools/${encodeURIComponent(toolId)}`),
301
297
  method: "DELETE",
302
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
298
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
303
299
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
304
300
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
305
301
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -367,9 +363,9 @@ class Tools {
367
363
  return __awaiter(this, void 0, void 0, function* () {
368
364
  var _a, _b, _c;
369
365
  const _response = yield core.fetcher({
370
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/tools/${encodeURIComponent(toolId)}`),
366
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/tools/${encodeURIComponent(toolId)}`),
371
367
  method: "PATCH",
372
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
368
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
373
369
  contentType: "application/json",
374
370
  requestType: "json",
375
371
  body: serializers.ToolRequestModel.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -449,9 +445,9 @@ class Tools {
449
445
  _queryParams["page_size"] = pageSize.toString();
450
446
  }
451
447
  const _response = yield core.fetcher({
452
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/tools/${encodeURIComponent(toolId)}/dependent-agents`),
448
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, `v1/convai/tools/${encodeURIComponent(toolId)}/dependent-agents`),
453
449
  method: "GET",
454
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
450
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
455
451
  queryParameters: _queryParams,
456
452
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
457
453
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
@@ -44,17 +44,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
- var __importDefault = (this && this.__importDefault) || function (mod) {
48
- return (mod && mod.__esModule) ? mod : { "default": mod };
49
- };
50
47
  Object.defineProperty(exports, "__esModule", { value: true });
51
48
  exports.Twilio = void 0;
52
49
  const environments = __importStar(require("../../../../../../environments"));
53
50
  const core = __importStar(require("../../../../../../core"));
54
51
  const ElevenLabs = __importStar(require("../../../../../index"));
55
- const headers_js_1 = require("../../../../../../core/headers.js");
52
+ const headers_1 = require("../../../../../../core/headers");
56
53
  const serializers = __importStar(require("../../../../../../serialization/index"));
57
- const url_join_1 = __importDefault(require("url-join"));
58
54
  const errors = __importStar(require("../../../../../../errors/index"));
59
55
  class Twilio {
60
56
  constructor(_options = {}) {
@@ -82,9 +78,9 @@ class Twilio {
82
78
  return __awaiter(this, void 0, void 0, function* () {
83
79
  var _a, _b, _c;
84
80
  const _response = yield core.fetcher({
85
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/twilio/outbound-call"),
81
+ url: core.url.join((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/convai/twilio/outbound-call"),
86
82
  method: "POST",
87
- headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ headers: (0, headers_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
84
  contentType: "application/json",
89
85
  requestType: "json",
90
86
  body: serializers.conversationalAi.BodyHandleAnOutboundCallViaTwilioV1ConvaiTwilioOutboundCallPost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),