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,426 @@
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.include_total_count import IncludeTotalCount
9
+ from ..types.request_after_opaque_cursor import RequestAfterOpaqueCursor
10
+ from ..types.request_page_size import RequestPageSize
11
+ from ..types.update_user_roles_params_data import UpdateUserRolesParamsData
12
+ from ..types.update_user_roles_response import UpdateUserRolesResponse
13
+ from ..types.user_role import UserRole
14
+ from ..types.user_roles_response import UserRolesResponse
15
+ from ..types.uuid_ import Uuid
16
+ from .raw_client import AsyncRawProjectPermissionsClient, RawProjectPermissionsClient
17
+
18
+ # this is used as the default value for optional parameters
19
+ OMIT = typing.cast(typing.Any, ...)
20
+
21
+
22
+ class ProjectPermissionsClient:
23
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
24
+ self._raw_client = RawProjectPermissionsClient(client_wrapper=client_wrapper)
25
+
26
+ @property
27
+ def with_raw_response(self) -> RawProjectPermissionsClient:
28
+ """
29
+ Retrieves a raw implementation of this client that returns raw responses.
30
+
31
+ Returns
32
+ -------
33
+ RawProjectPermissionsClient
34
+ """
35
+ return self._raw_client
36
+
37
+ def index(
38
+ self,
39
+ account_id: Uuid,
40
+ project_id: Uuid,
41
+ *,
42
+ include_deactivated: typing.Optional[bool] = None,
43
+ after: typing.Optional[RequestAfterOpaqueCursor] = None,
44
+ page_size: typing.Optional[RequestPageSize] = None,
45
+ include_total_count: typing.Optional[IncludeTotalCount] = None,
46
+ request_options: typing.Optional[RequestOptions] = None,
47
+ ) -> SyncPager[UserRole, UserRolesResponse]:
48
+ """
49
+ List user roles for a given project. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
50
+
51
+ Parameters
52
+ ----------
53
+ account_id : Uuid
54
+
55
+
56
+ project_id : Uuid
57
+
58
+
59
+ include_deactivated : typing.Optional[bool]
60
+ Supports including deactivated users in the response. Default is false.
61
+
62
+ after : typing.Optional[RequestAfterOpaqueCursor]
63
+ Opaque Cursor query param for requests returning paginated results.
64
+ <br/>
65
+ NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
66
+
67
+ page_size : typing.Optional[RequestPageSize]
68
+
69
+
70
+ include_total_count : typing.Optional[IncludeTotalCount]
71
+
72
+
73
+ request_options : typing.Optional[RequestOptions]
74
+ Request-specific configuration.
75
+
76
+ Returns
77
+ -------
78
+ SyncPager[UserRole, UserRolesResponse]
79
+ OK
80
+
81
+ Examples
82
+ --------
83
+ from frameio import Frameio
84
+
85
+ client = Frameio(
86
+ token="YOUR_TOKEN",
87
+ )
88
+ response = client.project_permissions.index(
89
+ account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
90
+ project_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
91
+ include_deactivated=True,
92
+ after="<opaque_cursor>",
93
+ page_size=10,
94
+ include_total_count=False,
95
+ )
96
+ for item in response:
97
+ yield item
98
+ # alternatively, you can paginate page-by-page
99
+ for page in response.iter_pages():
100
+ yield page
101
+ """
102
+ return self._raw_client.index(
103
+ account_id,
104
+ project_id,
105
+ include_deactivated=include_deactivated,
106
+ after=after,
107
+ page_size=page_size,
108
+ include_total_count=include_total_count,
109
+ request_options=request_options,
110
+ )
111
+
112
+ def delete(
113
+ self,
114
+ account_id: Uuid,
115
+ project_id: Uuid,
116
+ user_id: Uuid,
117
+ *,
118
+ request_options: typing.Optional[RequestOptions] = None,
119
+ ) -> None:
120
+ """
121
+ Remove a user from a given project. <br>Rate Limits: 60 calls per 1.00 minute(s) per account_user
122
+
123
+ Parameters
124
+ ----------
125
+ account_id : Uuid
126
+
127
+
128
+ project_id : Uuid
129
+
130
+
131
+ user_id : Uuid
132
+
133
+
134
+ request_options : typing.Optional[RequestOptions]
135
+ Request-specific configuration.
136
+
137
+ Returns
138
+ -------
139
+ None
140
+
141
+ Examples
142
+ --------
143
+ from frameio import Frameio
144
+
145
+ client = Frameio(
146
+ token="YOUR_TOKEN",
147
+ )
148
+ client.project_permissions.delete(
149
+ account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
150
+ project_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
151
+ user_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
152
+ )
153
+ """
154
+ _response = self._raw_client.delete(account_id, project_id, user_id, request_options=request_options)
155
+ return _response.data
156
+
157
+ def project_user_roles_update(
158
+ self,
159
+ account_id: Uuid,
160
+ project_id: Uuid,
161
+ user_id: Uuid,
162
+ *,
163
+ data: UpdateUserRolesParamsData,
164
+ request_options: typing.Optional[RequestOptions] = None,
165
+ ) -> UpdateUserRolesResponse:
166
+ """
167
+ Update user roles for the given project if the user is already added to the project. If the user is
168
+ not added to the project, the user will be added with the given role. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user
169
+
170
+ Parameters
171
+ ----------
172
+ account_id : Uuid
173
+
174
+
175
+ project_id : Uuid
176
+
177
+
178
+ user_id : Uuid
179
+
180
+
181
+ data : UpdateUserRolesParamsData
182
+
183
+ request_options : typing.Optional[RequestOptions]
184
+ Request-specific configuration.
185
+
186
+ Returns
187
+ -------
188
+ UpdateUserRolesResponse
189
+ OK
190
+
191
+ Examples
192
+ --------
193
+ from frameio import Frameio, UpdateUserRolesParamsData
194
+
195
+ client = Frameio(
196
+ token="YOUR_TOKEN",
197
+ )
198
+ client.project_permissions.project_user_roles_update(
199
+ account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
200
+ project_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
201
+ user_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
202
+ data=UpdateUserRolesParamsData(
203
+ role="editor",
204
+ ),
205
+ )
206
+ """
207
+ _response = self._raw_client.project_user_roles_update(
208
+ account_id, project_id, user_id, data=data, request_options=request_options
209
+ )
210
+ return _response.data
211
+
212
+
213
+ class AsyncProjectPermissionsClient:
214
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
215
+ self._raw_client = AsyncRawProjectPermissionsClient(client_wrapper=client_wrapper)
216
+
217
+ @property
218
+ def with_raw_response(self) -> AsyncRawProjectPermissionsClient:
219
+ """
220
+ Retrieves a raw implementation of this client that returns raw responses.
221
+
222
+ Returns
223
+ -------
224
+ AsyncRawProjectPermissionsClient
225
+ """
226
+ return self._raw_client
227
+
228
+ async def index(
229
+ self,
230
+ account_id: Uuid,
231
+ project_id: Uuid,
232
+ *,
233
+ include_deactivated: typing.Optional[bool] = None,
234
+ after: typing.Optional[RequestAfterOpaqueCursor] = None,
235
+ page_size: typing.Optional[RequestPageSize] = None,
236
+ include_total_count: typing.Optional[IncludeTotalCount] = None,
237
+ request_options: typing.Optional[RequestOptions] = None,
238
+ ) -> AsyncPager[UserRole, UserRolesResponse]:
239
+ """
240
+ List user roles for a given project. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
241
+
242
+ Parameters
243
+ ----------
244
+ account_id : Uuid
245
+
246
+
247
+ project_id : Uuid
248
+
249
+
250
+ include_deactivated : typing.Optional[bool]
251
+ Supports including deactivated users in the response. Default is false.
252
+
253
+ after : typing.Optional[RequestAfterOpaqueCursor]
254
+ Opaque Cursor query param for requests returning paginated results.
255
+ <br/>
256
+ NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
257
+
258
+ page_size : typing.Optional[RequestPageSize]
259
+
260
+
261
+ include_total_count : typing.Optional[IncludeTotalCount]
262
+
263
+
264
+ request_options : typing.Optional[RequestOptions]
265
+ Request-specific configuration.
266
+
267
+ Returns
268
+ -------
269
+ AsyncPager[UserRole, UserRolesResponse]
270
+ OK
271
+
272
+ Examples
273
+ --------
274
+ import asyncio
275
+
276
+ from frameio import AsyncFrameio
277
+
278
+ client = AsyncFrameio(
279
+ token="YOUR_TOKEN",
280
+ )
281
+
282
+
283
+ async def main() -> None:
284
+ response = await client.project_permissions.index(
285
+ account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
286
+ project_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
287
+ include_deactivated=True,
288
+ after="<opaque_cursor>",
289
+ page_size=10,
290
+ include_total_count=False,
291
+ )
292
+ async for item in response:
293
+ yield item
294
+
295
+ # alternatively, you can paginate page-by-page
296
+ async for page in response.iter_pages():
297
+ yield page
298
+
299
+
300
+ asyncio.run(main())
301
+ """
302
+ return await self._raw_client.index(
303
+ account_id,
304
+ project_id,
305
+ include_deactivated=include_deactivated,
306
+ after=after,
307
+ page_size=page_size,
308
+ include_total_count=include_total_count,
309
+ request_options=request_options,
310
+ )
311
+
312
+ async def delete(
313
+ self,
314
+ account_id: Uuid,
315
+ project_id: Uuid,
316
+ user_id: Uuid,
317
+ *,
318
+ request_options: typing.Optional[RequestOptions] = None,
319
+ ) -> None:
320
+ """
321
+ Remove a user from a given project. <br>Rate Limits: 60 calls per 1.00 minute(s) per account_user
322
+
323
+ Parameters
324
+ ----------
325
+ account_id : Uuid
326
+
327
+
328
+ project_id : Uuid
329
+
330
+
331
+ user_id : Uuid
332
+
333
+
334
+ request_options : typing.Optional[RequestOptions]
335
+ Request-specific configuration.
336
+
337
+ Returns
338
+ -------
339
+ None
340
+
341
+ Examples
342
+ --------
343
+ import asyncio
344
+
345
+ from frameio import AsyncFrameio
346
+
347
+ client = AsyncFrameio(
348
+ token="YOUR_TOKEN",
349
+ )
350
+
351
+
352
+ async def main() -> None:
353
+ await client.project_permissions.delete(
354
+ account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
355
+ project_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
356
+ user_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
357
+ )
358
+
359
+
360
+ asyncio.run(main())
361
+ """
362
+ _response = await self._raw_client.delete(account_id, project_id, user_id, request_options=request_options)
363
+ return _response.data
364
+
365
+ async def project_user_roles_update(
366
+ self,
367
+ account_id: Uuid,
368
+ project_id: Uuid,
369
+ user_id: Uuid,
370
+ *,
371
+ data: UpdateUserRolesParamsData,
372
+ request_options: typing.Optional[RequestOptions] = None,
373
+ ) -> UpdateUserRolesResponse:
374
+ """
375
+ Update user roles for the given project if the user is already added to the project. If the user is
376
+ not added to the project, the user will be added with the given role. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user
377
+
378
+ Parameters
379
+ ----------
380
+ account_id : Uuid
381
+
382
+
383
+ project_id : Uuid
384
+
385
+
386
+ user_id : Uuid
387
+
388
+
389
+ data : UpdateUserRolesParamsData
390
+
391
+ request_options : typing.Optional[RequestOptions]
392
+ Request-specific configuration.
393
+
394
+ Returns
395
+ -------
396
+ UpdateUserRolesResponse
397
+ OK
398
+
399
+ Examples
400
+ --------
401
+ import asyncio
402
+
403
+ from frameio import AsyncFrameio, UpdateUserRolesParamsData
404
+
405
+ client = AsyncFrameio(
406
+ token="YOUR_TOKEN",
407
+ )
408
+
409
+
410
+ async def main() -> None:
411
+ await client.project_permissions.project_user_roles_update(
412
+ account_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
413
+ project_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
414
+ user_id="b2702c44-c6da-4bb6-8bbd-be6e547ccf1b",
415
+ data=UpdateUserRolesParamsData(
416
+ role="editor",
417
+ ),
418
+ )
419
+
420
+
421
+ asyncio.run(main())
422
+ """
423
+ _response = await self._raw_client.project_user_roles_update(
424
+ account_id, project_id, user_id, data=data, request_options=request_options
425
+ )
426
+ return _response.data