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