frameio 2.0.2 → 3.0.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 (788) hide show
  1. package/dist/cjs/BaseClient.d.ts +40 -0
  2. package/dist/cjs/BaseClient.js +62 -0
  3. package/dist/cjs/Client.d.ts +62 -68
  4. package/dist/cjs/Client.js +65 -39
  5. package/dist/cjs/api/errors/BadRequestError.d.ts +2 -2
  6. package/dist/cjs/api/errors/BadRequestError.js +5 -1
  7. package/dist/cjs/api/errors/ConflictError.d.ts +2 -2
  8. package/dist/cjs/api/errors/ConflictError.js +5 -1
  9. package/dist/cjs/api/errors/ForbiddenError.d.ts +2 -2
  10. package/dist/cjs/api/errors/ForbiddenError.js +5 -1
  11. package/dist/cjs/api/errors/NotFoundError.d.ts +2 -2
  12. package/dist/cjs/api/errors/NotFoundError.js +5 -1
  13. package/dist/cjs/api/errors/TooManyRequestsError.d.ts +2 -2
  14. package/dist/cjs/api/errors/TooManyRequestsError.js +5 -1
  15. package/dist/cjs/api/errors/UnauthorizedError.d.ts +2 -2
  16. package/dist/cjs/api/errors/UnauthorizedError.js +5 -1
  17. package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -1
  18. package/dist/cjs/api/errors/UnprocessableEntityError.js +5 -1
  19. package/dist/cjs/api/errors/index.d.ts +3 -3
  20. package/dist/cjs/api/errors/index.js +3 -3
  21. package/dist/cjs/api/index.d.ts +1 -1
  22. package/dist/cjs/api/index.js +1 -1
  23. package/dist/cjs/api/resources/accountPermissions/client/Client.d.ts +11 -30
  24. package/dist/cjs/api/resources/accountPermissions/client/Client.js +71 -86
  25. package/dist/cjs/api/resources/accountPermissions/client/index.d.ts +0 -1
  26. package/dist/cjs/api/resources/accountPermissions/client/requests/AccountPermissionsIndexRequest.d.ts +1 -3
  27. package/dist/cjs/api/resources/accountPermissions/client/requests/index.d.ts +1 -1
  28. package/dist/cjs/api/resources/accountPermissions/exports.d.ts +2 -0
  29. package/dist/cjs/api/resources/accountPermissions/exports.js +21 -0
  30. package/dist/cjs/api/resources/accounts/client/Client.d.ts +13 -32
  31. package/dist/cjs/api/resources/accounts/client/Client.js +89 -124
  32. package/dist/cjs/api/resources/accounts/client/index.d.ts +0 -1
  33. package/dist/cjs/api/resources/accounts/client/requests/AccountsIndexRequest.d.ts +1 -3
  34. package/dist/cjs/api/resources/accounts/client/requests/AuditlogIndexRequest.d.ts +1 -5
  35. package/dist/cjs/api/resources/accounts/client/requests/index.d.ts +2 -2
  36. package/dist/cjs/api/resources/accounts/exports.d.ts +2 -0
  37. package/dist/cjs/api/resources/accounts/exports.js +21 -0
  38. package/dist/cjs/api/resources/comments/client/Client.d.ts +28 -47
  39. package/dist/cjs/api/resources/comments/client/Client.js +143 -210
  40. package/dist/cjs/api/resources/comments/client/index.d.ts +0 -1
  41. package/dist/cjs/api/resources/comments/client/requests/CommentsIndexRequest.d.ts +1 -5
  42. package/dist/cjs/api/resources/comments/client/requests/CommentsShowRequest.d.ts +1 -3
  43. package/dist/cjs/api/resources/comments/client/requests/CreateCommentParams.d.ts +5 -6
  44. package/dist/cjs/api/resources/comments/client/requests/UpdateCommentParams.d.ts +6 -7
  45. package/dist/cjs/api/resources/comments/client/requests/index.d.ts +4 -4
  46. package/dist/cjs/api/resources/comments/exports.d.ts +2 -0
  47. package/dist/cjs/api/resources/comments/exports.js +21 -0
  48. package/dist/cjs/api/resources/comments/index.d.ts +1 -1
  49. package/dist/cjs/api/resources/comments/index.js +1 -1
  50. package/dist/cjs/api/resources/comments/types/index.d.ts +1 -1
  51. package/dist/cjs/api/resources/comments/types/index.js +1 -1
  52. package/dist/cjs/api/resources/files/client/Client.d.ts +54 -70
  53. package/dist/cjs/api/resources/files/client/Client.js +194 -329
  54. package/dist/cjs/api/resources/files/client/index.d.ts +0 -1
  55. package/dist/cjs/api/resources/files/client/requests/FileCopyParams.d.ts +2 -2
  56. package/dist/cjs/api/resources/files/client/requests/FileCreateParams.d.ts +1 -1
  57. package/dist/cjs/api/resources/files/client/requests/FileMoveParams.d.ts +1 -1
  58. package/dist/cjs/api/resources/files/client/requests/FileUpdateParams.d.ts +1 -1
  59. package/dist/cjs/api/resources/files/client/requests/FilesListRequest.d.ts +1 -4
  60. package/dist/cjs/api/resources/files/client/requests/FilesShowRequest.d.ts +1 -2
  61. package/dist/cjs/api/resources/files/client/requests/index.d.ts +9 -9
  62. package/dist/cjs/api/resources/files/exports.d.ts +2 -0
  63. package/dist/cjs/api/resources/files/exports.js +21 -0
  64. package/dist/cjs/api/resources/files/index.d.ts +1 -1
  65. package/dist/cjs/api/resources/files/index.js +1 -1
  66. package/dist/cjs/api/resources/files/types/index.d.ts +1 -1
  67. package/dist/cjs/api/resources/files/types/index.js +1 -1
  68. package/dist/cjs/api/resources/folders/client/Client.d.ts +40 -58
  69. package/dist/cjs/api/resources/folders/client/Client.js +153 -262
  70. package/dist/cjs/api/resources/folders/client/index.d.ts +0 -1
  71. package/dist/cjs/api/resources/folders/client/requests/FolderCopyParams.d.ts +1 -1
  72. package/dist/cjs/api/resources/folders/client/requests/FolderCreateParams.d.ts +1 -1
  73. package/dist/cjs/api/resources/folders/client/requests/FolderMoveParams.d.ts +1 -1
  74. package/dist/cjs/api/resources/folders/client/requests/FolderUpdateParams.d.ts +1 -1
  75. package/dist/cjs/api/resources/folders/client/requests/FoldersIndexRequest.d.ts +1 -5
  76. package/dist/cjs/api/resources/folders/client/requests/FoldersListRequest.d.ts +1 -4
  77. package/dist/cjs/api/resources/folders/client/requests/FoldersShowRequest.d.ts +1 -2
  78. package/dist/cjs/api/resources/folders/client/requests/index.d.ts +7 -7
  79. package/dist/cjs/api/resources/folders/exports.d.ts +2 -0
  80. package/dist/cjs/api/resources/folders/exports.js +21 -0
  81. package/dist/cjs/api/resources/folders/index.d.ts +1 -1
  82. package/dist/cjs/api/resources/folders/index.js +1 -1
  83. package/dist/cjs/api/resources/folders/types/index.d.ts +1 -1
  84. package/dist/cjs/api/resources/folders/types/index.js +1 -1
  85. package/dist/cjs/api/resources/index.d.ts +24 -24
  86. package/dist/cjs/api/resources/index.js +28 -28
  87. package/dist/cjs/api/resources/metadata/client/Client.d.ts +16 -34
  88. package/dist/cjs/api/resources/metadata/client/Client.js +44 -70
  89. package/dist/cjs/api/resources/metadata/client/index.d.ts +0 -1
  90. package/dist/cjs/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.ts +2 -2
  91. package/dist/cjs/api/resources/metadata/client/requests/MetadataShowRequest.d.ts +0 -1
  92. package/dist/cjs/api/resources/metadata/client/requests/index.d.ts +2 -2
  93. package/dist/cjs/api/resources/metadata/exports.d.ts +2 -0
  94. package/dist/cjs/api/resources/metadata/exports.js +21 -0
  95. package/dist/cjs/api/resources/metadataFields/client/Client.d.ts +22 -40
  96. package/dist/cjs/api/resources/metadataFields/client/Client.js +77 -131
  97. package/dist/cjs/api/resources/metadataFields/client/index.d.ts +0 -1
  98. package/dist/cjs/api/resources/metadataFields/client/requests/CreateFieldDefinitionParams.d.ts +1 -1
  99. package/dist/cjs/api/resources/metadataFields/client/requests/MetadataFieldDefinitionsIndexRequest.d.ts +1 -4
  100. package/dist/cjs/api/resources/metadataFields/client/requests/UpdateFieldDefinitionParams.d.ts +1 -1
  101. package/dist/cjs/api/resources/metadataFields/client/requests/index.d.ts +3 -3
  102. package/dist/cjs/api/resources/metadataFields/exports.d.ts +2 -0
  103. package/dist/cjs/api/resources/metadataFields/exports.js +21 -0
  104. package/dist/cjs/api/resources/metadataFields/index.d.ts +1 -1
  105. package/dist/cjs/api/resources/metadataFields/index.js +1 -1
  106. package/dist/cjs/api/resources/metadataFields/types/CreateFieldDefinitionParamsData.d.ts +3 -3
  107. package/dist/cjs/api/resources/metadataFields/types/UpdateFieldDefinitionParamsData.d.ts +3 -3
  108. package/dist/cjs/api/resources/metadataFields/types/index.d.ts +1 -1
  109. package/dist/cjs/api/resources/metadataFields/types/index.js +1 -1
  110. package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +22 -41
  111. package/dist/cjs/api/resources/projectPermissions/client/Client.js +104 -141
  112. package/dist/cjs/api/resources/projectPermissions/client/index.d.ts +0 -1
  113. package/dist/cjs/api/resources/projectPermissions/client/requests/ProjectPermissionsIndexRequest.d.ts +1 -3
  114. package/dist/cjs/api/resources/projectPermissions/client/requests/index.d.ts +1 -1
  115. package/dist/cjs/api/resources/projectPermissions/exports.d.ts +2 -0
  116. package/dist/cjs/api/resources/projectPermissions/exports.js +21 -0
  117. package/dist/cjs/api/resources/projects/client/Client.d.ts +28 -47
  118. package/dist/cjs/api/resources/projects/client/Client.js +136 -196
  119. package/dist/cjs/api/resources/projects/client/index.d.ts +0 -1
  120. package/dist/cjs/api/resources/projects/client/requests/ProjectParams.d.ts +1 -1
  121. package/dist/cjs/api/resources/projects/client/requests/ProjectUpdateParams.d.ts +3 -3
  122. package/dist/cjs/api/resources/projects/client/requests/ProjectsIndexRequest.d.ts +1 -4
  123. package/dist/cjs/api/resources/projects/client/requests/ProjectsShowRequest.d.ts +0 -1
  124. package/dist/cjs/api/resources/projects/client/requests/index.d.ts +4 -4
  125. package/dist/cjs/api/resources/projects/client/requests/index.js +3 -0
  126. package/dist/cjs/api/resources/projects/exports.d.ts +2 -0
  127. package/dist/cjs/api/resources/projects/exports.js +21 -0
  128. package/dist/cjs/api/resources/shares/client/Client.d.ts +49 -69
  129. package/dist/cjs/api/resources/shares/client/Client.js +252 -364
  130. package/dist/cjs/api/resources/shares/client/index.d.ts +0 -1
  131. package/dist/cjs/api/resources/shares/client/requests/AddReviewersToShareParams.d.ts +4 -4
  132. package/dist/cjs/api/resources/shares/client/requests/CreateShareParams.d.ts +1 -1
  133. package/dist/cjs/api/resources/shares/client/requests/RemoveReviewerParams.d.ts +4 -4
  134. package/dist/cjs/api/resources/shares/client/requests/SharesIndexRequest.d.ts +1 -3
  135. package/dist/cjs/api/resources/shares/client/requests/SharesListReviewersRequest.d.ts +1 -3
  136. package/dist/cjs/api/resources/shares/client/requests/UpdateShareParams.d.ts +6 -6
  137. package/dist/cjs/api/resources/shares/client/requests/index.d.ts +7 -7
  138. package/dist/cjs/api/resources/shares/client/requests/index.js +3 -0
  139. package/dist/cjs/api/resources/shares/exports.d.ts +2 -0
  140. package/dist/cjs/api/resources/shares/exports.js +21 -0
  141. package/dist/cjs/api/resources/shares/index.d.ts +1 -1
  142. package/dist/cjs/api/resources/shares/index.js +1 -1
  143. package/dist/cjs/api/resources/shares/types/CreateShareParamsData.d.ts +1 -1
  144. package/dist/cjs/api/resources/users/client/Client.d.ts +10 -28
  145. package/dist/cjs/api/resources/users/client/Client.js +19 -33
  146. package/dist/cjs/api/resources/users/exports.d.ts +2 -0
  147. package/dist/cjs/api/resources/users/exports.js +21 -0
  148. package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +33 -51
  149. package/dist/cjs/api/resources/versionStacks/client/Client.js +123 -208
  150. package/dist/cjs/api/resources/versionStacks/client/index.d.ts +0 -1
  151. package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCopyParams.d.ts +1 -1
  152. package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.ts +1 -1
  153. package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackMoveParams.d.ts +1 -1
  154. package/dist/cjs/api/resources/versionStacks/client/requests/VersionStacksIndexRequest.d.ts +1 -4
  155. package/dist/cjs/api/resources/versionStacks/client/requests/VersionStacksListRequest.d.ts +1 -4
  156. package/dist/cjs/api/resources/versionStacks/client/requests/VersionStacksShowRequest.d.ts +1 -2
  157. package/dist/cjs/api/resources/versionStacks/client/requests/index.d.ts +6 -6
  158. package/dist/cjs/api/resources/versionStacks/exports.d.ts +2 -0
  159. package/dist/cjs/api/resources/versionStacks/exports.js +21 -0
  160. package/dist/cjs/api/resources/versionStacks/index.d.ts +1 -1
  161. package/dist/cjs/api/resources/versionStacks/index.js +1 -1
  162. package/dist/cjs/api/resources/versionStacks/types/index.d.ts +1 -1
  163. package/dist/cjs/api/resources/versionStacks/types/index.js +1 -1
  164. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +28 -47
  165. package/dist/cjs/api/resources/webhooks/client/Client.js +136 -196
  166. package/dist/cjs/api/resources/webhooks/client/index.d.ts +0 -1
  167. package/dist/cjs/api/resources/webhooks/client/requests/WebhookCreateParams.d.ts +1 -1
  168. package/dist/cjs/api/resources/webhooks/client/requests/WebhookUpdateParams.d.ts +5 -5
  169. package/dist/cjs/api/resources/webhooks/client/requests/WebhooksIndexRequest.d.ts +1 -4
  170. package/dist/cjs/api/resources/webhooks/client/requests/WebhooksShowRequest.d.ts +0 -1
  171. package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +4 -4
  172. package/dist/cjs/api/resources/webhooks/exports.d.ts +2 -0
  173. package/dist/cjs/api/resources/webhooks/exports.js +21 -0
  174. package/dist/cjs/api/resources/workspacePermissions/client/Client.d.ts +22 -41
  175. package/dist/cjs/api/resources/workspacePermissions/client/Client.js +104 -141
  176. package/dist/cjs/api/resources/workspacePermissions/client/index.d.ts +0 -1
  177. package/dist/cjs/api/resources/workspacePermissions/client/requests/WorkspacePermissionsIndexRequest.d.ts +1 -3
  178. package/dist/cjs/api/resources/workspacePermissions/client/requests/index.d.ts +1 -1
  179. package/dist/cjs/api/resources/workspacePermissions/exports.d.ts +2 -0
  180. package/dist/cjs/api/resources/workspacePermissions/exports.js +21 -0
  181. package/dist/cjs/api/resources/workspaces/client/Client.d.ts +26 -45
  182. package/dist/cjs/api/resources/workspaces/client/Client.js +134 -197
  183. package/dist/cjs/api/resources/workspaces/client/index.d.ts +0 -1
  184. package/dist/cjs/api/resources/workspaces/client/requests/WorkspacesIndexRequest.d.ts +1 -4
  185. package/dist/cjs/api/resources/workspaces/client/requests/WorkspacesShowRequest.d.ts +0 -1
  186. package/dist/cjs/api/resources/workspaces/client/requests/index.d.ts +2 -2
  187. package/dist/cjs/api/resources/workspaces/exports.d.ts +2 -0
  188. package/dist/cjs/api/resources/workspaces/exports.js +21 -0
  189. package/dist/cjs/api/types/Account.d.ts +4 -4
  190. package/dist/cjs/api/types/AccountUserRole.d.ts +2 -2
  191. package/dist/cjs/api/types/AccountUserRolesResponse.d.ts +2 -2
  192. package/dist/cjs/api/types/AccountsResponse.d.ts +2 -2
  193. package/dist/cjs/api/types/AddAssetResponse.d.ts +1 -1
  194. package/dist/cjs/api/types/AssetCommon.d.ts +1 -1
  195. package/dist/cjs/api/types/AssetCommonWithIncludes.d.ts +5 -5
  196. package/dist/cjs/api/types/AssetShareParams.d.ts +5 -5
  197. package/dist/cjs/api/types/AssetWithIncludes.d.ts +3 -3
  198. package/dist/cjs/api/types/AuditLogsWithIncludesResponse.d.ts +2 -2
  199. package/dist/cjs/api/types/AuditLogwithIncludes.d.ts +4 -4
  200. package/dist/cjs/api/types/BadRequest.d.ts +3 -3
  201. package/dist/cjs/api/types/BooleanValue.d.ts +2 -2
  202. package/dist/cjs/api/types/Comment.d.ts +6 -6
  203. package/dist/cjs/api/types/CommentResponse.d.ts +1 -1
  204. package/dist/cjs/api/types/CommentWithIncludes.d.ts +3 -3
  205. package/dist/cjs/api/types/CommentWithIncludesResponse.d.ts +1 -1
  206. package/dist/cjs/api/types/CommentsWithIncludesResponse.d.ts +2 -2
  207. package/dist/cjs/api/types/Conflict.d.ts +3 -3
  208. package/dist/cjs/api/types/DateDefinition.d.ts +3 -4
  209. package/dist/cjs/api/types/DateDefinitionParams.d.ts +3 -4
  210. package/dist/cjs/api/types/DateDefinitionWithIncludes.d.ts +2 -2
  211. package/dist/cjs/api/types/DateValue.d.ts +2 -2
  212. package/dist/cjs/api/types/FieldDefinition.d.ts +3 -3
  213. package/dist/cjs/api/types/FieldDefinitionResponse.d.ts +1 -1
  214. package/dist/cjs/api/types/FieldDefinitionWithIncludes.d.ts +3 -3
  215. package/dist/cjs/api/types/FieldDefinitionsWithIncludesResponse.d.ts +2 -2
  216. package/dist/cjs/api/types/FileAssetsWithIncludesResponse.d.ts +2 -2
  217. package/dist/cjs/api/types/FileCopyResponse.d.ts +1 -1
  218. package/dist/cjs/api/types/FileRemoteUploadResponse.d.ts +1 -1
  219. package/dist/cjs/api/types/FileResponse.d.ts +1 -1
  220. package/dist/cjs/api/types/FileUploadStatus.d.ts +2 -2
  221. package/dist/cjs/api/types/FileUploadStatusResponse.d.ts +1 -1
  222. package/dist/cjs/api/types/FileWithIncludes.d.ts +2 -2
  223. package/dist/cjs/api/types/FileWithIncludesResponse.d.ts +1 -1
  224. package/dist/cjs/api/types/FileWithUploadUrls.d.ts +2 -2
  225. package/dist/cjs/api/types/FileWithUploadUrlsResponse.d.ts +1 -1
  226. package/dist/cjs/api/types/File_.d.ts +3 -3
  227. package/dist/cjs/api/types/Filters.d.ts +9 -9
  228. package/dist/cjs/api/types/Folder.d.ts +2 -2
  229. package/dist/cjs/api/types/FolderAssetsWithIncludesResponse.d.ts +2 -2
  230. package/dist/cjs/api/types/FolderCopyResponse.d.ts +1 -1
  231. package/dist/cjs/api/types/FolderResponse.d.ts +1 -1
  232. package/dist/cjs/api/types/FolderWithIncludes.d.ts +6 -6
  233. package/dist/cjs/api/types/FolderWithIncludesResponse.d.ts +1 -1
  234. package/dist/cjs/api/types/FoldersWithIncludesResponse.d.ts +2 -2
  235. package/dist/cjs/api/types/Forbidden.d.ts +3 -3
  236. package/dist/cjs/api/types/IntegerValue.d.ts +2 -2
  237. package/dist/cjs/api/types/Links.d.ts +1 -1
  238. package/dist/cjs/api/types/LongTextDefinition.d.ts +1 -2
  239. package/dist/cjs/api/types/LongTextDefinitionWithIncludes.d.ts +2 -2
  240. package/dist/cjs/api/types/MediaLinkCommon.d.ts +1 -1
  241. package/dist/cjs/api/types/MediaLinksCollection.d.ts +8 -8
  242. package/dist/cjs/api/types/MetadataField.d.ts +3 -3
  243. package/dist/cjs/api/types/MetadataResponse.d.ts +1 -1
  244. package/dist/cjs/api/types/MetadataWithDefinition.d.ts +1 -1
  245. package/dist/cjs/api/types/MultiSelectValue.d.ts +2 -2
  246. package/dist/cjs/api/types/MultiUserValue.d.ts +3 -3
  247. package/dist/cjs/api/types/NotFound.d.ts +3 -3
  248. package/dist/cjs/api/types/NumberDefinition.d.ts +1 -1
  249. package/dist/cjs/api/types/NumberDefinitionParams.d.ts +1 -1
  250. package/dist/cjs/api/types/NumberDefinitionWithIncludes.d.ts +2 -2
  251. package/dist/cjs/api/types/NumberValue.d.ts +2 -2
  252. package/dist/cjs/api/types/OriginalMediaLink.d.ts +2 -2
  253. package/dist/cjs/api/types/Profile.d.ts +1 -1
  254. package/dist/cjs/api/types/ProfileResponse.d.ts +1 -1
  255. package/dist/cjs/api/types/Project.d.ts +1 -1
  256. package/dist/cjs/api/types/ProjectResponse.d.ts +1 -1
  257. package/dist/cjs/api/types/ProjectUserRolesResponse.d.ts +2 -2
  258. package/dist/cjs/api/types/ProjectWithIncludes.d.ts +3 -3
  259. package/dist/cjs/api/types/ProjectWithIncludesResponse.d.ts +1 -1
  260. package/dist/cjs/api/types/ProjectsWithIncludesResponse.d.ts +2 -2
  261. package/dist/cjs/api/types/RatingDefinition.d.ts +2 -2
  262. package/dist/cjs/api/types/RatingDefinitionParams.d.ts +2 -2
  263. package/dist/cjs/api/types/RatingDefinitionWithIncludes.d.ts +2 -2
  264. package/dist/cjs/api/types/RemoveAssetResponse.d.ts +1 -1
  265. package/dist/cjs/api/types/RenditionMediaLink.d.ts +2 -2
  266. package/dist/cjs/api/types/SelectDefinition.d.ts +3 -3
  267. package/dist/cjs/api/types/SelectDefinitionParams.d.ts +2 -2
  268. package/dist/cjs/api/types/SelectDefinitionWithIncludes.d.ts +2 -2
  269. package/dist/cjs/api/types/SelectMultiDefinition.d.ts +3 -3
  270. package/dist/cjs/api/types/SelectMultiDefinitionParams.d.ts +2 -2
  271. package/dist/cjs/api/types/SelectMultiDefinitionWithIncludes.d.ts +2 -2
  272. package/dist/cjs/api/types/SelectValue.d.ts +2 -2
  273. package/dist/cjs/api/types/Share.d.ts +6 -6
  274. package/dist/cjs/api/types/ShareResponse.d.ts +1 -1
  275. package/dist/cjs/api/types/ShareReviewersResponse.d.ts +2 -2
  276. package/dist/cjs/api/types/SharesResponse.d.ts +2 -2
  277. package/dist/cjs/api/types/SingleUserValue.d.ts +3 -3
  278. package/dist/cjs/api/types/TextDefinition.d.ts +1 -2
  279. package/dist/cjs/api/types/TextDefinitionWithIncludes.d.ts +2 -2
  280. package/dist/cjs/api/types/TextValue.d.ts +2 -2
  281. package/dist/cjs/api/types/ToggleDefinition.d.ts +1 -1
  282. package/dist/cjs/api/types/ToggleDefinitionParams.d.ts +2 -2
  283. package/dist/cjs/api/types/ToggleDefinitionWithIncludes.d.ts +2 -2
  284. package/dist/cjs/api/types/TooManyRequests.d.ts +3 -3
  285. package/dist/cjs/api/types/Unauthorized.d.ts +3 -3
  286. package/dist/cjs/api/types/UnprocessableContent.d.ts +3 -3
  287. package/dist/cjs/api/types/UpdateDateDefinitionParams.d.ts +6 -7
  288. package/dist/cjs/api/types/UpdateLongTextDefinitionParams.d.ts +1 -1
  289. package/dist/cjs/api/types/UpdateNumberDefinitionParams.d.ts +4 -4
  290. package/dist/cjs/api/types/UpdateRatingDefinitionParams.d.ts +5 -5
  291. package/dist/cjs/api/types/UpdateSelectDefinitionParams.d.ts +5 -5
  292. package/dist/cjs/api/types/UpdateSelectMultiDefinitionParams.d.ts +5 -5
  293. package/dist/cjs/api/types/UpdateTextDefinitionParams.d.ts +1 -1
  294. package/dist/cjs/api/types/UpdateToggleDefinitionParams.d.ts +3 -3
  295. package/dist/cjs/api/types/UpdateUserMultiDefinitionParams.d.ts +3 -4
  296. package/dist/cjs/api/types/UpdateUserRolesResponse.d.ts +1 -1
  297. package/dist/cjs/api/types/UpdateUserSingleDefinitionParams.d.ts +3 -4
  298. package/dist/cjs/api/types/User.d.ts +5 -5
  299. package/dist/cjs/api/types/UserMultiDefinition.d.ts +0 -1
  300. package/dist/cjs/api/types/UserMultiDefinitionParams.d.ts +1 -2
  301. package/dist/cjs/api/types/UserMultiDefinitionWithIncludes.d.ts +2 -2
  302. package/dist/cjs/api/types/UserRole.d.ts +1 -1
  303. package/dist/cjs/api/types/UserSingleDefinition.d.ts +0 -1
  304. package/dist/cjs/api/types/UserSingleDefinitionParams.d.ts +1 -2
  305. package/dist/cjs/api/types/UserSingleDefinitionWithIncludes.d.ts +2 -2
  306. package/dist/cjs/api/types/VersionStack.d.ts +2 -2
  307. package/dist/cjs/api/types/VersionStackAssetsWithIncludesResponse.d.ts +2 -2
  308. package/dist/cjs/api/types/VersionStackCopyResponse.d.ts +1 -1
  309. package/dist/cjs/api/types/VersionStackResponse.d.ts +1 -1
  310. package/dist/cjs/api/types/VersionStackWithIncludes.d.ts +6 -6
  311. package/dist/cjs/api/types/VersionStackWithIncludesResponse.d.ts +1 -1
  312. package/dist/cjs/api/types/VersionStacksWithIncludesResponse.d.ts +2 -2
  313. package/dist/cjs/api/types/Webhook.d.ts +3 -3
  314. package/dist/cjs/api/types/WebhookCreateResponse.d.ts +1 -1
  315. package/dist/cjs/api/types/WebhookResponse.d.ts +1 -1
  316. package/dist/cjs/api/types/WebhookWithIncludes.d.ts +2 -2
  317. package/dist/cjs/api/types/WebhookWithIncludesResponse.d.ts +1 -1
  318. package/dist/cjs/api/types/WebhooksWithIncludesResponse.d.ts +2 -2
  319. package/dist/cjs/api/types/WorkspaceParams.d.ts +1 -1
  320. package/dist/cjs/api/types/WorkspaceResponse.d.ts +1 -1
  321. package/dist/cjs/api/types/WorkspaceUserRolesResponse.d.ts +2 -2
  322. package/dist/cjs/api/types/WorkspaceWithIncludes.d.ts +2 -2
  323. package/dist/cjs/api/types/WorkspaceWithIncludesResponse.d.ts +1 -1
  324. package/dist/cjs/api/types/WorkspacesWithIncludesResponse.d.ts +2 -2
  325. package/dist/cjs/api/types/index.d.ts +143 -143
  326. package/dist/cjs/api/types/index.js +143 -143
  327. package/dist/cjs/auth/BearerAuthProvider.d.ts +20 -0
  328. package/dist/cjs/auth/BearerAuthProvider.js +79 -0
  329. package/dist/cjs/auth/index.d.ts +1 -0
  330. package/dist/cjs/auth/index.js +5 -0
  331. package/dist/cjs/core/auth/AuthProvider.d.ts +5 -2
  332. package/dist/cjs/core/auth/BearerToken.d.ts +3 -1
  333. package/dist/cjs/core/auth/BearerToken.js +7 -6
  334. package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
  335. package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
  336. package/dist/cjs/core/auth/index.d.ts +1 -0
  337. package/dist/cjs/core/auth/index.js +3 -1
  338. package/dist/cjs/core/exports.d.ts +2 -0
  339. package/dist/cjs/core/exports.js +18 -0
  340. package/dist/cjs/core/fetcher/APIResponse.d.ts +1 -1
  341. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +5 -6
  342. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +4 -4
  343. package/dist/cjs/core/fetcher/Fetcher.d.ts +12 -6
  344. package/dist/cjs/core/fetcher/Fetcher.js +210 -9
  345. package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +1 -1
  346. package/dist/cjs/core/fetcher/getErrorResponseBody.js +2 -1
  347. package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
  348. package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
  349. package/dist/cjs/core/fetcher/getResponseBody.js +21 -7
  350. package/dist/cjs/core/fetcher/index.d.ts +2 -0
  351. package/dist/cjs/core/fetcher/index.js +3 -1
  352. package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
  353. package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
  354. package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
  355. package/dist/cjs/core/fetcher/makeRequest.js +32 -13
  356. package/dist/cjs/core/fetcher/requestWithRetries.js +3 -12
  357. package/dist/cjs/core/fetcher/signals.d.ts +1 -7
  358. package/dist/cjs/core/fetcher/signals.js +0 -12
  359. package/dist/cjs/core/headers.d.ts +2 -2
  360. package/dist/cjs/core/headers.js +6 -4
  361. package/dist/cjs/core/index.d.ts +4 -2
  362. package/dist/cjs/core/index.js +5 -3
  363. package/dist/cjs/core/logging/exports.d.ts +18 -0
  364. package/dist/cjs/core/logging/exports.js +45 -0
  365. package/dist/cjs/core/logging/index.d.ts +1 -0
  366. package/dist/cjs/core/logging/index.js +17 -0
  367. package/dist/cjs/core/logging/logger.d.ts +126 -0
  368. package/dist/cjs/core/logging/logger.js +144 -0
  369. package/dist/cjs/core/pagination/Page.d.ts +33 -0
  370. package/dist/cjs/core/pagination/Page.js +101 -0
  371. package/dist/cjs/core/pagination/exports.d.ts +1 -0
  372. package/dist/cjs/core/pagination/exports.js +2 -0
  373. package/dist/cjs/core/pagination/index.d.ts +1 -0
  374. package/dist/cjs/core/pagination/index.js +5 -0
  375. package/dist/cjs/core/runtime/runtime.js +17 -15
  376. package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
  377. package/dist/cjs/core/url/encodePathParam.js +21 -0
  378. package/dist/cjs/core/url/index.d.ts +1 -0
  379. package/dist/cjs/core/url/index.js +3 -1
  380. package/dist/cjs/core/url/join.js +3 -4
  381. package/dist/cjs/errors/FrameioError.d.ts +1 -1
  382. package/dist/cjs/errors/FrameioError.js +6 -2
  383. package/dist/cjs/errors/FrameioTimeoutError.js +5 -1
  384. package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
  385. package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
  386. package/dist/cjs/exports.d.ts +1 -0
  387. package/dist/cjs/exports.js +17 -0
  388. package/dist/cjs/index.d.ts +3 -1
  389. package/dist/cjs/index.js +8 -4
  390. package/dist/cjs/version.d.ts +1 -1
  391. package/dist/cjs/version.js +1 -1
  392. package/dist/esm/BaseClient.d.mts +40 -0
  393. package/dist/esm/BaseClient.mjs +25 -0
  394. package/dist/esm/Client.d.mts +62 -68
  395. package/dist/esm/Client.mjs +66 -40
  396. package/dist/esm/api/errors/BadRequestError.d.mts +2 -2
  397. package/dist/esm/api/errors/BadRequestError.mjs +5 -1
  398. package/dist/esm/api/errors/ConflictError.d.mts +2 -2
  399. package/dist/esm/api/errors/ConflictError.mjs +5 -1
  400. package/dist/esm/api/errors/ForbiddenError.d.mts +2 -2
  401. package/dist/esm/api/errors/ForbiddenError.mjs +5 -1
  402. package/dist/esm/api/errors/NotFoundError.d.mts +2 -2
  403. package/dist/esm/api/errors/NotFoundError.mjs +5 -1
  404. package/dist/esm/api/errors/TooManyRequestsError.d.mts +2 -2
  405. package/dist/esm/api/errors/TooManyRequestsError.mjs +5 -1
  406. package/dist/esm/api/errors/UnauthorizedError.d.mts +2 -2
  407. package/dist/esm/api/errors/UnauthorizedError.mjs +5 -1
  408. package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -1
  409. package/dist/esm/api/errors/UnprocessableEntityError.mjs +5 -1
  410. package/dist/esm/api/errors/index.d.mts +3 -3
  411. package/dist/esm/api/errors/index.mjs +3 -3
  412. package/dist/esm/api/index.d.mts +1 -1
  413. package/dist/esm/api/index.mjs +1 -1
  414. package/dist/esm/api/resources/accountPermissions/client/Client.d.mts +11 -30
  415. package/dist/esm/api/resources/accountPermissions/client/Client.mjs +69 -84
  416. package/dist/esm/api/resources/accountPermissions/client/index.d.mts +0 -1
  417. package/dist/esm/api/resources/accountPermissions/client/requests/AccountPermissionsIndexRequest.d.mts +1 -3
  418. package/dist/esm/api/resources/accountPermissions/client/requests/index.d.mts +1 -1
  419. package/dist/esm/api/resources/accountPermissions/exports.d.mts +2 -0
  420. package/dist/esm/api/resources/accountPermissions/exports.mjs +3 -0
  421. package/dist/esm/api/resources/accounts/client/Client.d.mts +13 -32
  422. package/dist/esm/api/resources/accounts/client/Client.mjs +87 -122
  423. package/dist/esm/api/resources/accounts/client/index.d.mts +0 -1
  424. package/dist/esm/api/resources/accounts/client/requests/AccountsIndexRequest.d.mts +1 -3
  425. package/dist/esm/api/resources/accounts/client/requests/AuditlogIndexRequest.d.mts +1 -5
  426. package/dist/esm/api/resources/accounts/client/requests/index.d.mts +2 -2
  427. package/dist/esm/api/resources/accounts/exports.d.mts +2 -0
  428. package/dist/esm/api/resources/accounts/exports.mjs +3 -0
  429. package/dist/esm/api/resources/comments/client/Client.d.mts +28 -47
  430. package/dist/esm/api/resources/comments/client/Client.mjs +141 -208
  431. package/dist/esm/api/resources/comments/client/index.d.mts +0 -1
  432. package/dist/esm/api/resources/comments/client/requests/CommentsIndexRequest.d.mts +1 -5
  433. package/dist/esm/api/resources/comments/client/requests/CommentsShowRequest.d.mts +1 -3
  434. package/dist/esm/api/resources/comments/client/requests/CreateCommentParams.d.mts +5 -6
  435. package/dist/esm/api/resources/comments/client/requests/UpdateCommentParams.d.mts +6 -7
  436. package/dist/esm/api/resources/comments/client/requests/index.d.mts +4 -4
  437. package/dist/esm/api/resources/comments/exports.d.mts +2 -0
  438. package/dist/esm/api/resources/comments/exports.mjs +3 -0
  439. package/dist/esm/api/resources/comments/index.d.mts +1 -1
  440. package/dist/esm/api/resources/comments/index.mjs +1 -1
  441. package/dist/esm/api/resources/comments/types/index.d.mts +1 -1
  442. package/dist/esm/api/resources/comments/types/index.mjs +1 -1
  443. package/dist/esm/api/resources/files/client/Client.d.mts +54 -70
  444. package/dist/esm/api/resources/files/client/Client.mjs +192 -327
  445. package/dist/esm/api/resources/files/client/index.d.mts +0 -1
  446. package/dist/esm/api/resources/files/client/requests/FileCopyParams.d.mts +2 -2
  447. package/dist/esm/api/resources/files/client/requests/FileCreateParams.d.mts +1 -1
  448. package/dist/esm/api/resources/files/client/requests/FileMoveParams.d.mts +1 -1
  449. package/dist/esm/api/resources/files/client/requests/FileUpdateParams.d.mts +1 -1
  450. package/dist/esm/api/resources/files/client/requests/FilesListRequest.d.mts +1 -4
  451. package/dist/esm/api/resources/files/client/requests/FilesShowRequest.d.mts +1 -2
  452. package/dist/esm/api/resources/files/client/requests/index.d.mts +9 -9
  453. package/dist/esm/api/resources/files/exports.d.mts +2 -0
  454. package/dist/esm/api/resources/files/exports.mjs +3 -0
  455. package/dist/esm/api/resources/files/index.d.mts +1 -1
  456. package/dist/esm/api/resources/files/index.mjs +1 -1
  457. package/dist/esm/api/resources/files/types/index.d.mts +1 -1
  458. package/dist/esm/api/resources/files/types/index.mjs +1 -1
  459. package/dist/esm/api/resources/folders/client/Client.d.mts +40 -58
  460. package/dist/esm/api/resources/folders/client/Client.mjs +151 -260
  461. package/dist/esm/api/resources/folders/client/index.d.mts +0 -1
  462. package/dist/esm/api/resources/folders/client/requests/FolderCopyParams.d.mts +1 -1
  463. package/dist/esm/api/resources/folders/client/requests/FolderCreateParams.d.mts +1 -1
  464. package/dist/esm/api/resources/folders/client/requests/FolderMoveParams.d.mts +1 -1
  465. package/dist/esm/api/resources/folders/client/requests/FolderUpdateParams.d.mts +1 -1
  466. package/dist/esm/api/resources/folders/client/requests/FoldersIndexRequest.d.mts +1 -5
  467. package/dist/esm/api/resources/folders/client/requests/FoldersListRequest.d.mts +1 -4
  468. package/dist/esm/api/resources/folders/client/requests/FoldersShowRequest.d.mts +1 -2
  469. package/dist/esm/api/resources/folders/client/requests/index.d.mts +7 -7
  470. package/dist/esm/api/resources/folders/exports.d.mts +2 -0
  471. package/dist/esm/api/resources/folders/exports.mjs +3 -0
  472. package/dist/esm/api/resources/folders/index.d.mts +1 -1
  473. package/dist/esm/api/resources/folders/index.mjs +1 -1
  474. package/dist/esm/api/resources/folders/types/index.d.mts +1 -1
  475. package/dist/esm/api/resources/folders/types/index.mjs +1 -1
  476. package/dist/esm/api/resources/index.d.mts +24 -24
  477. package/dist/esm/api/resources/index.mjs +24 -24
  478. package/dist/esm/api/resources/metadata/client/Client.d.mts +16 -34
  479. package/dist/esm/api/resources/metadata/client/Client.mjs +42 -68
  480. package/dist/esm/api/resources/metadata/client/index.d.mts +0 -1
  481. package/dist/esm/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.mts +2 -2
  482. package/dist/esm/api/resources/metadata/client/requests/MetadataShowRequest.d.mts +0 -1
  483. package/dist/esm/api/resources/metadata/client/requests/index.d.mts +2 -2
  484. package/dist/esm/api/resources/metadata/exports.d.mts +2 -0
  485. package/dist/esm/api/resources/metadata/exports.mjs +3 -0
  486. package/dist/esm/api/resources/metadataFields/client/Client.d.mts +22 -40
  487. package/dist/esm/api/resources/metadataFields/client/Client.mjs +75 -129
  488. package/dist/esm/api/resources/metadataFields/client/index.d.mts +0 -1
  489. package/dist/esm/api/resources/metadataFields/client/requests/CreateFieldDefinitionParams.d.mts +1 -1
  490. package/dist/esm/api/resources/metadataFields/client/requests/MetadataFieldDefinitionsIndexRequest.d.mts +1 -4
  491. package/dist/esm/api/resources/metadataFields/client/requests/UpdateFieldDefinitionParams.d.mts +1 -1
  492. package/dist/esm/api/resources/metadataFields/client/requests/index.d.mts +3 -3
  493. package/dist/esm/api/resources/metadataFields/exports.d.mts +2 -0
  494. package/dist/esm/api/resources/metadataFields/exports.mjs +3 -0
  495. package/dist/esm/api/resources/metadataFields/index.d.mts +1 -1
  496. package/dist/esm/api/resources/metadataFields/index.mjs +1 -1
  497. package/dist/esm/api/resources/metadataFields/types/CreateFieldDefinitionParamsData.d.mts +3 -3
  498. package/dist/esm/api/resources/metadataFields/types/UpdateFieldDefinitionParamsData.d.mts +3 -3
  499. package/dist/esm/api/resources/metadataFields/types/index.d.mts +1 -1
  500. package/dist/esm/api/resources/metadataFields/types/index.mjs +1 -1
  501. package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +22 -41
  502. package/dist/esm/api/resources/projectPermissions/client/Client.mjs +102 -139
  503. package/dist/esm/api/resources/projectPermissions/client/index.d.mts +0 -1
  504. package/dist/esm/api/resources/projectPermissions/client/requests/ProjectPermissionsIndexRequest.d.mts +1 -3
  505. package/dist/esm/api/resources/projectPermissions/client/requests/index.d.mts +1 -1
  506. package/dist/esm/api/resources/projectPermissions/exports.d.mts +2 -0
  507. package/dist/esm/api/resources/projectPermissions/exports.mjs +3 -0
  508. package/dist/esm/api/resources/projects/client/Client.d.mts +28 -47
  509. package/dist/esm/api/resources/projects/client/Client.mjs +134 -194
  510. package/dist/esm/api/resources/projects/client/index.d.mts +0 -1
  511. package/dist/esm/api/resources/projects/client/requests/ProjectParams.d.mts +1 -1
  512. package/dist/esm/api/resources/projects/client/requests/ProjectUpdateParams.d.mts +3 -3
  513. package/dist/esm/api/resources/projects/client/requests/ProjectsIndexRequest.d.mts +1 -4
  514. package/dist/esm/api/resources/projects/client/requests/ProjectsShowRequest.d.mts +0 -1
  515. package/dist/esm/api/resources/projects/client/requests/index.d.mts +4 -4
  516. package/dist/esm/api/resources/projects/client/requests/index.mjs +1 -1
  517. package/dist/esm/api/resources/projects/exports.d.mts +2 -0
  518. package/dist/esm/api/resources/projects/exports.mjs +3 -0
  519. package/dist/esm/api/resources/shares/client/Client.d.mts +49 -69
  520. package/dist/esm/api/resources/shares/client/Client.mjs +250 -362
  521. package/dist/esm/api/resources/shares/client/index.d.mts +0 -1
  522. package/dist/esm/api/resources/shares/client/requests/AddReviewersToShareParams.d.mts +4 -4
  523. package/dist/esm/api/resources/shares/client/requests/CreateShareParams.d.mts +1 -1
  524. package/dist/esm/api/resources/shares/client/requests/RemoveReviewerParams.d.mts +4 -4
  525. package/dist/esm/api/resources/shares/client/requests/SharesIndexRequest.d.mts +1 -3
  526. package/dist/esm/api/resources/shares/client/requests/SharesListReviewersRequest.d.mts +1 -3
  527. package/dist/esm/api/resources/shares/client/requests/UpdateShareParams.d.mts +6 -6
  528. package/dist/esm/api/resources/shares/client/requests/index.d.mts +7 -7
  529. package/dist/esm/api/resources/shares/client/requests/index.mjs +1 -1
  530. package/dist/esm/api/resources/shares/exports.d.mts +2 -0
  531. package/dist/esm/api/resources/shares/exports.mjs +3 -0
  532. package/dist/esm/api/resources/shares/index.d.mts +1 -1
  533. package/dist/esm/api/resources/shares/index.mjs +1 -1
  534. package/dist/esm/api/resources/shares/types/CreateShareParamsData.d.mts +1 -1
  535. package/dist/esm/api/resources/users/client/Client.d.mts +10 -28
  536. package/dist/esm/api/resources/users/client/Client.mjs +17 -31
  537. package/dist/esm/api/resources/users/exports.d.mts +2 -0
  538. package/dist/esm/api/resources/users/exports.mjs +3 -0
  539. package/dist/esm/api/resources/versionStacks/client/Client.d.mts +33 -51
  540. package/dist/esm/api/resources/versionStacks/client/Client.mjs +121 -206
  541. package/dist/esm/api/resources/versionStacks/client/index.d.mts +0 -1
  542. package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCopyParams.d.mts +1 -1
  543. package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.mts +1 -1
  544. package/dist/esm/api/resources/versionStacks/client/requests/VersionStackMoveParams.d.mts +1 -1
  545. package/dist/esm/api/resources/versionStacks/client/requests/VersionStacksIndexRequest.d.mts +1 -4
  546. package/dist/esm/api/resources/versionStacks/client/requests/VersionStacksListRequest.d.mts +1 -4
  547. package/dist/esm/api/resources/versionStacks/client/requests/VersionStacksShowRequest.d.mts +1 -2
  548. package/dist/esm/api/resources/versionStacks/client/requests/index.d.mts +6 -6
  549. package/dist/esm/api/resources/versionStacks/exports.d.mts +2 -0
  550. package/dist/esm/api/resources/versionStacks/exports.mjs +3 -0
  551. package/dist/esm/api/resources/versionStacks/index.d.mts +1 -1
  552. package/dist/esm/api/resources/versionStacks/index.mjs +1 -1
  553. package/dist/esm/api/resources/versionStacks/types/index.d.mts +1 -1
  554. package/dist/esm/api/resources/versionStacks/types/index.mjs +1 -1
  555. package/dist/esm/api/resources/webhooks/client/Client.d.mts +28 -47
  556. package/dist/esm/api/resources/webhooks/client/Client.mjs +134 -194
  557. package/dist/esm/api/resources/webhooks/client/index.d.mts +0 -1
  558. package/dist/esm/api/resources/webhooks/client/requests/WebhookCreateParams.d.mts +1 -1
  559. package/dist/esm/api/resources/webhooks/client/requests/WebhookUpdateParams.d.mts +5 -5
  560. package/dist/esm/api/resources/webhooks/client/requests/WebhooksIndexRequest.d.mts +1 -4
  561. package/dist/esm/api/resources/webhooks/client/requests/WebhooksShowRequest.d.mts +0 -1
  562. package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +4 -4
  563. package/dist/esm/api/resources/webhooks/exports.d.mts +2 -0
  564. package/dist/esm/api/resources/webhooks/exports.mjs +3 -0
  565. package/dist/esm/api/resources/workspacePermissions/client/Client.d.mts +22 -41
  566. package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +102 -139
  567. package/dist/esm/api/resources/workspacePermissions/client/index.d.mts +0 -1
  568. package/dist/esm/api/resources/workspacePermissions/client/requests/WorkspacePermissionsIndexRequest.d.mts +1 -3
  569. package/dist/esm/api/resources/workspacePermissions/client/requests/index.d.mts +1 -1
  570. package/dist/esm/api/resources/workspacePermissions/exports.d.mts +2 -0
  571. package/dist/esm/api/resources/workspacePermissions/exports.mjs +3 -0
  572. package/dist/esm/api/resources/workspaces/client/Client.d.mts +26 -45
  573. package/dist/esm/api/resources/workspaces/client/Client.mjs +132 -195
  574. package/dist/esm/api/resources/workspaces/client/index.d.mts +0 -1
  575. package/dist/esm/api/resources/workspaces/client/requests/WorkspacesIndexRequest.d.mts +1 -4
  576. package/dist/esm/api/resources/workspaces/client/requests/WorkspacesShowRequest.d.mts +0 -1
  577. package/dist/esm/api/resources/workspaces/client/requests/index.d.mts +2 -2
  578. package/dist/esm/api/resources/workspaces/exports.d.mts +2 -0
  579. package/dist/esm/api/resources/workspaces/exports.mjs +3 -0
  580. package/dist/esm/api/types/Account.d.mts +4 -4
  581. package/dist/esm/api/types/AccountUserRole.d.mts +2 -2
  582. package/dist/esm/api/types/AccountUserRolesResponse.d.mts +2 -2
  583. package/dist/esm/api/types/AccountsResponse.d.mts +2 -2
  584. package/dist/esm/api/types/AddAssetResponse.d.mts +1 -1
  585. package/dist/esm/api/types/AssetCommon.d.mts +1 -1
  586. package/dist/esm/api/types/AssetCommonWithIncludes.d.mts +5 -5
  587. package/dist/esm/api/types/AssetShareParams.d.mts +5 -5
  588. package/dist/esm/api/types/AssetWithIncludes.d.mts +3 -3
  589. package/dist/esm/api/types/AuditLogsWithIncludesResponse.d.mts +2 -2
  590. package/dist/esm/api/types/AuditLogwithIncludes.d.mts +4 -4
  591. package/dist/esm/api/types/BadRequest.d.mts +3 -3
  592. package/dist/esm/api/types/BooleanValue.d.mts +2 -2
  593. package/dist/esm/api/types/Comment.d.mts +6 -6
  594. package/dist/esm/api/types/CommentResponse.d.mts +1 -1
  595. package/dist/esm/api/types/CommentWithIncludes.d.mts +3 -3
  596. package/dist/esm/api/types/CommentWithIncludesResponse.d.mts +1 -1
  597. package/dist/esm/api/types/CommentsWithIncludesResponse.d.mts +2 -2
  598. package/dist/esm/api/types/Conflict.d.mts +3 -3
  599. package/dist/esm/api/types/DateDefinition.d.mts +3 -4
  600. package/dist/esm/api/types/DateDefinitionParams.d.mts +3 -4
  601. package/dist/esm/api/types/DateDefinitionWithIncludes.d.mts +2 -2
  602. package/dist/esm/api/types/DateValue.d.mts +2 -2
  603. package/dist/esm/api/types/FieldDefinition.d.mts +3 -3
  604. package/dist/esm/api/types/FieldDefinitionResponse.d.mts +1 -1
  605. package/dist/esm/api/types/FieldDefinitionWithIncludes.d.mts +3 -3
  606. package/dist/esm/api/types/FieldDefinitionsWithIncludesResponse.d.mts +2 -2
  607. package/dist/esm/api/types/FileAssetsWithIncludesResponse.d.mts +2 -2
  608. package/dist/esm/api/types/FileCopyResponse.d.mts +1 -1
  609. package/dist/esm/api/types/FileRemoteUploadResponse.d.mts +1 -1
  610. package/dist/esm/api/types/FileResponse.d.mts +1 -1
  611. package/dist/esm/api/types/FileUploadStatus.d.mts +2 -2
  612. package/dist/esm/api/types/FileUploadStatusResponse.d.mts +1 -1
  613. package/dist/esm/api/types/FileWithIncludes.d.mts +2 -2
  614. package/dist/esm/api/types/FileWithIncludesResponse.d.mts +1 -1
  615. package/dist/esm/api/types/FileWithUploadUrls.d.mts +2 -2
  616. package/dist/esm/api/types/FileWithUploadUrlsResponse.d.mts +1 -1
  617. package/dist/esm/api/types/File_.d.mts +3 -3
  618. package/dist/esm/api/types/Filters.d.mts +9 -9
  619. package/dist/esm/api/types/Folder.d.mts +2 -2
  620. package/dist/esm/api/types/FolderAssetsWithIncludesResponse.d.mts +2 -2
  621. package/dist/esm/api/types/FolderCopyResponse.d.mts +1 -1
  622. package/dist/esm/api/types/FolderResponse.d.mts +1 -1
  623. package/dist/esm/api/types/FolderWithIncludes.d.mts +6 -6
  624. package/dist/esm/api/types/FolderWithIncludesResponse.d.mts +1 -1
  625. package/dist/esm/api/types/FoldersWithIncludesResponse.d.mts +2 -2
  626. package/dist/esm/api/types/Forbidden.d.mts +3 -3
  627. package/dist/esm/api/types/IntegerValue.d.mts +2 -2
  628. package/dist/esm/api/types/Links.d.mts +1 -1
  629. package/dist/esm/api/types/LongTextDefinition.d.mts +1 -2
  630. package/dist/esm/api/types/LongTextDefinitionWithIncludes.d.mts +2 -2
  631. package/dist/esm/api/types/MediaLinkCommon.d.mts +1 -1
  632. package/dist/esm/api/types/MediaLinksCollection.d.mts +8 -8
  633. package/dist/esm/api/types/MetadataField.d.mts +3 -3
  634. package/dist/esm/api/types/MetadataResponse.d.mts +1 -1
  635. package/dist/esm/api/types/MetadataWithDefinition.d.mts +1 -1
  636. package/dist/esm/api/types/MultiSelectValue.d.mts +2 -2
  637. package/dist/esm/api/types/MultiUserValue.d.mts +3 -3
  638. package/dist/esm/api/types/NotFound.d.mts +3 -3
  639. package/dist/esm/api/types/NumberDefinition.d.mts +1 -1
  640. package/dist/esm/api/types/NumberDefinitionParams.d.mts +1 -1
  641. package/dist/esm/api/types/NumberDefinitionWithIncludes.d.mts +2 -2
  642. package/dist/esm/api/types/NumberValue.d.mts +2 -2
  643. package/dist/esm/api/types/OriginalMediaLink.d.mts +2 -2
  644. package/dist/esm/api/types/Profile.d.mts +1 -1
  645. package/dist/esm/api/types/ProfileResponse.d.mts +1 -1
  646. package/dist/esm/api/types/Project.d.mts +1 -1
  647. package/dist/esm/api/types/ProjectResponse.d.mts +1 -1
  648. package/dist/esm/api/types/ProjectUserRolesResponse.d.mts +2 -2
  649. package/dist/esm/api/types/ProjectWithIncludes.d.mts +3 -3
  650. package/dist/esm/api/types/ProjectWithIncludesResponse.d.mts +1 -1
  651. package/dist/esm/api/types/ProjectsWithIncludesResponse.d.mts +2 -2
  652. package/dist/esm/api/types/RatingDefinition.d.mts +2 -2
  653. package/dist/esm/api/types/RatingDefinitionParams.d.mts +2 -2
  654. package/dist/esm/api/types/RatingDefinitionWithIncludes.d.mts +2 -2
  655. package/dist/esm/api/types/RemoveAssetResponse.d.mts +1 -1
  656. package/dist/esm/api/types/RenditionMediaLink.d.mts +2 -2
  657. package/dist/esm/api/types/SelectDefinition.d.mts +3 -3
  658. package/dist/esm/api/types/SelectDefinitionParams.d.mts +2 -2
  659. package/dist/esm/api/types/SelectDefinitionWithIncludes.d.mts +2 -2
  660. package/dist/esm/api/types/SelectMultiDefinition.d.mts +3 -3
  661. package/dist/esm/api/types/SelectMultiDefinitionParams.d.mts +2 -2
  662. package/dist/esm/api/types/SelectMultiDefinitionWithIncludes.d.mts +2 -2
  663. package/dist/esm/api/types/SelectValue.d.mts +2 -2
  664. package/dist/esm/api/types/Share.d.mts +6 -6
  665. package/dist/esm/api/types/ShareResponse.d.mts +1 -1
  666. package/dist/esm/api/types/ShareReviewersResponse.d.mts +2 -2
  667. package/dist/esm/api/types/SharesResponse.d.mts +2 -2
  668. package/dist/esm/api/types/SingleUserValue.d.mts +3 -3
  669. package/dist/esm/api/types/TextDefinition.d.mts +1 -2
  670. package/dist/esm/api/types/TextDefinitionWithIncludes.d.mts +2 -2
  671. package/dist/esm/api/types/TextValue.d.mts +2 -2
  672. package/dist/esm/api/types/ToggleDefinition.d.mts +1 -1
  673. package/dist/esm/api/types/ToggleDefinitionParams.d.mts +2 -2
  674. package/dist/esm/api/types/ToggleDefinitionWithIncludes.d.mts +2 -2
  675. package/dist/esm/api/types/TooManyRequests.d.mts +3 -3
  676. package/dist/esm/api/types/Unauthorized.d.mts +3 -3
  677. package/dist/esm/api/types/UnprocessableContent.d.mts +3 -3
  678. package/dist/esm/api/types/UpdateDateDefinitionParams.d.mts +6 -7
  679. package/dist/esm/api/types/UpdateLongTextDefinitionParams.d.mts +1 -1
  680. package/dist/esm/api/types/UpdateNumberDefinitionParams.d.mts +4 -4
  681. package/dist/esm/api/types/UpdateRatingDefinitionParams.d.mts +5 -5
  682. package/dist/esm/api/types/UpdateSelectDefinitionParams.d.mts +5 -5
  683. package/dist/esm/api/types/UpdateSelectMultiDefinitionParams.d.mts +5 -5
  684. package/dist/esm/api/types/UpdateTextDefinitionParams.d.mts +1 -1
  685. package/dist/esm/api/types/UpdateToggleDefinitionParams.d.mts +3 -3
  686. package/dist/esm/api/types/UpdateUserMultiDefinitionParams.d.mts +3 -4
  687. package/dist/esm/api/types/UpdateUserRolesResponse.d.mts +1 -1
  688. package/dist/esm/api/types/UpdateUserSingleDefinitionParams.d.mts +3 -4
  689. package/dist/esm/api/types/User.d.mts +5 -5
  690. package/dist/esm/api/types/UserMultiDefinition.d.mts +0 -1
  691. package/dist/esm/api/types/UserMultiDefinitionParams.d.mts +1 -2
  692. package/dist/esm/api/types/UserMultiDefinitionWithIncludes.d.mts +2 -2
  693. package/dist/esm/api/types/UserRole.d.mts +1 -1
  694. package/dist/esm/api/types/UserSingleDefinition.d.mts +0 -1
  695. package/dist/esm/api/types/UserSingleDefinitionParams.d.mts +1 -2
  696. package/dist/esm/api/types/UserSingleDefinitionWithIncludes.d.mts +2 -2
  697. package/dist/esm/api/types/VersionStack.d.mts +2 -2
  698. package/dist/esm/api/types/VersionStackAssetsWithIncludesResponse.d.mts +2 -2
  699. package/dist/esm/api/types/VersionStackCopyResponse.d.mts +1 -1
  700. package/dist/esm/api/types/VersionStackResponse.d.mts +1 -1
  701. package/dist/esm/api/types/VersionStackWithIncludes.d.mts +6 -6
  702. package/dist/esm/api/types/VersionStackWithIncludesResponse.d.mts +1 -1
  703. package/dist/esm/api/types/VersionStacksWithIncludesResponse.d.mts +2 -2
  704. package/dist/esm/api/types/Webhook.d.mts +3 -3
  705. package/dist/esm/api/types/WebhookCreateResponse.d.mts +1 -1
  706. package/dist/esm/api/types/WebhookResponse.d.mts +1 -1
  707. package/dist/esm/api/types/WebhookWithIncludes.d.mts +2 -2
  708. package/dist/esm/api/types/WebhookWithIncludesResponse.d.mts +1 -1
  709. package/dist/esm/api/types/WebhooksWithIncludesResponse.d.mts +2 -2
  710. package/dist/esm/api/types/WorkspaceParams.d.mts +1 -1
  711. package/dist/esm/api/types/WorkspaceResponse.d.mts +1 -1
  712. package/dist/esm/api/types/WorkspaceUserRolesResponse.d.mts +2 -2
  713. package/dist/esm/api/types/WorkspaceWithIncludes.d.mts +2 -2
  714. package/dist/esm/api/types/WorkspaceWithIncludesResponse.d.mts +1 -1
  715. package/dist/esm/api/types/WorkspacesWithIncludesResponse.d.mts +2 -2
  716. package/dist/esm/api/types/index.d.mts +143 -143
  717. package/dist/esm/api/types/index.mjs +143 -143
  718. package/dist/esm/auth/BearerAuthProvider.d.mts +20 -0
  719. package/dist/esm/auth/BearerAuthProvider.mjs +42 -0
  720. package/dist/esm/auth/index.d.mts +1 -0
  721. package/dist/esm/auth/index.mjs +1 -0
  722. package/dist/esm/core/auth/AuthProvider.d.mts +5 -2
  723. package/dist/esm/core/auth/BearerToken.d.mts +3 -1
  724. package/dist/esm/core/auth/BearerToken.mjs +7 -6
  725. package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
  726. package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
  727. package/dist/esm/core/auth/index.d.mts +1 -0
  728. package/dist/esm/core/auth/index.mjs +1 -0
  729. package/dist/esm/core/exports.d.mts +2 -0
  730. package/dist/esm/core/exports.mjs +2 -0
  731. package/dist/esm/core/fetcher/APIResponse.d.mts +1 -1
  732. package/dist/esm/core/fetcher/BinaryResponse.d.mts +5 -6
  733. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +4 -4
  734. package/dist/esm/core/fetcher/Fetcher.d.mts +12 -6
  735. package/dist/esm/core/fetcher/Fetcher.mjs +210 -9
  736. package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +1 -1
  737. package/dist/esm/core/fetcher/getErrorResponseBody.mjs +2 -1
  738. package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
  739. package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
  740. package/dist/esm/core/fetcher/getResponseBody.mjs +21 -7
  741. package/dist/esm/core/fetcher/index.d.mts +2 -0
  742. package/dist/esm/core/fetcher/index.mjs +1 -0
  743. package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
  744. package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
  745. package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
  746. package/dist/esm/core/fetcher/makeRequest.mjs +30 -13
  747. package/dist/esm/core/fetcher/requestWithRetries.mjs +3 -12
  748. package/dist/esm/core/fetcher/signals.d.mts +1 -7
  749. package/dist/esm/core/fetcher/signals.mjs +0 -12
  750. package/dist/esm/core/headers.d.mts +2 -2
  751. package/dist/esm/core/headers.mjs +6 -4
  752. package/dist/esm/core/index.d.mts +4 -2
  753. package/dist/esm/core/index.mjs +4 -2
  754. package/dist/esm/core/logging/exports.d.mts +18 -0
  755. package/dist/esm/core/logging/exports.mjs +9 -0
  756. package/dist/esm/core/logging/index.d.mts +1 -0
  757. package/dist/esm/core/logging/index.mjs +1 -0
  758. package/dist/esm/core/logging/logger.d.mts +126 -0
  759. package/dist/esm/core/logging/logger.mjs +138 -0
  760. package/dist/esm/core/pagination/Page.d.mts +33 -0
  761. package/dist/esm/core/pagination/Page.mjs +97 -0
  762. package/dist/esm/core/pagination/exports.d.mts +1 -0
  763. package/dist/esm/core/pagination/exports.mjs +1 -0
  764. package/dist/esm/core/pagination/index.d.mts +1 -0
  765. package/dist/esm/core/pagination/index.mjs +1 -0
  766. package/dist/esm/core/runtime/runtime.mjs +17 -15
  767. package/dist/esm/core/url/encodePathParam.d.mts +1 -0
  768. package/dist/esm/core/url/encodePathParam.mjs +18 -0
  769. package/dist/esm/core/url/index.d.mts +1 -0
  770. package/dist/esm/core/url/index.mjs +1 -0
  771. package/dist/esm/core/url/join.mjs +3 -4
  772. package/dist/esm/errors/FrameioError.d.mts +1 -1
  773. package/dist/esm/errors/FrameioError.mjs +6 -2
  774. package/dist/esm/errors/FrameioTimeoutError.mjs +5 -1
  775. package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
  776. package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
  777. package/dist/esm/exports.d.mts +1 -0
  778. package/dist/esm/exports.mjs +1 -0
  779. package/dist/esm/index.d.mts +3 -1
  780. package/dist/esm/index.mjs +2 -1
  781. package/dist/esm/version.d.mts +1 -1
  782. package/dist/esm/version.mjs +1 -1
  783. package/package.json +182 -8
  784. package/reference.md +1056 -1008
  785. package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
  786. package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
  787. package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
  788. package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
