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,808 @@
|
|
|
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 immich.client.models.notification_create_dto import NotificationCreateDto
|
|
19
|
+
from immich.client.models.notification_dto import NotificationDto
|
|
20
|
+
from immich.client.models.system_config_smtp_dto import SystemConfigSmtpDto
|
|
21
|
+
from immich.client.models.template_dto import TemplateDto
|
|
22
|
+
from immich.client.models.template_response_dto import TemplateResponseDto
|
|
23
|
+
from immich.client.models.test_email_response_dto import TestEmailResponseDto
|
|
24
|
+
|
|
25
|
+
from immich.client.api_client import ApiClient, RequestSerialized
|
|
26
|
+
from immich.client.api_response import ApiResponse
|
|
27
|
+
from immich.client.rest import RESTResponseType
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class NotificationsAdminApi:
|
|
31
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
32
|
+
Ref: https://openapi-generator.tech
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, api_client=None) -> None:
|
|
38
|
+
if api_client is None:
|
|
39
|
+
api_client = ApiClient.get_default()
|
|
40
|
+
self.api_client = api_client
|
|
41
|
+
|
|
42
|
+
@validate_call
|
|
43
|
+
async def create_notification(
|
|
44
|
+
self,
|
|
45
|
+
notification_create_dto: NotificationCreateDto,
|
|
46
|
+
_request_timeout: Union[
|
|
47
|
+
None,
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Tuple[
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
51
|
+
],
|
|
52
|
+
] = None,
|
|
53
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
54
|
+
_content_type: Optional[StrictStr] = None,
|
|
55
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
56
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
57
|
+
) -> NotificationDto:
|
|
58
|
+
"""Create a notification
|
|
59
|
+
|
|
60
|
+
Create a new notification for a specific user.
|
|
61
|
+
|
|
62
|
+
:param notification_create_dto: (required)
|
|
63
|
+
:type notification_create_dto: NotificationCreateDto
|
|
64
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
65
|
+
number provided, it will be total request
|
|
66
|
+
timeout. It can also be a pair (tuple) of
|
|
67
|
+
(connection, read) timeouts.
|
|
68
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
69
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
70
|
+
request; this effectively ignores the
|
|
71
|
+
authentication in the spec for a single request.
|
|
72
|
+
:type _request_auth: dict, optional
|
|
73
|
+
:param _content_type: force content-type for the request.
|
|
74
|
+
:type _content_type: str, Optional
|
|
75
|
+
:param _headers: set to override the headers for a single
|
|
76
|
+
request; this effectively ignores the headers
|
|
77
|
+
in the spec for a single request.
|
|
78
|
+
:type _headers: dict, optional
|
|
79
|
+
:param _host_index: set to override the host_index for a single
|
|
80
|
+
request; this effectively ignores the host_index
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _host_index: int, optional
|
|
83
|
+
:return: Returns the result object.
|
|
84
|
+
""" # noqa: E501
|
|
85
|
+
|
|
86
|
+
_param = self._create_notification_serialize(
|
|
87
|
+
notification_create_dto=notification_create_dto,
|
|
88
|
+
_request_auth=_request_auth,
|
|
89
|
+
_content_type=_content_type,
|
|
90
|
+
_headers=_headers,
|
|
91
|
+
_host_index=_host_index,
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
95
|
+
"201": "NotificationDto",
|
|
96
|
+
}
|
|
97
|
+
response_data = await self.api_client.call_api(
|
|
98
|
+
*_param, _request_timeout=_request_timeout
|
|
99
|
+
)
|
|
100
|
+
await response_data.read()
|
|
101
|
+
return self.api_client.response_deserialize(
|
|
102
|
+
response_data=response_data,
|
|
103
|
+
response_types_map=_response_types_map,
|
|
104
|
+
).data
|
|
105
|
+
|
|
106
|
+
@validate_call
|
|
107
|
+
async def create_notification_with_http_info(
|
|
108
|
+
self,
|
|
109
|
+
notification_create_dto: NotificationCreateDto,
|
|
110
|
+
_request_timeout: Union[
|
|
111
|
+
None,
|
|
112
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
113
|
+
Tuple[
|
|
114
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
115
|
+
],
|
|
116
|
+
] = None,
|
|
117
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
118
|
+
_content_type: Optional[StrictStr] = None,
|
|
119
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
120
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
121
|
+
) -> ApiResponse[NotificationDto]:
|
|
122
|
+
"""Create a notification
|
|
123
|
+
|
|
124
|
+
Create a new notification for a specific user.
|
|
125
|
+
|
|
126
|
+
:param notification_create_dto: (required)
|
|
127
|
+
:type notification_create_dto: NotificationCreateDto
|
|
128
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
129
|
+
number provided, it will be total request
|
|
130
|
+
timeout. It can also be a pair (tuple) of
|
|
131
|
+
(connection, read) timeouts.
|
|
132
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
133
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
134
|
+
request; this effectively ignores the
|
|
135
|
+
authentication in the spec for a single request.
|
|
136
|
+
:type _request_auth: dict, optional
|
|
137
|
+
:param _content_type: force content-type for the request.
|
|
138
|
+
:type _content_type: str, Optional
|
|
139
|
+
:param _headers: set to override the headers for a single
|
|
140
|
+
request; this effectively ignores the headers
|
|
141
|
+
in the spec for a single request.
|
|
142
|
+
:type _headers: dict, optional
|
|
143
|
+
:param _host_index: set to override the host_index for a single
|
|
144
|
+
request; this effectively ignores the host_index
|
|
145
|
+
in the spec for a single request.
|
|
146
|
+
:type _host_index: int, optional
|
|
147
|
+
:return: Returns the result object.
|
|
148
|
+
""" # noqa: E501
|
|
149
|
+
|
|
150
|
+
_param = self._create_notification_serialize(
|
|
151
|
+
notification_create_dto=notification_create_dto,
|
|
152
|
+
_request_auth=_request_auth,
|
|
153
|
+
_content_type=_content_type,
|
|
154
|
+
_headers=_headers,
|
|
155
|
+
_host_index=_host_index,
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
159
|
+
"201": "NotificationDto",
|
|
160
|
+
}
|
|
161
|
+
response_data = await self.api_client.call_api(
|
|
162
|
+
*_param, _request_timeout=_request_timeout
|
|
163
|
+
)
|
|
164
|
+
await response_data.read()
|
|
165
|
+
return self.api_client.response_deserialize(
|
|
166
|
+
response_data=response_data,
|
|
167
|
+
response_types_map=_response_types_map,
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
@validate_call
|
|
171
|
+
async def create_notification_without_preload_content(
|
|
172
|
+
self,
|
|
173
|
+
notification_create_dto: NotificationCreateDto,
|
|
174
|
+
_request_timeout: Union[
|
|
175
|
+
None,
|
|
176
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
177
|
+
Tuple[
|
|
178
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
179
|
+
],
|
|
180
|
+
] = None,
|
|
181
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
182
|
+
_content_type: Optional[StrictStr] = None,
|
|
183
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
184
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
185
|
+
) -> RESTResponseType:
|
|
186
|
+
"""Create a notification
|
|
187
|
+
|
|
188
|
+
Create a new notification for a specific user.
|
|
189
|
+
|
|
190
|
+
:param notification_create_dto: (required)
|
|
191
|
+
:type notification_create_dto: NotificationCreateDto
|
|
192
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
193
|
+
number provided, it will be total request
|
|
194
|
+
timeout. It can also be a pair (tuple) of
|
|
195
|
+
(connection, read) timeouts.
|
|
196
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
197
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
198
|
+
request; this effectively ignores the
|
|
199
|
+
authentication in the spec for a single request.
|
|
200
|
+
:type _request_auth: dict, optional
|
|
201
|
+
:param _content_type: force content-type for the request.
|
|
202
|
+
:type _content_type: str, Optional
|
|
203
|
+
:param _headers: set to override the headers for a single
|
|
204
|
+
request; this effectively ignores the headers
|
|
205
|
+
in the spec for a single request.
|
|
206
|
+
:type _headers: dict, optional
|
|
207
|
+
:param _host_index: set to override the host_index for a single
|
|
208
|
+
request; this effectively ignores the host_index
|
|
209
|
+
in the spec for a single request.
|
|
210
|
+
:type _host_index: int, optional
|
|
211
|
+
:return: Returns the result object.
|
|
212
|
+
""" # noqa: E501
|
|
213
|
+
|
|
214
|
+
_param = self._create_notification_serialize(
|
|
215
|
+
notification_create_dto=notification_create_dto,
|
|
216
|
+
_request_auth=_request_auth,
|
|
217
|
+
_content_type=_content_type,
|
|
218
|
+
_headers=_headers,
|
|
219
|
+
_host_index=_host_index,
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
223
|
+
"201": "NotificationDto",
|
|
224
|
+
}
|
|
225
|
+
response_data = await self.api_client.call_api(
|
|
226
|
+
*_param, _request_timeout=_request_timeout
|
|
227
|
+
)
|
|
228
|
+
return response_data.response
|
|
229
|
+
|
|
230
|
+
def _create_notification_serialize(
|
|
231
|
+
self,
|
|
232
|
+
notification_create_dto,
|
|
233
|
+
_request_auth,
|
|
234
|
+
_content_type,
|
|
235
|
+
_headers,
|
|
236
|
+
_host_index,
|
|
237
|
+
) -> RequestSerialized:
|
|
238
|
+
_host = None
|
|
239
|
+
|
|
240
|
+
_collection_formats: Dict[str, str] = {}
|
|
241
|
+
|
|
242
|
+
_path_params: Dict[str, str] = {}
|
|
243
|
+
_query_params: List[Tuple[str, str]] = []
|
|
244
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
245
|
+
_form_params: List[Tuple[str, str]] = []
|
|
246
|
+
_files: Dict[
|
|
247
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
248
|
+
] = {}
|
|
249
|
+
_body_params: Optional[bytes] = None
|
|
250
|
+
|
|
251
|
+
# process the path parameters
|
|
252
|
+
# process the query parameters
|
|
253
|
+
# process the header parameters
|
|
254
|
+
# process the form parameters
|
|
255
|
+
# process the body parameter
|
|
256
|
+
if notification_create_dto is not None:
|
|
257
|
+
_body_params = notification_create_dto
|
|
258
|
+
|
|
259
|
+
# set the HTTP header `Accept`
|
|
260
|
+
if "Accept" not in _header_params:
|
|
261
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
262
|
+
["application/json"]
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
# set the HTTP header `Content-Type`
|
|
266
|
+
if _content_type:
|
|
267
|
+
_header_params["Content-Type"] = _content_type
|
|
268
|
+
else:
|
|
269
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
270
|
+
["application/json"]
|
|
271
|
+
)
|
|
272
|
+
if _default_content_type is not None:
|
|
273
|
+
_header_params["Content-Type"] = _default_content_type
|
|
274
|
+
|
|
275
|
+
# authentication setting
|
|
276
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
277
|
+
|
|
278
|
+
return self.api_client.param_serialize(
|
|
279
|
+
method="POST",
|
|
280
|
+
resource_path="/admin/notifications",
|
|
281
|
+
path_params=_path_params,
|
|
282
|
+
query_params=_query_params,
|
|
283
|
+
header_params=_header_params,
|
|
284
|
+
body=_body_params,
|
|
285
|
+
post_params=_form_params,
|
|
286
|
+
files=_files,
|
|
287
|
+
auth_settings=_auth_settings,
|
|
288
|
+
collection_formats=_collection_formats,
|
|
289
|
+
_host=_host,
|
|
290
|
+
_request_auth=_request_auth,
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
@validate_call
|
|
294
|
+
async def get_notification_template_admin(
|
|
295
|
+
self,
|
|
296
|
+
name: StrictStr,
|
|
297
|
+
template_dto: TemplateDto,
|
|
298
|
+
_request_timeout: Union[
|
|
299
|
+
None,
|
|
300
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
301
|
+
Tuple[
|
|
302
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
303
|
+
],
|
|
304
|
+
] = None,
|
|
305
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
306
|
+
_content_type: Optional[StrictStr] = None,
|
|
307
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
308
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
309
|
+
) -> TemplateResponseDto:
|
|
310
|
+
"""Render email template
|
|
311
|
+
|
|
312
|
+
Retrieve a preview of the provided email template.
|
|
313
|
+
|
|
314
|
+
:param name: (required)
|
|
315
|
+
:type name: str
|
|
316
|
+
:param template_dto: (required)
|
|
317
|
+
:type template_dto: TemplateDto
|
|
318
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
319
|
+
number provided, it will be total request
|
|
320
|
+
timeout. It can also be a pair (tuple) of
|
|
321
|
+
(connection, read) timeouts.
|
|
322
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
323
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
324
|
+
request; this effectively ignores the
|
|
325
|
+
authentication in the spec for a single request.
|
|
326
|
+
:type _request_auth: dict, optional
|
|
327
|
+
:param _content_type: force content-type for the request.
|
|
328
|
+
:type _content_type: str, Optional
|
|
329
|
+
:param _headers: set to override the headers for a single
|
|
330
|
+
request; this effectively ignores the headers
|
|
331
|
+
in the spec for a single request.
|
|
332
|
+
:type _headers: dict, optional
|
|
333
|
+
:param _host_index: set to override the host_index for a single
|
|
334
|
+
request; this effectively ignores the host_index
|
|
335
|
+
in the spec for a single request.
|
|
336
|
+
:type _host_index: int, optional
|
|
337
|
+
:return: Returns the result object.
|
|
338
|
+
""" # noqa: E501
|
|
339
|
+
|
|
340
|
+
_param = self._get_notification_template_admin_serialize(
|
|
341
|
+
name=name,
|
|
342
|
+
template_dto=template_dto,
|
|
343
|
+
_request_auth=_request_auth,
|
|
344
|
+
_content_type=_content_type,
|
|
345
|
+
_headers=_headers,
|
|
346
|
+
_host_index=_host_index,
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
350
|
+
"200": "TemplateResponseDto",
|
|
351
|
+
}
|
|
352
|
+
response_data = await self.api_client.call_api(
|
|
353
|
+
*_param, _request_timeout=_request_timeout
|
|
354
|
+
)
|
|
355
|
+
await response_data.read()
|
|
356
|
+
return self.api_client.response_deserialize(
|
|
357
|
+
response_data=response_data,
|
|
358
|
+
response_types_map=_response_types_map,
|
|
359
|
+
).data
|
|
360
|
+
|
|
361
|
+
@validate_call
|
|
362
|
+
async def get_notification_template_admin_with_http_info(
|
|
363
|
+
self,
|
|
364
|
+
name: StrictStr,
|
|
365
|
+
template_dto: TemplateDto,
|
|
366
|
+
_request_timeout: Union[
|
|
367
|
+
None,
|
|
368
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
369
|
+
Tuple[
|
|
370
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
371
|
+
],
|
|
372
|
+
] = None,
|
|
373
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
374
|
+
_content_type: Optional[StrictStr] = None,
|
|
375
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
376
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
377
|
+
) -> ApiResponse[TemplateResponseDto]:
|
|
378
|
+
"""Render email template
|
|
379
|
+
|
|
380
|
+
Retrieve a preview of the provided email template.
|
|
381
|
+
|
|
382
|
+
:param name: (required)
|
|
383
|
+
:type name: str
|
|
384
|
+
:param template_dto: (required)
|
|
385
|
+
:type template_dto: TemplateDto
|
|
386
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
387
|
+
number provided, it will be total request
|
|
388
|
+
timeout. It can also be a pair (tuple) of
|
|
389
|
+
(connection, read) timeouts.
|
|
390
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
391
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
392
|
+
request; this effectively ignores the
|
|
393
|
+
authentication in the spec for a single request.
|
|
394
|
+
:type _request_auth: dict, optional
|
|
395
|
+
:param _content_type: force content-type for the request.
|
|
396
|
+
:type _content_type: str, Optional
|
|
397
|
+
:param _headers: set to override the headers for a single
|
|
398
|
+
request; this effectively ignores the headers
|
|
399
|
+
in the spec for a single request.
|
|
400
|
+
:type _headers: dict, optional
|
|
401
|
+
:param _host_index: set to override the host_index for a single
|
|
402
|
+
request; this effectively ignores the host_index
|
|
403
|
+
in the spec for a single request.
|
|
404
|
+
:type _host_index: int, optional
|
|
405
|
+
:return: Returns the result object.
|
|
406
|
+
""" # noqa: E501
|
|
407
|
+
|
|
408
|
+
_param = self._get_notification_template_admin_serialize(
|
|
409
|
+
name=name,
|
|
410
|
+
template_dto=template_dto,
|
|
411
|
+
_request_auth=_request_auth,
|
|
412
|
+
_content_type=_content_type,
|
|
413
|
+
_headers=_headers,
|
|
414
|
+
_host_index=_host_index,
|
|
415
|
+
)
|
|
416
|
+
|
|
417
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
418
|
+
"200": "TemplateResponseDto",
|
|
419
|
+
}
|
|
420
|
+
response_data = await self.api_client.call_api(
|
|
421
|
+
*_param, _request_timeout=_request_timeout
|
|
422
|
+
)
|
|
423
|
+
await response_data.read()
|
|
424
|
+
return self.api_client.response_deserialize(
|
|
425
|
+
response_data=response_data,
|
|
426
|
+
response_types_map=_response_types_map,
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
@validate_call
|
|
430
|
+
async def get_notification_template_admin_without_preload_content(
|
|
431
|
+
self,
|
|
432
|
+
name: StrictStr,
|
|
433
|
+
template_dto: TemplateDto,
|
|
434
|
+
_request_timeout: Union[
|
|
435
|
+
None,
|
|
436
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
437
|
+
Tuple[
|
|
438
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
439
|
+
],
|
|
440
|
+
] = None,
|
|
441
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
442
|
+
_content_type: Optional[StrictStr] = None,
|
|
443
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
444
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
445
|
+
) -> RESTResponseType:
|
|
446
|
+
"""Render email template
|
|
447
|
+
|
|
448
|
+
Retrieve a preview of the provided email template.
|
|
449
|
+
|
|
450
|
+
:param name: (required)
|
|
451
|
+
:type name: str
|
|
452
|
+
:param template_dto: (required)
|
|
453
|
+
:type template_dto: TemplateDto
|
|
454
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
455
|
+
number provided, it will be total request
|
|
456
|
+
timeout. It can also be a pair (tuple) of
|
|
457
|
+
(connection, read) timeouts.
|
|
458
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
459
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
460
|
+
request; this effectively ignores the
|
|
461
|
+
authentication in the spec for a single request.
|
|
462
|
+
:type _request_auth: dict, optional
|
|
463
|
+
:param _content_type: force content-type for the request.
|
|
464
|
+
:type _content_type: str, Optional
|
|
465
|
+
:param _headers: set to override the headers for a single
|
|
466
|
+
request; this effectively ignores the headers
|
|
467
|
+
in the spec for a single request.
|
|
468
|
+
:type _headers: dict, optional
|
|
469
|
+
:param _host_index: set to override the host_index for a single
|
|
470
|
+
request; this effectively ignores the host_index
|
|
471
|
+
in the spec for a single request.
|
|
472
|
+
:type _host_index: int, optional
|
|
473
|
+
:return: Returns the result object.
|
|
474
|
+
""" # noqa: E501
|
|
475
|
+
|
|
476
|
+
_param = self._get_notification_template_admin_serialize(
|
|
477
|
+
name=name,
|
|
478
|
+
template_dto=template_dto,
|
|
479
|
+
_request_auth=_request_auth,
|
|
480
|
+
_content_type=_content_type,
|
|
481
|
+
_headers=_headers,
|
|
482
|
+
_host_index=_host_index,
|
|
483
|
+
)
|
|
484
|
+
|
|
485
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
486
|
+
"200": "TemplateResponseDto",
|
|
487
|
+
}
|
|
488
|
+
response_data = await self.api_client.call_api(
|
|
489
|
+
*_param, _request_timeout=_request_timeout
|
|
490
|
+
)
|
|
491
|
+
return response_data.response
|
|
492
|
+
|
|
493
|
+
def _get_notification_template_admin_serialize(
|
|
494
|
+
self,
|
|
495
|
+
name,
|
|
496
|
+
template_dto,
|
|
497
|
+
_request_auth,
|
|
498
|
+
_content_type,
|
|
499
|
+
_headers,
|
|
500
|
+
_host_index,
|
|
501
|
+
) -> RequestSerialized:
|
|
502
|
+
_host = None
|
|
503
|
+
|
|
504
|
+
_collection_formats: Dict[str, str] = {}
|
|
505
|
+
|
|
506
|
+
_path_params: Dict[str, str] = {}
|
|
507
|
+
_query_params: List[Tuple[str, str]] = []
|
|
508
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
509
|
+
_form_params: List[Tuple[str, str]] = []
|
|
510
|
+
_files: Dict[
|
|
511
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
512
|
+
] = {}
|
|
513
|
+
_body_params: Optional[bytes] = None
|
|
514
|
+
|
|
515
|
+
# process the path parameters
|
|
516
|
+
if name is not None:
|
|
517
|
+
_path_params["name"] = name
|
|
518
|
+
# process the query parameters
|
|
519
|
+
# process the header parameters
|
|
520
|
+
# process the form parameters
|
|
521
|
+
# process the body parameter
|
|
522
|
+
if template_dto is not None:
|
|
523
|
+
_body_params = template_dto
|
|
524
|
+
|
|
525
|
+
# set the HTTP header `Accept`
|
|
526
|
+
if "Accept" not in _header_params:
|
|
527
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
528
|
+
["application/json"]
|
|
529
|
+
)
|
|
530
|
+
|
|
531
|
+
# set the HTTP header `Content-Type`
|
|
532
|
+
if _content_type:
|
|
533
|
+
_header_params["Content-Type"] = _content_type
|
|
534
|
+
else:
|
|
535
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
536
|
+
["application/json"]
|
|
537
|
+
)
|
|
538
|
+
if _default_content_type is not None:
|
|
539
|
+
_header_params["Content-Type"] = _default_content_type
|
|
540
|
+
|
|
541
|
+
# authentication setting
|
|
542
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
543
|
+
|
|
544
|
+
return self.api_client.param_serialize(
|
|
545
|
+
method="POST",
|
|
546
|
+
resource_path="/admin/notifications/templates/{name}",
|
|
547
|
+
path_params=_path_params,
|
|
548
|
+
query_params=_query_params,
|
|
549
|
+
header_params=_header_params,
|
|
550
|
+
body=_body_params,
|
|
551
|
+
post_params=_form_params,
|
|
552
|
+
files=_files,
|
|
553
|
+
auth_settings=_auth_settings,
|
|
554
|
+
collection_formats=_collection_formats,
|
|
555
|
+
_host=_host,
|
|
556
|
+
_request_auth=_request_auth,
|
|
557
|
+
)
|
|
558
|
+
|
|
559
|
+
@validate_call
|
|
560
|
+
async def send_test_email_admin(
|
|
561
|
+
self,
|
|
562
|
+
system_config_smtp_dto: SystemConfigSmtpDto,
|
|
563
|
+
_request_timeout: Union[
|
|
564
|
+
None,
|
|
565
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
566
|
+
Tuple[
|
|
567
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
568
|
+
],
|
|
569
|
+
] = None,
|
|
570
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
571
|
+
_content_type: Optional[StrictStr] = None,
|
|
572
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
573
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
574
|
+
) -> TestEmailResponseDto:
|
|
575
|
+
"""Send test email
|
|
576
|
+
|
|
577
|
+
Send a test email using the provided SMTP configuration.
|
|
578
|
+
|
|
579
|
+
:param system_config_smtp_dto: (required)
|
|
580
|
+
:type system_config_smtp_dto: SystemConfigSmtpDto
|
|
581
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
582
|
+
number provided, it will be total request
|
|
583
|
+
timeout. It can also be a pair (tuple) of
|
|
584
|
+
(connection, read) timeouts.
|
|
585
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
586
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
587
|
+
request; this effectively ignores the
|
|
588
|
+
authentication in the spec for a single request.
|
|
589
|
+
:type _request_auth: dict, optional
|
|
590
|
+
:param _content_type: force content-type for the request.
|
|
591
|
+
:type _content_type: str, Optional
|
|
592
|
+
:param _headers: set to override the headers for a single
|
|
593
|
+
request; this effectively ignores the headers
|
|
594
|
+
in the spec for a single request.
|
|
595
|
+
:type _headers: dict, optional
|
|
596
|
+
:param _host_index: set to override the host_index for a single
|
|
597
|
+
request; this effectively ignores the host_index
|
|
598
|
+
in the spec for a single request.
|
|
599
|
+
:type _host_index: int, optional
|
|
600
|
+
:return: Returns the result object.
|
|
601
|
+
""" # noqa: E501
|
|
602
|
+
|
|
603
|
+
_param = self._send_test_email_admin_serialize(
|
|
604
|
+
system_config_smtp_dto=system_config_smtp_dto,
|
|
605
|
+
_request_auth=_request_auth,
|
|
606
|
+
_content_type=_content_type,
|
|
607
|
+
_headers=_headers,
|
|
608
|
+
_host_index=_host_index,
|
|
609
|
+
)
|
|
610
|
+
|
|
611
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
612
|
+
"200": "TestEmailResponseDto",
|
|
613
|
+
}
|
|
614
|
+
response_data = await self.api_client.call_api(
|
|
615
|
+
*_param, _request_timeout=_request_timeout
|
|
616
|
+
)
|
|
617
|
+
await response_data.read()
|
|
618
|
+
return self.api_client.response_deserialize(
|
|
619
|
+
response_data=response_data,
|
|
620
|
+
response_types_map=_response_types_map,
|
|
621
|
+
).data
|
|
622
|
+
|
|
623
|
+
@validate_call
|
|
624
|
+
async def send_test_email_admin_with_http_info(
|
|
625
|
+
self,
|
|
626
|
+
system_config_smtp_dto: SystemConfigSmtpDto,
|
|
627
|
+
_request_timeout: Union[
|
|
628
|
+
None,
|
|
629
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
630
|
+
Tuple[
|
|
631
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
632
|
+
],
|
|
633
|
+
] = None,
|
|
634
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
635
|
+
_content_type: Optional[StrictStr] = None,
|
|
636
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
637
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
638
|
+
) -> ApiResponse[TestEmailResponseDto]:
|
|
639
|
+
"""Send test email
|
|
640
|
+
|
|
641
|
+
Send a test email using the provided SMTP configuration.
|
|
642
|
+
|
|
643
|
+
:param system_config_smtp_dto: (required)
|
|
644
|
+
:type system_config_smtp_dto: SystemConfigSmtpDto
|
|
645
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
646
|
+
number provided, it will be total request
|
|
647
|
+
timeout. It can also be a pair (tuple) of
|
|
648
|
+
(connection, read) timeouts.
|
|
649
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
650
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
651
|
+
request; this effectively ignores the
|
|
652
|
+
authentication in the spec for a single request.
|
|
653
|
+
:type _request_auth: dict, optional
|
|
654
|
+
:param _content_type: force content-type for the request.
|
|
655
|
+
:type _content_type: str, Optional
|
|
656
|
+
:param _headers: set to override the headers for a single
|
|
657
|
+
request; this effectively ignores the headers
|
|
658
|
+
in the spec for a single request.
|
|
659
|
+
:type _headers: dict, optional
|
|
660
|
+
:param _host_index: set to override the host_index for a single
|
|
661
|
+
request; this effectively ignores the host_index
|
|
662
|
+
in the spec for a single request.
|
|
663
|
+
:type _host_index: int, optional
|
|
664
|
+
:return: Returns the result object.
|
|
665
|
+
""" # noqa: E501
|
|
666
|
+
|
|
667
|
+
_param = self._send_test_email_admin_serialize(
|
|
668
|
+
system_config_smtp_dto=system_config_smtp_dto,
|
|
669
|
+
_request_auth=_request_auth,
|
|
670
|
+
_content_type=_content_type,
|
|
671
|
+
_headers=_headers,
|
|
672
|
+
_host_index=_host_index,
|
|
673
|
+
)
|
|
674
|
+
|
|
675
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
676
|
+
"200": "TestEmailResponseDto",
|
|
677
|
+
}
|
|
678
|
+
response_data = await self.api_client.call_api(
|
|
679
|
+
*_param, _request_timeout=_request_timeout
|
|
680
|
+
)
|
|
681
|
+
await response_data.read()
|
|
682
|
+
return self.api_client.response_deserialize(
|
|
683
|
+
response_data=response_data,
|
|
684
|
+
response_types_map=_response_types_map,
|
|
685
|
+
)
|
|
686
|
+
|
|
687
|
+
@validate_call
|
|
688
|
+
async def send_test_email_admin_without_preload_content(
|
|
689
|
+
self,
|
|
690
|
+
system_config_smtp_dto: SystemConfigSmtpDto,
|
|
691
|
+
_request_timeout: Union[
|
|
692
|
+
None,
|
|
693
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
694
|
+
Tuple[
|
|
695
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
696
|
+
],
|
|
697
|
+
] = None,
|
|
698
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
699
|
+
_content_type: Optional[StrictStr] = None,
|
|
700
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
701
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
702
|
+
) -> RESTResponseType:
|
|
703
|
+
"""Send test email
|
|
704
|
+
|
|
705
|
+
Send a test email using the provided SMTP configuration.
|
|
706
|
+
|
|
707
|
+
:param system_config_smtp_dto: (required)
|
|
708
|
+
:type system_config_smtp_dto: SystemConfigSmtpDto
|
|
709
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
710
|
+
number provided, it will be total request
|
|
711
|
+
timeout. It can also be a pair (tuple) of
|
|
712
|
+
(connection, read) timeouts.
|
|
713
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
714
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
715
|
+
request; this effectively ignores the
|
|
716
|
+
authentication in the spec for a single request.
|
|
717
|
+
:type _request_auth: dict, optional
|
|
718
|
+
:param _content_type: force content-type for the request.
|
|
719
|
+
:type _content_type: str, Optional
|
|
720
|
+
:param _headers: set to override the headers for a single
|
|
721
|
+
request; this effectively ignores the headers
|
|
722
|
+
in the spec for a single request.
|
|
723
|
+
:type _headers: dict, optional
|
|
724
|
+
:param _host_index: set to override the host_index for a single
|
|
725
|
+
request; this effectively ignores the host_index
|
|
726
|
+
in the spec for a single request.
|
|
727
|
+
:type _host_index: int, optional
|
|
728
|
+
:return: Returns the result object.
|
|
729
|
+
""" # noqa: E501
|
|
730
|
+
|
|
731
|
+
_param = self._send_test_email_admin_serialize(
|
|
732
|
+
system_config_smtp_dto=system_config_smtp_dto,
|
|
733
|
+
_request_auth=_request_auth,
|
|
734
|
+
_content_type=_content_type,
|
|
735
|
+
_headers=_headers,
|
|
736
|
+
_host_index=_host_index,
|
|
737
|
+
)
|
|
738
|
+
|
|
739
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
740
|
+
"200": "TestEmailResponseDto",
|
|
741
|
+
}
|
|
742
|
+
response_data = await self.api_client.call_api(
|
|
743
|
+
*_param, _request_timeout=_request_timeout
|
|
744
|
+
)
|
|
745
|
+
return response_data.response
|
|
746
|
+
|
|
747
|
+
def _send_test_email_admin_serialize(
|
|
748
|
+
self,
|
|
749
|
+
system_config_smtp_dto,
|
|
750
|
+
_request_auth,
|
|
751
|
+
_content_type,
|
|
752
|
+
_headers,
|
|
753
|
+
_host_index,
|
|
754
|
+
) -> RequestSerialized:
|
|
755
|
+
_host = None
|
|
756
|
+
|
|
757
|
+
_collection_formats: Dict[str, str] = {}
|
|
758
|
+
|
|
759
|
+
_path_params: Dict[str, str] = {}
|
|
760
|
+
_query_params: List[Tuple[str, str]] = []
|
|
761
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
762
|
+
_form_params: List[Tuple[str, str]] = []
|
|
763
|
+
_files: Dict[
|
|
764
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
765
|
+
] = {}
|
|
766
|
+
_body_params: Optional[bytes] = None
|
|
767
|
+
|
|
768
|
+
# process the path parameters
|
|
769
|
+
# process the query parameters
|
|
770
|
+
# process the header parameters
|
|
771
|
+
# process the form parameters
|
|
772
|
+
# process the body parameter
|
|
773
|
+
if system_config_smtp_dto is not None:
|
|
774
|
+
_body_params = system_config_smtp_dto
|
|
775
|
+
|
|
776
|
+
# set the HTTP header `Accept`
|
|
777
|
+
if "Accept" not in _header_params:
|
|
778
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
779
|
+
["application/json"]
|
|
780
|
+
)
|
|
781
|
+
|
|
782
|
+
# set the HTTP header `Content-Type`
|
|
783
|
+
if _content_type:
|
|
784
|
+
_header_params["Content-Type"] = _content_type
|
|
785
|
+
else:
|
|
786
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
787
|
+
["application/json"]
|
|
788
|
+
)
|
|
789
|
+
if _default_content_type is not None:
|
|
790
|
+
_header_params["Content-Type"] = _default_content_type
|
|
791
|
+
|
|
792
|
+
# authentication setting
|
|
793
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
794
|
+
|
|
795
|
+
return self.api_client.param_serialize(
|
|
796
|
+
method="POST",
|
|
797
|
+
resource_path="/admin/notifications/test-email",
|
|
798
|
+
path_params=_path_params,
|
|
799
|
+
query_params=_query_params,
|
|
800
|
+
header_params=_header_params,
|
|
801
|
+
body=_body_params,
|
|
802
|
+
post_params=_form_params,
|
|
803
|
+
files=_files,
|
|
804
|
+
auth_settings=_auth_settings,
|
|
805
|
+
collection_formats=_collection_formats,
|
|
806
|
+
_host=_host,
|
|
807
|
+
_request_auth=_request_auth,
|
|
808
|
+
)
|