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,1484 @@
|
|
|
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 uuid import UUID
|
|
19
|
+
from immich.client.models.api_key_create_dto import APIKeyCreateDto
|
|
20
|
+
from immich.client.models.api_key_create_response_dto import APIKeyCreateResponseDto
|
|
21
|
+
from immich.client.models.api_key_response_dto import APIKeyResponseDto
|
|
22
|
+
from immich.client.models.api_key_update_dto import APIKeyUpdateDto
|
|
23
|
+
|
|
24
|
+
from immich.client.api_client import ApiClient, RequestSerialized
|
|
25
|
+
from immich.client.api_response import ApiResponse
|
|
26
|
+
from immich.client.rest import RESTResponseType
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class APIKeysApi:
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None) -> None:
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient.get_default()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
|
|
41
|
+
@validate_call
|
|
42
|
+
async def create_api_key(
|
|
43
|
+
self,
|
|
44
|
+
api_key_create_dto: APIKeyCreateDto,
|
|
45
|
+
_request_timeout: Union[
|
|
46
|
+
None,
|
|
47
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
48
|
+
Tuple[
|
|
49
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
50
|
+
],
|
|
51
|
+
] = None,
|
|
52
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
53
|
+
_content_type: Optional[StrictStr] = None,
|
|
54
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
56
|
+
) -> APIKeyCreateResponseDto:
|
|
57
|
+
"""Create an API key
|
|
58
|
+
|
|
59
|
+
Creates a new API key. It will be limited to the permissions specified.
|
|
60
|
+
|
|
61
|
+
:param api_key_create_dto: (required)
|
|
62
|
+
:type api_key_create_dto: APIKeyCreateDto
|
|
63
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
64
|
+
number provided, it will be total request
|
|
65
|
+
timeout. It can also be a pair (tuple) of
|
|
66
|
+
(connection, read) timeouts.
|
|
67
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
68
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
69
|
+
request; this effectively ignores the
|
|
70
|
+
authentication in the spec for a single request.
|
|
71
|
+
:type _request_auth: dict, optional
|
|
72
|
+
:param _content_type: force content-type for the request.
|
|
73
|
+
:type _content_type: str, Optional
|
|
74
|
+
:param _headers: set to override the headers for a single
|
|
75
|
+
request; this effectively ignores the headers
|
|
76
|
+
in the spec for a single request.
|
|
77
|
+
:type _headers: dict, optional
|
|
78
|
+
:param _host_index: set to override the host_index for a single
|
|
79
|
+
request; this effectively ignores the host_index
|
|
80
|
+
in the spec for a single request.
|
|
81
|
+
:type _host_index: int, optional
|
|
82
|
+
:return: Returns the result object.
|
|
83
|
+
""" # noqa: E501
|
|
84
|
+
|
|
85
|
+
_param = self._create_api_key_serialize(
|
|
86
|
+
api_key_create_dto=api_key_create_dto,
|
|
87
|
+
_request_auth=_request_auth,
|
|
88
|
+
_content_type=_content_type,
|
|
89
|
+
_headers=_headers,
|
|
90
|
+
_host_index=_host_index,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
94
|
+
"201": "APIKeyCreateResponseDto",
|
|
95
|
+
}
|
|
96
|
+
response_data = await self.api_client.call_api(
|
|
97
|
+
*_param, _request_timeout=_request_timeout
|
|
98
|
+
)
|
|
99
|
+
await response_data.read()
|
|
100
|
+
return self.api_client.response_deserialize(
|
|
101
|
+
response_data=response_data,
|
|
102
|
+
response_types_map=_response_types_map,
|
|
103
|
+
).data
|
|
104
|
+
|
|
105
|
+
@validate_call
|
|
106
|
+
async def create_api_key_with_http_info(
|
|
107
|
+
self,
|
|
108
|
+
api_key_create_dto: APIKeyCreateDto,
|
|
109
|
+
_request_timeout: Union[
|
|
110
|
+
None,
|
|
111
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
112
|
+
Tuple[
|
|
113
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
114
|
+
],
|
|
115
|
+
] = None,
|
|
116
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
117
|
+
_content_type: Optional[StrictStr] = None,
|
|
118
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
119
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
120
|
+
) -> ApiResponse[APIKeyCreateResponseDto]:
|
|
121
|
+
"""Create an API key
|
|
122
|
+
|
|
123
|
+
Creates a new API key. It will be limited to the permissions specified.
|
|
124
|
+
|
|
125
|
+
:param api_key_create_dto: (required)
|
|
126
|
+
:type api_key_create_dto: APIKeyCreateDto
|
|
127
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
128
|
+
number provided, it will be total request
|
|
129
|
+
timeout. It can also be a pair (tuple) of
|
|
130
|
+
(connection, read) timeouts.
|
|
131
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
132
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
133
|
+
request; this effectively ignores the
|
|
134
|
+
authentication in the spec for a single request.
|
|
135
|
+
:type _request_auth: dict, optional
|
|
136
|
+
:param _content_type: force content-type for the request.
|
|
137
|
+
:type _content_type: str, Optional
|
|
138
|
+
:param _headers: set to override the headers for a single
|
|
139
|
+
request; this effectively ignores the headers
|
|
140
|
+
in the spec for a single request.
|
|
141
|
+
:type _headers: dict, optional
|
|
142
|
+
:param _host_index: set to override the host_index for a single
|
|
143
|
+
request; this effectively ignores the host_index
|
|
144
|
+
in the spec for a single request.
|
|
145
|
+
:type _host_index: int, optional
|
|
146
|
+
:return: Returns the result object.
|
|
147
|
+
""" # noqa: E501
|
|
148
|
+
|
|
149
|
+
_param = self._create_api_key_serialize(
|
|
150
|
+
api_key_create_dto=api_key_create_dto,
|
|
151
|
+
_request_auth=_request_auth,
|
|
152
|
+
_content_type=_content_type,
|
|
153
|
+
_headers=_headers,
|
|
154
|
+
_host_index=_host_index,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
158
|
+
"201": "APIKeyCreateResponseDto",
|
|
159
|
+
}
|
|
160
|
+
response_data = await self.api_client.call_api(
|
|
161
|
+
*_param, _request_timeout=_request_timeout
|
|
162
|
+
)
|
|
163
|
+
await response_data.read()
|
|
164
|
+
return self.api_client.response_deserialize(
|
|
165
|
+
response_data=response_data,
|
|
166
|
+
response_types_map=_response_types_map,
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
@validate_call
|
|
170
|
+
async def create_api_key_without_preload_content(
|
|
171
|
+
self,
|
|
172
|
+
api_key_create_dto: APIKeyCreateDto,
|
|
173
|
+
_request_timeout: Union[
|
|
174
|
+
None,
|
|
175
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
176
|
+
Tuple[
|
|
177
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
178
|
+
],
|
|
179
|
+
] = None,
|
|
180
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
181
|
+
_content_type: Optional[StrictStr] = None,
|
|
182
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
183
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
184
|
+
) -> RESTResponseType:
|
|
185
|
+
"""Create an API key
|
|
186
|
+
|
|
187
|
+
Creates a new API key. It will be limited to the permissions specified.
|
|
188
|
+
|
|
189
|
+
:param api_key_create_dto: (required)
|
|
190
|
+
:type api_key_create_dto: APIKeyCreateDto
|
|
191
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
192
|
+
number provided, it will be total request
|
|
193
|
+
timeout. It can also be a pair (tuple) of
|
|
194
|
+
(connection, read) timeouts.
|
|
195
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
196
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
197
|
+
request; this effectively ignores the
|
|
198
|
+
authentication in the spec for a single request.
|
|
199
|
+
:type _request_auth: dict, optional
|
|
200
|
+
:param _content_type: force content-type for the request.
|
|
201
|
+
:type _content_type: str, Optional
|
|
202
|
+
:param _headers: set to override the headers for a single
|
|
203
|
+
request; this effectively ignores the headers
|
|
204
|
+
in the spec for a single request.
|
|
205
|
+
:type _headers: dict, optional
|
|
206
|
+
:param _host_index: set to override the host_index for a single
|
|
207
|
+
request; this effectively ignores the host_index
|
|
208
|
+
in the spec for a single request.
|
|
209
|
+
:type _host_index: int, optional
|
|
210
|
+
:return: Returns the result object.
|
|
211
|
+
""" # noqa: E501
|
|
212
|
+
|
|
213
|
+
_param = self._create_api_key_serialize(
|
|
214
|
+
api_key_create_dto=api_key_create_dto,
|
|
215
|
+
_request_auth=_request_auth,
|
|
216
|
+
_content_type=_content_type,
|
|
217
|
+
_headers=_headers,
|
|
218
|
+
_host_index=_host_index,
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
222
|
+
"201": "APIKeyCreateResponseDto",
|
|
223
|
+
}
|
|
224
|
+
response_data = await self.api_client.call_api(
|
|
225
|
+
*_param, _request_timeout=_request_timeout
|
|
226
|
+
)
|
|
227
|
+
return response_data.response
|
|
228
|
+
|
|
229
|
+
def _create_api_key_serialize(
|
|
230
|
+
self,
|
|
231
|
+
api_key_create_dto,
|
|
232
|
+
_request_auth,
|
|
233
|
+
_content_type,
|
|
234
|
+
_headers,
|
|
235
|
+
_host_index,
|
|
236
|
+
) -> RequestSerialized:
|
|
237
|
+
_host = None
|
|
238
|
+
|
|
239
|
+
_collection_formats: Dict[str, str] = {}
|
|
240
|
+
|
|
241
|
+
_path_params: Dict[str, str] = {}
|
|
242
|
+
_query_params: List[Tuple[str, str]] = []
|
|
243
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
244
|
+
_form_params: List[Tuple[str, str]] = []
|
|
245
|
+
_files: Dict[
|
|
246
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
247
|
+
] = {}
|
|
248
|
+
_body_params: Optional[bytes] = None
|
|
249
|
+
|
|
250
|
+
# process the path parameters
|
|
251
|
+
# process the query parameters
|
|
252
|
+
# process the header parameters
|
|
253
|
+
# process the form parameters
|
|
254
|
+
# process the body parameter
|
|
255
|
+
if api_key_create_dto is not None:
|
|
256
|
+
_body_params = api_key_create_dto
|
|
257
|
+
|
|
258
|
+
# set the HTTP header `Accept`
|
|
259
|
+
if "Accept" not in _header_params:
|
|
260
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
261
|
+
["application/json"]
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
# set the HTTP header `Content-Type`
|
|
265
|
+
if _content_type:
|
|
266
|
+
_header_params["Content-Type"] = _content_type
|
|
267
|
+
else:
|
|
268
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
269
|
+
["application/json"]
|
|
270
|
+
)
|
|
271
|
+
if _default_content_type is not None:
|
|
272
|
+
_header_params["Content-Type"] = _default_content_type
|
|
273
|
+
|
|
274
|
+
# authentication setting
|
|
275
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
276
|
+
|
|
277
|
+
return self.api_client.param_serialize(
|
|
278
|
+
method="POST",
|
|
279
|
+
resource_path="/api-keys",
|
|
280
|
+
path_params=_path_params,
|
|
281
|
+
query_params=_query_params,
|
|
282
|
+
header_params=_header_params,
|
|
283
|
+
body=_body_params,
|
|
284
|
+
post_params=_form_params,
|
|
285
|
+
files=_files,
|
|
286
|
+
auth_settings=_auth_settings,
|
|
287
|
+
collection_formats=_collection_formats,
|
|
288
|
+
_host=_host,
|
|
289
|
+
_request_auth=_request_auth,
|
|
290
|
+
)
|
|
291
|
+
|
|
292
|
+
@validate_call
|
|
293
|
+
async def delete_api_key(
|
|
294
|
+
self,
|
|
295
|
+
id: UUID,
|
|
296
|
+
_request_timeout: Union[
|
|
297
|
+
None,
|
|
298
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
299
|
+
Tuple[
|
|
300
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
301
|
+
],
|
|
302
|
+
] = None,
|
|
303
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
304
|
+
_content_type: Optional[StrictStr] = None,
|
|
305
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
306
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
307
|
+
) -> None:
|
|
308
|
+
"""Delete an API key
|
|
309
|
+
|
|
310
|
+
Deletes an API key identified by its ID. The current user must own this API key.
|
|
311
|
+
|
|
312
|
+
:param id: (required)
|
|
313
|
+
:type id: UUID
|
|
314
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
315
|
+
number provided, it will be total request
|
|
316
|
+
timeout. It can also be a pair (tuple) of
|
|
317
|
+
(connection, read) timeouts.
|
|
318
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
319
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
320
|
+
request; this effectively ignores the
|
|
321
|
+
authentication in the spec for a single request.
|
|
322
|
+
:type _request_auth: dict, optional
|
|
323
|
+
:param _content_type: force content-type for the request.
|
|
324
|
+
:type _content_type: str, Optional
|
|
325
|
+
:param _headers: set to override the headers for a single
|
|
326
|
+
request; this effectively ignores the headers
|
|
327
|
+
in the spec for a single request.
|
|
328
|
+
:type _headers: dict, optional
|
|
329
|
+
:param _host_index: set to override the host_index for a single
|
|
330
|
+
request; this effectively ignores the host_index
|
|
331
|
+
in the spec for a single request.
|
|
332
|
+
:type _host_index: int, optional
|
|
333
|
+
:return: Returns the result object.
|
|
334
|
+
""" # noqa: E501
|
|
335
|
+
|
|
336
|
+
_param = self._delete_api_key_serialize(
|
|
337
|
+
id=id,
|
|
338
|
+
_request_auth=_request_auth,
|
|
339
|
+
_content_type=_content_type,
|
|
340
|
+
_headers=_headers,
|
|
341
|
+
_host_index=_host_index,
|
|
342
|
+
)
|
|
343
|
+
|
|
344
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
345
|
+
"204": None,
|
|
346
|
+
}
|
|
347
|
+
response_data = await self.api_client.call_api(
|
|
348
|
+
*_param, _request_timeout=_request_timeout
|
|
349
|
+
)
|
|
350
|
+
await response_data.read()
|
|
351
|
+
return self.api_client.response_deserialize(
|
|
352
|
+
response_data=response_data,
|
|
353
|
+
response_types_map=_response_types_map,
|
|
354
|
+
).data
|
|
355
|
+
|
|
356
|
+
@validate_call
|
|
357
|
+
async def delete_api_key_with_http_info(
|
|
358
|
+
self,
|
|
359
|
+
id: UUID,
|
|
360
|
+
_request_timeout: Union[
|
|
361
|
+
None,
|
|
362
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
363
|
+
Tuple[
|
|
364
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
365
|
+
],
|
|
366
|
+
] = None,
|
|
367
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
368
|
+
_content_type: Optional[StrictStr] = None,
|
|
369
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
370
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
371
|
+
) -> ApiResponse[None]:
|
|
372
|
+
"""Delete an API key
|
|
373
|
+
|
|
374
|
+
Deletes an API key identified by its ID. The current user must own this API key.
|
|
375
|
+
|
|
376
|
+
:param id: (required)
|
|
377
|
+
:type id: UUID
|
|
378
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
379
|
+
number provided, it will be total request
|
|
380
|
+
timeout. It can also be a pair (tuple) of
|
|
381
|
+
(connection, read) timeouts.
|
|
382
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
383
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
384
|
+
request; this effectively ignores the
|
|
385
|
+
authentication in the spec for a single request.
|
|
386
|
+
:type _request_auth: dict, optional
|
|
387
|
+
:param _content_type: force content-type for the request.
|
|
388
|
+
:type _content_type: str, Optional
|
|
389
|
+
:param _headers: set to override the headers for a single
|
|
390
|
+
request; this effectively ignores the headers
|
|
391
|
+
in the spec for a single request.
|
|
392
|
+
:type _headers: dict, optional
|
|
393
|
+
:param _host_index: set to override the host_index for a single
|
|
394
|
+
request; this effectively ignores the host_index
|
|
395
|
+
in the spec for a single request.
|
|
396
|
+
:type _host_index: int, optional
|
|
397
|
+
:return: Returns the result object.
|
|
398
|
+
""" # noqa: E501
|
|
399
|
+
|
|
400
|
+
_param = self._delete_api_key_serialize(
|
|
401
|
+
id=id,
|
|
402
|
+
_request_auth=_request_auth,
|
|
403
|
+
_content_type=_content_type,
|
|
404
|
+
_headers=_headers,
|
|
405
|
+
_host_index=_host_index,
|
|
406
|
+
)
|
|
407
|
+
|
|
408
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
409
|
+
"204": None,
|
|
410
|
+
}
|
|
411
|
+
response_data = await self.api_client.call_api(
|
|
412
|
+
*_param, _request_timeout=_request_timeout
|
|
413
|
+
)
|
|
414
|
+
await response_data.read()
|
|
415
|
+
return self.api_client.response_deserialize(
|
|
416
|
+
response_data=response_data,
|
|
417
|
+
response_types_map=_response_types_map,
|
|
418
|
+
)
|
|
419
|
+
|
|
420
|
+
@validate_call
|
|
421
|
+
async def delete_api_key_without_preload_content(
|
|
422
|
+
self,
|
|
423
|
+
id: UUID,
|
|
424
|
+
_request_timeout: Union[
|
|
425
|
+
None,
|
|
426
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
427
|
+
Tuple[
|
|
428
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
429
|
+
],
|
|
430
|
+
] = None,
|
|
431
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
432
|
+
_content_type: Optional[StrictStr] = None,
|
|
433
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
434
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
435
|
+
) -> RESTResponseType:
|
|
436
|
+
"""Delete an API key
|
|
437
|
+
|
|
438
|
+
Deletes an API key identified by its ID. The current user must own this API key.
|
|
439
|
+
|
|
440
|
+
:param id: (required)
|
|
441
|
+
:type id: UUID
|
|
442
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
443
|
+
number provided, it will be total request
|
|
444
|
+
timeout. It can also be a pair (tuple) of
|
|
445
|
+
(connection, read) timeouts.
|
|
446
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
447
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
448
|
+
request; this effectively ignores the
|
|
449
|
+
authentication in the spec for a single request.
|
|
450
|
+
:type _request_auth: dict, optional
|
|
451
|
+
:param _content_type: force content-type for the request.
|
|
452
|
+
:type _content_type: str, Optional
|
|
453
|
+
:param _headers: set to override the headers for a single
|
|
454
|
+
request; this effectively ignores the headers
|
|
455
|
+
in the spec for a single request.
|
|
456
|
+
:type _headers: dict, optional
|
|
457
|
+
:param _host_index: set to override the host_index for a single
|
|
458
|
+
request; this effectively ignores the host_index
|
|
459
|
+
in the spec for a single request.
|
|
460
|
+
:type _host_index: int, optional
|
|
461
|
+
:return: Returns the result object.
|
|
462
|
+
""" # noqa: E501
|
|
463
|
+
|
|
464
|
+
_param = self._delete_api_key_serialize(
|
|
465
|
+
id=id,
|
|
466
|
+
_request_auth=_request_auth,
|
|
467
|
+
_content_type=_content_type,
|
|
468
|
+
_headers=_headers,
|
|
469
|
+
_host_index=_host_index,
|
|
470
|
+
)
|
|
471
|
+
|
|
472
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
473
|
+
"204": None,
|
|
474
|
+
}
|
|
475
|
+
response_data = await self.api_client.call_api(
|
|
476
|
+
*_param, _request_timeout=_request_timeout
|
|
477
|
+
)
|
|
478
|
+
return response_data.response
|
|
479
|
+
|
|
480
|
+
def _delete_api_key_serialize(
|
|
481
|
+
self,
|
|
482
|
+
id,
|
|
483
|
+
_request_auth,
|
|
484
|
+
_content_type,
|
|
485
|
+
_headers,
|
|
486
|
+
_host_index,
|
|
487
|
+
) -> RequestSerialized:
|
|
488
|
+
_host = None
|
|
489
|
+
|
|
490
|
+
_collection_formats: Dict[str, str] = {}
|
|
491
|
+
|
|
492
|
+
_path_params: Dict[str, str] = {}
|
|
493
|
+
_query_params: List[Tuple[str, str]] = []
|
|
494
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
495
|
+
_form_params: List[Tuple[str, str]] = []
|
|
496
|
+
_files: Dict[
|
|
497
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
498
|
+
] = {}
|
|
499
|
+
_body_params: Optional[bytes] = None
|
|
500
|
+
|
|
501
|
+
# process the path parameters
|
|
502
|
+
if id is not None:
|
|
503
|
+
_path_params["id"] = id
|
|
504
|
+
# process the query parameters
|
|
505
|
+
# process the header parameters
|
|
506
|
+
# process the form parameters
|
|
507
|
+
# process the body parameter
|
|
508
|
+
|
|
509
|
+
# authentication setting
|
|
510
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
511
|
+
|
|
512
|
+
return self.api_client.param_serialize(
|
|
513
|
+
method="DELETE",
|
|
514
|
+
resource_path="/api-keys/{id}",
|
|
515
|
+
path_params=_path_params,
|
|
516
|
+
query_params=_query_params,
|
|
517
|
+
header_params=_header_params,
|
|
518
|
+
body=_body_params,
|
|
519
|
+
post_params=_form_params,
|
|
520
|
+
files=_files,
|
|
521
|
+
auth_settings=_auth_settings,
|
|
522
|
+
collection_formats=_collection_formats,
|
|
523
|
+
_host=_host,
|
|
524
|
+
_request_auth=_request_auth,
|
|
525
|
+
)
|
|
526
|
+
|
|
527
|
+
@validate_call
|
|
528
|
+
async def get_api_key(
|
|
529
|
+
self,
|
|
530
|
+
id: UUID,
|
|
531
|
+
_request_timeout: Union[
|
|
532
|
+
None,
|
|
533
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
534
|
+
Tuple[
|
|
535
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
536
|
+
],
|
|
537
|
+
] = None,
|
|
538
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
539
|
+
_content_type: Optional[StrictStr] = None,
|
|
540
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
541
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
542
|
+
) -> APIKeyResponseDto:
|
|
543
|
+
"""Retrieve an API key
|
|
544
|
+
|
|
545
|
+
Retrieve an API key by its ID. The current user must own this API key.
|
|
546
|
+
|
|
547
|
+
:param id: (required)
|
|
548
|
+
:type id: UUID
|
|
549
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
550
|
+
number provided, it will be total request
|
|
551
|
+
timeout. It can also be a pair (tuple) of
|
|
552
|
+
(connection, read) timeouts.
|
|
553
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
554
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
555
|
+
request; this effectively ignores the
|
|
556
|
+
authentication in the spec for a single request.
|
|
557
|
+
:type _request_auth: dict, optional
|
|
558
|
+
:param _content_type: force content-type for the request.
|
|
559
|
+
:type _content_type: str, Optional
|
|
560
|
+
:param _headers: set to override the headers for a single
|
|
561
|
+
request; this effectively ignores the headers
|
|
562
|
+
in the spec for a single request.
|
|
563
|
+
:type _headers: dict, optional
|
|
564
|
+
:param _host_index: set to override the host_index for a single
|
|
565
|
+
request; this effectively ignores the host_index
|
|
566
|
+
in the spec for a single request.
|
|
567
|
+
:type _host_index: int, optional
|
|
568
|
+
:return: Returns the result object.
|
|
569
|
+
""" # noqa: E501
|
|
570
|
+
|
|
571
|
+
_param = self._get_api_key_serialize(
|
|
572
|
+
id=id,
|
|
573
|
+
_request_auth=_request_auth,
|
|
574
|
+
_content_type=_content_type,
|
|
575
|
+
_headers=_headers,
|
|
576
|
+
_host_index=_host_index,
|
|
577
|
+
)
|
|
578
|
+
|
|
579
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
580
|
+
"200": "APIKeyResponseDto",
|
|
581
|
+
}
|
|
582
|
+
response_data = await self.api_client.call_api(
|
|
583
|
+
*_param, _request_timeout=_request_timeout
|
|
584
|
+
)
|
|
585
|
+
await response_data.read()
|
|
586
|
+
return self.api_client.response_deserialize(
|
|
587
|
+
response_data=response_data,
|
|
588
|
+
response_types_map=_response_types_map,
|
|
589
|
+
).data
|
|
590
|
+
|
|
591
|
+
@validate_call
|
|
592
|
+
async def get_api_key_with_http_info(
|
|
593
|
+
self,
|
|
594
|
+
id: UUID,
|
|
595
|
+
_request_timeout: Union[
|
|
596
|
+
None,
|
|
597
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
598
|
+
Tuple[
|
|
599
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
600
|
+
],
|
|
601
|
+
] = None,
|
|
602
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
603
|
+
_content_type: Optional[StrictStr] = None,
|
|
604
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
605
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
606
|
+
) -> ApiResponse[APIKeyResponseDto]:
|
|
607
|
+
"""Retrieve an API key
|
|
608
|
+
|
|
609
|
+
Retrieve an API key by its ID. The current user must own this API key.
|
|
610
|
+
|
|
611
|
+
:param id: (required)
|
|
612
|
+
:type id: UUID
|
|
613
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
614
|
+
number provided, it will be total request
|
|
615
|
+
timeout. It can also be a pair (tuple) of
|
|
616
|
+
(connection, read) timeouts.
|
|
617
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
618
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
619
|
+
request; this effectively ignores the
|
|
620
|
+
authentication in the spec for a single request.
|
|
621
|
+
:type _request_auth: dict, optional
|
|
622
|
+
:param _content_type: force content-type for the request.
|
|
623
|
+
:type _content_type: str, Optional
|
|
624
|
+
:param _headers: set to override the headers for a single
|
|
625
|
+
request; this effectively ignores the headers
|
|
626
|
+
in the spec for a single request.
|
|
627
|
+
:type _headers: dict, optional
|
|
628
|
+
:param _host_index: set to override the host_index for a single
|
|
629
|
+
request; this effectively ignores the host_index
|
|
630
|
+
in the spec for a single request.
|
|
631
|
+
:type _host_index: int, optional
|
|
632
|
+
:return: Returns the result object.
|
|
633
|
+
""" # noqa: E501
|
|
634
|
+
|
|
635
|
+
_param = self._get_api_key_serialize(
|
|
636
|
+
id=id,
|
|
637
|
+
_request_auth=_request_auth,
|
|
638
|
+
_content_type=_content_type,
|
|
639
|
+
_headers=_headers,
|
|
640
|
+
_host_index=_host_index,
|
|
641
|
+
)
|
|
642
|
+
|
|
643
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
644
|
+
"200": "APIKeyResponseDto",
|
|
645
|
+
}
|
|
646
|
+
response_data = await self.api_client.call_api(
|
|
647
|
+
*_param, _request_timeout=_request_timeout
|
|
648
|
+
)
|
|
649
|
+
await response_data.read()
|
|
650
|
+
return self.api_client.response_deserialize(
|
|
651
|
+
response_data=response_data,
|
|
652
|
+
response_types_map=_response_types_map,
|
|
653
|
+
)
|
|
654
|
+
|
|
655
|
+
@validate_call
|
|
656
|
+
async def get_api_key_without_preload_content(
|
|
657
|
+
self,
|
|
658
|
+
id: UUID,
|
|
659
|
+
_request_timeout: Union[
|
|
660
|
+
None,
|
|
661
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
662
|
+
Tuple[
|
|
663
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
664
|
+
],
|
|
665
|
+
] = None,
|
|
666
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
667
|
+
_content_type: Optional[StrictStr] = None,
|
|
668
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
669
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
670
|
+
) -> RESTResponseType:
|
|
671
|
+
"""Retrieve an API key
|
|
672
|
+
|
|
673
|
+
Retrieve an API key by its ID. The current user must own this API key.
|
|
674
|
+
|
|
675
|
+
:param id: (required)
|
|
676
|
+
:type id: UUID
|
|
677
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
678
|
+
number provided, it will be total request
|
|
679
|
+
timeout. It can also be a pair (tuple) of
|
|
680
|
+
(connection, read) timeouts.
|
|
681
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
682
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
683
|
+
request; this effectively ignores the
|
|
684
|
+
authentication in the spec for a single request.
|
|
685
|
+
:type _request_auth: dict, optional
|
|
686
|
+
:param _content_type: force content-type for the request.
|
|
687
|
+
:type _content_type: str, Optional
|
|
688
|
+
:param _headers: set to override the headers for a single
|
|
689
|
+
request; this effectively ignores the headers
|
|
690
|
+
in the spec for a single request.
|
|
691
|
+
:type _headers: dict, optional
|
|
692
|
+
:param _host_index: set to override the host_index for a single
|
|
693
|
+
request; this effectively ignores the host_index
|
|
694
|
+
in the spec for a single request.
|
|
695
|
+
:type _host_index: int, optional
|
|
696
|
+
:return: Returns the result object.
|
|
697
|
+
""" # noqa: E501
|
|
698
|
+
|
|
699
|
+
_param = self._get_api_key_serialize(
|
|
700
|
+
id=id,
|
|
701
|
+
_request_auth=_request_auth,
|
|
702
|
+
_content_type=_content_type,
|
|
703
|
+
_headers=_headers,
|
|
704
|
+
_host_index=_host_index,
|
|
705
|
+
)
|
|
706
|
+
|
|
707
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
708
|
+
"200": "APIKeyResponseDto",
|
|
709
|
+
}
|
|
710
|
+
response_data = await self.api_client.call_api(
|
|
711
|
+
*_param, _request_timeout=_request_timeout
|
|
712
|
+
)
|
|
713
|
+
return response_data.response
|
|
714
|
+
|
|
715
|
+
def _get_api_key_serialize(
|
|
716
|
+
self,
|
|
717
|
+
id,
|
|
718
|
+
_request_auth,
|
|
719
|
+
_content_type,
|
|
720
|
+
_headers,
|
|
721
|
+
_host_index,
|
|
722
|
+
) -> RequestSerialized:
|
|
723
|
+
_host = None
|
|
724
|
+
|
|
725
|
+
_collection_formats: Dict[str, str] = {}
|
|
726
|
+
|
|
727
|
+
_path_params: Dict[str, str] = {}
|
|
728
|
+
_query_params: List[Tuple[str, str]] = []
|
|
729
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
730
|
+
_form_params: List[Tuple[str, str]] = []
|
|
731
|
+
_files: Dict[
|
|
732
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
733
|
+
] = {}
|
|
734
|
+
_body_params: Optional[bytes] = None
|
|
735
|
+
|
|
736
|
+
# process the path parameters
|
|
737
|
+
if id is not None:
|
|
738
|
+
_path_params["id"] = id
|
|
739
|
+
# process the query parameters
|
|
740
|
+
# process the header parameters
|
|
741
|
+
# process the form parameters
|
|
742
|
+
# process the body parameter
|
|
743
|
+
|
|
744
|
+
# set the HTTP header `Accept`
|
|
745
|
+
if "Accept" not in _header_params:
|
|
746
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
747
|
+
["application/json"]
|
|
748
|
+
)
|
|
749
|
+
|
|
750
|
+
# authentication setting
|
|
751
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
752
|
+
|
|
753
|
+
return self.api_client.param_serialize(
|
|
754
|
+
method="GET",
|
|
755
|
+
resource_path="/api-keys/{id}",
|
|
756
|
+
path_params=_path_params,
|
|
757
|
+
query_params=_query_params,
|
|
758
|
+
header_params=_header_params,
|
|
759
|
+
body=_body_params,
|
|
760
|
+
post_params=_form_params,
|
|
761
|
+
files=_files,
|
|
762
|
+
auth_settings=_auth_settings,
|
|
763
|
+
collection_formats=_collection_formats,
|
|
764
|
+
_host=_host,
|
|
765
|
+
_request_auth=_request_auth,
|
|
766
|
+
)
|
|
767
|
+
|
|
768
|
+
@validate_call
|
|
769
|
+
async def get_api_keys(
|
|
770
|
+
self,
|
|
771
|
+
_request_timeout: Union[
|
|
772
|
+
None,
|
|
773
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
774
|
+
Tuple[
|
|
775
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
776
|
+
],
|
|
777
|
+
] = None,
|
|
778
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
779
|
+
_content_type: Optional[StrictStr] = None,
|
|
780
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
781
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
782
|
+
) -> List[APIKeyResponseDto]:
|
|
783
|
+
"""List all API keys
|
|
784
|
+
|
|
785
|
+
Retrieve all API keys of the current user.
|
|
786
|
+
|
|
787
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
788
|
+
number provided, it will be total request
|
|
789
|
+
timeout. It can also be a pair (tuple) of
|
|
790
|
+
(connection, read) timeouts.
|
|
791
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
792
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
793
|
+
request; this effectively ignores the
|
|
794
|
+
authentication in the spec for a single request.
|
|
795
|
+
:type _request_auth: dict, optional
|
|
796
|
+
:param _content_type: force content-type for the request.
|
|
797
|
+
:type _content_type: str, Optional
|
|
798
|
+
:param _headers: set to override the headers for a single
|
|
799
|
+
request; this effectively ignores the headers
|
|
800
|
+
in the spec for a single request.
|
|
801
|
+
:type _headers: dict, optional
|
|
802
|
+
:param _host_index: set to override the host_index for a single
|
|
803
|
+
request; this effectively ignores the host_index
|
|
804
|
+
in the spec for a single request.
|
|
805
|
+
:type _host_index: int, optional
|
|
806
|
+
:return: Returns the result object.
|
|
807
|
+
""" # noqa: E501
|
|
808
|
+
|
|
809
|
+
_param = self._get_api_keys_serialize(
|
|
810
|
+
_request_auth=_request_auth,
|
|
811
|
+
_content_type=_content_type,
|
|
812
|
+
_headers=_headers,
|
|
813
|
+
_host_index=_host_index,
|
|
814
|
+
)
|
|
815
|
+
|
|
816
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
817
|
+
"200": "List[APIKeyResponseDto]",
|
|
818
|
+
}
|
|
819
|
+
response_data = await self.api_client.call_api(
|
|
820
|
+
*_param, _request_timeout=_request_timeout
|
|
821
|
+
)
|
|
822
|
+
await response_data.read()
|
|
823
|
+
return self.api_client.response_deserialize(
|
|
824
|
+
response_data=response_data,
|
|
825
|
+
response_types_map=_response_types_map,
|
|
826
|
+
).data
|
|
827
|
+
|
|
828
|
+
@validate_call
|
|
829
|
+
async def get_api_keys_with_http_info(
|
|
830
|
+
self,
|
|
831
|
+
_request_timeout: Union[
|
|
832
|
+
None,
|
|
833
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
834
|
+
Tuple[
|
|
835
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
836
|
+
],
|
|
837
|
+
] = None,
|
|
838
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
839
|
+
_content_type: Optional[StrictStr] = None,
|
|
840
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
841
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
842
|
+
) -> ApiResponse[List[APIKeyResponseDto]]:
|
|
843
|
+
"""List all API keys
|
|
844
|
+
|
|
845
|
+
Retrieve all API keys of the current user.
|
|
846
|
+
|
|
847
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
848
|
+
number provided, it will be total request
|
|
849
|
+
timeout. It can also be a pair (tuple) of
|
|
850
|
+
(connection, read) timeouts.
|
|
851
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
852
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
853
|
+
request; this effectively ignores the
|
|
854
|
+
authentication in the spec for a single request.
|
|
855
|
+
:type _request_auth: dict, optional
|
|
856
|
+
:param _content_type: force content-type for the request.
|
|
857
|
+
:type _content_type: str, Optional
|
|
858
|
+
:param _headers: set to override the headers for a single
|
|
859
|
+
request; this effectively ignores the headers
|
|
860
|
+
in the spec for a single request.
|
|
861
|
+
:type _headers: dict, optional
|
|
862
|
+
:param _host_index: set to override the host_index for a single
|
|
863
|
+
request; this effectively ignores the host_index
|
|
864
|
+
in the spec for a single request.
|
|
865
|
+
:type _host_index: int, optional
|
|
866
|
+
:return: Returns the result object.
|
|
867
|
+
""" # noqa: E501
|
|
868
|
+
|
|
869
|
+
_param = self._get_api_keys_serialize(
|
|
870
|
+
_request_auth=_request_auth,
|
|
871
|
+
_content_type=_content_type,
|
|
872
|
+
_headers=_headers,
|
|
873
|
+
_host_index=_host_index,
|
|
874
|
+
)
|
|
875
|
+
|
|
876
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
877
|
+
"200": "List[APIKeyResponseDto]",
|
|
878
|
+
}
|
|
879
|
+
response_data = await self.api_client.call_api(
|
|
880
|
+
*_param, _request_timeout=_request_timeout
|
|
881
|
+
)
|
|
882
|
+
await response_data.read()
|
|
883
|
+
return self.api_client.response_deserialize(
|
|
884
|
+
response_data=response_data,
|
|
885
|
+
response_types_map=_response_types_map,
|
|
886
|
+
)
|
|
887
|
+
|
|
888
|
+
@validate_call
|
|
889
|
+
async def get_api_keys_without_preload_content(
|
|
890
|
+
self,
|
|
891
|
+
_request_timeout: Union[
|
|
892
|
+
None,
|
|
893
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
894
|
+
Tuple[
|
|
895
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
896
|
+
],
|
|
897
|
+
] = None,
|
|
898
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
899
|
+
_content_type: Optional[StrictStr] = None,
|
|
900
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
901
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
902
|
+
) -> RESTResponseType:
|
|
903
|
+
"""List all API keys
|
|
904
|
+
|
|
905
|
+
Retrieve all API keys of the current user.
|
|
906
|
+
|
|
907
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
908
|
+
number provided, it will be total request
|
|
909
|
+
timeout. It can also be a pair (tuple) of
|
|
910
|
+
(connection, read) timeouts.
|
|
911
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
912
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
913
|
+
request; this effectively ignores the
|
|
914
|
+
authentication in the spec for a single request.
|
|
915
|
+
:type _request_auth: dict, optional
|
|
916
|
+
:param _content_type: force content-type for the request.
|
|
917
|
+
:type _content_type: str, Optional
|
|
918
|
+
:param _headers: set to override the headers for a single
|
|
919
|
+
request; this effectively ignores the headers
|
|
920
|
+
in the spec for a single request.
|
|
921
|
+
:type _headers: dict, optional
|
|
922
|
+
:param _host_index: set to override the host_index for a single
|
|
923
|
+
request; this effectively ignores the host_index
|
|
924
|
+
in the spec for a single request.
|
|
925
|
+
:type _host_index: int, optional
|
|
926
|
+
:return: Returns the result object.
|
|
927
|
+
""" # noqa: E501
|
|
928
|
+
|
|
929
|
+
_param = self._get_api_keys_serialize(
|
|
930
|
+
_request_auth=_request_auth,
|
|
931
|
+
_content_type=_content_type,
|
|
932
|
+
_headers=_headers,
|
|
933
|
+
_host_index=_host_index,
|
|
934
|
+
)
|
|
935
|
+
|
|
936
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
937
|
+
"200": "List[APIKeyResponseDto]",
|
|
938
|
+
}
|
|
939
|
+
response_data = await self.api_client.call_api(
|
|
940
|
+
*_param, _request_timeout=_request_timeout
|
|
941
|
+
)
|
|
942
|
+
return response_data.response
|
|
943
|
+
|
|
944
|
+
def _get_api_keys_serialize(
|
|
945
|
+
self,
|
|
946
|
+
_request_auth,
|
|
947
|
+
_content_type,
|
|
948
|
+
_headers,
|
|
949
|
+
_host_index,
|
|
950
|
+
) -> RequestSerialized:
|
|
951
|
+
_host = None
|
|
952
|
+
|
|
953
|
+
_collection_formats: Dict[str, str] = {}
|
|
954
|
+
|
|
955
|
+
_path_params: Dict[str, str] = {}
|
|
956
|
+
_query_params: List[Tuple[str, str]] = []
|
|
957
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
958
|
+
_form_params: List[Tuple[str, str]] = []
|
|
959
|
+
_files: Dict[
|
|
960
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
961
|
+
] = {}
|
|
962
|
+
_body_params: Optional[bytes] = None
|
|
963
|
+
|
|
964
|
+
# process the path parameters
|
|
965
|
+
# process the query parameters
|
|
966
|
+
# process the header parameters
|
|
967
|
+
# process the form parameters
|
|
968
|
+
# process the body parameter
|
|
969
|
+
|
|
970
|
+
# set the HTTP header `Accept`
|
|
971
|
+
if "Accept" not in _header_params:
|
|
972
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
973
|
+
["application/json"]
|
|
974
|
+
)
|
|
975
|
+
|
|
976
|
+
# authentication setting
|
|
977
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
978
|
+
|
|
979
|
+
return self.api_client.param_serialize(
|
|
980
|
+
method="GET",
|
|
981
|
+
resource_path="/api-keys",
|
|
982
|
+
path_params=_path_params,
|
|
983
|
+
query_params=_query_params,
|
|
984
|
+
header_params=_header_params,
|
|
985
|
+
body=_body_params,
|
|
986
|
+
post_params=_form_params,
|
|
987
|
+
files=_files,
|
|
988
|
+
auth_settings=_auth_settings,
|
|
989
|
+
collection_formats=_collection_formats,
|
|
990
|
+
_host=_host,
|
|
991
|
+
_request_auth=_request_auth,
|
|
992
|
+
)
|
|
993
|
+
|
|
994
|
+
@validate_call
|
|
995
|
+
async def get_my_api_key(
|
|
996
|
+
self,
|
|
997
|
+
_request_timeout: Union[
|
|
998
|
+
None,
|
|
999
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1000
|
+
Tuple[
|
|
1001
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1002
|
+
],
|
|
1003
|
+
] = None,
|
|
1004
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1005
|
+
_content_type: Optional[StrictStr] = None,
|
|
1006
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1007
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1008
|
+
) -> APIKeyResponseDto:
|
|
1009
|
+
"""Retrieve the current API key
|
|
1010
|
+
|
|
1011
|
+
Retrieve the API key that is used to access this endpoint.
|
|
1012
|
+
|
|
1013
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1014
|
+
number provided, it will be total request
|
|
1015
|
+
timeout. It can also be a pair (tuple) of
|
|
1016
|
+
(connection, read) timeouts.
|
|
1017
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1018
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1019
|
+
request; this effectively ignores the
|
|
1020
|
+
authentication in the spec for a single request.
|
|
1021
|
+
:type _request_auth: dict, optional
|
|
1022
|
+
:param _content_type: force content-type for the request.
|
|
1023
|
+
:type _content_type: str, Optional
|
|
1024
|
+
:param _headers: set to override the headers for a single
|
|
1025
|
+
request; this effectively ignores the headers
|
|
1026
|
+
in the spec for a single request.
|
|
1027
|
+
:type _headers: dict, optional
|
|
1028
|
+
:param _host_index: set to override the host_index for a single
|
|
1029
|
+
request; this effectively ignores the host_index
|
|
1030
|
+
in the spec for a single request.
|
|
1031
|
+
:type _host_index: int, optional
|
|
1032
|
+
:return: Returns the result object.
|
|
1033
|
+
""" # noqa: E501
|
|
1034
|
+
|
|
1035
|
+
_param = self._get_my_api_key_serialize(
|
|
1036
|
+
_request_auth=_request_auth,
|
|
1037
|
+
_content_type=_content_type,
|
|
1038
|
+
_headers=_headers,
|
|
1039
|
+
_host_index=_host_index,
|
|
1040
|
+
)
|
|
1041
|
+
|
|
1042
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1043
|
+
"200": "APIKeyResponseDto",
|
|
1044
|
+
}
|
|
1045
|
+
response_data = await self.api_client.call_api(
|
|
1046
|
+
*_param, _request_timeout=_request_timeout
|
|
1047
|
+
)
|
|
1048
|
+
await response_data.read()
|
|
1049
|
+
return self.api_client.response_deserialize(
|
|
1050
|
+
response_data=response_data,
|
|
1051
|
+
response_types_map=_response_types_map,
|
|
1052
|
+
).data
|
|
1053
|
+
|
|
1054
|
+
@validate_call
|
|
1055
|
+
async def get_my_api_key_with_http_info(
|
|
1056
|
+
self,
|
|
1057
|
+
_request_timeout: Union[
|
|
1058
|
+
None,
|
|
1059
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1060
|
+
Tuple[
|
|
1061
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1062
|
+
],
|
|
1063
|
+
] = None,
|
|
1064
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1065
|
+
_content_type: Optional[StrictStr] = None,
|
|
1066
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1067
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1068
|
+
) -> ApiResponse[APIKeyResponseDto]:
|
|
1069
|
+
"""Retrieve the current API key
|
|
1070
|
+
|
|
1071
|
+
Retrieve the API key that is used to access this endpoint.
|
|
1072
|
+
|
|
1073
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1074
|
+
number provided, it will be total request
|
|
1075
|
+
timeout. It can also be a pair (tuple) of
|
|
1076
|
+
(connection, read) timeouts.
|
|
1077
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1078
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1079
|
+
request; this effectively ignores the
|
|
1080
|
+
authentication in the spec for a single request.
|
|
1081
|
+
:type _request_auth: dict, optional
|
|
1082
|
+
:param _content_type: force content-type for the request.
|
|
1083
|
+
:type _content_type: str, Optional
|
|
1084
|
+
:param _headers: set to override the headers for a single
|
|
1085
|
+
request; this effectively ignores the headers
|
|
1086
|
+
in the spec for a single request.
|
|
1087
|
+
:type _headers: dict, optional
|
|
1088
|
+
:param _host_index: set to override the host_index for a single
|
|
1089
|
+
request; this effectively ignores the host_index
|
|
1090
|
+
in the spec for a single request.
|
|
1091
|
+
:type _host_index: int, optional
|
|
1092
|
+
:return: Returns the result object.
|
|
1093
|
+
""" # noqa: E501
|
|
1094
|
+
|
|
1095
|
+
_param = self._get_my_api_key_serialize(
|
|
1096
|
+
_request_auth=_request_auth,
|
|
1097
|
+
_content_type=_content_type,
|
|
1098
|
+
_headers=_headers,
|
|
1099
|
+
_host_index=_host_index,
|
|
1100
|
+
)
|
|
1101
|
+
|
|
1102
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1103
|
+
"200": "APIKeyResponseDto",
|
|
1104
|
+
}
|
|
1105
|
+
response_data = await self.api_client.call_api(
|
|
1106
|
+
*_param, _request_timeout=_request_timeout
|
|
1107
|
+
)
|
|
1108
|
+
await response_data.read()
|
|
1109
|
+
return self.api_client.response_deserialize(
|
|
1110
|
+
response_data=response_data,
|
|
1111
|
+
response_types_map=_response_types_map,
|
|
1112
|
+
)
|
|
1113
|
+
|
|
1114
|
+
@validate_call
|
|
1115
|
+
async def get_my_api_key_without_preload_content(
|
|
1116
|
+
self,
|
|
1117
|
+
_request_timeout: Union[
|
|
1118
|
+
None,
|
|
1119
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1120
|
+
Tuple[
|
|
1121
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1122
|
+
],
|
|
1123
|
+
] = None,
|
|
1124
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1125
|
+
_content_type: Optional[StrictStr] = None,
|
|
1126
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1127
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1128
|
+
) -> RESTResponseType:
|
|
1129
|
+
"""Retrieve the current API key
|
|
1130
|
+
|
|
1131
|
+
Retrieve the API key that is used to access this endpoint.
|
|
1132
|
+
|
|
1133
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1134
|
+
number provided, it will be total request
|
|
1135
|
+
timeout. It can also be a pair (tuple) of
|
|
1136
|
+
(connection, read) timeouts.
|
|
1137
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1138
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1139
|
+
request; this effectively ignores the
|
|
1140
|
+
authentication in the spec for a single request.
|
|
1141
|
+
:type _request_auth: dict, optional
|
|
1142
|
+
:param _content_type: force content-type for the request.
|
|
1143
|
+
:type _content_type: str, Optional
|
|
1144
|
+
:param _headers: set to override the headers for a single
|
|
1145
|
+
request; this effectively ignores the headers
|
|
1146
|
+
in the spec for a single request.
|
|
1147
|
+
:type _headers: dict, optional
|
|
1148
|
+
:param _host_index: set to override the host_index for a single
|
|
1149
|
+
request; this effectively ignores the host_index
|
|
1150
|
+
in the spec for a single request.
|
|
1151
|
+
:type _host_index: int, optional
|
|
1152
|
+
:return: Returns the result object.
|
|
1153
|
+
""" # noqa: E501
|
|
1154
|
+
|
|
1155
|
+
_param = self._get_my_api_key_serialize(
|
|
1156
|
+
_request_auth=_request_auth,
|
|
1157
|
+
_content_type=_content_type,
|
|
1158
|
+
_headers=_headers,
|
|
1159
|
+
_host_index=_host_index,
|
|
1160
|
+
)
|
|
1161
|
+
|
|
1162
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1163
|
+
"200": "APIKeyResponseDto",
|
|
1164
|
+
}
|
|
1165
|
+
response_data = await self.api_client.call_api(
|
|
1166
|
+
*_param, _request_timeout=_request_timeout
|
|
1167
|
+
)
|
|
1168
|
+
return response_data.response
|
|
1169
|
+
|
|
1170
|
+
def _get_my_api_key_serialize(
|
|
1171
|
+
self,
|
|
1172
|
+
_request_auth,
|
|
1173
|
+
_content_type,
|
|
1174
|
+
_headers,
|
|
1175
|
+
_host_index,
|
|
1176
|
+
) -> RequestSerialized:
|
|
1177
|
+
_host = None
|
|
1178
|
+
|
|
1179
|
+
_collection_formats: Dict[str, str] = {}
|
|
1180
|
+
|
|
1181
|
+
_path_params: Dict[str, str] = {}
|
|
1182
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1183
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1184
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1185
|
+
_files: Dict[
|
|
1186
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1187
|
+
] = {}
|
|
1188
|
+
_body_params: Optional[bytes] = None
|
|
1189
|
+
|
|
1190
|
+
# process the path parameters
|
|
1191
|
+
# process the query parameters
|
|
1192
|
+
# process the header parameters
|
|
1193
|
+
# process the form parameters
|
|
1194
|
+
# process the body parameter
|
|
1195
|
+
|
|
1196
|
+
# set the HTTP header `Accept`
|
|
1197
|
+
if "Accept" not in _header_params:
|
|
1198
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1199
|
+
["application/json"]
|
|
1200
|
+
)
|
|
1201
|
+
|
|
1202
|
+
# authentication setting
|
|
1203
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
1204
|
+
|
|
1205
|
+
return self.api_client.param_serialize(
|
|
1206
|
+
method="GET",
|
|
1207
|
+
resource_path="/api-keys/me",
|
|
1208
|
+
path_params=_path_params,
|
|
1209
|
+
query_params=_query_params,
|
|
1210
|
+
header_params=_header_params,
|
|
1211
|
+
body=_body_params,
|
|
1212
|
+
post_params=_form_params,
|
|
1213
|
+
files=_files,
|
|
1214
|
+
auth_settings=_auth_settings,
|
|
1215
|
+
collection_formats=_collection_formats,
|
|
1216
|
+
_host=_host,
|
|
1217
|
+
_request_auth=_request_auth,
|
|
1218
|
+
)
|
|
1219
|
+
|
|
1220
|
+
@validate_call
|
|
1221
|
+
async def update_api_key(
|
|
1222
|
+
self,
|
|
1223
|
+
id: UUID,
|
|
1224
|
+
api_key_update_dto: APIKeyUpdateDto,
|
|
1225
|
+
_request_timeout: Union[
|
|
1226
|
+
None,
|
|
1227
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1228
|
+
Tuple[
|
|
1229
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1230
|
+
],
|
|
1231
|
+
] = None,
|
|
1232
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1233
|
+
_content_type: Optional[StrictStr] = None,
|
|
1234
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1235
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1236
|
+
) -> APIKeyResponseDto:
|
|
1237
|
+
"""Update an API key
|
|
1238
|
+
|
|
1239
|
+
Updates the name and permissions of an API key by its ID. The current user must own this API key.
|
|
1240
|
+
|
|
1241
|
+
:param id: (required)
|
|
1242
|
+
:type id: UUID
|
|
1243
|
+
:param api_key_update_dto: (required)
|
|
1244
|
+
:type api_key_update_dto: APIKeyUpdateDto
|
|
1245
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1246
|
+
number provided, it will be total request
|
|
1247
|
+
timeout. It can also be a pair (tuple) of
|
|
1248
|
+
(connection, read) timeouts.
|
|
1249
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1250
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1251
|
+
request; this effectively ignores the
|
|
1252
|
+
authentication in the spec for a single request.
|
|
1253
|
+
:type _request_auth: dict, optional
|
|
1254
|
+
:param _content_type: force content-type for the request.
|
|
1255
|
+
:type _content_type: str, Optional
|
|
1256
|
+
:param _headers: set to override the headers for a single
|
|
1257
|
+
request; this effectively ignores the headers
|
|
1258
|
+
in the spec for a single request.
|
|
1259
|
+
:type _headers: dict, optional
|
|
1260
|
+
:param _host_index: set to override the host_index for a single
|
|
1261
|
+
request; this effectively ignores the host_index
|
|
1262
|
+
in the spec for a single request.
|
|
1263
|
+
:type _host_index: int, optional
|
|
1264
|
+
:return: Returns the result object.
|
|
1265
|
+
""" # noqa: E501
|
|
1266
|
+
|
|
1267
|
+
_param = self._update_api_key_serialize(
|
|
1268
|
+
id=id,
|
|
1269
|
+
api_key_update_dto=api_key_update_dto,
|
|
1270
|
+
_request_auth=_request_auth,
|
|
1271
|
+
_content_type=_content_type,
|
|
1272
|
+
_headers=_headers,
|
|
1273
|
+
_host_index=_host_index,
|
|
1274
|
+
)
|
|
1275
|
+
|
|
1276
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1277
|
+
"200": "APIKeyResponseDto",
|
|
1278
|
+
}
|
|
1279
|
+
response_data = await self.api_client.call_api(
|
|
1280
|
+
*_param, _request_timeout=_request_timeout
|
|
1281
|
+
)
|
|
1282
|
+
await response_data.read()
|
|
1283
|
+
return self.api_client.response_deserialize(
|
|
1284
|
+
response_data=response_data,
|
|
1285
|
+
response_types_map=_response_types_map,
|
|
1286
|
+
).data
|
|
1287
|
+
|
|
1288
|
+
@validate_call
|
|
1289
|
+
async def update_api_key_with_http_info(
|
|
1290
|
+
self,
|
|
1291
|
+
id: UUID,
|
|
1292
|
+
api_key_update_dto: APIKeyUpdateDto,
|
|
1293
|
+
_request_timeout: Union[
|
|
1294
|
+
None,
|
|
1295
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1296
|
+
Tuple[
|
|
1297
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1298
|
+
],
|
|
1299
|
+
] = None,
|
|
1300
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1301
|
+
_content_type: Optional[StrictStr] = None,
|
|
1302
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1303
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1304
|
+
) -> ApiResponse[APIKeyResponseDto]:
|
|
1305
|
+
"""Update an API key
|
|
1306
|
+
|
|
1307
|
+
Updates the name and permissions of an API key by its ID. The current user must own this API key.
|
|
1308
|
+
|
|
1309
|
+
:param id: (required)
|
|
1310
|
+
:type id: UUID
|
|
1311
|
+
:param api_key_update_dto: (required)
|
|
1312
|
+
:type api_key_update_dto: APIKeyUpdateDto
|
|
1313
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1314
|
+
number provided, it will be total request
|
|
1315
|
+
timeout. It can also be a pair (tuple) of
|
|
1316
|
+
(connection, read) timeouts.
|
|
1317
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1318
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1319
|
+
request; this effectively ignores the
|
|
1320
|
+
authentication in the spec for a single request.
|
|
1321
|
+
:type _request_auth: dict, optional
|
|
1322
|
+
:param _content_type: force content-type for the request.
|
|
1323
|
+
:type _content_type: str, Optional
|
|
1324
|
+
:param _headers: set to override the headers for a single
|
|
1325
|
+
request; this effectively ignores the headers
|
|
1326
|
+
in the spec for a single request.
|
|
1327
|
+
:type _headers: dict, optional
|
|
1328
|
+
:param _host_index: set to override the host_index for a single
|
|
1329
|
+
request; this effectively ignores the host_index
|
|
1330
|
+
in the spec for a single request.
|
|
1331
|
+
:type _host_index: int, optional
|
|
1332
|
+
:return: Returns the result object.
|
|
1333
|
+
""" # noqa: E501
|
|
1334
|
+
|
|
1335
|
+
_param = self._update_api_key_serialize(
|
|
1336
|
+
id=id,
|
|
1337
|
+
api_key_update_dto=api_key_update_dto,
|
|
1338
|
+
_request_auth=_request_auth,
|
|
1339
|
+
_content_type=_content_type,
|
|
1340
|
+
_headers=_headers,
|
|
1341
|
+
_host_index=_host_index,
|
|
1342
|
+
)
|
|
1343
|
+
|
|
1344
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1345
|
+
"200": "APIKeyResponseDto",
|
|
1346
|
+
}
|
|
1347
|
+
response_data = await self.api_client.call_api(
|
|
1348
|
+
*_param, _request_timeout=_request_timeout
|
|
1349
|
+
)
|
|
1350
|
+
await response_data.read()
|
|
1351
|
+
return self.api_client.response_deserialize(
|
|
1352
|
+
response_data=response_data,
|
|
1353
|
+
response_types_map=_response_types_map,
|
|
1354
|
+
)
|
|
1355
|
+
|
|
1356
|
+
@validate_call
|
|
1357
|
+
async def update_api_key_without_preload_content(
|
|
1358
|
+
self,
|
|
1359
|
+
id: UUID,
|
|
1360
|
+
api_key_update_dto: APIKeyUpdateDto,
|
|
1361
|
+
_request_timeout: Union[
|
|
1362
|
+
None,
|
|
1363
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1364
|
+
Tuple[
|
|
1365
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1366
|
+
],
|
|
1367
|
+
] = None,
|
|
1368
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1369
|
+
_content_type: Optional[StrictStr] = None,
|
|
1370
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1371
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1372
|
+
) -> RESTResponseType:
|
|
1373
|
+
"""Update an API key
|
|
1374
|
+
|
|
1375
|
+
Updates the name and permissions of an API key by its ID. The current user must own this API key.
|
|
1376
|
+
|
|
1377
|
+
:param id: (required)
|
|
1378
|
+
:type id: UUID
|
|
1379
|
+
:param api_key_update_dto: (required)
|
|
1380
|
+
:type api_key_update_dto: APIKeyUpdateDto
|
|
1381
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1382
|
+
number provided, it will be total request
|
|
1383
|
+
timeout. It can also be a pair (tuple) of
|
|
1384
|
+
(connection, read) timeouts.
|
|
1385
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1386
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1387
|
+
request; this effectively ignores the
|
|
1388
|
+
authentication in the spec for a single request.
|
|
1389
|
+
:type _request_auth: dict, optional
|
|
1390
|
+
:param _content_type: force content-type for the request.
|
|
1391
|
+
:type _content_type: str, Optional
|
|
1392
|
+
:param _headers: set to override the headers for a single
|
|
1393
|
+
request; this effectively ignores the headers
|
|
1394
|
+
in the spec for a single request.
|
|
1395
|
+
:type _headers: dict, optional
|
|
1396
|
+
:param _host_index: set to override the host_index for a single
|
|
1397
|
+
request; this effectively ignores the host_index
|
|
1398
|
+
in the spec for a single request.
|
|
1399
|
+
:type _host_index: int, optional
|
|
1400
|
+
:return: Returns the result object.
|
|
1401
|
+
""" # noqa: E501
|
|
1402
|
+
|
|
1403
|
+
_param = self._update_api_key_serialize(
|
|
1404
|
+
id=id,
|
|
1405
|
+
api_key_update_dto=api_key_update_dto,
|
|
1406
|
+
_request_auth=_request_auth,
|
|
1407
|
+
_content_type=_content_type,
|
|
1408
|
+
_headers=_headers,
|
|
1409
|
+
_host_index=_host_index,
|
|
1410
|
+
)
|
|
1411
|
+
|
|
1412
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1413
|
+
"200": "APIKeyResponseDto",
|
|
1414
|
+
}
|
|
1415
|
+
response_data = await self.api_client.call_api(
|
|
1416
|
+
*_param, _request_timeout=_request_timeout
|
|
1417
|
+
)
|
|
1418
|
+
return response_data.response
|
|
1419
|
+
|
|
1420
|
+
def _update_api_key_serialize(
|
|
1421
|
+
self,
|
|
1422
|
+
id,
|
|
1423
|
+
api_key_update_dto,
|
|
1424
|
+
_request_auth,
|
|
1425
|
+
_content_type,
|
|
1426
|
+
_headers,
|
|
1427
|
+
_host_index,
|
|
1428
|
+
) -> RequestSerialized:
|
|
1429
|
+
_host = None
|
|
1430
|
+
|
|
1431
|
+
_collection_formats: Dict[str, str] = {}
|
|
1432
|
+
|
|
1433
|
+
_path_params: Dict[str, str] = {}
|
|
1434
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1435
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1436
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1437
|
+
_files: Dict[
|
|
1438
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1439
|
+
] = {}
|
|
1440
|
+
_body_params: Optional[bytes] = None
|
|
1441
|
+
|
|
1442
|
+
# process the path parameters
|
|
1443
|
+
if id is not None:
|
|
1444
|
+
_path_params["id"] = id
|
|
1445
|
+
# process the query parameters
|
|
1446
|
+
# process the header parameters
|
|
1447
|
+
# process the form parameters
|
|
1448
|
+
# process the body parameter
|
|
1449
|
+
if api_key_update_dto is not None:
|
|
1450
|
+
_body_params = api_key_update_dto
|
|
1451
|
+
|
|
1452
|
+
# set the HTTP header `Accept`
|
|
1453
|
+
if "Accept" not in _header_params:
|
|
1454
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1455
|
+
["application/json"]
|
|
1456
|
+
)
|
|
1457
|
+
|
|
1458
|
+
# set the HTTP header `Content-Type`
|
|
1459
|
+
if _content_type:
|
|
1460
|
+
_header_params["Content-Type"] = _content_type
|
|
1461
|
+
else:
|
|
1462
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
1463
|
+
["application/json"]
|
|
1464
|
+
)
|
|
1465
|
+
if _default_content_type is not None:
|
|
1466
|
+
_header_params["Content-Type"] = _default_content_type
|
|
1467
|
+
|
|
1468
|
+
# authentication setting
|
|
1469
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
1470
|
+
|
|
1471
|
+
return self.api_client.param_serialize(
|
|
1472
|
+
method="PUT",
|
|
1473
|
+
resource_path="/api-keys/{id}",
|
|
1474
|
+
path_params=_path_params,
|
|
1475
|
+
query_params=_query_params,
|
|
1476
|
+
header_params=_header_params,
|
|
1477
|
+
body=_body_params,
|
|
1478
|
+
post_params=_form_params,
|
|
1479
|
+
files=_files,
|
|
1480
|
+
auth_settings=_auth_settings,
|
|
1481
|
+
collection_formats=_collection_formats,
|
|
1482
|
+
_host=_host,
|
|
1483
|
+
_request_auth=_request_auth,
|
|
1484
|
+
)
|