@sync.so/sdk 0.2.6 → 0.4.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 +34 -1
- package/Client.js +59 -4
- package/api/resources/account/client/Client.d.ts +45 -0
- package/api/resources/account/client/Client.js +130 -0
- package/api/resources/account/client/index.d.ts +1 -0
- package/api/resources/account/client/index.js +2 -0
- package/api/resources/account/index.d.ts +2 -0
- package/api/resources/account/index.js +18 -0
- package/api/resources/account/types/AccountActiveJobs.d.ts +9 -0
- package/api/resources/account/types/AccountActiveJobs.js +5 -0
- package/api/resources/account/types/AccountAllowanceUsage.d.ts +11 -0
- package/api/resources/account/types/AccountAllowanceUsage.js +5 -0
- package/api/resources/account/types/AccountBillingModel.d.ts +10 -0
- package/api/resources/account/types/AccountBillingModel.js +12 -0
- package/api/resources/account/types/AccountBillingPeriod.d.ts +7 -0
- package/api/resources/account/types/AccountBillingPeriod.js +5 -0
- package/api/resources/account/types/AccountCredentialType.d.ts +9 -0
- package/api/resources/account/types/AccountCredentialType.js +11 -0
- package/api/resources/account/types/AccountCredits.d.ts +11 -0
- package/api/resources/account/types/AccountCredits.js +5 -0
- package/api/resources/account/types/AccountFreeAllowance.d.ts +12 -0
- package/api/resources/account/types/AccountFreeAllowance.js +5 -0
- package/api/resources/account/types/AccountLimits.d.ts +13 -0
- package/api/resources/account/types/AccountLimits.js +5 -0
- package/api/resources/account/types/AccountOrganization.d.ts +9 -0
- package/api/resources/account/types/AccountOrganization.js +5 -0
- package/api/resources/account/types/AccountOverview.d.ts +31 -0
- package/api/resources/account/types/AccountOverview.js +5 -0
- package/api/resources/account/types/AccountPlan.d.ts +9 -0
- package/api/resources/account/types/AccountPlan.js +5 -0
- package/api/resources/account/types/AccountUser.d.ts +8 -0
- package/api/resources/account/types/AccountUser.js +5 -0
- package/api/resources/account/types/index.d.ts +12 -0
- package/api/resources/account/types/index.js +28 -0
- package/api/resources/assets/client/Client.d.ts +143 -0
- package/api/resources/assets/client/Client.js +515 -0
- package/api/resources/assets/client/index.d.ts +1 -0
- package/api/resources/assets/client/index.js +17 -0
- package/api/resources/assets/client/requests/ListAssetsRequest.d.ts +37 -0
- package/api/resources/assets/client/requests/ListAssetsRequest.js +5 -0
- package/api/resources/assets/client/requests/index.d.ts +1 -0
- package/api/resources/assets/client/requests/index.js +2 -0
- package/api/resources/assets/index.d.ts +1 -0
- package/api/resources/assets/index.js +17 -0
- package/api/resources/batch/client/Client.d.ts +283 -2
- package/api/resources/batch/client/Client.js +342 -4
- package/api/resources/batch/client/requests/CreateBatchFromRowsRequest.d.ts +279 -0
- package/api/resources/batch/client/requests/CreateBatchFromRowsRequest.js +5 -0
- package/api/resources/batch/client/requests/CreateBatchRequest.d.ts +2 -2
- package/api/resources/batch/client/requests/index.d.ts +1 -0
- package/api/resources/common/errors/ConflictError.d.ts +9 -0
- package/api/resources/common/errors/ConflictError.js +52 -0
- package/api/resources/common/errors/ForbiddenError.d.ts +9 -0
- package/api/resources/common/errors/ForbiddenError.js +52 -0
- package/api/resources/common/errors/GatewayTimeoutError.d.ts +9 -0
- package/api/resources/common/errors/GatewayTimeoutError.js +52 -0
- package/api/resources/common/errors/GenerationDeletedError.d.ts +9 -0
- package/api/resources/common/errors/GenerationDeletedError.js +52 -0
- package/api/resources/common/errors/GenerationTooManyRequestsError.d.ts +9 -0
- package/api/resources/common/errors/GenerationTooManyRequestsError.js +52 -0
- package/api/resources/common/errors/PayloadTooLargeError.d.ts +9 -0
- package/api/resources/common/errors/PayloadTooLargeError.js +52 -0
- package/api/resources/common/errors/ServiceUnavailableError.d.ts +9 -0
- package/api/resources/common/errors/ServiceUnavailableError.js +52 -0
- package/api/resources/common/errors/TooManyRequestsError.d.ts +1 -1
- package/api/resources/common/errors/UnprocessableEntityError.d.ts +9 -0
- package/api/resources/common/errors/UnprocessableEntityError.js +52 -0
- package/api/resources/common/errors/VoiceCloneTooManyRequestsError.d.ts +9 -0
- package/api/resources/common/errors/VoiceCloneTooManyRequestsError.js +52 -0
- package/api/resources/common/errors/index.d.ts +9 -0
- package/api/resources/common/errors/index.js +9 -0
- package/api/resources/common/types/ActiveSpeaker.d.ts +12 -0
- package/api/resources/common/types/Asset.d.ts +40 -0
- package/api/resources/common/types/Asset.js +5 -0
- package/api/resources/common/types/AssetId.d.ts +7 -0
- package/api/resources/common/types/AssetId.js +5 -0
- package/api/resources/common/types/AssetInputType.d.ts +22 -0
- package/api/resources/common/types/AssetInputType.js +21 -0
- package/api/resources/common/types/AssetSort.d.ts +19 -0
- package/api/resources/common/types/AssetSort.js +18 -0
- package/api/resources/common/types/AssetType.d.ts +12 -0
- package/api/resources/common/types/AssetType.js +11 -0
- package/api/resources/common/types/AssetUploadResponse.d.ts +14 -0
- package/api/resources/common/types/AssetUploadResponse.js +5 -0
- package/api/resources/common/types/AssetVisibility.d.ts +17 -0
- package/api/resources/common/types/AssetVisibility.js +10 -0
- package/api/resources/common/types/AttachProjectAssetRequest.d.ts +11 -0
- package/api/resources/common/types/AttachProjectAssetRequest.js +5 -0
- package/api/resources/common/types/Audio.d.ts +5 -2
- package/api/resources/common/types/BatchConcurrencyError.d.ts +23 -0
- package/api/resources/common/types/BatchConcurrencyError.js +5 -0
- package/api/resources/common/types/BatchResponse.d.ts +2 -2
- package/api/resources/common/types/BatchRow.d.ts +15 -0
- package/api/resources/common/types/BatchRow.js +5 -0
- package/api/resources/common/types/BlendingMode.d.ts +9 -0
- package/api/resources/common/types/BlendingMode.js +11 -0
- package/api/resources/common/types/ClonedVoiceResponse.d.ts +14 -0
- package/api/resources/common/types/ClonedVoiceResponse.js +5 -0
- package/api/resources/common/types/CreateAssetRequest.d.ts +33 -0
- package/api/resources/common/types/CreateAssetRequest.js +5 -0
- package/api/resources/common/types/CreateAssetUploadRequest.d.ts +14 -0
- package/api/resources/common/types/CreateAssetUploadRequest.js +5 -0
- package/api/resources/common/types/CreateDialogueEditDto.d.ts +27 -0
- package/api/resources/common/types/CreateDialogueEditDto.js +5 -0
- package/api/resources/common/types/CreateGenerationDto.d.ts +11 -3
- package/api/resources/common/types/CreateProjectRequest.d.ts +21 -0
- package/api/resources/common/types/CreateProjectRequest.js +5 -0
- package/api/resources/common/types/CreateTranscriptionDto.d.ts +21 -0
- package/api/resources/common/types/CreateTranscriptionDto.js +5 -0
- package/api/resources/common/types/CreateTtsRequest.d.ts +19 -0
- package/api/resources/common/types/CreateTtsRequest.js +5 -0
- package/api/resources/common/types/CreateVoiceRequest.d.ts +19 -0
- package/api/resources/common/types/CreateVoiceRequest.js +5 -0
- package/api/resources/common/types/CreatorWorkflow.d.ts +37 -0
- package/api/resources/common/types/CreatorWorkflow.js +15 -0
- package/api/resources/common/types/DeleteAssetResponse.d.ts +11 -0
- package/api/resources/common/types/DeleteAssetResponse.js +5 -0
- package/api/resources/common/types/DeleteProjectResponse.d.ts +11 -0
- package/api/resources/common/types/DeleteProjectResponse.js +5 -0
- package/api/resources/common/types/DialogueEditChange.d.ts +14 -0
- package/api/resources/common/types/DialogueEditChange.js +5 -0
- package/api/resources/common/types/DialogueEditError.d.ts +15 -0
- package/api/resources/common/types/DialogueEditError.js +5 -0
- package/api/resources/common/types/DialogueEditErrorCode.d.ts +18 -0
- package/api/resources/common/types/DialogueEditErrorCode.js +17 -0
- package/api/resources/common/types/DialogueEditFailedSlot.d.ts +9 -0
- package/api/resources/common/types/DialogueEditFailedSlot.js +5 -0
- package/api/resources/common/types/DialogueEditJob.d.ts +49 -0
- package/api/resources/common/types/DialogueEditJob.js +5 -0
- package/api/resources/common/types/DialogueEditJobId.d.ts +7 -0
- package/api/resources/common/types/DialogueEditJobId.js +5 -0
- package/api/resources/common/types/DialogueEditJobStatus.d.ts +14 -0
- package/api/resources/common/types/DialogueEditJobStatus.js +13 -0
- package/api/resources/common/types/DialogueEditOperation.d.ts +16 -0
- package/api/resources/common/types/DialogueEditOperation.js +5 -0
- package/api/resources/common/types/DialogueEditPartialDetail.d.ts +17 -0
- package/api/resources/common/types/DialogueEditPartialDetail.js +5 -0
- package/api/resources/common/types/DialogueEditReference.d.ts +11 -0
- package/api/resources/common/types/DialogueEditReference.js +5 -0
- package/api/resources/common/types/DialogueEditRemoval.d.ts +10 -0
- package/api/resources/common/types/DialogueEditRemoval.js +5 -0
- package/api/resources/common/types/DialogueEditResultSlot.d.ts +19 -0
- package/api/resources/common/types/DialogueEditResultSlot.js +5 -0
- package/api/resources/common/types/DialogueEditResultSlotKind.d.ts +12 -0
- package/api/resources/common/types/DialogueEditResultSlotKind.js +11 -0
- package/api/resources/common/types/DialogueEditRetimeFailureSection.d.ts +14 -0
- package/api/resources/common/types/DialogueEditRetimeFailureSection.js +5 -0
- package/api/resources/common/types/DubDto.d.ts +17 -0
- package/api/resources/common/types/DubDto.js +5 -0
- package/api/resources/common/types/DubLanguage.d.ts +105 -0
- package/api/resources/common/types/DubLanguage.js +101 -0
- package/api/resources/common/types/DubProviderName.d.ts +10 -0
- package/api/resources/common/types/DubProviderName.js +9 -0
- package/api/resources/common/types/DubSourceLanguage.d.ts +106 -0
- package/api/resources/common/types/DubSourceLanguage.js +102 -0
- package/api/resources/common/types/ElevenLabs.d.ts +5 -1
- package/api/resources/common/types/ErrorCatalogEntry.d.ts +14 -0
- package/api/resources/common/types/ErrorCatalogEntry.js +5 -0
- package/api/resources/common/types/EstimateBreakdown.d.ts +13 -0
- package/api/resources/common/types/EstimateBreakdown.js +5 -0
- package/api/resources/common/types/EstimateCostRequest.d.ts +16 -0
- package/api/resources/common/types/EstimateCostRequest.js +5 -0
- package/api/resources/common/types/EstimateDubbingBilling.d.ts +10 -0
- package/api/resources/common/types/EstimateDubbingBilling.js +12 -0
- package/api/resources/common/types/EstimateDubbingPart.d.ts +12 -0
- package/api/resources/common/types/EstimateDubbingPart.js +5 -0
- package/api/resources/common/types/EstimateDurationCheck.d.ts +22 -0
- package/api/resources/common/types/EstimateDurationCheck.js +5 -0
- package/api/resources/common/types/EstimateLipsyncPart.d.ts +9 -0
- package/api/resources/common/types/EstimateLipsyncPart.js +5 -0
- package/api/resources/common/types/EstimateWorkflow.d.ts +11 -0
- package/api/resources/common/types/EstimateWorkflow.js +10 -0
- package/api/resources/common/types/EstimatedGenerationCost.d.ts +7 -0
- package/api/resources/common/types/Generation.d.ts +12 -2
- package/api/resources/common/types/GenerationConcurrencyError.d.ts +21 -0
- package/api/resources/common/types/GenerationConcurrencyError.js +5 -0
- package/api/resources/common/types/GenerationError.d.ts +16 -0
- package/api/resources/common/types/GenerationEstimate.d.ts +39 -0
- package/api/resources/common/types/GenerationEstimate.js +5 -0
- package/api/resources/common/types/GenerationEstimateConfidence.d.ts +12 -0
- package/api/resources/common/types/GenerationEstimateConfidence.js +11 -0
- package/api/resources/common/types/GenerationEstimateResolutionSource.d.ts +12 -0
- package/api/resources/common/types/GenerationEstimateResolutionSource.js +11 -0
- package/api/resources/common/types/GenerationEstimateScope.d.ts +11 -0
- package/api/resources/common/types/GenerationEstimateScope.js +10 -0
- package/api/resources/common/types/GenerationEstimateSource.d.ts +15 -0
- package/api/resources/common/types/GenerationEstimateSource.js +14 -0
- package/api/resources/common/types/GenerationOptions.d.ts +22 -4
- package/api/resources/common/types/GenerationSegment.d.ts +14 -6
- package/api/resources/common/types/Image.d.ts +16 -0
- package/api/resources/common/types/Image.js +5 -0
- package/api/resources/common/types/Input.d.ts +1 -1
- package/api/resources/common/types/Model.d.ts +2 -1
- package/api/resources/common/types/Model.js +1 -0
- package/api/resources/common/types/ModelInfo.d.ts +22 -0
- package/api/resources/common/types/ModelInfo.js +5 -0
- package/api/resources/common/types/OutputAudio.d.ts +10 -0
- package/api/resources/common/types/OutputAudio.js +5 -0
- package/api/resources/common/types/OutputFormat.d.ts +8 -0
- package/api/resources/common/types/OutputFormat.js +10 -0
- package/api/resources/common/types/PaginatedAssetsResponse.d.ts +15 -0
- package/api/resources/common/types/PaginatedAssetsResponse.js +5 -0
- package/api/resources/common/types/PaginatedProjectsResponse.d.ts +13 -0
- package/api/resources/common/types/PaginatedProjectsResponse.js +5 -0
- package/api/resources/common/types/Project.d.ts +24 -0
- package/api/resources/common/types/Project.js +5 -0
- package/api/resources/common/types/ProjectGeneration.d.ts +41 -0
- package/api/resources/common/types/ProjectGeneration.js +5 -0
- package/api/resources/common/types/ProjectGenerationError.d.ts +9 -0
- package/api/resources/common/types/ProjectGenerationError.js +5 -0
- package/api/resources/common/types/ProjectGenerationInput.d.ts +18 -0
- package/api/resources/common/types/ProjectGenerationInput.js +5 -0
- package/api/resources/common/types/ProjectGenerationModel.d.ts +12 -0
- package/api/resources/common/types/ProjectGenerationModel.js +5 -0
- package/api/resources/common/types/ProjectGenerationProvider.d.ts +10 -0
- package/api/resources/common/types/ProjectGenerationProvider.js +5 -0
- package/api/resources/common/types/ProjectGenerationSegment.d.ts +14 -0
- package/api/resources/common/types/ProjectGenerationSegment.js +5 -0
- package/api/resources/common/types/ProjectId.d.ts +7 -0
- package/api/resources/common/types/ProjectId.js +5 -0
- package/api/resources/common/types/ProjectListItem.d.ts +28 -0
- package/api/resources/common/types/ProjectListItem.js +5 -0
- package/api/resources/common/types/ProjectMode.d.ts +11 -0
- package/api/resources/common/types/ProjectMode.js +10 -0
- package/api/resources/common/types/ProjectSort.d.ts +11 -0
- package/api/resources/common/types/ProjectSort.js +10 -0
- package/api/resources/common/types/ProjectVisibility.d.ts +17 -0
- package/api/resources/common/types/ProjectVisibility.js +10 -0
- package/api/resources/common/types/SegmentAudioInput.d.ts +2 -2
- package/api/resources/common/types/SegmentOptionsOverride.d.ts +17 -0
- package/api/resources/common/types/SegmentOptionsOverride.js +5 -0
- package/api/resources/common/types/SyncMode.d.ts +1 -1
- package/api/resources/common/types/Transcript.d.ts +13 -0
- package/api/resources/common/types/Transcript.js +5 -0
- package/api/resources/common/types/TranscriptSegment.d.ts +13 -0
- package/api/resources/common/types/TranscriptSegment.js +5 -0
- package/api/resources/common/types/TranscriptWord.d.ts +16 -0
- package/api/resources/common/types/TranscriptWord.js +5 -0
- package/api/resources/common/types/TranscriptionDifficulty.d.ts +13 -0
- package/api/resources/common/types/TranscriptionDifficulty.js +5 -0
- package/api/resources/common/types/TranscriptionDifficultyReason.d.ts +17 -0
- package/api/resources/common/types/TranscriptionDifficultyReason.js +16 -0
- package/api/resources/common/types/TranscriptionDifficultyTier.d.ts +12 -0
- package/api/resources/common/types/TranscriptionDifficultyTier.js +11 -0
- package/api/resources/common/types/TranscriptionError.d.ts +13 -0
- package/api/resources/common/types/TranscriptionError.js +5 -0
- package/api/resources/common/types/TranscriptionErrorCode.d.ts +16 -0
- package/api/resources/common/types/TranscriptionErrorCode.js +15 -0
- package/api/resources/common/types/TranscriptionJob.d.ts +35 -0
- package/api/resources/common/types/TranscriptionJob.js +5 -0
- package/api/resources/common/types/TranscriptionJobId.d.ts +7 -0
- package/api/resources/common/types/TranscriptionJobId.js +5 -0
- package/api/resources/common/types/TranscriptionJobStatus.d.ts +13 -0
- package/api/resources/common/types/TranscriptionJobStatus.js +12 -0
- package/api/resources/common/types/TtsGenerationResponse.d.ts +14 -0
- package/api/resources/common/types/TtsGenerationResponse.js +5 -0
- package/api/resources/common/types/TtsJob.d.ts +25 -0
- package/api/resources/common/types/TtsJob.js +5 -0
- package/api/resources/common/types/TtsJobError.d.ts +13 -0
- package/api/resources/common/types/TtsJobError.js +5 -0
- package/api/resources/common/types/TtsJobErrorCode.d.ts +16 -0
- package/api/resources/common/types/TtsJobErrorCode.js +15 -0
- package/api/resources/common/types/TtsJobStatus.d.ts +13 -0
- package/api/resources/common/types/TtsJobStatus.js +12 -0
- package/api/resources/common/types/UpdateAssetRequest.d.ts +23 -0
- package/api/resources/common/types/UpdateAssetRequest.js +5 -0
- package/api/resources/common/types/UpdateProjectRequest.d.ts +17 -0
- package/api/resources/common/types/UpdateProjectRequest.js +5 -0
- package/api/resources/common/types/Video.d.ts +9 -2
- package/api/resources/common/types/Voice.d.ts +23 -0
- package/api/resources/common/types/Voice.js +5 -0
- package/api/resources/common/types/VoiceCloneRateLimitError.d.ts +16 -0
- package/api/resources/common/types/VoiceCloneRateLimitError.js +5 -0
- package/api/resources/common/types/VoiceProvider.d.ts +10 -0
- package/api/resources/common/types/VoiceProvider.js +9 -0
- package/api/resources/common/types/VoiceRestriction.d.ts +11 -0
- package/api/resources/common/types/VoiceRestriction.js +10 -0
- package/api/resources/common/types/index.d.ts +95 -0
- package/api/resources/common/types/index.js +95 -0
- package/api/resources/dialogueEdits/client/Client.d.ts +95 -0
- package/api/resources/dialogueEdits/client/Client.js +241 -0
- package/api/resources/dialogueEdits/client/index.d.ts +1 -0
- package/api/resources/dialogueEdits/client/index.js +2 -0
- package/api/resources/dialogueEdits/index.d.ts +1 -0
- package/api/resources/dialogueEdits/index.js +17 -0
- package/api/resources/errors/client/Client.d.ts +44 -0
- package/api/resources/errors/client/Client.js +127 -0
- package/api/resources/errors/client/index.d.ts +1 -0
- package/api/resources/errors/client/index.js +2 -0
- package/api/resources/errors/index.d.ts +1 -0
- package/api/resources/errors/index.js +17 -0
- package/api/resources/feedback/client/Client.d.ts +55 -0
- package/api/resources/feedback/client/Client.js +145 -0
- package/api/resources/feedback/client/index.d.ts +1 -0
- package/api/resources/feedback/client/index.js +17 -0
- package/api/resources/feedback/client/requests/SubmitFeedbackRequest.d.ts +37 -0
- package/api/resources/feedback/client/requests/SubmitFeedbackRequest.js +5 -0
- package/api/resources/feedback/client/requests/index.d.ts +1 -0
- package/api/resources/feedback/client/requests/index.js +2 -0
- package/api/resources/feedback/errors/FeedbackTooManyRequestsError.d.ts +9 -0
- package/api/resources/feedback/errors/FeedbackTooManyRequestsError.js +52 -0
- package/api/resources/feedback/errors/index.d.ts +1 -0
- package/api/resources/feedback/errors/index.js +17 -0
- package/api/resources/feedback/index.d.ts +3 -0
- package/api/resources/feedback/index.js +19 -0
- package/api/resources/feedback/types/FeedbackClient.d.ts +9 -0
- package/api/resources/feedback/types/FeedbackClient.js +5 -0
- package/api/resources/feedback/types/FeedbackKind.d.ts +12 -0
- package/api/resources/feedback/types/FeedbackKind.js +14 -0
- package/api/resources/feedback/types/FeedbackRateLimitError.d.ts +16 -0
- package/api/resources/feedback/types/FeedbackRateLimitError.js +5 -0
- package/api/resources/feedback/types/FeedbackReceipt.d.ts +9 -0
- package/api/resources/feedback/types/FeedbackReceipt.js +5 -0
- package/api/resources/feedback/types/FeedbackSeverity.d.ts +9 -0
- package/api/resources/feedback/types/FeedbackSeverity.js +11 -0
- package/api/resources/feedback/types/FeedbackSource.d.ts +8 -0
- package/api/resources/feedback/types/FeedbackSource.js +10 -0
- package/api/resources/feedback/types/index.d.ts +6 -0
- package/api/resources/feedback/types/index.js +22 -0
- package/api/resources/generations/client/Client.d.ts +149 -19
- package/api/resources/generations/client/Client.js +370 -31
- package/api/resources/generations/client/requests/CreateGenerationJsonRequest.d.ts +51 -0
- package/api/resources/generations/client/requests/CreateGenerationJsonRequest.js +5 -0
- package/api/resources/generations/client/requests/CreateGenerationRequest.d.ts +13 -1
- package/api/resources/generations/client/requests/GetGenerationDownloadRequest.d.ts +17 -0
- package/api/resources/generations/client/requests/GetGenerationDownloadRequest.js +5 -0
- package/api/resources/generations/client/requests/GetGenerationRequest.d.ts +21 -0
- package/api/resources/generations/client/requests/GetGenerationRequest.js +5 -0
- package/api/resources/generations/client/requests/ListGenerationsRequest.d.ts +22 -2
- package/api/resources/generations/client/requests/index.d.ts +3 -0
- package/api/resources/index.d.ts +21 -0
- package/api/resources/index.js +22 -1
- package/api/resources/models/client/Client.d.ts +45 -0
- package/api/resources/models/client/Client.js +130 -0
- package/api/resources/models/client/index.d.ts +1 -0
- package/api/resources/models/client/index.js +2 -0
- package/api/resources/models/index.d.ts +1 -0
- package/api/resources/models/index.js +17 -0
- package/api/resources/organizations/client/Client.d.ts +46 -0
- package/api/resources/organizations/client/Client.js +137 -0
- package/api/resources/organizations/client/index.d.ts +1 -0
- package/api/resources/organizations/client/index.js +17 -0
- package/api/resources/organizations/client/requests/GetWebhookSecretRequest.d.ts +13 -0
- package/api/resources/organizations/client/requests/GetWebhookSecretRequest.js +5 -0
- package/api/resources/organizations/client/requests/index.d.ts +1 -0
- package/api/resources/organizations/client/requests/index.js +2 -0
- package/api/resources/organizations/index.d.ts +2 -0
- package/api/resources/organizations/index.js +18 -0
- package/api/resources/organizations/types/WebhookSecretResponse.d.ts +10 -0
- package/api/resources/organizations/types/WebhookSecretResponse.js +5 -0
- package/api/resources/organizations/types/index.d.ts +1 -0
- package/api/resources/organizations/types/index.js +17 -0
- package/api/resources/projects/client/Client.d.ts +159 -0
- package/api/resources/projects/client/Client.js +582 -0
- package/api/resources/projects/client/index.d.ts +1 -0
- package/api/resources/projects/client/index.js +17 -0
- package/api/resources/projects/client/requests/ListProjectsRequest.d.ts +29 -0
- package/api/resources/projects/client/requests/ListProjectsRequest.js +5 -0
- package/api/resources/projects/client/requests/index.d.ts +1 -0
- package/api/resources/projects/client/requests/index.js +2 -0
- package/api/resources/projects/index.d.ts +1 -0
- package/api/resources/projects/index.js +17 -0
- package/api/resources/transcriptions/client/Client.d.ts +67 -0
- package/api/resources/transcriptions/client/Client.js +209 -0
- package/api/resources/transcriptions/client/index.d.ts +1 -0
- package/api/resources/transcriptions/client/index.js +2 -0
- package/api/resources/transcriptions/index.d.ts +1 -0
- package/api/resources/transcriptions/index.js +17 -0
- package/api/resources/tts/client/Client.d.ts +93 -0
- package/api/resources/tts/client/Client.js +306 -0
- package/api/resources/tts/client/index.d.ts +1 -0
- package/api/resources/tts/client/index.js +17 -0
- package/api/resources/tts/client/requests/SubmitTtsJobRequest.d.ts +18 -0
- package/api/resources/tts/client/requests/SubmitTtsJobRequest.js +5 -0
- package/api/resources/tts/client/requests/index.d.ts +1 -0
- package/api/resources/tts/client/requests/index.js +2 -0
- package/api/resources/tts/index.d.ts +1 -0
- package/api/resources/tts/index.js +17 -0
- package/api/resources/voices/client/Client.d.ts +107 -0
- package/api/resources/voices/client/Client.js +369 -0
- package/api/resources/voices/client/index.d.ts +1 -0
- package/api/resources/voices/client/index.js +17 -0
- package/api/resources/voices/client/requests/GetVoiceRequest.d.ts +14 -0
- package/api/resources/voices/client/requests/GetVoiceRequest.js +5 -0
- package/api/resources/voices/client/requests/ListVoicesRequest.d.ts +14 -0
- package/api/resources/voices/client/requests/ListVoicesRequest.js +5 -0
- package/api/resources/voices/client/requests/index.d.ts +2 -0
- package/api/resources/voices/client/requests/index.js +2 -0
- package/api/resources/voices/index.d.ts +1 -0
- package/api/resources/voices/index.js +17 -0
- package/api/resources/webhooks/types/BatchNotification.d.ts +21 -0
- package/api/resources/webhooks/types/BatchNotification.js +5 -0
- package/api/resources/webhooks/types/BatchNotificationMetrics.d.ts +13 -0
- package/api/resources/webhooks/types/BatchNotificationMetrics.js +5 -0
- package/api/resources/webhooks/types/GenerationNotification.d.ts +14 -16
- package/api/resources/webhooks/types/WebhookStatus.d.ts +3 -2
- package/api/resources/webhooks/types/WebhookStatus.js +1 -0
- package/api/resources/webhooks/types/index.d.ts +2 -0
- package/api/resources/webhooks/types/index.js +2 -0
- package/core/index.d.ts +1 -1
- package/core/index.js +1 -1
- package/dist/Client.d.ts +34 -1
- package/dist/Client.js +59 -4
- package/dist/api/resources/account/client/Client.d.ts +45 -0
- package/dist/api/resources/account/client/Client.js +130 -0
- package/dist/api/resources/account/client/index.d.ts +1 -0
- package/dist/api/resources/account/client/index.js +2 -0
- package/dist/api/resources/account/index.d.ts +2 -0
- package/dist/api/resources/account/index.js +18 -0
- package/dist/api/resources/account/types/AccountActiveJobs.d.ts +9 -0
- package/dist/api/resources/account/types/AccountActiveJobs.js +5 -0
- package/dist/api/resources/account/types/AccountAllowanceUsage.d.ts +11 -0
- package/dist/api/resources/account/types/AccountAllowanceUsage.js +5 -0
- package/dist/api/resources/account/types/AccountBillingModel.d.ts +10 -0
- package/dist/api/resources/account/types/AccountBillingModel.js +12 -0
- package/dist/api/resources/account/types/AccountBillingPeriod.d.ts +7 -0
- package/dist/api/resources/account/types/AccountBillingPeriod.js +5 -0
- package/dist/api/resources/account/types/AccountCredentialType.d.ts +9 -0
- package/dist/api/resources/account/types/AccountCredentialType.js +11 -0
- package/dist/api/resources/account/types/AccountCredits.d.ts +11 -0
- package/dist/api/resources/account/types/AccountCredits.js +5 -0
- package/dist/api/resources/account/types/AccountFreeAllowance.d.ts +12 -0
- package/dist/api/resources/account/types/AccountFreeAllowance.js +5 -0
- package/dist/api/resources/account/types/AccountLimits.d.ts +13 -0
- package/dist/api/resources/account/types/AccountLimits.js +5 -0
- package/dist/api/resources/account/types/AccountOrganization.d.ts +9 -0
- package/dist/api/resources/account/types/AccountOrganization.js +5 -0
- package/dist/api/resources/account/types/AccountOverview.d.ts +31 -0
- package/dist/api/resources/account/types/AccountOverview.js +5 -0
- package/dist/api/resources/account/types/AccountPlan.d.ts +9 -0
- package/dist/api/resources/account/types/AccountPlan.js +5 -0
- package/dist/api/resources/account/types/AccountUser.d.ts +8 -0
- package/dist/api/resources/account/types/AccountUser.js +5 -0
- package/dist/api/resources/account/types/index.d.ts +12 -0
- package/dist/api/resources/account/types/index.js +28 -0
- package/dist/api/resources/assets/client/Client.d.ts +143 -0
- package/dist/api/resources/assets/client/Client.js +515 -0
- package/dist/api/resources/assets/client/index.d.ts +1 -0
- package/dist/api/resources/assets/client/index.js +17 -0
- package/dist/api/resources/assets/client/requests/ListAssetsRequest.d.ts +37 -0
- package/dist/api/resources/assets/client/requests/ListAssetsRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/index.d.ts +1 -0
- package/dist/api/resources/assets/client/requests/index.js +2 -0
- package/dist/api/resources/assets/index.d.ts +1 -0
- package/dist/api/resources/assets/index.js +17 -0
- package/dist/api/resources/batch/client/Client.d.ts +283 -2
- package/dist/api/resources/batch/client/Client.js +342 -4
- package/dist/api/resources/batch/client/requests/CreateBatchFromRowsRequest.d.ts +279 -0
- package/dist/api/resources/batch/client/requests/CreateBatchFromRowsRequest.js +5 -0
- package/dist/api/resources/batch/client/requests/CreateBatchRequest.d.ts +2 -2
- package/dist/api/resources/batch/client/requests/index.d.ts +1 -0
- package/dist/api/resources/common/errors/ConflictError.d.ts +9 -0
- package/dist/api/resources/common/errors/ConflictError.js +52 -0
- package/dist/api/resources/common/errors/ForbiddenError.d.ts +9 -0
- package/dist/api/resources/common/errors/ForbiddenError.js +52 -0
- package/dist/api/resources/common/errors/GatewayTimeoutError.d.ts +9 -0
- package/dist/api/resources/common/errors/GatewayTimeoutError.js +52 -0
- package/dist/api/resources/common/errors/GenerationDeletedError.d.ts +9 -0
- package/dist/api/resources/common/errors/GenerationDeletedError.js +52 -0
- package/dist/api/resources/common/errors/GenerationTooManyRequestsError.d.ts +9 -0
- package/dist/api/resources/common/errors/GenerationTooManyRequestsError.js +52 -0
- package/dist/api/resources/common/errors/PayloadTooLargeError.d.ts +9 -0
- package/dist/api/resources/common/errors/PayloadTooLargeError.js +52 -0
- package/dist/api/resources/common/errors/ServiceUnavailableError.d.ts +9 -0
- package/dist/api/resources/common/errors/ServiceUnavailableError.js +52 -0
- package/dist/api/resources/common/errors/TooManyRequestsError.d.ts +1 -1
- package/dist/api/resources/common/errors/UnprocessableEntityError.d.ts +9 -0
- package/dist/api/resources/common/errors/UnprocessableEntityError.js +52 -0
- package/dist/api/resources/common/errors/VoiceCloneTooManyRequestsError.d.ts +9 -0
- package/dist/api/resources/common/errors/VoiceCloneTooManyRequestsError.js +52 -0
- package/dist/api/resources/common/errors/index.d.ts +9 -0
- package/dist/api/resources/common/errors/index.js +9 -0
- package/dist/api/resources/common/types/ActiveSpeaker.d.ts +12 -0
- package/dist/api/resources/common/types/Asset.d.ts +40 -0
- package/dist/api/resources/common/types/Asset.js +5 -0
- package/dist/api/resources/common/types/AssetId.d.ts +7 -0
- package/dist/api/resources/common/types/AssetId.js +5 -0
- package/dist/api/resources/common/types/AssetInputType.d.ts +22 -0
- package/dist/api/resources/common/types/AssetInputType.js +21 -0
- package/dist/api/resources/common/types/AssetSort.d.ts +19 -0
- package/dist/api/resources/common/types/AssetSort.js +18 -0
- package/dist/api/resources/common/types/AssetType.d.ts +12 -0
- package/dist/api/resources/common/types/AssetType.js +11 -0
- package/dist/api/resources/common/types/AssetUploadResponse.d.ts +14 -0
- package/dist/api/resources/common/types/AssetUploadResponse.js +5 -0
- package/dist/api/resources/common/types/AssetVisibility.d.ts +17 -0
- package/dist/api/resources/common/types/AssetVisibility.js +10 -0
- package/dist/api/resources/common/types/AttachProjectAssetRequest.d.ts +11 -0
- package/dist/api/resources/common/types/AttachProjectAssetRequest.js +5 -0
- package/dist/api/resources/common/types/Audio.d.ts +5 -2
- package/dist/api/resources/common/types/BatchConcurrencyError.d.ts +23 -0
- package/dist/api/resources/common/types/BatchConcurrencyError.js +5 -0
- package/dist/api/resources/common/types/BatchResponse.d.ts +2 -2
- package/dist/api/resources/common/types/BatchRow.d.ts +15 -0
- package/dist/api/resources/common/types/BatchRow.js +5 -0
- package/dist/api/resources/common/types/BlendingMode.d.ts +9 -0
- package/dist/api/resources/common/types/BlendingMode.js +11 -0
- package/dist/api/resources/common/types/ClonedVoiceResponse.d.ts +14 -0
- package/dist/api/resources/common/types/ClonedVoiceResponse.js +5 -0
- package/dist/api/resources/common/types/CreateAssetRequest.d.ts +33 -0
- package/dist/api/resources/common/types/CreateAssetRequest.js +5 -0
- package/dist/api/resources/common/types/CreateAssetUploadRequest.d.ts +14 -0
- package/dist/api/resources/common/types/CreateAssetUploadRequest.js +5 -0
- package/dist/api/resources/common/types/CreateDialogueEditDto.d.ts +27 -0
- package/dist/api/resources/common/types/CreateDialogueEditDto.js +5 -0
- package/dist/api/resources/common/types/CreateGenerationDto.d.ts +11 -3
- package/dist/api/resources/common/types/CreateProjectRequest.d.ts +21 -0
- package/dist/api/resources/common/types/CreateProjectRequest.js +5 -0
- package/dist/api/resources/common/types/CreateTranscriptionDto.d.ts +21 -0
- package/dist/api/resources/common/types/CreateTranscriptionDto.js +5 -0
- package/dist/api/resources/common/types/CreateTtsRequest.d.ts +19 -0
- package/dist/api/resources/common/types/CreateTtsRequest.js +5 -0
- package/dist/api/resources/common/types/CreateVoiceRequest.d.ts +19 -0
- package/dist/api/resources/common/types/CreateVoiceRequest.js +5 -0
- package/dist/api/resources/common/types/CreatorWorkflow.d.ts +37 -0
- package/dist/api/resources/common/types/CreatorWorkflow.js +15 -0
- package/dist/api/resources/common/types/DeleteAssetResponse.d.ts +11 -0
- package/dist/api/resources/common/types/DeleteAssetResponse.js +5 -0
- package/dist/api/resources/common/types/DeleteProjectResponse.d.ts +11 -0
- package/dist/api/resources/common/types/DeleteProjectResponse.js +5 -0
- package/dist/api/resources/common/types/DialogueEditChange.d.ts +14 -0
- package/dist/api/resources/common/types/DialogueEditChange.js +5 -0
- package/dist/api/resources/common/types/DialogueEditError.d.ts +15 -0
- package/dist/api/resources/common/types/DialogueEditError.js +5 -0
- package/dist/api/resources/common/types/DialogueEditErrorCode.d.ts +18 -0
- package/dist/api/resources/common/types/DialogueEditErrorCode.js +17 -0
- package/dist/api/resources/common/types/DialogueEditFailedSlot.d.ts +9 -0
- package/dist/api/resources/common/types/DialogueEditFailedSlot.js +5 -0
- package/dist/api/resources/common/types/DialogueEditJob.d.ts +49 -0
- package/dist/api/resources/common/types/DialogueEditJob.js +5 -0
- package/dist/api/resources/common/types/DialogueEditJobId.d.ts +7 -0
- package/dist/api/resources/common/types/DialogueEditJobId.js +5 -0
- package/dist/api/resources/common/types/DialogueEditJobStatus.d.ts +14 -0
- package/dist/api/resources/common/types/DialogueEditJobStatus.js +13 -0
- package/dist/api/resources/common/types/DialogueEditOperation.d.ts +16 -0
- package/dist/api/resources/common/types/DialogueEditOperation.js +5 -0
- package/dist/api/resources/common/types/DialogueEditPartialDetail.d.ts +17 -0
- package/dist/api/resources/common/types/DialogueEditPartialDetail.js +5 -0
- package/dist/api/resources/common/types/DialogueEditReference.d.ts +11 -0
- package/dist/api/resources/common/types/DialogueEditReference.js +5 -0
- package/dist/api/resources/common/types/DialogueEditRemoval.d.ts +10 -0
- package/dist/api/resources/common/types/DialogueEditRemoval.js +5 -0
- package/dist/api/resources/common/types/DialogueEditResultSlot.d.ts +19 -0
- package/dist/api/resources/common/types/DialogueEditResultSlot.js +5 -0
- package/dist/api/resources/common/types/DialogueEditResultSlotKind.d.ts +12 -0
- package/dist/api/resources/common/types/DialogueEditResultSlotKind.js +11 -0
- package/dist/api/resources/common/types/DialogueEditRetimeFailureSection.d.ts +14 -0
- package/dist/api/resources/common/types/DialogueEditRetimeFailureSection.js +5 -0
- package/dist/api/resources/common/types/DubDto.d.ts +17 -0
- package/dist/api/resources/common/types/DubDto.js +5 -0
- package/dist/api/resources/common/types/DubLanguage.d.ts +105 -0
- package/dist/api/resources/common/types/DubLanguage.js +101 -0
- package/dist/api/resources/common/types/DubProviderName.d.ts +10 -0
- package/dist/api/resources/common/types/DubProviderName.js +9 -0
- package/dist/api/resources/common/types/DubSourceLanguage.d.ts +106 -0
- package/dist/api/resources/common/types/DubSourceLanguage.js +102 -0
- package/dist/api/resources/common/types/ElevenLabs.d.ts +5 -1
- package/dist/api/resources/common/types/ErrorCatalogEntry.d.ts +14 -0
- package/dist/api/resources/common/types/ErrorCatalogEntry.js +5 -0
- package/dist/api/resources/common/types/EstimateBreakdown.d.ts +13 -0
- package/dist/api/resources/common/types/EstimateBreakdown.js +5 -0
- package/dist/api/resources/common/types/EstimateCostRequest.d.ts +16 -0
- package/dist/api/resources/common/types/EstimateCostRequest.js +5 -0
- package/dist/api/resources/common/types/EstimateDubbingBilling.d.ts +10 -0
- package/dist/api/resources/common/types/EstimateDubbingBilling.js +12 -0
- package/dist/api/resources/common/types/EstimateDubbingPart.d.ts +12 -0
- package/dist/api/resources/common/types/EstimateDubbingPart.js +5 -0
- package/dist/api/resources/common/types/EstimateDurationCheck.d.ts +22 -0
- package/dist/api/resources/common/types/EstimateDurationCheck.js +5 -0
- package/dist/api/resources/common/types/EstimateLipsyncPart.d.ts +9 -0
- package/dist/api/resources/common/types/EstimateLipsyncPart.js +5 -0
- package/dist/api/resources/common/types/EstimateWorkflow.d.ts +11 -0
- package/dist/api/resources/common/types/EstimateWorkflow.js +10 -0
- package/dist/api/resources/common/types/EstimatedGenerationCost.d.ts +7 -0
- package/dist/api/resources/common/types/Generation.d.ts +12 -2
- package/dist/api/resources/common/types/GenerationConcurrencyError.d.ts +21 -0
- package/dist/api/resources/common/types/GenerationConcurrencyError.js +5 -0
- package/dist/api/resources/common/types/GenerationError.d.ts +16 -0
- package/dist/api/resources/common/types/GenerationEstimate.d.ts +39 -0
- package/dist/api/resources/common/types/GenerationEstimate.js +5 -0
- package/dist/api/resources/common/types/GenerationEstimateConfidence.d.ts +12 -0
- package/dist/api/resources/common/types/GenerationEstimateConfidence.js +11 -0
- package/dist/api/resources/common/types/GenerationEstimateResolutionSource.d.ts +12 -0
- package/dist/api/resources/common/types/GenerationEstimateResolutionSource.js +11 -0
- package/dist/api/resources/common/types/GenerationEstimateScope.d.ts +11 -0
- package/dist/api/resources/common/types/GenerationEstimateScope.js +10 -0
- package/dist/api/resources/common/types/GenerationEstimateSource.d.ts +15 -0
- package/dist/api/resources/common/types/GenerationEstimateSource.js +14 -0
- package/dist/api/resources/common/types/GenerationOptions.d.ts +22 -4
- package/dist/api/resources/common/types/GenerationSegment.d.ts +14 -6
- package/dist/api/resources/common/types/Image.d.ts +16 -0
- package/dist/api/resources/common/types/Image.js +5 -0
- package/dist/api/resources/common/types/Input.d.ts +1 -1
- package/dist/api/resources/common/types/Model.d.ts +2 -1
- package/dist/api/resources/common/types/Model.js +1 -0
- package/dist/api/resources/common/types/ModelInfo.d.ts +22 -0
- package/dist/api/resources/common/types/ModelInfo.js +5 -0
- package/dist/api/resources/common/types/OutputAudio.d.ts +10 -0
- package/dist/api/resources/common/types/OutputAudio.js +5 -0
- package/dist/api/resources/common/types/OutputFormat.d.ts +8 -0
- package/dist/api/resources/common/types/OutputFormat.js +10 -0
- package/dist/api/resources/common/types/PaginatedAssetsResponse.d.ts +15 -0
- package/dist/api/resources/common/types/PaginatedAssetsResponse.js +5 -0
- package/dist/api/resources/common/types/PaginatedProjectsResponse.d.ts +13 -0
- package/dist/api/resources/common/types/PaginatedProjectsResponse.js +5 -0
- package/dist/api/resources/common/types/Project.d.ts +24 -0
- package/dist/api/resources/common/types/Project.js +5 -0
- package/dist/api/resources/common/types/ProjectGeneration.d.ts +41 -0
- package/dist/api/resources/common/types/ProjectGeneration.js +5 -0
- package/dist/api/resources/common/types/ProjectGenerationError.d.ts +9 -0
- package/dist/api/resources/common/types/ProjectGenerationError.js +5 -0
- package/dist/api/resources/common/types/ProjectGenerationInput.d.ts +18 -0
- package/dist/api/resources/common/types/ProjectGenerationInput.js +5 -0
- package/dist/api/resources/common/types/ProjectGenerationModel.d.ts +12 -0
- package/dist/api/resources/common/types/ProjectGenerationModel.js +5 -0
- package/dist/api/resources/common/types/ProjectGenerationProvider.d.ts +10 -0
- package/dist/api/resources/common/types/ProjectGenerationProvider.js +5 -0
- package/dist/api/resources/common/types/ProjectGenerationSegment.d.ts +14 -0
- package/dist/api/resources/common/types/ProjectGenerationSegment.js +5 -0
- package/dist/api/resources/common/types/ProjectId.d.ts +7 -0
- package/dist/api/resources/common/types/ProjectId.js +5 -0
- package/dist/api/resources/common/types/ProjectListItem.d.ts +28 -0
- package/dist/api/resources/common/types/ProjectListItem.js +5 -0
- package/dist/api/resources/common/types/ProjectMode.d.ts +11 -0
- package/dist/api/resources/common/types/ProjectMode.js +10 -0
- package/dist/api/resources/common/types/ProjectSort.d.ts +11 -0
- package/dist/api/resources/common/types/ProjectSort.js +10 -0
- package/dist/api/resources/common/types/ProjectVisibility.d.ts +17 -0
- package/dist/api/resources/common/types/ProjectVisibility.js +10 -0
- package/dist/api/resources/common/types/SegmentAudioInput.d.ts +2 -2
- package/dist/api/resources/common/types/SegmentOptionsOverride.d.ts +17 -0
- package/dist/api/resources/common/types/SegmentOptionsOverride.js +5 -0
- package/dist/api/resources/common/types/SyncMode.d.ts +1 -1
- package/dist/api/resources/common/types/Transcript.d.ts +13 -0
- package/dist/api/resources/common/types/Transcript.js +5 -0
- package/dist/api/resources/common/types/TranscriptSegment.d.ts +13 -0
- package/dist/api/resources/common/types/TranscriptSegment.js +5 -0
- package/dist/api/resources/common/types/TranscriptWord.d.ts +16 -0
- package/dist/api/resources/common/types/TranscriptWord.js +5 -0
- package/dist/api/resources/common/types/TranscriptionDifficulty.d.ts +13 -0
- package/dist/api/resources/common/types/TranscriptionDifficulty.js +5 -0
- package/dist/api/resources/common/types/TranscriptionDifficultyReason.d.ts +17 -0
- package/dist/api/resources/common/types/TranscriptionDifficultyReason.js +16 -0
- package/dist/api/resources/common/types/TranscriptionDifficultyTier.d.ts +12 -0
- package/dist/api/resources/common/types/TranscriptionDifficultyTier.js +11 -0
- package/dist/api/resources/common/types/TranscriptionError.d.ts +13 -0
- package/dist/api/resources/common/types/TranscriptionError.js +5 -0
- package/dist/api/resources/common/types/TranscriptionErrorCode.d.ts +16 -0
- package/dist/api/resources/common/types/TranscriptionErrorCode.js +15 -0
- package/dist/api/resources/common/types/TranscriptionJob.d.ts +35 -0
- package/dist/api/resources/common/types/TranscriptionJob.js +5 -0
- package/dist/api/resources/common/types/TranscriptionJobId.d.ts +7 -0
- package/dist/api/resources/common/types/TranscriptionJobId.js +5 -0
- package/dist/api/resources/common/types/TranscriptionJobStatus.d.ts +13 -0
- package/dist/api/resources/common/types/TranscriptionJobStatus.js +12 -0
- package/dist/api/resources/common/types/TtsGenerationResponse.d.ts +14 -0
- package/dist/api/resources/common/types/TtsGenerationResponse.js +5 -0
- package/dist/api/resources/common/types/TtsJob.d.ts +25 -0
- package/dist/api/resources/common/types/TtsJob.js +5 -0
- package/dist/api/resources/common/types/TtsJobError.d.ts +13 -0
- package/dist/api/resources/common/types/TtsJobError.js +5 -0
- package/dist/api/resources/common/types/TtsJobErrorCode.d.ts +16 -0
- package/dist/api/resources/common/types/TtsJobErrorCode.js +15 -0
- package/dist/api/resources/common/types/TtsJobStatus.d.ts +13 -0
- package/dist/api/resources/common/types/TtsJobStatus.js +12 -0
- package/dist/api/resources/common/types/UpdateAssetRequest.d.ts +23 -0
- package/dist/api/resources/common/types/UpdateAssetRequest.js +5 -0
- package/dist/api/resources/common/types/UpdateProjectRequest.d.ts +17 -0
- package/dist/api/resources/common/types/UpdateProjectRequest.js +5 -0
- package/dist/api/resources/common/types/Video.d.ts +9 -2
- package/dist/api/resources/common/types/Voice.d.ts +23 -0
- package/dist/api/resources/common/types/Voice.js +5 -0
- package/dist/api/resources/common/types/VoiceCloneRateLimitError.d.ts +16 -0
- package/dist/api/resources/common/types/VoiceCloneRateLimitError.js +5 -0
- package/dist/api/resources/common/types/VoiceProvider.d.ts +10 -0
- package/dist/api/resources/common/types/VoiceProvider.js +9 -0
- package/dist/api/resources/common/types/VoiceRestriction.d.ts +11 -0
- package/dist/api/resources/common/types/VoiceRestriction.js +10 -0
- package/dist/api/resources/common/types/index.d.ts +95 -0
- package/dist/api/resources/common/types/index.js +95 -0
- package/dist/api/resources/dialogueEdits/client/Client.d.ts +95 -0
- package/dist/api/resources/dialogueEdits/client/Client.js +241 -0
- package/dist/api/resources/dialogueEdits/client/index.d.ts +1 -0
- package/dist/api/resources/dialogueEdits/client/index.js +2 -0
- package/dist/api/resources/dialogueEdits/index.d.ts +1 -0
- package/dist/api/resources/dialogueEdits/index.js +17 -0
- package/dist/api/resources/errors/client/Client.d.ts +44 -0
- package/dist/api/resources/errors/client/Client.js +127 -0
- package/dist/api/resources/errors/client/index.d.ts +1 -0
- package/dist/api/resources/errors/client/index.js +2 -0
- package/dist/api/resources/errors/index.d.ts +1 -0
- package/dist/api/resources/errors/index.js +17 -0
- package/dist/api/resources/feedback/client/Client.d.ts +55 -0
- package/dist/api/resources/feedback/client/Client.js +145 -0
- package/dist/api/resources/feedback/client/index.d.ts +1 -0
- package/dist/api/resources/feedback/client/index.js +17 -0
- package/dist/api/resources/feedback/client/requests/SubmitFeedbackRequest.d.ts +37 -0
- package/dist/api/resources/feedback/client/requests/SubmitFeedbackRequest.js +5 -0
- package/dist/api/resources/feedback/client/requests/index.d.ts +1 -0
- package/dist/api/resources/feedback/client/requests/index.js +2 -0
- package/dist/api/resources/feedback/errors/FeedbackTooManyRequestsError.d.ts +9 -0
- package/dist/api/resources/feedback/errors/FeedbackTooManyRequestsError.js +52 -0
- package/dist/api/resources/feedback/errors/index.d.ts +1 -0
- package/dist/api/resources/feedback/errors/index.js +17 -0
- package/dist/api/resources/feedback/index.d.ts +3 -0
- package/dist/api/resources/feedback/index.js +19 -0
- package/dist/api/resources/feedback/types/FeedbackClient.d.ts +9 -0
- package/dist/api/resources/feedback/types/FeedbackClient.js +5 -0
- package/dist/api/resources/feedback/types/FeedbackKind.d.ts +12 -0
- package/dist/api/resources/feedback/types/FeedbackKind.js +14 -0
- package/dist/api/resources/feedback/types/FeedbackRateLimitError.d.ts +16 -0
- package/dist/api/resources/feedback/types/FeedbackRateLimitError.js +5 -0
- package/dist/api/resources/feedback/types/FeedbackReceipt.d.ts +9 -0
- package/dist/api/resources/feedback/types/FeedbackReceipt.js +5 -0
- package/dist/api/resources/feedback/types/FeedbackSeverity.d.ts +9 -0
- package/dist/api/resources/feedback/types/FeedbackSeverity.js +11 -0
- package/dist/api/resources/feedback/types/FeedbackSource.d.ts +8 -0
- package/dist/api/resources/feedback/types/FeedbackSource.js +10 -0
- package/dist/api/resources/feedback/types/index.d.ts +6 -0
- package/dist/api/resources/feedback/types/index.js +22 -0
- package/dist/api/resources/generations/client/Client.d.ts +149 -19
- package/dist/api/resources/generations/client/Client.js +370 -31
- package/dist/api/resources/generations/client/requests/CreateGenerationJsonRequest.d.ts +51 -0
- package/dist/api/resources/generations/client/requests/CreateGenerationJsonRequest.js +5 -0
- package/dist/api/resources/generations/client/requests/CreateGenerationRequest.d.ts +13 -1
- package/dist/api/resources/generations/client/requests/GetGenerationDownloadRequest.d.ts +17 -0
- package/dist/api/resources/generations/client/requests/GetGenerationDownloadRequest.js +5 -0
- package/dist/api/resources/generations/client/requests/GetGenerationRequest.d.ts +21 -0
- package/dist/api/resources/generations/client/requests/GetGenerationRequest.js +5 -0
- package/dist/api/resources/generations/client/requests/ListGenerationsRequest.d.ts +22 -2
- package/dist/api/resources/generations/client/requests/index.d.ts +3 -0
- package/dist/api/resources/index.d.ts +21 -0
- package/dist/api/resources/index.js +22 -1
- package/dist/api/resources/models/client/Client.d.ts +45 -0
- package/dist/api/resources/models/client/Client.js +130 -0
- package/dist/api/resources/models/client/index.d.ts +1 -0
- package/dist/api/resources/models/client/index.js +2 -0
- package/dist/api/resources/models/index.d.ts +1 -0
- package/dist/api/resources/models/index.js +17 -0
- package/dist/api/resources/organizations/client/Client.d.ts +46 -0
- package/dist/api/resources/organizations/client/Client.js +137 -0
- package/dist/api/resources/organizations/client/index.d.ts +1 -0
- package/dist/api/resources/organizations/client/index.js +17 -0
- package/dist/api/resources/organizations/client/requests/GetWebhookSecretRequest.d.ts +13 -0
- package/dist/api/resources/organizations/client/requests/GetWebhookSecretRequest.js +5 -0
- package/dist/api/resources/organizations/client/requests/index.d.ts +1 -0
- package/dist/api/resources/organizations/client/requests/index.js +2 -0
- package/dist/api/resources/organizations/index.d.ts +2 -0
- package/dist/api/resources/organizations/index.js +18 -0
- package/dist/api/resources/organizations/types/WebhookSecretResponse.d.ts +10 -0
- package/dist/api/resources/organizations/types/WebhookSecretResponse.js +5 -0
- package/dist/api/resources/organizations/types/index.d.ts +1 -0
- package/dist/api/resources/organizations/types/index.js +17 -0
- package/dist/api/resources/projects/client/Client.d.ts +159 -0
- package/dist/api/resources/projects/client/Client.js +582 -0
- package/dist/api/resources/projects/client/index.d.ts +1 -0
- package/dist/api/resources/projects/client/index.js +17 -0
- package/dist/api/resources/projects/client/requests/ListProjectsRequest.d.ts +29 -0
- package/dist/api/resources/projects/client/requests/ListProjectsRequest.js +5 -0
- package/dist/api/resources/projects/client/requests/index.d.ts +1 -0
- package/dist/api/resources/projects/client/requests/index.js +2 -0
- package/dist/api/resources/projects/index.d.ts +1 -0
- package/dist/api/resources/projects/index.js +17 -0
- package/dist/api/resources/transcriptions/client/Client.d.ts +67 -0
- package/dist/api/resources/transcriptions/client/Client.js +209 -0
- package/dist/api/resources/transcriptions/client/index.d.ts +1 -0
- package/dist/api/resources/transcriptions/client/index.js +2 -0
- package/dist/api/resources/transcriptions/index.d.ts +1 -0
- package/dist/api/resources/transcriptions/index.js +17 -0
- package/dist/api/resources/tts/client/Client.d.ts +93 -0
- package/dist/api/resources/tts/client/Client.js +306 -0
- package/dist/api/resources/tts/client/index.d.ts +1 -0
- package/dist/api/resources/tts/client/index.js +17 -0
- package/dist/api/resources/tts/client/requests/SubmitTtsJobRequest.d.ts +18 -0
- package/dist/api/resources/tts/client/requests/SubmitTtsJobRequest.js +5 -0
- package/dist/api/resources/tts/client/requests/index.d.ts +1 -0
- package/dist/api/resources/tts/client/requests/index.js +2 -0
- package/dist/api/resources/tts/index.d.ts +1 -0
- package/dist/api/resources/tts/index.js +17 -0
- package/dist/api/resources/voices/client/Client.d.ts +107 -0
- package/dist/api/resources/voices/client/Client.js +369 -0
- package/dist/api/resources/voices/client/index.d.ts +1 -0
- package/dist/api/resources/voices/client/index.js +17 -0
- package/dist/api/resources/voices/client/requests/GetVoiceRequest.d.ts +14 -0
- package/dist/api/resources/voices/client/requests/GetVoiceRequest.js +5 -0
- package/dist/api/resources/voices/client/requests/ListVoicesRequest.d.ts +14 -0
- package/dist/api/resources/voices/client/requests/ListVoicesRequest.js +5 -0
- package/dist/api/resources/voices/client/requests/index.d.ts +2 -0
- package/dist/api/resources/voices/client/requests/index.js +2 -0
- package/dist/api/resources/voices/index.d.ts +1 -0
- package/dist/api/resources/voices/index.js +17 -0
- package/dist/api/resources/webhooks/types/BatchNotification.d.ts +21 -0
- package/dist/api/resources/webhooks/types/BatchNotification.js +5 -0
- package/dist/api/resources/webhooks/types/BatchNotificationMetrics.d.ts +13 -0
- package/dist/api/resources/webhooks/types/BatchNotificationMetrics.js +5 -0
- package/dist/api/resources/webhooks/types/GenerationNotification.d.ts +14 -16
- package/dist/api/resources/webhooks/types/WebhookStatus.d.ts +3 -2
- package/dist/api/resources/webhooks/types/WebhookStatus.js +1 -0
- package/dist/api/resources/webhooks/types/index.d.ts +2 -0
- package/dist/api/resources/webhooks/types/index.js +2 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/environments.d.ts +2 -1
- package/dist/environments.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +2 -1
- package/environments.js +1 -0
- package/package.json +1 -1
- package/reference.md +2632 -79
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -44,6 +44,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
44
44
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
|
+
var t = {};
|
|
49
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
+
t[p] = s[p];
|
|
51
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
+
t[p[i]] = s[p[i]];
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
};
|
|
47
58
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
59
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
60
|
};
|
|
@@ -60,11 +71,19 @@ class Generations {
|
|
|
60
71
|
this._options = _options;
|
|
61
72
|
}
|
|
62
73
|
/**
|
|
63
|
-
*
|
|
74
|
+
* Create a lip sync generation with `application/json` — provide each input by `url` or by `assetId` from an uploaded asset. For reusable or large local files, upload them first with POST /v2/assets/upload and pass the returned `assetId`; see [Asset Uploads](/developer-guides/asset-uploads). Use the multipart "Create Generation with Files" form only when uploading direct audio, video, or image file fields; it has a 5 GiB per-file application parser limit, subject to your plan and any lower proxy limits. Nested fields such as input, options, segments, outputAudio, dubParams, and dialogueEdit must be JSON strings in multipart requests. If a `text` input requires speech synthesis and the ElevenLabs provider is temporarily unavailable, the request returns errorCode elevenlabs_service_unavailable: 504 for provider timeouts and 503 for other provider outages for unkeyed requests. Keyed uncertain outcomes return 503 IDEMPOTENCY_OUTCOME_UNKNOWN instead. An API-key request that passes dialogueEdit is refused with errorCode dialogue_edit_retime_required (422) when the organization's rollout lacks segment lipsync and section expansion. A dialogueEdit that removes more speech than the surrounding footage can absorb returns errorCode dialogue_edit_removal_too_large (422). When the failing section can be identified, `dialogueEditSection` on the error names it; change it and create a new preview before submitting again. Retrying the same preview fails again. Send the optional Idempotency-Key header on the first request and reuse it with the same payload on retries. An accepted replay returns 200 with the original generation's current state and Idempotency-Replayed: true. A retry after that generation ended FAILED or REJECTED starts a new generation instead (201). An API-key request without the header that is identical to one your organization sent in the last 60 seconds returns 409 DUPLICATE_SUBMISSION with the original generationId; send a unique Idempotency-Key with each generation you intend. See [Idempotent Requests](/api-reference/guides/idempotency) for key validation, conflicts, retention, duplicates, and uncertain-outcome recovery.
|
|
75
|
+
*
|
|
76
|
+
* @param {Sync.CreateGenerationJsonRequest} request
|
|
64
77
|
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
78
|
*
|
|
66
79
|
* @throws {@link Sync.BadRequestError}
|
|
67
80
|
* @throws {@link Sync.UnauthorizedError}
|
|
81
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
82
|
+
* @throws {@link Sync.ConflictError}
|
|
83
|
+
* @throws {@link Sync.GenerationDeletedError}
|
|
84
|
+
* @throws {@link Sync.GenerationTooManyRequestsError}
|
|
85
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
86
|
+
* @throws {@link Sync.GatewayTimeoutError}
|
|
68
87
|
* @throws {@link Sync.InternalServerError}
|
|
69
88
|
*
|
|
70
89
|
* @example
|
|
@@ -76,11 +95,36 @@ class Generations {
|
|
|
76
95
|
* type: "audio",
|
|
77
96
|
* url: "https://assets.sync.so/docs/example-audio.wav"
|
|
78
97
|
* }],
|
|
98
|
+
* model: "sync-3"
|
|
99
|
+
* })
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* await client.generations.create({
|
|
103
|
+
* input: [{
|
|
104
|
+
* type: "video",
|
|
105
|
+
* url: "https://assets.sync.so/docs/example-video.mp4"
|
|
106
|
+
* }, {
|
|
107
|
+
* type: "audio",
|
|
108
|
+
* url: "https://assets.sync.so/docs/example-audio.wav"
|
|
109
|
+
* }],
|
|
79
110
|
* model: "lipsync-2",
|
|
80
111
|
* options: {
|
|
81
112
|
* sync_mode: "loop"
|
|
82
113
|
* }
|
|
83
114
|
* })
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* await client.generations.create({
|
|
118
|
+
* input: [{
|
|
119
|
+
* type: "video",
|
|
120
|
+
* url: "https://assets.sync.so/docs/example-video.mp4"
|
|
121
|
+
* }],
|
|
122
|
+
* model: "lipsync-2",
|
|
123
|
+
* dubParams: {
|
|
124
|
+
* providerName: "elevenlabs",
|
|
125
|
+
* targetLang: "es"
|
|
126
|
+
* }
|
|
127
|
+
* })
|
|
84
128
|
*/
|
|
85
129
|
create(request, requestOptions) {
|
|
86
130
|
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
@@ -88,13 +132,14 @@ class Generations {
|
|
|
88
132
|
__create(request, requestOptions) {
|
|
89
133
|
return __awaiter(this, void 0, void 0, function* () {
|
|
90
134
|
var _a, _b, _c;
|
|
135
|
+
const { "Idempotency-Key": idempotencyKey } = request, _body = __rest(request, ["Idempotency-Key"]);
|
|
91
136
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
92
137
|
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/generate"),
|
|
93
138
|
method: "POST",
|
|
94
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
139
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.4.0", "User-Agent": "@sync.so/sdk/0.4.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
95
140
|
contentType: "application/json",
|
|
96
141
|
requestType: "json",
|
|
97
|
-
body:
|
|
142
|
+
body: _body,
|
|
98
143
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
99
144
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
100
145
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -108,6 +153,18 @@ class Generations {
|
|
|
108
153
|
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
109
154
|
case 401:
|
|
110
155
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
156
|
+
case 422:
|
|
157
|
+
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
158
|
+
case 409:
|
|
159
|
+
throw new Sync.ConflictError(_response.error.body, _response.rawResponse);
|
|
160
|
+
case 410:
|
|
161
|
+
throw new Sync.GenerationDeletedError(_response.error.body, _response.rawResponse);
|
|
162
|
+
case 429:
|
|
163
|
+
throw new Sync.GenerationTooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
164
|
+
case 503:
|
|
165
|
+
throw new Sync.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
166
|
+
case 504:
|
|
167
|
+
throw new Sync.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
111
168
|
case 500:
|
|
112
169
|
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
113
170
|
default:
|
|
@@ -136,30 +193,43 @@ class Generations {
|
|
|
136
193
|
});
|
|
137
194
|
}
|
|
138
195
|
/**
|
|
196
|
+
* The multipart/form-data form of `POST /v2/generate` — the same endpoint as "Create Generation", for uploading local files directly instead of passing URLs. Send each file under a field named for its type (`video`, `image`, `audio`), at most one of each. The application parser allows up to 5 GiB (5 × 1024³ bytes) per file, 3 files, 32 fields, 35 total parts, and 1 MiB per field. A file over the parser limit returns 413 generation_input_validation_failed, and a file over your plan limit returns 422 file_size_exceeds_plan_limit. Proxy limits may be lower; this ceiling does not guarantee a 5 GiB direct transfer. Each file is saved as an asset in your organization and passed to the generation by `assetId`. For large files, upload via POST /v2/assets/upload first and pass the `assetId`, so retries don't resend the file. Nested fields such as `input`, `options`, `segments`, `outputAudio`, `dubParams`, and `dialogueEdit` must be sent as JSON strings in multipart requests. Image inputs are sync-3 only. If a `text` input requires speech synthesis and the ElevenLabs provider is temporarily unavailable, the request returns errorCode elevenlabs_service_unavailable: 504 for provider timeouts and 503 for other provider outages for unkeyed requests. Keyed uncertain outcomes return 503 IDEMPOTENCY_OUTCOME_UNKNOWN instead. An API-key request that passes dialogueEdit is refused with errorCode dialogue_edit_retime_required (422) when the organization's rollout lacks segment lipsync and section expansion. A dialogueEdit that removes more speech than the surrounding footage can absorb returns errorCode dialogue_edit_removal_too_large (422). When the failing section can be identified, `dialogueEditSection` on the error names it; change it and create a new preview before submitting again. Retrying the same preview fails again. Send the optional Idempotency-Key header on the first request and reuse it with the same payload on retries. An accepted replay returns 200 with the original generation's current state and Idempotency-Replayed: true. A retry after that generation ended FAILED or REJECTED starts a new generation instead (201). An API-key request without the header that is identical to one your organization sent in the last 60 seconds returns 409 DUPLICATE_SUBMISSION with the original generationId; send a unique Idempotency-Key with each generation you intend. See [Idempotent Requests](/api-reference/guides/idempotency) for key validation, conflicts, retention, duplicates, and uncertain-outcome recovery.
|
|
197
|
+
*
|
|
139
198
|
* @param {File | fs.ReadStream | Blob | undefined} video
|
|
199
|
+
* @param {File | fs.ReadStream | Blob | undefined} image
|
|
140
200
|
* @param {File | fs.ReadStream | Blob | undefined} audio
|
|
141
201
|
* @param {Sync.CreateGenerationRequest} request
|
|
142
202
|
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
143
203
|
*
|
|
144
204
|
* @throws {@link Sync.BadRequestError}
|
|
145
205
|
* @throws {@link Sync.UnauthorizedError}
|
|
206
|
+
* @throws {@link Sync.PayloadTooLargeError}
|
|
207
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
208
|
+
* @throws {@link Sync.ConflictError}
|
|
209
|
+
* @throws {@link Sync.GenerationDeletedError}
|
|
210
|
+
* @throws {@link Sync.GenerationTooManyRequestsError}
|
|
211
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
212
|
+
* @throws {@link Sync.GatewayTimeoutError}
|
|
146
213
|
* @throws {@link Sync.InternalServerError}
|
|
147
214
|
*
|
|
148
215
|
* @example
|
|
149
|
-
* await client.generations.createWithFiles(fs.createReadStream("/path/to/your/file"), fs.createReadStream("/path/to/your/file"), {
|
|
216
|
+
* await client.generations.createWithFiles(fs.createReadStream("/path/to/your/file"), fs.createReadStream("/path/to/your/file"), fs.createReadStream("/path/to/your/file"), {
|
|
150
217
|
* model: "lipsync-2"
|
|
151
218
|
* })
|
|
152
219
|
*/
|
|
153
|
-
createWithFiles(video, audio, request, requestOptions) {
|
|
154
|
-
return core.HttpResponsePromise.fromPromise(this.__createWithFiles(video, audio, request, requestOptions));
|
|
220
|
+
createWithFiles(video, image, audio, request, requestOptions) {
|
|
221
|
+
return core.HttpResponsePromise.fromPromise(this.__createWithFiles(video, image, audio, request, requestOptions));
|
|
155
222
|
}
|
|
156
|
-
__createWithFiles(video, audio, request, requestOptions) {
|
|
223
|
+
__createWithFiles(video, image, audio, request, requestOptions) {
|
|
157
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
158
225
|
var _a, _b, _c;
|
|
159
226
|
const _request = yield core.newFormData();
|
|
160
227
|
if (video != null) {
|
|
161
228
|
yield _request.appendFile("video", video);
|
|
162
229
|
}
|
|
230
|
+
if (image != null) {
|
|
231
|
+
yield _request.appendFile("image", image);
|
|
232
|
+
}
|
|
163
233
|
if (audio != null) {
|
|
164
234
|
yield _request.appendFile("audio", audio);
|
|
165
235
|
}
|
|
@@ -172,14 +242,34 @@ class Generations {
|
|
|
172
242
|
if (request.options != null) {
|
|
173
243
|
_request.append("options", (0, json_1.toJson)(request.options));
|
|
174
244
|
}
|
|
245
|
+
if (request.segments != null) {
|
|
246
|
+
for (const _item of request.segments) {
|
|
247
|
+
_request.append("segments", (0, json_1.toJson)(_item));
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
if (request.outputAudio != null) {
|
|
251
|
+
_request.append("outputAudio", (0, json_1.toJson)(request.outputAudio));
|
|
252
|
+
}
|
|
253
|
+
if (request.dubParams != null) {
|
|
254
|
+
_request.append("dubParams", (0, json_1.toJson)(request.dubParams));
|
|
255
|
+
}
|
|
175
256
|
if (request.webhookUrl != null) {
|
|
176
257
|
_request.append("webhookUrl", request.webhookUrl);
|
|
177
258
|
}
|
|
259
|
+
if (request.outputFileName != null) {
|
|
260
|
+
_request.append("outputFileName", request.outputFileName);
|
|
261
|
+
}
|
|
262
|
+
if (request.projectId != null) {
|
|
263
|
+
_request.append("projectId", request.projectId);
|
|
264
|
+
}
|
|
265
|
+
if (request.dialogueEdit != null) {
|
|
266
|
+
_request.append("dialogueEdit", (0, json_1.toJson)(request.dialogueEdit));
|
|
267
|
+
}
|
|
178
268
|
const _maybeEncodedRequest = yield _request.getRequest();
|
|
179
269
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
180
270
|
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/generate"),
|
|
181
271
|
method: "POST",
|
|
182
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
272
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.4.0", "User-Agent": "@sync.so/sdk/0.4.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),
|
|
183
273
|
requestType: "file",
|
|
184
274
|
duplex: _maybeEncodedRequest.duplex,
|
|
185
275
|
body: _maybeEncodedRequest.body,
|
|
@@ -196,6 +286,20 @@ class Generations {
|
|
|
196
286
|
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
197
287
|
case 401:
|
|
198
288
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
289
|
+
case 413:
|
|
290
|
+
throw new Sync.PayloadTooLargeError(_response.error.body, _response.rawResponse);
|
|
291
|
+
case 422:
|
|
292
|
+
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
293
|
+
case 409:
|
|
294
|
+
throw new Sync.ConflictError(_response.error.body, _response.rawResponse);
|
|
295
|
+
case 410:
|
|
296
|
+
throw new Sync.GenerationDeletedError(_response.error.body, _response.rawResponse);
|
|
297
|
+
case 429:
|
|
298
|
+
throw new Sync.GenerationTooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
299
|
+
case 503:
|
|
300
|
+
throw new Sync.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
301
|
+
case 504:
|
|
302
|
+
throw new Sync.GatewayTimeoutError(_response.error.body, _response.rawResponse);
|
|
199
303
|
case 500:
|
|
200
304
|
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
201
305
|
default:
|
|
@@ -224,7 +328,10 @@ class Generations {
|
|
|
224
328
|
});
|
|
225
329
|
}
|
|
226
330
|
/**
|
|
331
|
+
* Retrieve the current generation state. This /v2/generate/{id} route supports the wait, timeout and include options below.
|
|
332
|
+
*
|
|
227
333
|
* @param {Sync.GenerationId} id
|
|
334
|
+
* @param {Sync.GetGenerationRequest} request
|
|
228
335
|
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
229
336
|
*
|
|
230
337
|
* @throws {@link Sync.UnauthorizedError}
|
|
@@ -234,17 +341,29 @@ class Generations {
|
|
|
234
341
|
* @example
|
|
235
342
|
* await client.generations.get("6533643b-aceb-4c40-967e-d9ba9baac39e")
|
|
236
343
|
*/
|
|
237
|
-
get(id, requestOptions) {
|
|
238
|
-
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
|
|
344
|
+
get(id, request = {}, requestOptions) {
|
|
345
|
+
return core.HttpResponsePromise.fromPromise(this.__get(id, request, requestOptions));
|
|
239
346
|
}
|
|
240
|
-
__get(
|
|
241
|
-
return __awaiter(this,
|
|
347
|
+
__get(id_1) {
|
|
348
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
242
349
|
var _a, _b, _c;
|
|
350
|
+
const { wait, timeout, include } = request;
|
|
351
|
+
const _queryParams = {};
|
|
352
|
+
if (wait != null) {
|
|
353
|
+
_queryParams["wait"] = wait.toString();
|
|
354
|
+
}
|
|
355
|
+
if (timeout != null) {
|
|
356
|
+
_queryParams["timeout"] = timeout.toString();
|
|
357
|
+
}
|
|
358
|
+
if (include != null) {
|
|
359
|
+
_queryParams["include"] = include;
|
|
360
|
+
}
|
|
243
361
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
244
362
|
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/generate/${encodeURIComponent(id)}`),
|
|
245
363
|
method: "GET",
|
|
246
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
364
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.4.0", "User-Agent": "@sync.so/sdk/0.4.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),
|
|
247
365
|
contentType: "application/json",
|
|
366
|
+
queryParameters: _queryParams,
|
|
248
367
|
requestType: "json",
|
|
249
368
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
250
369
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -286,10 +405,143 @@ class Generations {
|
|
|
286
405
|
}
|
|
287
406
|
});
|
|
288
407
|
}
|
|
408
|
+
/**
|
|
409
|
+
* Obtain the available full output of a completed generation in your
|
|
410
|
+
* organization. Authenticate with `x-api-key`; no Studio project or user
|
|
411
|
+
* session is required. Any valid API key belonging to the generation's
|
|
412
|
+
* organization can request the URL.
|
|
413
|
+
*
|
|
414
|
+
* The successful response is an **unquoted URL in a text/plain body**,
|
|
415
|
+
* not JSON, a redirect, or the video itself. Fetch that URL separately
|
|
416
|
+
* without forwarding your API key.
|
|
417
|
+
*
|
|
418
|
+
* ```bash
|
|
419
|
+
* download_url=$(curl --fail-with-body --silent --show-error \
|
|
420
|
+
* -H "x-api-key: $SYNC_API_KEY" \
|
|
421
|
+
* "https://api.sync.so/v2/generations/$GENERATION_ID/download") &&
|
|
422
|
+
* curl --fail --location "$download_url" --output output.mov
|
|
423
|
+
* ```
|
|
424
|
+
*
|
|
425
|
+
* The URL resolves an existing output using your organization's current
|
|
426
|
+
* plan and billing-version eligibility. Free and watermark-required plans
|
|
427
|
+
* receive the watermarked derivative when present. Entitled plans (such
|
|
428
|
+
* as v2 Creator and v3 Starter or higher) receive the clean output when
|
|
429
|
+
* available. Historical outputs can have the watermark burned in, so an
|
|
430
|
+
* upgrade does not guarantee every old output becomes watermark-free.
|
|
431
|
+
* Outputs created without a watermark can remain clean after a downgrade.
|
|
432
|
+
* If no watermarked derivative exists, the resolver retains its existing
|
|
433
|
+
* fallback to the original output; changing plans does not rewrite files.
|
|
434
|
+
* This endpoint does not generate a new render or remove burned-in watermarks.
|
|
435
|
+
*
|
|
436
|
+
* Signed S3 URLs request seven-day validity, but credential expiry,
|
|
437
|
+
* revocation, access changes, or file deletion can make them unusable
|
|
438
|
+
* sooner. Request this endpoint again for a fresh signed URL while the
|
|
439
|
+
* output is still available. The selected S3 file is checked before
|
|
440
|
+
* signing; a successful response does not guarantee future availability.
|
|
441
|
+
* Older URL-only records return their stored URL unchanged, without
|
|
442
|
+
* checking its availability or extending its original expiration.
|
|
443
|
+
* These URLs are download credentials: keep them private.
|
|
444
|
+
*
|
|
445
|
+
* Errors use the standard JSON error body and stable `errorCode`:
|
|
446
|
+
*
|
|
447
|
+
* | Status | Code | Meaning / next step |
|
|
448
|
+
* | --- | --- | --- |
|
|
449
|
+
* | 400 | — | Invalid generation UUID. |
|
|
450
|
+
* | 401 | — | API key missing, invalid, or revoked. |
|
|
451
|
+
* | 404 | `generation_not_found` | Missing, deleted, or outside your organization. |
|
|
452
|
+
* | 404 | `generation_output_unavailable` | No eligible output reference or the selected file is missing; contact support. |
|
|
453
|
+
* | 409 | `generation_not_ready` | Pending or processing; poll Get Generation until COMPLETED. |
|
|
454
|
+
* | 422 | `generation_not_downloadable` | Failed or rejected; inspect the generation error. |
|
|
455
|
+
* | 503 | `generation_download_unavailable` | Storage lookup or signing failed; retry with backoff. |
|
|
456
|
+
*
|
|
457
|
+
* Authentication also returns 422 for draft organizations. Requesting a
|
|
458
|
+
* download URL does not create a project, incur a generation charge, or
|
|
459
|
+
* restore deleted files.
|
|
460
|
+
*
|
|
461
|
+
* @param {Sync.GenerationId} id
|
|
462
|
+
* @param {Sync.GetGenerationDownloadRequest} request
|
|
463
|
+
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
464
|
+
*
|
|
465
|
+
* @throws {@link Sync.BadRequestError}
|
|
466
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
467
|
+
* @throws {@link Sync.NotFoundError}
|
|
468
|
+
* @throws {@link Sync.ConflictError}
|
|
469
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
470
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
471
|
+
*
|
|
472
|
+
* @example
|
|
473
|
+
* await client.generations.download("id")
|
|
474
|
+
*/
|
|
475
|
+
download(id, request = {}, requestOptions) {
|
|
476
|
+
return core.HttpResponsePromise.fromPromise(this.__download(id, request, requestOptions));
|
|
477
|
+
}
|
|
478
|
+
__download(id_1) {
|
|
479
|
+
return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
|
|
480
|
+
var _a, _b, _c;
|
|
481
|
+
const { fileName, "x-sync-accelerate": xSyncAccelerate } = request;
|
|
482
|
+
const _queryParams = {};
|
|
483
|
+
if (fileName != null) {
|
|
484
|
+
_queryParams["fileName"] = fileName;
|
|
485
|
+
}
|
|
486
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
487
|
+
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/generations/${encodeURIComponent(id)}/download`),
|
|
488
|
+
method: "GET",
|
|
489
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.4.0", "User-Agent": "@sync.so/sdk/0.4.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-sync-accelerate": xSyncAccelerate != null ? xSyncAccelerate : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
490
|
+
contentType: "application/json",
|
|
491
|
+
queryParameters: _queryParams,
|
|
492
|
+
requestType: "json",
|
|
493
|
+
responseType: "text",
|
|
494
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
495
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
496
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
497
|
+
});
|
|
498
|
+
if (_response.ok) {
|
|
499
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
500
|
+
}
|
|
501
|
+
if (_response.error.reason === "status-code") {
|
|
502
|
+
switch (_response.error.statusCode) {
|
|
503
|
+
case 400:
|
|
504
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
505
|
+
case 401:
|
|
506
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
507
|
+
case 404:
|
|
508
|
+
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
509
|
+
case 409:
|
|
510
|
+
throw new Sync.ConflictError(_response.error.body, _response.rawResponse);
|
|
511
|
+
case 422:
|
|
512
|
+
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
513
|
+
case 503:
|
|
514
|
+
throw new Sync.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
515
|
+
default:
|
|
516
|
+
throw new errors.SyncError({
|
|
517
|
+
statusCode: _response.error.statusCode,
|
|
518
|
+
body: _response.error.body,
|
|
519
|
+
rawResponse: _response.rawResponse,
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
switch (_response.error.reason) {
|
|
524
|
+
case "non-json":
|
|
525
|
+
throw new errors.SyncError({
|
|
526
|
+
statusCode: _response.error.statusCode,
|
|
527
|
+
body: _response.error.rawBody,
|
|
528
|
+
rawResponse: _response.rawResponse,
|
|
529
|
+
});
|
|
530
|
+
case "timeout":
|
|
531
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/generations/{id}/download.");
|
|
532
|
+
case "unknown":
|
|
533
|
+
throw new errors.SyncError({
|
|
534
|
+
message: _response.error.errorMessage,
|
|
535
|
+
rawResponse: _response.rawResponse,
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
}
|
|
289
540
|
/**
|
|
290
541
|
* @param {Sync.ListGenerationsRequest} request
|
|
291
542
|
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
292
543
|
*
|
|
544
|
+
* @throws {@link Sync.BadRequestError}
|
|
293
545
|
* @throws {@link Sync.UnauthorizedError}
|
|
294
546
|
* @throws {@link Sync.InternalServerError}
|
|
295
547
|
*
|
|
@@ -302,15 +554,30 @@ class Generations {
|
|
|
302
554
|
__list() {
|
|
303
555
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
304
556
|
var _a, _b, _c;
|
|
305
|
-
const { status } = request;
|
|
557
|
+
const { status, ids, source, projectId, limit, cursor } = request;
|
|
306
558
|
const _queryParams = {};
|
|
307
559
|
if (status != null) {
|
|
308
|
-
_queryParams["status"] = status;
|
|
560
|
+
_queryParams["status"] = (0, json_1.toJson)(status);
|
|
561
|
+
}
|
|
562
|
+
if (ids != null) {
|
|
563
|
+
_queryParams["ids"] = (0, json_1.toJson)(ids);
|
|
564
|
+
}
|
|
565
|
+
if (source != null) {
|
|
566
|
+
_queryParams["source"] = (0, json_1.toJson)(source);
|
|
567
|
+
}
|
|
568
|
+
if (projectId != null) {
|
|
569
|
+
_queryParams["projectId"] = projectId;
|
|
570
|
+
}
|
|
571
|
+
if (limit != null) {
|
|
572
|
+
_queryParams["limit"] = limit.toString();
|
|
573
|
+
}
|
|
574
|
+
if (cursor != null) {
|
|
575
|
+
_queryParams["cursor"] = cursor;
|
|
309
576
|
}
|
|
310
577
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
311
578
|
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/generations"),
|
|
312
579
|
method: "GET",
|
|
313
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
580
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.4.0", "User-Agent": "@sync.so/sdk/0.4.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),
|
|
314
581
|
contentType: "application/json",
|
|
315
582
|
queryParameters: _queryParams,
|
|
316
583
|
requestType: "json",
|
|
@@ -323,6 +590,8 @@ class Generations {
|
|
|
323
590
|
}
|
|
324
591
|
if (_response.error.reason === "status-code") {
|
|
325
592
|
switch (_response.error.statusCode) {
|
|
593
|
+
case 400:
|
|
594
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
326
595
|
case 401:
|
|
327
596
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
328
597
|
case 500:
|
|
@@ -353,25 +622,23 @@ class Generations {
|
|
|
353
622
|
});
|
|
354
623
|
}
|
|
355
624
|
/**
|
|
356
|
-
*
|
|
625
|
+
* Estimate a generation from its model and billable duration in seconds. Supply a finite positive duration and, optionally, a finite positive fps (defaults to 25 for credit-billed organizations and 30 otherwise). Set `workflow` to `translate-and-dub` to include dubbing; the response then carries a `breakdown`. `durationCheck` says whether your account and the model allow the quoted duration. No media is fetched and no generation is created. POST /v2/generate/estimate-cost is an alias of this endpoint. Invalid request fields return 400. If the billing calculation rejects the duration or frame rate, it returns 422 cost_estimate_unavailable without price fields.
|
|
626
|
+
*
|
|
627
|
+
* @param {Sync.EstimateCostRequest} request
|
|
357
628
|
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
358
629
|
*
|
|
630
|
+
* @throws {@link Sync.BadRequestError}
|
|
359
631
|
* @throws {@link Sync.UnauthorizedError}
|
|
632
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
360
633
|
* @throws {@link Sync.InternalServerError}
|
|
361
634
|
*
|
|
362
635
|
* @example
|
|
363
636
|
* await client.generations.estimateCost({
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
* url: "https://assets.sync.so/docs/example-audio.wav"
|
|
370
|
-
* }],
|
|
371
|
-
* model: "lipsync-2",
|
|
372
|
-
* options: {
|
|
373
|
-
* sync_mode: "loop"
|
|
374
|
-
* }
|
|
637
|
+
* model: "model",
|
|
638
|
+
* duration: 1.1,
|
|
639
|
+
* fps: undefined,
|
|
640
|
+
* workflow: undefined,
|
|
641
|
+
* reasoningEnabled: undefined
|
|
375
642
|
* })
|
|
376
643
|
*/
|
|
377
644
|
estimateCost(request, requestOptions) {
|
|
@@ -381,9 +648,9 @@ class Generations {
|
|
|
381
648
|
return __awaiter(this, void 0, void 0, function* () {
|
|
382
649
|
var _a, _b, _c;
|
|
383
650
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
384
|
-
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/
|
|
651
|
+
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/generations/estimate"),
|
|
385
652
|
method: "POST",
|
|
386
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
653
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.4.0", "User-Agent": "@sync.so/sdk/0.4.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),
|
|
387
654
|
contentType: "application/json",
|
|
388
655
|
requestType: "json",
|
|
389
656
|
body: request,
|
|
@@ -394,10 +661,82 @@ class Generations {
|
|
|
394
661
|
if (_response.ok) {
|
|
395
662
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
396
663
|
}
|
|
664
|
+
if (_response.error.reason === "status-code") {
|
|
665
|
+
switch (_response.error.statusCode) {
|
|
666
|
+
case 400:
|
|
667
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
668
|
+
case 401:
|
|
669
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
670
|
+
case 422:
|
|
671
|
+
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
672
|
+
case 500:
|
|
673
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
674
|
+
default:
|
|
675
|
+
throw new errors.SyncError({
|
|
676
|
+
statusCode: _response.error.statusCode,
|
|
677
|
+
body: _response.error.body,
|
|
678
|
+
rawResponse: _response.rawResponse,
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
switch (_response.error.reason) {
|
|
683
|
+
case "non-json":
|
|
684
|
+
throw new errors.SyncError({
|
|
685
|
+
statusCode: _response.error.statusCode,
|
|
686
|
+
body: _response.error.rawBody,
|
|
687
|
+
rawResponse: _response.rawResponse,
|
|
688
|
+
});
|
|
689
|
+
case "timeout":
|
|
690
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling POST /v2/generations/estimate.");
|
|
691
|
+
case "unknown":
|
|
692
|
+
throw new errors.SyncError({
|
|
693
|
+
message: _response.error.errorMessage,
|
|
694
|
+
rawResponse: _response.rawResponse,
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
});
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Delete a generation. Generations are organization-scoped, so any member — or an API key for the organization — can delete one. Only generations in a terminal state can be deleted; deleting one that is still processing returns 409 (errorCode `generation_not_deletable_while_processing`). Returns the deleted generation in its stored shape (`modelName`, `inputs`, `outputMediaUrl`, `deletedAt`), not the Get Generation shape.
|
|
701
|
+
*
|
|
702
|
+
* @param {Sync.GenerationId} id
|
|
703
|
+
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
704
|
+
*
|
|
705
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
706
|
+
* @throws {@link Sync.NotFoundError}
|
|
707
|
+
* @throws {@link Sync.ConflictError}
|
|
708
|
+
* @throws {@link Sync.InternalServerError}
|
|
709
|
+
*
|
|
710
|
+
* @example
|
|
711
|
+
* await client.generations.delete("6533643b-aceb-4c40-967e-d9ba9baac39e")
|
|
712
|
+
*/
|
|
713
|
+
delete(id, requestOptions) {
|
|
714
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
|
|
715
|
+
}
|
|
716
|
+
__delete(id, requestOptions) {
|
|
717
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
718
|
+
var _a, _b, _c;
|
|
719
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
720
|
+
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/generations/${encodeURIComponent(id)}`),
|
|
721
|
+
method: "DELETE",
|
|
722
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.4.0", "User-Agent": "@sync.so/sdk/0.4.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),
|
|
723
|
+
contentType: "application/json",
|
|
724
|
+
requestType: "json",
|
|
725
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
726
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
727
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
728
|
+
});
|
|
729
|
+
if (_response.ok) {
|
|
730
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
731
|
+
}
|
|
397
732
|
if (_response.error.reason === "status-code") {
|
|
398
733
|
switch (_response.error.statusCode) {
|
|
399
734
|
case 401:
|
|
400
735
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
736
|
+
case 404:
|
|
737
|
+
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
738
|
+
case 409:
|
|
739
|
+
throw new Sync.ConflictError(_response.error.body, _response.rawResponse);
|
|
401
740
|
case 500:
|
|
402
741
|
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
403
742
|
default:
|
|
@@ -416,7 +755,7 @@ class Generations {
|
|
|
416
755
|
rawResponse: _response.rawResponse,
|
|
417
756
|
});
|
|
418
757
|
case "timeout":
|
|
419
|
-
throw new errors.SyncTimeoutError("Timeout exceeded when calling
|
|
758
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling DELETE /v2/generations/{id}.");
|
|
420
759
|
case "unknown":
|
|
421
760
|
throw new errors.SyncError({
|
|
422
761
|
message: _response.error.errorMessage,
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
* input: [{
|
|
9
|
+
* type: "video",
|
|
10
|
+
* url: "https://assets.sync.so/docs/example-video.mp4"
|
|
11
|
+
* }, {
|
|
12
|
+
* type: "audio",
|
|
13
|
+
* url: "https://assets.sync.so/docs/example-audio.wav"
|
|
14
|
+
* }],
|
|
15
|
+
* model: "sync-3"
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* {
|
|
20
|
+
* input: [{
|
|
21
|
+
* type: "video",
|
|
22
|
+
* url: "https://assets.sync.so/docs/example-video.mp4"
|
|
23
|
+
* }, {
|
|
24
|
+
* type: "audio",
|
|
25
|
+
* url: "https://assets.sync.so/docs/example-audio.wav"
|
|
26
|
+
* }],
|
|
27
|
+
* model: "lipsync-2",
|
|
28
|
+
* options: {
|
|
29
|
+
* sync_mode: "loop"
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* {
|
|
35
|
+
* input: [{
|
|
36
|
+
* type: "video",
|
|
37
|
+
* url: "https://assets.sync.so/docs/example-video.mp4"
|
|
38
|
+
* }],
|
|
39
|
+
* model: "lipsync-2",
|
|
40
|
+
* dubParams: {
|
|
41
|
+
* providerName: "elevenlabs",
|
|
42
|
+
* targetLang: "es"
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
*/
|
|
46
|
+
export interface CreateGenerationJsonRequest extends Sync.CreateGenerationDto {
|
|
47
|
+
/**
|
|
48
|
+
* Case-sensitive organization-scoped key, 1–128 characters matching [A-Za-z0-9._~-]+. Send exactly one header. Reuse the same key and payload for retries of one action; a retry after the generation ended FAILED or REJECTED starts a new one. Use a unique key per intended generation. Retained seven days from acceptance, longer while active or unresolved. Not a JSON field.
|
|
49
|
+
*/
|
|
50
|
+
"Idempotency-Key"?: string;
|
|
51
|
+
}
|