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.
- frameio/__init__.py +1158 -0
- frameio/account_permissions/__init__.py +4 -0
- frameio/account_permissions/client.py +193 -0
- frameio/account_permissions/raw_client.py +333 -0
- frameio/accounts/__init__.py +4 -0
- frameio/accounts/client.py +162 -0
- frameio/accounts/raw_client.py +309 -0
- frameio/client.py +439 -0
- frameio/comments/__init__.py +38 -0
- frameio/comments/client.py +654 -0
- frameio/comments/raw_client.py +1316 -0
- frameio/comments/types/__init__.py +40 -0
- frameio/comments/types/comments_show_request_include.py +5 -0
- frameio/comments/types/create_comment_params_data.py +33 -0
- frameio/comments/types/update_comment_params_data.py +33 -0
- frameio/core/__init__.py +122 -0
- frameio/core/api_error.py +23 -0
- frameio/core/client_wrapper.py +95 -0
- frameio/core/custom_pagination.py +152 -0
- frameio/core/datetime_utils.py +28 -0
- frameio/core/file.py +67 -0
- frameio/core/force_multipart.py +18 -0
- frameio/core/http_client.py +663 -0
- frameio/core/http_response.py +55 -0
- frameio/core/http_sse/__init__.py +42 -0
- frameio/core/http_sse/_api.py +112 -0
- frameio/core/http_sse/_decoders.py +61 -0
- frameio/core/http_sse/_exceptions.py +7 -0
- frameio/core/http_sse/_models.py +17 -0
- frameio/core/jsonable_encoder.py +100 -0
- frameio/core/pagination.py +82 -0
- frameio/core/pydantic_utilities.py +361 -0
- frameio/core/query_encoder.py +58 -0
- frameio/core/remove_none_from_dict.py +11 -0
- frameio/core/request_options.py +35 -0
- frameio/core/serialization.py +276 -0
- frameio/core/unchecked_base_model.py +376 -0
- frameio/environment.py +7 -0
- frameio/errors/__init__.py +53 -0
- frameio/errors/bad_request_error.py +11 -0
- frameio/errors/forbidden_error.py +11 -0
- frameio/errors/not_found_error.py +11 -0
- frameio/errors/too_many_requests_error.py +11 -0
- frameio/errors/unauthorized_error.py +11 -0
- frameio/errors/unprocessable_entity_error.py +10 -0
- frameio/files/__init__.py +58 -0
- frameio/files/client.py +1171 -0
- frameio/files/raw_client.py +2517 -0
- frameio/files/types/__init__.py +56 -0
- frameio/files/types/file_copy_params_data.py +15 -0
- frameio/files/types/file_create_local_upload_params_data.py +20 -0
- frameio/files/types/file_create_params_data.py +31 -0
- frameio/files/types/file_create_remote_upload_params_data.py +20 -0
- frameio/files/types/file_move_params_data.py +15 -0
- frameio/files/types/file_update_params_data.py +15 -0
- frameio/files/types/files_copy_request_copy_comments.py +5 -0
- frameio/folders/__init__.py +39 -0
- frameio/folders/client.py +1004 -0
- frameio/folders/raw_client.py +2074 -0
- frameio/folders/types/__init__.py +42 -0
- frameio/folders/types/folder_copy_params_data.py +15 -0
- frameio/folders/types/folder_create_params_data.py +15 -0
- frameio/folders/types/folder_move_params_data.py +15 -0
- frameio/folders/types/folder_update_params_data.py +15 -0
- frameio/metadata/__init__.py +37 -0
- frameio/metadata/client.py +293 -0
- frameio/metadata/raw_client.py +509 -0
- frameio/metadata/types/__init__.py +38 -0
- frameio/metadata/types/bulk_update_metadata_params_data.py +23 -0
- frameio/metadata/types/bulk_update_metadata_params_data_values_item.py +13 -0
- frameio/metadata_fields/__init__.py +103 -0
- frameio/metadata_fields/client.py +536 -0
- frameio/metadata_fields/raw_client.py +996 -0
- frameio/metadata_fields/types/__init__.py +105 -0
- frameio/metadata_fields/types/create_field_definition_params_data.py +112 -0
- frameio/metadata_fields/types/update_field_definition_params_data.py +118 -0
- frameio/project_permissions/__init__.py +4 -0
- frameio/project_permissions/client.py +426 -0
- frameio/project_permissions/raw_client.py +824 -0
- frameio/projects/__init__.py +38 -0
- frameio/projects/client.py +604 -0
- frameio/projects/raw_client.py +1286 -0
- frameio/projects/types/__init__.py +40 -0
- frameio/projects/types/project_params_data.py +20 -0
- frameio/projects/types/project_update_params_data.py +26 -0
- frameio/projects/types/project_update_params_data_status.py +5 -0
- frameio/py.typed +0 -0
- frameio/shares/__init__.py +64 -0
- frameio/shares/client.py +1217 -0
- frameio/shares/raw_client.py +2511 -0
- frameio/shares/types/__init__.py +61 -0
- frameio/shares/types/add_asset_params_data.py +15 -0
- frameio/shares/types/add_reviewers_to_share_params_data.py +18 -0
- frameio/shares/types/add_reviewers_to_share_params_data_reviewers.py +27 -0
- frameio/shares/types/create_share_params_data.py +26 -0
- frameio/shares/types/remove_reviewer_params_data.py +13 -0
- frameio/shares/types/remove_reviewer_params_data_reviewers.py +27 -0
- frameio/shares/types/update_share_params_data.py +34 -0
- frameio/shares/types/update_share_params_data_access.py +5 -0
- frameio/types/__init__.py +983 -0
- frameio/types/account.py +70 -0
- frameio/types/account_roles_item.py +5 -0
- frameio/types/account_user_role.py +23 -0
- frameio/types/account_user_role_role.py +5 -0
- frameio/types/account_user_roles_response.py +27 -0
- frameio/types/accounts_response.py +23 -0
- frameio/types/add_asset_response.py +13 -0
- frameio/types/add_asset_response_data.py +15 -0
- frameio/types/asset_common.py +48 -0
- frameio/types/asset_common_type.py +5 -0
- frameio/types/asset_common_with_includes.py +58 -0
- frameio/types/asset_common_with_includes_type.py +5 -0
- frameio/types/asset_include.py +5 -0
- frameio/types/asset_share_params.py +39 -0
- frameio/types/asset_share_params_access.py +5 -0
- frameio/types/asset_with_includes.py +76 -0
- frameio/types/assets_with_includes_response.py +23 -0
- frameio/types/bad_request.py +13 -0
- frameio/types/bad_request_errors_item.py +15 -0
- frameio/types/bad_request_errors_item_source.py +12 -0
- frameio/types/boolean_value.py +12 -0
- frameio/types/children_type.py +3 -0
- frameio/types/comment.py +59 -0
- frameio/types/comment_include.py +5 -0
- frameio/types/comment_response.py +13 -0
- frameio/types/comment_with_includes.py +17 -0
- frameio/types/comment_with_includes_response.py +13 -0
- frameio/types/comments_with_includes_response.py +23 -0
- frameio/types/date_definition.py +49 -0
- frameio/types/date_definition_field_configuration.py +21 -0
- frameio/types/date_definition_field_configuration_display_format.py +7 -0
- frameio/types/date_definition_field_configuration_time_format.py +5 -0
- frameio/types/date_definition_field_type.py +10 -0
- frameio/types/date_definition_params.py +17 -0
- frameio/types/date_definition_params_field_configuration.py +23 -0
- frameio/types/date_definition_params_field_configuration_display_format.py +7 -0
- frameio/types/date_definition_params_field_configuration_time_format.py +7 -0
- frameio/types/date_definition_with_includes.py +13 -0
- frameio/types/date_value.py +12 -0
- frameio/types/email.py +3 -0
- frameio/types/empty_json.py +5 -0
- frameio/types/field_definition.py +167 -0
- frameio/types/field_definition_include.py +5 -0
- frameio/types/field_definition_response.py +13 -0
- frameio/types/field_definition_with_includes.py +178 -0
- frameio/types/field_definitions_with_includes_response.py +27 -0
- frameio/types/field_value_common.py +29 -0
- frameio/types/file.py +60 -0
- frameio/types/file_copy_response.py +13 -0
- frameio/types/file_remote_upload_response.py +17 -0
- frameio/types/file_response.py +13 -0
- frameio/types/file_status.py +5 -0
- frameio/types/file_upload_status.py +41 -0
- frameio/types/file_upload_status_response.py +13 -0
- frameio/types/file_with_includes.py +25 -0
- frameio/types/file_with_includes_response.py +13 -0
- frameio/types/file_with_includes_status.py +5 -0
- frameio/types/file_with_media_links_include.py +19 -0
- frameio/types/file_with_upload_urls.py +16 -0
- frameio/types/file_with_upload_urls_response.py +13 -0
- frameio/types/folder.py +15 -0
- frameio/types/folder_copy_response.py +13 -0
- frameio/types/folder_response.py +13 -0
- frameio/types/folder_with_includes.py +63 -0
- frameio/types/folder_with_includes_response.py +13 -0
- frameio/types/folders_with_includes_response.py +23 -0
- frameio/types/forbidden.py +13 -0
- frameio/types/forbidden_errors_item.py +15 -0
- frameio/types/forbidden_errors_item_source.py +12 -0
- frameio/types/include.py +5 -0
- frameio/types/include_total_count.py +3 -0
- frameio/types/integer_value.py +12 -0
- frameio/types/json_error_response.py +13 -0
- frameio/types/json_error_response_errors_item.py +15 -0
- frameio/types/json_error_response_errors_item_source.py +12 -0
- frameio/types/links.py +22 -0
- frameio/types/long_text_definition.py +49 -0
- frameio/types/long_text_definition_field_configuration.py +10 -0
- frameio/types/long_text_definition_field_type.py +10 -0
- frameio/types/long_text_definition_params.py +15 -0
- frameio/types/long_text_definition_with_includes.py +13 -0
- frameio/types/media_link_common.py +17 -0
- frameio/types/media_links_collection.py +24 -0
- frameio/types/metadata_field.py +149 -0
- frameio/types/metadata_response.py +13 -0
- frameio/types/metadata_with_definition.py +21 -0
- frameio/types/multi_select_value.py +14 -0
- frameio/types/multi_user_value.py +20 -0
- frameio/types/multi_user_value_member_options_type.py +5 -0
- frameio/types/no_content.py +3 -0
- frameio/types/not_found.py +13 -0
- frameio/types/not_found_errors_item.py +15 -0
- frameio/types/not_found_errors_item_source.py +12 -0
- frameio/types/number_definition.py +43 -0
- frameio/types/number_definition_field_configuration.py +21 -0
- frameio/types/number_definition_field_configuration_number_format.py +7 -0
- frameio/types/number_definition_params.py +17 -0
- frameio/types/number_definition_params_field_configuration.py +23 -0
- frameio/types/number_definition_params_field_configuration_number_format.py +7 -0
- frameio/types/number_definition_with_includes.py +13 -0
- frameio/types/number_value.py +12 -0
- frameio/types/original_media_link.py +16 -0
- frameio/types/profile.py +34 -0
- frameio/types/profile_response.py +17 -0
- frameio/types/project.py +66 -0
- frameio/types/project_include.py +5 -0
- frameio/types/project_response.py +17 -0
- frameio/types/project_status.py +5 -0
- frameio/types/project_with_includes.py +18 -0
- frameio/types/project_with_includes_response.py +17 -0
- frameio/types/projects_with_includes_response.py +27 -0
- frameio/types/rating_definition.py +43 -0
- frameio/types/rating_definition_field_configuration.py +22 -0
- frameio/types/rating_definition_field_configuration_style.py +5 -0
- frameio/types/rating_definition_params.py +17 -0
- frameio/types/rating_definition_params_field_configuration.py +22 -0
- frameio/types/rating_definition_params_field_configuration_style.py +5 -0
- frameio/types/rating_definition_with_includes.py +13 -0
- frameio/types/remove_asset_response.py +13 -0
- frameio/types/remove_asset_response_data.py +15 -0
- frameio/types/rendition_media_link.py +19 -0
- frameio/types/request_after_opaque_cursor.py +5 -0
- frameio/types/request_page_size.py +3 -0
- frameio/types/select_definition.py +43 -0
- frameio/types/select_definition_field_configuration.py +18 -0
- frameio/types/select_definition_field_configuration_options_item.py +22 -0
- frameio/types/select_definition_params.py +17 -0
- frameio/types/select_definition_params_field_configuration.py +20 -0
- frameio/types/select_definition_params_field_configuration_options_item.py +20 -0
- frameio/types/select_definition_with_includes.py +13 -0
- frameio/types/select_multi_definition.py +49 -0
- frameio/types/select_multi_definition_field_configuration.py +18 -0
- frameio/types/select_multi_definition_field_configuration_options_item.py +22 -0
- frameio/types/select_multi_definition_field_type.py +10 -0
- frameio/types/select_multi_definition_params.py +17 -0
- frameio/types/select_multi_definition_params_field_configuration.py +20 -0
- frameio/types/select_multi_definition_params_field_configuration_options_item.py +20 -0
- frameio/types/select_multi_definition_with_includes.py +13 -0
- frameio/types/select_option.py +20 -0
- frameio/types/select_value.py +14 -0
- frameio/types/share.py +66 -0
- frameio/types/share_access.py +5 -0
- frameio/types/share_response.py +13 -0
- frameio/types/share_reviewers_response.py +27 -0
- frameio/types/shares_response.py +27 -0
- frameio/types/single_user_value.py +20 -0
- frameio/types/single_user_value_member_options_type.py +5 -0
- frameio/types/text_definition.py +49 -0
- frameio/types/text_definition_field_configuration.py +10 -0
- frameio/types/text_definition_field_type.py +10 -0
- frameio/types/text_definition_params.py +15 -0
- frameio/types/text_definition_with_includes.py +13 -0
- frameio/types/text_value.py +12 -0
- frameio/types/time_stamp.py +5 -0
- frameio/types/toggle_definition.py +43 -0
- frameio/types/toggle_definition_field_configuration.py +15 -0
- frameio/types/toggle_definition_params.py +17 -0
- frameio/types/toggle_definition_params_field_configuration.py +15 -0
- frameio/types/toggle_definition_with_includes.py +13 -0
- frameio/types/too_many_requests.py +13 -0
- frameio/types/too_many_requests_errors_item.py +15 -0
- frameio/types/too_many_requests_errors_item_source.py +12 -0
- frameio/types/unauthorized.py +13 -0
- frameio/types/unauthorized_errors_item.py +15 -0
- frameio/types/unauthorized_errors_item_source.py +12 -0
- frameio/types/unprocessable_entity.py +13 -0
- frameio/types/unprocessable_entity_errors_item.py +15 -0
- frameio/types/unprocessable_entity_errors_item_source.py +12 -0
- frameio/types/update_date_definition_params.py +17 -0
- frameio/types/update_date_definition_params_field_configuration.py +25 -0
- frameio/types/update_date_definition_params_field_configuration_display_format.py +7 -0
- frameio/types/update_date_definition_params_field_configuration_time_format.py +7 -0
- frameio/types/update_long_text_definition_params.py +15 -0
- frameio/types/update_number_definition_params.py +17 -0
- frameio/types/update_number_definition_params_field_configuration.py +25 -0
- frameio/types/update_number_definition_params_field_configuration_number_format.py +7 -0
- frameio/types/update_rating_definition_params.py +17 -0
- frameio/types/update_rating_definition_params_field_configuration.py +24 -0
- frameio/types/update_rating_definition_params_field_configuration_style.py +7 -0
- frameio/types/update_select_definition_params.py +17 -0
- frameio/types/update_select_definition_params_field_configuration.py +20 -0
- frameio/types/update_select_definition_params_field_configuration_options_item.py +20 -0
- frameio/types/update_select_multi_definition_params.py +19 -0
- frameio/types/update_select_multi_definition_params_field_configuration.py +20 -0
- frameio/types/update_select_multi_definition_params_field_configuration_options_item.py +20 -0
- frameio/types/update_text_definition_params.py +15 -0
- frameio/types/update_toggle_definition_params.py +17 -0
- frameio/types/update_toggle_definition_params_field_configuration.py +15 -0
- frameio/types/update_user_multi_definition_params.py +17 -0
- frameio/types/update_user_multi_definition_params_field_configuration.py +25 -0
- frameio/types/update_user_multi_definition_params_field_configuration_custom_members_item.py +20 -0
- frameio/types/update_user_multi_definition_params_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/update_user_multi_definition_params_field_configuration_member_options_type.py +7 -0
- frameio/types/update_user_roles_params.py +17 -0
- frameio/types/update_user_roles_params_data.py +13 -0
- frameio/types/update_user_roles_params_data_role.py +7 -0
- frameio/types/update_user_roles_response.py +13 -0
- frameio/types/update_user_roles_response_data.py +13 -0
- frameio/types/update_user_roles_response_data_role.py +7 -0
- frameio/types/update_user_single_definition_params.py +17 -0
- frameio/types/update_user_single_definition_params_field_configuration.py +25 -0
- frameio/types/update_user_single_definition_params_field_configuration_custom_members_item.py +20 -0
- frameio/types/update_user_single_definition_params_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/update_user_single_definition_params_field_configuration_member_options_type.py +7 -0
- frameio/types/upload_url.py +20 -0
- frameio/types/user.py +44 -0
- frameio/types/user_multi_definition.py +49 -0
- frameio/types/user_multi_definition_field_configuration.py +23 -0
- frameio/types/user_multi_definition_field_configuration_custom_members_item.py +20 -0
- frameio/types/user_multi_definition_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/user_multi_definition_field_configuration_member_options_type.py +7 -0
- frameio/types/user_multi_definition_field_type.py +10 -0
- frameio/types/user_multi_definition_params.py +17 -0
- frameio/types/user_multi_definition_params_field_configuration.py +23 -0
- frameio/types/user_multi_definition_params_field_configuration_custom_members_item.py +20 -0
- frameio/types/user_multi_definition_params_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/user_multi_definition_params_field_configuration_member_options_type.py +7 -0
- frameio/types/user_multi_definition_with_includes.py +13 -0
- frameio/types/user_role.py +19 -0
- frameio/types/user_role_role.py +7 -0
- frameio/types/user_roles_response.py +27 -0
- frameio/types/user_single_definition.py +49 -0
- frameio/types/user_single_definition_field_configuration.py +23 -0
- frameio/types/user_single_definition_field_configuration_custom_members_item.py +20 -0
- frameio/types/user_single_definition_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/user_single_definition_field_configuration_member_options_type.py +7 -0
- frameio/types/user_single_definition_field_type.py +10 -0
- frameio/types/user_single_definition_params.py +17 -0
- frameio/types/user_single_definition_params_field_configuration.py +23 -0
- frameio/types/user_single_definition_params_field_configuration_custom_members_item.py +20 -0
- frameio/types/user_single_definition_params_field_configuration_custom_members_item_type.py +7 -0
- frameio/types/user_single_definition_params_field_configuration_member_options_type.py +7 -0
- frameio/types/user_single_definition_with_includes.py +13 -0
- frameio/types/user_value.py +18 -0
- frameio/types/user_value_type.py +5 -0
- frameio/types/uuid_.py +3 -0
- frameio/types/version_stack.py +50 -0
- frameio/types/version_stack_copy_response.py +13 -0
- frameio/types/version_stack_response.py +13 -0
- frameio/types/version_stack_with_includes.py +60 -0
- frameio/types/version_stack_with_includes_response.py +13 -0
- frameio/types/version_stacks_with_includes_response.py +19 -0
- frameio/types/webhook.py +36 -0
- frameio/types/webhook_create_response.py +17 -0
- frameio/types/webhook_create_response_data.py +15 -0
- frameio/types/webhook_events.py +5 -0
- frameio/types/webhook_response.py +13 -0
- frameio/types/webhook_with_includes.py +13 -0
- frameio/types/webhook_with_includes_response.py +13 -0
- frameio/types/webhooks_with_includes_response.py +23 -0
- frameio/types/workspace.py +40 -0
- frameio/types/workspace_include.py +5 -0
- frameio/types/workspace_params.py +17 -0
- frameio/types/workspace_params_data.py +15 -0
- frameio/types/workspace_response.py +17 -0
- frameio/types/workspace_with_includes.py +13 -0
- frameio/types/workspace_with_includes_response.py +17 -0
- frameio/types/workspaces_with_includes_response.py +27 -0
- frameio/users/__init__.py +4 -0
- frameio/users/client.py +100 -0
- frameio/users/raw_client.py +234 -0
- frameio/version.py +3 -0
- frameio/version_stacks/__init__.py +49 -0
- frameio/version_stacks/client.py +818 -0
- frameio/version_stacks/raw_client.py +1614 -0
- frameio/version_stacks/types/__init__.py +47 -0
- frameio/version_stacks/types/version_stack_copy_params_data.py +15 -0
- frameio/version_stacks/types/version_stack_create_params_data.py +19 -0
- frameio/version_stacks/types/version_stack_move_params_data.py +15 -0
- frameio/version_stacks/types/version_stacks_show_request_include.py +19 -0
- frameio/webhooks/__init__.py +34 -0
- frameio/webhooks/client.py +793 -0
- frameio/webhooks/raw_client.py +1347 -0
- frameio/webhooks/types/__init__.py +38 -0
- frameio/webhooks/types/webhook_create_params_data.py +18 -0
- frameio/webhooks/types/webhook_update_params_data.py +23 -0
- frameio/workspace_permissions/__init__.py +4 -0
- frameio/workspace_permissions/client.py +430 -0
- frameio/workspace_permissions/raw_client.py +824 -0
- frameio/workspaces/__init__.py +4 -0
- frameio/workspaces/client.py +563 -0
- frameio/workspaces/raw_client.py +1259 -0
- frameio-0.0.28.dist-info/METADATA +259 -0
- frameio-0.0.28.dist-info/RECORD +385 -0
- frameio-0.0.28.dist-info/WHEEL +4 -0
|
@@ -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,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
|
+
)
|