@sync.so/sdk 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (436) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +27 -22
  3. package/api/resources/account/client/Client.d.ts +19 -1
  4. package/api/resources/account/client/Client.js +79 -5
  5. package/api/resources/account/client/index.d.ts +1 -1
  6. package/api/resources/account/client/index.js +15 -0
  7. package/api/resources/account/client/requests/GetAccountRequest.d.ts +13 -0
  8. package/api/resources/account/client/requests/GetAccountRequest.js +5 -0
  9. package/api/resources/account/client/requests/ListAccountOrganizationsRequest.d.ts +13 -0
  10. package/api/resources/account/client/requests/ListAccountOrganizationsRequest.js +5 -0
  11. package/api/resources/account/client/requests/index.d.ts +2 -0
  12. package/api/resources/account/client/requests/index.js +2 -0
  13. package/api/resources/account/types/AccountActiveJobs.d.ts +1 -1
  14. package/api/resources/account/types/AccountCredits.d.ts +1 -1
  15. package/api/resources/account/types/AccountFreeAllowance.d.ts +2 -2
  16. package/api/resources/account/types/AccountOrganizationListItem.d.ts +9 -0
  17. package/api/resources/account/types/AccountOrganizationListItem.js +5 -0
  18. package/api/resources/account/types/AccountOrganizations.d.ts +7 -0
  19. package/api/resources/account/types/AccountOrganizations.js +5 -0
  20. package/api/resources/account/types/AccountOverview.d.ts +5 -1
  21. package/api/resources/account/types/index.d.ts +2 -0
  22. package/api/resources/account/types/index.js +2 -0
  23. package/api/resources/assets/client/Client.d.ts +71 -1
  24. package/api/resources/assets/client/Client.js +312 -8
  25. package/api/resources/assets/client/requests/CountAssetsRequest.d.ts +30 -0
  26. package/api/resources/assets/client/requests/CountAssetsRequest.js +5 -0
  27. package/api/resources/assets/client/requests/FindUploadedAssetRequest.d.ts +18 -0
  28. package/api/resources/assets/client/requests/FindUploadedAssetRequest.js +5 -0
  29. package/api/resources/assets/client/requests/ListAssetsRequest.d.ts +5 -1
  30. package/api/resources/assets/client/requests/index.d.ts +2 -0
  31. package/api/resources/audioTrims/client/Client.d.ts +72 -0
  32. package/api/resources/audioTrims/client/Client.js +217 -0
  33. package/api/resources/audioTrims/client/index.d.ts +1 -0
  34. package/api/resources/audioTrims/client/index.js +17 -0
  35. package/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.d.ts +21 -0
  36. package/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.js +5 -0
  37. package/api/resources/audioTrims/client/requests/index.d.ts +1 -0
  38. package/api/resources/audioTrims/client/requests/index.js +2 -0
  39. package/api/resources/audioTrims/index.d.ts +1 -0
  40. package/api/resources/audioTrims/index.js +17 -0
  41. package/api/resources/batch/client/Client.d.ts +6 -2
  42. package/api/resources/batch/client/Client.js +18 -6
  43. package/api/resources/batch/client/requests/CreateBatchFromRowsRequest.d.ts +3 -3
  44. package/api/resources/batch/client/requests/CreateBatchRequest.d.ts +2 -2
  45. package/api/resources/common/errors/AudioTrimTooManyRequestsError.d.ts +9 -0
  46. package/api/resources/common/errors/AudioTrimTooManyRequestsError.js +52 -0
  47. package/api/resources/common/errors/LinkImportInProgressError.d.ts +9 -0
  48. package/api/resources/common/errors/LinkImportInProgressError.js +52 -0
  49. package/api/resources/common/errors/LinkImportTooManyRequestsError.d.ts +9 -0
  50. package/api/resources/common/errors/LinkImportTooManyRequestsError.js +52 -0
  51. package/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.d.ts +9 -0
  52. package/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.js +52 -0
  53. package/api/resources/common/errors/index.d.ts +4 -0
  54. package/api/resources/common/errors/index.js +4 -0
  55. package/api/resources/common/types/ActiveSpeaker.d.ts +3 -3
  56. package/api/resources/common/types/AnalyzeSpeakersRequest.d.ts +14 -0
  57. package/api/resources/common/types/AnalyzeSpeakersRequest.js +5 -0
  58. package/api/resources/common/types/AssetAudioSource.d.ts +17 -0
  59. package/api/resources/common/types/AssetAudioSource.js +10 -0
  60. package/api/resources/common/types/AssetIds.d.ts +4 -0
  61. package/api/resources/common/types/AssetIds.js +5 -0
  62. package/api/resources/common/types/Audio.d.ts +2 -2
  63. package/api/resources/common/types/AudioTrim.d.ts +20 -0
  64. package/api/resources/common/types/AudioTrim.js +5 -0
  65. package/api/resources/common/types/AudioTrimStatus.d.ts +13 -0
  66. package/api/resources/common/types/AudioTrimStatus.js +12 -0
  67. package/api/resources/common/types/BatchConcurrencyError.d.ts +2 -4
  68. package/api/resources/common/types/BatchGetAssetsRequest.d.ts +8 -0
  69. package/api/resources/common/types/BatchGetAssetsRequest.js +5 -0
  70. package/api/resources/common/types/CreateAssetRequest.d.ts +3 -1
  71. package/api/resources/common/types/CreateAssetUploadRequest.d.ts +1 -1
  72. package/api/resources/common/types/CreateAudioTrimDto.d.ts +16 -0
  73. package/api/resources/common/types/CreateAudioTrimDto.js +5 -0
  74. package/api/resources/common/types/CreateDialogueEditDto.d.ts +2 -2
  75. package/api/resources/common/types/CreateGenerationDto.d.ts +3 -3
  76. package/api/resources/common/types/CreateProjectRequest.d.ts +1 -1
  77. package/api/resources/common/types/CreateTranscriptionDto.d.ts +2 -2
  78. package/api/resources/common/types/DialogueEditChange.d.ts +1 -1
  79. package/api/resources/common/types/DialogueEditError.d.ts +5 -1
  80. package/api/resources/common/types/DialogueEditErrorCode.d.ts +4 -2
  81. package/api/resources/common/types/DialogueEditErrorCode.js +2 -0
  82. package/api/resources/common/types/DialogueEditFailedSlot.d.ts +3 -0
  83. package/api/resources/common/types/DialogueEditJob.d.ts +2 -2
  84. package/api/resources/common/types/DubDto.d.ts +6 -0
  85. package/api/resources/common/types/DubLanguage.d.ts +23 -3
  86. package/api/resources/common/types/DubLanguage.js +17 -0
  87. package/api/resources/common/types/DubSourceLanguage.d.ts +24 -4
  88. package/api/resources/common/types/DubSourceLanguage.js +17 -0
  89. package/api/resources/common/types/EstimateCostRequest.d.ts +1 -1
  90. package/api/resources/common/types/FindUploadedAssetResponse.d.ts +8 -0
  91. package/api/resources/common/types/FindUploadedAssetResponse.js +5 -0
  92. package/api/resources/common/types/Generation.d.ts +9 -5
  93. package/api/resources/common/types/GenerationCount.d.ts +6 -0
  94. package/api/resources/common/types/GenerationCount.js +5 -0
  95. package/api/resources/common/types/GenerationCountType.d.ts +8 -0
  96. package/api/resources/common/types/GenerationCountType.js +10 -0
  97. package/api/resources/common/types/GenerationError.d.ts +4 -0
  98. package/api/resources/common/types/GenerationOptions.d.ts +3 -3
  99. package/api/resources/common/types/GenerationProgress.d.ts +24 -0
  100. package/api/resources/common/types/GenerationProgress.js +5 -0
  101. package/api/resources/common/types/GenerationProgressStage.d.ts +13 -0
  102. package/api/resources/common/types/GenerationProgressStage.js +12 -0
  103. package/api/resources/common/types/GenerationSource.d.ts +17 -0
  104. package/api/resources/common/types/GenerationSource.js +19 -0
  105. package/api/resources/common/types/GenerationStatus.d.ts +3 -2
  106. package/api/resources/common/types/GenerationStatus.js +1 -0
  107. package/api/resources/common/types/Image.d.ts +1 -1
  108. package/api/resources/common/types/LinkImportError.d.ts +33 -0
  109. package/api/resources/common/types/LinkImportError.js +5 -0
  110. package/api/resources/common/types/LinkImportStatus.d.ts +14 -0
  111. package/api/resources/common/types/LinkImportStatus.js +13 -0
  112. package/api/resources/common/types/ProjectGenerationError.d.ts +3 -0
  113. package/api/resources/common/types/ProjectGenerationErrorReason.d.ts +7 -0
  114. package/api/resources/common/types/ProjectGenerationErrorReason.js +9 -0
  115. package/api/resources/common/types/SliceSpeakerFaceTrackRequest.d.ts +21 -0
  116. package/api/resources/common/types/SliceSpeakerFaceTrackRequest.js +5 -0
  117. package/api/resources/common/types/SpeakerAnalysis.d.ts +26 -0
  118. package/api/resources/common/types/SpeakerAnalysis.js +5 -0
  119. package/api/resources/common/types/SpeakerAnalysisSpeaker.d.ts +21 -0
  120. package/api/resources/common/types/SpeakerAnalysisSpeaker.js +5 -0
  121. package/api/resources/common/types/SpeakerAnalysisStatus.d.ts +12 -0
  122. package/api/resources/common/types/SpeakerAnalysisStatus.js +11 -0
  123. package/api/resources/common/types/SpeakerAvatar.d.ts +16 -0
  124. package/api/resources/common/types/SpeakerAvatar.js +5 -0
  125. package/api/resources/common/types/SpeakerAvatarBox.d.ts +12 -0
  126. package/api/resources/common/types/SpeakerAvatarBox.js +5 -0
  127. package/api/resources/common/types/SpeakerFaceSupport.d.ts +17 -0
  128. package/api/resources/common/types/SpeakerFaceSupport.js +5 -0
  129. package/api/resources/common/types/SpeakerFaceSupportInterval.d.ts +9 -0
  130. package/api/resources/common/types/SpeakerFaceSupportInterval.js +5 -0
  131. package/api/resources/common/types/SpeakerFaceTrack.d.ts +18 -0
  132. package/api/resources/common/types/SpeakerFaceTrack.js +5 -0
  133. package/api/resources/common/types/SpeakerFaceTrackSlice.d.ts +7 -0
  134. package/api/resources/common/types/SpeakerFaceTrackSlice.js +5 -0
  135. package/api/resources/common/types/SpeakerFaceTrackSliceFrames.d.ts +9 -0
  136. package/api/resources/common/types/SpeakerFaceTrackSliceFrames.js +5 -0
  137. package/api/resources/common/types/SpeakerMatchEvidence.d.ts +16 -0
  138. package/api/resources/common/types/SpeakerMatchEvidence.js +5 -0
  139. package/api/resources/common/types/SpeakerMatchStatus.d.ts +11 -0
  140. package/api/resources/common/types/SpeakerMatchStatus.js +10 -0
  141. package/api/resources/common/types/Transcript.d.ts +2 -0
  142. package/api/resources/common/types/TranscriptSegment.d.ts +2 -0
  143. package/api/resources/common/types/TranscriptSpeaker.d.ts +13 -0
  144. package/api/resources/common/types/TranscriptSpeaker.js +5 -0
  145. package/api/resources/common/types/TranscriptSpeakerLabelFlag.d.ts +11 -0
  146. package/api/resources/common/types/TranscriptSpeakerLabelFlag.js +10 -0
  147. package/api/resources/common/types/TranscriptWord.d.ts +4 -0
  148. package/api/resources/common/types/TranscriptionJob.d.ts +5 -1
  149. package/api/resources/common/types/TranscriptionJobEstimate.d.ts +20 -0
  150. package/api/resources/common/types/TranscriptionJobEstimate.js +5 -0
  151. package/api/resources/common/types/Tts.d.ts +1 -1
  152. package/api/resources/common/types/UpdateProjectRequest.d.ts +1 -1
  153. package/api/resources/common/types/Video.d.ts +3 -3
  154. package/api/resources/common/types/index.d.ts +32 -0
  155. package/api/resources/common/types/index.js +32 -0
  156. package/api/resources/dialogueEdits/client/Client.d.ts +35 -31
  157. package/api/resources/dialogueEdits/client/Client.js +40 -33
  158. package/api/resources/dialogueEdits/client/index.d.ts +1 -1
  159. package/api/resources/dialogueEdits/client/index.js +15 -0
  160. package/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.d.ts +46 -0
  161. package/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.js +5 -0
  162. package/api/resources/dialogueEdits/client/requests/index.d.ts +1 -0
  163. package/api/resources/dialogueEdits/client/requests/index.js +2 -0
  164. package/api/resources/errors/client/Client.d.ts +1 -1
  165. package/api/resources/errors/client/Client.js +2 -2
  166. package/api/resources/feedback/client/Client.js +1 -1
  167. package/api/resources/generationCosts/index.d.ts +1 -0
  168. package/api/resources/generationCosts/index.js +17 -0
  169. package/api/resources/generationCosts/types/CostAvailability.d.ts +10 -0
  170. package/api/resources/generationCosts/types/CostAvailability.js +12 -0
  171. package/api/resources/generationCosts/types/CostComponent.d.ts +19 -0
  172. package/api/resources/generationCosts/types/CostComponent.js +5 -0
  173. package/api/resources/generationCosts/types/CostComponentStatus.d.ts +10 -0
  174. package/api/resources/generationCosts/types/CostComponentStatus.js +12 -0
  175. package/api/resources/generationCosts/types/CostComponentType.d.ts +9 -0
  176. package/api/resources/generationCosts/types/CostComponentType.js +11 -0
  177. package/api/resources/generationCosts/types/CostSource.d.ts +9 -0
  178. package/api/resources/generationCosts/types/CostSource.js +11 -0
  179. package/api/resources/generationCosts/types/CostUnit.d.ts +8 -0
  180. package/api/resources/generationCosts/types/CostUnit.js +10 -0
  181. package/api/resources/generationCosts/types/CostValueBasis.d.ts +9 -0
  182. package/api/resources/generationCosts/types/CostValueBasis.js +11 -0
  183. package/api/resources/generationCosts/types/GenerationCosts.d.ts +23 -0
  184. package/api/resources/generationCosts/types/GenerationCosts.js +5 -0
  185. package/api/resources/generationCosts/types/GenerationCostsApiKey.d.ts +10 -0
  186. package/api/resources/generationCosts/types/GenerationCostsApiKey.js +5 -0
  187. package/api/resources/generationCosts/types/GenerationCostsList.d.ts +12 -0
  188. package/api/resources/generationCosts/types/GenerationCostsList.js +5 -0
  189. package/api/resources/generationCosts/types/GenerationCostsListItem.d.ts +17 -0
  190. package/api/resources/generationCosts/types/GenerationCostsListItem.js +5 -0
  191. package/api/resources/generationCosts/types/index.d.ts +11 -0
  192. package/api/resources/generationCosts/types/index.js +27 -0
  193. package/api/resources/generations/client/Client.d.ts +58 -13
  194. package/api/resources/generations/client/Client.js +245 -21
  195. package/api/resources/generations/client/requests/CountGenerationsRequest.d.ts +30 -0
  196. package/api/resources/generations/client/requests/CountGenerationsRequest.js +5 -0
  197. package/api/resources/generations/client/requests/CreateGenerationRequest.d.ts +1 -1
  198. package/api/resources/generations/client/requests/GetGenerationRequest.d.ts +2 -2
  199. package/api/resources/generations/client/requests/ListGenerationCostsRequest.d.ts +29 -0
  200. package/api/resources/generations/client/requests/ListGenerationCostsRequest.js +5 -0
  201. package/api/resources/generations/client/requests/index.d.ts +2 -0
  202. package/api/resources/index.d.ts +6 -0
  203. package/api/resources/index.js +7 -1
  204. package/api/resources/models/client/Client.js +1 -1
  205. package/api/resources/organizations/client/Client.js +1 -1
  206. package/api/resources/projects/client/Client.js +7 -7
  207. package/api/resources/projects/client/requests/ListProjectsRequest.d.ts +1 -1
  208. package/api/resources/transcriptions/client/Client.d.ts +66 -1
  209. package/api/resources/transcriptions/client/Client.js +236 -3
  210. package/api/resources/tts/client/Client.js +3 -3
  211. package/api/resources/voices/client/Client.d.ts +10 -6
  212. package/api/resources/voices/client/Client.js +22 -10
  213. package/api/resources/webhooks/types/GenerationNotification.d.ts +6 -2
  214. package/api/resources/webhooks/types/WebhookStatus.d.ts +2 -1
  215. package/api/resources/webhooks/types/WebhookStatus.js +1 -0
  216. package/dist/Client.d.ts +3 -0
  217. package/dist/Client.js +27 -22
  218. package/dist/api/resources/account/client/Client.d.ts +19 -1
  219. package/dist/api/resources/account/client/Client.js +79 -5
  220. package/dist/api/resources/account/client/index.d.ts +1 -1
  221. package/dist/api/resources/account/client/index.js +15 -0
  222. package/dist/api/resources/account/client/requests/GetAccountRequest.d.ts +13 -0
  223. package/dist/api/resources/account/client/requests/GetAccountRequest.js +5 -0
  224. package/dist/api/resources/account/client/requests/ListAccountOrganizationsRequest.d.ts +13 -0
  225. package/dist/api/resources/account/client/requests/ListAccountOrganizationsRequest.js +5 -0
  226. package/dist/api/resources/account/client/requests/index.d.ts +2 -0
  227. package/dist/api/resources/account/client/requests/index.js +2 -0
  228. package/dist/api/resources/account/types/AccountActiveJobs.d.ts +1 -1
  229. package/dist/api/resources/account/types/AccountCredits.d.ts +1 -1
  230. package/dist/api/resources/account/types/AccountFreeAllowance.d.ts +2 -2
  231. package/dist/api/resources/account/types/AccountOrganizationListItem.d.ts +9 -0
  232. package/dist/api/resources/account/types/AccountOrganizationListItem.js +5 -0
  233. package/dist/api/resources/account/types/AccountOrganizations.d.ts +7 -0
  234. package/dist/api/resources/account/types/AccountOrganizations.js +5 -0
  235. package/dist/api/resources/account/types/AccountOverview.d.ts +5 -1
  236. package/dist/api/resources/account/types/index.d.ts +2 -0
  237. package/dist/api/resources/account/types/index.js +2 -0
  238. package/dist/api/resources/assets/client/Client.d.ts +71 -1
  239. package/dist/api/resources/assets/client/Client.js +312 -8
  240. package/dist/api/resources/assets/client/requests/CountAssetsRequest.d.ts +30 -0
  241. package/dist/api/resources/assets/client/requests/CountAssetsRequest.js +5 -0
  242. package/dist/api/resources/assets/client/requests/FindUploadedAssetRequest.d.ts +18 -0
  243. package/dist/api/resources/assets/client/requests/FindUploadedAssetRequest.js +5 -0
  244. package/dist/api/resources/assets/client/requests/ListAssetsRequest.d.ts +5 -1
  245. package/dist/api/resources/assets/client/requests/index.d.ts +2 -0
  246. package/dist/api/resources/audioTrims/client/Client.d.ts +72 -0
  247. package/dist/api/resources/audioTrims/client/Client.js +217 -0
  248. package/dist/api/resources/audioTrims/client/index.d.ts +1 -0
  249. package/dist/api/resources/audioTrims/client/index.js +17 -0
  250. package/dist/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.d.ts +21 -0
  251. package/dist/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.js +5 -0
  252. package/dist/api/resources/audioTrims/client/requests/index.d.ts +1 -0
  253. package/dist/api/resources/audioTrims/client/requests/index.js +2 -0
  254. package/dist/api/resources/audioTrims/index.d.ts +1 -0
  255. package/dist/api/resources/audioTrims/index.js +17 -0
  256. package/dist/api/resources/batch/client/Client.d.ts +6 -2
  257. package/dist/api/resources/batch/client/Client.js +18 -6
  258. package/dist/api/resources/batch/client/requests/CreateBatchFromRowsRequest.d.ts +3 -3
  259. package/dist/api/resources/batch/client/requests/CreateBatchRequest.d.ts +2 -2
  260. package/dist/api/resources/common/errors/AudioTrimTooManyRequestsError.d.ts +9 -0
  261. package/dist/api/resources/common/errors/AudioTrimTooManyRequestsError.js +52 -0
  262. package/dist/api/resources/common/errors/LinkImportInProgressError.d.ts +9 -0
  263. package/dist/api/resources/common/errors/LinkImportInProgressError.js +52 -0
  264. package/dist/api/resources/common/errors/LinkImportTooManyRequestsError.d.ts +9 -0
  265. package/dist/api/resources/common/errors/LinkImportTooManyRequestsError.js +52 -0
  266. package/dist/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.d.ts +9 -0
  267. package/dist/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.js +52 -0
  268. package/dist/api/resources/common/errors/index.d.ts +4 -0
  269. package/dist/api/resources/common/errors/index.js +4 -0
  270. package/dist/api/resources/common/types/ActiveSpeaker.d.ts +3 -3
  271. package/dist/api/resources/common/types/AnalyzeSpeakersRequest.d.ts +14 -0
  272. package/dist/api/resources/common/types/AnalyzeSpeakersRequest.js +5 -0
  273. package/dist/api/resources/common/types/AssetAudioSource.d.ts +17 -0
  274. package/dist/api/resources/common/types/AssetAudioSource.js +10 -0
  275. package/dist/api/resources/common/types/AssetIds.d.ts +4 -0
  276. package/dist/api/resources/common/types/AssetIds.js +5 -0
  277. package/dist/api/resources/common/types/Audio.d.ts +2 -2
  278. package/dist/api/resources/common/types/AudioTrim.d.ts +20 -0
  279. package/dist/api/resources/common/types/AudioTrim.js +5 -0
  280. package/dist/api/resources/common/types/AudioTrimStatus.d.ts +13 -0
  281. package/dist/api/resources/common/types/AudioTrimStatus.js +12 -0
  282. package/dist/api/resources/common/types/BatchConcurrencyError.d.ts +2 -4
  283. package/dist/api/resources/common/types/BatchGetAssetsRequest.d.ts +8 -0
  284. package/dist/api/resources/common/types/BatchGetAssetsRequest.js +5 -0
  285. package/dist/api/resources/common/types/CreateAssetRequest.d.ts +3 -1
  286. package/dist/api/resources/common/types/CreateAssetUploadRequest.d.ts +1 -1
  287. package/dist/api/resources/common/types/CreateAudioTrimDto.d.ts +16 -0
  288. package/dist/api/resources/common/types/CreateAudioTrimDto.js +5 -0
  289. package/dist/api/resources/common/types/CreateDialogueEditDto.d.ts +2 -2
  290. package/dist/api/resources/common/types/CreateGenerationDto.d.ts +3 -3
  291. package/dist/api/resources/common/types/CreateProjectRequest.d.ts +1 -1
  292. package/dist/api/resources/common/types/CreateTranscriptionDto.d.ts +2 -2
  293. package/dist/api/resources/common/types/DialogueEditChange.d.ts +1 -1
  294. package/dist/api/resources/common/types/DialogueEditError.d.ts +5 -1
  295. package/dist/api/resources/common/types/DialogueEditErrorCode.d.ts +4 -2
  296. package/dist/api/resources/common/types/DialogueEditErrorCode.js +2 -0
  297. package/dist/api/resources/common/types/DialogueEditFailedSlot.d.ts +3 -0
  298. package/dist/api/resources/common/types/DialogueEditJob.d.ts +2 -2
  299. package/dist/api/resources/common/types/DubDto.d.ts +6 -0
  300. package/dist/api/resources/common/types/DubLanguage.d.ts +23 -3
  301. package/dist/api/resources/common/types/DubLanguage.js +17 -0
  302. package/dist/api/resources/common/types/DubSourceLanguage.d.ts +24 -4
  303. package/dist/api/resources/common/types/DubSourceLanguage.js +17 -0
  304. package/dist/api/resources/common/types/EstimateCostRequest.d.ts +1 -1
  305. package/dist/api/resources/common/types/FindUploadedAssetResponse.d.ts +8 -0
  306. package/dist/api/resources/common/types/FindUploadedAssetResponse.js +5 -0
  307. package/dist/api/resources/common/types/Generation.d.ts +9 -5
  308. package/dist/api/resources/common/types/GenerationCount.d.ts +6 -0
  309. package/dist/api/resources/common/types/GenerationCount.js +5 -0
  310. package/dist/api/resources/common/types/GenerationCountType.d.ts +8 -0
  311. package/dist/api/resources/common/types/GenerationCountType.js +10 -0
  312. package/dist/api/resources/common/types/GenerationError.d.ts +4 -0
  313. package/dist/api/resources/common/types/GenerationOptions.d.ts +3 -3
  314. package/dist/api/resources/common/types/GenerationProgress.d.ts +24 -0
  315. package/dist/api/resources/common/types/GenerationProgress.js +5 -0
  316. package/dist/api/resources/common/types/GenerationProgressStage.d.ts +13 -0
  317. package/dist/api/resources/common/types/GenerationProgressStage.js +12 -0
  318. package/dist/api/resources/common/types/GenerationSource.d.ts +17 -0
  319. package/dist/api/resources/common/types/GenerationSource.js +19 -0
  320. package/dist/api/resources/common/types/GenerationStatus.d.ts +3 -2
  321. package/dist/api/resources/common/types/GenerationStatus.js +1 -0
  322. package/dist/api/resources/common/types/Image.d.ts +1 -1
  323. package/dist/api/resources/common/types/LinkImportError.d.ts +33 -0
  324. package/dist/api/resources/common/types/LinkImportError.js +5 -0
  325. package/dist/api/resources/common/types/LinkImportStatus.d.ts +14 -0
  326. package/dist/api/resources/common/types/LinkImportStatus.js +13 -0
  327. package/dist/api/resources/common/types/ProjectGenerationError.d.ts +3 -0
  328. package/dist/api/resources/common/types/ProjectGenerationErrorReason.d.ts +7 -0
  329. package/dist/api/resources/common/types/ProjectGenerationErrorReason.js +9 -0
  330. package/dist/api/resources/common/types/SliceSpeakerFaceTrackRequest.d.ts +21 -0
  331. package/dist/api/resources/common/types/SliceSpeakerFaceTrackRequest.js +5 -0
  332. package/dist/api/resources/common/types/SpeakerAnalysis.d.ts +26 -0
  333. package/dist/api/resources/common/types/SpeakerAnalysis.js +5 -0
  334. package/dist/api/resources/common/types/SpeakerAnalysisSpeaker.d.ts +21 -0
  335. package/dist/api/resources/common/types/SpeakerAnalysisSpeaker.js +5 -0
  336. package/dist/api/resources/common/types/SpeakerAnalysisStatus.d.ts +12 -0
  337. package/dist/api/resources/common/types/SpeakerAnalysisStatus.js +11 -0
  338. package/dist/api/resources/common/types/SpeakerAvatar.d.ts +16 -0
  339. package/dist/api/resources/common/types/SpeakerAvatar.js +5 -0
  340. package/dist/api/resources/common/types/SpeakerAvatarBox.d.ts +12 -0
  341. package/dist/api/resources/common/types/SpeakerAvatarBox.js +5 -0
  342. package/dist/api/resources/common/types/SpeakerFaceSupport.d.ts +17 -0
  343. package/dist/api/resources/common/types/SpeakerFaceSupport.js +5 -0
  344. package/dist/api/resources/common/types/SpeakerFaceSupportInterval.d.ts +9 -0
  345. package/dist/api/resources/common/types/SpeakerFaceSupportInterval.js +5 -0
  346. package/dist/api/resources/common/types/SpeakerFaceTrack.d.ts +18 -0
  347. package/dist/api/resources/common/types/SpeakerFaceTrack.js +5 -0
  348. package/dist/api/resources/common/types/SpeakerFaceTrackSlice.d.ts +7 -0
  349. package/dist/api/resources/common/types/SpeakerFaceTrackSlice.js +5 -0
  350. package/dist/api/resources/common/types/SpeakerFaceTrackSliceFrames.d.ts +9 -0
  351. package/dist/api/resources/common/types/SpeakerFaceTrackSliceFrames.js +5 -0
  352. package/dist/api/resources/common/types/SpeakerMatchEvidence.d.ts +16 -0
  353. package/dist/api/resources/common/types/SpeakerMatchEvidence.js +5 -0
  354. package/dist/api/resources/common/types/SpeakerMatchStatus.d.ts +11 -0
  355. package/dist/api/resources/common/types/SpeakerMatchStatus.js +10 -0
  356. package/dist/api/resources/common/types/Transcript.d.ts +2 -0
  357. package/dist/api/resources/common/types/TranscriptSegment.d.ts +2 -0
  358. package/dist/api/resources/common/types/TranscriptSpeaker.d.ts +13 -0
  359. package/dist/api/resources/common/types/TranscriptSpeaker.js +5 -0
  360. package/dist/api/resources/common/types/TranscriptSpeakerLabelFlag.d.ts +11 -0
  361. package/dist/api/resources/common/types/TranscriptSpeakerLabelFlag.js +10 -0
  362. package/dist/api/resources/common/types/TranscriptWord.d.ts +4 -0
  363. package/dist/api/resources/common/types/TranscriptionJob.d.ts +5 -1
  364. package/dist/api/resources/common/types/TranscriptionJobEstimate.d.ts +20 -0
  365. package/dist/api/resources/common/types/TranscriptionJobEstimate.js +5 -0
  366. package/dist/api/resources/common/types/Tts.d.ts +1 -1
  367. package/dist/api/resources/common/types/UpdateProjectRequest.d.ts +1 -1
  368. package/dist/api/resources/common/types/Video.d.ts +3 -3
  369. package/dist/api/resources/common/types/index.d.ts +32 -0
  370. package/dist/api/resources/common/types/index.js +32 -0
  371. package/dist/api/resources/dialogueEdits/client/Client.d.ts +35 -31
  372. package/dist/api/resources/dialogueEdits/client/Client.js +40 -33
  373. package/dist/api/resources/dialogueEdits/client/index.d.ts +1 -1
  374. package/dist/api/resources/dialogueEdits/client/index.js +15 -0
  375. package/dist/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.d.ts +46 -0
  376. package/dist/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.js +5 -0
  377. package/dist/api/resources/dialogueEdits/client/requests/index.d.ts +1 -0
  378. package/dist/api/resources/dialogueEdits/client/requests/index.js +2 -0
  379. package/dist/api/resources/errors/client/Client.d.ts +1 -1
  380. package/dist/api/resources/errors/client/Client.js +2 -2
  381. package/dist/api/resources/feedback/client/Client.js +1 -1
  382. package/dist/api/resources/generationCosts/index.d.ts +1 -0
  383. package/dist/api/resources/generationCosts/index.js +17 -0
  384. package/dist/api/resources/generationCosts/types/CostAvailability.d.ts +10 -0
  385. package/dist/api/resources/generationCosts/types/CostAvailability.js +12 -0
  386. package/dist/api/resources/generationCosts/types/CostComponent.d.ts +19 -0
  387. package/dist/api/resources/generationCosts/types/CostComponent.js +5 -0
  388. package/dist/api/resources/generationCosts/types/CostComponentStatus.d.ts +10 -0
  389. package/dist/api/resources/generationCosts/types/CostComponentStatus.js +12 -0
  390. package/dist/api/resources/generationCosts/types/CostComponentType.d.ts +9 -0
  391. package/dist/api/resources/generationCosts/types/CostComponentType.js +11 -0
  392. package/dist/api/resources/generationCosts/types/CostSource.d.ts +9 -0
  393. package/dist/api/resources/generationCosts/types/CostSource.js +11 -0
  394. package/dist/api/resources/generationCosts/types/CostUnit.d.ts +8 -0
  395. package/dist/api/resources/generationCosts/types/CostUnit.js +10 -0
  396. package/dist/api/resources/generationCosts/types/CostValueBasis.d.ts +9 -0
  397. package/dist/api/resources/generationCosts/types/CostValueBasis.js +11 -0
  398. package/dist/api/resources/generationCosts/types/GenerationCosts.d.ts +23 -0
  399. package/dist/api/resources/generationCosts/types/GenerationCosts.js +5 -0
  400. package/dist/api/resources/generationCosts/types/GenerationCostsApiKey.d.ts +10 -0
  401. package/dist/api/resources/generationCosts/types/GenerationCostsApiKey.js +5 -0
  402. package/dist/api/resources/generationCosts/types/GenerationCostsList.d.ts +12 -0
  403. package/dist/api/resources/generationCosts/types/GenerationCostsList.js +5 -0
  404. package/dist/api/resources/generationCosts/types/GenerationCostsListItem.d.ts +17 -0
  405. package/dist/api/resources/generationCosts/types/GenerationCostsListItem.js +5 -0
  406. package/dist/api/resources/generationCosts/types/index.d.ts +11 -0
  407. package/dist/api/resources/generationCosts/types/index.js +27 -0
  408. package/dist/api/resources/generations/client/Client.d.ts +58 -13
  409. package/dist/api/resources/generations/client/Client.js +245 -21
  410. package/dist/api/resources/generations/client/requests/CountGenerationsRequest.d.ts +30 -0
  411. package/dist/api/resources/generations/client/requests/CountGenerationsRequest.js +5 -0
  412. package/dist/api/resources/generations/client/requests/CreateGenerationRequest.d.ts +1 -1
  413. package/dist/api/resources/generations/client/requests/GetGenerationRequest.d.ts +2 -2
  414. package/dist/api/resources/generations/client/requests/ListGenerationCostsRequest.d.ts +29 -0
  415. package/dist/api/resources/generations/client/requests/ListGenerationCostsRequest.js +5 -0
  416. package/dist/api/resources/generations/client/requests/index.d.ts +2 -0
  417. package/dist/api/resources/index.d.ts +6 -0
  418. package/dist/api/resources/index.js +7 -1
  419. package/dist/api/resources/models/client/Client.js +1 -1
  420. package/dist/api/resources/organizations/client/Client.js +1 -1
  421. package/dist/api/resources/projects/client/Client.js +7 -7
  422. package/dist/api/resources/projects/client/requests/ListProjectsRequest.d.ts +1 -1
  423. package/dist/api/resources/transcriptions/client/Client.d.ts +66 -1
  424. package/dist/api/resources/transcriptions/client/Client.js +236 -3
  425. package/dist/api/resources/tts/client/Client.js +3 -3
  426. package/dist/api/resources/voices/client/Client.d.ts +10 -6
  427. package/dist/api/resources/voices/client/Client.js +22 -10
  428. package/dist/api/resources/webhooks/types/GenerationNotification.d.ts +6 -2
  429. package/dist/api/resources/webhooks/types/WebhookStatus.d.ts +2 -1
  430. package/dist/api/resources/webhooks/types/WebhookStatus.js +1 -0
  431. package/dist/version.d.ts +1 -1
  432. package/dist/version.js +1 -1
  433. package/package.json +1 -1
  434. package/reference.md +995 -124
  435. package/version.d.ts +1 -1
  436. package/version.js +1 -1
