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,2177 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Immich
|
|
5
|
+
|
|
6
|
+
Immich API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.4.1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
15
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
16
|
+
from typing_extensions import Annotated
|
|
17
|
+
|
|
18
|
+
from uuid import UUID
|
|
19
|
+
from immich.client.models.asset_ids_dto import AssetIdsDto
|
|
20
|
+
from immich.client.models.asset_ids_response_dto import AssetIdsResponseDto
|
|
21
|
+
from immich.client.models.shared_link_create_dto import SharedLinkCreateDto
|
|
22
|
+
from immich.client.models.shared_link_edit_dto import SharedLinkEditDto
|
|
23
|
+
from immich.client.models.shared_link_response_dto import SharedLinkResponseDto
|
|
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 SharedLinksApi:
|
|
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 add_shared_link_assets(
|
|
44
|
+
self,
|
|
45
|
+
id: UUID,
|
|
46
|
+
asset_ids_dto: AssetIdsDto,
|
|
47
|
+
key: Optional[StrictStr] = None,
|
|
48
|
+
slug: Optional[StrictStr] = None,
|
|
49
|
+
_request_timeout: Union[
|
|
50
|
+
None,
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
52
|
+
Tuple[
|
|
53
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
54
|
+
],
|
|
55
|
+
] = None,
|
|
56
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_content_type: Optional[StrictStr] = None,
|
|
58
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
59
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
60
|
+
) -> List[AssetIdsResponseDto]:
|
|
61
|
+
"""Add assets to a shared link
|
|
62
|
+
|
|
63
|
+
Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
|
64
|
+
|
|
65
|
+
:param id: (required)
|
|
66
|
+
:type id: UUID
|
|
67
|
+
:param asset_ids_dto: (required)
|
|
68
|
+
:type asset_ids_dto: AssetIdsDto
|
|
69
|
+
:param key:
|
|
70
|
+
:type key: str
|
|
71
|
+
:param slug:
|
|
72
|
+
:type slug: str
|
|
73
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
74
|
+
number provided, it will be total request
|
|
75
|
+
timeout. It can also be a pair (tuple) of
|
|
76
|
+
(connection, read) timeouts.
|
|
77
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
78
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
79
|
+
request; this effectively ignores the
|
|
80
|
+
authentication in the spec for a single request.
|
|
81
|
+
:type _request_auth: dict, optional
|
|
82
|
+
:param _content_type: force content-type for the request.
|
|
83
|
+
:type _content_type: str, Optional
|
|
84
|
+
:param _headers: set to override the headers for a single
|
|
85
|
+
request; this effectively ignores the headers
|
|
86
|
+
in the spec for a single request.
|
|
87
|
+
:type _headers: dict, optional
|
|
88
|
+
:param _host_index: set to override the host_index for a single
|
|
89
|
+
request; this effectively ignores the host_index
|
|
90
|
+
in the spec for a single request.
|
|
91
|
+
:type _host_index: int, optional
|
|
92
|
+
:return: Returns the result object.
|
|
93
|
+
""" # noqa: E501
|
|
94
|
+
|
|
95
|
+
_param = self._add_shared_link_assets_serialize(
|
|
96
|
+
id=id,
|
|
97
|
+
asset_ids_dto=asset_ids_dto,
|
|
98
|
+
key=key,
|
|
99
|
+
slug=slug,
|
|
100
|
+
_request_auth=_request_auth,
|
|
101
|
+
_content_type=_content_type,
|
|
102
|
+
_headers=_headers,
|
|
103
|
+
_host_index=_host_index,
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
107
|
+
"200": "List[AssetIdsResponseDto]",
|
|
108
|
+
}
|
|
109
|
+
response_data = await self.api_client.call_api(
|
|
110
|
+
*_param, _request_timeout=_request_timeout
|
|
111
|
+
)
|
|
112
|
+
await response_data.read()
|
|
113
|
+
return self.api_client.response_deserialize(
|
|
114
|
+
response_data=response_data,
|
|
115
|
+
response_types_map=_response_types_map,
|
|
116
|
+
).data
|
|
117
|
+
|
|
118
|
+
@validate_call
|
|
119
|
+
async def add_shared_link_assets_with_http_info(
|
|
120
|
+
self,
|
|
121
|
+
id: UUID,
|
|
122
|
+
asset_ids_dto: AssetIdsDto,
|
|
123
|
+
key: Optional[StrictStr] = None,
|
|
124
|
+
slug: Optional[StrictStr] = None,
|
|
125
|
+
_request_timeout: Union[
|
|
126
|
+
None,
|
|
127
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
128
|
+
Tuple[
|
|
129
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
130
|
+
],
|
|
131
|
+
] = None,
|
|
132
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
133
|
+
_content_type: Optional[StrictStr] = None,
|
|
134
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
135
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
136
|
+
) -> ApiResponse[List[AssetIdsResponseDto]]:
|
|
137
|
+
"""Add assets to a shared link
|
|
138
|
+
|
|
139
|
+
Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
|
140
|
+
|
|
141
|
+
:param id: (required)
|
|
142
|
+
:type id: UUID
|
|
143
|
+
:param asset_ids_dto: (required)
|
|
144
|
+
:type asset_ids_dto: AssetIdsDto
|
|
145
|
+
:param key:
|
|
146
|
+
:type key: str
|
|
147
|
+
:param slug:
|
|
148
|
+
:type slug: str
|
|
149
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
150
|
+
number provided, it will be total request
|
|
151
|
+
timeout. It can also be a pair (tuple) of
|
|
152
|
+
(connection, read) timeouts.
|
|
153
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
154
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
155
|
+
request; this effectively ignores the
|
|
156
|
+
authentication in the spec for a single request.
|
|
157
|
+
:type _request_auth: dict, optional
|
|
158
|
+
:param _content_type: force content-type for the request.
|
|
159
|
+
:type _content_type: str, Optional
|
|
160
|
+
:param _headers: set to override the headers for a single
|
|
161
|
+
request; this effectively ignores the headers
|
|
162
|
+
in the spec for a single request.
|
|
163
|
+
:type _headers: dict, optional
|
|
164
|
+
:param _host_index: set to override the host_index for a single
|
|
165
|
+
request; this effectively ignores the host_index
|
|
166
|
+
in the spec for a single request.
|
|
167
|
+
:type _host_index: int, optional
|
|
168
|
+
:return: Returns the result object.
|
|
169
|
+
""" # noqa: E501
|
|
170
|
+
|
|
171
|
+
_param = self._add_shared_link_assets_serialize(
|
|
172
|
+
id=id,
|
|
173
|
+
asset_ids_dto=asset_ids_dto,
|
|
174
|
+
key=key,
|
|
175
|
+
slug=slug,
|
|
176
|
+
_request_auth=_request_auth,
|
|
177
|
+
_content_type=_content_type,
|
|
178
|
+
_headers=_headers,
|
|
179
|
+
_host_index=_host_index,
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
183
|
+
"200": "List[AssetIdsResponseDto]",
|
|
184
|
+
}
|
|
185
|
+
response_data = await self.api_client.call_api(
|
|
186
|
+
*_param, _request_timeout=_request_timeout
|
|
187
|
+
)
|
|
188
|
+
await response_data.read()
|
|
189
|
+
return self.api_client.response_deserialize(
|
|
190
|
+
response_data=response_data,
|
|
191
|
+
response_types_map=_response_types_map,
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
@validate_call
|
|
195
|
+
async def add_shared_link_assets_without_preload_content(
|
|
196
|
+
self,
|
|
197
|
+
id: UUID,
|
|
198
|
+
asset_ids_dto: AssetIdsDto,
|
|
199
|
+
key: Optional[StrictStr] = None,
|
|
200
|
+
slug: Optional[StrictStr] = None,
|
|
201
|
+
_request_timeout: Union[
|
|
202
|
+
None,
|
|
203
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
204
|
+
Tuple[
|
|
205
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
206
|
+
],
|
|
207
|
+
] = None,
|
|
208
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
209
|
+
_content_type: Optional[StrictStr] = None,
|
|
210
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
211
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
212
|
+
) -> RESTResponseType:
|
|
213
|
+
"""Add assets to a shared link
|
|
214
|
+
|
|
215
|
+
Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
|
216
|
+
|
|
217
|
+
:param id: (required)
|
|
218
|
+
:type id: UUID
|
|
219
|
+
:param asset_ids_dto: (required)
|
|
220
|
+
:type asset_ids_dto: AssetIdsDto
|
|
221
|
+
:param key:
|
|
222
|
+
:type key: str
|
|
223
|
+
:param slug:
|
|
224
|
+
:type slug: str
|
|
225
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
226
|
+
number provided, it will be total request
|
|
227
|
+
timeout. It can also be a pair (tuple) of
|
|
228
|
+
(connection, read) timeouts.
|
|
229
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
230
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
231
|
+
request; this effectively ignores the
|
|
232
|
+
authentication in the spec for a single request.
|
|
233
|
+
:type _request_auth: dict, optional
|
|
234
|
+
:param _content_type: force content-type for the request.
|
|
235
|
+
:type _content_type: str, Optional
|
|
236
|
+
:param _headers: set to override the headers for a single
|
|
237
|
+
request; this effectively ignores the headers
|
|
238
|
+
in the spec for a single request.
|
|
239
|
+
:type _headers: dict, optional
|
|
240
|
+
:param _host_index: set to override the host_index for a single
|
|
241
|
+
request; this effectively ignores the host_index
|
|
242
|
+
in the spec for a single request.
|
|
243
|
+
:type _host_index: int, optional
|
|
244
|
+
:return: Returns the result object.
|
|
245
|
+
""" # noqa: E501
|
|
246
|
+
|
|
247
|
+
_param = self._add_shared_link_assets_serialize(
|
|
248
|
+
id=id,
|
|
249
|
+
asset_ids_dto=asset_ids_dto,
|
|
250
|
+
key=key,
|
|
251
|
+
slug=slug,
|
|
252
|
+
_request_auth=_request_auth,
|
|
253
|
+
_content_type=_content_type,
|
|
254
|
+
_headers=_headers,
|
|
255
|
+
_host_index=_host_index,
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
259
|
+
"200": "List[AssetIdsResponseDto]",
|
|
260
|
+
}
|
|
261
|
+
response_data = await self.api_client.call_api(
|
|
262
|
+
*_param, _request_timeout=_request_timeout
|
|
263
|
+
)
|
|
264
|
+
return response_data.response
|
|
265
|
+
|
|
266
|
+
def _add_shared_link_assets_serialize(
|
|
267
|
+
self,
|
|
268
|
+
id,
|
|
269
|
+
asset_ids_dto,
|
|
270
|
+
key,
|
|
271
|
+
slug,
|
|
272
|
+
_request_auth,
|
|
273
|
+
_content_type,
|
|
274
|
+
_headers,
|
|
275
|
+
_host_index,
|
|
276
|
+
) -> RequestSerialized:
|
|
277
|
+
_host = None
|
|
278
|
+
|
|
279
|
+
_collection_formats: Dict[str, str] = {}
|
|
280
|
+
|
|
281
|
+
_path_params: Dict[str, str] = {}
|
|
282
|
+
_query_params: List[Tuple[str, str]] = []
|
|
283
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
284
|
+
_form_params: List[Tuple[str, str]] = []
|
|
285
|
+
_files: Dict[
|
|
286
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
287
|
+
] = {}
|
|
288
|
+
_body_params: Optional[bytes] = None
|
|
289
|
+
|
|
290
|
+
# process the path parameters
|
|
291
|
+
if id is not None:
|
|
292
|
+
_path_params["id"] = id
|
|
293
|
+
# process the query parameters
|
|
294
|
+
if key is not None:
|
|
295
|
+
_query_params.append(("key", key))
|
|
296
|
+
|
|
297
|
+
if slug is not None:
|
|
298
|
+
_query_params.append(("slug", slug))
|
|
299
|
+
|
|
300
|
+
# process the header parameters
|
|
301
|
+
# process the form parameters
|
|
302
|
+
# process the body parameter
|
|
303
|
+
if asset_ids_dto is not None:
|
|
304
|
+
_body_params = asset_ids_dto
|
|
305
|
+
|
|
306
|
+
# set the HTTP header `Accept`
|
|
307
|
+
if "Accept" not in _header_params:
|
|
308
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
309
|
+
["application/json"]
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
# set the HTTP header `Content-Type`
|
|
313
|
+
if _content_type:
|
|
314
|
+
_header_params["Content-Type"] = _content_type
|
|
315
|
+
else:
|
|
316
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
317
|
+
["application/json"]
|
|
318
|
+
)
|
|
319
|
+
if _default_content_type is not None:
|
|
320
|
+
_header_params["Content-Type"] = _default_content_type
|
|
321
|
+
|
|
322
|
+
# authentication setting
|
|
323
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
324
|
+
|
|
325
|
+
return self.api_client.param_serialize(
|
|
326
|
+
method="PUT",
|
|
327
|
+
resource_path="/shared-links/{id}/assets",
|
|
328
|
+
path_params=_path_params,
|
|
329
|
+
query_params=_query_params,
|
|
330
|
+
header_params=_header_params,
|
|
331
|
+
body=_body_params,
|
|
332
|
+
post_params=_form_params,
|
|
333
|
+
files=_files,
|
|
334
|
+
auth_settings=_auth_settings,
|
|
335
|
+
collection_formats=_collection_formats,
|
|
336
|
+
_host=_host,
|
|
337
|
+
_request_auth=_request_auth,
|
|
338
|
+
)
|
|
339
|
+
|
|
340
|
+
@validate_call
|
|
341
|
+
async def create_shared_link(
|
|
342
|
+
self,
|
|
343
|
+
shared_link_create_dto: SharedLinkCreateDto,
|
|
344
|
+
_request_timeout: Union[
|
|
345
|
+
None,
|
|
346
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
347
|
+
Tuple[
|
|
348
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
349
|
+
],
|
|
350
|
+
] = None,
|
|
351
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
352
|
+
_content_type: Optional[StrictStr] = None,
|
|
353
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
354
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
355
|
+
) -> SharedLinkResponseDto:
|
|
356
|
+
"""Create a shared link
|
|
357
|
+
|
|
358
|
+
Create a new shared link.
|
|
359
|
+
|
|
360
|
+
:param shared_link_create_dto: (required)
|
|
361
|
+
:type shared_link_create_dto: SharedLinkCreateDto
|
|
362
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
363
|
+
number provided, it will be total request
|
|
364
|
+
timeout. It can also be a pair (tuple) of
|
|
365
|
+
(connection, read) timeouts.
|
|
366
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
367
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
368
|
+
request; this effectively ignores the
|
|
369
|
+
authentication in the spec for a single request.
|
|
370
|
+
:type _request_auth: dict, optional
|
|
371
|
+
:param _content_type: force content-type for the request.
|
|
372
|
+
:type _content_type: str, Optional
|
|
373
|
+
:param _headers: set to override the headers for a single
|
|
374
|
+
request; this effectively ignores the headers
|
|
375
|
+
in the spec for a single request.
|
|
376
|
+
:type _headers: dict, optional
|
|
377
|
+
:param _host_index: set to override the host_index for a single
|
|
378
|
+
request; this effectively ignores the host_index
|
|
379
|
+
in the spec for a single request.
|
|
380
|
+
:type _host_index: int, optional
|
|
381
|
+
:return: Returns the result object.
|
|
382
|
+
""" # noqa: E501
|
|
383
|
+
|
|
384
|
+
_param = self._create_shared_link_serialize(
|
|
385
|
+
shared_link_create_dto=shared_link_create_dto,
|
|
386
|
+
_request_auth=_request_auth,
|
|
387
|
+
_content_type=_content_type,
|
|
388
|
+
_headers=_headers,
|
|
389
|
+
_host_index=_host_index,
|
|
390
|
+
)
|
|
391
|
+
|
|
392
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
393
|
+
"201": "SharedLinkResponseDto",
|
|
394
|
+
}
|
|
395
|
+
response_data = await self.api_client.call_api(
|
|
396
|
+
*_param, _request_timeout=_request_timeout
|
|
397
|
+
)
|
|
398
|
+
await response_data.read()
|
|
399
|
+
return self.api_client.response_deserialize(
|
|
400
|
+
response_data=response_data,
|
|
401
|
+
response_types_map=_response_types_map,
|
|
402
|
+
).data
|
|
403
|
+
|
|
404
|
+
@validate_call
|
|
405
|
+
async def create_shared_link_with_http_info(
|
|
406
|
+
self,
|
|
407
|
+
shared_link_create_dto: SharedLinkCreateDto,
|
|
408
|
+
_request_timeout: Union[
|
|
409
|
+
None,
|
|
410
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
411
|
+
Tuple[
|
|
412
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
413
|
+
],
|
|
414
|
+
] = None,
|
|
415
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
416
|
+
_content_type: Optional[StrictStr] = None,
|
|
417
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
418
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
419
|
+
) -> ApiResponse[SharedLinkResponseDto]:
|
|
420
|
+
"""Create a shared link
|
|
421
|
+
|
|
422
|
+
Create a new shared link.
|
|
423
|
+
|
|
424
|
+
:param shared_link_create_dto: (required)
|
|
425
|
+
:type shared_link_create_dto: SharedLinkCreateDto
|
|
426
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
427
|
+
number provided, it will be total request
|
|
428
|
+
timeout. It can also be a pair (tuple) of
|
|
429
|
+
(connection, read) timeouts.
|
|
430
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
431
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
432
|
+
request; this effectively ignores the
|
|
433
|
+
authentication in the spec for a single request.
|
|
434
|
+
:type _request_auth: dict, optional
|
|
435
|
+
:param _content_type: force content-type for the request.
|
|
436
|
+
:type _content_type: str, Optional
|
|
437
|
+
:param _headers: set to override the headers for a single
|
|
438
|
+
request; this effectively ignores the headers
|
|
439
|
+
in the spec for a single request.
|
|
440
|
+
:type _headers: dict, optional
|
|
441
|
+
:param _host_index: set to override the host_index for a single
|
|
442
|
+
request; this effectively ignores the host_index
|
|
443
|
+
in the spec for a single request.
|
|
444
|
+
:type _host_index: int, optional
|
|
445
|
+
:return: Returns the result object.
|
|
446
|
+
""" # noqa: E501
|
|
447
|
+
|
|
448
|
+
_param = self._create_shared_link_serialize(
|
|
449
|
+
shared_link_create_dto=shared_link_create_dto,
|
|
450
|
+
_request_auth=_request_auth,
|
|
451
|
+
_content_type=_content_type,
|
|
452
|
+
_headers=_headers,
|
|
453
|
+
_host_index=_host_index,
|
|
454
|
+
)
|
|
455
|
+
|
|
456
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
457
|
+
"201": "SharedLinkResponseDto",
|
|
458
|
+
}
|
|
459
|
+
response_data = await self.api_client.call_api(
|
|
460
|
+
*_param, _request_timeout=_request_timeout
|
|
461
|
+
)
|
|
462
|
+
await response_data.read()
|
|
463
|
+
return self.api_client.response_deserialize(
|
|
464
|
+
response_data=response_data,
|
|
465
|
+
response_types_map=_response_types_map,
|
|
466
|
+
)
|
|
467
|
+
|
|
468
|
+
@validate_call
|
|
469
|
+
async def create_shared_link_without_preload_content(
|
|
470
|
+
self,
|
|
471
|
+
shared_link_create_dto: SharedLinkCreateDto,
|
|
472
|
+
_request_timeout: Union[
|
|
473
|
+
None,
|
|
474
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
475
|
+
Tuple[
|
|
476
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
477
|
+
],
|
|
478
|
+
] = None,
|
|
479
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
480
|
+
_content_type: Optional[StrictStr] = None,
|
|
481
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
482
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
483
|
+
) -> RESTResponseType:
|
|
484
|
+
"""Create a shared link
|
|
485
|
+
|
|
486
|
+
Create a new shared link.
|
|
487
|
+
|
|
488
|
+
:param shared_link_create_dto: (required)
|
|
489
|
+
:type shared_link_create_dto: SharedLinkCreateDto
|
|
490
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
491
|
+
number provided, it will be total request
|
|
492
|
+
timeout. It can also be a pair (tuple) of
|
|
493
|
+
(connection, read) timeouts.
|
|
494
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
495
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
496
|
+
request; this effectively ignores the
|
|
497
|
+
authentication in the spec for a single request.
|
|
498
|
+
:type _request_auth: dict, optional
|
|
499
|
+
:param _content_type: force content-type for the request.
|
|
500
|
+
:type _content_type: str, Optional
|
|
501
|
+
:param _headers: set to override the headers for a single
|
|
502
|
+
request; this effectively ignores the headers
|
|
503
|
+
in the spec for a single request.
|
|
504
|
+
:type _headers: dict, optional
|
|
505
|
+
:param _host_index: set to override the host_index for a single
|
|
506
|
+
request; this effectively ignores the host_index
|
|
507
|
+
in the spec for a single request.
|
|
508
|
+
:type _host_index: int, optional
|
|
509
|
+
:return: Returns the result object.
|
|
510
|
+
""" # noqa: E501
|
|
511
|
+
|
|
512
|
+
_param = self._create_shared_link_serialize(
|
|
513
|
+
shared_link_create_dto=shared_link_create_dto,
|
|
514
|
+
_request_auth=_request_auth,
|
|
515
|
+
_content_type=_content_type,
|
|
516
|
+
_headers=_headers,
|
|
517
|
+
_host_index=_host_index,
|
|
518
|
+
)
|
|
519
|
+
|
|
520
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
521
|
+
"201": "SharedLinkResponseDto",
|
|
522
|
+
}
|
|
523
|
+
response_data = await self.api_client.call_api(
|
|
524
|
+
*_param, _request_timeout=_request_timeout
|
|
525
|
+
)
|
|
526
|
+
return response_data.response
|
|
527
|
+
|
|
528
|
+
def _create_shared_link_serialize(
|
|
529
|
+
self,
|
|
530
|
+
shared_link_create_dto,
|
|
531
|
+
_request_auth,
|
|
532
|
+
_content_type,
|
|
533
|
+
_headers,
|
|
534
|
+
_host_index,
|
|
535
|
+
) -> RequestSerialized:
|
|
536
|
+
_host = None
|
|
537
|
+
|
|
538
|
+
_collection_formats: Dict[str, str] = {}
|
|
539
|
+
|
|
540
|
+
_path_params: Dict[str, str] = {}
|
|
541
|
+
_query_params: List[Tuple[str, str]] = []
|
|
542
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
543
|
+
_form_params: List[Tuple[str, str]] = []
|
|
544
|
+
_files: Dict[
|
|
545
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
546
|
+
] = {}
|
|
547
|
+
_body_params: Optional[bytes] = None
|
|
548
|
+
|
|
549
|
+
# process the path parameters
|
|
550
|
+
# process the query parameters
|
|
551
|
+
# process the header parameters
|
|
552
|
+
# process the form parameters
|
|
553
|
+
# process the body parameter
|
|
554
|
+
if shared_link_create_dto is not None:
|
|
555
|
+
_body_params = shared_link_create_dto
|
|
556
|
+
|
|
557
|
+
# set the HTTP header `Accept`
|
|
558
|
+
if "Accept" not in _header_params:
|
|
559
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
560
|
+
["application/json"]
|
|
561
|
+
)
|
|
562
|
+
|
|
563
|
+
# set the HTTP header `Content-Type`
|
|
564
|
+
if _content_type:
|
|
565
|
+
_header_params["Content-Type"] = _content_type
|
|
566
|
+
else:
|
|
567
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
568
|
+
["application/json"]
|
|
569
|
+
)
|
|
570
|
+
if _default_content_type is not None:
|
|
571
|
+
_header_params["Content-Type"] = _default_content_type
|
|
572
|
+
|
|
573
|
+
# authentication setting
|
|
574
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
575
|
+
|
|
576
|
+
return self.api_client.param_serialize(
|
|
577
|
+
method="POST",
|
|
578
|
+
resource_path="/shared-links",
|
|
579
|
+
path_params=_path_params,
|
|
580
|
+
query_params=_query_params,
|
|
581
|
+
header_params=_header_params,
|
|
582
|
+
body=_body_params,
|
|
583
|
+
post_params=_form_params,
|
|
584
|
+
files=_files,
|
|
585
|
+
auth_settings=_auth_settings,
|
|
586
|
+
collection_formats=_collection_formats,
|
|
587
|
+
_host=_host,
|
|
588
|
+
_request_auth=_request_auth,
|
|
589
|
+
)
|
|
590
|
+
|
|
591
|
+
@validate_call
|
|
592
|
+
async def get_all_shared_links(
|
|
593
|
+
self,
|
|
594
|
+
album_id: Optional[UUID] = None,
|
|
595
|
+
id: Optional[UUID] = None,
|
|
596
|
+
_request_timeout: Union[
|
|
597
|
+
None,
|
|
598
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
599
|
+
Tuple[
|
|
600
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
601
|
+
],
|
|
602
|
+
] = None,
|
|
603
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
604
|
+
_content_type: Optional[StrictStr] = None,
|
|
605
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
606
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
607
|
+
) -> List[SharedLinkResponseDto]:
|
|
608
|
+
"""Retrieve all shared links
|
|
609
|
+
|
|
610
|
+
Retrieve a list of all shared links.
|
|
611
|
+
|
|
612
|
+
:param album_id:
|
|
613
|
+
:type album_id: UUID
|
|
614
|
+
:param id:
|
|
615
|
+
:type id: UUID
|
|
616
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
617
|
+
number provided, it will be total request
|
|
618
|
+
timeout. It can also be a pair (tuple) of
|
|
619
|
+
(connection, read) timeouts.
|
|
620
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
621
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
622
|
+
request; this effectively ignores the
|
|
623
|
+
authentication in the spec for a single request.
|
|
624
|
+
:type _request_auth: dict, optional
|
|
625
|
+
:param _content_type: force content-type for the request.
|
|
626
|
+
:type _content_type: str, Optional
|
|
627
|
+
:param _headers: set to override the headers for a single
|
|
628
|
+
request; this effectively ignores the headers
|
|
629
|
+
in the spec for a single request.
|
|
630
|
+
:type _headers: dict, optional
|
|
631
|
+
:param _host_index: set to override the host_index for a single
|
|
632
|
+
request; this effectively ignores the host_index
|
|
633
|
+
in the spec for a single request.
|
|
634
|
+
:type _host_index: int, optional
|
|
635
|
+
:return: Returns the result object.
|
|
636
|
+
""" # noqa: E501
|
|
637
|
+
|
|
638
|
+
_param = self._get_all_shared_links_serialize(
|
|
639
|
+
album_id=album_id,
|
|
640
|
+
id=id,
|
|
641
|
+
_request_auth=_request_auth,
|
|
642
|
+
_content_type=_content_type,
|
|
643
|
+
_headers=_headers,
|
|
644
|
+
_host_index=_host_index,
|
|
645
|
+
)
|
|
646
|
+
|
|
647
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
648
|
+
"200": "List[SharedLinkResponseDto]",
|
|
649
|
+
}
|
|
650
|
+
response_data = await self.api_client.call_api(
|
|
651
|
+
*_param, _request_timeout=_request_timeout
|
|
652
|
+
)
|
|
653
|
+
await response_data.read()
|
|
654
|
+
return self.api_client.response_deserialize(
|
|
655
|
+
response_data=response_data,
|
|
656
|
+
response_types_map=_response_types_map,
|
|
657
|
+
).data
|
|
658
|
+
|
|
659
|
+
@validate_call
|
|
660
|
+
async def get_all_shared_links_with_http_info(
|
|
661
|
+
self,
|
|
662
|
+
album_id: Optional[UUID] = None,
|
|
663
|
+
id: Optional[UUID] = None,
|
|
664
|
+
_request_timeout: Union[
|
|
665
|
+
None,
|
|
666
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
667
|
+
Tuple[
|
|
668
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
669
|
+
],
|
|
670
|
+
] = None,
|
|
671
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
672
|
+
_content_type: Optional[StrictStr] = None,
|
|
673
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
674
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
675
|
+
) -> ApiResponse[List[SharedLinkResponseDto]]:
|
|
676
|
+
"""Retrieve all shared links
|
|
677
|
+
|
|
678
|
+
Retrieve a list of all shared links.
|
|
679
|
+
|
|
680
|
+
:param album_id:
|
|
681
|
+
:type album_id: UUID
|
|
682
|
+
:param id:
|
|
683
|
+
:type id: UUID
|
|
684
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
685
|
+
number provided, it will be total request
|
|
686
|
+
timeout. It can also be a pair (tuple) of
|
|
687
|
+
(connection, read) timeouts.
|
|
688
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
689
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
690
|
+
request; this effectively ignores the
|
|
691
|
+
authentication in the spec for a single request.
|
|
692
|
+
:type _request_auth: dict, optional
|
|
693
|
+
:param _content_type: force content-type for the request.
|
|
694
|
+
:type _content_type: str, Optional
|
|
695
|
+
:param _headers: set to override the headers for a single
|
|
696
|
+
request; this effectively ignores the headers
|
|
697
|
+
in the spec for a single request.
|
|
698
|
+
:type _headers: dict, optional
|
|
699
|
+
:param _host_index: set to override the host_index for a single
|
|
700
|
+
request; this effectively ignores the host_index
|
|
701
|
+
in the spec for a single request.
|
|
702
|
+
:type _host_index: int, optional
|
|
703
|
+
:return: Returns the result object.
|
|
704
|
+
""" # noqa: E501
|
|
705
|
+
|
|
706
|
+
_param = self._get_all_shared_links_serialize(
|
|
707
|
+
album_id=album_id,
|
|
708
|
+
id=id,
|
|
709
|
+
_request_auth=_request_auth,
|
|
710
|
+
_content_type=_content_type,
|
|
711
|
+
_headers=_headers,
|
|
712
|
+
_host_index=_host_index,
|
|
713
|
+
)
|
|
714
|
+
|
|
715
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
716
|
+
"200": "List[SharedLinkResponseDto]",
|
|
717
|
+
}
|
|
718
|
+
response_data = await self.api_client.call_api(
|
|
719
|
+
*_param, _request_timeout=_request_timeout
|
|
720
|
+
)
|
|
721
|
+
await response_data.read()
|
|
722
|
+
return self.api_client.response_deserialize(
|
|
723
|
+
response_data=response_data,
|
|
724
|
+
response_types_map=_response_types_map,
|
|
725
|
+
)
|
|
726
|
+
|
|
727
|
+
@validate_call
|
|
728
|
+
async def get_all_shared_links_without_preload_content(
|
|
729
|
+
self,
|
|
730
|
+
album_id: Optional[UUID] = None,
|
|
731
|
+
id: Optional[UUID] = None,
|
|
732
|
+
_request_timeout: Union[
|
|
733
|
+
None,
|
|
734
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
735
|
+
Tuple[
|
|
736
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
737
|
+
],
|
|
738
|
+
] = None,
|
|
739
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
740
|
+
_content_type: Optional[StrictStr] = None,
|
|
741
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
742
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
743
|
+
) -> RESTResponseType:
|
|
744
|
+
"""Retrieve all shared links
|
|
745
|
+
|
|
746
|
+
Retrieve a list of all shared links.
|
|
747
|
+
|
|
748
|
+
:param album_id:
|
|
749
|
+
:type album_id: UUID
|
|
750
|
+
:param id:
|
|
751
|
+
:type id: UUID
|
|
752
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
753
|
+
number provided, it will be total request
|
|
754
|
+
timeout. It can also be a pair (tuple) of
|
|
755
|
+
(connection, read) timeouts.
|
|
756
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
757
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
758
|
+
request; this effectively ignores the
|
|
759
|
+
authentication in the spec for a single request.
|
|
760
|
+
:type _request_auth: dict, optional
|
|
761
|
+
:param _content_type: force content-type for the request.
|
|
762
|
+
:type _content_type: str, Optional
|
|
763
|
+
:param _headers: set to override the headers for a single
|
|
764
|
+
request; this effectively ignores the headers
|
|
765
|
+
in the spec for a single request.
|
|
766
|
+
:type _headers: dict, optional
|
|
767
|
+
:param _host_index: set to override the host_index for a single
|
|
768
|
+
request; this effectively ignores the host_index
|
|
769
|
+
in the spec for a single request.
|
|
770
|
+
:type _host_index: int, optional
|
|
771
|
+
:return: Returns the result object.
|
|
772
|
+
""" # noqa: E501
|
|
773
|
+
|
|
774
|
+
_param = self._get_all_shared_links_serialize(
|
|
775
|
+
album_id=album_id,
|
|
776
|
+
id=id,
|
|
777
|
+
_request_auth=_request_auth,
|
|
778
|
+
_content_type=_content_type,
|
|
779
|
+
_headers=_headers,
|
|
780
|
+
_host_index=_host_index,
|
|
781
|
+
)
|
|
782
|
+
|
|
783
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
784
|
+
"200": "List[SharedLinkResponseDto]",
|
|
785
|
+
}
|
|
786
|
+
response_data = await self.api_client.call_api(
|
|
787
|
+
*_param, _request_timeout=_request_timeout
|
|
788
|
+
)
|
|
789
|
+
return response_data.response
|
|
790
|
+
|
|
791
|
+
def _get_all_shared_links_serialize(
|
|
792
|
+
self,
|
|
793
|
+
album_id,
|
|
794
|
+
id,
|
|
795
|
+
_request_auth,
|
|
796
|
+
_content_type,
|
|
797
|
+
_headers,
|
|
798
|
+
_host_index,
|
|
799
|
+
) -> RequestSerialized:
|
|
800
|
+
_host = None
|
|
801
|
+
|
|
802
|
+
_collection_formats: Dict[str, str] = {}
|
|
803
|
+
|
|
804
|
+
_path_params: Dict[str, str] = {}
|
|
805
|
+
_query_params: List[Tuple[str, str]] = []
|
|
806
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
807
|
+
_form_params: List[Tuple[str, str]] = []
|
|
808
|
+
_files: Dict[
|
|
809
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
810
|
+
] = {}
|
|
811
|
+
_body_params: Optional[bytes] = None
|
|
812
|
+
|
|
813
|
+
# process the path parameters
|
|
814
|
+
# process the query parameters
|
|
815
|
+
if album_id is not None:
|
|
816
|
+
_query_params.append(("albumId", album_id))
|
|
817
|
+
|
|
818
|
+
if id is not None:
|
|
819
|
+
_query_params.append(("id", id))
|
|
820
|
+
|
|
821
|
+
# process the header parameters
|
|
822
|
+
# process the form parameters
|
|
823
|
+
# process the body parameter
|
|
824
|
+
|
|
825
|
+
# set the HTTP header `Accept`
|
|
826
|
+
if "Accept" not in _header_params:
|
|
827
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
828
|
+
["application/json"]
|
|
829
|
+
)
|
|
830
|
+
|
|
831
|
+
# authentication setting
|
|
832
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
833
|
+
|
|
834
|
+
return self.api_client.param_serialize(
|
|
835
|
+
method="GET",
|
|
836
|
+
resource_path="/shared-links",
|
|
837
|
+
path_params=_path_params,
|
|
838
|
+
query_params=_query_params,
|
|
839
|
+
header_params=_header_params,
|
|
840
|
+
body=_body_params,
|
|
841
|
+
post_params=_form_params,
|
|
842
|
+
files=_files,
|
|
843
|
+
auth_settings=_auth_settings,
|
|
844
|
+
collection_formats=_collection_formats,
|
|
845
|
+
_host=_host,
|
|
846
|
+
_request_auth=_request_auth,
|
|
847
|
+
)
|
|
848
|
+
|
|
849
|
+
@validate_call
|
|
850
|
+
async def get_my_shared_link(
|
|
851
|
+
self,
|
|
852
|
+
key: Optional[StrictStr] = None,
|
|
853
|
+
password: Optional[StrictStr] = None,
|
|
854
|
+
slug: Optional[StrictStr] = None,
|
|
855
|
+
token: Optional[StrictStr] = None,
|
|
856
|
+
_request_timeout: Union[
|
|
857
|
+
None,
|
|
858
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
859
|
+
Tuple[
|
|
860
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
861
|
+
],
|
|
862
|
+
] = None,
|
|
863
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
864
|
+
_content_type: Optional[StrictStr] = None,
|
|
865
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
866
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
867
|
+
) -> SharedLinkResponseDto:
|
|
868
|
+
"""Retrieve current shared link
|
|
869
|
+
|
|
870
|
+
Retrieve the current shared link associated with authentication method.
|
|
871
|
+
|
|
872
|
+
:param key:
|
|
873
|
+
:type key: str
|
|
874
|
+
:param password:
|
|
875
|
+
:type password: str
|
|
876
|
+
:param slug:
|
|
877
|
+
:type slug: str
|
|
878
|
+
:param token:
|
|
879
|
+
:type token: str
|
|
880
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
881
|
+
number provided, it will be total request
|
|
882
|
+
timeout. It can also be a pair (tuple) of
|
|
883
|
+
(connection, read) timeouts.
|
|
884
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
885
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
886
|
+
request; this effectively ignores the
|
|
887
|
+
authentication in the spec for a single request.
|
|
888
|
+
:type _request_auth: dict, optional
|
|
889
|
+
:param _content_type: force content-type for the request.
|
|
890
|
+
:type _content_type: str, Optional
|
|
891
|
+
:param _headers: set to override the headers for a single
|
|
892
|
+
request; this effectively ignores the headers
|
|
893
|
+
in the spec for a single request.
|
|
894
|
+
:type _headers: dict, optional
|
|
895
|
+
:param _host_index: set to override the host_index for a single
|
|
896
|
+
request; this effectively ignores the host_index
|
|
897
|
+
in the spec for a single request.
|
|
898
|
+
:type _host_index: int, optional
|
|
899
|
+
:return: Returns the result object.
|
|
900
|
+
""" # noqa: E501
|
|
901
|
+
|
|
902
|
+
_param = self._get_my_shared_link_serialize(
|
|
903
|
+
key=key,
|
|
904
|
+
password=password,
|
|
905
|
+
slug=slug,
|
|
906
|
+
token=token,
|
|
907
|
+
_request_auth=_request_auth,
|
|
908
|
+
_content_type=_content_type,
|
|
909
|
+
_headers=_headers,
|
|
910
|
+
_host_index=_host_index,
|
|
911
|
+
)
|
|
912
|
+
|
|
913
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
914
|
+
"200": "SharedLinkResponseDto",
|
|
915
|
+
}
|
|
916
|
+
response_data = await self.api_client.call_api(
|
|
917
|
+
*_param, _request_timeout=_request_timeout
|
|
918
|
+
)
|
|
919
|
+
await response_data.read()
|
|
920
|
+
return self.api_client.response_deserialize(
|
|
921
|
+
response_data=response_data,
|
|
922
|
+
response_types_map=_response_types_map,
|
|
923
|
+
).data
|
|
924
|
+
|
|
925
|
+
@validate_call
|
|
926
|
+
async def get_my_shared_link_with_http_info(
|
|
927
|
+
self,
|
|
928
|
+
key: Optional[StrictStr] = None,
|
|
929
|
+
password: Optional[StrictStr] = None,
|
|
930
|
+
slug: Optional[StrictStr] = None,
|
|
931
|
+
token: Optional[StrictStr] = None,
|
|
932
|
+
_request_timeout: Union[
|
|
933
|
+
None,
|
|
934
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
935
|
+
Tuple[
|
|
936
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
937
|
+
],
|
|
938
|
+
] = None,
|
|
939
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
940
|
+
_content_type: Optional[StrictStr] = None,
|
|
941
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
942
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
943
|
+
) -> ApiResponse[SharedLinkResponseDto]:
|
|
944
|
+
"""Retrieve current shared link
|
|
945
|
+
|
|
946
|
+
Retrieve the current shared link associated with authentication method.
|
|
947
|
+
|
|
948
|
+
:param key:
|
|
949
|
+
:type key: str
|
|
950
|
+
:param password:
|
|
951
|
+
:type password: str
|
|
952
|
+
:param slug:
|
|
953
|
+
:type slug: str
|
|
954
|
+
:param token:
|
|
955
|
+
:type token: str
|
|
956
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
957
|
+
number provided, it will be total request
|
|
958
|
+
timeout. It can also be a pair (tuple) of
|
|
959
|
+
(connection, read) timeouts.
|
|
960
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
961
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
962
|
+
request; this effectively ignores the
|
|
963
|
+
authentication in the spec for a single request.
|
|
964
|
+
:type _request_auth: dict, optional
|
|
965
|
+
:param _content_type: force content-type for the request.
|
|
966
|
+
:type _content_type: str, Optional
|
|
967
|
+
:param _headers: set to override the headers for a single
|
|
968
|
+
request; this effectively ignores the headers
|
|
969
|
+
in the spec for a single request.
|
|
970
|
+
:type _headers: dict, optional
|
|
971
|
+
:param _host_index: set to override the host_index for a single
|
|
972
|
+
request; this effectively ignores the host_index
|
|
973
|
+
in the spec for a single request.
|
|
974
|
+
:type _host_index: int, optional
|
|
975
|
+
:return: Returns the result object.
|
|
976
|
+
""" # noqa: E501
|
|
977
|
+
|
|
978
|
+
_param = self._get_my_shared_link_serialize(
|
|
979
|
+
key=key,
|
|
980
|
+
password=password,
|
|
981
|
+
slug=slug,
|
|
982
|
+
token=token,
|
|
983
|
+
_request_auth=_request_auth,
|
|
984
|
+
_content_type=_content_type,
|
|
985
|
+
_headers=_headers,
|
|
986
|
+
_host_index=_host_index,
|
|
987
|
+
)
|
|
988
|
+
|
|
989
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
990
|
+
"200": "SharedLinkResponseDto",
|
|
991
|
+
}
|
|
992
|
+
response_data = await self.api_client.call_api(
|
|
993
|
+
*_param, _request_timeout=_request_timeout
|
|
994
|
+
)
|
|
995
|
+
await response_data.read()
|
|
996
|
+
return self.api_client.response_deserialize(
|
|
997
|
+
response_data=response_data,
|
|
998
|
+
response_types_map=_response_types_map,
|
|
999
|
+
)
|
|
1000
|
+
|
|
1001
|
+
@validate_call
|
|
1002
|
+
async def get_my_shared_link_without_preload_content(
|
|
1003
|
+
self,
|
|
1004
|
+
key: Optional[StrictStr] = None,
|
|
1005
|
+
password: Optional[StrictStr] = None,
|
|
1006
|
+
slug: Optional[StrictStr] = None,
|
|
1007
|
+
token: Optional[StrictStr] = None,
|
|
1008
|
+
_request_timeout: Union[
|
|
1009
|
+
None,
|
|
1010
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1011
|
+
Tuple[
|
|
1012
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1013
|
+
],
|
|
1014
|
+
] = None,
|
|
1015
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1016
|
+
_content_type: Optional[StrictStr] = None,
|
|
1017
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1018
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1019
|
+
) -> RESTResponseType:
|
|
1020
|
+
"""Retrieve current shared link
|
|
1021
|
+
|
|
1022
|
+
Retrieve the current shared link associated with authentication method.
|
|
1023
|
+
|
|
1024
|
+
:param key:
|
|
1025
|
+
:type key: str
|
|
1026
|
+
:param password:
|
|
1027
|
+
:type password: str
|
|
1028
|
+
:param slug:
|
|
1029
|
+
:type slug: str
|
|
1030
|
+
:param token:
|
|
1031
|
+
:type token: str
|
|
1032
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1033
|
+
number provided, it will be total request
|
|
1034
|
+
timeout. It can also be a pair (tuple) of
|
|
1035
|
+
(connection, read) timeouts.
|
|
1036
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1037
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1038
|
+
request; this effectively ignores the
|
|
1039
|
+
authentication in the spec for a single request.
|
|
1040
|
+
:type _request_auth: dict, optional
|
|
1041
|
+
:param _content_type: force content-type for the request.
|
|
1042
|
+
:type _content_type: str, Optional
|
|
1043
|
+
:param _headers: set to override the headers for a single
|
|
1044
|
+
request; this effectively ignores the headers
|
|
1045
|
+
in the spec for a single request.
|
|
1046
|
+
:type _headers: dict, optional
|
|
1047
|
+
:param _host_index: set to override the host_index for a single
|
|
1048
|
+
request; this effectively ignores the host_index
|
|
1049
|
+
in the spec for a single request.
|
|
1050
|
+
:type _host_index: int, optional
|
|
1051
|
+
:return: Returns the result object.
|
|
1052
|
+
""" # noqa: E501
|
|
1053
|
+
|
|
1054
|
+
_param = self._get_my_shared_link_serialize(
|
|
1055
|
+
key=key,
|
|
1056
|
+
password=password,
|
|
1057
|
+
slug=slug,
|
|
1058
|
+
token=token,
|
|
1059
|
+
_request_auth=_request_auth,
|
|
1060
|
+
_content_type=_content_type,
|
|
1061
|
+
_headers=_headers,
|
|
1062
|
+
_host_index=_host_index,
|
|
1063
|
+
)
|
|
1064
|
+
|
|
1065
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1066
|
+
"200": "SharedLinkResponseDto",
|
|
1067
|
+
}
|
|
1068
|
+
response_data = await self.api_client.call_api(
|
|
1069
|
+
*_param, _request_timeout=_request_timeout
|
|
1070
|
+
)
|
|
1071
|
+
return response_data.response
|
|
1072
|
+
|
|
1073
|
+
def _get_my_shared_link_serialize(
|
|
1074
|
+
self,
|
|
1075
|
+
key,
|
|
1076
|
+
password,
|
|
1077
|
+
slug,
|
|
1078
|
+
token,
|
|
1079
|
+
_request_auth,
|
|
1080
|
+
_content_type,
|
|
1081
|
+
_headers,
|
|
1082
|
+
_host_index,
|
|
1083
|
+
) -> RequestSerialized:
|
|
1084
|
+
_host = None
|
|
1085
|
+
|
|
1086
|
+
_collection_formats: Dict[str, str] = {}
|
|
1087
|
+
|
|
1088
|
+
_path_params: Dict[str, str] = {}
|
|
1089
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1090
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1091
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1092
|
+
_files: Dict[
|
|
1093
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1094
|
+
] = {}
|
|
1095
|
+
_body_params: Optional[bytes] = None
|
|
1096
|
+
|
|
1097
|
+
# process the path parameters
|
|
1098
|
+
# process the query parameters
|
|
1099
|
+
if key is not None:
|
|
1100
|
+
_query_params.append(("key", key))
|
|
1101
|
+
|
|
1102
|
+
if password is not None:
|
|
1103
|
+
_query_params.append(("password", password))
|
|
1104
|
+
|
|
1105
|
+
if slug is not None:
|
|
1106
|
+
_query_params.append(("slug", slug))
|
|
1107
|
+
|
|
1108
|
+
if token is not None:
|
|
1109
|
+
_query_params.append(("token", token))
|
|
1110
|
+
|
|
1111
|
+
# process the header parameters
|
|
1112
|
+
# process the form parameters
|
|
1113
|
+
# process the body parameter
|
|
1114
|
+
|
|
1115
|
+
# set the HTTP header `Accept`
|
|
1116
|
+
if "Accept" not in _header_params:
|
|
1117
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1118
|
+
["application/json"]
|
|
1119
|
+
)
|
|
1120
|
+
|
|
1121
|
+
# authentication setting
|
|
1122
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
1123
|
+
|
|
1124
|
+
return self.api_client.param_serialize(
|
|
1125
|
+
method="GET",
|
|
1126
|
+
resource_path="/shared-links/me",
|
|
1127
|
+
path_params=_path_params,
|
|
1128
|
+
query_params=_query_params,
|
|
1129
|
+
header_params=_header_params,
|
|
1130
|
+
body=_body_params,
|
|
1131
|
+
post_params=_form_params,
|
|
1132
|
+
files=_files,
|
|
1133
|
+
auth_settings=_auth_settings,
|
|
1134
|
+
collection_formats=_collection_formats,
|
|
1135
|
+
_host=_host,
|
|
1136
|
+
_request_auth=_request_auth,
|
|
1137
|
+
)
|
|
1138
|
+
|
|
1139
|
+
@validate_call
|
|
1140
|
+
async def get_shared_link_by_id(
|
|
1141
|
+
self,
|
|
1142
|
+
id: UUID,
|
|
1143
|
+
_request_timeout: Union[
|
|
1144
|
+
None,
|
|
1145
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1146
|
+
Tuple[
|
|
1147
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1148
|
+
],
|
|
1149
|
+
] = None,
|
|
1150
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1151
|
+
_content_type: Optional[StrictStr] = None,
|
|
1152
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1153
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1154
|
+
) -> SharedLinkResponseDto:
|
|
1155
|
+
"""Retrieve a shared link
|
|
1156
|
+
|
|
1157
|
+
Retrieve a specific shared link by its ID.
|
|
1158
|
+
|
|
1159
|
+
:param id: (required)
|
|
1160
|
+
:type id: UUID
|
|
1161
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1162
|
+
number provided, it will be total request
|
|
1163
|
+
timeout. It can also be a pair (tuple) of
|
|
1164
|
+
(connection, read) timeouts.
|
|
1165
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1166
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1167
|
+
request; this effectively ignores the
|
|
1168
|
+
authentication in the spec for a single request.
|
|
1169
|
+
:type _request_auth: dict, optional
|
|
1170
|
+
:param _content_type: force content-type for the request.
|
|
1171
|
+
:type _content_type: str, Optional
|
|
1172
|
+
:param _headers: set to override the headers for a single
|
|
1173
|
+
request; this effectively ignores the headers
|
|
1174
|
+
in the spec for a single request.
|
|
1175
|
+
:type _headers: dict, optional
|
|
1176
|
+
:param _host_index: set to override the host_index for a single
|
|
1177
|
+
request; this effectively ignores the host_index
|
|
1178
|
+
in the spec for a single request.
|
|
1179
|
+
:type _host_index: int, optional
|
|
1180
|
+
:return: Returns the result object.
|
|
1181
|
+
""" # noqa: E501
|
|
1182
|
+
|
|
1183
|
+
_param = self._get_shared_link_by_id_serialize(
|
|
1184
|
+
id=id,
|
|
1185
|
+
_request_auth=_request_auth,
|
|
1186
|
+
_content_type=_content_type,
|
|
1187
|
+
_headers=_headers,
|
|
1188
|
+
_host_index=_host_index,
|
|
1189
|
+
)
|
|
1190
|
+
|
|
1191
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1192
|
+
"200": "SharedLinkResponseDto",
|
|
1193
|
+
}
|
|
1194
|
+
response_data = await self.api_client.call_api(
|
|
1195
|
+
*_param, _request_timeout=_request_timeout
|
|
1196
|
+
)
|
|
1197
|
+
await response_data.read()
|
|
1198
|
+
return self.api_client.response_deserialize(
|
|
1199
|
+
response_data=response_data,
|
|
1200
|
+
response_types_map=_response_types_map,
|
|
1201
|
+
).data
|
|
1202
|
+
|
|
1203
|
+
@validate_call
|
|
1204
|
+
async def get_shared_link_by_id_with_http_info(
|
|
1205
|
+
self,
|
|
1206
|
+
id: UUID,
|
|
1207
|
+
_request_timeout: Union[
|
|
1208
|
+
None,
|
|
1209
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1210
|
+
Tuple[
|
|
1211
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1212
|
+
],
|
|
1213
|
+
] = None,
|
|
1214
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1215
|
+
_content_type: Optional[StrictStr] = None,
|
|
1216
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1217
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1218
|
+
) -> ApiResponse[SharedLinkResponseDto]:
|
|
1219
|
+
"""Retrieve a shared link
|
|
1220
|
+
|
|
1221
|
+
Retrieve a specific shared link by its ID.
|
|
1222
|
+
|
|
1223
|
+
:param id: (required)
|
|
1224
|
+
:type id: UUID
|
|
1225
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1226
|
+
number provided, it will be total request
|
|
1227
|
+
timeout. It can also be a pair (tuple) of
|
|
1228
|
+
(connection, read) timeouts.
|
|
1229
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1230
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1231
|
+
request; this effectively ignores the
|
|
1232
|
+
authentication in the spec for a single request.
|
|
1233
|
+
:type _request_auth: dict, optional
|
|
1234
|
+
:param _content_type: force content-type for the request.
|
|
1235
|
+
:type _content_type: str, Optional
|
|
1236
|
+
:param _headers: set to override the headers for a single
|
|
1237
|
+
request; this effectively ignores the headers
|
|
1238
|
+
in the spec for a single request.
|
|
1239
|
+
:type _headers: dict, optional
|
|
1240
|
+
:param _host_index: set to override the host_index for a single
|
|
1241
|
+
request; this effectively ignores the host_index
|
|
1242
|
+
in the spec for a single request.
|
|
1243
|
+
:type _host_index: int, optional
|
|
1244
|
+
:return: Returns the result object.
|
|
1245
|
+
""" # noqa: E501
|
|
1246
|
+
|
|
1247
|
+
_param = self._get_shared_link_by_id_serialize(
|
|
1248
|
+
id=id,
|
|
1249
|
+
_request_auth=_request_auth,
|
|
1250
|
+
_content_type=_content_type,
|
|
1251
|
+
_headers=_headers,
|
|
1252
|
+
_host_index=_host_index,
|
|
1253
|
+
)
|
|
1254
|
+
|
|
1255
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1256
|
+
"200": "SharedLinkResponseDto",
|
|
1257
|
+
}
|
|
1258
|
+
response_data = await self.api_client.call_api(
|
|
1259
|
+
*_param, _request_timeout=_request_timeout
|
|
1260
|
+
)
|
|
1261
|
+
await response_data.read()
|
|
1262
|
+
return self.api_client.response_deserialize(
|
|
1263
|
+
response_data=response_data,
|
|
1264
|
+
response_types_map=_response_types_map,
|
|
1265
|
+
)
|
|
1266
|
+
|
|
1267
|
+
@validate_call
|
|
1268
|
+
async def get_shared_link_by_id_without_preload_content(
|
|
1269
|
+
self,
|
|
1270
|
+
id: UUID,
|
|
1271
|
+
_request_timeout: Union[
|
|
1272
|
+
None,
|
|
1273
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1274
|
+
Tuple[
|
|
1275
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1276
|
+
],
|
|
1277
|
+
] = None,
|
|
1278
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1279
|
+
_content_type: Optional[StrictStr] = None,
|
|
1280
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1281
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1282
|
+
) -> RESTResponseType:
|
|
1283
|
+
"""Retrieve a shared link
|
|
1284
|
+
|
|
1285
|
+
Retrieve a specific shared link by its ID.
|
|
1286
|
+
|
|
1287
|
+
:param id: (required)
|
|
1288
|
+
:type id: UUID
|
|
1289
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1290
|
+
number provided, it will be total request
|
|
1291
|
+
timeout. It can also be a pair (tuple) of
|
|
1292
|
+
(connection, read) timeouts.
|
|
1293
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1294
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1295
|
+
request; this effectively ignores the
|
|
1296
|
+
authentication in the spec for a single request.
|
|
1297
|
+
:type _request_auth: dict, optional
|
|
1298
|
+
:param _content_type: force content-type for the request.
|
|
1299
|
+
:type _content_type: str, Optional
|
|
1300
|
+
:param _headers: set to override the headers for a single
|
|
1301
|
+
request; this effectively ignores the headers
|
|
1302
|
+
in the spec for a single request.
|
|
1303
|
+
:type _headers: dict, optional
|
|
1304
|
+
:param _host_index: set to override the host_index for a single
|
|
1305
|
+
request; this effectively ignores the host_index
|
|
1306
|
+
in the spec for a single request.
|
|
1307
|
+
:type _host_index: int, optional
|
|
1308
|
+
:return: Returns the result object.
|
|
1309
|
+
""" # noqa: E501
|
|
1310
|
+
|
|
1311
|
+
_param = self._get_shared_link_by_id_serialize(
|
|
1312
|
+
id=id,
|
|
1313
|
+
_request_auth=_request_auth,
|
|
1314
|
+
_content_type=_content_type,
|
|
1315
|
+
_headers=_headers,
|
|
1316
|
+
_host_index=_host_index,
|
|
1317
|
+
)
|
|
1318
|
+
|
|
1319
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1320
|
+
"200": "SharedLinkResponseDto",
|
|
1321
|
+
}
|
|
1322
|
+
response_data = await self.api_client.call_api(
|
|
1323
|
+
*_param, _request_timeout=_request_timeout
|
|
1324
|
+
)
|
|
1325
|
+
return response_data.response
|
|
1326
|
+
|
|
1327
|
+
def _get_shared_link_by_id_serialize(
|
|
1328
|
+
self,
|
|
1329
|
+
id,
|
|
1330
|
+
_request_auth,
|
|
1331
|
+
_content_type,
|
|
1332
|
+
_headers,
|
|
1333
|
+
_host_index,
|
|
1334
|
+
) -> RequestSerialized:
|
|
1335
|
+
_host = None
|
|
1336
|
+
|
|
1337
|
+
_collection_formats: Dict[str, str] = {}
|
|
1338
|
+
|
|
1339
|
+
_path_params: Dict[str, str] = {}
|
|
1340
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1341
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1342
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1343
|
+
_files: Dict[
|
|
1344
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1345
|
+
] = {}
|
|
1346
|
+
_body_params: Optional[bytes] = None
|
|
1347
|
+
|
|
1348
|
+
# process the path parameters
|
|
1349
|
+
if id is not None:
|
|
1350
|
+
_path_params["id"] = id
|
|
1351
|
+
# process the query parameters
|
|
1352
|
+
# process the header parameters
|
|
1353
|
+
# process the form parameters
|
|
1354
|
+
# process the body parameter
|
|
1355
|
+
|
|
1356
|
+
# set the HTTP header `Accept`
|
|
1357
|
+
if "Accept" not in _header_params:
|
|
1358
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1359
|
+
["application/json"]
|
|
1360
|
+
)
|
|
1361
|
+
|
|
1362
|
+
# authentication setting
|
|
1363
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
1364
|
+
|
|
1365
|
+
return self.api_client.param_serialize(
|
|
1366
|
+
method="GET",
|
|
1367
|
+
resource_path="/shared-links/{id}",
|
|
1368
|
+
path_params=_path_params,
|
|
1369
|
+
query_params=_query_params,
|
|
1370
|
+
header_params=_header_params,
|
|
1371
|
+
body=_body_params,
|
|
1372
|
+
post_params=_form_params,
|
|
1373
|
+
files=_files,
|
|
1374
|
+
auth_settings=_auth_settings,
|
|
1375
|
+
collection_formats=_collection_formats,
|
|
1376
|
+
_host=_host,
|
|
1377
|
+
_request_auth=_request_auth,
|
|
1378
|
+
)
|
|
1379
|
+
|
|
1380
|
+
@validate_call
|
|
1381
|
+
async def remove_shared_link(
|
|
1382
|
+
self,
|
|
1383
|
+
id: UUID,
|
|
1384
|
+
_request_timeout: Union[
|
|
1385
|
+
None,
|
|
1386
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1387
|
+
Tuple[
|
|
1388
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1389
|
+
],
|
|
1390
|
+
] = None,
|
|
1391
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1392
|
+
_content_type: Optional[StrictStr] = None,
|
|
1393
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1394
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1395
|
+
) -> None:
|
|
1396
|
+
"""Delete a shared link
|
|
1397
|
+
|
|
1398
|
+
Delete a specific shared link by its ID.
|
|
1399
|
+
|
|
1400
|
+
:param id: (required)
|
|
1401
|
+
:type id: UUID
|
|
1402
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1403
|
+
number provided, it will be total request
|
|
1404
|
+
timeout. It can also be a pair (tuple) of
|
|
1405
|
+
(connection, read) timeouts.
|
|
1406
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1407
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1408
|
+
request; this effectively ignores the
|
|
1409
|
+
authentication in the spec for a single request.
|
|
1410
|
+
:type _request_auth: dict, optional
|
|
1411
|
+
:param _content_type: force content-type for the request.
|
|
1412
|
+
:type _content_type: str, Optional
|
|
1413
|
+
:param _headers: set to override the headers for a single
|
|
1414
|
+
request; this effectively ignores the headers
|
|
1415
|
+
in the spec for a single request.
|
|
1416
|
+
:type _headers: dict, optional
|
|
1417
|
+
:param _host_index: set to override the host_index for a single
|
|
1418
|
+
request; this effectively ignores the host_index
|
|
1419
|
+
in the spec for a single request.
|
|
1420
|
+
:type _host_index: int, optional
|
|
1421
|
+
:return: Returns the result object.
|
|
1422
|
+
""" # noqa: E501
|
|
1423
|
+
|
|
1424
|
+
_param = self._remove_shared_link_serialize(
|
|
1425
|
+
id=id,
|
|
1426
|
+
_request_auth=_request_auth,
|
|
1427
|
+
_content_type=_content_type,
|
|
1428
|
+
_headers=_headers,
|
|
1429
|
+
_host_index=_host_index,
|
|
1430
|
+
)
|
|
1431
|
+
|
|
1432
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1433
|
+
"204": None,
|
|
1434
|
+
}
|
|
1435
|
+
response_data = await self.api_client.call_api(
|
|
1436
|
+
*_param, _request_timeout=_request_timeout
|
|
1437
|
+
)
|
|
1438
|
+
await response_data.read()
|
|
1439
|
+
return self.api_client.response_deserialize(
|
|
1440
|
+
response_data=response_data,
|
|
1441
|
+
response_types_map=_response_types_map,
|
|
1442
|
+
).data
|
|
1443
|
+
|
|
1444
|
+
@validate_call
|
|
1445
|
+
async def remove_shared_link_with_http_info(
|
|
1446
|
+
self,
|
|
1447
|
+
id: UUID,
|
|
1448
|
+
_request_timeout: Union[
|
|
1449
|
+
None,
|
|
1450
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1451
|
+
Tuple[
|
|
1452
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1453
|
+
],
|
|
1454
|
+
] = None,
|
|
1455
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1456
|
+
_content_type: Optional[StrictStr] = None,
|
|
1457
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1458
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1459
|
+
) -> ApiResponse[None]:
|
|
1460
|
+
"""Delete a shared link
|
|
1461
|
+
|
|
1462
|
+
Delete a specific shared link by its ID.
|
|
1463
|
+
|
|
1464
|
+
:param id: (required)
|
|
1465
|
+
:type id: UUID
|
|
1466
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1467
|
+
number provided, it will be total request
|
|
1468
|
+
timeout. It can also be a pair (tuple) of
|
|
1469
|
+
(connection, read) timeouts.
|
|
1470
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1471
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1472
|
+
request; this effectively ignores the
|
|
1473
|
+
authentication in the spec for a single request.
|
|
1474
|
+
:type _request_auth: dict, optional
|
|
1475
|
+
:param _content_type: force content-type for the request.
|
|
1476
|
+
:type _content_type: str, Optional
|
|
1477
|
+
:param _headers: set to override the headers for a single
|
|
1478
|
+
request; this effectively ignores the headers
|
|
1479
|
+
in the spec for a single request.
|
|
1480
|
+
:type _headers: dict, optional
|
|
1481
|
+
:param _host_index: set to override the host_index for a single
|
|
1482
|
+
request; this effectively ignores the host_index
|
|
1483
|
+
in the spec for a single request.
|
|
1484
|
+
:type _host_index: int, optional
|
|
1485
|
+
:return: Returns the result object.
|
|
1486
|
+
""" # noqa: E501
|
|
1487
|
+
|
|
1488
|
+
_param = self._remove_shared_link_serialize(
|
|
1489
|
+
id=id,
|
|
1490
|
+
_request_auth=_request_auth,
|
|
1491
|
+
_content_type=_content_type,
|
|
1492
|
+
_headers=_headers,
|
|
1493
|
+
_host_index=_host_index,
|
|
1494
|
+
)
|
|
1495
|
+
|
|
1496
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1497
|
+
"204": None,
|
|
1498
|
+
}
|
|
1499
|
+
response_data = await self.api_client.call_api(
|
|
1500
|
+
*_param, _request_timeout=_request_timeout
|
|
1501
|
+
)
|
|
1502
|
+
await response_data.read()
|
|
1503
|
+
return self.api_client.response_deserialize(
|
|
1504
|
+
response_data=response_data,
|
|
1505
|
+
response_types_map=_response_types_map,
|
|
1506
|
+
)
|
|
1507
|
+
|
|
1508
|
+
@validate_call
|
|
1509
|
+
async def remove_shared_link_without_preload_content(
|
|
1510
|
+
self,
|
|
1511
|
+
id: UUID,
|
|
1512
|
+
_request_timeout: Union[
|
|
1513
|
+
None,
|
|
1514
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1515
|
+
Tuple[
|
|
1516
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1517
|
+
],
|
|
1518
|
+
] = None,
|
|
1519
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1520
|
+
_content_type: Optional[StrictStr] = None,
|
|
1521
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1522
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1523
|
+
) -> RESTResponseType:
|
|
1524
|
+
"""Delete a shared link
|
|
1525
|
+
|
|
1526
|
+
Delete a specific shared link by its ID.
|
|
1527
|
+
|
|
1528
|
+
:param id: (required)
|
|
1529
|
+
:type id: UUID
|
|
1530
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1531
|
+
number provided, it will be total request
|
|
1532
|
+
timeout. It can also be a pair (tuple) of
|
|
1533
|
+
(connection, read) timeouts.
|
|
1534
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1535
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1536
|
+
request; this effectively ignores the
|
|
1537
|
+
authentication in the spec for a single request.
|
|
1538
|
+
:type _request_auth: dict, optional
|
|
1539
|
+
:param _content_type: force content-type for the request.
|
|
1540
|
+
:type _content_type: str, Optional
|
|
1541
|
+
:param _headers: set to override the headers for a single
|
|
1542
|
+
request; this effectively ignores the headers
|
|
1543
|
+
in the spec for a single request.
|
|
1544
|
+
:type _headers: dict, optional
|
|
1545
|
+
:param _host_index: set to override the host_index for a single
|
|
1546
|
+
request; this effectively ignores the host_index
|
|
1547
|
+
in the spec for a single request.
|
|
1548
|
+
:type _host_index: int, optional
|
|
1549
|
+
:return: Returns the result object.
|
|
1550
|
+
""" # noqa: E501
|
|
1551
|
+
|
|
1552
|
+
_param = self._remove_shared_link_serialize(
|
|
1553
|
+
id=id,
|
|
1554
|
+
_request_auth=_request_auth,
|
|
1555
|
+
_content_type=_content_type,
|
|
1556
|
+
_headers=_headers,
|
|
1557
|
+
_host_index=_host_index,
|
|
1558
|
+
)
|
|
1559
|
+
|
|
1560
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1561
|
+
"204": None,
|
|
1562
|
+
}
|
|
1563
|
+
response_data = await self.api_client.call_api(
|
|
1564
|
+
*_param, _request_timeout=_request_timeout
|
|
1565
|
+
)
|
|
1566
|
+
return response_data.response
|
|
1567
|
+
|
|
1568
|
+
def _remove_shared_link_serialize(
|
|
1569
|
+
self,
|
|
1570
|
+
id,
|
|
1571
|
+
_request_auth,
|
|
1572
|
+
_content_type,
|
|
1573
|
+
_headers,
|
|
1574
|
+
_host_index,
|
|
1575
|
+
) -> RequestSerialized:
|
|
1576
|
+
_host = None
|
|
1577
|
+
|
|
1578
|
+
_collection_formats: Dict[str, str] = {}
|
|
1579
|
+
|
|
1580
|
+
_path_params: Dict[str, str] = {}
|
|
1581
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1582
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1583
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1584
|
+
_files: Dict[
|
|
1585
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1586
|
+
] = {}
|
|
1587
|
+
_body_params: Optional[bytes] = None
|
|
1588
|
+
|
|
1589
|
+
# process the path parameters
|
|
1590
|
+
if id is not None:
|
|
1591
|
+
_path_params["id"] = id
|
|
1592
|
+
# process the query parameters
|
|
1593
|
+
# process the header parameters
|
|
1594
|
+
# process the form parameters
|
|
1595
|
+
# process the body parameter
|
|
1596
|
+
|
|
1597
|
+
# authentication setting
|
|
1598
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
1599
|
+
|
|
1600
|
+
return self.api_client.param_serialize(
|
|
1601
|
+
method="DELETE",
|
|
1602
|
+
resource_path="/shared-links/{id}",
|
|
1603
|
+
path_params=_path_params,
|
|
1604
|
+
query_params=_query_params,
|
|
1605
|
+
header_params=_header_params,
|
|
1606
|
+
body=_body_params,
|
|
1607
|
+
post_params=_form_params,
|
|
1608
|
+
files=_files,
|
|
1609
|
+
auth_settings=_auth_settings,
|
|
1610
|
+
collection_formats=_collection_formats,
|
|
1611
|
+
_host=_host,
|
|
1612
|
+
_request_auth=_request_auth,
|
|
1613
|
+
)
|
|
1614
|
+
|
|
1615
|
+
@validate_call
|
|
1616
|
+
async def remove_shared_link_assets(
|
|
1617
|
+
self,
|
|
1618
|
+
id: UUID,
|
|
1619
|
+
asset_ids_dto: AssetIdsDto,
|
|
1620
|
+
key: Optional[StrictStr] = None,
|
|
1621
|
+
slug: Optional[StrictStr] = None,
|
|
1622
|
+
_request_timeout: Union[
|
|
1623
|
+
None,
|
|
1624
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1625
|
+
Tuple[
|
|
1626
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1627
|
+
],
|
|
1628
|
+
] = None,
|
|
1629
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1630
|
+
_content_type: Optional[StrictStr] = None,
|
|
1631
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1632
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1633
|
+
) -> List[AssetIdsResponseDto]:
|
|
1634
|
+
"""Remove assets from a shared link
|
|
1635
|
+
|
|
1636
|
+
Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
|
1637
|
+
|
|
1638
|
+
:param id: (required)
|
|
1639
|
+
:type id: UUID
|
|
1640
|
+
:param asset_ids_dto: (required)
|
|
1641
|
+
:type asset_ids_dto: AssetIdsDto
|
|
1642
|
+
:param key:
|
|
1643
|
+
:type key: str
|
|
1644
|
+
:param slug:
|
|
1645
|
+
:type slug: str
|
|
1646
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1647
|
+
number provided, it will be total request
|
|
1648
|
+
timeout. It can also be a pair (tuple) of
|
|
1649
|
+
(connection, read) timeouts.
|
|
1650
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1651
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1652
|
+
request; this effectively ignores the
|
|
1653
|
+
authentication in the spec for a single request.
|
|
1654
|
+
:type _request_auth: dict, optional
|
|
1655
|
+
:param _content_type: force content-type for the request.
|
|
1656
|
+
:type _content_type: str, Optional
|
|
1657
|
+
:param _headers: set to override the headers for a single
|
|
1658
|
+
request; this effectively ignores the headers
|
|
1659
|
+
in the spec for a single request.
|
|
1660
|
+
:type _headers: dict, optional
|
|
1661
|
+
:param _host_index: set to override the host_index for a single
|
|
1662
|
+
request; this effectively ignores the host_index
|
|
1663
|
+
in the spec for a single request.
|
|
1664
|
+
:type _host_index: int, optional
|
|
1665
|
+
:return: Returns the result object.
|
|
1666
|
+
""" # noqa: E501
|
|
1667
|
+
|
|
1668
|
+
_param = self._remove_shared_link_assets_serialize(
|
|
1669
|
+
id=id,
|
|
1670
|
+
asset_ids_dto=asset_ids_dto,
|
|
1671
|
+
key=key,
|
|
1672
|
+
slug=slug,
|
|
1673
|
+
_request_auth=_request_auth,
|
|
1674
|
+
_content_type=_content_type,
|
|
1675
|
+
_headers=_headers,
|
|
1676
|
+
_host_index=_host_index,
|
|
1677
|
+
)
|
|
1678
|
+
|
|
1679
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1680
|
+
"200": "List[AssetIdsResponseDto]",
|
|
1681
|
+
}
|
|
1682
|
+
response_data = await self.api_client.call_api(
|
|
1683
|
+
*_param, _request_timeout=_request_timeout
|
|
1684
|
+
)
|
|
1685
|
+
await response_data.read()
|
|
1686
|
+
return self.api_client.response_deserialize(
|
|
1687
|
+
response_data=response_data,
|
|
1688
|
+
response_types_map=_response_types_map,
|
|
1689
|
+
).data
|
|
1690
|
+
|
|
1691
|
+
@validate_call
|
|
1692
|
+
async def remove_shared_link_assets_with_http_info(
|
|
1693
|
+
self,
|
|
1694
|
+
id: UUID,
|
|
1695
|
+
asset_ids_dto: AssetIdsDto,
|
|
1696
|
+
key: Optional[StrictStr] = None,
|
|
1697
|
+
slug: Optional[StrictStr] = None,
|
|
1698
|
+
_request_timeout: Union[
|
|
1699
|
+
None,
|
|
1700
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1701
|
+
Tuple[
|
|
1702
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1703
|
+
],
|
|
1704
|
+
] = None,
|
|
1705
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1706
|
+
_content_type: Optional[StrictStr] = None,
|
|
1707
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1708
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1709
|
+
) -> ApiResponse[List[AssetIdsResponseDto]]:
|
|
1710
|
+
"""Remove assets from a shared link
|
|
1711
|
+
|
|
1712
|
+
Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
|
1713
|
+
|
|
1714
|
+
:param id: (required)
|
|
1715
|
+
:type id: UUID
|
|
1716
|
+
:param asset_ids_dto: (required)
|
|
1717
|
+
:type asset_ids_dto: AssetIdsDto
|
|
1718
|
+
:param key:
|
|
1719
|
+
:type key: str
|
|
1720
|
+
:param slug:
|
|
1721
|
+
:type slug: str
|
|
1722
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1723
|
+
number provided, it will be total request
|
|
1724
|
+
timeout. It can also be a pair (tuple) of
|
|
1725
|
+
(connection, read) timeouts.
|
|
1726
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1727
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1728
|
+
request; this effectively ignores the
|
|
1729
|
+
authentication in the spec for a single request.
|
|
1730
|
+
:type _request_auth: dict, optional
|
|
1731
|
+
:param _content_type: force content-type for the request.
|
|
1732
|
+
:type _content_type: str, Optional
|
|
1733
|
+
:param _headers: set to override the headers for a single
|
|
1734
|
+
request; this effectively ignores the headers
|
|
1735
|
+
in the spec for a single request.
|
|
1736
|
+
:type _headers: dict, optional
|
|
1737
|
+
:param _host_index: set to override the host_index for a single
|
|
1738
|
+
request; this effectively ignores the host_index
|
|
1739
|
+
in the spec for a single request.
|
|
1740
|
+
:type _host_index: int, optional
|
|
1741
|
+
:return: Returns the result object.
|
|
1742
|
+
""" # noqa: E501
|
|
1743
|
+
|
|
1744
|
+
_param = self._remove_shared_link_assets_serialize(
|
|
1745
|
+
id=id,
|
|
1746
|
+
asset_ids_dto=asset_ids_dto,
|
|
1747
|
+
key=key,
|
|
1748
|
+
slug=slug,
|
|
1749
|
+
_request_auth=_request_auth,
|
|
1750
|
+
_content_type=_content_type,
|
|
1751
|
+
_headers=_headers,
|
|
1752
|
+
_host_index=_host_index,
|
|
1753
|
+
)
|
|
1754
|
+
|
|
1755
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1756
|
+
"200": "List[AssetIdsResponseDto]",
|
|
1757
|
+
}
|
|
1758
|
+
response_data = await self.api_client.call_api(
|
|
1759
|
+
*_param, _request_timeout=_request_timeout
|
|
1760
|
+
)
|
|
1761
|
+
await response_data.read()
|
|
1762
|
+
return self.api_client.response_deserialize(
|
|
1763
|
+
response_data=response_data,
|
|
1764
|
+
response_types_map=_response_types_map,
|
|
1765
|
+
)
|
|
1766
|
+
|
|
1767
|
+
@validate_call
|
|
1768
|
+
async def remove_shared_link_assets_without_preload_content(
|
|
1769
|
+
self,
|
|
1770
|
+
id: UUID,
|
|
1771
|
+
asset_ids_dto: AssetIdsDto,
|
|
1772
|
+
key: Optional[StrictStr] = None,
|
|
1773
|
+
slug: Optional[StrictStr] = None,
|
|
1774
|
+
_request_timeout: Union[
|
|
1775
|
+
None,
|
|
1776
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1777
|
+
Tuple[
|
|
1778
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1779
|
+
],
|
|
1780
|
+
] = None,
|
|
1781
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1782
|
+
_content_type: Optional[StrictStr] = None,
|
|
1783
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1784
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1785
|
+
) -> RESTResponseType:
|
|
1786
|
+
"""Remove assets from a shared link
|
|
1787
|
+
|
|
1788
|
+
Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.
|
|
1789
|
+
|
|
1790
|
+
:param id: (required)
|
|
1791
|
+
:type id: UUID
|
|
1792
|
+
:param asset_ids_dto: (required)
|
|
1793
|
+
:type asset_ids_dto: AssetIdsDto
|
|
1794
|
+
:param key:
|
|
1795
|
+
:type key: str
|
|
1796
|
+
:param slug:
|
|
1797
|
+
:type slug: str
|
|
1798
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1799
|
+
number provided, it will be total request
|
|
1800
|
+
timeout. It can also be a pair (tuple) of
|
|
1801
|
+
(connection, read) timeouts.
|
|
1802
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1803
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1804
|
+
request; this effectively ignores the
|
|
1805
|
+
authentication in the spec for a single request.
|
|
1806
|
+
:type _request_auth: dict, optional
|
|
1807
|
+
:param _content_type: force content-type for the request.
|
|
1808
|
+
:type _content_type: str, Optional
|
|
1809
|
+
:param _headers: set to override the headers for a single
|
|
1810
|
+
request; this effectively ignores the headers
|
|
1811
|
+
in the spec for a single request.
|
|
1812
|
+
:type _headers: dict, optional
|
|
1813
|
+
:param _host_index: set to override the host_index for a single
|
|
1814
|
+
request; this effectively ignores the host_index
|
|
1815
|
+
in the spec for a single request.
|
|
1816
|
+
:type _host_index: int, optional
|
|
1817
|
+
:return: Returns the result object.
|
|
1818
|
+
""" # noqa: E501
|
|
1819
|
+
|
|
1820
|
+
_param = self._remove_shared_link_assets_serialize(
|
|
1821
|
+
id=id,
|
|
1822
|
+
asset_ids_dto=asset_ids_dto,
|
|
1823
|
+
key=key,
|
|
1824
|
+
slug=slug,
|
|
1825
|
+
_request_auth=_request_auth,
|
|
1826
|
+
_content_type=_content_type,
|
|
1827
|
+
_headers=_headers,
|
|
1828
|
+
_host_index=_host_index,
|
|
1829
|
+
)
|
|
1830
|
+
|
|
1831
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1832
|
+
"200": "List[AssetIdsResponseDto]",
|
|
1833
|
+
}
|
|
1834
|
+
response_data = await self.api_client.call_api(
|
|
1835
|
+
*_param, _request_timeout=_request_timeout
|
|
1836
|
+
)
|
|
1837
|
+
return response_data.response
|
|
1838
|
+
|
|
1839
|
+
def _remove_shared_link_assets_serialize(
|
|
1840
|
+
self,
|
|
1841
|
+
id,
|
|
1842
|
+
asset_ids_dto,
|
|
1843
|
+
key,
|
|
1844
|
+
slug,
|
|
1845
|
+
_request_auth,
|
|
1846
|
+
_content_type,
|
|
1847
|
+
_headers,
|
|
1848
|
+
_host_index,
|
|
1849
|
+
) -> RequestSerialized:
|
|
1850
|
+
_host = None
|
|
1851
|
+
|
|
1852
|
+
_collection_formats: Dict[str, str] = {}
|
|
1853
|
+
|
|
1854
|
+
_path_params: Dict[str, str] = {}
|
|
1855
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1856
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1857
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1858
|
+
_files: Dict[
|
|
1859
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1860
|
+
] = {}
|
|
1861
|
+
_body_params: Optional[bytes] = None
|
|
1862
|
+
|
|
1863
|
+
# process the path parameters
|
|
1864
|
+
if id is not None:
|
|
1865
|
+
_path_params["id"] = id
|
|
1866
|
+
# process the query parameters
|
|
1867
|
+
if key is not None:
|
|
1868
|
+
_query_params.append(("key", key))
|
|
1869
|
+
|
|
1870
|
+
if slug is not None:
|
|
1871
|
+
_query_params.append(("slug", slug))
|
|
1872
|
+
|
|
1873
|
+
# process the header parameters
|
|
1874
|
+
# process the form parameters
|
|
1875
|
+
# process the body parameter
|
|
1876
|
+
if asset_ids_dto is not None:
|
|
1877
|
+
_body_params = asset_ids_dto
|
|
1878
|
+
|
|
1879
|
+
# set the HTTP header `Accept`
|
|
1880
|
+
if "Accept" not in _header_params:
|
|
1881
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
1882
|
+
["application/json"]
|
|
1883
|
+
)
|
|
1884
|
+
|
|
1885
|
+
# set the HTTP header `Content-Type`
|
|
1886
|
+
if _content_type:
|
|
1887
|
+
_header_params["Content-Type"] = _content_type
|
|
1888
|
+
else:
|
|
1889
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
1890
|
+
["application/json"]
|
|
1891
|
+
)
|
|
1892
|
+
if _default_content_type is not None:
|
|
1893
|
+
_header_params["Content-Type"] = _default_content_type
|
|
1894
|
+
|
|
1895
|
+
# authentication setting
|
|
1896
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
1897
|
+
|
|
1898
|
+
return self.api_client.param_serialize(
|
|
1899
|
+
method="DELETE",
|
|
1900
|
+
resource_path="/shared-links/{id}/assets",
|
|
1901
|
+
path_params=_path_params,
|
|
1902
|
+
query_params=_query_params,
|
|
1903
|
+
header_params=_header_params,
|
|
1904
|
+
body=_body_params,
|
|
1905
|
+
post_params=_form_params,
|
|
1906
|
+
files=_files,
|
|
1907
|
+
auth_settings=_auth_settings,
|
|
1908
|
+
collection_formats=_collection_formats,
|
|
1909
|
+
_host=_host,
|
|
1910
|
+
_request_auth=_request_auth,
|
|
1911
|
+
)
|
|
1912
|
+
|
|
1913
|
+
@validate_call
|
|
1914
|
+
async def update_shared_link(
|
|
1915
|
+
self,
|
|
1916
|
+
id: UUID,
|
|
1917
|
+
shared_link_edit_dto: SharedLinkEditDto,
|
|
1918
|
+
_request_timeout: Union[
|
|
1919
|
+
None,
|
|
1920
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1921
|
+
Tuple[
|
|
1922
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1923
|
+
],
|
|
1924
|
+
] = None,
|
|
1925
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1926
|
+
_content_type: Optional[StrictStr] = None,
|
|
1927
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1928
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1929
|
+
) -> SharedLinkResponseDto:
|
|
1930
|
+
"""Update a shared link
|
|
1931
|
+
|
|
1932
|
+
Update an existing shared link by its ID.
|
|
1933
|
+
|
|
1934
|
+
:param id: (required)
|
|
1935
|
+
:type id: UUID
|
|
1936
|
+
:param shared_link_edit_dto: (required)
|
|
1937
|
+
:type shared_link_edit_dto: SharedLinkEditDto
|
|
1938
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1939
|
+
number provided, it will be total request
|
|
1940
|
+
timeout. It can also be a pair (tuple) of
|
|
1941
|
+
(connection, read) timeouts.
|
|
1942
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1943
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1944
|
+
request; this effectively ignores the
|
|
1945
|
+
authentication in the spec for a single request.
|
|
1946
|
+
:type _request_auth: dict, optional
|
|
1947
|
+
:param _content_type: force content-type for the request.
|
|
1948
|
+
:type _content_type: str, Optional
|
|
1949
|
+
:param _headers: set to override the headers for a single
|
|
1950
|
+
request; this effectively ignores the headers
|
|
1951
|
+
in the spec for a single request.
|
|
1952
|
+
:type _headers: dict, optional
|
|
1953
|
+
:param _host_index: set to override the host_index for a single
|
|
1954
|
+
request; this effectively ignores the host_index
|
|
1955
|
+
in the spec for a single request.
|
|
1956
|
+
:type _host_index: int, optional
|
|
1957
|
+
:return: Returns the result object.
|
|
1958
|
+
""" # noqa: E501
|
|
1959
|
+
|
|
1960
|
+
_param = self._update_shared_link_serialize(
|
|
1961
|
+
id=id,
|
|
1962
|
+
shared_link_edit_dto=shared_link_edit_dto,
|
|
1963
|
+
_request_auth=_request_auth,
|
|
1964
|
+
_content_type=_content_type,
|
|
1965
|
+
_headers=_headers,
|
|
1966
|
+
_host_index=_host_index,
|
|
1967
|
+
)
|
|
1968
|
+
|
|
1969
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1970
|
+
"200": "SharedLinkResponseDto",
|
|
1971
|
+
}
|
|
1972
|
+
response_data = await self.api_client.call_api(
|
|
1973
|
+
*_param, _request_timeout=_request_timeout
|
|
1974
|
+
)
|
|
1975
|
+
await response_data.read()
|
|
1976
|
+
return self.api_client.response_deserialize(
|
|
1977
|
+
response_data=response_data,
|
|
1978
|
+
response_types_map=_response_types_map,
|
|
1979
|
+
).data
|
|
1980
|
+
|
|
1981
|
+
@validate_call
|
|
1982
|
+
async def update_shared_link_with_http_info(
|
|
1983
|
+
self,
|
|
1984
|
+
id: UUID,
|
|
1985
|
+
shared_link_edit_dto: SharedLinkEditDto,
|
|
1986
|
+
_request_timeout: Union[
|
|
1987
|
+
None,
|
|
1988
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1989
|
+
Tuple[
|
|
1990
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
1991
|
+
],
|
|
1992
|
+
] = None,
|
|
1993
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1994
|
+
_content_type: Optional[StrictStr] = None,
|
|
1995
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1996
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1997
|
+
) -> ApiResponse[SharedLinkResponseDto]:
|
|
1998
|
+
"""Update a shared link
|
|
1999
|
+
|
|
2000
|
+
Update an existing shared link by its ID.
|
|
2001
|
+
|
|
2002
|
+
:param id: (required)
|
|
2003
|
+
:type id: UUID
|
|
2004
|
+
:param shared_link_edit_dto: (required)
|
|
2005
|
+
:type shared_link_edit_dto: SharedLinkEditDto
|
|
2006
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2007
|
+
number provided, it will be total request
|
|
2008
|
+
timeout. It can also be a pair (tuple) of
|
|
2009
|
+
(connection, read) timeouts.
|
|
2010
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2011
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2012
|
+
request; this effectively ignores the
|
|
2013
|
+
authentication in the spec for a single request.
|
|
2014
|
+
:type _request_auth: dict, optional
|
|
2015
|
+
:param _content_type: force content-type for the request.
|
|
2016
|
+
:type _content_type: str, Optional
|
|
2017
|
+
:param _headers: set to override the headers for a single
|
|
2018
|
+
request; this effectively ignores the headers
|
|
2019
|
+
in the spec for a single request.
|
|
2020
|
+
:type _headers: dict, optional
|
|
2021
|
+
:param _host_index: set to override the host_index for a single
|
|
2022
|
+
request; this effectively ignores the host_index
|
|
2023
|
+
in the spec for a single request.
|
|
2024
|
+
:type _host_index: int, optional
|
|
2025
|
+
:return: Returns the result object.
|
|
2026
|
+
""" # noqa: E501
|
|
2027
|
+
|
|
2028
|
+
_param = self._update_shared_link_serialize(
|
|
2029
|
+
id=id,
|
|
2030
|
+
shared_link_edit_dto=shared_link_edit_dto,
|
|
2031
|
+
_request_auth=_request_auth,
|
|
2032
|
+
_content_type=_content_type,
|
|
2033
|
+
_headers=_headers,
|
|
2034
|
+
_host_index=_host_index,
|
|
2035
|
+
)
|
|
2036
|
+
|
|
2037
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2038
|
+
"200": "SharedLinkResponseDto",
|
|
2039
|
+
}
|
|
2040
|
+
response_data = await self.api_client.call_api(
|
|
2041
|
+
*_param, _request_timeout=_request_timeout
|
|
2042
|
+
)
|
|
2043
|
+
await response_data.read()
|
|
2044
|
+
return self.api_client.response_deserialize(
|
|
2045
|
+
response_data=response_data,
|
|
2046
|
+
response_types_map=_response_types_map,
|
|
2047
|
+
)
|
|
2048
|
+
|
|
2049
|
+
@validate_call
|
|
2050
|
+
async def update_shared_link_without_preload_content(
|
|
2051
|
+
self,
|
|
2052
|
+
id: UUID,
|
|
2053
|
+
shared_link_edit_dto: SharedLinkEditDto,
|
|
2054
|
+
_request_timeout: Union[
|
|
2055
|
+
None,
|
|
2056
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2057
|
+
Tuple[
|
|
2058
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
2059
|
+
],
|
|
2060
|
+
] = None,
|
|
2061
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2062
|
+
_content_type: Optional[StrictStr] = None,
|
|
2063
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2064
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2065
|
+
) -> RESTResponseType:
|
|
2066
|
+
"""Update a shared link
|
|
2067
|
+
|
|
2068
|
+
Update an existing shared link by its ID.
|
|
2069
|
+
|
|
2070
|
+
:param id: (required)
|
|
2071
|
+
:type id: UUID
|
|
2072
|
+
:param shared_link_edit_dto: (required)
|
|
2073
|
+
:type shared_link_edit_dto: SharedLinkEditDto
|
|
2074
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2075
|
+
number provided, it will be total request
|
|
2076
|
+
timeout. It can also be a pair (tuple) of
|
|
2077
|
+
(connection, read) timeouts.
|
|
2078
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2079
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2080
|
+
request; this effectively ignores the
|
|
2081
|
+
authentication in the spec for a single request.
|
|
2082
|
+
:type _request_auth: dict, optional
|
|
2083
|
+
:param _content_type: force content-type for the request.
|
|
2084
|
+
:type _content_type: str, Optional
|
|
2085
|
+
:param _headers: set to override the headers for a single
|
|
2086
|
+
request; this effectively ignores the headers
|
|
2087
|
+
in the spec for a single request.
|
|
2088
|
+
:type _headers: dict, optional
|
|
2089
|
+
:param _host_index: set to override the host_index for a single
|
|
2090
|
+
request; this effectively ignores the host_index
|
|
2091
|
+
in the spec for a single request.
|
|
2092
|
+
:type _host_index: int, optional
|
|
2093
|
+
:return: Returns the result object.
|
|
2094
|
+
""" # noqa: E501
|
|
2095
|
+
|
|
2096
|
+
_param = self._update_shared_link_serialize(
|
|
2097
|
+
id=id,
|
|
2098
|
+
shared_link_edit_dto=shared_link_edit_dto,
|
|
2099
|
+
_request_auth=_request_auth,
|
|
2100
|
+
_content_type=_content_type,
|
|
2101
|
+
_headers=_headers,
|
|
2102
|
+
_host_index=_host_index,
|
|
2103
|
+
)
|
|
2104
|
+
|
|
2105
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2106
|
+
"200": "SharedLinkResponseDto",
|
|
2107
|
+
}
|
|
2108
|
+
response_data = await self.api_client.call_api(
|
|
2109
|
+
*_param, _request_timeout=_request_timeout
|
|
2110
|
+
)
|
|
2111
|
+
return response_data.response
|
|
2112
|
+
|
|
2113
|
+
def _update_shared_link_serialize(
|
|
2114
|
+
self,
|
|
2115
|
+
id,
|
|
2116
|
+
shared_link_edit_dto,
|
|
2117
|
+
_request_auth,
|
|
2118
|
+
_content_type,
|
|
2119
|
+
_headers,
|
|
2120
|
+
_host_index,
|
|
2121
|
+
) -> RequestSerialized:
|
|
2122
|
+
_host = None
|
|
2123
|
+
|
|
2124
|
+
_collection_formats: Dict[str, str] = {}
|
|
2125
|
+
|
|
2126
|
+
_path_params: Dict[str, str] = {}
|
|
2127
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2128
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2129
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2130
|
+
_files: Dict[
|
|
2131
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2132
|
+
] = {}
|
|
2133
|
+
_body_params: Optional[bytes] = None
|
|
2134
|
+
|
|
2135
|
+
# process the path parameters
|
|
2136
|
+
if id is not None:
|
|
2137
|
+
_path_params["id"] = id
|
|
2138
|
+
# process the query parameters
|
|
2139
|
+
# process the header parameters
|
|
2140
|
+
# process the form parameters
|
|
2141
|
+
# process the body parameter
|
|
2142
|
+
if shared_link_edit_dto is not None:
|
|
2143
|
+
_body_params = shared_link_edit_dto
|
|
2144
|
+
|
|
2145
|
+
# set the HTTP header `Accept`
|
|
2146
|
+
if "Accept" not in _header_params:
|
|
2147
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
2148
|
+
["application/json"]
|
|
2149
|
+
)
|
|
2150
|
+
|
|
2151
|
+
# set the HTTP header `Content-Type`
|
|
2152
|
+
if _content_type:
|
|
2153
|
+
_header_params["Content-Type"] = _content_type
|
|
2154
|
+
else:
|
|
2155
|
+
_default_content_type = self.api_client.select_header_content_type(
|
|
2156
|
+
["application/json"]
|
|
2157
|
+
)
|
|
2158
|
+
if _default_content_type is not None:
|
|
2159
|
+
_header_params["Content-Type"] = _default_content_type
|
|
2160
|
+
|
|
2161
|
+
# authentication setting
|
|
2162
|
+
_auth_settings: List[str] = ["cookie", "api_key", "bearer"]
|
|
2163
|
+
|
|
2164
|
+
return self.api_client.param_serialize(
|
|
2165
|
+
method="PATCH",
|
|
2166
|
+
resource_path="/shared-links/{id}",
|
|
2167
|
+
path_params=_path_params,
|
|
2168
|
+
query_params=_query_params,
|
|
2169
|
+
header_params=_header_params,
|
|
2170
|
+
body=_body_params,
|
|
2171
|
+
post_params=_form_params,
|
|
2172
|
+
files=_files,
|
|
2173
|
+
auth_settings=_auth_settings,
|
|
2174
|
+
collection_formats=_collection_formats,
|
|
2175
|
+
_host=_host,
|
|
2176
|
+
_request_auth=_request_auth,
|
|
2177
|
+
)
|