@elevenlabs/elevenlabs-js 2.21.0 → 2.22.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 (420) hide show
  1. package/Client.js +2 -2
  2. package/api/errors/ConflictError.d.ts +5 -0
  3. package/api/errors/ConflictError.js +50 -0
  4. package/api/errors/index.d.ts +1 -0
  5. package/api/errors/index.js +1 -0
  6. package/api/resources/conversationalAi/resources/batchCalls/client/Client.d.ts +1 -4
  7. package/api/resources/conversationalAi/resources/batchCalls/client/Client.js +1 -4
  8. package/api/resources/conversationalAi/resources/batchCalls/client/requests/BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.d.ts +3 -5
  9. package/api/resources/conversationalAi/resources/mcpServers/client/Client.d.ts +3 -0
  10. package/api/resources/conversationalAi/resources/mcpServers/client/Client.js +5 -0
  11. package/api/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.d.ts +7 -3
  12. package/api/resources/conversationalAi/resources/mcpServers/resources/index.d.ts +2 -0
  13. package/api/resources/conversationalAi/resources/mcpServers/resources/index.js +3 -1
  14. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/Client.d.ts +94 -0
  15. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/Client.js +372 -0
  16. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/index.d.ts +2 -0
  17. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/index.js +17 -0
  18. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideCreateRequestModel.d.ts +23 -0
  19. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideCreateRequestModel.js +3 -0
  20. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideUpdateRequestModel.d.ts +19 -0
  21. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideUpdateRequestModel.js +3 -0
  22. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/index.d.ts +2 -0
  23. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/index.js +2 -0
  24. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/index.d.ts +1 -0
  25. package/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/index.js +17 -0
  26. package/api/resources/conversationalAi/resources/tools/client/Client.d.ts +6 -4
  27. package/api/resources/conversationalAi/resources/tools/client/Client.js +6 -4
  28. package/api/resources/music/client/Client.d.ts +6 -0
  29. package/api/resources/music/client/Client.js +73 -0
  30. package/api/resources/music/client/requests/BodyStemSeparationV1MusicStemSeparationPost.d.ts +10 -0
  31. package/api/resources/music/client/requests/BodyStemSeparationV1MusicStemSeparationPost.js +3 -0
  32. package/api/resources/music/client/requests/index.d.ts +1 -0
  33. package/api/resources/music/types/MusicSeparateStemsRequestOutputFormat.d.ts +25 -0
  34. package/api/resources/music/types/MusicSeparateStemsRequestOutputFormat.js +28 -0
  35. package/api/resources/music/types/MusicSeparateStemsRequestStemVariationId.d.ts +6 -0
  36. package/api/resources/music/types/MusicSeparateStemsRequestStemVariationId.js +9 -0
  37. package/api/resources/music/types/index.d.ts +2 -0
  38. package/api/resources/music/types/index.js +2 -0
  39. package/api/types/ApiIntegrationWebhookOverridesInput.d.ts +11 -0
  40. package/api/types/ApiIntegrationWebhookOverridesInput.js +3 -0
  41. package/api/types/ApiIntegrationWebhookOverridesInputRequestHeadersValue.d.ts +2 -0
  42. package/api/types/ApiIntegrationWebhookOverridesInputRequestHeadersValue.js +3 -0
  43. package/api/types/ApiIntegrationWebhookOverridesOutput.d.ts +11 -0
  44. package/api/types/ApiIntegrationWebhookOverridesOutput.js +3 -0
  45. package/api/types/ApiIntegrationWebhookOverridesOutputRequestHeadersValue.d.ts +2 -0
  46. package/api/types/ApiIntegrationWebhookOverridesOutputRequestHeadersValue.js +3 -0
  47. package/api/types/ApiIntegrationWebhookToolConfigInput.d.ts +28 -0
  48. package/api/types/ApiIntegrationWebhookToolConfigInput.js +3 -0
  49. package/api/types/ApiIntegrationWebhookToolConfigOutput.d.ts +28 -0
  50. package/api/types/ApiIntegrationWebhookToolConfigOutput.js +3 -0
  51. package/api/types/BatchCallDetailedResponse.d.ts +2 -1
  52. package/api/types/BatchCallResponse.d.ts +2 -1
  53. package/api/types/InvoiceResponse.d.ts +4 -0
  54. package/api/types/LiteralJsonSchemaProperty.d.ts +2 -0
  55. package/api/types/LiteralOverride.d.ts +6 -0
  56. package/api/types/LiteralOverride.js +3 -0
  57. package/api/types/LiteralOverrideConstantValue.d.ts +1 -0
  58. package/api/types/LiteralOverrideConstantValue.js +3 -0
  59. package/api/types/McpServerConfigInput.d.ts +8 -2
  60. package/api/types/McpServerConfigOutput.d.ts +8 -2
  61. package/api/types/McpToolConfigOverride.d.ts +17 -0
  62. package/api/types/McpToolConfigOverride.js +3 -0
  63. package/api/types/ObjectOverrideInput.d.ts +6 -0
  64. package/api/types/ObjectOverrideInput.js +3 -0
  65. package/api/types/ObjectOverrideInputPropertiesValue.d.ts +2 -0
  66. package/api/types/ObjectOverrideInputPropertiesValue.js +3 -0
  67. package/api/types/ObjectOverrideOutput.d.ts +6 -0
  68. package/api/types/ObjectOverrideOutput.js +3 -0
  69. package/api/types/ObjectOverrideOutputPropertiesValue.d.ts +2 -0
  70. package/api/types/ObjectOverrideOutputPropertiesValue.js +3 -0
  71. package/api/types/OutboundCallRecipient.d.ts +2 -1
  72. package/api/types/OutboundCallRecipientResponseModel.d.ts +2 -1
  73. package/api/types/PendingSubscriptionSwitchResponseModel.d.ts +2 -0
  74. package/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +6 -0
  75. package/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +9 -0
  76. package/api/types/PhoneNumberDynamicVariableTransferDestination.d.ts +3 -0
  77. package/api/types/PhoneNumberDynamicVariableTransferDestination.js +3 -0
  78. package/api/types/PhoneNumberTransferTransferDestination.d.ts +7 -1
  79. package/api/types/PromptAgentApiModelInputToolsItem.d.ts +4 -1
  80. package/api/types/PromptAgentApiModelOutputToolsItem.d.ts +4 -1
  81. package/api/types/PromptAgentApiModelWorkflowOverrideInputToolsItem.d.ts +4 -1
  82. package/api/types/PromptAgentApiModelWorkflowOverrideOutputToolsItem.d.ts +4 -1
  83. package/api/types/QueryOverride.d.ts +5 -0
  84. package/api/types/QueryOverride.js +3 -0
  85. package/api/types/ReferencedToolCommonModelType.d.ts +1 -0
  86. package/api/types/ReferencedToolCommonModelType.js +1 -0
  87. package/api/types/SipUriDynamicVariableTransferDestination.d.ts +3 -0
  88. package/api/types/SipUriDynamicVariableTransferDestination.js +3 -0
  89. package/api/types/ToolRequestModelToolConfig.d.ts +4 -1
  90. package/api/types/ToolResponseModelToolConfig.d.ts +4 -1
  91. package/api/types/ToolType.d.ts +2 -0
  92. package/api/types/ToolType.js +2 -0
  93. package/api/types/VoiceSegment.d.ts +2 -0
  94. package/api/types/WebhookToolConfigInput.d.ts +2 -2
  95. package/api/types/WebhookToolConfigOutput.d.ts +2 -2
  96. package/api/types/WorkflowPhoneNumberNodeModelInputTransferDestination.d.ts +7 -1
  97. package/api/types/WorkflowPhoneNumberNodeModelOutputTransferDestination.d.ts +7 -1
  98. package/api/types/WorkspaceResourceType.d.ts +2 -0
  99. package/api/types/WorkspaceResourceType.js +2 -0
  100. package/api/types/index.d.ts +17 -0
  101. package/api/types/index.js +17 -0
  102. package/dist/Client.js +2 -2
  103. package/dist/api/errors/ConflictError.d.ts +5 -0
  104. package/dist/api/errors/ConflictError.js +50 -0
  105. package/dist/api/errors/index.d.ts +1 -0
  106. package/dist/api/errors/index.js +1 -0
  107. package/dist/api/resources/conversationalAi/resources/batchCalls/client/Client.d.ts +1 -4
  108. package/dist/api/resources/conversationalAi/resources/batchCalls/client/Client.js +1 -4
  109. package/dist/api/resources/conversationalAi/resources/batchCalls/client/requests/BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.d.ts +3 -5
  110. package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.d.ts +3 -0
  111. package/dist/api/resources/conversationalAi/resources/mcpServers/client/Client.js +5 -0
  112. package/dist/api/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.d.ts +7 -3
  113. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/index.d.ts +2 -0
  114. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/index.js +3 -1
  115. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/Client.d.ts +94 -0
  116. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/Client.js +372 -0
  117. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/index.d.ts +2 -0
  118. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/index.js +17 -0
  119. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideCreateRequestModel.d.ts +23 -0
  120. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideCreateRequestModel.js +3 -0
  121. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideUpdateRequestModel.d.ts +19 -0
  122. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideUpdateRequestModel.js +3 -0
  123. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/index.d.ts +2 -0
  124. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/index.js +2 -0
  125. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/index.d.ts +1 -0
  126. package/dist/api/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/index.js +17 -0
  127. package/dist/api/resources/conversationalAi/resources/tools/client/Client.d.ts +6 -4
  128. package/dist/api/resources/conversationalAi/resources/tools/client/Client.js +6 -4
  129. package/dist/api/resources/music/client/Client.d.ts +6 -0
  130. package/dist/api/resources/music/client/Client.js +73 -0
  131. package/dist/api/resources/music/client/requests/BodyStemSeparationV1MusicStemSeparationPost.d.ts +10 -0
  132. package/dist/api/resources/music/client/requests/BodyStemSeparationV1MusicStemSeparationPost.js +3 -0
  133. package/dist/api/resources/music/client/requests/index.d.ts +1 -0
  134. package/dist/api/resources/music/types/MusicSeparateStemsRequestOutputFormat.d.ts +25 -0
  135. package/dist/api/resources/music/types/MusicSeparateStemsRequestOutputFormat.js +28 -0
  136. package/dist/api/resources/music/types/MusicSeparateStemsRequestStemVariationId.d.ts +6 -0
  137. package/dist/api/resources/music/types/MusicSeparateStemsRequestStemVariationId.js +9 -0
  138. package/dist/api/resources/music/types/index.d.ts +2 -0
  139. package/dist/api/resources/music/types/index.js +2 -0
  140. package/dist/api/types/ApiIntegrationWebhookOverridesInput.d.ts +11 -0
  141. package/dist/api/types/ApiIntegrationWebhookOverridesInput.js +3 -0
  142. package/dist/api/types/ApiIntegrationWebhookOverridesInputRequestHeadersValue.d.ts +2 -0
  143. package/dist/api/types/ApiIntegrationWebhookOverridesInputRequestHeadersValue.js +3 -0
  144. package/dist/api/types/ApiIntegrationWebhookOverridesOutput.d.ts +11 -0
  145. package/dist/api/types/ApiIntegrationWebhookOverridesOutput.js +3 -0
  146. package/dist/api/types/ApiIntegrationWebhookOverridesOutputRequestHeadersValue.d.ts +2 -0
  147. package/dist/api/types/ApiIntegrationWebhookOverridesOutputRequestHeadersValue.js +3 -0
  148. package/dist/api/types/ApiIntegrationWebhookToolConfigInput.d.ts +28 -0
  149. package/dist/api/types/ApiIntegrationWebhookToolConfigInput.js +3 -0
  150. package/dist/api/types/ApiIntegrationWebhookToolConfigOutput.d.ts +28 -0
  151. package/dist/api/types/ApiIntegrationWebhookToolConfigOutput.js +3 -0
  152. package/dist/api/types/BatchCallDetailedResponse.d.ts +2 -1
  153. package/dist/api/types/BatchCallResponse.d.ts +2 -1
  154. package/dist/api/types/InvoiceResponse.d.ts +4 -0
  155. package/dist/api/types/LiteralJsonSchemaProperty.d.ts +2 -0
  156. package/dist/api/types/LiteralOverride.d.ts +6 -0
  157. package/dist/api/types/LiteralOverride.js +3 -0
  158. package/dist/api/types/LiteralOverrideConstantValue.d.ts +1 -0
  159. package/dist/api/types/LiteralOverrideConstantValue.js +3 -0
  160. package/dist/api/types/McpServerConfigInput.d.ts +8 -2
  161. package/dist/api/types/McpServerConfigOutput.d.ts +8 -2
  162. package/dist/api/types/McpToolConfigOverride.d.ts +17 -0
  163. package/dist/api/types/McpToolConfigOverride.js +3 -0
  164. package/dist/api/types/ObjectOverrideInput.d.ts +6 -0
  165. package/dist/api/types/ObjectOverrideInput.js +3 -0
  166. package/dist/api/types/ObjectOverrideInputPropertiesValue.d.ts +2 -0
  167. package/dist/api/types/ObjectOverrideInputPropertiesValue.js +3 -0
  168. package/dist/api/types/ObjectOverrideOutput.d.ts +6 -0
  169. package/dist/api/types/ObjectOverrideOutput.js +3 -0
  170. package/dist/api/types/ObjectOverrideOutputPropertiesValue.d.ts +2 -0
  171. package/dist/api/types/ObjectOverrideOutputPropertiesValue.js +3 -0
  172. package/dist/api/types/OutboundCallRecipient.d.ts +2 -1
  173. package/dist/api/types/OutboundCallRecipientResponseModel.d.ts +2 -1
  174. package/dist/api/types/PendingSubscriptionSwitchResponseModel.d.ts +2 -0
  175. package/dist/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +6 -0
  176. package/dist/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +9 -0
  177. package/dist/api/types/PhoneNumberDynamicVariableTransferDestination.d.ts +3 -0
  178. package/dist/api/types/PhoneNumberDynamicVariableTransferDestination.js +3 -0
  179. package/dist/api/types/PhoneNumberTransferTransferDestination.d.ts +7 -1
  180. package/dist/api/types/PromptAgentApiModelInputToolsItem.d.ts +4 -1
  181. package/dist/api/types/PromptAgentApiModelOutputToolsItem.d.ts +4 -1
  182. package/dist/api/types/PromptAgentApiModelWorkflowOverrideInputToolsItem.d.ts +4 -1
  183. package/dist/api/types/PromptAgentApiModelWorkflowOverrideOutputToolsItem.d.ts +4 -1
  184. package/dist/api/types/QueryOverride.d.ts +5 -0
  185. package/dist/api/types/QueryOverride.js +3 -0
  186. package/dist/api/types/ReferencedToolCommonModelType.d.ts +1 -0
  187. package/dist/api/types/ReferencedToolCommonModelType.js +1 -0
  188. package/dist/api/types/SipUriDynamicVariableTransferDestination.d.ts +3 -0
  189. package/dist/api/types/SipUriDynamicVariableTransferDestination.js +3 -0
  190. package/dist/api/types/ToolRequestModelToolConfig.d.ts +4 -1
  191. package/dist/api/types/ToolResponseModelToolConfig.d.ts +4 -1
  192. package/dist/api/types/ToolType.d.ts +2 -0
  193. package/dist/api/types/ToolType.js +2 -0
  194. package/dist/api/types/VoiceSegment.d.ts +2 -0
  195. package/dist/api/types/WebhookToolConfigInput.d.ts +2 -2
  196. package/dist/api/types/WebhookToolConfigOutput.d.ts +2 -2
  197. package/dist/api/types/WorkflowPhoneNumberNodeModelInputTransferDestination.d.ts +7 -1
  198. package/dist/api/types/WorkflowPhoneNumberNodeModelOutputTransferDestination.d.ts +7 -1
  199. package/dist/api/types/WorkspaceResourceType.d.ts +2 -0
  200. package/dist/api/types/WorkspaceResourceType.js +2 -0
  201. package/dist/api/types/index.d.ts +17 -0
  202. package/dist/api/types/index.js +17 -0
  203. package/dist/serialization/resources/conversationalAi/resources/batchCalls/client/requests/BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.d.ts +2 -1
  204. package/dist/serialization/resources/conversationalAi/resources/batchCalls/client/requests/BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.js +2 -1
  205. package/dist/serialization/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.d.ts +4 -0
  206. package/dist/serialization/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.js +4 -0
  207. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/index.d.ts +2 -0
  208. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/index.js +3 -1
  209. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/index.d.ts +1 -0
  210. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/index.js +17 -0
  211. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideCreateRequestModel.d.ts +19 -0
  212. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideCreateRequestModel.js +51 -0
  213. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideUpdateRequestModel.d.ts +18 -0
  214. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideUpdateRequestModel.js +50 -0
  215. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/index.d.ts +2 -0
  216. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/index.js +7 -0
  217. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/index.d.ts +1 -0
  218. package/dist/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/index.js +17 -0
  219. package/dist/serialization/resources/music/types/MusicSeparateStemsRequestOutputFormat.d.ts +7 -0
  220. package/dist/serialization/resources/music/types/MusicSeparateStemsRequestOutputFormat.js +61 -0
  221. package/dist/serialization/resources/music/types/MusicSeparateStemsRequestStemVariationId.d.ts +7 -0
  222. package/dist/serialization/resources/music/types/MusicSeparateStemsRequestStemVariationId.js +39 -0
  223. package/dist/serialization/resources/music/types/index.d.ts +2 -0
  224. package/dist/serialization/resources/music/types/index.js +2 -0
  225. package/dist/serialization/types/ApiIntegrationWebhookOverridesInput.d.ts +15 -0
  226. package/dist/serialization/types/ApiIntegrationWebhookOverridesInput.js +50 -0
  227. package/dist/serialization/types/ApiIntegrationWebhookOverridesInputRequestHeadersValue.d.ts +8 -0
  228. package/dist/serialization/types/ApiIntegrationWebhookOverridesInputRequestHeadersValue.js +40 -0
  229. package/dist/serialization/types/ApiIntegrationWebhookOverridesOutput.d.ts +15 -0
  230. package/dist/serialization/types/ApiIntegrationWebhookOverridesOutput.js +50 -0
  231. package/dist/serialization/types/ApiIntegrationWebhookOverridesOutputRequestHeadersValue.d.ts +8 -0
  232. package/dist/serialization/types/ApiIntegrationWebhookOverridesOutputRequestHeadersValue.js +40 -0
  233. package/dist/serialization/types/ApiIntegrationWebhookToolConfigInput.d.ts +28 -0
  234. package/dist/serialization/types/ApiIntegrationWebhookToolConfigInput.js +60 -0
  235. package/dist/serialization/types/ApiIntegrationWebhookToolConfigOutput.d.ts +28 -0
  236. package/dist/serialization/types/ApiIntegrationWebhookToolConfigOutput.js +60 -0
  237. package/dist/serialization/types/BatchCallDetailedResponse.d.ts +2 -1
  238. package/dist/serialization/types/BatchCallDetailedResponse.js +2 -1
  239. package/dist/serialization/types/BatchCallResponse.d.ts +2 -1
  240. package/dist/serialization/types/BatchCallResponse.js +2 -1
  241. package/dist/serialization/types/InvoiceResponse.d.ts +2 -0
  242. package/dist/serialization/types/InvoiceResponse.js +2 -0
  243. package/dist/serialization/types/LiteralJsonSchemaProperty.d.ts +1 -0
  244. package/dist/serialization/types/LiteralJsonSchemaProperty.js +1 -0
  245. package/dist/serialization/types/LiteralOverride.d.ts +12 -0
  246. package/dist/serialization/types/LiteralOverride.js +44 -0
  247. package/dist/serialization/types/LiteralOverrideConstantValue.d.ts +7 -0
  248. package/dist/serialization/types/LiteralOverrideConstantValue.js +44 -0
  249. package/dist/serialization/types/McpServerConfigInput.d.ts +6 -0
  250. package/dist/serialization/types/McpServerConfigInput.js +6 -0
  251. package/dist/serialization/types/McpServerConfigOutput.d.ts +6 -0
  252. package/dist/serialization/types/McpServerConfigOutput.js +6 -0
  253. package/dist/serialization/types/McpToolConfigOverride.d.ts +19 -0
  254. package/dist/serialization/types/McpToolConfigOverride.js +51 -0
  255. package/dist/serialization/types/ObjectOverrideInput.d.ts +11 -0
  256. package/dist/serialization/types/ObjectOverrideInput.js +46 -0
  257. package/dist/serialization/types/ObjectOverrideInputPropertiesValue.d.ts +8 -0
  258. package/dist/serialization/types/ObjectOverrideInputPropertiesValue.js +44 -0
  259. package/dist/serialization/types/ObjectOverrideOutput.d.ts +11 -0
  260. package/dist/serialization/types/ObjectOverrideOutput.js +46 -0
  261. package/dist/serialization/types/ObjectOverrideOutputPropertiesValue.d.ts +8 -0
  262. package/dist/serialization/types/ObjectOverrideOutputPropertiesValue.js +44 -0
  263. package/dist/serialization/types/OutboundCallRecipient.d.ts +2 -1
  264. package/dist/serialization/types/OutboundCallRecipient.js +2 -1
  265. package/dist/serialization/types/OutboundCallRecipientResponseModel.d.ts +2 -1
  266. package/dist/serialization/types/OutboundCallRecipientResponseModel.js +2 -1
  267. package/dist/serialization/types/PendingSubscriptionSwitchResponseModel.d.ts +2 -0
  268. package/dist/serialization/types/PendingSubscriptionSwitchResponseModel.js +2 -0
  269. package/dist/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +7 -0
  270. package/dist/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +39 -0
  271. package/dist/serialization/types/PhoneNumberDynamicVariableTransferDestination.d.ts +9 -0
  272. package/dist/serialization/types/PhoneNumberDynamicVariableTransferDestination.js +41 -0
  273. package/dist/serialization/types/PhoneNumberTransferTransferDestination.d.ts +9 -1
  274. package/dist/serialization/types/PhoneNumberTransferTransferDestination.js +4 -0
  275. package/dist/serialization/types/PromptAgentApiModelInputToolsItem.d.ts +5 -1
  276. package/dist/serialization/types/PromptAgentApiModelInputToolsItem.js +2 -0
  277. package/dist/serialization/types/PromptAgentApiModelOutputToolsItem.d.ts +5 -1
  278. package/dist/serialization/types/PromptAgentApiModelOutputToolsItem.js +2 -0
  279. package/dist/serialization/types/PromptAgentApiModelWorkflowOverrideInputToolsItem.d.ts +5 -1
  280. package/dist/serialization/types/PromptAgentApiModelWorkflowOverrideInputToolsItem.js +2 -0
  281. package/dist/serialization/types/PromptAgentApiModelWorkflowOverrideOutputToolsItem.d.ts +5 -1
  282. package/dist/serialization/types/PromptAgentApiModelWorkflowOverrideOutputToolsItem.js +2 -0
  283. package/dist/serialization/types/QueryOverride.d.ts +11 -0
  284. package/dist/serialization/types/QueryOverride.js +43 -0
  285. package/dist/serialization/types/ReferencedToolCommonModelType.d.ts +1 -1
  286. package/dist/serialization/types/ReferencedToolCommonModelType.js +1 -1
  287. package/dist/serialization/types/SipUriDynamicVariableTransferDestination.d.ts +9 -0
  288. package/dist/serialization/types/SipUriDynamicVariableTransferDestination.js +41 -0
  289. package/dist/serialization/types/ToolRequestModelToolConfig.d.ts +5 -1
  290. package/dist/serialization/types/ToolRequestModelToolConfig.js +2 -0
  291. package/dist/serialization/types/ToolResponseModelToolConfig.d.ts +5 -1
  292. package/dist/serialization/types/ToolResponseModelToolConfig.js +2 -0
  293. package/dist/serialization/types/ToolType.d.ts +1 -1
  294. package/dist/serialization/types/ToolType.js +9 -1
  295. package/dist/serialization/types/VoiceSegment.d.ts +1 -0
  296. package/dist/serialization/types/VoiceSegment.js +1 -0
  297. package/dist/serialization/types/WebhookToolConfigInput.d.ts +2 -2
  298. package/dist/serialization/types/WebhookToolConfigInput.js +2 -2
  299. package/dist/serialization/types/WebhookToolConfigOutput.d.ts +2 -2
  300. package/dist/serialization/types/WebhookToolConfigOutput.js +2 -2
  301. package/dist/serialization/types/WorkflowPhoneNumberNodeModelInputTransferDestination.d.ts +9 -1
  302. package/dist/serialization/types/WorkflowPhoneNumberNodeModelInputTransferDestination.js +4 -0
  303. package/dist/serialization/types/WorkflowPhoneNumberNodeModelOutputTransferDestination.d.ts +9 -1
  304. package/dist/serialization/types/WorkflowPhoneNumberNodeModelOutputTransferDestination.js +4 -0
  305. package/dist/serialization/types/WorkspaceResourceType.d.ts +1 -1
  306. package/dist/serialization/types/WorkspaceResourceType.js +2 -0
  307. package/dist/serialization/types/index.d.ts +17 -0
  308. package/dist/serialization/types/index.js +17 -0
  309. package/dist/version.d.ts +1 -1
  310. package/dist/version.js +1 -1
  311. package/package.json +1 -1
  312. package/reference.md +303 -10
  313. package/serialization/resources/conversationalAi/resources/batchCalls/client/requests/BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.d.ts +2 -1
  314. package/serialization/resources/conversationalAi/resources/batchCalls/client/requests/BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.js +2 -1
  315. package/serialization/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.d.ts +4 -0
  316. package/serialization/resources/conversationalAi/resources/mcpServers/client/requests/McpServerConfigUpdateRequestModel.js +4 -0
  317. package/serialization/resources/conversationalAi/resources/mcpServers/resources/index.d.ts +2 -0
  318. package/serialization/resources/conversationalAi/resources/mcpServers/resources/index.js +3 -1
  319. package/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/index.d.ts +1 -0
  320. package/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/index.js +17 -0
  321. package/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideCreateRequestModel.d.ts +19 -0
  322. package/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideCreateRequestModel.js +51 -0
  323. package/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideUpdateRequestModel.d.ts +18 -0
  324. package/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/McpToolConfigOverrideUpdateRequestModel.js +50 -0
  325. package/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/index.d.ts +2 -0
  326. package/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/client/requests/index.js +7 -0
  327. package/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/index.d.ts +1 -0
  328. package/serialization/resources/conversationalAi/resources/mcpServers/resources/toolConfigs/index.js +17 -0
  329. package/serialization/resources/music/types/MusicSeparateStemsRequestOutputFormat.d.ts +7 -0
  330. package/serialization/resources/music/types/MusicSeparateStemsRequestOutputFormat.js +61 -0
  331. package/serialization/resources/music/types/MusicSeparateStemsRequestStemVariationId.d.ts +7 -0
  332. package/serialization/resources/music/types/MusicSeparateStemsRequestStemVariationId.js +39 -0
  333. package/serialization/resources/music/types/index.d.ts +2 -0
  334. package/serialization/resources/music/types/index.js +2 -0
  335. package/serialization/types/ApiIntegrationWebhookOverridesInput.d.ts +15 -0
  336. package/serialization/types/ApiIntegrationWebhookOverridesInput.js +50 -0
  337. package/serialization/types/ApiIntegrationWebhookOverridesInputRequestHeadersValue.d.ts +8 -0
  338. package/serialization/types/ApiIntegrationWebhookOverridesInputRequestHeadersValue.js +40 -0
  339. package/serialization/types/ApiIntegrationWebhookOverridesOutput.d.ts +15 -0
  340. package/serialization/types/ApiIntegrationWebhookOverridesOutput.js +50 -0
  341. package/serialization/types/ApiIntegrationWebhookOverridesOutputRequestHeadersValue.d.ts +8 -0
  342. package/serialization/types/ApiIntegrationWebhookOverridesOutputRequestHeadersValue.js +40 -0
  343. package/serialization/types/ApiIntegrationWebhookToolConfigInput.d.ts +28 -0
  344. package/serialization/types/ApiIntegrationWebhookToolConfigInput.js +60 -0
  345. package/serialization/types/ApiIntegrationWebhookToolConfigOutput.d.ts +28 -0
  346. package/serialization/types/ApiIntegrationWebhookToolConfigOutput.js +60 -0
  347. package/serialization/types/BatchCallDetailedResponse.d.ts +2 -1
  348. package/serialization/types/BatchCallDetailedResponse.js +2 -1
  349. package/serialization/types/BatchCallResponse.d.ts +2 -1
  350. package/serialization/types/BatchCallResponse.js +2 -1
  351. package/serialization/types/InvoiceResponse.d.ts +2 -0
  352. package/serialization/types/InvoiceResponse.js +2 -0
  353. package/serialization/types/LiteralJsonSchemaProperty.d.ts +1 -0
  354. package/serialization/types/LiteralJsonSchemaProperty.js +1 -0
  355. package/serialization/types/LiteralOverride.d.ts +12 -0
  356. package/serialization/types/LiteralOverride.js +44 -0
  357. package/serialization/types/LiteralOverrideConstantValue.d.ts +7 -0
  358. package/serialization/types/LiteralOverrideConstantValue.js +44 -0
  359. package/serialization/types/McpServerConfigInput.d.ts +6 -0
  360. package/serialization/types/McpServerConfigInput.js +6 -0
  361. package/serialization/types/McpServerConfigOutput.d.ts +6 -0
  362. package/serialization/types/McpServerConfigOutput.js +6 -0
  363. package/serialization/types/McpToolConfigOverride.d.ts +19 -0
  364. package/serialization/types/McpToolConfigOverride.js +51 -0
  365. package/serialization/types/ObjectOverrideInput.d.ts +11 -0
  366. package/serialization/types/ObjectOverrideInput.js +46 -0
  367. package/serialization/types/ObjectOverrideInputPropertiesValue.d.ts +8 -0
  368. package/serialization/types/ObjectOverrideInputPropertiesValue.js +44 -0
  369. package/serialization/types/ObjectOverrideOutput.d.ts +11 -0
  370. package/serialization/types/ObjectOverrideOutput.js +46 -0
  371. package/serialization/types/ObjectOverrideOutputPropertiesValue.d.ts +8 -0
  372. package/serialization/types/ObjectOverrideOutputPropertiesValue.js +44 -0
  373. package/serialization/types/OutboundCallRecipient.d.ts +2 -1
  374. package/serialization/types/OutboundCallRecipient.js +2 -1
  375. package/serialization/types/OutboundCallRecipientResponseModel.d.ts +2 -1
  376. package/serialization/types/OutboundCallRecipientResponseModel.js +2 -1
  377. package/serialization/types/PendingSubscriptionSwitchResponseModel.d.ts +2 -0
  378. package/serialization/types/PendingSubscriptionSwitchResponseModel.js +2 -0
  379. package/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +7 -0
  380. package/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +39 -0
  381. package/serialization/types/PhoneNumberDynamicVariableTransferDestination.d.ts +9 -0
  382. package/serialization/types/PhoneNumberDynamicVariableTransferDestination.js +41 -0
  383. package/serialization/types/PhoneNumberTransferTransferDestination.d.ts +9 -1
  384. package/serialization/types/PhoneNumberTransferTransferDestination.js +4 -0
  385. package/serialization/types/PromptAgentApiModelInputToolsItem.d.ts +5 -1
  386. package/serialization/types/PromptAgentApiModelInputToolsItem.js +2 -0
  387. package/serialization/types/PromptAgentApiModelOutputToolsItem.d.ts +5 -1
  388. package/serialization/types/PromptAgentApiModelOutputToolsItem.js +2 -0
  389. package/serialization/types/PromptAgentApiModelWorkflowOverrideInputToolsItem.d.ts +5 -1
  390. package/serialization/types/PromptAgentApiModelWorkflowOverrideInputToolsItem.js +2 -0
  391. package/serialization/types/PromptAgentApiModelWorkflowOverrideOutputToolsItem.d.ts +5 -1
  392. package/serialization/types/PromptAgentApiModelWorkflowOverrideOutputToolsItem.js +2 -0
  393. package/serialization/types/QueryOverride.d.ts +11 -0
  394. package/serialization/types/QueryOverride.js +43 -0
  395. package/serialization/types/ReferencedToolCommonModelType.d.ts +1 -1
  396. package/serialization/types/ReferencedToolCommonModelType.js +1 -1
  397. package/serialization/types/SipUriDynamicVariableTransferDestination.d.ts +9 -0
  398. package/serialization/types/SipUriDynamicVariableTransferDestination.js +41 -0
  399. package/serialization/types/ToolRequestModelToolConfig.d.ts +5 -1
  400. package/serialization/types/ToolRequestModelToolConfig.js +2 -0
  401. package/serialization/types/ToolResponseModelToolConfig.d.ts +5 -1
  402. package/serialization/types/ToolResponseModelToolConfig.js +2 -0
  403. package/serialization/types/ToolType.d.ts +1 -1
  404. package/serialization/types/ToolType.js +9 -1
  405. package/serialization/types/VoiceSegment.d.ts +1 -0
  406. package/serialization/types/VoiceSegment.js +1 -0
  407. package/serialization/types/WebhookToolConfigInput.d.ts +2 -2
  408. package/serialization/types/WebhookToolConfigInput.js +2 -2
  409. package/serialization/types/WebhookToolConfigOutput.d.ts +2 -2
  410. package/serialization/types/WebhookToolConfigOutput.js +2 -2
  411. package/serialization/types/WorkflowPhoneNumberNodeModelInputTransferDestination.d.ts +9 -1
  412. package/serialization/types/WorkflowPhoneNumberNodeModelInputTransferDestination.js +4 -0
  413. package/serialization/types/WorkflowPhoneNumberNodeModelOutputTransferDestination.d.ts +9 -1
  414. package/serialization/types/WorkflowPhoneNumberNodeModelOutputTransferDestination.js +4 -0
  415. package/serialization/types/WorkspaceResourceType.d.ts +1 -1
  416. package/serialization/types/WorkspaceResourceType.js +2 -0
  417. package/serialization/types/index.d.ts +17 -0
  418. package/serialization/types/index.js +17 -0
  419. package/version.d.ts +1 -1
  420. package/version.js +1 -1
