@elevenlabs/elevenlabs-js 2.25.1 → 2.26.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 (384) hide show
  1. package/Client.js +2 -2
  2. package/api/resources/conversationalAi/client/Client.d.ts +3 -0
  3. package/api/resources/conversationalAi/client/Client.js +31 -26
  4. package/api/resources/conversationalAi/resources/analytics/client/Client.d.ts +12 -0
  5. package/api/resources/conversationalAi/resources/analytics/client/Client.js +15 -0
  6. package/api/resources/conversationalAi/resources/analytics/client/index.d.ts +1 -0
  7. package/api/resources/conversationalAi/resources/analytics/client/index.js +2 -0
  8. package/api/resources/conversationalAi/resources/analytics/index.d.ts +2 -0
  9. package/api/resources/conversationalAi/resources/analytics/index.js +18 -0
  10. package/api/resources/conversationalAi/resources/analytics/resources/index.d.ts +2 -0
  11. package/api/resources/conversationalAi/resources/analytics/resources/index.js +41 -0
  12. package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/Client.d.ts +28 -0
  13. package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/Client.js +139 -0
  14. package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/index.d.ts +1 -0
  15. package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/index.js +17 -0
  16. package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/LiveCountGetRequest.d.ts +10 -0
  17. package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/LiveCountGetRequest.js +3 -0
  18. package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/index.d.ts +1 -0
  19. package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/index.js +2 -0
  20. package/api/resources/conversationalAi/resources/analytics/resources/liveCount/index.d.ts +1 -0
  21. package/api/resources/conversationalAi/resources/analytics/resources/liveCount/index.js +17 -0
  22. package/api/resources/conversationalAi/resources/conversations/client/Client.d.ts +3 -0
  23. package/api/resources/conversationalAi/resources/conversations/client/Client.js +13 -1
  24. package/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +9 -0
  25. package/api/resources/conversationalAi/resources/index.d.ts +1 -0
  26. package/api/resources/conversationalAi/resources/index.js +2 -1
  27. package/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +2 -2
  28. package/api/resources/dubbing/resources/resource/client/Client.d.ts +17 -0
  29. package/api/resources/dubbing/resources/resource/client/Client.js +81 -0
  30. package/api/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.d.ts +11 -0
  31. package/api/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.js +3 -0
  32. package/api/resources/dubbing/resources/resource/client/requests/index.d.ts +1 -0
  33. package/api/resources/dubbing/resources/resource/resources/speaker/client/Client.d.ts +12 -0
  34. package/api/resources/dubbing/resources/resource/resources/speaker/client/Client.js +76 -0
  35. package/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.d.ts +10 -0
  36. package/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.js +3 -0
  37. package/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.d.ts +2 -0
  38. package/api/resources/dubbing/resources/resource/resources/speaker/client/requests/index.d.ts +1 -0
  39. package/api/resources/studio/resources/projects/client/Client.js +5 -0
  40. package/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.d.ts +2 -0
  41. package/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +1 -0
  42. package/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -0
  43. package/api/resources/webhooks/client/Client.d.ts +49 -0
  44. package/api/resources/webhooks/client/Client.js +242 -0
  45. package/api/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.d.ts +15 -0
  46. package/api/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.js +3 -0
  47. package/api/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +13 -0
  48. package/api/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.js +3 -0
  49. package/api/resources/webhooks/client/requests/index.d.ts +2 -0
  50. package/api/types/AgentDefinitionSource.d.ts +1 -0
  51. package/api/types/AgentDefinitionSource.js +1 -0
  52. package/api/types/AgentWorkflowRequestModel.d.ts +2 -0
  53. package/api/types/AgentWorkflowResponseModel.d.ts +2 -0
  54. package/api/types/ClientEvent.d.ts +1 -0
  55. package/api/types/ClientEvent.js +1 -0
  56. package/api/types/ConversationHistoryMetadataCommonModel.d.ts +1 -0
  57. package/api/types/CustomLlm.d.ts +2 -0
  58. package/api/types/CustomLlmapiType.d.ts +5 -0
  59. package/api/types/CustomLlmapiType.js +8 -0
  60. package/api/types/DeleteWorkspaceWebhookResponseModel.d.ts +4 -0
  61. package/api/types/DeleteWorkspaceWebhookResponseModel.js +3 -0
  62. package/api/types/DubbingTranscriptUtterance.d.ts +2 -1
  63. package/api/types/DubbingTranscriptWord.d.ts +2 -2
  64. package/api/types/ExtendedSubscriptionResponseModelBillingPeriod.d.ts +2 -0
  65. package/api/types/ExtendedSubscriptionResponseModelBillingPeriod.js +2 -0
  66. package/api/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.d.ts +2 -0
  67. package/api/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.js +2 -0
  68. package/api/types/GetLiveCountResponse.d.ts +4 -0
  69. package/api/types/GetLiveCountResponse.js +3 -0
  70. package/api/types/MusicPrompt.d.ts +2 -2
  71. package/api/types/PatchWorkspaceWebhookResponseModel.d.ts +4 -0
  72. package/api/types/PatchWorkspaceWebhookResponseModel.js +3 -0
  73. package/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +2 -0
  74. package/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +2 -0
  75. package/api/types/ProjectExtendedResponseModelSourceType.d.ts +1 -0
  76. package/api/types/ProjectExtendedResponseModelSourceType.js +1 -0
  77. package/api/types/ProjectResponseModelSourceType.d.ts +1 -0
  78. package/api/types/ProjectResponseModelSourceType.js +1 -0
  79. package/api/types/SegmentMigrationResponse.d.ts +3 -0
  80. package/api/types/SegmentMigrationResponse.js +3 -0
  81. package/api/types/SongSection.d.ts +2 -2
  82. package/api/types/SpeakerCreatedResponse.d.ts +4 -0
  83. package/api/types/SpeakerCreatedResponse.js +3 -0
  84. package/api/types/SubscriptionResponseModelBillingPeriod.d.ts +2 -0
  85. package/api/types/SubscriptionResponseModelBillingPeriod.js +2 -0
  86. package/api/types/SubscriptionResponseModelCharacterRefreshPeriod.d.ts +2 -0
  87. package/api/types/SubscriptionResponseModelCharacterRefreshPeriod.js +2 -0
  88. package/api/types/TtsConversationalConfigInput.d.ts +0 -2
  89. package/api/types/TtsConversationalConfigOutput.d.ts +0 -2
  90. package/api/types/TtsConversationalConfigWorkflowOverrideInput.d.ts +0 -2
  91. package/api/types/TtsConversationalConfigWorkflowOverrideOutput.d.ts +0 -2
  92. package/api/types/WebhookHmacSettings.d.ts +11 -0
  93. package/api/types/WebhookHmacSettings.js +3 -0
  94. package/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -5
  95. package/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -5
  96. package/api/types/WidgetTextContents.d.ts +14 -0
  97. package/api/types/WorkspaceCreateWebhookResponseModel.d.ts +4 -0
  98. package/api/types/WorkspaceCreateWebhookResponseModel.js +3 -0
  99. package/api/types/index.d.ts +8 -0
  100. package/api/types/index.js +8 -0
  101. package/dist/Client.js +2 -2
  102. package/dist/api/resources/conversationalAi/client/Client.d.ts +3 -0
  103. package/dist/api/resources/conversationalAi/client/Client.js +31 -26
  104. package/dist/api/resources/conversationalAi/resources/analytics/client/Client.d.ts +12 -0
  105. package/dist/api/resources/conversationalAi/resources/analytics/client/Client.js +15 -0
  106. package/dist/api/resources/conversationalAi/resources/analytics/client/index.d.ts +1 -0
  107. package/dist/api/resources/conversationalAi/resources/analytics/client/index.js +2 -0
  108. package/dist/api/resources/conversationalAi/resources/analytics/index.d.ts +2 -0
  109. package/dist/api/resources/conversationalAi/resources/analytics/index.js +18 -0
  110. package/dist/api/resources/conversationalAi/resources/analytics/resources/index.d.ts +2 -0
  111. package/dist/api/resources/conversationalAi/resources/analytics/resources/index.js +41 -0
  112. package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/Client.d.ts +28 -0
  113. package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/Client.js +139 -0
  114. package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/index.d.ts +1 -0
  115. package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/index.js +17 -0
  116. package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/LiveCountGetRequest.d.ts +10 -0
  117. package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/LiveCountGetRequest.js +3 -0
  118. package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/index.d.ts +1 -0
  119. package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/index.js +2 -0
  120. package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/index.d.ts +1 -0
  121. package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/index.js +17 -0
  122. package/dist/api/resources/conversationalAi/resources/conversations/client/Client.d.ts +3 -0
  123. package/dist/api/resources/conversationalAi/resources/conversations/client/Client.js +13 -1
  124. package/dist/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +9 -0
  125. package/dist/api/resources/conversationalAi/resources/index.d.ts +1 -0
  126. package/dist/api/resources/conversationalAi/resources/index.js +2 -1
  127. package/dist/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +2 -2
  128. package/dist/api/resources/dubbing/resources/resource/client/Client.d.ts +17 -0
  129. package/dist/api/resources/dubbing/resources/resource/client/Client.js +81 -0
  130. package/dist/api/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.d.ts +11 -0
  131. package/dist/api/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.js +3 -0
  132. package/dist/api/resources/dubbing/resources/resource/client/requests/index.d.ts +1 -0
  133. package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/Client.d.ts +12 -0
  134. package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/Client.js +76 -0
  135. package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.d.ts +10 -0
  136. package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.js +3 -0
  137. package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.d.ts +2 -0
  138. package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/requests/index.d.ts +1 -0
  139. package/dist/api/resources/studio/resources/projects/client/Client.js +5 -0
  140. package/dist/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.d.ts +2 -0
  141. package/dist/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +1 -0
  142. package/dist/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -0
  143. package/dist/api/resources/webhooks/client/Client.d.ts +49 -0
  144. package/dist/api/resources/webhooks/client/Client.js +242 -0
  145. package/dist/api/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.d.ts +15 -0
  146. package/dist/api/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.js +3 -0
  147. package/dist/api/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +13 -0
  148. package/dist/api/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.js +3 -0
  149. package/dist/api/resources/webhooks/client/requests/index.d.ts +2 -0
  150. package/dist/api/types/AgentDefinitionSource.d.ts +1 -0
  151. package/dist/api/types/AgentDefinitionSource.js +1 -0
  152. package/dist/api/types/AgentWorkflowRequestModel.d.ts +2 -0
  153. package/dist/api/types/AgentWorkflowResponseModel.d.ts +2 -0
  154. package/dist/api/types/ClientEvent.d.ts +1 -0
  155. package/dist/api/types/ClientEvent.js +1 -0
  156. package/dist/api/types/ConversationHistoryMetadataCommonModel.d.ts +1 -0
  157. package/dist/api/types/CustomLlm.d.ts +2 -0
  158. package/dist/api/types/CustomLlmapiType.d.ts +5 -0
  159. package/dist/api/types/CustomLlmapiType.js +8 -0
  160. package/dist/api/types/DeleteWorkspaceWebhookResponseModel.d.ts +4 -0
  161. package/dist/api/types/DeleteWorkspaceWebhookResponseModel.js +3 -0
  162. package/dist/api/types/DubbingTranscriptUtterance.d.ts +2 -1
  163. package/dist/api/types/DubbingTranscriptWord.d.ts +2 -2
  164. package/dist/api/types/ExtendedSubscriptionResponseModelBillingPeriod.d.ts +2 -0
  165. package/dist/api/types/ExtendedSubscriptionResponseModelBillingPeriod.js +2 -0
  166. package/dist/api/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.d.ts +2 -0
  167. package/dist/api/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.js +2 -0
  168. package/dist/api/types/GetLiveCountResponse.d.ts +4 -0
  169. package/dist/api/types/GetLiveCountResponse.js +3 -0
  170. package/dist/api/types/MusicPrompt.d.ts +2 -2
  171. package/dist/api/types/PatchWorkspaceWebhookResponseModel.d.ts +4 -0
  172. package/dist/api/types/PatchWorkspaceWebhookResponseModel.js +3 -0
  173. package/dist/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +2 -0
  174. package/dist/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +2 -0
  175. package/dist/api/types/ProjectExtendedResponseModelSourceType.d.ts +1 -0
  176. package/dist/api/types/ProjectExtendedResponseModelSourceType.js +1 -0
  177. package/dist/api/types/ProjectResponseModelSourceType.d.ts +1 -0
  178. package/dist/api/types/ProjectResponseModelSourceType.js +1 -0
  179. package/dist/api/types/SegmentMigrationResponse.d.ts +3 -0
  180. package/dist/api/types/SegmentMigrationResponse.js +3 -0
  181. package/dist/api/types/SongSection.d.ts +2 -2
  182. package/dist/api/types/SpeakerCreatedResponse.d.ts +4 -0
  183. package/dist/api/types/SpeakerCreatedResponse.js +3 -0
  184. package/dist/api/types/SubscriptionResponseModelBillingPeriod.d.ts +2 -0
  185. package/dist/api/types/SubscriptionResponseModelBillingPeriod.js +2 -0
  186. package/dist/api/types/SubscriptionResponseModelCharacterRefreshPeriod.d.ts +2 -0
  187. package/dist/api/types/SubscriptionResponseModelCharacterRefreshPeriod.js +2 -0
  188. package/dist/api/types/TtsConversationalConfigInput.d.ts +0 -2
  189. package/dist/api/types/TtsConversationalConfigOutput.d.ts +0 -2
  190. package/dist/api/types/TtsConversationalConfigWorkflowOverrideInput.d.ts +0 -2
  191. package/dist/api/types/TtsConversationalConfigWorkflowOverrideOutput.d.ts +0 -2
  192. package/dist/api/types/WebhookHmacSettings.d.ts +11 -0
  193. package/dist/api/types/WebhookHmacSettings.js +3 -0
  194. package/dist/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -5
  195. package/dist/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -5
  196. package/dist/api/types/WidgetTextContents.d.ts +14 -0
  197. package/dist/api/types/WorkspaceCreateWebhookResponseModel.d.ts +4 -0
  198. package/dist/api/types/WorkspaceCreateWebhookResponseModel.js +3 -0
  199. package/dist/api/types/index.d.ts +8 -0
  200. package/dist/api/types/index.js +8 -0
  201. package/dist/serialization/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.d.ts +10 -0
  202. package/dist/serialization/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.js +42 -0
  203. package/dist/serialization/resources/dubbing/resources/resource/client/requests/index.d.ts +1 -0
  204. package/dist/serialization/resources/dubbing/resources/resource/client/requests/index.js +3 -1
  205. package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.d.ts +10 -0
  206. package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.js +42 -0
  207. package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.d.ts +1 -0
  208. package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.js +1 -0
  209. package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/index.d.ts +1 -0
  210. package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/index.js +3 -1
  211. package/dist/serialization/resources/index.d.ts +2 -0
  212. package/dist/serialization/resources/index.js +3 -1
  213. package/dist/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +1 -1
  214. package/dist/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -1
  215. package/dist/serialization/resources/webhooks/client/index.d.ts +1 -0
  216. package/dist/serialization/resources/webhooks/client/index.js +17 -0
  217. package/dist/serialization/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.d.ts +10 -0
  218. package/dist/serialization/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.js +42 -0
  219. package/dist/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +10 -0
  220. package/dist/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.js +42 -0
  221. package/dist/serialization/resources/webhooks/client/requests/index.d.ts +2 -0
  222. package/dist/serialization/resources/webhooks/client/requests/index.js +7 -0
  223. package/dist/serialization/resources/webhooks/index.d.ts +1 -0
  224. package/dist/serialization/resources/webhooks/index.js +17 -0
  225. package/dist/serialization/types/AgentDefinitionSource.d.ts +1 -1
  226. package/dist/serialization/types/AgentDefinitionSource.js +1 -1
  227. package/dist/serialization/types/AgentWorkflowRequestModel.d.ts +1 -0
  228. package/dist/serialization/types/AgentWorkflowRequestModel.js +1 -0
  229. package/dist/serialization/types/AgentWorkflowResponseModel.d.ts +1 -0
  230. package/dist/serialization/types/AgentWorkflowResponseModel.js +1 -0
  231. package/dist/serialization/types/ClientEvent.d.ts +1 -1
  232. package/dist/serialization/types/ClientEvent.js +1 -0
  233. package/dist/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +1 -0
  234. package/dist/serialization/types/ConversationHistoryMetadataCommonModel.js +1 -0
  235. package/dist/serialization/types/CustomLlm.d.ts +2 -0
  236. package/dist/serialization/types/CustomLlm.js +2 -0
  237. package/dist/serialization/types/CustomLlmapiType.d.ts +7 -0
  238. package/dist/serialization/types/CustomLlmapiType.js +39 -0
  239. package/dist/serialization/types/DeleteWorkspaceWebhookResponseModel.d.ts +9 -0
  240. package/dist/serialization/types/DeleteWorkspaceWebhookResponseModel.js +41 -0
  241. package/dist/serialization/types/DubbingTranscriptUtterance.d.ts +2 -1
  242. package/dist/serialization/types/DubbingTranscriptUtterance.js +2 -1
  243. package/dist/serialization/types/DubbingTranscriptWord.d.ts +2 -2
  244. package/dist/serialization/types/DubbingTranscriptWord.js +2 -2
  245. package/dist/serialization/types/ExtendedSubscriptionResponseModelBillingPeriod.d.ts +1 -1
  246. package/dist/serialization/types/ExtendedSubscriptionResponseModelBillingPeriod.js +1 -1
  247. package/dist/serialization/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.d.ts +1 -1
  248. package/dist/serialization/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.js +1 -1
  249. package/dist/serialization/types/GetLiveCountResponse.d.ts +9 -0
  250. package/dist/serialization/types/GetLiveCountResponse.js +41 -0
  251. package/dist/serialization/types/PatchWorkspaceWebhookResponseModel.d.ts +9 -0
  252. package/dist/serialization/types/PatchWorkspaceWebhookResponseModel.js +41 -0
  253. package/dist/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +1 -1
  254. package/dist/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +1 -1
  255. package/dist/serialization/types/ProjectExtendedResponseModelSourceType.d.ts +1 -1
  256. package/dist/serialization/types/ProjectExtendedResponseModelSourceType.js +1 -1
  257. package/dist/serialization/types/ProjectResponseModelSourceType.d.ts +1 -1
  258. package/dist/serialization/types/ProjectResponseModelSourceType.js +1 -1
  259. package/dist/serialization/types/SegmentMigrationResponse.d.ts +9 -0
  260. package/dist/serialization/types/SegmentMigrationResponse.js +41 -0
  261. package/dist/serialization/types/SpeakerCreatedResponse.d.ts +10 -0
  262. package/dist/serialization/types/SpeakerCreatedResponse.js +42 -0
  263. package/dist/serialization/types/SubscriptionResponseModelBillingPeriod.d.ts +1 -1
  264. package/dist/serialization/types/SubscriptionResponseModelBillingPeriod.js +1 -1
  265. package/dist/serialization/types/SubscriptionResponseModelCharacterRefreshPeriod.d.ts +1 -1
  266. package/dist/serialization/types/SubscriptionResponseModelCharacterRefreshPeriod.js +1 -1
  267. package/dist/serialization/types/TtsConversationalConfigInput.d.ts +0 -2
  268. package/dist/serialization/types/TtsConversationalConfigInput.js +0 -2
  269. package/dist/serialization/types/TtsConversationalConfigOutput.d.ts +0 -2
  270. package/dist/serialization/types/TtsConversationalConfigOutput.js +0 -2
  271. package/dist/serialization/types/TtsConversationalConfigWorkflowOverrideInput.d.ts +0 -2
  272. package/dist/serialization/types/TtsConversationalConfigWorkflowOverrideInput.js +0 -2
  273. package/dist/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.d.ts +0 -2
  274. package/dist/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.js +0 -2
  275. package/dist/serialization/types/WebhookHmacSettings.d.ts +11 -0
  276. package/dist/serialization/types/WebhookHmacSettings.js +43 -0
  277. package/dist/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +1 -1
  278. package/dist/serialization/types/WebhookToolApiSchemaConfigInput.js +3 -3
  279. package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +1 -1
  280. package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.js +3 -3
  281. package/dist/serialization/types/WidgetTextContents.d.ts +7 -0
  282. package/dist/serialization/types/WidgetTextContents.js +7 -0
  283. package/dist/serialization/types/WorkspaceCreateWebhookResponseModel.d.ts +10 -0
  284. package/dist/serialization/types/WorkspaceCreateWebhookResponseModel.js +42 -0
  285. package/dist/serialization/types/index.d.ts +8 -0
  286. package/dist/serialization/types/index.js +8 -0
  287. package/dist/version.d.ts +1 -1
  288. package/dist/version.js +1 -1
  289. package/dist/wrapper/realtime/connection.d.ts +110 -6
  290. package/dist/wrapper/realtime/connection.js +74 -2
  291. package/dist/wrapper/realtime/index.d.ts +1 -1
  292. package/package.json +1 -1
  293. package/reference.md +406 -0
  294. package/serialization/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.d.ts +10 -0
  295. package/serialization/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.js +42 -0
  296. package/serialization/resources/dubbing/resources/resource/client/requests/index.d.ts +1 -0
  297. package/serialization/resources/dubbing/resources/resource/client/requests/index.js +3 -1
  298. package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.d.ts +10 -0
  299. package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.js +42 -0
  300. package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.d.ts +1 -0
  301. package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.js +1 -0
  302. package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/index.d.ts +1 -0
  303. package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/index.js +3 -1
  304. package/serialization/resources/index.d.ts +2 -0
  305. package/serialization/resources/index.js +3 -1
  306. package/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +1 -1
  307. package/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -1
  308. package/serialization/resources/webhooks/client/index.d.ts +1 -0
  309. package/serialization/resources/webhooks/client/index.js +17 -0
  310. package/serialization/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.d.ts +10 -0
  311. package/serialization/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.js +42 -0
  312. package/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +10 -0
  313. package/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.js +42 -0
  314. package/serialization/resources/webhooks/client/requests/index.d.ts +2 -0
  315. package/serialization/resources/webhooks/client/requests/index.js +7 -0
  316. package/serialization/resources/webhooks/index.d.ts +1 -0
  317. package/serialization/resources/webhooks/index.js +17 -0
  318. package/serialization/types/AgentDefinitionSource.d.ts +1 -1
  319. package/serialization/types/AgentDefinitionSource.js +1 -1
  320. package/serialization/types/AgentWorkflowRequestModel.d.ts +1 -0
  321. package/serialization/types/AgentWorkflowRequestModel.js +1 -0
  322. package/serialization/types/AgentWorkflowResponseModel.d.ts +1 -0
  323. package/serialization/types/AgentWorkflowResponseModel.js +1 -0
  324. package/serialization/types/ClientEvent.d.ts +1 -1
  325. package/serialization/types/ClientEvent.js +1 -0
  326. package/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +1 -0
  327. package/serialization/types/ConversationHistoryMetadataCommonModel.js +1 -0
  328. package/serialization/types/CustomLlm.d.ts +2 -0
  329. package/serialization/types/CustomLlm.js +2 -0
  330. package/serialization/types/CustomLlmapiType.d.ts +7 -0
  331. package/serialization/types/CustomLlmapiType.js +39 -0
  332. package/serialization/types/DeleteWorkspaceWebhookResponseModel.d.ts +9 -0
  333. package/serialization/types/DeleteWorkspaceWebhookResponseModel.js +41 -0
  334. package/serialization/types/DubbingTranscriptUtterance.d.ts +2 -1
  335. package/serialization/types/DubbingTranscriptUtterance.js +2 -1
  336. package/serialization/types/DubbingTranscriptWord.d.ts +2 -2
  337. package/serialization/types/DubbingTranscriptWord.js +2 -2
  338. package/serialization/types/ExtendedSubscriptionResponseModelBillingPeriod.d.ts +1 -1
  339. package/serialization/types/ExtendedSubscriptionResponseModelBillingPeriod.js +1 -1
  340. package/serialization/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.d.ts +1 -1
  341. package/serialization/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.js +1 -1
  342. package/serialization/types/GetLiveCountResponse.d.ts +9 -0
  343. package/serialization/types/GetLiveCountResponse.js +41 -0
  344. package/serialization/types/PatchWorkspaceWebhookResponseModel.d.ts +9 -0
  345. package/serialization/types/PatchWorkspaceWebhookResponseModel.js +41 -0
  346. package/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +1 -1
  347. package/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +1 -1
  348. package/serialization/types/ProjectExtendedResponseModelSourceType.d.ts +1 -1
  349. package/serialization/types/ProjectExtendedResponseModelSourceType.js +1 -1
  350. package/serialization/types/ProjectResponseModelSourceType.d.ts +1 -1
  351. package/serialization/types/ProjectResponseModelSourceType.js +1 -1
  352. package/serialization/types/SegmentMigrationResponse.d.ts +9 -0
  353. package/serialization/types/SegmentMigrationResponse.js +41 -0
  354. package/serialization/types/SpeakerCreatedResponse.d.ts +10 -0
  355. package/serialization/types/SpeakerCreatedResponse.js +42 -0
  356. package/serialization/types/SubscriptionResponseModelBillingPeriod.d.ts +1 -1
  357. package/serialization/types/SubscriptionResponseModelBillingPeriod.js +1 -1
  358. package/serialization/types/SubscriptionResponseModelCharacterRefreshPeriod.d.ts +1 -1
  359. package/serialization/types/SubscriptionResponseModelCharacterRefreshPeriod.js +1 -1
  360. package/serialization/types/TtsConversationalConfigInput.d.ts +0 -2
  361. package/serialization/types/TtsConversationalConfigInput.js +0 -2
  362. package/serialization/types/TtsConversationalConfigOutput.d.ts +0 -2
  363. package/serialization/types/TtsConversationalConfigOutput.js +0 -2
  364. package/serialization/types/TtsConversationalConfigWorkflowOverrideInput.d.ts +0 -2
  365. package/serialization/types/TtsConversationalConfigWorkflowOverrideInput.js +0 -2
  366. package/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.d.ts +0 -2
  367. package/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.js +0 -2
  368. package/serialization/types/WebhookHmacSettings.d.ts +11 -0
  369. package/serialization/types/WebhookHmacSettings.js +43 -0
  370. package/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +1 -1
  371. package/serialization/types/WebhookToolApiSchemaConfigInput.js +3 -3
  372. package/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +1 -1
  373. package/serialization/types/WebhookToolApiSchemaConfigOutput.js +3 -3
  374. package/serialization/types/WidgetTextContents.d.ts +7 -0
  375. package/serialization/types/WidgetTextContents.js +7 -0
  376. package/serialization/types/WorkspaceCreateWebhookResponseModel.d.ts +10 -0
  377. package/serialization/types/WorkspaceCreateWebhookResponseModel.js +42 -0
  378. package/serialization/types/index.d.ts +8 -0
  379. package/serialization/types/index.js +8 -0
  380. package/version.d.ts +1 -1
  381. package/version.js +1 -1
  382. package/wrapper/realtime/connection.d.ts +110 -6
  383. package/wrapper/realtime/connection.js +74 -2
  384. package/wrapper/realtime/index.d.ts +1 -1