package/Client.d.ts CHANGED
@@ -5,6 +5,7 @@ import * as environments from "./environments";
5
5
  import * as core from "./core";
6
6
  import { Account } from "./api/resources/account/client/Client";
7
7
  import { Assets } from "./api/resources/assets/client/Client";
8
+ import { AudioTrims } from "./api/resources/audioTrims/client/Client";
8
9
  import { Batch } from "./api/resources/batch/client/Client";
9
10
  import { DialogueEdits } from "./api/resources/dialogueEdits/client/Client";
10
11
  import { Errors } from "./api/resources/errors/client/Client";
@@ -39,6 +40,7 @@ export declare class SyncClient {
39
40
  protected readonly _options: SyncClient.Options;
40
41
  protected _account: Account | undefined;
41
42
  protected _assets: Assets | undefined;
43
+ protected _audioTrims: AudioTrims | undefined;
42
44
  protected _batch: Batch | undefined;
43
45
  protected _dialogueEdits: DialogueEdits | undefined;
44
46
  protected _errors: Errors | undefined;
@@ -53,6 +55,7 @@ export declare class SyncClient {
53
55
  constructor(_options?: SyncClient.Options);
54
56
  get account(): Account;
55
57
  get assets(): Assets;
58
+ get audioTrims(): AudioTrims;
56
59
  get batch(): Batch;
57
60
  get dialogueEdits(): DialogueEdits;
58
61
  get errors(): Errors;
package/Client.js CHANGED
@@ -6,17 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.SyncClient = void 0;
7
7
  const Client_1 = require("./api/resources/account/client/Client");
8
8
  const Client_2 = require("./api/resources/assets/client/Client");
9
- const Client_3 = require("./api/resources/batch/client/Client");
10
- const Client_4 = require("./api/resources/dialogueEdits/client/Client");
11
- const Client_5 = require("./api/resources/errors/client/Client");
12
- const Client_6 = require("./api/resources/feedback/client/Client");
13
- const Client_7 = require("./api/resources/generations/client/Client");
14
- const Client_8 = require("./api/resources/models/client/Client");
15
- const Client_9 = require("./api/resources/organizations/client/Client");
16
- const Client_10 = require("./api/resources/projects/client/Client");
17
- const Client_11 = require("./api/resources/transcriptions/client/Client");
18
- const Client_12 = require("./api/resources/tts/client/Client");
19
- const Client_13 = require("./api/resources/voices/client/Client");
9
+ const Client_3 = require("./api/resources/audioTrims/client/Client");
10
+ const Client_4 = require("./api/resources/batch/client/Client");
11
+ const Client_5 = require("./api/resources/dialogueEdits/client/Client");
12
+ const Client_6 = require("./api/resources/errors/client/Client");
13
+ const Client_7 = require("./api/resources/feedback/client/Client");
14
+ const Client_8 = require("./api/resources/generations/client/Client");
15
+ const Client_9 = require("./api/resources/models/client/Client");
16
+ const Client_10 = require("./api/resources/organizations/client/Client");
17
+ const Client_11 = require("./api/resources/projects/client/Client");
18
+ const Client_12 = require("./api/resources/transcriptions/client/Client");
19
+ const Client_13 = require("./api/resources/tts/client/Client");
20
+ const Client_14 = require("./api/resources/voices/client/Client");
20
21
  class SyncClient {
21
22
  constructor(_options = {}) {
22
23
  this._options = _options;
@@ -29,49 +30,53 @@ class SyncClient {
29
30
  var _a;
30
31
  return ((_a = this._assets) !== null && _a !== void 0 ? _a : (this._assets = new Client_2.Assets(this._options)));
31
32
  }
33
+ get audioTrims() {
34
+ var _a;
35
+ return ((_a = this._audioTrims) !== null && _a !== void 0 ? _a : (this._audioTrims = new Client_3.AudioTrims(this._options)));
36
+ }
32
37
  get batch() {
33
38
  var _a;
34
- return ((_a = this._batch) !== null && _a !== void 0 ? _a : (this._batch = new Client_3.Batch(this._options)));
39
+ return ((_a = this._batch) !== null && _a !== void 0 ? _a : (this._batch = new Client_4.Batch(this._options)));
35
40
  }
36
41
  get dialogueEdits() {
37
42
  var _a;
38
- return ((_a = this._dialogueEdits) !== null && _a !== void 0 ? _a : (this._dialogueEdits = new Client_4.DialogueEdits(this._options)));
43
+ return ((_a = this._dialogueEdits) !== null && _a !== void 0 ? _a : (this._dialogueEdits = new Client_5.DialogueEdits(this._options)));
39
44
  }
40
45
  get errors() {
41
46
  var _a;
42
- return ((_a = this._errors) !== null && _a !== void 0 ? _a : (this._errors = new Client_5.Errors(this._options)));
47
+ return ((_a = this._errors) !== null && _a !== void 0 ? _a : (this._errors = new Client_6.Errors(this._options)));
43
48
  }
44
49
  get feedback() {
45
50
  var _a;
46
- return ((_a = this._feedback) !== null && _a !== void 0 ? _a : (this._feedback = new Client_6.Feedback(this._options)));
51
+ return ((_a = this._feedback) !== null && _a !== void 0 ? _a : (this._feedback = new Client_7.Feedback(this._options)));
47
52
  }
48
53
  get generations() {
49
54
  var _a;
50
- return ((_a = this._generations) !== null && _a !== void 0 ? _a : (this._generations = new Client_7.Generations(this._options)));
55
+ return ((_a = this._generations) !== null && _a !== void 0 ? _a : (this._generations = new Client_8.Generations(this._options)));
51
56
  }
52
57
  get models() {
53
58
  var _a;
54
- return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new Client_8.Models(this._options)));
59
+ return ((_a = this._models) !== null && _a !== void 0 ? _a : (this._models = new Client_9.Models(this._options)));
55
60
  }
56
61
  get organizations() {
57
62
  var _a;
58
- return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_9.Organizations(this._options)));
63
+ return ((_a = this._organizations) !== null && _a !== void 0 ? _a : (this._organizations = new Client_10.Organizations(this._options)));
59
64
  }