@@ -54,26 +54,28 @@ var __rest = (this && this.__rest) || function (s, e) {
54
54
  return t;
55
55
  };
56
56
  Object.defineProperty(exports, "__esModule", { value: true });
57
- exports.Files = void 0;
58
- const environments = __importStar(require("../../../../environments.js"));
59
- const core = __importStar(require("../../../../core/index.js"));
60
- const Frameio = __importStar(require("../../../index.js"));
57
+ exports.FilesClient = void 0;
58
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
61
59
  const headers_js_1 = require("../../../../core/headers.js");
60
+ const core = __importStar(require("../../../../core/index.js"));
61
+ const environments = __importStar(require("../../../../environments.js"));
62
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
62
63
  const errors = __importStar(require("../../../../errors/index.js"));
64
+ const Frameio = __importStar(require("../../../index.js"));
63
65
  /**
64
66
  * Manage Files and related operations.
65
67
  */
66
- class Files {
67
- constructor(_options) {
68
- this._options = _options;
68
+ class FilesClient {
69
+ constructor(options) {
70
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
69
71
  }
70
72
  /**
71
73
  * List files in a given folder. <br/>Rate Limits: 5 calls per 1 second(s) per account_user
72
74
  *
73
- * @param {Frameio.Uuid} accountId -
74
- * @param {Frameio.Uuid} folderId -
75
+ * @param {Frameio.Uuid} account_id
76
+ * @param {Frameio.Uuid} folder_id
75
77
  * @param {Frameio.FilesListRequest} request
76
- * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
78
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
77
79
  *
78
80
  * @throws {@link Frameio.BadRequestError}
79
81
  * @throws {@link Frameio.UnauthorizedError}
@@ -92,38 +94,32 @@ class Files {
92
94
  * include_total_count: false
93
95
  * })
94
96
  */
95
- list(accountId, folderId, request = {}, requestOptions) {
96
- return core.HttpResponsePromise.fromPromise(this.__list(accountId, folderId, request, requestOptions));
97
+ list(account_id, folder_id, request = {}, requestOptions) {
98
+ return core.HttpResponsePromise.fromPromise(this.__list(account_id, folder_id, request, requestOptions));
97
99
  }
98
- __list(accountId_1, folderId_1) {
99
- return __awaiter(this, arguments, void 0, function* (accountId, folderId, request = {}, requestOptions) {
100
- var _a, _b, _c, _d;
100
+ __list(account_id_1, folder_id_1) {
101
+ return __awaiter(this, arguments, void 0, function* (account_id, folder_id, request = {}, requestOptions) {
102
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
101
103
  const { include, sort, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
102
- const _queryParams = {};
103
- if (include != null) {
104
- _queryParams["include"] = include;
105
- }
106
- if (sort != null) {
107
- _queryParams["sort"] = sort;
108
- }
109
- if (after != null) {
110
- _queryParams["after"] = after;
111
- }
112
- if (pageSize != null) {
113
- _queryParams["page_size"] = pageSize.toString();
114
- }
115
- if (includeTotalCount != null) {
116
- _queryParams["include_total_count"] = includeTotalCount.toString();
117
- }
118
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
104
+ const _queryParams = {
105
+ include: include != null ? include : undefined,
106
+ sort: sort != null ? sort : undefined,
107
+ after,
108
+ page_size: pageSize,
109
+ include_total_count: includeTotalCount,
110
+ };
111
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
112
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
119
113
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
120
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/files`),
114
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files`),
121
115
  method: "GET",
122
116
  headers: _headers,
123
117
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
124
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
125
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
118
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
119
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
126
120
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
121
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
122
+ logging: this._options.logging,
127
123
  });
128
124
  if (_response.ok) {
129
125
  return {
@@ -155,30 +151,18 @@ class Files {
155
151
  });
156
152
  }
157
153
  }
158
- switch (_response.error.reason) {
159
- case "non-json":
160
- throw new errors.FrameioError({
161
- statusCode: _response.error.statusCode,
162
- body: _response.error.rawBody,
163
- rawResponse: _response.rawResponse,
164
- });
165
- case "timeout":
166
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/folders/{folder_id}/files.");
167
- case "unknown":
168
- throw new errors.FrameioError({
169
- message: _response.error.errorMessage,
170
- rawResponse: _response.rawResponse,
171
- });
172
- }
154
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/folders/{folder_id}/files");
173
155
  });
174
156
  }
175
157
  /**
158
+ * @deprecated
159
+ *
176
160
  * Create new file under parent folder. `Create file (local upload)` and `Create file (remote upload)` have replaced this endpoint. <br/>Rate Limits: 5 calls per 1 second(s) per account_user
177
161
  *
178
- * @param {Frameio.Uuid} accountId -
179
- * @param {Frameio.Uuid} folderId -
162
+ * @param {Frameio.Uuid} account_id
163
+ * @param {Frameio.Uuid} folder_id
180
164
  * @param {Frameio.FileCreateParams} request
181
- * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
165
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
182
166
  *
183
167
  * @throws {@link Frameio.BadRequestError}
184
168
  * @throws {@link Frameio.UnauthorizedError}
@@ -197,24 +181,27 @@ class Files {
197
181
  * }
198
182
  * })
199
183
  */
200
- create(accountId, folderId, request, requestOptions) {
201
- return core.HttpResponsePromise.fromPromise(this.__create(accountId, folderId, request, requestOptions));
184
+ create(account_id, folder_id, request, requestOptions) {
185
+ return core.HttpResponsePromise.fromPromise(this.__create(account_id, folder_id, request, requestOptions));
202
186
  }
203
- __create(accountId, folderId, request, requestOptions) {
187
+ __create(account_id, folder_id, request, requestOptions) {
204
188
  return __awaiter(this, void 0, void 0, function* () {
205
- var _a, _b, _c, _d;
206
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
189
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
190
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
191
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
207
192
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
208
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/files`),
193
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files`),
209
194
  method: "POST",
210
195
  headers: _headers,
211
196
  contentType: "application/json",
212
197
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
213
198
  requestType: "json",
214
199
  body: request,
215
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
216
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
200
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
201
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
217
202
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
203
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
204
+ logging: this._options.logging,
218
205
  });
219
206
  if (_response.ok) {
220
207
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -243,21 +230,7 @@ class Files {
243
230
  });
244
231
  }
245
232
  }
246
- switch (_response.error.reason) {
247
- case "non-json":
248
- throw new errors.FrameioError({
249
- statusCode: _response.error.statusCode,
250
- body: _response.error.rawBody,
251
- rawResponse: _response.rawResponse,
252
- });
253
- case "timeout":
254
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling POST /v4/accounts/{account_id}/folders/{folder_id}/files.");
255
- case "unknown":
256
- throw new errors.FrameioError({
257
- message: _response.error.errorMessage,
258
- rawResponse: _response.rawResponse,
259
- });
260
- }
233
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/folders/{folder_id}/files");
261
234
  });
262
235
  }
263
236
  /**
@@ -275,10 +248,10 @@ class Files {
275
248
  * the response payload. In short, the client must handle null media links gracefully.
276
249
  * <br/>Rate Limits: 5 calls per 1 second(s) per account_user
277
250
  *
278
- * @param {Frameio.Uuid} accountId -
279
- * @param {Frameio.Uuid} fileId -
251
+ * @param {Frameio.Uuid} account_id
252
+ * @param {Frameio.Uuid} file_id
280
253
  * @param {Frameio.FilesShowRequest} request
281
- * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
254
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
282
255
  *
283
256
  * @throws {@link Frameio.BadRequestError}
284
257
  * @throws {@link Frameio.UnauthorizedError}
@@ -293,26 +266,28 @@ class Files {
293
266
  * include: "media_links.original"
294
267
  * })
295
268
  */
296
- show(accountId, fileId, request = {}, requestOptions) {
297
- return core.HttpResponsePromise.fromPromise(this.__show(accountId, fileId, request, requestOptions));
269
+ show(account_id, file_id, request = {}, requestOptions) {
270
+ return core.HttpResponsePromise.fromPromise(this.__show(account_id, file_id, request, requestOptions));
298
271
  }
299
- __show(accountId_1, fileId_1) {
300
- return __awaiter(this, arguments, void 0, function* (accountId, fileId, request = {}, requestOptions) {
301
- var _a, _b, _c, _d;
272
+ __show(account_id_1, file_id_1) {
273
+ return __awaiter(this, arguments, void 0, function* (account_id, file_id, request = {}, requestOptions) {
274
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
302
275
  const { include } = request;
303
- const _queryParams = {};
304
- if (include != null) {
305
- _queryParams["include"] = include;
306
- }
307
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
276
+ const _queryParams = {
277
+ include: include != null ? include : undefined,
278
+ };
279
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
280
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
308
281
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
309
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}`),
282
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}`),
310
283
  method: "GET",
311
284
  headers: _headers,
312
285
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
313
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
314
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
286
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
287
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
315
288
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
289
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
290
+ logging: this._options.logging,
316
291
  });
317
292
  if (_response.ok) {
318
293
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -341,29 +316,15 @@ class Files {
341
316
  });
342
317
  }
343
318
  }
344
- switch (_response.error.reason) {
345
- case "non-json":
346
- throw new errors.FrameioError({
347
- statusCode: _response.error.statusCode,
348
- body: _response.error.rawBody,
349
- rawResponse: _response.rawResponse,
350
- });
351
- case "timeout":
352
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/files/{file_id}.");
353
- case "unknown":
354
- throw new errors.FrameioError({
355
- message: _response.error.errorMessage,
356
- rawResponse: _response.rawResponse,
357
- });
358
- }
319
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/files/{file_id}");
359
320
  });
