@elevenlabs/elevenlabs-js 2.33.0 → 2.34.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 (306) hide show
  1. package/BaseClient.js +2 -2
  2. package/Client.d.ts +8 -0
  3. package/Client.js +37 -0
  4. package/api/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.d.ts +2 -0
  5. package/api/resources/conversationalAi/resources/agents/index.d.ts +1 -0
  6. package/api/resources/conversationalAi/resources/agents/index.js +1 -0
  7. package/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.d.ts +2 -0
  8. package/api/resources/conversationalAi/resources/agents/types/BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem.d.ts +2 -0
  9. package/api/resources/conversationalAi/resources/agents/types/index.d.ts +1 -0
  10. package/api/resources/conversationalAi/resources/agents/types/index.js +17 -0
  11. package/api/resources/conversationalAi/resources/index.d.ts +1 -0
  12. package/api/resources/conversationalAi/resources/index.js +1 -0
  13. package/api/resources/conversationalAi/resources/secrets/client/Client.d.ts +6 -2
  14. package/api/resources/conversationalAi/resources/secrets/client/Client.js +18 -6
  15. package/api/resources/conversationalAi/resources/secrets/client/requests/SecretsListRequest.d.ts +13 -0
  16. package/api/resources/conversationalAi/resources/secrets/client/requests/index.d.ts +1 -0
  17. package/api/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.d.ts +2 -0
  18. package/api/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.d.ts +2 -0
  19. package/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.d.ts +12 -29
  20. package/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.js +49 -118
  21. package/api/resources/conversationalAi/resources/whatsappAccounts/client/requests/index.d.ts +0 -1
  22. package/api/resources/textToDialogue/client/Client.d.ts +1 -1
  23. package/api/resources/textToDialogue/client/Client.js +3 -7
  24. package/api/resources/textToDialogue/client/requests/BodyTextToDialogueFullWithTimestamps.d.ts +4 -4
  25. package/api/resources/textToDialogue/client/requests/BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPost.d.ts +1 -1
  26. package/api/resources/textToDialogue/client/requests/BodyTextToDialogueMultiVoiceV1TextToDialoguePost.d.ts +3 -3
  27. package/api/resources/textToDialogue/client/requests/BodyTextToDialogueStreamWithTimestamps.d.ts +1 -1
  28. package/api/resources/textToDialogue/types/TextToDialogueConvertRequestOutputFormat.d.ts +32 -0
  29. package/api/resources/textToDialogue/types/TextToDialogueConvertRequestOutputFormat.js +35 -0
  30. package/api/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.d.ts +32 -0
  31. package/api/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.js +35 -0
  32. package/api/resources/textToDialogue/types/index.d.ts +2 -0
  33. package/api/resources/textToDialogue/types/index.js +2 -0
  34. package/api/resources/workspace/resources/groups/resources/members/client/Client.d.ts +2 -2
  35. package/api/resources/workspace/resources/groups/resources/members/client/Client.js +2 -2
  36. package/api/resources/workspace/resources/invites/client/Client.d.ts +3 -3
  37. package/api/resources/workspace/resources/invites/client/Client.js +3 -3
  38. package/api/types/AlignmentGuardrail.d.ts +3 -0
  39. package/api/types/ApiIntegrationWebhookOverridesInput.d.ts +2 -0
  40. package/api/types/ApiIntegrationWebhookOverridesOutput.d.ts +2 -0
  41. package/api/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.d.ts +1 -0
  42. package/api/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.d.ts +1 -0
  43. package/api/types/ConversationHistoryTranscriptSystemToolResultCommonModel.d.ts +1 -0
  44. package/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.d.ts +1 -0
  45. package/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.d.ts +1 -0
  46. package/api/types/ConversationTurnMetrics.d.ts +1 -0
  47. package/api/types/DirectPublishingReadResponseModel.d.ts +1 -0
  48. package/api/types/GetUnitTestResponseModel.d.ts +2 -0
  49. package/api/types/GetWorkspaceSecretsResponseModel.d.ts +4 -0
  50. package/api/types/GuardrailsV1Input.d.ts +1 -0
  51. package/api/types/GuardrailsV1Output.d.ts +1 -0
  52. package/api/types/InvoiceResponse.d.ts +1 -1
  53. package/api/types/NonStreamingOutputFormats.d.ts +10 -0
  54. package/api/types/NonStreamingOutputFormats.js +13 -0
  55. package/api/types/PermissionType.d.ts +6 -0
  56. package/api/types/PermissionType.js +6 -0
  57. package/api/types/ProcedureDraftRef.d.ts +4 -0
  58. package/api/types/ProcedureVersionRef.d.ts +6 -0
  59. package/api/types/ProcedureVersionRef.js +3 -0
  60. package/api/types/ResponseFilterMode.d.ts +6 -0
  61. package/api/types/ResponseFilterMode.js +9 -0
  62. package/api/types/SongMetadata.d.ts +0 -4
  63. package/api/types/TurnConfig.d.ts +2 -0
  64. package/api/types/TurnConfigWorkflowOverride.d.ts +2 -0
  65. package/api/types/UnitTestCommonModel.d.ts +2 -0
  66. package/api/types/User.d.ts +2 -0
  67. package/api/types/index.d.ts +5 -1
  68. package/api/types/index.js +5 -1
  69. package/dist/BaseClient.js +2 -2
  70. package/dist/Client.d.ts +8 -0
  71. package/dist/Client.js +37 -0
  72. package/dist/api/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.d.ts +2 -0
  73. package/dist/api/resources/conversationalAi/resources/agents/index.d.ts +1 -0
  74. package/dist/api/resources/conversationalAi/resources/agents/index.js +1 -0
  75. package/dist/api/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.d.ts +2 -0
  76. package/dist/api/resources/conversationalAi/resources/agents/types/BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem.d.ts +2 -0
  77. package/dist/api/resources/conversationalAi/resources/agents/types/BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem.js +3 -0
  78. package/dist/api/resources/conversationalAi/resources/agents/types/index.d.ts +1 -0
  79. package/dist/api/resources/conversationalAi/resources/agents/types/index.js +17 -0
  80. package/dist/api/resources/conversationalAi/resources/index.d.ts +1 -0
  81. package/dist/api/resources/conversationalAi/resources/index.js +1 -0
  82. package/dist/api/resources/conversationalAi/resources/secrets/client/Client.d.ts +6 -2
  83. package/dist/api/resources/conversationalAi/resources/secrets/client/Client.js +18 -6
  84. package/dist/api/resources/conversationalAi/resources/secrets/client/requests/SecretsListRequest.d.ts +13 -0
  85. package/dist/api/resources/conversationalAi/resources/secrets/client/requests/SecretsListRequest.js +3 -0
  86. package/dist/api/resources/conversationalAi/resources/secrets/client/requests/index.d.ts +1 -0
  87. package/dist/api/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.d.ts +2 -0
  88. package/dist/api/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.d.ts +2 -0
  89. package/dist/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.d.ts +12 -29
  90. package/dist/api/resources/conversationalAi/resources/whatsappAccounts/client/Client.js +49 -118
  91. package/dist/api/resources/conversationalAi/resources/whatsappAccounts/client/requests/index.d.ts +0 -1
  92. package/dist/api/resources/textToDialogue/client/Client.d.ts +1 -1
  93. package/dist/api/resources/textToDialogue/client/Client.js +3 -7
  94. package/dist/api/resources/textToDialogue/client/requests/BodyTextToDialogueFullWithTimestamps.d.ts +4 -4
  95. package/dist/api/resources/textToDialogue/client/requests/BodyTextToDialogueMultiVoiceStreamingV1TextToDialogueStreamPost.d.ts +1 -1
  96. package/dist/api/resources/textToDialogue/client/requests/BodyTextToDialogueMultiVoiceV1TextToDialoguePost.d.ts +3 -3
  97. package/dist/api/resources/textToDialogue/client/requests/BodyTextToDialogueStreamWithTimestamps.d.ts +1 -1
  98. package/dist/api/resources/textToDialogue/types/TextToDialogueConvertRequestOutputFormat.d.ts +32 -0
  99. package/dist/api/resources/textToDialogue/types/TextToDialogueConvertRequestOutputFormat.js +35 -0
  100. package/dist/api/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.d.ts +32 -0
  101. package/dist/api/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.js +35 -0
  102. package/dist/api/resources/textToDialogue/types/index.d.ts +2 -0
  103. package/dist/api/resources/textToDialogue/types/index.js +2 -0
  104. package/dist/api/resources/workspace/resources/groups/resources/members/client/Client.d.ts +2 -2
  105. package/dist/api/resources/workspace/resources/groups/resources/members/client/Client.js +2 -2
  106. package/dist/api/resources/workspace/resources/invites/client/Client.d.ts +3 -3
  107. package/dist/api/resources/workspace/resources/invites/client/Client.js +3 -3
  108. package/dist/api/types/AlignmentGuardrail.d.ts +3 -0
  109. package/dist/api/types/AlignmentGuardrail.js +3 -0
  110. package/dist/api/types/ApiIntegrationWebhookOverridesInput.d.ts +2 -0
  111. package/dist/api/types/ApiIntegrationWebhookOverridesOutput.d.ts +2 -0
  112. package/dist/api/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.d.ts +1 -0
  113. package/dist/api/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.d.ts +1 -0
  114. package/dist/api/types/ConversationHistoryTranscriptSystemToolResultCommonModel.d.ts +1 -0
  115. package/dist/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.d.ts +1 -0
  116. package/dist/api/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.d.ts +1 -0
  117. package/dist/api/types/ConversationTurnMetrics.d.ts +1 -0
  118. package/dist/api/types/DirectPublishingReadResponseModel.d.ts +1 -0
  119. package/dist/api/types/GetUnitTestResponseModel.d.ts +2 -0
  120. package/dist/api/types/GetWorkspaceSecretsResponseModel.d.ts +4 -0
  121. package/dist/api/types/GuardrailsV1Input.d.ts +1 -0
  122. package/dist/api/types/GuardrailsV1Output.d.ts +1 -0
  123. package/dist/api/types/InvoiceResponse.d.ts +1 -1
  124. package/dist/api/types/NonStreamingOutputFormats.d.ts +10 -0
  125. package/dist/api/types/NonStreamingOutputFormats.js +13 -0
  126. package/dist/api/types/PermissionType.d.ts +6 -0
  127. package/dist/api/types/PermissionType.js +6 -0
  128. package/dist/api/types/ProcedureDraftRef.d.ts +4 -0
  129. package/dist/api/types/ProcedureDraftRef.js +3 -0
  130. package/dist/api/types/ProcedureVersionRef.d.ts +6 -0
  131. package/dist/api/types/ProcedureVersionRef.js +3 -0
  132. package/dist/api/types/ResponseFilterMode.d.ts +6 -0
  133. package/dist/api/types/ResponseFilterMode.js +9 -0
  134. package/dist/api/types/SongMetadata.d.ts +0 -4
  135. package/dist/api/types/TurnConfig.d.ts +2 -0
  136. package/dist/api/types/TurnConfigWorkflowOverride.d.ts +2 -0
  137. package/dist/api/types/UnitTestCommonModel.d.ts +2 -0
  138. package/dist/api/types/User.d.ts +2 -0
  139. package/dist/api/types/index.d.ts +5 -1
  140. package/dist/api/types/index.js +5 -1
  141. package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.d.ts +2 -0
  142. package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.js +2 -0
  143. package/dist/serialization/resources/conversationalAi/resources/agents/index.d.ts +1 -0
  144. package/dist/serialization/resources/conversationalAi/resources/agents/index.js +1 -0
  145. package/dist/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.d.ts +1 -0
  146. package/dist/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.js +1 -0
  147. package/dist/serialization/resources/conversationalAi/resources/agents/types/BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem.d.ts +9 -0
  148. package/dist/serialization/resources/conversationalAi/resources/agents/types/BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem.js +41 -0
  149. package/dist/serialization/resources/conversationalAi/resources/agents/types/index.d.ts +1 -0
  150. package/dist/serialization/resources/conversationalAi/resources/agents/types/index.js +17 -0
  151. package/dist/serialization/resources/conversationalAi/resources/index.d.ts +1 -0
  152. package/dist/serialization/resources/conversationalAi/resources/index.js +1 -0
  153. package/dist/serialization/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.d.ts +1 -0
  154. package/dist/serialization/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.js +1 -0
  155. package/dist/serialization/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.d.ts +1 -0
  156. package/dist/serialization/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.js +1 -0
  157. package/dist/serialization/resources/conversationalAi/resources/whatsappAccounts/client/requests/index.d.ts +0 -1
  158. package/dist/serialization/resources/conversationalAi/resources/whatsappAccounts/client/requests/index.js +1 -3
  159. package/dist/serialization/resources/textToDialogue/types/TextToDialogueConvertRequestOutputFormat.d.ts +7 -0
  160. package/dist/serialization/resources/textToDialogue/types/TextToDialogueConvertRequestOutputFormat.js +68 -0
  161. package/dist/serialization/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.d.ts +7 -0
  162. package/dist/serialization/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.js +68 -0
  163. package/dist/serialization/resources/textToDialogue/types/index.d.ts +2 -0
  164. package/dist/serialization/resources/textToDialogue/types/index.js +2 -0
  165. package/dist/serialization/types/AlignmentGuardrail.d.ts +9 -0
  166. package/dist/serialization/types/{ImportWhatsAppAccountResponse.js → AlignmentGuardrail.js} +3 -3
  167. package/dist/serialization/types/ApiIntegrationWebhookOverridesInput.d.ts +3 -0
  168. package/dist/serialization/types/ApiIntegrationWebhookOverridesInput.js +3 -0
  169. package/dist/serialization/types/ApiIntegrationWebhookOverridesOutput.d.ts +3 -0
  170. package/dist/serialization/types/ApiIntegrationWebhookOverridesOutput.js +3 -0
  171. package/dist/serialization/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.d.ts +1 -0
  172. package/dist/serialization/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.js +1 -0
  173. package/dist/serialization/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.d.ts +1 -0
  174. package/dist/serialization/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.js +1 -0
  175. package/dist/serialization/types/ConversationHistoryTranscriptSystemToolResultCommonModel.d.ts +1 -0
  176. package/dist/serialization/types/ConversationHistoryTranscriptSystemToolResultCommonModel.js +1 -0
  177. package/dist/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.d.ts +1 -0
  178. package/dist/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.js +1 -0
  179. package/dist/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.d.ts +1 -0
  180. package/dist/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.js +1 -0
  181. package/dist/serialization/types/ConversationTurnMetrics.d.ts +1 -0
  182. package/dist/serialization/types/ConversationTurnMetrics.js +1 -0
  183. package/dist/serialization/types/DirectPublishingReadResponseModel.d.ts +1 -0
  184. package/dist/serialization/types/DirectPublishingReadResponseModel.js +1 -0
  185. package/dist/serialization/types/GetUnitTestResponseModel.d.ts +1 -0
  186. package/dist/serialization/types/GetUnitTestResponseModel.js +1 -0
  187. package/dist/serialization/types/GetWorkspaceSecretsResponseModel.d.ts +2 -0
  188. package/dist/serialization/types/GetWorkspaceSecretsResponseModel.js +2 -0
  189. package/dist/serialization/types/GuardrailsV1Input.d.ts +2 -0
  190. package/dist/serialization/types/GuardrailsV1Input.js +2 -0
  191. package/dist/serialization/types/GuardrailsV1Output.d.ts +2 -0
  192. package/dist/serialization/types/GuardrailsV1Output.js +2 -0
  193. package/dist/serialization/types/NonStreamingOutputFormats.d.ts +7 -0
  194. package/dist/serialization/types/NonStreamingOutputFormats.js +47 -0
  195. package/dist/serialization/types/PermissionType.d.ts +1 -1
  196. package/dist/serialization/types/PermissionType.js +6 -0
  197. package/dist/serialization/types/ProcedureDraftRef.d.ts +9 -0
  198. package/{serialization/types/ImportWhatsAppAccountResponse.js → dist/serialization/types/ProcedureDraftRef.js} +3 -3
  199. package/dist/serialization/types/ProcedureVersionRef.d.ts +10 -0
  200. package/dist/serialization/{resources/conversationalAi/resources/whatsappAccounts/client/requests/ImportWhatsAppAccountRequest.js → types/ProcedureVersionRef.js} +5 -6
  201. package/dist/serialization/types/ResponseFilterMode.d.ts +7 -0
  202. package/dist/serialization/types/ResponseFilterMode.js +39 -0
  203. package/dist/serialization/types/SongMetadata.d.ts +0 -2
  204. package/dist/serialization/types/SongMetadata.js +0 -2
  205. package/dist/serialization/types/TurnConfig.d.ts +1 -0
  206. package/dist/serialization/types/TurnConfig.js +1 -0
  207. package/dist/serialization/types/TurnConfigWorkflowOverride.d.ts +1 -0
  208. package/dist/serialization/types/TurnConfigWorkflowOverride.js +1 -0
  209. package/dist/serialization/types/UnitTestCommonModel.d.ts +1 -0
  210. package/dist/serialization/types/UnitTestCommonModel.js +1 -0
  211. package/dist/serialization/types/User.d.ts +1 -0
  212. package/dist/serialization/types/User.js +1 -0
  213. package/dist/serialization/types/index.d.ts +5 -1
  214. package/dist/serialization/types/index.js +5 -1
  215. package/dist/version.d.ts +1 -1
  216. package/dist/version.js +1 -1
  217. package/package.json +1 -1
  218. package/reference.md +40 -96
  219. package/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.d.ts +2 -0
  220. package/serialization/resources/conversationalAi/resources/agents/client/requests/UpdateAgentRequest.js +2 -0
  221. package/serialization/resources/conversationalAi/resources/agents/index.d.ts +1 -0
  222. package/serialization/resources/conversationalAi/resources/agents/index.js +1 -0
  223. package/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.d.ts +1 -0
  224. package/serialization/resources/conversationalAi/resources/agents/resources/branches/client/requests/BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch.js +1 -0
  225. package/serialization/resources/conversationalAi/resources/agents/types/BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem.d.ts +9 -0
  226. package/serialization/resources/conversationalAi/resources/agents/types/BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem.js +41 -0
  227. package/serialization/resources/conversationalAi/resources/agents/types/index.d.ts +1 -0
  228. package/serialization/resources/conversationalAi/resources/agents/types/index.js +17 -0
  229. package/serialization/resources/conversationalAi/resources/index.d.ts +1 -0
  230. package/serialization/resources/conversationalAi/resources/index.js +1 -0
  231. package/serialization/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.d.ts +1 -0
  232. package/serialization/resources/conversationalAi/resources/tests/client/requests/CreateUnitTestRequest.js +1 -0
  233. package/serialization/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.d.ts +1 -0
  234. package/serialization/resources/conversationalAi/resources/tests/client/requests/UpdateUnitTestRequest.js +1 -0
  235. package/serialization/resources/conversationalAi/resources/whatsappAccounts/client/requests/index.d.ts +0 -1
  236. package/serialization/resources/conversationalAi/resources/whatsappAccounts/client/requests/index.js +1 -3
  237. package/serialization/resources/textToDialogue/types/TextToDialogueConvertRequestOutputFormat.d.ts +7 -0
  238. package/serialization/resources/textToDialogue/types/TextToDialogueConvertRequestOutputFormat.js +68 -0
  239. package/serialization/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.d.ts +7 -0
  240. package/serialization/resources/textToDialogue/types/TextToDialogueConvertWithTimestampsRequestOutputFormat.js +68 -0
  241. package/serialization/resources/textToDialogue/types/index.d.ts +2 -0
  242. package/serialization/resources/textToDialogue/types/index.js +2 -0
  243. package/serialization/types/AlignmentGuardrail.d.ts +9 -0
  244. package/serialization/types/AlignmentGuardrail.js +41 -0
  245. package/serialization/types/ApiIntegrationWebhookOverridesInput.d.ts +3 -0
  246. package/serialization/types/ApiIntegrationWebhookOverridesInput.js +3 -0
  247. package/serialization/types/ApiIntegrationWebhookOverridesOutput.d.ts +3 -0
  248. package/serialization/types/ApiIntegrationWebhookOverridesOutput.js +3 -0
  249. package/serialization/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.d.ts +1 -0
  250. package/serialization/types/ConversationHistoryTranscriptApiIntegrationWebhookToolsResultCommonModel.js +1 -0
  251. package/serialization/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.d.ts +1 -0
  252. package/serialization/types/ConversationHistoryTranscriptOtherToolsResultCommonModel.js +1 -0
  253. package/serialization/types/ConversationHistoryTranscriptSystemToolResultCommonModel.d.ts +1 -0
  254. package/serialization/types/ConversationHistoryTranscriptSystemToolResultCommonModel.js +1 -0
  255. package/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.d.ts +1 -0
  256. package/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelInput.js +1 -0
  257. package/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.d.ts +1 -0
  258. package/serialization/types/ConversationHistoryTranscriptWorkflowToolsResultCommonModelOutput.js +1 -0
  259. package/serialization/types/ConversationTurnMetrics.d.ts +1 -0
  260. package/serialization/types/ConversationTurnMetrics.js +1 -0
  261. package/serialization/types/DirectPublishingReadResponseModel.d.ts +1 -0
  262. package/serialization/types/DirectPublishingReadResponseModel.js +1 -0
  263. package/serialization/types/GetUnitTestResponseModel.d.ts +1 -0
  264. package/serialization/types/GetUnitTestResponseModel.js +1 -0
  265. package/serialization/types/GetWorkspaceSecretsResponseModel.d.ts +2 -0
  266. package/serialization/types/GetWorkspaceSecretsResponseModel.js +2 -0
  267. package/serialization/types/GuardrailsV1Input.d.ts +2 -0
  268. package/serialization/types/GuardrailsV1Input.js +2 -0
  269. package/serialization/types/GuardrailsV1Output.d.ts +2 -0
  270. package/serialization/types/GuardrailsV1Output.js +2 -0
  271. package/serialization/types/NonStreamingOutputFormats.d.ts +7 -0
  272. package/serialization/types/NonStreamingOutputFormats.js +47 -0
  273. package/serialization/types/PermissionType.d.ts +1 -1
  274. package/serialization/types/PermissionType.js +6 -0
  275. package/serialization/types/ProcedureDraftRef.d.ts +9 -0
  276. package/serialization/types/ProcedureDraftRef.js +41 -0
  277. package/serialization/types/ProcedureVersionRef.d.ts +10 -0
  278. package/serialization/{resources/conversationalAi/resources/whatsappAccounts/client/requests/ImportWhatsAppAccountRequest.js → types/ProcedureVersionRef.js} +5 -6
  279. package/serialization/types/ResponseFilterMode.d.ts +7 -0
  280. package/serialization/types/ResponseFilterMode.js +39 -0
  281. package/serialization/types/SongMetadata.d.ts +0 -2
  282. package/serialization/types/SongMetadata.js +0 -2
  283. package/serialization/types/TurnConfig.d.ts +1 -0
  284. package/serialization/types/TurnConfig.js +1 -0
  285. package/serialization/types/TurnConfigWorkflowOverride.d.ts +1 -0
  286. package/serialization/types/TurnConfigWorkflowOverride.js +1 -0
  287. package/serialization/types/UnitTestCommonModel.d.ts +1 -0
  288. package/serialization/types/UnitTestCommonModel.js +1 -0
  289. package/serialization/types/User.d.ts +1 -0
  290. package/serialization/types/User.js +1 -0
  291. package/serialization/types/index.d.ts +5 -1
  292. package/serialization/types/index.js +5 -1
  293. package/version.d.ts +1 -1
  294. package/version.js +1 -1
  295. package/api/resources/conversationalAi/resources/whatsappAccounts/client/requests/ImportWhatsAppAccountRequest.d.ts +0 -13
  296. package/api/types/ImportWhatsAppAccountResponse.d.ts +0 -3
  297. package/dist/api/resources/conversationalAi/resources/whatsappAccounts/client/requests/ImportWhatsAppAccountRequest.d.ts +0 -13
  298. package/dist/api/types/ImportWhatsAppAccountResponse.d.ts +0 -3
  299. package/dist/serialization/resources/conversationalAi/resources/whatsappAccounts/client/requests/ImportWhatsAppAccountRequest.d.ts +0 -11
  300. package/dist/serialization/types/ImportWhatsAppAccountResponse.d.ts +0 -9
  301. package/serialization/resources/conversationalAi/resources/whatsappAccounts/client/requests/ImportWhatsAppAccountRequest.d.ts +0 -11
  302. package/serialization/types/ImportWhatsAppAccountResponse.d.ts +0 -9
  303. /package/api/resources/conversationalAi/resources/{whatsappAccounts/client/requests/ImportWhatsAppAccountRequest.js → agents/types/BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem.js} +0 -0
  304. /package/api/{types/ImportWhatsAppAccountResponse.js → resources/conversationalAi/resources/secrets/client/requests/SecretsListRequest.js} +0 -0
  305. /package/{dist/api/resources/conversationalAi/resources/whatsappAccounts/client/requests/ImportWhatsAppAccountRequest.js → api/types/AlignmentGuardrail.js} +0 -0
  306. /package/{dist/api/types/ImportWhatsAppAccountResponse.js → api/types/ProcedureDraftRef.js} +0 -0
