@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
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.AudioTrims = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
53
|
+
const core = __importStar(require("../../../../core"));
|
|
54
|
+
const Sync = __importStar(require("../../../index"));
|
|
55
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
56
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
57
|
+
class AudioTrims {
|
|
58
|
+
constructor(_options = {}) {
|
|
59
|
+
this._options = _options;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* 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.
|
|
63
|
+
* 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.
|
|
64
|
+
*
|
|
65
|
+
* @param {Sync.CreateAudioTrimRequest} request
|
|
66
|
+
* @param {AudioTrims.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
69
|
+
* @throws {@link Sync.BadRequestError}
|
|
70
|
+
* @throws {@link Sync.NotFoundError}
|
|
71
|
+
* @throws {@link Sync.ConflictError}
|
|
72
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
73
|
+
* @throws {@link Sync.AudioTrimTooManyRequestsError}
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* await client.audioTrims.create({
|
|
77
|
+
* "Idempotency-Key": "trim-intro-20s",
|
|
78
|
+
* body: {
|
|
79
|
+
* assetId: "3f2b8c1e-5d4a-4e9b-8c7d-1a2b3c4d5e6f",
|
|
80
|
+
* durationSeconds: 20
|
|
81
|
+
* }
|
|
82
|
+
* })
|
|
83
|
+
*/
|
|
84
|
+
create(request, requestOptions) {
|
|
85
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
86
|
+
}
|
|
87
|
+
__create(request, requestOptions) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
var _a, _b, _c;
|
|
90
|
+
const { "Idempotency-Key": idempotencyKey, body: _body } = request;
|
|
91
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
92
|
+
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/audio-trims"),
|
|
93
|
+
method: "POST",
|
|
94
|
+
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, "Idempotency-Key": idempotencyKey }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
95
|
+
contentType: "application/json",
|
|
96
|
+
requestType: "json",
|
|
97
|
+
body: _body,
|
|
98
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
99
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
100
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
101
|
+
});
|
|
102
|
+
if (_response.ok) {
|
|
103
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
104
|
+
}
|
|
105
|
+
if (_response.error.reason === "status-code") {
|
|
106
|
+
switch (_response.error.statusCode) {
|
|
107
|
+
case 401:
|
|
108
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
109
|
+
case 400:
|
|
110
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
111
|
+
case 404:
|
|
112
|
+
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
113
|
+
case 409:
|
|
114
|
+
throw new Sync.ConflictError(_response.error.body, _response.rawResponse);
|
|
115
|
+
case 422:
|
|
116
|
+
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
117
|
+
case 429:
|
|
118
|
+
throw new Sync.AudioTrimTooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
119
|
+
default:
|
|
120
|
+
throw new errors.SyncError({
|
|
121
|
+
statusCode: _response.error.statusCode,
|
|
122
|
+
body: _response.error.body,
|
|
123
|
+
rawResponse: _response.rawResponse,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
switch (_response.error.reason) {
|
|
128
|
+
case "non-json":
|
|
129
|
+
throw new errors.SyncError({
|
|
130
|
+
statusCode: _response.error.statusCode,
|
|
131
|
+
body: _response.error.rawBody,
|
|
132
|
+
rawResponse: _response.rawResponse,
|
|
133
|
+
});
|
|
134
|
+
case "timeout":
|
|
135
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling POST /v2/audio-trims.");
|
|
136
|
+
case "unknown":
|
|
137
|
+
throw new errors.SyncError({
|
|
138
|
+
message: _response.error.errorMessage,
|
|
139
|
+
rawResponse: _response.rawResponse,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* 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.
|
|
146
|
+
*
|
|
147
|
+
* @param {string} id - The trim id returned by POST /v2/audio-trims.
|
|
148
|
+
* @param {AudioTrims.RequestOptions} requestOptions - Request-specific configuration.
|
|
149
|
+
*
|
|
150
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
151
|
+
* @throws {@link Sync.NotFoundError}
|
|
152
|
+
* @throws {@link Sync.ConflictError}
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* await client.audioTrims.get("6533643b-aceb-4c40-967e-d9ba9baac39e")
|
|
156
|
+
*/
|
|
157
|
+
get(id, requestOptions) {
|
|
158
|
+
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
|
|
159
|
+
}
|
|
160
|
+
__get(id, requestOptions) {
|
|
161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
var _a, _b, _c;
|
|
163
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
164
|
+
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/audio-trims/${encodeURIComponent(id)}`),
|
|
165
|
+
method: "GET",
|
|
166
|
+
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),
|
|
167
|
+
contentType: "application/json",
|
|
168
|
+
requestType: "json",
|
|
169
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
170
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
171
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
172
|
+
});
|
|
173
|
+
if (_response.ok) {
|
|
174
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
175
|
+
}
|
|
176
|
+
if (_response.error.reason === "status-code") {
|
|
177
|
+
switch (_response.error.statusCode) {
|
|
178
|
+
case 401:
|
|
179
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
180
|
+
case 404:
|
|
181
|
+
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
182
|
+
case 409:
|
|
183
|
+
throw new Sync.ConflictError(_response.error.body, _response.rawResponse);
|
|
184
|
+
default:
|
|
185
|
+
throw new errors.SyncError({
|
|
186
|
+
statusCode: _response.error.statusCode,
|
|
187
|
+
body: _response.error.body,
|
|
188
|
+
rawResponse: _response.rawResponse,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
switch (_response.error.reason) {
|
|
193
|
+
case "non-json":
|
|
194
|
+
throw new errors.SyncError({
|
|
195
|
+
statusCode: _response.error.statusCode,
|
|
196
|
+
body: _response.error.rawBody,
|
|
197
|
+
rawResponse: _response.rawResponse,
|
|
198
|
+
});
|
|
199
|
+
case "timeout":
|
|
200
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/audio-trims/{id}.");
|
|
201
|
+
case "unknown":
|
|
202
|
+
throw new errors.SyncError({
|
|
203
|
+
message: _response.error.errorMessage,
|
|
204
|
+
rawResponse: _response.rawResponse,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
_getCustomAuthorizationHeaders() {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
var _a;
|
|
212
|
+
const apiKeyValue = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["SYNC_API_KEY"];
|
|
213
|
+
return { "x-api-key": apiKeyValue };
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
exports.AudioTrims = AudioTrims;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
* "Idempotency-Key": "trim-intro-20s",
|
|
9
|
+
* body: {
|
|
10
|
+
* assetId: "3f2b8c1e-5d4a-4e9b-8c7d-1a2b3c4d5e6f",
|
|
11
|
+
* durationSeconds: 20
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface CreateAudioTrimRequest {
|
|
16
|
+
/**
|
|
17
|
+
* Required. 1–128 characters matching [A-Za-z0-9._~-]+, scoped to your organization and the calling user or API key. Retrying with the same key and body returns the original trim; reusing the key with a different body returns 409.
|
|
18
|
+
*/
|
|
19
|
+
"Idempotency-Key": string;
|
|
20
|
+
body: Sync.CreateAudioTrimDto;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type CreateAudioTrimRequest } from "./CreateAudioTrimRequest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|
|
@@ -29,14 +29,16 @@ export declare class Batch {
|
|
|
29
29
|
protected readonly _options: Batch.Options;
|
|
30
30
|
constructor(_options?: Batch.Options);
|
|
31
31
|
/**
|
|
32
|
-
* Create a batch processing job from a JSONL file. Requires
|
|
32
|
+
* Create a batch processing job from a JSONL file. Requires the Scale plan or above and approval for your organization. Access is disabled by default, including for new Scale subscriptions. Contact support@sync.so to request access. Without approval, creation and dry runs return 403 `batch_access_not_enabled`. Approved organizations on other plans get 402 `plan_feature_unavailable` with `requiredPlan`. Send the file in multipart field `input` (or the accepted `file` alias); it must be 5 MB or smaller and contain 20-500 records by default. A batch is queued and holds one slot of your plan's batch concurrency limit; more active batches than that returns 429 `concurrency_limit_reached`. Each line must contain `request_id`, endpoint exactly `/v2/generate`, and a generation `payload`. To send the records as a JSON array instead of a file, use "Create Batch from Rows", the `application/json` form of the same endpoint. Errors name a refused record by its 1-based line, counting non-empty lines: dialogue edit refusals return it as `lineNumber`, other record errors only in `message`.
|
|
33
33
|
*
|
|
34
34
|
* @param {File | fs.ReadStream | Blob} input
|
|
35
35
|
* @param {Sync.CreateBatchRequest} request
|
|
36
36
|
* @param {Batch.RequestOptions} requestOptions - Request-specific configuration.
|
|
37
37
|
*
|
|
38
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
38
39
|
* @throws {@link Sync.BadRequestError}
|
|
39
40
|
* @throws {@link Sync.UnauthorizedError}
|
|
41
|
+
* @throws {@link Sync.ForbiddenError}
|
|
40
42
|
* @throws {@link Sync.PaymentRequiredError}
|
|
41
43
|
* @throws {@link Sync.TooManyRequestsError}
|
|
42
44
|
* @throws {@link Sync.InternalServerError}
|
|
@@ -55,13 +57,14 @@ export declare class Batch {
|
|
|
55
57
|
create(input: File | fs.ReadStream | Blob, request: Sync.CreateBatchRequest, requestOptions?: Batch.RequestOptions): core.HttpResponsePromise<Sync.CreateBatchResponse>;
|
|
56
58
|
private __create;
|
|
57
59
|
/**
|
|
58
|
-
* The `application/json` form of `POST /v2/batch`, the same endpoint as "Create Batch": send the records in a `rows` array instead of a JSONL file. Each row is the same object as one JSONL line and is validated the same way: 20-500 rows by default
|
|
60
|
+
* The `application/json` form of `POST /v2/batch`, the same endpoint as "Create Batch": send the records in a `rows` array instead of a JSONL file. Each row is the same object as one JSONL line and is validated the same way: 20-500 rows by default, 5 MB or smaller when serialized as JSONL, unique `request_id` values, and endpoint exactly `/v2/generate`. Errors name a refused row by its line, where line N is `rows[N-1]`: dialogue edit refusals return it as `lineNumber`, other record errors only in `message`. Requires the Scale plan or above and approval for your organization. Access is disabled by default; contact support@sync.so to request access. Without approval, creation and dry runs return 403 `batch_access_not_enabled`. In early access, enabled per organization, a row's payload can carry `dialogueEdit` to render a completed preview from POST /v2/dialogue-edits: send one video input, the video the preview was made from, and no audio input. All dialogue edit rows in a batch must come from the same source video. Each row is expanded at submit into the request POST /v2/generate builds for that preview and is charged the same. The expanded batch must also be 5 MB or smaller. A dialogue edit row that cannot be rendered refuses the whole batch with the `/v2/generate` errorCode (for example dialogue_edit_not_found, 422) and `lineNumber`. See [Batch Processing](/docs/api-reference/guides/batch-processing).
|
|
59
61
|
*
|
|
60
62
|
* @param {Sync.CreateBatchFromRowsRequest} request
|
|
61
63
|
* @param {Batch.RequestOptions} requestOptions - Request-specific configuration.
|
|
62
64
|
*
|
|
63
65
|
* @throws {@link Sync.BadRequestError}
|
|
64
66
|
* @throws {@link Sync.UnauthorizedError}
|
|
67
|
+
* @throws {@link Sync.ForbiddenError}
|
|
65
68
|
* @throws {@link Sync.PaymentRequiredError}
|
|
66
69
|
* @throws {@link Sync.UnprocessableEntityError}
|
|
67
70
|
* @throws {@link Sync.TooManyRequestsError}
|
|
@@ -356,6 +359,7 @@ export declare class Batch {
|
|
|
356
359
|
* @param {Sync.ListBatchesRequest} request
|
|
357
360
|
* @param {Batch.RequestOptions} requestOptions - Request-specific configuration.
|
|
358
361
|
*
|
|
362
|
+
* @throws {@link Sync.BadRequestError}
|
|
359
363
|
* @throws {@link Sync.UnauthorizedError}
|
|
360
364
|
* @throws {@link Sync.InternalServerError}
|
|
361
365
|
*
|
|
@@ -59,14 +59,16 @@ class Batch {
|
|
|
59
59
|
this._options = _options;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* Create a batch processing job from a JSONL file. Requires
|
|
62
|
+
* Create a batch processing job from a JSONL file. Requires the Scale plan or above and approval for your organization. Access is disabled by default, including for new Scale subscriptions. Contact support@sync.so to request access. Without approval, creation and dry runs return 403 `batch_access_not_enabled`. Approved organizations on other plans get 402 `plan_feature_unavailable` with `requiredPlan`. Send the file in multipart field `input` (or the accepted `file` alias); it must be 5 MB or smaller and contain 20-500 records by default. A batch is queued and holds one slot of your plan's batch concurrency limit; more active batches than that returns 429 `concurrency_limit_reached`. Each line must contain `request_id`, endpoint exactly `/v2/generate`, and a generation `payload`. To send the records as a JSON array instead of a file, use "Create Batch from Rows", the `application/json` form of the same endpoint. Errors name a refused record by its 1-based line, counting non-empty lines: dialogue edit refusals return it as `lineNumber`, other record errors only in `message`.
|
|
63
63
|
*
|
|
64
64
|
* @param {File | fs.ReadStream | Blob} input
|
|
65
65
|
* @param {Sync.CreateBatchRequest} request
|
|
66
66
|
* @param {Batch.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
67
|
*
|
|
68
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
68
69
|
* @throws {@link Sync.BadRequestError}
|
|
69
70
|
* @throws {@link Sync.UnauthorizedError}
|
|
71
|
+
* @throws {@link Sync.ForbiddenError}
|
|
70
72
|
* @throws {@link Sync.PaymentRequiredError}
|
|
71
73
|
* @throws {@link Sync.TooManyRequestsError}
|
|
72
74
|
* @throws {@link Sync.InternalServerError}
|
|
@@ -100,7 +102,7 @@ class Batch {
|
|
|
100
102
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
101
103
|
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/batch"),
|
|
102
104
|
method: "POST",
|
|
103
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
105
|
+
headers: Object.assign(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())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
104
106
|
requestType: "file",
|
|
105
107
|
duplex: _maybeEncodedRequest.duplex,
|
|
106
108
|
body: _maybeEncodedRequest.body,
|
|
@@ -113,10 +115,14 @@ class Batch {
|
|
|
113
115
|
}
|
|
114
116
|
if (_response.error.reason === "status-code") {
|
|
115
117
|
switch (_response.error.statusCode) {
|
|
118
|
+
case 503:
|
|
119
|
+
throw new Sync.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
116
120
|
case 400:
|
|
117
121
|
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
118
122
|
case 401:
|
|
119
123
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
124
|
+
case 403:
|
|
125
|
+
throw new Sync.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
120
126
|
case 402:
|
|
121
127
|
throw new Sync.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
122
128
|
case 429:
|
|
@@ -149,13 +155,14 @@ class Batch {
|
|
|
149
155
|
});
|
|
150
156
|
}
|
|
151
157
|
/**
|
|
152
|
-
* The `application/json` form of `POST /v2/batch`, the same endpoint as "Create Batch": send the records in a `rows` array instead of a JSONL file. Each row is the same object as one JSONL line and is validated the same way: 20-500 rows by default
|
|
158
|
+
* The `application/json` form of `POST /v2/batch`, the same endpoint as "Create Batch": send the records in a `rows` array instead of a JSONL file. Each row is the same object as one JSONL line and is validated the same way: 20-500 rows by default, 5 MB or smaller when serialized as JSONL, unique `request_id` values, and endpoint exactly `/v2/generate`. Errors name a refused row by its line, where line N is `rows[N-1]`: dialogue edit refusals return it as `lineNumber`, other record errors only in `message`. Requires the Scale plan or above and approval for your organization. Access is disabled by default; contact support@sync.so to request access. Without approval, creation and dry runs return 403 `batch_access_not_enabled`. In early access, enabled per organization, a row's payload can carry `dialogueEdit` to render a completed preview from POST /v2/dialogue-edits: send one video input, the video the preview was made from, and no audio input. All dialogue edit rows in a batch must come from the same source video. Each row is expanded at submit into the request POST /v2/generate builds for that preview and is charged the same. The expanded batch must also be 5 MB or smaller. A dialogue edit row that cannot be rendered refuses the whole batch with the `/v2/generate` errorCode (for example dialogue_edit_not_found, 422) and `lineNumber`. See [Batch Processing](/docs/api-reference/guides/batch-processing).
|
|
153
159
|
*
|
|
154
160
|
* @param {Sync.CreateBatchFromRowsRequest} request
|
|
155
161
|
* @param {Batch.RequestOptions} requestOptions - Request-specific configuration.
|
|
156
162
|
*
|
|
157
163
|
* @throws {@link Sync.BadRequestError}
|
|
158
164
|
* @throws {@link Sync.UnauthorizedError}
|
|
165
|
+
* @throws {@link Sync.ForbiddenError}
|
|
159
166
|
* @throws {@link Sync.PaymentRequiredError}
|
|
160
167
|
* @throws {@link Sync.UnprocessableEntityError}
|
|
161
168
|
* @throws {@link Sync.TooManyRequestsError}
|
|
@@ -436,7 +443,7 @@ class Batch {
|
|
|
436
443
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
437
444
|
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/batch"),
|
|
438
445
|
method: "POST",
|
|
439
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
446
|
+
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),
|
|
440
447
|
contentType: "application/json",
|
|
441
448
|
requestType: "json",
|
|
442
449
|
body: request,
|
|
@@ -453,6 +460,8 @@ class Batch {
|
|
|
453
460
|
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
454
461
|
case 401:
|
|
455
462
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
463
|
+
case 403:
|
|
464
|
+
throw new Sync.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
456
465
|
case 402:
|
|
457
466
|
throw new Sync.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
458
467
|
case 422:
|
|
@@ -508,7 +517,7 @@ class Batch {
|
|
|
508
517
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
509
518
|
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/batch/${encodeURIComponent(id)}`),
|
|
510
519
|
method: "GET",
|
|
511
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
520
|
+
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),
|
|
512
521
|
contentType: "application/json",
|
|
513
522
|
requestType: "json",
|
|
514
523
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -557,6 +566,7 @@ class Batch {
|
|
|
557
566
|
* @param {Sync.ListBatchesRequest} request
|
|
558
567
|
* @param {Batch.RequestOptions} requestOptions - Request-specific configuration.
|
|
559
568
|
*
|
|
569
|
+
* @throws {@link Sync.BadRequestError}
|
|
560
570
|
* @throws {@link Sync.UnauthorizedError}
|
|
561
571
|
* @throws {@link Sync.InternalServerError}
|
|
562
572
|
*
|
|
@@ -583,7 +593,7 @@ class Batch {
|
|
|
583
593
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
584
594
|
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/batch"),
|
|
585
595
|
method: "GET",
|
|
586
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
596
|
+
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),
|
|
587
597
|
contentType: "application/json",
|
|
588
598
|
queryParameters: _queryParams,
|
|
589
599
|
requestType: "json",
|
|
@@ -596,6 +606,8 @@ class Batch {
|
|
|
596
606
|
}
|
|
597
607
|
if (_response.error.reason === "status-code") {
|
|
598
608
|
switch (_response.error.statusCode) {
|
|
609
|
+
case 400:
|
|
610
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
599
611
|
case 401:
|
|
600
612
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
601
613
|
case 500:
|
|
@@ -270,10 +270,10 @@ import * as Sync from "../../../../index";
|
|
|
270
270
|
* }
|
|
271
271
|
*/
|
|
272
272
|
export interface CreateBatchFromRowsRequest {
|
|
273
|
-
/** The batch records
|
|
273
|
+
/** The batch records, 20-500 by default. Each row contains `request_id`, endpoint exactly `/v2/generate`, and a generation `payload`, as on a JSONL line. */
|
|
274
274
|
rows: Sync.BatchRow[];
|
|
275
|
-
/** Optional webhook URL to receive batch completion notifications. A POST request will be sent when the batch completes or fails, with a Sync-Signature header (`t=<unix>,v1=<hmac_sha256>`) signed with the organization webhook secret and a stable Sync-Delivery-Id header. Delivery is attempted up to six times over about two hours. */
|
|
275
|
+
/** Optional webhook URL to receive batch completion notifications. A POST request will be sent when the batch completes or fails, with a Sync-Signature header (`t=<unix>,v1=<hmac_sha256>`) signed with the organization webhook secret and a stable Sync-Delivery-Id header. Delivery is attempted up to six times over about two hours. A non-empty URL must use http:// or https://; invalid URLs return 400 before creating a batch. */
|
|
276
276
|
webhook_url?: string;
|
|
277
|
-
/** When true, validates the rows, including dialogue edit expansion, and returns `{ "status": "VALIDATED" }` without creating a batch. */
|
|
277
|
+
/** When true, validates the rows, including dialogue edit expansion, and returns `{ "status": "VALIDATED" }` without creating a batch. Requires the same organization approval and plan as batch creation. */
|
|
278
278
|
dry_run?: boolean;
|
|
279
279
|
}
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
16
|
export interface CreateBatchRequest {
|
|
17
|
-
/** Optional webhook URL to receive batch completion notifications. A POST request will be sent when the batch completes or fails, with a Sync-Signature header (`t=<unix>,v1=<hmac_sha256>`) signed with the organization webhook secret and a stable Sync-Delivery-Id header. Delivery is attempted up to six times over about two hours. */
|
|
17
|
+
/** Optional webhook URL to receive batch completion notifications. A POST request will be sent when the batch completes or fails, with a Sync-Signature header (`t=<unix>,v1=<hmac_sha256>`) signed with the organization webhook secret and a stable Sync-Delivery-Id header. Delivery is attempted up to six times over about two hours. A non-empty URL must use http:// or https://; invalid URLs return 400 before creating a batch. */
|
|
18
18
|
webhook_url?: string;
|
|
19
|
-
/** When true, validates the JSONL file and returns `{ "status": "VALIDATED" }` without creating a batch. */
|
|
19
|
+
/** When true, validates the JSONL file and returns `{ "status": "VALIDATED" }` without creating a batch. Requires the same organization approval and plan as batch creation. */
|
|
20
20
|
dry_run?: boolean;
|
|
21
21
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as errors from "../../../../errors/index";
|
|
5
|
+
import * as Sync from "../../../index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
export declare class AudioTrimTooManyRequestsError extends errors.SyncError {
|
|
8
|
+
constructor(body: Sync.GenerationError, rawResponse?: core.RawResponse);
|
|
9
|
+
}
|