@elevenlabs/elevenlabs-js 2.3.0 → 2.4.1
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 +17 -12
- package/api/resources/conversationalAi/resources/agents/client/Client.d.ts +14 -0
- package/api/resources/conversationalAi/resources/agents/client/Client.js +74 -0
- package/api/resources/conversationalAi/resources/agents/client/requests/BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost.d.ts +11 -0
- package/api/resources/conversationalAi/resources/agents/client/requests/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/index.d.ts +2 -0
- package/api/resources/conversationalAi/resources/index.js +3 -1
- package/api/resources/conversationalAi/resources/tools/client/Client.d.ts +126 -0
- package/api/resources/conversationalAi/resources/tools/client/Client.js +506 -0
- package/api/resources/conversationalAi/resources/tools/client/index.d.ts +2 -0
- package/api/resources/conversationalAi/resources/tools/client/index.js +17 -0
- package/api/resources/conversationalAi/resources/tools/client/requests/ToolsGetDependentAgentsRequest.d.ts +17 -0
- package/api/resources/conversationalAi/resources/tools/client/requests/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/tools/client/requests/index.js +2 -0
- package/api/resources/conversationalAi/resources/tools/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/tools/index.js +17 -0
- package/api/resources/dubbing/client/Client.js +3 -0
- package/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +2 -0
- package/api/resources/textToVoice/client/Client.d.ts +32 -0
- package/api/resources/textToVoice/client/Client.js +162 -0
- package/api/resources/textToVoice/client/requests/BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost.d.ts +23 -0
- package/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +36 -0
- package/api/resources/textToVoice/client/requests/index.d.ts +2 -0
- package/api/resources/textToVoice/types/TextToVoiceDesignRequestOutputFormat.d.ts +28 -0
- package/api/resources/textToVoice/types/TextToVoiceDesignRequestOutputFormat.js +27 -0
- package/api/resources/textToVoice/types/VoiceDesignRequestModelModelId.d.ts +11 -0
- package/api/resources/textToVoice/types/VoiceDesignRequestModelModelId.js +10 -0
- package/api/resources/textToVoice/types/index.d.ts +2 -0
- package/api/resources/textToVoice/types/index.js +2 -0
- package/api/resources/workspace/client/Client.d.ts +39 -0
- package/api/resources/workspace/client/Client.js +205 -0
- package/api/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +13 -0
- package/api/resources/workspace/client/requests/index.d.ts +1 -0
- package/api/types/AgentConfigOverride.d.ts +1 -1
- package/api/types/AgentConfigOverrideConfig.d.ts +1 -1
- package/api/types/AsrProvider.d.ts +5 -1
- package/api/types/AsrProvider.js +5 -0
- package/api/types/{BuiltInTools.d.ts → BuiltInToolsInput.d.ts} +1 -1
- package/api/types/BuiltInToolsOutput.d.ts +16 -0
- package/api/types/ClientToolConfigInput.d.ts +0 -1
- package/api/types/ClientToolConfigOutput.d.ts +0 -1
- package/api/types/ConvAiStoredSecretDependencies.d.ts +1 -1
- package/api/types/ConvAiStoredSecretDependenciesAgentsItem.d.ts +13 -0
- package/api/types/ConversationChargingCommonModel.d.ts +2 -0
- package/api/types/DefaultSharingPreferencesResponseModel.d.ts +8 -0
- package/api/types/GetToolDependentAgentsResponseModel.d.ts +9 -0
- package/api/types/GetToolDependentAgentsResponseModelAgentsItem.d.ts +13 -0
- package/api/types/McpToolConfigInput.d.ts +0 -1
- package/api/types/McpToolConfigOutput.d.ts +0 -1
- package/api/types/PromptAgent.d.ts +1 -27
- package/api/types/PromptAgentApiModelInput.d.ts +32 -0
- package/{dist/api/types/PromptAgentInputToolsItem.d.ts → api/types/PromptAgentApiModelInputToolsItem.d.ts} +2 -2
- package/api/types/PromptAgentApiModelOutput.d.ts +32 -0
- package/api/types/PromptAgentApiModelOutputToolsItem.d.ts +22 -0
- package/api/types/{PromptAgentOverride.d.ts → PromptAgentApiModelOverride.d.ts} +1 -1
- package/api/types/{PromptAgentOverrideConfig.d.ts → PromptAgentApiModelOverrideConfig.d.ts} +1 -1
- package/api/types/PromptAgentDbModel.d.ts +3 -3
- package/api/types/SystemToolConfigInput.d.ts +0 -1
- package/api/types/SystemToolConfigOutput.d.ts +0 -1
- package/api/types/ToolRequestModel.d.ts +8 -0
- package/{dist/api/types/PromptAgentDbModelToolsItem.d.ts → api/types/ToolRequestModelToolConfig.d.ts} +3 -3
- package/api/types/ToolRequestModelToolConfig.js +5 -0
- package/api/types/ToolResponseModel.d.ts +10 -0
- package/api/types/ToolResponseModel.js +5 -0
- package/api/types/{PromptAgentOutputToolsItem.d.ts → ToolResponseModelToolConfig.d.ts} +2 -2
- package/api/types/ToolResponseModelToolConfig.js +5 -0
- package/api/types/ToolsResponseModel.d.ts +7 -0
- package/api/types/ToolsResponseModel.js +5 -0
- package/api/types/WebhookToolConfigInput.d.ts +0 -1
- package/api/types/WebhookToolConfigOutput.d.ts +0 -1
- package/api/types/WorkspaceGroupPermission.d.ts +22 -0
- package/api/types/WorkspaceGroupPermission.js +24 -0
- package/api/types/WorkspaceGroupResponseModel.d.ts +10 -0
- package/api/types/WorkspaceGroupResponseModel.js +5 -0
- package/api/types/index.d.ts +20 -11
- package/api/types/index.js +20 -11
- 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 +17 -12
- package/dist/api/resources/conversationalAi/resources/agents/client/Client.d.ts +14 -0
- package/dist/api/resources/conversationalAi/resources/agents/client/Client.js +74 -0
- package/dist/api/resources/conversationalAi/resources/agents/client/requests/BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost.d.ts +11 -0
- package/dist/api/resources/conversationalAi/resources/agents/client/requests/BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost.js +5 -0
- package/dist/api/resources/conversationalAi/resources/agents/client/requests/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/index.d.ts +2 -0
- package/dist/api/resources/conversationalAi/resources/index.js +3 -1
- package/dist/api/resources/conversationalAi/resources/tools/client/Client.d.ts +126 -0
- package/dist/api/resources/conversationalAi/resources/tools/client/Client.js +506 -0
- package/dist/api/resources/conversationalAi/resources/tools/client/index.d.ts +2 -0
- package/dist/api/resources/conversationalAi/resources/tools/client/index.js +17 -0
- package/dist/api/resources/conversationalAi/resources/tools/client/requests/ToolsGetDependentAgentsRequest.d.ts +17 -0
- package/dist/api/resources/conversationalAi/resources/tools/client/requests/ToolsGetDependentAgentsRequest.js +5 -0
- package/dist/api/resources/conversationalAi/resources/tools/client/requests/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/tools/client/requests/index.js +2 -0
- package/dist/api/resources/conversationalAi/resources/tools/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/tools/index.js +17 -0
- package/dist/api/resources/dubbing/client/Client.js +3 -0
- package/dist/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +2 -0
- package/dist/api/resources/textToVoice/client/Client.d.ts +32 -0
- package/dist/api/resources/textToVoice/client/Client.js +162 -0
- package/dist/api/resources/textToVoice/client/requests/BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost.d.ts +23 -0
- package/dist/api/resources/textToVoice/client/requests/BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost.js +5 -0
- package/dist/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +36 -0
- package/dist/api/resources/textToVoice/client/requests/VoiceDesignRequestModel.js +5 -0
- package/dist/api/resources/textToVoice/client/requests/index.d.ts +2 -0
- package/dist/api/resources/textToVoice/types/TextToVoiceDesignRequestOutputFormat.d.ts +28 -0
- package/dist/api/resources/textToVoice/types/TextToVoiceDesignRequestOutputFormat.js +27 -0
- package/dist/api/resources/textToVoice/types/VoiceDesignRequestModelModelId.d.ts +11 -0
- package/dist/api/resources/textToVoice/types/VoiceDesignRequestModelModelId.js +10 -0
- package/dist/api/resources/textToVoice/types/index.d.ts +2 -0
- package/dist/api/resources/textToVoice/types/index.js +2 -0
- package/dist/api/resources/workspace/client/Client.d.ts +39 -0
- package/dist/api/resources/workspace/client/Client.js +205 -0
- package/dist/api/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +13 -0
- package/dist/api/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js +5 -0
- package/dist/api/resources/workspace/client/requests/index.d.ts +1 -0
- package/dist/api/types/AgentConfigOverride.d.ts +1 -1
- package/dist/api/types/AgentConfigOverrideConfig.d.ts +1 -1
- package/dist/api/types/AsrProvider.d.ts +5 -1
- package/dist/api/types/AsrProvider.js +5 -0
- package/dist/api/types/{BuiltInTools.d.ts → BuiltInToolsInput.d.ts} +1 -1
- package/dist/api/types/BuiltInToolsInput.js +5 -0
- package/dist/api/types/BuiltInToolsOutput.d.ts +16 -0
- package/dist/api/types/BuiltInToolsOutput.js +5 -0
- package/dist/api/types/ClientToolConfigInput.d.ts +0 -1
- package/dist/api/types/ClientToolConfigOutput.d.ts +0 -1
- package/dist/api/types/ConvAiStoredSecretDependencies.d.ts +1 -1
- package/dist/api/types/ConvAiStoredSecretDependenciesAgentsItem.d.ts +13 -0
- package/dist/api/types/ConvAiStoredSecretDependenciesAgentsItem.js +5 -0
- package/dist/api/types/ConversationChargingCommonModel.d.ts +2 -0
- package/dist/api/types/DefaultSharingPreferencesResponseModel.d.ts +8 -0
- package/dist/api/types/DefaultSharingPreferencesResponseModel.js +5 -0
- package/dist/api/types/GetToolDependentAgentsResponseModel.d.ts +9 -0
- package/dist/api/types/GetToolDependentAgentsResponseModel.js +5 -0
- package/dist/api/types/GetToolDependentAgentsResponseModelAgentsItem.d.ts +13 -0
- package/dist/api/types/GetToolDependentAgentsResponseModelAgentsItem.js +5 -0
- package/dist/api/types/McpToolConfigInput.d.ts +0 -1
- package/dist/api/types/McpToolConfigOutput.d.ts +0 -1
- package/dist/api/types/PromptAgent.d.ts +1 -27
- package/dist/api/types/PromptAgentApiModelInput.d.ts +32 -0
- package/dist/api/types/PromptAgentApiModelInput.js +5 -0
- package/{api/types/PromptAgentDbModelToolsItem.d.ts → dist/api/types/PromptAgentApiModelInputToolsItem.d.ts} +2 -2
- package/dist/api/types/PromptAgentApiModelInputToolsItem.js +5 -0
- package/dist/api/types/PromptAgentApiModelOutput.d.ts +32 -0
- package/dist/api/types/PromptAgentApiModelOutput.js +5 -0
- package/dist/api/types/PromptAgentApiModelOutputToolsItem.d.ts +22 -0
- package/dist/api/types/PromptAgentApiModelOutputToolsItem.js +5 -0
- package/dist/api/types/{PromptAgentOverride.d.ts → PromptAgentApiModelOverride.d.ts} +1 -1
- package/dist/api/types/PromptAgentApiModelOverride.js +5 -0
- package/dist/api/types/{PromptAgentOverrideConfig.d.ts → PromptAgentApiModelOverrideConfig.d.ts} +1 -1
- package/dist/api/types/PromptAgentApiModelOverrideConfig.js +5 -0
- package/dist/api/types/PromptAgentDbModel.d.ts +3 -3
- package/dist/api/types/SystemToolConfigInput.d.ts +0 -1
- package/dist/api/types/SystemToolConfigOutput.d.ts +0 -1
- package/dist/api/types/ToolRequestModel.d.ts +8 -0
- package/dist/api/types/ToolRequestModel.js +5 -0
- package/{api/types/PromptAgentInputToolsItem.d.ts → dist/api/types/ToolRequestModelToolConfig.d.ts} +3 -3
- package/dist/api/types/ToolRequestModelToolConfig.js +5 -0
- package/dist/api/types/ToolResponseModel.d.ts +10 -0
- package/dist/api/types/ToolResponseModel.js +5 -0
- package/dist/api/types/{PromptAgentOutputToolsItem.d.ts → ToolResponseModelToolConfig.d.ts} +2 -2
- package/dist/api/types/ToolResponseModelToolConfig.js +5 -0
- package/dist/api/types/ToolsResponseModel.d.ts +7 -0
- package/dist/api/types/ToolsResponseModel.js +5 -0
- package/dist/api/types/WebhookToolConfigInput.d.ts +0 -1
- package/dist/api/types/WebhookToolConfigOutput.d.ts +0 -1
- package/dist/api/types/WorkspaceGroupPermission.d.ts +22 -0
- package/dist/api/types/WorkspaceGroupPermission.js +24 -0
- package/dist/api/types/WorkspaceGroupResponseModel.d.ts +10 -0
- package/dist/api/types/WorkspaceGroupResponseModel.js +5 -0
- package/dist/api/types/index.d.ts +20 -11
- package/dist/api/types/index.js +20 -11
- package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost.d.ts +12 -0
- package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost.js +43 -0
- package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/conversationalAi/resources/agents/client/requests/index.js +3 -1
- package/dist/serialization/resources/textToVoice/client/requests/BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost.d.ts +16 -0
- package/dist/serialization/resources/textToVoice/client/requests/BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost.js +47 -0
- package/dist/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +22 -0
- package/dist/serialization/{types/DependentAvailableAgentToolIdentifier.js → resources/textToVoice/client/requests/VoiceDesignRequestModel.js} +14 -9
- package/dist/serialization/resources/textToVoice/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/textToVoice/client/requests/index.js +5 -1
- package/dist/serialization/resources/textToVoice/types/TextToVoiceDesignRequestOutputFormat.d.ts +10 -0
- package/dist/serialization/resources/textToVoice/types/TextToVoiceDesignRequestOutputFormat.js +61 -0
- package/dist/serialization/resources/textToVoice/types/VoiceDesignRequestModelModelId.d.ts +10 -0
- package/{serialization/types/DependentUnknownAgentToolIdentifier.js → dist/serialization/resources/textToVoice/types/VoiceDesignRequestModelModelId.js} +3 -3
- package/dist/serialization/resources/textToVoice/types/index.d.ts +2 -0
- package/dist/serialization/resources/textToVoice/types/index.js +2 -0
- package/dist/serialization/resources/workspace/client/getShareOptions.d.ts +11 -0
- package/dist/serialization/{types/DependentAvailableAgentToolIdentifierAccessLevel.js → resources/workspace/client/getShareOptions.js} +4 -3
- package/dist/serialization/resources/workspace/client/index.d.ts +1 -0
- package/dist/serialization/resources/workspace/client/index.js +24 -0
- package/dist/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +12 -0
- package/dist/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js +43 -0
- package/dist/serialization/resources/workspace/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/workspace/client/requests/index.js +3 -1
- package/dist/serialization/types/AgentConfigOverride.d.ts +2 -2
- package/dist/serialization/types/AgentConfigOverride.js +2 -2
- package/dist/serialization/types/AgentConfigOverrideConfig.d.ts +2 -2
- package/dist/serialization/types/AgentConfigOverrideConfig.js +2 -2
- package/dist/serialization/types/AsrProvider.d.ts +1 -1
- package/dist/serialization/types/AsrProvider.js +1 -1
- package/dist/serialization/types/{BuiltInTools.d.ts → BuiltInToolsInput.d.ts} +2 -2
- package/dist/serialization/types/{BuiltInTools.js → BuiltInToolsInput.js} +2 -2
- package/dist/serialization/types/BuiltInToolsOutput.d.ts +17 -0
- package/dist/serialization/types/BuiltInToolsOutput.js +48 -0
- package/dist/serialization/types/ClientToolConfigInput.d.ts +0 -1
- package/dist/serialization/types/ClientToolConfigInput.js +0 -1
- package/dist/serialization/types/ClientToolConfigOutput.d.ts +0 -1
- package/dist/serialization/types/ClientToolConfigOutput.js +0 -1
- package/dist/serialization/types/ConvAiStoredSecretDependencies.d.ts +2 -2
- package/dist/serialization/types/ConvAiStoredSecretDependencies.js +2 -2
- package/dist/serialization/types/ConvAiStoredSecretDependenciesAgentsItem.d.ts +18 -0
- package/dist/serialization/types/{ConvAiStoredSecretDependenciesAgentToolsItem.js → ConvAiStoredSecretDependenciesAgentsItem.js} +6 -6
- package/dist/serialization/types/ConversationChargingCommonModel.d.ts +2 -0
- package/dist/serialization/types/ConversationChargingCommonModel.js +2 -0
- package/dist/serialization/types/DefaultSharingPreferencesResponseModel.d.ts +13 -0
- package/dist/serialization/types/DefaultSharingPreferencesResponseModel.js +44 -0
- package/dist/serialization/types/GetToolDependentAgentsResponseModel.d.ts +15 -0
- package/dist/serialization/types/GetToolDependentAgentsResponseModel.js +46 -0
- package/dist/serialization/types/GetToolDependentAgentsResponseModelAgentsItem.d.ts +18 -0
- package/{serialization/types/ConvAiStoredSecretDependenciesAgentToolsItem.js → dist/serialization/types/GetToolDependentAgentsResponseModelAgentsItem.js} +6 -6
- package/dist/serialization/types/McpToolConfigInput.d.ts +0 -1
- package/dist/serialization/types/McpToolConfigInput.js +0 -1
- package/dist/serialization/types/McpToolConfigOutput.d.ts +0 -1
- package/dist/serialization/types/McpToolConfigOutput.js +0 -1
- package/dist/serialization/types/PromptAgent.d.ts +2 -20
- package/dist/serialization/types/PromptAgent.js +1 -19
- package/dist/serialization/types/PromptAgentApiModelInput.d.ts +30 -0
- package/dist/serialization/types/PromptAgentApiModelInput.js +61 -0
- package/{serialization/types/PromptAgentDbModelToolsItem.d.ts → dist/serialization/types/PromptAgentApiModelInputToolsItem.d.ts} +3 -3
- package/{serialization/types/PromptAgentDbModelToolsItem.js → dist/serialization/types/PromptAgentApiModelInputToolsItem.js} +2 -2
- package/dist/serialization/types/PromptAgentApiModelOutput.d.ts +30 -0
- package/dist/serialization/types/PromptAgentApiModelOutput.js +61 -0
- package/dist/serialization/types/PromptAgentApiModelOutputToolsItem.d.ts +26 -0
- package/dist/serialization/types/PromptAgentApiModelOutputToolsItem.js +55 -0
- package/{serialization/types/PromptAgentOverride.d.ts → dist/serialization/types/PromptAgentApiModelOverride.d.ts} +2 -2
- package/dist/serialization/types/{PromptAgentOverride.js → PromptAgentApiModelOverride.js} +2 -2
- package/dist/serialization/types/{PromptAgentOverrideConfig.d.ts → PromptAgentApiModelOverrideConfig.d.ts} +2 -2
- package/dist/serialization/types/{PromptAgentOverrideConfig.js → PromptAgentApiModelOverrideConfig.js} +2 -2
- package/dist/serialization/types/PromptAgentDbModel.d.ts +3 -4
- package/dist/serialization/types/PromptAgentDbModel.js +3 -4
- package/dist/serialization/types/SystemToolConfigInput.d.ts +0 -1
- package/dist/serialization/types/SystemToolConfigInput.js +0 -1
- package/dist/serialization/types/SystemToolConfigOutput.d.ts +0 -1
- package/dist/serialization/types/SystemToolConfigOutput.js +0 -1
- package/dist/serialization/types/ToolRequestModel.d.ts +13 -0
- package/dist/serialization/types/ToolRequestModel.js +44 -0
- package/dist/serialization/types/{PromptAgentInputToolsItem.d.ts → ToolRequestModelToolConfig.d.ts} +3 -3
- package/{serialization/types/PromptAgentInputToolsItem.js → dist/serialization/types/ToolRequestModelToolConfig.js} +2 -2
- package/dist/serialization/types/ToolResponseModel.d.ts +16 -0
- package/dist/serialization/types/ToolResponseModel.js +47 -0
- package/{serialization/types/PromptAgentOutputToolsItem.d.ts → dist/serialization/types/ToolResponseModelToolConfig.d.ts} +3 -3
- package/{serialization/types/PromptAgentOutputToolsItem.js → dist/serialization/types/ToolResponseModelToolConfig.js} +2 -2
- package/dist/serialization/types/ToolsResponseModel.d.ts +13 -0
- package/dist/serialization/types/ToolsResponseModel.js +44 -0
- package/dist/serialization/types/WebhookToolConfigInput.d.ts +0 -1
- package/dist/serialization/types/WebhookToolConfigInput.js +0 -1
- package/dist/serialization/types/WebhookToolConfigOutput.d.ts +0 -1
- package/dist/serialization/types/WebhookToolConfigOutput.js +0 -1
- package/dist/serialization/types/WorkspaceGroupPermission.d.ts +10 -0
- package/dist/serialization/types/WorkspaceGroupPermission.js +58 -0
- package/dist/serialization/types/WorkspaceGroupResponseModel.d.ts +16 -0
- package/dist/serialization/types/WorkspaceGroupResponseModel.js +47 -0
- package/dist/serialization/types/index.d.ts +20 -11
- package/dist/serialization/types/index.js +20 -11
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wrapper/play.d.ts +1 -2
- package/dist/wrapper/play.js +69 -36
- package/dist/wrapper/stream.d.ts +1 -2
- package/dist/wrapper/stream.js +64 -37
- package/dist/wrapper/utils.d.ts +2 -0
- package/dist/wrapper/utils.js +41 -0
- package/package.json +2 -3
- package/reference.md +1019 -239
- package/runtime-tests/cf-worker/package.json +17 -0
- package/runtime-tests/cf-worker/wrangler.toml +4 -0
- package/serialization/resources/conversationalAi/resources/agents/client/requests/BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost.d.ts +12 -0
- package/serialization/resources/conversationalAi/resources/agents/client/requests/BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost.js +43 -0
- package/serialization/resources/conversationalAi/resources/agents/client/requests/index.d.ts +1 -0
- package/serialization/resources/conversationalAi/resources/agents/client/requests/index.js +3 -1
- package/serialization/resources/textToVoice/client/requests/BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost.d.ts +16 -0
- package/serialization/resources/textToVoice/client/requests/BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost.js +47 -0
- package/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.d.ts +22 -0
- package/serialization/resources/textToVoice/client/requests/VoiceDesignRequestModel.js +53 -0
- package/serialization/resources/textToVoice/client/requests/index.d.ts +2 -0
- package/serialization/resources/textToVoice/client/requests/index.js +5 -1
- package/serialization/resources/textToVoice/types/TextToVoiceDesignRequestOutputFormat.d.ts +10 -0
- package/serialization/resources/textToVoice/types/TextToVoiceDesignRequestOutputFormat.js +61 -0
- package/serialization/resources/textToVoice/types/VoiceDesignRequestModelModelId.d.ts +10 -0
- package/{dist/serialization/types/DependentUnknownAgentToolIdentifier.js → serialization/resources/textToVoice/types/VoiceDesignRequestModelModelId.js} +3 -3
- package/serialization/resources/textToVoice/types/index.d.ts +2 -0
- package/serialization/resources/textToVoice/types/index.js +2 -0
- package/serialization/resources/workspace/client/getShareOptions.d.ts +11 -0
- package/serialization/resources/workspace/client/getShareOptions.js +42 -0
- package/serialization/resources/workspace/client/index.d.ts +1 -0
- package/serialization/resources/workspace/client/index.js +24 -0
- package/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +12 -0
- package/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js +43 -0
- package/serialization/resources/workspace/client/requests/index.d.ts +1 -0
- package/serialization/resources/workspace/client/requests/index.js +3 -1
- package/serialization/types/AgentConfigOverride.d.ts +2 -2
- package/serialization/types/AgentConfigOverride.js +2 -2
- package/serialization/types/AgentConfigOverrideConfig.d.ts +2 -2
- package/serialization/types/AgentConfigOverrideConfig.js +2 -2
- package/serialization/types/AsrProvider.d.ts +1 -1
- package/serialization/types/AsrProvider.js +1 -1
- package/serialization/types/{BuiltInTools.d.ts → BuiltInToolsInput.d.ts} +2 -2
- package/serialization/types/{BuiltInTools.js → BuiltInToolsInput.js} +2 -2
- package/serialization/types/BuiltInToolsOutput.d.ts +17 -0
- package/serialization/types/BuiltInToolsOutput.js +48 -0
- package/serialization/types/ClientToolConfigInput.d.ts +0 -1
- package/serialization/types/ClientToolConfigInput.js +0 -1
- package/serialization/types/ClientToolConfigOutput.d.ts +0 -1
- package/serialization/types/ClientToolConfigOutput.js +0 -1
- package/serialization/types/ConvAiStoredSecretDependencies.d.ts +2 -2
- package/serialization/types/ConvAiStoredSecretDependencies.js +2 -2
- package/serialization/types/ConvAiStoredSecretDependenciesAgentsItem.d.ts +18 -0
- package/serialization/types/ConvAiStoredSecretDependenciesAgentsItem.js +51 -0
- package/serialization/types/ConversationChargingCommonModel.d.ts +2 -0
- package/serialization/types/ConversationChargingCommonModel.js +2 -0
- package/serialization/types/DefaultSharingPreferencesResponseModel.d.ts +13 -0
- package/serialization/types/DefaultSharingPreferencesResponseModel.js +44 -0
- package/serialization/types/GetToolDependentAgentsResponseModel.d.ts +15 -0
- package/serialization/types/GetToolDependentAgentsResponseModel.js +46 -0
- package/serialization/types/GetToolDependentAgentsResponseModelAgentsItem.d.ts +18 -0
- package/serialization/types/GetToolDependentAgentsResponseModelAgentsItem.js +51 -0
- package/serialization/types/McpToolConfigInput.d.ts +0 -1
- package/serialization/types/McpToolConfigInput.js +0 -1
- package/serialization/types/McpToolConfigOutput.d.ts +0 -1
- package/serialization/types/McpToolConfigOutput.js +0 -1
- package/serialization/types/PromptAgent.d.ts +2 -20
- package/serialization/types/PromptAgent.js +1 -19
- package/serialization/types/PromptAgentApiModelInput.d.ts +30 -0
- package/serialization/types/PromptAgentApiModelInput.js +61 -0
- package/{dist/serialization/types/PromptAgentDbModelToolsItem.d.ts → serialization/types/PromptAgentApiModelInputToolsItem.d.ts} +3 -3
- package/{dist/serialization/types/PromptAgentDbModelToolsItem.js → serialization/types/PromptAgentApiModelInputToolsItem.js} +2 -2
- package/serialization/types/PromptAgentApiModelOutput.d.ts +30 -0
- package/serialization/types/PromptAgentApiModelOutput.js +61 -0
- package/serialization/types/PromptAgentApiModelOutputToolsItem.d.ts +26 -0
- package/serialization/types/PromptAgentApiModelOutputToolsItem.js +55 -0
- package/{dist/serialization/types/PromptAgentOverride.d.ts → serialization/types/PromptAgentApiModelOverride.d.ts} +2 -2
- package/serialization/types/{PromptAgentOverride.js → PromptAgentApiModelOverride.js} +2 -2
- package/serialization/types/{PromptAgentOverrideConfig.d.ts → PromptAgentApiModelOverrideConfig.d.ts} +2 -2
- package/serialization/types/{PromptAgentOverrideConfig.js → PromptAgentApiModelOverrideConfig.js} +2 -2
- package/serialization/types/PromptAgentDbModel.d.ts +3 -4
- package/serialization/types/PromptAgentDbModel.js +3 -4
- package/serialization/types/SystemToolConfigInput.d.ts +0 -1
- package/serialization/types/SystemToolConfigInput.js +0 -1
- package/serialization/types/SystemToolConfigOutput.d.ts +0 -1
- package/serialization/types/SystemToolConfigOutput.js +0 -1
- package/serialization/types/ToolRequestModel.d.ts +13 -0
- package/serialization/types/ToolRequestModel.js +44 -0
- package/serialization/types/{PromptAgentInputToolsItem.d.ts → ToolRequestModelToolConfig.d.ts} +3 -3
- package/{dist/serialization/types/PromptAgentInputToolsItem.js → serialization/types/ToolRequestModelToolConfig.js} +2 -2
- package/serialization/types/ToolResponseModel.d.ts +16 -0
- package/serialization/types/ToolResponseModel.js +47 -0
- package/{dist/serialization/types/PromptAgentOutputToolsItem.d.ts → serialization/types/ToolResponseModelToolConfig.d.ts} +3 -3
- package/{dist/serialization/types/PromptAgentOutputToolsItem.js → serialization/types/ToolResponseModelToolConfig.js} +2 -2
- package/serialization/types/ToolsResponseModel.d.ts +13 -0
- package/serialization/types/ToolsResponseModel.js +44 -0
- package/serialization/types/WebhookToolConfigInput.d.ts +0 -1
- package/serialization/types/WebhookToolConfigInput.js +0 -1
- package/serialization/types/WebhookToolConfigOutput.d.ts +0 -1
- package/serialization/types/WebhookToolConfigOutput.js +0 -1
- package/serialization/types/WorkspaceGroupPermission.d.ts +10 -0
- package/serialization/types/WorkspaceGroupPermission.js +58 -0
- package/serialization/types/WorkspaceGroupResponseModel.d.ts +16 -0
- package/serialization/types/WorkspaceGroupResponseModel.js +47 -0
- package/serialization/types/index.d.ts +20 -11
- package/serialization/types/index.js +20 -11
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/wrapper/play.d.ts +1 -2
- package/wrapper/play.js +69 -36
- package/wrapper/stream.d.ts +1 -2
- package/wrapper/stream.js +64 -37
- package/wrapper/utils.d.ts +2 -0
- package/wrapper/utils.js +41 -0
- package/api/types/ConvAiStoredSecretDependenciesAgentToolsItem.d.ts +0 -13
- package/api/types/DependentAvailableAgentToolIdentifier.d.ts +0 -11
- package/api/types/DependentAvailableAgentToolIdentifierAccessLevel.d.ts +0 -9
- package/api/types/DependentAvailableAgentToolIdentifierAccessLevel.js +0 -11
- package/api/types/DependentUnknownAgentToolIdentifier.d.ts +0 -9
- package/dist/api/types/ConvAiStoredSecretDependenciesAgentToolsItem.d.ts +0 -13
- package/dist/api/types/DependentAvailableAgentToolIdentifier.d.ts +0 -11
- package/dist/api/types/DependentAvailableAgentToolIdentifierAccessLevel.d.ts +0 -9
- package/dist/api/types/DependentAvailableAgentToolIdentifierAccessLevel.js +0 -11
- package/dist/api/types/DependentUnknownAgentToolIdentifier.d.ts +0 -9
- package/dist/serialization/types/ConvAiStoredSecretDependenciesAgentToolsItem.d.ts +0 -18
- package/dist/serialization/types/DependentAvailableAgentToolIdentifier.d.ts +0 -17
- package/dist/serialization/types/DependentAvailableAgentToolIdentifierAccessLevel.d.ts +0 -10
- package/dist/serialization/types/DependentUnknownAgentToolIdentifier.d.ts +0 -11
- package/serialization/types/ConvAiStoredSecretDependenciesAgentToolsItem.d.ts +0 -18
- package/serialization/types/DependentAvailableAgentToolIdentifier.d.ts +0 -17
- package/serialization/types/DependentAvailableAgentToolIdentifier.js +0 -48
- package/serialization/types/DependentAvailableAgentToolIdentifierAccessLevel.d.ts +0 -10
- package/serialization/types/DependentAvailableAgentToolIdentifierAccessLevel.js +0 -41
- package/serialization/types/DependentUnknownAgentToolIdentifier.d.ts +0 -11
- /package/api/{types/BuiltInTools.js → resources/conversationalAi/resources/agents/client/requests/BodyDuplicateAgentV1ConvaiAgentsAgentIdDuplicatePost.js} +0 -0
- /package/api/{types/ConvAiStoredSecretDependenciesAgentToolsItem.js → resources/conversationalAi/resources/tools/client/requests/ToolsGetDependentAgentsRequest.js} +0 -0
- /package/api/{types/DependentAvailableAgentToolIdentifier.js → resources/textToVoice/client/requests/BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost.js} +0 -0
- /package/api/{types/DependentUnknownAgentToolIdentifier.js → resources/textToVoice/client/requests/VoiceDesignRequestModel.js} +0 -0
- /package/api/{types/PromptAgentDbModelToolsItem.js → resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js} +0 -0
- /package/api/types/{PromptAgentInputToolsItem.js → BuiltInToolsInput.js} +0 -0
- /package/api/types/{PromptAgentOutputToolsItem.js → BuiltInToolsOutput.js} +0 -0
- /package/api/types/{PromptAgentOverride.js → ConvAiStoredSecretDependenciesAgentsItem.js} +0 -0
- /package/api/types/{PromptAgentOverrideConfig.js → DefaultSharingPreferencesResponseModel.js} +0 -0
- /package/{dist/api/types/BuiltInTools.js → api/types/GetToolDependentAgentsResponseModel.js} +0 -0
- /package/{dist/api/types/ConvAiStoredSecretDependenciesAgentToolsItem.js → api/types/GetToolDependentAgentsResponseModelAgentsItem.js} +0 -0
- /package/{dist/api/types/DependentAvailableAgentToolIdentifier.js → api/types/PromptAgentApiModelInput.js} +0 -0
- /package/{dist/api/types/DependentUnknownAgentToolIdentifier.js → api/types/PromptAgentApiModelInputToolsItem.js} +0 -0
- /package/{dist/api/types/PromptAgentDbModelToolsItem.js → api/types/PromptAgentApiModelOutput.js} +0 -0
- /package/{dist/api/types/PromptAgentInputToolsItem.js → api/types/PromptAgentApiModelOutputToolsItem.js} +0 -0
- /package/{dist/api/types/PromptAgentOutputToolsItem.js → api/types/PromptAgentApiModelOverride.js} +0 -0
- /package/{dist/api/types/PromptAgentOverride.js → api/types/PromptAgentApiModelOverrideConfig.js} +0 -0
- /package/{dist/api/types/PromptAgentOverrideConfig.js → api/types/ToolRequestModel.js} +0 -0
|
@@ -229,5 +229,167 @@ class TextToVoice {
|
|
|
229
229
|
}
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* Create a voice from previously generated voice preview. This endpoint should be called after you fetched a generated_voice_id using POST /v1/text-to-voice/design or POST /v1/text-to-voice/:voice_id/remix.
|
|
234
|
+
*
|
|
235
|
+
* @param {ElevenLabs.BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost} request
|
|
236
|
+
* @param {TextToVoice.RequestOptions} requestOptions - Request-specific configuration.
|
|
237
|
+
*
|
|
238
|
+
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* await client.textToVoice.create({
|
|
242
|
+
* voiceName: "Sassy squeaky mouse",
|
|
243
|
+
* voiceDescription: "A sassy squeaky mouse",
|
|
244
|
+
* generatedVoiceId: "37HceQefKmEi3bGovXjL"
|
|
245
|
+
* })
|
|
246
|
+
*/
|
|
247
|
+
create(request, requestOptions) {
|
|
248
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
249
|
+
}
|
|
250
|
+
__create(request, requestOptions) {
|
|
251
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
+
var _a, _b, _c;
|
|
253
|
+
const _response = yield core.fetcher({
|
|
254
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/text-to-voice"),
|
|
255
|
+
method: "POST",
|
|
256
|
+
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
257
|
+
contentType: "application/json",
|
|
258
|
+
requestType: "json",
|
|
259
|
+
body: serializers.BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost.jsonOrThrow(request, {
|
|
260
|
+
unrecognizedObjectKeys: "strip",
|
|
261
|
+
}),
|
|
262
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
|
|
263
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
264
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
265
|
+
});
|
|
266
|
+
if (_response.ok) {
|
|
267
|
+
return {
|
|
268
|
+
data: serializers.Voice.parseOrThrow(_response.body, {
|
|
269
|
+
unrecognizedObjectKeys: "passthrough",
|
|
270
|
+
allowUnrecognizedUnionMembers: true,
|
|
271
|
+
allowUnrecognizedEnumValues: true,
|
|
272
|
+
breadcrumbsPrefix: ["response"],
|
|
273
|
+
}),
|
|
274
|
+
rawResponse: _response.rawResponse,
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
if (_response.error.reason === "status-code") {
|
|
278
|
+
switch (_response.error.statusCode) {
|
|
279
|
+
case 422:
|
|
280
|
+
throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
281
|
+
unrecognizedObjectKeys: "passthrough",
|
|
282
|
+
allowUnrecognizedUnionMembers: true,
|
|
283
|
+
allowUnrecognizedEnumValues: true,
|
|
284
|
+
breadcrumbsPrefix: ["response"],
|
|
285
|
+
}), _response.rawResponse);
|
|
286
|
+
default:
|
|
287
|
+
throw new errors.ElevenLabsError({
|
|
288
|
+
statusCode: _response.error.statusCode,
|
|
289
|
+
body: _response.error.body,
|
|
290
|
+
rawResponse: _response.rawResponse,
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
switch (_response.error.reason) {
|
|
295
|
+
case "non-json":
|
|
296
|
+
throw new errors.ElevenLabsError({
|
|
297
|
+
statusCode: _response.error.statusCode,
|
|
298
|
+
body: _response.error.rawBody,
|
|
299
|
+
rawResponse: _response.rawResponse,
|
|
300
|
+
});
|
|
301
|
+
case "timeout":
|
|
302
|
+
throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/text-to-voice.");
|
|
303
|
+
case "unknown":
|
|
304
|
+
throw new errors.ElevenLabsError({
|
|
305
|
+
message: _response.error.errorMessage,
|
|
306
|
+
rawResponse: _response.rawResponse,
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Design a voice via a prompt. This method returns a list of voice previews. Each preview has a generated_voice_id and a sample of the voice as base64 encoded mp3 audio. To create a voice use the generated_voice_id of the preferred preview with the /v1/text-to-voice endpoint.
|
|
313
|
+
*
|
|
314
|
+
* @param {ElevenLabs.VoiceDesignRequestModel} request
|
|
315
|
+
* @param {TextToVoice.RequestOptions} requestOptions - Request-specific configuration.
|
|
316
|
+
*
|
|
317
|
+
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
318
|
+
*
|
|
319
|
+
* @example
|
|
320
|
+
* await client.textToVoice.design({
|
|
321
|
+
* voiceDescription: "A sassy squeaky mouse"
|
|
322
|
+
* })
|
|
323
|
+
*/
|
|
324
|
+
design(request, requestOptions) {
|
|
325
|
+
return core.HttpResponsePromise.fromPromise(this.__design(request, requestOptions));
|
|
326
|
+
}
|
|
327
|
+
__design(request, requestOptions) {
|
|
328
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
329
|
+
var _a, _b, _c;
|
|
330
|
+
const { outputFormat } = request, _body = __rest(request, ["outputFormat"]);
|
|
331
|
+
const _queryParams = {};
|
|
332
|
+
if (outputFormat != null) {
|
|
333
|
+
_queryParams["output_format"] = serializers.TextToVoiceDesignRequestOutputFormat.jsonOrThrow(outputFormat, {
|
|
334
|
+
unrecognizedObjectKeys: "strip",
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
const _response = yield core.fetcher({
|
|
338
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/text-to-voice/design"),
|
|
339
|
+
method: "POST",
|
|
340
|
+
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
341
|
+
contentType: "application/json",
|
|
342
|
+
queryParameters: _queryParams,
|
|
343
|
+
requestType: "json",
|
|
344
|
+
body: serializers.VoiceDesignRequestModel.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
345
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
|
|
346
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
347
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
348
|
+
});
|
|
349
|
+
if (_response.ok) {
|
|
350
|
+
return {
|
|
351
|
+
data: serializers.VoiceDesignPreviewResponse.parseOrThrow(_response.body, {
|
|
352
|
+
unrecognizedObjectKeys: "passthrough",
|
|
353
|
+
allowUnrecognizedUnionMembers: true,
|
|
354
|
+
allowUnrecognizedEnumValues: true,
|
|
355
|
+
breadcrumbsPrefix: ["response"],
|
|
356
|
+
}),
|
|
357
|
+
rawResponse: _response.rawResponse,
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
if (_response.error.reason === "status-code") {
|
|
361
|
+
switch (_response.error.statusCode) {
|
|
362
|
+
case 422:
|
|
363
|
+
throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
364
|
+
unrecognizedObjectKeys: "passthrough",
|
|
365
|
+
allowUnrecognizedUnionMembers: true,
|
|
366
|
+
allowUnrecognizedEnumValues: true,
|
|
367
|
+
breadcrumbsPrefix: ["response"],
|
|
368
|
+
}), _response.rawResponse);
|
|
369
|
+
default:
|
|
370
|
+
throw new errors.ElevenLabsError({
|
|
371
|
+
statusCode: _response.error.statusCode,
|
|
372
|
+
body: _response.error.body,
|
|
373
|
+
rawResponse: _response.rawResponse,
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
switch (_response.error.reason) {
|
|
378
|
+
case "non-json":
|
|
379
|
+
throw new errors.ElevenLabsError({
|
|
380
|
+
statusCode: _response.error.statusCode,
|
|
381
|
+
body: _response.error.rawBody,
|
|
382
|
+
rawResponse: _response.rawResponse,
|
|
383
|
+
});
|
|
384
|
+
case "timeout":
|
|
385
|
+
throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/text-to-voice/design.");
|
|
386
|
+
case "unknown":
|
|
387
|
+
throw new errors.ElevenLabsError({
|
|
388
|
+
message: _response.error.errorMessage,
|
|
389
|
+
rawResponse: _response.rawResponse,
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
});
|
|
393
|
+
}
|
|
232
394
|
}
|
|
233
395
|
exports.TextToVoice = TextToVoice;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* voiceName: "Sassy squeaky mouse",
|
|
8
|
+
* voiceDescription: "A sassy squeaky mouse",
|
|
9
|
+
* generatedVoiceId: "37HceQefKmEi3bGovXjL"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost {
|
|
13
|
+
/** Name to use for the created voice. */
|
|
14
|
+
voiceName: string;
|
|
15
|
+
/** Description to use for the created voice. */
|
|
16
|
+
voiceDescription: string;
|
|
17
|
+
/** The generated_voice_id to create, call POST /v1/text-to-voice/create-previews and fetch the generated_voice_id from the response header if don't have one yet. */
|
|
18
|
+
generatedVoiceId: string;
|
|
19
|
+
/** Optional, metadata to add to the created voice. Defaults to None. */
|
|
20
|
+
labels?: Record<string, string | undefined>;
|
|
21
|
+
/** List of voice ids that the user has played but not selected. Used for RLHF. */
|
|
22
|
+
playedNotSelectedVoiceIds?: string[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as ElevenLabs from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* voiceDescription: "A sassy squeaky mouse"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface VoiceDesignRequestModel {
|
|
12
|
+
/**
|
|
13
|
+
* Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
|
|
14
|
+
*/
|
|
15
|
+
outputFormat?: ElevenLabs.TextToVoiceDesignRequestOutputFormat;
|
|
16
|
+
/** Description to use for the created voice. */
|
|
17
|
+
voiceDescription: string;
|
|
18
|
+
/** Model to use for the voice generation. Possible values: eleven_multilingual_ttv_v2, eleven_ttv_v3. */
|
|
19
|
+
modelId?: ElevenLabs.VoiceDesignRequestModelModelId;
|
|
20
|
+
/** Text to generate, text length has to be between 100 and 1000. */
|
|
21
|
+
text?: string;
|
|
22
|
+
/** Whether to automatically generate a text suitable for the voice description. */
|
|
23
|
+
autoGenerateText?: boolean;
|
|
24
|
+
/** Controls the volume level of the generated voice. -1 is quietest, 1 is loudest, 0 corresponds to roughly -24 LUFS. */
|
|
25
|
+
loudness?: number;
|
|
26
|
+
/** Random number that controls the voice generation. Same seed with same inputs produces same voice. */
|
|
27
|
+
seed?: number;
|
|
28
|
+
/** Controls how closely the AI follows the prompt. Lower numbers give the AI more freedom to be creative, while higher numbers force it to stick more to the prompt. High numbers can cause voice to sound artificial or robotic. We recommend to use longer, more detailed prompts at lower Guidance Scale. */
|
|
29
|
+
guidanceScale?: number;
|
|
30
|
+
/** Higher quality results in better voice output but less variety. */
|
|
31
|
+
quality?: number;
|
|
32
|
+
/** Reference audio to use for the voice generation. The audio should be base64 encoded. Only supported when using the eleven_ttv_v3 model. */
|
|
33
|
+
referenceAudioBase64?: string;
|
|
34
|
+
/** Controls the balance of prompt versus reference audio when generating voice samples. 0 means almost no prompt influence, 1 means almost no reference audio influence. Only supported when using the eleven_ttv_v3 model and providing reference audio. */
|
|
35
|
+
promptStrength?: number;
|
|
36
|
+
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { type VoiceDesignRequest } from "./VoiceDesignRequest";
|
|
2
2
|
export { type SaveVoicePreviewRequest } from "./SaveVoicePreviewRequest";
|
|
3
|
+
export { type BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost } from "./BodyCreateANewVoiceFromVoicePreviewV1TextToVoicePost";
|
|
4
|
+
export { type VoiceDesignRequestModel } from "./VoiceDesignRequestModel";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
|
|
6
|
+
*/
|
|
7
|
+
export type TextToVoiceDesignRequestOutputFormat = "mp3_22050_32" | "mp3_44100_32" | "mp3_44100_64" | "mp3_44100_96" | "mp3_44100_128" | "mp3_44100_192" | "pcm_8000" | "pcm_16000" | "pcm_22050" | "pcm_24000" | "pcm_44100" | "pcm_48000" | "ulaw_8000" | "alaw_8000" | "opus_48000_32" | "opus_48000_64" | "opus_48000_96" | "opus_48000_128" | "opus_48000_192";
|
|
8
|
+
export declare const TextToVoiceDesignRequestOutputFormat: {
|
|
9
|
+
readonly Mp32205032: "mp3_22050_32";
|
|
10
|
+
readonly Mp34410032: "mp3_44100_32";
|
|
11
|
+
readonly Mp34410064: "mp3_44100_64";
|
|
12
|
+
readonly Mp34410096: "mp3_44100_96";
|
|
13
|
+
readonly Mp344100128: "mp3_44100_128";
|
|
14
|
+
readonly Mp344100192: "mp3_44100_192";
|
|
15
|
+
readonly Pcm8000: "pcm_8000";
|
|
16
|
+
readonly Pcm16000: "pcm_16000";
|
|
17
|
+
readonly Pcm22050: "pcm_22050";
|
|
18
|
+
readonly Pcm24000: "pcm_24000";
|
|
19
|
+
readonly Pcm44100: "pcm_44100";
|
|
20
|
+
readonly Pcm48000: "pcm_48000";
|
|
21
|
+
readonly Ulaw8000: "ulaw_8000";
|
|
22
|
+
readonly Alaw8000: "alaw_8000";
|
|
23
|
+
readonly Opus4800032: "opus_48000_32";
|
|
24
|
+
readonly Opus4800064: "opus_48000_64";
|
|
25
|
+
readonly Opus4800096: "opus_48000_96";
|
|
26
|
+
readonly Opus48000128: "opus_48000_128";
|
|
27
|
+
readonly Opus48000192: "opus_48000_192";
|
|
28
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TextToVoiceDesignRequestOutputFormat = void 0;
|
|
7
|
+
exports.TextToVoiceDesignRequestOutputFormat = {
|
|
8
|
+
Mp32205032: "mp3_22050_32",
|
|
9
|
+
Mp34410032: "mp3_44100_32",
|
|
10
|
+
Mp34410064: "mp3_44100_64",
|
|
11
|
+
Mp34410096: "mp3_44100_96",
|
|
12
|
+
Mp344100128: "mp3_44100_128",
|
|
13
|
+
Mp344100192: "mp3_44100_192",
|
|
14
|
+
Pcm8000: "pcm_8000",
|
|
15
|
+
Pcm16000: "pcm_16000",
|
|
16
|
+
Pcm22050: "pcm_22050",
|
|
17
|
+
Pcm24000: "pcm_24000",
|
|
18
|
+
Pcm44100: "pcm_44100",
|
|
19
|
+
Pcm48000: "pcm_48000",
|
|
20
|
+
Ulaw8000: "ulaw_8000",
|
|
21
|
+
Alaw8000: "alaw_8000",
|
|
22
|
+
Opus4800032: "opus_48000_32",
|
|
23
|
+
Opus4800064: "opus_48000_64",
|
|
24
|
+
Opus4800096: "opus_48000_96",
|
|
25
|
+
Opus48000128: "opus_48000_128",
|
|
26
|
+
Opus48000192: "opus_48000_192",
|
|
27
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Model to use for the voice generation. Possible values: eleven_multilingual_ttv_v2, eleven_ttv_v3.
|
|
6
|
+
*/
|
|
7
|
+
export type VoiceDesignRequestModelModelId = "eleven_multilingual_ttv_v2" | "eleven_ttv_v3";
|
|
8
|
+
export declare const VoiceDesignRequestModelModelId: {
|
|
9
|
+
readonly ElevenMultilingualTtvV2: "eleven_multilingual_ttv_v2";
|
|
10
|
+
readonly ElevenTtvV3: "eleven_ttv_v3";
|
|
11
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.VoiceDesignRequestModelModelId = void 0;
|
|
7
|
+
exports.VoiceDesignRequestModelModelId = {
|
|
8
|
+
ElevenMultilingualTtvV2: "eleven_multilingual_ttv_v2",
|
|
9
|
+
ElevenTtvV3: "eleven_ttv_v3",
|
|
10
|
+
};
|
|
@@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./TextToVoiceCreatePreviewsRequestOutputFormat"), exports);
|
|
18
|
+
__exportStar(require("./TextToVoiceDesignRequestOutputFormat"), exports);
|
|
19
|
+
__exportStar(require("./VoiceDesignRequestModelModelId"), exports);
|
|
@@ -57,4 +57,43 @@ export declare class Workspace {
|
|
|
57
57
|
*/
|
|
58
58
|
updateUserAutoProvisioning(request: ElevenLabs.BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost, requestOptions?: Workspace.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
59
59
|
private __updateUserAutoProvisioning;
|
|
60
|
+
/**
|
|
61
|
+
* Get the user's default sharing preferences.
|
|
62
|
+
*
|
|
63
|
+
* @param {Workspace.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.workspace.getDefaultSharingPreferences()
|
|
69
|
+
*/
|
|
70
|
+
getDefaultSharingPreferences(requestOptions?: Workspace.RequestOptions): core.HttpResponsePromise<ElevenLabs.DefaultSharingPreferencesResponseModel>;
|
|
71
|
+
private __getDefaultSharingPreferences;
|
|
72
|
+
/**
|
|
73
|
+
* Update the user's default sharing preferences.
|
|
74
|
+
*
|
|
75
|
+
* @param {ElevenLabs.BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost} request
|
|
76
|
+
* @param {Workspace.RequestOptions} requestOptions - Request-specific configuration.
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* await client.workspace.updateDefaultSharingPreferences({
|
|
82
|
+
* defaultSharingGroups: ["default_sharing_groups"]
|
|
83
|
+
* })
|
|
84
|
+
*/
|
|
85
|
+
updateDefaultSharingPreferences(request: ElevenLabs.BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost, requestOptions?: Workspace.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
86
|
+
private __updateDefaultSharingPreferences;
|
|
87
|
+
/**
|
|
88
|
+
* Get the share options for a workspace.
|
|
89
|
+
*
|
|
90
|
+
* @param {Workspace.RequestOptions} requestOptions - Request-specific configuration.
|
|
91
|
+
*
|
|
92
|
+
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* await client.workspace.getShareOptions()
|
|
96
|
+
*/
|
|
97
|
+
getShareOptions(requestOptions?: Workspace.RequestOptions): core.HttpResponsePromise<ElevenLabs.ShareOptionResponseModel[]>;
|
|
98
|
+
private __getShareOptions;
|
|
60
99
|
}
|
|
@@ -149,5 +149,210 @@ class Workspace {
|
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* Get the user's default sharing preferences.
|
|
154
|
+
*
|
|
155
|
+
* @param {Workspace.RequestOptions} requestOptions - Request-specific configuration.
|
|
156
|
+
*
|
|
157
|
+
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* await client.workspace.getDefaultSharingPreferences()
|
|
161
|
+
*/
|
|
162
|
+
getDefaultSharingPreferences(requestOptions) {
|
|
163
|
+
return core.HttpResponsePromise.fromPromise(this.__getDefaultSharingPreferences(requestOptions));
|
|
164
|
+
}
|
|
165
|
+
__getDefaultSharingPreferences(requestOptions) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
var _a, _b, _c;
|
|
168
|
+
const _response = yield core.fetcher({
|
|
169
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/workspace/default-sharing-preferences"),
|
|
170
|
+
method: "GET",
|
|
171
|
+
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
172
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
|
|
173
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
174
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
175
|
+
});
|
|
176
|
+
if (_response.ok) {
|
|
177
|
+
return {
|
|
178
|
+
data: serializers.DefaultSharingPreferencesResponseModel.parseOrThrow(_response.body, {
|
|
179
|
+
unrecognizedObjectKeys: "passthrough",
|
|
180
|
+
allowUnrecognizedUnionMembers: true,
|
|
181
|
+
allowUnrecognizedEnumValues: true,
|
|
182
|
+
breadcrumbsPrefix: ["response"],
|
|
183
|
+
}),
|
|
184
|
+
rawResponse: _response.rawResponse,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
if (_response.error.reason === "status-code") {
|
|
188
|
+
switch (_response.error.statusCode) {
|
|
189
|
+
case 422:
|
|
190
|
+
throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
191
|
+
unrecognizedObjectKeys: "passthrough",
|
|
192
|
+
allowUnrecognizedUnionMembers: true,
|
|
193
|
+
allowUnrecognizedEnumValues: true,
|
|
194
|
+
breadcrumbsPrefix: ["response"],
|
|
195
|
+
}), _response.rawResponse);
|
|
196
|
+
default:
|
|
197
|
+
throw new errors.ElevenLabsError({
|
|
198
|
+
statusCode: _response.error.statusCode,
|
|
199
|
+
body: _response.error.body,
|
|
200
|
+
rawResponse: _response.rawResponse,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
switch (_response.error.reason) {
|
|
205
|
+
case "non-json":
|
|
206
|
+
throw new errors.ElevenLabsError({
|
|
207
|
+
statusCode: _response.error.statusCode,
|
|
208
|
+
body: _response.error.rawBody,
|
|
209
|
+
rawResponse: _response.rawResponse,
|
|
210
|
+
});
|
|
211
|
+
case "timeout":
|
|
212
|
+
throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling GET /v1/workspace/default-sharing-preferences.");
|
|
213
|
+
case "unknown":
|
|
214
|
+
throw new errors.ElevenLabsError({
|
|
215
|
+
message: _response.error.errorMessage,
|
|
216
|
+
rawResponse: _response.rawResponse,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Update the user's default sharing preferences.
|
|
223
|
+
*
|
|
224
|
+
* @param {ElevenLabs.BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost} request
|
|
225
|
+
* @param {Workspace.RequestOptions} requestOptions - Request-specific configuration.
|
|
226
|
+
*
|
|
227
|
+
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* await client.workspace.updateDefaultSharingPreferences({
|
|
231
|
+
* defaultSharingGroups: ["default_sharing_groups"]
|
|
232
|
+
* })
|
|
233
|
+
*/
|
|
234
|
+
updateDefaultSharingPreferences(request, requestOptions) {
|
|
235
|
+
return core.HttpResponsePromise.fromPromise(this.__updateDefaultSharingPreferences(request, requestOptions));
|
|
236
|
+
}
|
|
237
|
+
__updateDefaultSharingPreferences(request, requestOptions) {
|
|
238
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
239
|
+
var _a, _b, _c;
|
|
240
|
+
const _response = yield core.fetcher({
|
|
241
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/workspace/default-sharing-preferences"),
|
|
242
|
+
method: "POST",
|
|
243
|
+
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
244
|
+
contentType: "application/json",
|
|
245
|
+
requestType: "json",
|
|
246
|
+
body: serializers.BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
247
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
|
|
248
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
249
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
250
|
+
});
|
|
251
|
+
if (_response.ok) {
|
|
252
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
253
|
+
}
|
|
254
|
+
if (_response.error.reason === "status-code") {
|
|
255
|
+
switch (_response.error.statusCode) {
|
|
256
|
+
case 422:
|
|
257
|
+
throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
258
|
+
unrecognizedObjectKeys: "passthrough",
|
|
259
|
+
allowUnrecognizedUnionMembers: true,
|
|
260
|
+
allowUnrecognizedEnumValues: true,
|
|
261
|
+
breadcrumbsPrefix: ["response"],
|
|
262
|
+
}), _response.rawResponse);
|
|
263
|
+
default:
|
|
264
|
+
throw new errors.ElevenLabsError({
|
|
265
|
+
statusCode: _response.error.statusCode,
|
|
266
|
+
body: _response.error.body,
|
|
267
|
+
rawResponse: _response.rawResponse,
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
switch (_response.error.reason) {
|
|
272
|
+
case "non-json":
|
|
273
|
+
throw new errors.ElevenLabsError({
|
|
274
|
+
statusCode: _response.error.statusCode,
|
|
275
|
+
body: _response.error.rawBody,
|
|
276
|
+
rawResponse: _response.rawResponse,
|
|
277
|
+
});
|
|
278
|
+
case "timeout":
|
|
279
|
+
throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling POST /v1/workspace/default-sharing-preferences.");
|
|
280
|
+
case "unknown":
|
|
281
|
+
throw new errors.ElevenLabsError({
|
|
282
|
+
message: _response.error.errorMessage,
|
|
283
|
+
rawResponse: _response.rawResponse,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Get the share options for a workspace.
|
|
290
|
+
*
|
|
291
|
+
* @param {Workspace.RequestOptions} requestOptions - Request-specific configuration.
|
|
292
|
+
*
|
|
293
|
+
* @throws {@link ElevenLabs.UnprocessableEntityError}
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* await client.workspace.getShareOptions()
|
|
297
|
+
*/
|
|
298
|
+
getShareOptions(requestOptions) {
|
|
299
|
+
return core.HttpResponsePromise.fromPromise(this.__getShareOptions(requestOptions));
|
|
300
|
+
}
|
|
301
|
+
__getShareOptions(requestOptions) {
|
|
302
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
303
|
+
var _a, _b, _c;
|
|
304
|
+
const _response = yield core.fetcher({
|
|
305
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : ((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ElevenLabsEnvironment.Production).base, "v1/workspace/share-options"),
|
|
306
|
+
method: "GET",
|
|
307
|
+
headers: (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "xi-api-key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
308
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 240000,
|
|
309
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
310
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
311
|
+
});
|
|
312
|
+
if (_response.ok) {
|
|
313
|
+
return {
|
|
314
|
+
data: serializers.workspace.getShareOptions.Response.parseOrThrow(_response.body, {
|
|
315
|
+
unrecognizedObjectKeys: "passthrough",
|
|
316
|
+
allowUnrecognizedUnionMembers: true,
|
|
317
|
+
allowUnrecognizedEnumValues: true,
|
|
318
|
+
breadcrumbsPrefix: ["response"],
|
|
319
|
+
}),
|
|
320
|
+
rawResponse: _response.rawResponse,
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
if (_response.error.reason === "status-code") {
|
|
324
|
+
switch (_response.error.statusCode) {
|
|
325
|
+
case 422:
|
|
326
|
+
throw new ElevenLabs.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
327
|
+
unrecognizedObjectKeys: "passthrough",
|
|
328
|
+
allowUnrecognizedUnionMembers: true,
|
|
329
|
+
allowUnrecognizedEnumValues: true,
|
|
330
|
+
breadcrumbsPrefix: ["response"],
|
|
331
|
+
}), _response.rawResponse);
|
|
332
|
+
default:
|
|
333
|
+
throw new errors.ElevenLabsError({
|
|
334
|
+
statusCode: _response.error.statusCode,
|
|
335
|
+
body: _response.error.body,
|
|
336
|
+
rawResponse: _response.rawResponse,
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
switch (_response.error.reason) {
|
|
341
|
+
case "non-json":
|
|
342
|
+
throw new errors.ElevenLabsError({
|
|
343
|
+
statusCode: _response.error.statusCode,
|
|
344
|
+
body: _response.error.rawBody,
|
|
345
|
+
rawResponse: _response.rawResponse,
|
|
346
|
+
});
|
|
347
|
+
case "timeout":
|
|
348
|
+
throw new errors.ElevenLabsTimeoutError("Timeout exceeded when calling GET /v1/workspace/share-options.");
|
|
349
|
+
case "unknown":
|
|
350
|
+
throw new errors.ElevenLabsError({
|
|
351
|
+
message: _response.error.errorMessage,
|
|
352
|
+
rawResponse: _response.rawResponse,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
}
|
|
152
357
|
}
|
|
153
358
|
exports.Workspace = Workspace;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* defaultSharingGroups: ["default_sharing_groups"]
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost {
|
|
11
|
+
/** List of group IDs to share with by default */
|
|
12
|
+
defaultSharingGroups: string[];
|
|
13
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export { type BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost } from "./BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost";
|
|
2
|
+
export { type BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost } from "./BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost";
|
|
@@ -8,5 +8,5 @@ export interface AgentConfigOverrideConfig {
|
|
|
8
8
|
/** Whether to allow overriding the language field. */
|
|
9
9
|
language?: boolean;
|
|
10
10
|
/** Configures overrides for nested fields. */
|
|
11
|
-
prompt?: ElevenLabs.
|
|
11
|
+
prompt?: ElevenLabs.PromptAgentApiModelOverrideConfig;
|
|
12
12
|
}
|