@@ -143,6 +143,87 @@ class Resource {
143
143
  }
144
144
  });
145
145
  }
146
+ /**
147
+ * Change the attribution of one or more segments to a different speaker.
148
+ *
149
+ * @param {string} dubbing_id - ID of the dubbing project.
150
+ * @param {ElevenLabs.dubbing.BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost} request
151
+ * @param {Resource.RequestOptions} requestOptions - Request-specific configuration.
152
+ *
153
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
154
+ *
155
+ * @example
156
+ * await client.dubbing.resource.migrateSegments("dubbing_id", {
157
+ * segmentIds: ["segment_ids"],
158
+ * speakerId: "speaker_id"
159
+ * })
160
+ */
161
+ migrateSegments(dubbing_id, request, requestOptions) {
162
+ return core.HttpResponsePromise.fromPromise(this.__migrateSegments(dubbing_id, request, requestOptions));
163
+ }
164
+ __migrateSegments(dubbing_id, request, requestOptions) {
165
+ return __awaiter(this, void 0, void 0, function* () {
166
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
167
+ 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);
168
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
169
+ 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/dubbing/resource/${core.url.encodePathParam(dubbing_id)}/migrate-segments`),
170
+ method: "POST",
171
+ headers: _headers,
172
+ contentType: "application/json",
173
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
174
+ requestType: "json",
175
+ body: serializers.dubbing.BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
176
+ 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,
177
+ 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,
178
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
179
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
180
+ logging: this._options.logging,
181
+ });
182
+ if (_response.ok) {
183
+ return {
184
+ data: serializers.SegmentMigrationResponse.parseOrThrow(_response.body, {
185
+ unrecognizedObjectKeys: "passthrough",
186
+ allowUnrecognizedUnionMembers: true,
187
+ allowUnrecognizedEnumValues: true,
188
+ breadcrumbsPrefix: ["response"],
189
+ }),
190
+ rawResponse: _response.rawResponse,
191
+ };
192
+ }
193
+ if (_response.error.reason === "status-code") {
194
+ switch (_response.error.statusCode) {
195
+ case 422:
196
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
197
+ unrecognizedObjectKeys: "passthrough",
198
+ allowUnrecognizedUnionMembers: true,
199
+ allowUnrecognizedEnumValues: true,
200
+ breadcrumbsPrefix: ["response"],
201
+ }), _response.rawResponse);
202
+ default:
203
+ throw new errors.ElevenLabsError({
204
+ statusCode: _response.error.statusCode,
205
+ body: _response.error.body,
206
+ rawResponse: _response.rawResponse,
207
+ });
208
+ }
209
+ }
210
+ switch (_response.error.reason) {
211
+ case "non-json":
212
+ throw new errors.ElevenLabsError({
213
+ statusCode: _response.error.statusCode,
214
+ body: _response.error.rawBody,
215
+ rawResponse: _response.rawResponse,
216
+ });
217
+ case "timeout":
218
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/dubbing/resource/{dubbing_id}/migrate-segments.");
219
+ case "unknown":
220
+ throw new errors.ElevenLabsError({
221
+ message: _response.error.errorMessage,
222
+ rawResponse: _response.rawResponse,
223
+ });
224
+ }
225
+ });
226
+ }
146
227
  /**
147
228
  * Regenerate the transcriptions for the specified segments. Does not automatically regenerate translations or dubs.
148
229
  *
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * segmentIds: ["segment_ids"],
5
+ * speakerId: "speaker_id"
6
+ * }
7
+ */
8
+ export interface BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost {
9
+ segmentIds: string[];
10
+ speakerId: string;
11
+ }
@@ -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 });
@@ -1,4 +1,5 @@
1
1
  export type { BodyDubsAllOrSomeSegmentsAndLanguagesV1DubbingResourceDubbingIdDubPost } from "./BodyDubsAllOrSomeSegmentsAndLanguagesV1DubbingResourceDubbingIdDubPost";
2
+ export type { BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost } from "./BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost";
2
3
  export type { BodyRenderAudioOrVideoForTheGivenLanguageV1DubbingResourceDubbingIdRenderLanguagePost } from "./BodyRenderAudioOrVideoForTheGivenLanguageV1DubbingResourceDubbingIdRenderLanguagePost";
3
4
  export type { BodyTranscribesSegmentsV1DubbingResourceDubbingIdTranscribePost } from "./BodyTranscribesSegmentsV1DubbingResourceDubbingIdTranscribePost";
4
5
  export type { BodyTranslatesAllOrSomeSegmentsAndLanguagesV1DubbingResourceDubbingIdTranslatePost } from "./BodyTranslatesAllOrSomeSegmentsAndLanguagesV1DubbingResourceDubbingIdTranslatePost";
@@ -28,6 +28,18 @@ export declare class Speaker {
28
28
  */
29
29
  update(dubbing_id: string, speaker_id: string, request?: ElevenLabs.dubbing.resource.BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch, requestOptions?: Speaker.RequestOptions): core.HttpResponsePromise<ElevenLabs.SpeakerUpdatedResponse>;
30
30
  private __update;
31
+ /**
32
+ * @param {string} dubbing_id - ID of the dubbing project.
33
+ * @param {ElevenLabs.dubbing.resource.BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost} request
34
+ * @param {Speaker.RequestOptions} requestOptions - Request-specific configuration.
35
+ *
36
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
37
+ *
38
+ * @example
39
+ * await client.dubbing.resource.speaker.create("dubbing_id")
40
+ */
41
+ create(dubbing_id: string, request?: ElevenLabs.dubbing.resource.BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost, requestOptions?: Speaker.RequestOptions): core.HttpResponsePromise<ElevenLabs.SpeakerCreatedResponse>;
42
+ private __create;
31
43
  /**
32
44
  * Fetch the top 10 similar voices to a speaker, including the voice IDs, names, descriptions, and, where possible, a sample audio recording.
33
45
  *
@@ -138,6 +138,82 @@ class Speaker {
138
138
  }
139
139
  });
140
140
  }
141
+ /**
142
+ * @param {string} dubbing_id - ID of the dubbing project.
143
+ * @param {ElevenLabs.dubbing.resource.BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost} request
144
+ * @param {Speaker.RequestOptions} requestOptions - Request-specific configuration.
145
+ *
146
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
147
+ *
148
+ * @example
149
+ * await client.dubbing.resource.speaker.create("dubbing_id")
150
+ */
151
+ create(dubbing_id, request = {}, requestOptions) {
152
+ return core.HttpResponsePromise.fromPromise(this.__create(dubbing_id, request, requestOptions));
153
+ }
154
+ __create(dubbing_id_1) {
155
+ return __awaiter(this, arguments, void 0, function* (dubbing_id, request = {}, requestOptions) {
156
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
157
+ 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);
158
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
159
+ 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/dubbing/resource/${core.url.encodePathParam(dubbing_id)}/speaker`),
160
+ method: "POST",
161
+ headers: _headers,
162
+ contentType: "application/json",
163
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
164
+ requestType: "json",
165
+ body: serializers.dubbing.resource.BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
166
+ 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,
167
+ 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,
168
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
169
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
170
+ logging: this._options.logging,
171
+ });
172
+ if (_response.ok) {
173
+ return {
174
+ data: serializers.SpeakerCreatedResponse.parseOrThrow(_response.body, {
175
+ unrecognizedObjectKeys: "passthrough",
176
+ allowUnrecognizedUnionMembers: true,
177
+ allowUnrecognizedEnumValues: true,
178
+ breadcrumbsPrefix: ["response"],
179
+ }),
180
+ rawResponse: _response.rawResponse,
181
+ };
182
+ }
183
+ if (_response.error.reason === "status-code") {
184
+ switch (_response.error.statusCode) {
185
+ case 422:
186
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
187
+ unrecognizedObjectKeys: "passthrough",
188
+ allowUnrecognizedUnionMembers: true,
189
+ allowUnrecognizedEnumValues: true,
190
+ breadcrumbsPrefix: ["response"],
191
+ }), _response.rawResponse);
192
+ default:
193
+ throw new errors.ElevenLabsError({
194
+ statusCode: _response.error.statusCode,
195
+ body: _response.error.body,
196
+ rawResponse: _response.rawResponse,
197
+ });
198
+ }
199
+ }
200
+ switch (_response.error.reason) {
201
+ case "non-json":
202
+ throw new errors.ElevenLabsError({
203
+ statusCode: _response.error.statusCode,
204
+ body: _response.error.rawBody,
205
+ rawResponse: _response.rawResponse,
206
+ });
207
+ case "timeout":
208
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/dubbing/resource/{dubbing_id}/speaker.");
209
+ case "unknown":
210
+ throw new errors.ElevenLabsError({
211
+ message: _response.error.errorMessage,
212
+ rawResponse: _response.rawResponse,
213
+ });
214
+ }
215
+ });
216
+ }
141
217
  /**
142
218
  * Fetch the top 10 similar voices to a speaker, including the voice IDs, names, descriptions, and, where possible, a sample audio recording.
143
219
  *
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost {
6
+ /** Name to attribute to this speaker. */
7
+ speakerName?: string;
8
+ /** Either the identifier of a voice from the ElevenLabs voice library, or one of ['track-clone', 'clip-clone']. */
9
+ voiceId?: string;
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 });
@@ -3,6 +3,8 @@
3
3
  * {}