package/BaseClient.js CHANGED
@@ -41,8 +41,8 @@ function normalizeClientOptions(options) {
41
41
  const headers = (0, headers_1.mergeHeaders)({
42
42
  "X-Fern-Language": "JavaScript",
43
43
  "X-Fern-SDK-Name": "@elevenlabs/elevenlabs-js",
44
- "X-Fern-SDK-Version": "v2.33.0",
45
- "User-Agent": "@elevenlabs/elevenlabs-js/v2.33.0",
44
+ "X-Fern-SDK-Version": "v2.34.0",
45
+ "User-Agent": "@elevenlabs/elevenlabs-js/v2.34.0",
46
46
  "X-Fern-Runtime": core.RUNTIME.type,
47
47
  "X-Fern-Runtime-Version": core.RUNTIME.version,
48
48
  "xi-api-key": options === null || options === void 0 ? void 0 : options.apiKey,
package/Client.d.ts CHANGED
@@ -81,6 +81,14 @@ export declare class ElevenLabsClient {
81
81
  get music(): MusicClient;
82
82
  get tokens(): TokensClient;
83
83
  get workspace(): WorkspaceClient;
84
+ /**
85
+ * @param {ElevenLabsClient.RequestOptions} requestOptions - Request-specific configuration.
86
+ *
87
+ * @example
88
+ * await client.postV1ConvaiWhatsappAccounts()
89
+ */
90
+ postV1ConvaiWhatsappAccounts(requestOptions?: ElevenLabsClient.RequestOptions): core.HttpResponsePromise<void>;
91
+ private __postV1ConvaiWhatsappAccounts;
84
92
  /**
85
93
  * @param {string} agent_id
86
94
  * @param {string} branch_id
package/Client.js CHANGED
@@ -174,6 +174,43 @@ class ElevenLabsClient {
174
174
  var _a;
175
175
  return ((_a = this._workspace) !== null && _a !== void 0 ? _a : (this._workspace = new Client_24.WorkspaceClient(this._options)));
176
176
  }
177
+ /**
178
+ * @param {ElevenLabsClient.RequestOptions} requestOptions - Request-specific configuration.
179
+ *
180
+ * @example
181
+ * await client.postV1ConvaiWhatsappAccounts()
182
+ */
183
+ postV1ConvaiWhatsappAccounts(requestOptions) {
184
+ return core.HttpResponsePromise.fromPromise(this.__postV1ConvaiWhatsappAccounts(requestOptions));
185
+ }
186
+ __postV1ConvaiWhatsappAccounts(requestOptions) {
187
+ return __awaiter(this, void 0, void 0, function* () {
188
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
189
+ const _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);
190
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
191
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ElevenLabsEnvironment.Production, "v1/convai/whatsapp-accounts"),
192
+ method: "POST",
193
+ headers: _headers,
194
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
195
+ timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 240) * 1000,
196
+ maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
197
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
198
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
199
+ logging: this._options.logging,
200
+ });
201
+ if (_response.ok) {
202
+ return { data: undefined, rawResponse: _response.rawResponse };
203
+ }
204
+ if (_response.error.reason === "status-code") {
205
+ throw new errors.ElevenLabsError({
206
+ statusCode: _response.error.statusCode,
207
+ body: _response.error.body,
208
+ rawResponse: _response.rawResponse,
209
+ });
210
+ }
211
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/convai/whatsapp-accounts");
212
+ });
213
+ }
177
214
  /**
178
215
  * @param {string} agent_id
179
216
  * @param {string} branch_id
@@ -16,4 +16,6 @@ export interface UpdateAgentRequest {
16
16
  tags?: string[];
17
17
  /** Description for this version when publishing changes (only applicable for versioned agents) */
