@sync.so/sdk 0.3.0 → 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.
Files changed (758) hide show
  1. package/Client.d.ts +28 -1
  2. package/Client.js +53 -8
  3. package/api/resources/account/client/Client.d.ts +45 -0
  4. package/api/resources/account/client/Client.js +130 -0
  5. package/api/resources/account/client/index.d.ts +1 -0
  6. package/api/resources/account/client/index.js +2 -0
  7. package/api/resources/account/index.d.ts +2 -0
  8. package/api/resources/account/index.js +18 -0
  9. package/api/resources/account/types/AccountActiveJobs.d.ts +9 -0
  10. package/api/resources/account/types/AccountActiveJobs.js +5 -0
  11. package/api/resources/account/types/AccountAllowanceUsage.d.ts +11 -0
  12. package/api/resources/account/types/AccountAllowanceUsage.js +5 -0
  13. package/api/resources/account/types/AccountBillingModel.d.ts +10 -0
  14. package/api/resources/account/types/AccountBillingModel.js +12 -0
  15. package/api/resources/account/types/AccountBillingPeriod.d.ts +7 -0
  16. package/api/resources/account/types/AccountBillingPeriod.js +5 -0
  17. package/api/resources/account/types/AccountCredentialType.d.ts +9 -0
  18. package/api/resources/account/types/AccountCredentialType.js +11 -0
  19. package/api/resources/account/types/AccountCredits.d.ts +11 -0
  20. package/api/resources/account/types/AccountCredits.js +5 -0
  21. package/api/resources/account/types/AccountFreeAllowance.d.ts +12 -0
  22. package/api/resources/account/types/AccountFreeAllowance.js +5 -0
  23. package/api/resources/account/types/AccountLimits.d.ts +13 -0
  24. package/api/resources/account/types/AccountLimits.js +5 -0
  25. package/api/resources/account/types/AccountOrganization.d.ts +9 -0
  26. package/api/resources/account/types/AccountOrganization.js +5 -0
  27. package/api/resources/account/types/AccountOverview.d.ts +31 -0
  28. package/api/resources/account/types/AccountOverview.js +5 -0
  29. package/api/resources/account/types/AccountPlan.d.ts +9 -0
  30. package/api/resources/account/types/AccountPlan.js +5 -0
  31. package/api/resources/account/types/AccountUser.d.ts +8 -0
  32. package/api/resources/account/types/AccountUser.js +5 -0
  33. package/api/resources/account/types/index.d.ts +12 -0
  34. package/api/resources/account/types/index.js +28 -0
  35. package/api/resources/assets/client/Client.d.ts +80 -1
  36. package/api/resources/assets/client/Client.js +296 -2
  37. package/api/resources/batch/client/Client.d.ts +283 -2
  38. package/api/resources/batch/client/Client.js +342 -4
  39. package/api/resources/batch/client/requests/CreateBatchFromRowsRequest.d.ts +279 -0
  40. package/api/resources/batch/client/requests/CreateBatchFromRowsRequest.js +5 -0
  41. package/api/resources/batch/client/requests/CreateBatchRequest.d.ts +2 -2
  42. package/api/resources/batch/client/requests/index.d.ts +1 -0
  43. package/api/resources/common/errors/ConflictError.d.ts +9 -0
  44. package/api/resources/common/errors/ConflictError.js +52 -0
  45. package/api/resources/common/errors/ForbiddenError.d.ts +9 -0
  46. package/api/resources/common/errors/ForbiddenError.js +52 -0
  47. package/api/resources/common/errors/GatewayTimeoutError.d.ts +9 -0
  48. package/api/resources/common/errors/GatewayTimeoutError.js +52 -0
  49. package/api/resources/common/errors/GenerationDeletedError.d.ts +9 -0
  50. package/api/resources/common/errors/GenerationDeletedError.js +52 -0
  51. package/api/resources/common/errors/GenerationTooManyRequestsError.d.ts +9 -0
  52. package/api/resources/common/errors/GenerationTooManyRequestsError.js +52 -0
  53. package/api/resources/common/errors/PayloadTooLargeError.d.ts +9 -0
  54. package/api/resources/common/errors/PayloadTooLargeError.js +52 -0
  55. package/api/resources/common/errors/ServiceUnavailableError.d.ts +9 -0
  56. package/api/resources/common/errors/ServiceUnavailableError.js +52 -0
  57. package/api/resources/common/errors/TooManyRequestsError.d.ts +1 -1
  58. package/api/resources/common/errors/UnprocessableEntityError.d.ts +9 -0
  59. package/api/resources/common/errors/UnprocessableEntityError.js +52 -0
  60. package/api/resources/common/errors/VoiceCloneTooManyRequestsError.d.ts +9 -0
  61. package/api/resources/common/errors/VoiceCloneTooManyRequestsError.js +52 -0
  62. package/api/resources/common/errors/index.d.ts +9 -0
  63. package/api/resources/common/errors/index.js +9 -0
  64. package/api/resources/common/types/ActiveSpeaker.d.ts +7 -1
  65. package/api/resources/common/types/Asset.d.ts +4 -0
  66. package/api/resources/common/types/AssetInputType.d.ts +8 -1
  67. package/api/resources/common/types/AssetInputType.js +7 -0
  68. package/api/resources/common/types/AssetUploadResponse.d.ts +14 -0
  69. package/api/resources/common/types/AssetUploadResponse.js +5 -0
  70. package/api/resources/common/types/AttachProjectAssetRequest.d.ts +11 -0
  71. package/api/resources/common/types/AttachProjectAssetRequest.js +5 -0
  72. package/api/resources/common/types/BatchConcurrencyError.d.ts +23 -0
  73. package/api/resources/common/types/BatchConcurrencyError.js +5 -0
  74. package/api/resources/common/types/BatchResponse.d.ts +2 -2
  75. package/api/resources/common/types/BatchRow.d.ts +15 -0
  76. package/api/resources/common/types/BatchRow.js +5 -0
  77. package/api/resources/common/types/BlendingMode.d.ts +9 -0
  78. package/api/resources/common/types/BlendingMode.js +11 -0
  79. package/api/resources/common/types/ClonedVoiceResponse.d.ts +14 -0
  80. package/api/resources/common/types/ClonedVoiceResponse.js +5 -0
  81. package/api/resources/common/types/CreateAssetRequest.d.ts +33 -0
  82. package/api/resources/common/types/CreateAssetRequest.js +5 -0
  83. package/api/resources/common/types/CreateAssetUploadRequest.d.ts +14 -0
  84. package/api/resources/common/types/CreateAssetUploadRequest.js +5 -0
  85. package/api/resources/common/types/CreateDialogueEditDto.d.ts +27 -0
  86. package/api/resources/common/types/CreateDialogueEditDto.js +5 -0
  87. package/api/resources/common/types/CreateGenerationDto.d.ts +11 -3
  88. package/api/resources/common/types/CreateProjectRequest.d.ts +21 -0
  89. package/api/resources/common/types/CreateProjectRequest.js +5 -0
  90. package/api/resources/common/types/CreateTranscriptionDto.d.ts +21 -0
  91. package/api/resources/common/types/CreateTranscriptionDto.js +5 -0
  92. package/api/resources/common/types/CreateTtsRequest.d.ts +19 -0
  93. package/api/resources/common/types/CreateTtsRequest.js +5 -0
  94. package/api/resources/common/types/CreateVoiceRequest.d.ts +19 -0
  95. package/api/resources/common/types/CreateVoiceRequest.js +5 -0
  96. package/api/resources/common/types/CreatorWorkflow.d.ts +37 -0
  97. package/api/resources/common/types/CreatorWorkflow.js +15 -0
  98. package/api/resources/common/types/DeleteAssetResponse.d.ts +11 -0
  99. package/api/resources/common/types/DeleteAssetResponse.js +5 -0
  100. package/api/resources/common/types/DeleteProjectResponse.d.ts +11 -0
  101. package/api/resources/common/types/DeleteProjectResponse.js +5 -0
  102. package/api/resources/common/types/DialogueEditChange.d.ts +14 -0
  103. package/api/resources/common/types/DialogueEditChange.js +5 -0
  104. package/api/resources/common/types/DialogueEditError.d.ts +15 -0
  105. package/api/resources/common/types/DialogueEditError.js +5 -0
  106. package/api/resources/common/types/DialogueEditErrorCode.d.ts +18 -0
  107. package/api/resources/common/types/DialogueEditErrorCode.js +17 -0
  108. package/api/resources/common/types/DialogueEditFailedSlot.d.ts +9 -0
  109. package/api/resources/common/types/DialogueEditFailedSlot.js +5 -0
  110. package/api/resources/common/types/DialogueEditJob.d.ts +49 -0
  111. package/api/resources/common/types/DialogueEditJob.js +5 -0
  112. package/api/resources/common/types/DialogueEditJobId.d.ts +7 -0
  113. package/api/resources/common/types/DialogueEditJobId.js +5 -0
  114. package/api/resources/common/types/DialogueEditJobStatus.d.ts +14 -0
  115. package/api/resources/common/types/DialogueEditJobStatus.js +13 -0
  116. package/api/resources/common/types/DialogueEditOperation.d.ts +16 -0
  117. package/api/resources/common/types/DialogueEditOperation.js +5 -0
  118. package/api/resources/common/types/DialogueEditPartialDetail.d.ts +17 -0
  119. package/api/resources/common/types/DialogueEditPartialDetail.js +5 -0
  120. package/api/resources/common/types/DialogueEditReference.d.ts +11 -0
  121. package/api/resources/common/types/DialogueEditReference.js +5 -0
  122. package/api/resources/common/types/DialogueEditRemoval.d.ts +10 -0
  123. package/api/resources/common/types/DialogueEditRemoval.js +5 -0
  124. package/api/resources/common/types/DialogueEditResultSlot.d.ts +19 -0
  125. package/api/resources/common/types/DialogueEditResultSlot.js +5 -0
  126. package/api/resources/common/types/DialogueEditResultSlotKind.d.ts +12 -0
  127. package/api/resources/common/types/DialogueEditResultSlotKind.js +11 -0
  128. package/api/resources/common/types/DialogueEditRetimeFailureSection.d.ts +14 -0
  129. package/api/resources/common/types/DialogueEditRetimeFailureSection.js +5 -0
  130. package/api/resources/common/types/DubDto.d.ts +17 -0
  131. package/api/resources/common/types/DubDto.js +5 -0
  132. package/api/resources/common/types/DubLanguage.d.ts +105 -0
  133. package/api/resources/common/types/DubLanguage.js +101 -0
  134. package/api/resources/common/types/DubProviderName.d.ts +10 -0
  135. package/api/resources/common/types/DubProviderName.js +9 -0
  136. package/api/resources/common/types/DubSourceLanguage.d.ts +106 -0
  137. package/api/resources/common/types/DubSourceLanguage.js +102 -0
  138. package/api/resources/common/types/ErrorCatalogEntry.d.ts +14 -0
  139. package/api/resources/common/types/ErrorCatalogEntry.js +5 -0
  140. package/api/resources/common/types/EstimateBreakdown.d.ts +13 -0
  141. package/api/resources/common/types/EstimateBreakdown.js +5 -0
  142. package/api/resources/common/types/EstimateCostRequest.d.ts +16 -0
  143. package/api/resources/common/types/EstimateCostRequest.js +5 -0
  144. package/api/resources/common/types/EstimateDubbingBilling.d.ts +10 -0
  145. package/api/resources/common/types/EstimateDubbingBilling.js +12 -0
  146. package/api/resources/common/types/EstimateDubbingPart.d.ts +12 -0
  147. package/api/resources/common/types/EstimateDubbingPart.js +5 -0
  148. package/api/resources/common/types/EstimateDurationCheck.d.ts +22 -0
  149. package/api/resources/common/types/EstimateDurationCheck.js +5 -0
  150. package/api/resources/common/types/EstimateLipsyncPart.d.ts +9 -0
  151. package/api/resources/common/types/EstimateLipsyncPart.js +5 -0
  152. package/api/resources/common/types/EstimateWorkflow.d.ts +11 -0
  153. package/api/resources/common/types/{ModelType.js → EstimateWorkflow.js} +3 -3
  154. package/api/resources/common/types/EstimatedGenerationCost.d.ts +7 -0
  155. package/api/resources/common/types/Generation.d.ts +12 -2
  156. package/api/resources/common/types/GenerationConcurrencyError.d.ts +21 -0
  157. package/api/resources/common/types/GenerationConcurrencyError.js +5 -0
  158. package/api/resources/common/types/GenerationError.d.ts +16 -0
  159. package/api/resources/common/types/GenerationEstimate.d.ts +39 -0
  160. package/api/resources/common/types/GenerationEstimate.js +5 -0
  161. package/api/resources/common/types/GenerationEstimateConfidence.d.ts +12 -0
  162. package/api/resources/common/types/GenerationEstimateConfidence.js +11 -0
  163. package/api/resources/common/types/GenerationEstimateResolutionSource.d.ts +12 -0
  164. package/api/resources/common/types/GenerationEstimateResolutionSource.js +11 -0
  165. package/api/resources/common/types/GenerationEstimateScope.d.ts +11 -0
  166. package/api/resources/common/types/GenerationEstimateScope.js +10 -0
  167. package/api/resources/common/types/GenerationEstimateSource.d.ts +15 -0
  168. package/api/resources/common/types/GenerationEstimateSource.js +14 -0
  169. package/api/resources/common/types/GenerationOptions.d.ts +22 -4
  170. package/api/resources/common/types/GenerationSegment.d.ts +14 -6
  171. package/api/resources/common/types/Image.d.ts +16 -0
  172. package/api/resources/common/types/Image.js +5 -0
  173. package/api/resources/common/types/Input.d.ts +1 -1
  174. package/api/resources/common/types/Model.d.ts +2 -2
  175. package/api/resources/common/types/Model.js +1 -1
  176. package/api/resources/common/types/ModelInfo.d.ts +3 -2
  177. package/api/resources/common/types/OutputAudio.d.ts +10 -0
  178. package/api/resources/common/types/OutputAudio.js +5 -0
  179. package/api/resources/common/types/OutputFormat.d.ts +8 -0
  180. package/api/resources/common/types/OutputFormat.js +10 -0
  181. package/api/resources/common/types/PaginatedProjectsResponse.d.ts +13 -0
  182. package/api/resources/common/types/PaginatedProjectsResponse.js +5 -0
  183. package/api/resources/common/types/Project.d.ts +24 -0
  184. package/api/resources/common/types/Project.js +5 -0
  185. package/api/resources/common/types/ProjectGeneration.d.ts +41 -0
  186. package/api/resources/common/types/ProjectGeneration.js +5 -0
  187. package/api/resources/common/types/ProjectGenerationError.d.ts +9 -0
  188. package/api/resources/common/types/ProjectGenerationError.js +5 -0
  189. package/api/resources/common/types/ProjectGenerationInput.d.ts +18 -0
  190. package/api/resources/common/types/ProjectGenerationInput.js +5 -0
  191. package/api/resources/common/types/ProjectGenerationModel.d.ts +12 -0
  192. package/api/resources/common/types/ProjectGenerationModel.js +5 -0
  193. package/api/resources/common/types/ProjectGenerationProvider.d.ts +10 -0
  194. package/api/resources/common/types/ProjectGenerationProvider.js +5 -0
  195. package/api/resources/common/types/ProjectGenerationSegment.d.ts +14 -0
  196. package/api/resources/common/types/ProjectGenerationSegment.js +5 -0
  197. package/api/resources/common/types/ProjectId.d.ts +7 -0
  198. package/api/resources/common/types/ProjectId.js +5 -0
  199. package/api/resources/common/types/ProjectListItem.d.ts +28 -0
  200. package/api/resources/common/types/ProjectListItem.js +5 -0
  201. package/api/resources/common/types/ProjectMode.d.ts +11 -0
  202. package/api/resources/common/types/ProjectMode.js +10 -0
  203. package/api/resources/common/types/ProjectSort.d.ts +11 -0
  204. package/api/resources/common/types/ProjectSort.js +10 -0
  205. package/api/resources/common/types/ProjectVisibility.d.ts +17 -0
  206. package/api/resources/common/types/ProjectVisibility.js +10 -0
  207. package/api/resources/common/types/SegmentAudioInput.d.ts +2 -2
  208. package/api/resources/common/types/SegmentOptionsOverride.d.ts +17 -0
  209. package/api/resources/common/types/SegmentOptionsOverride.js +5 -0
  210. package/api/resources/common/types/SyncMode.d.ts +1 -1
  211. package/api/resources/common/types/Transcript.d.ts +13 -0
  212. package/api/resources/common/types/Transcript.js +5 -0
  213. package/api/resources/common/types/TranscriptSegment.d.ts +13 -0
  214. package/api/resources/common/types/TranscriptSegment.js +5 -0
  215. package/api/resources/common/types/TranscriptWord.d.ts +16 -0
  216. package/api/resources/common/types/TranscriptWord.js +5 -0
  217. package/api/resources/common/types/TranscriptionDifficulty.d.ts +13 -0
  218. package/api/resources/common/types/TranscriptionDifficulty.js +5 -0
  219. package/api/resources/common/types/TranscriptionDifficultyReason.d.ts +17 -0
  220. package/api/resources/common/types/TranscriptionDifficultyReason.js +16 -0
  221. package/api/resources/common/types/TranscriptionDifficultyTier.d.ts +12 -0
  222. package/api/resources/common/types/TranscriptionDifficultyTier.js +11 -0
  223. package/api/resources/common/types/TranscriptionError.d.ts +13 -0
  224. package/api/resources/common/types/TranscriptionError.js +5 -0
  225. package/api/resources/common/types/TranscriptionErrorCode.d.ts +16 -0
  226. package/api/resources/common/types/TranscriptionErrorCode.js +15 -0
  227. package/api/resources/common/types/TranscriptionJob.d.ts +35 -0
  228. package/api/resources/common/types/TranscriptionJob.js +5 -0
  229. package/api/resources/common/types/TranscriptionJobId.d.ts +7 -0
  230. package/api/resources/common/types/TranscriptionJobId.js +5 -0
  231. package/api/resources/common/types/TranscriptionJobStatus.d.ts +13 -0
  232. package/api/resources/common/types/TranscriptionJobStatus.js +12 -0
  233. package/api/resources/common/types/TtsGenerationResponse.d.ts +14 -0
  234. package/api/resources/common/types/TtsGenerationResponse.js +5 -0
  235. package/api/resources/common/types/TtsJob.d.ts +25 -0
  236. package/api/resources/common/types/TtsJob.js +5 -0
  237. package/api/resources/common/types/TtsJobError.d.ts +13 -0
  238. package/api/resources/common/types/TtsJobError.js +5 -0
  239. package/api/resources/common/types/TtsJobErrorCode.d.ts +16 -0
  240. package/api/resources/common/types/TtsJobErrorCode.js +15 -0
  241. package/api/resources/common/types/TtsJobStatus.d.ts +13 -0
  242. package/api/resources/common/types/TtsJobStatus.js +12 -0
  243. package/api/resources/common/types/UpdateAssetRequest.d.ts +23 -0
  244. package/api/resources/common/types/UpdateAssetRequest.js +5 -0
  245. package/api/resources/common/types/UpdateProjectRequest.d.ts +17 -0
  246. package/api/resources/common/types/UpdateProjectRequest.js +5 -0
  247. package/api/resources/common/types/Video.d.ts +2 -0
  248. package/api/resources/common/types/Voice.d.ts +23 -0
  249. package/api/resources/common/types/Voice.js +5 -0
  250. package/api/resources/common/types/VoiceCloneRateLimitError.d.ts +16 -0
  251. package/api/resources/common/types/VoiceCloneRateLimitError.js +5 -0
  252. package/api/resources/common/types/VoiceProvider.d.ts +10 -0
  253. package/api/resources/common/types/VoiceProvider.js +9 -0
  254. package/api/resources/common/types/VoiceRestriction.d.ts +11 -0
  255. package/api/resources/common/types/VoiceRestriction.js +10 -0
  256. package/api/resources/common/types/index.d.ts +87 -1
  257. package/api/resources/common/types/index.js +87 -1
  258. package/api/resources/dialogueEdits/client/Client.d.ts +95 -0
  259. package/api/resources/dialogueEdits/client/Client.js +241 -0
  260. package/api/resources/dialogueEdits/client/index.d.ts +1 -0
  261. package/api/resources/dialogueEdits/client/index.js +2 -0
  262. package/api/resources/dialogueEdits/index.d.ts +1 -0
  263. package/api/resources/dialogueEdits/index.js +17 -0
  264. package/api/resources/errors/client/Client.d.ts +44 -0
  265. package/api/resources/errors/client/Client.js +127 -0
  266. package/api/resources/errors/client/index.d.ts +1 -0
  267. package/api/resources/errors/client/index.js +2 -0
  268. package/api/resources/errors/index.d.ts +1 -0
  269. package/api/resources/errors/index.js +17 -0
  270. package/api/resources/feedback/client/Client.d.ts +55 -0
  271. package/api/resources/feedback/client/Client.js +145 -0
  272. package/api/resources/feedback/client/index.d.ts +1 -0
  273. package/api/resources/feedback/client/index.js +17 -0
  274. package/api/resources/feedback/client/requests/SubmitFeedbackRequest.d.ts +37 -0
  275. package/api/resources/feedback/client/requests/SubmitFeedbackRequest.js +5 -0
  276. package/api/resources/feedback/client/requests/index.d.ts +1 -0
  277. package/api/resources/feedback/client/requests/index.js +2 -0
  278. package/api/resources/feedback/errors/FeedbackTooManyRequestsError.d.ts +9 -0
  279. package/api/resources/feedback/errors/FeedbackTooManyRequestsError.js +52 -0
  280. package/api/resources/feedback/errors/index.d.ts +1 -0
  281. package/api/resources/feedback/errors/index.js +17 -0
  282. package/api/resources/feedback/index.d.ts +3 -0
  283. package/api/resources/feedback/index.js +19 -0
  284. package/api/resources/feedback/types/FeedbackClient.d.ts +9 -0
  285. package/api/resources/feedback/types/FeedbackClient.js +5 -0
  286. package/api/resources/feedback/types/FeedbackKind.d.ts +12 -0
  287. package/api/resources/feedback/types/FeedbackKind.js +14 -0
  288. package/api/resources/feedback/types/FeedbackRateLimitError.d.ts +16 -0
  289. package/api/resources/feedback/types/FeedbackRateLimitError.js +5 -0
  290. package/api/resources/feedback/types/FeedbackReceipt.d.ts +9 -0
  291. package/api/resources/feedback/types/FeedbackReceipt.js +5 -0
  292. package/api/resources/feedback/types/FeedbackSeverity.d.ts +9 -0
  293. package/api/resources/feedback/types/FeedbackSeverity.js +11 -0
  294. package/api/resources/feedback/types/FeedbackSource.d.ts +8 -0
  295. package/api/resources/feedback/types/FeedbackSource.js +10 -0
  296. package/api/resources/feedback/types/index.d.ts +6 -0
  297. package/api/resources/feedback/types/index.js +22 -0
  298. package/api/resources/generations/client/Client.d.ts +149 -19
  299. package/api/resources/generations/client/Client.js +366 -30
  300. package/api/resources/generations/client/requests/CreateGenerationJsonRequest.d.ts +51 -0
  301. package/api/resources/generations/client/requests/CreateGenerationJsonRequest.js +5 -0
  302. package/api/resources/generations/client/requests/CreateGenerationRequest.d.ts +13 -1
  303. package/api/resources/generations/client/requests/GetGenerationDownloadRequest.d.ts +17 -0
  304. package/api/resources/generations/client/requests/GetGenerationDownloadRequest.js +5 -0
  305. package/api/resources/generations/client/requests/GetGenerationRequest.d.ts +21 -0
  306. package/api/resources/generations/client/requests/GetGenerationRequest.js +5 -0
  307. package/api/resources/generations/client/requests/ListGenerationsRequest.d.ts +16 -0
  308. package/api/resources/generations/client/requests/index.d.ts +3 -0
  309. package/api/resources/index.d.ts +18 -0
  310. package/api/resources/index.js +19 -1
  311. package/api/resources/models/client/Client.d.ts +1 -1
  312. package/api/resources/models/client/Client.js +1 -1
  313. package/api/resources/organizations/client/Client.d.ts +46 -0
  314. package/api/resources/organizations/client/Client.js +137 -0
  315. package/api/resources/organizations/client/index.d.ts +1 -0
  316. package/api/resources/organizations/client/index.js +17 -0
  317. package/api/resources/organizations/client/requests/GetWebhookSecretRequest.d.ts +13 -0
  318. package/api/resources/organizations/client/requests/GetWebhookSecretRequest.js +5 -0
  319. package/api/resources/organizations/client/requests/index.d.ts +1 -0
  320. package/api/resources/organizations/client/requests/index.js +2 -0
  321. package/api/resources/organizations/index.d.ts +2 -0
  322. package/api/resources/organizations/index.js +18 -0
  323. package/api/resources/organizations/types/WebhookSecretResponse.d.ts +10 -0
  324. package/api/resources/organizations/types/WebhookSecretResponse.js +5 -0
  325. package/api/resources/organizations/types/index.d.ts +1 -0
  326. package/api/resources/organizations/types/index.js +17 -0
  327. package/api/resources/projects/client/Client.d.ts +159 -0
  328. package/api/resources/projects/client/Client.js +582 -0
  329. package/api/resources/projects/client/index.d.ts +1 -0
  330. package/api/resources/projects/client/index.js +17 -0
  331. package/api/resources/projects/client/requests/ListProjectsRequest.d.ts +29 -0
  332. package/api/resources/projects/client/requests/ListProjectsRequest.js +5 -0
  333. package/api/resources/projects/client/requests/index.d.ts +1 -0
  334. package/api/resources/projects/client/requests/index.js +2 -0
  335. package/api/resources/projects/index.d.ts +1 -0
  336. package/api/resources/projects/index.js +17 -0
  337. package/api/resources/transcriptions/client/Client.d.ts +67 -0
  338. package/api/resources/transcriptions/client/Client.js +209 -0
  339. package/api/resources/transcriptions/client/index.d.ts +1 -0
  340. package/api/resources/transcriptions/client/index.js +2 -0
  341. package/api/resources/transcriptions/index.d.ts +1 -0
  342. package/api/resources/transcriptions/index.js +17 -0
  343. package/api/resources/tts/client/Client.d.ts +93 -0
  344. package/api/resources/tts/client/Client.js +306 -0
  345. package/api/resources/tts/client/index.d.ts +1 -0
  346. package/api/resources/tts/client/index.js +17 -0
  347. package/api/resources/tts/client/requests/SubmitTtsJobRequest.d.ts +18 -0
  348. package/api/resources/tts/client/requests/SubmitTtsJobRequest.js +5 -0
  349. package/api/resources/tts/client/requests/index.d.ts +1 -0
  350. package/api/resources/tts/client/requests/index.js +2 -0
  351. package/api/resources/tts/index.d.ts +1 -0
  352. package/api/resources/tts/index.js +17 -0
  353. package/api/resources/voices/client/Client.d.ts +107 -0
  354. package/api/resources/voices/client/Client.js +369 -0
  355. package/api/resources/voices/client/index.d.ts +1 -0
  356. package/api/resources/voices/client/index.js +17 -0
  357. package/api/resources/voices/client/requests/GetVoiceRequest.d.ts +14 -0
  358. package/api/resources/voices/client/requests/GetVoiceRequest.js +5 -0
  359. package/api/resources/voices/client/requests/ListVoicesRequest.d.ts +14 -0
  360. package/api/resources/voices/client/requests/ListVoicesRequest.js +5 -0
  361. package/api/resources/voices/client/requests/index.d.ts +2 -0
  362. package/api/resources/voices/client/requests/index.js +2 -0
  363. package/api/resources/voices/index.d.ts +1 -0
  364. package/api/resources/voices/index.js +17 -0
  365. package/api/resources/webhooks/types/BatchNotification.d.ts +21 -0
  366. package/api/resources/webhooks/types/BatchNotification.js +5 -0
  367. package/api/resources/webhooks/types/BatchNotificationMetrics.d.ts +13 -0
  368. package/api/resources/webhooks/types/BatchNotificationMetrics.js +5 -0
  369. package/api/resources/webhooks/types/GenerationNotification.d.ts +14 -16
  370. package/api/resources/webhooks/types/WebhookStatus.d.ts +3 -2
  371. package/api/resources/webhooks/types/WebhookStatus.js +1 -0
  372. package/api/resources/webhooks/types/index.d.ts +2 -0
  373. package/api/resources/webhooks/types/index.js +2 -0
  374. package/dist/Client.d.ts +28 -1
  375. package/dist/Client.js +53 -8
  376. package/dist/api/resources/account/client/Client.d.ts +45 -0
  377. package/dist/api/resources/account/client/Client.js +130 -0
  378. package/dist/api/resources/account/client/index.d.ts +1 -0
  379. package/dist/api/resources/account/client/index.js +2 -0
  380. package/dist/api/resources/account/index.d.ts +2 -0
  381. package/dist/api/resources/account/index.js +18 -0
  382. package/dist/api/resources/account/types/AccountActiveJobs.d.ts +9 -0
  383. package/dist/api/resources/account/types/AccountActiveJobs.js +5 -0
  384. package/dist/api/resources/account/types/AccountAllowanceUsage.d.ts +11 -0
  385. package/dist/api/resources/account/types/AccountAllowanceUsage.js +5 -0
  386. package/dist/api/resources/account/types/AccountBillingModel.d.ts +10 -0
  387. package/dist/api/resources/account/types/AccountBillingModel.js +12 -0
  388. package/dist/api/resources/account/types/AccountBillingPeriod.d.ts +7 -0
  389. package/dist/api/resources/account/types/AccountBillingPeriod.js +5 -0
  390. package/dist/api/resources/account/types/AccountCredentialType.d.ts +9 -0
  391. package/dist/api/resources/account/types/AccountCredentialType.js +11 -0
  392. package/dist/api/resources/account/types/AccountCredits.d.ts +11 -0
  393. package/dist/api/resources/account/types/AccountCredits.js +5 -0
  394. package/dist/api/resources/account/types/AccountFreeAllowance.d.ts +12 -0
  395. package/dist/api/resources/account/types/AccountFreeAllowance.js +5 -0
  396. package/dist/api/resources/account/types/AccountLimits.d.ts +13 -0
  397. package/dist/api/resources/account/types/AccountLimits.js +5 -0
  398. package/dist/api/resources/account/types/AccountOrganization.d.ts +9 -0
  399. package/dist/api/resources/account/types/AccountOrganization.js +5 -0
  400. package/dist/api/resources/account/types/AccountOverview.d.ts +31 -0
  401. package/dist/api/resources/account/types/AccountOverview.js +5 -0
  402. package/dist/api/resources/account/types/AccountPlan.d.ts +9 -0
  403. package/dist/api/resources/account/types/AccountPlan.js +5 -0
  404. package/dist/api/resources/account/types/AccountUser.d.ts +8 -0
  405. package/dist/api/resources/account/types/AccountUser.js +5 -0
  406. package/dist/api/resources/account/types/index.d.ts +12 -0
  407. package/dist/api/resources/account/types/index.js +28 -0
  408. package/dist/api/resources/assets/client/Client.d.ts +80 -1
  409. package/dist/api/resources/assets/client/Client.js +296 -2
  410. package/dist/api/resources/batch/client/Client.d.ts +283 -2
  411. package/dist/api/resources/batch/client/Client.js +342 -4
  412. package/dist/api/resources/batch/client/requests/CreateBatchFromRowsRequest.d.ts +279 -0
  413. package/dist/api/resources/batch/client/requests/CreateBatchFromRowsRequest.js +5 -0
  414. package/dist/api/resources/batch/client/requests/CreateBatchRequest.d.ts +2 -2
  415. package/dist/api/resources/batch/client/requests/index.d.ts +1 -0
  416. package/dist/api/resources/common/errors/ConflictError.d.ts +9 -0
  417. package/dist/api/resources/common/errors/ConflictError.js +52 -0
  418. package/dist/api/resources/common/errors/ForbiddenError.d.ts +9 -0
  419. package/dist/api/resources/common/errors/ForbiddenError.js +52 -0
  420. package/dist/api/resources/common/errors/GatewayTimeoutError.d.ts +9 -0
  421. package/dist/api/resources/common/errors/GatewayTimeoutError.js +52 -0
  422. package/dist/api/resources/common/errors/GenerationDeletedError.d.ts +9 -0
  423. package/dist/api/resources/common/errors/GenerationDeletedError.js +52 -0
  424. package/dist/api/resources/common/errors/GenerationTooManyRequestsError.d.ts +9 -0
  425. package/dist/api/resources/common/errors/GenerationTooManyRequestsError.js +52 -0
  426. package/dist/api/resources/common/errors/PayloadTooLargeError.d.ts +9 -0
  427. package/dist/api/resources/common/errors/PayloadTooLargeError.js +52 -0
  428. package/dist/api/resources/common/errors/ServiceUnavailableError.d.ts +9 -0
  429. package/dist/api/resources/common/errors/ServiceUnavailableError.js +52 -0
  430. package/dist/api/resources/common/errors/TooManyRequestsError.d.ts +1 -1
  431. package/dist/api/resources/common/errors/UnprocessableEntityError.d.ts +9 -0
  432. package/dist/api/resources/common/errors/UnprocessableEntityError.js +52 -0
  433. package/dist/api/resources/common/errors/VoiceCloneTooManyRequestsError.d.ts +9 -0
  434. package/dist/api/resources/common/errors/VoiceCloneTooManyRequestsError.js +52 -0
  435. package/dist/api/resources/common/errors/index.d.ts +9 -0
  436. package/dist/api/resources/common/errors/index.js +9 -0
  437. package/dist/api/resources/common/types/ActiveSpeaker.d.ts +7 -1
  438. package/dist/api/resources/common/types/Asset.d.ts +4 -0
  439. package/dist/api/resources/common/types/AssetInputType.d.ts +8 -1
  440. package/dist/api/resources/common/types/AssetInputType.js +7 -0
  441. package/dist/api/resources/common/types/AssetUploadResponse.d.ts +14 -0
  442. package/dist/api/resources/common/types/AssetUploadResponse.js +5 -0
  443. package/dist/api/resources/common/types/AttachProjectAssetRequest.d.ts +11 -0
  444. package/dist/api/resources/common/types/AttachProjectAssetRequest.js +5 -0
  445. package/dist/api/resources/common/types/BatchConcurrencyError.d.ts +23 -0
  446. package/dist/api/resources/common/types/BatchConcurrencyError.js +5 -0
  447. package/dist/api/resources/common/types/BatchResponse.d.ts +2 -2
  448. package/dist/api/resources/common/types/BatchRow.d.ts +15 -0
  449. package/dist/api/resources/common/types/BatchRow.js +5 -0
  450. package/dist/api/resources/common/types/BlendingMode.d.ts +9 -0
  451. package/dist/api/resources/common/types/BlendingMode.js +11 -0
  452. package/dist/api/resources/common/types/ClonedVoiceResponse.d.ts +14 -0
  453. package/dist/api/resources/common/types/ClonedVoiceResponse.js +5 -0
  454. package/dist/api/resources/common/types/CreateAssetRequest.d.ts +33 -0
  455. package/dist/api/resources/common/types/CreateAssetRequest.js +5 -0
  456. package/dist/api/resources/common/types/CreateAssetUploadRequest.d.ts +14 -0
  457. package/dist/api/resources/common/types/CreateAssetUploadRequest.js +5 -0
  458. package/dist/api/resources/common/types/CreateDialogueEditDto.d.ts +27 -0
  459. package/dist/api/resources/common/types/CreateDialogueEditDto.js +5 -0
  460. package/dist/api/resources/common/types/CreateGenerationDto.d.ts +11 -3
  461. package/dist/api/resources/common/types/CreateProjectRequest.d.ts +21 -0
  462. package/dist/api/resources/common/types/CreateProjectRequest.js +5 -0
  463. package/dist/api/resources/common/types/CreateTranscriptionDto.d.ts +21 -0
  464. package/dist/api/resources/common/types/CreateTranscriptionDto.js +5 -0
  465. package/dist/api/resources/common/types/CreateTtsRequest.d.ts +19 -0
  466. package/dist/api/resources/common/types/CreateTtsRequest.js +5 -0
  467. package/dist/api/resources/common/types/CreateVoiceRequest.d.ts +19 -0
  468. package/dist/api/resources/common/types/CreateVoiceRequest.js +5 -0
  469. package/dist/api/resources/common/types/CreatorWorkflow.d.ts +37 -0
  470. package/dist/api/resources/common/types/CreatorWorkflow.js +15 -0
  471. package/dist/api/resources/common/types/DeleteAssetResponse.d.ts +11 -0
  472. package/dist/api/resources/common/types/DeleteAssetResponse.js +5 -0
  473. package/dist/api/resources/common/types/DeleteProjectResponse.d.ts +11 -0
  474. package/dist/api/resources/common/types/DeleteProjectResponse.js +5 -0
  475. package/dist/api/resources/common/types/DialogueEditChange.d.ts +14 -0
  476. package/dist/api/resources/common/types/DialogueEditChange.js +5 -0
  477. package/dist/api/resources/common/types/DialogueEditError.d.ts +15 -0
  478. package/dist/api/resources/common/types/DialogueEditError.js +5 -0
  479. package/dist/api/resources/common/types/DialogueEditErrorCode.d.ts +18 -0
  480. package/dist/api/resources/common/types/DialogueEditErrorCode.js +17 -0
  481. package/dist/api/resources/common/types/DialogueEditFailedSlot.d.ts +9 -0
  482. package/dist/api/resources/common/types/DialogueEditFailedSlot.js +5 -0
  483. package/dist/api/resources/common/types/DialogueEditJob.d.ts +49 -0
  484. package/dist/api/resources/common/types/DialogueEditJob.js +5 -0
  485. package/dist/api/resources/common/types/DialogueEditJobId.d.ts +7 -0
  486. package/dist/api/resources/common/types/DialogueEditJobId.js +5 -0
  487. package/dist/api/resources/common/types/DialogueEditJobStatus.d.ts +14 -0
  488. package/dist/api/resources/common/types/DialogueEditJobStatus.js +13 -0
  489. package/dist/api/resources/common/types/DialogueEditOperation.d.ts +16 -0
  490. package/dist/api/resources/common/types/DialogueEditOperation.js +5 -0
  491. package/dist/api/resources/common/types/DialogueEditPartialDetail.d.ts +17 -0
  492. package/dist/api/resources/common/types/DialogueEditPartialDetail.js +5 -0
  493. package/dist/api/resources/common/types/DialogueEditReference.d.ts +11 -0
  494. package/dist/api/resources/common/types/DialogueEditReference.js +5 -0
  495. package/dist/api/resources/common/types/DialogueEditRemoval.d.ts +10 -0
  496. package/dist/api/resources/common/types/DialogueEditRemoval.js +5 -0
  497. package/dist/api/resources/common/types/DialogueEditResultSlot.d.ts +19 -0
  498. package/dist/api/resources/common/types/DialogueEditResultSlot.js +5 -0
  499. package/dist/api/resources/common/types/DialogueEditResultSlotKind.d.ts +12 -0
  500. package/dist/api/resources/common/types/DialogueEditResultSlotKind.js +11 -0
  501. package/dist/api/resources/common/types/DialogueEditRetimeFailureSection.d.ts +14 -0
  502. package/dist/api/resources/common/types/DialogueEditRetimeFailureSection.js +5 -0
  503. package/dist/api/resources/common/types/DubDto.d.ts +17 -0
  504. package/dist/api/resources/common/types/DubDto.js +5 -0
  505. package/dist/api/resources/common/types/DubLanguage.d.ts +105 -0
  506. package/dist/api/resources/common/types/DubLanguage.js +101 -0
  507. package/dist/api/resources/common/types/DubProviderName.d.ts +10 -0
  508. package/dist/api/resources/common/types/DubProviderName.js +9 -0
  509. package/dist/api/resources/common/types/DubSourceLanguage.d.ts +106 -0
  510. package/dist/api/resources/common/types/DubSourceLanguage.js +102 -0
  511. package/dist/api/resources/common/types/ErrorCatalogEntry.d.ts +14 -0
  512. package/dist/api/resources/common/types/ErrorCatalogEntry.js +5 -0
  513. package/dist/api/resources/common/types/EstimateBreakdown.d.ts +13 -0
  514. package/dist/api/resources/common/types/EstimateBreakdown.js +5 -0
  515. package/dist/api/resources/common/types/EstimateCostRequest.d.ts +16 -0
  516. package/dist/api/resources/common/types/EstimateCostRequest.js +5 -0
  517. package/dist/api/resources/common/types/EstimateDubbingBilling.d.ts +10 -0
  518. package/dist/api/resources/common/types/EstimateDubbingBilling.js +12 -0
  519. package/dist/api/resources/common/types/EstimateDubbingPart.d.ts +12 -0
  520. package/dist/api/resources/common/types/EstimateDubbingPart.js +5 -0
  521. package/dist/api/resources/common/types/EstimateDurationCheck.d.ts +22 -0
  522. package/dist/api/resources/common/types/EstimateDurationCheck.js +5 -0
  523. package/dist/api/resources/common/types/EstimateLipsyncPart.d.ts +9 -0
  524. package/dist/api/resources/common/types/EstimateLipsyncPart.js +5 -0
  525. package/dist/api/resources/common/types/EstimateWorkflow.d.ts +11 -0
  526. package/dist/api/resources/common/types/{ModelType.js → EstimateWorkflow.js} +3 -3
  527. package/dist/api/resources/common/types/EstimatedGenerationCost.d.ts +7 -0
  528. package/dist/api/resources/common/types/Generation.d.ts +12 -2
  529. package/dist/api/resources/common/types/GenerationConcurrencyError.d.ts +21 -0
  530. package/dist/api/resources/common/types/GenerationConcurrencyError.js +5 -0
  531. package/dist/api/resources/common/types/GenerationError.d.ts +16 -0
  532. package/dist/api/resources/common/types/GenerationEstimate.d.ts +39 -0
  533. package/dist/api/resources/common/types/GenerationEstimate.js +5 -0
  534. package/dist/api/resources/common/types/GenerationEstimateConfidence.d.ts +12 -0
  535. package/dist/api/resources/common/types/GenerationEstimateConfidence.js +11 -0
  536. package/dist/api/resources/common/types/GenerationEstimateResolutionSource.d.ts +12 -0
  537. package/dist/api/resources/common/types/GenerationEstimateResolutionSource.js +11 -0
  538. package/dist/api/resources/common/types/GenerationEstimateScope.d.ts +11 -0
  539. package/dist/api/resources/common/types/GenerationEstimateScope.js +10 -0
  540. package/dist/api/resources/common/types/GenerationEstimateSource.d.ts +15 -0
  541. package/dist/api/resources/common/types/GenerationEstimateSource.js +14 -0
  542. package/dist/api/resources/common/types/GenerationOptions.d.ts +22 -4
  543. package/dist/api/resources/common/types/GenerationSegment.d.ts +14 -6
  544. package/dist/api/resources/common/types/Image.d.ts +16 -0
  545. package/dist/api/resources/common/types/Image.js +5 -0
  546. package/dist/api/resources/common/types/Input.d.ts +1 -1
  547. package/dist/api/resources/common/types/Model.d.ts +2 -2
  548. package/dist/api/resources/common/types/Model.js +1 -1
  549. package/dist/api/resources/common/types/ModelInfo.d.ts +3 -2
  550. package/dist/api/resources/common/types/OutputAudio.d.ts +10 -0
  551. package/dist/api/resources/common/types/OutputAudio.js +5 -0
  552. package/dist/api/resources/common/types/OutputFormat.d.ts +8 -0
  553. package/dist/api/resources/common/types/OutputFormat.js +10 -0
  554. package/dist/api/resources/common/types/PaginatedProjectsResponse.d.ts +13 -0
  555. package/dist/api/resources/common/types/PaginatedProjectsResponse.js +5 -0
  556. package/dist/api/resources/common/types/Project.d.ts +24 -0
  557. package/dist/api/resources/common/types/Project.js +5 -0
  558. package/dist/api/resources/common/types/ProjectGeneration.d.ts +41 -0
  559. package/dist/api/resources/common/types/ProjectGeneration.js +5 -0
  560. package/dist/api/resources/common/types/ProjectGenerationError.d.ts +9 -0
  561. package/dist/api/resources/common/types/ProjectGenerationError.js +5 -0
  562. package/dist/api/resources/common/types/ProjectGenerationInput.d.ts +18 -0
  563. package/dist/api/resources/common/types/ProjectGenerationInput.js +5 -0
  564. package/dist/api/resources/common/types/ProjectGenerationModel.d.ts +12 -0
  565. package/dist/api/resources/common/types/ProjectGenerationModel.js +5 -0
  566. package/dist/api/resources/common/types/ProjectGenerationProvider.d.ts +10 -0
  567. package/dist/api/resources/common/types/ProjectGenerationProvider.js +5 -0
  568. package/dist/api/resources/common/types/ProjectGenerationSegment.d.ts +14 -0
  569. package/dist/api/resources/common/types/ProjectGenerationSegment.js +5 -0
  570. package/dist/api/resources/common/types/ProjectId.d.ts +7 -0
  571. package/dist/api/resources/common/types/ProjectId.js +5 -0
  572. package/dist/api/resources/common/types/ProjectListItem.d.ts +28 -0
  573. package/dist/api/resources/common/types/ProjectListItem.js +5 -0
  574. package/dist/api/resources/common/types/ProjectMode.d.ts +11 -0
  575. package/dist/api/resources/common/types/ProjectMode.js +10 -0
  576. package/dist/api/resources/common/types/ProjectSort.d.ts +11 -0
  577. package/dist/api/resources/common/types/ProjectSort.js +10 -0
  578. package/dist/api/resources/common/types/ProjectVisibility.d.ts +17 -0
  579. package/dist/api/resources/common/types/ProjectVisibility.js +10 -0
  580. package/dist/api/resources/common/types/SegmentAudioInput.d.ts +2 -2
  581. package/dist/api/resources/common/types/SegmentOptionsOverride.d.ts +17 -0
  582. package/dist/api/resources/common/types/SegmentOptionsOverride.js +5 -0
  583. package/dist/api/resources/common/types/SyncMode.d.ts +1 -1
  584. package/dist/api/resources/common/types/Transcript.d.ts +13 -0
  585. package/dist/api/resources/common/types/Transcript.js +5 -0
  586. package/dist/api/resources/common/types/TranscriptSegment.d.ts +13 -0
  587. package/dist/api/resources/common/types/TranscriptSegment.js +5 -0
  588. package/dist/api/resources/common/types/TranscriptWord.d.ts +16 -0
  589. package/dist/api/resources/common/types/TranscriptWord.js +5 -0
  590. package/dist/api/resources/common/types/TranscriptionDifficulty.d.ts +13 -0
  591. package/dist/api/resources/common/types/TranscriptionDifficulty.js +5 -0
  592. package/dist/api/resources/common/types/TranscriptionDifficultyReason.d.ts +17 -0
  593. package/dist/api/resources/common/types/TranscriptionDifficultyReason.js +16 -0
  594. package/dist/api/resources/common/types/TranscriptionDifficultyTier.d.ts +12 -0
  595. package/dist/api/resources/common/types/TranscriptionDifficultyTier.js +11 -0
  596. package/dist/api/resources/common/types/TranscriptionError.d.ts +13 -0
  597. package/dist/api/resources/common/types/TranscriptionError.js +5 -0
  598. package/dist/api/resources/common/types/TranscriptionErrorCode.d.ts +16 -0
  599. package/dist/api/resources/common/types/TranscriptionErrorCode.js +15 -0
  600. package/dist/api/resources/common/types/TranscriptionJob.d.ts +35 -0
  601. package/dist/api/resources/common/types/TranscriptionJob.js +5 -0
  602. package/dist/api/resources/common/types/TranscriptionJobId.d.ts +7 -0
  603. package/dist/api/resources/common/types/TranscriptionJobId.js +5 -0
  604. package/dist/api/resources/common/types/TranscriptionJobStatus.d.ts +13 -0
  605. package/dist/api/resources/common/types/TranscriptionJobStatus.js +12 -0
  606. package/dist/api/resources/common/types/TtsGenerationResponse.d.ts +14 -0
  607. package/dist/api/resources/common/types/TtsGenerationResponse.js +5 -0
  608. package/dist/api/resources/common/types/TtsJob.d.ts +25 -0
  609. package/dist/api/resources/common/types/TtsJob.js +5 -0
  610. package/dist/api/resources/common/types/TtsJobError.d.ts +13 -0
  611. package/dist/api/resources/common/types/TtsJobError.js +5 -0
  612. package/dist/api/resources/common/types/TtsJobErrorCode.d.ts +16 -0
  613. package/dist/api/resources/common/types/TtsJobErrorCode.js +15 -0
  614. package/dist/api/resources/common/types/TtsJobStatus.d.ts +13 -0
  615. package/dist/api/resources/common/types/TtsJobStatus.js +12 -0
  616. package/dist/api/resources/common/types/UpdateAssetRequest.d.ts +23 -0
  617. package/dist/api/resources/common/types/UpdateAssetRequest.js +5 -0
  618. package/dist/api/resources/common/types/UpdateProjectRequest.d.ts +17 -0
  619. package/dist/api/resources/common/types/UpdateProjectRequest.js +5 -0
  620. package/dist/api/resources/common/types/Video.d.ts +2 -0
  621. package/dist/api/resources/common/types/Voice.d.ts +23 -0
  622. package/dist/api/resources/common/types/Voice.js +5 -0
  623. package/dist/api/resources/common/types/VoiceCloneRateLimitError.d.ts +16 -0
  624. package/dist/api/resources/common/types/VoiceCloneRateLimitError.js +5 -0
  625. package/dist/api/resources/common/types/VoiceProvider.d.ts +10 -0
  626. package/dist/api/resources/common/types/VoiceProvider.js +9 -0
  627. package/dist/api/resources/common/types/VoiceRestriction.d.ts +11 -0
  628. package/dist/api/resources/common/types/VoiceRestriction.js +10 -0
  629. package/dist/api/resources/common/types/index.d.ts +87 -1
  630. package/dist/api/resources/common/types/index.js +87 -1
  631. package/dist/api/resources/dialogueEdits/client/Client.d.ts +95 -0
  632. package/dist/api/resources/dialogueEdits/client/Client.js +241 -0
  633. package/dist/api/resources/dialogueEdits/client/index.d.ts +1 -0
  634. package/dist/api/resources/dialogueEdits/client/index.js +2 -0
  635. package/dist/api/resources/dialogueEdits/index.d.ts +1 -0
  636. package/dist/api/resources/dialogueEdits/index.js +17 -0
  637. package/dist/api/resources/errors/client/Client.d.ts +44 -0
  638. package/dist/api/resources/errors/client/Client.js +127 -0
  639. package/dist/api/resources/errors/client/index.d.ts +1 -0
  640. package/dist/api/resources/errors/client/index.js +2 -0
  641. package/dist/api/resources/errors/index.d.ts +1 -0
  642. package/dist/api/resources/errors/index.js +17 -0
  643. package/dist/api/resources/feedback/client/Client.d.ts +55 -0
  644. package/dist/api/resources/feedback/client/Client.js +145 -0
  645. package/dist/api/resources/feedback/client/index.d.ts +1 -0
  646. package/dist/api/resources/feedback/client/index.js +17 -0
  647. package/dist/api/resources/feedback/client/requests/SubmitFeedbackRequest.d.ts +37 -0
  648. package/dist/api/resources/feedback/client/requests/SubmitFeedbackRequest.js +5 -0
  649. package/dist/api/resources/feedback/client/requests/index.d.ts +1 -0
  650. package/dist/api/resources/feedback/client/requests/index.js +2 -0
  651. package/dist/api/resources/feedback/errors/FeedbackTooManyRequestsError.d.ts +9 -0
  652. package/dist/api/resources/feedback/errors/FeedbackTooManyRequestsError.js +52 -0
  653. package/dist/api/resources/feedback/errors/index.d.ts +1 -0
  654. package/dist/api/resources/feedback/errors/index.js +17 -0
  655. package/dist/api/resources/feedback/index.d.ts +3 -0
  656. package/dist/api/resources/feedback/index.js +19 -0
  657. package/dist/api/resources/feedback/types/FeedbackClient.d.ts +9 -0
  658. package/dist/api/resources/feedback/types/FeedbackClient.js +5 -0
  659. package/dist/api/resources/feedback/types/FeedbackKind.d.ts +12 -0
  660. package/dist/api/resources/feedback/types/FeedbackKind.js +14 -0
  661. package/dist/api/resources/feedback/types/FeedbackRateLimitError.d.ts +16 -0
  662. package/dist/api/resources/feedback/types/FeedbackRateLimitError.js +5 -0
  663. package/dist/api/resources/feedback/types/FeedbackReceipt.d.ts +9 -0
  664. package/dist/api/resources/feedback/types/FeedbackReceipt.js +5 -0
  665. package/dist/api/resources/feedback/types/FeedbackSeverity.d.ts +9 -0
  666. package/dist/api/resources/feedback/types/FeedbackSeverity.js +11 -0
  667. package/dist/api/resources/feedback/types/FeedbackSource.d.ts +8 -0
  668. package/dist/api/resources/feedback/types/FeedbackSource.js +10 -0
  669. package/dist/api/resources/feedback/types/index.d.ts +6 -0
  670. package/dist/api/resources/feedback/types/index.js +22 -0
  671. package/dist/api/resources/generations/client/Client.d.ts +149 -19
  672. package/dist/api/resources/generations/client/Client.js +366 -30
  673. package/dist/api/resources/generations/client/requests/CreateGenerationJsonRequest.d.ts +51 -0
  674. package/dist/api/resources/generations/client/requests/CreateGenerationJsonRequest.js +5 -0
  675. package/dist/api/resources/generations/client/requests/CreateGenerationRequest.d.ts +13 -1
  676. package/dist/api/resources/generations/client/requests/GetGenerationDownloadRequest.d.ts +17 -0
  677. package/dist/api/resources/generations/client/requests/GetGenerationDownloadRequest.js +5 -0
  678. package/dist/api/resources/generations/client/requests/GetGenerationRequest.d.ts +21 -0
  679. package/dist/api/resources/generations/client/requests/GetGenerationRequest.js +5 -0
  680. package/dist/api/resources/generations/client/requests/ListGenerationsRequest.d.ts +16 -0
  681. package/dist/api/resources/generations/client/requests/index.d.ts +3 -0
  682. package/dist/api/resources/index.d.ts +18 -0
  683. package/dist/api/resources/index.js +19 -1
  684. package/dist/api/resources/models/client/Client.d.ts +1 -1
  685. package/dist/api/resources/models/client/Client.js +1 -1
  686. package/dist/api/resources/organizations/client/Client.d.ts +46 -0
  687. package/dist/api/resources/organizations/client/Client.js +137 -0
  688. package/dist/api/resources/organizations/client/index.d.ts +1 -0
  689. package/dist/api/resources/organizations/client/index.js +17 -0
  690. package/dist/api/resources/organizations/client/requests/GetWebhookSecretRequest.d.ts +13 -0
  691. package/dist/api/resources/organizations/client/requests/GetWebhookSecretRequest.js +5 -0
  692. package/dist/api/resources/organizations/client/requests/index.d.ts +1 -0
  693. package/dist/api/resources/organizations/client/requests/index.js +2 -0
  694. package/dist/api/resources/organizations/index.d.ts +2 -0
  695. package/dist/api/resources/organizations/index.js +18 -0
  696. package/dist/api/resources/organizations/types/WebhookSecretResponse.d.ts +10 -0
  697. package/dist/api/resources/organizations/types/WebhookSecretResponse.js +5 -0
  698. package/dist/api/resources/organizations/types/index.d.ts +1 -0
  699. package/dist/api/resources/organizations/types/index.js +17 -0
  700. package/dist/api/resources/projects/client/Client.d.ts +159 -0
  701. package/dist/api/resources/projects/client/Client.js +582 -0
  702. package/dist/api/resources/projects/client/index.d.ts +1 -0
  703. package/dist/api/resources/projects/client/index.js +17 -0
  704. package/dist/api/resources/projects/client/requests/ListProjectsRequest.d.ts +29 -0
  705. package/dist/api/resources/projects/client/requests/ListProjectsRequest.js +5 -0
  706. package/dist/api/resources/projects/client/requests/index.d.ts +1 -0
  707. package/dist/api/resources/projects/client/requests/index.js +2 -0
  708. package/dist/api/resources/projects/index.d.ts +1 -0
  709. package/dist/api/resources/projects/index.js +17 -0
  710. package/dist/api/resources/transcriptions/client/Client.d.ts +67 -0
  711. package/dist/api/resources/transcriptions/client/Client.js +209 -0
  712. package/dist/api/resources/transcriptions/client/index.d.ts +1 -0
  713. package/dist/api/resources/transcriptions/client/index.js +2 -0
  714. package/dist/api/resources/transcriptions/index.d.ts +1 -0
  715. package/dist/api/resources/transcriptions/index.js +17 -0
  716. package/dist/api/resources/tts/client/Client.d.ts +93 -0
  717. package/dist/api/resources/tts/client/Client.js +306 -0
  718. package/dist/api/resources/tts/client/index.d.ts +1 -0
  719. package/dist/api/resources/tts/client/index.js +17 -0
  720. package/dist/api/resources/tts/client/requests/SubmitTtsJobRequest.d.ts +18 -0
  721. package/dist/api/resources/tts/client/requests/SubmitTtsJobRequest.js +5 -0
  722. package/dist/api/resources/tts/client/requests/index.d.ts +1 -0
  723. package/dist/api/resources/tts/client/requests/index.js +2 -0
  724. package/dist/api/resources/tts/index.d.ts +1 -0
  725. package/dist/api/resources/tts/index.js +17 -0
  726. package/dist/api/resources/voices/client/Client.d.ts +107 -0
  727. package/dist/api/resources/voices/client/Client.js +369 -0
  728. package/dist/api/resources/voices/client/index.d.ts +1 -0
  729. package/dist/api/resources/voices/client/index.js +17 -0
  730. package/dist/api/resources/voices/client/requests/GetVoiceRequest.d.ts +14 -0
  731. package/dist/api/resources/voices/client/requests/GetVoiceRequest.js +5 -0
  732. package/dist/api/resources/voices/client/requests/ListVoicesRequest.d.ts +14 -0
  733. package/dist/api/resources/voices/client/requests/ListVoicesRequest.js +5 -0
  734. package/dist/api/resources/voices/client/requests/index.d.ts +2 -0
  735. package/dist/api/resources/voices/client/requests/index.js +2 -0
  736. package/dist/api/resources/voices/index.d.ts +1 -0
  737. package/dist/api/resources/voices/index.js +17 -0
  738. package/dist/api/resources/webhooks/types/BatchNotification.d.ts +21 -0
  739. package/dist/api/resources/webhooks/types/BatchNotification.js +5 -0
  740. package/dist/api/resources/webhooks/types/BatchNotificationMetrics.d.ts +13 -0
  741. package/dist/api/resources/webhooks/types/BatchNotificationMetrics.js +5 -0
  742. package/dist/api/resources/webhooks/types/GenerationNotification.d.ts +14 -16
  743. package/dist/api/resources/webhooks/types/WebhookStatus.d.ts +3 -2
  744. package/dist/api/resources/webhooks/types/WebhookStatus.js +1 -0
  745. package/dist/api/resources/webhooks/types/index.d.ts +2 -0
  746. package/dist/api/resources/webhooks/types/index.js +2 -0
  747. package/dist/environments.d.ts +2 -1
  748. package/dist/environments.js +1 -0
  749. package/dist/version.d.ts +1 -1
  750. package/dist/version.js +1 -1
  751. package/environments.d.ts +2 -1
  752. package/environments.js +1 -0
  753. package/package.json +1 -1
  754. package/reference.md +2475 -110
  755. package/version.d.ts +1 -1
  756. package/version.js +1 -1
  757. package/api/resources/common/types/ModelType.d.ts +0 -11
  758. package/dist/api/resources/common/types/ModelType.d.ts +0 -11