360
321
  }
361
322
  /**
362
323
  * Delete file by ID. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
363
324
  *
364
- * @param {Frameio.Uuid} accountId -
365
- * @param {Frameio.Uuid} fileId -
366
- * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
325
+ * @param {Frameio.Uuid} account_id
326
+ * @param {Frameio.Uuid} file_id
327
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
367
328
  *
368
329
  * @throws {@link Frameio.BadRequestError}
369
330
  * @throws {@link Frameio.UnauthorizedError}
@@ -376,21 +337,24 @@ class Files {
376
337
  * @example
377
338
  * await client.files.delete("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
378
339
  */
379
- delete(accountId, fileId, requestOptions) {
380
- return core.HttpResponsePromise.fromPromise(this.__delete(accountId, fileId, requestOptions));
340
+ delete(account_id, file_id, requestOptions) {
341
+ return core.HttpResponsePromise.fromPromise(this.__delete(account_id, file_id, requestOptions));
381
342
  }
382
- __delete(accountId, fileId, requestOptions) {
343
+ __delete(account_id, file_id, requestOptions) {
383
344
  return __awaiter(this, void 0, void 0, function* () {
384
- var _a, _b, _c, _d;
385
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
345
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
346
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
347
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
386
348
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
387
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}`),
349
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}`),
388
350
  method: "DELETE",
389
351
  headers: _headers,
390
352
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
391
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
392
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
353
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
354
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
393
355
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
356
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
357
+ logging: this._options.logging,
394
358
  });
395
359
  if (_response.ok) {
396
360
  return { data: undefined, rawResponse: _response.rawResponse };
@@ -419,30 +383,16 @@ class Files {
419
383
  });
420
384
  }
