@sync.so/sdk 0.4.0 → 0.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 -0
- package/Client.js +27 -22
- package/api/resources/account/client/Client.d.ts +19 -1
- package/api/resources/account/client/Client.js +79 -5
- package/api/resources/account/client/index.d.ts +1 -1
- package/api/resources/account/client/index.js +15 -0
- package/api/resources/account/client/requests/GetAccountRequest.d.ts +13 -0
- package/api/resources/account/client/requests/GetAccountRequest.js +5 -0
- package/api/resources/account/client/requests/ListAccountOrganizationsRequest.d.ts +13 -0
- package/api/resources/account/client/requests/ListAccountOrganizationsRequest.js +5 -0
- package/api/resources/account/client/requests/index.d.ts +2 -0
- package/api/resources/account/client/requests/index.js +2 -0
- package/api/resources/account/types/AccountActiveJobs.d.ts +1 -1
- package/api/resources/account/types/AccountCredits.d.ts +1 -1
- package/api/resources/account/types/AccountFreeAllowance.d.ts +2 -2
- package/api/resources/account/types/AccountOrganizationListItem.d.ts +9 -0
- package/api/resources/account/types/AccountOrganizationListItem.js +5 -0
- package/api/resources/account/types/AccountOrganizations.d.ts +7 -0
- package/api/resources/account/types/AccountOrganizations.js +5 -0
- package/api/resources/account/types/AccountOverview.d.ts +5 -1
- package/api/resources/account/types/index.d.ts +2 -0
- package/api/resources/account/types/index.js +2 -0
- package/api/resources/assets/client/Client.d.ts +71 -1
- package/api/resources/assets/client/Client.js +312 -8
- package/api/resources/assets/client/requests/CountAssetsRequest.d.ts +30 -0
- package/api/resources/assets/client/requests/CountAssetsRequest.js +5 -0
- package/api/resources/assets/client/requests/FindUploadedAssetRequest.d.ts +18 -0
- package/api/resources/assets/client/requests/FindUploadedAssetRequest.js +5 -0
- package/api/resources/assets/client/requests/ListAssetsRequest.d.ts +5 -1
- package/api/resources/assets/client/requests/index.d.ts +2 -0
- package/api/resources/audioTrims/client/Client.d.ts +72 -0
- package/api/resources/audioTrims/client/Client.js +217 -0
- package/api/resources/audioTrims/client/index.d.ts +1 -0
- package/api/resources/audioTrims/client/index.js +17 -0
- package/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.d.ts +21 -0
- package/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.js +5 -0
- package/api/resources/audioTrims/client/requests/index.d.ts +1 -0
- package/api/resources/audioTrims/client/requests/index.js +2 -0
- package/api/resources/audioTrims/index.d.ts +1 -0
- package/api/resources/audioTrims/index.js +17 -0
- package/api/resources/batch/client/Client.d.ts +6 -2
- package/api/resources/batch/client/Client.js +18 -6
- package/api/resources/batch/client/requests/CreateBatchFromRowsRequest.d.ts +3 -3
- package/api/resources/batch/client/requests/CreateBatchRequest.d.ts +2 -2
- package/api/resources/common/errors/AudioTrimTooManyRequestsError.d.ts +9 -0
- package/api/resources/common/errors/AudioTrimTooManyRequestsError.js +52 -0
- package/api/resources/common/errors/LinkImportInProgressError.d.ts +9 -0
- package/api/resources/common/errors/LinkImportInProgressError.js +52 -0
- package/api/resources/common/errors/LinkImportTooManyRequestsError.d.ts +9 -0
- package/api/resources/common/errors/LinkImportTooManyRequestsError.js +52 -0
- package/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.d.ts +9 -0
- package/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.js +52 -0
- package/api/resources/common/errors/index.d.ts +4 -0
- package/api/resources/common/errors/index.js +4 -0
- package/api/resources/common/types/ActiveSpeaker.d.ts +3 -3
- package/api/resources/common/types/AnalyzeSpeakersRequest.d.ts +14 -0
- package/api/resources/common/types/AnalyzeSpeakersRequest.js +5 -0
- package/api/resources/common/types/AssetAudioSource.d.ts +17 -0
- package/api/resources/common/types/AssetAudioSource.js +10 -0
- package/api/resources/common/types/AssetIds.d.ts +4 -0
- package/api/resources/common/types/AssetIds.js +5 -0
- package/api/resources/common/types/Audio.d.ts +2 -2
- package/api/resources/common/types/AudioTrim.d.ts +20 -0
- package/api/resources/common/types/AudioTrim.js +5 -0
- package/api/resources/common/types/AudioTrimStatus.d.ts +13 -0
- package/api/resources/common/types/AudioTrimStatus.js +12 -0
- package/api/resources/common/types/BatchConcurrencyError.d.ts +2 -4
- package/api/resources/common/types/BatchGetAssetsRequest.d.ts +8 -0
- package/api/resources/common/types/BatchGetAssetsRequest.js +5 -0
- package/api/resources/common/types/CreateAssetRequest.d.ts +3 -1
- package/api/resources/common/types/CreateAssetUploadRequest.d.ts +1 -1
- package/api/resources/common/types/CreateAudioTrimDto.d.ts +16 -0
- package/api/resources/common/types/CreateAudioTrimDto.js +5 -0
- package/api/resources/common/types/CreateDialogueEditDto.d.ts +2 -2
- package/api/resources/common/types/CreateGenerationDto.d.ts +3 -3
- package/api/resources/common/types/CreateProjectRequest.d.ts +1 -1
- package/api/resources/common/types/CreateTranscriptionDto.d.ts +2 -2
- package/api/resources/common/types/DialogueEditChange.d.ts +1 -1
- package/api/resources/common/types/DialogueEditError.d.ts +5 -1
- package/api/resources/common/types/DialogueEditErrorCode.d.ts +4 -2
- package/api/resources/common/types/DialogueEditErrorCode.js +2 -0
- package/api/resources/common/types/DialogueEditFailedSlot.d.ts +3 -0
- package/api/resources/common/types/DialogueEditJob.d.ts +2 -2
- package/api/resources/common/types/DubDto.d.ts +6 -0
- package/api/resources/common/types/DubLanguage.d.ts +23 -3
- package/api/resources/common/types/DubLanguage.js +17 -0
- package/api/resources/common/types/DubSourceLanguage.d.ts +24 -4
- package/api/resources/common/types/DubSourceLanguage.js +17 -0
- package/api/resources/common/types/EstimateCostRequest.d.ts +1 -1
- package/api/resources/common/types/FindUploadedAssetResponse.d.ts +8 -0
- package/api/resources/common/types/FindUploadedAssetResponse.js +5 -0
- package/api/resources/common/types/Generation.d.ts +9 -5
- package/api/resources/common/types/GenerationCount.d.ts +6 -0
- package/api/resources/common/types/GenerationCount.js +5 -0
- package/api/resources/common/types/GenerationCountType.d.ts +8 -0
- package/api/resources/common/types/GenerationCountType.js +10 -0
- package/api/resources/common/types/GenerationError.d.ts +4 -0
- package/api/resources/common/types/GenerationOptions.d.ts +3 -3
- package/api/resources/common/types/GenerationProgress.d.ts +24 -0
- package/api/resources/common/types/GenerationProgress.js +5 -0
- package/api/resources/common/types/GenerationProgressStage.d.ts +13 -0
- package/api/resources/common/types/GenerationProgressStage.js +12 -0
- package/api/resources/common/types/GenerationSource.d.ts +17 -0
- package/api/resources/common/types/GenerationSource.js +19 -0
- package/api/resources/common/types/GenerationStatus.d.ts +3 -2
- package/api/resources/common/types/GenerationStatus.js +1 -0
- package/api/resources/common/types/Image.d.ts +1 -1
- package/api/resources/common/types/LinkImportError.d.ts +33 -0
- package/api/resources/common/types/LinkImportError.js +5 -0
- package/api/resources/common/types/LinkImportStatus.d.ts +14 -0
- package/api/resources/common/types/LinkImportStatus.js +13 -0
- package/api/resources/common/types/ProjectGenerationError.d.ts +3 -0
- package/api/resources/common/types/ProjectGenerationErrorReason.d.ts +7 -0
- package/api/resources/common/types/ProjectGenerationErrorReason.js +9 -0
- package/api/resources/common/types/SliceSpeakerFaceTrackRequest.d.ts +21 -0
- package/api/resources/common/types/SliceSpeakerFaceTrackRequest.js +5 -0
- package/api/resources/common/types/SpeakerAnalysis.d.ts +26 -0
- package/api/resources/common/types/SpeakerAnalysis.js +5 -0
- package/api/resources/common/types/SpeakerAnalysisSpeaker.d.ts +21 -0
- package/api/resources/common/types/SpeakerAnalysisSpeaker.js +5 -0
- package/api/resources/common/types/SpeakerAnalysisStatus.d.ts +12 -0
- package/api/resources/common/types/SpeakerAnalysisStatus.js +11 -0
- package/api/resources/common/types/SpeakerAvatar.d.ts +16 -0
- package/api/resources/common/types/SpeakerAvatar.js +5 -0
- package/api/resources/common/types/SpeakerAvatarBox.d.ts +12 -0
- package/api/resources/common/types/SpeakerAvatarBox.js +5 -0
- package/api/resources/common/types/SpeakerFaceSupport.d.ts +17 -0
- package/api/resources/common/types/SpeakerFaceSupport.js +5 -0
- package/api/resources/common/types/SpeakerFaceSupportInterval.d.ts +9 -0
- package/api/resources/common/types/SpeakerFaceSupportInterval.js +5 -0
- package/api/resources/common/types/SpeakerFaceTrack.d.ts +18 -0
- package/api/resources/common/types/SpeakerFaceTrack.js +5 -0
- package/api/resources/common/types/SpeakerFaceTrackSlice.d.ts +7 -0
- package/api/resources/common/types/SpeakerFaceTrackSlice.js +5 -0
- package/api/resources/common/types/SpeakerFaceTrackSliceFrames.d.ts +9 -0
- package/api/resources/common/types/SpeakerFaceTrackSliceFrames.js +5 -0
- package/api/resources/common/types/SpeakerMatchEvidence.d.ts +16 -0
- package/api/resources/common/types/SpeakerMatchEvidence.js +5 -0
- package/api/resources/common/types/SpeakerMatchStatus.d.ts +11 -0
- package/api/resources/common/types/SpeakerMatchStatus.js +10 -0
- package/api/resources/common/types/Transcript.d.ts +2 -0
- package/api/resources/common/types/TranscriptSegment.d.ts +2 -0
- package/api/resources/common/types/TranscriptSpeaker.d.ts +13 -0
- package/api/resources/common/types/TranscriptSpeaker.js +5 -0
- package/api/resources/common/types/TranscriptSpeakerLabelFlag.d.ts +11 -0
- package/api/resources/common/types/TranscriptSpeakerLabelFlag.js +10 -0
- package/api/resources/common/types/TranscriptWord.d.ts +4 -0
- package/api/resources/common/types/TranscriptionJob.d.ts +5 -1
- package/api/resources/common/types/TranscriptionJobEstimate.d.ts +20 -0
- package/api/resources/common/types/TranscriptionJobEstimate.js +5 -0
- package/api/resources/common/types/Tts.d.ts +1 -1
- package/api/resources/common/types/UpdateProjectRequest.d.ts +1 -1
- package/api/resources/common/types/Video.d.ts +3 -3
- package/api/resources/common/types/index.d.ts +32 -0
- package/api/resources/common/types/index.js +32 -0
- package/api/resources/dialogueEdits/client/Client.d.ts +35 -31
- package/api/resources/dialogueEdits/client/Client.js +40 -33
- package/api/resources/dialogueEdits/client/index.d.ts +1 -1
- package/api/resources/dialogueEdits/client/index.js +15 -0
- package/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.d.ts +46 -0
- package/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.js +5 -0
- package/api/resources/dialogueEdits/client/requests/index.d.ts +1 -0
- package/api/resources/dialogueEdits/client/requests/index.js +2 -0
- package/api/resources/errors/client/Client.d.ts +1 -1
- package/api/resources/errors/client/Client.js +2 -2
- package/api/resources/feedback/client/Client.js +1 -1
- package/api/resources/generationCosts/index.d.ts +1 -0
- package/api/resources/generationCosts/index.js +17 -0
- package/api/resources/generationCosts/types/CostAvailability.d.ts +10 -0
- package/api/resources/generationCosts/types/CostAvailability.js +12 -0
- package/api/resources/generationCosts/types/CostComponent.d.ts +19 -0
- package/api/resources/generationCosts/types/CostComponent.js +5 -0
- package/api/resources/generationCosts/types/CostComponentStatus.d.ts +10 -0
- package/api/resources/generationCosts/types/CostComponentStatus.js +12 -0
- package/api/resources/generationCosts/types/CostComponentType.d.ts +9 -0
- package/api/resources/generationCosts/types/CostComponentType.js +11 -0
- package/api/resources/generationCosts/types/CostSource.d.ts +9 -0
- package/api/resources/generationCosts/types/CostSource.js +11 -0
- package/api/resources/generationCosts/types/CostUnit.d.ts +8 -0
- package/api/resources/generationCosts/types/CostUnit.js +10 -0
- package/api/resources/generationCosts/types/CostValueBasis.d.ts +9 -0
- package/api/resources/generationCosts/types/CostValueBasis.js +11 -0
- package/api/resources/generationCosts/types/GenerationCosts.d.ts +23 -0
- package/api/resources/generationCosts/types/GenerationCosts.js +5 -0
- package/api/resources/generationCosts/types/GenerationCostsApiKey.d.ts +10 -0
- package/api/resources/generationCosts/types/GenerationCostsApiKey.js +5 -0
- package/api/resources/generationCosts/types/GenerationCostsList.d.ts +12 -0
- package/api/resources/generationCosts/types/GenerationCostsList.js +5 -0
- package/api/resources/generationCosts/types/GenerationCostsListItem.d.ts +17 -0
- package/api/resources/generationCosts/types/GenerationCostsListItem.js +5 -0
- package/api/resources/generationCosts/types/index.d.ts +11 -0
- package/api/resources/generationCosts/types/index.js +27 -0
- package/api/resources/generations/client/Client.d.ts +58 -13
- package/api/resources/generations/client/Client.js +245 -21
- package/api/resources/generations/client/requests/CountGenerationsRequest.d.ts +30 -0
- package/api/resources/generations/client/requests/CountGenerationsRequest.js +5 -0
- package/api/resources/generations/client/requests/CreateGenerationRequest.d.ts +1 -1
- package/api/resources/generations/client/requests/GetGenerationRequest.d.ts +2 -2
- package/api/resources/generations/client/requests/ListGenerationCostsRequest.d.ts +29 -0
- package/api/resources/generations/client/requests/ListGenerationCostsRequest.js +5 -0
- package/api/resources/generations/client/requests/index.d.ts +2 -0
- package/api/resources/index.d.ts +6 -0
- package/api/resources/index.js +7 -1
- package/api/resources/models/client/Client.js +1 -1
- package/api/resources/organizations/client/Client.js +1 -1
- package/api/resources/projects/client/Client.js +7 -7
- package/api/resources/projects/client/requests/ListProjectsRequest.d.ts +1 -1
- package/api/resources/transcriptions/client/Client.d.ts +66 -1
- package/api/resources/transcriptions/client/Client.js +236 -3
- package/api/resources/tts/client/Client.js +3 -3
- package/api/resources/voices/client/Client.d.ts +10 -6
- package/api/resources/voices/client/Client.js +22 -10
- package/api/resources/webhooks/types/GenerationNotification.d.ts +6 -2
- package/api/resources/webhooks/types/WebhookStatus.d.ts +2 -1
- package/api/resources/webhooks/types/WebhookStatus.js +1 -0
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +27 -22
- package/dist/api/resources/account/client/Client.d.ts +19 -1
- package/dist/api/resources/account/client/Client.js +79 -5
- package/dist/api/resources/account/client/index.d.ts +1 -1
- package/dist/api/resources/account/client/index.js +15 -0
- package/dist/api/resources/account/client/requests/GetAccountRequest.d.ts +13 -0
- package/dist/api/resources/account/client/requests/GetAccountRequest.js +5 -0
- package/dist/api/resources/account/client/requests/ListAccountOrganizationsRequest.d.ts +13 -0
- package/dist/api/resources/account/client/requests/ListAccountOrganizationsRequest.js +5 -0
- package/dist/api/resources/account/client/requests/index.d.ts +2 -0
- package/dist/api/resources/account/client/requests/index.js +2 -0
- package/dist/api/resources/account/types/AccountActiveJobs.d.ts +1 -1
- package/dist/api/resources/account/types/AccountCredits.d.ts +1 -1
- package/dist/api/resources/account/types/AccountFreeAllowance.d.ts +2 -2
- package/dist/api/resources/account/types/AccountOrganizationListItem.d.ts +9 -0
- package/dist/api/resources/account/types/AccountOrganizationListItem.js +5 -0
- package/dist/api/resources/account/types/AccountOrganizations.d.ts +7 -0
- package/dist/api/resources/account/types/AccountOrganizations.js +5 -0
- package/dist/api/resources/account/types/AccountOverview.d.ts +5 -1
- package/dist/api/resources/account/types/index.d.ts +2 -0
- package/dist/api/resources/account/types/index.js +2 -0
- package/dist/api/resources/assets/client/Client.d.ts +71 -1
- package/dist/api/resources/assets/client/Client.js +312 -8
- package/dist/api/resources/assets/client/requests/CountAssetsRequest.d.ts +30 -0
- package/dist/api/resources/assets/client/requests/CountAssetsRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/FindUploadedAssetRequest.d.ts +18 -0
- package/dist/api/resources/assets/client/requests/FindUploadedAssetRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/ListAssetsRequest.d.ts +5 -1
- package/dist/api/resources/assets/client/requests/index.d.ts +2 -0
- package/dist/api/resources/audioTrims/client/Client.d.ts +72 -0
- package/dist/api/resources/audioTrims/client/Client.js +217 -0
- package/dist/api/resources/audioTrims/client/index.d.ts +1 -0
- package/dist/api/resources/audioTrims/client/index.js +17 -0
- package/dist/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.d.ts +21 -0
- package/dist/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.js +5 -0
- package/dist/api/resources/audioTrims/client/requests/index.d.ts +1 -0
- package/dist/api/resources/audioTrims/client/requests/index.js +2 -0
- package/dist/api/resources/audioTrims/index.d.ts +1 -0
- package/dist/api/resources/audioTrims/index.js +17 -0
- package/dist/api/resources/batch/client/Client.d.ts +6 -2
- package/dist/api/resources/batch/client/Client.js +18 -6
- package/dist/api/resources/batch/client/requests/CreateBatchFromRowsRequest.d.ts +3 -3
- package/dist/api/resources/batch/client/requests/CreateBatchRequest.d.ts +2 -2
- package/dist/api/resources/common/errors/AudioTrimTooManyRequestsError.d.ts +9 -0
- package/dist/api/resources/common/errors/AudioTrimTooManyRequestsError.js +52 -0
- package/dist/api/resources/common/errors/LinkImportInProgressError.d.ts +9 -0
- package/dist/api/resources/common/errors/LinkImportInProgressError.js +52 -0
- package/dist/api/resources/common/errors/LinkImportTooManyRequestsError.d.ts +9 -0
- package/dist/api/resources/common/errors/LinkImportTooManyRequestsError.js +52 -0
- package/dist/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.d.ts +9 -0
- package/dist/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.js +52 -0
- package/dist/api/resources/common/errors/index.d.ts +4 -0
- package/dist/api/resources/common/errors/index.js +4 -0
- package/dist/api/resources/common/types/ActiveSpeaker.d.ts +3 -3
- package/dist/api/resources/common/types/AnalyzeSpeakersRequest.d.ts +14 -0
- package/dist/api/resources/common/types/AnalyzeSpeakersRequest.js +5 -0
- package/dist/api/resources/common/types/AssetAudioSource.d.ts +17 -0
- package/dist/api/resources/common/types/AssetAudioSource.js +10 -0
- package/dist/api/resources/common/types/AssetIds.d.ts +4 -0
- package/dist/api/resources/common/types/AssetIds.js +5 -0
- package/dist/api/resources/common/types/Audio.d.ts +2 -2
- package/dist/api/resources/common/types/AudioTrim.d.ts +20 -0
- package/dist/api/resources/common/types/AudioTrim.js +5 -0
- package/dist/api/resources/common/types/AudioTrimStatus.d.ts +13 -0
- package/dist/api/resources/common/types/AudioTrimStatus.js +12 -0
- package/dist/api/resources/common/types/BatchConcurrencyError.d.ts +2 -4
- package/dist/api/resources/common/types/BatchGetAssetsRequest.d.ts +8 -0
- package/dist/api/resources/common/types/BatchGetAssetsRequest.js +5 -0
- package/dist/api/resources/common/types/CreateAssetRequest.d.ts +3 -1
- package/dist/api/resources/common/types/CreateAssetUploadRequest.d.ts +1 -1
- package/dist/api/resources/common/types/CreateAudioTrimDto.d.ts +16 -0
- package/dist/api/resources/common/types/CreateAudioTrimDto.js +5 -0
- package/dist/api/resources/common/types/CreateDialogueEditDto.d.ts +2 -2
- package/dist/api/resources/common/types/CreateGenerationDto.d.ts +3 -3
- package/dist/api/resources/common/types/CreateProjectRequest.d.ts +1 -1
- package/dist/api/resources/common/types/CreateTranscriptionDto.d.ts +2 -2
- package/dist/api/resources/common/types/DialogueEditChange.d.ts +1 -1
- package/dist/api/resources/common/types/DialogueEditError.d.ts +5 -1
- package/dist/api/resources/common/types/DialogueEditErrorCode.d.ts +4 -2
- package/dist/api/resources/common/types/DialogueEditErrorCode.js +2 -0
- package/dist/api/resources/common/types/DialogueEditFailedSlot.d.ts +3 -0
- package/dist/api/resources/common/types/DialogueEditJob.d.ts +2 -2
- package/dist/api/resources/common/types/DubDto.d.ts +6 -0
- package/dist/api/resources/common/types/DubLanguage.d.ts +23 -3
- package/dist/api/resources/common/types/DubLanguage.js +17 -0
- package/dist/api/resources/common/types/DubSourceLanguage.d.ts +24 -4
- package/dist/api/resources/common/types/DubSourceLanguage.js +17 -0
- package/dist/api/resources/common/types/EstimateCostRequest.d.ts +1 -1
- package/dist/api/resources/common/types/FindUploadedAssetResponse.d.ts +8 -0
- package/dist/api/resources/common/types/FindUploadedAssetResponse.js +5 -0
- package/dist/api/resources/common/types/Generation.d.ts +9 -5
- package/dist/api/resources/common/types/GenerationCount.d.ts +6 -0
- package/dist/api/resources/common/types/GenerationCount.js +5 -0
- package/dist/api/resources/common/types/GenerationCountType.d.ts +8 -0
- package/dist/api/resources/common/types/GenerationCountType.js +10 -0
- package/dist/api/resources/common/types/GenerationError.d.ts +4 -0
- package/dist/api/resources/common/types/GenerationOptions.d.ts +3 -3
- package/dist/api/resources/common/types/GenerationProgress.d.ts +24 -0
- package/dist/api/resources/common/types/GenerationProgress.js +5 -0
- package/dist/api/resources/common/types/GenerationProgressStage.d.ts +13 -0
- package/dist/api/resources/common/types/GenerationProgressStage.js +12 -0
- package/dist/api/resources/common/types/GenerationSource.d.ts +17 -0
- package/dist/api/resources/common/types/GenerationSource.js +19 -0
- package/dist/api/resources/common/types/GenerationStatus.d.ts +3 -2
- package/dist/api/resources/common/types/GenerationStatus.js +1 -0
- package/dist/api/resources/common/types/Image.d.ts +1 -1
- package/dist/api/resources/common/types/LinkImportError.d.ts +33 -0
- package/dist/api/resources/common/types/LinkImportError.js +5 -0
- package/dist/api/resources/common/types/LinkImportStatus.d.ts +14 -0
- package/dist/api/resources/common/types/LinkImportStatus.js +13 -0
- package/dist/api/resources/common/types/ProjectGenerationError.d.ts +3 -0
- package/dist/api/resources/common/types/ProjectGenerationErrorReason.d.ts +7 -0
- package/dist/api/resources/common/types/ProjectGenerationErrorReason.js +9 -0
- package/dist/api/resources/common/types/SliceSpeakerFaceTrackRequest.d.ts +21 -0
- package/dist/api/resources/common/types/SliceSpeakerFaceTrackRequest.js +5 -0
- package/dist/api/resources/common/types/SpeakerAnalysis.d.ts +26 -0
- package/dist/api/resources/common/types/SpeakerAnalysis.js +5 -0
- package/dist/api/resources/common/types/SpeakerAnalysisSpeaker.d.ts +21 -0
- package/dist/api/resources/common/types/SpeakerAnalysisSpeaker.js +5 -0
- package/dist/api/resources/common/types/SpeakerAnalysisStatus.d.ts +12 -0
- package/dist/api/resources/common/types/SpeakerAnalysisStatus.js +11 -0
- package/dist/api/resources/common/types/SpeakerAvatar.d.ts +16 -0
- package/dist/api/resources/common/types/SpeakerAvatar.js +5 -0
- package/dist/api/resources/common/types/SpeakerAvatarBox.d.ts +12 -0
- package/dist/api/resources/common/types/SpeakerAvatarBox.js +5 -0
- package/dist/api/resources/common/types/SpeakerFaceSupport.d.ts +17 -0
- package/dist/api/resources/common/types/SpeakerFaceSupport.js +5 -0
- package/dist/api/resources/common/types/SpeakerFaceSupportInterval.d.ts +9 -0
- package/dist/api/resources/common/types/SpeakerFaceSupportInterval.js +5 -0
- package/dist/api/resources/common/types/SpeakerFaceTrack.d.ts +18 -0
- package/dist/api/resources/common/types/SpeakerFaceTrack.js +5 -0
- package/dist/api/resources/common/types/SpeakerFaceTrackSlice.d.ts +7 -0
- package/dist/api/resources/common/types/SpeakerFaceTrackSlice.js +5 -0
- package/dist/api/resources/common/types/SpeakerFaceTrackSliceFrames.d.ts +9 -0
- package/dist/api/resources/common/types/SpeakerFaceTrackSliceFrames.js +5 -0
- package/dist/api/resources/common/types/SpeakerMatchEvidence.d.ts +16 -0
- package/dist/api/resources/common/types/SpeakerMatchEvidence.js +5 -0
- package/dist/api/resources/common/types/SpeakerMatchStatus.d.ts +11 -0
- package/dist/api/resources/common/types/SpeakerMatchStatus.js +10 -0
- package/dist/api/resources/common/types/Transcript.d.ts +2 -0
- package/dist/api/resources/common/types/TranscriptSegment.d.ts +2 -0
- package/dist/api/resources/common/types/TranscriptSpeaker.d.ts +13 -0
- package/dist/api/resources/common/types/TranscriptSpeaker.js +5 -0
- package/dist/api/resources/common/types/TranscriptSpeakerLabelFlag.d.ts +11 -0
- package/dist/api/resources/common/types/TranscriptSpeakerLabelFlag.js +10 -0
- package/dist/api/resources/common/types/TranscriptWord.d.ts +4 -0
- package/dist/api/resources/common/types/TranscriptionJob.d.ts +5 -1
- package/dist/api/resources/common/types/TranscriptionJobEstimate.d.ts +20 -0
- package/dist/api/resources/common/types/TranscriptionJobEstimate.js +5 -0
- package/dist/api/resources/common/types/Tts.d.ts +1 -1
- package/dist/api/resources/common/types/UpdateProjectRequest.d.ts +1 -1
- package/dist/api/resources/common/types/Video.d.ts +3 -3
- package/dist/api/resources/common/types/index.d.ts +32 -0
- package/dist/api/resources/common/types/index.js +32 -0
- package/dist/api/resources/dialogueEdits/client/Client.d.ts +35 -31
- package/dist/api/resources/dialogueEdits/client/Client.js +40 -33
- package/dist/api/resources/dialogueEdits/client/index.d.ts +1 -1
- package/dist/api/resources/dialogueEdits/client/index.js +15 -0
- package/dist/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.d.ts +46 -0
- package/dist/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.js +5 -0
- package/dist/api/resources/dialogueEdits/client/requests/index.d.ts +1 -0
- package/dist/api/resources/dialogueEdits/client/requests/index.js +2 -0
- package/dist/api/resources/errors/client/Client.d.ts +1 -1
- package/dist/api/resources/errors/client/Client.js +2 -2
- package/dist/api/resources/feedback/client/Client.js +1 -1
- package/dist/api/resources/generationCosts/index.d.ts +1 -0
- package/dist/api/resources/generationCosts/index.js +17 -0
- package/dist/api/resources/generationCosts/types/CostAvailability.d.ts +10 -0
- package/dist/api/resources/generationCosts/types/CostAvailability.js +12 -0
- package/dist/api/resources/generationCosts/types/CostComponent.d.ts +19 -0
- package/dist/api/resources/generationCosts/types/CostComponent.js +5 -0
- package/dist/api/resources/generationCosts/types/CostComponentStatus.d.ts +10 -0
- package/dist/api/resources/generationCosts/types/CostComponentStatus.js +12 -0
- package/dist/api/resources/generationCosts/types/CostComponentType.d.ts +9 -0
- package/dist/api/resources/generationCosts/types/CostComponentType.js +11 -0
- package/dist/api/resources/generationCosts/types/CostSource.d.ts +9 -0
- package/dist/api/resources/generationCosts/types/CostSource.js +11 -0
- package/dist/api/resources/generationCosts/types/CostUnit.d.ts +8 -0
- package/dist/api/resources/generationCosts/types/CostUnit.js +10 -0
- package/dist/api/resources/generationCosts/types/CostValueBasis.d.ts +9 -0
- package/dist/api/resources/generationCosts/types/CostValueBasis.js +11 -0
- package/dist/api/resources/generationCosts/types/GenerationCosts.d.ts +23 -0
- package/dist/api/resources/generationCosts/types/GenerationCosts.js +5 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsApiKey.d.ts +10 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsApiKey.js +5 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsList.d.ts +12 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsList.js +5 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsListItem.d.ts +17 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsListItem.js +5 -0
- package/dist/api/resources/generationCosts/types/index.d.ts +11 -0
- package/dist/api/resources/generationCosts/types/index.js +27 -0
- package/dist/api/resources/generations/client/Client.d.ts +58 -13
- package/dist/api/resources/generations/client/Client.js +245 -21
- package/dist/api/resources/generations/client/requests/CountGenerationsRequest.d.ts +30 -0
- package/dist/api/resources/generations/client/requests/CountGenerationsRequest.js +5 -0
- package/dist/api/resources/generations/client/requests/CreateGenerationRequest.d.ts +1 -1
- package/dist/api/resources/generations/client/requests/GetGenerationRequest.d.ts +2 -2
- package/dist/api/resources/generations/client/requests/ListGenerationCostsRequest.d.ts +29 -0
- package/dist/api/resources/generations/client/requests/ListGenerationCostsRequest.js +5 -0
- package/dist/api/resources/generations/client/requests/index.d.ts +2 -0
- package/dist/api/resources/index.d.ts +6 -0
- package/dist/api/resources/index.js +7 -1
- package/dist/api/resources/models/client/Client.js +1 -1
- package/dist/api/resources/organizations/client/Client.js +1 -1
- package/dist/api/resources/projects/client/Client.js +7 -7
- package/dist/api/resources/projects/client/requests/ListProjectsRequest.d.ts +1 -1
- package/dist/api/resources/transcriptions/client/Client.d.ts +66 -1
- package/dist/api/resources/transcriptions/client/Client.js +236 -3
- package/dist/api/resources/tts/client/Client.js +3 -3
- package/dist/api/resources/voices/client/Client.d.ts +10 -6
- package/dist/api/resources/voices/client/Client.js +22 -10
- package/dist/api/resources/webhooks/types/GenerationNotification.d.ts +6 -2
- package/dist/api/resources/webhooks/types/WebhookStatus.d.ts +2 -1
- package/dist/api/resources/webhooks/types/WebhookStatus.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +995 -124
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -27,7 +27,7 @@ export declare class Voices {
|
|
|
27
27
|
protected readonly _options: Voices.Options;
|
|
28
28
|
constructor(_options?: Voices.Options);
|
|
29
29
|
/**
|
|
30
|
-
* List the voices available to your organization — built-in ElevenLabs voices plus any you have cloned. Use a voice's id as voiceId in POST /v2/tts and in generation text inputs. A voice that carries a `restriction` cannot currently synthesize speech — check `restriction` and choose another voice. Voice availability can change over time, so re-check it rather than assuming a voice stays usable.
|
|
30
|
+
* List the voices available to your organization — built-in ElevenLabs voices plus any you have cloned. Use a voice's id as voiceId in POST /v2/tts and in generation text inputs. A voice that carries a `restriction` cannot currently synthesize speech — check `restriction` and choose another voice. Voice availability can change over time, so re-check it rather than assuming a voice stays usable. During a provider outage, x-sync-voices-stale: true indicates the last complete list, up to 24 hours old. Retry later for current voices.
|
|
31
31
|
*
|
|
32
32
|
* @param {Sync.ListVoicesRequest} request
|
|
33
33
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -41,7 +41,7 @@ export declare class Voices {
|
|
|
41
41
|
list(request?: Sync.ListVoicesRequest, requestOptions?: Voices.RequestOptions): core.HttpResponsePromise<Sync.Voice[]>;
|
|
42
42
|
private __list;
|
|
43
43
|
/**
|
|
44
|
-
* Retrieve a single voice by the same id values GET /v2/voices exposes — a built-in ElevenLabs voice id or the UUID of a voice cloned by your organization. A missing or foreign-organization id returns a 404 with errorCode voice_not_found.
|
|
44
|
+
* Retrieve a single voice by the same id values GET /v2/voices exposes — a built-in ElevenLabs voice id or the UUID of a voice cloned by your organization. A missing or foreign-organization id returns a 404 with errorCode voice_not_found. During a provider outage, a saved voice can be returned with x-sync-voices-stale: true. An ID absent from that saved list returns 503 rather than 404; retry after recovery. A pending clone returns 409 voice_clone_pending. Poll this GET until 200 (ready) or 404 (no voice was created); do not submit another clone while it is pending.
|
|
45
45
|
*
|
|
46
46
|
* @param {string} id - The voice id — a built-in provider voice id or a cloned voice UUID.
|
|
47
47
|
* @param {Sync.GetVoiceRequest} request
|
|
@@ -49,6 +49,8 @@ export declare class Voices {
|
|
|
49
49
|
*
|
|
50
50
|
* @throws {@link Sync.UnauthorizedError}
|
|
51
51
|
* @throws {@link Sync.NotFoundError}
|
|
52
|
+
* @throws {@link Sync.ConflictError}
|
|
53
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
52
54
|
* @throws {@link Sync.InternalServerError}
|
|
53
55
|
*
|
|
54
56
|
* @example
|
|
@@ -57,11 +59,11 @@ export declare class Voices {
|
|
|
57
59
|
get(id: string, request?: Sync.GetVoiceRequest, requestOptions?: Voices.RequestOptions): core.HttpResponsePromise<Sync.Voice>;
|
|
58
60
|
private __get;
|
|
59
61
|
/**
|
|
60
|
-
* Clone a custom voice from an audio or video sample and get back its id for use in POST /v2/tts and generation text inputs.
|
|
62
|
+
* Clone a custom voice from an audio or video sample and get back its id for use in POST /v2/tts and generation text inputs. Provide exactly one sample source: url, assetId, or sampleUrls with 1–10 hosted URLs.
|
|
61
63
|
*
|
|
62
|
-
* The exact sequence for a local file: (1) request a presigned URL via POST /v2/assets/upload, (2) PUT the file bytes to the returned uploadUrl, (3) clone from the returned url (or register it via POST /v2/assets and clone from the assetId). Samples must be hosted in sync. labs storage — external URLs are rejected with errorCode voice_sample_upload_required. Video sources have their audio track extracted automatically (first 2 minutes). Video sources staged for extraction are limited to 1 GiB (1,073,741,824 bytes); larger sources return 413 voice_sample_source_too_large. This endpoint allows 10 requests per hour per API key (or per signed-in user).
|
|
64
|
+
* The exact sequence for a local file: (1) request a presigned URL via POST /v2/assets/upload, (2) PUT the file bytes to the returned uploadUrl, (3) clone from the returned url (or register it via POST /v2/assets and clone from the assetId). Samples must be hosted in sync. labs storage — external URLs are rejected with errorCode voice_sample_upload_required. Video sources have their audio track extracted automatically (first 2 minutes). Video sources staged for extraction are limited to 1 GiB (1,073,741,824 bytes); larger sources return 413 voice_sample_source_too_large. This endpoint allows 10 requests per hour per API key (or per signed-in user). Audio samples are limited to 10 MiB (10,485,760 bytes), or 50 MiB (52,428,800 bytes) when you connect your own ElevenLabs API key.
|
|
63
65
|
*
|
|
64
|
-
* For best results use 30 seconds to 2 minutes of clear, single-speaker speech without background music or noise. Samples that are too short are rejected with errorCode voice_sample_too_short. Clone slots are limited per plan (403 voice_clone_limit_reached) and voice names must be unique within your organization (409 voice_name_conflict). Sample source problems return 422 (voice_sample_not_accessible, voice_sample_type_unsupported, voice_sample_upload_required, voice_sample_extraction_failed); invalid or too-short samples return 400 (voice_sample_invalid, voice_sample_too_short). A 429 may mean the request-rate limit was exceeded or shared provider capacity is busy (voice_clone_busy); follow the response retry guidance. Provider outages return 503 (elevenlabs_service_unavailable).
|
|
66
|
+
* For best results use 30 seconds to 2 minutes of clear, single-speaker speech without background music or noise. Samples that are too short are rejected with errorCode voice_sample_too_short. Clone slots are limited per plan (403 voice_clone_limit_reached) and voice names must be unique within your organization (409 voice_name_conflict). An uncertain clone returns 409 voice_clone_pending with voiceId. Poll GET /v2/voices/{voiceId} until 200 or 404 instead of submitting another clone. Sample source problems return 422 (voice_sample_not_accessible, voice_sample_type_unsupported, voice_sample_upload_required, voice_sample_extraction_failed); invalid or too-short samples return 400 (voice_sample_invalid, voice_sample_too_short). A 429 may mean the request-rate limit was exceeded or shared provider capacity is busy (voice_clone_busy); follow the response retry guidance. Provider outages return 503 (elevenlabs_service_unavailable).
|
|
65
67
|
*
|
|
66
68
|
* @param {Sync.CreateVoiceRequest} request
|
|
67
69
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -87,13 +89,15 @@ export declare class Voices {
|
|
|
87
89
|
clone(request: Sync.CreateVoiceRequest, requestOptions?: Voices.RequestOptions): core.HttpResponsePromise<Sync.ClonedVoiceResponse>;
|
|
88
90
|
private __clone;
|
|
89
91
|
/**
|
|
90
|
-
* Delete a cloned voice, freeing a clone slot. Unknown ids return 404 with errorCode `voice_not_found`.
|
|
92
|
+
* Delete a cloned voice, freeing a clone slot. Unknown ids return 404 with errorCode `voice_not_found`. Deletion returns 409 while a clone is still processing. If it returns 503, the voice is retained; retry after the provider recovers.
|
|
91
93
|
*
|
|
92
94
|
* @param {string} id - The Sync UUID returned as id when the voice was cloned.
|
|
93
95
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
94
96
|
*
|
|
95
97
|
* @throws {@link Sync.UnauthorizedError}
|
|
96
98
|
* @throws {@link Sync.NotFoundError}
|
|
99
|
+
* @throws {@link Sync.ConflictError}
|
|
100
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
97
101
|
* @throws {@link Sync.InternalServerError}
|
|
98
102
|
*
|
|
99
103
|
* @example
|
|
@@ -59,7 +59,7 @@ class Voices {
|
|
|
59
59
|
this._options = _options;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* List the voices available to your organization — built-in ElevenLabs voices plus any you have cloned. Use a voice's id as voiceId in POST /v2/tts and in generation text inputs. A voice that carries a `restriction` cannot currently synthesize speech — check `restriction` and choose another voice. Voice availability can change over time, so re-check it rather than assuming a voice stays usable.
|
|
62
|
+
* List the voices available to your organization — built-in ElevenLabs voices plus any you have cloned. Use a voice's id as voiceId in POST /v2/tts and in generation text inputs. A voice that carries a `restriction` cannot currently synthesize speech — check `restriction` and choose another voice. Voice availability can change over time, so re-check it rather than assuming a voice stays usable. During a provider outage, x-sync-voices-stale: true indicates the last complete list, up to 24 hours old. Retry later for current voices.
|
|
63
63
|
*
|
|
64
64
|
* @param {Sync.ListVoicesRequest} request
|
|
65
65
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -84,7 +84,7 @@ class Voices {
|
|
|
84
84
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
85
85
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/voices"),
|
|
86
86
|
method: "GET",
|
|
87
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
87
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
88
88
|
contentType: "application/json",
|
|
89
89
|
queryParameters: _queryParams,
|
|
90
90
|
requestType: "json",
|
|
@@ -127,7 +127,7 @@ class Voices {
|
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
/**
|
|
130
|
-
* Retrieve a single voice by the same id values GET /v2/voices exposes — a built-in ElevenLabs voice id or the UUID of a voice cloned by your organization. A missing or foreign-organization id returns a 404 with errorCode voice_not_found.
|
|
130
|
+
* Retrieve a single voice by the same id values GET /v2/voices exposes — a built-in ElevenLabs voice id or the UUID of a voice cloned by your organization. A missing or foreign-organization id returns a 404 with errorCode voice_not_found. During a provider outage, a saved voice can be returned with x-sync-voices-stale: true. An ID absent from that saved list returns 503 rather than 404; retry after recovery. A pending clone returns 409 voice_clone_pending. Poll this GET until 200 (ready) or 404 (no voice was created); do not submit another clone while it is pending.
|
|
131
131
|
*
|
|
132
132
|
* @param {string} id - The voice id — a built-in provider voice id or a cloned voice UUID.
|
|
133
133
|
* @param {Sync.GetVoiceRequest} request
|
|
@@ -135,6 +135,8 @@ class Voices {
|
|
|
135
135
|
*
|
|
136
136
|
* @throws {@link Sync.UnauthorizedError}
|
|
137
137
|
* @throws {@link Sync.NotFoundError}
|
|
138
|
+
* @throws {@link Sync.ConflictError}
|
|
139
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
138
140
|
* @throws {@link Sync.InternalServerError}
|
|
139
141
|
*
|
|
140
142
|
* @example
|
|
@@ -154,7 +156,7 @@ class Voices {
|
|
|
154
156
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
155
157
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/voices/${encodeURIComponent(id)}`),
|
|
156
158
|
method: "GET",
|
|
157
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
159
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
158
160
|
contentType: "application/json",
|
|
159
161
|
queryParameters: _queryParams,
|
|
160
162
|
requestType: "json",
|
|
@@ -171,6 +173,10 @@ class Voices {
|
|
|
171
173
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
172
174
|
case 404:
|
|
173
175
|
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
176
|
+
case 409:
|
|
177
|
+
throw new Sync.ConflictError(_response.error.body, _response.rawResponse);
|
|
178
|
+
case 503:
|
|
179
|
+
throw new Sync.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
174
180
|
case 500:
|
|
175
181
|
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
176
182
|
default:
|
|
@@ -199,11 +205,11 @@ class Voices {
|
|
|
199
205
|
});
|
|
200
206
|
}
|
|
201
207
|
/**
|
|
202
|
-
* Clone a custom voice from an audio or video sample and get back its id for use in POST /v2/tts and generation text inputs.
|
|
208
|
+
* Clone a custom voice from an audio or video sample and get back its id for use in POST /v2/tts and generation text inputs. Provide exactly one sample source: url, assetId, or sampleUrls with 1–10 hosted URLs.
|
|
203
209
|
*
|
|
204
|
-
* The exact sequence for a local file: (1) request a presigned URL via POST /v2/assets/upload, (2) PUT the file bytes to the returned uploadUrl, (3) clone from the returned url (or register it via POST /v2/assets and clone from the assetId). Samples must be hosted in sync. labs storage — external URLs are rejected with errorCode voice_sample_upload_required. Video sources have their audio track extracted automatically (first 2 minutes). Video sources staged for extraction are limited to 1 GiB (1,073,741,824 bytes); larger sources return 413 voice_sample_source_too_large. This endpoint allows 10 requests per hour per API key (or per signed-in user).
|
|
210
|
+
* The exact sequence for a local file: (1) request a presigned URL via POST /v2/assets/upload, (2) PUT the file bytes to the returned uploadUrl, (3) clone from the returned url (or register it via POST /v2/assets and clone from the assetId). Samples must be hosted in sync. labs storage — external URLs are rejected with errorCode voice_sample_upload_required. Video sources have their audio track extracted automatically (first 2 minutes). Video sources staged for extraction are limited to 1 GiB (1,073,741,824 bytes); larger sources return 413 voice_sample_source_too_large. This endpoint allows 10 requests per hour per API key (or per signed-in user). Audio samples are limited to 10 MiB (10,485,760 bytes), or 50 MiB (52,428,800 bytes) when you connect your own ElevenLabs API key.
|
|
205
211
|
*
|
|
206
|
-
* For best results use 30 seconds to 2 minutes of clear, single-speaker speech without background music or noise. Samples that are too short are rejected with errorCode voice_sample_too_short. Clone slots are limited per plan (403 voice_clone_limit_reached) and voice names must be unique within your organization (409 voice_name_conflict). Sample source problems return 422 (voice_sample_not_accessible, voice_sample_type_unsupported, voice_sample_upload_required, voice_sample_extraction_failed); invalid or too-short samples return 400 (voice_sample_invalid, voice_sample_too_short). A 429 may mean the request-rate limit was exceeded or shared provider capacity is busy (voice_clone_busy); follow the response retry guidance. Provider outages return 503 (elevenlabs_service_unavailable).
|
|
212
|
+
* For best results use 30 seconds to 2 minutes of clear, single-speaker speech without background music or noise. Samples that are too short are rejected with errorCode voice_sample_too_short. Clone slots are limited per plan (403 voice_clone_limit_reached) and voice names must be unique within your organization (409 voice_name_conflict). An uncertain clone returns 409 voice_clone_pending with voiceId. Poll GET /v2/voices/{voiceId} until 200 or 404 instead of submitting another clone. Sample source problems return 422 (voice_sample_not_accessible, voice_sample_type_unsupported, voice_sample_upload_required, voice_sample_extraction_failed); invalid or too-short samples return 400 (voice_sample_invalid, voice_sample_too_short). A 429 may mean the request-rate limit was exceeded or shared provider capacity is busy (voice_clone_busy); follow the response retry guidance. Provider outages return 503 (elevenlabs_service_unavailable).
|
|
207
213
|
*
|
|
208
214
|
* @param {Sync.CreateVoiceRequest} request
|
|
209
215
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -235,7 +241,7 @@ class Voices {
|
|
|
235
241
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
236
242
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/voices"),
|
|
237
243
|
method: "POST",
|
|
238
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
244
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
239
245
|
contentType: "application/json",
|
|
240
246
|
requestType: "json",
|
|
241
247
|
body: request,
|
|
@@ -294,13 +300,15 @@ class Voices {
|
|
|
294
300
|
});
|
|
295
301
|
}
|
|
296
302
|
/**
|
|
297
|
-
* Delete a cloned voice, freeing a clone slot. Unknown ids return 404 with errorCode `voice_not_found`.
|
|
303
|
+
* Delete a cloned voice, freeing a clone slot. Unknown ids return 404 with errorCode `voice_not_found`. Deletion returns 409 while a clone is still processing. If it returns 503, the voice is retained; retry after the provider recovers.
|
|
298
304
|
*
|
|
299
305
|
* @param {string} id - The Sync UUID returned as id when the voice was cloned.
|
|
300
306
|
* @param {Voices.RequestOptions} requestOptions - Request-specific configuration.
|
|
301
307
|
*
|
|
302
308
|
* @throws {@link Sync.UnauthorizedError}
|
|
303
309
|
* @throws {@link Sync.NotFoundError}
|
|
310
|
+
* @throws {@link Sync.ConflictError}
|
|
311
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
304
312
|
* @throws {@link Sync.InternalServerError}
|
|
305
313
|
*
|
|
306
314
|
* @example
|
|
@@ -315,7 +323,7 @@ class Voices {
|
|
|
315
323
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
316
324
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/voices/${encodeURIComponent(id)}`),
|
|
317
325
|
method: "DELETE",
|
|
318
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
326
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
319
327
|
contentType: "application/json",
|
|
320
328
|
requestType: "json",
|
|
321
329
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -331,6 +339,10 @@ class Voices {
|
|
|
331
339
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
332
340
|
case 404:
|
|
333
341
|
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
342
|
+
case 409:
|
|
343
|
+
throw new Sync.ConflictError(_response.error.body, _response.rawResponse);
|
|
344
|
+
case 503:
|
|
345
|
+
throw new Sync.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
334
346
|
case 500:
|
|
335
347
|
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
336
348
|
default:
|
|
@@ -17,10 +17,14 @@ export interface GenerationNotification {
|
|
|
17
17
|
options?: Sync.GenerationOptions;
|
|
18
18
|
/** url of the generated output media. Null unless the generation completed. */
|
|
19
19
|
outputUrl: string | null;
|
|
20
|
+
/** Dubbed audio URL. Omitted without dubParams; null until the dubbed track is available. */
|
|
21
|
+
dubAudioUrl?: string | null;
|
|
22
|
+
/** Reusable AUDIO asset for the dubbed track. Omitted without dubParams; null until available or when retention settings or a custom output bucket prevent saving it. */
|
|
23
|
+
dubAudioAssetId?: Sync.AssetId | null;
|
|
20
24
|
/** url of the speech synthesized from a text input. Present only for generations that used a text input. */
|
|
21
25
|
synthesizedAudioUrl?: string;
|
|
22
|
-
/** Human-readable error message if the generation failed or
|
|
26
|
+
/** Human-readable error message if the generation failed, was rejected or lip-synced nothing (NO_OP), otherwise null. */
|
|
23
27
|
error: string | null;
|
|
24
|
-
/** Machine-readable error code if the generation failed or
|
|
28
|
+
/** Machine-readable error code if the generation failed, was rejected or lip-synced nothing (NO_OP), otherwise null. See [Error Handling](/docs/developer-guides/error-handling) and GET /v2/errors. */
|
|
25
29
|
errorCode: string | null;
|
|
26
30
|
}
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* The terminal status that triggered the webhook.
|
|
6
6
|
*/
|
|
7
|
-
export type WebhookStatus = "COMPLETED" | "FAILED" | "REJECTED";
|
|
7
|
+
export type WebhookStatus = "COMPLETED" | "NO_OP" | "FAILED" | "REJECTED";
|
|
8
8
|
export declare const WebhookStatus: {
|
|
9
9
|
readonly Completed: "COMPLETED";
|
|
10
|
+
readonly NoOp: "NO_OP";
|
|
10
11
|
readonly Failed: "FAILED";
|
|
11
12
|
readonly Rejected: "REJECTED";
|
|
12
13
|
};
|
package/dist/Client.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import * as environments from "./environments";
|
|
|
5
5
|
import * as core from "./core";
|
|
6
6
|
import { Account } from "./api/resources/account/client/Client";
|
|
7
7
|
import { Assets } from "./api/resources/assets/client/Client";
|
|
8
|
+
import { AudioTrims } from "./api/resources/audioTrims/client/Client";
|
|
8
9
|
import { Batch } from "./api/resources/batch/client/Client";
|
|
9
10
|
import { DialogueEdits } from "./api/resources/dialogueEdits/client/Client";
|
|
10
11
|
import { Errors } from "./api/resources/errors/client/Client";
|
|
@@ -39,6 +40,7 @@ export declare class SyncClient {
|
|
|
39
40
|
protected readonly _options: SyncClient.Options;
|
|
40
41
|
protected _account: Account | undefined;
|
|
41
42
|
protected _assets: Assets | undefined;
|
|
43
|
+
protected _audioTrims: AudioTrims | undefined;
|
|
42
44
|
protected _batch: Batch | undefined;
|
|
43
45
|
protected _dialogueEdits: DialogueEdits | undefined;
|
|
44
46
|
protected _errors: Errors | undefined;
|
|
@@ -53,6 +55,7 @@ export declare class SyncClient {
|
|
|
53
55
|
constructor(_options?: SyncClient.Options);
|
|
54
56
|
get account(): Account;
|
|
55
57
|
get assets(): Assets;
|
|
58
|
+
get audioTrims(): AudioTrims;
|
|
56
59
|
get batch(): Batch;
|
|
57
60
|
get dialogueEdits(): DialogueEdits;
|
|
58
61
|
get errors(): Errors;
|
package/dist/Client.js
CHANGED
|
@@ -6,17 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.SyncClient = void 0;
|
|
7
7
|
const Client_1 = require("./api/resources/account/client/Client");
|
|
8
8
|
const Client_2 = require("./api/resources/assets/client/Client");
|
|
9
|
-
const Client_3 = require("./api/resources/
|
|
10
|
-
const Client_4 = require("./api/resources/
|
|
11
|
-
const Client_5 = require("./api/resources/
|
|
12
|
-
const Client_6 = require("./api/resources/
|
|
13
|
-
const Client_7 = require("./api/resources/
|
|
14
|
-
const Client_8 = require("./api/resources/
|
|
15
|
-
const Client_9 = require("./api/resources/
|
|
16
|
-
const Client_10 = require("./api/resources/
|
|
17
|
-
const Client_11 = require("./api/resources/
|
|
18
|
-
const Client_12 = require("./api/resources/
|
|
19
|
-
const Client_13 = require("./api/resources/
|
|
9
|
+
const Client_3 = require("./api/resources/audioTrims/client/Client");
|
|
10
|
+
const Client_4 = require("./api/resources/batch/client/Client");
|
|
11
|
+
const Client_5 = require("./api/resources/dialogueEdits/client/Client");
|
|
12
|
+
const Client_6 = require("./api/resources/errors/client/Client");
|
|
13
|
+
const Client_7 = require("./api/resources/feedback/client/Client");
|
|
14
|
+
const Client_8 = require("./api/resources/generations/client/Client");
|
|
15
|
+
const Client_9 = require("./api/resources/models/client/Client");
|
|
16
|
+
const Client_10 = require("./api/resources/organizations/client/Client");
|
|
17
|
+
const Client_11 = require("./api/resources/projects/client/Client");
|
|
18
|
+
const Client_12 = require("./api/resources/transcriptions/client/Client");
|
|
19
|
+
const Client_13 = require("./api/resources/tts/client/Client");
|
|
20
|
+
const Client_14 = require("./api/resources/voices/client/Client");
|
|
20
21
|
class SyncClient {
|
|
21
22
|
constructor(_options = {}) {
|
|
22
23
|
this._options = _options;
|
|
@@ -29,49 +30,53 @@ class SyncClient {
|
|
|
29
30
|
var _a;
|
|
30
31
|
return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new Client_2.Assets(this._options)));
|
|
31
32
|
}
|
|
33
|
+
get audioTrims() {
|
|
34
|
+
var _a;
|
|
35
|
+
return ((_a = this._audioTrims) !== null && _a !== void 0 ? _a : (this._audioTrims = new Client_3.AudioTrims(this._options)));
|
|
36
|
+
}
|
|
32
37
|
get batch() {
|
|
33
38
|
var _a;
|
|
34
|
-
return ((_a = this._batch) !== null && _a !== void 0 ? _a : (this._batch = new
|
|
39
|
+
return ((_a = this._batch) !== null && _a !== void 0 ? _a : (this._batch = new Client_4.Batch(this._options)));
|
|
35
40
|
}
|
|
36
41
|
get dialogueEdits() {
|
|
37
42
|
var _a;
|
|
38
|
-
return ((_a = this._dialogueEdits) !== null && _a !== void 0 ? _a : (this._dialogueEdits = new
|
|
43
|
+
return ((_a = this._dialogueEdits) !== null && _a !== void 0 ? _a : (this._dialogueEdits = new Client_5.DialogueEdits(this._options)));
|
|
39
44
|
}
|
|
40
45
|
get errors() {
|
|
41
46
|
var _a;
|
|
42
|
-
return ((_a = this._errors) !== null && _a !== void 0 ? _a : (this._errors = new
|
|
47
|
+
return ((_a = this._errors) !== null && _a !== void 0 ? _a : (this._errors = new Client_6.Errors(this._options)));
|
|
43
48
|
}
|
|
44
49
|
get feedback() {
|
|
45
50
|
var _a;
|
|
46
|
-
return ((_a = this._feedback) !== null && _a !== void 0 ? _a : (this._feedback = new
|
|
51
|
+
return ((_a = this._feedback) !== null && _a !== void 0 ? _a : (this._feedback = new Client_7.Feedback(this._options)));
|
|
47
52
|
}
|
|
48
53
|
get generations() {
|
|
49
54
|
var _a;
|
|
50
|
-
return ((_a = this._generations) !== null && _a !== void 0 ? _a : (this._generations = new
|
|
55
|
+
return ((_a = this._generations) !== null && _a !== void 0 ? _a : (this._generations = new Client_8.Generations(this._options)));
|
|
51
56
|
}
|
|
52
57
|
get models() {
|
|
53
58
|
var _a;
|
|
54
|
-
return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new
|
|
59
|
+
return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new Client_9.Models(this._options)));
|
|
55
60
|
}
|
|
56
61
|
get organizations() {
|
|
57
62
|
var _a;
|
|
58
|
-
return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new
|
|
63
|
+
return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_10.Organizations(this._options)));
|
|
59
64
|
}
|
|
60
65
|
get projects() {
|
|
61
66
|
var _a;
|
|
62
|
-
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new
|
|
67
|
+
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_11.Projects(this._options)));
|
|
63
68
|
}
|
|
64
69
|
get transcriptions() {
|
|
65
70
|
var _a;
|
|
66
|
-
return ((_a = this._transcriptions) !== null && _a !== void 0 ? _a : (this._transcriptions = new
|
|
71
|
+
return ((_a = this._transcriptions) !== null && _a !== void 0 ? _a : (this._transcriptions = new Client_12.Transcriptions(this._options)));
|
|
67
72
|
}
|
|
68
73
|
get tts() {
|
|
69
74
|
var _a;
|
|
70
|
-
return ((_a = this._tts) !== null && _a !== void 0 ? _a : (this._tts = new
|
|
75
|
+
return ((_a = this._tts) !== null && _a !== void 0 ? _a : (this._tts = new Client_13.Tts(this._options)));
|
|
71
76
|
}
|
|
72
77
|
get voices() {
|
|
73
78
|
var _a;
|
|
74
|
-
return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new
|
|
79
|
+
return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new Client_14.Voices(this._options)));
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
exports.SyncClient = SyncClient;
|
|
@@ -29,16 +29,34 @@ export declare class Account {
|
|
|
29
29
|
/**
|
|
30
30
|
* Get the account, plan, limits and balance behind these credentials. Call it before submitting work to check plan limits and remaining credits or free allowance, and after a 402, 403 or 429 to decide how to recover: `billingModel` says whether to top up credits (`credits`), pay or update the payment method (`usage`), upgrade (`free`) or contact sync. (`enterprise`). Send people to `billingUrl` for anything that needs a payment.
|
|
31
31
|
*
|
|
32
|
+
* @param {Sync.GetAccountRequest} request
|
|
32
33
|
* @param {Account.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
34
|
*
|
|
35
|
+
* @throws {@link Sync.BadRequestError}
|
|
34
36
|
* @throws {@link Sync.UnauthorizedError}
|
|
37
|
+
* @throws {@link Sync.ForbiddenError}
|
|
35
38
|
* @throws {@link Sync.InternalServerError}
|
|
36
39
|
*
|
|
37
40
|
* @example
|
|
38
41
|
* await client.account.get()
|
|
39
42
|
*/
|
|
40
|
-
get(requestOptions?: Account.RequestOptions): core.HttpResponsePromise<Sync.AccountOverview>;
|
|
43
|
+
get(request?: Sync.GetAccountRequest, requestOptions?: Account.RequestOptions): core.HttpResponsePromise<Sync.AccountOverview>;
|
|
41
44
|
private __get;
|
|
45
|
+
/**
|
|
46
|
+
* List the organizations these credentials can access, current one first. An API key lists only its own organization. An OAuth connection lists the organizations selected when it was connected. Send an ID as x-sync-organization-id on subsequent requests to select that organization. An inaccessible organization returns 403; an invalid ID returns 400.
|
|
47
|
+
*
|
|
48
|
+
* @param {Sync.ListAccountOrganizationsRequest} request
|
|
49
|
+
* @param {Account.RequestOptions} requestOptions - Request-specific configuration.
|
|
50
|
+
*
|
|
51
|
+
* @throws {@link Sync.BadRequestError}
|
|
52
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
53
|
+
* @throws {@link Sync.ForbiddenError}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* await client.account.listOrganizations()
|
|
57
|
+
*/
|
|
58
|
+
listOrganizations(request?: Sync.ListAccountOrganizationsRequest, requestOptions?: Account.RequestOptions): core.HttpResponsePromise<Sync.AccountOrganizations>;
|
|
59
|
+
private __listOrganizations;
|
|
42
60
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
43
61
|
"x-api-key": string | undefined;
|
|
44
62
|
}>;
|
|
@@ -61,24 +61,28 @@ class Account {
|
|
|
61
61
|
/**
|
|
62
62
|
* Get the account, plan, limits and balance behind these credentials. Call it before submitting work to check plan limits and remaining credits or free allowance, and after a 402, 403 or 429 to decide how to recover: `billingModel` says whether to top up credits (`credits`), pay or update the payment method (`usage`), upgrade (`free`) or contact sync. (`enterprise`). Send people to `billingUrl` for anything that needs a payment.
|
|
63
63
|
*
|
|
64
|
+
* @param {Sync.GetAccountRequest} request
|
|
64
65
|
* @param {Account.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
66
|
*
|
|
67
|
+
* @throws {@link Sync.BadRequestError}
|
|
66
68
|
* @throws {@link Sync.UnauthorizedError}
|
|
69
|
+
* @throws {@link Sync.ForbiddenError}
|
|
67
70
|
* @throws {@link Sync.InternalServerError}
|
|
68
71
|
*
|
|
69
72
|
* @example
|
|
70
73
|
* await client.account.get()
|
|
71
74
|
*/
|
|
72
|
-
get(requestOptions) {
|
|
73
|
-
return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
|
|
75
|
+
get(request = {}, requestOptions) {
|
|
76
|
+
return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
|
|
74
77
|
}
|
|
75
|
-
__get(
|
|
76
|
-
return __awaiter(this,
|
|
78
|
+
__get() {
|
|
79
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
77
80
|
var _a, _b, _c;
|
|
81
|
+
const { "x-sync-organization-id": organizationId } = request;
|
|
78
82
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
79
83
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/account"),
|
|
80
84
|
method: "GET",
|
|
81
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
85
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-sync-organization-id": organizationId != null ? organizationId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
82
86
|
contentType: "application/json",
|
|
83
87
|
requestType: "json",
|
|
84
88
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -90,8 +94,12 @@ class Account {
|
|
|
90
94
|
}
|
|
91
95
|
if (_response.error.reason === "status-code") {
|
|
92
96
|
switch (_response.error.statusCode) {
|
|
97
|
+
case 400:
|
|
98
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
93
99
|
case 401:
|
|
94
100
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
101
|
+
case 403:
|
|
102
|
+
throw new Sync.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
95
103
|
case 500:
|
|
96
104
|
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
97
105
|
default:
|
|
@@ -119,6 +127,72 @@ class Account {
|
|
|
119
127
|
}
|
|
120
128
|
});
|
|
121
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* List the organizations these credentials can access, current one first. An API key lists only its own organization. An OAuth connection lists the organizations selected when it was connected. Send an ID as x-sync-organization-id on subsequent requests to select that organization. An inaccessible organization returns 403; an invalid ID returns 400.
|
|
132
|
+
*
|
|
133
|
+
* @param {Sync.ListAccountOrganizationsRequest} request
|
|
134
|
+
* @param {Account.RequestOptions} requestOptions - Request-specific configuration.
|
|
135
|
+
*
|
|
136
|
+
* @throws {@link Sync.BadRequestError}
|
|
137
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
138
|
+
* @throws {@link Sync.ForbiddenError}
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* await client.account.listOrganizations()
|
|
142
|
+
*/
|
|
143
|
+
listOrganizations(request = {}, requestOptions) {
|
|
144
|
+
return core.HttpResponsePromise.fromPromise(this.__listOrganizations(request, requestOptions));
|
|
145
|
+
}
|
|
146
|
+
__listOrganizations() {
|
|
147
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
148
|
+
var _a, _b, _c;
|
|
149
|
+
const { "x-sync-organization-id": organizationId } = request;
|
|
150
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
151
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/account/organizations"),
|
|
152
|
+
method: "GET",
|
|
153
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-sync-organization-id": organizationId != null ? organizationId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
154
|
+
contentType: "application/json",
|
|
155
|
+
requestType: "json",
|
|
156
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
157
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
158
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
159
|
+
});
|
|
160
|
+
if (_response.ok) {
|
|
161
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
162
|
+
}
|
|
163
|
+
if (_response.error.reason === "status-code") {
|
|
164
|
+
switch (_response.error.statusCode) {
|
|
165
|
+
case 400:
|
|
166
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
167
|
+
case 401:
|
|
168
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
169
|
+
case 403:
|
|
170
|
+
throw new Sync.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
171
|
+
default:
|
|
172
|
+
throw new errors.SyncError({
|
|
173
|
+
statusCode: _response.error.statusCode,
|
|
174
|
+
body: _response.error.body,
|
|
175
|
+
rawResponse: _response.rawResponse,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
switch (_response.error.reason) {
|
|
180
|
+
case "non-json":
|
|
181
|
+
throw new errors.SyncError({
|
|
182
|
+
statusCode: _response.error.statusCode,
|
|
183
|
+
body: _response.error.rawBody,
|
|
184
|
+
rawResponse: _response.rawResponse,
|
|
185
|
+
});
|
|
186
|
+
case "timeout":
|
|
187
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/account/organizations.");
|
|
188
|
+
case "unknown":
|
|
189
|
+
throw new errors.SyncError({
|
|
190
|
+
message: _response.error.errorMessage,
|
|
191
|
+
rawResponse: _response.rawResponse,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
}
|
|
122
196
|
_getCustomAuthorizationHeaders() {
|
|
123
197
|
return __awaiter(this, void 0, void 0, function* () {
|
|
124
198
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests";
|
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {}
|
|
7
|
+
*/
|
|
8
|
+
export interface GetAccountRequest {
|
|
9
|
+
/**
|
|
10
|
+
* Organization ID from List Organizations. Omit to use the credential's default organization.
|
|
11
|
+
*/
|
|
12
|
+
"x-sync-organization-id"?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {}
|
|
7
|
+
*/
|
|
8
|
+
export interface ListAccountOrganizationsRequest {
|
|
9
|
+
/**
|
|
10
|
+
* Organization ID from this list. Omit to use the credential's default organization.
|
|
11
|
+
*/
|
|
12
|
+
"x-sync-organization-id"?: string;
|
|
13
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface AccountActiveJobs {
|
|
5
|
-
/** In-flight video lipsync generations. Compare with limits.concurrency; batch generations are included here
|
|
5
|
+
/** In-flight video lipsync generations. Compare with limits.concurrency; batch generations are included here but do not count toward it. */
|
|
6
6
|
generations: number;
|
|
7
7
|
/** All in-flight jobs, including dubbing and text-to-speech. Not a limit. */
|
|
8
8
|
total: number;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
export interface AccountCredits {
|
|
5
|
-
/** Credits
|
|
5
|
+
/** Credits currently available for generation usage. */
|
|
6
6
|
available: number;
|
|
7
7
|
/** Credits the plan grants each billing period. */
|
|
8
8
|
periodGrant: number;
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Sync from "../../../index";
|
|
5
5
|
export interface AccountFreeAllowance {
|
|
6
|
-
/** Free lipsync
|
|
6
|
+
/** Free lipsync generation allowance. */
|
|
7
7
|
generations: Sync.AccountAllowanceUsage;
|
|
8
8
|
/** Free text-to-speech and dubbing jobs, which share one pool. */
|
|
9
9
|
speech: Sync.AccountAllowanceUsage;
|
|
10
|
-
/** When the free
|
|
10
|
+
/** When the free allowance renews. */
|
|
11
11
|
resetsAt: string;
|
|
12
12
|
}
|