18
18
  versionDescription?: string;
19
+ /** List of procedure refs used for this agent version. */
20
+ procedureRefs?: ElevenLabs.conversationalAi.BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem[];
19
21
  }
@@ -1,2 +1,3 @@
1
1
  export * from "./client";
2
2
  export * from "./resources";
3
+ export * from "./types";
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./client"), exports);
18
18
  __exportStar(require("./resources"), exports);
19
+ __exportStar(require("./types"), exports);
@@ -4,6 +4,8 @@ import type * as ElevenLabs from "../../../../../../../../index";
4
4
  * {}
5
5
  */
6
6
  export interface BodyUpdateAgentBranchV1ConvaiAgentsAgentIdBranchesBranchIdPatch {
7
+ /** New name for the branch. Must be unique within the agent. */
8
+ name?: string;
7
9
  /** Whether the branch should be archived */
8
10
  isArchived?: boolean;
9
11
  /** The protection level for the branch */
@@ -0,0 +1,2 @@
1
+ import type * as ElevenLabs from "../../../../../index";
2
+ export type BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem = ElevenLabs.ProcedureVersionRef | ElevenLabs.ProcedureDraftRef;
@@ -0,0 +1 @@
1
+ export * from "./BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem";
@@ -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("./BodyPatchesAnAgentSettingsV1ConvaiAgentsAgentIdPatchProcedureRefsItem"), exports);
@@ -1,5 +1,6 @@
1
1
  export * as agents from "./agents";
