@elevenlabs/elevenlabs-js 2.4.1 → 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 (870) hide show
  1. package/Client.d.ts +3 -3
  2. package/Client.js +17 -17
  3. package/api/errors/BadRequestError.d.ts +2 -1
  4. package/api/resources/audioIsolation/client/Client.js +5 -9
  5. package/api/resources/audioIsolation/client/requests/BodyAudioIsolationStreamV1AudioIsolationStreamPost.d.ts +2 -2
  6. package/api/resources/audioIsolation/client/requests/BodyAudioIsolationV1AudioIsolationPost.d.ts +2 -2
  7. package/api/resources/audioNative/client/Client.js +7 -11
  8. package/api/resources/audioNative/client/requests/BodyCreatesAudioNativeEnabledProjectV1AudioNativePost.d.ts +2 -2
  9. package/api/resources/audioNative/client/requests/BodyUpdateAudioNativeProjectContentV1AudioNativeProjectIdContentPost.d.ts +2 -2
  10. package/api/resources/conversationalAi/client/Client.js +16 -15
  11. package/api/resources/conversationalAi/client/requests/BodyAddToKnowledgeBaseV1ConvaiKnowledgeBasePost.d.ts +3 -2
  12. package/api/resources/conversationalAi/conversation/AudioInterface.d.ts +44 -0
  13. package/api/resources/conversationalAi/conversation/AudioInterface.js +12 -0
  14. package/api/resources/conversationalAi/conversation/ClientTools.d.ts +60 -0
  15. package/api/resources/conversationalAi/conversation/ClientTools.js +132 -0
  16. package/api/resources/conversationalAi/conversation/Conversation.d.ts +94 -0
  17. package/api/resources/conversationalAi/conversation/Conversation.js +280 -0
  18. package/api/resources/conversationalAi/conversation/ConversationConfig.d.ts +18 -0
  19. package/api/resources/conversationalAi/conversation/ConversationConfig.js +16 -0
  20. package/api/resources/conversationalAi/conversation/DefaultAudioInterface.d.ts +63 -0
  21. package/api/resources/conversationalAi/conversation/DefaultAudioInterface.js +126 -0
  22. package/api/resources/conversationalAi/conversation/__tests__/Conversation.test.d.ts +1 -0
  23. package/api/resources/conversationalAi/conversation/__tests__/Conversation.test.js +358 -0
  24. package/api/resources/conversationalAi/conversation/events.d.ts +84 -0
  25. package/api/resources/conversationalAi/conversation/events.js +19 -0
  26. package/api/resources/conversationalAi/conversation/index.d.ts +6 -0
  27. package/api/resources/conversationalAi/conversation/index.js +22 -0
  28. package/api/resources/conversationalAi/conversation/interfaces/ConversationClient.d.ts +11 -0
  29. package/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.d.ts +12 -0
  30. package/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.js +13 -0
  31. package/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.d.ts +15 -0
  32. package/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.js +28 -0
  33. package/api/resources/conversationalAi/conversation/mocks/MockConversation.d.ts +43 -0
  34. package/api/resources/conversationalAi/conversation/mocks/MockConversation.js +108 -0
  35. package/api/resources/conversationalAi/conversation/mocks/index.d.ts +2 -0
  36. package/api/resources/conversationalAi/conversation/mocks/index.js +18 -0
  37. package/api/resources/conversationalAi/resources/agents/client/Client.d.ts +4 -4
  38. package/api/resources/conversationalAi/resources/agents/client/Client.js +21 -25
  39. package/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationStreamV1ConvaiAgentsAgentIdSimulateConversationStreamPost.d.ts +2 -2
  40. package/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationV1ConvaiAgentsAgentIdSimulateConversationPost.d.ts +2 -2
  41. package/api/resources/conversationalAi/resources/agents/resources/knowledgeBase/client/Client.js +3 -7
  42. package/api/resources/conversationalAi/resources/agents/resources/link/client/Client.js +3 -7
  43. package/api/resources/conversationalAi/resources/agents/resources/llmUsage/client/Client.js +3 -7
  44. package/api/resources/conversationalAi/resources/agents/resources/widget/client/Client.js +3 -7
  45. package/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/Client.js +3 -7
  46. package/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/requests/BodyPostAgentAvatarV1ConvaiAgentsAgentIdAvatarPost.d.ts +2 -2
  47. package/api/resources/conversationalAi/resources/batchCalls/client/Client.d.ts +1 -1
  48. package/api/resources/conversationalAi/resources/batchCalls/client/Client.js +12 -16
  49. package/api/resources/conversationalAi/resources/conversations/client/Client.js +9 -13
  50. package/api/resources/conversationalAi/resources/conversations/resources/audio/client/Client.js +3 -7
  51. package/api/resources/conversationalAi/resources/conversations/resources/feedback/client/Client.js +3 -7
  52. package/api/resources/conversationalAi/resources/dashboard/resources/settings/client/Client.js +5 -9
  53. package/api/resources/conversationalAi/resources/knowledgeBase/client/Client.js +3 -7
  54. package/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.js +3 -7
  55. package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.d.ts +2 -1
  56. package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.js +28 -25
  57. package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyCreateFileDocumentV1ConvaiKnowledgeBaseFilePost.d.ts +2 -2
  58. package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsGetRequest.d.ts +10 -0
  59. package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.d.ts +1 -0
  60. package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunk/client/Client.js +3 -7
  61. package/api/resources/conversationalAi/resources/llmUsage/client/Client.js +3 -7
  62. package/api/resources/conversationalAi/resources/mcpServers/client/Client.js +7 -11
  63. package/api/resources/conversationalAi/resources/mcpServers/resources/approvalPolicy/client/Client.js +3 -7
  64. package/api/resources/conversationalAi/resources/mcpServers/resources/toolApprovals/client/Client.js +5 -9
  65. package/api/resources/conversationalAi/resources/mcpServers/resources/tools/client/Client.js +3 -7
  66. package/api/resources/conversationalAi/resources/phoneNumbers/client/Client.d.ts +12 -12
  67. package/api/resources/conversationalAi/resources/phoneNumbers/client/Client.js +79 -83
  68. package/api/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
  69. package/api/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
  70. package/api/resources/conversationalAi/resources/secrets/client/Client.js +7 -11
  71. package/api/resources/conversationalAi/resources/settings/client/Client.js +5 -9
  72. package/api/resources/conversationalAi/resources/sipTrunk/client/Client.js +3 -7
  73. package/api/resources/conversationalAi/resources/tools/client/Client.js +13 -17
  74. package/api/resources/conversationalAi/resources/twilio/client/Client.js +3 -7
  75. package/api/resources/dubbing/client/Client.js +7 -11
  76. package/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +5 -5
  77. package/api/resources/dubbing/resources/audio/client/Client.js +3 -7
  78. package/api/resources/dubbing/resources/resource/client/Client.js +11 -15
  79. package/api/resources/dubbing/resources/resource/resources/language/client/Client.js +3 -7
  80. package/api/resources/dubbing/resources/resource/resources/segment/client/Client.js +5 -9
  81. package/api/resources/dubbing/resources/resource/resources/speaker/client/Client.js +5 -9
  82. package/api/resources/dubbing/resources/resource/resources/speaker/resources/segment/client/Client.js +3 -7
  83. package/api/resources/dubbing/resources/transcript/client/Client.js +3 -7
  84. package/api/resources/forcedAlignment/client/Client.js +3 -7
  85. package/api/resources/forcedAlignment/client/requests/BodyCreateForcedAlignmentV1ForcedAlignmentPost.d.ts +2 -2
  86. package/api/resources/history/client/Client.js +17 -16
  87. package/api/resources/index.d.ts +0 -1
  88. package/api/resources/index.js +0 -1
  89. package/api/resources/models/client/Client.js +3 -7
  90. package/api/resources/pronunciationDictionaries/client/Client.js +13 -17
  91. package/api/resources/pronunciationDictionaries/client/requests/BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromFilePost.d.ts +2 -2
  92. package/api/resources/pronunciationDictionaries/resources/rules/client/Client.js +5 -9
  93. package/api/resources/samples/client/Client.js +3 -7
  94. package/api/resources/speechToSpeech/client/Client.js +5 -9
  95. package/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPost.d.ts +2 -2
  96. package/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost.d.ts +2 -2
  97. package/api/resources/speechToText/client/Client.d.ts +3 -1
  98. package/api/resources/speechToText/client/Client.js +14 -12
  99. package/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +6 -2
  100. package/api/resources/studio/client/Client.js +3 -7
  101. package/api/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +6 -0
  102. package/api/resources/studio/resources/projects/client/Client.js +13 -17
  103. package/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.d.ts +9 -3
  104. package/api/resources/studio/resources/projects/resources/chapters/client/Client.js +13 -17
  105. package/api/resources/studio/resources/projects/resources/chapters/resources/snapshots/client/Client.js +7 -11
  106. package/api/resources/studio/resources/projects/resources/content/client/Client.js +6 -7
  107. package/api/resources/studio/resources/projects/resources/content/client/requests/BodyUpdateStudioProjectContentV1StudioProjectsProjectIdContentPost.d.ts +10 -2
  108. package/api/resources/studio/resources/projects/resources/pronunciationDictionaries/client/Client.js +3 -7
  109. package/api/resources/studio/resources/projects/resources/snapshots/client/Client.js +9 -13
  110. package/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +2 -1
  111. package/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -0
  112. package/api/resources/textToDialogue/client/Client.js +5 -9
  113. package/api/resources/textToSoundEffects/client/Client.js +3 -7
  114. package/api/resources/textToSpeech/client/Client.js +9 -13
  115. package/api/resources/textToVoice/client/Client.d.ts +3 -0
  116. package/api/resources/textToVoice/client/Client.js +14 -13
  117. package/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +2 -0
  118. package/api/resources/textToVoice/index.d.ts +1 -0
  119. package/api/resources/textToVoice/index.js +1 -0
  120. package/api/resources/textToVoice/resources/index.d.ts +1 -0
  121. package/api/resources/textToVoice/resources/index.js +37 -0
  122. package/api/resources/textToVoice/resources/preview/client/Client.d.ts +38 -0
  123. package/api/resources/textToVoice/resources/preview/client/Client.js +116 -0
  124. package/api/resources/textToVoice/resources/preview/client/index.d.ts +1 -0
  125. package/api/resources/textToVoice/resources/preview/index.d.ts +1 -0
  126. package/api/resources/textToVoice/resources/preview/index.js +17 -0
  127. package/api/resources/usage/client/Client.js +3 -7
  128. package/api/resources/user/client/Client.js +3 -7
  129. package/api/resources/user/resources/subscription/client/Client.js +3 -7
  130. package/api/resources/voices/client/Client.js +17 -21
  131. package/api/resources/voices/client/requests/BodyEditVoiceV1VoicesVoiceIdEditPost.d.ts +2 -2
  132. package/api/resources/voices/client/requests/BodyGetSimilarLibraryVoicesV1SimilarVoicesPost.d.ts +2 -2
  133. package/api/resources/voices/resources/ivc/client/Client.js +3 -7
  134. package/api/resources/voices/resources/ivc/client/requests/BodyAddVoiceV1VoicesAddPost.d.ts +2 -2
  135. package/api/resources/voices/resources/pvc/client/Client.js +7 -11
  136. package/api/resources/voices/resources/pvc/resources/samples/client/Client.js +7 -11
  137. package/api/resources/voices/resources/pvc/resources/samples/client/requests/BodyAddSamplesToPvcVoiceV1VoicesPvcVoiceIdSamplesPost.d.ts +2 -2
  138. package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.d.ts +5 -2
  139. package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.js +17 -12
  140. package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/index.d.ts +1 -0
  141. package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/index.js +15 -0
  142. package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/AudioGetRequest.d.ts +15 -0
  143. package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/index.d.ts +1 -0
  144. package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/index.js +2 -0
  145. package/api/resources/voices/resources/pvc/resources/samples/resources/index.d.ts +1 -0
  146. package/api/resources/voices/resources/pvc/resources/samples/resources/index.js +4 -0
  147. package/api/resources/voices/resources/pvc/resources/samples/resources/speakers/client/Client.js +5 -9
  148. package/api/resources/voices/resources/pvc/resources/samples/resources/speakers/resources/audio/client/Client.js +3 -7
  149. package/api/resources/voices/resources/pvc/resources/samples/resources/waveform/client/Client.js +3 -7
  150. package/api/resources/voices/resources/pvc/resources/verification/client/Client.js +3 -7
  151. package/api/resources/voices/resources/pvc/resources/verification/client/requests/BodyRequestManualVerificationV1VoicesPvcVoiceIdVerificationPost.d.ts +2 -2
  152. package/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/Client.js +5 -9
  153. package/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/requests/BodyVerifyPvcVoiceCaptchaV1VoicesPvcVoiceIdCaptchaPost.d.ts +2 -2
  154. package/api/resources/voices/resources/samples/resources/audio/client/Client.js +3 -7
  155. package/api/resources/voices/resources/settings/client/Client.js +7 -11
  156. package/api/resources/webhooks/client/Client.js +3 -7
  157. package/api/resources/workspace/client/Client.d.ts +0 -67
  158. package/api/resources/workspace/client/Client.js +0 -326
  159. package/api/resources/workspace/client/index.d.ts +0 -1
  160. package/api/resources/workspace/client/index.js +0 -15
  161. package/api/resources/workspace/resources/groups/client/Client.js +3 -7
  162. package/api/resources/workspace/resources/groups/resources/members/client/Client.js +5 -9
  163. package/api/resources/workspace/resources/invites/client/Client.js +7 -11
  164. package/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +3 -1
  165. package/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
  166. package/api/resources/workspace/resources/members/client/Client.js +5 -9
  167. package/api/resources/workspace/resources/resources/client/Client.js +7 -11
  168. package/api/types/AddProjectRequest.d.ts +7 -1
  169. package/api/types/AgentConfig.d.ts +1 -10
  170. package/api/types/AgentTransfer.d.ts +3 -0
  171. package/api/types/AuthConnectionLocator.d.ts +9 -0
  172. package/api/types/BadRequestErrorBody.d.ts +7 -0
  173. package/api/types/BodyAddProjectV1ProjectsAddPostSourceType.d.ts +2 -1
  174. package/api/types/BodyAddProjectV1ProjectsAddPostSourceType.js +1 -0
  175. package/api/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +6 -0
  176. package/api/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.d.ts +8 -0
  177. package/api/types/BreakdownTypes.d.ts +4 -1
  178. package/api/types/BreakdownTypes.js +3 -0
  179. package/api/types/BuiltInToolsInput.d.ts +2 -0
  180. package/api/types/BuiltInToolsOutput.d.ts +2 -0
  181. package/api/types/ChapterResponse.d.ts +2 -0
  182. package/api/types/ChapterWithContentResponseModel.d.ts +2 -0
  183. package/api/types/ClientToolConfigInput.d.ts +1 -1
  184. package/api/types/ClientToolConfigOutput.d.ts +1 -1
  185. package/api/types/ConvAiWebhooks.d.ts +2 -0
  186. package/api/types/ConversationHistoryElevenAssistantCommonModel.d.ts +6 -0
  187. package/api/types/ConversationHistoryMetadataCommonModel.d.ts +3 -0
  188. package/api/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +4 -1
  189. package/api/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +13 -0
  190. package/api/types/ConversationInitiationClientDataInternal.d.ts +2 -0
  191. package/api/types/ConversationInitiationClientDataRequestInput.d.ts +2 -0
  192. package/api/types/ConversationInitiationClientDataRequestOutput.d.ts +2 -0
  193. package/api/types/ConversationInitiationSource.d.ts +20 -0
  194. package/api/types/ConversationInitiationSource.js +19 -0
  195. package/api/types/ConversationSimulationSpecification.d.ts +1 -1
  196. package/api/types/ConversationalConfig.d.ts +1 -1
  197. package/api/types/CreateSipTrunkPhoneNumberRequest.d.ts +2 -21
  198. package/api/types/ForcedAlignmentResponseModel.d.ts +2 -0
  199. package/api/types/ForcedAlignmentWordResponseModel.d.ts +2 -0
  200. package/api/types/GetConversationResponseModel.d.ts +1 -0
  201. package/api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +15 -0
  202. package/api/types/{SipTrunkConfigResponseModel.d.ts → GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +1 -1
  203. package/api/types/GetPhoneNumberSipTrunkResponseModel.d.ts +5 -1
  204. package/api/types/InboundSipTrunkConfigRequestModel.d.ts +14 -0
  205. package/api/types/MetricType.d.ts +2 -1
  206. package/api/types/MetricType.js +1 -0
  207. package/api/types/OutboundSipTrunkConfigRequestModel.d.ts +16 -0
  208. package/api/types/PhoneNumberTransfer.d.ts +4 -1
  209. package/api/types/PhoneNumberTransferDestination.d.ts +6 -0
  210. package/api/types/PhoneNumberTransferTransferDestination.d.ts +13 -0
  211. package/api/types/PlayDtmfToolConfig.d.ts +11 -0
  212. package/api/types/ProjectExtendedResponse.d.ts +2 -2
  213. package/api/types/ProjectExtendedResponseModelSourceType.d.ts +2 -1
  214. package/api/types/ProjectExtendedResponseModelSourceType.js +1 -0
  215. package/api/types/ProjectResponseModelSourceType.d.ts +2 -1
  216. package/api/types/ProjectResponseModelSourceType.js +1 -0
  217. package/api/types/PromptAgentApiModelInput.d.ts +1 -1
  218. package/api/types/PromptAgentApiModelOutput.d.ts +1 -1
  219. package/api/types/PromptAgentDbModel.d.ts +0 -26
  220. package/api/types/{SipTrunkCredentials.d.ts → SipTrunkCredentialsRequestModel.d.ts} +1 -1
  221. package/api/types/SipUriTransferDestination.d.ts +6 -0
  222. package/api/types/SubscriptionStatusType.d.ts +1 -3
  223. package/api/types/SubscriptionStatusType.js +0 -2
  224. package/api/types/SystemToolConfigInputParams.d.ts +5 -2
  225. package/api/types/SystemToolConfigOutputParams.d.ts +5 -2
  226. package/api/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +1 -1
  227. package/api/types/TransferToNumberToolConfigOutput.d.ts +9 -0
  228. package/api/types/TransferToNumberToolConfigOutput.js +5 -0
  229. package/api/types/TransferTypeEnum.d.ts +8 -0
  230. package/api/types/TransferTypeEnum.js +10 -0
  231. package/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  232. package/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  233. package/api/types/WidgetTextContents.d.ts +8 -0
  234. package/api/types/WorkspaceResourceType.d.ts +3 -1
  235. package/api/types/WorkspaceResourceType.js +2 -0
  236. package/api/types/index.d.ts +18 -8
  237. package/api/types/index.js +18 -8
  238. package/core/fetcher/BinaryResponse.d.ts +20 -0
  239. package/core/fetcher/BinaryResponse.js +17 -0
  240. package/core/fetcher/Fetcher.d.ts +1 -1
  241. package/core/fetcher/Fetcher.js +3 -3
  242. package/core/fetcher/ResponseWithBody.d.ts +4 -0
  243. package/core/fetcher/ResponseWithBody.js +6 -0
  244. package/core/fetcher/createRequestUrl.d.ts +1 -1
  245. package/core/fetcher/createRequestUrl.js +3 -7
  246. package/core/fetcher/getErrorResponseBody.d.ts +1 -0
  247. package/core/fetcher/getErrorResponseBody.js +44 -0
  248. package/core/fetcher/getFetchFn.js +3 -3
  249. package/core/fetcher/getResponseBody.js +34 -32
  250. package/core/fetcher/index.d.ts +1 -0
  251. package/core/file.d.ts +1 -0
  252. package/core/file.js +2 -0
  253. package/core/form-data-utils/FormDataWrapper.d.ts +5 -52
  254. package/core/form-data-utils/FormDataWrapper.js +105 -125
  255. package/core/form-data-utils/encodeAsFormParameter.d.ts +0 -3
  256. package/core/form-data-utils/encodeAsFormParameter.js +2 -8
  257. package/core/headers.d.ts +1 -1
  258. package/core/index.d.ts +2 -0
  259. package/core/index.js +3 -1
  260. package/core/url/index.d.ts +2 -0
  261. package/core/url/index.js +7 -0
  262. package/core/url/join.d.ts +1 -0
  263. package/core/url/join.js +49 -0
  264. package/core/url/qs.d.ts +6 -0
  265. package/core/url/qs.js +64 -0
  266. package/dist/Client.d.ts +3 -3
  267. package/dist/Client.js +17 -17
  268. package/dist/api/errors/BadRequestError.d.ts +2 -1
  269. package/dist/api/resources/audioIsolation/client/Client.js +5 -9
  270. package/dist/api/resources/audioIsolation/client/requests/BodyAudioIsolationStreamV1AudioIsolationStreamPost.d.ts +2 -2
  271. package/dist/api/resources/audioIsolation/client/requests/BodyAudioIsolationV1AudioIsolationPost.d.ts +2 -2
  272. package/dist/api/resources/audioNative/client/Client.js +7 -11
  273. package/dist/api/resources/audioNative/client/requests/BodyCreatesAudioNativeEnabledProjectV1AudioNativePost.d.ts +2 -2
  274. package/dist/api/resources/audioNative/client/requests/BodyUpdateAudioNativeProjectContentV1AudioNativeProjectIdContentPost.d.ts +2 -2
  275. package/dist/api/resources/conversationalAi/client/Client.js +16 -15
  276. package/dist/api/resources/conversationalAi/client/requests/BodyAddToKnowledgeBaseV1ConvaiKnowledgeBasePost.d.ts +3 -2
  277. package/dist/api/resources/conversationalAi/conversation/AudioInterface.d.ts +44 -0
  278. package/dist/api/resources/conversationalAi/conversation/AudioInterface.js +12 -0
  279. package/dist/api/resources/conversationalAi/conversation/ClientTools.d.ts +60 -0
  280. package/dist/api/resources/conversationalAi/conversation/ClientTools.js +132 -0
  281. package/dist/api/resources/conversationalAi/conversation/Conversation.d.ts +94 -0
  282. package/dist/api/resources/conversationalAi/conversation/Conversation.js +280 -0
  283. package/dist/api/resources/conversationalAi/conversation/ConversationConfig.d.ts +18 -0
  284. package/dist/api/resources/conversationalAi/conversation/ConversationConfig.js +16 -0
  285. package/dist/api/resources/conversationalAi/conversation/DefaultAudioInterface.d.ts +63 -0
  286. package/dist/api/resources/conversationalAi/conversation/DefaultAudioInterface.js +126 -0
  287. package/dist/api/resources/conversationalAi/conversation/__tests__/Conversation.test.d.ts +1 -0
  288. package/dist/api/resources/conversationalAi/conversation/__tests__/Conversation.test.js +358 -0
  289. package/dist/api/resources/conversationalAi/conversation/events.d.ts +84 -0
  290. package/dist/api/resources/conversationalAi/conversation/events.js +19 -0
  291. package/dist/api/resources/conversationalAi/conversation/index.d.ts +6 -0
  292. package/dist/api/resources/conversationalAi/conversation/index.js +22 -0
  293. package/dist/api/resources/conversationalAi/conversation/interfaces/ConversationClient.d.ts +11 -0
  294. package/dist/api/resources/conversationalAi/conversation/interfaces/ConversationClient.js +2 -0
  295. package/dist/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.d.ts +12 -0
  296. package/dist/api/resources/conversationalAi/conversation/interfaces/WebSocketInterface.js +13 -0
  297. package/dist/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.d.ts +15 -0
  298. package/dist/api/resources/conversationalAi/conversation/mocks/ConversationTestFactory.js +28 -0
  299. package/dist/api/resources/conversationalAi/conversation/mocks/MockConversation.d.ts +43 -0
  300. package/dist/api/resources/conversationalAi/conversation/mocks/MockConversation.js +108 -0
  301. package/dist/api/resources/conversationalAi/conversation/mocks/index.d.ts +2 -0
  302. package/dist/api/resources/conversationalAi/conversation/mocks/index.js +18 -0
  303. package/dist/api/resources/conversationalAi/resources/agents/client/Client.d.ts +4 -4
  304. package/dist/api/resources/conversationalAi/resources/agents/client/Client.js +21 -25
  305. package/dist/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationStreamV1ConvaiAgentsAgentIdSimulateConversationStreamPost.d.ts +2 -2
  306. package/dist/api/resources/conversationalAi/resources/agents/client/requests/BodySimulatesAConversationV1ConvaiAgentsAgentIdSimulateConversationPost.d.ts +2 -2
  307. package/dist/api/resources/conversationalAi/resources/agents/resources/knowledgeBase/client/Client.js +3 -7
  308. package/dist/api/resources/conversationalAi/resources/agents/resources/link/client/Client.js +3 -7
  309. package/dist/api/resources/conversationalAi/resources/agents/resources/llmUsage/client/Client.js +3 -7
  310. package/dist/api/resources/conversationalAi/resources/agents/resources/widget/client/Client.js +3 -7
  311. package/dist/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/Client.js +3 -7
  312. package/dist/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/requests/BodyPostAgentAvatarV1ConvaiAgentsAgentIdAvatarPost.d.ts +2 -2
  313. package/dist/api/resources/conversationalAi/resources/batchCalls/client/Client.d.ts +1 -1
  314. package/dist/api/resources/conversationalAi/resources/batchCalls/client/Client.js +12 -16
  315. package/dist/api/resources/conversationalAi/resources/conversations/client/Client.js +9 -13
  316. package/dist/api/resources/conversationalAi/resources/conversations/resources/audio/client/Client.js +3 -7
  317. package/dist/api/resources/conversationalAi/resources/conversations/resources/feedback/client/Client.js +3 -7
  318. package/dist/api/resources/conversationalAi/resources/dashboard/resources/settings/client/Client.js +5 -9
  319. package/dist/api/resources/conversationalAi/resources/knowledgeBase/client/Client.js +3 -7
  320. package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/document/client/Client.js +3 -7
  321. package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.d.ts +2 -1
  322. package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.js +28 -25
  323. package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyCreateFileDocumentV1ConvaiKnowledgeBaseFilePost.d.ts +2 -2
  324. package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsGetRequest.d.ts +10 -0
  325. package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsGetRequest.js +5 -0
  326. package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.d.ts +1 -0
  327. package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/resources/chunk/client/Client.js +3 -7
  328. package/dist/api/resources/conversationalAi/resources/llmUsage/client/Client.js +3 -7
  329. package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.js +7 -11
  330. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/approvalPolicy/client/Client.js +3 -7
  331. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolApprovals/client/Client.js +5 -9
  332. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/tools/client/Client.js +3 -7
  333. package/dist/api/resources/conversationalAi/resources/phoneNumbers/client/Client.d.ts +12 -12
  334. package/dist/api/resources/conversationalAi/resources/phoneNumbers/client/Client.js +79 -83
  335. package/dist/api/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
  336. package/dist/api/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
  337. package/dist/api/resources/conversationalAi/resources/secrets/client/Client.js +7 -11
  338. package/dist/api/resources/conversationalAi/resources/settings/client/Client.js +5 -9
  339. package/dist/api/resources/conversationalAi/resources/sipTrunk/client/Client.js +3 -7
  340. package/dist/api/resources/conversationalAi/resources/tools/client/Client.js +13 -17
  341. package/dist/api/resources/conversationalAi/resources/twilio/client/Client.js +3 -7
  342. package/dist/api/resources/dubbing/client/Client.js +7 -11
  343. package/dist/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +5 -5
  344. package/dist/api/resources/dubbing/resources/audio/client/Client.js +3 -7
  345. package/dist/api/resources/dubbing/resources/resource/client/Client.js +11 -15
  346. package/dist/api/resources/dubbing/resources/resource/resources/language/client/Client.js +3 -7
  347. package/dist/api/resources/dubbing/resources/resource/resources/segment/client/Client.js +5 -9
  348. package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/Client.js +5 -9
  349. package/dist/api/resources/dubbing/resources/resource/resources/speaker/resources/segment/client/Client.js +3 -7
  350. package/dist/api/resources/dubbing/resources/transcript/client/Client.js +3 -7
  351. package/dist/api/resources/forcedAlignment/client/Client.js +3 -7
  352. package/dist/api/resources/forcedAlignment/client/requests/BodyCreateForcedAlignmentV1ForcedAlignmentPost.d.ts +2 -2
  353. package/dist/api/resources/history/client/Client.js +17 -16
  354. package/dist/api/resources/index.d.ts +0 -1
  355. package/dist/api/resources/index.js +0 -1
  356. package/dist/api/resources/models/client/Client.js +3 -7
  357. package/dist/api/resources/pronunciationDictionaries/client/Client.js +13 -17
  358. package/dist/api/resources/pronunciationDictionaries/client/requests/BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromFilePost.d.ts +2 -2
  359. package/dist/api/resources/pronunciationDictionaries/resources/rules/client/Client.js +5 -9
  360. package/dist/api/resources/samples/client/Client.js +3 -7
  361. package/dist/api/resources/speechToSpeech/client/Client.js +5 -9
  362. package/dist/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPost.d.ts +2 -2
  363. package/dist/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost.d.ts +2 -2
  364. package/dist/api/resources/speechToText/client/Client.d.ts +3 -1
  365. package/dist/api/resources/speechToText/client/Client.js +14 -12
  366. package/dist/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +6 -2
  367. package/dist/api/resources/studio/client/Client.js +3 -7
  368. package/dist/api/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +6 -0
  369. package/dist/api/resources/studio/resources/projects/client/Client.js +13 -17
  370. package/dist/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.d.ts +9 -3
  371. package/dist/api/resources/studio/resources/projects/resources/chapters/client/Client.js +13 -17
  372. package/dist/api/resources/studio/resources/projects/resources/chapters/resources/snapshots/client/Client.js +7 -11
  373. package/dist/api/resources/studio/resources/projects/resources/content/client/Client.js +6 -7
  374. package/dist/api/resources/studio/resources/projects/resources/content/client/requests/BodyUpdateStudioProjectContentV1StudioProjectsProjectIdContentPost.d.ts +10 -2
  375. package/dist/api/resources/studio/resources/projects/resources/pronunciationDictionaries/client/Client.js +3 -7
  376. package/dist/api/resources/studio/resources/projects/resources/snapshots/client/Client.js +9 -13
  377. package/dist/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +2 -1
  378. package/dist/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -0
  379. package/dist/api/resources/textToDialogue/client/Client.js +5 -9
  380. package/dist/api/resources/textToSoundEffects/client/Client.js +3 -7
  381. package/dist/api/resources/textToSpeech/client/Client.js +9 -13
  382. package/dist/api/resources/textToVoice/client/Client.d.ts +3 -0
  383. package/dist/api/resources/textToVoice/client/Client.js +14 -13
  384. package/dist/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +2 -0
  385. package/dist/api/resources/textToVoice/index.d.ts +1 -0
  386. package/dist/api/resources/textToVoice/index.js +1 -0
  387. package/dist/api/resources/textToVoice/resources/index.d.ts +1 -0
  388. package/dist/api/resources/textToVoice/resources/index.js +37 -0
  389. package/dist/api/resources/textToVoice/resources/preview/client/Client.d.ts +38 -0
  390. package/dist/api/resources/textToVoice/resources/preview/client/Client.js +116 -0
  391. package/dist/api/resources/textToVoice/resources/preview/client/index.d.ts +1 -0
  392. package/dist/api/resources/textToVoice/resources/preview/client/index.js +2 -0
  393. package/dist/api/resources/textToVoice/resources/preview/index.d.ts +1 -0
  394. package/dist/api/resources/textToVoice/resources/preview/index.js +17 -0
  395. package/dist/api/resources/usage/client/Client.js +3 -7
  396. package/dist/api/resources/user/client/Client.js +3 -7
  397. package/dist/api/resources/user/resources/subscription/client/Client.js +3 -7
  398. package/dist/api/resources/voices/client/Client.js +17 -21
  399. package/dist/api/resources/voices/client/requests/BodyEditVoiceV1VoicesVoiceIdEditPost.d.ts +2 -2
  400. package/dist/api/resources/voices/client/requests/BodyGetSimilarLibraryVoicesV1SimilarVoicesPost.d.ts +2 -2
  401. package/dist/api/resources/voices/resources/ivc/client/Client.js +3 -7
  402. package/dist/api/resources/voices/resources/ivc/client/requests/BodyAddVoiceV1VoicesAddPost.d.ts +2 -2
  403. package/dist/api/resources/voices/resources/pvc/client/Client.js +7 -11
  404. package/dist/api/resources/voices/resources/pvc/resources/samples/client/Client.js +7 -11
  405. package/dist/api/resources/voices/resources/pvc/resources/samples/client/requests/BodyAddSamplesToPvcVoiceV1VoicesPvcVoiceIdSamplesPost.d.ts +2 -2
  406. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.d.ts +5 -2
  407. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.js +17 -12
  408. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/index.d.ts +1 -0
  409. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/index.js +15 -0
  410. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/AudioGetRequest.d.ts +15 -0
  411. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/AudioGetRequest.js +5 -0
  412. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/index.d.ts +1 -0
  413. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/index.js +2 -0
  414. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/index.d.ts +1 -0
  415. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/index.js +4 -0
  416. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/speakers/client/Client.js +5 -9
  417. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/speakers/resources/audio/client/Client.js +3 -7
  418. package/dist/api/resources/voices/resources/pvc/resources/samples/resources/waveform/client/Client.js +3 -7
  419. package/dist/api/resources/voices/resources/pvc/resources/verification/client/Client.js +3 -7
  420. package/dist/api/resources/voices/resources/pvc/resources/verification/client/requests/BodyRequestManualVerificationV1VoicesPvcVoiceIdVerificationPost.d.ts +2 -2
  421. package/dist/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/Client.js +5 -9
  422. package/dist/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/requests/BodyVerifyPvcVoiceCaptchaV1VoicesPvcVoiceIdCaptchaPost.d.ts +2 -2
  423. package/dist/api/resources/voices/resources/samples/resources/audio/client/Client.js +3 -7
  424. package/dist/api/resources/voices/resources/settings/client/Client.js +7 -11
  425. package/dist/api/resources/webhooks/client/Client.js +3 -7
  426. package/dist/api/resources/workspace/client/Client.d.ts +0 -67
  427. package/dist/api/resources/workspace/client/Client.js +0 -326
  428. package/dist/api/resources/workspace/client/index.d.ts +0 -1
  429. package/dist/api/resources/workspace/client/index.js +0 -15
  430. package/dist/api/resources/workspace/resources/groups/client/Client.js +3 -7
  431. package/dist/api/resources/workspace/resources/groups/resources/members/client/Client.js +5 -9
  432. package/dist/api/resources/workspace/resources/invites/client/Client.js +7 -11
  433. package/dist/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +3 -1
  434. package/dist/api/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
  435. package/dist/api/resources/workspace/resources/members/client/Client.js +5 -9
  436. package/dist/api/resources/workspace/resources/resources/client/Client.js +7 -11
  437. package/dist/api/types/AddProjectRequest.d.ts +7 -1
  438. package/dist/api/types/AgentConfig.d.ts +1 -10
  439. package/dist/api/types/AgentTransfer.d.ts +3 -0
  440. package/dist/api/types/AuthConnectionLocator.d.ts +9 -0
  441. package/dist/api/types/AuthConnectionLocator.js +5 -0
  442. package/dist/api/types/BadRequestErrorBody.d.ts +7 -0
  443. package/dist/api/types/BadRequestErrorBody.js +5 -0
  444. package/dist/api/types/BodyAddProjectV1ProjectsAddPostSourceType.d.ts +2 -1
  445. package/dist/api/types/BodyAddProjectV1ProjectsAddPostSourceType.js +1 -0
  446. package/dist/api/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +6 -0
  447. package/dist/api/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.d.ts +8 -0
  448. package/dist/api/types/BreakdownTypes.d.ts +4 -1
  449. package/dist/api/types/BreakdownTypes.js +3 -0
  450. package/dist/api/types/BuiltInToolsInput.d.ts +2 -0
  451. package/dist/api/types/BuiltInToolsOutput.d.ts +2 -0
  452. package/dist/api/types/ChapterResponse.d.ts +2 -0
  453. package/dist/api/types/ChapterWithContentResponseModel.d.ts +2 -0
  454. package/dist/api/types/ClientToolConfigInput.d.ts +1 -1
  455. package/dist/api/types/ClientToolConfigOutput.d.ts +1 -1
  456. package/dist/api/types/ConvAiWebhooks.d.ts +2 -0
  457. package/dist/api/types/ConversationHistoryElevenAssistantCommonModel.d.ts +6 -0
  458. package/dist/api/types/ConversationHistoryElevenAssistantCommonModel.js +5 -0
  459. package/dist/api/types/ConversationHistoryMetadataCommonModel.d.ts +3 -0
  460. package/dist/api/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +4 -1
  461. package/dist/api/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +13 -0
  462. package/dist/api/types/ConversationHistoryTranscriptToolCallMcpDetails.js +5 -0
  463. package/dist/api/types/ConversationInitiationClientDataInternal.d.ts +2 -0
  464. package/dist/api/types/ConversationInitiationClientDataRequestInput.d.ts +2 -0
  465. package/dist/api/types/ConversationInitiationClientDataRequestOutput.d.ts +2 -0
  466. package/dist/api/types/ConversationInitiationSource.d.ts +20 -0
  467. package/dist/api/types/ConversationInitiationSource.js +19 -0
  468. package/dist/api/types/ConversationSimulationSpecification.d.ts +1 -1
  469. package/dist/api/types/ConversationalConfig.d.ts +1 -1
  470. package/dist/api/types/CreateSipTrunkPhoneNumberRequest.d.ts +2 -21
  471. package/dist/api/types/ForcedAlignmentResponseModel.d.ts +2 -0
  472. package/dist/api/types/ForcedAlignmentWordResponseModel.d.ts +2 -0
  473. package/dist/api/types/GetConversationResponseModel.d.ts +1 -0
  474. package/dist/api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +15 -0
  475. package/dist/api/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js +5 -0
  476. package/dist/api/types/{SipTrunkConfigResponseModel.d.ts → GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +1 -1
  477. package/dist/api/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.js +5 -0
  478. package/dist/api/types/GetPhoneNumberSipTrunkResponseModel.d.ts +5 -1
  479. package/dist/api/types/InboundSipTrunkConfigRequestModel.d.ts +14 -0
  480. package/dist/api/types/InboundSipTrunkConfigRequestModel.js +5 -0
  481. package/dist/api/types/MetricType.d.ts +2 -1
  482. package/dist/api/types/MetricType.js +1 -0
  483. package/dist/api/types/OutboundSipTrunkConfigRequestModel.d.ts +16 -0
  484. package/dist/api/types/OutboundSipTrunkConfigRequestModel.js +5 -0
  485. package/dist/api/types/PhoneNumberTransfer.d.ts +4 -1
  486. package/dist/api/types/PhoneNumberTransferDestination.d.ts +6 -0
  487. package/dist/api/types/PhoneNumberTransferDestination.js +5 -0
  488. package/dist/api/types/PhoneNumberTransferTransferDestination.d.ts +13 -0
  489. package/dist/api/types/PhoneNumberTransferTransferDestination.js +5 -0
  490. package/dist/api/types/PlayDtmfToolConfig.d.ts +11 -0
  491. package/dist/api/types/PlayDtmfToolConfig.js +5 -0
  492. package/dist/api/types/ProjectExtendedResponse.d.ts +2 -2
  493. package/dist/api/types/ProjectExtendedResponseModelSourceType.d.ts +2 -1
  494. package/dist/api/types/ProjectExtendedResponseModelSourceType.js +1 -0
  495. package/dist/api/types/ProjectResponseModelSourceType.d.ts +2 -1
  496. package/dist/api/types/ProjectResponseModelSourceType.js +1 -0
  497. package/dist/api/types/PromptAgentApiModelInput.d.ts +1 -1
  498. package/dist/api/types/PromptAgentApiModelOutput.d.ts +1 -1
  499. package/dist/api/types/PromptAgentDbModel.d.ts +0 -26
  500. package/dist/api/types/{SipTrunkCredentials.d.ts → SipTrunkCredentialsRequestModel.d.ts} +1 -1
  501. package/dist/api/types/SipTrunkCredentialsRequestModel.js +5 -0
  502. package/dist/api/types/SipUriTransferDestination.d.ts +6 -0
  503. package/dist/api/types/SipUriTransferDestination.js +5 -0
  504. package/dist/api/types/SubscriptionStatusType.d.ts +1 -3
  505. package/dist/api/types/SubscriptionStatusType.js +0 -2
  506. package/dist/api/types/SystemToolConfigInputParams.d.ts +5 -2
  507. package/dist/api/types/SystemToolConfigOutputParams.d.ts +5 -2
  508. package/dist/api/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +1 -1
  509. package/dist/api/types/TransferToNumberToolConfigInput.js +5 -0
  510. package/dist/api/types/TransferToNumberToolConfigOutput.d.ts +9 -0
  511. package/dist/api/types/TransferToNumberToolConfigOutput.js +5 -0
  512. package/dist/api/types/TransferTypeEnum.d.ts +8 -0
  513. package/dist/api/types/TransferTypeEnum.js +10 -0
  514. package/dist/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  515. package/dist/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  516. package/dist/api/types/WidgetTextContents.d.ts +8 -0
  517. package/dist/api/types/WorkspaceResourceType.d.ts +3 -1
  518. package/dist/api/types/WorkspaceResourceType.js +2 -0
  519. package/dist/api/types/index.d.ts +18 -8
  520. package/dist/api/types/index.js +18 -8
  521. package/dist/core/fetcher/BinaryResponse.d.ts +20 -0
  522. package/dist/core/fetcher/BinaryResponse.js +17 -0
  523. package/dist/core/fetcher/Fetcher.d.ts +1 -1
  524. package/dist/core/fetcher/Fetcher.js +3 -3
  525. package/dist/core/fetcher/ResponseWithBody.d.ts +4 -0
  526. package/dist/core/fetcher/ResponseWithBody.js +6 -0
  527. package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
  528. package/dist/core/fetcher/createRequestUrl.js +3 -7
  529. package/dist/core/fetcher/getErrorResponseBody.d.ts +1 -0
  530. package/dist/core/fetcher/getErrorResponseBody.js +44 -0
  531. package/dist/core/fetcher/getFetchFn.js +3 -3
  532. package/dist/core/fetcher/getResponseBody.js +34 -32
  533. package/dist/core/fetcher/index.d.ts +1 -0
  534. package/dist/core/file.d.ts +1 -0
  535. package/dist/core/file.js +2 -0
  536. package/dist/core/form-data-utils/FormDataWrapper.d.ts +5 -52
  537. package/dist/core/form-data-utils/FormDataWrapper.js +105 -125
  538. package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +0 -3
  539. package/dist/core/form-data-utils/encodeAsFormParameter.js +2 -8
  540. package/dist/core/headers.d.ts +1 -1
  541. package/dist/core/index.d.ts +2 -0
  542. package/dist/core/index.js +3 -1
  543. package/dist/core/url/index.d.ts +2 -0
  544. package/dist/core/url/index.js +7 -0
  545. package/dist/core/url/join.d.ts +1 -0
  546. package/dist/core/url/join.js +49 -0
  547. package/dist/core/url/qs.d.ts +6 -0
  548. package/dist/core/url/qs.js +64 -0
  549. package/dist/environments.d.ts +5 -1
  550. package/dist/environments.js +4 -0
  551. package/dist/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
  552. package/dist/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
  553. package/dist/serialization/resources/index.d.ts +0 -1
  554. package/dist/serialization/resources/index.js +0 -1
  555. package/dist/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +3 -0
  556. package/dist/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.js +3 -0
  557. package/dist/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +1 -1
  558. package/dist/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -1
  559. package/dist/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +1 -0
  560. package/dist/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.js +1 -0
  561. package/dist/serialization/resources/workspace/index.d.ts +0 -1
  562. package/dist/serialization/resources/workspace/index.js +0 -1
  563. package/dist/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +1 -1
  564. package/dist/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
  565. package/dist/serialization/types/AgentConfig.d.ts +2 -9
  566. package/dist/serialization/types/AgentConfig.js +1 -8
  567. package/dist/serialization/types/AgentTransfer.d.ts +3 -0
  568. package/dist/serialization/types/AgentTransfer.js +3 -0
  569. package/dist/serialization/types/AuthConnectionLocator.d.ts +12 -0
  570. package/{serialization/resources/workspace/client/getShareOptions.js → dist/serialization/types/AuthConnectionLocator.js} +5 -4
  571. package/dist/serialization/types/BadRequestErrorBody.d.ts +13 -0
  572. package/dist/serialization/{resources/workspace/client/getShareOptions.js → types/BadRequestErrorBody.js} +6 -4
  573. package/dist/serialization/types/BodyAddProjectV1ProjectsAddPostSourceType.d.ts +1 -1
  574. package/dist/serialization/types/BodyAddProjectV1ProjectsAddPostSourceType.js +1 -1
  575. package/dist/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +3 -0
  576. package/dist/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.js +3 -0
  577. package/dist/serialization/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.d.ts +1 -0
  578. package/dist/serialization/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.js +1 -0
  579. package/dist/serialization/types/BreakdownTypes.d.ts +1 -1
  580. package/dist/serialization/types/BreakdownTypes.js +3 -0
  581. package/dist/serialization/types/BuiltInToolsInput.d.ts +1 -0
  582. package/dist/serialization/types/BuiltInToolsInput.js +1 -0
  583. package/dist/serialization/types/BuiltInToolsOutput.d.ts +1 -0
  584. package/dist/serialization/types/BuiltInToolsOutput.js +1 -0
  585. package/dist/serialization/types/ChapterResponse.d.ts +1 -0
  586. package/dist/serialization/types/ChapterResponse.js +1 -0
  587. package/dist/serialization/types/ChapterWithContentResponseModel.d.ts +1 -0
  588. package/dist/serialization/types/ChapterWithContentResponseModel.js +1 -0
  589. package/dist/serialization/types/ConvAiWebhooks.d.ts +1 -0
  590. package/dist/serialization/types/ConvAiWebhooks.js +1 -0
  591. package/dist/serialization/types/ConversationHistoryElevenAssistantCommonModel.d.ts +12 -0
  592. package/{serialization/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.js → dist/serialization/types/ConversationHistoryElevenAssistantCommonModel.js} +3 -3
  593. package/dist/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +5 -0
  594. package/dist/serialization/types/ConversationHistoryMetadataCommonModel.js +5 -0
  595. package/dist/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +5 -1
  596. package/dist/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.js +2 -0
  597. package/dist/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +19 -0
  598. package/dist/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.js +50 -0
  599. package/dist/serialization/types/ConversationInitiationClientDataInternal.d.ts +1 -0
  600. package/dist/serialization/types/ConversationInitiationClientDataInternal.js +1 -0
  601. package/dist/serialization/types/ConversationInitiationClientDataRequestInput.d.ts +1 -0
  602. package/dist/serialization/types/ConversationInitiationClientDataRequestInput.js +1 -0
  603. package/dist/serialization/types/ConversationInitiationClientDataRequestOutput.d.ts +1 -0
  604. package/dist/serialization/types/ConversationInitiationClientDataRequestOutput.js +1 -0
  605. package/dist/serialization/types/ConversationInitiationSource.d.ts +10 -0
  606. package/dist/serialization/types/ConversationInitiationSource.js +53 -0
  607. package/dist/serialization/types/ConversationSimulationSpecification.d.ts +1 -1
  608. package/dist/serialization/types/ConversationalConfig.d.ts +1 -1
  609. package/dist/serialization/types/CreateSipTrunkPhoneNumberRequest.d.ts +4 -10
  610. package/dist/serialization/types/CreateSipTrunkPhoneNumberRequest.js +4 -10
  611. package/dist/serialization/types/ForcedAlignmentResponseModel.d.ts +1 -0
  612. package/dist/serialization/types/ForcedAlignmentResponseModel.js +1 -0
  613. package/dist/serialization/types/ForcedAlignmentWordResponseModel.d.ts +1 -0
  614. package/dist/serialization/types/ForcedAlignmentWordResponseModel.js +1 -0
  615. package/dist/serialization/types/GetConversationResponseModel.d.ts +1 -0
  616. package/dist/serialization/types/GetConversationResponseModel.js +1 -0
  617. package/dist/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +17 -0
  618. package/dist/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js +48 -0
  619. package/dist/serialization/types/{SipTrunkConfigResponseModel.d.ts → GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +2 -2
  620. package/{serialization/types/SipTrunkConfigResponseModel.js → dist/serialization/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.js} +2 -2
  621. package/dist/serialization/types/GetPhoneNumberSipTrunkResponseModel.d.ts +5 -2
  622. package/dist/serialization/types/GetPhoneNumberSipTrunkResponseModel.js +5 -2
  623. package/dist/serialization/types/InboundSipTrunkConfigRequestModel.d.ts +17 -0
  624. package/dist/serialization/types/InboundSipTrunkConfigRequestModel.js +48 -0
  625. package/dist/serialization/types/MetricType.d.ts +1 -1
  626. package/dist/serialization/types/MetricType.js +9 -1
  627. package/dist/serialization/types/OutboundSipTrunkConfigRequestModel.d.ts +19 -0
  628. package/dist/serialization/types/OutboundSipTrunkConfigRequestModel.js +50 -0
  629. package/dist/serialization/types/PhoneNumberTransfer.d.ts +5 -1
  630. package/dist/serialization/types/PhoneNumberTransfer.js +5 -1
  631. package/dist/serialization/types/PhoneNumberTransferDestination.d.ts +12 -0
  632. package/dist/serialization/types/PhoneNumberTransferDestination.js +43 -0
  633. package/dist/serialization/types/PhoneNumberTransferTransferDestination.d.ts +18 -0
  634. package/dist/serialization/types/{DefaultSharingPreferencesResponseModel.js → PhoneNumberTransferTransferDestination.js} +11 -4
  635. package/dist/serialization/types/PlayDtmfToolConfig.d.ts +11 -0
  636. package/dist/serialization/types/PlayDtmfToolConfig.js +41 -0
  637. package/dist/serialization/types/ProjectExtendedResponse.d.ts +1 -1
  638. package/dist/serialization/types/ProjectExtendedResponse.js +1 -1
  639. package/dist/serialization/types/ProjectExtendedResponseModelSourceType.d.ts +1 -1
  640. package/dist/serialization/types/ProjectExtendedResponseModelSourceType.js +1 -1
  641. package/dist/serialization/types/ProjectResponseModelSourceType.d.ts +1 -1
  642. package/dist/serialization/types/ProjectResponseModelSourceType.js +1 -1
  643. package/dist/serialization/types/PromptAgentDbModel.d.ts +0 -18
  644. package/dist/serialization/types/PromptAgentDbModel.js +0 -18
  645. package/dist/serialization/types/{SipTrunkCredentials.d.ts → SipTrunkCredentialsRequestModel.d.ts} +2 -2
  646. package/{serialization/types/SipTrunkCredentials.js → dist/serialization/types/SipTrunkCredentialsRequestModel.js} +2 -2
  647. package/dist/serialization/types/SipUriTransferDestination.d.ts +12 -0
  648. package/dist/serialization/types/SipUriTransferDestination.js +43 -0
  649. package/dist/serialization/types/SubscriptionStatusType.d.ts +1 -1
  650. package/dist/serialization/types/SubscriptionStatusType.js +1 -10
  651. package/dist/serialization/types/SystemToolConfigInputParams.d.ts +7 -3
  652. package/dist/serialization/types/SystemToolConfigInputParams.js +4 -2
  653. package/dist/serialization/types/SystemToolConfigOutputParams.d.ts +7 -3
  654. package/dist/serialization/types/SystemToolConfigOutputParams.js +4 -2
  655. package/dist/serialization/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +2 -2
  656. package/{serialization/types/TransferToNumberToolConfig.js → dist/serialization/types/TransferToNumberToolConfigInput.js} +2 -2
  657. package/dist/serialization/types/TransferToNumberToolConfigOutput.d.ts +14 -0
  658. package/dist/serialization/types/TransferToNumberToolConfigOutput.js +45 -0
  659. package/dist/serialization/types/TransferTypeEnum.d.ts +10 -0
  660. package/dist/serialization/types/TransferTypeEnum.js +41 -0
  661. package/dist/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  662. package/dist/serialization/types/WebhookToolApiSchemaConfigInput.js +2 -0
  663. package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  664. package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.js +2 -0
  665. package/dist/serialization/types/WidgetTextContents.d.ts +4 -0
  666. package/dist/serialization/types/WidgetTextContents.js +4 -0
  667. package/dist/serialization/types/WorkspaceResourceType.d.ts +1 -1
  668. package/dist/serialization/types/WorkspaceResourceType.js +2 -0
  669. package/dist/serialization/types/index.d.ts +18 -8
  670. package/dist/serialization/types/index.js +18 -8
  671. package/dist/version.d.ts +1 -1
  672. package/dist/version.js +1 -1
  673. package/environments.d.ts +5 -1
  674. package/environments.js +4 -0
  675. package/jest.config.mjs +37 -4
  676. package/package.json +23 -24
  677. package/reference.md +66 -288
  678. package/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.d.ts +1 -1
  679. package/serialization/resources/conversationalAi/resources/phoneNumbers/types/index.js +1 -1
  680. package/serialization/resources/index.d.ts +0 -1
  681. package/serialization/resources/index.js +0 -1
  682. package/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.d.ts +3 -0
  683. package/serialization/resources/studio/client/requests/BodyCreatePodcastV1StudioPodcastsPost.js +3 -0
  684. package/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +1 -1
  685. package/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -1
  686. package/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +1 -0
  687. package/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.js +1 -0
  688. package/serialization/resources/workspace/index.d.ts +0 -1
  689. package/serialization/resources/workspace/index.js +0 -1
  690. package/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.d.ts +1 -1
  691. package/serialization/resources/workspace/resources/invites/types/BodyInviteUserV1WorkspaceInvitesAddPostWorkspacePermission.js +2 -0
  692. package/serialization/types/AgentConfig.d.ts +2 -9
  693. package/serialization/types/AgentConfig.js +1 -8
  694. package/serialization/types/AgentTransfer.d.ts +3 -0
  695. package/serialization/types/AgentTransfer.js +3 -0
  696. package/serialization/types/AuthConnectionLocator.d.ts +12 -0
  697. package/serialization/types/AuthConnectionLocator.js +43 -0
  698. package/serialization/types/BadRequestErrorBody.d.ts +13 -0
  699. package/serialization/types/BadRequestErrorBody.js +44 -0
  700. package/serialization/types/BodyAddProjectV1ProjectsAddPostSourceType.d.ts +1 -1
  701. package/serialization/types/BodyAddProjectV1ProjectsAddPostSourceType.js +1 -1
  702. package/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.d.ts +3 -0
  703. package/serialization/types/BodyCreatePodcastV1ProjectsPodcastCreatePost.js +3 -0
  704. package/serialization/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.d.ts +1 -0
  705. package/serialization/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.js +1 -0
  706. package/serialization/types/BreakdownTypes.d.ts +1 -1
  707. package/serialization/types/BreakdownTypes.js +3 -0
  708. package/serialization/types/BuiltInToolsInput.d.ts +1 -0
  709. package/serialization/types/BuiltInToolsInput.js +1 -0
  710. package/serialization/types/BuiltInToolsOutput.d.ts +1 -0
  711. package/serialization/types/BuiltInToolsOutput.js +1 -0
  712. package/serialization/types/ChapterResponse.d.ts +1 -0
  713. package/serialization/types/ChapterResponse.js +1 -0
  714. package/serialization/types/ChapterWithContentResponseModel.d.ts +1 -0
  715. package/serialization/types/ChapterWithContentResponseModel.js +1 -0
  716. package/serialization/types/ConvAiWebhooks.d.ts +1 -0
  717. package/serialization/types/ConvAiWebhooks.js +1 -0
  718. package/serialization/types/ConversationHistoryElevenAssistantCommonModel.d.ts +12 -0
  719. package/{dist/serialization/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.js → serialization/types/ConversationHistoryElevenAssistantCommonModel.js} +3 -3
  720. package/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +5 -0
  721. package/serialization/types/ConversationHistoryMetadataCommonModel.js +5 -0
  722. package/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.d.ts +5 -1
  723. package/serialization/types/ConversationHistoryTranscriptToolCallCommonModelToolDetails.js +2 -0
  724. package/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.d.ts +19 -0
  725. package/serialization/types/ConversationHistoryTranscriptToolCallMcpDetails.js +50 -0
  726. package/serialization/types/ConversationInitiationClientDataInternal.d.ts +1 -0
  727. package/serialization/types/ConversationInitiationClientDataInternal.js +1 -0
  728. package/serialization/types/ConversationInitiationClientDataRequestInput.d.ts +1 -0
  729. package/serialization/types/ConversationInitiationClientDataRequestInput.js +1 -0
  730. package/serialization/types/ConversationInitiationClientDataRequestOutput.d.ts +1 -0
  731. package/serialization/types/ConversationInitiationClientDataRequestOutput.js +1 -0
  732. package/serialization/types/ConversationInitiationSource.d.ts +10 -0
  733. package/serialization/types/ConversationInitiationSource.js +53 -0
  734. package/serialization/types/ConversationSimulationSpecification.d.ts +1 -1
  735. package/serialization/types/ConversationalConfig.d.ts +1 -1
  736. package/serialization/types/CreateSipTrunkPhoneNumberRequest.d.ts +4 -10
  737. package/serialization/types/CreateSipTrunkPhoneNumberRequest.js +4 -10
  738. package/serialization/types/ForcedAlignmentResponseModel.d.ts +1 -0
  739. package/serialization/types/ForcedAlignmentResponseModel.js +1 -0
  740. package/serialization/types/ForcedAlignmentWordResponseModel.d.ts +1 -0
  741. package/serialization/types/ForcedAlignmentWordResponseModel.js +1 -0
  742. package/serialization/types/GetConversationResponseModel.d.ts +1 -0
  743. package/serialization/types/GetConversationResponseModel.js +1 -0
  744. package/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.d.ts +17 -0
  745. package/serialization/types/GetPhoneNumberInboundSipTrunkConfigResponseModel.js +48 -0
  746. package/serialization/types/{SipTrunkConfigResponseModel.d.ts → GetPhoneNumberOutboundSipTrunkConfigResponseModel.d.ts} +2 -2
  747. package/{dist/serialization/types/SipTrunkConfigResponseModel.js → serialization/types/GetPhoneNumberOutboundSipTrunkConfigResponseModel.js} +2 -2
  748. package/serialization/types/GetPhoneNumberSipTrunkResponseModel.d.ts +5 -2
  749. package/serialization/types/GetPhoneNumberSipTrunkResponseModel.js +5 -2
  750. package/serialization/types/InboundSipTrunkConfigRequestModel.d.ts +17 -0
  751. package/serialization/types/InboundSipTrunkConfigRequestModel.js +48 -0
  752. package/serialization/types/MetricType.d.ts +1 -1
  753. package/serialization/types/MetricType.js +9 -1
  754. package/serialization/types/OutboundSipTrunkConfigRequestModel.d.ts +19 -0
  755. package/serialization/types/OutboundSipTrunkConfigRequestModel.js +50 -0
  756. package/serialization/types/PhoneNumberTransfer.d.ts +5 -1
  757. package/serialization/types/PhoneNumberTransfer.js +5 -1
  758. package/serialization/types/PhoneNumberTransferDestination.d.ts +12 -0
  759. package/serialization/types/PhoneNumberTransferDestination.js +43 -0
  760. package/serialization/types/PhoneNumberTransferTransferDestination.d.ts +18 -0
  761. package/serialization/types/PhoneNumberTransferTransferDestination.js +51 -0
  762. package/serialization/types/PlayDtmfToolConfig.d.ts +11 -0
  763. package/serialization/types/PlayDtmfToolConfig.js +41 -0
  764. package/serialization/types/ProjectExtendedResponse.d.ts +1 -1
  765. package/serialization/types/ProjectExtendedResponse.js +1 -1
  766. package/serialization/types/ProjectExtendedResponseModelSourceType.d.ts +1 -1
  767. package/serialization/types/ProjectExtendedResponseModelSourceType.js +1 -1
  768. package/serialization/types/ProjectResponseModelSourceType.d.ts +1 -1
  769. package/serialization/types/ProjectResponseModelSourceType.js +1 -1
  770. package/serialization/types/PromptAgentDbModel.d.ts +0 -18
  771. package/serialization/types/PromptAgentDbModel.js +0 -18
  772. package/serialization/types/{SipTrunkCredentials.d.ts → SipTrunkCredentialsRequestModel.d.ts} +2 -2
  773. package/{dist/serialization/types/SipTrunkCredentials.js → serialization/types/SipTrunkCredentialsRequestModel.js} +2 -2
  774. package/serialization/types/SipUriTransferDestination.d.ts +12 -0
  775. package/serialization/types/SipUriTransferDestination.js +43 -0
  776. package/serialization/types/SubscriptionStatusType.d.ts +1 -1
  777. package/serialization/types/SubscriptionStatusType.js +1 -10
  778. package/serialization/types/SystemToolConfigInputParams.d.ts +7 -3
  779. package/serialization/types/SystemToolConfigInputParams.js +4 -2
  780. package/serialization/types/SystemToolConfigOutputParams.d.ts +7 -3
  781. package/serialization/types/SystemToolConfigOutputParams.js +4 -2
  782. package/serialization/types/{TransferToNumberToolConfig.d.ts → TransferToNumberToolConfigInput.d.ts} +2 -2
  783. package/{dist/serialization/types/TransferToNumberToolConfig.js → serialization/types/TransferToNumberToolConfigInput.js} +2 -2
  784. package/serialization/types/TransferToNumberToolConfigOutput.d.ts +14 -0
  785. package/serialization/types/TransferToNumberToolConfigOutput.js +45 -0
  786. package/serialization/types/TransferTypeEnum.d.ts +10 -0
  787. package/serialization/types/TransferTypeEnum.js +41 -0
  788. package/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
  789. package/serialization/types/WebhookToolApiSchemaConfigInput.js +2 -0
  790. package/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
  791. package/serialization/types/WebhookToolApiSchemaConfigOutput.js +2 -0
  792. package/serialization/types/WidgetTextContents.d.ts +4 -0
  793. package/serialization/types/WidgetTextContents.js +4 -0
  794. package/serialization/types/WorkspaceResourceType.d.ts +1 -1
  795. package/serialization/types/WorkspaceResourceType.js +2 -0
  796. package/serialization/types/index.d.ts +18 -8
  797. package/serialization/types/index.js +18 -8
  798. package/version.d.ts +1 -1
  799. package/version.js +1 -1
  800. package/api/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +0 -13
  801. package/api/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.d.ts +0 -12
  802. package/api/resources/workspace/client/requests/index.d.ts +0 -2
  803. package/api/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.d.ts +0 -7
  804. package/api/types/DefaultSharingPreferencesResponseModel.d.ts +0 -8
  805. package/api/types/WorkspaceGroupPermission.d.ts +0 -22
  806. package/api/types/WorkspaceGroupPermission.js +0 -24
  807. package/api/types/WorkspaceGroupResponseModel.d.ts +0 -10
  808. package/core/form-data-utils/toReadableStream.d.ts +0 -1
  809. package/core/form-data-utils/toReadableStream.js +0 -28
  810. package/dist/api/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +0 -13
  811. package/dist/api/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.d.ts +0 -12
  812. package/dist/api/resources/workspace/client/requests/index.d.ts +0 -2
  813. package/dist/api/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.d.ts +0 -7
  814. package/dist/api/types/DefaultSharingPreferencesResponseModel.d.ts +0 -8
  815. package/dist/api/types/WorkspaceGroupPermission.d.ts +0 -22
  816. package/dist/api/types/WorkspaceGroupPermission.js +0 -24
  817. package/dist/api/types/WorkspaceGroupResponseModel.d.ts +0 -10
  818. package/dist/core/form-data-utils/toReadableStream.d.ts +0 -1
  819. package/dist/core/form-data-utils/toReadableStream.js +0 -28
  820. package/dist/serialization/resources/workspace/client/getShareOptions.d.ts +0 -11
  821. package/dist/serialization/resources/workspace/client/index.d.ts +0 -2
  822. package/dist/serialization/resources/workspace/client/index.js +0 -41
  823. package/dist/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +0 -12
  824. package/dist/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js +0 -43
  825. package/dist/serialization/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.d.ts +0 -12
  826. package/dist/serialization/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.js +0 -43
  827. package/dist/serialization/resources/workspace/client/requests/index.d.ts +0 -2
  828. package/dist/serialization/resources/workspace/client/requests/index.js +0 -7
  829. package/dist/serialization/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.d.ts +0 -12
  830. package/dist/serialization/types/DefaultSharingPreferencesResponseModel.d.ts +0 -13
  831. package/dist/serialization/types/WorkspaceGroupPermission.d.ts +0 -10
  832. package/dist/serialization/types/WorkspaceGroupPermission.js +0 -58
  833. package/dist/serialization/types/WorkspaceGroupResponseModel.d.ts +0 -16
  834. package/dist/serialization/types/WorkspaceGroupResponseModel.js +0 -47
  835. package/runtime-tests/cf-worker/package.json +0 -17
  836. package/runtime-tests/cf-worker/wrangler.toml +0 -4
  837. package/serialization/resources/workspace/client/getShareOptions.d.ts +0 -11
  838. package/serialization/resources/workspace/client/index.d.ts +0 -2
  839. package/serialization/resources/workspace/client/index.js +0 -41
  840. package/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +0 -12
  841. package/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js +0 -43
  842. package/serialization/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.d.ts +0 -12
  843. package/serialization/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.js +0 -43
  844. package/serialization/resources/workspace/client/requests/index.d.ts +0 -2
  845. package/serialization/resources/workspace/client/requests/index.js +0 -7
  846. package/serialization/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.d.ts +0 -12
  847. package/serialization/types/DefaultSharingPreferencesResponseModel.d.ts +0 -13
  848. package/serialization/types/DefaultSharingPreferencesResponseModel.js +0 -44
  849. package/serialization/types/WorkspaceGroupPermission.d.ts +0 -10
  850. package/serialization/types/WorkspaceGroupPermission.js +0 -58
  851. package/serialization/types/WorkspaceGroupResponseModel.d.ts +0 -16
  852. package/serialization/types/WorkspaceGroupResponseModel.js +0 -47
  853. /package/api/resources/{workspace/client/requests/index.js → conversationalAi/conversation/interfaces/ConversationClient.js} +0 -0
  854. /package/api/resources/{workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js → conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsGetRequest.js} +0 -0
  855. /package/{dist/api/resources/workspace/client/requests → api/resources/textToVoice/resources/preview/client}/index.js +0 -0
  856. /package/api/resources/{workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.js → voices/resources/pvc/resources/samples/resources/audio/client/requests/AudioGetRequest.js} +0 -0
  857. /package/api/types/{BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.js → AuthConnectionLocator.js} +0 -0
  858. /package/api/types/{DefaultSharingPreferencesResponseModel.js → BadRequestErrorBody.js} +0 -0
  859. /package/api/types/{SipTrunkConfigResponseModel.js → ConversationHistoryElevenAssistantCommonModel.js} +0 -0
  860. /package/api/types/{SipTrunkCredentials.js → ConversationHistoryTranscriptToolCallMcpDetails.js} +0 -0
  861. /package/api/types/{TransferToNumberToolConfig.js → GetPhoneNumberInboundSipTrunkConfigResponseModel.js} +0 -0
  862. /package/api/types/{WorkspaceGroupResponseModel.js → GetPhoneNumberOutboundSipTrunkConfigResponseModel.js} +0 -0
  863. /package/{dist/api/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js → api/types/InboundSipTrunkConfigRequestModel.js} +0 -0
  864. /package/{dist/api/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.js → api/types/OutboundSipTrunkConfigRequestModel.js} +0 -0
  865. /package/{dist/api/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.js → api/types/PhoneNumberTransferDestination.js} +0 -0
  866. /package/{dist/api/types/DefaultSharingPreferencesResponseModel.js → api/types/PhoneNumberTransferTransferDestination.js} +0 -0
  867. /package/{dist/api/types/SipTrunkConfigResponseModel.js → api/types/PlayDtmfToolConfig.js} +0 -0
  868. /package/{dist/api/types/SipTrunkCredentials.js → api/types/SipTrunkCredentialsRequestModel.js} +0 -0
  869. /package/{dist/api/types/TransferToNumberToolConfig.js → api/types/SipUriTransferDestination.js} +0 -0
  870. /package/{dist/api/types/WorkspaceGroupResponseModel.js → api/types/TransferToNumberToolConfigInput.js} +0 -0
@@ -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.LlmUsage = 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 LlmUsage {
60
56
  constructor(_options = {}) {
@@ -82,9 +78,9 @@ class LlmUsage {
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/llm-usage/calculate"),
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/llm-usage/calculate"),
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.LlmUsageCalculatorPublicRequestModel.jsonOrThrow(request, {
@@ -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.McpServers = 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
  const Client_1 = require("../resources/tools/client/Client");
@@ -92,9 +88,9 @@ class McpServers {
92
88
  return __awaiter(this, void 0, void 0, function* () {
93
89
  var _a, _b, _c;
94
90
  const _response = yield core.fetcher({
95
- 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"),
91
+ 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"),
96
92
  method: "GET",
97
- 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),
93
+ 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),
98
94
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
99
95
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
100
96
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -167,9 +163,9 @@ class McpServers {
167
163
  return __awaiter(this, void 0, void 0, function* () {
168
164
  var _a, _b, _c;
169
165
  const _response = yield core.fetcher({
170
- 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"),
166
+ 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"),
171
167
  method: "POST",
172
- 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),
168
+ 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),
173
169
  contentType: "application/json",
174
170
  requestType: "json",
175
171
  body: serializers.conversationalAi.McpServerRequestModel.jsonOrThrow(request, {
@@ -242,9 +238,9 @@ class McpServers {
242
238
  return __awaiter(this, void 0, void 0, function* () {
243
239
  var _a, _b, _c;
244
240
  const _response = yield core.fetcher({
245
- 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)}`),
241
+ 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)}`),
246
242
  method: "GET",
247
- 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),
243
+ 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),
248
244
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
249
245
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
250
246
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -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.ApprovalPolicy = 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 ApprovalPolicy {
60
56
  constructor(_options = {}) {
@@ -81,9 +77,9 @@ class ApprovalPolicy {
81
77
  return __awaiter(this, void 0, void 0, function* () {
82
78
  var _a, _b, _c;
83
79
  const _response = yield core.fetcher({
84
- 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)}/approval-policy`),
80
+ 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)}/approval-policy`),
85
81
  method: "PATCH",
86
- 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),
82
+ 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),
87
83
  contentType: "application/json",
88
84
  requestType: "json",
89
85
  body: serializers.conversationalAi.mcpServers.McpApprovalPolicyUpdateRequestModel.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.ToolApprovals = 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 ToolApprovals {
60
56
  constructor(_options = {}) {
@@ -82,9 +78,9 @@ class ToolApprovals {
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/mcp-servers/${encodeURIComponent(mcpServerId)}/tool-approvals`),
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/mcp-servers/${encodeURIComponent(mcpServerId)}/tool-approvals`),
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.mcpServers.McpToolAddApprovalRequestModel.jsonOrThrow(request, {
@@ -158,9 +154,9 @@ class ToolApprovals {
158
154
  return __awaiter(this, void 0, void 0, function* () {
159
155
  var _a, _b, _c;
160
156
  const _response = yield core.fetcher({
161
- 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)}/tool-approvals/${encodeURIComponent(toolName)}`),
157
+ 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)}/tool-approvals/${encodeURIComponent(toolName)}`),
162
158
  method: "DELETE",
163
- 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),
159
+ 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),
164
160
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
165
161
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
166
162
  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.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, {