4
4
  */
5
5
  export interface BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch {
6
+ /** Name to attribute to this speaker. */
7
+ speakerName?: string;
6
8
  /** Either the identifier of a voice from the ElevenLabs voice library, or one of ['track-clone', 'clip-clone']. */
7
9
  voiceId?: string;
8
10
  /** Languages to apply these changes to. If empty, will apply to all languages. */
@@ -1 +1,2 @@
1
+ export type { BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost } from "./BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost";
1
2
  export type { BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch } from "./BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch";
@@ -257,6 +257,11 @@ class Projects {
257
257
  unrecognizedObjectKeys: "strip",
258
258
  }));
259
259
  }
260
+ if (request.voiceSettings != null) {
261
+ for (const _item of request.voiceSettings) {
262
+ _request.append("voice_settings", _item);
263
+ }
264
+ }
260
265
  const _maybeEncodedRequest = yield _request.getRequest();
261
266
  const _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);
262
267
  const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
@@ -134,4 +134,6 @@ export interface BodyCreateStudioProjectV1StudioProjectsPost {
134
134
  autoAssignVoices?: boolean;
135
135
  /** The type of Studio project to create. */
136
136
  sourceType?: ElevenLabs.studio.ProjectsCreateRequestSourceType;
137
+ /** Optional voice settings overrides for the project, encoded as a list of JSON strings. */
138
+ voiceSettings?: string[];
137
139
  }
