@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
|
@@ -80,7 +80,7 @@ class Assets {
|
|
|
80
80
|
__list() {
|
|
81
81
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
82
82
|
var _a, _b, _c;
|
|
83
|
-
const { projectId, limit, cursor, searchQuery, sortBy, types } = request;
|
|
83
|
+
const { projectId, limit, cursor, searchQuery, sortBy, types, audioSource } = request;
|
|
84
84
|
const _queryParams = {};
|
|
85
85
|
if (projectId != null) {
|
|
86
86
|
_queryParams["projectId"] = projectId;
|
|
@@ -100,10 +100,13 @@ class Assets {
|
|
|
100
100
|
if (types != null) {
|
|
101
101
|
_queryParams["types"] = (0, json_1.toJson)(types);
|
|
102
102
|
}
|
|
103
|
+
if (audioSource != null) {
|
|
104
|
+
_queryParams["audioSource"] = audioSource;
|
|
105
|
+
}
|
|
103
106
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
104
107
|
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/assets"),
|
|
105
108
|
method: "GET",
|
|
106
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
109
|
+
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),
|
|
107
110
|
contentType: "application/json",
|
|
108
111
|
queryParameters: _queryParams,
|
|
109
112
|
requestType: "json",
|
|
@@ -145,6 +148,293 @@ class Assets {
|
|
|
145
148
|
}
|
|
146
149
|
});
|
|
147
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* Count the assets visible to your organization after applying the filters.
|
|
153
|
+
*
|
|
154
|
+
* @param {Sync.CountAssetsRequest} request
|
|
155
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
156
|
+
*
|
|
157
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
158
|
+
* @throws {@link Sync.InternalServerError}
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* await client.assets.count()
|
|
162
|
+
*/
|
|
163
|
+
count(request = {}, requestOptions) {
|
|
164
|
+
return core.HttpResponsePromise.fromPromise(this.__count(request, requestOptions));
|
|
165
|
+
}
|
|
166
|
+
__count() {
|
|
167
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
168
|
+
var _a, _b, _c;
|
|
169
|
+
const { projectId, userId, searchQuery, types, audioSource } = request;
|
|
170
|
+
const _queryParams = {};
|
|
171
|
+
if (projectId != null) {
|
|
172
|
+
_queryParams["projectId"] = projectId;
|
|
173
|
+
}
|
|
174
|
+
if (userId != null) {
|
|
175
|
+
_queryParams["userId"] = userId;
|
|
176
|
+
}
|
|
177
|
+
if (searchQuery != null) {
|
|
178
|
+
_queryParams["searchQuery"] = searchQuery;
|
|
179
|
+
}
|
|
180
|
+
if (types != null) {
|
|
181
|
+
_queryParams["types"] = (0, json_1.toJson)(types);
|
|
182
|
+
}
|
|
183
|
+
if (audioSource != null) {
|
|
184
|
+
_queryParams["audioSource"] = audioSource;
|
|
185
|
+
}
|
|
186
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
187
|
+
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/assets/count"),
|
|
188
|
+
method: "GET",
|
|
189
|
+
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),
|
|
190
|
+
contentType: "application/json",
|
|
191
|
+
queryParameters: _queryParams,
|
|
192
|
+
requestType: "json",
|
|
193
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
194
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
195
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
196
|
+
});
|
|
197
|
+
if (_response.ok) {
|
|
198
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
199
|
+
}
|
|
200
|
+
if (_response.error.reason === "status-code") {
|
|
201
|
+
switch (_response.error.statusCode) {
|
|
202
|
+
case 401:
|
|
203
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
204
|
+
case 500:
|
|
205
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
206
|
+
default:
|
|
207
|
+
throw new errors.SyncError({
|
|
208
|
+
statusCode: _response.error.statusCode,
|
|
209
|
+
body: _response.error.body,
|
|
210
|
+
rawResponse: _response.rawResponse,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
switch (_response.error.reason) {
|
|
215
|
+
case "non-json":
|
|
216
|
+
throw new errors.SyncError({
|
|
217
|
+
statusCode: _response.error.statusCode,
|
|
218
|
+
body: _response.error.rawBody,
|
|
219
|
+
rawResponse: _response.rawResponse,
|
|
220
|
+
});
|
|
221
|
+
case "timeout":
|
|
222
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/assets/count.");
|
|
223
|
+
case "unknown":
|
|
224
|
+
throw new errors.SyncError({
|
|
225
|
+
message: _response.error.errorMessage,
|
|
226
|
+
rawResponse: _response.rawResponse,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Retrieve multiple assets by ID. Assets you cannot access are omitted from the response.
|
|
233
|
+
*
|
|
234
|
+
* @param {Sync.BatchGetAssetsRequest} request
|
|
235
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
236
|
+
*
|
|
237
|
+
* @throws {@link Sync.BadRequestError}
|
|
238
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
239
|
+
* @throws {@link Sync.InternalServerError}
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* await client.assets.getMany({
|
|
243
|
+
* ids: "ids"
|
|
244
|
+
* })
|
|
245
|
+
*/
|
|
246
|
+
getMany(request, requestOptions) {
|
|
247
|
+
return core.HttpResponsePromise.fromPromise(this.__getMany(request, requestOptions));
|
|
248
|
+
}
|
|
249
|
+
__getMany(request, requestOptions) {
|
|
250
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
251
|
+
var _a, _b, _c;
|
|
252
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
253
|
+
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/assets/batch"),
|
|
254
|
+
method: "POST",
|
|
255
|
+
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),
|
|
256
|
+
contentType: "application/json",
|
|
257
|
+
requestType: "json",
|
|
258
|
+
body: request,
|
|
259
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
260
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
261
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
262
|
+
});
|
|
263
|
+
if (_response.ok) {
|
|
264
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
265
|
+
}
|
|
266
|
+
if (_response.error.reason === "status-code") {
|
|
267
|
+
switch (_response.error.statusCode) {
|
|
268
|
+
case 400:
|
|
269
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
270
|
+
case 401:
|
|
271
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
272
|
+
case 500:
|
|
273
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
274
|
+
default:
|
|
275
|
+
throw new errors.SyncError({
|
|
276
|
+
statusCode: _response.error.statusCode,
|
|
277
|
+
body: _response.error.body,
|
|
278
|
+
rawResponse: _response.rawResponse,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
switch (_response.error.reason) {
|
|
283
|
+
case "non-json":
|
|
284
|
+
throw new errors.SyncError({
|
|
285
|
+
statusCode: _response.error.statusCode,
|
|
286
|
+
body: _response.error.rawBody,
|
|
287
|
+
rawResponse: _response.rawResponse,
|
|
288
|
+
});
|
|
289
|
+
case "timeout":
|
|
290
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling POST /v2/assets/batch.");
|
|
291
|
+
case "unknown":
|
|
292
|
+
throw new errors.SyncError({
|
|
293
|
+
message: _response.error.errorMessage,
|
|
294
|
+
rawResponse: _response.rawResponse,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Get a URL for downloading an asset. The response body is a plain-text URL. Fetch that URL separately; do not send your API key to it.
|
|
301
|
+
*
|
|
302
|
+
* @param {Sync.AssetId} id
|
|
303
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
304
|
+
*
|
|
305
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
306
|
+
* @throws {@link Sync.NotFoundError}
|
|
307
|
+
* @throws {@link Sync.InternalServerError}
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* await client.assets.getDownloadUrl("id")
|
|
311
|
+
*/
|
|
312
|
+
getDownloadUrl(id, requestOptions) {
|
|
313
|
+
return core.HttpResponsePromise.fromPromise(this.__getDownloadUrl(id, requestOptions));
|
|
314
|
+
}
|
|
315
|
+
__getDownloadUrl(id, requestOptions) {
|
|
316
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
317
|
+
var _a, _b, _c;
|
|
318
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
319
|
+
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/assets/${encodeURIComponent(id)}/download`),
|
|
320
|
+
method: "GET",
|
|
321
|
+
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),
|
|
322
|
+
contentType: "application/json",
|
|
323
|
+
requestType: "json",
|
|
324
|
+
responseType: "text",
|
|
325
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
326
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
327
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
328
|
+
});
|
|
329
|
+
if (_response.ok) {
|
|
330
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
331
|
+
}
|
|
332
|
+
if (_response.error.reason === "status-code") {
|
|
333
|
+
switch (_response.error.statusCode) {
|
|
334
|
+
case 401:
|
|
335
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
336
|
+
case 404:
|
|
337
|
+
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
338
|
+
case 500:
|
|
339
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
340
|
+
default:
|
|
341
|
+
throw new errors.SyncError({
|
|
342
|
+
statusCode: _response.error.statusCode,
|
|
343
|
+
body: _response.error.body,
|
|
344
|
+
rawResponse: _response.rawResponse,
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
switch (_response.error.reason) {
|
|
349
|
+
case "non-json":
|
|
350
|
+
throw new errors.SyncError({
|
|
351
|
+
statusCode: _response.error.statusCode,
|
|
352
|
+
body: _response.error.rawBody,
|
|
353
|
+
rawResponse: _response.rawResponse,
|
|
354
|
+
});
|
|
355
|
+
case "timeout":
|
|
356
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/assets/{id}/download.");
|
|
357
|
+
case "unknown":
|
|
358
|
+
throw new errors.SyncError({
|
|
359
|
+
message: _response.error.errorMessage,
|
|
360
|
+
rawResponse: _response.rawResponse,
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Find the newest live asset registered with the same API key, SHA-256 digest, and type. Reuse its id instead of uploading the file again. Assets registered with another API key do not match, even within the same organization. Returns asset null when no asset matches.
|
|
367
|
+
*
|
|
368
|
+
* @param {Sync.FindUploadedAssetRequest} request
|
|
369
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
370
|
+
*
|
|
371
|
+
* @throws {@link Sync.BadRequestError}
|
|
372
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
373
|
+
* @throws {@link Sync.InternalServerError}
|
|
374
|
+
*
|
|
375
|
+
* @example
|
|
376
|
+
* await client.assets.findUploaded({
|
|
377
|
+
* contentSha256: "contentSha256",
|
|
378
|
+
* type: "AUDIO"
|
|
379
|
+
* })
|
|
380
|
+
*/
|
|
381
|
+
findUploaded(request, requestOptions) {
|
|
382
|
+
return core.HttpResponsePromise.fromPromise(this.__findUploaded(request, requestOptions));
|
|
383
|
+
}
|
|
384
|
+
__findUploaded(request, requestOptions) {
|
|
385
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
386
|
+
var _a, _b, _c;
|
|
387
|
+
const { contentSha256, type: type_ } = request;
|
|
388
|
+
const _queryParams = {};
|
|
389
|
+
_queryParams["contentSha256"] = contentSha256;
|
|
390
|
+
_queryParams["type"] = type_;
|
|
391
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
392
|
+
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/assets/uploaded"),
|
|
393
|
+
method: "GET",
|
|
394
|
+
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),
|
|
395
|
+
contentType: "application/json",
|
|
396
|
+
queryParameters: _queryParams,
|
|
397
|
+
requestType: "json",
|
|
398
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
399
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
400
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
401
|
+
});
|
|
402
|
+
if (_response.ok) {
|
|
403
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
404
|
+
}
|
|
405
|
+
if (_response.error.reason === "status-code") {
|
|
406
|
+
switch (_response.error.statusCode) {
|
|
407
|
+
case 400:
|
|
408
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
409
|
+
case 401:
|
|
410
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
411
|
+
case 500:
|
|
412
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
413
|
+
default:
|
|
414
|
+
throw new errors.SyncError({
|
|
415
|
+
statusCode: _response.error.statusCode,
|
|
416
|
+
body: _response.error.body,
|
|
417
|
+
rawResponse: _response.rawResponse,
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
switch (_response.error.reason) {
|
|
422
|
+
case "non-json":
|
|
423
|
+
throw new errors.SyncError({
|
|
424
|
+
statusCode: _response.error.statusCode,
|
|
425
|
+
body: _response.error.rawBody,
|
|
426
|
+
rawResponse: _response.rawResponse,
|
|
427
|
+
});
|
|
428
|
+
case "timeout":
|
|
429
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/assets/uploaded.");
|
|
430
|
+
case "unknown":
|
|
431
|
+
throw new errors.SyncError({
|
|
432
|
+
message: _response.error.errorMessage,
|
|
433
|
+
rawResponse: _response.rawResponse,
|
|
434
|
+
});
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
}
|
|
148
438
|
/**
|
|
149
439
|
* Retrieve a specific asset by ID.
|
|
150
440
|
*
|
|
@@ -167,7 +457,7 @@ class Assets {
|
|
|
167
457
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
168
458
|
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/assets/${encodeURIComponent(id)}`),
|
|
169
459
|
method: "GET",
|
|
170
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
460
|
+
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),
|
|
171
461
|
contentType: "application/json",
|
|
172
462
|
requestType: "json",
|
|
173
463
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -211,7 +501,7 @@ class Assets {
|
|
|
211
501
|
});
|
|
212
502
|
}
|
|
213
503
|
/**
|
|
214
|
-
* Request a presigned URL to upload a local file. PUT the file bytes to the returned uploadUrl with the same Content-Type, then register the file as an asset via POST /v2/assets using the returned url. Single uploads are capped at
|
|
504
|
+
* Request a presigned URL to upload a local file. PUT the file bytes to the returned uploadUrl with the same Content-Type, then register the file as an asset via POST /v2/assets using the returned url. Single uploads are capped at 5 GiB (5,368,709,120 bytes).
|
|
215
505
|
*
|
|
216
506
|
* @param {Sync.CreateAssetUploadRequest} request
|
|
217
507
|
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -237,7 +527,7 @@ class Assets {
|
|
|
237
527
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
238
528
|
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/assets/upload"),
|
|
239
529
|
method: "POST",
|
|
240
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
530
|
+
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),
|
|
241
531
|
contentType: "application/json",
|
|
242
532
|
requestType: "json",
|
|
243
533
|
body: request,
|
|
@@ -288,12 +578,18 @@ class Assets {
|
|
|
288
578
|
*
|
|
289
579
|
* projectId is optional. When provided it must reference a project in your organization — a stale or foreign id is rejected with a 422 and errorCode project_not_found; omit the field if you don't need the asset attached to a project.
|
|
290
580
|
*
|
|
581
|
+
* A link to a single TikTok, Instagram, Facebook, or YouTube video is imported instead of registered. The response is 409 import_in_progress until the video is downloaded; send the same request again after Retry-After to get the imported VIDEO asset, named after the video. A failed import returns 422 import_failed; check the message or upload the file instead. A 429 means the concurrent or daily import limit was reached; follow Retry-After. Link imports return 403 import_not_enabled when unavailable for your account and 503 import_unavailable when temporarily unavailable. See [Asset Uploads](/docs/developer-guides/asset-uploads#import-a-social-video-link).
|
|
582
|
+
*
|
|
291
583
|
* @param {Sync.CreateAssetRequest} request
|
|
292
584
|
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
293
585
|
*
|
|
294
586
|
* @throws {@link Sync.BadRequestError}
|
|
295
587
|
* @throws {@link Sync.UnauthorizedError}
|
|
588
|
+
* @throws {@link Sync.ForbiddenError}
|
|
589
|
+
* @throws {@link Sync.LinkImportInProgressError}
|
|
296
590
|
* @throws {@link Sync.UnprocessableEntityError}
|
|
591
|
+
* @throws {@link Sync.LinkImportTooManyRequestsError}
|
|
592
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
297
593
|
* @throws {@link Sync.InternalServerError}
|
|
298
594
|
*
|
|
299
595
|
* @example
|
|
@@ -312,7 +608,7 @@ class Assets {
|
|
|
312
608
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
313
609
|
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/assets"),
|
|
314
610
|
method: "POST",
|
|
315
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
611
|
+
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),
|
|
316
612
|
contentType: "application/json",
|
|
317
613
|
requestType: "json",
|
|
318
614
|
body: request,
|
|
@@ -329,8 +625,16 @@ class Assets {
|
|
|
329
625
|
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
330
626
|
case 401:
|
|
331
627
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
628
|
+
case 403:
|
|
629
|
+
throw new Sync.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
630
|
+
case 409:
|
|
631
|
+
throw new Sync.LinkImportInProgressError(_response.error.body, _response.rawResponse);
|
|
332
632
|
case 422:
|
|
333
633
|
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
634
|
+
case 429:
|
|
635
|
+
throw new Sync.LinkImportTooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
636
|
+
case 503:
|
|
637
|
+
throw new Sync.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
334
638
|
case 500:
|
|
335
639
|
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
336
640
|
default:
|
|
@@ -385,7 +689,7 @@ class Assets {
|
|
|
385
689
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
386
690
|
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/assets/${encodeURIComponent(id)}`),
|
|
387
691
|
method: "PATCH",
|
|
388
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
692
|
+
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),
|
|
389
693
|
contentType: "application/json",
|
|
390
694
|
requestType: "json",
|
|
391
695
|
body: request,
|
|
@@ -457,7 +761,7 @@ class Assets {
|
|
|
457
761
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
458
762
|
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/assets/${encodeURIComponent(id)}`),
|
|
459
763
|
method: "DELETE",
|
|
460
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
764
|
+
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),
|
|
461
765
|
contentType: "application/json",
|
|
462
766
|
requestType: "json",
|
|
463
767
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Sync from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {}
|
|
8
|
+
*/
|
|
9
|
+
export interface CountAssetsRequest {
|
|
10
|
+
/**
|
|
11
|
+
* Filter assets by project ID.
|
|
12
|
+
*/
|
|
13
|
+
projectId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Filter assets by owning user ID.
|
|
16
|
+
*/
|
|
17
|
+
userId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Search assets by name.
|
|
20
|
+
*/
|
|
21
|
+
searchQuery?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Filter by asset types. Accepts a comma-separated list or repeated values.
|
|
24
|
+
*/
|
|
25
|
+
types?: Sync.AssetType[];
|
|
26
|
+
/**
|
|
27
|
+
* Filter audio by source. Video and image assets are unaffected.
|
|
28
|
+
*/
|
|
29
|
+
audioSource?: Sync.AssetAudioSource;
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Sync from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* contentSha256: "contentSha256",
|
|
9
|
+
* type: "AUDIO"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface FindUploadedAssetRequest {
|
|
13
|
+
/**
|
|
14
|
+
* SHA-256 digest of the file bytes as 64 lowercase hexadecimal characters.
|
|
15
|
+
*/
|
|
16
|
+
contentSha256: string;
|
|
17
|
+
type: Sync.AssetType;
|
|
18
|
+
}
|
|
@@ -19,7 +19,7 @@ export interface ListAssetsRequest {
|
|
|
19
19
|
*/
|
|
20
20
|
limit?: number;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* The nextCursor UUID returned by the previous page. A non-UUID value returns 400.
|
|
23
23
|
*/
|
|
24
24
|
cursor?: string;
|
|
25
25
|
/**
|
|
@@ -34,4 +34,8 @@ export interface ListAssetsRequest {
|
|
|
34
34
|
* Filter by asset types. Accepts multiple types as a comma-separated list (AUDIO, VIDEO, IMAGE).
|
|
35
35
|
*/
|
|
36
36
|
types?: Sync.AssetType[];
|
|
37
|
+
/**
|
|
38
|
+
* Filter audio by source. Video and image assets are unaffected.
|
|
39
|
+
*/
|
|
40
|
+
audioSource?: Sync.AssetAudioSource;
|
|
37
41
|
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments";
|
|
5
|
+
import * as core from "../../../../core";
|
|
6
|
+
import * as Sync from "../../../index";
|
|
7
|
+
export declare namespace AudioTrims {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.SyncEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
|
+
fetcher?: core.FetchFunction;
|
|
14
|
+
}
|
|
15
|
+
interface RequestOptions {
|
|
16
|
+
/** The maximum time to wait for a response in seconds. */
|
|
17
|
+
timeoutInSeconds?: number;
|
|
18
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
19
|
+
maxRetries?: number;
|
|
20
|
+
/** A hook to abort the request. */
|
|
21
|
+
abortSignal?: AbortSignal;
|
|
22
|
+
/** Additional headers to include in the request. */
|
|
23
|
+
headers?: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export declare class AudioTrims {
|
|
27
|
+
protected readonly _options: AudioTrims.Options;
|
|
28
|
+
constructor(_options?: AudioTrims.Options);
|
|
29
|
+
/**
|
|
30
|
+
* Prepare a new audio asset from the first durationSeconds of an audio file. Provide exactly one source: assetId or a sourceUrl for audio hosted in Sync storage that you can access. Returns 202 with the trim. Poll GET /v2/audio-trims/{id} until status is completed or failed. Use the completed assetId as an audio input to a generation.
|
|
31
|
+
* A source you cannot access returns 404. Unsupported sources can return 422 audio_trim_source_not_hosted or audio_trim_source_not_allowed. Each organization can have 4 trims in progress and start 60 per hour; requests beyond these limits return 429 audio_trim_rate_limited.
|
|
32
|
+
*
|
|
33
|
+
* @param {Sync.CreateAudioTrimRequest} request
|
|
34
|
+
* @param {AudioTrims.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
|
+
*
|
|
36
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
37
|
+
* @throws {@link Sync.BadRequestError}
|
|
38
|
+
* @throws {@link Sync.NotFoundError}
|
|
39
|
+
* @throws {@link Sync.ConflictError}
|
|
40
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
41
|
+
* @throws {@link Sync.AudioTrimTooManyRequestsError}
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.audioTrims.create({
|
|
45
|
+
* "Idempotency-Key": "trim-intro-20s",
|
|
46
|
+
* body: {
|
|
47
|
+
* assetId: "3f2b8c1e-5d4a-4e9b-8c7d-1a2b3c4d5e6f",
|
|
48
|
+
* durationSeconds: 20
|
|
49
|
+
* }
|
|
50
|
+
* })
|
|
51
|
+
*/
|
|
52
|
+
create(request: Sync.CreateAudioTrimRequest, requestOptions?: AudioTrims.RequestOptions): core.HttpResponsePromise<Sync.AudioTrim>;
|
|
53
|
+
private __create;
|
|
54
|
+
/**
|
|
55
|
+
* Retrieve an audio trim created by the same user or API key. While status is queued or processing, wait retryAfterMs before polling again. When status is completed, assetId is the trimmed WAV audio asset and durationSeconds is its measured length. A failed trim has errorCode audio_trim_failed; start a new trim with a new Idempotency-Key.
|
|
56
|
+
*
|
|
57
|
+
* @param {string} id - The trim id returned by POST /v2/audio-trims.
|
|
58
|
+
* @param {AudioTrims.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
61
|
+
* @throws {@link Sync.NotFoundError}
|
|
62
|
+
* @throws {@link Sync.ConflictError}
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.audioTrims.get("6533643b-aceb-4c40-967e-d9ba9baac39e")
|
|
66
|
+
*/
|
|
67
|
+
get(id: string, requestOptions?: AudioTrims.RequestOptions): core.HttpResponsePromise<Sync.AudioTrim>;
|
|
68
|
+
private __get;
|
|
69
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
70
|
+
"x-api-key": string | undefined;
|
|
71
|
+
}>;
|
|
72
|
+
}
|