2
2
  export * from "./agents/client/requests";
3
+ export * from "./agents/types";
3
4
  export * as analytics from "./analytics";
4
5
  export * as batchCalls from "./batchCalls";
5
6
  export * from "./batchCalls/client/requests";
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.whatsappAccounts = exports.whatsapp = exports.twilio = exports.tools = exports.tests = exports.sipTrunk = exports.settings = exports.secrets = exports.phoneNumbers = exports.mcpServers = exports.llmUsage = exports.knowledgeBase = exports.dashboard = exports.conversations = exports.batchCalls = exports.analytics = exports.agents = void 0;
40
40
  exports.agents = __importStar(require("./agents"));
41
41
  __exportStar(require("./agents/client/requests"), exports);
42
+ __exportStar(require("./agents/types"), exports);
42
43
  exports.analytics = __importStar(require("./analytics"));
43
44
  exports.batchCalls = __importStar(require("./batchCalls"));
44
45
  __exportStar(require("./batchCalls/client/requests"), exports);
@@ -13,14 +13,18 @@ export declare class SecretsClient {
13
13
  /**
14
14
  * Get all workspace secrets for the user
15
15
  *
16
+ * @param {ElevenLabs.conversationalAi.SecretsListRequest} request
16
17
  * @param {SecretsClient.RequestOptions} requestOptions - Request-specific configuration.
17
18
  *
18
19
  * @throws {@link ElevenLabs.UnprocessableEntityError}
19
20
  *
20
21
  * @example
21
- * await client.conversationalAi.secrets.list()
22
+ * await client.conversationalAi.secrets.list({
23
+ * pageSize: 1,
24
+ * cursor: "cursor"
25
+ * })
22
26
  */
23
- list(requestOptions?: SecretsClient.RequestOptions): core.HttpResponsePromise<ElevenLabs.GetWorkspaceSecretsResponseModel>;
27
+ list(request?: ElevenLabs.conversationalAi.SecretsListRequest, requestOptions?: SecretsClient.RequestOptions): core.HttpResponsePromise<ElevenLabs.GetWorkspaceSecretsResponseModel>;
24
28
  private __list;
25
29
  /**
26
30
  * Create a new secret for the workspace
@@ -59,25 +59,37 @@ class SecretsClient {
59
59
  /**
60
60
  * Get all workspace secrets for the user
61
61
  *
62
+ * @param {ElevenLabs.conversationalAi.SecretsListRequest} request
62
63
  * @param {SecretsClient.RequestOptions} requestOptions - Request-specific configuration.
63
64
  *
64
65
  * @throws {@link ElevenLabs.UnprocessableEntityError}
65
66
  *
66
67
  * @example
67
- * await client.conversationalAi.secrets.list()
68
+ * await client.conversationalAi.secrets.list({
69
+ * pageSize: 1,
70
+ * cursor: "cursor"
71
+ * })
68
72
  */
69
- list(requestOptions) {
70
- return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
73
+ list(request = {}, requestOptions) {
74
+ return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
71
75
  }
72
- __list(requestOptions) {
73
- return __awaiter(this, void 0, void 0, function* () {
76
+ __list() {
77
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
74
78
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
79
+ const { pageSize, cursor } = request;
80
+ const _queryParams = {};
81
+ if (pageSize != null) {
82
+ _queryParams.page_size = pageSize.toString();
83
+ }
84
+ if (cursor != null) {
85
+ _queryParams.cursor = cursor;
86
+ }
75
87
  const _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);
76
88
  const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
77
89
  url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ElevenLabsEnvironment.Production, "v1/convai/secrets"),
78
90
  method: "GET",
79
91
  headers: _headers,
80
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
92
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
81
93
  timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 240) * 1000,
82
94
  maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
83
95
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * pageSize: 1,
5
+ * cursor: "cursor"
6
+ * }
7
+ */
8
+ export interface SecretsListRequest {
9
+ /** How many documents to return at maximum. Can not exceed 100. If not provided, returns all secrets. */
10
+ pageSize?: number;
11
+ /** Used for fetching next page. Cursor is returned in the response. */
12
+ cursor?: string;
13
+ }
@@ -1,2 +1,3 @@
1
1
  export type { PatchWorkspaceSecretRequest } from "./PatchWorkspaceSecretRequest";
2
2
  export type { PostWorkspaceSecretRequest } from "./PostWorkspaceSecretRequest";
3
+ export type { SecretsListRequest } from "./SecretsListRequest";
@@ -28,6 +28,8 @@ export interface CreateUnitTestRequest {
28
28
  failureExamples: ElevenLabs.AgentFailureResponseExample[];
29
29
  /** How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. */
30
30
  toolCallParameters?: ElevenLabs.UnitTestToolCallEvaluationModelInput;
31
+ /** If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent. */
32
+ checkAnyToolMatches?: boolean;
31
33
  /** Dynamic variables to replace in the agent config during testing */
32
34
  dynamicVariables?: Record<string, ElevenLabs.conversationalAi.CreateUnitTestRequestDynamicVariablesValue | undefined>;
33
35
  type?: ElevenLabs.UnitTestCommonModelType;
@@ -28,6 +28,8 @@ export interface UpdateUnitTestRequest {
28
28
  failureExamples: ElevenLabs.AgentFailureResponseExample[];
29
29
  /** How to evaluate the agent's tool call (if any). If empty, the tool call is not evaluated. */
30
30
  toolCallParameters?: ElevenLabs.UnitTestToolCallEvaluationModelInput;
31
+ /** If set to True this test will pass if any tool call returned by the LLM matches the criteria. Otherwise it will fail if more than one tool is returned by the agent. */
32
+ checkAnyToolMatches?: boolean;
31
33
  /** Dynamic variables to replace in the agent config during testing */
32
34
  dynamicVariables?: Record<string, ElevenLabs.conversationalAi.UpdateUnitTestRequestDynamicVariablesValue | undefined>;
33
35
  type?: ElevenLabs.UnitTestCommonModelType;
@@ -10,35 +10,6 @@ export declare namespace WhatsappAccountsClient {
10
10
  export declare class WhatsappAccountsClient {
11
11
  protected readonly _options: NormalizedClientOptions<WhatsappAccountsClient.Options>;
12
12
  constructor(options?: WhatsappAccountsClient.Options);
13
- /**
14
- * List all WhatsApp accounts
15
- *
16
- * @param {WhatsappAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
17
- *
18
- * @throws {@link ElevenLabs.UnprocessableEntityError}
19
- *
20
- * @example
21
- * await client.conversationalAi.whatsappAccounts.list()
22
- */
23
- list(requestOptions?: WhatsappAccountsClient.RequestOptions): core.HttpResponsePromise<ElevenLabs.ListWhatsAppAccountsResponse>;
24
- private __list;
25
- /**
26
- * Import a WhatsApp account
27
- *
28
- * @param {ElevenLabs.conversationalAi.ImportWhatsAppAccountRequest} request
29
- * @param {WhatsappAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
30
- *
31
- * @throws {@link ElevenLabs.UnprocessableEntityError}
32
- *
33
- * @example
34
- * await client.conversationalAi.whatsappAccounts.import({
35
- * businessAccountId: "business_account_id",
36
- * phoneNumberId: "phone_number_id",
37
- * tokenCode: "token_code"
38
- * })
39
- */
40
- import(request: ElevenLabs.conversationalAi.ImportWhatsAppAccountRequest, requestOptions?: WhatsappAccountsClient.RequestOptions): core.HttpResponsePromise<ElevenLabs.ImportWhatsAppAccountResponse>;
41
- private __import;
42
13
  /**
43
14
  * Get a WhatsApp account
44
15
  *
@@ -79,4 +50,16 @@ export declare class WhatsappAccountsClient {
79
50
  */
80
51
  update(phone_number_id: string, request?: ElevenLabs.conversationalAi.UpdateWhatsAppAccountRequest, requestOptions?: WhatsappAccountsClient.RequestOptions): core.HttpResponsePromise<unknown>;
81
52
  private __update;
53
+ /**
54
+ * List all WhatsApp accounts
55
+ *
56
+ * @param {WhatsappAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
57
+ *
58
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
59
+ *
60
+ * @example
61
+ * await client.conversationalAi.whatsappAccounts.list()
62
+ */
63
+ list(requestOptions?: WhatsappAccountsClient.RequestOptions): core.HttpResponsePromise<ElevenLabs.ListWhatsAppAccountsResponse>;
64
+ private __list;
82
65
  }
@@ -57,24 +57,25 @@ class WhatsappAccountsClient {
57
57
  this._options = (0, BaseClient_1.normalizeClientOptions)(options);
58
58
  }
59
59
  /**
60
- * List all WhatsApp accounts
60
+ * Get a WhatsApp account
61
61
  *
62
+ * @param {string} phone_number_id
62
63
  * @param {WhatsappAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
63
64
  *
64
65
  * @throws {@link ElevenLabs.UnprocessableEntityError}
65
66
  *
66
67
  * @example
67
- * await client.conversationalAi.whatsappAccounts.list()
68
+ * await client.conversationalAi.whatsappAccounts.get("phone_number_id")
68
69
  */
69
- list(requestOptions) {
70
- return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
70
+ get(phone_number_id, requestOptions) {
71
+ return core.HttpResponsePromise.fromPromise(this.__get(phone_number_id, requestOptions));
71
72
  }
72
- __list(requestOptions) {
73
+ __get(phone_number_id, requestOptions) {
73
74
  return __awaiter(this, void 0, void 0, function* () {
74
75
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
75
76
  const _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);
76
77
  const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
77
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ElevenLabsEnvironment.Production, "v1/convai/whatsapp-accounts"),
78
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ElevenLabsEnvironment.Production, `v1/convai/whatsapp-accounts/${core.url.encodePathParam(phone_number_id)}`),
78
79
  method: "GET",
79
80
  headers: _headers,
80
81
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -86,76 +87,7 @@ class WhatsappAccountsClient {
86
87
  });
87
88
  if (_response.ok) {
88
89
  return {
89
- data: serializers.ListWhatsAppAccountsResponse.parseOrThrow(_response.body, {
90
- unrecognizedObjectKeys: "passthrough",
91
- allowUnrecognizedUnionMembers: true,
92
- allowUnrecognizedEnumValues: true,
93
- breadcrumbsPrefix: ["response"],
94
- }),
95
- rawResponse: _response.rawResponse,
96
- };
97
- }
98
- if (_response.error.reason === "status-code") {
99
- switch (_response.error.statusCode) {
100
- case 422:
101
- throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
102
- unrecognizedObjectKeys: "passthrough",
103
- allowUnrecognizedUnionMembers: true,
104
- allowUnrecognizedEnumValues: true,
105
- breadcrumbsPrefix: ["response"],
106
- }), _response.rawResponse);
107
- default:
108
- throw new errors.ElevenLabsError({
109
- statusCode: _response.error.statusCode,
110
- body: _response.error.body,
111
- rawResponse: _response.rawResponse,
112
- });
113
- }
114
- }
115
- return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/convai/whatsapp-accounts");
116
- });
117
- }
118
- /**
119
- * Import a WhatsApp account
120
- *
121
- * @param {ElevenLabs.conversationalAi.ImportWhatsAppAccountRequest} request
122
- * @param {WhatsappAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
123
- *
124
- * @throws {@link ElevenLabs.UnprocessableEntityError}
125
- *
126
- * @example
127
- * await client.conversationalAi.whatsappAccounts.import({
128
- * businessAccountId: "business_account_id",
129
- * phoneNumberId: "phone_number_id",
130
- * tokenCode: "token_code"
131
- * })
132
- */
133
- import(request, requestOptions) {
134
- return core.HttpResponsePromise.fromPromise(this.__import(request, requestOptions));
135
- }
136
- __import(request, requestOptions) {
137
- return __awaiter(this, void 0, void 0, function* () {
138
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
139
- const _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);
140
- const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
141
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ElevenLabsEnvironment.Production, "v1/convai/whatsapp-accounts"),
142
- method: "POST",
143
- headers: _headers,
144
- contentType: "application/json",
145
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
146
- requestType: "json",
147
- body: serializers.conversationalAi.ImportWhatsAppAccountRequest.jsonOrThrow(request, {
148
- unrecognizedObjectKeys: "strip",
149
- }),
150
- timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 240) * 1000,
151
- maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
152
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
153
- fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
154
- logging: this._options.logging,
155
- });
156
- if (_response.ok) {
157
- return {
158
- data: serializers.ImportWhatsAppAccountResponse.parseOrThrow(_response.body, {
90
+ data: serializers.GetWhatsAppAccountResponse.parseOrThrow(_response.body, {
159
91
  unrecognizedObjectKeys: "passthrough",
160
92
  allowUnrecognizedUnionMembers: true,
161
93
  allowUnrecognizedEnumValues: true,
@@ -181,11 +113,11 @@ class WhatsappAccountsClient {
181
113
  });
182
114
  }
183
115
  }
184
- return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/convai/whatsapp-accounts");
116
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/convai/whatsapp-accounts/{phone_number_id}");
185
117
  });
186
118
  }