421
385
  }
422
- switch (_response.error.reason) {
423
- case "non-json":
424
- throw new errors.FrameioError({
425
- statusCode: _response.error.statusCode,
426
- body: _response.error.rawBody,
427
- rawResponse: _response.rawResponse,
428
- });
429
- case "timeout":
430
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling DELETE /v4/accounts/{account_id}/files/{file_id}.");
431
- case "unknown":
432
- throw new errors.FrameioError({
433
- message: _response.error.errorMessage,
434
- rawResponse: _response.rawResponse,
435
- });
436
- }
386
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/files/{file_id}");
437
387
  });
438
388
  }
439
389
  /**
440
390
  * Update file details. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
441
391
  *
442
- * @param {Frameio.Uuid} accountId -
443
- * @param {Frameio.Uuid} fileId -
392
+ * @param {Frameio.Uuid} account_id
393
+ * @param {Frameio.Uuid} file_id
444
394
  * @param {Frameio.FileUpdateParams} request
445
- * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
395
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
446
396
  *
447
397
  * @throws {@link Frameio.BadRequestError}
448
398
  * @throws {@link Frameio.UnauthorizedError}
@@ -459,24 +409,27 @@ class Files {
459
409
  * }
460
410
  * })
461
411
  */
462
- update(accountId, fileId, request, requestOptions) {
463
- return core.HttpResponsePromise.fromPromise(this.__update(accountId, fileId, request, requestOptions));
412
+ update(account_id, file_id, request, requestOptions) {
413
+ return core.HttpResponsePromise.fromPromise(this.__update(account_id, file_id, request, requestOptions));
464
414
  }
465
- __update(accountId, fileId, request, requestOptions) {
415
+ __update(account_id, file_id, request, requestOptions) {
466
416
  return __awaiter(this, void 0, void 0, function* () {
467
- var _a, _b, _c, _d;
468
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
417
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
418
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
419
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
469
420
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
470
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}`),
421
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}`),
471
422
  method: "PATCH",
472
423
  headers: _headers,
473
424
  contentType: "application/json",
474
425
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
475
426
  requestType: "json",
476
427
  body: request,
477
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
478
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
428
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
429
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
479
430
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
431
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
432
+ logging: this._options.logging,
480
433
  });
481
434
  if (_response.ok) {
482
435
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -505,30 +458,16 @@ class Files {
505
458
  });
506
459
  }
