@elevenlabs/elevenlabs-js 2.4.0 → 2.5.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.d.ts +3 -3
- package/Client.js +15 -15
- package/api/errors/BadRequestError.d.ts +2 -1
- package/api/resources/audioIsolation/client/requests/BodyAudioIsolationStreamV1AudioIsolationStreamPost.d.ts +2 -2
- package/api/resources/audioIsolation/client/requests/BodyAudioIsolationV1AudioIsolationPost.d.ts +2 -2
- package/api/resources/audioNative/client/requests/BodyCreatesAudioNativeEnabledProjectV1AudioNativePost.d.ts +2 -2
- package/api/resources/audioNative/client/requests/BodyUpdateAudioNativeProjectContentV1AudioNativeProjectIdContentPost.d.ts +2 -2
- package/api/resources/conversationalAi/client/Client.js +5 -0
- package/api/resources/conversationalAi/client/requests/BodyAddToKnowledgeBaseV1ConvaiKnowledgeBasePost.d.ts +3 -2
- package/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/requests/BodyPostAgentAvatarV1ConvaiAgentsAgentIdAvatarPost.d.ts +2 -2
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.d.ts +2 -1
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.js +11 -4
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyCreateFileDocumentV1ConvaiKnowledgeBaseFilePost.d.ts +2 -2
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsGetRequest.d.ts +10 -0
- package/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.d.ts +1 -0
- package/api/resources/conversationalAi/resources/phoneNumbers/client/Client.js +2 -2
- package/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +5 -5
- package/api/resources/forcedAlignment/client/requests/BodyCreateForcedAlignmentV1ForcedAlignmentPost.d.ts +2 -2
- package/api/resources/history/client/Client.js +6 -1
- package/api/resources/index.d.ts +0 -1
- package/api/resources/index.js +0 -1
- package/api/resources/pronunciationDictionaries/client/Client.js +4 -4
- package/api/resources/pronunciationDictionaries/client/requests/BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromFilePost.d.ts +2 -2
- package/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPost.d.ts +2 -2
- package/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost.d.ts +2 -2
- package/api/resources/speechToText/client/Client.d.ts +3 -1
- package/api/resources/speechToText/client/Client.js +10 -7
- package/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +4 -2
- package/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.d.ts +9 -3
- package/api/resources/studio/resources/projects/resources/content/client/Client.js +3 -0
- package/api/resources/studio/resources/projects/resources/content/client/requests/BodyUpdateStudioProjectContentV1StudioProjectsProjectIdContentPost.d.ts +10 -2
- package/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +2 -1
- package/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -0
- package/api/resources/voices/client/requests/BodyEditVoiceV1VoicesVoiceIdEditPost.d.ts +2 -2
- package/api/resources/voices/client/requests/BodyGetSimilarLibraryVoicesV1SimilarVoicesPost.d.ts +2 -2
- package/api/resources/voices/resources/ivc/client/requests/BodyAddVoiceV1VoicesAddPost.d.ts +2 -2
- package/api/resources/voices/resources/pvc/resources/samples/client/requests/BodyAddSamplesToPvcVoiceV1VoicesPvcVoiceIdSamplesPost.d.ts +2 -2
- package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.d.ts +5 -2
- package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.js +14 -5
- package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/index.d.ts +1 -0
- package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/index.js +15 -0
- package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/AudioGetRequest.d.ts +15 -0
- package/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/index.d.ts +1 -0
- package/api/resources/voices/resources/pvc/resources/samples/resources/index.d.ts +1 -0
- package/api/resources/voices/resources/pvc/resources/samples/resources/index.js +4 -0
- package/api/resources/voices/resources/pvc/resources/verification/client/requests/BodyRequestManualVerificationV1VoicesPvcVoiceIdVerificationPost.d.ts +2 -2
- package/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/requests/BodyVerifyPvcVoiceCaptchaV1VoicesPvcVoiceIdCaptchaPost.d.ts +2 -2
- package/api/resources/workspace/client/Client.d.ts +0 -67
- package/api/resources/workspace/client/Client.js +0 -326
- package/api/resources/workspace/client/index.d.ts +0 -1
- package/api/resources/workspace/client/index.js +0 -15
- package/api/types/AddProjectRequest.d.ts +7 -1
- package/api/types/AuthConnectionLocator.d.ts +9 -0
- package/api/types/BadRequestErrorBody.d.ts +7 -0
- package/api/types/BodyAddProjectV1ProjectsAddPostSourceType.d.ts +2 -1
- package/api/types/BodyAddProjectV1ProjectsAddPostSourceType.js +1 -0
- package/api/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.d.ts +8 -0
- package/api/types/BreakdownTypes.d.ts +3 -1
- package/api/types/BreakdownTypes.js +2 -0
- package/api/types/BuiltInToolsInput.d.ts +2 -0
- package/api/types/BuiltInToolsOutput.d.ts +2 -0
- package/api/types/ChapterResponse.d.ts +2 -0
- package/api/types/ChapterWithContentResponseModel.d.ts +2 -0
- package/api/types/ForcedAlignmentResponseModel.d.ts +2 -0
- package/api/types/ForcedAlignmentWordResponseModel.d.ts +2 -0
- package/api/types/MetricType.d.ts +2 -1
- package/api/types/MetricType.js +1 -0
- package/api/types/PlayDtmfToolConfig.d.ts +11 -0
- package/api/types/ProjectExtendedResponse.d.ts +2 -2
- package/api/types/ProjectExtendedResponseModelSourceType.d.ts +2 -1
- package/api/types/ProjectExtendedResponseModelSourceType.js +1 -0
- package/api/types/ProjectResponseModelSourceType.d.ts +2 -1
- package/api/types/ProjectResponseModelSourceType.js +1 -0
- package/api/types/SystemToolConfigInputParams.d.ts +4 -1
- package/api/types/SystemToolConfigOutputParams.d.ts +4 -1
- package/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
- package/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
- package/api/types/WorkspaceResourceType.d.ts +2 -1
- package/api/types/WorkspaceResourceType.js +1 -0
- package/api/types/index.d.ts +3 -4
- package/api/types/index.js +3 -4
- package/core/fetcher/BinaryResponse.d.ts +17 -0
- package/core/fetcher/BinaryResponse.js +14 -0
- package/core/fetcher/Fetcher.d.ts +1 -1
- package/core/fetcher/ResponseWithBody.d.ts +4 -0
- package/core/fetcher/ResponseWithBody.js +6 -0
- package/core/fetcher/getFetchFn.js +3 -3
- package/core/fetcher/getResponseBody.js +33 -32
- package/core/fetcher/index.d.ts +1 -0
- package/core/file.d.ts +1 -0
- package/core/form-data-utils/FormDataWrapper.d.ts +5 -52
- package/core/form-data-utils/FormDataWrapper.js +104 -124
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/dist/Client.d.ts +3 -3
- package/dist/Client.js +15 -15
- package/dist/api/errors/BadRequestError.d.ts +2 -1
- package/dist/api/resources/audioIsolation/client/requests/BodyAudioIsolationStreamV1AudioIsolationStreamPost.d.ts +2 -2
- package/dist/api/resources/audioIsolation/client/requests/BodyAudioIsolationV1AudioIsolationPost.d.ts +2 -2
- package/dist/api/resources/audioNative/client/requests/BodyCreatesAudioNativeEnabledProjectV1AudioNativePost.d.ts +2 -2
- package/dist/api/resources/audioNative/client/requests/BodyUpdateAudioNativeProjectContentV1AudioNativeProjectIdContentPost.d.ts +2 -2
- package/dist/api/resources/conversationalAi/client/Client.js +5 -0
- package/dist/api/resources/conversationalAi/client/requests/BodyAddToKnowledgeBaseV1ConvaiKnowledgeBasePost.d.ts +3 -2
- package/dist/api/resources/conversationalAi/resources/agents/resources/widget/resources/avatar/client/requests/BodyPostAgentAvatarV1ConvaiAgentsAgentIdAvatarPost.d.ts +2 -2
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.d.ts +2 -1
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/Client.js +11 -4
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/BodyCreateFileDocumentV1ConvaiKnowledgeBaseFilePost.d.ts +2 -2
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsGetRequest.d.ts +10 -0
- package/dist/api/resources/conversationalAi/resources/knowledgeBase/resources/documents/client/requests/index.d.ts +1 -0
- package/dist/api/resources/conversationalAi/resources/phoneNumbers/client/Client.js +2 -2
- package/dist/api/resources/dubbing/client/requests/BodyDubAVideoOrAnAudioFileV1DubbingPost.d.ts +5 -5
- package/dist/api/resources/forcedAlignment/client/requests/BodyCreateForcedAlignmentV1ForcedAlignmentPost.d.ts +2 -2
- package/dist/api/resources/history/client/Client.js +6 -1
- package/dist/api/resources/index.d.ts +0 -1
- package/dist/api/resources/index.js +0 -1
- package/dist/api/resources/pronunciationDictionaries/client/Client.js +4 -4
- package/dist/api/resources/pronunciationDictionaries/client/requests/BodyAddAPronunciationDictionaryV1PronunciationDictionariesAddFromFilePost.d.ts +2 -2
- package/dist/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechStreamingV1SpeechToSpeechVoiceIdStreamPost.d.ts +2 -2
- package/dist/api/resources/speechToSpeech/client/requests/BodySpeechToSpeechV1SpeechToSpeechVoiceIdPost.d.ts +2 -2
- package/dist/api/resources/speechToText/client/Client.d.ts +3 -1
- package/dist/api/resources/speechToText/client/Client.js +10 -7
- package/dist/api/resources/speechToText/client/requests/BodySpeechToTextV1SpeechToTextPost.d.ts +4 -2
- package/dist/api/resources/studio/resources/projects/client/requests/BodyCreateStudioProjectV1StudioProjectsPost.d.ts +9 -3
- package/dist/api/resources/studio/resources/projects/resources/content/client/Client.js +3 -0
- package/dist/api/resources/studio/resources/projects/resources/content/client/requests/BodyUpdateStudioProjectContentV1StudioProjectsProjectIdContentPost.d.ts +10 -2
- package/dist/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.d.ts +2 -1
- package/dist/api/resources/studio/resources/projects/types/ProjectsCreateRequestSourceType.js +1 -0
- package/dist/api/resources/voices/client/requests/BodyEditVoiceV1VoicesVoiceIdEditPost.d.ts +2 -2
- package/dist/api/resources/voices/client/requests/BodyGetSimilarLibraryVoicesV1SimilarVoicesPost.d.ts +2 -2
- package/dist/api/resources/voices/resources/ivc/client/requests/BodyAddVoiceV1VoicesAddPost.d.ts +2 -2
- package/dist/api/resources/voices/resources/pvc/resources/samples/client/requests/BodyAddSamplesToPvcVoiceV1VoicesPvcVoiceIdSamplesPost.d.ts +2 -2
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.d.ts +5 -2
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/Client.js +14 -5
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/index.d.ts +1 -0
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/index.js +15 -0
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/AudioGetRequest.d.ts +15 -0
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/index.d.ts +1 -0
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/audio/client/requests/index.js +2 -0
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/index.d.ts +1 -0
- package/dist/api/resources/voices/resources/pvc/resources/samples/resources/index.js +4 -0
- package/dist/api/resources/voices/resources/pvc/resources/verification/client/requests/BodyRequestManualVerificationV1VoicesPvcVoiceIdVerificationPost.d.ts +2 -2
- package/dist/api/resources/voices/resources/pvc/resources/verification/resources/captcha/client/requests/BodyVerifyPvcVoiceCaptchaV1VoicesPvcVoiceIdCaptchaPost.d.ts +2 -2
- package/dist/api/resources/workspace/client/Client.d.ts +0 -67
- package/dist/api/resources/workspace/client/Client.js +0 -326
- package/dist/api/resources/workspace/client/index.d.ts +0 -1
- package/dist/api/resources/workspace/client/index.js +0 -15
- package/dist/api/types/AddProjectRequest.d.ts +7 -1
- package/dist/api/types/AuthConnectionLocator.d.ts +9 -0
- package/dist/api/types/BadRequestErrorBody.d.ts +7 -0
- package/dist/api/types/BodyAddProjectV1ProjectsAddPostSourceType.d.ts +2 -1
- package/dist/api/types/BodyAddProjectV1ProjectsAddPostSourceType.js +1 -0
- package/dist/api/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.d.ts +8 -0
- package/dist/api/types/BreakdownTypes.d.ts +3 -1
- package/dist/api/types/BreakdownTypes.js +2 -0
- package/dist/api/types/BuiltInToolsInput.d.ts +2 -0
- package/dist/api/types/BuiltInToolsOutput.d.ts +2 -0
- package/dist/api/types/ChapterResponse.d.ts +2 -0
- package/dist/api/types/ChapterWithContentResponseModel.d.ts +2 -0
- package/dist/api/types/ForcedAlignmentResponseModel.d.ts +2 -0
- package/dist/api/types/ForcedAlignmentWordResponseModel.d.ts +2 -0
- package/dist/api/types/MetricType.d.ts +2 -1
- package/dist/api/types/MetricType.js +1 -0
- package/dist/api/types/PlayDtmfToolConfig.d.ts +11 -0
- package/dist/api/types/ProjectExtendedResponse.d.ts +2 -2
- package/dist/api/types/ProjectExtendedResponseModelSourceType.d.ts +2 -1
- package/dist/api/types/ProjectExtendedResponseModelSourceType.js +1 -0
- package/dist/api/types/ProjectResponseModelSourceType.d.ts +2 -1
- package/dist/api/types/ProjectResponseModelSourceType.js +1 -0
- package/dist/api/types/SystemToolConfigInputParams.d.ts +4 -1
- package/dist/api/types/SystemToolConfigOutputParams.d.ts +4 -1
- package/dist/api/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
- package/dist/api/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
- package/dist/api/types/WorkspaceResourceType.d.ts +2 -1
- package/dist/api/types/WorkspaceResourceType.js +1 -0
- package/dist/api/types/index.d.ts +3 -4
- package/dist/api/types/index.js +3 -4
- package/dist/core/fetcher/BinaryResponse.d.ts +17 -0
- package/dist/core/fetcher/BinaryResponse.js +14 -0
- package/dist/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/core/fetcher/ResponseWithBody.d.ts +4 -0
- package/dist/core/fetcher/ResponseWithBody.js +6 -0
- package/dist/core/fetcher/getFetchFn.js +3 -3
- package/dist/core/fetcher/getResponseBody.js +33 -32
- package/dist/core/fetcher/index.d.ts +1 -0
- package/dist/core/file.d.ts +1 -0
- package/dist/core/file.js +2 -0
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +5 -52
- package/dist/core/form-data-utils/FormDataWrapper.js +104 -124
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/environments.d.ts +5 -1
- package/dist/environments.js +4 -0
- package/dist/serialization/resources/index.d.ts +0 -1
- package/dist/serialization/resources/index.js +0 -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/workspace/index.d.ts +0 -1
- package/dist/serialization/resources/workspace/index.js +0 -1
- package/dist/serialization/types/AuthConnectionLocator.d.ts +12 -0
- package/dist/serialization/{resources/workspace/client/getShareOptions.js → types/AuthConnectionLocator.js} +5 -4
- package/dist/serialization/types/BadRequestErrorBody.d.ts +13 -0
- package/{serialization/resources/workspace/client/getShareOptions.js → dist/serialization/types/BadRequestErrorBody.js} +6 -4
- package/dist/serialization/types/BodyAddProjectV1ProjectsAddPostSourceType.d.ts +1 -1
- package/dist/serialization/types/BodyAddProjectV1ProjectsAddPostSourceType.js +1 -1
- package/dist/serialization/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.d.ts +1 -0
- package/dist/serialization/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.js +1 -0
- package/dist/serialization/types/BreakdownTypes.d.ts +1 -1
- package/dist/serialization/types/BreakdownTypes.js +2 -0
- package/dist/serialization/types/BuiltInToolsInput.d.ts +1 -0
- package/dist/serialization/types/BuiltInToolsInput.js +1 -0
- package/dist/serialization/types/BuiltInToolsOutput.d.ts +1 -0
- package/dist/serialization/types/BuiltInToolsOutput.js +1 -0
- package/dist/serialization/types/ChapterResponse.d.ts +1 -0
- package/dist/serialization/types/ChapterResponse.js +1 -0
- package/dist/serialization/types/ChapterWithContentResponseModel.d.ts +1 -0
- package/dist/serialization/types/ChapterWithContentResponseModel.js +1 -0
- package/dist/serialization/types/ForcedAlignmentResponseModel.d.ts +1 -0
- package/dist/serialization/types/ForcedAlignmentResponseModel.js +1 -0
- package/dist/serialization/types/ForcedAlignmentWordResponseModel.d.ts +1 -0
- package/dist/serialization/types/ForcedAlignmentWordResponseModel.js +1 -0
- package/dist/serialization/types/MetricType.d.ts +1 -1
- package/dist/serialization/types/MetricType.js +9 -1
- package/dist/serialization/types/PlayDtmfToolConfig.d.ts +11 -0
- package/dist/serialization/types/PlayDtmfToolConfig.js +41 -0
- package/dist/serialization/types/ProjectExtendedResponse.d.ts +1 -1
- package/dist/serialization/types/ProjectExtendedResponse.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/SystemToolConfigInputParams.d.ts +5 -1
- package/dist/serialization/types/SystemToolConfigInputParams.js +2 -0
- package/dist/serialization/types/SystemToolConfigOutputParams.d.ts +5 -1
- package/dist/serialization/types/SystemToolConfigOutputParams.js +2 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigInput.js +2 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
- package/dist/serialization/types/WebhookToolApiSchemaConfigOutput.js +2 -0
- package/dist/serialization/types/WorkspaceResourceType.d.ts +1 -1
- package/dist/serialization/types/WorkspaceResourceType.js +1 -0
- package/dist/serialization/types/index.d.ts +3 -4
- package/dist/serialization/types/index.js +3 -4
- 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/environments.d.ts +5 -1
- package/environments.js +4 -0
- package/jest.browser.config.mjs +10 -0
- package/jest.config.mjs +4 -1
- package/package.json +7 -10
- package/reference.md +23 -247
- package/serialization/resources/index.d.ts +0 -1
- package/serialization/resources/index.js +0 -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/workspace/index.d.ts +0 -1
- package/serialization/resources/workspace/index.js +0 -1
- package/serialization/types/AuthConnectionLocator.d.ts +12 -0
- package/serialization/{resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.js → types/AuthConnectionLocator.js} +4 -4
- package/serialization/types/BadRequestErrorBody.d.ts +13 -0
- package/{dist/serialization/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.js → serialization/types/BadRequestErrorBody.js} +5 -4
- package/serialization/types/BodyAddProjectV1ProjectsAddPostSourceType.d.ts +1 -1
- package/serialization/types/BodyAddProjectV1ProjectsAddPostSourceType.js +1 -1
- package/serialization/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.d.ts +1 -0
- package/serialization/types/BodyEditProjectContentV1ProjectsProjectIdContentPost.js +1 -0
- package/serialization/types/BreakdownTypes.d.ts +1 -1
- package/serialization/types/BreakdownTypes.js +2 -0
- package/serialization/types/BuiltInToolsInput.d.ts +1 -0
- package/serialization/types/BuiltInToolsInput.js +1 -0
- package/serialization/types/BuiltInToolsOutput.d.ts +1 -0
- package/serialization/types/BuiltInToolsOutput.js +1 -0
- package/serialization/types/ChapterResponse.d.ts +1 -0
- package/serialization/types/ChapterResponse.js +1 -0
- package/serialization/types/ChapterWithContentResponseModel.d.ts +1 -0
- package/serialization/types/ChapterWithContentResponseModel.js +1 -0
- package/serialization/types/ForcedAlignmentResponseModel.d.ts +1 -0
- package/serialization/types/ForcedAlignmentResponseModel.js +1 -0
- package/serialization/types/ForcedAlignmentWordResponseModel.d.ts +1 -0
- package/serialization/types/ForcedAlignmentWordResponseModel.js +1 -0
- package/serialization/types/MetricType.d.ts +1 -1
- package/serialization/types/MetricType.js +9 -1
- package/serialization/types/PlayDtmfToolConfig.d.ts +11 -0
- package/serialization/types/PlayDtmfToolConfig.js +41 -0
- package/serialization/types/ProjectExtendedResponse.d.ts +1 -1
- package/serialization/types/ProjectExtendedResponse.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/SystemToolConfigInputParams.d.ts +5 -1
- package/serialization/types/SystemToolConfigInputParams.js +2 -0
- package/serialization/types/SystemToolConfigOutputParams.d.ts +5 -1
- package/serialization/types/SystemToolConfigOutputParams.js +2 -0
- package/serialization/types/WebhookToolApiSchemaConfigInput.d.ts +2 -0
- package/serialization/types/WebhookToolApiSchemaConfigInput.js +2 -0
- package/serialization/types/WebhookToolApiSchemaConfigOutput.d.ts +2 -0
- package/serialization/types/WebhookToolApiSchemaConfigOutput.js +2 -0
- package/serialization/types/WorkspaceResourceType.d.ts +1 -1
- package/serialization/types/WorkspaceResourceType.js +1 -0
- package/serialization/types/index.d.ts +3 -4
- package/serialization/types/index.js +3 -4
- 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/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +0 -13
- package/api/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.d.ts +0 -12
- package/api/resources/workspace/client/requests/index.d.ts +0 -2
- package/api/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.d.ts +0 -7
- package/api/types/DefaultSharingPreferencesResponseModel.d.ts +0 -8
- package/api/types/WorkspaceGroupPermission.d.ts +0 -22
- package/api/types/WorkspaceGroupPermission.js +0 -24
- package/api/types/WorkspaceGroupResponseModel.d.ts +0 -10
- package/core/form-data-utils/toReadableStream.d.ts +0 -1
- package/core/form-data-utils/toReadableStream.js +0 -28
- package/dist/api/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +0 -13
- package/dist/api/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.d.ts +0 -12
- package/dist/api/resources/workspace/client/requests/index.d.ts +0 -2
- package/dist/api/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.d.ts +0 -7
- package/dist/api/types/DefaultSharingPreferencesResponseModel.d.ts +0 -8
- package/dist/api/types/WorkspaceGroupPermission.d.ts +0 -22
- package/dist/api/types/WorkspaceGroupPermission.js +0 -24
- package/dist/api/types/WorkspaceGroupResponseModel.d.ts +0 -10
- package/dist/core/form-data-utils/toReadableStream.d.ts +0 -1
- package/dist/core/form-data-utils/toReadableStream.js +0 -28
- package/dist/serialization/resources/workspace/client/getShareOptions.d.ts +0 -11
- package/dist/serialization/resources/workspace/client/index.d.ts +0 -2
- package/dist/serialization/resources/workspace/client/index.js +0 -41
- package/dist/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +0 -12
- package/dist/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js +0 -43
- package/dist/serialization/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.d.ts +0 -12
- package/dist/serialization/resources/workspace/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/workspace/client/requests/index.js +0 -7
- package/dist/serialization/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.d.ts +0 -12
- package/dist/serialization/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.js +0 -43
- package/dist/serialization/types/DefaultSharingPreferencesResponseModel.d.ts +0 -13
- package/dist/serialization/types/DefaultSharingPreferencesResponseModel.js +0 -44
- package/dist/serialization/types/WorkspaceGroupPermission.d.ts +0 -10
- package/dist/serialization/types/WorkspaceGroupPermission.js +0 -58
- package/dist/serialization/types/WorkspaceGroupResponseModel.d.ts +0 -16
- package/dist/serialization/types/WorkspaceGroupResponseModel.js +0 -47
- package/serialization/resources/workspace/client/getShareOptions.d.ts +0 -11
- package/serialization/resources/workspace/client/index.d.ts +0 -2
- package/serialization/resources/workspace/client/index.js +0 -41
- package/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.d.ts +0 -12
- package/serialization/resources/workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js +0 -43
- package/serialization/resources/workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.d.ts +0 -12
- package/serialization/resources/workspace/client/requests/index.d.ts +0 -2
- package/serialization/resources/workspace/client/requests/index.js +0 -7
- package/serialization/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.d.ts +0 -12
- package/serialization/types/BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.js +0 -43
- package/serialization/types/DefaultSharingPreferencesResponseModel.d.ts +0 -13
- package/serialization/types/DefaultSharingPreferencesResponseModel.js +0 -44
- package/serialization/types/WorkspaceGroupPermission.d.ts +0 -10
- package/serialization/types/WorkspaceGroupPermission.js +0 -58
- package/serialization/types/WorkspaceGroupResponseModel.d.ts +0 -16
- package/serialization/types/WorkspaceGroupResponseModel.js +0 -47
- /package/api/resources/{workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js → conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsGetRequest.js} +0 -0
- /package/api/resources/{workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.js → voices/resources/pvc/resources/samples/resources/audio/client/requests/AudioGetRequest.js} +0 -0
- /package/api/resources/{workspace → voices/resources/pvc/resources/samples/resources/audio}/client/requests/index.js +0 -0
- /package/api/types/{BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.js → AuthConnectionLocator.js} +0 -0
- /package/api/types/{DefaultSharingPreferencesResponseModel.js → BadRequestErrorBody.js} +0 -0
- /package/api/types/{WorkspaceGroupResponseModel.js → PlayDtmfToolConfig.js} +0 -0
- /package/{dist/api/resources/workspace/client/requests/index.js → core/file.js} +0 -0
- /package/dist/api/resources/{workspace/client/requests/BodyUpdateDefaultSharingPreferencesV1WorkspaceDefaultSharingPreferencesPost.js → conversationalAi/resources/knowledgeBase/resources/documents/client/requests/DocumentsGetRequest.js} +0 -0
- /package/dist/api/resources/{workspace/client/requests/BodyUpdateUserAutoProvisioningV1WorkspaceUserAutoProvisioningPost.js → voices/resources/pvc/resources/samples/resources/audio/client/requests/AudioGetRequest.js} +0 -0
- /package/dist/api/types/{BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet.js → AuthConnectionLocator.js} +0 -0
- /package/dist/api/types/{DefaultSharingPreferencesResponseModel.js → BadRequestErrorBody.js} +0 -0
- /package/dist/api/types/{WorkspaceGroupResponseModel.js → PlayDtmfToolConfig.js} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as ElevenLabs from "../index";
|
|
5
|
-
export type SystemToolConfigOutputParams = ElevenLabs.SystemToolConfigOutputParams.EndCall | ElevenLabs.SystemToolConfigOutputParams.LanguageDetection | ElevenLabs.SystemToolConfigOutputParams.SkipTurn | ElevenLabs.SystemToolConfigOutputParams.TransferToAgent | ElevenLabs.SystemToolConfigOutputParams.TransferToNumber;
|
|
5
|
+
export type SystemToolConfigOutputParams = ElevenLabs.SystemToolConfigOutputParams.EndCall | ElevenLabs.SystemToolConfigOutputParams.LanguageDetection | ElevenLabs.SystemToolConfigOutputParams.PlayKeypadTouchTone | ElevenLabs.SystemToolConfigOutputParams.SkipTurn | ElevenLabs.SystemToolConfigOutputParams.TransferToAgent | ElevenLabs.SystemToolConfigOutputParams.TransferToNumber;
|
|
6
6
|
export declare namespace SystemToolConfigOutputParams {
|
|
7
7
|
interface EndCall extends ElevenLabs.EndCallToolConfig {
|
|
8
8
|
systemToolType: "end_call";
|
|
@@ -10,6 +10,9 @@ export declare namespace SystemToolConfigOutputParams {
|
|
|
10
10
|
interface LanguageDetection extends ElevenLabs.LanguageDetectionToolConfig {
|
|
11
11
|
systemToolType: "language_detection";
|
|
12
12
|
}
|
|
13
|
+
interface PlayKeypadTouchTone extends ElevenLabs.PlayDtmfToolConfig {
|
|
14
|
+
systemToolType: "play_keypad_touch_tone";
|
|
15
|
+
}
|
|
13
16
|
interface SkipTurn extends ElevenLabs.SkipTurnToolConfig {
|
|
14
17
|
systemToolType: "skip_turn";
|
|
15
18
|
}
|
|
@@ -18,4 +18,6 @@ export interface WebhookToolApiSchemaConfigInput {
|
|
|
18
18
|
requestBodySchema?: ElevenLabs.ObjectJsonSchemaPropertyInput;
|
|
19
19
|
/** Headers that should be included in the request */
|
|
20
20
|
requestHeaders?: Record<string, ElevenLabs.WebhookToolApiSchemaConfigInputRequestHeadersValue>;
|
|
21
|
+
/** Optional auth connection to use for authentication with this webhook */
|
|
22
|
+
authConnection?: ElevenLabs.AuthConnectionLocator;
|
|
21
23
|
}
|
|
@@ -18,4 +18,6 @@ export interface WebhookToolApiSchemaConfigOutput {
|
|
|
18
18
|
requestBodySchema?: ElevenLabs.ObjectJsonSchemaPropertyOutput;
|
|
19
19
|
/** Headers that should be included in the request */
|
|
20
20
|
requestHeaders?: Record<string, ElevenLabs.WebhookToolApiSchemaConfigOutputRequestHeadersValue>;
|
|
21
|
+
/** Optional auth connection to use for authentication with this webhook */
|
|
22
|
+
authConnection?: ElevenLabs.AuthConnectionLocator;
|
|
21
23
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* Resource types that can be shared in the workspace. The name always need to match the collection names
|
|
6
6
|
*/
|
|
7
|
-
export type WorkspaceResourceType = "voice" | "voice_collection" | "pronunciation_dictionary" | "dubbing" | "project" | "convai_agents" | "convai_knowledge_base_documents" | "convai_tools" | "convai_settings" | "convai_secrets" | "music_latent" | "convai_phone_numbers" | "convai_mcp_servers" | "convai_batch_calls";
|
|
7
|
+
export type WorkspaceResourceType = "voice" | "voice_collection" | "pronunciation_dictionary" | "dubbing" | "project" | "convai_agents" | "convai_knowledge_base_documents" | "convai_tools" | "convai_settings" | "convai_secrets" | "workspace_auth_connections" | "music_latent" | "convai_phone_numbers" | "convai_mcp_servers" | "convai_batch_calls";
|
|
8
8
|
export declare const WorkspaceResourceType: {
|
|
9
9
|
readonly Voice: "voice";
|
|
10
10
|
readonly VoiceCollection: "voice_collection";
|
|
@@ -16,6 +16,7 @@ export declare const WorkspaceResourceType: {
|
|
|
16
16
|
readonly ConvaiTools: "convai_tools";
|
|
17
17
|
readonly ConvaiSettings: "convai_settings";
|
|
18
18
|
readonly ConvaiSecrets: "convai_secrets";
|
|
19
|
+
readonly WorkspaceAuthConnections: "workspace_auth_connections";
|
|
19
20
|
readonly MusicLatent: "music_latent";
|
|
20
21
|
readonly ConvaiPhoneNumbers: "convai_phone_numbers";
|
|
21
22
|
readonly ConvaiMcpServers: "convai_mcp_servers";
|
|
@@ -15,6 +15,7 @@ exports.WorkspaceResourceType = {
|
|
|
15
15
|
ConvaiTools: "convai_tools",
|
|
16
16
|
ConvaiSettings: "convai_settings",
|
|
17
17
|
ConvaiSecrets: "convai_secrets",
|
|
18
|
+
WorkspaceAuthConnections: "workspace_auth_connections",
|
|
18
19
|
MusicLatent: "music_latent",
|
|
19
20
|
ConvaiPhoneNumbers: "convai_phone_numbers",
|
|
20
21
|
ConvaiMcpServers: "convai_mcp_servers",
|
package/api/types/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./BadRequestErrorBody";
|
|
1
2
|
export * from "./AsrConversationalConfig";
|
|
2
3
|
export * from "./AsrInputFormat";
|
|
3
4
|
export * from "./AsrProvider";
|
|
@@ -36,6 +37,7 @@ export * from "./AudioNativeEditContentResponseModel";
|
|
|
36
37
|
export * from "./AudioNativeProjectSettingsResponseModelStatus";
|
|
37
38
|
export * from "./AudioNativeProjectSettingsResponseModel";
|
|
38
39
|
export * from "./AudioWithTimestampsResponse";
|
|
40
|
+
export * from "./AuthConnectionLocator";
|
|
39
41
|
export * from "./AuthSettings";
|
|
40
42
|
export * from "./AuthorizationMethod";
|
|
41
43
|
export * from "./BanReasonType";
|
|
@@ -64,7 +66,6 @@ export * from "./BodyEditProjectContentV1ProjectsProjectIdContentPost";
|
|
|
64
66
|
export * from "./BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender";
|
|
65
67
|
export * from "./BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge";
|
|
66
68
|
export * from "./GenerateVoiceRequest";
|
|
67
|
-
export * from "./BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet";
|
|
68
69
|
export * from "./BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost";
|
|
69
70
|
export * from "./BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost";
|
|
70
71
|
export * from "./UpdatePronunciationDictionariesRequest";
|
|
@@ -165,7 +166,6 @@ export * from "./DashboardCallSuccessChartModel";
|
|
|
165
166
|
export * from "./DashboardCriteriaChartModel";
|
|
166
167
|
export * from "./DashboardDataCollectionChartModel";
|
|
167
168
|
export * from "./DataCollectionResultCommonModel";
|
|
168
|
-
export * from "./DefaultSharingPreferencesResponseModel";
|
|
169
169
|
export * from "./DeleteChapterResponseModel";
|
|
170
170
|
export * from "./DeleteDubbingResponseModel";
|
|
171
171
|
export * from "./DeleteHistoryItemResponse";
|
|
@@ -328,6 +328,7 @@ export * from "./OutboundCallRecipientResponseModel";
|
|
|
328
328
|
export * from "./PdfExportOptions";
|
|
329
329
|
export * from "./PhoneNumberAgentInfo";
|
|
330
330
|
export * from "./PhoneNumberTransfer";
|
|
331
|
+
export * from "./PlayDtmfToolConfig";
|
|
331
332
|
export * from "./PodcastBulletinMode";
|
|
332
333
|
export * from "./PodcastBulletinModeData";
|
|
333
334
|
export * from "./PodcastConversationMode";
|
|
@@ -523,8 +524,6 @@ export * from "./WidgetStyles";
|
|
|
523
524
|
export * from "./WidgetTextContents";
|
|
524
525
|
export * from "./WorkspaceBatchCallsResponse";
|
|
525
526
|
export * from "./WorkspaceGroupByNameResponseModel";
|
|
526
|
-
export * from "./WorkspaceGroupPermission";
|
|
527
|
-
export * from "./WorkspaceGroupResponseModel";
|
|
528
527
|
export * from "./WorkspaceResourceType";
|
|
529
528
|
export * from "./WorkspaceWebhookListResponseModel";
|
|
530
529
|
export * from "./WorkspaceWebhookResponseModel";
|
package/api/types/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./BadRequestErrorBody"), exports);
|
|
17
18
|
__exportStar(require("./AsrConversationalConfig"), exports);
|
|
18
19
|
__exportStar(require("./AsrInputFormat"), exports);
|
|
19
20
|
__exportStar(require("./AsrProvider"), exports);
|
|
@@ -52,6 +53,7 @@ __exportStar(require("./AudioNativeEditContentResponseModel"), exports);
|
|
|
52
53
|
__exportStar(require("./AudioNativeProjectSettingsResponseModelStatus"), exports);
|
|
53
54
|
__exportStar(require("./AudioNativeProjectSettingsResponseModel"), exports);
|
|
54
55
|
__exportStar(require("./AudioWithTimestampsResponse"), exports);
|
|
56
|
+
__exportStar(require("./AuthConnectionLocator"), exports);
|
|
55
57
|
__exportStar(require("./AuthSettings"), exports);
|
|
56
58
|
__exportStar(require("./AuthorizationMethod"), exports);
|
|
57
59
|
__exportStar(require("./BanReasonType"), exports);
|
|
@@ -80,7 +82,6 @@ __exportStar(require("./BodyEditProjectContentV1ProjectsProjectIdContentPost"),
|
|
|
80
82
|
__exportStar(require("./BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender"), exports);
|
|
81
83
|
__exportStar(require("./BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge"), exports);
|
|
82
84
|
__exportStar(require("./GenerateVoiceRequest"), exports);
|
|
83
|
-
__exportStar(require("./BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet"), exports);
|
|
84
85
|
__exportStar(require("./BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost"), exports);
|
|
85
86
|
__exportStar(require("./BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost"), exports);
|
|
86
87
|
__exportStar(require("./UpdatePronunciationDictionariesRequest"), exports);
|
|
@@ -181,7 +182,6 @@ __exportStar(require("./DashboardCallSuccessChartModel"), exports);
|
|
|
181
182
|
__exportStar(require("./DashboardCriteriaChartModel"), exports);
|
|
182
183
|
__exportStar(require("./DashboardDataCollectionChartModel"), exports);
|
|
183
184
|
__exportStar(require("./DataCollectionResultCommonModel"), exports);
|
|
184
|
-
__exportStar(require("./DefaultSharingPreferencesResponseModel"), exports);
|
|
185
185
|
__exportStar(require("./DeleteChapterResponseModel"), exports);
|
|
186
186
|
__exportStar(require("./DeleteDubbingResponseModel"), exports);
|
|
187
187
|
__exportStar(require("./DeleteHistoryItemResponse"), exports);
|
|
@@ -344,6 +344,7 @@ __exportStar(require("./OutboundCallRecipientResponseModel"), exports);
|
|
|
344
344
|
__exportStar(require("./PdfExportOptions"), exports);
|
|
345
345
|
__exportStar(require("./PhoneNumberAgentInfo"), exports);
|
|
346
346
|
__exportStar(require("./PhoneNumberTransfer"), exports);
|
|
347
|
+
__exportStar(require("./PlayDtmfToolConfig"), exports);
|
|
347
348
|
__exportStar(require("./PodcastBulletinMode"), exports);
|
|
348
349
|
__exportStar(require("./PodcastBulletinModeData"), exports);
|
|
349
350
|
__exportStar(require("./PodcastConversationMode"), exports);
|
|
@@ -539,8 +540,6 @@ __exportStar(require("./WidgetStyles"), exports);
|
|
|
539
540
|
__exportStar(require("./WidgetTextContents"), exports);
|
|
540
541
|
__exportStar(require("./WorkspaceBatchCallsResponse"), exports);
|
|
541
542
|
__exportStar(require("./WorkspaceGroupByNameResponseModel"), exports);
|
|
542
|
-
__exportStar(require("./WorkspaceGroupPermission"), exports);
|
|
543
|
-
__exportStar(require("./WorkspaceGroupResponseModel"), exports);
|
|
544
543
|
__exportStar(require("./WorkspaceResourceType"), exports);
|
|
545
544
|
__exportStar(require("./WorkspaceWebhookListResponseModel"), exports);
|
|
546
545
|
__exportStar(require("./WorkspaceWebhookResponseModel"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ResponseWithBody } from "./ResponseWithBody.js";
|
|
2
|
+
export interface BinaryResponse {
|
|
3
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
4
|
+
bodyUsed: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a ReadableStream of the response body.
|
|
7
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body)
|
|
8
|
+
*/
|
|
9
|
+
stream: () => ReadableStream<Uint8Array>;
|
|
10
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
11
|
+
arrayBuffer: () => Promise<ArrayBuffer>;
|
|
12
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
13
|
+
blob: () => Promise<Blob>;
|
|
14
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes) */
|
|
15
|
+
bytes(): Promise<Uint8Array>;
|
|
16
|
+
}
|
|
17
|
+
export declare function getBinaryResponse(response: ResponseWithBody): BinaryResponse;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBinaryResponse = getBinaryResponse;
|
|
4
|
+
function getBinaryResponse(response) {
|
|
5
|
+
return {
|
|
6
|
+
get bodyUsed() {
|
|
7
|
+
return response.bodyUsed;
|
|
8
|
+
},
|
|
9
|
+
stream: () => response.body,
|
|
10
|
+
arrayBuffer: response.arrayBuffer.bind(response),
|
|
11
|
+
blob: response.blob.bind(response),
|
|
12
|
+
bytes: response.bytes.bind(response),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -14,7 +14,7 @@ export declare namespace Fetcher {
|
|
|
14
14
|
withCredentials?: boolean;
|
|
15
15
|
abortSignal?: AbortSignal;
|
|
16
16
|
requestType?: "json" | "file" | "bytes";
|
|
17
|
-
responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer";
|
|
17
|
+
responseType?: "json" | "blob" | "sse" | "streaming" | "text" | "arrayBuffer" | "binary-response";
|
|
18
18
|
duplex?: "half";
|
|
19
19
|
}
|
|
20
20
|
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|
|
@@ -43,18 +43,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
exports.getFetchFn = getFetchFn;
|
|
46
|
-
const
|
|
46
|
+
const index_1 = require("../runtime/index");
|
|
47
47
|
/**
|
|
48
48
|
* Returns a fetch function based on the runtime
|
|
49
49
|
*/
|
|
50
50
|
function getFetchFn() {
|
|
51
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
52
|
// In Node.js 18+ environments, use native fetch
|
|
53
|
-
if (
|
|
53
|
+
if (index_1.RUNTIME.type === "node" && index_1.RUNTIME.parsedVersion != null && index_1.RUNTIME.parsedVersion >= 18) {
|
|
54
54
|
return fetch;
|
|
55
55
|
}
|
|
56
56
|
// In Node.js 18 or lower environments, the SDK always uses`node-fetch`.
|
|
57
|
-
if (
|
|
57
|
+
if (index_1.RUNTIME.type === "node") {
|
|
58
58
|
return (yield Promise.resolve().then(() => __importStar(require("node-fetch")))).default;
|
|
59
59
|
}
|
|
60
60
|
// Otherwise the SDK uses global fetch if available,
|
|
@@ -10,44 +10,45 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.getResponseBody = getResponseBody;
|
|
13
|
+
const BinaryResponse_1 = require("./BinaryResponse");
|
|
14
|
+
const ResponseWithBody_1 = require("./ResponseWithBody");
|
|
13
15
|
function getResponseBody(response, responseType) {
|
|
14
16
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
-
if (
|
|
16
|
-
return
|
|
17
|
+
if (!(0, ResponseWithBody_1.isResponseWithBody)(response)) {
|
|
18
|
+
return undefined;
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
switch (responseType) {
|
|
21
|
+
case "binary-response":
|
|
22
|
+
return (0, BinaryResponse_1.getBinaryResponse)(response);
|
|
23
|
+
case "blob":
|
|
24
|
+
return yield response.blob();
|
|
25
|
+
case "arrayBuffer":
|
|
26
|
+
return yield response.arrayBuffer();
|
|
27
|
+
case "sse":
|
|
28
|
+
return response.body;
|
|
29
|
+
case "streaming":
|
|
30
|
+
return response.body;
|
|
31
|
+
case "text":
|
|
32
|
+
return yield response.text();
|
|
20
33
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
else if (response.body != null && responseType === "text") {
|
|
28
|
-
return yield response.text();
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
const text = yield response.text();
|
|
32
|
-
if (text.length > 0) {
|
|
33
|
-
try {
|
|
34
|
-
let responseBody = JSON.parse(text);
|
|
35
|
-
return responseBody;
|
|
36
|
-
}
|
|
37
|
-
catch (err) {
|
|
38
|
-
return {
|
|
39
|
-
ok: false,
|
|
40
|
-
error: {
|
|
41
|
-
reason: "non-json",
|
|
42
|
-
statusCode: response.status,
|
|
43
|
-
rawBody: text,
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
}
|
|
34
|
+
// if responseType is "json" or not specified, try to parse as JSON
|
|
35
|
+
const text = yield response.text();
|
|
36
|
+
if (text.length > 0) {
|
|
37
|
+
try {
|
|
38
|
+
let responseBody = JSON.parse(text);
|
|
39
|
+
return responseBody;
|
|
47
40
|
}
|
|
48
|
-
|
|
49
|
-
return
|
|
41
|
+
catch (err) {
|
|
42
|
+
return {
|
|
43
|
+
ok: false,
|
|
44
|
+
error: {
|
|
45
|
+
reason: "non-json",
|
|
46
|
+
statusCode: response.status,
|
|
47
|
+
rawBody: text,
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
return undefined;
|
|
52
53
|
});
|
|
53
54
|
}
|
package/core/fetcher/index.d.ts
CHANGED
|
@@ -6,3 +6,4 @@ export { Supplier } from "./Supplier";
|
|
|
6
6
|
export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse";
|
|
7
7
|
export type { RawResponse, WithRawResponse } from "./RawResponse";
|
|
8
8
|
export { HttpResponsePromise } from "./HttpResponsePromise";
|
|
9
|
+
export { BinaryResponse } from "./BinaryResponse";
|
package/core/file.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type FileLike = ArrayBuffer | Uint8Array | import("buffer").Buffer | import("buffer").Blob | import("buffer").File | import("stream").Readable | import("stream/web").ReadableStream | globalThis.Blob | globalThis.File | ReadableStream;
|
|
@@ -1,63 +1,16 @@
|
|
|
1
|
-
export type MaybePromise<T> = Promise<T> | T;
|
|
2
1
|
interface FormDataRequest<Body> {
|
|
3
2
|
body: Body;
|
|
4
3
|
headers: Record<string, string>;
|
|
5
4
|
duplex?: "half";
|
|
6
5
|
}
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
append(key: string, value: unknown): void;
|
|
10
|
-
appendFile(key: string, value: unknown, fileName?: string): Promise<void>;
|
|
11
|
-
getRequest(): MaybePromise<FormDataRequest<unknown>>;
|
|
12
|
-
}
|
|
13
|
-
export declare function newFormData(): Promise<CrossPlatformFormData>;
|
|
14
|
-
export type Node18FormDataFd = {
|
|
15
|
-
append(name: string, value: unknown, fileName?: string): void;
|
|
16
|
-
} | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Form Data Implementation for Node.js 18+
|
|
19
|
-
*/
|
|
20
|
-
export declare class Node18FormData implements CrossPlatformFormData {
|
|
6
|
+
export declare function newFormData(): Promise<FormDataWrapper>;
|
|
7
|
+
export declare class FormDataWrapper {
|
|
21
8
|
private fd;
|
|
22
9
|
setup(): Promise<void>;
|
|
23
|
-
append(key: string, value:
|
|
24
|
-
private getFileName;
|
|
25
|
-
appendFile(key: string, value: unknown, fileName?: string): Promise<void>;
|
|
26
|
-
getRequest(): Promise<FormDataRequest<unknown>>;
|
|
27
|
-
}
|
|
28
|
-
export type Node16FormDataFd = {
|
|
29
|
-
append(name: string, value: unknown, options?: string | {
|
|
30
|
-
header?: string | Headers;
|
|
31
|
-
knownLength?: number;
|
|
32
|
-
filename?: string;
|
|
33
|
-
filepath?: string;
|
|
34
|
-
contentType?: string;
|
|
35
|
-
}): void;
|
|
36
|
-
getHeaders(): Record<string, string>;
|
|
37
|
-
} | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Form Data Implementation for Node.js 16-18
|
|
40
|
-
*/
|
|
41
|
-
export declare class Node16FormData implements CrossPlatformFormData {
|
|
42
|
-
private fd;
|
|
43
|
-
setup(): Promise<void>;
|
|
44
|
-
append(key: string, value: any): void;
|
|
10
|
+
append(key: string, value: unknown): void;
|
|
45
11
|
private getFileName;
|
|
12
|
+
private convertToBlob;
|
|
46
13
|
appendFile(key: string, value: unknown, fileName?: string): Promise<void>;
|
|
47
|
-
getRequest(): FormDataRequest<
|
|
48
|
-
}
|
|
49
|
-
export type WebFormDataFd = {
|
|
50
|
-
append(name: string, value: string | Blob, fileName?: string): void;
|
|
51
|
-
} | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* Form Data Implementation for Web
|
|
54
|
-
*/
|
|
55
|
-
export declare class WebFormData implements CrossPlatformFormData {
|
|
56
|
-
protected fd: WebFormDataFd;
|
|
57
|
-
setup(): Promise<void>;
|
|
58
|
-
append(key: string, value: any): void;
|
|
59
|
-
private getFileName;
|
|
60
|
-
appendFile(key: string, value: any, fileName?: string): Promise<void>;
|
|
61
|
-
getRequest(): FormDataRequest<WebFormDataFd>;
|
|
14
|
+
getRequest(): FormDataRequest<FormData>;
|
|
62
15
|
}
|
|
63
16
|
export {};
|