@@ -4,5 +4,6 @@ export declare const ProjectsCreateRequestSourceType: {
4
4
  readonly Article: "article";
5
5
  readonly Genfm: "genfm";
6
6
  readonly Video: "video";
7
+ readonly Screenplay: "screenplay";
7
8
  };
8
9
  export type ProjectsCreateRequestSourceType = (typeof ProjectsCreateRequestSourceType)[keyof typeof ProjectsCreateRequestSourceType];
@@ -8,4 +8,5 @@ exports.ProjectsCreateRequestSourceType = {
8
8
  Article: "article",
9
9
  Genfm: "genfm",
10
10
  Video: "video",
11
+ Screenplay: "screenplay",
11
12
  };
@@ -25,4 +25,53 @@ export declare class Webhooks {
25
25
  */
26
26
  list(request?: ElevenLabs.WebhooksListRequest, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise<ElevenLabs.WorkspaceWebhookListResponseModel>;
27
27
  private __list;
28
+ /**
29
+ * Create a new webhook for the workspace with the specified authentication type.
30
+ *
31
+ * @param {ElevenLabs.BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost} request
32
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
33
+ *
34
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
35
+ *
36
+ * @example
37
+ * await client.webhooks.create({
38
+ * settings: {
39
+ * authType: "hmac",
40
+ * name: "name",
41
+ * webhookUrl: "webhook_url"
42
+ * }
43
+ * })
44
+ */
45
+ create(request: ElevenLabs.BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise<ElevenLabs.WorkspaceCreateWebhookResponseModel>;
46
+ private __create;
47
+ /**
48
+ * Delete the specified workspace webhook
49
+ *
50
+ * @param {string} webhook_id - The unique ID for the webhook
51
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
52
+ *
53
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
54
+ *
55
+ * @example
56
+ * await client.webhooks.delete("G007vmtq9uWYl7SUW9zGS8GZZa1K")
57
+ */
58
+ delete(webhook_id: string, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise<ElevenLabs.DeleteWorkspaceWebhookResponseModel>;
59
+ private __delete;
60
+ /**
61
+ * Update the specified workspace webhook
62
+ *
63
+ * @param {string} webhook_id - The unique ID for the webhook
64
+ * @param {ElevenLabs.BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch} request
65
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
68
+ *
69
+ * @example
70
+ * await client.webhooks.update("G007vmtq9uWYl7SUW9zGS8GZZa1K", {
71
+ * isDisabled: true,
72
+ * name: "My Callback Webhook"
73
+ * })
74
+ */
75
+ update(webhook_id: string, request: ElevenLabs.BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch, requestOptions?: Webhooks.RequestOptions): core.HttpResponsePromise<ElevenLabs.PatchWorkspaceWebhookResponseModel>;
76
+ private __update;
28
77
  }
@@ -135,5 +135,247 @@ class Webhooks {
135
135
  }
136
136
  });
137
137
  }