507
460
  }
508
- switch (_response.error.reason) {
509
- case "non-json":
510
- throw new errors.FrameioError({
511
- statusCode: _response.error.statusCode,
512
- body: _response.error.rawBody,
513
- rawResponse: _response.rawResponse,
514
- });
515
- case "timeout":
516
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling PATCH /v4/accounts/{account_id}/files/{file_id}.");
517
- case "unknown":
518
- throw new errors.FrameioError({
519
- message: _response.error.errorMessage,
520
- rawResponse: _response.rawResponse,
521
- });
522
- }
461
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v4/accounts/{account_id}/files/{file_id}");
523
462
  });
524
463
  }
525
464
  /**
526
465
  * Copy file. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
527
466
  *
528
- * @param {Frameio.Uuid} accountId -
529
- * @param {Frameio.Uuid} fileId -
467
+ * @param {Frameio.Uuid} account_id
468
+ * @param {Frameio.Uuid} file_id
530
469
  * @param {Frameio.FileCopyParams} request
531
- * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
470
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
532
471
  *
533
472
  * @throws {@link Frameio.BadRequestError}
534
473
  * @throws {@link Frameio.UnauthorizedError}
@@ -547,32 +486,32 @@ class Files {
547
486
  * }
548
487
  * })
549
488
  */
