@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
|
@@ -0,0 +1,582 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.Projects = void 0;
|
|
52
|
+
const environments = __importStar(require("../../../../environments"));
|
|
53
|
+
const core = __importStar(require("../../../../core"));
|
|
54
|
+
const Sync = __importStar(require("../../../index"));
|
|
55
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
56
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
57
|
+
class Projects {
|
|
58
|
+
constructor(_options = {}) {
|
|
59
|
+
this._options = _options;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Create a project to group related generations and assets. Pass the returned id as projectId on POST /v2/generate or POST /v2/assets to file them under this project so they show up together in Studio. Only name is required — visibility defaults to USER and mode to CREATOR. Supply a client-generated UUID as id for idempotent creation. A retry with the same id returns the existing project and ignores other request fields; an id owned by another user/organization or a deleted project returns 409.
|
|
63
|
+
*
|
|
64
|
+
* @param {Sync.CreateProjectRequest} request
|
|
65
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link Sync.BadRequestError}
|
|
68
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
69
|
+
* @throws {@link Sync.ConflictError}
|
|
70
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
71
|
+
* @throws {@link Sync.InternalServerError}
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* await client.projects.create({
|
|
75
|
+
* id: "612bb64a-e7f4-40c1-977b-3e9797845637",
|
|
76
|
+
* name: "My API Project"
|
|
77
|
+
* })
|
|
78
|
+
*/
|
|
79
|
+
create(request, requestOptions) {
|
|
80
|
+
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
81
|
+
}
|
|
82
|
+
__create(request, requestOptions) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
var _a, _b, _c;
|
|
85
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
86
|
+
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/projects"),
|
|
87
|
+
method: "POST",
|
|
88
|
+
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),
|
|
89
|
+
contentType: "application/json",
|
|
90
|
+
requestType: "json",
|
|
91
|
+
body: request,
|
|
92
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
93
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
94
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
95
|
+
});
|
|
96
|
+
if (_response.ok) {
|
|
97
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
98
|
+
}
|
|
99
|
+
if (_response.error.reason === "status-code") {
|
|
100
|
+
switch (_response.error.statusCode) {
|
|
101
|
+
case 400:
|
|
102
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
103
|
+
case 401:
|
|
104
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
105
|
+
case 409:
|
|
106
|
+
throw new Sync.ConflictError(_response.error.body, _response.rawResponse);
|
|
107
|
+
case 422:
|
|
108
|
+
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
109
|
+
case 500:
|
|
110
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
111
|
+
default:
|
|
112
|
+
throw new errors.SyncError({
|
|
113
|
+
statusCode: _response.error.statusCode,
|
|
114
|
+
body: _response.error.body,
|
|
115
|
+
rawResponse: _response.rawResponse,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
switch (_response.error.reason) {
|
|
120
|
+
case "non-json":
|
|
121
|
+
throw new errors.SyncError({
|
|
122
|
+
statusCode: _response.error.statusCode,
|
|
123
|
+
body: _response.error.rawBody,
|
|
124
|
+
rawResponse: _response.rawResponse,
|
|
125
|
+
});
|
|
126
|
+
case "timeout":
|
|
127
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling POST /v2/projects.");
|
|
128
|
+
case "unknown":
|
|
129
|
+
throw new errors.SyncError({
|
|
130
|
+
message: _response.error.errorMessage,
|
|
131
|
+
rawResponse: _response.rawResponse,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* List the projects in your organization, most recently updated first.
|
|
138
|
+
*
|
|
139
|
+
* @param {Sync.ListProjectsRequest} request
|
|
140
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
141
|
+
*
|
|
142
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
143
|
+
* @throws {@link Sync.InternalServerError}
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* await client.projects.list({
|
|
147
|
+
* limit: 10,
|
|
148
|
+
* sortBy: "updatedAt"
|
|
149
|
+
* })
|
|
150
|
+
*/
|
|
151
|
+
list(request = {}, requestOptions) {
|
|
152
|
+
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
|
|
153
|
+
}
|
|
154
|
+
__list() {
|
|
155
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
156
|
+
var _a, _b, _c;
|
|
157
|
+
const { limit, cursor, searchQuery, sortBy } = request;
|
|
158
|
+
const _queryParams = {};
|
|
159
|
+
if (limit != null) {
|
|
160
|
+
_queryParams["limit"] = limit.toString();
|
|
161
|
+
}
|
|
162
|
+
if (cursor != null) {
|
|
163
|
+
_queryParams["cursor"] = cursor;
|
|
164
|
+
}
|
|
165
|
+
if (searchQuery != null) {
|
|
166
|
+
_queryParams["searchQuery"] = searchQuery;
|
|
167
|
+
}
|
|
168
|
+
if (sortBy != null) {
|
|
169
|
+
_queryParams["sortBy"] = sortBy;
|
|
170
|
+
}
|
|
171
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
172
|
+
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/projects"),
|
|
173
|
+
method: "GET",
|
|
174
|
+
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),
|
|
175
|
+
contentType: "application/json",
|
|
176
|
+
queryParameters: _queryParams,
|
|
177
|
+
requestType: "json",
|
|
178
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
179
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
180
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
181
|
+
});
|
|
182
|
+
if (_response.ok) {
|
|
183
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
184
|
+
}
|
|
185
|
+
if (_response.error.reason === "status-code") {
|
|
186
|
+
switch (_response.error.statusCode) {
|
|
187
|
+
case 401:
|
|
188
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
189
|
+
case 500:
|
|
190
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
191
|
+
default:
|
|
192
|
+
throw new errors.SyncError({
|
|
193
|
+
statusCode: _response.error.statusCode,
|
|
194
|
+
body: _response.error.body,
|
|
195
|
+
rawResponse: _response.rawResponse,
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
switch (_response.error.reason) {
|
|
200
|
+
case "non-json":
|
|
201
|
+
throw new errors.SyncError({
|
|
202
|
+
statusCode: _response.error.statusCode,
|
|
203
|
+
body: _response.error.rawBody,
|
|
204
|
+
rawResponse: _response.rawResponse,
|
|
205
|
+
});
|
|
206
|
+
case "timeout":
|
|
207
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/projects.");
|
|
208
|
+
case "unknown":
|
|
209
|
+
throw new errors.SyncError({
|
|
210
|
+
message: _response.error.errorMessage,
|
|
211
|
+
rawResponse: _response.rawResponse,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Retrieve a project by id.
|
|
218
|
+
*
|
|
219
|
+
* @param {Sync.ProjectId} id
|
|
220
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
221
|
+
*
|
|
222
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
223
|
+
* @throws {@link Sync.NotFoundError}
|
|
224
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
225
|
+
* @throws {@link Sync.InternalServerError}
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* await client.projects.get("612bb64a-e7f4-40c1-977b-3e9797845637")
|
|
229
|
+
*/
|
|
230
|
+
get(id, requestOptions) {
|
|
231
|
+
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
|
|
232
|
+
}
|
|
233
|
+
__get(id, requestOptions) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
var _a, _b, _c;
|
|
236
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
237
|
+
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/projects/${encodeURIComponent(id)}`),
|
|
238
|
+
method: "GET",
|
|
239
|
+
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),
|
|
240
|
+
contentType: "application/json",
|
|
241
|
+
requestType: "json",
|
|
242
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
243
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
244
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
245
|
+
});
|
|
246
|
+
if (_response.ok) {
|
|
247
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
248
|
+
}
|
|
249
|
+
if (_response.error.reason === "status-code") {
|
|
250
|
+
switch (_response.error.statusCode) {
|
|
251
|
+
case 401:
|
|
252
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
253
|
+
case 404:
|
|
254
|
+
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
255
|
+
case 422:
|
|
256
|
+
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
257
|
+
case 500:
|
|
258
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
259
|
+
default:
|
|
260
|
+
throw new errors.SyncError({
|
|
261
|
+
statusCode: _response.error.statusCode,
|
|
262
|
+
body: _response.error.body,
|
|
263
|
+
rawResponse: _response.rawResponse,
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
switch (_response.error.reason) {
|
|
268
|
+
case "non-json":
|
|
269
|
+
throw new errors.SyncError({
|
|
270
|
+
statusCode: _response.error.statusCode,
|
|
271
|
+
body: _response.error.rawBody,
|
|
272
|
+
rawResponse: _response.rawResponse,
|
|
273
|
+
});
|
|
274
|
+
case "timeout":
|
|
275
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/projects/{id}.");
|
|
276
|
+
case "unknown":
|
|
277
|
+
throw new errors.SyncError({
|
|
278
|
+
message: _response.error.errorMessage,
|
|
279
|
+
rawResponse: _response.rawResponse,
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Attach an existing asset to a project so it is grouped under the project alongside its generations. The asset must belong to your organization and not be deleted. This is idempotent — re-attaching an asset that is already linked succeeds without creating a duplicate. Returns 204 No Content on success.
|
|
286
|
+
*
|
|
287
|
+
* @param {Sync.ProjectId} id
|
|
288
|
+
* @param {Sync.AttachProjectAssetRequest} request
|
|
289
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
290
|
+
*
|
|
291
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
292
|
+
* @throws {@link Sync.NotFoundError}
|
|
293
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
294
|
+
* @throws {@link Sync.InternalServerError}
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* await client.projects.attachAsset("612bb64a-e7f4-40c1-977b-3e9797845637", {
|
|
298
|
+
* assetId: "8f14e45f-ceea-467d-9a1b-3e4d5c6f7a8b"
|
|
299
|
+
* })
|
|
300
|
+
*/
|
|
301
|
+
attachAsset(id, request, requestOptions) {
|
|
302
|
+
return core.HttpResponsePromise.fromPromise(this.__attachAsset(id, request, requestOptions));
|
|
303
|
+
}
|
|
304
|
+
__attachAsset(id, request, requestOptions) {
|
|
305
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
306
|
+
var _a, _b, _c;
|
|
307
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
308
|
+
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/projects/${encodeURIComponent(id)}/assets`),
|
|
309
|
+
method: "POST",
|
|
310
|
+
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),
|
|
311
|
+
contentType: "application/json",
|
|
312
|
+
requestType: "json",
|
|
313
|
+
body: request,
|
|
314
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
315
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
316
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
317
|
+
});
|
|
318
|
+
if (_response.ok) {
|
|
319
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
320
|
+
}
|
|
321
|
+
if (_response.error.reason === "status-code") {
|
|
322
|
+
switch (_response.error.statusCode) {
|
|
323
|
+
case 401:
|
|
324
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
325
|
+
case 404:
|
|
326
|
+
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
327
|
+
case 422:
|
|
328
|
+
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
329
|
+
case 500:
|
|
330
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
331
|
+
default:
|
|
332
|
+
throw new errors.SyncError({
|
|
333
|
+
statusCode: _response.error.statusCode,
|
|
334
|
+
body: _response.error.body,
|
|
335
|
+
rawResponse: _response.rawResponse,
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
switch (_response.error.reason) {
|
|
340
|
+
case "non-json":
|
|
341
|
+
throw new errors.SyncError({
|
|
342
|
+
statusCode: _response.error.statusCode,
|
|
343
|
+
body: _response.error.rawBody,
|
|
344
|
+
rawResponse: _response.rawResponse,
|
|
345
|
+
});
|
|
346
|
+
case "timeout":
|
|
347
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling POST /v2/projects/{id}/assets.");
|
|
348
|
+
case "unknown":
|
|
349
|
+
throw new errors.SyncError({
|
|
350
|
+
message: _response.error.errorMessage,
|
|
351
|
+
rawResponse: _response.rawResponse,
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Detach an asset from the project's draft content, such as its thumbnail. The asset remains in the project's asset library and keeps its access grants. Attaching it again restores the link. This operation is idempotent, including when the link is already detached or absent. Returns 204 No Content. An inaccessible project returns 404. An API key without an owner returns 422.
|
|
358
|
+
*
|
|
359
|
+
* @param {Sync.ProjectId} id
|
|
360
|
+
* @param {Sync.AssetId} assetId
|
|
361
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
362
|
+
*
|
|
363
|
+
* @throws {@link Sync.BadRequestError}
|
|
364
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
365
|
+
* @throws {@link Sync.NotFoundError}
|
|
366
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
367
|
+
* @throws {@link Sync.InternalServerError}
|
|
368
|
+
*
|
|
369
|
+
* @example
|
|
370
|
+
* await client.projects.detachAsset("id", "assetId")
|
|
371
|
+
*/
|
|
372
|
+
detachAsset(id, assetId, requestOptions) {
|
|
373
|
+
return core.HttpResponsePromise.fromPromise(this.__detachAsset(id, assetId, requestOptions));
|
|
374
|
+
}
|
|
375
|
+
__detachAsset(id, assetId, requestOptions) {
|
|
376
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
377
|
+
var _a, _b, _c;
|
|
378
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
379
|
+
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/projects/${encodeURIComponent(id)}/assets/${encodeURIComponent(assetId)}`),
|
|
380
|
+
method: "DELETE",
|
|
381
|
+
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),
|
|
382
|
+
contentType: "application/json",
|
|
383
|
+
requestType: "json",
|
|
384
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
385
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
386
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
387
|
+
});
|
|
388
|
+
if (_response.ok) {
|
|
389
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
390
|
+
}
|
|
391
|
+
if (_response.error.reason === "status-code") {
|
|
392
|
+
switch (_response.error.statusCode) {
|
|
393
|
+
case 400:
|
|
394
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
395
|
+
case 401:
|
|
396
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
397
|
+
case 404:
|
|
398
|
+
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
399
|
+
case 422:
|
|
400
|
+
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
401
|
+
case 500:
|
|
402
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
403
|
+
default:
|
|
404
|
+
throw new errors.SyncError({
|
|
405
|
+
statusCode: _response.error.statusCode,
|
|
406
|
+
body: _response.error.body,
|
|
407
|
+
rawResponse: _response.rawResponse,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
switch (_response.error.reason) {
|
|
412
|
+
case "non-json":
|
|
413
|
+
throw new errors.SyncError({
|
|
414
|
+
statusCode: _response.error.statusCode,
|
|
415
|
+
body: _response.error.rawBody,
|
|
416
|
+
rawResponse: _response.rawResponse,
|
|
417
|
+
});
|
|
418
|
+
case "timeout":
|
|
419
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling DELETE /v2/projects/{id}/assets/{assetId}.");
|
|
420
|
+
case "unknown":
|
|
421
|
+
throw new errors.SyncError({
|
|
422
|
+
message: _response.error.errorMessage,
|
|
423
|
+
rawResponse: _response.rawResponse,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Update a project's name, description, visibility, or mode. Only the fields you provide are changed.
|
|
430
|
+
*
|
|
431
|
+
* @param {Sync.ProjectId} id
|
|
432
|
+
* @param {Sync.UpdateProjectRequest} request
|
|
433
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
434
|
+
*
|
|
435
|
+
* @throws {@link Sync.BadRequestError}
|
|
436
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
437
|
+
* @throws {@link Sync.NotFoundError}
|
|
438
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
439
|
+
* @throws {@link Sync.InternalServerError}
|
|
440
|
+
*
|
|
441
|
+
* @example
|
|
442
|
+
* await client.projects.update("612bb64a-e7f4-40c1-977b-3e9797845637", {
|
|
443
|
+
* name: "Renamed Project"
|
|
444
|
+
* })
|
|
445
|
+
*/
|
|
446
|
+
update(id, request, requestOptions) {
|
|
447
|
+
return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
|
|
448
|
+
}
|
|
449
|
+
__update(id, request, requestOptions) {
|
|
450
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
451
|
+
var _a, _b, _c;
|
|
452
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
453
|
+
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/projects/${encodeURIComponent(id)}`),
|
|
454
|
+
method: "PATCH",
|
|
455
|
+
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),
|
|
456
|
+
contentType: "application/json",
|
|
457
|
+
requestType: "json",
|
|
458
|
+
body: request,
|
|
459
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
460
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
461
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
462
|
+
});
|
|
463
|
+
if (_response.ok) {
|
|
464
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
465
|
+
}
|
|
466
|
+
if (_response.error.reason === "status-code") {
|
|
467
|
+
switch (_response.error.statusCode) {
|
|
468
|
+
case 400:
|
|
469
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
470
|
+
case 401:
|
|
471
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
472
|
+
case 404:
|
|
473
|
+
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
474
|
+
case 422:
|
|
475
|
+
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
476
|
+
case 500:
|
|
477
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
478
|
+
default:
|
|
479
|
+
throw new errors.SyncError({
|
|
480
|
+
statusCode: _response.error.statusCode,
|
|
481
|
+
body: _response.error.body,
|
|
482
|
+
rawResponse: _response.rawResponse,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
switch (_response.error.reason) {
|
|
487
|
+
case "non-json":
|
|
488
|
+
throw new errors.SyncError({
|
|
489
|
+
statusCode: _response.error.statusCode,
|
|
490
|
+
body: _response.error.rawBody,
|
|
491
|
+
rawResponse: _response.rawResponse,
|
|
492
|
+
});
|
|
493
|
+
case "timeout":
|
|
494
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling PATCH /v2/projects/{id}.");
|
|
495
|
+
case "unknown":
|
|
496
|
+
throw new errors.SyncError({
|
|
497
|
+
message: _response.error.errorMessage,
|
|
498
|
+
rawResponse: _response.rawResponse,
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Delete a project. A project can't be deleted while any of its generations are queued or processing — wait for those to finish, then retry. Deletion soft-deletes the project and its generations, removes its asset links, and soft-deletes assets with no other active project. Assets linked to another active project are retained.
|
|
505
|
+
*
|
|
506
|
+
* @param {Sync.ProjectId} id
|
|
507
|
+
* @param {Projects.RequestOptions} requestOptions - Request-specific configuration.
|
|
508
|
+
*
|
|
509
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
510
|
+
* @throws {@link Sync.NotFoundError}
|
|
511
|
+
* @throws {@link Sync.ConflictError}
|
|
512
|
+
* @throws {@link Sync.UnprocessableEntityError}
|
|
513
|
+
* @throws {@link Sync.InternalServerError}
|
|
514
|
+
*
|
|
515
|
+
* @example
|
|
516
|
+
* await client.projects.delete("612bb64a-e7f4-40c1-977b-3e9797845637")
|
|
517
|
+
*/
|
|
518
|
+
delete(id, requestOptions) {
|
|
519
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
|
|
520
|
+
}
|
|
521
|
+
__delete(id, requestOptions) {
|
|
522
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
523
|
+
var _a, _b, _c;
|
|
524
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
525
|
+
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/projects/${encodeURIComponent(id)}`),
|
|
526
|
+
method: "DELETE",
|
|
527
|
+
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),
|
|
528
|
+
contentType: "application/json",
|
|
529
|
+
requestType: "json",
|
|
530
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
531
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
532
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
533
|
+
});
|
|
534
|
+
if (_response.ok) {
|
|
535
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
536
|
+
}
|
|
537
|
+
if (_response.error.reason === "status-code") {
|
|
538
|
+
switch (_response.error.statusCode) {
|
|
539
|
+
case 401:
|
|
540
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
541
|
+
case 404:
|
|
542
|
+
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
543
|
+
case 409:
|
|
544
|
+
throw new Sync.ConflictError(_response.error.body, _response.rawResponse);
|
|
545
|
+
case 422:
|
|
546
|
+
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
547
|
+
case 500:
|
|
548
|
+
throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
|
|
549
|
+
default:
|
|
550
|
+
throw new errors.SyncError({
|
|
551
|
+
statusCode: _response.error.statusCode,
|
|
552
|
+
body: _response.error.body,
|
|
553
|
+
rawResponse: _response.rawResponse,
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
switch (_response.error.reason) {
|
|
558
|
+
case "non-json":
|
|
559
|
+
throw new errors.SyncError({
|
|
560
|
+
statusCode: _response.error.statusCode,
|
|
561
|
+
body: _response.error.rawBody,
|
|
562
|
+
rawResponse: _response.rawResponse,
|
|
563
|
+
});
|
|
564
|
+
case "timeout":
|
|
565
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling DELETE /v2/projects/{id}.");
|
|
566
|
+
case "unknown":
|
|
567
|
+
throw new errors.SyncError({
|
|
568
|
+
message: _response.error.errorMessage,
|
|
569
|
+
rawResponse: _response.rawResponse,
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
_getCustomAuthorizationHeaders() {
|
|
575
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
576
|
+
var _a;
|
|
577
|
+
const apiKeyValue = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["SYNC_API_KEY"];
|
|
578
|
+
return { "x-api-key": apiKeyValue };
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
exports.Projects = Projects;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
* limit: 10,
|
|
9
|
+
* sortBy: "updatedAt"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface ListProjectsRequest {
|
|
13
|
+
/**
|
|
14
|
+
* Maximum number of projects to return (1-100). Defaults to 10.
|
|
15
|
+
*/
|
|
16
|
+
limit?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Cursor for pagination.
|
|
19
|
+
*/
|
|
20
|
+
cursor?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Search projects by name.
|
|
23
|
+
*/
|
|
24
|
+
searchQuery?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Sort order for the results. Defaults to updatedAt.
|
|
27
|
+
*/
|
|
28
|
+
sortBy?: Sync.ProjectSort;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type ListProjectsRequest } from "./ListProjectsRequest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|