frameio 0.0.28__py3-none-any.whl

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 (385) hide show
  1. frameio/__init__.py +1158 -0
  2. frameio/account_permissions/__init__.py +4 -0
  3. frameio/account_permissions/client.py +193 -0
  4. frameio/account_permissions/raw_client.py +333 -0
  5. frameio/accounts/__init__.py +4 -0
  6. frameio/accounts/client.py +162 -0
  7. frameio/accounts/raw_client.py +309 -0
  8. frameio/client.py +439 -0
  9. frameio/comments/__init__.py +38 -0
  10. frameio/comments/client.py +654 -0
  11. frameio/comments/raw_client.py +1316 -0
  12. frameio/comments/types/__init__.py +40 -0
  13. frameio/comments/types/comments_show_request_include.py +5 -0
  14. frameio/comments/types/create_comment_params_data.py +33 -0
  15. frameio/comments/types/update_comment_params_data.py +33 -0
  16. frameio/core/__init__.py +122 -0
  17. frameio/core/api_error.py +23 -0
  18. frameio/core/client_wrapper.py +95 -0
  19. frameio/core/custom_pagination.py +152 -0
  20. frameio/core/datetime_utils.py +28 -0
  21. frameio/core/file.py +67 -0
  22. frameio/core/force_multipart.py +18 -0
  23. frameio/core/http_client.py +663 -0
  24. frameio/core/http_response.py +55 -0
  25. frameio/core/http_sse/__init__.py +42 -0
  26. frameio/core/http_sse/_api.py +112 -0
  27. frameio/core/http_sse/_decoders.py +61 -0
  28. frameio/core/http_sse/_exceptions.py +7 -0
  29. frameio/core/http_sse/_models.py +17 -0
  30. frameio/core/jsonable_encoder.py +100 -0
  31. frameio/core/pagination.py +82 -0
  32. frameio/core/pydantic_utilities.py +361 -0
  33. frameio/core/query_encoder.py +58 -0
  34. frameio/core/remove_none_from_dict.py +11 -0
  35. frameio/core/request_options.py +35 -0
  36. frameio/core/serialization.py +276 -0
  37. frameio/core/unchecked_base_model.py +376 -0
  38. frameio/environment.py +7 -0
  39. frameio/errors/__init__.py +53 -0
  40. frameio/errors/bad_request_error.py +11 -0
  41. frameio/errors/forbidden_error.py +11 -0
  42. frameio/errors/not_found_error.py +11 -0
  43. frameio/errors/too_many_requests_error.py +11 -0
  44. frameio/errors/unauthorized_error.py +11 -0
  45. frameio/errors/unprocessable_entity_error.py +10 -0
  46. frameio/files/__init__.py +58 -0
  47. frameio/files/client.py +1171 -0
  48. frameio/files/raw_client.py +2517 -0
  49. frameio/files/types/__init__.py +56 -0
  50. frameio/files/types/file_copy_params_data.py +15 -0
  51. frameio/files/types/file_create_local_upload_params_data.py +20 -0
  52. frameio/files/types/file_create_params_data.py +31 -0
  53. frameio/files/types/file_create_remote_upload_params_data.py +20 -0
  54. frameio/files/types/file_move_params_data.py +15 -0
  55. frameio/files/types/file_update_params_data.py +15 -0
  56. frameio/files/types/files_copy_request_copy_comments.py +5 -0
  57. frameio/folders/__init__.py +39 -0
  58. frameio/folders/client.py +1004 -0
  59. frameio/folders/raw_client.py +2074 -0
  60. frameio/folders/types/__init__.py +42 -0
  61. frameio/folders/types/folder_copy_params_data.py +15 -0
  62. frameio/folders/types/folder_create_params_data.py +15 -0
  63. frameio/folders/types/folder_move_params_data.py +15 -0
  64. frameio/folders/types/folder_update_params_data.py +15 -0
  65. frameio/metadata/__init__.py +37 -0
  66. frameio/metadata/client.py +293 -0
  67. frameio/metadata/raw_client.py +509 -0
  68. frameio/metadata/types/__init__.py +38 -0
  69. frameio/metadata/types/bulk_update_metadata_params_data.py +23 -0
  70. frameio/metadata/types/bulk_update_metadata_params_data_values_item.py +13 -0
  71. frameio/metadata_fields/__init__.py +103 -0
  72. frameio/metadata_fields/client.py +536 -0
  73. frameio/metadata_fields/raw_client.py +996 -0
  74. frameio/metadata_fields/types/__init__.py +105 -0
  75. frameio/metadata_fields/types/create_field_definition_params_data.py +112 -0
  76. frameio/metadata_fields/types/update_field_definition_params_data.py +118 -0
  77. frameio/project_permissions/__init__.py +4 -0
  78. frameio/project_permissions/client.py +426 -0
  79. frameio/project_permissions/raw_client.py +824 -0
  80. frameio/projects/__init__.py +38 -0
  81. frameio/projects/client.py +604 -0
  82. frameio/projects/raw_client.py +1286 -0
  83. frameio/projects/types/__init__.py +40 -0
  84. frameio/projects/types/project_params_data.py +20 -0
  85. frameio/projects/types/project_update_params_data.py +26 -0
  86. frameio/projects/types/project_update_params_data_status.py +5 -0
  87. frameio/py.typed +0 -0
  88. frameio/shares/__init__.py +64 -0
  89. frameio/shares/client.py +1217 -0
  90. frameio/shares/raw_client.py +2511 -0
  91. frameio/shares/types/__init__.py +61 -0
  92. frameio/shares/types/add_asset_params_data.py +15 -0
  93. frameio/shares/types/add_reviewers_to_share_params_data.py +18 -0
  94. frameio/shares/types/add_reviewers_to_share_params_data_reviewers.py +27 -0
  95. frameio/shares/types/create_share_params_data.py +26 -0
  96. frameio/shares/types/remove_reviewer_params_data.py +13 -0
  97. frameio/shares/types/remove_reviewer_params_data_reviewers.py +27 -0
  98. frameio/shares/types/update_share_params_data.py +34 -0
  99. frameio/shares/types/update_share_params_data_access.py +5 -0
  100. frameio/types/__init__.py +983 -0
  101. frameio/types/account.py +70 -0
  102. frameio/types/account_roles_item.py +5 -0
  103. frameio/types/account_user_role.py +23 -0
  104. frameio/types/account_user_role_role.py +5 -0
  105. frameio/types/account_user_roles_response.py +27 -0
  106. frameio/types/accounts_response.py +23 -0
  107. frameio/types/add_asset_response.py +13 -0
  108. frameio/types/add_asset_response_data.py +15 -0
  109. frameio/types/asset_common.py +48 -0
  110. frameio/types/asset_common_type.py +5 -0
  111. frameio/types/asset_common_with_includes.py +58 -0
  112. frameio/types/asset_common_with_includes_type.py +5 -0
  113. frameio/types/asset_include.py +5 -0
  114. frameio/types/asset_share_params.py +39 -0
  115. frameio/types/asset_share_params_access.py +5 -0
  116. frameio/types/asset_with_includes.py +76 -0
  117. frameio/types/assets_with_includes_response.py +23 -0
  118. frameio/types/bad_request.py +13 -0
  119. frameio/types/bad_request_errors_item.py +15 -0
  120. frameio/types/bad_request_errors_item_source.py +12 -0
  121. frameio/types/boolean_value.py +12 -0
  122. frameio/types/children_type.py +3 -0
  123. frameio/types/comment.py +59 -0
  124. frameio/types/comment_include.py +5 -0
  125. frameio/types/comment_response.py +13 -0
  126. frameio/types/comment_with_includes.py +17 -0
  127. frameio/types/comment_with_includes_response.py +13 -0
  128. frameio/types/comments_with_includes_response.py +23 -0
  129. frameio/types/date_definition.py +49 -0
  130. frameio/types/date_definition_field_configuration.py +21 -0
  131. frameio/types/date_definition_field_configuration_display_format.py +7 -0
  132. frameio/types/date_definition_field_configuration_time_format.py +5 -0
  133. frameio/types/date_definition_field_type.py +10 -0
  134. frameio/types/date_definition_params.py +17 -0
  135. frameio/types/date_definition_params_field_configuration.py +23 -0
  136. frameio/types/date_definition_params_field_configuration_display_format.py +7 -0
  137. frameio/types/date_definition_params_field_configuration_time_format.py +7 -0
  138. frameio/types/date_definition_with_includes.py +13 -0
  139. frameio/types/date_value.py +12 -0
  140. frameio/types/email.py +3 -0
  141. frameio/types/empty_json.py +5 -0
  142. frameio/types/field_definition.py +167 -0
  143. frameio/types/field_definition_include.py +5 -0
  144. frameio/types/field_definition_response.py +13 -0
  145. frameio/types/field_definition_with_includes.py +178 -0
  146. frameio/types/field_definitions_with_includes_response.py +27 -0
  147. frameio/types/field_value_common.py +29 -0
  148. frameio/types/file.py +60 -0
  149. frameio/types/file_copy_response.py +13 -0
  150. frameio/types/file_remote_upload_response.py +17 -0
  151. frameio/types/file_response.py +13 -0
  152. frameio/types/file_status.py +5 -0
  153. frameio/types/file_upload_status.py +41 -0
  154. frameio/types/file_upload_status_response.py +13 -0
  155. frameio/types/file_with_includes.py +25 -0
  156. frameio/types/file_with_includes_response.py +13 -0
  157. frameio/types/file_with_includes_status.py +5 -0
  158. frameio/types/file_with_media_links_include.py +19 -0
  159. frameio/types/file_with_upload_urls.py +16 -0
  160. frameio/types/file_with_upload_urls_response.py +13 -0
  161. frameio/types/folder.py +15 -0
  162. frameio/types/folder_copy_response.py +13 -0
  163. frameio/types/folder_response.py +13 -0
  164. frameio/types/folder_with_includes.py +63 -0
  165. frameio/types/folder_with_includes_response.py +13 -0
  166. frameio/types/folders_with_includes_response.py +23 -0
  167. frameio/types/forbidden.py +13 -0
  168. frameio/types/forbidden_errors_item.py +15 -0
  169. frameio/types/forbidden_errors_item_source.py +12 -0
  170. frameio/types/include.py +5 -0
  171. frameio/types/include_total_count.py +3 -0
  172. frameio/types/integer_value.py +12 -0
  173. frameio/types/json_error_response.py +13 -0
  174. frameio/types/json_error_response_errors_item.py +15 -0
  175. frameio/types/json_error_response_errors_item_source.py +12 -0
  176. frameio/types/links.py +22 -0
  177. frameio/types/long_text_definition.py +49 -0
  178. frameio/types/long_text_definition_field_configuration.py +10 -0
  179. frameio/types/long_text_definition_field_type.py +10 -0
  180. frameio/types/long_text_definition_params.py +15 -0
  181. frameio/types/long_text_definition_with_includes.py +13 -0
  182. frameio/types/media_link_common.py +17 -0
  183. frameio/types/media_links_collection.py +24 -0
  184. frameio/types/metadata_field.py +149 -0
  185. frameio/types/metadata_response.py +13 -0
  186. frameio/types/metadata_with_definition.py +21 -0
  187. frameio/types/multi_select_value.py +14 -0
  188. frameio/types/multi_user_value.py +20 -0
  189. frameio/types/multi_user_value_member_options_type.py +5 -0
  190. frameio/types/no_content.py +3 -0
  191. frameio/types/not_found.py +13 -0
  192. frameio/types/not_found_errors_item.py +15 -0
  193. frameio/types/not_found_errors_item_source.py +12 -0
  194. frameio/types/number_definition.py +43 -0
  195. frameio/types/number_definition_field_configuration.py +21 -0
  196. frameio/types/number_definition_field_configuration_number_format.py +7 -0
  197. frameio/types/number_definition_params.py +17 -0
  198. frameio/types/number_definition_params_field_configuration.py +23 -0
  199. frameio/types/number_definition_params_field_configuration_number_format.py +7 -0
  200. frameio/types/number_definition_with_includes.py +13 -0
  201. frameio/types/number_value.py +12 -0
  202. frameio/types/original_media_link.py +16 -0
  203. frameio/types/profile.py +34 -0
  204. frameio/types/profile_response.py +17 -0
  205. frameio/types/project.py +66 -0
  206. frameio/types/project_include.py +5 -0
  207. frameio/types/project_response.py +17 -0
  208. frameio/types/project_status.py +5 -0
  209. frameio/types/project_with_includes.py +18 -0
  210. frameio/types/project_with_includes_response.py +17 -0
  211. frameio/types/projects_with_includes_response.py +27 -0
  212. frameio/types/rating_definition.py +43 -0
  213. frameio/types/rating_definition_field_configuration.py +22 -0
  214. frameio/types/rating_definition_field_configuration_style.py +5 -0
  215. frameio/types/rating_definition_params.py +17 -0
  216. frameio/types/rating_definition_params_field_configuration.py +22 -0
  217. frameio/types/rating_definition_params_field_configuration_style.py +5 -0
  218. frameio/types/rating_definition_with_includes.py +13 -0
  219. frameio/types/remove_asset_response.py +13 -0
  220. frameio/types/remove_asset_response_data.py +15 -0
  221. frameio/types/rendition_media_link.py +19 -0
  222. frameio/types/request_after_opaque_cursor.py +5 -0
  223. frameio/types/request_page_size.py +3 -0
  224. frameio/types/select_definition.py +43 -0
  225. frameio/types/select_definition_field_configuration.py +18 -0
  226. frameio/types/select_definition_field_configuration_options_item.py +22 -0
  227. frameio/types/select_definition_params.py +17 -0
  228. frameio/types/select_definition_params_field_configuration.py +20 -0
  229. frameio/types/select_definition_params_field_configuration_options_item.py +20 -0
  230. frameio/types/select_definition_with_includes.py +13 -0
  231. frameio/types/select_multi_definition.py +49 -0
  232. frameio/types/select_multi_definition_field_configuration.py +18 -0
  233. frameio/types/select_multi_definition_field_configuration_options_item.py +22 -0
  234. frameio/types/select_multi_definition_field_type.py +10 -0
  235. frameio/types/select_multi_definition_params.py +17 -0
  236. frameio/types/select_multi_definition_params_field_configuration.py +20 -0
  237. frameio/types/select_multi_definition_params_field_configuration_options_item.py +20 -0
  238. frameio/types/select_multi_definition_with_includes.py +13 -0
  239. frameio/types/select_option.py +20 -0
  240. frameio/types/select_value.py +14 -0
  241. frameio/types/share.py +66 -0
  242. frameio/types/share_access.py +5 -0
  243. frameio/types/share_response.py +13 -0
  244. frameio/types/share_reviewers_response.py +27 -0
  245. frameio/types/shares_response.py +27 -0
  246. frameio/types/single_user_value.py +20 -0
  247. frameio/types/single_user_value_member_options_type.py +5 -0
  248. frameio/types/text_definition.py +49 -0
  249. frameio/types/text_definition_field_configuration.py +10 -0
  250. frameio/types/text_definition_field_type.py +10 -0
  251. frameio/types/text_definition_params.py +15 -0
  252. frameio/types/text_definition_with_includes.py +13 -0
  253. frameio/types/text_value.py +12 -0
  254. frameio/types/time_stamp.py +5 -0
  255. frameio/types/toggle_definition.py +43 -0
  256. frameio/types/toggle_definition_field_configuration.py +15 -0
  257. frameio/types/toggle_definition_params.py +17 -0
  258. frameio/types/toggle_definition_params_field_configuration.py +15 -0
  259. frameio/types/toggle_definition_with_includes.py +13 -0
  260. frameio/types/too_many_requests.py +13 -0
  261. frameio/types/too_many_requests_errors_item.py +15 -0
  262. frameio/types/too_many_requests_errors_item_source.py +12 -0
  263. frameio/types/unauthorized.py +13 -0
  264. frameio/types/unauthorized_errors_item.py +15 -0
  265. frameio/types/unauthorized_errors_item_source.py +12 -0
  266. frameio/types/unprocessable_entity.py +13 -0
  267. frameio/types/unprocessable_entity_errors_item.py +15 -0
  268. frameio/types/unprocessable_entity_errors_item_source.py +12 -0
  269. frameio/types/update_date_definition_params.py +17 -0
  270. frameio/types/update_date_definition_params_field_configuration.py +25 -0
  271. frameio/types/update_date_definition_params_field_configuration_display_format.py +7 -0
  272. frameio/types/update_date_definition_params_field_configuration_time_format.py +7 -0
  273. frameio/types/update_long_text_definition_params.py +15 -0
  274. frameio/types/update_number_definition_params.py +17 -0
  275. frameio/types/update_number_definition_params_field_configuration.py +25 -0
  276. frameio/types/update_number_definition_params_field_configuration_number_format.py +7 -0
  277. frameio/types/update_rating_definition_params.py +17 -0
  278. frameio/types/update_rating_definition_params_field_configuration.py +24 -0
  279. frameio/types/update_rating_definition_params_field_configuration_style.py +7 -0
  280. frameio/types/update_select_definition_params.py +17 -0
  281. frameio/types/update_select_definition_params_field_configuration.py +20 -0
  282. frameio/types/update_select_definition_params_field_configuration_options_item.py +20 -0
  283. frameio/types/update_select_multi_definition_params.py +19 -0
  284. frameio/types/update_select_multi_definition_params_field_configuration.py +20 -0
  285. frameio/types/update_select_multi_definition_params_field_configuration_options_item.py +20 -0
  286. frameio/types/update_text_definition_params.py +15 -0
  287. frameio/types/update_toggle_definition_params.py +17 -0
  288. frameio/types/update_toggle_definition_params_field_configuration.py +15 -0
  289. frameio/types/update_user_multi_definition_params.py +17 -0
  290. frameio/types/update_user_multi_definition_params_field_configuration.py +25 -0
  291. frameio/types/update_user_multi_definition_params_field_configuration_custom_members_item.py +20 -0
  292. frameio/types/update_user_multi_definition_params_field_configuration_custom_members_item_type.py +7 -0
  293. frameio/types/update_user_multi_definition_params_field_configuration_member_options_type.py +7 -0
  294. frameio/types/update_user_roles_params.py +17 -0
  295. frameio/types/update_user_roles_params_data.py +13 -0
  296. frameio/types/update_user_roles_params_data_role.py +7 -0
  297. frameio/types/update_user_roles_response.py +13 -0
  298. frameio/types/update_user_roles_response_data.py +13 -0
  299. frameio/types/update_user_roles_response_data_role.py +7 -0
  300. frameio/types/update_user_single_definition_params.py +17 -0
  301. frameio/types/update_user_single_definition_params_field_configuration.py +25 -0
  302. frameio/types/update_user_single_definition_params_field_configuration_custom_members_item.py +20 -0
  303. frameio/types/update_user_single_definition_params_field_configuration_custom_members_item_type.py +7 -0
  304. frameio/types/update_user_single_definition_params_field_configuration_member_options_type.py +7 -0
  305. frameio/types/upload_url.py +20 -0
  306. frameio/types/user.py +44 -0
  307. frameio/types/user_multi_definition.py +49 -0
  308. frameio/types/user_multi_definition_field_configuration.py +23 -0
  309. frameio/types/user_multi_definition_field_configuration_custom_members_item.py +20 -0
  310. frameio/types/user_multi_definition_field_configuration_custom_members_item_type.py +7 -0
  311. frameio/types/user_multi_definition_field_configuration_member_options_type.py +7 -0
  312. frameio/types/user_multi_definition_field_type.py +10 -0
  313. frameio/types/user_multi_definition_params.py +17 -0
  314. frameio/types/user_multi_definition_params_field_configuration.py +23 -0
  315. frameio/types/user_multi_definition_params_field_configuration_custom_members_item.py +20 -0
  316. frameio/types/user_multi_definition_params_field_configuration_custom_members_item_type.py +7 -0
  317. frameio/types/user_multi_definition_params_field_configuration_member_options_type.py +7 -0
  318. frameio/types/user_multi_definition_with_includes.py +13 -0
  319. frameio/types/user_role.py +19 -0
  320. frameio/types/user_role_role.py +7 -0
  321. frameio/types/user_roles_response.py +27 -0
  322. frameio/types/user_single_definition.py +49 -0
  323. frameio/types/user_single_definition_field_configuration.py +23 -0
  324. frameio/types/user_single_definition_field_configuration_custom_members_item.py +20 -0
  325. frameio/types/user_single_definition_field_configuration_custom_members_item_type.py +7 -0
  326. frameio/types/user_single_definition_field_configuration_member_options_type.py +7 -0
  327. frameio/types/user_single_definition_field_type.py +10 -0
  328. frameio/types/user_single_definition_params.py +17 -0
  329. frameio/types/user_single_definition_params_field_configuration.py +23 -0
  330. frameio/types/user_single_definition_params_field_configuration_custom_members_item.py +20 -0
  331. frameio/types/user_single_definition_params_field_configuration_custom_members_item_type.py +7 -0
  332. frameio/types/user_single_definition_params_field_configuration_member_options_type.py +7 -0
  333. frameio/types/user_single_definition_with_includes.py +13 -0
  334. frameio/types/user_value.py +18 -0
  335. frameio/types/user_value_type.py +5 -0
  336. frameio/types/uuid_.py +3 -0
  337. frameio/types/version_stack.py +50 -0
  338. frameio/types/version_stack_copy_response.py +13 -0
  339. frameio/types/version_stack_response.py +13 -0
  340. frameio/types/version_stack_with_includes.py +60 -0
  341. frameio/types/version_stack_with_includes_response.py +13 -0
  342. frameio/types/version_stacks_with_includes_response.py +19 -0
  343. frameio/types/webhook.py +36 -0
  344. frameio/types/webhook_create_response.py +17 -0
  345. frameio/types/webhook_create_response_data.py +15 -0
  346. frameio/types/webhook_events.py +5 -0
  347. frameio/types/webhook_response.py +13 -0
  348. frameio/types/webhook_with_includes.py +13 -0
  349. frameio/types/webhook_with_includes_response.py +13 -0
  350. frameio/types/webhooks_with_includes_response.py +23 -0
  351. frameio/types/workspace.py +40 -0
  352. frameio/types/workspace_include.py +5 -0
  353. frameio/types/workspace_params.py +17 -0
  354. frameio/types/workspace_params_data.py +15 -0
  355. frameio/types/workspace_response.py +17 -0
  356. frameio/types/workspace_with_includes.py +13 -0
  357. frameio/types/workspace_with_includes_response.py +17 -0
  358. frameio/types/workspaces_with_includes_response.py +27 -0
  359. frameio/users/__init__.py +4 -0
  360. frameio/users/client.py +100 -0
  361. frameio/users/raw_client.py +234 -0
  362. frameio/version.py +3 -0
  363. frameio/version_stacks/__init__.py +49 -0
  364. frameio/version_stacks/client.py +818 -0
  365. frameio/version_stacks/raw_client.py +1614 -0
  366. frameio/version_stacks/types/__init__.py +47 -0
  367. frameio/version_stacks/types/version_stack_copy_params_data.py +15 -0
  368. frameio/version_stacks/types/version_stack_create_params_data.py +19 -0
  369. frameio/version_stacks/types/version_stack_move_params_data.py +15 -0
  370. frameio/version_stacks/types/version_stacks_show_request_include.py +19 -0
  371. frameio/webhooks/__init__.py +34 -0
  372. frameio/webhooks/client.py +793 -0
  373. frameio/webhooks/raw_client.py +1347 -0
  374. frameio/webhooks/types/__init__.py +38 -0
  375. frameio/webhooks/types/webhook_create_params_data.py +18 -0
  376. frameio/webhooks/types/webhook_update_params_data.py +23 -0
  377. frameio/workspace_permissions/__init__.py +4 -0
  378. frameio/workspace_permissions/client.py +430 -0
  379. frameio/workspace_permissions/raw_client.py +824 -0
  380. frameio/workspaces/__init__.py +4 -0
  381. frameio/workspaces/client.py +563 -0
  382. frameio/workspaces/raw_client.py +1259 -0
  383. frameio-0.0.28.dist-info/METADATA +259 -0
  384. frameio-0.0.28.dist-info/RECORD +385 -0
  385. frameio-0.0.28.dist-info/WHEEL +4 -0