550
- copy(accountId, fileId, request = {}, requestOptions) {
551
- return core.HttpResponsePromise.fromPromise(this.__copy(accountId, fileId, request, requestOptions));
489
+ copy(account_id, file_id, request = {}, requestOptions) {
490
+ return core.HttpResponsePromise.fromPromise(this.__copy(account_id, file_id, request, requestOptions));
552
491
  }
553
- __copy(accountId_1, fileId_1) {
554
- return __awaiter(this, arguments, void 0, function* (accountId, fileId, request = {}, requestOptions) {
555
- var _a, _b, _c, _d;
492
+ __copy(account_id_1, file_id_1) {
493
+ return __awaiter(this, arguments, void 0, function* (account_id, file_id, request = {}, requestOptions) {
494
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
556
495
  const { copy_metadata: copyMetadata, copy_comments: copyComments } = request, _body = __rest(request, ["copy_metadata", "copy_comments"]);
557
- const _queryParams = {};
558
- if (copyMetadata != null) {
559
- _queryParams["copy_metadata"] = copyMetadata.toString();
560
- }
561
- if (copyComments != null) {
562
- _queryParams["copy_comments"] = copyComments;
563
- }
564
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
496
+ const _queryParams = {
497
+ copy_metadata: copyMetadata,
498
+ copy_comments: copyComments != null ? copyComments : undefined,
499
+ };
500
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
501
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
565
502
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
566
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}/copy`),
503
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}/copy`),
567
504
  method: "POST",
568
505
  headers: _headers,
569
506
  contentType: "application/json",
570
507
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
571
508
  requestType: "json",
572
509
  body: _body,
573
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
574
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
510
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
511
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
575
512
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
513
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
514
+ logging: this._options.logging,
576
515
  });
577
516
  if (_response.ok) {
578
517
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -601,30 +540,16 @@ class Files {
601
540
  });
602
541
  }
603
542
  }
604
- switch (_response.error.reason) {
605
- case "non-json":
606
- throw new errors.FrameioError({
607
- statusCode: _response.error.statusCode,
608
- body: _response.error.rawBody,
609
- rawResponse: _response.rawResponse,
610
- });
611
- case "timeout":
612
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling POST /v4/accounts/{account_id}/files/{file_id}/copy.");
613
- case "unknown":
614
- throw new errors.FrameioError({
615
- message: _response.error.errorMessage,
616
- rawResponse: _response.rawResponse,
617
- });
618
- }
543
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/files/{file_id}/copy");
619
544
  });
620
545
  }
621
546
  /**
622
547
  * Create new file under parent folder through remote upload. <br/>Rate Limits: 5 calls per 1 second(s) per account_user
623
548
  *
624
- * @param {Frameio.Uuid} accountId -
625
- * @param {Frameio.Uuid} folderId -
549
+ * @param {Frameio.Uuid} account_id
550
+ * @param {Frameio.Uuid} folder_id
626
551
  * @param {Frameio.FileCreateRemoteUploadParams} request
627
- * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
552
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
628
553
  *
629
554
  * @throws {@link Frameio.BadRequestError}
630
555
  * @throws {@link Frameio.UnauthorizedError}
@@ -642,24 +567,27 @@ class Files {
642
567
  * }
643
568
  * })
644
569
  */
645
- createRemoteUpload(accountId, folderId, request, requestOptions) {
646
- return core.HttpResponsePromise.fromPromise(this.__createRemoteUpload(accountId, folderId, request, requestOptions));
570
+ createRemoteUpload(account_id, folder_id, request, requestOptions) {
571
+ return core.HttpResponsePromise.fromPromise(this.__createRemoteUpload(account_id, folder_id, request, requestOptions));
647
572
  }
648
- __createRemoteUpload(accountId, folderId, request, requestOptions) {
573
+ __createRemoteUpload(account_id, folder_id, request, requestOptions) {
649
574
  return __awaiter(this, void 0, void 0, function* () {
650
- var _a, _b, _c, _d;
651
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
575
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
576
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
577
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
652
578
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
653
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/files/remote_upload`),
579
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files/remote_upload`),
654
580
  method: "POST",
655
581
  headers: _headers,
656
582
  contentType: "application/json",
657
583
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
658
584
  requestType: "json",
659
585
  body: request,
660
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
661
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
586
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
587
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
662
588
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
589
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
590
+ logging: this._options.logging,
663
591
  });
664
592
  if (_response.ok) {
665
593
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -688,30 +616,16 @@ class Files {
688
616
  });
689
617
  }
690
618
  }