60
65
  get projects() {
61
66
  var _a;
62
- return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_10.Projects(this._options)));
67
+ return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_11.Projects(this._options)));
63
68
  }
64
69
  get transcriptions() {
65
70
  var _a;
66
- return ((_a = this._transcriptions) !== null && _a !== void 0 ? _a : (this._transcriptions = new Client_11.Transcriptions(this._options)));
71
+ return ((_a = this._transcriptions) !== null && _a !== void 0 ? _a : (this._transcriptions = new Client_12.Transcriptions(this._options)));
67
72
  }
68
73
  get tts() {
69
74
  var _a;
70
- return ((_a = this._tts) !== null && _a !== void 0 ? _a : (this._tts = new Client_12.Tts(this._options)));
75
+ return ((_a = this._tts) !== null && _a !== void 0 ? _a : (this._tts = new Client_13.Tts(this._options)));
71
76
  }
72
77
  get voices() {
73
78
  var _a;
74
- return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new Client_13.Voices(this._options)));
79
+ return ((_a = this._voices) !== null && _a !== void 0 ? _a : (this._voices = new Client_14.Voices(this._options)));
75
80
  }
76
81
  }
77
82
  exports.SyncClient = SyncClient;
@@ -29,16 +29,34 @@ export declare class Account {
29
29
  /**
30
30
  * Get the account, plan, limits and balance behind these credentials. Call it before submitting work to check plan limits and remaining credits or free allowance, and after a 402, 403 or 429 to decide how to recover: `billingModel` says whether to top up credits (`credits`), pay or update the payment method (`usage`), upgrade (`free`) or contact sync. (`enterprise`). Send people to `billingUrl` for anything that needs a payment.
31
31
  *
32
+ * @param {Sync.GetAccountRequest} request
32
33
  * @param {Account.RequestOptions} requestOptions - Request-specific configuration.
33
34
  *
35
+ * @throws {@link Sync.BadRequestError}
34
36
  * @throws {@link Sync.UnauthorizedError}
37
+ * @throws {@link Sync.ForbiddenError}
35
38
  * @throws {@link Sync.InternalServerError}
36
39
  *
37
40
  * @example
38
41
  * await client.account.get()
39
42
  */
40
- get(requestOptions?: Account.RequestOptions): core.HttpResponsePromise<Sync.AccountOverview>;
43
+ get(request?: Sync.GetAccountRequest, requestOptions?: Account.RequestOptions): core.HttpResponsePromise<Sync.AccountOverview>;
41
44
  private __get;
45
+ /**
46
+ * List the organizations these credentials can access, current one first. An API key lists only its own organization. An OAuth connection lists the organizations selected when it was connected. Send an ID as x-sync-organization-id on subsequent requests to select that organization. An inaccessible organization returns 403; an invalid ID returns 400.
47
+ *
48
+ * @param {Sync.ListAccountOrganizationsRequest} request
49
+ * @param {Account.RequestOptions} requestOptions - Request-specific configuration.
50
+ *
51
+ * @throws {@link Sync.BadRequestError}
52
+ * @throws {@link Sync.UnauthorizedError}
53
+ * @throws {@link Sync.ForbiddenError}
54
+ *
55
+ * @example
56
+ * await client.account.listOrganizations()
57
+ */
58
+ listOrganizations(request?: Sync.ListAccountOrganizationsRequest, requestOptions?: Account.RequestOptions): core.HttpResponsePromise<Sync.AccountOrganizations>;
59
+ private __listOrganizations;
42
60
  protected _getCustomAuthorizationHeaders(): Promise<{
43
61
  "x-api-key": string | undefined;
44
62
  }>;
@@ -61,24 +61,28 @@ class Account {
61
61
  /**
62
62
  * Get the account, plan, limits and balance behind these credentials. Call it before submitting work to check plan limits and remaining credits or free allowance, and after a 402, 403 or 429 to decide how to recover: `billingModel` says whether to top up credits (`credits`), pay or update the payment method (`usage`), upgrade (`free`) or contact sync. (`enterprise`). Send people to `billingUrl` for anything that needs a payment.
63
63
  *
64
+ * @param {Sync.GetAccountRequest} request
64
65
  * @param {Account.RequestOptions} requestOptions - Request-specific configuration.
65
66
  *
67
+ * @throws {@link Sync.BadRequestError}
66
68
  * @throws {@link Sync.UnauthorizedError}
69
+ * @throws {@link Sync.ForbiddenError}
67
70
  * @throws {@link Sync.InternalServerError}
68
71
  *
69
72
  * @example
70
73
  * await client.account.get()
71
74
  */
72
- get(requestOptions) {
73
- return core.HttpResponsePromise.fromPromise(this.__get(requestOptions));
75
+ get(request = {}, requestOptions) {
76
+ return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
74
77
  }
75
- __get(requestOptions) {
76
- return __awaiter(this, void 0, void 0, function* () {
78
+ __get() {
79
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
77
80
  var _a, _b, _c;
81
+ const { "x-sync-organization-id": organizationId } = request;
78
82
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
79
83
  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/account"),
80
84
  method: "GET",
81
- 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),
85
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-sync-organization-id": organizationId != null ? organizationId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
82
86
  contentType: "application/json",
83
87
  requestType: "json",
84
88
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -90,8 +94,12 @@ class Account {
90
94
  }
91
95
  if (_response.error.reason === "status-code") {
92
96
  switch (_response.error.statusCode) {
97
+ case 400:
98
+ throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
93
99
  case 401:
94
100
  throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
101
+ case 403:
102
+ throw new Sync.ForbiddenError(_response.error.body, _response.rawResponse);
95
103
  case 500:
96
104
  throw new Sync.InternalServerError(_response.error.body, _response.rawResponse);
97
105
  default:
@@ -119,6 +127,72 @@ class Account {
119
127
  }
120
128
  });
121
129
  }
130
+ /**
131
+ * List the organizations these credentials can access, current one first. An API key lists only its own organization. An OAuth connection lists the organizations selected when it was connected. Send an ID as x-sync-organization-id on subsequent requests to select that organization. An inaccessible organization returns 403; an invalid ID returns 400.
132
+ *
133
+ * @param {Sync.ListAccountOrganizationsRequest} request
134
+ * @param {Account.RequestOptions} requestOptions - Request-specific configuration.
135
+ *
136
+ * @throws {@link Sync.BadRequestError}
137
+ * @throws {@link Sync.UnauthorizedError}
138
+ * @throws {@link Sync.ForbiddenError}
139
+ *
140
+ * @example
141
+ * await client.account.listOrganizations()
142
+ */
143
+ listOrganizations(request = {}, requestOptions) {
144
+ return core.HttpResponsePromise.fromPromise(this.__listOrganizations(request, requestOptions));
145
+ }
146
+ __listOrganizations() {
147
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
148
+ var _a, _b, _c;
149
+ const { "x-sync-organization-id": organizationId } = request;
150
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
151
+ 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/account/organizations"),
152
+ method: "GET",
153
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-sync-organization-id": organizationId != null ? organizationId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
154
+ contentType: "application/json",
155
+ requestType: "json",
156
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
157
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
158
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
159
+ });
160
+ if (_response.ok) {
161
+ return { data: _response.body, rawResponse: _response.rawResponse };
162
+ }
163
+ if (_response.error.reason === "status-code") {
164
+ switch (_response.error.statusCode) {
165
+ case 400:
166
+ throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
167
+ case 401:
168
+ throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
169
+ case 403:
170
+ throw new Sync.ForbiddenError(_response.error.body, _response.rawResponse);
171
+ default:
172
+ throw new errors.SyncError({
173
+ statusCode: _response.error.statusCode,
174
+ body: _response.error.body,
175
+ rawResponse: _response.rawResponse,
176
+ });
177
+ }
178
+ }
179
+ switch (_response.error.reason) {
180
+ case "non-json":
181
+ throw new errors.SyncError({
182
+ statusCode: _response.error.statusCode,
183
+ body: _response.error.rawBody,
184
+ rawResponse: _response.rawResponse,
185
+ });
186
+ case "timeout":
187
+ throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/account/organizations.");
188
+ case "unknown":
189
+ throw new errors.SyncError({
190
+ message: _response.error.errorMessage,
191
+ rawResponse: _response.rawResponse,
192
+ });
193
+ }
194
+ });
195
+ }
122
196
  _getCustomAuthorizationHeaders() {
123
197
  return __awaiter(this, void 0, void 0, function* () {
124
198
  var _a;
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests";
@@ -1,2 +1,17 @@
1
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
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface GetAccountRequest {
9
+ /**
10
+ * Organization ID from List Organizations. Omit to use the credential's default organization.
11
+ */
12
+ "x-sync-organization-id"?: string;
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ListAccountOrganizationsRequest {
9
+ /**
10
+ * Organization ID from this list. Omit to use the credential's default organization.
11
+ */
12
+ "x-sync-organization-id"?: string;
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { type GetAccountRequest } from "./GetAccountRequest";
2
+ export { type ListAccountOrganizationsRequest } from "./ListAccountOrganizationsRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,7 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface AccountActiveJobs {
5
- /** In-flight video lipsync generations. Compare with limits.concurrency; batch generations are included here and count toward it only below the Scale plan. */
5
+ /** In-flight video lipsync generations. Compare with limits.concurrency; batch generations are included here but do not count toward it. */
6
6
  generations: number;
7
7
  /** All in-flight jobs, including dubbing and text-to-speech. Not a limit. */
8
8
  total: number;
@@ -2,7 +2,7 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface AccountCredits {
5
- /** Credits that can be spent now: the balance minus credits reserved by in-flight jobs. 1 credit = $0.01. */
5
+ /** Credits currently available for generation usage. */
6
6
  available: number;
7
7
  /** Credits the plan grants each billing period. */
8
8
  periodGrant: number;
@@ -3,10 +3,10 @@
3
3
  */
4
4
  import * as Sync from "../../../index";
5
5
  export interface AccountFreeAllowance {
6
- /** Free lipsync generations. In-flight generations count as used. */
6
+ /** Free lipsync generation allowance. */
7
7
  generations: Sync.AccountAllowanceUsage;
8
8
  /** Free text-to-speech and dubbing jobs, which share one pool. */
9
9
  speech: Sync.AccountAllowanceUsage;
10
- /** When the free month resets. It is anchored to the day the organization was created. */
10
+ /** When the free allowance renews. */
11
11
  resetsAt: string;
12
12
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sync from "../../../index";
5
+ export interface AccountOrganizationListItem extends Sync.AccountOrganization {
6
+ plan: Sync.AccountPlan;
7
+ /** Whether this organization is selected for the current request. */
8
+ isCurrent: boolean;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sync from "../../../index";
5
+ export interface AccountOrganizations {
6
+ organizations: Sync.AccountOrganizationListItem[];
7
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,8 +8,10 @@ import * as Sync from "../../../index";
8
8
  export interface AccountOverview {
9
9
  /** The user this credential acts for: the signed-in user for sessions and OAuth tokens, or the API key owner. Null for an API key that has no owner. */
10
10
  account: Sync.AccountUser | null;
11
- /** The organization every request with this credential acts in. */
11
+ /** The organization selected for this request, or the credential's default organization. */
12
12
  organization: Sync.AccountOrganization;
13
+ /** Organizations these credentials can access, current one first. */
14
+ organizations: Sync.AccountOrganizationListItem[];
13
15
  /** `api_key`: an x-api-key header. `oauth`: an access token issued to a connected app such as an MCP client. `session`: a Studio sign-in. */
14
16
  credentialType: Sync.AccountCredentialType;
15
17
  /** Current plan. */
@@ -28,4 +30,6 @@ export interface AccountOverview {
28
30
  freeAllowance: Sync.AccountFreeAllowance | null;
29
31
  /** Studio billing page where a person can change plan, pay, top up or update the payment method. It needs a signed-in browser. */
30
32
  billingUrl: string;
33
+ /** API features currently available to these credentials. New names may be added. */
34
+ features: string[];
31
35
  }
@@ -1,4 +1,6 @@
1
1
  export * from "./AccountOverview";
2
+ export * from "./AccountOrganizations";
3
+ export * from "./AccountOrganizationListItem";
2
4
  export * from "./AccountUser";
3
5
  export * from "./AccountOrganization";
4
6
  export * from "./AccountCredentialType";
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./AccountOverview"), exports);
18
+ __exportStar(require("./AccountOrganizations"), exports);
19
+ __exportStar(require("./AccountOrganizationListItem"), exports);
18
20
  __exportStar(require("./AccountUser"), exports);
19
21
  __exportStar(require("./AccountOrganization"), exports);
20
22
  __exportStar(require("./AccountCredentialType"), exports);
@@ -43,6 +43,70 @@ export declare class Assets {
43
43
  */
44
44
  list(request?: Sync.ListAssetsRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Sync.PaginatedAssetsResponse>;
45
45
  private __list;
46
+ /**
47
+ * Count the assets visible to your organization after applying the filters.
48
+ *
49
+ * @param {Sync.CountAssetsRequest} request
50
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
51
+ *
52
+ * @throws {@link Sync.UnauthorizedError}
53
+ * @throws {@link Sync.InternalServerError}
54
+ *
55
+ * @example
56
+ * await client.assets.count()
57
+ */
58
+ count(request?: Sync.CountAssetsRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<number>;
59
+ private __count;
60
+ /**
61
+ * Retrieve multiple assets by ID. Assets you cannot access are omitted from the response.
62
+ *
63
+ * @param {Sync.BatchGetAssetsRequest} request
64
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
65
+ *
66
+ * @throws {@link Sync.BadRequestError}
67
+ * @throws {@link Sync.UnauthorizedError}
68
+ * @throws {@link Sync.InternalServerError}
69
+ *
70
+ * @example
71
+ * await client.assets.getMany({
72
+ * ids: "ids"
73
+ * })
74
+ */
75
+ getMany(request: Sync.BatchGetAssetsRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Sync.Asset[]>;
76
+ private __getMany;
77
+ /**
78
+ * Get a URL for downloading an asset. The response body is a plain-text URL. Fetch that URL separately; do not send your API key to it.
79
+ *
80
+ * @param {Sync.AssetId} id
81
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
82
+ *
83
+ * @throws {@link Sync.UnauthorizedError}
84
+ * @throws {@link Sync.NotFoundError}
85
+ * @throws {@link Sync.InternalServerError}
86
+ *
87
+ * @example
88
+ * await client.assets.getDownloadUrl("id")
89
+ */
90
+ getDownloadUrl(id: Sync.AssetId, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<string>;
91
+ private __getDownloadUrl;
92
+ /**
93
+ * Find the newest live asset registered with the same API key, SHA-256 digest, and type. Reuse its id instead of uploading the file again. Assets registered with another API key do not match, even within the same organization. Returns asset null when no asset matches.
94
+ *
95
+ * @param {Sync.FindUploadedAssetRequest} request
96
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
97
+ *
98
+ * @throws {@link Sync.BadRequestError}
99
+ * @throws {@link Sync.UnauthorizedError}
100
+ * @throws {@link Sync.InternalServerError}
101
+ *
102
+ * @example
103
+ * await client.assets.findUploaded({
104
+ * contentSha256: "contentSha256",
105
+ * type: "AUDIO"
106
+ * })
107
+ */
108
+ findUploaded(request: Sync.FindUploadedAssetRequest, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Sync.FindUploadedAssetResponse>;
109
+ private __findUploaded;
46
110
  /**
47
111
  * Retrieve a specific asset by ID.
48
112
  *
@@ -59,7 +123,7 @@ export declare class Assets {
59
123
  get(id: Sync.AssetId, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Sync.Asset>;
60
124
  private __get;
61
125
  /**
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.
126
+ * Request a presigned URL to upload a local file. PUT the file bytes to the returned uploadUrl with the same Content-Type, then register the file as an asset via POST /v2/assets using the returned url. Single uploads are capped at 5 GiB (5,368,709,120 bytes).
63
127
  *
64
128
  * @param {Sync.CreateAssetUploadRequest} request
65
129
  * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
@@ -83,12 +147,18 @@ export declare class Assets {
83
147
  *
84
148
  * 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
149
  *
150
+ * A link to a single TikTok, Instagram, Facebook, or YouTube video is imported instead of registered. The response is 409 import_in_progress until the video is downloaded; send the same request again after Retry-After to get the imported VIDEO asset, named after the video. A failed import returns 422 import_failed; check the message or upload the file instead. A 429 means the concurrent or daily import limit was reached; follow Retry-After. Link imports return 403 import_not_enabled when unavailable for your account and 503 import_unavailable when temporarily unavailable. See [Asset Uploads](/docs/developer-guides/asset-uploads#import-a-social-video-link).
151
+ *
86
152
  * @param {Sync.CreateAssetRequest} request
87
153
  * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
88
154
  *
89
155
  * @throws {@link Sync.BadRequestError}
90
156
  * @throws {@link Sync.UnauthorizedError}
157
+ * @throws {@link Sync.ForbiddenError}
158
+ * @throws {@link Sync.LinkImportInProgressError}
91
159
  * @throws {@link Sync.UnprocessableEntityError}
160
+ * @throws {@link Sync.LinkImportTooManyRequestsError}
161
+ * @throws {@link Sync.ServiceUnavailableError}
92
162
  * @throws {@link Sync.InternalServerError}
93
163
  *
94
164
  * @example