@@ -0,0 +1,4 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
@@ -0,0 +1,193 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from ..core.pagination import AsyncPager, SyncPager
7
+ from ..core.request_options import RequestOptions
8
+ from ..types.account_user_role import AccountUserRole
9
+ from ..types.account_user_roles_response import AccountUserRolesResponse
10
+ from ..types.include_total_count import IncludeTotalCount
11
+ from ..types.request_after_opaque_cursor import RequestAfterOpaqueCursor
12
+ from ..types.request_page_size import RequestPageSize
13
+ from ..types.uuid_ import Uuid
14
+ from .raw_client import AsyncRawAccountPermissionsClient, RawAccountPermissionsClient
15
+
16
+
17
+ class AccountPermissionsClient:
18
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
19
+ self._raw_client = RawAccountPermissionsClient(client_wrapper=client_wrapper)
20
+
21
+ @property
22
+ def with_raw_response(self) -> RawAccountPermissionsClient:
23
+ """
24
+ Retrieves a raw implementation of this client that returns raw responses.
25
+
26
+ Returns
27
+ -------
28
+ RawAccountPermissionsClient
29
+ """
30
+ return self._raw_client
31
+
32
+ def index(
33
+ self,
34
+ account_id: Uuid,
35
+ *,
36
+ include_deactivated: typing.Optional[bool] = None,
37
+ after: typing.Optional[RequestAfterOpaqueCursor] = None,
38
+ page_size: typing.Optional[RequestPageSize] = None,
39
+ include_total_count: typing.Optional[IncludeTotalCount] = None,
40
+ request_options: typing.Optional[RequestOptions] = None,
41
+ ) -> SyncPager[AccountUserRole, AccountUserRolesResponse]:
42
+ """
43
+ List user roles for a given account. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
44
+
45
+ Parameters
46
+ ----------
47
+ account_id : Uuid
48
+
49
+
50
+ include_deactivated : typing.Optional[bool]
51
+ Supports including deactivated users in the response. Default is false.
52
+
53
+ after : typing.Optional[RequestAfterOpaqueCursor]
54
+ Opaque Cursor query param for requests returning paginated results.
55
+ <br/>
56
+ NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
57
+
58
+ page_size : typing.Optional[RequestPageSize]
59
+
60
+
61
+ include_total_count : typing.Optional[IncludeTotalCount]
62
+
63
+
64
+ request_options : typing.Optional[RequestOptions]
65
+ Request-specific configuration.
66
+
67
+ Returns
68
+ -------
69
+ SyncPager[AccountUserRole, AccountUserRolesResponse]
70
+ OK
71
+
72
+ Examples
73
+ --------
74
+ from frameio import Frameio
75
+
76
+ client = Frameio(
77
+ token="YOUR_TOKEN",
78
+ )
79
+ response = client.account_permissions.index(
80
+ account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
81
+ include_deactivated=True,
82
+ after="<opaque_cursor>",
83
+ page_size=10,
84
+ include_total_count=False,
85
+ )
86
+ for item in response:
87
+ yield item
88
+ # alternatively, you can paginate page-by-page
89
+ for page in response.iter_pages():
90
+ yield page
91
+ """
92
+ return self._raw_client.index(
93
+ account_id,
94
+ include_deactivated=include_deactivated,
95
+ after=after,
96
+ page_size=page_size,
97
+ include_total_count=include_total_count,
98
+ request_options=request_options,
99
+ )
100
+
101
+
102
+ class AsyncAccountPermissionsClient:
103
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
104
+ self._raw_client = AsyncRawAccountPermissionsClient(client_wrapper=client_wrapper)
105
+
106
+ @property
107
+ def with_raw_response(self) -> AsyncRawAccountPermissionsClient:
108
+ """
109
+ Retrieves a raw implementation of this client that returns raw responses.
110
+
111
+ Returns
112
+ -------
113
+ AsyncRawAccountPermissionsClient
114
+ """
115
+ return self._raw_client
116
+
117
+ async def index(
118
+ self,
119
+ account_id: Uuid,
120
+ *,
121
+ include_deactivated: typing.Optional[bool] = None,
122
+ after: typing.Optional[RequestAfterOpaqueCursor] = None,
123
+ page_size: typing.Optional[RequestPageSize] = None,
124
+ include_total_count: typing.Optional[IncludeTotalCount] = None,
125
+ request_options: typing.Optional[RequestOptions] = None,
126
+ ) -> AsyncPager[AccountUserRole, AccountUserRolesResponse]:
127
+ """
128
+ List user roles for a given account. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
129
+
130
+ Parameters
131
+ ----------
132
+ account_id : Uuid
133
+
134
+
135
+ include_deactivated : typing.Optional[bool]
136
+ Supports including deactivated users in the response. Default is false.
137
+
138
+ after : typing.Optional[RequestAfterOpaqueCursor]
139
+ Opaque Cursor query param for requests returning paginated results.
140
+ <br/>
141
+ NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
142
+
143
+ page_size : typing.Optional[RequestPageSize]
144
+
145
+
146
+ include_total_count : typing.Optional[IncludeTotalCount]
147
+
148
+
149
+ request_options : typing.Optional[RequestOptions]
150
+ Request-specific configuration.
151
+
152
+ Returns
153
+ -------
154
+ AsyncPager[AccountUserRole, AccountUserRolesResponse]
155
+ OK
156
+
157
+ Examples
158
+ --------
159
+ import asyncio
160
+
161
+ from frameio import AsyncFrameio
162
+
163
+ client = AsyncFrameio(
164
+ token="YOUR_TOKEN",
165
+ )
166
+
167
+
168
+ async def main() -> None:
169
+ response = await client.account_permissions.index(
170
+ account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
171
+ include_deactivated=True,
172
+ after="<opaque_cursor>",
173
+ page_size=10,
174
+ include_total_count=False,
175
+ )
176
+ async for item in response:
177
+ yield item
178
+
179
+ # alternatively, you can paginate page-by-page
180
+ async for page in response.iter_pages():
181
+ yield page
182
+
183
+
184
+ asyncio.run(main())
185
+ """
186
+ return await self._raw_client.index(
187
+ account_id,
188
+ include_deactivated=include_deactivated,
189
+ after=after,
190
+ page_size=page_size,
191
+ include_total_count=include_total_count,
192
+ request_options=request_options,
193
+ )
@@ -0,0 +1,333 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from json.decoder import JSONDecodeError
5
+
6
+ from ..core.api_error import ApiError
7
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
+ from ..core.jsonable_encoder import jsonable_encoder
9
+ from ..core.pagination import AsyncPager, SyncPager
10
+ from ..core.request_options import RequestOptions
11
+ from ..core.unchecked_base_model import construct_type
12
+ from ..errors.bad_request_error import BadRequestError
13
+ from ..errors.forbidden_error import ForbiddenError
14
+ from ..errors.not_found_error import NotFoundError
15
+ from ..errors.too_many_requests_error import TooManyRequestsError
16
+ from ..errors.unauthorized_error import UnauthorizedError
17
+ from ..errors.unprocessable_entity_error import UnprocessableEntityError
18
+ from ..types.account_user_role import AccountUserRole
19
+ from ..types.account_user_roles_response import AccountUserRolesResponse
20
+ from ..types.bad_request import BadRequest
21
+ from ..types.forbidden import Forbidden
22
+ from ..types.include_total_count import IncludeTotalCount
23
+ from ..types.not_found import NotFound
24
+ from ..types.request_after_opaque_cursor import RequestAfterOpaqueCursor
25
+ from ..types.request_page_size import RequestPageSize
26
+ from ..types.too_many_requests import TooManyRequests
27
+ from ..types.unauthorized import Unauthorized
28
+ from ..types.uuid_ import Uuid
29
+
30
+
31
+ class RawAccountPermissionsClient:
32
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
33
+ self._client_wrapper = client_wrapper
34
+
35
+ def index(
36
+ self,
37
+ account_id: Uuid,
38
+ *,
39
+ include_deactivated: typing.Optional[bool] = None,
40
+ after: typing.Optional[RequestAfterOpaqueCursor] = None,
41
+ page_size: typing.Optional[RequestPageSize] = None,
42
+ include_total_count: typing.Optional[IncludeTotalCount] = None,
43
+ request_options: typing.Optional[RequestOptions] = None,
44
+ ) -> SyncPager[AccountUserRole, AccountUserRolesResponse]:
45
+ """
46
+ List user roles for a given account. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
47
+
48
+ Parameters
49
+ ----------
50
+ account_id : Uuid
51
+
52
+
53
+ include_deactivated : typing.Optional[bool]
54
+ Supports including deactivated users in the response. Default is false.
55
+
56
+ after : typing.Optional[RequestAfterOpaqueCursor]
57
+ Opaque Cursor query param for requests returning paginated results.
58
+ <br/>
59
+ NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
60
+
61
+ page_size : typing.Optional[RequestPageSize]
62
+
63
+
64
+ include_total_count : typing.Optional[IncludeTotalCount]
65
+
66
+
67
+ request_options : typing.Optional[RequestOptions]
68
+ Request-specific configuration.
69
+
70
+ Returns
71
+ -------
72
+ SyncPager[AccountUserRole, AccountUserRolesResponse]
73
+ OK
74
+ """
75
+ _response = self._client_wrapper.httpx_client.request(
76
+ f"v4/accounts/{jsonable_encoder(account_id)}/users",
77
+ method="GET",
78
+ params={
79
+ "include_deactivated": include_deactivated,
80
+ "after": after,
81
+ "page_size": page_size,
82
+ "include_total_count": include_total_count,
83
+ },
84
+ request_options=request_options,
85
+ )
86
+ try:
87
+ if 200 <= _response.status_code < 300:
88
+ _parsed_response = typing.cast(
89
+ AccountUserRolesResponse,
90
+ construct_type(
91
+ type_=AccountUserRolesResponse, # type: ignore
92
+ object_=_response.json(),
93
+ ),
94
+ )
95
+ _items = _parsed_response.data
96
+ _has_next = False
97
+ _get_next = None
98
+ if _parsed_response.links is not None:
99
+ _parsed_next = _parsed_response.links.next
100
+ _has_next = _parsed_next is not None and _parsed_next != ""
101
+ _get_next = lambda: self.index(
102
+ account_id,
103
+ include_deactivated=include_deactivated,
104
+ after=_parsed_next,
105
+ page_size=page_size,
106
+ include_total_count=include_total_count,
107
+ request_options=request_options,
108
+ )
109
+ return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
110
+ if _response.status_code == 400:
111
+ raise BadRequestError(
112
+ headers=dict(_response.headers),
113
+ body=typing.cast(
114
+ BadRequest,
115
+ construct_type(
116
+ type_=BadRequest, # type: ignore
117
+ object_=_response.json(),
118
+ ),
119
+ ),
120
+ )
121
+ if _response.status_code == 401:
122
+ raise UnauthorizedError(
123
+ headers=dict(_response.headers),
124
+ body=typing.cast(
125
+ Unauthorized,
126
+ construct_type(
127
+ type_=Unauthorized, # type: ignore
128
+ object_=_response.json(),
129
+ ),
130
+ ),
131
+ )
132
+ if _response.status_code == 403:
133
+ raise ForbiddenError(
134
+ headers=dict(_response.headers),
135
+ body=typing.cast(
136
+ Forbidden,
137
+ construct_type(
138
+ type_=Forbidden, # type: ignore
139
+ object_=_response.json(),
140
+ ),
141
+ ),
142
+ )
143
+ if _response.status_code == 404:
144
+ raise NotFoundError(
145
+ headers=dict(_response.headers),
146
+ body=typing.cast(
147
+ NotFound,
148
+ construct_type(
149
+ type_=NotFound, # type: ignore
150
+ object_=_response.json(),
151
+ ),
152
+ ),
153
+ )
154
+ if _response.status_code == 422:
155
+ raise UnprocessableEntityError(
156
+ headers=dict(_response.headers),
157
+ body=typing.cast(
158
+ typing.Any,
159
+ construct_type(
160
+ type_=typing.Any, # type: ignore
161
+ object_=_response.json(),
162
+ ),
163
+ ),
164
+ )
165
+ if _response.status_code == 429:
166
+ raise TooManyRequestsError(
167
+ headers=dict(_response.headers),
168
+ body=typing.cast(
169
+ TooManyRequests,
170
+ construct_type(
171
+ type_=TooManyRequests, # type: ignore
172
+ object_=_response.json(),
173
+ ),
174
+ ),
175
+ )
176
+ _response_json = _response.json()
177
+ except JSONDecodeError:
178
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
179
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
180
+
181
+
182
+ class AsyncRawAccountPermissionsClient:
183
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
184
+ self._client_wrapper = client_wrapper
185
+
186
+ async def index(
187
+ self,
188
+ account_id: Uuid,
189
+ *,
190
+ include_deactivated: typing.Optional[bool] = None,
191
+ after: typing.Optional[RequestAfterOpaqueCursor] = None,
192
+ page_size: typing.Optional[RequestPageSize] = None,
193
+ include_total_count: typing.Optional[IncludeTotalCount] = None,
194
+ request_options: typing.Optional[RequestOptions] = None,
195
+ ) -> AsyncPager[AccountUserRole, AccountUserRolesResponse]:
196
+ """
197
+ List user roles for a given account. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
198
+
199
+ Parameters
200
+ ----------
201
+ account_id : Uuid
202
+
203
+
204
+ include_deactivated : typing.Optional[bool]
205
+ Supports including deactivated users in the response. Default is false.
206
+
207
+ after : typing.Optional[RequestAfterOpaqueCursor]
208
+ Opaque Cursor query param for requests returning paginated results.
209
+ <br/>
210
+ NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
211
+
212
+ page_size : typing.Optional[RequestPageSize]
213
+
214
+
215
+ include_total_count : typing.Optional[IncludeTotalCount]
216
+
217
+
218
+ request_options : typing.Optional[RequestOptions]
219
+ Request-specific configuration.
220
+
221
+ Returns
222
+ -------
223
+ AsyncPager[AccountUserRole, AccountUserRolesResponse]
224
+ OK
225
+ """
226
+ _response = await self._client_wrapper.httpx_client.request(
227
+ f"v4/accounts/{jsonable_encoder(account_id)}/users",
228
+ method="GET",
229
+ params={
230
+ "include_deactivated": include_deactivated,
231
+ "after": after,
232
+ "page_size": page_size,
233
+ "include_total_count": include_total_count,
234
+ },
235
+ request_options=request_options,
236
+ )
237
+ try:
238
+ if 200 <= _response.status_code < 300:
239
+ _parsed_response = typing.cast(
240
+ AccountUserRolesResponse,
241
+ construct_type(
242
+ type_=AccountUserRolesResponse, # type: ignore
243
+ object_=_response.json(),
244
+ ),
245
+ )
246
+ _items = _parsed_response.data
247
+ _has_next = False
248
+ _get_next = None
249
+ if _parsed_response.links is not None:
250
+ _parsed_next = _parsed_response.links.next
251
+ _has_next = _parsed_next is not None and _parsed_next != ""
252
+
253
+ async def _get_next():
254
+ return await self.index(
255
+ account_id,
256
+ include_deactivated=include_deactivated,
257
+ after=_parsed_next,
258
+ page_size=page_size,
259
+ include_total_count=include_total_count,
260
+ request_options=request_options,
261
+ )
262
+
263
+ return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response)
264
+ if _response.status_code == 400:
265
+ raise BadRequestError(
266
+ headers=dict(_response.headers),
267
+ body=typing.cast(
268
+ BadRequest,
269
+ construct_type(
270
+ type_=BadRequest, # type: ignore
271
+ object_=_response.json(),
272
+ ),
273
+ ),
274
+ )
275
+ if _response.status_code == 401:
276
+ raise UnauthorizedError(
277
+ headers=dict(_response.headers),
278
+ body=typing.cast(
279
+ Unauthorized,
280
+ construct_type(
281
+ type_=Unauthorized, # type: ignore
282
+ object_=_response.json(),
283
+ ),
284
+ ),
285
+ )
286
+ if _response.status_code == 403:
287
+ raise ForbiddenError(
288
+ headers=dict(_response.headers),
289
+ body=typing.cast(
290
+ Forbidden,
291
+ construct_type(
292
+ type_=Forbidden, # type: ignore
293
+ object_=_response.json(),
294
+ ),
295
+ ),
296
+ )
297
+ if _response.status_code == 404:
298
+ raise NotFoundError(
299
+ headers=dict(_response.headers),
300
+ body=typing.cast(
301
+ NotFound,
302
+ construct_type(
303
+ type_=NotFound, # type: ignore
304
+ object_=_response.json(),
305
+ ),
306
+ ),
307
+ )
308
+ if _response.status_code == 422:
309
+ raise UnprocessableEntityError(
310
+ headers=dict(_response.headers),
311
+ body=typing.cast(
312
+ typing.Any,
313
+ construct_type(
314
+ type_=typing.Any, # type: ignore
315
+ object_=_response.json(),
316
+ ),
317
+ ),
318
+ )
319
+ if _response.status_code == 429:
320
+ raise TooManyRequestsError(
321
+ headers=dict(_response.headers),
322
+ body=typing.cast(
323
+ TooManyRequests,
324
+ construct_type(
325
+ type_=TooManyRequests, # type: ignore
326
+ object_=_response.json(),
327
+ ),
328
+ ),
329
+ )
330
+ _response_json = _response.json()
331
+ except JSONDecodeError:
332
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
333
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
@@ -0,0 +1,4 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
@@ -0,0 +1,162 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from ..core.pagination import AsyncPager, SyncPager
7
+ from ..core.request_options import RequestOptions
8
+ from ..types.account import Account
9
+ from ..types.accounts_response import AccountsResponse
10
+ from ..types.include_total_count import IncludeTotalCount
11
+ from ..types.request_after_opaque_cursor import RequestAfterOpaqueCursor
12
+ from ..types.request_page_size import RequestPageSize
13
+ from .raw_client import AsyncRawAccountsClient, RawAccountsClient
14
+
15
+
16
+ class AccountsClient:
17
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
18
+ self._raw_client = RawAccountsClient(client_wrapper=client_wrapper)
19
+
20
+ @property
21
+ def with_raw_response(self) -> RawAccountsClient:
22
+ """
23
+ Retrieves a raw implementation of this client that returns raw responses.
24
+
25
+ Returns
26
+ -------
27
+ RawAccountsClient
28
+ """
29
+ return self._raw_client
30
+
31
+ def index(
32
+ self,
33
+ *,
34
+ after: typing.Optional[RequestAfterOpaqueCursor] = None,
35
+ page_size: typing.Optional[RequestPageSize] = None,
36
+ include_total_count: typing.Optional[IncludeTotalCount] = None,
37
+ request_options: typing.Optional[RequestOptions] = None,
38
+ ) -> SyncPager[Account, AccountsResponse]:
39
+ """
40
+ List accounts for the current user. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
41
+
42
+ Parameters
43
+ ----------
44
+ after : typing.Optional[RequestAfterOpaqueCursor]
45
+ Opaque Cursor query param for requests returning paginated results.
46
+ <br/>
47
+ NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
48
+
49
+ page_size : typing.Optional[RequestPageSize]
50
+
51
+
52
+ include_total_count : typing.Optional[IncludeTotalCount]
53
+
54
+
55
+ request_options : typing.Optional[RequestOptions]
56
+ Request-specific configuration.
57
+
58
+ Returns
59
+ -------
60
+ SyncPager[Account, AccountsResponse]
61
+ OK
62
+
63
+ Examples
64
+ --------
65
+ from frameio import Frameio
66
+
67
+ client = Frameio(
68
+ token="YOUR_TOKEN",
69
+ )
70
+ response = client.accounts.index(
71
+ after="<opaque_cursor>",
72
+ page_size=10,
73
+ include_total_count=False,
74
+ )
75
+ for item in response:
76
+ yield item
77
+ # alternatively, you can paginate page-by-page
78
+ for page in response.iter_pages():
79
+ yield page
80
+ """
81
+ return self._raw_client.index(
82
+ after=after, page_size=page_size, include_total_count=include_total_count, request_options=request_options
83
+ )
84
+
85
+
86
+ class AsyncAccountsClient:
87
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
88
+ self._raw_client = AsyncRawAccountsClient(client_wrapper=client_wrapper)
89
+
90
+ @property
91
+ def with_raw_response(self) -> AsyncRawAccountsClient:
92
+ """
93
+ Retrieves a raw implementation of this client that returns raw responses.
94
+
95
+ Returns
96
+ -------
97
+ AsyncRawAccountsClient
98
+ """
99
+ return self._raw_client
100
+
101
+ async def index(
102
+ self,
103
+ *,
104
+ after: typing.Optional[RequestAfterOpaqueCursor] = None,
105
+ page_size: typing.Optional[RequestPageSize] = None,
106
+ include_total_count: typing.Optional[IncludeTotalCount] = None,
107
+ request_options: typing.Optional[RequestOptions] = None,
108
+ ) -> AsyncPager[Account, AccountsResponse]:
109
+ """
110
+ List accounts for the current user. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
111
+
112
+ Parameters
113
+ ----------
114
+ after : typing.Optional[RequestAfterOpaqueCursor]
115
+ Opaque Cursor query param for requests returning paginated results.
116
+ <br/>
117
+ NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
118
+
119
+ page_size : typing.Optional[RequestPageSize]
120
+
121
+
122
+ include_total_count : typing.Optional[IncludeTotalCount]
123
+
124
+
125
+ request_options : typing.Optional[RequestOptions]
126
+ Request-specific configuration.
127
+
128
+ Returns
129
+ -------
130
+ AsyncPager[Account, AccountsResponse]
131
+ OK
132
+
133
+ Examples
134
+ --------
135
+ import asyncio
136
+
137
+ from frameio import AsyncFrameio
138
+
139
+ client = AsyncFrameio(
140
+ token="YOUR_TOKEN",
141
+ )
142
+
143
+
144
+ async def main() -> None:
145
+ response = await client.accounts.index(
146
+ after="<opaque_cursor>",
147
+ page_size=10,
148
+ include_total_count=False,
149
+ )
150
+ async for item in response:
151
+ yield item
152
+
153
+ # alternatively, you can paginate page-by-page
154
+ async for page in response.iter_pages():
155
+ yield page
156
+
157
+
158
+ asyncio.run(main())
159
+ """
160
+ return await self._raw_client.index(
161
+ after=after, page_size=page_size, include_total_count=include_total_count, request_options=request_options
162
+ )