@@ -9,7 +9,7 @@ export declare namespace Assets {
9
9
  environment?: core.Supplier<environments.SyncEnvironment | string>;
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
- apiKey?: core.Supplier<string>;
12
+ apiKey?: core.Supplier<string | undefined>;
13
13
  fetcher?: core.FetchFunction;
14
14
  }
15
15
  interface RequestOptions {
@@ -58,6 +58,85 @@ export declare class Assets {
58
58
  */
59
59
  get(id: Sync.AssetId, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Sync.Asset>;
60
60
  private __get;
61
+ /**
62
+ * Request a presigned URL to upload a local file. PUT the file bytes to the returned uploadUrl with the same Content-Type, then register the file as an asset via POST /v2/assets using the returned url. Single uploads are capped at 5GB.
63
+ *
64
+ * @param {Sync.CreateAssetUploadRequest} request
65
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
66
+ *
67
+ * @throws {@link Sync.BadRequestError}
68
+ * @throws {@link Sync.UnauthorizedError}
69
+ * @throws {@link Sync.UnprocessableEntityError}
70
+ * @throws {@link Sync.InternalServerError}
71
+ *
72
+ * @example
73
+ * await client.assets.createUpload({
74
+ * fileName: "my-video.mp4",
75
+ * contentType: "video/mp4",
76
+ * size: 10485760
77
+ * })
78
+ */
79
+ createUpload(request: Sync.CreateAssetUploadRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Sync.AssetUploadResponse>;
80
+ private __createUpload;
81
+ /**
82
+ * Register a media URL as a reusable asset and get back its id. Use the id in generation inputs (input[].assetId) or as a voice clone sample. To upload a local file, first request a presigned URL via POST /v2/assets/upload, PUT the file there, then register the returned url here. Registration verifies the upload happened and enforces plan limits on the actual file size.
83
+ *
84
+ * projectId is optional. When provided it must reference a project in your organization — a stale or foreign id is rejected with a 422 and errorCode project_not_found; omit the field if you don't need the asset attached to a project.
85
+ *
86
+ * @param {Sync.CreateAssetRequest} request
87
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
88
+ *
89
+ * @throws {@link Sync.BadRequestError}
90
+ * @throws {@link Sync.UnauthorizedError}
91
+ * @throws {@link Sync.UnprocessableEntityError}
92
+ * @throws {@link Sync.InternalServerError}
93
+ *
94
+ * @example
95
+ * await client.assets.create({
96
+ * url: "https://assets.sync.so/org-123/my-video.mp4",
97
+ * type: "VIDEO",
98
+ * name: "my-video.mp4"
99
+ * })
100
+ */
101
+ create(request: Sync.CreateAssetRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Sync.Asset>;
102
+ private __create;
103
+ /**
104
+ * Update an asset's name or visibility. With API-key auth the asset must be owned by the key owner; organization-shared assets can only be updated from an admin/owner session. An asset you can view but not edit returns a 403 with errorCode asset_forbidden; an unknown id returns a 404 with errorCode asset_not_found.
105
+ *
106
+ * @param {Sync.AssetId} id
107
+ * @param {Sync.UpdateAssetRequest} request
108
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
109
+ *
110
+ * @throws {@link Sync.UnauthorizedError}
111
+ * @throws {@link Sync.ForbiddenError}
112
+ * @throws {@link Sync.NotFoundError}
113
+ * @throws {@link Sync.UnprocessableEntityError}
114
+ * @throws {@link Sync.InternalServerError}
115
+ *
116
+ * @example
117
+ * await client.assets.update("550e8400-e29b-41d4-a716-446655440000", {
118
+ * name: "Renamed asset"
119
+ * })
120
+ */
121
+ update(id: Sync.AssetId, request: Sync.UpdateAssetRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Sync.Asset>;
122
+ private __update;
123
+ /**
124
+ * Delete an asset. With API-key auth the asset must be owned by the key owner; organization-shared assets can only be deleted from an admin/owner session. An asset you can view but not delete returns a 403 with errorCode asset_forbidden; an unknown id returns a 404 with errorCode asset_not_found.
125
+ *
126
+ * @param {Sync.AssetId} id
127
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
128
+ *
129
+ * @throws {@link Sync.UnauthorizedError}
130
+ * @throws {@link Sync.ForbiddenError}
131
+ * @throws {@link Sync.NotFoundError}
132
+ * @throws {@link Sync.UnprocessableEntityError}
133
+ * @throws {@link Sync.InternalServerError}
134
+ *
135
+ * @example
136
+ * await client.assets.delete("550e8400-e29b-41d4-a716-446655440000")
137
+ */
138
+ delete(id: Sync.AssetId, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Sync.DeleteAssetResponse>;
139
+ private __delete;
61
140
  protected _getCustomAuthorizationHeaders(): Promise<{
62
141
  "x-api-key": string | undefined;
63
142
  }>;
@@ -103,7 +103,7 @@ class Assets {
103
103
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
104
104
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/assets"),
105
105
  method: "GET",
106
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.3.0", "User-Agent": "@sync.so/sdk/0.3.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),
106
+ 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),
107
107
  contentType: "application/json",
108
108
  queryParameters: _queryParams,
109
109
  requestType: "json",
@@ -167,7 +167,7 @@ class Assets {
167
167
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
168
168
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/assets/${encodeURIComponent(id)}`),
169
169
  method: "GET",
170
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.3.0", "User-Agent": "@sync.so/sdk/0.3.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),
170
+ 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),
171
171
  contentType: "application/json",
172
172
  requestType: "json",
173
173
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -210,6 +210,300 @@ class Assets {
210
210
  }
211
211
  });
212
212
  }
213
+ /**
214
+ * Request a presigned URL to upload a local file. PUT the file bytes to the returned uploadUrl with the same Content-Type, then register the file as an asset via POST /v2/assets using the returned url. Single uploads are capped at 5GB.
215
+ *
216
+ * @param {Sync.CreateAssetUploadRequest} request
217
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
218
+ *
219
+ * @throws {@link Sync.BadRequestError}
220
+ * @throws {@link Sync.UnauthorizedError}
221
+ * @throws {@link Sync.UnprocessableEntityError}
222
+ * @throws {@link Sync.InternalServerError}
223
+ *
224
+ * @example
225
+ * await client.assets.createUpload({
226
+ * fileName: "my-video.mp4",
227
+ * contentType: "video/mp4",
228
+ * size: 10485760
229
+ * })
230
+ */
231
+ createUpload(request, requestOptions) {
232
+ return core.HttpResponsePromise.fromPromise(this.__createUpload(request, requestOptions));
233
+ }
234
+ __createUpload(request, requestOptions) {
235
+ return __awaiter(this, void 0, void 0, function* () {
236
+ var _a, _b, _c;
237
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
238
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/assets/upload"),
239
+ method: "POST",
240
+ 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),
241
+ contentType: "application/json",
242
+ requestType: "json",
243
+ body: request,
244
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
245
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
246
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
247
+ });
248
+ if (_response.ok) {
249
+ return { data: _response.body, rawResponse: _response.rawResponse };
250
+ }
251
+ if (_response.error.reason === "status-code") {
252
+ switch (_response.error.statusCode) {
253
+ case 400:
254
+ throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
255
+ case 401:
256
+ throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
257
+ case 422:
258
+ throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
259
+ case 500:
260
+ throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
261
+ default:
262
+ throw new errors.SyncError({
263
+ statusCode: _response.error.statusCode,
264
+ body: _response.error.body,
265
+ rawResponse: _response.rawResponse,
266
+ });
267
+ }
268
+ }
269
+ switch (_response.error.reason) {
270
+ case "non-json":
271
+ throw new errors.SyncError({
272
+ statusCode: _response.error.statusCode,
273
+ body: _response.error.rawBody,
274
+ rawResponse: _response.rawResponse,
275
+ });
276
+ case "timeout":
277
+ throw new errors.SyncTimeoutError("Timeout exceeded when calling POST /v2/assets/upload.");
278
+ case "unknown":
279
+ throw new errors.SyncError({
280
+ message: _response.error.errorMessage,
281
+ rawResponse: _response.rawResponse,
282
+ });
283
+ }
284
+ });
285
+ }
286
+ /**
287
+ * Register a media URL as a reusable asset and get back its id. Use the id in generation inputs (input[].assetId) or as a voice clone sample. To upload a local file, first request a presigned URL via POST /v2/assets/upload, PUT the file there, then register the returned url here. Registration verifies the upload happened and enforces plan limits on the actual file size.
288
+ *
289
+ * projectId is optional. When provided it must reference a project in your organization — a stale or foreign id is rejected with a 422 and errorCode project_not_found; omit the field if you don't need the asset attached to a project.
290
+ *
291
+ * @param {Sync.CreateAssetRequest} request
292
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
293
+ *
294
+ * @throws {@link Sync.BadRequestError}
295
+ * @throws {@link Sync.UnauthorizedError}
296
+ * @throws {@link Sync.UnprocessableEntityError}
297
+ * @throws {@link Sync.InternalServerError}
298
+ *
299
+ * @example
300
+ * await client.assets.create({
301
+ * url: "https://assets.sync.so/org-123/my-video.mp4",
302
+ * type: "VIDEO",
303
+ * name: "my-video.mp4"
304
+ * })
305
+ */
306
+ create(request, requestOptions) {
307
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
308
+ }
309
+ __create(request, requestOptions) {
310
+ return __awaiter(this, void 0, void 0, function* () {
311
+ var _a, _b, _c;
312
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
313
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/assets"),
314
+ method: "POST",
315
+ 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),
316
+ contentType: "application/json",
317
+ requestType: "json",
318
+ body: request,
319
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
320
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
321
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
322
+ });
323
+ if (_response.ok) {
324
+ return { data: _response.body, rawResponse: _response.rawResponse };
325
+ }
326
+ if (_response.error.reason === "status-code") {
327
+ switch (_response.error.statusCode) {
328
+ case 400:
329
+ throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
330
+ case 401:
331
+ throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
332
+ case 422:
333
+ throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
334
+ case 500:
335
+ throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
336
+ default:
337
+ throw new errors.SyncError({
338
+ statusCode: _response.error.statusCode,
339
+ body: _response.error.body,
340
+ rawResponse: _response.rawResponse,
341
+ });
342
+ }
343
+ }
344
+ switch (_response.error.reason) {
345
+ case "non-json":
346
+ throw new errors.SyncError({
347
+ statusCode: _response.error.statusCode,
348
+ body: _response.error.rawBody,
349
+ rawResponse: _response.rawResponse,
350
+ });
351
+ case "timeout":
352
+ throw new errors.SyncTimeoutError("Timeout exceeded when calling POST /v2/assets.");
353
+ case "unknown":
354
+ throw new errors.SyncError({
355
+ message: _response.error.errorMessage,
356
+ rawResponse: _response.rawResponse,
357
+ });
358
+ }
359
+ });
360
+ }
361
+ /**
362
+ * Update an asset's name or visibility. With API-key auth the asset must be owned by the key owner; organization-shared assets can only be updated from an admin/owner session. An asset you can view but not edit returns a 403 with errorCode asset_forbidden; an unknown id returns a 404 with errorCode asset_not_found.
363
+ *
364
+ * @param {Sync.AssetId} id
365
+ * @param {Sync.UpdateAssetRequest} request
366
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
367
+ *
368
+ * @throws {@link Sync.UnauthorizedError}
369
+ * @throws {@link Sync.ForbiddenError}
370
+ * @throws {@link Sync.NotFoundError}
371
+ * @throws {@link Sync.UnprocessableEntityError}
372
+ * @throws {@link Sync.InternalServerError}
373
+ *
374
+ * @example
375
+ * await client.assets.update("550e8400-e29b-41d4-a716-446655440000", {
376
+ * name: "Renamed asset"
377
+ * })
378
+ */
379
+ update(id, request, requestOptions) {
380
+ return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
381
+ }
382
+ __update(id, request, requestOptions) {
383
+ return __awaiter(this, void 0, void 0, function* () {
384
+ var _a, _b, _c;
385
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
386
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/assets/${encodeURIComponent(id)}`),
387
+ method: "PATCH",
388
+ 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),
389
+ contentType: "application/json",
390
+ requestType: "json",
391
+ body: request,
392
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
393
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
394
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
395
+ });
396
+ if (_response.ok) {
397
+ return { data: _response.body, rawResponse: _response.rawResponse };
398
+ }
399
+ if (_response.error.reason === "status-code") {
400
+ switch (_response.error.statusCode) {
401
+ case 401:
402
+ throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
403
+ case 403:
404
+ throw new Sync.ForbiddenError(_response.error.body, _response.rawResponse);
405
+ case 404:
406
+ throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
407
+ case 422:
408
+ throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
409
+ case 500:
410
+ throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
411
+ default:
412
+ throw new errors.SyncError({
413
+ statusCode: _response.error.statusCode,
414
+ body: _response.error.body,
415
+ rawResponse: _response.rawResponse,
416
+ });
417
+ }
418
+ }
419
+ switch (_response.error.reason) {
420
+ case "non-json":
421
+ throw new errors.SyncError({
422
+ statusCode: _response.error.statusCode,
423
+ body: _response.error.rawBody,
424
+ rawResponse: _response.rawResponse,
425
+ });
426
+ case "timeout":
427
+ throw new errors.SyncTimeoutError("Timeout exceeded when calling PATCH /v2/assets/{id}.");
428
+ case "unknown":
429
+ throw new errors.SyncError({
430
+ message: _response.error.errorMessage,
431
+ rawResponse: _response.rawResponse,
432
+ });
433
+ }
434
+ });
435
+ }
436
+ /**
437
+ * Delete an asset. With API-key auth the asset must be owned by the key owner; organization-shared assets can only be deleted from an admin/owner session. An asset you can view but not delete returns a 403 with errorCode asset_forbidden; an unknown id returns a 404 with errorCode asset_not_found.
438
+ *
439
+ * @param {Sync.AssetId} id
440
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
441
+ *
442
+ * @throws {@link Sync.UnauthorizedError}
443
+ * @throws {@link Sync.ForbiddenError}
444
+ * @throws {@link Sync.NotFoundError}
445
+ * @throws {@link Sync.UnprocessableEntityError}
446
+ * @throws {@link Sync.InternalServerError}
447
+ *
448
+ * @example
449
+ * await client.assets.delete("550e8400-e29b-41d4-a716-446655440000")
450
+ */
451
+ delete(id, requestOptions) {
452
+ return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
453
+ }
454
+ __delete(id, requestOptions) {
455
+ return __awaiter(this, void 0, void 0, function* () {
456
+ var _a, _b, _c;
457
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
458
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/assets/${encodeURIComponent(id)}`),
459
+ method: "DELETE",
460
+ 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),
461
+ contentType: "application/json",
462
+ requestType: "json",
463
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
464
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
465
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
466
+ });
467
+ if (_response.ok) {
468
+ return { data: _response.body, rawResponse: _response.rawResponse };
469
+ }
470
+ if (_response.error.reason === "status-code") {
471
+ switch (_response.error.statusCode) {
472
+ case 401:
473
+ throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
474
+ case 403:
475
+ throw new Sync.ForbiddenError(_response.error.body, _response.rawResponse);
476
+ case 404:
477
+ throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
478
+ case 422:
479
+ throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
480
+ case 500:
481
+ throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
482
+ default:
483
+ throw new errors.SyncError({
484
+ statusCode: _response.error.statusCode,
485
+ body: _response.error.body,
486
+ rawResponse: _response.rawResponse,
487
+ });
488
+ }
489
+ }
490
+ switch (_response.error.reason) {
491
+ case "non-json":
492
+ throw new errors.SyncError({
493
+ statusCode: _response.error.statusCode,
494
+ body: _response.error.rawBody,
495
+ rawResponse: _response.rawResponse,
496
+ });
497
+ case "timeout":
498
+ throw new errors.SyncTimeoutError("Timeout exceeded when calling DELETE /v2/assets/{id}.");
499
+ case "unknown":
500
+ throw new errors.SyncError({
501
+ message: _response.error.errorMessage,
502
+ rawResponse: _response.rawResponse,
503
+ });
504
+ }
505
+ });
506
+ }
213
507
  _getCustomAuthorizationHeaders() {
214
508
  return __awaiter(this, void 0, void 0, function* () {
215
509
  var _a;