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
@@ -0,0 +1,443 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.CustomActionsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../errors/index.js"));
53
+ const Frameio = __importStar(require("../../../index.js"));
54
+ /**
55
+ * Manage Custom Actions and related operations.
56
+ */
57
+ class CustomActionsClient {
58
+ constructor(options) {
59
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
60
+ }
61
+ /**
62
+ * Show custom action details. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
63
+ *
64
+ * @param {Frameio.Uuid} account_id
65
+ * @param {Frameio.Uuid} action_id
66
+ * @param {Frameio.ActionsShowRequest} request
67
+ * @param {CustomActionsClient.RequestOptions} requestOptions - Request-specific configuration.
68
+ *
69
+ * @throws {@link Frameio.BadRequestError}
70
+ * @throws {@link Frameio.UnauthorizedError}
71
+ * @throws {@link Frameio.ForbiddenError}
72
+ * @throws {@link Frameio.NotFoundError}
73
+ * @throws {@link Frameio.ConflictError}
74
+ * @throws {@link Frameio.UnprocessableEntityError}
75
+ * @throws {@link Frameio.TooManyRequestsError}
76
+ *
77
+ * @example
78
+ * await client.customActions.actionsShow("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
79
+ * include: "creator"
80
+ * })
81
+ */
82
+ actionsShow(account_id, action_id, request = {}, requestOptions) {
83
+ return core.HttpResponsePromise.fromPromise(this.__actionsShow(account_id, action_id, request, requestOptions));
84
+ }
85
+ __actionsShow(account_id_1, action_id_1) {
86
+ return __awaiter(this, arguments, void 0, function* (account_id, action_id, request = {}, requestOptions) {
87
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
88
+ const { include } = request;
89
+ const _queryParams = {
90
+ include: include != null ? include : undefined,
91
+ };
92
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
93
+ 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);
94
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
95
+ 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)}/actions/${core.url.encodePathParam(action_id)}`),
96
+ method: "GET",
97
+ headers: _headers,
98
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
99
+ 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,
100
+ 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,
101
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
102
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
103
+ logging: this._options.logging,
104
+ });
105
+ if (_response.ok) {
106
+ return { data: _response.body, rawResponse: _response.rawResponse };
107
+ }
108
+ if (_response.error.reason === "status-code") {
109
+ switch (_response.error.statusCode) {
110
+ case 400:
111
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
112
+ case 401:
113
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
114
+ case 403:
115
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
116
+ case 404:
117
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
118
+ case 409:
119
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
120
+ case 422:
121
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
122
+ case 429:
123
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
124
+ default:
125
+ throw new errors.FrameioError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.body,
128
+ rawResponse: _response.rawResponse,
129
+ });
130
+ }
131
+ }
132
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/actions/{action_id}");
133
+ });
134
+ }
135
+ /**
136
+ * Delete a custom action. <br/>Rate Limits: 60 calls per 1.00 minute(s) per account_user
137
+ *
138
+ * @param {Frameio.Uuid} account_id
139
+ * @param {Frameio.Uuid} action_id
140
+ * @param {CustomActionsClient.RequestOptions} requestOptions - Request-specific configuration.
141
+ *
142
+ * @throws {@link Frameio.BadRequestError}
143
+ * @throws {@link Frameio.UnauthorizedError}
144
+ * @throws {@link Frameio.ForbiddenError}
145
+ * @throws {@link Frameio.NotFoundError}
146
+ * @throws {@link Frameio.ConflictError}
147
+ * @throws {@link Frameio.UnprocessableEntityError}
148
+ * @throws {@link Frameio.TooManyRequestsError}
149
+ *
150
+ * @example
151
+ * await client.customActions.actionsDelete("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
152
+ */
153
+ actionsDelete(account_id, action_id, requestOptions) {
154
+ return core.HttpResponsePromise.fromPromise(this.__actionsDelete(account_id, action_id, requestOptions));
155
+ }
156
+ __actionsDelete(account_id, action_id, requestOptions) {
157
+ return __awaiter(this, void 0, void 0, function* () {
158
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
159
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
160
+ 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);
161
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
162
+ 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)}/actions/${core.url.encodePathParam(action_id)}`),
163
+ method: "DELETE",
164
+ headers: _headers,
165
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
166
+ 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,
167
+ 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,
168
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
169
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
170
+ logging: this._options.logging,
171
+ });
172
+ if (_response.ok) {
173
+ return { data: undefined, rawResponse: _response.rawResponse };
174
+ }
175
+ if (_response.error.reason === "status-code") {
176
+ switch (_response.error.statusCode) {
177
+ case 400:
178
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
179
+ case 401:
180
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
181
+ case 403:
182
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
183
+ case 404:
184
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
185
+ case 409:
186
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
187
+ case 422:
188
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
189
+ case 429:
190
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
191
+ default:
192
+ throw new errors.FrameioError({
193
+ statusCode: _response.error.statusCode,
194
+ body: _response.error.body,
195
+ rawResponse: _response.rawResponse,
196
+ });
197
+ }
198
+ }
199
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/actions/{action_id}");
200
+ });
201
+ }
202
+ /**
203
+ * Update custom action details. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
204
+ *
205
+ * @param {Frameio.Uuid} account_id
206
+ * @param {Frameio.Uuid} action_id
207
+ * @param {Frameio.ActionUpdateParams} request
208
+ * @param {CustomActionsClient.RequestOptions} requestOptions - Request-specific configuration.
209
+ *
210
+ * @throws {@link Frameio.BadRequestError}
211
+ * @throws {@link Frameio.UnauthorizedError}
212
+ * @throws {@link Frameio.ForbiddenError}
213
+ * @throws {@link Frameio.NotFoundError}
214
+ * @throws {@link Frameio.ConflictError}
215
+ * @throws {@link Frameio.UnprocessableEntityError}
216
+ * @throws {@link Frameio.TooManyRequestsError}
217
+ *
218
+ * @example
219
+ * await client.customActions.actionsUpdate("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
220
+ * data: {
221
+ * active: true,
222
+ * description: "customizing our workflow",
223
+ * event: "my.event",
224
+ * multi_asset: true,
225
+ * name: "First Custom Action",
226
+ * timeout: 7,
227
+ * url: "https://example.com/custom-action"
228
+ * }
229
+ * })
230
+ */
231
+ actionsUpdate(account_id, action_id, request, requestOptions) {
232
+ return core.HttpResponsePromise.fromPromise(this.__actionsUpdate(account_id, action_id, request, requestOptions));
233
+ }
234
+ __actionsUpdate(account_id, action_id, request, requestOptions) {
235
+ return __awaiter(this, void 0, void 0, function* () {
236
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
237
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
238
+ 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);
239
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
240
+ 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)}/actions/${core.url.encodePathParam(action_id)}`),
241
+ method: "PATCH",
242
+ headers: _headers,
243
+ contentType: "application/json",
244
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
245
+ requestType: "json",
246
+ body: request,
247
+ 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,
248
+ 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,
249
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
250
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
251
+ logging: this._options.logging,
252
+ });
253
+ if (_response.ok) {
254
+ return { data: _response.body, rawResponse: _response.rawResponse };
255
+ }
256
+ if (_response.error.reason === "status-code") {
257
+ switch (_response.error.statusCode) {
258
+ case 400:
259
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
260
+ case 401:
261
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
262
+ case 403:
263
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
264
+ case 404:
265
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
266
+ case 409:
267
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
268
+ case 422:
269
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
270
+ case 429:
271
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
272
+ default:
273
+ throw new errors.FrameioError({
274
+ statusCode: _response.error.statusCode,
275
+ body: _response.error.body,
276
+ rawResponse: _response.rawResponse,
277
+ });
278
+ }
279
+ }
280
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v4/accounts/{account_id}/actions/{action_id}");
281
+ });
282
+ }
283
+ /**
284
+ * List actions in a given workspace. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
285
+ *
286
+ * @param {Frameio.Uuid} account_id
287
+ * @param {Frameio.Uuid} workspace_id
288
+ * @param {Frameio.ActionsIndexRequest} request
289
+ * @param {CustomActionsClient.RequestOptions} requestOptions - Request-specific configuration.
290
+ *
291
+ * @throws {@link Frameio.BadRequestError}
292
+ * @throws {@link Frameio.UnauthorizedError}
293
+ * @throws {@link Frameio.ForbiddenError}
294
+ * @throws {@link Frameio.NotFoundError}
295
+ * @throws {@link Frameio.ConflictError}
296
+ * @throws {@link Frameio.UnprocessableEntityError}
297
+ * @throws {@link Frameio.TooManyRequestsError}
298
+ *
299
+ * @example
300
+ * await client.customActions.actionsIndex("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
301
+ * include: "creator",
302
+ * after: "<opaque_cursor>",
303
+ * page_size: 10,
304
+ * include_total_count: false
305
+ * })
306
+ */
307
+ actionsIndex(account_id, workspace_id, request = {}, requestOptions) {
308
+ return core.HttpResponsePromise.fromPromise(this.__actionsIndex(account_id, workspace_id, request, requestOptions));
309
+ }
310
+ __actionsIndex(account_id_1, workspace_id_1) {
311
+ return __awaiter(this, arguments, void 0, function* (account_id, workspace_id, request = {}, requestOptions) {
312
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
313
+ const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
314
+ const _queryParams = {
315
+ include: include != null ? include : undefined,
316
+ after,
317
+ page_size: pageSize,
318
+ include_total_count: includeTotalCount,
319
+ };
320
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
321
+ 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);
322
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
323
+ 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)}/workspaces/${core.url.encodePathParam(workspace_id)}/actions`),
324
+ method: "GET",
325
+ headers: _headers,
326
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
327
+ 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,
328
+ 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,
329
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
330
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
331
+ logging: this._options.logging,
332
+ });
333
+ if (_response.ok) {
334
+ return { data: _response.body, rawResponse: _response.rawResponse };
335
+ }
336
+ if (_response.error.reason === "status-code") {
337
+ switch (_response.error.statusCode) {
338
+ case 400:
339
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
340
+ case 401:
341
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
342
+ case 403:
343
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
344
+ case 404:
345
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
346
+ case 409:
347
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
348
+ case 422:
349
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
350
+ case 429:
351
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
352
+ default:
353
+ throw new errors.FrameioError({
354
+ statusCode: _response.error.statusCode,
355
+ body: _response.error.body,
356
+ rawResponse: _response.rawResponse,
357
+ });
358
+ }
359
+ }
360
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/workspaces/{workspace_id}/actions");
361
+ });
362
+ }
363
+ /**
364
+ * Create a custom action in a workspace. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
365
+ *
366
+ * @param {Frameio.Uuid} account_id
367
+ * @param {Frameio.Uuid} workspace_id
368
+ * @param {Frameio.ActionCreateParams} request
369
+ * @param {CustomActionsClient.RequestOptions} requestOptions - Request-specific configuration.
370
+ *
371
+ * @throws {@link Frameio.BadRequestError}
372
+ * @throws {@link Frameio.UnauthorizedError}
373
+ * @throws {@link Frameio.ForbiddenError}
374
+ * @throws {@link Frameio.NotFoundError}
375
+ * @throws {@link Frameio.ConflictError}
376
+ * @throws {@link Frameio.UnprocessableEntityError}
377
+ * @throws {@link Frameio.TooManyRequestsError}
378
+ *
379
+ * @example
380
+ * await client.customActions.actionsCreate("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
381
+ * data: {
382
+ * description: "customizing our workflow",
383
+ * event: "my.event",
384
+ * name: "First Custom Action",
385
+ * timeout: 7,
386
+ * url: "https://example.com/custom-action"
387
+ * }
388
+ * })
389
+ */
390
+ actionsCreate(account_id, workspace_id, request, requestOptions) {
391
+ return core.HttpResponsePromise.fromPromise(this.__actionsCreate(account_id, workspace_id, request, requestOptions));
392
+ }
393
+ __actionsCreate(account_id, workspace_id, request, requestOptions) {
394
+ return __awaiter(this, void 0, void 0, function* () {
395
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
396
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
397
+ 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);
398
+ const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
399
+ 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)}/workspaces/${core.url.encodePathParam(workspace_id)}/actions`),
400
+ method: "POST",
401
+ headers: _headers,
402
+ contentType: "application/json",
403
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
404
+ requestType: "json",
405
+ body: request,
406
+ 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,
407
+ 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,
408
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
409
+ fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
410
+ logging: this._options.logging,
411
+ });
412
+ if (_response.ok) {
413
+ return { data: _response.body, rawResponse: _response.rawResponse };
414
+ }
415
+ if (_response.error.reason === "status-code") {
416
+ switch (_response.error.statusCode) {
417
+ case 400:
418
+ throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
419
+ case 401:
420
+ throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
421
+ case 403:
422
+ throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
423
+ case 404:
424
+ throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
425
+ case 409:
426
+ throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
427
+ case 422:
428
+ throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
429
+ case 429:
430
+ throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
431
+ default:
432
+ throw new errors.FrameioError({
433
+ statusCode: _response.error.statusCode,
434
+ body: _response.error.body,
435
+ rawResponse: _response.rawResponse,
436
+ });
437
+ }
438
+ }
439
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/workspaces/{workspace_id}/actions");
440
+ });
441
+ }
442
+ }
443
+ exports.CustomActionsClient = CustomActionsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * data: {
5
+ * description: "customizing our workflow",
6
+ * event: "my.event",
7
+ * name: "First Custom Action",
8
+ * timeout: 7,
9
+ * url: "https://example.com/custom-action"
10
+ * }
11
+ * }
12
+ */
13
+ export interface ActionCreateParams {
14
+ data: ActionCreateParams.Data;
15
+ }
16
+ export declare namespace ActionCreateParams {
17
+ interface Data {
18
+ /** Action description */
19
+ description: string;
20
+ /** Event name sent to `url` */
21
+ event: string;
22
+ /** Manages action trigger on multiple assets */
23
+ multi_asset?: boolean | undefined;
24
+ /** Action name */
25
+ name: string;
26
+ /** Timeout for the action requests in seconds */
27
+ timeout?: number | undefined;
28
+ /** URL where `event` is sent */
29
+ url: string;
30
+ }
31
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * data: {
5
+ * active: true,
6
+ * description: "customizing our workflow",
7
+ * event: "my.event",
8
+ * multi_asset: true,
9
+ * name: "First Custom Action",
10
+ * timeout: 7,
11
+ * url: "https://example.com/custom-action"
12
+ * }
13
+ * }
14
+ */
15
+ export interface ActionUpdateParams {
16
+ data: ActionUpdateParams.Data;
17
+ }
18
+ export declare namespace ActionUpdateParams {
19
+ interface Data {
20
+ /** Active Status */
21
+ active?: boolean | undefined;
22
+ /** Action description */
23
+ description?: string | undefined;
24
+ /** Event name sent to `url` */
25
+ event?: string | undefined;
26
+ /** Manages action trigger on multiple assets */
27
+ multi_asset?: boolean | undefined;
28
+ /** Action name */
29
+ name?: string | undefined;
30
+ /** Timeout for the action requests in seconds */
31
+ timeout?: number | undefined;
32
+ /** URL where `event` is sent */
33
+ url?: string | undefined;
34
+ }
35
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ import type * as Frameio from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * include: "creator",
6
+ * after: "<opaque_cursor>",
7
+ * page_size: 10,
8
+ * include_total_count: false
9
+ * }
10
+ */
11
+ export interface ActionsIndexRequest {
12
+ include?: "creator";
13
+ /**
14
+ * Opaque Cursor query param for requests returning paginated results.
15
+ * <br/>
16
+ * NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
17
+ */
18
+ after?: Frameio.RequestAfterOpaqueCursor | undefined;
19
+ page_size?: Frameio.RequestPageSize;
20
+ include_total_count?: Frameio.IncludeTotalCount;
21
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * include: "creator"
5
+ * }
6
+ */
7
+ export interface ActionsShowRequest {
8
+ include?: "creator";
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export type { ActionCreateParams } from "./ActionCreateParams.js";
2
+ export type { ActionsIndexRequest } from "./ActionsIndexRequest.js";
3
+ export type { ActionsShowRequest } from "./ActionsShowRequest.js";
4
+ export type { ActionUpdateParams } from "./ActionUpdateParams.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { CustomActionsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.CustomActionsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "CustomActionsClient", { enumerable: true, get: function () { return Client_js_1.CustomActionsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);