187
119
  /**
188
- * Get a WhatsApp account
120
+ * Delete a WhatsApp account
189
121
  *
190
122
  * @param {string} phone_number_id
191
123
  * @param {WhatsappAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -193,18 +125,18 @@ class WhatsappAccountsClient {
193
125
  * @throws {@link ElevenLabs.UnprocessableEntityError}
194
126
  *
195
127
  * @example
196
- * await client.conversationalAi.whatsappAccounts.get("phone_number_id")
128
+ * await client.conversationalAi.whatsappAccounts.delete("phone_number_id")
197
129
  */
198
- get(phone_number_id, requestOptions) {
199
- return core.HttpResponsePromise.fromPromise(this.__get(phone_number_id, requestOptions));
130
+ delete(phone_number_id, requestOptions) {
131
+ return core.HttpResponsePromise.fromPromise(this.__delete(phone_number_id, requestOptions));
200
132
  }
201
- __get(phone_number_id, requestOptions) {
133
+ __delete(phone_number_id, requestOptions) {
202
134
  return __awaiter(this, void 0, void 0, function* () {
203
135
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
204
136
  const _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);
205
137
  const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
206
138
  url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ElevenLabsEnvironment.Production, `v1/convai/whatsapp-accounts/${core.url.encodePathParam(phone_number_id)}`),
207
- method: "GET",
139
+ method: "DELETE",
208
140
  headers: _headers,
209
141
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
210
142
  timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 240) * 1000,
@@ -214,15 +146,7 @@ class WhatsappAccountsClient {
214
146
  logging: this._options.logging,
215
147
  });
216
148
  if (_response.ok) {
217
- return {
218
- data: serializers.GetWhatsAppAccountResponse.parseOrThrow(_response.body, {
219
- unrecognizedObjectKeys: "passthrough",
220
- allowUnrecognizedUnionMembers: true,
221
- allowUnrecognizedEnumValues: true,
222
- breadcrumbsPrefix: ["response"],
223
- }),
224
- rawResponse: _response.rawResponse,
225
- };
149
+ return { data: _response.body, rawResponse: _response.rawResponse };
226
150
  }
227
151
  if (_response.error.reason === "status-code") {
228
152
  switch (_response.error.statusCode) {
@@ -241,32 +165,38 @@ class WhatsappAccountsClient {
241
165
  });
242
166
  }
243
167
  }