@@ -0,0 +1,372 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.ToolConfigs = void 0;
47
+ const environments = __importStar(require("../../../../../../../../environments"));
48
+ const core = __importStar(require("../../../../../../../../core"));
49
+ const ElevenLabs = __importStar(require("../../../../../../../index"));
50
+ const headers_1 = require("../../../../../../../../core/headers");
51
+ const serializers = __importStar(require("../../../../../../../../serialization/index"));
52
+ const errors = __importStar(require("../../../../../../../../errors/index"));
53
+ class ToolConfigs {
54
+ constructor(_options = {}) {
55
+ this._options = _options;
56
+ }
57
+ /**
58
+ * Create configuration overrides for a specific MCP tool.
59
+ *
60
+ * @param {string} mcpServerId - ID of the MCP Server.
61
+ * @param {ElevenLabs.conversationalAi.mcpServers.McpToolConfigOverrideCreateRequestModel} request
62
+ * @param {ToolConfigs.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link ElevenLabs.ConflictError}
65
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
66
+ *
67
+ * @example
68
+ * await client.conversationalAi.mcpServers.toolConfigs.create("mcp_server_id", {
69
+ * toolName: "tool_name"
70
+ * })
71
+ */
72
+ create(mcpServerId, request, requestOptions) {
73
+ return core.HttpResponsePromise.fromPromise(this.__create(mcpServerId, request, requestOptions));
74
+ }
75
+ __create(mcpServerId, request, requestOptions) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ var _a, _b, _c, _d, _e;
78
+ let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
79
+ const _response = yield core.fetcher({
80
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ElevenLabsEnvironment.Production, `v1/convai/mcp-servers/${encodeURIComponent(mcpServerId)}/tool-configs`),
81
+ method: "POST",
82
+ headers: _headers,
83
+ contentType: "application/json",
84
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
85
+ requestType: "json",
86
+ body: serializers.conversationalAi.mcpServers.McpToolConfigOverrideCreateRequestModel.jsonOrThrow(request, {
87
+ unrecognizedObjectKeys: "strip",
88
+ }),
89
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
90
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
91
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
92
+ });
93
+ if (_response.ok) {
94
+ return {
95
+ data: serializers.McpServerResponseModel.parseOrThrow(_response.body, {
96
+ unrecognizedObjectKeys: "passthrough",
97
+ allowUnrecognizedUnionMembers: true,
98
+ allowUnrecognizedEnumValues: true,
99
+ breadcrumbsPrefix: ["response"],
100
+ }),
101
+ rawResponse: _response.rawResponse,
102
+ };
103
+ }
104
+ if (_response.error.reason === "status-code") {
105
+ switch (_response.error.statusCode) {
106
+ case 409:
107
+ throw new ElevenLabs.ConflictError(_response.error.body, _response.rawResponse);
108
+ case 422:
109
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
110
+ unrecognizedObjectKeys: "passthrough",
111
+ allowUnrecognizedUnionMembers: true,
112
+ allowUnrecognizedEnumValues: true,
113
+ breadcrumbsPrefix: ["response"],
114
+ }), _response.rawResponse);
115
+ default:
116
+ throw new errors.ElevenLabsError({
117
+ statusCode: _response.error.statusCode,
118
+ body: _response.error.body,
119
+ rawResponse: _response.rawResponse,
120
+ });
121
+ }
122
+ }
123
+ switch (_response.error.reason) {
124
+ case "non-json":
125
+ throw new errors.ElevenLabsError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.rawBody,
128
+ rawResponse: _response.rawResponse,
129
+ });
130
+ case "timeout":
131
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/convai/mcp-servers/{mcp_server_id}/tool-configs.");
132
+ case "unknown":
133
+ throw new errors.ElevenLabsError({
134
+ message: _response.error.errorMessage,
135
+ rawResponse: _response.rawResponse,
136
+ });
137
+ }
138
+ });
139
+ }
140
+ /**
141
+ * Retrieve configuration overrides for a specific MCP tool.
142
+ *
143
+ * @param {string} mcpServerId - ID of the MCP Server.
144
+ * @param {string} toolName - Name of the MCP tool to retrieve config overrides for.
145
+ * @param {ToolConfigs.RequestOptions} requestOptions - Request-specific configuration.
146
+ *
147
+ * @throws {@link ElevenLabs.NotFoundError}
148
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
149
+ *
150
+ * @example
151
+ * await client.conversationalAi.mcpServers.toolConfigs.get("mcp_server_id", "tool_name")
152
+ */
153
+ get(mcpServerId, toolName, requestOptions) {
154
+ return core.HttpResponsePromise.fromPromise(this.__get(mcpServerId, toolName, requestOptions));
155
+ }
156
+ __get(mcpServerId, toolName, requestOptions) {
157
+ return __awaiter(this, void 0, void 0, function* () {
158
+ var _a, _b, _c, _d, _e;
159
+ let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
160
+ const _response = yield core.fetcher({
161
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ElevenLabsEnvironment.Production, `v1/convai/mcp-servers/${encodeURIComponent(mcpServerId)}/tool-configs/${encodeURIComponent(toolName)}`),
162
+ method: "GET",
163
+ headers: _headers,
164
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
165
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
166
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
167
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
168
+ });
169
+ if (_response.ok) {
170
+ return {
171
+ data: serializers.McpToolConfigOverride.parseOrThrow(_response.body, {
172
+ unrecognizedObjectKeys: "passthrough",
173
+ allowUnrecognizedUnionMembers: true,
174
+ allowUnrecognizedEnumValues: true,
175
+ breadcrumbsPrefix: ["response"],
176
+ }),
177
+ rawResponse: _response.rawResponse,
178
+ };
179
+ }
180
+ if (_response.error.reason === "status-code") {
181
+ switch (_response.error.statusCode) {
182
+ case 404:
183
+ throw new ElevenLabs.NotFoundError(_response.error.body, _response.rawResponse);
184
+ case 422:
185
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
186
+ unrecognizedObjectKeys: "passthrough",
187
+ allowUnrecognizedUnionMembers: true,
188
+ allowUnrecognizedEnumValues: true,
189
+ breadcrumbsPrefix: ["response"],
190
+ }), _response.rawResponse);
191
+ default:
192
+ throw new errors.ElevenLabsError({
193
+ statusCode: _response.error.statusCode,
194
+ body: _response.error.body,
195
+ rawResponse: _response.rawResponse,
196
+ });
197
+ }
198
+ }
199
+ switch (_response.error.reason) {
200
+ case "non-json":
201
+ throw new errors.ElevenLabsError({
202
+ statusCode: _response.error.statusCode,
203
+ body: _response.error.rawBody,
204
+ rawResponse: _response.rawResponse,
205
+ });
206
+ case "timeout":
207
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling GET /v1/convai/mcp-servers/{mcp_server_id}/tool-configs/{tool_name}.");
208
+ case "unknown":
209
+ throw new errors.ElevenLabsError({
210
+ message: _response.error.errorMessage,
211
+ rawResponse: _response.rawResponse,
212
+ });
213
+ }
214
+ });
215
+ }
216
+ /**
217
+ * Remove configuration overrides for a specific MCP tool.
218
+ *
219
+ * @param {string} mcpServerId - ID of the MCP Server.
220
+ * @param {string} toolName - Name of the MCP tool to remove config overrides for.
221
+ * @param {ToolConfigs.RequestOptions} requestOptions - Request-specific configuration.
222
+ *
223
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
224
+ *
225
+ * @example
226
+ * await client.conversationalAi.mcpServers.toolConfigs.delete("mcp_server_id", "tool_name")
227
+ */
228
+ delete(mcpServerId, toolName, requestOptions) {
229
+ return core.HttpResponsePromise.fromPromise(this.__delete(mcpServerId, toolName, requestOptions));
230
+ }
231
+ __delete(mcpServerId, toolName, requestOptions) {
232
+ return __awaiter(this, void 0, void 0, function* () {
233
+ var _a, _b, _c, _d, _e;
234
+ let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
235
+ const _response = yield core.fetcher({
236
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ElevenLabsEnvironment.Production, `v1/convai/mcp-servers/${encodeURIComponent(mcpServerId)}/tool-configs/${encodeURIComponent(toolName)}`),
237
+ method: "DELETE",
238
+ headers: _headers,
239
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
240
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
241
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
242
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
243
+ });
244
+ if (_response.ok) {
245
+ return {
246
+ data: serializers.McpServerResponseModel.parseOrThrow(_response.body, {
247
+ unrecognizedObjectKeys: "passthrough",
248
+ allowUnrecognizedUnionMembers: true,
249
+ allowUnrecognizedEnumValues: true,
250
+ breadcrumbsPrefix: ["response"],
251
+ }),
252
+ rawResponse: _response.rawResponse,
253
+ };
254
+ }
255
+ if (_response.error.reason === "status-code") {
256
+ switch (_response.error.statusCode) {
257
+ case 422:
258
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
259
+ unrecognizedObjectKeys: "passthrough",
260
+ allowUnrecognizedUnionMembers: true,
261
+ allowUnrecognizedEnumValues: true,
262
+ breadcrumbsPrefix: ["response"],
263
+ }), _response.rawResponse);
264
+ default:
265
+ throw new errors.ElevenLabsError({
266
+ statusCode: _response.error.statusCode,
267
+ body: _response.error.body,
268
+ rawResponse: _response.rawResponse,
269
+ });
270
+ }
271
+ }
272
+ switch (_response.error.reason) {
273
+ case "non-json":
274
+ throw new errors.ElevenLabsError({
275
+ statusCode: _response.error.statusCode,
276
+ body: _response.error.rawBody,
277
+ rawResponse: _response.rawResponse,
278
+ });
279
+ case "timeout":
280
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling DELETE /v1/convai/mcp-servers/{mcp_server_id}/tool-configs/{tool_name}.");
281
+ case "unknown":
282
+ throw new errors.ElevenLabsError({
283
+ message: _response.error.errorMessage,
284
+ rawResponse: _response.rawResponse,
285
+ });
286
+ }
287
+ });
288
+ }
289
+ /**
290
+ * Update configuration overrides for a specific MCP tool.
291
+ *
292
+ * @param {string} mcpServerId - ID of the MCP Server.
293
+ * @param {string} toolName - Name of the MCP tool to update config overrides for.
294
+ * @param {ElevenLabs.conversationalAi.mcpServers.McpToolConfigOverrideUpdateRequestModel} request
295
+ * @param {ToolConfigs.RequestOptions} requestOptions - Request-specific configuration.
296
+ *
297
+ * @throws {@link ElevenLabs.NotFoundError}
298
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
299
+ *
300
+ * @example
301
+ * await client.conversationalAi.mcpServers.toolConfigs.update("mcp_server_id", "tool_name")
302
+ */
303
+ update(mcpServerId, toolName, request = {}, requestOptions) {
304
+ return core.HttpResponsePromise.fromPromise(this.__update(mcpServerId, toolName, request, requestOptions));
305
+ }
306
+ __update(mcpServerId_1, toolName_1) {
307
+ return __awaiter(this, arguments, void 0, function* (mcpServerId, toolName, request = {}, requestOptions) {
308
+ var _a, _b, _c, _d, _e;
309
+ let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "xi-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
310
+ const _response = yield core.fetcher({
311
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ElevenLabsEnvironment.Production, `v1/convai/mcp-servers/${encodeURIComponent(mcpServerId)}/tool-configs/${encodeURIComponent(toolName)}`),
312
+ method: "PATCH",
313
+ headers: _headers,
314
+ contentType: "application/json",
315
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
316
+ requestType: "json",
317
+ body: serializers.conversationalAi.mcpServers.McpToolConfigOverrideUpdateRequestModel.jsonOrThrow(request, {
318
+ unrecognizedObjectKeys: "strip",
319
+ }),
320
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
321
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
322
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
323
+ });
324
+ if (_response.ok) {
325
+ return {
326
+ data: serializers.McpServerResponseModel.parseOrThrow(_response.body, {
327
+ unrecognizedObjectKeys: "passthrough",
328
+ allowUnrecognizedUnionMembers: true,
329
+ allowUnrecognizedEnumValues: true,
330
+ breadcrumbsPrefix: ["response"],
331
+ }),
332
+ rawResponse: _response.rawResponse,
333
+ };
334
+ }
335
+ if (_response.error.reason === "status-code") {
336
+ switch (_response.error.statusCode) {
337
+ case 404:
338
+ throw new ElevenLabs.NotFoundError(_response.error.body, _response.rawResponse);
339
+ case 422:
340
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
341
+ unrecognizedObjectKeys: "passthrough",
342
+ allowUnrecognizedUnionMembers: true,
343
+ allowUnrecognizedEnumValues: true,
344
+ breadcrumbsPrefix: ["response"],
345
+ }), _response.rawResponse);
346
+ default:
347
+ throw new errors.ElevenLabsError({
348
+ statusCode: _response.error.statusCode,
349
+ body: _response.error.body,
350
+ rawResponse: _response.rawResponse,
351
+ });
352
+ }
353
+ }
354
+ switch (_response.error.reason) {
355
+ case "non-json":
356
+ throw new errors.ElevenLabsError({
357
+ statusCode: _response.error.statusCode,
358
+ body: _response.error.rawBody,
359
+ rawResponse: _response.rawResponse,
360
+ });
361
+ case "timeout":
362
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling PATCH /v1/convai/mcp-servers/{mcp_server_id}/tool-configs/{tool_name}.");
363
+ case "unknown":
364
+ throw new errors.ElevenLabsError({
365
+ message: _response.error.errorMessage,
366
+ rawResponse: _response.rawResponse,
367
+ });
368
+ }
369
+ });
370
+ }
371
+ }
372
+ exports.ToolConfigs = ToolConfigs;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,23 @@
1
+ import * as ElevenLabs from "../../../../../../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * toolName: "tool_name"
6
+ * }
7
+ */
8
+ export interface McpToolConfigOverrideCreateRequestModel {
9
+ /** If set, overrides the server's force_pre_tool_speech setting for this tool */
10
+ forcePreToolSpeech?: boolean;
11
+ /** If set, overrides the server's disable_interruptions setting for this tool */
12
+ disableInterruptions?: boolean;
13
+ /** If set, overrides the server's tool_call_sound setting for this tool */
14
+ toolCallSound?: ElevenLabs.ToolCallSoundType;
15
+ /** If set, overrides the server's tool_call_sound_behavior setting for this tool */
16
+ toolCallSoundBehavior?: ElevenLabs.ToolCallSoundBehavior;
17
+ /** If set, overrides the server's execution_mode setting for this tool */
18
+ executionMode?: ElevenLabs.ToolExecutionMode;
19
+ /** Dynamic variable assignments for this MCP tool */
20
+ assignments?: ElevenLabs.DynamicVariableAssignment[];
21
+ /** The name of the MCP tool */
22
+ toolName: string;
23
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import * as ElevenLabs from "../../../../../../../../index";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface McpToolConfigOverrideUpdateRequestModel {
7
+ /** If set, overrides the server's force_pre_tool_speech setting for this tool */
8
+ forcePreToolSpeech?: boolean;
9
+ /** If set, overrides the server's disable_interruptions setting for this tool */
10
+ disableInterruptions?: boolean;
11
+ /** If set, overrides the server's tool_call_sound setting for this tool */
12
+ toolCallSound?: ElevenLabs.ToolCallSoundType;
13
+ /** If set, overrides the server's tool_call_sound_behavior setting for this tool */
14
+ toolCallSoundBehavior?: ElevenLabs.ToolCallSoundBehavior;
15
+ /** If set, overrides the server's execution_mode setting for this tool */
16
+ executionMode?: ElevenLabs.ToolExecutionMode;
17
+ /** Dynamic variable assignments for this MCP tool */
18
+ assignments?: ElevenLabs.DynamicVariableAssignment[];
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { type McpToolConfigOverrideCreateRequestModel } from "./McpToolConfigOverrideCreateRequestModel";
2
+ export { type McpToolConfigOverrideUpdateRequestModel } from "./McpToolConfigOverrideUpdateRequestModel";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client"), exports);
@@ -52,10 +52,11 @@ export declare class Tools {
52
52
  * @example
53
53
  * await client.conversationalAi.tools.create({
54
54
  * toolConfig: {
55
- * type: "client",
55
+ * type: "api_integration_webhook",
56
56
  * name: "name",
57
57
  * description: "description",
58
- * expectsResponse: false
58
+ * apiIntegrationId: "api_integration_id",
59
+ * apiIntegrationConnectionId: "api_integration_connection_id"
59
60
  * }
60
61
  * })
61
62
  */
@@ -99,10 +100,11 @@ export declare class Tools {
99
100
  * @example
100
101
  * await client.conversationalAi.tools.update("tool_id", {
101
102
  * toolConfig: {
102
- * type: "client",
103
+ * type: "api_integration_webhook",
103
104
  * name: "name",
104
105
  * description: "description",
105
- * expectsResponse: false
106
+ * apiIntegrationId: "api_integration_id",
107
+ * apiIntegrationConnectionId: "api_integration_connection_id"
106
108
  * }
107
109
  * })
108
110
  */
@@ -136,10 +136,11 @@ class Tools {
136
136
  * @example
137
137
  * await client.conversationalAi.tools.create({
138
138
  * toolConfig: {
139
- * type: "client",
139
+ * type: "api_integration_webhook",
140
140
  * name: "name",
141
141
  * description: "description",
142
- * expectsResponse: false
142
+ * apiIntegrationId: "api_integration_id",
143
+ * apiIntegrationConnectionId: "api_integration_connection_id"
143
144
  * }
144
145
  * })
145
146
  */
@@ -355,10 +356,11 @@ class Tools {
355
356
  * @example
356
357
  * await client.conversationalAi.tools.update("tool_id", {
357
358
  * toolConfig: {
358
- * type: "client",
359
+ * type: "api_integration_webhook",
359
360
  * name: "name",
360
361
  * description: "description",
361
- * expectsResponse: false
362
+ * apiIntegrationId: "api_integration_id",
363
+ * apiIntegrationConnectionId: "api_integration_connection_id"
362
364
  * }
363
365
  * })
364
366
  */
@@ -50,4 +50,10 @@ export declare class Music {
50
50
  */
51
51
  stream(request?: ElevenLabs.BodyStreamComposedMusicV1MusicStreamPost, requestOptions?: Music.RequestOptions): core.HttpResponsePromise<ReadableStream<Uint8Array>>;
52
52
  private __stream;
53
+ /**
54
+ * Separate a music file into individual stems
55
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
56
+ */
57
+ separateStems(request: ElevenLabs.BodyStemSeparationV1MusicStemSeparationPost, requestOptions?: Music.RequestOptions): core.HttpResponsePromise<ReadableStream<Uint8Array>>;
58
+ private __separateStems;
53
59
  }
@@ -276,5 +276,78 @@ class Music {
276
276
  }
277
277
  });
278
278
  }
279
+ /**
280
+ * Separate a music file into individual stems
281
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
282
+ */
283
+ separateStems(request, requestOptions) {
284
+ return core.HttpResponsePromise.fromPromise(this.__separateStems(request, requestOptions));
285
+ }
286
+ __separateStems(request, requestOptions) {
287
+ return __awaiter(this, void 0, void 0, function* () {
288
+ var _a, _b, _c, _d, _e;
289
+ const _queryParams = {};
290
+ if (request.outputFormat != null) {
291
+ _queryParams["output_format"] = serializers.MusicSeparateStemsRequestOutputFormat.jsonOrThrow(request.outputFormat, { unrecognizedObjectKeys: "strip" });
292
+ }
293
+ const _request = yield core.newFormData();
294
+ yield _request.appendFile("file", request.file);
295
+ if (request.stemVariationId != null) {
296
+ _request.append("stem_variation_id", serializers.MusicSeparateStemsRequestStemVariationId.jsonOrThrow(request.stemVariationId, {
297
+ unrecognizedObjectKeys: "strip",
298
+ }));
299
+ }
300
+ const _maybeEncodedRequest = yield _request.getRequest();
301
+ let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ "xi-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
302
+ const _response = yield core.fetcher({
303
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ElevenLabsEnvironment.Production, "v1/music/stem-separation"),
304
+ method: "POST",
305
+ headers: _headers,
306
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
307
+ requestType: "file",
308
+ duplex: _maybeEncodedRequest.duplex,
309
+ body: _maybeEncodedRequest.body,
310
+ responseType: "streaming",
311
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
312
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
313
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
314
+ });
315
+ if (_response.ok) {
316
+ return { data: _response.body, rawResponse: _response.rawResponse };
317
+ }
318
+ if (_response.error.reason === "status-code") {
319
+ switch (_response.error.statusCode) {
320
+ case 422:
321
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
322
+ unrecognizedObjectKeys: "passthrough",
323
+ allowUnrecognizedUnionMembers: true,
324
+ allowUnrecognizedEnumValues: true,
325
+ breadcrumbsPrefix: ["response"],
326
+ }), _response.rawResponse);
327
+ default:
328
+ throw new errors.ElevenLabsError({
329
+ statusCode: _response.error.statusCode,
330
+ body: _response.error.body,
331
+ rawResponse: _response.rawResponse,
332
+ });
333
+ }
334
+ }
335
+ switch (_response.error.reason) {
336
+ case "non-json":
337
+ throw new errors.ElevenLabsError({
338
+ statusCode: _response.error.statusCode,
339
+ body: _response.error.rawBody,
340
+ rawResponse: _response.rawResponse,
341
+ });
342
+ case "timeout":
343
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/music/stem-separation.");
344
+ case "unknown":
345
+ throw new errors.ElevenLabsError({
346
+ message: _response.error.errorMessage,
347
+ rawResponse: _response.rawResponse,
348
+ });
349
+ }
350
+ });
351
+ }
279
352
  }
280
353
  exports.Music = Music;
@@ -0,0 +1,10 @@
1
+ import * as ElevenLabs from "../../../../index";
2
+ import * as core from "../../../../../core";
3
+ export interface BodyStemSeparationV1MusicStemSeparationPost {
4
+ /** Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs. */
5
+ outputFormat?: ElevenLabs.MusicSeparateStemsRequestOutputFormat;
6
+ /** The audio file to separate into stems. */
7
+ file: core.file.Uploadable.FileLike;
8
+ /** The id of the stem variation to use. */
9
+ stemVariationId?: ElevenLabs.MusicSeparateStemsRequestStemVariationId;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });