frameio 3.2.3 → 4.2.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 (279) hide show
  1. package/README.md +159 -4
  2. package/dist/cjs/BaseClient.d.ts +4 -0
  3. package/dist/cjs/BaseClient.js +4 -2
  4. package/dist/cjs/Client.d.ts +6 -0
  5. package/dist/cjs/Client.js +34 -24
  6. package/dist/cjs/api/resources/accountPermissions/client/Client.js +6 -6
  7. package/dist/cjs/api/resources/accounts/client/Client.js +13 -13
  8. package/dist/cjs/api/resources/comments/client/Client.js +48 -48
  9. package/dist/cjs/api/resources/customActions/client/Client.d.ts +145 -0
  10. package/dist/cjs/api/resources/customActions/client/Client.js +443 -0
  11. package/dist/cjs/api/resources/customActions/client/index.d.ts +1 -0
  12. package/dist/cjs/api/resources/customActions/client/index.js +17 -0
  13. package/dist/cjs/api/resources/customActions/client/requests/ActionCreateParams.d.ts +31 -0
  14. package/dist/cjs/api/resources/customActions/client/requests/ActionCreateParams.js +3 -0
  15. package/dist/cjs/api/resources/customActions/client/requests/ActionUpdateParams.d.ts +35 -0
  16. package/dist/cjs/api/resources/customActions/client/requests/ActionUpdateParams.js +3 -0
  17. package/dist/cjs/api/resources/customActions/client/requests/ActionsIndexRequest.d.ts +21 -0
  18. package/dist/cjs/api/resources/customActions/client/requests/ActionsIndexRequest.js +3 -0
  19. package/dist/cjs/api/resources/customActions/client/requests/ActionsShowRequest.d.ts +9 -0
  20. package/dist/cjs/api/resources/customActions/client/requests/ActionsShowRequest.js +3 -0
  21. package/dist/cjs/api/resources/customActions/client/requests/index.d.ts +4 -0
  22. package/dist/cjs/api/resources/customActions/client/requests/index.js +2 -0
  23. package/dist/cjs/api/resources/customActions/exports.d.ts +2 -0
  24. package/dist/cjs/api/resources/customActions/exports.js +21 -0
  25. package/dist/cjs/api/resources/customActions/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/customActions/index.js +17 -0
  27. package/dist/cjs/api/resources/files/client/Client.d.ts +1 -1
  28. package/dist/cjs/api/resources/files/client/Client.js +78 -78
  29. package/dist/cjs/api/resources/folders/client/Client.js +56 -56
  30. package/dist/cjs/api/resources/groups/client/Client.d.ts +116 -0
  31. package/dist/cjs/api/resources/groups/client/Client.js +368 -0
  32. package/dist/cjs/api/resources/groups/client/index.d.ts +1 -0
  33. package/dist/cjs/api/resources/groups/client/index.js +17 -0
  34. package/dist/cjs/api/resources/groups/client/requests/CreateGroupParams.d.ts +20 -0
  35. package/dist/cjs/api/resources/groups/client/requests/CreateGroupParams.js +3 -0
  36. package/dist/cjs/api/resources/groups/client/requests/GroupsIndexRequest.d.ts +24 -0
  37. package/dist/cjs/api/resources/groups/client/requests/GroupsIndexRequest.js +3 -0
  38. package/dist/cjs/api/resources/groups/client/requests/GroupsShowRequest.d.ts +9 -0
  39. package/dist/cjs/api/resources/groups/client/requests/GroupsShowRequest.js +3 -0
  40. package/dist/cjs/api/resources/groups/client/requests/UpdateGroupParams.d.ts +20 -0
  41. package/dist/cjs/api/resources/groups/client/requests/UpdateGroupParams.js +3 -0
  42. package/dist/cjs/api/resources/groups/client/requests/index.d.ts +4 -0
  43. package/dist/cjs/api/resources/groups/client/requests/index.js +2 -0
  44. package/dist/cjs/api/resources/groups/exports.d.ts +2 -0
  45. package/dist/cjs/api/resources/groups/exports.js +21 -0
  46. package/dist/cjs/api/resources/groups/index.d.ts +2 -0
  47. package/dist/cjs/api/resources/groups/index.js +18 -0
  48. package/dist/cjs/api/resources/groups/types/GroupsIndexRequestSort.d.ts +10 -0
  49. package/dist/cjs/api/resources/groups/types/GroupsIndexRequestSort.js +13 -0
  50. package/dist/cjs/api/resources/groups/types/index.d.ts +1 -0
  51. package/dist/cjs/api/resources/groups/types/index.js +17 -0
  52. package/dist/cjs/api/resources/index.d.ts +5 -0
  53. package/dist/cjs/api/resources/index.js +6 -1
  54. package/dist/cjs/api/resources/metadata/client/Client.d.ts +4 -4
  55. package/dist/cjs/api/resources/metadata/client/Client.js +18 -18
  56. package/dist/cjs/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.ts +4 -4
  57. package/dist/cjs/api/resources/metadataFields/client/Client.js +28 -28
  58. package/dist/cjs/api/resources/projectPermissions/client/Client.js +20 -20
  59. package/dist/cjs/api/resources/projects/client/Client.js +34 -34
  60. package/dist/cjs/api/resources/shares/client/Client.d.ts +4 -4
  61. package/dist/cjs/api/resources/shares/client/Client.js +72 -72
  62. package/dist/cjs/api/resources/shares/client/requests/AddAssetParams.d.ts +1 -1
  63. package/dist/cjs/api/resources/shares/client/requests/CreateShareParams.d.ts +2 -2
  64. package/dist/cjs/api/resources/shares/client/requests/UpdateShareParams.d.ts +1 -1
  65. package/dist/cjs/api/resources/users/client/Client.js +7 -7
  66. package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +1 -1
  67. package/dist/cjs/api/resources/versionStacks/client/Client.js +43 -43
  68. package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.ts +1 -1
  69. package/dist/cjs/api/resources/webhooks/client/Client.js +34 -34
  70. package/dist/cjs/api/resources/workspacePermissions/client/Client.js +20 -20
  71. package/dist/cjs/api/resources/workspaces/client/Client.js +34 -34
  72. package/dist/cjs/api/types/Account.d.ts +0 -2
  73. package/dist/cjs/api/types/Action.d.ts +25 -0
  74. package/dist/cjs/api/types/Action.js +3 -0
  75. package/dist/cjs/api/types/ActionCreateResponse.d.ts +13 -0
  76. package/dist/cjs/api/types/ActionCreateResponse.js +3 -0
  77. package/dist/cjs/api/types/ActionInclude.d.ts +4 -0
  78. package/dist/cjs/api/types/ActionInclude.js +3 -0
  79. package/dist/cjs/api/types/ActionResponse.d.ts +7 -0
  80. package/dist/cjs/api/types/ActionResponse.js +3 -0
  81. package/dist/cjs/api/types/ActionWithIncludes.d.ts +4 -0
  82. package/dist/cjs/api/types/ActionWithIncludes.js +3 -0
  83. package/dist/cjs/api/types/ActionWithIncludesResponse.d.ts +7 -0
  84. package/dist/cjs/api/types/ActionWithIncludesResponse.js +3 -0
  85. package/dist/cjs/api/types/ActionsWithIncludesResponse.d.ts +11 -0
  86. package/dist/cjs/api/types/ActionsWithIncludesResponse.js +3 -0
  87. package/dist/cjs/api/types/AuditLogwithIncludes.d.ts +7 -0
  88. package/dist/cjs/api/types/AuditLogwithIncludes.js +7 -0
  89. package/dist/cjs/api/types/Filters.d.ts +7 -0
  90. package/dist/cjs/api/types/Filters.js +7 -0
  91. package/dist/cjs/api/types/GroupCommon.d.ts +16 -0
  92. package/dist/cjs/api/types/GroupCommon.js +3 -0
  93. package/dist/cjs/api/types/GroupCommonWithIncludes.d.ts +4 -0
  94. package/dist/cjs/api/types/GroupCommonWithIncludes.js +3 -0
  95. package/dist/cjs/api/types/GroupResponse.d.ts +4 -0
  96. package/dist/cjs/api/types/GroupResponse.js +3 -0
  97. package/dist/cjs/api/types/GroupWithIncludes.d.ts +13 -0
  98. package/dist/cjs/api/types/GroupWithIncludes.js +3 -0
  99. package/dist/cjs/api/types/GroupWithIncludesResponse.d.ts +4 -0
  100. package/dist/cjs/api/types/GroupWithIncludesResponse.js +3 -0
  101. package/dist/cjs/api/types/GroupsInclude.d.ts +4 -0
  102. package/dist/cjs/api/types/GroupsInclude.js +3 -0
  103. package/dist/cjs/api/types/GroupsSort.d.ts +10 -0
  104. package/dist/cjs/api/types/GroupsSort.js +13 -0
  105. package/dist/cjs/api/types/GroupsWithIncludesResponse.d.ts +8 -0
  106. package/dist/cjs/api/types/GroupsWithIncludesResponse.js +3 -0
  107. package/dist/cjs/api/types/SingleUserValue.d.ts +1 -1
  108. package/dist/cjs/api/types/SyncGroupWithIncludes.d.ts +15 -0
  109. package/dist/cjs/api/types/SyncGroupWithIncludes.js +14 -0
  110. package/dist/cjs/api/types/index.d.ts +16 -0
  111. package/dist/cjs/api/types/index.js +16 -0
  112. package/dist/cjs/index.d.ts +4 -0
  113. package/dist/cjs/index.js +21 -1
  114. package/dist/cjs/oauth/BaseAuth.d.ts +66 -0
  115. package/dist/cjs/oauth/BaseAuth.js +113 -0
  116. package/dist/cjs/oauth/NativeAppAuth.d.ts +32 -0
  117. package/dist/cjs/oauth/NativeAppAuth.js +35 -0
  118. package/dist/cjs/oauth/SPAAuth.d.ts +38 -0
  119. package/dist/cjs/oauth/SPAAuth.js +96 -0
  120. package/dist/cjs/oauth/ServerToServerAuth.d.ts +17 -0
  121. package/dist/cjs/oauth/ServerToServerAuth.js +49 -0
  122. package/dist/cjs/oauth/TokenManager.d.ts +83 -0
  123. package/dist/cjs/oauth/TokenManager.js +174 -0
  124. package/dist/cjs/oauth/WebAppAuth.d.ts +29 -0
  125. package/dist/cjs/oauth/WebAppAuth.js +88 -0
  126. package/dist/cjs/oauth/errors.d.ts +41 -0
  127. package/dist/cjs/oauth/errors.js +83 -0
  128. package/dist/cjs/oauth/http.d.ts +70 -0
  129. package/dist/cjs/oauth/http.js +280 -0
  130. package/dist/cjs/oauth/index.d.ts +34 -0
  131. package/dist/cjs/oauth/index.js +47 -0
  132. package/dist/cjs/oauth/logger.d.ts +17 -0
  133. package/dist/cjs/oauth/logger.js +18 -0
  134. package/dist/cjs/oauth/pkce.d.ts +30 -0
  135. package/dist/cjs/oauth/pkce.js +102 -0
  136. package/dist/cjs/oauth/validation.d.ts +17 -0
  137. package/dist/cjs/oauth/validation.js +55 -0
  138. package/dist/cjs/version.d.ts +1 -1
  139. package/dist/cjs/version.js +1 -1
  140. package/dist/esm/BaseClient.d.mts +4 -0
  141. package/dist/esm/BaseClient.mjs +4 -2
  142. package/dist/esm/Client.d.mts +6 -0
  143. package/dist/esm/Client.mjs +10 -0
  144. package/dist/esm/api/resources/accountPermissions/client/Client.mjs +7 -7
  145. package/dist/esm/api/resources/accounts/client/Client.mjs +13 -13
  146. package/dist/esm/api/resources/comments/client/Client.mjs +49 -49
  147. package/dist/esm/api/resources/customActions/client/Client.d.mts +145 -0
  148. package/dist/esm/api/resources/customActions/client/Client.mjs +406 -0
  149. package/dist/esm/api/resources/customActions/client/index.d.mts +1 -0
  150. package/dist/esm/api/resources/customActions/client/index.mjs +1 -0
  151. package/dist/esm/api/resources/customActions/client/requests/ActionCreateParams.d.mts +31 -0
  152. package/dist/esm/api/resources/customActions/client/requests/ActionCreateParams.mjs +2 -0
  153. package/dist/esm/api/resources/customActions/client/requests/ActionUpdateParams.d.mts +35 -0
  154. package/dist/esm/api/resources/customActions/client/requests/ActionUpdateParams.mjs +2 -0
  155. package/dist/esm/api/resources/customActions/client/requests/ActionsIndexRequest.d.mts +21 -0
  156. package/dist/esm/api/resources/customActions/client/requests/ActionsIndexRequest.mjs +2 -0
  157. package/dist/esm/api/resources/customActions/client/requests/ActionsShowRequest.d.mts +9 -0
  158. package/dist/esm/api/resources/customActions/client/requests/ActionsShowRequest.mjs +2 -0
  159. package/dist/esm/api/resources/customActions/client/requests/index.d.mts +4 -0
  160. package/dist/esm/api/resources/customActions/client/requests/index.mjs +1 -0
  161. package/dist/esm/api/resources/customActions/exports.d.mts +2 -0
  162. package/dist/esm/api/resources/customActions/exports.mjs +3 -0
  163. package/dist/esm/api/resources/customActions/index.d.mts +1 -0
  164. package/dist/esm/api/resources/customActions/index.mjs +1 -0
  165. package/dist/esm/api/resources/files/client/Client.d.mts +1 -1
  166. package/dist/esm/api/resources/files/client/Client.mjs +79 -79
  167. package/dist/esm/api/resources/folders/client/Client.mjs +57 -57
  168. package/dist/esm/api/resources/groups/client/Client.d.mts +116 -0
  169. package/dist/esm/api/resources/groups/client/Client.mjs +331 -0
  170. package/dist/esm/api/resources/groups/client/index.d.mts +1 -0
  171. package/dist/esm/api/resources/groups/client/index.mjs +1 -0
  172. package/dist/esm/api/resources/groups/client/requests/CreateGroupParams.d.mts +20 -0
  173. package/dist/esm/api/resources/groups/client/requests/CreateGroupParams.mjs +2 -0
  174. package/dist/esm/api/resources/groups/client/requests/GroupsIndexRequest.d.mts +24 -0
  175. package/dist/esm/api/resources/groups/client/requests/GroupsIndexRequest.mjs +2 -0
  176. package/dist/esm/api/resources/groups/client/requests/GroupsShowRequest.d.mts +9 -0
  177. package/dist/esm/api/resources/groups/client/requests/GroupsShowRequest.mjs +2 -0
  178. package/dist/esm/api/resources/groups/client/requests/UpdateGroupParams.d.mts +20 -0
  179. package/dist/esm/api/resources/groups/client/requests/UpdateGroupParams.mjs +2 -0
  180. package/dist/esm/api/resources/groups/client/requests/index.d.mts +4 -0
  181. package/dist/esm/api/resources/groups/client/requests/index.mjs +1 -0
  182. package/dist/esm/api/resources/groups/exports.d.mts +2 -0
  183. package/dist/esm/api/resources/groups/exports.mjs +3 -0
  184. package/dist/esm/api/resources/groups/index.d.mts +2 -0
  185. package/dist/esm/api/resources/groups/index.mjs +2 -0
  186. package/dist/esm/api/resources/groups/types/GroupsIndexRequestSort.d.mts +10 -0
  187. package/dist/esm/api/resources/groups/types/GroupsIndexRequestSort.mjs +10 -0
  188. package/dist/esm/api/resources/groups/types/index.d.mts +1 -0
  189. package/dist/esm/api/resources/groups/types/index.mjs +1 -0
  190. package/dist/esm/api/resources/index.d.mts +5 -0
  191. package/dist/esm/api/resources/index.mjs +5 -0
  192. package/dist/esm/api/resources/metadata/client/Client.d.mts +4 -4
  193. package/dist/esm/api/resources/metadata/client/Client.mjs +19 -19
  194. package/dist/esm/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.mts +4 -4
  195. package/dist/esm/api/resources/metadataFields/client/Client.mjs +29 -29
  196. package/dist/esm/api/resources/projectPermissions/client/Client.mjs +21 -21
  197. package/dist/esm/api/resources/projects/client/Client.mjs +35 -35
  198. package/dist/esm/api/resources/shares/client/Client.d.mts +4 -4
  199. package/dist/esm/api/resources/shares/client/Client.mjs +73 -73
  200. package/dist/esm/api/resources/shares/client/requests/AddAssetParams.d.mts +1 -1
  201. package/dist/esm/api/resources/shares/client/requests/CreateShareParams.d.mts +2 -2
  202. package/dist/esm/api/resources/shares/client/requests/UpdateShareParams.d.mts +1 -1
  203. package/dist/esm/api/resources/users/client/Client.mjs +8 -8
  204. package/dist/esm/api/resources/versionStacks/client/Client.d.mts +1 -1
  205. package/dist/esm/api/resources/versionStacks/client/Client.mjs +44 -44
  206. package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.mts +1 -1
  207. package/dist/esm/api/resources/webhooks/client/Client.mjs +35 -35
  208. package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +21 -21
  209. package/dist/esm/api/resources/workspaces/client/Client.mjs +35 -35
  210. package/dist/esm/api/types/Account.d.mts +0 -2
  211. package/dist/esm/api/types/Action.d.mts +25 -0
  212. package/dist/esm/api/types/Action.mjs +2 -0
  213. package/dist/esm/api/types/ActionCreateResponse.d.mts +13 -0
  214. package/dist/esm/api/types/ActionCreateResponse.mjs +2 -0
  215. package/dist/esm/api/types/ActionInclude.d.mts +4 -0
  216. package/dist/esm/api/types/ActionInclude.mjs +2 -0
  217. package/dist/esm/api/types/ActionResponse.d.mts +7 -0
  218. package/dist/esm/api/types/ActionResponse.mjs +2 -0
  219. package/dist/esm/api/types/ActionWithIncludes.d.mts +4 -0
  220. package/dist/esm/api/types/ActionWithIncludes.mjs +2 -0
  221. package/dist/esm/api/types/ActionWithIncludesResponse.d.mts +7 -0
  222. package/dist/esm/api/types/ActionWithIncludesResponse.mjs +2 -0
  223. package/dist/esm/api/types/ActionsWithIncludesResponse.d.mts +11 -0
  224. package/dist/esm/api/types/ActionsWithIncludesResponse.mjs +2 -0
  225. package/dist/esm/api/types/AuditLogwithIncludes.d.mts +7 -0
  226. package/dist/esm/api/types/AuditLogwithIncludes.mjs +7 -0
  227. package/dist/esm/api/types/Filters.d.mts +7 -0
  228. package/dist/esm/api/types/Filters.mjs +7 -0
  229. package/dist/esm/api/types/GroupCommon.d.mts +16 -0
  230. package/dist/esm/api/types/GroupCommon.mjs +2 -0
  231. package/dist/esm/api/types/GroupCommonWithIncludes.d.mts +4 -0
  232. package/dist/esm/api/types/GroupCommonWithIncludes.mjs +2 -0
  233. package/dist/esm/api/types/GroupResponse.d.mts +4 -0
  234. package/dist/esm/api/types/GroupResponse.mjs +2 -0
  235. package/dist/esm/api/types/GroupWithIncludes.d.mts +13 -0
  236. package/dist/esm/api/types/GroupWithIncludes.mjs +2 -0
  237. package/dist/esm/api/types/GroupWithIncludesResponse.d.mts +4 -0
  238. package/dist/esm/api/types/GroupWithIncludesResponse.mjs +2 -0
  239. package/dist/esm/api/types/GroupsInclude.d.mts +4 -0
  240. package/dist/esm/api/types/GroupsInclude.mjs +2 -0
  241. package/dist/esm/api/types/GroupsSort.d.mts +10 -0
  242. package/dist/esm/api/types/GroupsSort.mjs +10 -0
  243. package/dist/esm/api/types/GroupsWithIncludesResponse.d.mts +8 -0
  244. package/dist/esm/api/types/GroupsWithIncludesResponse.mjs +2 -0
  245. package/dist/esm/api/types/SingleUserValue.d.mts +1 -1
  246. package/dist/esm/api/types/SyncGroupWithIncludes.d.mts +15 -0
  247. package/dist/esm/api/types/SyncGroupWithIncludes.mjs +11 -0
  248. package/dist/esm/api/types/index.d.mts +16 -0
  249. package/dist/esm/api/types/index.mjs +16 -0
  250. package/dist/esm/index.d.mts +4 -0
  251. package/dist/esm/index.mjs +6 -0
  252. package/dist/esm/oauth/BaseAuth.d.mts +66 -0
  253. package/dist/esm/oauth/BaseAuth.mjs +109 -0
  254. package/dist/esm/oauth/NativeAppAuth.d.mts +32 -0
  255. package/dist/esm/oauth/NativeAppAuth.mjs +31 -0
  256. package/dist/esm/oauth/SPAAuth.d.mts +38 -0
  257. package/dist/esm/oauth/SPAAuth.mjs +92 -0
  258. package/dist/esm/oauth/ServerToServerAuth.d.mts +17 -0
  259. package/dist/esm/oauth/ServerToServerAuth.mjs +45 -0
  260. package/dist/esm/oauth/TokenManager.d.mts +83 -0
  261. package/dist/esm/oauth/TokenManager.mjs +170 -0
  262. package/dist/esm/oauth/WebAppAuth.d.mts +29 -0
  263. package/dist/esm/oauth/WebAppAuth.mjs +84 -0
  264. package/dist/esm/oauth/errors.d.mts +41 -0
  265. package/dist/esm/oauth/errors.mjs +72 -0
  266. package/dist/esm/oauth/http.d.mts +70 -0
  267. package/dist/esm/oauth/http.mjs +274 -0
  268. package/dist/esm/oauth/index.d.mts +34 -0
  269. package/dist/esm/oauth/index.mjs +30 -0
  270. package/dist/esm/oauth/logger.d.mts +17 -0
  271. package/dist/esm/oauth/logger.mjs +15 -0
  272. package/dist/esm/oauth/pkce.d.mts +30 -0
  273. package/dist/esm/oauth/pkce.mjs +98 -0
  274. package/dist/esm/oauth/validation.d.mts +17 -0
  275. package/dist/esm/oauth/validation.mjs +51 -0
  276. package/dist/esm/version.d.mts +1 -1
  277. package/dist/esm/version.mjs +1 -1
  278. package/package.json +23 -1
  279. package/reference.md +1318 -586
package/README.md CHANGED
@@ -3,11 +3,9 @@
3
3
  [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FFrameio%2Ftypescript-sdk)
4
4
  [![npm shield](https://img.shields.io/npm/v/frameio)](https://www.npmjs.com/package/frameio)
5
5
 
6
-
7
6
  <img width="1644" alt="artboard_small" src="https://user-images.githubusercontent.com/19295862/66240171-ba8dd280-e6b0-11e9-9ccf-573a4fc5961f.png">
8
7
 
9
- Frame.io is a cloud-based collaboration hub that allows video professionals to share files, comment on clips real-time, and compare different versions and edits of a clip.
10
-
8
+ Frame.io is a cloud-based collaboration hub that allows video professionals to share files, comment on clips real-time, and compare different versions and edits of a clip.
11
9
 
12
10
  ## Installation
13
11
 
@@ -21,7 +19,26 @@ A full reference for this library is available [here](https://next.developer.fra
21
19
 
22
20
  ## Usage
23
21
 
24
- Instantiate and use the client with the following:
22
+ You can authenticate with a static token or OAuth 2.0 via `frameio` auth classes:
23
+
24
+ **Static token** (for legacy dev tokens or when you already have an access token):
25
+
26
+ ```typescript
27
+ const client = new FrameioClient({ token: "YOUR_TOKEN" });
28
+ ```
29
+
30
+ **OAuth 2.0** (for production with automatic token refresh):
31
+
32
+ ```typescript
33
+ import { FrameioClient, ServerToServerAuth } from "frameio";
34
+
35
+ const auth = new ServerToServerAuth({ clientId: "...", clientSecret: "..." });
36
+ const client = new FrameioClient({ token: () => auth.getToken() });
37
+ ```
38
+
39
+ See the [Authentication](#authentication) section below for all OAuth flows.
40
+
41
+ Example: creating a metadata field definition:
25
42
 
26
43
  ```typescript
27
44
  import { FrameioClient } from "frameio";
@@ -46,6 +63,123 @@ await client.metadataFields.metadataFieldDefinitionsCreate("b2702c44-c6da-4bb6-8
46
63
  });
47
64
  ```
48
65
 
66
+ ## Authentication
67
+
68
+ The SDK supports two authentication options:
69
+
70
+ - **Static token**: Pass a string directly to `token`. Suitable for legacy dev tokens or when you already have an access token.
71
+ - **OAuth 2.0**: Use the built-in auth classes for automatic token management and refresh. Pass `() => auth.getToken()` to the client.
72
+
73
+ The SDK provides four OAuth 2.0 flows:
74
+
75
+ | Flow | Use Case | Classes |
76
+ | ------------------------- | -------------------------------------------------- | -------------------- |
77
+ | **Server-to-Server** | Backend services, scripts, no user interaction | `ServerToServerAuth` |
78
+ | **Web App** | Server-side apps with client secret | `WebAppAuth` |
79
+ | **Single Page App (SPA)** | Browser apps without a client secret (PKCE) | `SPAAuth` |
80
+ | **Native App** | Desktop/mobile apps with custom URI schemes (PKCE) | `NativeAppAuth` |
81
+
82
+ ### Server-to-Server
83
+
84
+ For backend services and scripts that need Frame.io access without user interaction:
85
+
86
+ ```typescript
87
+ import { FrameioClient, ServerToServerAuth } from "frameio";
88
+
89
+ const auth = new ServerToServerAuth({ clientId: "...", clientSecret: "..." });
90
+ const client = new FrameioClient({ token: () => auth.getToken() });
91
+ // Tokens refresh automatically; no user interaction needed.
92
+ ```
93
+
94
+ ### Web App
95
+
96
+ For server-side applications with a client secret:
97
+
98
+ ```typescript
99
+ import { FrameioClient, WebAppAuth } from "frameio";
100
+ import crypto from "crypto";
101
+
102
+ const auth = new WebAppAuth({
103
+ clientId: "...",
104
+ clientSecret: "...",
105
+ redirectUri: "https://myapp.com/callback",
106
+ });
107
+
108
+ const url = auth.getAuthorizationUrl({ state: crypto.randomBytes(32).toString("hex") });
109
+ // Redirect user to url, then:
110
+ await auth.exchangeCode("CODE_FROM_CALLBACK");
111
+ const client = new FrameioClient({ token: () => auth.getToken() });
112
+ ```
113
+
114
+ ### Single Page App (PKCE)
115
+
116
+ For browser-based apps that cannot store a client secret:
117
+
118
+ ```typescript
119
+ import { FrameioClient, SPAAuth } from "frameio";
120
+
121
+ const auth = new SPAAuth({ clientId: "...", redirectUri: "https://myapp.com/cb" });
122
+
123
+ const result = await auth.getAuthorizationUrl({ state: crypto.randomUUID() });
124
+ // Redirect user to result.url, store result.codeVerifier, then:
125
+ await auth.exchangeCode({ code: "CODE", codeVerifier: result.codeVerifier });
126
+ const client = new FrameioClient({ token: () => auth.getToken() });
127
+ ```
128
+
129
+ ### Native App (PKCE with custom URI schemes)
130
+
131
+ For desktop and mobile applications:
132
+
133
+ ```typescript
134
+ import { NativeAppAuth } from "frameio";
135
+
136
+ const auth = new NativeAppAuth({
137
+ clientId: "...",
138
+ redirectUri: "myapp://callback",
139
+ });
140
+ // Same PKCE flow as SPAAuth
141
+ ```
142
+
143
+ ### Token Persistence
144
+
145
+ For Web App, SPA, and Native App flows, you can persist tokens to avoid re-authenticating on each app restart:
146
+
147
+ ```typescript
148
+ // After exchangeCode() — save tokens for later
149
+ const data = auth.exportTokens();
150
+ // Store data to file or database ...
151
+
152
+ // On next app start — restore and use
153
+ auth.importTokens(data);
154
+ const client = new FrameioClient({ token: () => auth.getToken() });
155
+ ```
156
+
157
+ ### Revoking Tokens
158
+
159
+ To sign out and revoke the current access and refresh tokens:
160
+
161
+ ```typescript
162
+ await auth.revoke();
163
+ ```
164
+
165
+ ### Staging / Non-Production
166
+
167
+ Use `imsBaseUrl` to point at a staging or alternative Adobe IMS environment:
168
+
169
+ ```typescript
170
+ const auth = new ServerToServerAuth({
171
+ clientId: "...",
172
+ clientSecret: "...",
173
+ imsBaseUrl: "https://ims-na1-stg1.adobelogin.com",
174
+ });
175
+ ```
176
+
177
+ ### Async / Concurrency
178
+
179
+ All auth flows use `async/await` natively. The `getToken()` method handles automatic token refresh and is safe to call concurrently — only one refresh request fires at a time.
180
+
181
+ For the full authentication guide, see the [TypeScript Authentication Guide](https://next.developer.frame.io/platform/v4/docs/typescript-authentication-guide).
182
+
49
183
  ## Request And Response Types
50
184
 
51
185
  The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
@@ -79,6 +213,27 @@ try {
79
213
  }
80
214
  ```
81
215
 
216
+ For OAuth flows, additional exceptions are available:
217
+
218
+ - `AuthenticationError` — token exchange or refresh failed
219
+ - `TokenExpiredError` — refresh token expired; user must re-authenticate
220
+ - `ConfigurationError` — invalid configuration (e.g. missing `clientId`)
221
+ - `NetworkError`, `RateLimitError` — network or rate limit issues
222
+
223
+ ```typescript
224
+ import { AuthenticationError, TokenExpiredError } from "frameio";
225
+
226
+ try {
227
+ await auth.exchangeCode("...");
228
+ } catch (error) {
229
+ if (error instanceof AuthenticationError) {
230
+ console.error(error.errorCode, error.errorDescription);
231
+ } else if (error instanceof TokenExpiredError) {
232
+ // Redirect user to sign in again
233
+ }
234
+ }
235
+ ```
236
+
82
237
  ## Advanced
83
238
 
84
239
  ### Additional Headers
@@ -5,6 +5,8 @@ export type BaseClientOptions = {
5
5
  environment?: core.Supplier<environments.FrameioEnvironment | string>;
6
6
  /** Specify a custom URL to connect the client to. */
7
7
  baseUrl?: core.Supplier<string>;
8
+ /** Override the user-agent header */
9
+ userAgent?: "frameio-ts";
8
10
  /** Additional headers to include in requests. */
9
11
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
10
12
  /** The default maximum time to wait for a response in seconds. */
@@ -24,6 +26,8 @@ export interface BaseRequestOptions {
24
26
  maxRetries?: number;
25
27
  /** A hook to abort the request. */
26
28
  abortSignal?: AbortSignal;
29
+ /** Override the user-agent header */
30
+ userAgent?: "frameio-ts";
27
31
  /** Additional query string parameters to include in the request. */
28
32
  queryParams?: Record<string, unknown>;
29
33
  /** Additional headers to include in the request. */
@@ -40,13 +40,15 @@ const BearerAuthProvider_js_1 = require("./auth/BearerAuthProvider.js");
40
40
  const headers_js_1 = require("./core/headers.js");
41
41
  const core = __importStar(require("./core/index.js"));
42
42
  function normalizeClientOptions(options) {
43
+ var _a;
43
44
  const headers = (0, headers_js_1.mergeHeaders)({
44
45
  "X-Fern-Language": "JavaScript",
45
46
  "X-Fern-SDK-Name": "frameio",
46
- "X-Fern-SDK-Version": "3.2.3",
47
- "User-Agent": "frameio/3.2.3",
47
+ "X-Fern-SDK-Version": "4.2.0",
48
+ "User-Agent": "frameio/4.2.0",
48
49
  "X-Fern-Runtime": core.RUNTIME.type,
49
50
  "X-Fern-Runtime-Version": core.RUNTIME.version,
51
+ "user-agent": (_a = options === null || options === void 0 ? void 0 : options.userAgent) !== null && _a !== void 0 ? _a : "frameio-ts",
50
52
  }, options === null || options === void 0 ? void 0 : options.headers);
51
53
  return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
52
54
  }
@@ -1,8 +1,10 @@
1
1
  import { AccountPermissionsClient } from "./api/resources/accountPermissions/client/Client.js";
2
2
  import { AccountsClient } from "./api/resources/accounts/client/Client.js";
3
3
  import { CommentsClient } from "./api/resources/comments/client/Client.js";
4
+ import { CustomActionsClient } from "./api/resources/customActions/client/Client.js";
4
5
  import { FilesClient } from "./api/resources/files/client/Client.js";
5
6
  import { FoldersClient } from "./api/resources/folders/client/Client.js";
7
+ import { GroupsClient } from "./api/resources/groups/client/Client.js";
6
8
  import { MetadataClient } from "./api/resources/metadata/client/Client.js";
7
9
  import { MetadataFieldsClient } from "./api/resources/metadataFields/client/Client.js";
8
10
  import { ProjectPermissionsClient } from "./api/resources/projectPermissions/client/Client.js";
@@ -23,6 +25,7 @@ export declare namespace FrameioClient {
23
25
  }
24
26
  export declare class FrameioClient {
25
27
  protected readonly _options: NormalizedClientOptionsWithAuth<FrameioClient.Options>;
28
+ protected _customActions: CustomActionsClient | undefined;
26
29
  protected _metadataFields: MetadataFieldsClient | undefined;
27
30
  protected _projectPermissions: ProjectPermissionsClient | undefined;
28
31
  protected _folders: FoldersClient | undefined;
@@ -32,6 +35,7 @@ export declare class FrameioClient {
32
35
  protected _accounts: AccountsClient | undefined;
33
36
  protected _webhooks: WebhooksClient | undefined;
34
37
  protected _workspacePermissions: WorkspacePermissionsClient | undefined;
38
+ protected _groups: GroupsClient | undefined;
35
39
  protected _shares: SharesClient | undefined;
36
40
  protected _metadata: MetadataClient | undefined;
37
41
  protected _files: FilesClient | undefined;
@@ -39,6 +43,7 @@ export declare class FrameioClient {
39
43
  protected _projects: ProjectsClient | undefined;
40
44
  protected _workspaces: WorkspacesClient | undefined;
41
45
  constructor(options: FrameioClient.Options);
46
+ get customActions(): CustomActionsClient;
42
47
  get metadataFields(): MetadataFieldsClient;
43
48
  get projectPermissions(): ProjectPermissionsClient;
44
49
  get folders(): FoldersClient;
@@ -48,6 +53,7 @@ export declare class FrameioClient {
48
53
  get accounts(): AccountsClient;
49
54
  get webhooks(): WebhooksClient;
50
55
  get workspacePermissions(): WorkspacePermissionsClient;
56
+ get groups(): GroupsClient;
51
57
  get shares(): SharesClient;
52
58
  get metadata(): MetadataClient;
53
59
  get files(): FilesClient;
@@ -47,39 +47,45 @@ exports.FrameioClient = void 0;
47
47
  const Client_js_1 = require("./api/resources/accountPermissions/client/Client.js");
48
48
  const Client_js_2 = require("./api/resources/accounts/client/Client.js");
49
49
  const Client_js_3 = require("./api/resources/comments/client/Client.js");
50
- const Client_js_4 = require("./api/resources/files/client/Client.js");
51
- const Client_js_5 = require("./api/resources/folders/client/Client.js");
52
- const Client_js_6 = require("./api/resources/metadata/client/Client.js");
53
- const Client_js_7 = require("./api/resources/metadataFields/client/Client.js");
54
- const Client_js_8 = require("./api/resources/projectPermissions/client/Client.js");
55
- const Client_js_9 = require("./api/resources/projects/client/Client.js");
56
- const Client_js_10 = require("./api/resources/shares/client/Client.js");
57
- const Client_js_11 = require("./api/resources/users/client/Client.js");
58
- const Client_js_12 = require("./api/resources/versionStacks/client/Client.js");
59
- const Client_js_13 = require("./api/resources/webhooks/client/Client.js");
60
- const Client_js_14 = require("./api/resources/workspacePermissions/client/Client.js");
61
- const Client_js_15 = require("./api/resources/workspaces/client/Client.js");
50
+ const Client_js_4 = require("./api/resources/customActions/client/Client.js");
51
+ const Client_js_5 = require("./api/resources/files/client/Client.js");
52
+ const Client_js_6 = require("./api/resources/folders/client/Client.js");
53
+ const Client_js_7 = require("./api/resources/groups/client/Client.js");
54
+ const Client_js_8 = require("./api/resources/metadata/client/Client.js");
55
+ const Client_js_9 = require("./api/resources/metadataFields/client/Client.js");
56
+ const Client_js_10 = require("./api/resources/projectPermissions/client/Client.js");
57
+ const Client_js_11 = require("./api/resources/projects/client/Client.js");
58
+ const Client_js_12 = require("./api/resources/shares/client/Client.js");
59
+ const Client_js_13 = require("./api/resources/users/client/Client.js");
60
+ const Client_js_14 = require("./api/resources/versionStacks/client/Client.js");
61
+ const Client_js_15 = require("./api/resources/webhooks/client/Client.js");
62
+ const Client_js_16 = require("./api/resources/workspacePermissions/client/Client.js");
63
+ const Client_js_17 = require("./api/resources/workspaces/client/Client.js");
62
64
  const BaseClient_js_1 = require("./BaseClient.js");
63
65
  const core = __importStar(require("./core/index.js"));
64
66
  class FrameioClient {
65
67
  constructor(options) {
66
68
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
67
69
  }
70
+ get customActions() {
71
+ var _a;
72
+ return ((_a = this._customActions) !== null && _a !== void 0 ? _a : (this._customActions = new Client_js_4.CustomActionsClient(this._options)));
73
+ }
68
74
  get metadataFields() {
69
75
  var _a;
70
- return ((_a = this._metadataFields) !== null && _a !== void 0 ? _a : (this._metadataFields = new Client_js_7.MetadataFieldsClient(this._options)));
76
+ return ((_a = this._metadataFields) !== null && _a !== void 0 ? _a : (this._metadataFields = new Client_js_9.MetadataFieldsClient(this._options)));
71
77
  }
72
78
  get projectPermissions() {
73
79
  var _a;
74
- return ((_a = this._projectPermissions) !== null && _a !== void 0 ? _a : (this._projectPermissions = new Client_js_8.ProjectPermissionsClient(this._options)));
80
+ return ((_a = this._projectPermissions) !== null && _a !== void 0 ? _a : (this._projectPermissions = new Client_js_10.ProjectPermissionsClient(this._options)));
75
81
  }
76
82
  get folders() {
77
83
  var _a;
78
- return ((_a = this._folders) !== null && _a !== void 0 ? _a : (this._folders = new Client_js_5.FoldersClient(this._options)));
84
+ return ((_a = this._folders) !== null && _a !== void 0 ? _a : (this._folders = new Client_js_6.FoldersClient(this._options)));
79
85
  }
80
86
  get versionStacks() {
81
87
  var _a;
82
- return ((_a = this._versionStacks) !== null && _a !== void 0 ? _a : (this._versionStacks = new Client_js_12.VersionStacksClient(this._options)));
88
+ return ((_a = this._versionStacks) !== null && _a !== void 0 ? _a : (this._versionStacks = new Client_js_14.VersionStacksClient(this._options)));
83
89
  }
84
90
  get accountPermissions() {
85
91
  var _a;
@@ -95,35 +101,39 @@ class FrameioClient {
95
101
  }
96
102
  get webhooks() {
97
103
  var _a;
98
- return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_13.WebhooksClient(this._options)));
104
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_15.WebhooksClient(this._options)));
99
105
  }
100
106
  get workspacePermissions() {
101
107
  var _a;
102
- return ((_a = this._workspacePermissions) !== null && _a !== void 0 ? _a : (this._workspacePermissions = new Client_js_14.WorkspacePermissionsClient(this._options)));
108
+ return ((_a = this._workspacePermissions) !== null && _a !== void 0 ? _a : (this._workspacePermissions = new Client_js_16.WorkspacePermissionsClient(this._options)));
109
+ }
110
+ get groups() {
111
+ var _a;
112
+ return ((_a = this._groups) !== null && _a !== void 0 ? _a : (this._groups = new Client_js_7.GroupsClient(this._options)));
103
113
  }
104
114
  get shares() {
105
115
  var _a;
106
- return ((_a = this._shares) !== null && _a !== void 0 ? _a : (this._shares = new Client_js_10.SharesClient(this._options)));
116
+ return ((_a = this._shares) !== null && _a !== void 0 ? _a : (this._shares = new Client_js_12.SharesClient(this._options)));
107
117
  }
108
118
  get metadata() {
109
119
  var _a;
110
- return ((_a = this._metadata) !== null && _a !== void 0 ? _a : (this._metadata = new Client_js_6.MetadataClient(this._options)));
120
+ return ((_a = this._metadata) !== null && _a !== void 0 ? _a : (this._metadata = new Client_js_8.MetadataClient(this._options)));
111
121
  }
112
122
  get files() {
113
123
  var _a;
114
- return ((_a = this._files) !== null && _a !== void 0 ? _a : (this._files = new Client_js_4.FilesClient(this._options)));
124
+ return ((_a = this._files) !== null && _a !== void 0 ? _a : (this._files = new Client_js_5.FilesClient(this._options)));
115
125
  }
116
126
  get users() {
117
127
  var _a;
118
- return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_11.UsersClient(this._options)));
128
+ return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_13.UsersClient(this._options)));
119
129
  }
120
130
  get projects() {
121
131
  var _a;
122
- return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_js_9.ProjectsClient(this._options)));
132
+ return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_js_11.ProjectsClient(this._options)));
123
133
  }
124
134
  get workspaces() {
125
135
  var _a;
126
- return ((_a = this._workspaces) !== null && _a !== void 0 ? _a : (this._workspaces = new Client_js_15.WorkspacesClient(this._options)));
136
+ return ((_a = this._workspaces) !== null && _a !== void 0 ? _a : (this._workspaces = new Client_js_17.WorkspacesClient(this._options)));
127
137
  }
128
138
  /**
129
139
  * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
@@ -85,17 +85,17 @@ class AccountPermissionsClient {
85
85
  return __awaiter(this, arguments, void 0, function* (account_id, _request = {}, requestOptions) {
86
86
  var _a, _b;
87
87
  const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
88
- var _a, _b, _c, _d, _e, _f, _g, _h;
88
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
89
89
  const _authRequest = yield this._options.authProvider.getAuthRequest();
90
- 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);
91
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
90
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
91
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
92
92
  url: _requestUrl,
93
93
  method: "GET",
94
94
  headers: _headers,
95
- timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
96
- maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
95
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
96
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
97
97
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
98
- fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
98
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
99
99
  logging: this._options.logging,
100
100
  });
101
101
  if (_response.ok) {
@@ -83,17 +83,17 @@ class AccountsClient {
83
83
  return __awaiter(this, arguments, void 0, function* (_request = {}, requestOptions) {
84
84
  var _a, _b;
85
85
  const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
86
- var _a, _b, _c, _d, _e, _f, _g, _h;
86
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
87
87
  const _authRequest = yield this._options.authProvider.getAuthRequest();
88
- 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);
89
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
88
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
89
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
90
90
  url: _requestUrl,
91
91
  method: "GET",
92
92
  headers: _headers,
93
- timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
94
- maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
93
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
94
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
95
95
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
96
- fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
96
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
97
97
  logging: this._options.logging,
98
98
  });
99
99
  if (_response.ok) {
@@ -166,7 +166,7 @@ class AccountsClient {
166
166
  }
167
167
  __auditlogIndex(account_id_1) {
168
168
  return __awaiter(this, arguments, void 0, function* (account_id, request = {}, requestOptions) {
169
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
169
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
170
170
  const { include, filters, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
171
171
  const _queryParams = {
172
172
  include: include != null ? include : undefined,
@@ -176,16 +176,16 @@ class AccountsClient {
176
176
  include_total_count: includeTotalCount,
177
177
  };
178
178
  const _authRequest = yield this._options.authProvider.getAuthRequest();
179
- const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "api-version": "4.0" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
180
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
181
- 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)}/audit_logs`),
179
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "api-version": "4.0", "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
180
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
181
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/audit_logs`),
182
182
  method: "GET",
183
183
  headers: _headers,
184
184
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
185
- 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,
186
- 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,
185
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
186
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
187
187
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
188
- fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
188
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
189
189
  logging: this._options.logging,
190
190
  });
191
191
  if (_response.ok) {