244
- return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/convai/whatsapp-accounts/{phone_number_id}");
168
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v1/convai/whatsapp-accounts/{phone_number_id}");
245
169
  });
246
170
  }
247
171
  /**
248
- * Delete a WhatsApp account
172
+ * Update a WhatsApp account
249
173
  *
250
174
  * @param {string} phone_number_id
175
+ * @param {ElevenLabs.conversationalAi.UpdateWhatsAppAccountRequest} request
251
176
  * @param {WhatsappAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
252
177
  *
253
178
  * @throws {@link ElevenLabs.UnprocessableEntityError}
254
179
  *
255
180
  * @example
256
- * await client.conversationalAi.whatsappAccounts.delete("phone_number_id")
181
+ * await client.conversationalAi.whatsappAccounts.update("phone_number_id")
257
182
  */
258
- delete(phone_number_id, requestOptions) {
259
- return core.HttpResponsePromise.fromPromise(this.__delete(phone_number_id, requestOptions));
183
+ update(phone_number_id, request = {}, requestOptions) {
184
+ return core.HttpResponsePromise.fromPromise(this.__update(phone_number_id, request, requestOptions));
260
185
  }
261
- __delete(phone_number_id, requestOptions) {
262
- return __awaiter(this, void 0, void 0, function* () {
186
+ __update(phone_number_id_1) {
187
+ return __awaiter(this, arguments, void 0, function* (phone_number_id, request = {}, requestOptions) {
263
188
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
264
189
  const _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);
265
190
  const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
266
191
  url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ElevenLabsEnvironment.Production, `v1/convai/whatsapp-accounts/${core.url.encodePathParam(phone_number_id)}`),
267
- method: "DELETE",
192
+ method: "PATCH",
268
193
  headers: _headers,
194
+ contentType: "application/json",
269
195
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
196
+ requestType: "json",
197
+ body: serializers.conversationalAi.UpdateWhatsAppAccountRequest.jsonOrThrow(request, {
198
+ unrecognizedObjectKeys: "strip",
199
+ }),
270
200
  timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 240) * 1000,
271
201
  maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
272
202
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -293,38 +223,31 @@ class WhatsappAccountsClient {
293
223
  });
294
224
  }
295
225
  }
296
- return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v1/convai/whatsapp-accounts/{phone_number_id}");
226
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v1/convai/whatsapp-accounts/{phone_number_id}");
297
227
  });
