@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.
- package/Client.js +2 -2
- package/api/resources/conversationalAi/client/Client.d.ts +3 -0
- package/api/resources/conversationalAi/client/Client.js +31 -26
- package/api/resources/conversationalAi/resources/analytics/client/Client.d.ts +12 -0
- package/api/resources/conversationalAi/resources/analytics/client/Client.js +15 -0
- package/api/resources/conversationalAi/resources/analytics/client/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/analytics/client/index.js +2 -0
- package/api/resources/conversationalAi/resources/analytics/index.d.ts +2 -0
- package/api/resources/conversationalAi/resources/analytics/index.js +18 -0
- package/api/resources/conversationalAi/resources/analytics/resources/index.d.ts +2 -0
- package/api/resources/conversationalAi/resources/analytics/resources/index.js +41 -0
- package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/Client.d.ts +28 -0
- package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/Client.js +139 -0
- package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/index.js +17 -0
- package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/LiveCountGetRequest.d.ts +10 -0
- package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/LiveCountGetRequest.js +3 -0
- package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/index.js +2 -0
- package/api/resources/conversationalAi/resources/analytics/resources/liveCount/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/analytics/resources/liveCount/index.js +17 -0
- package/api/resources/conversationalAi/resources/conversations/client/Client.d.ts +3 -0
- package/api/resources/conversationalAi/resources/conversations/client/Client.js +13 -1
- package/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +9 -0
- package/api/resources/conversationalAi/resources/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/index.js +2 -1
- package/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +2 -2
- package/api/resources/dubbing/resources/resource/client/Client.d.ts +17 -0
- package/api/resources/dubbing/resources/resource/client/Client.js +81 -0
- package/api/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.d.ts +11 -0
- package/api/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.js +3 -0
- package/api/resources/dubbing/resources/resource/client/requests/index.d.ts +1 -0
- package/api/resources/dubbing/resources/resource/resources/speaker/client/Client.d.ts +12 -0
- package/api/resources/dubbing/resources/resource/resources/speaker/client/Client.js +76 -0
- package/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.d.ts +10 -0
- package/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.js +3 -0
- package/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.d.ts +2 -0
- package/api/resources/dubbing/resources/resource/resources/speaker/client/requests/index.d.ts +1 -0
- package/api/resources/studio/resources/projects/client/Client.js +5 -0
- package/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.d.ts +2 -0
- package/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +1 -0
- package/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -0
- package/api/resources/webhooks/client/Client.d.ts +49 -0
- package/api/resources/webhooks/client/Client.js +242 -0
- package/api/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.d.ts +15 -0
- package/api/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.js +3 -0
- package/api/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +13 -0
- package/api/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.js +3 -0
- package/api/resources/webhooks/client/requests/index.d.ts +2 -0
- package/api/types/AgentDefinitionSource.d.ts +1 -0
- package/api/types/AgentDefinitionSource.js +1 -0
- package/api/types/AgentWorkflowRequestModel.d.ts +2 -0
- package/api/types/AgentWorkflowResponseModel.d.ts +2 -0
- package/api/types/ClientEvent.d.ts +1 -0
- package/api/types/ClientEvent.js +1 -0
- package/api/types/ConversationHistoryMetadataCommonModel.d.ts +1 -0
- package/api/types/CustomLlm.d.ts +2 -0
- package/api/types/CustomLlmapiType.d.ts +5 -0
- package/api/types/CustomLlmapiType.js +8 -0
- package/api/types/DeleteWorkspaceWebhookResponseModel.d.ts +4 -0
- package/api/types/DeleteWorkspaceWebhookResponseModel.js +3 -0
- package/api/types/DubbingTranscriptUtterance.d.ts +2 -1
- package/api/types/DubbingTranscriptWord.d.ts +2 -2
- package/api/types/ExtendedSubscriptionResponseModelBillingPeriod.d.ts +2 -0
- package/api/types/ExtendedSubscriptionResponseModelBillingPeriod.js +2 -0
- package/api/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.d.ts +2 -0
- package/api/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.js +2 -0
- package/api/types/GetLiveCountResponse.d.ts +4 -0
- package/api/types/GetLiveCountResponse.js +3 -0
- package/api/types/MusicPrompt.d.ts +2 -2
- package/api/types/PatchWorkspaceWebhookResponseModel.d.ts +4 -0
- package/api/types/PatchWorkspaceWebhookResponseModel.js +3 -0
- package/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +2 -0
- package/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +2 -0
- package/api/types/ProjectExtendedResponseModelSourceType.d.ts +1 -0
- package/api/types/ProjectExtendedResponseModelSourceType.js +1 -0
- package/api/types/ProjectResponseModelSourceType.d.ts +1 -0
- package/api/types/ProjectResponseModelSourceType.js +1 -0
- package/api/types/SegmentMigrationResponse.d.ts +3 -0
- package/api/types/SegmentMigrationResponse.js +3 -0
- package/api/types/SongSection.d.ts +2 -2
- package/api/types/SpeakerCreatedResponse.d.ts +4 -0
- package/api/types/SpeakerCreatedResponse.js +3 -0
- package/api/types/SubscriptionResponseModelBillingPeriod.d.ts +2 -0
- package/api/types/SubscriptionResponseModelBillingPeriod.js +2 -0
- package/api/types/SubscriptionResponseModelCharacterRefreshPeriod.d.ts +2 -0
- package/api/types/SubscriptionResponseModelCharacterRefreshPeriod.js +2 -0
- package/api/types/TtsConversationalConfigInput.d.ts +0 -2
- package/api/types/TtsConversationalConfigOutput.d.ts +0 -2
- package/api/types/TtsConversationalConfigWorkflowOverrideInput.d.ts +0 -2
- package/api/types/TtsConversationalConfigWorkflowOverrideOutput.d.ts +0 -2
- package/api/types/WebhookHmacSettings.d.ts +11 -0
- package/api/types/WebhookHmacSettings.js +3 -0
- package/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -5
- package/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -5
- package/api/types/WidgetTextContents.d.ts +14 -0
- package/api/types/WorkspaceCreateWebhookResponseModel.d.ts +4 -0
- package/api/types/WorkspaceCreateWebhookResponseModel.js +3 -0
- package/api/types/index.d.ts +8 -0
- package/api/types/index.js +8 -0
- package/dist/Client.js +2 -2
- package/dist/api/resources/conversationalAi/client/Client.d.ts +3 -0
- package/dist/api/resources/conversationalAi/client/Client.js +31 -26
- package/dist/api/resources/conversationalAi/resources/analytics/client/Client.d.ts +12 -0
- package/dist/api/resources/conversationalAi/resources/analytics/client/Client.js +15 -0
- package/dist/api/resources/conversationalAi/resources/analytics/client/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/analytics/client/index.js +2 -0
- package/dist/api/resources/conversationalAi/resources/analytics/index.d.ts +2 -0
- package/dist/api/resources/conversationalAi/resources/analytics/index.js +18 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/index.d.ts +2 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/index.js +41 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/Client.d.ts +28 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/Client.js +139 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/index.js +17 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/LiveCountGetRequest.d.ts +10 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/LiveCountGetRequest.js +3 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/client/requests/index.js +2 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/analytics/resources/liveCount/index.js +17 -0
- package/dist/api/resources/conversationalAi/resources/conversations/client/Client.d.ts +3 -0
- package/dist/api/resources/conversationalAi/resources/conversations/client/Client.js +13 -1
- package/dist/api/resources/conversationalAi/resources/conversations/client/requests/ConversationsListRequest.d.ts +9 -0
- package/dist/api/resources/conversationalAi/resources/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/index.js +2 -1
- package/dist/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +2 -2
- package/dist/api/resources/dubbing/resources/resource/client/Client.d.ts +17 -0
- package/dist/api/resources/dubbing/resources/resource/client/Client.js +81 -0
- package/dist/api/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.d.ts +11 -0
- package/dist/api/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.js +3 -0
- package/dist/api/resources/dubbing/resources/resource/client/requests/index.d.ts +1 -0
- package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/Client.d.ts +12 -0
- package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/Client.js +76 -0
- package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.d.ts +10 -0
- package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.js +3 -0
- package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.d.ts +2 -0
- package/dist/api/resources/dubbing/resources/resource/resources/speaker/client/requests/index.d.ts +1 -0
- package/dist/api/resources/studio/resources/projects/client/Client.js +5 -0
- package/dist/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.d.ts +2 -0
- package/dist/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +1 -0
- package/dist/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +49 -0
- package/dist/api/resources/webhooks/client/Client.js +242 -0
- package/dist/api/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.d.ts +15 -0
- package/dist/api/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.js +3 -0
- package/dist/api/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +13 -0
- package/dist/api/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.js +3 -0
- package/dist/api/resources/webhooks/client/requests/index.d.ts +2 -0
- package/dist/api/types/AgentDefinitionSource.d.ts +1 -0
- package/dist/api/types/AgentDefinitionSource.js +1 -0
- package/dist/api/types/AgentWorkflowRequestModel.d.ts +2 -0
- package/dist/api/types/AgentWorkflowResponseModel.d.ts +2 -0
- package/dist/api/types/ClientEvent.d.ts +1 -0
- package/dist/api/types/ClientEvent.js +1 -0
- package/dist/api/types/ConversationHistoryMetadataCommonModel.d.ts +1 -0
- package/dist/api/types/CustomLlm.d.ts +2 -0
- package/dist/api/types/CustomLlmapiType.d.ts +5 -0
- package/dist/api/types/CustomLlmapiType.js +8 -0
- package/dist/api/types/DeleteWorkspaceWebhookResponseModel.d.ts +4 -0
- package/dist/api/types/DeleteWorkspaceWebhookResponseModel.js +3 -0
- package/dist/api/types/DubbingTranscriptUtterance.d.ts +2 -1
- package/dist/api/types/DubbingTranscriptWord.d.ts +2 -2
- package/dist/api/types/ExtendedSubscriptionResponseModelBillingPeriod.d.ts +2 -0
- package/dist/api/types/ExtendedSubscriptionResponseModelBillingPeriod.js +2 -0
- package/dist/api/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.d.ts +2 -0
- package/dist/api/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.js +2 -0
- package/dist/api/types/GetLiveCountResponse.d.ts +4 -0
- package/dist/api/types/GetLiveCountResponse.js +3 -0
- package/dist/api/types/MusicPrompt.d.ts +2 -2
- package/dist/api/types/PatchWorkspaceWebhookResponseModel.d.ts +4 -0
- package/dist/api/types/PatchWorkspaceWebhookResponseModel.js +3 -0
- package/dist/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +2 -0
- package/dist/api/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +2 -0
- package/dist/api/types/ProjectExtendedResponseModelSourceType.d.ts +1 -0
- package/dist/api/types/ProjectExtendedResponseModelSourceType.js +1 -0
- package/dist/api/types/ProjectResponseModelSourceType.d.ts +1 -0
- package/dist/api/types/ProjectResponseModelSourceType.js +1 -0
- package/dist/api/types/SegmentMigrationResponse.d.ts +3 -0
- package/dist/api/types/SegmentMigrationResponse.js +3 -0
- package/dist/api/types/SongSection.d.ts +2 -2
- package/dist/api/types/SpeakerCreatedResponse.d.ts +4 -0
- package/dist/api/types/SpeakerCreatedResponse.js +3 -0
- package/dist/api/types/SubscriptionResponseModelBillingPeriod.d.ts +2 -0
- package/dist/api/types/SubscriptionResponseModelBillingPeriod.js +2 -0
- package/dist/api/types/SubscriptionResponseModelCharacterRefreshPeriod.d.ts +2 -0
- package/dist/api/types/SubscriptionResponseModelCharacterRefreshPeriod.js +2 -0
- package/dist/api/types/TtsConversationalConfigInput.d.ts +0 -2
- package/dist/api/types/TtsConversationalConfigOutput.d.ts +0 -2
- package/dist/api/types/TtsConversationalConfigWorkflowOverrideInput.d.ts +0 -2
- package/dist/api/types/TtsConversationalConfigWorkflowOverrideOutput.d.ts +0 -2
- package/dist/api/types/WebhookHmacSettings.d.ts +11 -0
- package/dist/api/types/WebhookHmacSettings.js +3 -0
- package/dist/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -5
- package/dist/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -5
- package/dist/api/types/WidgetTextContents.d.ts +14 -0
- package/dist/api/types/WorkspaceCreateWebhookResponseModel.d.ts +4 -0
- package/dist/api/types/WorkspaceCreateWebhookResponseModel.js +3 -0
- package/dist/api/types/index.d.ts +8 -0
- package/dist/api/types/index.js +8 -0
- package/dist/serialization/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.d.ts +10 -0
- package/dist/serialization/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.js +42 -0
- package/dist/serialization/resources/dubbing/resources/resource/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/dubbing/resources/resource/client/requests/index.js +3 -1
- package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.d.ts +10 -0
- package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.js +42 -0
- package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.d.ts +1 -0
- package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.js +1 -0
- package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/index.js +3 -1
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +3 -1
- package/dist/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +1 -1
- package/dist/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -1
- package/dist/serialization/resources/webhooks/client/index.d.ts +1 -0
- package/dist/serialization/resources/webhooks/client/index.js +17 -0
- package/dist/serialization/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.d.ts +10 -0
- package/dist/serialization/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.js +42 -0
- package/dist/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +10 -0
- package/dist/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.js +42 -0
- package/dist/serialization/resources/webhooks/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/webhooks/client/requests/index.js +7 -0
- package/dist/serialization/resources/webhooks/index.d.ts +1 -0
- package/dist/serialization/resources/webhooks/index.js +17 -0
- package/dist/serialization/types/AgentDefinitionSource.d.ts +1 -1
- package/dist/serialization/types/AgentDefinitionSource.js +1 -1
- package/dist/serialization/types/AgentWorkflowRequestModel.d.ts +1 -0
- package/dist/serialization/types/AgentWorkflowRequestModel.js +1 -0
- package/dist/serialization/types/AgentWorkflowResponseModel.d.ts +1 -0
- package/dist/serialization/types/AgentWorkflowResponseModel.js +1 -0
- package/dist/serialization/types/ClientEvent.d.ts +1 -1
- package/dist/serialization/types/ClientEvent.js +1 -0
- package/dist/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +1 -0
- package/dist/serialization/types/ConversationHistoryMetadataCommonModel.js +1 -0
- package/dist/serialization/types/CustomLlm.d.ts +2 -0
- package/dist/serialization/types/CustomLlm.js +2 -0
- package/dist/serialization/types/CustomLlmapiType.d.ts +7 -0
- package/dist/serialization/types/CustomLlmapiType.js +39 -0
- package/dist/serialization/types/DeleteWorkspaceWebhookResponseModel.d.ts +9 -0
- package/dist/serialization/types/DeleteWorkspaceWebhookResponseModel.js +41 -0
- package/dist/serialization/types/DubbingTranscriptUtterance.d.ts +2 -1
- package/dist/serialization/types/DubbingTranscriptUtterance.js +2 -1
- package/dist/serialization/types/DubbingTranscriptWord.d.ts +2 -2
- package/dist/serialization/types/DubbingTranscriptWord.js +2 -2
- package/dist/serialization/types/ExtendedSubscriptionResponseModelBillingPeriod.d.ts +1 -1
- package/dist/serialization/types/ExtendedSubscriptionResponseModelBillingPeriod.js +1 -1
- package/dist/serialization/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.d.ts +1 -1
- package/dist/serialization/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.js +1 -1
- package/dist/serialization/types/GetLiveCountResponse.d.ts +9 -0
- package/dist/serialization/types/GetLiveCountResponse.js +41 -0
- package/dist/serialization/types/PatchWorkspaceWebhookResponseModel.d.ts +9 -0
- package/dist/serialization/types/PatchWorkspaceWebhookResponseModel.js +41 -0
- package/dist/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +1 -1
- package/dist/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +1 -1
- package/dist/serialization/types/ProjectExtendedResponseModelSourceType.d.ts +1 -1
- package/dist/serialization/types/ProjectExtendedResponseModelSourceType.js +1 -1
- package/dist/serialization/types/ProjectResponseModelSourceType.d.ts +1 -1
- package/dist/serialization/types/ProjectResponseModelSourceType.js +1 -1
- package/dist/serialization/types/SegmentMigrationResponse.d.ts +9 -0
- package/dist/serialization/types/SegmentMigrationResponse.js +41 -0
- package/dist/serialization/types/SpeakerCreatedResponse.d.ts +10 -0
- package/dist/serialization/types/SpeakerCreatedResponse.js +42 -0
- package/dist/serialization/types/SubscriptionResponseModelBillingPeriod.d.ts +1 -1
- package/dist/serialization/types/SubscriptionResponseModelBillingPeriod.js +1 -1
- package/dist/serialization/types/SubscriptionResponseModelCharacterRefreshPeriod.d.ts +1 -1
- package/dist/serialization/types/SubscriptionResponseModelCharacterRefreshPeriod.js +1 -1
- package/dist/serialization/types/TtsConversationalConfigInput.d.ts +0 -2
- package/dist/serialization/types/TtsConversationalConfigInput.js +0 -2
- package/dist/serialization/types/TtsConversationalConfigOutput.d.ts +0 -2
- package/dist/serialization/types/TtsConversationalConfigOutput.js +0 -2
- package/dist/serialization/types/TtsConversationalConfigWorkflowOverrideInput.d.ts +0 -2
- package/dist/serialization/types/TtsConversationalConfigWorkflowOverrideInput.js +0 -2
- package/dist/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.d.ts +0 -2
- package/dist/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.js +0 -2
- package/dist/serialization/types/WebhookHmacSettings.d.ts +11 -0
- package/dist/serialization/types/WebhookHmacSettings.js +43 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +1 -1
- package/dist/serialization/types/WebhookToolApiSchemaConfigInput.js +3 -3
- package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +1 -1
- package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.js +3 -3
- package/dist/serialization/types/WidgetTextContents.d.ts +7 -0
- package/dist/serialization/types/WidgetTextContents.js +7 -0
- package/dist/serialization/types/WorkspaceCreateWebhookResponseModel.d.ts +10 -0
- package/dist/serialization/types/WorkspaceCreateWebhookResponseModel.js +42 -0
- package/dist/serialization/types/index.d.ts +8 -0
- package/dist/serialization/types/index.js +8 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/realtime/connection.d.ts +110 -6
- package/dist/wrapper/realtime/connection.js +74 -2
- package/dist/wrapper/realtime/index.d.ts +1 -1
- package/package.json +1 -1
- package/reference.md +406 -0
- package/serialization/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.d.ts +10 -0
- package/serialization/resources/dubbing/resources/resource/client/requests/BodyMoveSegmentsBetweenSpeakersV1DubbingResourceDubbingIdMigrateSegmentsPost.js +42 -0
- package/serialization/resources/dubbing/resources/resource/client/requests/index.d.ts +1 -0
- package/serialization/resources/dubbing/resources/resource/client/requests/index.js +3 -1
- package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.d.ts +10 -0
- package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyCreateANewSpeakerV1DubbingResourceDubbingIdSpeakerPost.js +42 -0
- package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.d.ts +1 -0
- package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/BodyUpdateMetadataForASpeakerV1DubbingResourceDubbingIdSpeakerSpeakerIdPatch.js +1 -0
- package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/index.d.ts +1 -0
- package/serialization/resources/dubbing/resources/resource/resources/speaker/client/requests/index.js +3 -1
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +3 -1
- package/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +1 -1
- package/serialization/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -1
- package/serialization/resources/webhooks/client/index.d.ts +1 -0
- package/serialization/resources/webhooks/client/index.js +17 -0
- package/serialization/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.d.ts +10 -0
- package/serialization/resources/webhooks/client/requests/BodyCreateWorkspaceWebhookV1WorkspaceWebhooksPost.js +42 -0
- package/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.d.ts +10 -0
- package/serialization/resources/webhooks/client/requests/BodyUpdateWorkspaceWebhookV1WorkspaceWebhooksWebhookIdPatch.js +42 -0
- package/serialization/resources/webhooks/client/requests/index.d.ts +2 -0
- package/serialization/resources/webhooks/client/requests/index.js +7 -0
- package/serialization/resources/webhooks/index.d.ts +1 -0
- package/serialization/resources/webhooks/index.js +17 -0
- package/serialization/types/AgentDefinitionSource.d.ts +1 -1
- package/serialization/types/AgentDefinitionSource.js +1 -1
- package/serialization/types/AgentWorkflowRequestModel.d.ts +1 -0
- package/serialization/types/AgentWorkflowRequestModel.js +1 -0
- package/serialization/types/AgentWorkflowResponseModel.d.ts +1 -0
- package/serialization/types/AgentWorkflowResponseModel.js +1 -0
- package/serialization/types/ClientEvent.d.ts +1 -1
- package/serialization/types/ClientEvent.js +1 -0
- package/serialization/types/ConversationHistoryMetadataCommonModel.d.ts +1 -0
- package/serialization/types/ConversationHistoryMetadataCommonModel.js +1 -0
- package/serialization/types/CustomLlm.d.ts +2 -0
- package/serialization/types/CustomLlm.js +2 -0
- package/serialization/types/CustomLlmapiType.d.ts +7 -0
- package/serialization/types/CustomLlmapiType.js +39 -0
- package/serialization/types/DeleteWorkspaceWebhookResponseModel.d.ts +9 -0
- package/serialization/types/DeleteWorkspaceWebhookResponseModel.js +41 -0
- package/serialization/types/DubbingTranscriptUtterance.d.ts +2 -1
- package/serialization/types/DubbingTranscriptUtterance.js +2 -1
- package/serialization/types/DubbingTranscriptWord.d.ts +2 -2
- package/serialization/types/DubbingTranscriptWord.js +2 -2
- package/serialization/types/ExtendedSubscriptionResponseModelBillingPeriod.d.ts +1 -1
- package/serialization/types/ExtendedSubscriptionResponseModelBillingPeriod.js +1 -1
- package/serialization/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.d.ts +1 -1
- package/serialization/types/ExtendedSubscriptionResponseModelCharacterRefreshPeriod.js +1 -1
- package/serialization/types/GetLiveCountResponse.d.ts +9 -0
- package/serialization/types/GetLiveCountResponse.js +41 -0
- package/serialization/types/PatchWorkspaceWebhookResponseModel.d.ts +9 -0
- package/serialization/types/PatchWorkspaceWebhookResponseModel.js +41 -0
- package/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.d.ts +1 -1
- package/serialization/types/PendingSubscriptionSwitchResponseModelNextBillingPeriod.js +1 -1
- package/serialization/types/ProjectExtendedResponseModelSourceType.d.ts +1 -1
- package/serialization/types/ProjectExtendedResponseModelSourceType.js +1 -1
- package/serialization/types/ProjectResponseModelSourceType.d.ts +1 -1
- package/serialization/types/ProjectResponseModelSourceType.js +1 -1
- package/serialization/types/SegmentMigrationResponse.d.ts +9 -0
- package/serialization/types/SegmentMigrationResponse.js +41 -0
- package/serialization/types/SpeakerCreatedResponse.d.ts +10 -0
- package/serialization/types/SpeakerCreatedResponse.js +42 -0
- package/serialization/types/SubscriptionResponseModelBillingPeriod.d.ts +1 -1
- package/serialization/types/SubscriptionResponseModelBillingPeriod.js +1 -1
- package/serialization/types/SubscriptionResponseModelCharacterRefreshPeriod.d.ts +1 -1
- package/serialization/types/SubscriptionResponseModelCharacterRefreshPeriod.js +1 -1
- package/serialization/types/TtsConversationalConfigInput.d.ts +0 -2
- package/serialization/types/TtsConversationalConfigInput.js +0 -2
- package/serialization/types/TtsConversationalConfigOutput.d.ts +0 -2
- package/serialization/types/TtsConversationalConfigOutput.js +0 -2
- package/serialization/types/TtsConversationalConfigWorkflowOverrideInput.d.ts +0 -2
- package/serialization/types/TtsConversationalConfigWorkflowOverrideInput.js +0 -2
- package/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.d.ts +0 -2
- package/serialization/types/TtsConversationalConfigWorkflowOverrideOutput.js +0 -2
- package/serialization/types/WebhookHmacSettings.d.ts +11 -0
- package/serialization/types/WebhookHmacSettings.js +43 -0
- package/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +1 -1
- package/serialization/types/WebhookToolApiSchemaConfigInput.js +3 -3
- package/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +1 -1
- package/serialization/types/WebhookToolApiSchemaConfigOutput.js +3 -3
- package/serialization/types/WidgetTextContents.d.ts +7 -0
- package/serialization/types/WidgetTextContents.js +7 -0
- package/serialization/types/WorkspaceCreateWebhookResponseModel.d.ts +10 -0
- package/serialization/types/WorkspaceCreateWebhookResponseModel.js +42 -0
- package/serialization/types/index.d.ts +8 -0
- package/serialization/types/index.js +8 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/realtime/connection.d.ts +110 -6
- package/wrapper/realtime/connection.js +74 -2
- 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
|
*
|
|
@@ -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
|
+
}
|
|
@@ -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. */
|
package/api/resources/dubbing/resources/resource/resources/speaker/client/requests/index.d.ts
CHANGED
|
@@ -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];
|
|
@@ -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,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
|
+
}
|
|
@@ -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];
|