immich 1.2.1__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.
- immich/.openapi-generator/FILES +372 -0
- immich/.openapi-generator/VERSION +1 -0
- immich/.openapi-generator-ignore +48 -0
- immich/__init__.py +3 -0
- immich/client/__init__.py +1162 -0
- immich/client/api/__init__.py +39 -0
- immich/client/api/activities_api.py +1092 -0
- immich/client/api/albums_api.py +3228 -0
- immich/client/api/api_keys_api.py +1484 -0
- immich/client/api/assets_api.py +5834 -0
- immich/client/api/authentication_admin_api.py +254 -0
- immich/client/api/authentication_api.py +3881 -0
- immich/client/api/deprecated_api.py +2199 -0
- immich/client/api/download_api.py +603 -0
- immich/client/api/duplicates_api.py +743 -0
- immich/client/api/faces_api.py +1053 -0
- immich/client/api/jobs_api.py +783 -0
- immich/client/api/libraries_api.py +2004 -0
- immich/client/api/maintenance_admin_api.py +533 -0
- immich/client/api/map_api.py +640 -0
- immich/client/api/memories_api.py +2250 -0
- immich/client/api/notifications_admin_api.py +808 -0
- immich/client/api/notifications_api.py +1564 -0
- immich/client/api/partners_api.py +1278 -0
- immich/client/api/people_api.py +2905 -0
- immich/client/api/plugins_api.py +730 -0
- immich/client/api/queues_api.py +1292 -0
- immich/client/api/search_api.py +3198 -0
- immich/client/api/server_api.py +3466 -0
- immich/client/api/sessions_api.py +1472 -0
- immich/client/api/shared_links_api.py +2177 -0
- immich/client/api/stacks_api.py +1769 -0
- immich/client/api/sync_api.py +1512 -0
- immich/client/api/system_config_api.py +967 -0
- immich/client/api/system_metadata_api.py +964 -0
- immich/client/api/tags_api.py +2296 -0
- immich/client/api/timeline_api.py +1193 -0
- immich/client/api/trash_api.py +739 -0
- immich/client/api/users_admin_api.py +2607 -0
- immich/client/api/users_api.py +3577 -0
- immich/client/api/views_api.py +503 -0
- immich/client/api/workflows_api.py +1257 -0
- immich/client/api_client.py +756 -0
- immich/client/api_response.py +20 -0
- immich/client/configuration.py +638 -0
- immich/client/exceptions.py +222 -0
- immich/client/models/__init__.py +424 -0
- immich/client/models/activity_create_dto.py +94 -0
- immich/client/models/activity_response_dto.py +121 -0
- immich/client/models/activity_statistics_response_dto.py +85 -0
- immich/client/models/add_users_dto.py +101 -0
- immich/client/models/admin_onboarding_update_dto.py +82 -0
- immich/client/models/album_response_dto.py +199 -0
- immich/client/models/album_statistics_response_dto.py +90 -0
- immich/client/models/album_user_add_dto.py +87 -0
- immich/client/models/album_user_create_dto.py +87 -0
- immich/client/models/album_user_response_dto.py +95 -0
- immich/client/models/album_user_role.py +34 -0
- immich/client/models/albums_add_assets_dto.py +86 -0
- immich/client/models/albums_add_assets_response_dto.py +86 -0
- immich/client/models/albums_response.py +83 -0
- immich/client/models/albums_update.py +85 -0
- immich/client/models/api_key_create_dto.py +87 -0
- immich/client/models/api_key_create_response_dto.py +94 -0
- immich/client/models/api_key_response_dto.py +102 -0
- immich/client/models/api_key_update_dto.py +87 -0
- immich/client/models/asset_bulk_delete_dto.py +84 -0
- immich/client/models/asset_bulk_update_dto.py +143 -0
- immich/client/models/asset_bulk_upload_check_dto.py +98 -0
- immich/client/models/asset_bulk_upload_check_item.py +85 -0
- immich/client/models/asset_bulk_upload_check_response_dto.py +101 -0
- immich/client/models/asset_bulk_upload_check_result.py +126 -0
- immich/client/models/asset_copy_dto.py +113 -0
- immich/client/models/asset_delta_sync_dto.py +87 -0
- immich/client/models/asset_delta_sync_response_dto.py +102 -0
- immich/client/models/asset_face_create_dto.py +110 -0
- immich/client/models/asset_face_delete_dto.py +82 -0
- immich/client/models/asset_face_response_dto.py +125 -0
- immich/client/models/asset_face_update_dto.py +96 -0
- immich/client/models/asset_face_update_item.py +86 -0
- immich/client/models/asset_face_without_person_response_dto.py +111 -0
- immich/client/models/asset_full_sync_dto.py +95 -0
- immich/client/models/asset_ids_dto.py +83 -0
- immich/client/models/asset_ids_response_dto.py +109 -0
- immich/client/models/asset_job_name.py +36 -0
- immich/client/models/asset_jobs_dto.py +87 -0
- immich/client/models/asset_media_response_dto.py +84 -0
- immich/client/models/asset_media_size.py +35 -0
- immich/client/models/asset_media_status.py +35 -0
- immich/client/models/asset_metadata_key.py +33 -0
- immich/client/models/asset_metadata_response_dto.py +92 -0
- immich/client/models/asset_metadata_upsert_dto.py +101 -0
- immich/client/models/asset_metadata_upsert_item_dto.py +84 -0
- immich/client/models/asset_ocr_response_dto.py +145 -0
- immich/client/models/asset_order.py +34 -0
- immich/client/models/asset_response_dto.py +291 -0
- immich/client/models/asset_stack_response_dto.py +90 -0
- immich/client/models/asset_stats_response_dto.py +90 -0
- immich/client/models/asset_type_enum.py +36 -0
- immich/client/models/asset_visibility.py +36 -0
- immich/client/models/audio_codec.py +36 -0
- immich/client/models/auth_status_response_dto.py +100 -0
- immich/client/models/avatar_update.py +83 -0
- immich/client/models/bulk_id_error_reason.py +36 -0
- immich/client/models/bulk_id_response_dto.py +102 -0
- immich/client/models/bulk_ids_dto.py +83 -0
- immich/client/models/cast_response.py +88 -0
- immich/client/models/cast_update.py +82 -0
- immich/client/models/change_password_dto.py +101 -0
- immich/client/models/check_existing_assets_dto.py +91 -0
- immich/client/models/check_existing_assets_response_dto.py +82 -0
- immich/client/models/clip_config.py +85 -0
- immich/client/models/colorspace.py +34 -0
- immich/client/models/contributor_count_response_dto.py +85 -0
- immich/client/models/cq_mode.py +35 -0
- immich/client/models/create_album_dto.py +112 -0
- immich/client/models/create_library_dto.py +103 -0
- immich/client/models/create_profile_image_response_dto.py +95 -0
- immich/client/models/database_backup_config.py +94 -0
- immich/client/models/download_archive_info.py +85 -0
- immich/client/models/download_info_dto.py +96 -0
- immich/client/models/download_response.py +90 -0
- immich/client/models/download_response_dto.py +100 -0
- immich/client/models/download_update.py +93 -0
- immich/client/models/duplicate_detection_config.py +89 -0
- immich/client/models/duplicate_response_dto.py +98 -0
- immich/client/models/email_notifications_response.py +90 -0
- immich/client/models/email_notifications_update.py +90 -0
- immich/client/models/exif_response_dto.py +284 -0
- immich/client/models/face_dto.py +83 -0
- immich/client/models/facial_recognition_config.py +107 -0
- immich/client/models/folders_response.py +92 -0
- immich/client/models/folders_update.py +85 -0
- immich/client/models/image_format.py +34 -0
- immich/client/models/job_create_dto.py +83 -0
- immich/client/models/job_name.py +87 -0
- immich/client/models/job_settings_dto.py +83 -0
- immich/client/models/library_response_dto.py +118 -0
- immich/client/models/library_stats_response_dto.py +92 -0
- immich/client/models/license_key_dto.py +98 -0
- immich/client/models/license_response_dto.py +101 -0
- immich/client/models/log_level.py +38 -0
- immich/client/models/login_credential_dto.py +85 -0
- immich/client/models/login_response_dto.py +109 -0
- immich/client/models/logout_response_dto.py +85 -0
- immich/client/models/machine_learning_availability_checks_dto.py +90 -0
- immich/client/models/maintenance_action.py +34 -0
- immich/client/models/maintenance_auth_dto.py +82 -0
- immich/client/models/maintenance_login_dto.py +82 -0
- immich/client/models/manual_job_name.py +38 -0
- immich/client/models/map_marker_response_dto.py +111 -0
- immich/client/models/map_reverse_geocode_response_dto.py +105 -0
- immich/client/models/memories_response.py +92 -0
- immich/client/models/memories_update.py +86 -0
- immich/client/models/memory_create_dto.py +112 -0
- immich/client/models/memory_response_dto.py +142 -0
- immich/client/models/memory_search_order.py +35 -0
- immich/client/models/memory_statistics_response_dto.py +82 -0
- immich/client/models/memory_type.py +33 -0
- immich/client/models/memory_update_dto.py +91 -0
- immich/client/models/merge_person_dto.py +83 -0
- immich/client/models/metadata_search_dto.py +277 -0
- immich/client/models/notification_create_dto.py +120 -0
- immich/client/models/notification_delete_all_dto.py +83 -0
- immich/client/models/notification_dto.py +112 -0
- immich/client/models/notification_level.py +36 -0
- immich/client/models/notification_type.py +38 -0
- immich/client/models/notification_update_all_dto.py +90 -0
- immich/client/models/notification_update_dto.py +88 -0
- immich/client/models/o_auth_authorize_response_dto.py +82 -0
- immich/client/models/o_auth_callback_dto.py +90 -0
- immich/client/models/o_auth_config_dto.py +90 -0
- immich/client/models/o_auth_token_endpoint_auth_method.py +34 -0
- immich/client/models/ocr_config.py +109 -0
- immich/client/models/on_this_day_dto.py +86 -0
- immich/client/models/onboarding_dto.py +82 -0
- immich/client/models/onboarding_response_dto.py +82 -0
- immich/client/models/partner_create_dto.py +83 -0
- immich/client/models/partner_direction.py +34 -0
- immich/client/models/partner_response_dto.py +108 -0
- immich/client/models/partner_update_dto.py +82 -0
- immich/client/models/people_response.py +92 -0
- immich/client/models/people_response_dto.py +104 -0
- immich/client/models/people_update.py +85 -0
- immich/client/models/people_update_dto.py +96 -0
- immich/client/models/people_update_item.py +128 -0
- immich/client/models/permission.py +177 -0
- immich/client/models/person_create_dto.py +117 -0
- immich/client/models/person_response_dto.py +115 -0
- immich/client/models/person_statistics_response_dto.py +82 -0
- immich/client/models/person_update_dto.py +125 -0
- immich/client/models/person_with_faces_response_dto.py +133 -0
- immich/client/models/pin_code_change_dto.py +90 -0
- immich/client/models/pin_code_reset_dto.py +85 -0
- immich/client/models/pin_code_setup_dto.py +82 -0
- immich/client/models/places_response_dto.py +100 -0
- immich/client/models/plugin_action_response_dto.py +112 -0
- immich/client/models/plugin_context_type.py +35 -0
- immich/client/models/plugin_filter_response_dto.py +112 -0
- immich/client/models/plugin_response_dto.py +139 -0
- immich/client/models/plugin_trigger_response_dto.py +87 -0
- immich/client/models/plugin_trigger_type.py +34 -0
- immich/client/models/purchase_response.py +88 -0
- immich/client/models/purchase_update.py +92 -0
- immich/client/models/queue_command.py +37 -0
- immich/client/models/queue_command_dto.py +86 -0
- immich/client/models/queue_delete_dto.py +85 -0
- immich/client/models/queue_job_response_dto.py +93 -0
- immich/client/models/queue_job_status.py +38 -0
- immich/client/models/queue_name.py +49 -0
- immich/client/models/queue_response_dto.py +97 -0
- immich/client/models/queue_response_legacy_dto.py +100 -0
- immich/client/models/queue_statistics_dto.py +103 -0
- immich/client/models/queue_status_legacy_dto.py +85 -0
- immich/client/models/queue_update_dto.py +82 -0
- immich/client/models/queues_response_legacy_dto.py +242 -0
- immich/client/models/random_search_dto.py +234 -0
- immich/client/models/ratings_response.py +84 -0
- immich/client/models/ratings_update.py +82 -0
- immich/client/models/reaction_level.py +34 -0
- immich/client/models/reaction_type.py +34 -0
- immich/client/models/reverse_geocoding_state_response_dto.py +101 -0
- immich/client/models/search_album_response_dto.py +114 -0
- immich/client/models/search_asset_response_dto.py +127 -0
- immich/client/models/search_explore_item.py +94 -0
- immich/client/models/search_explore_response_dto.py +98 -0
- immich/client/models/search_facet_count_response_dto.py +85 -0
- immich/client/models/search_facet_response_dto.py +103 -0
- immich/client/models/search_response_dto.py +100 -0
- immich/client/models/search_statistics_response_dto.py +82 -0
- immich/client/models/search_suggestion_type.py +38 -0
- immich/client/models/server_about_response_dto.py +156 -0
- immich/client/models/server_apk_links_dto.py +97 -0
- immich/client/models/server_config_dto.py +118 -0
- immich/client/models/server_features_dto.py +130 -0
- immich/client/models/server_media_types_response_dto.py +90 -0
- immich/client/models/server_ping_response.py +87 -0
- immich/client/models/server_stats_response_dto.py +119 -0
- immich/client/models/server_storage_response_dto.py +108 -0
- immich/client/models/server_theme_dto.py +82 -0
- immich/client/models/server_version_history_response_dto.py +91 -0
- immich/client/models/server_version_response_dto.py +90 -0
- immich/client/models/session_create_dto.py +96 -0
- immich/client/models/session_create_response_dto.py +120 -0
- immich/client/models/session_response_dto.py +117 -0
- immich/client/models/session_unlock_dto.py +85 -0
- immich/client/models/session_update_dto.py +84 -0
- immich/client/models/set_maintenance_mode_dto.py +83 -0
- immich/client/models/shared_link_create_dto.py +142 -0
- immich/client/models/shared_link_edit_dto.py +134 -0
- immich/client/models/shared_link_response_dto.py +173 -0
- immich/client/models/shared_link_type.py +34 -0
- immich/client/models/shared_links_response.py +92 -0
- immich/client/models/shared_links_update.py +85 -0
- immich/client/models/sign_up_dto.py +90 -0
- immich/client/models/smart_search_dto.py +245 -0
- immich/client/models/source_type.py +35 -0
- immich/client/models/stack_create_dto.py +86 -0
- immich/client/models/stack_response_dto.py +100 -0
- immich/client/models/stack_update_dto.py +83 -0
- immich/client/models/statistics_search_dto.py +217 -0
- immich/client/models/sync_ack_delete_dto.py +83 -0
- immich/client/models/sync_ack_dto.py +84 -0
- immich/client/models/sync_ack_set_dto.py +83 -0
- immich/client/models/sync_album_delete_v1.py +82 -0
- immich/client/models/sync_album_to_asset_delete_v1.py +85 -0
- immich/client/models/sync_album_to_asset_v1.py +85 -0
- immich/client/models/sync_album_user_delete_v1.py +85 -0
- immich/client/models/sync_album_user_v1.py +91 -0
- immich/client/models/sync_album_v1.py +122 -0
- immich/client/models/sync_asset_delete_v1.py +82 -0
- immich/client/models/sync_asset_exif_v1.py +296 -0
- immich/client/models/sync_asset_face_delete_v1.py +82 -0
- immich/client/models/sync_asset_face_v1.py +120 -0
- immich/client/models/sync_asset_metadata_delete_v1.py +86 -0
- immich/client/models/sync_asset_metadata_v1.py +91 -0
- immich/client/models/sync_asset_v1.py +187 -0
- immich/client/models/sync_auth_user_v1.py +154 -0
- immich/client/models/sync_entity_type.py +79 -0
- immich/client/models/sync_memory_asset_delete_v1.py +85 -0
- immich/client/models/sync_memory_asset_v1.py +85 -0
- immich/client/models/sync_memory_delete_v1.py +82 -0
- immich/client/models/sync_memory_v1.py +143 -0
- immich/client/models/sync_partner_delete_v1.py +88 -0
- immich/client/models/sync_partner_v1.py +90 -0
- immich/client/models/sync_person_delete_v1.py +82 -0
- immich/client/models/sync_person_v1.py +131 -0
- immich/client/models/sync_request_type.py +52 -0
- immich/client/models/sync_stack_delete_v1.py +82 -0
- immich/client/models/sync_stack_v1.py +101 -0
- immich/client/models/sync_stream_dto.py +86 -0
- immich/client/models/sync_user_delete_v1.py +82 -0
- immich/client/models/sync_user_metadata_delete_v1.py +84 -0
- immich/client/models/sync_user_metadata_v1.py +91 -0
- immich/client/models/sync_user_v1.py +118 -0
- immich/client/models/system_config_backups_dto.py +92 -0
- immich/client/models/system_config_dto.py +302 -0
- immich/client/models/system_config_f_fmpeg_dto.py +156 -0
- immich/client/models/system_config_faces_dto.py +82 -0
- immich/client/models/system_config_generated_fullsize_image_dto.py +92 -0
- immich/client/models/system_config_generated_image_dto.py +92 -0
- immich/client/models/system_config_image_dto.py +124 -0
- immich/client/models/system_config_job_dto.py +194 -0
- immich/client/models/system_config_library_dto.py +104 -0
- immich/client/models/system_config_library_scan_dto.py +85 -0
- immich/client/models/system_config_library_watch_dto.py +82 -0
- immich/client/models/system_config_logging_dto.py +86 -0
- immich/client/models/system_config_machine_learning_dto.py +147 -0
- immich/client/models/system_config_map_dto.py +90 -0
- immich/client/models/system_config_metadata_dto.py +92 -0
- immich/client/models/system_config_new_version_check_dto.py +82 -0
- immich/client/models/system_config_nightly_tasks_dto.py +103 -0
- immich/client/models/system_config_notifications_dto.py +92 -0
- immich/client/models/system_config_o_auth_dto.py +155 -0
- immich/client/models/system_config_password_login_dto.py +82 -0
- immich/client/models/system_config_reverse_geocoding_dto.py +82 -0
- immich/client/models/system_config_server_dto.py +94 -0
- immich/client/models/system_config_smtp_dto.py +100 -0
- immich/client/models/system_config_smtp_transport_dto.py +107 -0
- immich/client/models/system_config_storage_template_dto.py +94 -0
- immich/client/models/system_config_template_emails_dto.py +94 -0
- immich/client/models/system_config_template_storage_option_dto.py +109 -0
- immich/client/models/system_config_templates_dto.py +94 -0
- immich/client/models/system_config_theme_dto.py +82 -0
- immich/client/models/system_config_trash_dto.py +86 -0
- immich/client/models/system_config_user_dto.py +83 -0
- immich/client/models/tag_bulk_assets_dto.py +86 -0
- immich/client/models/tag_bulk_assets_response_dto.py +82 -0
- immich/client/models/tag_create_dto.py +111 -0
- immich/client/models/tag_response_dto.py +107 -0
- immich/client/models/tag_update_dto.py +87 -0
- immich/client/models/tag_upsert_dto.py +82 -0
- immich/client/models/tags_response.py +92 -0
- immich/client/models/tags_update.py +85 -0
- immich/client/models/template_dto.py +82 -0
- immich/client/models/template_response_dto.py +83 -0
- immich/client/models/test_email_response_dto.py +82 -0
- immich/client/models/time_bucket_asset_response_dto.py +195 -0
- immich/client/models/time_buckets_response_dto.py +88 -0
- immich/client/models/tone_mapping.py +36 -0
- immich/client/models/transcode_hw_accel.py +37 -0
- immich/client/models/transcode_policy.py +37 -0
- immich/client/models/trash_response_dto.py +82 -0
- immich/client/models/update_album_dto.py +106 -0
- immich/client/models/update_album_user_dto.py +83 -0
- immich/client/models/update_asset_dto.py +135 -0
- immich/client/models/update_library_dto.py +95 -0
- immich/client/models/usage_by_user_dto.py +117 -0
- immich/client/models/user_admin_create_dto.py +136 -0
- immich/client/models/user_admin_delete_dto.py +82 -0
- immich/client/models/user_admin_response_dto.py +176 -0
- immich/client/models/user_admin_update_dto.py +141 -0
- immich/client/models/user_avatar_color.py +42 -0
- immich/client/models/user_license.py +91 -0
- immich/client/models/user_metadata_key.py +35 -0
- immich/client/models/user_preferences_response_dto.py +186 -0
- immich/client/models/user_preferences_update_dto.py +197 -0
- immich/client/models/user_response_dto.py +105 -0
- immich/client/models/user_status.py +35 -0
- immich/client/models/user_update_me_dto.py +98 -0
- immich/client/models/validate_access_token_response_dto.py +82 -0
- immich/client/models/validate_library_dto.py +93 -0
- immich/client/models/validate_library_import_path_response_dto.py +92 -0
- immich/client/models/validate_library_response_dto.py +103 -0
- immich/client/models/version_check_state_response_dto.py +98 -0
- immich/client/models/video_codec.py +36 -0
- immich/client/models/video_container.py +36 -0
- immich/client/models/workflow_action_item_dto.py +89 -0
- immich/client/models/workflow_action_response_dto.py +105 -0
- immich/client/models/workflow_create_dto.py +128 -0
- immich/client/models/workflow_filter_item_dto.py +89 -0
- immich/client/models/workflow_filter_response_dto.py +105 -0
- immich/client/models/workflow_response_dto.py +144 -0
- immich/client/models/workflow_update_dto.py +128 -0
- immich/client/py.typed +0 -0
- immich/client/rest.py +199 -0
- immich/client_wrapper/__init__.py +15 -0
- immich/client_wrapper/assets_api_wrapped.py +87 -0
- immich/client_wrapper/download_api_wrapped.py +111 -0
- immich/client_wrapper/users_api_wrapped.py +41 -0
- immich/py.typed +0 -0
- immich/sdk.py +365 -0
- immich/utils.py +100 -0
- immich-1.2.1.dist-info/METADATA +166 -0
- immich-1.2.1.dist-info/RECORD +387 -0
- immich-1.2.1.dist-info/WHEEL +4 -0
- immich-1.2.1.dist-info/licenses/LICENSE +9 -0
|
@@ -0,0 +1,2607 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Immich
|
|
5
|
+
|
|
6
|
+
Immich API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.4.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from pydantic import StrictBool
|
|
19
|
+
from uuid import UUID
|
|
20
|
+
from immich.client.models.asset_stats_response_dto import AssetStatsResponseDto
|
|
21
|
+
from immich.client.models.asset_visibility import AssetVisibility
|
|
22
|
+
from immich.client.models.session_response_dto import SessionResponseDto
|
|
23
|
+
from immich.client.models.user_admin_create_dto import UserAdminCreateDto
|
|
24
|
+
from immich.client.models.user_admin_delete_dto import UserAdminDeleteDto
|
|
25
|
+
from immich.client.models.user_admin_response_dto import UserAdminResponseDto
|
|
26
|
+
from immich.client.models.user_admin_update_dto import UserAdminUpdateDto
|
|
27
|
+
from immich.client.models.user_preferences_response_dto import (
|
|
28
|
+
UserPreferencesResponseDto,
|
|
29
|
+
)
|
|
30
|
+
from immich.client.models.user_preferences_update_dto import UserPreferencesUpdateDto
|
|
31
|
+
|
|
32
|
+
from immich.client.api_client import ApiClient, RequestSerialized
|
|
33
|
+
from immich.client.api_response import ApiResponse
|
|
34
|
+
from immich.client.rest import RESTResponseType
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class UsersAdminApi:
|
|
38
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
39
|
+
Ref: https://openapi-generator.tech
|
|
40
|
+
|
|
41
|
+
Do not edit the class manually.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
def __init__(self, api_client=None) -> None:
|
|
45
|
+
if api_client is None:
|
|
46
|
+
api_client = ApiClient.get_default()
|
|
47
|
+
self.api_client = api_client
|
|
48
|
+
|
|
49
|
+
@validate_call
|
|
50
|
+
async def create_user_admin(
|
|
51
|
+
self,
|
|
52
|
+
user_admin_create_dto: UserAdminCreateDto,
|
|
53
|
+
_request_timeout: Union[
|
|
54
|
+
None,
|
|
55
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
56
|
+
Tuple[
|
|
57
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
58
|
+
],
|
|
59
|
+
] = None,
|
|
60
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
61
|
+
_content_type: Optional[StrictStr] = None,
|
|
62
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
63
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
64
|
+
) -> UserAdminResponseDto:
|
|
65
|
+
"""Create a user
|
|
66
|
+
|
|
67
|
+
Create a new user.
|
|
68
|
+
|
|
69
|
+
:param user_admin_create_dto: (required)
|
|
70
|
+
:type user_admin_create_dto: UserAdminCreateDto
|
|
71
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
72
|
+
number provided, it will be total request
|
|
73
|
+
timeout. It can also be a pair (tuple) of
|
|
74
|
+
(connection, read) timeouts.
|
|
75
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
76
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
77
|
+
request; this effectively ignores the
|
|
78
|
+
authentication in the spec for a single request.
|
|
79
|
+
:type _request_auth: dict, optional
|
|
80
|
+
:param _content_type: force content-type for the request.
|
|
81
|
+
:type _content_type: str, Optional
|
|
82
|
+
:param _headers: set to override the headers for a single
|
|
83
|
+
request; this effectively ignores the headers
|
|
84
|
+
in the spec for a single request.
|
|
85
|
+
:type _headers: dict, optional
|
|
86
|
+
:param _host_index: set to override the host_index for a single
|
|
87
|
+
request; this effectively ignores the host_index
|
|
88
|
+
in the spec for a single request.
|
|
89
|
+
:type _host_index: int, optional
|
|
90
|
+
:return: Returns the result object.
|
|
91
|
+
""" # noqa: E501
|
|
92
|
+
|
|
93
|
+
_param = self._create_user_admin_serialize(
|
|
94
|
+
user_admin_create_dto=user_admin_create_dto,
|
|
95
|
+
_request_auth=_request_auth,
|
|
96
|
+
_content_type=_content_type,
|
|
97
|
+
_headers=_headers,
|
|
98
|
+
_host_index=_host_index,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
102
|
+
"201": "UserAdminResponseDto",
|
|
103
|
+
}
|
|
104
|
+
response_data = await self.api_client.call_api(
|
|
105
|
+
*_param, _request_timeout=_request_timeout
|
|
106
|
+
)
|
|
107
|
+
await response_data.read()
|
|
108
|
+
return self.api_client.response_deserialize(
|
|
109
|
+
response_data=response_data,
|
|
110
|
+
response_types_map=_response_types_map,
|
|
111
|
+
).data
|
|
112
|
+
|
|
113
|
+
@validate_call
|
|
114
|
+
async def create_user_admin_with_http_info(
|
|
115
|
+
self,
|
|
116
|
+
user_admin_create_dto: UserAdminCreateDto,
|
|
117
|
+
_request_timeout: Union[
|
|
118
|
+
None,
|
|
119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
120
|
+
Tuple[
|
|
121
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
122
|
+
],
|
|
123
|
+
] = None,
|
|
124
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
125
|
+
_content_type: Optional[StrictStr] = None,
|
|
126
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
128
|
+
) -> ApiResponse[UserAdminResponseDto]:
|
|
129
|
+
"""Create a user
|
|
130
|
+
|
|
131
|
+
Create a new user.
|
|
132
|
+
|
|
133
|
+
:param user_admin_create_dto: (required)
|
|
134
|
+
:type user_admin_create_dto: UserAdminCreateDto
|
|
135
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
136
|
+
number provided, it will be total request
|
|
137
|
+
timeout. It can also be a pair (tuple) of
|
|
138
|
+
(connection, read) timeouts.
|
|
139
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
140
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
141
|
+
request; this effectively ignores the
|
|
142
|
+
authentication in the spec for a single request.
|
|
143
|
+
:type _request_auth: dict, optional
|
|
144
|
+
:param _content_type: force content-type for the request.
|
|
145
|
+
:type _content_type: str, Optional
|
|
146
|
+
:param _headers: set to override the headers for a single
|
|
147
|
+
request; this effectively ignores the headers
|
|
148
|
+
in the spec for a single request.
|
|
149
|
+
:type _headers: dict, optional
|
|
150
|
+
:param _host_index: set to override the host_index for a single
|
|
151
|
+
request; this effectively ignores the host_index
|
|
152
|
+
in the spec for a single request.
|
|
153
|
+
:type _host_index: int, optional
|
|
154
|
+
:return: Returns the result object.
|
|
155
|
+
""" # noqa: E501
|
|
156
|
+
|
|
157
|
+
_param = self._create_user_admin_serialize(
|
|
158
|
+
user_admin_create_dto=user_admin_create_dto,
|
|
159
|
+
_request_auth=_request_auth,
|
|
160
|
+
_content_type=_content_type,
|
|
161
|
+
_headers=_headers,
|
|
162
|
+
_host_index=_host_index,
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
166
|
+
"201": "UserAdminResponseDto",
|
|
167
|
+
}
|
|
168
|
+
response_data = await self.api_client.call_api(
|
|
169
|
+
*_param, _request_timeout=_request_timeout
|
|
170
|
+
)
|
|
171
|
+
await response_data.read()
|
|
172
|
+
return self.api_client.response_deserialize(
|
|
173
|
+
response_data=response_data,
|
|
174
|
+
response_types_map=_response_types_map,
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
@validate_call
|
|
178
|
+
async def create_user_admin_without_preload_content(
|
|
179
|
+
self,
|
|
180
|
+
user_admin_create_dto: UserAdminCreateDto,
|
|
181
|
+
_request_timeout: Union[
|
|
182
|
+
None,
|
|
183
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
184
|
+
Tuple[
|
|
185
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
186
|
+
],
|
|
187
|
+
] = None,
|
|
188
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
189
|
+
_content_type: Optional[StrictStr] = None,
|
|
190
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
191
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
192
|
+
) -> RESTResponseType:
|
|
193
|
+
"""Create a user
|
|
194
|
+
|
|
195
|
+
Create a new user.
|
|
196
|
+
|
|
197
|
+
:param user_admin_create_dto: (required)
|
|
198
|
+
:type user_admin_create_dto: UserAdminCreateDto
|
|
199
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
200
|
+
number provided, it will be total request
|
|
201
|
+
timeout. It can also be a pair (tuple) of
|
|
202
|
+
(connection, read) timeouts.
|
|
203
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
204
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
205
|
+
request; this effectively ignores the
|
|
206
|
+
authentication in the spec for a single request.
|
|
207
|
+
:type _request_auth: dict, optional
|
|
208
|
+
:param _content_type: force content-type for the request.
|
|
209
|
+
:type _content_type: str, Optional
|
|
210
|
+
:param _headers: set to override the headers for a single
|
|
211
|
+
request; this effectively ignores the headers
|
|
212
|
+
in the spec for a single request.
|
|
213
|
+
:type _headers: dict, optional
|
|
214
|
+
:param _host_index: set to override the host_index for a single
|
|
215
|
+
request; this effectively ignores the host_index
|
|
216
|
+
in the spec for a single request.
|
|
217
|
+
:type _host_index: int, optional
|
|
218
|
+
:return: Returns the result object.
|
|
219
|
+
""" # noqa: E501
|
|
220
|
+
|
|
221
|
+
_param = self._create_user_admin_serialize(
|
|
222
|
+
user_admin_create_dto=user_admin_create_dto,
|
|
223
|
+
_request_auth=_request_auth,
|
|
224
|
+
_content_type=_content_type,
|
|
225
|
+
_headers=_headers,
|
|
226
|
+
_host_index=_host_index,
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
230
|
+
"201": "UserAdminResponseDto",
|
|
231
|
+
}
|
|
232
|
+
response_data = await self.api_client.call_api(
|
|
233
|
+
*_param, _request_timeout=_request_timeout
|
|
234
|
+
)
|
|
235
|
+
return response_data.response
|
|
236
|
+
|
|
237
|
+
def _create_user_admin_serialize(
|
|
238
|
+
self,
|
|
239
|
+
user_admin_create_dto,
|
|
240
|
+
_request_auth,
|
|
241
|
+
_content_type,
|
|
242
|
+
_headers,
|
|
243
|
+
_host_index,
|
|
244
|
+
) -> RequestSerialized:
|
|
245
|
+
_host = None
|
|
246
|
+
|
|
247
|
+
_collection_formats: Dict[str, str] = {}
|
|
248
|
+
|
|
249
|
+
_path_params: Dict[str, str] = {}
|
|
250
|
+
_query_params: List[Tuple[str, str]] = []
|
|
251
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
252
|
+
_form_params: List[Tuple[str, str]] = []
|
|
253
|
+
_files: Dict[
|
|
254
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
255
|
+
] = {}
|
|
256
|
+
_body_params: Optional[bytes] = None
|
|
257
|
+
|
|
258
|
+
# process the path parameters
|
|
259
|
+
# process the query parameters
|
|
260
|
+
# process the header parameters
|
|
261
|
+
# process the form parameters
|
|
262
|
+
# process the body parameter
|
|
263
|
+
if user_admin_create_dto is not None:
|
|
264
|
+
_body_params = user_admin_create_dto
|
|
265
|
+
|
|
266
|
+
# set the HTTP header `Accept`
|
|
267
|
+
if "Accept" not in _header_params:
|
|
268
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
269
|
+
["application/json"]
|
|
270
|
+
)
|
|
271
|
+
|
|
272
|
+
# set the HTTP header `Content-Type`
|
|
273
|
+
if _content_type:
|
|
274
|
+
_header_params["Content-Type"] = _content_type
|
|
275
|
+
else:
|
|
276
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
277
|
+
["application/json"]
|
|
278
|
+
)
|
|
279
|
+
if _default_content_type is not None:
|
|
280
|
+
_header_params["Content-Type"] = _default_content_type
|
|
281
|
+
|
|
282
|
+
# authentication setting
|
|
283
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
284
|
+
|
|
285
|
+
return self.api_client.param_serialize(
|
|
286
|
+
method="POST",
|
|
287
|
+
resource_path="/admin/users",
|
|
288
|
+
path_params=_path_params,
|
|
289
|
+
query_params=_query_params,
|
|
290
|
+
header_params=_header_params,
|
|
291
|
+
body=_body_params,
|
|
292
|
+
post_params=_form_params,
|
|
293
|
+
files=_files,
|
|
294
|
+
auth_settings=_auth_settings,
|
|
295
|
+
collection_formats=_collection_formats,
|
|
296
|
+
_host=_host,
|
|
297
|
+
_request_auth=_request_auth,
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
@validate_call
|
|
301
|
+
async def delete_user_admin(
|
|
302
|
+
self,
|
|
303
|
+
id: UUID,
|
|
304
|
+
user_admin_delete_dto: UserAdminDeleteDto,
|
|
305
|
+
_request_timeout: Union[
|
|
306
|
+
None,
|
|
307
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
308
|
+
Tuple[
|
|
309
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
310
|
+
],
|
|
311
|
+
] = None,
|
|
312
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
313
|
+
_content_type: Optional[StrictStr] = None,
|
|
314
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
315
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
316
|
+
) -> UserAdminResponseDto:
|
|
317
|
+
"""Delete a user
|
|
318
|
+
|
|
319
|
+
Delete a user.
|
|
320
|
+
|
|
321
|
+
:param id: (required)
|
|
322
|
+
:type id: UUID
|
|
323
|
+
:param user_admin_delete_dto: (required)
|
|
324
|
+
:type user_admin_delete_dto: UserAdminDeleteDto
|
|
325
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
326
|
+
number provided, it will be total request
|
|
327
|
+
timeout. It can also be a pair (tuple) of
|
|
328
|
+
(connection, read) timeouts.
|
|
329
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
330
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
331
|
+
request; this effectively ignores the
|
|
332
|
+
authentication in the spec for a single request.
|
|
333
|
+
:type _request_auth: dict, optional
|
|
334
|
+
:param _content_type: force content-type for the request.
|
|
335
|
+
:type _content_type: str, Optional
|
|
336
|
+
:param _headers: set to override the headers for a single
|
|
337
|
+
request; this effectively ignores the headers
|
|
338
|
+
in the spec for a single request.
|
|
339
|
+
:type _headers: dict, optional
|
|
340
|
+
:param _host_index: set to override the host_index for a single
|
|
341
|
+
request; this effectively ignores the host_index
|
|
342
|
+
in the spec for a single request.
|
|
343
|
+
:type _host_index: int, optional
|
|
344
|
+
:return: Returns the result object.
|
|
345
|
+
""" # noqa: E501
|
|
346
|
+
|
|
347
|
+
_param = self._delete_user_admin_serialize(
|
|
348
|
+
id=id,
|
|
349
|
+
user_admin_delete_dto=user_admin_delete_dto,
|
|
350
|
+
_request_auth=_request_auth,
|
|
351
|
+
_content_type=_content_type,
|
|
352
|
+
_headers=_headers,
|
|
353
|
+
_host_index=_host_index,
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
357
|
+
"200": "UserAdminResponseDto",
|
|
358
|
+
}
|
|
359
|
+
response_data = await self.api_client.call_api(
|
|
360
|
+
*_param, _request_timeout=_request_timeout
|
|
361
|
+
)
|
|
362
|
+
await response_data.read()
|
|
363
|
+
return self.api_client.response_deserialize(
|
|
364
|
+
response_data=response_data,
|
|
365
|
+
response_types_map=_response_types_map,
|
|
366
|
+
).data
|
|
367
|
+
|
|
368
|
+
@validate_call
|
|
369
|
+
async def delete_user_admin_with_http_info(
|
|
370
|
+
self,
|
|
371
|
+
id: UUID,
|
|
372
|
+
user_admin_delete_dto: UserAdminDeleteDto,
|
|
373
|
+
_request_timeout: Union[
|
|
374
|
+
None,
|
|
375
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
376
|
+
Tuple[
|
|
377
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
378
|
+
],
|
|
379
|
+
] = None,
|
|
380
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
381
|
+
_content_type: Optional[StrictStr] = None,
|
|
382
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
383
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
384
|
+
) -> ApiResponse[UserAdminResponseDto]:
|
|
385
|
+
"""Delete a user
|
|
386
|
+
|
|
387
|
+
Delete a user.
|
|
388
|
+
|
|
389
|
+
:param id: (required)
|
|
390
|
+
:type id: UUID
|
|
391
|
+
:param user_admin_delete_dto: (required)
|
|
392
|
+
:type user_admin_delete_dto: UserAdminDeleteDto
|
|
393
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
394
|
+
number provided, it will be total request
|
|
395
|
+
timeout. It can also be a pair (tuple) of
|
|
396
|
+
(connection, read) timeouts.
|
|
397
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
398
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
399
|
+
request; this effectively ignores the
|
|
400
|
+
authentication in the spec for a single request.
|
|
401
|
+
:type _request_auth: dict, optional
|
|
402
|
+
:param _content_type: force content-type for the request.
|
|
403
|
+
:type _content_type: str, Optional
|
|
404
|
+
:param _headers: set to override the headers for a single
|
|
405
|
+
request; this effectively ignores the headers
|
|
406
|
+
in the spec for a single request.
|
|
407
|
+
:type _headers: dict, optional
|
|
408
|
+
:param _host_index: set to override the host_index for a single
|
|
409
|
+
request; this effectively ignores the host_index
|
|
410
|
+
in the spec for a single request.
|
|
411
|
+
:type _host_index: int, optional
|
|
412
|
+
:return: Returns the result object.
|
|
413
|
+
""" # noqa: E501
|
|
414
|
+
|
|
415
|
+
_param = self._delete_user_admin_serialize(
|
|
416
|
+
id=id,
|
|
417
|
+
user_admin_delete_dto=user_admin_delete_dto,
|
|
418
|
+
_request_auth=_request_auth,
|
|
419
|
+
_content_type=_content_type,
|
|
420
|
+
_headers=_headers,
|
|
421
|
+
_host_index=_host_index,
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
425
|
+
"200": "UserAdminResponseDto",
|
|
426
|
+
}
|
|
427
|
+
response_data = await self.api_client.call_api(
|
|
428
|
+
*_param, _request_timeout=_request_timeout
|
|
429
|
+
)
|
|
430
|
+
await response_data.read()
|
|
431
|
+
return self.api_client.response_deserialize(
|
|
432
|
+
response_data=response_data,
|
|
433
|
+
response_types_map=_response_types_map,
|
|
434
|
+
)
|
|
435
|
+
|
|
436
|
+
@validate_call
|
|
437
|
+
async def delete_user_admin_without_preload_content(
|
|
438
|
+
self,
|
|
439
|
+
id: UUID,
|
|
440
|
+
user_admin_delete_dto: UserAdminDeleteDto,
|
|
441
|
+
_request_timeout: Union[
|
|
442
|
+
None,
|
|
443
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
444
|
+
Tuple[
|
|
445
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
446
|
+
],
|
|
447
|
+
] = None,
|
|
448
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
449
|
+
_content_type: Optional[StrictStr] = None,
|
|
450
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
451
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
452
|
+
) -> RESTResponseType:
|
|
453
|
+
"""Delete a user
|
|
454
|
+
|
|
455
|
+
Delete a user.
|
|
456
|
+
|
|
457
|
+
:param id: (required)
|
|
458
|
+
:type id: UUID
|
|
459
|
+
:param user_admin_delete_dto: (required)
|
|
460
|
+
:type user_admin_delete_dto: UserAdminDeleteDto
|
|
461
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
462
|
+
number provided, it will be total request
|
|
463
|
+
timeout. It can also be a pair (tuple) of
|
|
464
|
+
(connection, read) timeouts.
|
|
465
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
466
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
467
|
+
request; this effectively ignores the
|
|
468
|
+
authentication in the spec for a single request.
|
|
469
|
+
:type _request_auth: dict, optional
|
|
470
|
+
:param _content_type: force content-type for the request.
|
|
471
|
+
:type _content_type: str, Optional
|
|
472
|
+
:param _headers: set to override the headers for a single
|
|
473
|
+
request; this effectively ignores the headers
|
|
474
|
+
in the spec for a single request.
|
|
475
|
+
:type _headers: dict, optional
|
|
476
|
+
:param _host_index: set to override the host_index for a single
|
|
477
|
+
request; this effectively ignores the host_index
|
|
478
|
+
in the spec for a single request.
|
|
479
|
+
:type _host_index: int, optional
|
|
480
|
+
:return: Returns the result object.
|
|
481
|
+
""" # noqa: E501
|
|
482
|
+
|
|
483
|
+
_param = self._delete_user_admin_serialize(
|
|
484
|
+
id=id,
|
|
485
|
+
user_admin_delete_dto=user_admin_delete_dto,
|
|
486
|
+
_request_auth=_request_auth,
|
|
487
|
+
_content_type=_content_type,
|
|
488
|
+
_headers=_headers,
|
|
489
|
+
_host_index=_host_index,
|
|
490
|
+
)
|
|
491
|
+
|
|
492
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
493
|
+
"200": "UserAdminResponseDto",
|
|
494
|
+
}
|
|
495
|
+
response_data = await self.api_client.call_api(
|
|
496
|
+
*_param, _request_timeout=_request_timeout
|
|
497
|
+
)
|
|
498
|
+
return response_data.response
|
|
499
|
+
|
|
500
|
+
def _delete_user_admin_serialize(
|
|
501
|
+
self,
|
|
502
|
+
id,
|
|
503
|
+
user_admin_delete_dto,
|
|
504
|
+
_request_auth,
|
|
505
|
+
_content_type,
|
|
506
|
+
_headers,
|
|
507
|
+
_host_index,
|
|
508
|
+
) -> RequestSerialized:
|
|
509
|
+
_host = None
|
|
510
|
+
|
|
511
|
+
_collection_formats: Dict[str, str] = {}
|
|
512
|
+
|
|
513
|
+
_path_params: Dict[str, str] = {}
|
|
514
|
+
_query_params: List[Tuple[str, str]] = []
|
|
515
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
516
|
+
_form_params: List[Tuple[str, str]] = []
|
|
517
|
+
_files: Dict[
|
|
518
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
519
|
+
] = {}
|
|
520
|
+
_body_params: Optional[bytes] = None
|
|
521
|
+
|
|
522
|
+
# process the path parameters
|
|
523
|
+
if id is not None:
|
|
524
|
+
_path_params["id"] = id
|
|
525
|
+
# process the query parameters
|
|
526
|
+
# process the header parameters
|
|
527
|
+
# process the form parameters
|
|
528
|
+
# process the body parameter
|
|
529
|
+
if user_admin_delete_dto is not None:
|
|
530
|
+
_body_params = user_admin_delete_dto
|
|
531
|
+
|
|
532
|
+
# set the HTTP header `Accept`
|
|
533
|
+
if "Accept" not in _header_params:
|
|
534
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
535
|
+
["application/json"]
|
|
536
|
+
)
|
|
537
|
+
|
|
538
|
+
# set the HTTP header `Content-Type`
|
|
539
|
+
if _content_type:
|
|
540
|
+
_header_params["Content-Type"] = _content_type
|
|
541
|
+
else:
|
|
542
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
543
|
+
["application/json"]
|
|
544
|
+
)
|
|
545
|
+
if _default_content_type is not None:
|
|
546
|
+
_header_params["Content-Type"] = _default_content_type
|
|
547
|
+
|
|
548
|
+
# authentication setting
|
|
549
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
550
|
+
|
|
551
|
+
return self.api_client.param_serialize(
|
|
552
|
+
method="DELETE",
|
|
553
|
+
resource_path="/admin/users/{id}",
|
|
554
|
+
path_params=_path_params,
|
|
555
|
+
query_params=_query_params,
|
|
556
|
+
header_params=_header_params,
|
|
557
|
+
body=_body_params,
|
|
558
|
+
post_params=_form_params,
|
|
559
|
+
files=_files,
|
|
560
|
+
auth_settings=_auth_settings,
|
|
561
|
+
collection_formats=_collection_formats,
|
|
562
|
+
_host=_host,
|
|
563
|
+
_request_auth=_request_auth,
|
|
564
|
+
)
|
|
565
|
+
|
|
566
|
+
@validate_call
|
|
567
|
+
async def get_user_admin(
|
|
568
|
+
self,
|
|
569
|
+
id: UUID,
|
|
570
|
+
_request_timeout: Union[
|
|
571
|
+
None,
|
|
572
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
573
|
+
Tuple[
|
|
574
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
575
|
+
],
|
|
576
|
+
] = None,
|
|
577
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
578
|
+
_content_type: Optional[StrictStr] = None,
|
|
579
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
580
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
581
|
+
) -> UserAdminResponseDto:
|
|
582
|
+
"""Retrieve a user
|
|
583
|
+
|
|
584
|
+
Retrieve a specific user by their ID.
|
|
585
|
+
|
|
586
|
+
:param id: (required)
|
|
587
|
+
:type id: UUID
|
|
588
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
589
|
+
number provided, it will be total request
|
|
590
|
+
timeout. It can also be a pair (tuple) of
|
|
591
|
+
(connection, read) timeouts.
|
|
592
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
593
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
594
|
+
request; this effectively ignores the
|
|
595
|
+
authentication in the spec for a single request.
|
|
596
|
+
:type _request_auth: dict, optional
|
|
597
|
+
:param _content_type: force content-type for the request.
|
|
598
|
+
:type _content_type: str, Optional
|
|
599
|
+
:param _headers: set to override the headers for a single
|
|
600
|
+
request; this effectively ignores the headers
|
|
601
|
+
in the spec for a single request.
|
|
602
|
+
:type _headers: dict, optional
|
|
603
|
+
:param _host_index: set to override the host_index for a single
|
|
604
|
+
request; this effectively ignores the host_index
|
|
605
|
+
in the spec for a single request.
|
|
606
|
+
:type _host_index: int, optional
|
|
607
|
+
:return: Returns the result object.
|
|
608
|
+
""" # noqa: E501
|
|
609
|
+
|
|
610
|
+
_param = self._get_user_admin_serialize(
|
|
611
|
+
id=id,
|
|
612
|
+
_request_auth=_request_auth,
|
|
613
|
+
_content_type=_content_type,
|
|
614
|
+
_headers=_headers,
|
|
615
|
+
_host_index=_host_index,
|
|
616
|
+
)
|
|
617
|
+
|
|
618
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
619
|
+
"200": "UserAdminResponseDto",
|
|
620
|
+
}
|
|
621
|
+
response_data = await self.api_client.call_api(
|
|
622
|
+
*_param, _request_timeout=_request_timeout
|
|
623
|
+
)
|
|
624
|
+
await response_data.read()
|
|
625
|
+
return self.api_client.response_deserialize(
|
|
626
|
+
response_data=response_data,
|
|
627
|
+
response_types_map=_response_types_map,
|
|
628
|
+
).data
|
|
629
|
+
|
|
630
|
+
@validate_call
|
|
631
|
+
async def get_user_admin_with_http_info(
|
|
632
|
+
self,
|
|
633
|
+
id: UUID,
|
|
634
|
+
_request_timeout: Union[
|
|
635
|
+
None,
|
|
636
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
637
|
+
Tuple[
|
|
638
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
639
|
+
],
|
|
640
|
+
] = None,
|
|
641
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
642
|
+
_content_type: Optional[StrictStr] = None,
|
|
643
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
644
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
645
|
+
) -> ApiResponse[UserAdminResponseDto]:
|
|
646
|
+
"""Retrieve a user
|
|
647
|
+
|
|
648
|
+
Retrieve a specific user by their ID.
|
|
649
|
+
|
|
650
|
+
:param id: (required)
|
|
651
|
+
:type id: UUID
|
|
652
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
653
|
+
number provided, it will be total request
|
|
654
|
+
timeout. It can also be a pair (tuple) of
|
|
655
|
+
(connection, read) timeouts.
|
|
656
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
657
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
658
|
+
request; this effectively ignores the
|
|
659
|
+
authentication in the spec for a single request.
|
|
660
|
+
:type _request_auth: dict, optional
|
|
661
|
+
:param _content_type: force content-type for the request.
|
|
662
|
+
:type _content_type: str, Optional
|
|
663
|
+
:param _headers: set to override the headers for a single
|
|
664
|
+
request; this effectively ignores the headers
|
|
665
|
+
in the spec for a single request.
|
|
666
|
+
:type _headers: dict, optional
|
|
667
|
+
:param _host_index: set to override the host_index for a single
|
|
668
|
+
request; this effectively ignores the host_index
|
|
669
|
+
in the spec for a single request.
|
|
670
|
+
:type _host_index: int, optional
|
|
671
|
+
:return: Returns the result object.
|
|
672
|
+
""" # noqa: E501
|
|
673
|
+
|
|
674
|
+
_param = self._get_user_admin_serialize(
|
|
675
|
+
id=id,
|
|
676
|
+
_request_auth=_request_auth,
|
|
677
|
+
_content_type=_content_type,
|
|
678
|
+
_headers=_headers,
|
|
679
|
+
_host_index=_host_index,
|
|
680
|
+
)
|
|
681
|
+
|
|
682
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
683
|
+
"200": "UserAdminResponseDto",
|
|
684
|
+
}
|
|
685
|
+
response_data = await self.api_client.call_api(
|
|
686
|
+
*_param, _request_timeout=_request_timeout
|
|
687
|
+
)
|
|
688
|
+
await response_data.read()
|
|
689
|
+
return self.api_client.response_deserialize(
|
|
690
|
+
response_data=response_data,
|
|
691
|
+
response_types_map=_response_types_map,
|
|
692
|
+
)
|
|
693
|
+
|
|
694
|
+
@validate_call
|
|
695
|
+
async def get_user_admin_without_preload_content(
|
|
696
|
+
self,
|
|
697
|
+
id: UUID,
|
|
698
|
+
_request_timeout: Union[
|
|
699
|
+
None,
|
|
700
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
701
|
+
Tuple[
|
|
702
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
703
|
+
],
|
|
704
|
+
] = None,
|
|
705
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
706
|
+
_content_type: Optional[StrictStr] = None,
|
|
707
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
708
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
709
|
+
) -> RESTResponseType:
|
|
710
|
+
"""Retrieve a user
|
|
711
|
+
|
|
712
|
+
Retrieve a specific user by their ID.
|
|
713
|
+
|
|
714
|
+
:param id: (required)
|
|
715
|
+
:type id: UUID
|
|
716
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
717
|
+
number provided, it will be total request
|
|
718
|
+
timeout. It can also be a pair (tuple) of
|
|
719
|
+
(connection, read) timeouts.
|
|
720
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
721
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
722
|
+
request; this effectively ignores the
|
|
723
|
+
authentication in the spec for a single request.
|
|
724
|
+
:type _request_auth: dict, optional
|
|
725
|
+
:param _content_type: force content-type for the request.
|
|
726
|
+
:type _content_type: str, Optional
|
|
727
|
+
:param _headers: set to override the headers for a single
|
|
728
|
+
request; this effectively ignores the headers
|
|
729
|
+
in the spec for a single request.
|
|
730
|
+
:type _headers: dict, optional
|
|
731
|
+
:param _host_index: set to override the host_index for a single
|
|
732
|
+
request; this effectively ignores the host_index
|
|
733
|
+
in the spec for a single request.
|
|
734
|
+
:type _host_index: int, optional
|
|
735
|
+
:return: Returns the result object.
|
|
736
|
+
""" # noqa: E501
|
|
737
|
+
|
|
738
|
+
_param = self._get_user_admin_serialize(
|
|
739
|
+
id=id,
|
|
740
|
+
_request_auth=_request_auth,
|
|
741
|
+
_content_type=_content_type,
|
|
742
|
+
_headers=_headers,
|
|
743
|
+
_host_index=_host_index,
|
|
744
|
+
)
|
|
745
|
+
|
|
746
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
747
|
+
"200": "UserAdminResponseDto",
|
|
748
|
+
}
|
|
749
|
+
response_data = await self.api_client.call_api(
|
|
750
|
+
*_param, _request_timeout=_request_timeout
|
|
751
|
+
)
|
|
752
|
+
return response_data.response
|
|
753
|
+
|
|
754
|
+
def _get_user_admin_serialize(
|
|
755
|
+
self,
|
|
756
|
+
id,
|
|
757
|
+
_request_auth,
|
|
758
|
+
_content_type,
|
|
759
|
+
_headers,
|
|
760
|
+
_host_index,
|
|
761
|
+
) -> RequestSerialized:
|
|
762
|
+
_host = None
|
|
763
|
+
|
|
764
|
+
_collection_formats: Dict[str, str] = {}
|
|
765
|
+
|
|
766
|
+
_path_params: Dict[str, str] = {}
|
|
767
|
+
_query_params: List[Tuple[str, str]] = []
|
|
768
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
769
|
+
_form_params: List[Tuple[str, str]] = []
|
|
770
|
+
_files: Dict[
|
|
771
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
772
|
+
] = {}
|
|
773
|
+
_body_params: Optional[bytes] = None
|
|
774
|
+
|
|
775
|
+
# process the path parameters
|
|
776
|
+
if id is not None:
|
|
777
|
+
_path_params["id"] = id
|
|
778
|
+
# process the query parameters
|
|
779
|
+
# process the header parameters
|
|
780
|
+
# process the form parameters
|
|
781
|
+
# process the body parameter
|
|
782
|
+
|
|
783
|
+
# set the HTTP header `Accept`
|
|
784
|
+
if "Accept" not in _header_params:
|
|
785
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
786
|
+
["application/json"]
|
|
787
|
+
)
|
|
788
|
+
|
|
789
|
+
# authentication setting
|
|
790
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
791
|
+
|
|
792
|
+
return self.api_client.param_serialize(
|
|
793
|
+
method="GET",
|
|
794
|
+
resource_path="/admin/users/{id}",
|
|
795
|
+
path_params=_path_params,
|
|
796
|
+
query_params=_query_params,
|
|
797
|
+
header_params=_header_params,
|
|
798
|
+
body=_body_params,
|
|
799
|
+
post_params=_form_params,
|
|
800
|
+
files=_files,
|
|
801
|
+
auth_settings=_auth_settings,
|
|
802
|
+
collection_formats=_collection_formats,
|
|
803
|
+
_host=_host,
|
|
804
|
+
_request_auth=_request_auth,
|
|
805
|
+
)
|
|
806
|
+
|
|
807
|
+
@validate_call
|
|
808
|
+
async def get_user_preferences_admin(
|
|
809
|
+
self,
|
|
810
|
+
id: UUID,
|
|
811
|
+
_request_timeout: Union[
|
|
812
|
+
None,
|
|
813
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
814
|
+
Tuple[
|
|
815
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
816
|
+
],
|
|
817
|
+
] = None,
|
|
818
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
819
|
+
_content_type: Optional[StrictStr] = None,
|
|
820
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
821
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
822
|
+
) -> UserPreferencesResponseDto:
|
|
823
|
+
"""Retrieve user preferences
|
|
824
|
+
|
|
825
|
+
Retrieve the preferences of a specific user.
|
|
826
|
+
|
|
827
|
+
:param id: (required)
|
|
828
|
+
:type id: UUID
|
|
829
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
830
|
+
number provided, it will be total request
|
|
831
|
+
timeout. It can also be a pair (tuple) of
|
|
832
|
+
(connection, read) timeouts.
|
|
833
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
834
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
835
|
+
request; this effectively ignores the
|
|
836
|
+
authentication in the spec for a single request.
|
|
837
|
+
:type _request_auth: dict, optional
|
|
838
|
+
:param _content_type: force content-type for the request.
|
|
839
|
+
:type _content_type: str, Optional
|
|
840
|
+
:param _headers: set to override the headers for a single
|
|
841
|
+
request; this effectively ignores the headers
|
|
842
|
+
in the spec for a single request.
|
|
843
|
+
:type _headers: dict, optional
|
|
844
|
+
:param _host_index: set to override the host_index for a single
|
|
845
|
+
request; this effectively ignores the host_index
|
|
846
|
+
in the spec for a single request.
|
|
847
|
+
:type _host_index: int, optional
|
|
848
|
+
:return: Returns the result object.
|
|
849
|
+
""" # noqa: E501
|
|
850
|
+
|
|
851
|
+
_param = self._get_user_preferences_admin_serialize(
|
|
852
|
+
id=id,
|
|
853
|
+
_request_auth=_request_auth,
|
|
854
|
+
_content_type=_content_type,
|
|
855
|
+
_headers=_headers,
|
|
856
|
+
_host_index=_host_index,
|
|
857
|
+
)
|
|
858
|
+
|
|
859
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
860
|
+
"200": "UserPreferencesResponseDto",
|
|
861
|
+
}
|
|
862
|
+
response_data = await self.api_client.call_api(
|
|
863
|
+
*_param, _request_timeout=_request_timeout
|
|
864
|
+
)
|
|
865
|
+
await response_data.read()
|
|
866
|
+
return self.api_client.response_deserialize(
|
|
867
|
+
response_data=response_data,
|
|
868
|
+
response_types_map=_response_types_map,
|
|
869
|
+
).data
|
|
870
|
+
|
|
871
|
+
@validate_call
|
|
872
|
+
async def get_user_preferences_admin_with_http_info(
|
|
873
|
+
self,
|
|
874
|
+
id: UUID,
|
|
875
|
+
_request_timeout: Union[
|
|
876
|
+
None,
|
|
877
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
878
|
+
Tuple[
|
|
879
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
880
|
+
],
|
|
881
|
+
] = None,
|
|
882
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
883
|
+
_content_type: Optional[StrictStr] = None,
|
|
884
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
885
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
886
|
+
) -> ApiResponse[UserPreferencesResponseDto]:
|
|
887
|
+
"""Retrieve user preferences
|
|
888
|
+
|
|
889
|
+
Retrieve the preferences of a specific user.
|
|
890
|
+
|
|
891
|
+
:param id: (required)
|
|
892
|
+
:type id: UUID
|
|
893
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
894
|
+
number provided, it will be total request
|
|
895
|
+
timeout. It can also be a pair (tuple) of
|
|
896
|
+
(connection, read) timeouts.
|
|
897
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
898
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
899
|
+
request; this effectively ignores the
|
|
900
|
+
authentication in the spec for a single request.
|
|
901
|
+
:type _request_auth: dict, optional
|
|
902
|
+
:param _content_type: force content-type for the request.
|
|
903
|
+
:type _content_type: str, Optional
|
|
904
|
+
:param _headers: set to override the headers for a single
|
|
905
|
+
request; this effectively ignores the headers
|
|
906
|
+
in the spec for a single request.
|
|
907
|
+
:type _headers: dict, optional
|
|
908
|
+
:param _host_index: set to override the host_index for a single
|
|
909
|
+
request; this effectively ignores the host_index
|
|
910
|
+
in the spec for a single request.
|
|
911
|
+
:type _host_index: int, optional
|
|
912
|
+
:return: Returns the result object.
|
|
913
|
+
""" # noqa: E501
|
|
914
|
+
|
|
915
|
+
_param = self._get_user_preferences_admin_serialize(
|
|
916
|
+
id=id,
|
|
917
|
+
_request_auth=_request_auth,
|
|
918
|
+
_content_type=_content_type,
|
|
919
|
+
_headers=_headers,
|
|
920
|
+
_host_index=_host_index,
|
|
921
|
+
)
|
|
922
|
+
|
|
923
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
924
|
+
"200": "UserPreferencesResponseDto",
|
|
925
|
+
}
|
|
926
|
+
response_data = await self.api_client.call_api(
|
|
927
|
+
*_param, _request_timeout=_request_timeout
|
|
928
|
+
)
|
|
929
|
+
await response_data.read()
|
|
930
|
+
return self.api_client.response_deserialize(
|
|
931
|
+
response_data=response_data,
|
|
932
|
+
response_types_map=_response_types_map,
|
|
933
|
+
)
|
|
934
|
+
|
|
935
|
+
@validate_call
|
|
936
|
+
async def get_user_preferences_admin_without_preload_content(
|
|
937
|
+
self,
|
|
938
|
+
id: UUID,
|
|
939
|
+
_request_timeout: Union[
|
|
940
|
+
None,
|
|
941
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
942
|
+
Tuple[
|
|
943
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
944
|
+
],
|
|
945
|
+
] = None,
|
|
946
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
947
|
+
_content_type: Optional[StrictStr] = None,
|
|
948
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
949
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
950
|
+
) -> RESTResponseType:
|
|
951
|
+
"""Retrieve user preferences
|
|
952
|
+
|
|
953
|
+
Retrieve the preferences of a specific user.
|
|
954
|
+
|
|
955
|
+
:param id: (required)
|
|
956
|
+
:type id: UUID
|
|
957
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
958
|
+
number provided, it will be total request
|
|
959
|
+
timeout. It can also be a pair (tuple) of
|
|
960
|
+
(connection, read) timeouts.
|
|
961
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
962
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
963
|
+
request; this effectively ignores the
|
|
964
|
+
authentication in the spec for a single request.
|
|
965
|
+
:type _request_auth: dict, optional
|
|
966
|
+
:param _content_type: force content-type for the request.
|
|
967
|
+
:type _content_type: str, Optional
|
|
968
|
+
:param _headers: set to override the headers for a single
|
|
969
|
+
request; this effectively ignores the headers
|
|
970
|
+
in the spec for a single request.
|
|
971
|
+
:type _headers: dict, optional
|
|
972
|
+
:param _host_index: set to override the host_index for a single
|
|
973
|
+
request; this effectively ignores the host_index
|
|
974
|
+
in the spec for a single request.
|
|
975
|
+
:type _host_index: int, optional
|
|
976
|
+
:return: Returns the result object.
|
|
977
|
+
""" # noqa: E501
|
|
978
|
+
|
|
979
|
+
_param = self._get_user_preferences_admin_serialize(
|
|
980
|
+
id=id,
|
|
981
|
+
_request_auth=_request_auth,
|
|
982
|
+
_content_type=_content_type,
|
|
983
|
+
_headers=_headers,
|
|
984
|
+
_host_index=_host_index,
|
|
985
|
+
)
|
|
986
|
+
|
|
987
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
988
|
+
"200": "UserPreferencesResponseDto",
|
|
989
|
+
}
|
|
990
|
+
response_data = await self.api_client.call_api(
|
|
991
|
+
*_param, _request_timeout=_request_timeout
|
|
992
|
+
)
|
|
993
|
+
return response_data.response
|
|
994
|
+
|
|
995
|
+
def _get_user_preferences_admin_serialize(
|
|
996
|
+
self,
|
|
997
|
+
id,
|
|
998
|
+
_request_auth,
|
|
999
|
+
_content_type,
|
|
1000
|
+
_headers,
|
|
1001
|
+
_host_index,
|
|
1002
|
+
) -> RequestSerialized:
|
|
1003
|
+
_host = None
|
|
1004
|
+
|
|
1005
|
+
_collection_formats: Dict[str, str] = {}
|
|
1006
|
+
|
|
1007
|
+
_path_params: Dict[str, str] = {}
|
|
1008
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1009
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1010
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1011
|
+
_files: Dict[
|
|
1012
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1013
|
+
] = {}
|
|
1014
|
+
_body_params: Optional[bytes] = None
|
|
1015
|
+
|
|
1016
|
+
# process the path parameters
|
|
1017
|
+
if id is not None:
|
|
1018
|
+
_path_params["id"] = id
|
|
1019
|
+
# process the query parameters
|
|
1020
|
+
# process the header parameters
|
|
1021
|
+
# process the form parameters
|
|
1022
|
+
# process the body parameter
|
|
1023
|
+
|
|
1024
|
+
# set the HTTP header `Accept`
|
|
1025
|
+
if "Accept" not in _header_params:
|
|
1026
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1027
|
+
["application/json"]
|
|
1028
|
+
)
|
|
1029
|
+
|
|
1030
|
+
# authentication setting
|
|
1031
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
1032
|
+
|
|
1033
|
+
return self.api_client.param_serialize(
|
|
1034
|
+
method="GET",
|
|
1035
|
+
resource_path="/admin/users/{id}/preferences",
|
|
1036
|
+
path_params=_path_params,
|
|
1037
|
+
query_params=_query_params,
|
|
1038
|
+
header_params=_header_params,
|
|
1039
|
+
body=_body_params,
|
|
1040
|
+
post_params=_form_params,
|
|
1041
|
+
files=_files,
|
|
1042
|
+
auth_settings=_auth_settings,
|
|
1043
|
+
collection_formats=_collection_formats,
|
|
1044
|
+
_host=_host,
|
|
1045
|
+
_request_auth=_request_auth,
|
|
1046
|
+
)
|
|
1047
|
+
|
|
1048
|
+
@validate_call
|
|
1049
|
+
async def get_user_sessions_admin(
|
|
1050
|
+
self,
|
|
1051
|
+
id: UUID,
|
|
1052
|
+
_request_timeout: Union[
|
|
1053
|
+
None,
|
|
1054
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1055
|
+
Tuple[
|
|
1056
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1057
|
+
],
|
|
1058
|
+
] = None,
|
|
1059
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1060
|
+
_content_type: Optional[StrictStr] = None,
|
|
1061
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1062
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1063
|
+
) -> List[SessionResponseDto]:
|
|
1064
|
+
"""Retrieve user sessions
|
|
1065
|
+
|
|
1066
|
+
Retrieve all sessions for a specific user.
|
|
1067
|
+
|
|
1068
|
+
:param id: (required)
|
|
1069
|
+
:type id: UUID
|
|
1070
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1071
|
+
number provided, it will be total request
|
|
1072
|
+
timeout. It can also be a pair (tuple) of
|
|
1073
|
+
(connection, read) timeouts.
|
|
1074
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1075
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1076
|
+
request; this effectively ignores the
|
|
1077
|
+
authentication in the spec for a single request.
|
|
1078
|
+
:type _request_auth: dict, optional
|
|
1079
|
+
:param _content_type: force content-type for the request.
|
|
1080
|
+
:type _content_type: str, Optional
|
|
1081
|
+
:param _headers: set to override the headers for a single
|
|
1082
|
+
request; this effectively ignores the headers
|
|
1083
|
+
in the spec for a single request.
|
|
1084
|
+
:type _headers: dict, optional
|
|
1085
|
+
:param _host_index: set to override the host_index for a single
|
|
1086
|
+
request; this effectively ignores the host_index
|
|
1087
|
+
in the spec for a single request.
|
|
1088
|
+
:type _host_index: int, optional
|
|
1089
|
+
:return: Returns the result object.
|
|
1090
|
+
""" # noqa: E501
|
|
1091
|
+
|
|
1092
|
+
_param = self._get_user_sessions_admin_serialize(
|
|
1093
|
+
id=id,
|
|
1094
|
+
_request_auth=_request_auth,
|
|
1095
|
+
_content_type=_content_type,
|
|
1096
|
+
_headers=_headers,
|
|
1097
|
+
_host_index=_host_index,
|
|
1098
|
+
)
|
|
1099
|
+
|
|
1100
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1101
|
+
"200": "List[SessionResponseDto]",
|
|
1102
|
+
}
|
|
1103
|
+
response_data = await self.api_client.call_api(
|
|
1104
|
+
*_param, _request_timeout=_request_timeout
|
|
1105
|
+
)
|
|
1106
|
+
await response_data.read()
|
|
1107
|
+
return self.api_client.response_deserialize(
|
|
1108
|
+
response_data=response_data,
|
|
1109
|
+
response_types_map=_response_types_map,
|
|
1110
|
+
).data
|
|
1111
|
+
|
|
1112
|
+
@validate_call
|
|
1113
|
+
async def get_user_sessions_admin_with_http_info(
|
|
1114
|
+
self,
|
|
1115
|
+
id: UUID,
|
|
1116
|
+
_request_timeout: Union[
|
|
1117
|
+
None,
|
|
1118
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1119
|
+
Tuple[
|
|
1120
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1121
|
+
],
|
|
1122
|
+
] = None,
|
|
1123
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1124
|
+
_content_type: Optional[StrictStr] = None,
|
|
1125
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1126
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1127
|
+
) -> ApiResponse[List[SessionResponseDto]]:
|
|
1128
|
+
"""Retrieve user sessions
|
|
1129
|
+
|
|
1130
|
+
Retrieve all sessions for a specific user.
|
|
1131
|
+
|
|
1132
|
+
:param id: (required)
|
|
1133
|
+
:type id: UUID
|
|
1134
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1135
|
+
number provided, it will be total request
|
|
1136
|
+
timeout. It can also be a pair (tuple) of
|
|
1137
|
+
(connection, read) timeouts.
|
|
1138
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1139
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1140
|
+
request; this effectively ignores the
|
|
1141
|
+
authentication in the spec for a single request.
|
|
1142
|
+
:type _request_auth: dict, optional
|
|
1143
|
+
:param _content_type: force content-type for the request.
|
|
1144
|
+
:type _content_type: str, Optional
|
|
1145
|
+
:param _headers: set to override the headers for a single
|
|
1146
|
+
request; this effectively ignores the headers
|
|
1147
|
+
in the spec for a single request.
|
|
1148
|
+
:type _headers: dict, optional
|
|
1149
|
+
:param _host_index: set to override the host_index for a single
|
|
1150
|
+
request; this effectively ignores the host_index
|
|
1151
|
+
in the spec for a single request.
|
|
1152
|
+
:type _host_index: int, optional
|
|
1153
|
+
:return: Returns the result object.
|
|
1154
|
+
""" # noqa: E501
|
|
1155
|
+
|
|
1156
|
+
_param = self._get_user_sessions_admin_serialize(
|
|
1157
|
+
id=id,
|
|
1158
|
+
_request_auth=_request_auth,
|
|
1159
|
+
_content_type=_content_type,
|
|
1160
|
+
_headers=_headers,
|
|
1161
|
+
_host_index=_host_index,
|
|
1162
|
+
)
|
|
1163
|
+
|
|
1164
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1165
|
+
"200": "List[SessionResponseDto]",
|
|
1166
|
+
}
|
|
1167
|
+
response_data = await self.api_client.call_api(
|
|
1168
|
+
*_param, _request_timeout=_request_timeout
|
|
1169
|
+
)
|
|
1170
|
+
await response_data.read()
|
|
1171
|
+
return self.api_client.response_deserialize(
|
|
1172
|
+
response_data=response_data,
|
|
1173
|
+
response_types_map=_response_types_map,
|
|
1174
|
+
)
|
|
1175
|
+
|
|
1176
|
+
@validate_call
|
|
1177
|
+
async def get_user_sessions_admin_without_preload_content(
|
|
1178
|
+
self,
|
|
1179
|
+
id: UUID,
|
|
1180
|
+
_request_timeout: Union[
|
|
1181
|
+
None,
|
|
1182
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1183
|
+
Tuple[
|
|
1184
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1185
|
+
],
|
|
1186
|
+
] = None,
|
|
1187
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1188
|
+
_content_type: Optional[StrictStr] = None,
|
|
1189
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1190
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1191
|
+
) -> RESTResponseType:
|
|
1192
|
+
"""Retrieve user sessions
|
|
1193
|
+
|
|
1194
|
+
Retrieve all sessions for a specific user.
|
|
1195
|
+
|
|
1196
|
+
:param id: (required)
|
|
1197
|
+
:type id: UUID
|
|
1198
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1199
|
+
number provided, it will be total request
|
|
1200
|
+
timeout. It can also be a pair (tuple) of
|
|
1201
|
+
(connection, read) timeouts.
|
|
1202
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1203
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1204
|
+
request; this effectively ignores the
|
|
1205
|
+
authentication in the spec for a single request.
|
|
1206
|
+
:type _request_auth: dict, optional
|
|
1207
|
+
:param _content_type: force content-type for the request.
|
|
1208
|
+
:type _content_type: str, Optional
|
|
1209
|
+
:param _headers: set to override the headers for a single
|
|
1210
|
+
request; this effectively ignores the headers
|
|
1211
|
+
in the spec for a single request.
|
|
1212
|
+
:type _headers: dict, optional
|
|
1213
|
+
:param _host_index: set to override the host_index for a single
|
|
1214
|
+
request; this effectively ignores the host_index
|
|
1215
|
+
in the spec for a single request.
|
|
1216
|
+
:type _host_index: int, optional
|
|
1217
|
+
:return: Returns the result object.
|
|
1218
|
+
""" # noqa: E501
|
|
1219
|
+
|
|
1220
|
+
_param = self._get_user_sessions_admin_serialize(
|
|
1221
|
+
id=id,
|
|
1222
|
+
_request_auth=_request_auth,
|
|
1223
|
+
_content_type=_content_type,
|
|
1224
|
+
_headers=_headers,
|
|
1225
|
+
_host_index=_host_index,
|
|
1226
|
+
)
|
|
1227
|
+
|
|
1228
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1229
|
+
"200": "List[SessionResponseDto]",
|
|
1230
|
+
}
|
|
1231
|
+
response_data = await self.api_client.call_api(
|
|
1232
|
+
*_param, _request_timeout=_request_timeout
|
|
1233
|
+
)
|
|
1234
|
+
return response_data.response
|
|
1235
|
+
|
|
1236
|
+
def _get_user_sessions_admin_serialize(
|
|
1237
|
+
self,
|
|
1238
|
+
id,
|
|
1239
|
+
_request_auth,
|
|
1240
|
+
_content_type,
|
|
1241
|
+
_headers,
|
|
1242
|
+
_host_index,
|
|
1243
|
+
) -> RequestSerialized:
|
|
1244
|
+
_host = None
|
|
1245
|
+
|
|
1246
|
+
_collection_formats: Dict[str, str] = {}
|
|
1247
|
+
|
|
1248
|
+
_path_params: Dict[str, str] = {}
|
|
1249
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1250
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1251
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1252
|
+
_files: Dict[
|
|
1253
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1254
|
+
] = {}
|
|
1255
|
+
_body_params: Optional[bytes] = None
|
|
1256
|
+
|
|
1257
|
+
# process the path parameters
|
|
1258
|
+
if id is not None:
|
|
1259
|
+
_path_params["id"] = id
|
|
1260
|
+
# process the query parameters
|
|
1261
|
+
# process the header parameters
|
|
1262
|
+
# process the form parameters
|
|
1263
|
+
# process the body parameter
|
|
1264
|
+
|
|
1265
|
+
# set the HTTP header `Accept`
|
|
1266
|
+
if "Accept" not in _header_params:
|
|
1267
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1268
|
+
["application/json"]
|
|
1269
|
+
)
|
|
1270
|
+
|
|
1271
|
+
# authentication setting
|
|
1272
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
1273
|
+
|
|
1274
|
+
return self.api_client.param_serialize(
|
|
1275
|
+
method="GET",
|
|
1276
|
+
resource_path="/admin/users/{id}/sessions",
|
|
1277
|
+
path_params=_path_params,
|
|
1278
|
+
query_params=_query_params,
|
|
1279
|
+
header_params=_header_params,
|
|
1280
|
+
body=_body_params,
|
|
1281
|
+
post_params=_form_params,
|
|
1282
|
+
files=_files,
|
|
1283
|
+
auth_settings=_auth_settings,
|
|
1284
|
+
collection_formats=_collection_formats,
|
|
1285
|
+
_host=_host,
|
|
1286
|
+
_request_auth=_request_auth,
|
|
1287
|
+
)
|
|
1288
|
+
|
|
1289
|
+
@validate_call
|
|
1290
|
+
async def get_user_statistics_admin(
|
|
1291
|
+
self,
|
|
1292
|
+
id: UUID,
|
|
1293
|
+
is_favorite: Optional[StrictBool] = None,
|
|
1294
|
+
is_trashed: Optional[StrictBool] = None,
|
|
1295
|
+
visibility: Optional[AssetVisibility] = None,
|
|
1296
|
+
_request_timeout: Union[
|
|
1297
|
+
None,
|
|
1298
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1299
|
+
Tuple[
|
|
1300
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1301
|
+
],
|
|
1302
|
+
] = None,
|
|
1303
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1304
|
+
_content_type: Optional[StrictStr] = None,
|
|
1305
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1306
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1307
|
+
) -> AssetStatsResponseDto:
|
|
1308
|
+
"""Retrieve user statistics
|
|
1309
|
+
|
|
1310
|
+
Retrieve asset statistics for a specific user.
|
|
1311
|
+
|
|
1312
|
+
:param id: (required)
|
|
1313
|
+
:type id: UUID
|
|
1314
|
+
:param is_favorite:
|
|
1315
|
+
:type is_favorite: bool
|
|
1316
|
+
:param is_trashed:
|
|
1317
|
+
:type is_trashed: bool
|
|
1318
|
+
:param visibility:
|
|
1319
|
+
:type visibility: AssetVisibility
|
|
1320
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1321
|
+
number provided, it will be total request
|
|
1322
|
+
timeout. It can also be a pair (tuple) of
|
|
1323
|
+
(connection, read) timeouts.
|
|
1324
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1325
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1326
|
+
request; this effectively ignores the
|
|
1327
|
+
authentication in the spec for a single request.
|
|
1328
|
+
:type _request_auth: dict, optional
|
|
1329
|
+
:param _content_type: force content-type for the request.
|
|
1330
|
+
:type _content_type: str, Optional
|
|
1331
|
+
:param _headers: set to override the headers for a single
|
|
1332
|
+
request; this effectively ignores the headers
|
|
1333
|
+
in the spec for a single request.
|
|
1334
|
+
:type _headers: dict, optional
|
|
1335
|
+
:param _host_index: set to override the host_index for a single
|
|
1336
|
+
request; this effectively ignores the host_index
|
|
1337
|
+
in the spec for a single request.
|
|
1338
|
+
:type _host_index: int, optional
|
|
1339
|
+
:return: Returns the result object.
|
|
1340
|
+
""" # noqa: E501
|
|
1341
|
+
|
|
1342
|
+
_param = self._get_user_statistics_admin_serialize(
|
|
1343
|
+
id=id,
|
|
1344
|
+
is_favorite=is_favorite,
|
|
1345
|
+
is_trashed=is_trashed,
|
|
1346
|
+
visibility=visibility,
|
|
1347
|
+
_request_auth=_request_auth,
|
|
1348
|
+
_content_type=_content_type,
|
|
1349
|
+
_headers=_headers,
|
|
1350
|
+
_host_index=_host_index,
|
|
1351
|
+
)
|
|
1352
|
+
|
|
1353
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1354
|
+
"200": "AssetStatsResponseDto",
|
|
1355
|
+
}
|
|
1356
|
+
response_data = await self.api_client.call_api(
|
|
1357
|
+
*_param, _request_timeout=_request_timeout
|
|
1358
|
+
)
|
|
1359
|
+
await response_data.read()
|
|
1360
|
+
return self.api_client.response_deserialize(
|
|
1361
|
+
response_data=response_data,
|
|
1362
|
+
response_types_map=_response_types_map,
|
|
1363
|
+
).data
|
|
1364
|
+
|
|
1365
|
+
@validate_call
|
|
1366
|
+
async def get_user_statistics_admin_with_http_info(
|
|
1367
|
+
self,
|
|
1368
|
+
id: UUID,
|
|
1369
|
+
is_favorite: Optional[StrictBool] = None,
|
|
1370
|
+
is_trashed: Optional[StrictBool] = None,
|
|
1371
|
+
visibility: Optional[AssetVisibility] = None,
|
|
1372
|
+
_request_timeout: Union[
|
|
1373
|
+
None,
|
|
1374
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1375
|
+
Tuple[
|
|
1376
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1377
|
+
],
|
|
1378
|
+
] = None,
|
|
1379
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1380
|
+
_content_type: Optional[StrictStr] = None,
|
|
1381
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1382
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1383
|
+
) -> ApiResponse[AssetStatsResponseDto]:
|
|
1384
|
+
"""Retrieve user statistics
|
|
1385
|
+
|
|
1386
|
+
Retrieve asset statistics for a specific user.
|
|
1387
|
+
|
|
1388
|
+
:param id: (required)
|
|
1389
|
+
:type id: UUID
|
|
1390
|
+
:param is_favorite:
|
|
1391
|
+
:type is_favorite: bool
|
|
1392
|
+
:param is_trashed:
|
|
1393
|
+
:type is_trashed: bool
|
|
1394
|
+
:param visibility:
|
|
1395
|
+
:type visibility: AssetVisibility
|
|
1396
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1397
|
+
number provided, it will be total request
|
|
1398
|
+
timeout. It can also be a pair (tuple) of
|
|
1399
|
+
(connection, read) timeouts.
|
|
1400
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1401
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1402
|
+
request; this effectively ignores the
|
|
1403
|
+
authentication in the spec for a single request.
|
|
1404
|
+
:type _request_auth: dict, optional
|
|
1405
|
+
:param _content_type: force content-type for the request.
|
|
1406
|
+
:type _content_type: str, Optional
|
|
1407
|
+
:param _headers: set to override the headers for a single
|
|
1408
|
+
request; this effectively ignores the headers
|
|
1409
|
+
in the spec for a single request.
|
|
1410
|
+
:type _headers: dict, optional
|
|
1411
|
+
:param _host_index: set to override the host_index for a single
|
|
1412
|
+
request; this effectively ignores the host_index
|
|
1413
|
+
in the spec for a single request.
|
|
1414
|
+
:type _host_index: int, optional
|
|
1415
|
+
:return: Returns the result object.
|
|
1416
|
+
""" # noqa: E501
|
|
1417
|
+
|
|
1418
|
+
_param = self._get_user_statistics_admin_serialize(
|
|
1419
|
+
id=id,
|
|
1420
|
+
is_favorite=is_favorite,
|
|
1421
|
+
is_trashed=is_trashed,
|
|
1422
|
+
visibility=visibility,
|
|
1423
|
+
_request_auth=_request_auth,
|
|
1424
|
+
_content_type=_content_type,
|
|
1425
|
+
_headers=_headers,
|
|
1426
|
+
_host_index=_host_index,
|
|
1427
|
+
)
|
|
1428
|
+
|
|
1429
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1430
|
+
"200": "AssetStatsResponseDto",
|
|
1431
|
+
}
|
|
1432
|
+
response_data = await self.api_client.call_api(
|
|
1433
|
+
*_param, _request_timeout=_request_timeout
|
|
1434
|
+
)
|
|
1435
|
+
await response_data.read()
|
|
1436
|
+
return self.api_client.response_deserialize(
|
|
1437
|
+
response_data=response_data,
|
|
1438
|
+
response_types_map=_response_types_map,
|
|
1439
|
+
)
|
|
1440
|
+
|
|
1441
|
+
@validate_call
|
|
1442
|
+
async def get_user_statistics_admin_without_preload_content(
|
|
1443
|
+
self,
|
|
1444
|
+
id: UUID,
|
|
1445
|
+
is_favorite: Optional[StrictBool] = None,
|
|
1446
|
+
is_trashed: Optional[StrictBool] = None,
|
|
1447
|
+
visibility: Optional[AssetVisibility] = None,
|
|
1448
|
+
_request_timeout: Union[
|
|
1449
|
+
None,
|
|
1450
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1451
|
+
Tuple[
|
|
1452
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1453
|
+
],
|
|
1454
|
+
] = None,
|
|
1455
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1456
|
+
_content_type: Optional[StrictStr] = None,
|
|
1457
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1458
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1459
|
+
) -> RESTResponseType:
|
|
1460
|
+
"""Retrieve user statistics
|
|
1461
|
+
|
|
1462
|
+
Retrieve asset statistics for a specific user.
|
|
1463
|
+
|
|
1464
|
+
:param id: (required)
|
|
1465
|
+
:type id: UUID
|
|
1466
|
+
:param is_favorite:
|
|
1467
|
+
:type is_favorite: bool
|
|
1468
|
+
:param is_trashed:
|
|
1469
|
+
:type is_trashed: bool
|
|
1470
|
+
:param visibility:
|
|
1471
|
+
:type visibility: AssetVisibility
|
|
1472
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1473
|
+
number provided, it will be total request
|
|
1474
|
+
timeout. It can also be a pair (tuple) of
|
|
1475
|
+
(connection, read) timeouts.
|
|
1476
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1477
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1478
|
+
request; this effectively ignores the
|
|
1479
|
+
authentication in the spec for a single request.
|
|
1480
|
+
:type _request_auth: dict, optional
|
|
1481
|
+
:param _content_type: force content-type for the request.
|
|
1482
|
+
:type _content_type: str, Optional
|
|
1483
|
+
:param _headers: set to override the headers for a single
|
|
1484
|
+
request; this effectively ignores the headers
|
|
1485
|
+
in the spec for a single request.
|
|
1486
|
+
:type _headers: dict, optional
|
|
1487
|
+
:param _host_index: set to override the host_index for a single
|
|
1488
|
+
request; this effectively ignores the host_index
|
|
1489
|
+
in the spec for a single request.
|
|
1490
|
+
:type _host_index: int, optional
|
|
1491
|
+
:return: Returns the result object.
|
|
1492
|
+
""" # noqa: E501
|
|
1493
|
+
|
|
1494
|
+
_param = self._get_user_statistics_admin_serialize(
|
|
1495
|
+
id=id,
|
|
1496
|
+
is_favorite=is_favorite,
|
|
1497
|
+
is_trashed=is_trashed,
|
|
1498
|
+
visibility=visibility,
|
|
1499
|
+
_request_auth=_request_auth,
|
|
1500
|
+
_content_type=_content_type,
|
|
1501
|
+
_headers=_headers,
|
|
1502
|
+
_host_index=_host_index,
|
|
1503
|
+
)
|
|
1504
|
+
|
|
1505
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1506
|
+
"200": "AssetStatsResponseDto",
|
|
1507
|
+
}
|
|
1508
|
+
response_data = await self.api_client.call_api(
|
|
1509
|
+
*_param, _request_timeout=_request_timeout
|
|
1510
|
+
)
|
|
1511
|
+
return response_data.response
|
|
1512
|
+
|
|
1513
|
+
def _get_user_statistics_admin_serialize(
|
|
1514
|
+
self,
|
|
1515
|
+
id,
|
|
1516
|
+
is_favorite,
|
|
1517
|
+
is_trashed,
|
|
1518
|
+
visibility,
|
|
1519
|
+
_request_auth,
|
|
1520
|
+
_content_type,
|
|
1521
|
+
_headers,
|
|
1522
|
+
_host_index,
|
|
1523
|
+
) -> RequestSerialized:
|
|
1524
|
+
_host = None
|
|
1525
|
+
|
|
1526
|
+
_collection_formats: Dict[str, str] = {}
|
|
1527
|
+
|
|
1528
|
+
_path_params: Dict[str, str] = {}
|
|
1529
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1530
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1531
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1532
|
+
_files: Dict[
|
|
1533
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1534
|
+
] = {}
|
|
1535
|
+
_body_params: Optional[bytes] = None
|
|
1536
|
+
|
|
1537
|
+
# process the path parameters
|
|
1538
|
+
if id is not None:
|
|
1539
|
+
_path_params["id"] = id
|
|
1540
|
+
# process the query parameters
|
|
1541
|
+
if is_favorite is not None:
|
|
1542
|
+
_query_params.append(("isFavorite", is_favorite))
|
|
1543
|
+
|
|
1544
|
+
if is_trashed is not None:
|
|
1545
|
+
_query_params.append(("isTrashed", is_trashed))
|
|
1546
|
+
|
|
1547
|
+
if visibility is not None:
|
|
1548
|
+
_query_params.append(("visibility", visibility.value))
|
|
1549
|
+
|
|
1550
|
+
# process the header parameters
|
|
1551
|
+
# process the form parameters
|
|
1552
|
+
# process the body parameter
|
|
1553
|
+
|
|
1554
|
+
# set the HTTP header `Accept`
|
|
1555
|
+
if "Accept" not in _header_params:
|
|
1556
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1557
|
+
["application/json"]
|
|
1558
|
+
)
|
|
1559
|
+
|
|
1560
|
+
# authentication setting
|
|
1561
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
1562
|
+
|
|
1563
|
+
return self.api_client.param_serialize(
|
|
1564
|
+
method="GET",
|
|
1565
|
+
resource_path="/admin/users/{id}/statistics",
|
|
1566
|
+
path_params=_path_params,
|
|
1567
|
+
query_params=_query_params,
|
|
1568
|
+
header_params=_header_params,
|
|
1569
|
+
body=_body_params,
|
|
1570
|
+
post_params=_form_params,
|
|
1571
|
+
files=_files,
|
|
1572
|
+
auth_settings=_auth_settings,
|
|
1573
|
+
collection_formats=_collection_formats,
|
|
1574
|
+
_host=_host,
|
|
1575
|
+
_request_auth=_request_auth,
|
|
1576
|
+
)
|
|
1577
|
+
|
|
1578
|
+
@validate_call
|
|
1579
|
+
async def restore_user_admin(
|
|
1580
|
+
self,
|
|
1581
|
+
id: UUID,
|
|
1582
|
+
_request_timeout: Union[
|
|
1583
|
+
None,
|
|
1584
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1585
|
+
Tuple[
|
|
1586
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1587
|
+
],
|
|
1588
|
+
] = None,
|
|
1589
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1590
|
+
_content_type: Optional[StrictStr] = None,
|
|
1591
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1592
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1593
|
+
) -> UserAdminResponseDto:
|
|
1594
|
+
"""Restore a deleted user
|
|
1595
|
+
|
|
1596
|
+
Restore a previously deleted user.
|
|
1597
|
+
|
|
1598
|
+
:param id: (required)
|
|
1599
|
+
:type id: UUID
|
|
1600
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1601
|
+
number provided, it will be total request
|
|
1602
|
+
timeout. It can also be a pair (tuple) of
|
|
1603
|
+
(connection, read) timeouts.
|
|
1604
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1605
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1606
|
+
request; this effectively ignores the
|
|
1607
|
+
authentication in the spec for a single request.
|
|
1608
|
+
:type _request_auth: dict, optional
|
|
1609
|
+
:param _content_type: force content-type for the request.
|
|
1610
|
+
:type _content_type: str, Optional
|
|
1611
|
+
:param _headers: set to override the headers for a single
|
|
1612
|
+
request; this effectively ignores the headers
|
|
1613
|
+
in the spec for a single request.
|
|
1614
|
+
:type _headers: dict, optional
|
|
1615
|
+
:param _host_index: set to override the host_index for a single
|
|
1616
|
+
request; this effectively ignores the host_index
|
|
1617
|
+
in the spec for a single request.
|
|
1618
|
+
:type _host_index: int, optional
|
|
1619
|
+
:return: Returns the result object.
|
|
1620
|
+
""" # noqa: E501
|
|
1621
|
+
|
|
1622
|
+
_param = self._restore_user_admin_serialize(
|
|
1623
|
+
id=id,
|
|
1624
|
+
_request_auth=_request_auth,
|
|
1625
|
+
_content_type=_content_type,
|
|
1626
|
+
_headers=_headers,
|
|
1627
|
+
_host_index=_host_index,
|
|
1628
|
+
)
|
|
1629
|
+
|
|
1630
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1631
|
+
"200": "UserAdminResponseDto",
|
|
1632
|
+
}
|
|
1633
|
+
response_data = await self.api_client.call_api(
|
|
1634
|
+
*_param, _request_timeout=_request_timeout
|
|
1635
|
+
)
|
|
1636
|
+
await response_data.read()
|
|
1637
|
+
return self.api_client.response_deserialize(
|
|
1638
|
+
response_data=response_data,
|
|
1639
|
+
response_types_map=_response_types_map,
|
|
1640
|
+
).data
|
|
1641
|
+
|
|
1642
|
+
@validate_call
|
|
1643
|
+
async def restore_user_admin_with_http_info(
|
|
1644
|
+
self,
|
|
1645
|
+
id: UUID,
|
|
1646
|
+
_request_timeout: Union[
|
|
1647
|
+
None,
|
|
1648
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1649
|
+
Tuple[
|
|
1650
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1651
|
+
],
|
|
1652
|
+
] = None,
|
|
1653
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1654
|
+
_content_type: Optional[StrictStr] = None,
|
|
1655
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1656
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1657
|
+
) -> ApiResponse[UserAdminResponseDto]:
|
|
1658
|
+
"""Restore a deleted user
|
|
1659
|
+
|
|
1660
|
+
Restore a previously deleted user.
|
|
1661
|
+
|
|
1662
|
+
:param id: (required)
|
|
1663
|
+
:type id: UUID
|
|
1664
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1665
|
+
number provided, it will be total request
|
|
1666
|
+
timeout. It can also be a pair (tuple) of
|
|
1667
|
+
(connection, read) timeouts.
|
|
1668
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1669
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1670
|
+
request; this effectively ignores the
|
|
1671
|
+
authentication in the spec for a single request.
|
|
1672
|
+
:type _request_auth: dict, optional
|
|
1673
|
+
:param _content_type: force content-type for the request.
|
|
1674
|
+
:type _content_type: str, Optional
|
|
1675
|
+
:param _headers: set to override the headers for a single
|
|
1676
|
+
request; this effectively ignores the headers
|
|
1677
|
+
in the spec for a single request.
|
|
1678
|
+
:type _headers: dict, optional
|
|
1679
|
+
:param _host_index: set to override the host_index for a single
|
|
1680
|
+
request; this effectively ignores the host_index
|
|
1681
|
+
in the spec for a single request.
|
|
1682
|
+
:type _host_index: int, optional
|
|
1683
|
+
:return: Returns the result object.
|
|
1684
|
+
""" # noqa: E501
|
|
1685
|
+
|
|
1686
|
+
_param = self._restore_user_admin_serialize(
|
|
1687
|
+
id=id,
|
|
1688
|
+
_request_auth=_request_auth,
|
|
1689
|
+
_content_type=_content_type,
|
|
1690
|
+
_headers=_headers,
|
|
1691
|
+
_host_index=_host_index,
|
|
1692
|
+
)
|
|
1693
|
+
|
|
1694
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1695
|
+
"200": "UserAdminResponseDto",
|
|
1696
|
+
}
|
|
1697
|
+
response_data = await self.api_client.call_api(
|
|
1698
|
+
*_param, _request_timeout=_request_timeout
|
|
1699
|
+
)
|
|
1700
|
+
await response_data.read()
|
|
1701
|
+
return self.api_client.response_deserialize(
|
|
1702
|
+
response_data=response_data,
|
|
1703
|
+
response_types_map=_response_types_map,
|
|
1704
|
+
)
|
|
1705
|
+
|
|
1706
|
+
@validate_call
|
|
1707
|
+
async def restore_user_admin_without_preload_content(
|
|
1708
|
+
self,
|
|
1709
|
+
id: UUID,
|
|
1710
|
+
_request_timeout: Union[
|
|
1711
|
+
None,
|
|
1712
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1713
|
+
Tuple[
|
|
1714
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1715
|
+
],
|
|
1716
|
+
] = None,
|
|
1717
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1718
|
+
_content_type: Optional[StrictStr] = None,
|
|
1719
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1720
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1721
|
+
) -> RESTResponseType:
|
|
1722
|
+
"""Restore a deleted user
|
|
1723
|
+
|
|
1724
|
+
Restore a previously deleted user.
|
|
1725
|
+
|
|
1726
|
+
:param id: (required)
|
|
1727
|
+
:type id: UUID
|
|
1728
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1729
|
+
number provided, it will be total request
|
|
1730
|
+
timeout. It can also be a pair (tuple) of
|
|
1731
|
+
(connection, read) timeouts.
|
|
1732
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1733
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1734
|
+
request; this effectively ignores the
|
|
1735
|
+
authentication in the spec for a single request.
|
|
1736
|
+
:type _request_auth: dict, optional
|
|
1737
|
+
:param _content_type: force content-type for the request.
|
|
1738
|
+
:type _content_type: str, Optional
|
|
1739
|
+
:param _headers: set to override the headers for a single
|
|
1740
|
+
request; this effectively ignores the headers
|
|
1741
|
+
in the spec for a single request.
|
|
1742
|
+
:type _headers: dict, optional
|
|
1743
|
+
:param _host_index: set to override the host_index for a single
|
|
1744
|
+
request; this effectively ignores the host_index
|
|
1745
|
+
in the spec for a single request.
|
|
1746
|
+
:type _host_index: int, optional
|
|
1747
|
+
:return: Returns the result object.
|
|
1748
|
+
""" # noqa: E501
|
|
1749
|
+
|
|
1750
|
+
_param = self._restore_user_admin_serialize(
|
|
1751
|
+
id=id,
|
|
1752
|
+
_request_auth=_request_auth,
|
|
1753
|
+
_content_type=_content_type,
|
|
1754
|
+
_headers=_headers,
|
|
1755
|
+
_host_index=_host_index,
|
|
1756
|
+
)
|
|
1757
|
+
|
|
1758
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1759
|
+
"200": "UserAdminResponseDto",
|
|
1760
|
+
}
|
|
1761
|
+
response_data = await self.api_client.call_api(
|
|
1762
|
+
*_param, _request_timeout=_request_timeout
|
|
1763
|
+
)
|
|
1764
|
+
return response_data.response
|
|
1765
|
+
|
|
1766
|
+
def _restore_user_admin_serialize(
|
|
1767
|
+
self,
|
|
1768
|
+
id,
|
|
1769
|
+
_request_auth,
|
|
1770
|
+
_content_type,
|
|
1771
|
+
_headers,
|
|
1772
|
+
_host_index,
|
|
1773
|
+
) -> RequestSerialized:
|
|
1774
|
+
_host = None
|
|
1775
|
+
|
|
1776
|
+
_collection_formats: Dict[str, str] = {}
|
|
1777
|
+
|
|
1778
|
+
_path_params: Dict[str, str] = {}
|
|
1779
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1780
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1781
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1782
|
+
_files: Dict[
|
|
1783
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1784
|
+
] = {}
|
|
1785
|
+
_body_params: Optional[bytes] = None
|
|
1786
|
+
|
|
1787
|
+
# process the path parameters
|
|
1788
|
+
if id is not None:
|
|
1789
|
+
_path_params["id"] = id
|
|
1790
|
+
# process the query parameters
|
|
1791
|
+
# process the header parameters
|
|
1792
|
+
# process the form parameters
|
|
1793
|
+
# process the body parameter
|
|
1794
|
+
|
|
1795
|
+
# set the HTTP header `Accept`
|
|
1796
|
+
if "Accept" not in _header_params:
|
|
1797
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1798
|
+
["application/json"]
|
|
1799
|
+
)
|
|
1800
|
+
|
|
1801
|
+
# authentication setting
|
|
1802
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
1803
|
+
|
|
1804
|
+
return self.api_client.param_serialize(
|
|
1805
|
+
method="POST",
|
|
1806
|
+
resource_path="/admin/users/{id}/restore",
|
|
1807
|
+
path_params=_path_params,
|
|
1808
|
+
query_params=_query_params,
|
|
1809
|
+
header_params=_header_params,
|
|
1810
|
+
body=_body_params,
|
|
1811
|
+
post_params=_form_params,
|
|
1812
|
+
files=_files,
|
|
1813
|
+
auth_settings=_auth_settings,
|
|
1814
|
+
collection_formats=_collection_formats,
|
|
1815
|
+
_host=_host,
|
|
1816
|
+
_request_auth=_request_auth,
|
|
1817
|
+
)
|
|
1818
|
+
|
|
1819
|
+
@validate_call
|
|
1820
|
+
async def search_users_admin(
|
|
1821
|
+
self,
|
|
1822
|
+
id: Optional[UUID] = None,
|
|
1823
|
+
with_deleted: Optional[StrictBool] = None,
|
|
1824
|
+
_request_timeout: Union[
|
|
1825
|
+
None,
|
|
1826
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1827
|
+
Tuple[
|
|
1828
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1829
|
+
],
|
|
1830
|
+
] = None,
|
|
1831
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1832
|
+
_content_type: Optional[StrictStr] = None,
|
|
1833
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1834
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1835
|
+
) -> List[UserAdminResponseDto]:
|
|
1836
|
+
"""Search users
|
|
1837
|
+
|
|
1838
|
+
Search for users.
|
|
1839
|
+
|
|
1840
|
+
:param id:
|
|
1841
|
+
:type id: UUID
|
|
1842
|
+
:param with_deleted:
|
|
1843
|
+
:type with_deleted: bool
|
|
1844
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1845
|
+
number provided, it will be total request
|
|
1846
|
+
timeout. It can also be a pair (tuple) of
|
|
1847
|
+
(connection, read) timeouts.
|
|
1848
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1849
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1850
|
+
request; this effectively ignores the
|
|
1851
|
+
authentication in the spec for a single request.
|
|
1852
|
+
:type _request_auth: dict, optional
|
|
1853
|
+
:param _content_type: force content-type for the request.
|
|
1854
|
+
:type _content_type: str, Optional
|
|
1855
|
+
:param _headers: set to override the headers for a single
|
|
1856
|
+
request; this effectively ignores the headers
|
|
1857
|
+
in the spec for a single request.
|
|
1858
|
+
:type _headers: dict, optional
|
|
1859
|
+
:param _host_index: set to override the host_index for a single
|
|
1860
|
+
request; this effectively ignores the host_index
|
|
1861
|
+
in the spec for a single request.
|
|
1862
|
+
:type _host_index: int, optional
|
|
1863
|
+
:return: Returns the result object.
|
|
1864
|
+
""" # noqa: E501
|
|
1865
|
+
|
|
1866
|
+
_param = self._search_users_admin_serialize(
|
|
1867
|
+
id=id,
|
|
1868
|
+
with_deleted=with_deleted,
|
|
1869
|
+
_request_auth=_request_auth,
|
|
1870
|
+
_content_type=_content_type,
|
|
1871
|
+
_headers=_headers,
|
|
1872
|
+
_host_index=_host_index,
|
|
1873
|
+
)
|
|
1874
|
+
|
|
1875
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1876
|
+
"200": "List[UserAdminResponseDto]",
|
|
1877
|
+
}
|
|
1878
|
+
response_data = await self.api_client.call_api(
|
|
1879
|
+
*_param, _request_timeout=_request_timeout
|
|
1880
|
+
)
|
|
1881
|
+
await response_data.read()
|
|
1882
|
+
return self.api_client.response_deserialize(
|
|
1883
|
+
response_data=response_data,
|
|
1884
|
+
response_types_map=_response_types_map,
|
|
1885
|
+
).data
|
|
1886
|
+
|
|
1887
|
+
@validate_call
|
|
1888
|
+
async def search_users_admin_with_http_info(
|
|
1889
|
+
self,
|
|
1890
|
+
id: Optional[UUID] = None,
|
|
1891
|
+
with_deleted: Optional[StrictBool] = None,
|
|
1892
|
+
_request_timeout: Union[
|
|
1893
|
+
None,
|
|
1894
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1895
|
+
Tuple[
|
|
1896
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1897
|
+
],
|
|
1898
|
+
] = None,
|
|
1899
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1900
|
+
_content_type: Optional[StrictStr] = None,
|
|
1901
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1902
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1903
|
+
) -> ApiResponse[List[UserAdminResponseDto]]:
|
|
1904
|
+
"""Search users
|
|
1905
|
+
|
|
1906
|
+
Search for users.
|
|
1907
|
+
|
|
1908
|
+
:param id:
|
|
1909
|
+
:type id: UUID
|
|
1910
|
+
:param with_deleted:
|
|
1911
|
+
:type with_deleted: bool
|
|
1912
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1913
|
+
number provided, it will be total request
|
|
1914
|
+
timeout. It can also be a pair (tuple) of
|
|
1915
|
+
(connection, read) timeouts.
|
|
1916
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1917
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1918
|
+
request; this effectively ignores the
|
|
1919
|
+
authentication in the spec for a single request.
|
|
1920
|
+
:type _request_auth: dict, optional
|
|
1921
|
+
:param _content_type: force content-type for the request.
|
|
1922
|
+
:type _content_type: str, Optional
|
|
1923
|
+
:param _headers: set to override the headers for a single
|
|
1924
|
+
request; this effectively ignores the headers
|
|
1925
|
+
in the spec for a single request.
|
|
1926
|
+
:type _headers: dict, optional
|
|
1927
|
+
:param _host_index: set to override the host_index for a single
|
|
1928
|
+
request; this effectively ignores the host_index
|
|
1929
|
+
in the spec for a single request.
|
|
1930
|
+
:type _host_index: int, optional
|
|
1931
|
+
:return: Returns the result object.
|
|
1932
|
+
""" # noqa: E501
|
|
1933
|
+
|
|
1934
|
+
_param = self._search_users_admin_serialize(
|
|
1935
|
+
id=id,
|
|
1936
|
+
with_deleted=with_deleted,
|
|
1937
|
+
_request_auth=_request_auth,
|
|
1938
|
+
_content_type=_content_type,
|
|
1939
|
+
_headers=_headers,
|
|
1940
|
+
_host_index=_host_index,
|
|
1941
|
+
)
|
|
1942
|
+
|
|
1943
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1944
|
+
"200": "List[UserAdminResponseDto]",
|
|
1945
|
+
}
|
|
1946
|
+
response_data = await self.api_client.call_api(
|
|
1947
|
+
*_param, _request_timeout=_request_timeout
|
|
1948
|
+
)
|
|
1949
|
+
await response_data.read()
|
|
1950
|
+
return self.api_client.response_deserialize(
|
|
1951
|
+
response_data=response_data,
|
|
1952
|
+
response_types_map=_response_types_map,
|
|
1953
|
+
)
|
|
1954
|
+
|
|
1955
|
+
@validate_call
|
|
1956
|
+
async def search_users_admin_without_preload_content(
|
|
1957
|
+
self,
|
|
1958
|
+
id: Optional[UUID] = None,
|
|
1959
|
+
with_deleted: Optional[StrictBool] = None,
|
|
1960
|
+
_request_timeout: Union[
|
|
1961
|
+
None,
|
|
1962
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1963
|
+
Tuple[
|
|
1964
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1965
|
+
],
|
|
1966
|
+
] = None,
|
|
1967
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1968
|
+
_content_type: Optional[StrictStr] = None,
|
|
1969
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1970
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1971
|
+
) -> RESTResponseType:
|
|
1972
|
+
"""Search users
|
|
1973
|
+
|
|
1974
|
+
Search for users.
|
|
1975
|
+
|
|
1976
|
+
:param id:
|
|
1977
|
+
:type id: UUID
|
|
1978
|
+
:param with_deleted:
|
|
1979
|
+
:type with_deleted: bool
|
|
1980
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1981
|
+
number provided, it will be total request
|
|
1982
|
+
timeout. It can also be a pair (tuple) of
|
|
1983
|
+
(connection, read) timeouts.
|
|
1984
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1985
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1986
|
+
request; this effectively ignores the
|
|
1987
|
+
authentication in the spec for a single request.
|
|
1988
|
+
:type _request_auth: dict, optional
|
|
1989
|
+
:param _content_type: force content-type for the request.
|
|
1990
|
+
:type _content_type: str, Optional
|
|
1991
|
+
:param _headers: set to override the headers for a single
|
|
1992
|
+
request; this effectively ignores the headers
|
|
1993
|
+
in the spec for a single request.
|
|
1994
|
+
:type _headers: dict, optional
|
|
1995
|
+
:param _host_index: set to override the host_index for a single
|
|
1996
|
+
request; this effectively ignores the host_index
|
|
1997
|
+
in the spec for a single request.
|
|
1998
|
+
:type _host_index: int, optional
|
|
1999
|
+
:return: Returns the result object.
|
|
2000
|
+
""" # noqa: E501
|
|
2001
|
+
|
|
2002
|
+
_param = self._search_users_admin_serialize(
|
|
2003
|
+
id=id,
|
|
2004
|
+
with_deleted=with_deleted,
|
|
2005
|
+
_request_auth=_request_auth,
|
|
2006
|
+
_content_type=_content_type,
|
|
2007
|
+
_headers=_headers,
|
|
2008
|
+
_host_index=_host_index,
|
|
2009
|
+
)
|
|
2010
|
+
|
|
2011
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2012
|
+
"200": "List[UserAdminResponseDto]",
|
|
2013
|
+
}
|
|
2014
|
+
response_data = await self.api_client.call_api(
|
|
2015
|
+
*_param, _request_timeout=_request_timeout
|
|
2016
|
+
)
|
|
2017
|
+
return response_data.response
|
|
2018
|
+
|
|
2019
|
+
def _search_users_admin_serialize(
|
|
2020
|
+
self,
|
|
2021
|
+
id,
|
|
2022
|
+
with_deleted,
|
|
2023
|
+
_request_auth,
|
|
2024
|
+
_content_type,
|
|
2025
|
+
_headers,
|
|
2026
|
+
_host_index,
|
|
2027
|
+
) -> RequestSerialized:
|
|
2028
|
+
_host = None
|
|
2029
|
+
|
|
2030
|
+
_collection_formats: Dict[str, str] = {}
|
|
2031
|
+
|
|
2032
|
+
_path_params: Dict[str, str] = {}
|
|
2033
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2034
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2035
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2036
|
+
_files: Dict[
|
|
2037
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2038
|
+
] = {}
|
|
2039
|
+
_body_params: Optional[bytes] = None
|
|
2040
|
+
|
|
2041
|
+
# process the path parameters
|
|
2042
|
+
# process the query parameters
|
|
2043
|
+
if id is not None:
|
|
2044
|
+
_query_params.append(("id", id))
|
|
2045
|
+
|
|
2046
|
+
if with_deleted is not None:
|
|
2047
|
+
_query_params.append(("withDeleted", with_deleted))
|
|
2048
|
+
|
|
2049
|
+
# process the header parameters
|
|
2050
|
+
# process the form parameters
|
|
2051
|
+
# process the body parameter
|
|
2052
|
+
|
|
2053
|
+
# set the HTTP header `Accept`
|
|
2054
|
+
if "Accept" not in _header_params:
|
|
2055
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
2056
|
+
["application/json"]
|
|
2057
|
+
)
|
|
2058
|
+
|
|
2059
|
+
# authentication setting
|
|
2060
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
2061
|
+
|
|
2062
|
+
return self.api_client.param_serialize(
|
|
2063
|
+
method="GET",
|
|
2064
|
+
resource_path="/admin/users",
|
|
2065
|
+
path_params=_path_params,
|
|
2066
|
+
query_params=_query_params,
|
|
2067
|
+
header_params=_header_params,
|
|
2068
|
+
body=_body_params,
|
|
2069
|
+
post_params=_form_params,
|
|
2070
|
+
files=_files,
|
|
2071
|
+
auth_settings=_auth_settings,
|
|
2072
|
+
collection_formats=_collection_formats,
|
|
2073
|
+
_host=_host,
|
|
2074
|
+
_request_auth=_request_auth,
|
|
2075
|
+
)
|
|
2076
|
+
|
|
2077
|
+
@validate_call
|
|
2078
|
+
async def update_user_admin(
|
|
2079
|
+
self,
|
|
2080
|
+
id: UUID,
|
|
2081
|
+
user_admin_update_dto: UserAdminUpdateDto,
|
|
2082
|
+
_request_timeout: Union[
|
|
2083
|
+
None,
|
|
2084
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2085
|
+
Tuple[
|
|
2086
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
2087
|
+
],
|
|
2088
|
+
] = None,
|
|
2089
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2090
|
+
_content_type: Optional[StrictStr] = None,
|
|
2091
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2092
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2093
|
+
) -> UserAdminResponseDto:
|
|
2094
|
+
"""Update a user
|
|
2095
|
+
|
|
2096
|
+
Update an existing user.
|
|
2097
|
+
|
|
2098
|
+
:param id: (required)
|
|
2099
|
+
:type id: UUID
|
|
2100
|
+
:param user_admin_update_dto: (required)
|
|
2101
|
+
:type user_admin_update_dto: UserAdminUpdateDto
|
|
2102
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2103
|
+
number provided, it will be total request
|
|
2104
|
+
timeout. It can also be a pair (tuple) of
|
|
2105
|
+
(connection, read) timeouts.
|
|
2106
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2107
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2108
|
+
request; this effectively ignores the
|
|
2109
|
+
authentication in the spec for a single request.
|
|
2110
|
+
:type _request_auth: dict, optional
|
|
2111
|
+
:param _content_type: force content-type for the request.
|
|
2112
|
+
:type _content_type: str, Optional
|
|
2113
|
+
:param _headers: set to override the headers for a single
|
|
2114
|
+
request; this effectively ignores the headers
|
|
2115
|
+
in the spec for a single request.
|
|
2116
|
+
:type _headers: dict, optional
|
|
2117
|
+
:param _host_index: set to override the host_index for a single
|
|
2118
|
+
request; this effectively ignores the host_index
|
|
2119
|
+
in the spec for a single request.
|
|
2120
|
+
:type _host_index: int, optional
|
|
2121
|
+
:return: Returns the result object.
|
|
2122
|
+
""" # noqa: E501
|
|
2123
|
+
|
|
2124
|
+
_param = self._update_user_admin_serialize(
|
|
2125
|
+
id=id,
|
|
2126
|
+
user_admin_update_dto=user_admin_update_dto,
|
|
2127
|
+
_request_auth=_request_auth,
|
|
2128
|
+
_content_type=_content_type,
|
|
2129
|
+
_headers=_headers,
|
|
2130
|
+
_host_index=_host_index,
|
|
2131
|
+
)
|
|
2132
|
+
|
|
2133
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2134
|
+
"200": "UserAdminResponseDto",
|
|
2135
|
+
}
|
|
2136
|
+
response_data = await self.api_client.call_api(
|
|
2137
|
+
*_param, _request_timeout=_request_timeout
|
|
2138
|
+
)
|
|
2139
|
+
await response_data.read()
|
|
2140
|
+
return self.api_client.response_deserialize(
|
|
2141
|
+
response_data=response_data,
|
|
2142
|
+
response_types_map=_response_types_map,
|
|
2143
|
+
).data
|
|
2144
|
+
|
|
2145
|
+
@validate_call
|
|
2146
|
+
async def update_user_admin_with_http_info(
|
|
2147
|
+
self,
|
|
2148
|
+
id: UUID,
|
|
2149
|
+
user_admin_update_dto: UserAdminUpdateDto,
|
|
2150
|
+
_request_timeout: Union[
|
|
2151
|
+
None,
|
|
2152
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2153
|
+
Tuple[
|
|
2154
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
2155
|
+
],
|
|
2156
|
+
] = None,
|
|
2157
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2158
|
+
_content_type: Optional[StrictStr] = None,
|
|
2159
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2160
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2161
|
+
) -> ApiResponse[UserAdminResponseDto]:
|
|
2162
|
+
"""Update a user
|
|
2163
|
+
|
|
2164
|
+
Update an existing user.
|
|
2165
|
+
|
|
2166
|
+
:param id: (required)
|
|
2167
|
+
:type id: UUID
|
|
2168
|
+
:param user_admin_update_dto: (required)
|
|
2169
|
+
:type user_admin_update_dto: UserAdminUpdateDto
|
|
2170
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2171
|
+
number provided, it will be total request
|
|
2172
|
+
timeout. It can also be a pair (tuple) of
|
|
2173
|
+
(connection, read) timeouts.
|
|
2174
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2175
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2176
|
+
request; this effectively ignores the
|
|
2177
|
+
authentication in the spec for a single request.
|
|
2178
|
+
:type _request_auth: dict, optional
|
|
2179
|
+
:param _content_type: force content-type for the request.
|
|
2180
|
+
:type _content_type: str, Optional
|
|
2181
|
+
:param _headers: set to override the headers for a single
|
|
2182
|
+
request; this effectively ignores the headers
|
|
2183
|
+
in the spec for a single request.
|
|
2184
|
+
:type _headers: dict, optional
|
|
2185
|
+
:param _host_index: set to override the host_index for a single
|
|
2186
|
+
request; this effectively ignores the host_index
|
|
2187
|
+
in the spec for a single request.
|
|
2188
|
+
:type _host_index: int, optional
|
|
2189
|
+
:return: Returns the result object.
|
|
2190
|
+
""" # noqa: E501
|
|
2191
|
+
|
|
2192
|
+
_param = self._update_user_admin_serialize(
|
|
2193
|
+
id=id,
|
|
2194
|
+
user_admin_update_dto=user_admin_update_dto,
|
|
2195
|
+
_request_auth=_request_auth,
|
|
2196
|
+
_content_type=_content_type,
|
|
2197
|
+
_headers=_headers,
|
|
2198
|
+
_host_index=_host_index,
|
|
2199
|
+
)
|
|
2200
|
+
|
|
2201
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2202
|
+
"200": "UserAdminResponseDto",
|
|
2203
|
+
}
|
|
2204
|
+
response_data = await self.api_client.call_api(
|
|
2205
|
+
*_param, _request_timeout=_request_timeout
|
|
2206
|
+
)
|
|
2207
|
+
await response_data.read()
|
|
2208
|
+
return self.api_client.response_deserialize(
|
|
2209
|
+
response_data=response_data,
|
|
2210
|
+
response_types_map=_response_types_map,
|
|
2211
|
+
)
|
|
2212
|
+
|
|
2213
|
+
@validate_call
|
|
2214
|
+
async def update_user_admin_without_preload_content(
|
|
2215
|
+
self,
|
|
2216
|
+
id: UUID,
|
|
2217
|
+
user_admin_update_dto: UserAdminUpdateDto,
|
|
2218
|
+
_request_timeout: Union[
|
|
2219
|
+
None,
|
|
2220
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2221
|
+
Tuple[
|
|
2222
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
2223
|
+
],
|
|
2224
|
+
] = None,
|
|
2225
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2226
|
+
_content_type: Optional[StrictStr] = None,
|
|
2227
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2228
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2229
|
+
) -> RESTResponseType:
|
|
2230
|
+
"""Update a user
|
|
2231
|
+
|
|
2232
|
+
Update an existing user.
|
|
2233
|
+
|
|
2234
|
+
:param id: (required)
|
|
2235
|
+
:type id: UUID
|
|
2236
|
+
:param user_admin_update_dto: (required)
|
|
2237
|
+
:type user_admin_update_dto: UserAdminUpdateDto
|
|
2238
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2239
|
+
number provided, it will be total request
|
|
2240
|
+
timeout. It can also be a pair (tuple) of
|
|
2241
|
+
(connection, read) timeouts.
|
|
2242
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2243
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2244
|
+
request; this effectively ignores the
|
|
2245
|
+
authentication in the spec for a single request.
|
|
2246
|
+
:type _request_auth: dict, optional
|
|
2247
|
+
:param _content_type: force content-type for the request.
|
|
2248
|
+
:type _content_type: str, Optional
|
|
2249
|
+
:param _headers: set to override the headers for a single
|
|
2250
|
+
request; this effectively ignores the headers
|
|
2251
|
+
in the spec for a single request.
|
|
2252
|
+
:type _headers: dict, optional
|
|
2253
|
+
:param _host_index: set to override the host_index for a single
|
|
2254
|
+
request; this effectively ignores the host_index
|
|
2255
|
+
in the spec for a single request.
|
|
2256
|
+
:type _host_index: int, optional
|
|
2257
|
+
:return: Returns the result object.
|
|
2258
|
+
""" # noqa: E501
|
|
2259
|
+
|
|
2260
|
+
_param = self._update_user_admin_serialize(
|
|
2261
|
+
id=id,
|
|
2262
|
+
user_admin_update_dto=user_admin_update_dto,
|
|
2263
|
+
_request_auth=_request_auth,
|
|
2264
|
+
_content_type=_content_type,
|
|
2265
|
+
_headers=_headers,
|
|
2266
|
+
_host_index=_host_index,
|
|
2267
|
+
)
|
|
2268
|
+
|
|
2269
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2270
|
+
"200": "UserAdminResponseDto",
|
|
2271
|
+
}
|
|
2272
|
+
response_data = await self.api_client.call_api(
|
|
2273
|
+
*_param, _request_timeout=_request_timeout
|
|
2274
|
+
)
|
|
2275
|
+
return response_data.response
|
|
2276
|
+
|
|
2277
|
+
def _update_user_admin_serialize(
|
|
2278
|
+
self,
|
|
2279
|
+
id,
|
|
2280
|
+
user_admin_update_dto,
|
|
2281
|
+
_request_auth,
|
|
2282
|
+
_content_type,
|
|
2283
|
+
_headers,
|
|
2284
|
+
_host_index,
|
|
2285
|
+
) -> RequestSerialized:
|
|
2286
|
+
_host = None
|
|
2287
|
+
|
|
2288
|
+
_collection_formats: Dict[str, str] = {}
|
|
2289
|
+
|
|
2290
|
+
_path_params: Dict[str, str] = {}
|
|
2291
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2292
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2293
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2294
|
+
_files: Dict[
|
|
2295
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2296
|
+
] = {}
|
|
2297
|
+
_body_params: Optional[bytes] = None
|
|
2298
|
+
|
|
2299
|
+
# process the path parameters
|
|
2300
|
+
if id is not None:
|
|
2301
|
+
_path_params["id"] = id
|
|
2302
|
+
# process the query parameters
|
|
2303
|
+
# process the header parameters
|
|
2304
|
+
# process the form parameters
|
|
2305
|
+
# process the body parameter
|
|
2306
|
+
if user_admin_update_dto is not None:
|
|
2307
|
+
_body_params = user_admin_update_dto
|
|
2308
|
+
|
|
2309
|
+
# set the HTTP header `Accept`
|
|
2310
|
+
if "Accept" not in _header_params:
|
|
2311
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
2312
|
+
["application/json"]
|
|
2313
|
+
)
|
|
2314
|
+
|
|
2315
|
+
# set the HTTP header `Content-Type`
|
|
2316
|
+
if _content_type:
|
|
2317
|
+
_header_params["Content-Type"] = _content_type
|
|
2318
|
+
else:
|
|
2319
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
2320
|
+
["application/json"]
|
|
2321
|
+
)
|
|
2322
|
+
if _default_content_type is not None:
|
|
2323
|
+
_header_params["Content-Type"] = _default_content_type
|
|
2324
|
+
|
|
2325
|
+
# authentication setting
|
|
2326
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
2327
|
+
|
|
2328
|
+
return self.api_client.param_serialize(
|
|
2329
|
+
method="PUT",
|
|
2330
|
+
resource_path="/admin/users/{id}",
|
|
2331
|
+
path_params=_path_params,
|
|
2332
|
+
query_params=_query_params,
|
|
2333
|
+
header_params=_header_params,
|
|
2334
|
+
body=_body_params,
|
|
2335
|
+
post_params=_form_params,
|
|
2336
|
+
files=_files,
|
|
2337
|
+
auth_settings=_auth_settings,
|
|
2338
|
+
collection_formats=_collection_formats,
|
|
2339
|
+
_host=_host,
|
|
2340
|
+
_request_auth=_request_auth,
|
|
2341
|
+
)
|
|
2342
|
+
|
|
2343
|
+
@validate_call
|
|
2344
|
+
async def update_user_preferences_admin(
|
|
2345
|
+
self,
|
|
2346
|
+
id: UUID,
|
|
2347
|
+
user_preferences_update_dto: UserPreferencesUpdateDto,
|
|
2348
|
+
_request_timeout: Union[
|
|
2349
|
+
None,
|
|
2350
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2351
|
+
Tuple[
|
|
2352
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
2353
|
+
],
|
|
2354
|
+
] = None,
|
|
2355
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2356
|
+
_content_type: Optional[StrictStr] = None,
|
|
2357
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2358
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2359
|
+
) -> UserPreferencesResponseDto:
|
|
2360
|
+
"""Update user preferences
|
|
2361
|
+
|
|
2362
|
+
Update the preferences of a specific user.
|
|
2363
|
+
|
|
2364
|
+
:param id: (required)
|
|
2365
|
+
:type id: UUID
|
|
2366
|
+
:param user_preferences_update_dto: (required)
|
|
2367
|
+
:type user_preferences_update_dto: UserPreferencesUpdateDto
|
|
2368
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2369
|
+
number provided, it will be total request
|
|
2370
|
+
timeout. It can also be a pair (tuple) of
|
|
2371
|
+
(connection, read) timeouts.
|
|
2372
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2373
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2374
|
+
request; this effectively ignores the
|
|
2375
|
+
authentication in the spec for a single request.
|
|
2376
|
+
:type _request_auth: dict, optional
|
|
2377
|
+
:param _content_type: force content-type for the request.
|
|
2378
|
+
:type _content_type: str, Optional
|
|
2379
|
+
:param _headers: set to override the headers for a single
|
|
2380
|
+
request; this effectively ignores the headers
|
|
2381
|
+
in the spec for a single request.
|
|
2382
|
+
:type _headers: dict, optional
|
|
2383
|
+
:param _host_index: set to override the host_index for a single
|
|
2384
|
+
request; this effectively ignores the host_index
|
|
2385
|
+
in the spec for a single request.
|
|
2386
|
+
:type _host_index: int, optional
|
|
2387
|
+
:return: Returns the result object.
|
|
2388
|
+
""" # noqa: E501
|
|
2389
|
+
|
|
2390
|
+
_param = self._update_user_preferences_admin_serialize(
|
|
2391
|
+
id=id,
|
|
2392
|
+
user_preferences_update_dto=user_preferences_update_dto,
|
|
2393
|
+
_request_auth=_request_auth,
|
|
2394
|
+
_content_type=_content_type,
|
|
2395
|
+
_headers=_headers,
|
|
2396
|
+
_host_index=_host_index,
|
|
2397
|
+
)
|
|
2398
|
+
|
|
2399
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2400
|
+
"200": "UserPreferencesResponseDto",
|
|
2401
|
+
}
|
|
2402
|
+
response_data = await self.api_client.call_api(
|
|
2403
|
+
*_param, _request_timeout=_request_timeout
|
|
2404
|
+
)
|
|
2405
|
+
await response_data.read()
|
|
2406
|
+
return self.api_client.response_deserialize(
|
|
2407
|
+
response_data=response_data,
|
|
2408
|
+
response_types_map=_response_types_map,
|
|
2409
|
+
).data
|
|
2410
|
+
|
|
2411
|
+
@validate_call
|
|
2412
|
+
async def update_user_preferences_admin_with_http_info(
|
|
2413
|
+
self,
|
|
2414
|
+
id: UUID,
|
|
2415
|
+
user_preferences_update_dto: UserPreferencesUpdateDto,
|
|
2416
|
+
_request_timeout: Union[
|
|
2417
|
+
None,
|
|
2418
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2419
|
+
Tuple[
|
|
2420
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
2421
|
+
],
|
|
2422
|
+
] = None,
|
|
2423
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2424
|
+
_content_type: Optional[StrictStr] = None,
|
|
2425
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2426
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2427
|
+
) -> ApiResponse[UserPreferencesResponseDto]:
|
|
2428
|
+
"""Update user preferences
|
|
2429
|
+
|
|
2430
|
+
Update the preferences of a specific user.
|
|
2431
|
+
|
|
2432
|
+
:param id: (required)
|
|
2433
|
+
:type id: UUID
|
|
2434
|
+
:param user_preferences_update_dto: (required)
|
|
2435
|
+
:type user_preferences_update_dto: UserPreferencesUpdateDto
|
|
2436
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2437
|
+
number provided, it will be total request
|
|
2438
|
+
timeout. It can also be a pair (tuple) of
|
|
2439
|
+
(connection, read) timeouts.
|
|
2440
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2441
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2442
|
+
request; this effectively ignores the
|
|
2443
|
+
authentication in the spec for a single request.
|
|
2444
|
+
:type _request_auth: dict, optional
|
|
2445
|
+
:param _content_type: force content-type for the request.
|
|
2446
|
+
:type _content_type: str, Optional
|
|
2447
|
+
:param _headers: set to override the headers for a single
|
|
2448
|
+
request; this effectively ignores the headers
|
|
2449
|
+
in the spec for a single request.
|
|
2450
|
+
:type _headers: dict, optional
|
|
2451
|
+
:param _host_index: set to override the host_index for a single
|
|
2452
|
+
request; this effectively ignores the host_index
|
|
2453
|
+
in the spec for a single request.
|
|
2454
|
+
:type _host_index: int, optional
|
|
2455
|
+
:return: Returns the result object.
|
|
2456
|
+
""" # noqa: E501
|
|
2457
|
+
|
|
2458
|
+
_param = self._update_user_preferences_admin_serialize(
|
|
2459
|
+
id=id,
|
|
2460
|
+
user_preferences_update_dto=user_preferences_update_dto,
|
|
2461
|
+
_request_auth=_request_auth,
|
|
2462
|
+
_content_type=_content_type,
|
|
2463
|
+
_headers=_headers,
|
|
2464
|
+
_host_index=_host_index,
|
|
2465
|
+
)
|
|
2466
|
+
|
|
2467
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2468
|
+
"200": "UserPreferencesResponseDto",
|
|
2469
|
+
}
|
|
2470
|
+
response_data = await self.api_client.call_api(
|
|
2471
|
+
*_param, _request_timeout=_request_timeout
|
|
2472
|
+
)
|
|
2473
|
+
await response_data.read()
|
|
2474
|
+
return self.api_client.response_deserialize(
|
|
2475
|
+
response_data=response_data,
|
|
2476
|
+
response_types_map=_response_types_map,
|
|
2477
|
+
)
|
|
2478
|
+
|
|
2479
|
+
@validate_call
|
|
2480
|
+
async def update_user_preferences_admin_without_preload_content(
|
|
2481
|
+
self,
|
|
2482
|
+
id: UUID,
|
|
2483
|
+
user_preferences_update_dto: UserPreferencesUpdateDto,
|
|
2484
|
+
_request_timeout: Union[
|
|
2485
|
+
None,
|
|
2486
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2487
|
+
Tuple[
|
|
2488
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
2489
|
+
],
|
|
2490
|
+
] = None,
|
|
2491
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2492
|
+
_content_type: Optional[StrictStr] = None,
|
|
2493
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2494
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2495
|
+
) -> RESTResponseType:
|
|
2496
|
+
"""Update user preferences
|
|
2497
|
+
|
|
2498
|
+
Update the preferences of a specific user.
|
|
2499
|
+
|
|
2500
|
+
:param id: (required)
|
|
2501
|
+
:type id: UUID
|
|
2502
|
+
:param user_preferences_update_dto: (required)
|
|
2503
|
+
:type user_preferences_update_dto: UserPreferencesUpdateDto
|
|
2504
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2505
|
+
number provided, it will be total request
|
|
2506
|
+
timeout. It can also be a pair (tuple) of
|
|
2507
|
+
(connection, read) timeouts.
|
|
2508
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2509
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2510
|
+
request; this effectively ignores the
|
|
2511
|
+
authentication in the spec for a single request.
|
|
2512
|
+
:type _request_auth: dict, optional
|
|
2513
|
+
:param _content_type: force content-type for the request.
|
|
2514
|
+
:type _content_type: str, Optional
|
|
2515
|
+
:param _headers: set to override the headers for a single
|
|
2516
|
+
request; this effectively ignores the headers
|
|
2517
|
+
in the spec for a single request.
|
|
2518
|
+
:type _headers: dict, optional
|
|
2519
|
+
:param _host_index: set to override the host_index for a single
|
|
2520
|
+
request; this effectively ignores the host_index
|
|
2521
|
+
in the spec for a single request.
|
|
2522
|
+
:type _host_index: int, optional
|
|
2523
|
+
:return: Returns the result object.
|
|
2524
|
+
""" # noqa: E501
|
|
2525
|
+
|
|
2526
|
+
_param = self._update_user_preferences_admin_serialize(
|
|
2527
|
+
id=id,
|
|
2528
|
+
user_preferences_update_dto=user_preferences_update_dto,
|
|
2529
|
+
_request_auth=_request_auth,
|
|
2530
|
+
_content_type=_content_type,
|
|
2531
|
+
_headers=_headers,
|
|
2532
|
+
_host_index=_host_index,
|
|
2533
|
+
)
|
|
2534
|
+
|
|
2535
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2536
|
+
"200": "UserPreferencesResponseDto",
|
|
2537
|
+
}
|
|
2538
|
+
response_data = await self.api_client.call_api(
|
|
2539
|
+
*_param, _request_timeout=_request_timeout
|
|
2540
|
+
)
|
|
2541
|
+
return response_data.response
|
|
2542
|
+
|
|
2543
|
+
def _update_user_preferences_admin_serialize(
|
|
2544
|
+
self,
|
|
2545
|
+
id,
|
|
2546
|
+
user_preferences_update_dto,
|
|
2547
|
+
_request_auth,
|
|
2548
|
+
_content_type,
|
|
2549
|
+
_headers,
|
|
2550
|
+
_host_index,
|
|
2551
|
+
) -> RequestSerialized:
|
|
2552
|
+
_host = None
|
|
2553
|
+
|
|
2554
|
+
_collection_formats: Dict[str, str] = {}
|
|
2555
|
+
|
|
2556
|
+
_path_params: Dict[str, str] = {}
|
|
2557
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2558
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2559
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2560
|
+
_files: Dict[
|
|
2561
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2562
|
+
] = {}
|
|
2563
|
+
_body_params: Optional[bytes] = None
|
|
2564
|
+
|
|
2565
|
+
# process the path parameters
|
|
2566
|
+
if id is not None:
|
|
2567
|
+
_path_params["id"] = id
|
|
2568
|
+
# process the query parameters
|
|
2569
|
+
# process the header parameters
|
|
2570
|
+
# process the form parameters
|
|
2571
|
+
# process the body parameter
|
|
2572
|
+
if user_preferences_update_dto is not None:
|
|
2573
|
+
_body_params = user_preferences_update_dto
|
|
2574
|
+
|
|
2575
|
+
# set the HTTP header `Accept`
|
|
2576
|
+
if "Accept" not in _header_params:
|
|
2577
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
2578
|
+
["application/json"]
|
|
2579
|
+
)
|
|
2580
|
+
|
|
2581
|
+
# set the HTTP header `Content-Type`
|
|
2582
|
+
if _content_type:
|
|
2583
|
+
_header_params["Content-Type"] = _content_type
|
|
2584
|
+
else:
|
|
2585
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
2586
|
+
["application/json"]
|
|
2587
|
+
)
|
|
2588
|
+
if _default_content_type is not None:
|
|
2589
|
+
_header_params["Content-Type"] = _default_content_type
|
|
2590
|
+
|
|
2591
|
+
# authentication setting
|
|
2592
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
2593
|
+
|
|
2594
|
+
return self.api_client.param_serialize(
|
|
2595
|
+
method="PUT",
|
|
2596
|
+
resource_path="/admin/users/{id}/preferences",
|
|
2597
|
+
path_params=_path_params,
|
|
2598
|
+
query_params=_query_params,
|
|
2599
|
+
header_params=_header_params,
|
|
2600
|
+
body=_body_params,
|
|
2601
|
+
post_params=_form_params,
|
|
2602
|
+
files=_files,
|
|
2603
|
+
auth_settings=_auth_settings,
|
|
2604
|
+
collection_formats=_collection_formats,
|
|
2605
|
+
_host=_host,
|
|
2606
|
+
_request_auth=_request_auth,
|
|
2607
|
+
)
|