138
+ /**
139
+ * Create a new webhook for the workspace with the specified authentication type.
140
+ *
141
+ * @param {ElevenLabs.BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost} request
142
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
143
+ *
144
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
145
+ *
146
+ * @example
147
+ * await client.webhooks.create({
148
+ * settings: {
149
+ * authType: "hmac",
150
+ * name: "name",
151
+ * webhookUrl: "webhook_url"
152
+ * }
153
+ * })
154
+ */
155
+ create(request, requestOptions) {
156
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
157
+ }
158
+ __create(request, requestOptions) {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
161
+ 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);
162
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
163
+ 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/workspace/webhooks"),
164
+ method: "POST",
165
+ headers: _headers,
166
+ contentType: "application/json",
167
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
168
+ requestType: "json",
169
+ body: serializers.BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.jsonOrThrow(request, {
170
+ unrecognizedObjectKeys: "strip",
171
+ }),
172
+ 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,
173
+ 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,
174
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
175
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
176
+ logging: this._options.logging,
177
+ });
178
+ if (_response.ok) {
179
+ return {
180
+ data: serializers.WorkspaceCreateWebhookResponseModel.parseOrThrow(_response.body, {
181
+ unrecognizedObjectKeys: "passthrough",
182
+ allowUnrecognizedUnionMembers: true,
183
+ allowUnrecognizedEnumValues: true,
184
+ breadcrumbsPrefix: ["response"],
185
+ }),
186
+ rawResponse: _response.rawResponse,
187
+ };
188
+ }
189
+ if (_response.error.reason === "status-code") {
190
+ switch (_response.error.statusCode) {
191
+ case 422:
192
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
193
+ unrecognizedObjectKeys: "passthrough",
194
+ allowUnrecognizedUnionMembers: true,
195
+ allowUnrecognizedEnumValues: true,
196
+ breadcrumbsPrefix: ["response"],
197
+ }), _response.rawResponse);
198
+ default:
199
+ throw new errors.ElevenLabsError({
200
+ statusCode: _response.error.statusCode,
201
+ body: _response.error.body,
202
+ rawResponse: _response.rawResponse,
203
+ });
204
+ }
205
+ }
206
+ switch (_response.error.reason) {
207
+ case "non-json":
208
+ throw new errors.ElevenLabsError({
209
+ statusCode: _response.error.statusCode,
210
+ body: _response.error.rawBody,
211
+ rawResponse: _response.rawResponse,
212
+ });
213
+ case "timeout":
214
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/workspace/webhooks.");
215
+ case "unknown":
216
+ throw new errors.ElevenLabsError({
217
+ message: _response.error.errorMessage,
218
+ rawResponse: _response.rawResponse,
219
+ });
220
+ }
221
+ });
222
+ }
223
+ /**
224
+ * Delete the specified workspace webhook
225
+ *
226
+ * @param {string} webhook_id - The unique ID for the webhook
227
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
228
+ *
229
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
230
+ *
231
+ * @example
232
+ * await client.webhooks.delete("G007vmtq9uWYl7SUW9zGS8GZZa1K")
233
+ */
234
+ delete(webhook_id, requestOptions) {
235
+ return core.HttpResponsePromise.fromPromise(this.__delete(webhook_id, requestOptions));
236
+ }
237
+ __delete(webhook_id, requestOptions) {
238
+ return __awaiter(this, void 0, void 0, function* () {
239
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
240
+ 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);
241
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
242
+ 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/workspace/webhooks/${core.url.encodePathParam(webhook_id)}`),
243
+ method: "DELETE",
244
+ headers: _headers,
245
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
246
+ 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,
247
+ 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,
248
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
249
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
250
+ logging: this._options.logging,
251
+ });
252
+ if (_response.ok) {
253
+ return {
254
+ data: serializers.DeleteWorkspaceWebhookResponseModel.parseOrThrow(_response.body, {
255
+ unrecognizedObjectKeys: "passthrough",
256
+ allowUnrecognizedUnionMembers: true,
257
+ allowUnrecognizedEnumValues: true,
258
+ breadcrumbsPrefix: ["response"],
259
+ }),
260
+ rawResponse: _response.rawResponse,
261
+ };
262
+ }
263
+ if (_response.error.reason === "status-code") {
264
+ switch (_response.error.statusCode) {
265
+ case 422:
266
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
267
+ unrecognizedObjectKeys: "passthrough",
268
+ allowUnrecognizedUnionMembers: true,
269
+ allowUnrecognizedEnumValues: true,
270
+ breadcrumbsPrefix: ["response"],
271
+ }), _response.rawResponse);
272
+ default:
273
+ throw new errors.ElevenLabsError({
274
+ statusCode: _response.error.statusCode,
275
+ body: _response.error.body,
276
+ rawResponse: _response.rawResponse,
277
+ });
278
+ }
279
+ }
280
+ switch (_response.error.reason) {
281
+ case "non-json":
282
+ throw new errors.ElevenLabsError({
283
+ statusCode: _response.error.statusCode,
284
+ body: _response.error.rawBody,
285
+ rawResponse: _response.rawResponse,
286
+ });
287
+ case "timeout":
288
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling DELETE /v1/workspace/webhooks/{webhook_id}.");
289
+ case "unknown":
290
+ throw new errors.ElevenLabsError({
291
+ message: _response.error.errorMessage,
292
+ rawResponse: _response.rawResponse,
293
+ });
294
+ }
295
+ });
296
+ }
297
+ /**
298
+ * Update the specified workspace webhook
299
+ *
300
+ * @param {string} webhook_id - The unique ID for the webhook
301
+ * @param {ElevenLabs.BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch} request
302
+ * @param {Webhooks.RequestOptions} requestOptions - Request-specific configuration.
303
+ *
304
+ * @throws {@link ElevenLabs.UnprocessableEntityError}
305
+ *
306
+ * @example
307
+ * await client.webhooks.update("G007vmtq9uWYl7SUW9zGS8GZZa1K", {
308
+ * isDisabled: true,
309
+ * name: "My Callback Webhook"
310
+ * })
311
+ */
312
+ update(webhook_id, request, requestOptions) {
313
+ return core.HttpResponsePromise.fromPromise(this.__update(webhook_id, request, requestOptions));
314
+ }
315
+ __update(webhook_id, request, requestOptions) {
316
+ return __awaiter(this, void 0, void 0, function* () {
317
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
318
+ 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);
319
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
320
+ 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/workspace/webhooks/${core.url.encodePathParam(webhook_id)}`),
321
+ method: "PATCH",
322
+ headers: _headers,
323
+ contentType: "application/json",
324
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
325
+ requestType: "json",
326
+ body: serializers.BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.jsonOrThrow(request, {
327
+ unrecognizedObjectKeys: "strip",
328
+ }),
329
+ 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,
330
+ 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,
331
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
332
+ fetchFn: (_m = this._options) === null || _m === void 0 ? void 0 : _m.fetch,
333
+ logging: this._options.logging,
334
+ });
335
+ if (_response.ok) {
336
+ return {
337
+ data: serializers.PatchWorkspaceWebhookResponseModel.parseOrThrow(_response.body, {
338
+ unrecognizedObjectKeys: "passthrough",
339
+ allowUnrecognizedUnionMembers: true,
340
+ allowUnrecognizedEnumValues: true,
341
+ breadcrumbsPrefix: ["response"],
342
+ }),
343
+ rawResponse: _response.rawResponse,
344
+ };
345
+ }
346
+ if (_response.error.reason === "status-code") {
347
+ switch (_response.error.statusCode) {
348
+ case 422:
349
+ throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
350
+ unrecognizedObjectKeys: "passthrough",
351
+ allowUnrecognizedUnionMembers: true,
352
+ allowUnrecognizedEnumValues: true,
353
+ breadcrumbsPrefix: ["response"],
354
+ }), _response.rawResponse);
355
+ default:
356
+ throw new errors.ElevenLabsError({
357
+ statusCode: _response.error.statusCode,
358
+ body: _response.error.body,
359
+ rawResponse: _response.rawResponse,
360
+ });
361
+ }
362
+ }
363
+ switch (_response.error.reason) {
364
+ case "non-json":
365
+ throw new errors.ElevenLabsError({
366
+ statusCode: _response.error.statusCode,
367
+ body: _response.error.rawBody,
368
+ rawResponse: _response.rawResponse,
369
+ });
370
+ case "timeout":
371
+ throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling PATCH /v1/workspace/webhooks/{webhook_id}.");
372
+ case "unknown":
373
+ throw new errors.ElevenLabsError({
374
+ message: _response.error.errorMessage,
375
+ rawResponse: _response.rawResponse,
376
+ });
377
+ }
378
+ });
379
+ }
138
380
  }
