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,40 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ import typing
6
+ from importlib import import_module
7
+
8
+ if typing.TYPE_CHECKING:
9
+ from .comments_show_request_include import CommentsShowRequestInclude
10
+ from .create_comment_params_data import CreateCommentParamsData
11
+ from .update_comment_params_data import UpdateCommentParamsData
12
+ _dynamic_imports: typing.Dict[str, str] = {
13
+ "CommentsShowRequestInclude": ".comments_show_request_include",
14
+ "CreateCommentParamsData": ".create_comment_params_data",
15
+ "UpdateCommentParamsData": ".update_comment_params_data",
16
+ }
17
+
18
+
19
+ def __getattr__(attr_name: str) -> typing.Any:
20
+ module_name = _dynamic_imports.get(attr_name)
21
+ if module_name is None:
22
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
23
+ try:
24
+ module = import_module(module_name, __package__)
25
+ if module_name == f".{attr_name}":
26
+ return module
27
+ else:
28
+ return getattr(module, attr_name)
29
+ except ImportError as e:
30
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
31
+ except AttributeError as e:
32
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
33
+
34
+
35
+ def __dir__():
36
+ lazy_attrs = list(_dynamic_imports.keys())
37
+ return sorted(lazy_attrs)
38
+
39
+
40
+ __all__ = ["CommentsShowRequestInclude", "CreateCommentParamsData", "UpdateCommentParamsData"]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ CommentsShowRequestInclude = typing.Union[typing.Literal["owner", "replies"], typing.Any]
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ...core.unchecked_base_model import UncheckedBaseModel
7
+ from ...types.time_stamp import TimeStamp
8
+
9
+
10
+ class CreateCommentParamsData(UncheckedBaseModel):
11
+ annotation: typing.Optional[str] = pydantic.Field(default=None)
12
+ """
13
+ JSON geometry for on-screen drawings. Allowed for document, image, video, or stream file types. JSON must be stringified.
14
+ """
15
+
16
+ completed: typing.Optional[bool] = pydantic.Field(default=None)
17
+ """
18
+ Comment completion status
19
+ """
20
+
21
+ page: typing.Optional[int] = pydantic.Field(default=None)
22
+ """
23
+ Document page. Only allowed when file type is a pdf document
24
+ """
25
+
26
+ text: str = pydantic.Field()
27
+ """
28
+ Comment text (required)
29
+ """
30
+
31
+ timestamp: typing.Optional[TimeStamp] = None
32
+
33
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import pydantic
6
+ from ...core.unchecked_base_model import UncheckedBaseModel
7
+ from ...types.time_stamp import TimeStamp
8
+
9
+
10
+ class UpdateCommentParamsData(UncheckedBaseModel):
11
+ annotation: typing.Optional[str] = pydantic.Field(default=None)
12
+ """
13
+ JSON geometry for on-screen drawings. Allowed for document, image, video, or stream file types. JSON must be stringified.
14
+ """
15
+
16
+ completed: typing.Optional[bool] = pydantic.Field(default=None)
17
+ """
18
+ Comment completion status
19
+ """
20
+
21
+ page: typing.Optional[int] = pydantic.Field(default=None)
22
+ """
23
+ Document page. Only allowed when file type is a pdf document
24
+ """
25
+
26
+ text: typing.Optional[str] = pydantic.Field(default=None)
27
+ """
28
+ Comment text
29
+ """
30
+
31
+ timestamp: typing.Optional[TimeStamp] = None
32
+
33
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)
@@ -0,0 +1,122 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ import typing
6
+ from importlib import import_module
7
+
8
+ if typing.TYPE_CHECKING:
9
+ from .api_error import ApiError
10
+ from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper
11
+ from .custom_pagination import AsyncCustomPager, SyncCustomPager
12
+ from .datetime_utils import serialize_datetime
13
+ from .file import File, convert_file_dict_to_httpx_tuples, with_content_type
14
+ from .http_client import AsyncHttpClient, HttpClient
15
+ from .http_response import AsyncHttpResponse, HttpResponse
16
+ from .jsonable_encoder import jsonable_encoder
17
+ from .pagination import AsyncPager, SyncPager
18
+ from .pydantic_utilities import (
19
+ IS_PYDANTIC_V2,
20
+ UniversalBaseModel,
21
+ UniversalRootModel,
22
+ parse_obj_as,
23
+ universal_field_validator,
24
+ universal_root_validator,
25
+ update_forward_refs,
26
+ )
27
+ from .query_encoder import encode_query
28
+ from .remove_none_from_dict import remove_none_from_dict
29
+ from .request_options import RequestOptions
30
+ from .serialization import FieldMetadata, convert_and_respect_annotation_metadata
31
+ from .unchecked_base_model import UncheckedBaseModel, UnionMetadata, construct_type
32
+ _dynamic_imports: typing.Dict[str, str] = {
33
+ "ApiError": ".api_error",
34
+ "AsyncClientWrapper": ".client_wrapper",
35
+ "AsyncCustomPager": ".custom_pagination",
36
+ "AsyncHttpClient": ".http_client",
37
+ "AsyncHttpResponse": ".http_response",
38
+ "AsyncPager": ".pagination",
39
+ "BaseClientWrapper": ".client_wrapper",
40
+ "FieldMetadata": ".serialization",
41
+ "File": ".file",
42
+ "HttpClient": ".http_client",
43
+ "HttpResponse": ".http_response",
44
+ "IS_PYDANTIC_V2": ".pydantic_utilities",
45
+ "RequestOptions": ".request_options",
46
+ "SyncClientWrapper": ".client_wrapper",
47
+ "SyncCustomPager": ".custom_pagination",
48
+ "SyncPager": ".pagination",
49
+ "UncheckedBaseModel": ".unchecked_base_model",
50
+ "UnionMetadata": ".unchecked_base_model",
51
+ "UniversalBaseModel": ".pydantic_utilities",
52
+ "UniversalRootModel": ".pydantic_utilities",
53
+ "construct_type": ".unchecked_base_model",
54
+ "convert_and_respect_annotation_metadata": ".serialization",
55
+ "convert_file_dict_to_httpx_tuples": ".file",
56
+ "encode_query": ".query_encoder",
57
+ "jsonable_encoder": ".jsonable_encoder",
58
+ "parse_obj_as": ".pydantic_utilities",
59
+ "remove_none_from_dict": ".remove_none_from_dict",
60
+ "serialize_datetime": ".datetime_utils",
61
+ "universal_field_validator": ".pydantic_utilities",
62
+ "universal_root_validator": ".pydantic_utilities",
63
+ "update_forward_refs": ".pydantic_utilities",
64
+ "with_content_type": ".file",
65
+ }
66
+
67
+
68
+ def __getattr__(attr_name: str) -> typing.Any:
69
+ module_name = _dynamic_imports.get(attr_name)
70
+ if module_name is None:
71
+ raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
72
+ try:
73
+ module = import_module(module_name, __package__)
74
+ if module_name == f".{attr_name}":
75
+ return module
76
+ else:
77
+ return getattr(module, attr_name)
78
+ except ImportError as e:
79
+ raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
80
+ except AttributeError as e:
81
+ raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
82
+
83
+
84
+ def __dir__():
85
+ lazy_attrs = list(_dynamic_imports.keys())
86
+ return sorted(lazy_attrs)
87
+
88
+
89
+ __all__ = [
90
+ "ApiError",
91
+ "AsyncClientWrapper",
92
+ "AsyncCustomPager",
93
+ "AsyncHttpClient",
94
+ "AsyncHttpResponse",
95
+ "AsyncPager",
96
+ "BaseClientWrapper",
97
+ "FieldMetadata",
98
+ "File",
99
+ "HttpClient",
100
+ "HttpResponse",
101
+ "IS_PYDANTIC_V2",
102
+ "RequestOptions",
103
+ "SyncClientWrapper",
104
+ "SyncCustomPager",
105
+ "SyncPager",
106
+ "UncheckedBaseModel",
107
+ "UnionMetadata",
108
+ "UniversalBaseModel",
109
+ "UniversalRootModel",
110
+ "construct_type",
111
+ "convert_and_respect_annotation_metadata",
112
+ "convert_file_dict_to_httpx_tuples",
113
+ "encode_query",
114
+ "jsonable_encoder",
115
+ "parse_obj_as",
116
+ "remove_none_from_dict",
117
+ "serialize_datetime",
118
+ "universal_field_validator",
119
+ "universal_root_validator",
120
+ "update_forward_refs",
121
+ "with_content_type",
122
+ ]
@@ -0,0 +1,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from typing import Any, Dict, Optional
4
+
5
+
6
+ class ApiError(Exception):
7
+ headers: Optional[Dict[str, str]]
8
+ status_code: Optional[int]
9
+ body: Any
10
+
11
+ def __init__(
12
+ self,
13
+ *,
14
+ headers: Optional[Dict[str, str]] = None,
15
+ status_code: Optional[int] = None,
16
+ body: Any = None,
17
+ ) -> None:
18
+ self.headers = headers
19
+ self.status_code = status_code
20
+ self.body = body
21
+
22
+ def __str__(self) -> str:
23
+ return f"headers: {self.headers}, status_code: {self.status_code}, body: {self.body}"
@@ -0,0 +1,95 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ import httpx
6
+ from .http_client import AsyncHttpClient, HttpClient
7
+
8
+
9
+ class BaseClientWrapper:
10
+ def __init__(
11
+ self,
12
+ *,
13
+ token: typing.Union[str, typing.Callable[[], str]],
14
+ headers: typing.Optional[typing.Dict[str, str]] = None,
15
+ base_url: str,
16
+ timeout: typing.Optional[float] = None,
17
+ ):
18
+ self._token = token
19
+ self._headers = headers
20
+ self._base_url = base_url
21
+ self._timeout = timeout
22
+
23
+ def get_headers(self) -> typing.Dict[str, str]:
24
+ headers: typing.Dict[str, str] = {
25
+ "User-Agent": "frameio/0.0.28",
26
+ "X-Fern-Language": "Python",
27
+ "X-Fern-SDK-Name": "frameio",
28
+ "X-Fern-SDK-Version": "0.0.28",
29
+ **(self.get_custom_headers() or {}),
30
+ }
31
+ headers["Authorization"] = f"Bearer {self._get_token()}"
32
+ return headers
33
+
34
+ def _get_token(self) -> str:
35
+ if isinstance(self._token, str):
36
+ return self._token
37
+ else:
38
+ return self._token()
39
+
40
+ def get_custom_headers(self) -> typing.Optional[typing.Dict[str, str]]:
41
+ return self._headers
42
+
43
+ def get_base_url(self) -> str:
44
+ return self._base_url
45
+
46
+ def get_timeout(self) -> typing.Optional[float]:
47
+ return self._timeout
48
+
49
+
50
+ class SyncClientWrapper(BaseClientWrapper):
51
+ def __init__(
52
+ self,
53
+ *,
54
+ token: typing.Union[str, typing.Callable[[], str]],
55
+ headers: typing.Optional[typing.Dict[str, str]] = None,
56
+ base_url: str,
57
+ timeout: typing.Optional[float] = None,
58
+ httpx_client: httpx.Client,
59
+ ):
60
+ super().__init__(token=token, headers=headers, base_url=base_url, timeout=timeout)
61
+ self.httpx_client = HttpClient(
62
+ httpx_client=httpx_client,
63
+ base_headers=self.get_headers,
64
+ base_timeout=self.get_timeout,
65
+ base_url=self.get_base_url,
66
+ )
67
+
68
+
69
+ class AsyncClientWrapper(BaseClientWrapper):
70
+ def __init__(
71
+ self,
72
+ *,
73
+ token: typing.Union[str, typing.Callable[[], str]],
74
+ headers: typing.Optional[typing.Dict[str, str]] = None,
75
+ base_url: str,
76
+ timeout: typing.Optional[float] = None,
77
+ async_token: typing.Optional[typing.Callable[[], typing.Awaitable[str]]] = None,
78
+ httpx_client: httpx.AsyncClient,
79
+ ):
80
+ super().__init__(token=token, headers=headers, base_url=base_url, timeout=timeout)
81
+ self._async_token = async_token
82
+ self.httpx_client = AsyncHttpClient(
83
+ httpx_client=httpx_client,
84
+ base_headers=self.get_headers,
85
+ base_timeout=self.get_timeout,
86
+ base_url=self.get_base_url,
87
+ async_base_headers=self.async_get_headers,
88
+ )
89
+
90
+ async def async_get_headers(self) -> typing.Dict[str, str]:
91
+ headers = self.get_headers()
92
+ if self._async_token is not None:
93
+ token = await self._async_token()
94
+ headers["Authorization"] = f"Bearer {token}"
95
+ return headers
@@ -0,0 +1,152 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ """
4
+ Custom Pagination Support
5
+
6
+ This file is designed to be modified by SDK users to implement their own
7
+ pagination logic. The generator will import SyncCustomPager and AsyncCustomPager
8
+ from this module when custom pagination is used.
9
+
10
+ Users should:
11
+ 1. Implement their custom pager (e.g., PayrocPager, MyCustomPager, etc.)
12
+ 2. Create adapter classes (SyncCustomPager/AsyncCustomPager) that bridge
13
+ between the generated SDK code and their custom pager implementation
14
+ """
15
+
16
+ from __future__ import annotations
17
+
18
+ from typing import Any, AsyncIterator, Generic, Iterator, TypeVar
19
+
20
+ # Import the base utilities you'll need
21
+ # Adjust these imports based on your actual structure
22
+ try:
23
+ from .client_wrapper import AsyncClientWrapper, SyncClientWrapper
24
+ except ImportError:
25
+ # Fallback for type hints
26
+ AsyncClientWrapper = Any # type: ignore
27
+ SyncClientWrapper = Any # type: ignore
28
+
29
+ TItem = TypeVar("TItem")
30
+ TResponse = TypeVar("TResponse")
31
+
32
+
33
+ class SyncCustomPager(Generic[TItem, TResponse]):
34
+ """
35
+ Adapter for custom synchronous pagination.
36
+
37
+ The generator will call this with:
38
+ SyncCustomPager(initial_response=response, client_wrapper=client_wrapper)
39
+
40
+ Implement this class to extract pagination metadata from your response
41
+ and delegate to your custom pager implementation.
42
+
43
+ Example implementation:
44
+
45
+ class SyncCustomPager(Generic[TItem, TResponse]):
46
+ def __init__(
47
+ self,
48
+ *,
49
+ initial_response: TResponse,
50
+ client_wrapper: SyncClientWrapper,
51
+ ):
52
+ # Extract data and pagination metadata from response
53
+ data = initial_response.data # Adjust based on your response structure
54
+ links = initial_response.links
55
+
56
+ # Initialize your custom pager
57
+ self._pager = MyCustomPager(
58
+ current_page=Page(data),
59
+ httpx_client=client_wrapper.httpx_client,
60
+ get_headers=client_wrapper.get_headers,
61
+ # ... other parameters
62
+ )
63
+
64
+ def __iter__(self):
65
+ return iter(self._pager)
66
+
67
+ # Delegate other methods to your pager...
68
+ """
69
+
70
+ def __init__(
71
+ self,
72
+ *,
73
+ initial_response: TResponse,
74
+ client_wrapper: SyncClientWrapper,
75
+ ):
76
+ """
77
+ Initialize the custom pager.
78
+
79
+ Args:
80
+ initial_response: The parsed API response from the first request
81
+ client_wrapper: The client wrapper providing HTTP client and utilities
82
+ """
83
+ raise NotImplementedError(
84
+ "SyncCustomPager must be implemented. "
85
+ "Please implement this class in core/custom_pagination.py to define your pagination logic. "
86
+ "See the class docstring for examples."
87
+ )
88
+
89
+ def __iter__(self) -> Iterator[TItem]:
90
+ """Iterate through all items across all pages."""
91
+ raise NotImplementedError("Must implement __iter__ method")
92
+
93
+
94
+ class AsyncCustomPager(Generic[TItem, TResponse]):
95
+ """
96
+ Adapter for custom asynchronous pagination.
97
+
98
+ The generator will call this with:
99
+ AsyncCustomPager(initial_response=response, client_wrapper=client_wrapper)
100
+
101
+ Implement this class to extract pagination metadata from your response
102
+ and delegate to your custom async pager implementation.
103
+
104
+ Example implementation:
105
+
106
+ class AsyncCustomPager(Generic[TItem, TResponse]):
107
+ def __init__(
108
+ self,
109
+ *,
110
+ initial_response: TResponse,
111
+ client_wrapper: AsyncClientWrapper,
112
+ ):
113
+ # Extract data and pagination metadata from response
114
+ data = initial_response.data # Adjust based on your response structure
115
+ links = initial_response.links
116
+
117
+ # Initialize your custom async pager
118
+ self._pager = MyAsyncCustomPager(
119
+ current_page=Page(data),
120
+ httpx_client=client_wrapper.httpx_client,
121
+ get_headers=client_wrapper.get_headers,
122
+ # ... other parameters
123
+ )
124
+
125
+ async def __aiter__(self):
126
+ return self._pager.__aiter__()
127
+
128
+ # Delegate other methods to your pager...
129
+ """
130
+
131
+ def __init__(
132
+ self,
133
+ *,
134
+ initial_response: TResponse,
135
+ client_wrapper: AsyncClientWrapper,
136
+ ):
137
+ """
138
+ Initialize the custom async pager.
139
+
140
+ Args:
141
+ initial_response: The parsed API response from the first request
142
+ client_wrapper: The client wrapper providing HTTP client and utilities
143
+ """
144
+ raise NotImplementedError(
145
+ "AsyncCustomPager must be implemented. "
146
+ "Please implement this class in core/custom_pagination.py to define your pagination logic. "
147
+ "See the class docstring for examples."
148
+ )
149
+
150
+ async def __aiter__(self) -> AsyncIterator[TItem]:
151
+ """Asynchronously iterate through all items across all pages."""
152
+ raise NotImplementedError("Must implement __aiter__ method")
@@ -0,0 +1,28 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+
5
+
6
+ def serialize_datetime(v: dt.datetime) -> str:
7
+ """
8
+ Serialize a datetime including timezone info.
9
+
10
+ Uses the timezone info provided if present, otherwise uses the current runtime's timezone info.
11
+
12
+ UTC datetimes end in "Z" while all other timezones are represented as offset from UTC, e.g. +05:00.
13
+ """
14
+
15
+ def _serialize_zoned_datetime(v: dt.datetime) -> str:
16
+ if v.tzinfo is not None and v.tzinfo.tzname(None) == dt.timezone.utc.tzname(None):
17
+ # UTC is a special case where we use "Z" at the end instead of "+00:00"
18
+ return v.isoformat().replace("+00:00", "Z")
19
+ else:
20
+ # Delegate to the typical +/- offset format
21
+ return v.isoformat()
22
+
23
+ if v.tzinfo is not None:
24
+ return _serialize_zoned_datetime(v)
25
+ else:
26
+ local_tz = dt.datetime.now().astimezone().tzinfo
27
+ localized_dt = v.replace(tzinfo=local_tz)
28
+ return _serialize_zoned_datetime(localized_dt)
frameio/core/file.py ADDED
@@ -0,0 +1,67 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from typing import IO, Dict, List, Mapping, Optional, Tuple, Union, cast
4
+
5
+ # File typing inspired by the flexibility of types within the httpx library
6
+ # https://github.com/encode/httpx/blob/master/httpx/_types.py
7
+ FileContent = Union[IO[bytes], bytes, str]
8
+ File = Union[
9
+ # file (or bytes)
10
+ FileContent,
11
+ # (filename, file (or bytes))
12
+ Tuple[Optional[str], FileContent],
13
+ # (filename, file (or bytes), content_type)
14
+ Tuple[Optional[str], FileContent, Optional[str]],
15
+ # (filename, file (or bytes), content_type, headers)
16
+ Tuple[
17
+ Optional[str],
18
+ FileContent,
19
+ Optional[str],
20
+ Mapping[str, str],
21
+ ],
22
+ ]
23
+
24
+
25
+ def convert_file_dict_to_httpx_tuples(
26
+ d: Dict[str, Union[File, List[File]]],
27
+ ) -> List[Tuple[str, File]]:
28
+ """
29
+ The format we use is a list of tuples, where the first element is the
30
+ name of the file and the second is the file object. Typically HTTPX wants
31
+ a dict, but to be able to send lists of files, you have to use the list
32
+ approach (which also works for non-lists)
33
+ https://github.com/encode/httpx/pull/1032
34
+ """
35
+
36
+ httpx_tuples = []
37
+ for key, file_like in d.items():
38
+ if isinstance(file_like, list):
39
+ for file_like_item in file_like:
40
+ httpx_tuples.append((key, file_like_item))
41
+ else:
42
+ httpx_tuples.append((key, file_like))
43
+ return httpx_tuples
44
+
45
+
46
+ def with_content_type(*, file: File, default_content_type: str) -> File:
47
+ """
48
+ This function resolves to the file's content type, if provided, and defaults
49
+ to the default_content_type value if not.
50
+ """
51
+ if isinstance(file, tuple):
52
+ if len(file) == 2:
53
+ filename, content = cast(Tuple[Optional[str], FileContent], file) # type: ignore
54
+ return (filename, content, default_content_type)
55
+ elif len(file) == 3:
56
+ filename, content, file_content_type = cast(Tuple[Optional[str], FileContent, Optional[str]], file) # type: ignore
57
+ out_content_type = file_content_type or default_content_type
58
+ return (filename, content, out_content_type)
59
+ elif len(file) == 4:
60
+ filename, content, file_content_type, headers = cast( # type: ignore
61
+ Tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], file
62
+ )
63
+ out_content_type = file_content_type or default_content_type
64
+ return (filename, content, out_content_type, headers)
65
+ else:
66
+ raise ValueError(f"Unexpected tuple length: {len(file)}")
67
+ return (None, file, default_content_type)
@@ -0,0 +1,18 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from typing import Any, Dict
4
+
5
+
6
+ class ForceMultipartDict(Dict[str, Any]):
7
+ """
8
+ A dictionary subclass that always evaluates to True in boolean contexts.
9
+
10
+ This is used to force multipart/form-data encoding in HTTP requests even when
11
+ the dictionary is empty, which would normally evaluate to False.
12
+ """
13
+
14
+ def __bool__(self) -> bool:
15
+ return True
16
+
17
+
18
+ FORCE_MULTIPART = ForceMultipartDict()