691
- switch (_response.error.reason) {
692
- case "non-json":
693
- throw new errors.FrameioError({
694
- statusCode: _response.error.statusCode,
695
- body: _response.error.rawBody,
696
- rawResponse: _response.rawResponse,
697
- });
698
- case "timeout":
699
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling POST /v4/accounts/{account_id}/folders/{folder_id}/files/remote_upload.");
700
- case "unknown":
701
- throw new errors.FrameioError({
702
- message: _response.error.errorMessage,
703
- rawResponse: _response.rawResponse,
704
- });
705
- }
619
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/folders/{folder_id}/files/remote_upload");
706
620
  });
707
621
  }
708
622
  /**
709
623
  * Move file to a folder or version_stack. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
710
624
  *
711
- * @param {Frameio.Uuid} accountId -
712
- * @param {Frameio.Uuid} fileId -
625
+ * @param {Frameio.Uuid} account_id
626
+ * @param {Frameio.Uuid} file_id
713
627
  * @param {Frameio.FileMoveParams} request
714
- * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
628
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
715
629
  *
716
630
  * @throws {@link Frameio.BadRequestError}
717
631
  * @throws {@link Frameio.UnauthorizedError}
@@ -728,24 +642,27 @@ class Files {
728
642
  * }
729
643
  * })
730
644
  */
731
- move(accountId, fileId, request, requestOptions) {
732
- return core.HttpResponsePromise.fromPromise(this.__move(accountId, fileId, request, requestOptions));
645
+ move(account_id, file_id, request, requestOptions) {
646
+ return core.HttpResponsePromise.fromPromise(this.__move(account_id, file_id, request, requestOptions));
733
647
  }
734
- __move(accountId, fileId, request, requestOptions) {
648
+ __move(account_id, file_id, request, requestOptions) {
735
649
  return __awaiter(this, void 0, void 0, function* () {
736
- var _a, _b, _c, _d;
737
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
650
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
651
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
652
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
738
653
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
739
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}/move`),
654
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}/move`),
740
655
  method: "PATCH",
741
656
  headers: _headers,
742
657
  contentType: "application/json",
743
658
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
744
659
  requestType: "json",
745
660
  body: request,
746
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
747
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
661
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
662
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
748
663
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
664
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
665
+ logging: this._options.logging,
749
666
  });
750
667
  if (_response.ok) {
751
668
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -774,30 +691,16 @@ class Files {
774
691
  });
775
692
  }
776
693
  }
777
- switch (_response.error.reason) {
778
- case "non-json":
779
- throw new errors.FrameioError({
780
- statusCode: _response.error.statusCode,
781
- body: _response.error.rawBody,
782
- rawResponse: _response.rawResponse,
783
- });
784
- case "timeout":
785
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling PATCH /v4/accounts/{account_id}/files/{file_id}/move.");
786
- case "unknown":
787
- throw new errors.FrameioError({
788
- message: _response.error.errorMessage,
789
- rawResponse: _response.rawResponse,
790
- });
791
- }
694
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v4/accounts/{account_id}/files/{file_id}/move");
792
695
  });
793
696
  }
794
697
  /**
795
698
  * Create new file under parent folder through local upload. <br/>Rate Limits: 5 calls per 1 second(s) per account_user
796
699
  *
797
- * @param {Frameio.Uuid} accountId -
798
- * @param {Frameio.Uuid} folderId -
700
+ * @param {Frameio.Uuid} account_id
701
+ * @param {Frameio.Uuid} folder_id
799
702
  * @param {Frameio.FileCreateLocalUploadParams} request
800
- * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
703
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
801
704
  *
802
705
  * @throws {@link Frameio.BadRequestError}
803
706
  * @throws {@link Frameio.UnauthorizedError}
@@ -815,24 +718,27 @@ class Files {
815
718
  * }
816
719
  * })
817
720
  */
818
- createLocalUpload(accountId, folderId, request, requestOptions) {
819
- return core.HttpResponsePromise.fromPromise(this.__createLocalUpload(accountId, folderId, request, requestOptions));
721
+ createLocalUpload(account_id, folder_id, request, requestOptions) {
722
+ return core.HttpResponsePromise.fromPromise(this.__createLocalUpload(account_id, folder_id, request, requestOptions));
820
723
  }
821
- __createLocalUpload(accountId, folderId, request, requestOptions) {
724
+ __createLocalUpload(account_id, folder_id, request, requestOptions) {
822
725
  return __awaiter(this, void 0, void 0, function* () {
823
- var _a, _b, _c, _d;
824
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
726
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
727
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
728
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
825
729
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
826
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/files/local_upload`),
730
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files/local_upload`),
827
731
  method: "POST",
828
732
  headers: _headers,
829
733
  contentType: "application/json",
830
734
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
831
735
  requestType: "json",
832
736
  body: request,
833
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
834
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
737
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
738
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
835
739
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
740
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
741
+ logging: this._options.logging,
836
742
  });
837
743
  if (_response.ok) {
838
744
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -861,30 +767,16 @@ class Files {
861
767
  });
862
768
  }
863
769
  }
864
- switch (_response.error.reason) {
865
- case "non-json":
866
- throw new errors.FrameioError({
867
- statusCode: _response.error.statusCode,
868
- body: _response.error.rawBody,
869
- rawResponse: _response.rawResponse,
870
- });
871
- case "timeout":
872
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling POST /v4/accounts/{account_id}/folders/{folder_id}/files/local_upload.");
873
- case "unknown":
874
- throw new errors.FrameioError({
875
- message: _response.error.errorMessage,
876
- rawResponse: _response.rawResponse,
877
- });
878
- }
770
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/folders/{folder_id}/files/local_upload");
879
771
  });
880
772
  }
881
773
  /**
882
774
  * Import a file from a storage location configured on the account. <br/>Rate Limits: 5 calls per 1 second(s) per account_user
883
775
  *
884
- * @param {Frameio.Uuid} accountId -
885
- * @param {Frameio.Uuid} folderId -
776
+ * @param {Frameio.Uuid} account_id
777
+ * @param {Frameio.Uuid} folder_id
886
778
  * @param {Frameio.FileImportParams} request
887
- * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
779
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
888
780
  *
889
781
  * @throws {@link Frameio.BadRequestError}
890
782
  * @throws {@link Frameio.UnauthorizedError}
@@ -903,24 +795,27 @@ class Files {
903
795
  * }
904
796
  * })
905
797
  */
906
- importFile(accountId, folderId, request, requestOptions) {
907
- return core.HttpResponsePromise.fromPromise(this.__importFile(accountId, folderId, request, requestOptions));
798
+ importFile(account_id, folder_id, request, requestOptions) {
799
+ return core.HttpResponsePromise.fromPromise(this.__importFile(account_id, folder_id, request, requestOptions));
908
800
  }
909
- __importFile(accountId, folderId, request, requestOptions) {
801
+ __importFile(account_id, folder_id, request, requestOptions) {
910
802
  return __awaiter(this, void 0, void 0, function* () {
911
- var _a, _b, _c, _d;
912
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
803
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
804
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
805
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
913
806
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
914
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/files/import`),
807
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/files/import`),
915
808
  method: "POST",
916
809
  headers: _headers,
917
810
  contentType: "application/json",
918
811
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
919
812
  requestType: "json",
920
813
  body: request,
921
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
922
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
814
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
815
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
923
816
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
817
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
818
+ logging: this._options.logging,
924
819
  });
925
820
  if (_response.ok) {
926
821
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -949,29 +844,15 @@ class Files {
949
844
  });
950
845
  }
951
846
  }
952
- switch (_response.error.reason) {
953
- case "non-json":
954
- throw new errors.FrameioError({
955
- statusCode: _response.error.statusCode,
956
- body: _response.error.rawBody,
957
- rawResponse: _response.rawResponse,
958
- });
959
- case "timeout":
960
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling POST /v4/accounts/{account_id}/folders/{folder_id}/files/import.");
961
- case "unknown":
962
- throw new errors.FrameioError({
963
- message: _response.error.errorMessage,
964
- rawResponse: _response.rawResponse,
965
- });
966
- }
847
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/folders/{folder_id}/files/import");
967
848
  });
968
849
  }
969
850
  /**
970
851
  * Show file upload status details. <br/>Rate Limits: 5 calls per 1 second(s) per account_user
971
852
  *
972
- * @param {Frameio.Uuid} accountId -
973
- * @param {Frameio.Uuid} fileId -
974
- * @param {Files.RequestOptions} requestOptions - Request-specific configuration.
853
+ * @param {Frameio.Uuid} account_id
854
+ * @param {Frameio.Uuid} file_id
855
+ * @param {FilesClient.RequestOptions} requestOptions - Request-specific configuration.
975
856
  *
976
857
  * @throws {@link Frameio.BadRequestError}
977
858
  * @throws {@link Frameio.UnauthorizedError}
@@ -984,21 +865,24 @@ class Files {
984
865
  * @example
985
866
  * await client.files.showFileUploadStatus("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
986
867
  */
987
- showFileUploadStatus(accountId, fileId, requestOptions) {
988
- return core.HttpResponsePromise.fromPromise(this.__showFileUploadStatus(accountId, fileId, requestOptions));
868
+ showFileUploadStatus(account_id, file_id, requestOptions) {
869
+ return core.HttpResponsePromise.fromPromise(this.__showFileUploadStatus(account_id, file_id, requestOptions));
989
870
  }
990
- __showFileUploadStatus(accountId, fileId, requestOptions) {
871
+ __showFileUploadStatus(account_id, file_id, requestOptions) {
991
872
  return __awaiter(this, void 0, void 0, function* () {
992
- var _a, _b, _c, _d;
993
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
873
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
874
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
875
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
994
876
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
995
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}/status`),
877
+ url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}/status`),
996
878
  method: "GET",
997
879
  headers: _headers,
998
880
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
999
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1000
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
881
+ timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
882
+ maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
1001
883
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
884
+ fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
885
+ logging: this._options.logging,
1002
886
  });
1003
887
  if (_response.ok) {
1004
888
  return { data: _response.body, rawResponse: _response.rawResponse };
@@ -1027,27 +911,8 @@ class Files {
1027
911
  });
1028
912
  }
1029
913
  }
1030
- switch (_response.error.reason) {
1031
- case "non-json":
1032
- throw new errors.FrameioError({
1033
- statusCode: _response.error.statusCode,
1034
- body: _response.error.rawBody,
1035
- rawResponse: _response.rawResponse,
1036
- });
1037
- case "timeout":
1038
- throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/files/{file_id}/status.");
1039
- case "unknown":
1040
- throw new errors.FrameioError({
1041
- message: _response.error.errorMessage,
1042
- rawResponse: _response.rawResponse,
1043
- });
1044
- }
1045
- });
1046
- }
1047
- _getAuthorizationHeader() {
1048
- return __awaiter(this, void 0, void 0, function* () {
1049
- return `Bearer ${yield core.Supplier.get(this._options.token)}`;
914
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/files/{file_id}/status");
1050
915
  });
1051
916
  }
1052
917
  }
1053
- exports.Files = Files;
918
+ exports.FilesClient = FilesClient;