139
381
  exports.Webhooks = Webhooks;
@@ -0,0 +1,15 @@
1
+ import type * as ElevenLabs from "../../../../index";
2
+ /**
3
+ * @example
4
+ * {
5
+ * settings: {
6
+ * authType: "hmac",
7
+ * name: "name",
8
+ * webhookUrl: "webhook_url"
9
+ * }
10
+ * }
11
+ */
12
+ export interface BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost {
13
+ /** Webhook settings object containing auth_type and corresponding configuration */
14
+ settings: ElevenLabs.WebhookHmacSettings;
15
+ }
@@ -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,13 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * isDisabled: true,
5
+ * name: "My Callback Webhook"
6
+ * }
7
+ */
8
+ export interface BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch {
9
+ /** Whether to disable or enable the webhook */
10
+ isDisabled: boolean;
11
+ /** The display name of the webhook (used for display purposes only). */
12
+ name: string;
13
+ }
@@ -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 });
@@ -1 +1,3 @@
1
+ export type { BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost } from "./BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost";
2
+ export type { BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch } from "./BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch";
1
3
  export type { WebhooksListRequest } from "./WebhooksListRequest";
@@ -2,6 +2,7 @@ export declare const AgentDefinitionSource: {
2
2
  readonly Cli: "cli";
3
3
  readonly Ui: "ui";
4
4
  readonly Api: "api";
5
+ readonly Template: "template";
5
6
  readonly Unknown: "unknown";
6
7
  };
7
8
  export type AgentDefinitionSource = (typeof AgentDefinitionSource)[keyof typeof AgentDefinitionSource];