298
228
  }
299
229
  /**
300
- * Update a WhatsApp account
230
+ * List all WhatsApp accounts
301
231
  *
302
- * @param {string} phone_number_id
303
- * @param {ElevenLabs.conversationalAi.UpdateWhatsAppAccountRequest} request
304
232
  * @param {WhatsappAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
305
233
  *
306
234
  * @throws {@link ElevenLabs.UnprocessableEntityError}
307
235
  *
308
236
  * @example
309
- * await client.conversationalAi.whatsappAccounts.update("phone_number_id")
237
+ * await client.conversationalAi.whatsappAccounts.list()
310
238
  */
311
- update(phone_number_id, request = {}, requestOptions) {
312
- return core.HttpResponsePromise.fromPromise(this.__update(phone_number_id, request, requestOptions));
239
+ list(requestOptions) {
240
+ return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
313
241
  }
314
- __update(phone_number_id_1) {
315
- return __awaiter(this, arguments, void 0, function* (phone_number_id, request = {}, requestOptions) {
242
+ __list(requestOptions) {
243
+ return __awaiter(this, void 0, void 0, function* () {
316
244
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
317
245
  const _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);
318
246
  const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
319
- url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ElevenLabsEnvironment.Production, `v1/convai/whatsapp-accounts/${core.url.encodePathParam(phone_number_id)}`),
320
- method: "PATCH",
247
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ElevenLabsEnvironment.Production, "v1/convai/whatsapp-accounts"),
248
+ method: "GET",
321
249
  headers: _headers,
322
- contentType: "application/json",
323
250
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
324
- requestType: "json",
325
- body: serializers.conversationalAi.UpdateWhatsAppAccountRequest.jsonOrThrow(request, {
326
- unrecognizedObjectKeys: "strip",
327
- }),
328
251
  timeoutMs: ((_j = (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.timeoutInSeconds) !== null && _j !== void 0 ? _j : 240) * 1000,
329
252
  maxRetries: (_k = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _k !== void 0 ? _k : (_l = this._options) === null || _l === void 0 ? void 0 : _l.maxRetries,
330
253
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -332,7 +255,15 @@ class WhatsappAccountsClient {
332
255
  logging: this._options.logging,
333
256
  });
334
257
  if (_response.ok) {
335
- return { data: _response.body, rawResponse: _response.rawResponse };
258
+ return {
259
+ data: serializers.ListWhatsAppAccountsResponse.parseOrThrow(_response.body, {
260
+ unrecognizedObjectKeys: "passthrough",
261
+ allowUnrecognizedUnionMembers: true,
262
+ allowUnrecognizedEnumValues: true,
263
+ breadcrumbsPrefix: ["response"],
264
+ }),
265
+ rawResponse: _response.rawResponse,
266
+ };
336
267
  }
337
268
  if (_response.error.reason === "status-code") {
338
269
  switch (_response.error.statusCode) {
@@ -351,7 +282,7 @@ class WhatsappAccountsClient {
351
282
  });
352
283
  }
353
284
  }
354
- return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v1/convai/whatsapp-accounts/{phone_number_id}");
285
+ return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/convai/whatsapp-accounts");
355
286
  });
356
287
  }
357
288
  }
@@ -1,2 +1 @@
1
- export type { ImportWhatsAppAccountRequest } from "./ImportWhatsAppAccountRequest";
2
1
  export type { UpdateWhatsAppAccountRequest } from "./UpdateWhatsAppAccountRequest";
@@ -37,7 +37,7 @@ export declare class TextToDialogueClient {
37
37
  *
38
38
  * @example
39
39
  * await client.textToDialogue.convertWithTimestamps({
40
- * outputFormat: "mp3_22050_32",
40
+ * outputFormat: "alaw_8000",
41
41
  * inputs: [{
42
42
  * text: "Hello, how are you?",
43
43
  * voiceId: "bYTqZQo3Jz7LQtmGTgwi"