[TASK] Initial version, with some help from Junie. Copies all files in albums to the local filesystem.

This commit is contained in:
2025-04-19 18:05:53 +02:00
parent f5fed71def
commit 1e2e7dfb5a
865 changed files with 119341 additions and 2 deletions

49
.editorconfig Normal file
View File

@@ -0,0 +1,49 @@
# https://editorconfig.org/
root = true
[*]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
charset = utf-8
[*.py]
max_line_length = 120
ensure_newline_before_comments = true
include_trailing_comma = true
use_parentheses = true
# Use 2 spaces for the HTML files
[*.html]
indent_size = 2
# The JSON files contain newlines inconsistently
[*.json]
indent_size = 2
insert_final_newline = false
[**/admin/js/vendor/**]
indent_style = unset
indent_size = unset
# Minified JavaScript files shouldn't be changed
[**.min.js]
indent_style = unset
insert_final_newline = false
# Makefiles always use tabs for indentation
[Makefile]
indent_style = tab
# Batch files use tabs for indentation
[*.bat]
indent_style = tab
[docs/**.txt]
max_line_length = 88
[*.yml]
indent_size = 2

4
.env.example Normal file
View File

@@ -0,0 +1,4 @@
IMMICH_HOST=http://localhost:2283/api
IMMICH_API_KEY=
TARGET_DIR=./export

2
.gitignore vendored
View File

@@ -247,3 +247,5 @@ fabric.properties
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
# Custom
/export

8
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

10
.idea/immich-to-cloud-exporter.iml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.13 (immich-to-cloud-exporter)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

6
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.13 (immich-to-cloud-exporter)" />
</component>
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/immich-to-cloud-exporter.iml" filepath="$PROJECT_DIR$/.idea/immich-to-cloud-exporter.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

23
.openapi-generator-ignore Normal file
View File

@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@@ -1,3 +1,28 @@
# immich-to-cloud-exporter
# Immich to cloud exporter
Script to export immich data as a structured folder. Useful if you want to browse your albums etc when immich is broken.
## To-do
- [ ] Create folders like "Misc {{year}}" for photos that are not in albums
- [ ] Move (or rename?) photos that are deleted in Immich but exist on the local disk
- [ ] Dockerize the tool so it's easy to run on the server
- [ ] Stretch: Preserve metadata (e.g. file creation times)
- [ ] Stretch: directly sync to Proton Drive (skipping the local filesystem)
## Development
### Generate OpenAPI spec
```bash
rm -rf generated/immich
docker run --rm \
-u $UID:$UID \
-v ${PWD}:/local openapitools/openapi-generator-cli generate \
-i https://github.com/immich-app/immich/raw/refs/heads/main/open-api/immich-openapi-specs.json \
-g python \
--skip-operation-example \
--additional-properties generateSourceCodeOnly=true,packageName="generated.immich.openapi_client" \
-o /local/
```

0
generated/__init__.py Normal file
View File

View File

View File

@@ -0,0 +1,312 @@
# coding: utf-8
# flake8: noqa
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
__version__ = "1.0.0"
# import apis into sdk package
from generated.immich.openapi_client.api.api_keys_api import APIKeysApi
from generated.immich.openapi_client.api.activities_api import ActivitiesApi
from generated.immich.openapi_client.api.albums_api import AlbumsApi
from generated.immich.openapi_client.api.assets_api import AssetsApi
from generated.immich.openapi_client.api.authentication_api import AuthenticationApi
from generated.immich.openapi_client.api.deprecated_api import DeprecatedApi
from generated.immich.openapi_client.api.download_api import DownloadApi
from generated.immich.openapi_client.api.duplicates_api import DuplicatesApi
from generated.immich.openapi_client.api.faces_api import FacesApi
from generated.immich.openapi_client.api.file_reports_api import FileReportsApi
from generated.immich.openapi_client.api.jobs_api import JobsApi
from generated.immich.openapi_client.api.libraries_api import LibrariesApi
from generated.immich.openapi_client.api.map_api import MapApi
from generated.immich.openapi_client.api.memories_api import MemoriesApi
from generated.immich.openapi_client.api.notifications_api import NotificationsApi
from generated.immich.openapi_client.api.o_auth_api import OAuthApi
from generated.immich.openapi_client.api.partners_api import PartnersApi
from generated.immich.openapi_client.api.people_api import PeopleApi
from generated.immich.openapi_client.api.search_api import SearchApi
from generated.immich.openapi_client.api.server_api import ServerApi
from generated.immich.openapi_client.api.sessions_api import SessionsApi
from generated.immich.openapi_client.api.shared_links_api import SharedLinksApi
from generated.immich.openapi_client.api.stacks_api import StacksApi
from generated.immich.openapi_client.api.sync_api import SyncApi
from generated.immich.openapi_client.api.system_config_api import SystemConfigApi
from generated.immich.openapi_client.api.system_metadata_api import SystemMetadataApi
from generated.immich.openapi_client.api.tags_api import TagsApi
from generated.immich.openapi_client.api.timeline_api import TimelineApi
from generated.immich.openapi_client.api.trash_api import TrashApi
from generated.immich.openapi_client.api.users_api import UsersApi
from generated.immich.openapi_client.api.users_admin_api import UsersAdminApi
from generated.immich.openapi_client.api.view_api import ViewApi
# import ApiClient
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.api_client import ApiClient
from generated.immich.openapi_client.configuration import Configuration
from generated.immich.openapi_client.exceptions import OpenApiException
from generated.immich.openapi_client.exceptions import ApiTypeError
from generated.immich.openapi_client.exceptions import ApiValueError
from generated.immich.openapi_client.exceptions import ApiKeyError
from generated.immich.openapi_client.exceptions import ApiAttributeError
from generated.immich.openapi_client.exceptions import ApiException
# import models into sdk package
from generated.immich.openapi_client.models.api_key_create_dto import APIKeyCreateDto
from generated.immich.openapi_client.models.api_key_create_response_dto import APIKeyCreateResponseDto
from generated.immich.openapi_client.models.api_key_response_dto import APIKeyResponseDto
from generated.immich.openapi_client.models.api_key_update_dto import APIKeyUpdateDto
from generated.immich.openapi_client.models.activity_create_dto import ActivityCreateDto
from generated.immich.openapi_client.models.activity_response_dto import ActivityResponseDto
from generated.immich.openapi_client.models.activity_statistics_response_dto import ActivityStatisticsResponseDto
from generated.immich.openapi_client.models.add_users_dto import AddUsersDto
from generated.immich.openapi_client.models.admin_onboarding_update_dto import AdminOnboardingUpdateDto
from generated.immich.openapi_client.models.album_response_dto import AlbumResponseDto
from generated.immich.openapi_client.models.album_statistics_response_dto import AlbumStatisticsResponseDto
from generated.immich.openapi_client.models.album_user_add_dto import AlbumUserAddDto
from generated.immich.openapi_client.models.album_user_create_dto import AlbumUserCreateDto
from generated.immich.openapi_client.models.album_user_response_dto import AlbumUserResponseDto
from generated.immich.openapi_client.models.album_user_role import AlbumUserRole
from generated.immich.openapi_client.models.all_job_status_response_dto import AllJobStatusResponseDto
from generated.immich.openapi_client.models.asset_bulk_delete_dto import AssetBulkDeleteDto
from generated.immich.openapi_client.models.asset_bulk_update_dto import AssetBulkUpdateDto
from generated.immich.openapi_client.models.asset_bulk_upload_check_dto import AssetBulkUploadCheckDto
from generated.immich.openapi_client.models.asset_bulk_upload_check_item import AssetBulkUploadCheckItem
from generated.immich.openapi_client.models.asset_bulk_upload_check_response_dto import AssetBulkUploadCheckResponseDto
from generated.immich.openapi_client.models.asset_bulk_upload_check_result import AssetBulkUploadCheckResult
from generated.immich.openapi_client.models.asset_delta_sync_dto import AssetDeltaSyncDto
from generated.immich.openapi_client.models.asset_delta_sync_response_dto import AssetDeltaSyncResponseDto
from generated.immich.openapi_client.models.asset_face_create_dto import AssetFaceCreateDto
from generated.immich.openapi_client.models.asset_face_delete_dto import AssetFaceDeleteDto
from generated.immich.openapi_client.models.asset_face_response_dto import AssetFaceResponseDto
from generated.immich.openapi_client.models.asset_face_update_dto import AssetFaceUpdateDto
from generated.immich.openapi_client.models.asset_face_update_item import AssetFaceUpdateItem
from generated.immich.openapi_client.models.asset_face_without_person_response_dto import AssetFaceWithoutPersonResponseDto
from generated.immich.openapi_client.models.asset_full_sync_dto import AssetFullSyncDto
from generated.immich.openapi_client.models.asset_ids_dto import AssetIdsDto
from generated.immich.openapi_client.models.asset_ids_response_dto import AssetIdsResponseDto
from generated.immich.openapi_client.models.asset_job_name import AssetJobName
from generated.immich.openapi_client.models.asset_jobs_dto import AssetJobsDto
from generated.immich.openapi_client.models.asset_media_response_dto import AssetMediaResponseDto
from generated.immich.openapi_client.models.asset_media_size import AssetMediaSize
from generated.immich.openapi_client.models.asset_media_status import AssetMediaStatus
from generated.immich.openapi_client.models.asset_order import AssetOrder
from generated.immich.openapi_client.models.asset_response_dto import AssetResponseDto
from generated.immich.openapi_client.models.asset_stack_response_dto import AssetStackResponseDto
from generated.immich.openapi_client.models.asset_stats_response_dto import AssetStatsResponseDto
from generated.immich.openapi_client.models.asset_type_enum import AssetTypeEnum
from generated.immich.openapi_client.models.audio_codec import AudioCodec
from generated.immich.openapi_client.models.avatar_response import AvatarResponse
from generated.immich.openapi_client.models.avatar_update import AvatarUpdate
from generated.immich.openapi_client.models.bulk_id_response_dto import BulkIdResponseDto
from generated.immich.openapi_client.models.bulk_ids_dto import BulkIdsDto
from generated.immich.openapi_client.models.clip_config import CLIPConfig
from generated.immich.openapi_client.models.cq_mode import CQMode
from generated.immich.openapi_client.models.change_password_dto import ChangePasswordDto
from generated.immich.openapi_client.models.check_existing_assets_dto import CheckExistingAssetsDto
from generated.immich.openapi_client.models.check_existing_assets_response_dto import CheckExistingAssetsResponseDto
from generated.immich.openapi_client.models.colorspace import Colorspace
from generated.immich.openapi_client.models.create_album_dto import CreateAlbumDto
from generated.immich.openapi_client.models.create_library_dto import CreateLibraryDto
from generated.immich.openapi_client.models.create_profile_image_response_dto import CreateProfileImageResponseDto
from generated.immich.openapi_client.models.database_backup_config import DatabaseBackupConfig
from generated.immich.openapi_client.models.download_archive_info import DownloadArchiveInfo
from generated.immich.openapi_client.models.download_info_dto import DownloadInfoDto
from generated.immich.openapi_client.models.download_response import DownloadResponse
from generated.immich.openapi_client.models.download_response_dto import DownloadResponseDto
from generated.immich.openapi_client.models.download_update import DownloadUpdate
from generated.immich.openapi_client.models.duplicate_detection_config import DuplicateDetectionConfig
from generated.immich.openapi_client.models.duplicate_response_dto import DuplicateResponseDto
from generated.immich.openapi_client.models.email_notifications_response import EmailNotificationsResponse
from generated.immich.openapi_client.models.email_notifications_update import EmailNotificationsUpdate
from generated.immich.openapi_client.models.exif_response_dto import ExifResponseDto
from generated.immich.openapi_client.models.face_dto import FaceDto
from generated.immich.openapi_client.models.facial_recognition_config import FacialRecognitionConfig
from generated.immich.openapi_client.models.file_checksum_dto import FileChecksumDto
from generated.immich.openapi_client.models.file_checksum_response_dto import FileChecksumResponseDto
from generated.immich.openapi_client.models.file_report_dto import FileReportDto
from generated.immich.openapi_client.models.file_report_fix_dto import FileReportFixDto
from generated.immich.openapi_client.models.file_report_item_dto import FileReportItemDto
from generated.immich.openapi_client.models.folders_response import FoldersResponse
from generated.immich.openapi_client.models.folders_update import FoldersUpdate
from generated.immich.openapi_client.models.image_format import ImageFormat
from generated.immich.openapi_client.models.job_command import JobCommand
from generated.immich.openapi_client.models.job_command_dto import JobCommandDto
from generated.immich.openapi_client.models.job_counts_dto import JobCountsDto
from generated.immich.openapi_client.models.job_create_dto import JobCreateDto
from generated.immich.openapi_client.models.job_name import JobName
from generated.immich.openapi_client.models.job_settings_dto import JobSettingsDto
from generated.immich.openapi_client.models.job_status_dto import JobStatusDto
from generated.immich.openapi_client.models.library_response_dto import LibraryResponseDto
from generated.immich.openapi_client.models.library_stats_response_dto import LibraryStatsResponseDto
from generated.immich.openapi_client.models.license_key_dto import LicenseKeyDto
from generated.immich.openapi_client.models.license_response_dto import LicenseResponseDto
from generated.immich.openapi_client.models.log_level import LogLevel
from generated.immich.openapi_client.models.login_credential_dto import LoginCredentialDto
from generated.immich.openapi_client.models.login_response_dto import LoginResponseDto
from generated.immich.openapi_client.models.logout_response_dto import LogoutResponseDto
from generated.immich.openapi_client.models.manual_job_name import ManualJobName
from generated.immich.openapi_client.models.map_marker_response_dto import MapMarkerResponseDto
from generated.immich.openapi_client.models.map_reverse_geocode_response_dto import MapReverseGeocodeResponseDto
from generated.immich.openapi_client.models.memories_response import MemoriesResponse
from generated.immich.openapi_client.models.memories_update import MemoriesUpdate
from generated.immich.openapi_client.models.memory_create_dto import MemoryCreateDto
from generated.immich.openapi_client.models.memory_lane_response_dto import MemoryLaneResponseDto
from generated.immich.openapi_client.models.memory_response_dto import MemoryResponseDto
from generated.immich.openapi_client.models.memory_type import MemoryType
from generated.immich.openapi_client.models.memory_update_dto import MemoryUpdateDto
from generated.immich.openapi_client.models.merge_person_dto import MergePersonDto
from generated.immich.openapi_client.models.metadata_search_dto import MetadataSearchDto
from generated.immich.openapi_client.models.o_auth_authorize_response_dto import OAuthAuthorizeResponseDto
from generated.immich.openapi_client.models.o_auth_callback_dto import OAuthCallbackDto
from generated.immich.openapi_client.models.o_auth_config_dto import OAuthConfigDto
from generated.immich.openapi_client.models.on_this_day_dto import OnThisDayDto
from generated.immich.openapi_client.models.partner_direction import PartnerDirection
from generated.immich.openapi_client.models.partner_response_dto import PartnerResponseDto
from generated.immich.openapi_client.models.path_entity_type import PathEntityType
from generated.immich.openapi_client.models.path_type import PathType
from generated.immich.openapi_client.models.people_response import PeopleResponse
from generated.immich.openapi_client.models.people_response_dto import PeopleResponseDto
from generated.immich.openapi_client.models.people_update import PeopleUpdate
from generated.immich.openapi_client.models.people_update_dto import PeopleUpdateDto
from generated.immich.openapi_client.models.people_update_item import PeopleUpdateItem
from generated.immich.openapi_client.models.permission import Permission
from generated.immich.openapi_client.models.person_create_dto import PersonCreateDto
from generated.immich.openapi_client.models.person_response_dto import PersonResponseDto
from generated.immich.openapi_client.models.person_statistics_response_dto import PersonStatisticsResponseDto
from generated.immich.openapi_client.models.person_update_dto import PersonUpdateDto
from generated.immich.openapi_client.models.person_with_faces_response_dto import PersonWithFacesResponseDto
from generated.immich.openapi_client.models.places_response_dto import PlacesResponseDto
from generated.immich.openapi_client.models.purchase_response import PurchaseResponse
from generated.immich.openapi_client.models.purchase_update import PurchaseUpdate
from generated.immich.openapi_client.models.queue_status_dto import QueueStatusDto
from generated.immich.openapi_client.models.random_search_dto import RandomSearchDto
from generated.immich.openapi_client.models.ratings_response import RatingsResponse
from generated.immich.openapi_client.models.ratings_update import RatingsUpdate
from generated.immich.openapi_client.models.reaction_level import ReactionLevel
from generated.immich.openapi_client.models.reaction_type import ReactionType
from generated.immich.openapi_client.models.reverse_geocoding_state_response_dto import ReverseGeocodingStateResponseDto
from generated.immich.openapi_client.models.search_album_response_dto import SearchAlbumResponseDto
from generated.immich.openapi_client.models.search_asset_response_dto import SearchAssetResponseDto
from generated.immich.openapi_client.models.search_explore_item import SearchExploreItem
from generated.immich.openapi_client.models.search_explore_response_dto import SearchExploreResponseDto
from generated.immich.openapi_client.models.search_facet_count_response_dto import SearchFacetCountResponseDto
from generated.immich.openapi_client.models.search_facet_response_dto import SearchFacetResponseDto
from generated.immich.openapi_client.models.search_response_dto import SearchResponseDto
from generated.immich.openapi_client.models.search_suggestion_type import SearchSuggestionType
from generated.immich.openapi_client.models.server_about_response_dto import ServerAboutResponseDto
from generated.immich.openapi_client.models.server_config_dto import ServerConfigDto
from generated.immich.openapi_client.models.server_features_dto import ServerFeaturesDto
from generated.immich.openapi_client.models.server_media_types_response_dto import ServerMediaTypesResponseDto
from generated.immich.openapi_client.models.server_ping_response import ServerPingResponse
from generated.immich.openapi_client.models.server_stats_response_dto import ServerStatsResponseDto
from generated.immich.openapi_client.models.server_storage_response_dto import ServerStorageResponseDto
from generated.immich.openapi_client.models.server_theme_dto import ServerThemeDto
from generated.immich.openapi_client.models.server_version_history_response_dto import ServerVersionHistoryResponseDto
from generated.immich.openapi_client.models.server_version_response_dto import ServerVersionResponseDto
from generated.immich.openapi_client.models.session_response_dto import SessionResponseDto
from generated.immich.openapi_client.models.shared_link_create_dto import SharedLinkCreateDto
from generated.immich.openapi_client.models.shared_link_edit_dto import SharedLinkEditDto
from generated.immich.openapi_client.models.shared_link_response_dto import SharedLinkResponseDto
from generated.immich.openapi_client.models.shared_link_type import SharedLinkType
from generated.immich.openapi_client.models.shared_links_response import SharedLinksResponse
from generated.immich.openapi_client.models.shared_links_update import SharedLinksUpdate
from generated.immich.openapi_client.models.sign_up_dto import SignUpDto
from generated.immich.openapi_client.models.smart_search_dto import SmartSearchDto
from generated.immich.openapi_client.models.source_type import SourceType
from generated.immich.openapi_client.models.stack_create_dto import StackCreateDto
from generated.immich.openapi_client.models.stack_response_dto import StackResponseDto
from generated.immich.openapi_client.models.stack_update_dto import StackUpdateDto
from generated.immich.openapi_client.models.sync_ack_delete_dto import SyncAckDeleteDto
from generated.immich.openapi_client.models.sync_ack_dto import SyncAckDto
from generated.immich.openapi_client.models.sync_ack_set_dto import SyncAckSetDto
from generated.immich.openapi_client.models.sync_asset_delete_v1 import SyncAssetDeleteV1
from generated.immich.openapi_client.models.sync_asset_exif_v1 import SyncAssetExifV1
from generated.immich.openapi_client.models.sync_asset_v1 import SyncAssetV1
from generated.immich.openapi_client.models.sync_entity_type import SyncEntityType
from generated.immich.openapi_client.models.sync_partner_delete_v1 import SyncPartnerDeleteV1
from generated.immich.openapi_client.models.sync_partner_v1 import SyncPartnerV1
from generated.immich.openapi_client.models.sync_request_type import SyncRequestType
from generated.immich.openapi_client.models.sync_stream_dto import SyncStreamDto
from generated.immich.openapi_client.models.sync_user_delete_v1 import SyncUserDeleteV1
from generated.immich.openapi_client.models.sync_user_v1 import SyncUserV1
from generated.immich.openapi_client.models.system_config_backups_dto import SystemConfigBackupsDto
from generated.immich.openapi_client.models.system_config_dto import SystemConfigDto
from generated.immich.openapi_client.models.system_config_f_fmpeg_dto import SystemConfigFFmpegDto
from generated.immich.openapi_client.models.system_config_faces_dto import SystemConfigFacesDto
from generated.immich.openapi_client.models.system_config_generated_fullsize_image_dto import SystemConfigGeneratedFullsizeImageDto
from generated.immich.openapi_client.models.system_config_generated_image_dto import SystemConfigGeneratedImageDto
from generated.immich.openapi_client.models.system_config_image_dto import SystemConfigImageDto
from generated.immich.openapi_client.models.system_config_job_dto import SystemConfigJobDto
from generated.immich.openapi_client.models.system_config_library_dto import SystemConfigLibraryDto
from generated.immich.openapi_client.models.system_config_library_scan_dto import SystemConfigLibraryScanDto
from generated.immich.openapi_client.models.system_config_library_watch_dto import SystemConfigLibraryWatchDto
from generated.immich.openapi_client.models.system_config_logging_dto import SystemConfigLoggingDto
from generated.immich.openapi_client.models.system_config_machine_learning_dto import SystemConfigMachineLearningDto
from generated.immich.openapi_client.models.system_config_map_dto import SystemConfigMapDto
from generated.immich.openapi_client.models.system_config_metadata_dto import SystemConfigMetadataDto
from generated.immich.openapi_client.models.system_config_new_version_check_dto import SystemConfigNewVersionCheckDto
from generated.immich.openapi_client.models.system_config_notifications_dto import SystemConfigNotificationsDto
from generated.immich.openapi_client.models.system_config_o_auth_dto import SystemConfigOAuthDto
from generated.immich.openapi_client.models.system_config_password_login_dto import SystemConfigPasswordLoginDto
from generated.immich.openapi_client.models.system_config_reverse_geocoding_dto import SystemConfigReverseGeocodingDto
from generated.immich.openapi_client.models.system_config_server_dto import SystemConfigServerDto
from generated.immich.openapi_client.models.system_config_smtp_dto import SystemConfigSmtpDto
from generated.immich.openapi_client.models.system_config_smtp_transport_dto import SystemConfigSmtpTransportDto
from generated.immich.openapi_client.models.system_config_storage_template_dto import SystemConfigStorageTemplateDto
from generated.immich.openapi_client.models.system_config_template_emails_dto import SystemConfigTemplateEmailsDto
from generated.immich.openapi_client.models.system_config_template_storage_option_dto import SystemConfigTemplateStorageOptionDto
from generated.immich.openapi_client.models.system_config_templates_dto import SystemConfigTemplatesDto
from generated.immich.openapi_client.models.system_config_theme_dto import SystemConfigThemeDto
from generated.immich.openapi_client.models.system_config_trash_dto import SystemConfigTrashDto
from generated.immich.openapi_client.models.system_config_user_dto import SystemConfigUserDto
from generated.immich.openapi_client.models.tag_bulk_assets_dto import TagBulkAssetsDto
from generated.immich.openapi_client.models.tag_bulk_assets_response_dto import TagBulkAssetsResponseDto
from generated.immich.openapi_client.models.tag_create_dto import TagCreateDto
from generated.immich.openapi_client.models.tag_response_dto import TagResponseDto
from generated.immich.openapi_client.models.tag_update_dto import TagUpdateDto
from generated.immich.openapi_client.models.tag_upsert_dto import TagUpsertDto
from generated.immich.openapi_client.models.tags_response import TagsResponse
from generated.immich.openapi_client.models.tags_update import TagsUpdate
from generated.immich.openapi_client.models.template_dto import TemplateDto
from generated.immich.openapi_client.models.template_response_dto import TemplateResponseDto
from generated.immich.openapi_client.models.test_email_response_dto import TestEmailResponseDto
from generated.immich.openapi_client.models.time_bucket_response_dto import TimeBucketResponseDto
from generated.immich.openapi_client.models.time_bucket_size import TimeBucketSize
from generated.immich.openapi_client.models.tone_mapping import ToneMapping
from generated.immich.openapi_client.models.transcode_hw_accel import TranscodeHWAccel
from generated.immich.openapi_client.models.transcode_policy import TranscodePolicy
from generated.immich.openapi_client.models.trash_response_dto import TrashResponseDto
from generated.immich.openapi_client.models.update_album_dto import UpdateAlbumDto
from generated.immich.openapi_client.models.update_album_user_dto import UpdateAlbumUserDto
from generated.immich.openapi_client.models.update_asset_dto import UpdateAssetDto
from generated.immich.openapi_client.models.update_library_dto import UpdateLibraryDto
from generated.immich.openapi_client.models.update_partner_dto import UpdatePartnerDto
from generated.immich.openapi_client.models.usage_by_user_dto import UsageByUserDto
from generated.immich.openapi_client.models.user_admin_create_dto import UserAdminCreateDto
from generated.immich.openapi_client.models.user_admin_delete_dto import UserAdminDeleteDto
from generated.immich.openapi_client.models.user_admin_response_dto import UserAdminResponseDto
from generated.immich.openapi_client.models.user_admin_update_dto import UserAdminUpdateDto
from generated.immich.openapi_client.models.user_avatar_color import UserAvatarColor
from generated.immich.openapi_client.models.user_license import UserLicense
from generated.immich.openapi_client.models.user_preferences_response_dto import UserPreferencesResponseDto
from generated.immich.openapi_client.models.user_preferences_update_dto import UserPreferencesUpdateDto
from generated.immich.openapi_client.models.user_response_dto import UserResponseDto
from generated.immich.openapi_client.models.user_status import UserStatus
from generated.immich.openapi_client.models.user_update_me_dto import UserUpdateMeDto
from generated.immich.openapi_client.models.validate_access_token_response_dto import ValidateAccessTokenResponseDto
from generated.immich.openapi_client.models.validate_library_dto import ValidateLibraryDto
from generated.immich.openapi_client.models.validate_library_import_path_response_dto import ValidateLibraryImportPathResponseDto
from generated.immich.openapi_client.models.validate_library_response_dto import ValidateLibraryResponseDto
from generated.immich.openapi_client.models.video_codec import VideoCodec
from generated.immich.openapi_client.models.video_container import VideoContainer

View File

@@ -0,0 +1,36 @@
# flake8: noqa
# import apis into api package
from generated.immich.openapi_client.api.api_keys_api import APIKeysApi
from generated.immich.openapi_client.api.activities_api import ActivitiesApi
from generated.immich.openapi_client.api.albums_api import AlbumsApi
from generated.immich.openapi_client.api.assets_api import AssetsApi
from generated.immich.openapi_client.api.authentication_api import AuthenticationApi
from generated.immich.openapi_client.api.deprecated_api import DeprecatedApi
from generated.immich.openapi_client.api.download_api import DownloadApi
from generated.immich.openapi_client.api.duplicates_api import DuplicatesApi
from generated.immich.openapi_client.api.faces_api import FacesApi
from generated.immich.openapi_client.api.file_reports_api import FileReportsApi
from generated.immich.openapi_client.api.jobs_api import JobsApi
from generated.immich.openapi_client.api.libraries_api import LibrariesApi
from generated.immich.openapi_client.api.map_api import MapApi
from generated.immich.openapi_client.api.memories_api import MemoriesApi
from generated.immich.openapi_client.api.notifications_api import NotificationsApi
from generated.immich.openapi_client.api.o_auth_api import OAuthApi
from generated.immich.openapi_client.api.partners_api import PartnersApi
from generated.immich.openapi_client.api.people_api import PeopleApi
from generated.immich.openapi_client.api.search_api import SearchApi
from generated.immich.openapi_client.api.server_api import ServerApi
from generated.immich.openapi_client.api.sessions_api import SessionsApi
from generated.immich.openapi_client.api.shared_links_api import SharedLinksApi
from generated.immich.openapi_client.api.stacks_api import StacksApi
from generated.immich.openapi_client.api.sync_api import SyncApi
from generated.immich.openapi_client.api.system_config_api import SystemConfigApi
from generated.immich.openapi_client.api.system_metadata_api import SystemMetadataApi
from generated.immich.openapi_client.api.tags_api import TagsApi
from generated.immich.openapi_client.api.timeline_api import TimelineApi
from generated.immich.openapi_client.api.trash_api import TrashApi
from generated.immich.openapi_client.api.users_api import UsersApi
from generated.immich.openapi_client.api.users_admin_api import UsersAdminApi
from generated.immich.openapi_client.api.view_api import ViewApi

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,307 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import Field
from typing import List, Optional, Union
from typing_extensions import Annotated
from generated.immich.openapi_client.models.asset_response_dto import AssetResponseDto
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class DeprecatedApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def get_random(
self,
count: Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[AssetResponseDto]:
"""(Deprecated) get_random
This property was deprecated in v1.116.0
:param count:
:type count: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /assets/random is deprecated.", DeprecationWarning)
_param = self._get_random_serialize(
count=count,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[AssetResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_random_with_http_info(
self,
count: Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[AssetResponseDto]]:
"""(Deprecated) get_random
This property was deprecated in v1.116.0
:param count:
:type count: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /assets/random is deprecated.", DeprecationWarning)
_param = self._get_random_serialize(
count=count,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[AssetResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_random_without_preload_content(
self,
count: Optional[Union[Annotated[float, Field(strict=True, ge=1)], Annotated[int, Field(strict=True, ge=1)]]] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""(Deprecated) get_random
This property was deprecated in v1.116.0
:param count:
:type count: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /assets/random is deprecated.", DeprecationWarning)
_param = self._get_random_serialize(
count=count,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[AssetResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_random_serialize(
self,
count,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if count is not None:
_query_params.append(('count', count))
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/assets/random',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

View File

@@ -0,0 +1,620 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import StrictBytes, StrictStr
from typing import Optional, Tuple, Union
from generated.immich.openapi_client.models.asset_ids_dto import AssetIdsDto
from generated.immich.openapi_client.models.download_info_dto import DownloadInfoDto
from generated.immich.openapi_client.models.download_response_dto import DownloadResponseDto
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class DownloadApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def download_archive(
self,
asset_ids_dto: AssetIdsDto,
key: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> bytearray:
"""download_archive
:param asset_ids_dto: (required)
:type asset_ids_dto: AssetIdsDto
:param key:
:type key: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._download_archive_serialize(
asset_ids_dto=asset_ids_dto,
key=key,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "bytearray",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def download_archive_with_http_info(
self,
asset_ids_dto: AssetIdsDto,
key: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[bytearray]:
"""download_archive
:param asset_ids_dto: (required)
:type asset_ids_dto: AssetIdsDto
:param key:
:type key: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._download_archive_serialize(
asset_ids_dto=asset_ids_dto,
key=key,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "bytearray",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def download_archive_without_preload_content(
self,
asset_ids_dto: AssetIdsDto,
key: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""download_archive
:param asset_ids_dto: (required)
:type asset_ids_dto: AssetIdsDto
:param key:
:type key: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._download_archive_serialize(
asset_ids_dto=asset_ids_dto,
key=key,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "bytearray",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _download_archive_serialize(
self,
asset_ids_dto,
key,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if key is not None:
_query_params.append(('key', key))
# process the header parameters
# process the form parameters
# process the body parameter
if asset_ids_dto is not None:
_body_params = asset_ids_dto
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/octet-stream'
]
)
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/download/archive',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def get_download_info(
self,
download_info_dto: DownloadInfoDto,
key: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> DownloadResponseDto:
"""get_download_info
:param download_info_dto: (required)
:type download_info_dto: DownloadInfoDto
:param key:
:type key: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_download_info_serialize(
download_info_dto=download_info_dto,
key=key,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': "DownloadResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_download_info_with_http_info(
self,
download_info_dto: DownloadInfoDto,
key: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[DownloadResponseDto]:
"""get_download_info
:param download_info_dto: (required)
:type download_info_dto: DownloadInfoDto
:param key:
:type key: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_download_info_serialize(
download_info_dto=download_info_dto,
key=key,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': "DownloadResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_download_info_without_preload_content(
self,
download_info_dto: DownloadInfoDto,
key: Optional[StrictStr] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_download_info
:param download_info_dto: (required)
:type download_info_dto: DownloadInfoDto
:param key:
:type key: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_download_info_serialize(
download_info_dto=download_info_dto,
key=key,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': "DownloadResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_download_info_serialize(
self,
download_info_dto,
key,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if key is not None:
_query_params.append(('key', key))
# process the header parameters
# process the form parameters
# process the body parameter
if download_info_dto is not None:
_body_params = download_info_dto
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/download/info',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

View File

@@ -0,0 +1,282 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from typing import List
from generated.immich.openapi_client.models.duplicate_response_dto import DuplicateResponseDto
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class DuplicatesApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def get_asset_duplicates(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[DuplicateResponseDto]:
"""get_asset_duplicates
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_asset_duplicates_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[DuplicateResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_asset_duplicates_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[DuplicateResponseDto]]:
"""get_asset_duplicates
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_asset_duplicates_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[DuplicateResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_asset_duplicates_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_asset_duplicates
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_asset_duplicates_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[DuplicateResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_asset_duplicates_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/duplicates',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,824 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from typing import List
from generated.immich.openapi_client.models.file_checksum_dto import FileChecksumDto
from generated.immich.openapi_client.models.file_checksum_response_dto import FileChecksumResponseDto
from generated.immich.openapi_client.models.file_report_dto import FileReportDto
from generated.immich.openapi_client.models.file_report_fix_dto import FileReportFixDto
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class FileReportsApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def fix_audit_files(
self,
file_report_fix_dto: FileReportFixDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> None:
"""fix_audit_files
:param file_report_fix_dto: (required)
:type file_report_fix_dto: FileReportFixDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._fix_audit_files_serialize(
file_report_fix_dto=file_report_fix_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def fix_audit_files_with_http_info(
self,
file_report_fix_dto: FileReportFixDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[None]:
"""fix_audit_files
:param file_report_fix_dto: (required)
:type file_report_fix_dto: FileReportFixDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._fix_audit_files_serialize(
file_report_fix_dto=file_report_fix_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def fix_audit_files_without_preload_content(
self,
file_report_fix_dto: FileReportFixDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""fix_audit_files
:param file_report_fix_dto: (required)
:type file_report_fix_dto: FileReportFixDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._fix_audit_files_serialize(
file_report_fix_dto=file_report_fix_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _fix_audit_files_serialize(
self,
file_report_fix_dto,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
if file_report_fix_dto is not None:
_body_params = file_report_fix_dto
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/reports/fix',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def get_audit_files(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> FileReportDto:
"""get_audit_files
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_audit_files_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "FileReportDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_audit_files_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[FileReportDto]:
"""get_audit_files
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_audit_files_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "FileReportDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_audit_files_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_audit_files
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_audit_files_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "FileReportDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_audit_files_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/reports',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def get_file_checksums(
self,
file_checksum_dto: FileChecksumDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[FileChecksumResponseDto]:
"""get_file_checksums
:param file_checksum_dto: (required)
:type file_checksum_dto: FileChecksumDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_file_checksums_serialize(
file_checksum_dto=file_checksum_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': "List[FileChecksumResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_file_checksums_with_http_info(
self,
file_checksum_dto: FileChecksumDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[FileChecksumResponseDto]]:
"""get_file_checksums
:param file_checksum_dto: (required)
:type file_checksum_dto: FileChecksumDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_file_checksums_serialize(
file_checksum_dto=file_checksum_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': "List[FileChecksumResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_file_checksums_without_preload_content(
self,
file_checksum_dto: FileChecksumDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_file_checksums
:param file_checksum_dto: (required)
:type file_checksum_dto: FileChecksumDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_file_checksums_serialize(
file_checksum_dto=file_checksum_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': "List[FileChecksumResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_file_checksums_serialize(
self,
file_checksum_dto,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
if file_checksum_dto is not None:
_body_params = file_checksum_dto
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/reports/checksum',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

View File

@@ -0,0 +1,839 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from generated.immich.openapi_client.models.all_job_status_response_dto import AllJobStatusResponseDto
from generated.immich.openapi_client.models.job_command_dto import JobCommandDto
from generated.immich.openapi_client.models.job_create_dto import JobCreateDto
from generated.immich.openapi_client.models.job_name import JobName
from generated.immich.openapi_client.models.job_status_dto import JobStatusDto
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class JobsApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def create_job(
self,
job_create_dto: JobCreateDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> None:
"""create_job
:param job_create_dto: (required)
:type job_create_dto: JobCreateDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._create_job_serialize(
job_create_dto=job_create_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def create_job_with_http_info(
self,
job_create_dto: JobCreateDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[None]:
"""create_job
:param job_create_dto: (required)
:type job_create_dto: JobCreateDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._create_job_serialize(
job_create_dto=job_create_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def create_job_without_preload_content(
self,
job_create_dto: JobCreateDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""create_job
:param job_create_dto: (required)
:type job_create_dto: JobCreateDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._create_job_serialize(
job_create_dto=job_create_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'201': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _create_job_serialize(
self,
job_create_dto,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
if job_create_dto is not None:
_body_params = job_create_dto
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/jobs',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def get_all_jobs_status(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> AllJobStatusResponseDto:
"""get_all_jobs_status
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_all_jobs_status_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AllJobStatusResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_all_jobs_status_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[AllJobStatusResponseDto]:
"""get_all_jobs_status
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_all_jobs_status_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AllJobStatusResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_all_jobs_status_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_all_jobs_status
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_all_jobs_status_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AllJobStatusResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_all_jobs_status_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/jobs',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def send_job_command(
self,
id: JobName,
job_command_dto: JobCommandDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> JobStatusDto:
"""send_job_command
:param id: (required)
:type id: JobName
:param job_command_dto: (required)
:type job_command_dto: JobCommandDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._send_job_command_serialize(
id=id,
job_command_dto=job_command_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "JobStatusDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def send_job_command_with_http_info(
self,
id: JobName,
job_command_dto: JobCommandDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[JobStatusDto]:
"""send_job_command
:param id: (required)
:type id: JobName
:param job_command_dto: (required)
:type job_command_dto: JobCommandDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._send_job_command_serialize(
id=id,
job_command_dto=job_command_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "JobStatusDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def send_job_command_without_preload_content(
self,
id: JobName,
job_command_dto: JobCommandDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""send_job_command
:param id: (required)
:type id: JobName
:param job_command_dto: (required)
:type job_command_dto: JobCommandDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._send_job_command_serialize(
id=id,
job_command_dto=job_command_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "JobStatusDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _send_job_command_serialize(
self,
id,
job_command_dto,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
if id is not None:
_path_params['id'] = id.value
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
if job_command_dto is not None:
_body_params = job_command_dto
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='PUT',
resource_path='/jobs/{id}',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,684 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from datetime import datetime
from pydantic import StrictBool, StrictFloat, StrictInt
from typing import List, Optional, Union
from generated.immich.openapi_client.models.map_marker_response_dto import MapMarkerResponseDto
from generated.immich.openapi_client.models.map_reverse_geocode_response_dto import MapReverseGeocodeResponseDto
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class MapApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def get_map_markers(
self,
file_created_after: Optional[datetime] = None,
file_created_before: Optional[datetime] = None,
is_archived: Optional[StrictBool] = None,
is_favorite: Optional[StrictBool] = None,
with_partners: Optional[StrictBool] = None,
with_shared_albums: Optional[StrictBool] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[MapMarkerResponseDto]:
"""get_map_markers
:param file_created_after:
:type file_created_after: datetime
:param file_created_before:
:type file_created_before: datetime
:param is_archived:
:type is_archived: bool
:param is_favorite:
:type is_favorite: bool
:param with_partners:
:type with_partners: bool
:param with_shared_albums:
:type with_shared_albums: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_map_markers_serialize(
file_created_after=file_created_after,
file_created_before=file_created_before,
is_archived=is_archived,
is_favorite=is_favorite,
with_partners=with_partners,
with_shared_albums=with_shared_albums,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[MapMarkerResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_map_markers_with_http_info(
self,
file_created_after: Optional[datetime] = None,
file_created_before: Optional[datetime] = None,
is_archived: Optional[StrictBool] = None,
is_favorite: Optional[StrictBool] = None,
with_partners: Optional[StrictBool] = None,
with_shared_albums: Optional[StrictBool] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[MapMarkerResponseDto]]:
"""get_map_markers
:param file_created_after:
:type file_created_after: datetime
:param file_created_before:
:type file_created_before: datetime
:param is_archived:
:type is_archived: bool
:param is_favorite:
:type is_favorite: bool
:param with_partners:
:type with_partners: bool
:param with_shared_albums:
:type with_shared_albums: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_map_markers_serialize(
file_created_after=file_created_after,
file_created_before=file_created_before,
is_archived=is_archived,
is_favorite=is_favorite,
with_partners=with_partners,
with_shared_albums=with_shared_albums,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[MapMarkerResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_map_markers_without_preload_content(
self,
file_created_after: Optional[datetime] = None,
file_created_before: Optional[datetime] = None,
is_archived: Optional[StrictBool] = None,
is_favorite: Optional[StrictBool] = None,
with_partners: Optional[StrictBool] = None,
with_shared_albums: Optional[StrictBool] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_map_markers
:param file_created_after:
:type file_created_after: datetime
:param file_created_before:
:type file_created_before: datetime
:param is_archived:
:type is_archived: bool
:param is_favorite:
:type is_favorite: bool
:param with_partners:
:type with_partners: bool
:param with_shared_albums:
:type with_shared_albums: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_map_markers_serialize(
file_created_after=file_created_after,
file_created_before=file_created_before,
is_archived=is_archived,
is_favorite=is_favorite,
with_partners=with_partners,
with_shared_albums=with_shared_albums,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[MapMarkerResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_map_markers_serialize(
self,
file_created_after,
file_created_before,
is_archived,
is_favorite,
with_partners,
with_shared_albums,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if file_created_after is not None:
if isinstance(file_created_after, datetime):
_query_params.append(
(
'fileCreatedAfter',
file_created_after.strftime(
self.api_client.configuration.datetime_format
)
)
)
else:
_query_params.append(('fileCreatedAfter', file_created_after))
if file_created_before is not None:
if isinstance(file_created_before, datetime):
_query_params.append(
(
'fileCreatedBefore',
file_created_before.strftime(
self.api_client.configuration.datetime_format
)
)
)
else:
_query_params.append(('fileCreatedBefore', file_created_before))
if is_archived is not None:
_query_params.append(('isArchived', is_archived))
if is_favorite is not None:
_query_params.append(('isFavorite', is_favorite))
if with_partners is not None:
_query_params.append(('withPartners', with_partners))
if with_shared_albums is not None:
_query_params.append(('withSharedAlbums', with_shared_albums))
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/map/markers',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def reverse_geocode(
self,
lat: Union[StrictFloat, StrictInt],
lon: Union[StrictFloat, StrictInt],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[MapReverseGeocodeResponseDto]:
"""reverse_geocode
:param lat: (required)
:type lat: float
:param lon: (required)
:type lon: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._reverse_geocode_serialize(
lat=lat,
lon=lon,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[MapReverseGeocodeResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def reverse_geocode_with_http_info(
self,
lat: Union[StrictFloat, StrictInt],
lon: Union[StrictFloat, StrictInt],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[MapReverseGeocodeResponseDto]]:
"""reverse_geocode
:param lat: (required)
:type lat: float
:param lon: (required)
:type lon: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._reverse_geocode_serialize(
lat=lat,
lon=lon,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[MapReverseGeocodeResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def reverse_geocode_without_preload_content(
self,
lat: Union[StrictFloat, StrictInt],
lon: Union[StrictFloat, StrictInt],
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""reverse_geocode
:param lat: (required)
:type lat: float
:param lon: (required)
:type lon: float
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._reverse_geocode_serialize(
lat=lat,
lon=lon,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[MapReverseGeocodeResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _reverse_geocode_serialize(
self,
lat,
lon,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if lat is not None:
_query_params.append(('lat', lat))
if lon is not None:
_query_params.append(('lon', lon))
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/map/reverse-geocode',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,601 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import StrictStr
from generated.immich.openapi_client.models.system_config_smtp_dto import SystemConfigSmtpDto
from generated.immich.openapi_client.models.template_dto import TemplateDto
from generated.immich.openapi_client.models.template_response_dto import TemplateResponseDto
from generated.immich.openapi_client.models.test_email_response_dto import TestEmailResponseDto
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class NotificationsApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def get_notification_template(
self,
name: StrictStr,
template_dto: TemplateDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> TemplateResponseDto:
"""get_notification_template
:param name: (required)
:type name: str
:param template_dto: (required)
:type template_dto: TemplateDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_notification_template_serialize(
name=name,
template_dto=template_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TemplateResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_notification_template_with_http_info(
self,
name: StrictStr,
template_dto: TemplateDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[TemplateResponseDto]:
"""get_notification_template
:param name: (required)
:type name: str
:param template_dto: (required)
:type template_dto: TemplateDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_notification_template_serialize(
name=name,
template_dto=template_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TemplateResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_notification_template_without_preload_content(
self,
name: StrictStr,
template_dto: TemplateDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_notification_template
:param name: (required)
:type name: str
:param template_dto: (required)
:type template_dto: TemplateDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_notification_template_serialize(
name=name,
template_dto=template_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TemplateResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_notification_template_serialize(
self,
name,
template_dto,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
if name is not None:
_path_params['name'] = name
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
if template_dto is not None:
_body_params = template_dto
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/notifications/templates/{name}',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def send_test_email(
self,
system_config_smtp_dto: SystemConfigSmtpDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> TestEmailResponseDto:
"""send_test_email
:param system_config_smtp_dto: (required)
:type system_config_smtp_dto: SystemConfigSmtpDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._send_test_email_serialize(
system_config_smtp_dto=system_config_smtp_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TestEmailResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def send_test_email_with_http_info(
self,
system_config_smtp_dto: SystemConfigSmtpDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[TestEmailResponseDto]:
"""send_test_email
:param system_config_smtp_dto: (required)
:type system_config_smtp_dto: SystemConfigSmtpDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._send_test_email_serialize(
system_config_smtp_dto=system_config_smtp_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TestEmailResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def send_test_email_without_preload_content(
self,
system_config_smtp_dto: SystemConfigSmtpDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""send_test_email
:param system_config_smtp_dto: (required)
:type system_config_smtp_dto: SystemConfigSmtpDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._send_test_email_serialize(
system_config_smtp_dto=system_config_smtp_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TestEmailResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _send_test_email_serialize(
self,
system_config_smtp_dto,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
if system_config_smtp_dto is not None:
_body_params = system_config_smtp_dto
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/notifications/test-email',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,774 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import StrictStr
from typing import List
from generated.immich.openapi_client.models.session_response_dto import SessionResponseDto
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class SessionsApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def delete_all_sessions(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> None:
"""delete_all_sessions
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_all_sessions_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def delete_all_sessions_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[None]:
"""delete_all_sessions
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_all_sessions_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def delete_all_sessions_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""delete_all_sessions
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_all_sessions_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _delete_all_sessions_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='DELETE',
resource_path='/sessions',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def delete_session(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> None:
"""delete_session
:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_session_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def delete_session_with_http_info(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[None]:
"""delete_session
:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_session_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def delete_session_without_preload_content(
self,
id: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""delete_session
:param id: (required)
:type id: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._delete_session_serialize(
id=id,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _delete_session_serialize(
self,
id,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
if id is not None:
_path_params['id'] = id
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='DELETE',
resource_path='/sessions/{id}',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def get_sessions(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[SessionResponseDto]:
"""get_sessions
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_sessions_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[SessionResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_sessions_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[SessionResponseDto]]:
"""get_sessions
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_sessions_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[SessionResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_sessions_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_sessions
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_sessions_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[SessionResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_sessions_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/sessions',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,793 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from generated.immich.openapi_client.models.admin_onboarding_update_dto import AdminOnboardingUpdateDto
from generated.immich.openapi_client.models.reverse_geocoding_state_response_dto import ReverseGeocodingStateResponseDto
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class SystemMetadataApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def get_admin_onboarding(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> AdminOnboardingUpdateDto:
"""get_admin_onboarding
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_admin_onboarding_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AdminOnboardingUpdateDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_admin_onboarding_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[AdminOnboardingUpdateDto]:
"""get_admin_onboarding
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_admin_onboarding_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AdminOnboardingUpdateDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_admin_onboarding_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_admin_onboarding
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_admin_onboarding_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "AdminOnboardingUpdateDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_admin_onboarding_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/system-metadata/admin-onboarding',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def get_reverse_geocoding_state(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ReverseGeocodingStateResponseDto:
"""get_reverse_geocoding_state
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_reverse_geocoding_state_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ReverseGeocodingStateResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_reverse_geocoding_state_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[ReverseGeocodingStateResponseDto]:
"""get_reverse_geocoding_state
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_reverse_geocoding_state_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ReverseGeocodingStateResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_reverse_geocoding_state_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_reverse_geocoding_state
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_reverse_geocoding_state_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "ReverseGeocodingStateResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_reverse_geocoding_state_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/system-metadata/reverse-geocoding-state',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def update_admin_onboarding(
self,
admin_onboarding_update_dto: AdminOnboardingUpdateDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> None:
"""update_admin_onboarding
:param admin_onboarding_update_dto: (required)
:type admin_onboarding_update_dto: AdminOnboardingUpdateDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._update_admin_onboarding_serialize(
admin_onboarding_update_dto=admin_onboarding_update_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def update_admin_onboarding_with_http_info(
self,
admin_onboarding_update_dto: AdminOnboardingUpdateDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[None]:
"""update_admin_onboarding
:param admin_onboarding_update_dto: (required)
:type admin_onboarding_update_dto: AdminOnboardingUpdateDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._update_admin_onboarding_serialize(
admin_onboarding_update_dto=admin_onboarding_update_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def update_admin_onboarding_without_preload_content(
self,
admin_onboarding_update_dto: AdminOnboardingUpdateDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""update_admin_onboarding
:param admin_onboarding_update_dto: (required)
:type admin_onboarding_update_dto: AdminOnboardingUpdateDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._update_admin_onboarding_serialize(
admin_onboarding_update_dto=admin_onboarding_update_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'204': None,
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _update_admin_onboarding_serialize(
self,
admin_onboarding_update_dto,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
if admin_onboarding_update_dto is not None:
_body_params = admin_onboarding_update_dto
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/system-metadata/admin-onboarding',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,956 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import StrictBool, StrictStr
from typing import List, Optional
from generated.immich.openapi_client.models.asset_order import AssetOrder
from generated.immich.openapi_client.models.asset_response_dto import AssetResponseDto
from generated.immich.openapi_client.models.time_bucket_response_dto import TimeBucketResponseDto
from generated.immich.openapi_client.models.time_bucket_size import TimeBucketSize
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class TimelineApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def get_time_bucket(
self,
size: TimeBucketSize,
time_bucket: StrictStr,
album_id: Optional[StrictStr] = None,
is_archived: Optional[StrictBool] = None,
is_favorite: Optional[StrictBool] = None,
is_trashed: Optional[StrictBool] = None,
key: Optional[StrictStr] = None,
order: Optional[AssetOrder] = None,
person_id: Optional[StrictStr] = None,
tag_id: Optional[StrictStr] = None,
user_id: Optional[StrictStr] = None,
with_partners: Optional[StrictBool] = None,
with_stacked: Optional[StrictBool] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[AssetResponseDto]:
"""get_time_bucket
:param size: (required)
:type size: TimeBucketSize
:param time_bucket: (required)
:type time_bucket: str
:param album_id:
:type album_id: str
:param is_archived:
:type is_archived: bool
:param is_favorite:
:type is_favorite: bool
:param is_trashed:
:type is_trashed: bool
:param key:
:type key: str
:param order:
:type order: AssetOrder
:param person_id:
:type person_id: str
:param tag_id:
:type tag_id: str
:param user_id:
:type user_id: str
:param with_partners:
:type with_partners: bool
:param with_stacked:
:type with_stacked: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_time_bucket_serialize(
size=size,
time_bucket=time_bucket,
album_id=album_id,
is_archived=is_archived,
is_favorite=is_favorite,
is_trashed=is_trashed,
key=key,
order=order,
person_id=person_id,
tag_id=tag_id,
user_id=user_id,
with_partners=with_partners,
with_stacked=with_stacked,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[AssetResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_time_bucket_with_http_info(
self,
size: TimeBucketSize,
time_bucket: StrictStr,
album_id: Optional[StrictStr] = None,
is_archived: Optional[StrictBool] = None,
is_favorite: Optional[StrictBool] = None,
is_trashed: Optional[StrictBool] = None,
key: Optional[StrictStr] = None,
order: Optional[AssetOrder] = None,
person_id: Optional[StrictStr] = None,
tag_id: Optional[StrictStr] = None,
user_id: Optional[StrictStr] = None,
with_partners: Optional[StrictBool] = None,
with_stacked: Optional[StrictBool] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[AssetResponseDto]]:
"""get_time_bucket
:param size: (required)
:type size: TimeBucketSize
:param time_bucket: (required)
:type time_bucket: str
:param album_id:
:type album_id: str
:param is_archived:
:type is_archived: bool
:param is_favorite:
:type is_favorite: bool
:param is_trashed:
:type is_trashed: bool
:param key:
:type key: str
:param order:
:type order: AssetOrder
:param person_id:
:type person_id: str
:param tag_id:
:type tag_id: str
:param user_id:
:type user_id: str
:param with_partners:
:type with_partners: bool
:param with_stacked:
:type with_stacked: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_time_bucket_serialize(
size=size,
time_bucket=time_bucket,
album_id=album_id,
is_archived=is_archived,
is_favorite=is_favorite,
is_trashed=is_trashed,
key=key,
order=order,
person_id=person_id,
tag_id=tag_id,
user_id=user_id,
with_partners=with_partners,
with_stacked=with_stacked,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[AssetResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_time_bucket_without_preload_content(
self,
size: TimeBucketSize,
time_bucket: StrictStr,
album_id: Optional[StrictStr] = None,
is_archived: Optional[StrictBool] = None,
is_favorite: Optional[StrictBool] = None,
is_trashed: Optional[StrictBool] = None,
key: Optional[StrictStr] = None,
order: Optional[AssetOrder] = None,
person_id: Optional[StrictStr] = None,
tag_id: Optional[StrictStr] = None,
user_id: Optional[StrictStr] = None,
with_partners: Optional[StrictBool] = None,
with_stacked: Optional[StrictBool] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_time_bucket
:param size: (required)
:type size: TimeBucketSize
:param time_bucket: (required)
:type time_bucket: str
:param album_id:
:type album_id: str
:param is_archived:
:type is_archived: bool
:param is_favorite:
:type is_favorite: bool
:param is_trashed:
:type is_trashed: bool
:param key:
:type key: str
:param order:
:type order: AssetOrder
:param person_id:
:type person_id: str
:param tag_id:
:type tag_id: str
:param user_id:
:type user_id: str
:param with_partners:
:type with_partners: bool
:param with_stacked:
:type with_stacked: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_time_bucket_serialize(
size=size,
time_bucket=time_bucket,
album_id=album_id,
is_archived=is_archived,
is_favorite=is_favorite,
is_trashed=is_trashed,
key=key,
order=order,
person_id=person_id,
tag_id=tag_id,
user_id=user_id,
with_partners=with_partners,
with_stacked=with_stacked,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[AssetResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_time_bucket_serialize(
self,
size,
time_bucket,
album_id,
is_archived,
is_favorite,
is_trashed,
key,
order,
person_id,
tag_id,
user_id,
with_partners,
with_stacked,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if album_id is not None:
_query_params.append(('albumId', album_id))
if is_archived is not None:
_query_params.append(('isArchived', is_archived))
if is_favorite is not None:
_query_params.append(('isFavorite', is_favorite))
if is_trashed is not None:
_query_params.append(('isTrashed', is_trashed))
if key is not None:
_query_params.append(('key', key))
if order is not None:
_query_params.append(('order', order.value))
if person_id is not None:
_query_params.append(('personId', person_id))
if size is not None:
_query_params.append(('size', size.value))
if tag_id is not None:
_query_params.append(('tagId', tag_id))
if time_bucket is not None:
_query_params.append(('timeBucket', time_bucket))
if user_id is not None:
_query_params.append(('userId', user_id))
if with_partners is not None:
_query_params.append(('withPartners', with_partners))
if with_stacked is not None:
_query_params.append(('withStacked', with_stacked))
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/timeline/bucket',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def get_time_buckets(
self,
size: TimeBucketSize,
album_id: Optional[StrictStr] = None,
is_archived: Optional[StrictBool] = None,
is_favorite: Optional[StrictBool] = None,
is_trashed: Optional[StrictBool] = None,
key: Optional[StrictStr] = None,
order: Optional[AssetOrder] = None,
person_id: Optional[StrictStr] = None,
tag_id: Optional[StrictStr] = None,
user_id: Optional[StrictStr] = None,
with_partners: Optional[StrictBool] = None,
with_stacked: Optional[StrictBool] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[TimeBucketResponseDto]:
"""get_time_buckets
:param size: (required)
:type size: TimeBucketSize
:param album_id:
:type album_id: str
:param is_archived:
:type is_archived: bool
:param is_favorite:
:type is_favorite: bool
:param is_trashed:
:type is_trashed: bool
:param key:
:type key: str
:param order:
:type order: AssetOrder
:param person_id:
:type person_id: str
:param tag_id:
:type tag_id: str
:param user_id:
:type user_id: str
:param with_partners:
:type with_partners: bool
:param with_stacked:
:type with_stacked: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_time_buckets_serialize(
size=size,
album_id=album_id,
is_archived=is_archived,
is_favorite=is_favorite,
is_trashed=is_trashed,
key=key,
order=order,
person_id=person_id,
tag_id=tag_id,
user_id=user_id,
with_partners=with_partners,
with_stacked=with_stacked,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[TimeBucketResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_time_buckets_with_http_info(
self,
size: TimeBucketSize,
album_id: Optional[StrictStr] = None,
is_archived: Optional[StrictBool] = None,
is_favorite: Optional[StrictBool] = None,
is_trashed: Optional[StrictBool] = None,
key: Optional[StrictStr] = None,
order: Optional[AssetOrder] = None,
person_id: Optional[StrictStr] = None,
tag_id: Optional[StrictStr] = None,
user_id: Optional[StrictStr] = None,
with_partners: Optional[StrictBool] = None,
with_stacked: Optional[StrictBool] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[TimeBucketResponseDto]]:
"""get_time_buckets
:param size: (required)
:type size: TimeBucketSize
:param album_id:
:type album_id: str
:param is_archived:
:type is_archived: bool
:param is_favorite:
:type is_favorite: bool
:param is_trashed:
:type is_trashed: bool
:param key:
:type key: str
:param order:
:type order: AssetOrder
:param person_id:
:type person_id: str
:param tag_id:
:type tag_id: str
:param user_id:
:type user_id: str
:param with_partners:
:type with_partners: bool
:param with_stacked:
:type with_stacked: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_time_buckets_serialize(
size=size,
album_id=album_id,
is_archived=is_archived,
is_favorite=is_favorite,
is_trashed=is_trashed,
key=key,
order=order,
person_id=person_id,
tag_id=tag_id,
user_id=user_id,
with_partners=with_partners,
with_stacked=with_stacked,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[TimeBucketResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_time_buckets_without_preload_content(
self,
size: TimeBucketSize,
album_id: Optional[StrictStr] = None,
is_archived: Optional[StrictBool] = None,
is_favorite: Optional[StrictBool] = None,
is_trashed: Optional[StrictBool] = None,
key: Optional[StrictStr] = None,
order: Optional[AssetOrder] = None,
person_id: Optional[StrictStr] = None,
tag_id: Optional[StrictStr] = None,
user_id: Optional[StrictStr] = None,
with_partners: Optional[StrictBool] = None,
with_stacked: Optional[StrictBool] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_time_buckets
:param size: (required)
:type size: TimeBucketSize
:param album_id:
:type album_id: str
:param is_archived:
:type is_archived: bool
:param is_favorite:
:type is_favorite: bool
:param is_trashed:
:type is_trashed: bool
:param key:
:type key: str
:param order:
:type order: AssetOrder
:param person_id:
:type person_id: str
:param tag_id:
:type tag_id: str
:param user_id:
:type user_id: str
:param with_partners:
:type with_partners: bool
:param with_stacked:
:type with_stacked: bool
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_time_buckets_serialize(
size=size,
album_id=album_id,
is_archived=is_archived,
is_favorite=is_favorite,
is_trashed=is_trashed,
key=key,
order=order,
person_id=person_id,
tag_id=tag_id,
user_id=user_id,
with_partners=with_partners,
with_stacked=with_stacked,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[TimeBucketResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_time_buckets_serialize(
self,
size,
album_id,
is_archived,
is_favorite,
is_trashed,
key,
order,
person_id,
tag_id,
user_id,
with_partners,
with_stacked,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if album_id is not None:
_query_params.append(('albumId', album_id))
if is_archived is not None:
_query_params.append(('isArchived', is_archived))
if is_favorite is not None:
_query_params.append(('isFavorite', is_favorite))
if is_trashed is not None:
_query_params.append(('isTrashed', is_trashed))
if key is not None:
_query_params.append(('key', key))
if order is not None:
_query_params.append(('order', order.value))
if person_id is not None:
_query_params.append(('personId', person_id))
if size is not None:
_query_params.append(('size', size.value))
if tag_id is not None:
_query_params.append(('tagId', tag_id))
if user_id is not None:
_query_params.append(('userId', user_id))
if with_partners is not None:
_query_params.append(('withPartners', with_partners))
if with_stacked is not None:
_query_params.append(('withStacked', with_stacked))
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/timeline/buckets',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

View File

@@ -0,0 +1,800 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from generated.immich.openapi_client.models.bulk_ids_dto import BulkIdsDto
from generated.immich.openapi_client.models.trash_response_dto import TrashResponseDto
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class TrashApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def empty_trash(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> TrashResponseDto:
"""empty_trash
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._empty_trash_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TrashResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def empty_trash_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[TrashResponseDto]:
"""empty_trash
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._empty_trash_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TrashResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def empty_trash_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""empty_trash
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._empty_trash_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TrashResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _empty_trash_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/trash/empty',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def restore_assets(
self,
bulk_ids_dto: BulkIdsDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> TrashResponseDto:
"""restore_assets
:param bulk_ids_dto: (required)
:type bulk_ids_dto: BulkIdsDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._restore_assets_serialize(
bulk_ids_dto=bulk_ids_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TrashResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def restore_assets_with_http_info(
self,
bulk_ids_dto: BulkIdsDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[TrashResponseDto]:
"""restore_assets
:param bulk_ids_dto: (required)
:type bulk_ids_dto: BulkIdsDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._restore_assets_serialize(
bulk_ids_dto=bulk_ids_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TrashResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def restore_assets_without_preload_content(
self,
bulk_ids_dto: BulkIdsDto,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""restore_assets
:param bulk_ids_dto: (required)
:type bulk_ids_dto: BulkIdsDto
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._restore_assets_serialize(
bulk_ids_dto=bulk_ids_dto,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TrashResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _restore_assets_serialize(
self,
bulk_ids_dto,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
if bulk_ids_dto is not None:
_body_params = bulk_ids_dto
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# set the HTTP header `Content-Type`
if _content_type:
_header_params['Content-Type'] = _content_type
else:
_default_content_type = (
self.api_client.select_header_content_type(
[
'application/json'
]
)
)
if _default_content_type is not None:
_header_params['Content-Type'] = _default_content_type
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/trash/restore/assets',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def restore_trash(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> TrashResponseDto:
"""restore_trash
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._restore_trash_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TrashResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def restore_trash_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[TrashResponseDto]:
"""restore_trash
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._restore_trash_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TrashResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def restore_trash_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""restore_trash
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._restore_trash_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "TrashResponseDto",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _restore_trash_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='POST',
resource_path='/trash/restore',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,545 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated
from pydantic import StrictStr
from typing import List
from generated.immich.openapi_client.models.asset_response_dto import AssetResponseDto
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
from generated.immich.openapi_client.api_response import ApiResponse
from generated.immich.openapi_client.rest import RESTResponseType
class ViewApi:
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None) -> None:
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@validate_call
def get_assets_by_original_path(
self,
path: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[AssetResponseDto]:
"""get_assets_by_original_path
:param path: (required)
:type path: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_assets_by_original_path_serialize(
path=path,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[AssetResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_assets_by_original_path_with_http_info(
self,
path: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[AssetResponseDto]]:
"""get_assets_by_original_path
:param path: (required)
:type path: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_assets_by_original_path_serialize(
path=path,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[AssetResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_assets_by_original_path_without_preload_content(
self,
path: StrictStr,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_assets_by_original_path
:param path: (required)
:type path: str
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_assets_by_original_path_serialize(
path=path,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[AssetResponseDto]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_assets_by_original_path_serialize(
self,
path,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
if path is not None:
_query_params.append(('path', path))
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/view/folder',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)
@validate_call
def get_unique_original_paths(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[str]:
"""get_unique_original_paths
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_unique_original_paths_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[str]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
).data
@validate_call
def get_unique_original_paths_with_http_info(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[str]]:
"""get_unique_original_paths
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_unique_original_paths_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[str]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
response_data.read()
return self.api_client.response_deserialize(
response_data=response_data,
response_types_map=_response_types_map,
)
@validate_call
def get_unique_original_paths_without_preload_content(
self,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Tuple[
Annotated[StrictFloat, Field(gt=0)],
Annotated[StrictFloat, Field(gt=0)]
]
] = None,
_request_auth: Optional[Dict[StrictStr, Any]] = None,
_content_type: Optional[StrictStr] = None,
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""get_unique_original_paths
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:type _request_timeout: int, tuple(int, int), optional
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the
authentication in the spec for a single request.
:type _request_auth: dict, optional
:param _content_type: force content-type for the request.
:type _content_type: str, Optional
:param _headers: set to override the headers for a single
request; this effectively ignores the headers
in the spec for a single request.
:type _headers: dict, optional
:param _host_index: set to override the host_index for a single
request; this effectively ignores the host_index
in the spec for a single request.
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
_param = self._get_unique_original_paths_serialize(
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
_host_index=_host_index
)
_response_types_map: Dict[str, Optional[str]] = {
'200': "List[str]",
}
response_data = self.api_client.call_api(
*_param,
_request_timeout=_request_timeout
)
return response_data.response
def _get_unique_original_paths_serialize(
self,
_request_auth,
_content_type,
_headers,
_host_index,
) -> RequestSerialized:
_host = None
_collection_formats: Dict[str, str] = {
}
_path_params: Dict[str, str] = {}
_query_params: List[Tuple[str, str]] = []
_header_params: Dict[str, Optional[str]] = _headers or {}
_form_params: List[Tuple[str, str]] = []
_files: Dict[
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
] = {}
_body_params: Optional[bytes] = None
# process the path parameters
# process the query parameters
# process the header parameters
# process the form parameters
# process the body parameter
# set the HTTP header `Accept`
if 'Accept' not in _header_params:
_header_params['Accept'] = self.api_client.select_header_accept(
[
'application/json'
]
)
# authentication setting
_auth_settings: List[str] = [
'cookie',
'api_key',
'bearer'
]
return self.api_client.param_serialize(
method='GET',
resource_path='/view/folder/unique-paths',
path_params=_path_params,
query_params=_query_params,
header_params=_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
auth_settings=_auth_settings,
collection_formats=_collection_formats,
_host=_host,
_request_auth=_request_auth
)

View File

@@ -0,0 +1,797 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import datetime
from dateutil.parser import parse
from enum import Enum
import decimal
import json
import mimetypes
import os
import re
import tempfile
from urllib.parse import quote
from typing import Tuple, Optional, List, Dict, Union
from pydantic import SecretStr
from generated.immich.openapi_client.configuration import Configuration
from generated.immich.openapi_client.api_response import ApiResponse, T as ApiResponseT
import generated.immich.openapi_client.models
from generated.immich.openapi_client import rest
from generated.immich.openapi_client.exceptions import (
ApiValueError,
ApiException,
BadRequestException,
UnauthorizedException,
ForbiddenException,
NotFoundException,
ServiceException
)
RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]]
class ApiClient:
"""Generic API client for OpenAPI client library builds.
OpenAPI generic API client. This client handles the client-
server communication, and is invariant across implementations. Specifics of
the methods and models for each application are generated from the OpenAPI
templates.
:param configuration: .Configuration object for this client
:param header_name: a header to pass when making calls to the API.
:param header_value: a header value to pass when making calls to
the API.
:param cookie: a cookie to include in the header when making calls
to the API
"""
PRIMITIVE_TYPES = (float, bool, bytes, str, int)
NATIVE_TYPES_MAPPING = {
'int': int,
'long': int, # TODO remove as only py3 is supported?
'float': float,
'str': str,
'bool': bool,
'date': datetime.date,
'datetime': datetime.datetime,
'decimal': decimal.Decimal,
'object': object,
}
_pool = None
def __init__(
self,
configuration=None,
header_name=None,
header_value=None,
cookie=None
) -> None:
# use default configuration if none is provided
if configuration is None:
configuration = Configuration.get_default()
self.configuration = configuration
self.rest_client = rest.RESTClientObject(configuration)
self.default_headers = {}
if header_name is not None:
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/1.0.0/python'
self.client_side_validation = configuration.client_side_validation
def __enter__(self):
return self
def __exit__(self, exc_type, exc_value, traceback):
pass
@property
def user_agent(self):
"""User agent for this API client"""
return self.default_headers['User-Agent']
@user_agent.setter
def user_agent(self, value):
self.default_headers['User-Agent'] = value
def set_default_header(self, header_name, header_value):
self.default_headers[header_name] = header_value
_default = None
@classmethod
def get_default(cls):
"""Return new instance of ApiClient.
This method returns newly created, based on default constructor,
object of ApiClient class or returns a copy of default
ApiClient.
:return: The ApiClient object.
"""
if cls._default is None:
cls._default = ApiClient()
return cls._default
@classmethod
def set_default(cls, default):
"""Set default instance of ApiClient.
It stores default ApiClient.
:param default: object of ApiClient.
"""
cls._default = default
def param_serialize(
self,
method,
resource_path,
path_params=None,
query_params=None,
header_params=None,
body=None,
post_params=None,
files=None, auth_settings=None,
collection_formats=None,
_host=None,
_request_auth=None
) -> RequestSerialized:
"""Builds the HTTP request params needed by the request.
:param method: Method to call.
:param resource_path: Path to method endpoint.
:param path_params: Path parameters in the url.
:param query_params: Query parameters in the url.
:param header_params: Header parameters to be
placed in the request header.
:param body: Request body.
:param post_params dict: Request post form parameters,
for `application/x-www-form-urlencoded`, `multipart/form-data`.
:param auth_settings list: Auth Settings names for the request.
:param files dict: key -> filename, value -> filepath,
for `multipart/form-data`.
:param collection_formats: dict of collection formats for path, query,
header, and post parameters.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:return: tuple of form (path, http_method, query_params, header_params,
body, post_params, files)
"""
config = self.configuration
# header parameters
header_params = header_params or {}
header_params.update(self.default_headers)
if self.cookie:
header_params['Cookie'] = self.cookie
if header_params:
header_params = self.sanitize_for_serialization(header_params)
header_params = dict(
self.parameters_to_tuples(header_params,collection_formats)
)
# path parameters
if path_params:
path_params = self.sanitize_for_serialization(path_params)
path_params = self.parameters_to_tuples(
path_params,
collection_formats
)
for k, v in path_params:
# specified safe chars, encode everything
resource_path = resource_path.replace(
'{%s}' % k,
quote(str(v), safe=config.safe_chars_for_path_param)
)
# post parameters
if post_params or files:
post_params = post_params if post_params else []
post_params = self.sanitize_for_serialization(post_params)
post_params = self.parameters_to_tuples(
post_params,
collection_formats
)
if files:
post_params.extend(self.files_parameters(files))
# auth setting
self.update_params_for_auth(
header_params,
query_params,
auth_settings,
resource_path,
method,
body,
request_auth=_request_auth
)
# body
if body:
body = self.sanitize_for_serialization(body)
# request url
if _host is None or self.configuration.ignore_operation_servers:
url = self.configuration.host + resource_path
else:
# use server/host defined in path or operation instead
url = _host + resource_path
# query parameters
if query_params:
query_params = self.sanitize_for_serialization(query_params)
url_query = self.parameters_to_url_query(
query_params,
collection_formats
)
url += "?" + url_query
return method, url, header_params, body, post_params
def call_api(
self,
method,
url,
header_params=None,
body=None,
post_params=None,
_request_timeout=None
) -> rest.RESTResponse:
"""Makes the HTTP request (synchronous)
:param method: Method to call.
:param url: Path to method endpoint.
:param header_params: Header parameters to be
placed in the request header.
:param body: Request body.
:param post_params dict: Request post form parameters,
for `application/x-www-form-urlencoded`, `multipart/form-data`.
:param _request_timeout: timeout setting for this request.
:return: RESTResponse
"""
try:
# perform request and return response
response_data = self.rest_client.request(
method, url,
headers=header_params,
body=body, post_params=post_params,
_request_timeout=_request_timeout
)
except ApiException as e:
raise e
return response_data
def response_deserialize(
self,
response_data: rest.RESTResponse,
response_types_map: Optional[Dict[str, ApiResponseT]]=None
) -> ApiResponse[ApiResponseT]:
"""Deserializes response into an object.
:param response_data: RESTResponse object to be deserialized.
:param response_types_map: dict of response types.
:return: ApiResponse
"""
msg = "RESTResponse.read() must be called before passing it to response_deserialize()"
assert response_data.data is not None, msg
response_type = response_types_map.get(str(response_data.status), None)
if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599:
# if not found, look for '1XX', '2XX', etc.
response_type = response_types_map.get(str(response_data.status)[0] + "XX", None)
# deserialize response data
response_text = None
return_data = None
try:
if response_type == "bytearray":
return_data = response_data.data
elif response_type == "file":
return_data = self.__deserialize_file(response_data)
elif response_type is not None:
match = None
content_type = response_data.getheader('content-type')
if content_type is not None:
match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
encoding = match.group(1) if match else "utf-8"
response_text = response_data.data.decode(encoding)
return_data = self.deserialize(response_text, response_type, content_type)
finally:
if not 200 <= response_data.status <= 299:
raise ApiException.from_response(
http_resp=response_data,
body=response_text,
data=return_data,
)
return ApiResponse(
status_code = response_data.status,
data = return_data,
headers = response_data.getheaders(),
raw_data = response_data.data
)
def sanitize_for_serialization(self, obj):
"""Builds a JSON POST object.
If obj is None, return None.
If obj is SecretStr, return obj.get_secret_value()
If obj is str, int, long, float, bool, return directly.
If obj is datetime.datetime, datetime.date
convert to string in iso8601 format.
If obj is decimal.Decimal return string representation.
If obj is list, sanitize each element in the list.
If obj is dict, return the dict.
If obj is OpenAPI model, return the properties dict.
:param obj: The data to serialize.
:return: The serialized form of data.
"""
if obj is None:
return None
elif isinstance(obj, Enum):
return obj.value
elif isinstance(obj, SecretStr):
return obj.get_secret_value()
elif isinstance(obj, self.PRIMITIVE_TYPES):
return obj
elif isinstance(obj, list):
return [
self.sanitize_for_serialization(sub_obj) for sub_obj in obj
]
elif isinstance(obj, tuple):
return tuple(
self.sanitize_for_serialization(sub_obj) for sub_obj in obj
)
elif isinstance(obj, (datetime.datetime, datetime.date)):
return obj.isoformat()
elif isinstance(obj, decimal.Decimal):
return str(obj)
elif isinstance(obj, dict):
obj_dict = obj
else:
# Convert model obj to dict except
# attributes `openapi_types`, `attribute_map`
# and attributes which value is not None.
# Convert attribute name to json key in
# model definition for request.
if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')):
obj_dict = obj.to_dict()
else:
obj_dict = obj.__dict__
return {
key: self.sanitize_for_serialization(val)
for key, val in obj_dict.items()
}
def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
"""Deserializes response into an object.
:param response: RESTResponse object to be deserialized.
:param response_type: class literal for
deserialized object, or string of class name.
:param content_type: content type of response.
:return: deserialized object.
"""
# fetch data from response object
if content_type is None:
try:
data = json.loads(response_text)
except ValueError:
data = response_text
elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
if response_text == "":
data = ""
else:
data = json.loads(response_text)
elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE):
data = response_text
else:
raise ApiException(
status=0,
reason="Unsupported content type: {0}".format(content_type)
)
return self.__deserialize(data, response_type)
def __deserialize(self, data, klass):
"""Deserializes dict, list, str into an object.
:param data: dict, list or str.
:param klass: class literal, or string of class name.
:return: object.
"""
if data is None:
return None
if isinstance(klass, str):
if klass.startswith('List['):
m = re.match(r'List\[(.*)]', klass)
assert m is not None, "Malformed List type definition"
sub_kls = m.group(1)
return [self.__deserialize(sub_data, sub_kls)
for sub_data in data]
if klass.startswith('Dict['):
m = re.match(r'Dict\[([^,]*), (.*)]', klass)
assert m is not None, "Malformed Dict type definition"
sub_kls = m.group(2)
return {k: self.__deserialize(v, sub_kls)
for k, v in data.items()}
# convert str to class
if klass in self.NATIVE_TYPES_MAPPING:
klass = self.NATIVE_TYPES_MAPPING[klass]
else:
klass = getattr(generated.immich.openapi_client.models, klass)
if klass in self.PRIMITIVE_TYPES:
return self.__deserialize_primitive(data, klass)
elif klass == object:
return self.__deserialize_object(data)
elif klass == datetime.date:
return self.__deserialize_date(data)
elif klass == datetime.datetime:
return self.__deserialize_datetime(data)
elif klass == decimal.Decimal:
return decimal.Decimal(data)
elif issubclass(klass, Enum):
return self.__deserialize_enum(data, klass)
else:
return self.__deserialize_model(data, klass)
def parameters_to_tuples(self, params, collection_formats):
"""Get parameters as list of tuples, formatting collections.
:param params: Parameters as dict or list of two-tuples
:param dict collection_formats: Parameter collection formats
:return: Parameters as list of tuples, collections formatted
"""
new_params: List[Tuple[str, str]] = []
if collection_formats is None:
collection_formats = {}
for k, v in params.items() if isinstance(params, dict) else params:
if k in collection_formats:
collection_format = collection_formats[k]
if collection_format == 'multi':
new_params.extend((k, value) for value in v)
else:
if collection_format == 'ssv':
delimiter = ' '
elif collection_format == 'tsv':
delimiter = '\t'
elif collection_format == 'pipes':
delimiter = '|'
else: # csv is the default
delimiter = ','
new_params.append(
(k, delimiter.join(str(value) for value in v)))
else:
new_params.append((k, v))
return new_params
def parameters_to_url_query(self, params, collection_formats):
"""Get parameters as list of tuples, formatting collections.
:param params: Parameters as dict or list of two-tuples
:param dict collection_formats: Parameter collection formats
:return: URL query string (e.g. a=Hello%20World&b=123)
"""
new_params: List[Tuple[str, str]] = []
if collection_formats is None:
collection_formats = {}
for k, v in params.items() if isinstance(params, dict) else params:
if isinstance(v, bool):
v = str(v).lower()
if isinstance(v, (int, float)):
v = str(v)
if isinstance(v, dict):
v = json.dumps(v)
if k in collection_formats:
collection_format = collection_formats[k]
if collection_format == 'multi':
new_params.extend((k, quote(str(value))) for value in v)
else:
if collection_format == 'ssv':
delimiter = ' '
elif collection_format == 'tsv':
delimiter = '\t'
elif collection_format == 'pipes':
delimiter = '|'
else: # csv is the default
delimiter = ','
new_params.append(
(k, delimiter.join(quote(str(value)) for value in v))
)
else:
new_params.append((k, quote(str(v))))
return "&".join(["=".join(map(str, item)) for item in new_params])
def files_parameters(
self,
files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]],
):
"""Builds form parameters.
:param files: File parameters.
:return: Form parameters with files.
"""
params = []
for k, v in files.items():
if isinstance(v, str):
with open(v, 'rb') as f:
filename = os.path.basename(f.name)
filedata = f.read()
elif isinstance(v, bytes):
filename = k
filedata = v
elif isinstance(v, tuple):
filename, filedata = v
elif isinstance(v, list):
for file_param in v:
params.extend(self.files_parameters({k: file_param}))
continue
else:
raise ValueError("Unsupported file value")
mimetype = (
mimetypes.guess_type(filename)[0]
or 'application/octet-stream'
)
params.append(
tuple([k, tuple([filename, filedata, mimetype])])
)
return params
def select_header_accept(self, accepts: List[str]) -> Optional[str]:
"""Returns `Accept` based on an array of accepts provided.
:param accepts: List of headers.
:return: Accept (e.g. application/json).
"""
if not accepts:
return None
for accept in accepts:
if re.search('json', accept, re.IGNORECASE):
return accept
return accepts[0]
def select_header_content_type(self, content_types):
"""Returns `Content-Type` based on an array of content_types provided.
:param content_types: List of content-types.
:return: Content-Type (e.g. application/json).
"""
if not content_types:
return None
for content_type in content_types:
if re.search('json', content_type, re.IGNORECASE):
return content_type
return content_types[0]
def update_params_for_auth(
self,
headers,
queries,
auth_settings,
resource_path,
method,
body,
request_auth=None
) -> None:
"""Updates header and query params based on authentication setting.
:param headers: Header parameters dict to be updated.
:param queries: Query parameters tuple list to be updated.
:param auth_settings: Authentication setting identifiers list.
:resource_path: A string representation of the HTTP request resource path.
:method: A string representation of the HTTP request method.
:body: A object representing the body of the HTTP request.
The object type is the return value of sanitize_for_serialization().
:param request_auth: if set, the provided settings will
override the token in the configuration.
"""
if not auth_settings:
return
if request_auth:
self._apply_auth_params(
headers,
queries,
resource_path,
method,
body,
request_auth
)
else:
for auth in auth_settings:
auth_setting = self.configuration.auth_settings().get(auth)
if auth_setting:
self._apply_auth_params(
headers,
queries,
resource_path,
method,
body,
auth_setting
)
def _apply_auth_params(
self,
headers,
queries,
resource_path,
method,
body,
auth_setting
) -> None:
"""Updates the request parameters based on a single auth_setting
:param headers: Header parameters dict to be updated.
:param queries: Query parameters tuple list to be updated.
:resource_path: A string representation of the HTTP request resource path.
:method: A string representation of the HTTP request method.
:body: A object representing the body of the HTTP request.
The object type is the return value of sanitize_for_serialization().
:param auth_setting: auth settings for the endpoint
"""
if auth_setting['in'] == 'cookie':
headers['Cookie'] = auth_setting['value']
elif auth_setting['in'] == 'header':
if auth_setting['type'] != 'http-signature':
headers[auth_setting['key']] = auth_setting['value']
elif auth_setting['in'] == 'query':
queries.append((auth_setting['key'], auth_setting['value']))
else:
raise ApiValueError(
'Authentication token must be in `query` or `header`'
)
def __deserialize_file(self, response):
"""Deserializes body to file
Saves response body into a file in a temporary folder,
using the filename from the `Content-Disposition` header if provided.
handle file downloading
save response body into a tmp file and return the instance
:param response: RESTResponse.
:return: file path.
"""
fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
os.close(fd)
os.remove(path)
content_disposition = response.getheader("Content-Disposition")
if content_disposition:
m = re.search(
r'filename=[\'"]?([^\'"\s]+)[\'"]?',
content_disposition
)
assert m is not None, "Unexpected 'content-disposition' header value"
filename = m.group(1)
path = os.path.join(os.path.dirname(path), filename)
with open(path, "wb") as f:
f.write(response.data)
return path
def __deserialize_primitive(self, data, klass):
"""Deserializes string to primitive type.
:param data: str.
:param klass: class literal.
:return: int, long, float, str, bool.
"""
try:
return klass(data)
except UnicodeEncodeError:
return str(data)
except TypeError:
return data
def __deserialize_object(self, value):
"""Return an original value.
:return: object.
"""
return value
def __deserialize_date(self, string):
"""Deserializes string to date.
:param string: str.
:return: date.
"""
try:
return parse(string).date()
except ImportError:
return string
except ValueError:
raise rest.ApiException(
status=0,
reason="Failed to parse `{0}` as date object".format(string)
)
def __deserialize_datetime(self, string):
"""Deserializes string to datetime.
The string should be in iso8601 datetime format.
:param string: str.
:return: datetime.
"""
try:
return parse(string)
except ImportError:
return string
except ValueError:
raise rest.ApiException(
status=0,
reason=(
"Failed to parse `{0}` as datetime object"
.format(string)
)
)
def __deserialize_enum(self, data, klass):
"""Deserializes primitive type to enum.
:param data: primitive type.
:param klass: class literal.
:return: enum value.
"""
try:
return klass(data)
except ValueError:
raise rest.ApiException(
status=0,
reason=(
"Failed to parse `{0}` as `{1}`"
.format(data, klass)
)
)
def __deserialize_model(self, data, klass):
"""Deserializes list or dict to model.
:param data: dict, list.
:param klass: class literal.
:return: model object.
"""
return klass.from_dict(data)

View File

@@ -0,0 +1,21 @@
"""API response object."""
from __future__ import annotations
from typing import Optional, Generic, Mapping, TypeVar
from pydantic import Field, StrictInt, StrictBytes, BaseModel
T = TypeVar("T")
class ApiResponse(BaseModel, Generic[T]):
"""
API response object
"""
status_code: StrictInt = Field(description="HTTP status code")
headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers")
data: T = Field(description="Deserialized data given the data type")
raw_data: StrictBytes = Field(description="Raw data (HTTP response body)")
model_config = {
"arbitrary_types_allowed": True
}

View File

@@ -0,0 +1,621 @@
# coding: utf-8
"""
Immich
Immich API
The version of the OpenAPI document: 1.131.3
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import copy
import http.client as httplib
import logging
from logging import FileHandler
import multiprocessing
import sys
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union
from typing_extensions import NotRequired, Self
import urllib3
JSON_SCHEMA_VALIDATION_KEYWORDS = {
'multipleOf', 'maximum', 'exclusiveMaximum',
'minimum', 'exclusiveMinimum', 'maxLength',
'minLength', 'pattern', 'maxItems', 'minItems'
}
ServerVariablesT = Dict[str, str]
GenericAuthSetting = TypedDict(
"GenericAuthSetting",
{
"type": str,
"in": str,
"key": str,
"value": str,
},
)
OAuth2AuthSetting = TypedDict(
"OAuth2AuthSetting",
{
"type": Literal["oauth2"],
"in": Literal["header"],
"key": Literal["Authorization"],
"value": str,
},
)
APIKeyAuthSetting = TypedDict(
"APIKeyAuthSetting",
{
"type": Literal["api_key"],
"in": str,
"key": str,
"value": Optional[str],
},
)
BasicAuthSetting = TypedDict(
"BasicAuthSetting",
{
"type": Literal["basic"],
"in": Literal["header"],
"key": Literal["Authorization"],
"value": Optional[str],
},
)
BearerFormatAuthSetting = TypedDict(
"BearerFormatAuthSetting",
{
"type": Literal["bearer"],
"in": Literal["header"],
"format": Literal["JWT"],
"key": Literal["Authorization"],
"value": str,
},
)
BearerAuthSetting = TypedDict(
"BearerAuthSetting",
{
"type": Literal["bearer"],
"in": Literal["header"],
"key": Literal["Authorization"],
"value": str,
},
)
HTTPSignatureAuthSetting = TypedDict(
"HTTPSignatureAuthSetting",
{
"type": Literal["http-signature"],
"in": Literal["header"],
"key": Literal["Authorization"],
"value": None,
},
)
AuthSettings = TypedDict(
"AuthSettings",
{
"bearer": BearerFormatAuthSetting,
"cookie": APIKeyAuthSetting,
"api_key": APIKeyAuthSetting,
},
total=False,
)
class HostSettingVariable(TypedDict):
description: str
default_value: str
enum_values: List[str]
class HostSetting(TypedDict):
url: str
description: str
variables: NotRequired[Dict[str, HostSettingVariable]]
class Configuration:
"""This class contains various settings of the API client.
:param host: Base url.
:param ignore_operation_servers
Boolean to ignore operation servers for the API client.
Config will use `host` as the base url regardless of the operation servers.
:param api_key: Dict to store API key(s).
Each entry in the dict specifies an API key.
The dict key is the name of the security scheme in the OAS specification.
The dict value is the API key secret.
:param api_key_prefix: Dict to store API prefix (e.g. Bearer).
The dict key is the name of the security scheme in the OAS specification.
The dict value is an API key prefix when generating the auth data.
:param username: Username for HTTP basic authentication.
:param password: Password for HTTP basic authentication.
:param access_token: Access token.
:param server_index: Index to servers configuration.
:param server_variables: Mapping with string values to replace variables in
templated server configuration. The validation of enums is performed for
variables with defined enum values before.
:param server_operation_index: Mapping from operation ID to an index to server
configuration.
:param server_operation_variables: Mapping from operation ID to a mapping with
string values to replace variables in templated server configuration.
The validation of enums is performed for variables with defined enum
values before.
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
in PEM format.
:param retries: Number of retries for API requests.
:param ca_cert_data: verify the peer using concatenated CA certificate data
in PEM (str) or DER (bytes) format.
:Example:
API Key Authentication Example.
Given the following security scheme in the OpenAPI specification:
components:
securitySchemes:
cookieAuth: # name for the security scheme
type: apiKey
in: cookie
name: JSESSIONID # cookie name
You can programmatically set the cookie:
conf = generated.immich.openapi_client.Configuration(
api_key={'cookieAuth': 'abc123'}
api_key_prefix={'cookieAuth': 'JSESSIONID'}
)
The following cookie will be added to the HTTP request:
Cookie: JSESSIONID abc123
"""
_default: ClassVar[Optional[Self]] = None
def __init__(
self,
host: Optional[str]=None,
api_key: Optional[Dict[str, str]]=None,
api_key_prefix: Optional[Dict[str, str]]=None,
username: Optional[str]=None,
password: Optional[str]=None,
access_token: Optional[str]=None,
server_index: Optional[int]=None,
server_variables: Optional[ServerVariablesT]=None,
server_operation_index: Optional[Dict[int, int]]=None,
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
ignore_operation_servers: bool=False,
ssl_ca_cert: Optional[str]=None,
retries: Optional[int] = None,
ca_cert_data: Optional[Union[str, bytes]] = None,
*,
debug: Optional[bool] = None,
) -> None:
"""Constructor
"""
self._base_path = "https://github.com/api" if host is None else host
"""Default Base url
"""
self.server_index = 0 if server_index is None and host is None else server_index
self.server_operation_index = server_operation_index or {}
"""Default server index
"""
self.server_variables = server_variables or {}
self.server_operation_variables = server_operation_variables or {}
"""Default server variables
"""
self.ignore_operation_servers = ignore_operation_servers
"""Ignore operation servers
"""
self.temp_folder_path = None
"""Temp file folder for downloading files
"""
# Authentication Settings
self.api_key = {}
if api_key:
self.api_key = api_key
"""dict to store API key(s)
"""
self.api_key_prefix = {}
if api_key_prefix:
self.api_key_prefix = api_key_prefix
"""dict to store API prefix (e.g. Bearer)
"""
self.refresh_api_key_hook = None
"""function hook to refresh API key if expired
"""
self.username = username
"""Username for HTTP basic authentication
"""
self.password = password
"""Password for HTTP basic authentication
"""
self.access_token = access_token
"""Access token
"""
self.logger = {}
"""Logging Settings
"""
self.logger["package_logger"] = logging.getLogger("generated.immich.openapi_client")
self.logger["urllib3_logger"] = logging.getLogger("urllib3")
self.logger_format = '%(asctime)s %(levelname)s %(message)s'
"""Log format
"""
self.logger_stream_handler = None
"""Log stream handler
"""
self.logger_file_handler: Optional[FileHandler] = None
"""Log file handler
"""
self.logger_file = None
"""Debug file location
"""
if debug is not None:
self.debug = debug
else:
self.__debug = False
"""Debug switch
"""
self.verify_ssl = True
"""SSL/TLS verification
Set this to false to skip verifying SSL certificate when calling API
from https server.
"""
self.ssl_ca_cert = ssl_ca_cert
"""Set this to customize the certificate file to verify the peer.
"""
self.ca_cert_data = ca_cert_data
"""Set this to verify the peer using PEM (str) or DER (bytes)
certificate data.
"""
self.cert_file = None
"""client certificate file
"""
self.key_file = None
"""client key file
"""
self.assert_hostname = None
"""Set this to True/False to enable/disable SSL hostname verification.
"""
self.tls_server_name = None
"""SSL/TLS Server Name Indication (SNI)
Set this to the SNI value expected by the server.
"""
self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
"""urllib3 connection pool's maximum number of connections saved
per pool. urllib3 uses 1 connection as default value, but this is
not the best value when you are making a lot of possibly parallel
requests to the same host, which is often the case here.
cpu_count * 5 is used as default value to increase performance.
"""
self.proxy: Optional[str] = None
"""Proxy URL
"""
self.proxy_headers = None
"""Proxy headers
"""
self.safe_chars_for_path_param = ''
"""Safe chars for path_param
"""
self.retries = retries
"""Adding retries to override urllib3 default value 3
"""
# Enable client side validation
self.client_side_validation = True
self.socket_options = None
"""Options to pass down to the underlying urllib3 socket
"""
self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z"
"""datetime format
"""
self.date_format = "%Y-%m-%d"
"""date format
"""
def __deepcopy__(self, memo: Dict[int, Any]) -> Self:
cls = self.__class__
result = cls.__new__(cls)
memo[id(self)] = result
for k, v in self.__dict__.items():
if k not in ('logger', 'logger_file_handler'):
setattr(result, k, copy.deepcopy(v, memo))
# shallow copy of loggers
result.logger = copy.copy(self.logger)
# use setters to configure loggers
result.logger_file = self.logger_file
result.debug = self.debug
return result
def __setattr__(self, name: str, value: Any) -> None:
object.__setattr__(self, name, value)
@classmethod
def set_default(cls, default: Optional[Self]) -> None:
"""Set default instance of configuration.
It stores default configuration, which can be
returned by get_default_copy method.
:param default: object of Configuration
"""
cls._default = default
@classmethod
def get_default_copy(cls) -> Self:
"""Deprecated. Please use `get_default` instead.
Deprecated. Please use `get_default` instead.
:return: The configuration object.
"""
return cls.get_default()
@classmethod
def get_default(cls) -> Self:
"""Return the default configuration.
This method returns newly created, based on default constructor,
object of Configuration class or returns a copy of default
configuration.
:return: The configuration object.
"""
if cls._default is None:
cls._default = cls()
return cls._default
@property
def logger_file(self) -> Optional[str]:
"""The logger file.
If the logger_file is None, then add stream handler and remove file
handler. Otherwise, add file handler and remove stream handler.
:param value: The logger_file path.
:type: str
"""
return self.__logger_file
@logger_file.setter
def logger_file(self, value: Optional[str]) -> None:
"""The logger file.
If the logger_file is None, then add stream handler and remove file
handler. Otherwise, add file handler and remove stream handler.
:param value: The logger_file path.
:type: str
"""
self.__logger_file = value
if self.__logger_file:
# If set logging file,
# then add file handler and remove stream handler.
self.logger_file_handler = logging.FileHandler(self.__logger_file)
self.logger_file_handler.setFormatter(self.logger_formatter)
for _, logger in self.logger.items():
logger.addHandler(self.logger_file_handler)
@property
def debug(self) -> bool:
"""Debug status
:param value: The debug status, True or False.
:type: bool
"""
return self.__debug
@debug.setter
def debug(self, value: bool) -> None:
"""Debug status
:param value: The debug status, True or False.
:type: bool
"""
self.__debug = value
if self.__debug:
# if debug status is True, turn on debug logging
for _, logger in self.logger.items():
logger.setLevel(logging.DEBUG)
# turn on httplib debug
httplib.HTTPConnection.debuglevel = 1
else:
# if debug status is False, turn off debug logging,
# setting log level to default `logging.WARNING`
for _, logger in self.logger.items():
logger.setLevel(logging.WARNING)
# turn off httplib debug
httplib.HTTPConnection.debuglevel = 0
@property
def logger_format(self) -> str:
"""The logger format.
The logger_formatter will be updated when sets logger_format.
:param value: The format string.
:type: str
"""
return self.__logger_format
@logger_format.setter
def logger_format(self, value: str) -> None:
"""The logger format.
The logger_formatter will be updated when sets logger_format.
:param value: The format string.
:type: str
"""
self.__logger_format = value
self.logger_formatter = logging.Formatter(self.__logger_format)
def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]:
"""Gets API key (with prefix if set).
:param identifier: The identifier of apiKey.
:param alias: The alternative identifier of apiKey.
:return: The token for api key authentication.
"""
if self.refresh_api_key_hook is not None:
self.refresh_api_key_hook(self)
key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
if key:
prefix = self.api_key_prefix.get(identifier)
if prefix:
return "%s %s" % (prefix, key)
else:
return key
return None
def get_basic_auth_token(self) -> Optional[str]:
"""Gets HTTP basic authentication header (string).
:return: The token for basic HTTP authentication.
"""
username = ""
if self.username is not None:
username = self.username
password = ""
if self.password is not None:
password = self.password
return urllib3.util.make_headers(
basic_auth=username + ':' + password
).get('authorization')
def auth_settings(self)-> AuthSettings:
"""Gets Auth Settings dict for api client.
:return: The Auth Settings information dict.
"""
auth: AuthSettings = {}
if self.access_token is not None:
auth['bearer'] = {
'type': 'bearer',
'in': 'header',
'format': 'JWT',
'key': 'Authorization',
'value': 'Bearer ' + self.access_token
}
if 'cookie' in self.api_key:
auth['cookie'] = {
'type': 'api_key',
'in': 'cookie',
'key': 'immich_access_token',
'value': self.get_api_key_with_prefix(
'cookie',
),
}
if 'api_key' in self.api_key:
auth['api_key'] = {
'type': 'api_key',
'in': 'header',
'key': 'x-api-key',
'value': self.get_api_key_with_prefix(
'api_key',
),
}
return auth
def to_debug_report(self) -> str:
"""Gets the essential information for debugging.
:return: The report for debugging.
"""
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1.131.3\n"\
"SDK Package Version: 1.0.0".\
format(env=sys.platform, pyversion=sys.version)
def get_host_settings(self) -> List[HostSetting]:
"""Gets an array of host settings
:return: An array of host settings
"""
return [
{
'url': "https://github.com/api",
'description': "No description provided",
}
]
def get_host_from_settings(
self,
index: Optional[int],
variables: Optional[ServerVariablesT]=None,
servers: Optional[List[HostSetting]]=None,
) -> str:
"""Gets host URL based on the index and variables
:param index: array index of the host settings
:param variables: hash of variable and the corresponding value
:param servers: an array of host settings or None
:return: URL based on host settings
"""
if index is None:
return self._base_path
variables = {} if variables is None else variables
servers = self.get_host_settings() if servers is None else servers
try:
server = servers[index]
except IndexError:
raise ValueError(
"Invalid index {0} when selecting the host settings. "
"Must be less than {1}".format(index, len(servers)))
url = server['url']
# go through variables and replace placeholders
for variable_name, variable in server.get('variables', {}).items():
used_value = variables.get(
variable_name, variable['default_value'])
if 'enum_values' in variable \
and used_value not in variable['enum_values']:
raise ValueError(
"The variable `{0}` in the host URL has invalid value "
"{1}. Must be {2}.".format(
variable_name, variables[variable_name],
variable['enum_values']))
url = url.replace("{" + variable_name + "}", used_value)
return url
@property
def host(self) -> str:
"""Return generated host."""
return self.get_host_from_settings(self.server_index, variables=self.server_variables)
@host.setter
def host(self, value: str) -> None:
"""Fix base path."""
self._base_path = value
self.server_index = None

View File

@@ -0,0 +1,30 @@
# APIKeyCreateDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**permissions** | [**List[Permission]**](Permission.md) | |
## Example
```python
from generated.immich.openapi_client.models.api_key_create_dto import APIKeyCreateDto
# TODO update the JSON string below
json = "{}"
# create an instance of APIKeyCreateDto from a JSON string
api_key_create_dto_instance = APIKeyCreateDto.from_json(json)
# print the JSON string representation of the object
print(APIKeyCreateDto.to_json())
# convert the object into a dict
api_key_create_dto_dict = api_key_create_dto_instance.to_dict()
# create an instance of APIKeyCreateDto from a dict
api_key_create_dto_from_dict = APIKeyCreateDto.from_dict(api_key_create_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# APIKeyCreateResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**api_key** | [**APIKeyResponseDto**](APIKeyResponseDto.md) | |
**secret** | **str** | |
## Example
```python
from generated.immich.openapi_client.models.api_key_create_response_dto import APIKeyCreateResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of APIKeyCreateResponseDto from a JSON string
api_key_create_response_dto_instance = APIKeyCreateResponseDto.from_json(json)
# print the JSON string representation of the object
print(APIKeyCreateResponseDto.to_json())
# convert the object into a dict
api_key_create_response_dto_dict = api_key_create_response_dto_instance.to_dict()
# create an instance of APIKeyCreateResponseDto from a dict
api_key_create_response_dto_from_dict = APIKeyCreateResponseDto.from_dict(api_key_create_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,33 @@
# APIKeyResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**created_at** | **datetime** | |
**id** | **str** | |
**name** | **str** | |
**permissions** | [**List[Permission]**](Permission.md) | |
**updated_at** | **datetime** | |
## Example
```python
from generated.immich.openapi_client.models.api_key_response_dto import APIKeyResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of APIKeyResponseDto from a JSON string
api_key_response_dto_instance = APIKeyResponseDto.from_json(json)
# print the JSON string representation of the object
print(APIKeyResponseDto.to_json())
# convert the object into a dict
api_key_response_dto_dict = api_key_response_dto_instance.to_dict()
# create an instance of APIKeyResponseDto from a dict
api_key_response_dto_from_dict = APIKeyResponseDto.from_dict(api_key_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# APIKeyUpdateDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | |
## Example
```python
from generated.immich.openapi_client.models.api_key_update_dto import APIKeyUpdateDto
# TODO update the JSON string below
json = "{}"
# create an instance of APIKeyUpdateDto from a JSON string
api_key_update_dto_instance = APIKeyUpdateDto.from_json(json)
# print the JSON string representation of the object
print(APIKeyUpdateDto.to_json())
# convert the object into a dict
api_key_update_dto_dict = api_key_update_dto_instance.to_dict()
# create an instance of APIKeyUpdateDto from a dict
api_key_update_dto_from_dict = APIKeyUpdateDto.from_dict(api_key_update_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,445 @@
# generated.immich.openapi_client.APIKeysApi
All URIs are relative to *https://github.com/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_api_key**](APIKeysApi.md#create_api_key) | **POST** /api-keys |
[**delete_api_key**](APIKeysApi.md#delete_api_key) | **DELETE** /api-keys/{id} |
[**get_api_key**](APIKeysApi.md#get_api_key) | **GET** /api-keys/{id} |
[**get_api_keys**](APIKeysApi.md#get_api_keys) | **GET** /api-keys |
[**update_api_key**](APIKeysApi.md#update_api_key) | **PUT** /api-keys/{id} |
# **create_api_key**
> APIKeyCreateResponseDto create_api_key(api_key_create_dto)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.api_key_create_dto import APIKeyCreateDto
from generated.immich.openapi_client.models.api_key_create_response_dto import APIKeyCreateResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.APIKeysApi(api_client)
api_key_create_dto = generated.immich.openapi_client.APIKeyCreateDto() # APIKeyCreateDto |
try:
api_response = api_instance.create_api_key(api_key_create_dto)
print("The response of APIKeysApi->create_api_key:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling APIKeysApi->create_api_key: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**api_key_create_dto** | [**APIKeyCreateDto**](APIKeyCreateDto.md)| |
### Return type
[**APIKeyCreateResponseDto**](APIKeyCreateResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **delete_api_key**
> delete_api_key(id)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.APIKeysApi(api_client)
id = 'id_example' # str |
try:
api_instance.delete_api_key(id)
except Exception as e:
print("Exception when calling APIKeysApi->delete_api_key: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
### Return type
void (empty response body)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_api_key**
> APIKeyResponseDto get_api_key(id)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.api_key_response_dto import APIKeyResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.APIKeysApi(api_client)
id = 'id_example' # str |
try:
api_response = api_instance.get_api_key(id)
print("The response of APIKeysApi->get_api_key:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling APIKeysApi->get_api_key: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
### Return type
[**APIKeyResponseDto**](APIKeyResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_api_keys**
> List[APIKeyResponseDto] get_api_keys()
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.api_key_response_dto import APIKeyResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.APIKeysApi(api_client)
try:
api_response = api_instance.get_api_keys()
print("The response of APIKeysApi->get_api_keys:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling APIKeysApi->get_api_keys: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List[APIKeyResponseDto]**](APIKeyResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_api_key**
> APIKeyResponseDto update_api_key(id, api_key_update_dto)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.api_key_response_dto import APIKeyResponseDto
from generated.immich.openapi_client.models.api_key_update_dto import APIKeyUpdateDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.APIKeysApi(api_client)
id = 'id_example' # str |
api_key_update_dto = generated.immich.openapi_client.APIKeyUpdateDto() # APIKeyUpdateDto |
try:
api_response = api_instance.update_api_key(id, api_key_update_dto)
print("The response of APIKeysApi->update_api_key:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling APIKeysApi->update_api_key: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
**api_key_update_dto** | [**APIKeyUpdateDto**](APIKeyUpdateDto.md)| |
### Return type
[**APIKeyResponseDto**](APIKeyResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,370 @@
# generated.immich.openapi_client.ActivitiesApi
All URIs are relative to *https://github.com/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_activity**](ActivitiesApi.md#create_activity) | **POST** /activities |
[**delete_activity**](ActivitiesApi.md#delete_activity) | **DELETE** /activities/{id} |
[**get_activities**](ActivitiesApi.md#get_activities) | **GET** /activities |
[**get_activity_statistics**](ActivitiesApi.md#get_activity_statistics) | **GET** /activities/statistics |
# **create_activity**
> ActivityResponseDto create_activity(activity_create_dto)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.activity_create_dto import ActivityCreateDto
from generated.immich.openapi_client.models.activity_response_dto import ActivityResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.ActivitiesApi(api_client)
activity_create_dto = generated.immich.openapi_client.ActivityCreateDto() # ActivityCreateDto |
try:
api_response = api_instance.create_activity(activity_create_dto)
print("The response of ActivitiesApi->create_activity:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ActivitiesApi->create_activity: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**activity_create_dto** | [**ActivityCreateDto**](ActivityCreateDto.md)| |
### Return type
[**ActivityResponseDto**](ActivityResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **delete_activity**
> delete_activity(id)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.ActivitiesApi(api_client)
id = 'id_example' # str |
try:
api_instance.delete_activity(id)
except Exception as e:
print("Exception when calling ActivitiesApi->delete_activity: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
### Return type
void (empty response body)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_activities**
> List[ActivityResponseDto] get_activities(album_id, asset_id=asset_id, level=level, type=type, user_id=user_id)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.activity_response_dto import ActivityResponseDto
from generated.immich.openapi_client.models.reaction_level import ReactionLevel
from generated.immich.openapi_client.models.reaction_type import ReactionType
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.ActivitiesApi(api_client)
album_id = 'album_id_example' # str |
asset_id = 'asset_id_example' # str | (optional)
level = generated.immich.openapi_client.ReactionLevel() # ReactionLevel | (optional)
type = generated.immich.openapi_client.ReactionType() # ReactionType | (optional)
user_id = 'user_id_example' # str | (optional)
try:
api_response = api_instance.get_activities(album_id, asset_id=asset_id, level=level, type=type, user_id=user_id)
print("The response of ActivitiesApi->get_activities:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ActivitiesApi->get_activities: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**album_id** | **str**| |
**asset_id** | **str**| | [optional]
**level** | [**ReactionLevel**](.md)| | [optional]
**type** | [**ReactionType**](.md)| | [optional]
**user_id** | **str**| | [optional]
### Return type
[**List[ActivityResponseDto]**](ActivityResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_activity_statistics**
> ActivityStatisticsResponseDto get_activity_statistics(album_id, asset_id=asset_id)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.activity_statistics_response_dto import ActivityStatisticsResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.ActivitiesApi(api_client)
album_id = 'album_id_example' # str |
asset_id = 'asset_id_example' # str | (optional)
try:
api_response = api_instance.get_activity_statistics(album_id, asset_id=asset_id)
print("The response of ActivitiesApi->get_activity_statistics:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ActivitiesApi->get_activity_statistics: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**album_id** | **str**| |
**asset_id** | **str**| | [optional]
### Return type
[**ActivityStatisticsResponseDto**](ActivityStatisticsResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# ActivityCreateDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**album_id** | **str** | |
**asset_id** | **str** | | [optional]
**comment** | **str** | | [optional]
**type** | [**ReactionType**](ReactionType.md) | |
## Example
```python
from generated.immich.openapi_client.models.activity_create_dto import ActivityCreateDto
# TODO update the JSON string below
json = "{}"
# create an instance of ActivityCreateDto from a JSON string
activity_create_dto_instance = ActivityCreateDto.from_json(json)
# print the JSON string representation of the object
print(ActivityCreateDto.to_json())
# convert the object into a dict
activity_create_dto_dict = activity_create_dto_instance.to_dict()
# create an instance of ActivityCreateDto from a dict
activity_create_dto_from_dict = ActivityCreateDto.from_dict(activity_create_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,34 @@
# ActivityResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_id** | **str** | |
**comment** | **str** | | [optional]
**created_at** | **datetime** | |
**id** | **str** | |
**type** | [**ReactionType**](ReactionType.md) | |
**user** | [**UserResponseDto**](UserResponseDto.md) | |
## Example
```python
from generated.immich.openapi_client.models.activity_response_dto import ActivityResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of ActivityResponseDto from a JSON string
activity_response_dto_instance = ActivityResponseDto.from_json(json)
# print the JSON string representation of the object
print(ActivityResponseDto.to_json())
# convert the object into a dict
activity_response_dto_dict = activity_response_dto_instance.to_dict()
# create an instance of ActivityResponseDto from a dict
activity_response_dto_from_dict = ActivityResponseDto.from_dict(activity_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# ActivityStatisticsResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**comments** | **int** | |
## Example
```python
from generated.immich.openapi_client.models.activity_statistics_response_dto import ActivityStatisticsResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of ActivityStatisticsResponseDto from a JSON string
activity_statistics_response_dto_instance = ActivityStatisticsResponseDto.from_json(json)
# print the JSON string representation of the object
print(ActivityStatisticsResponseDto.to_json())
# convert the object into a dict
activity_statistics_response_dto_dict = activity_statistics_response_dto_instance.to_dict()
# create an instance of ActivityStatisticsResponseDto from a dict
activity_statistics_response_dto_from_dict = ActivityStatisticsResponseDto.from_dict(activity_statistics_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# AddUsersDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**album_users** | [**List[AlbumUserAddDto]**](AlbumUserAddDto.md) | |
## Example
```python
from generated.immich.openapi_client.models.add_users_dto import AddUsersDto
# TODO update the JSON string below
json = "{}"
# create an instance of AddUsersDto from a JSON string
add_users_dto_instance = AddUsersDto.from_json(json)
# print the JSON string representation of the object
print(AddUsersDto.to_json())
# convert the object into a dict
add_users_dto_dict = add_users_dto_instance.to_dict()
# create an instance of AddUsersDto from a dict
add_users_dto_from_dict = AddUsersDto.from_dict(add_users_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# AdminOnboardingUpdateDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**is_onboarded** | **bool** | |
## Example
```python
from generated.immich.openapi_client.models.admin_onboarding_update_dto import AdminOnboardingUpdateDto
# TODO update the JSON string below
json = "{}"
# create an instance of AdminOnboardingUpdateDto from a JSON string
admin_onboarding_update_dto_instance = AdminOnboardingUpdateDto.from_json(json)
# print the JSON string representation of the object
print(AdminOnboardingUpdateDto.to_json())
# convert the object into a dict
admin_onboarding_update_dto_dict = admin_onboarding_update_dto_instance.to_dict()
# create an instance of AdminOnboardingUpdateDto from a dict
admin_onboarding_update_dto_from_dict = AdminOnboardingUpdateDto.from_dict(admin_onboarding_update_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,46 @@
# AlbumResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**album_name** | **str** | |
**album_thumbnail_asset_id** | **str** | |
**album_users** | [**List[AlbumUserResponseDto]**](AlbumUserResponseDto.md) | |
**asset_count** | **int** | |
**assets** | [**List[AssetResponseDto]**](AssetResponseDto.md) | |
**created_at** | **datetime** | |
**description** | **str** | |
**end_date** | **datetime** | | [optional]
**has_shared_link** | **bool** | |
**id** | **str** | |
**is_activity_enabled** | **bool** | |
**last_modified_asset_timestamp** | **datetime** | | [optional]
**order** | [**AssetOrder**](AssetOrder.md) | | [optional]
**owner** | [**UserResponseDto**](UserResponseDto.md) | |
**owner_id** | **str** | |
**shared** | **bool** | |
**start_date** | **datetime** | | [optional]
**updated_at** | **datetime** | |
## Example
```python
from generated.immich.openapi_client.models.album_response_dto import AlbumResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AlbumResponseDto from a JSON string
album_response_dto_instance = AlbumResponseDto.from_json(json)
# print the JSON string representation of the object
print(AlbumResponseDto.to_json())
# convert the object into a dict
album_response_dto_dict = album_response_dto_instance.to_dict()
# create an instance of AlbumResponseDto from a dict
album_response_dto_from_dict = AlbumResponseDto.from_dict(album_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,31 @@
# AlbumStatisticsResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**not_shared** | **int** | |
**owned** | **int** | |
**shared** | **int** | |
## Example
```python
from generated.immich.openapi_client.models.album_statistics_response_dto import AlbumStatisticsResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AlbumStatisticsResponseDto from a JSON string
album_statistics_response_dto_instance = AlbumStatisticsResponseDto.from_json(json)
# print the JSON string representation of the object
print(AlbumStatisticsResponseDto.to_json())
# convert the object into a dict
album_statistics_response_dto_dict = album_statistics_response_dto_instance.to_dict()
# create an instance of AlbumStatisticsResponseDto from a dict
album_statistics_response_dto_from_dict = AlbumStatisticsResponseDto.from_dict(album_statistics_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# AlbumUserAddDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**role** | [**AlbumUserRole**](AlbumUserRole.md) | | [optional]
**user_id** | **str** | |
## Example
```python
from generated.immich.openapi_client.models.album_user_add_dto import AlbumUserAddDto
# TODO update the JSON string below
json = "{}"
# create an instance of AlbumUserAddDto from a JSON string
album_user_add_dto_instance = AlbumUserAddDto.from_json(json)
# print the JSON string representation of the object
print(AlbumUserAddDto.to_json())
# convert the object into a dict
album_user_add_dto_dict = album_user_add_dto_instance.to_dict()
# create an instance of AlbumUserAddDto from a dict
album_user_add_dto_from_dict = AlbumUserAddDto.from_dict(album_user_add_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# AlbumUserCreateDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**role** | [**AlbumUserRole**](AlbumUserRole.md) | |
**user_id** | **str** | |
## Example
```python
from generated.immich.openapi_client.models.album_user_create_dto import AlbumUserCreateDto
# TODO update the JSON string below
json = "{}"
# create an instance of AlbumUserCreateDto from a JSON string
album_user_create_dto_instance = AlbumUserCreateDto.from_json(json)
# print the JSON string representation of the object
print(AlbumUserCreateDto.to_json())
# convert the object into a dict
album_user_create_dto_dict = album_user_create_dto_instance.to_dict()
# create an instance of AlbumUserCreateDto from a dict
album_user_create_dto_from_dict = AlbumUserCreateDto.from_dict(album_user_create_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# AlbumUserResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**role** | [**AlbumUserRole**](AlbumUserRole.md) | |
**user** | [**UserResponseDto**](UserResponseDto.md) | |
## Example
```python
from generated.immich.openapi_client.models.album_user_response_dto import AlbumUserResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AlbumUserResponseDto from a JSON string
album_user_response_dto_instance = AlbumUserResponseDto.from_json(json)
# print the JSON string representation of the object
print(AlbumUserResponseDto.to_json())
# convert the object into a dict
album_user_response_dto_dict = album_user_response_dto_instance.to_dict()
# create an instance of AlbumUserResponseDto from a dict
album_user_response_dto_from_dict = AlbumUserResponseDto.from_dict(album_user_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# AlbumUserRole
## Enum
* `EDITOR` (value: `'editor'`)
* `VIEWER` (value: `'viewer'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,991 @@
# generated.immich.openapi_client.AlbumsApi
All URIs are relative to *https://github.com/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**add_assets_to_album**](AlbumsApi.md#add_assets_to_album) | **PUT** /albums/{id}/assets |
[**add_users_to_album**](AlbumsApi.md#add_users_to_album) | **PUT** /albums/{id}/users |
[**create_album**](AlbumsApi.md#create_album) | **POST** /albums |
[**delete_album**](AlbumsApi.md#delete_album) | **DELETE** /albums/{id} |
[**get_album_info**](AlbumsApi.md#get_album_info) | **GET** /albums/{id} |
[**get_album_statistics**](AlbumsApi.md#get_album_statistics) | **GET** /albums/statistics |
[**get_all_albums**](AlbumsApi.md#get_all_albums) | **GET** /albums |
[**remove_asset_from_album**](AlbumsApi.md#remove_asset_from_album) | **DELETE** /albums/{id}/assets |
[**remove_user_from_album**](AlbumsApi.md#remove_user_from_album) | **DELETE** /albums/{id}/user/{userId} |
[**update_album_info**](AlbumsApi.md#update_album_info) | **PATCH** /albums/{id} |
[**update_album_user**](AlbumsApi.md#update_album_user) | **PUT** /albums/{id}/user/{userId} |
# **add_assets_to_album**
> List[BulkIdResponseDto] add_assets_to_album(id, bulk_ids_dto, key=key)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.bulk_id_response_dto import BulkIdResponseDto
from generated.immich.openapi_client.models.bulk_ids_dto import BulkIdsDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AlbumsApi(api_client)
id = 'id_example' # str |
bulk_ids_dto = generated.immich.openapi_client.BulkIdsDto() # BulkIdsDto |
key = 'key_example' # str | (optional)
try:
api_response = api_instance.add_assets_to_album(id, bulk_ids_dto, key=key)
print("The response of AlbumsApi->add_assets_to_album:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->add_assets_to_album: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
**bulk_ids_dto** | [**BulkIdsDto**](BulkIdsDto.md)| |
**key** | **str**| | [optional]
### Return type
[**List[BulkIdResponseDto]**](BulkIdResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **add_users_to_album**
> AlbumResponseDto add_users_to_album(id, add_users_dto)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.add_users_dto import AddUsersDto
from generated.immich.openapi_client.models.album_response_dto import AlbumResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AlbumsApi(api_client)
id = 'id_example' # str |
add_users_dto = generated.immich.openapi_client.AddUsersDto() # AddUsersDto |
try:
api_response = api_instance.add_users_to_album(id, add_users_dto)
print("The response of AlbumsApi->add_users_to_album:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->add_users_to_album: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
**add_users_dto** | [**AddUsersDto**](AddUsersDto.md)| |
### Return type
[**AlbumResponseDto**](AlbumResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **create_album**
> AlbumResponseDto create_album(create_album_dto)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.album_response_dto import AlbumResponseDto
from generated.immich.openapi_client.models.create_album_dto import CreateAlbumDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AlbumsApi(api_client)
create_album_dto = generated.immich.openapi_client.CreateAlbumDto() # CreateAlbumDto |
try:
api_response = api_instance.create_album(create_album_dto)
print("The response of AlbumsApi->create_album:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->create_album: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**create_album_dto** | [**CreateAlbumDto**](CreateAlbumDto.md)| |
### Return type
[**AlbumResponseDto**](AlbumResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **delete_album**
> delete_album(id)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AlbumsApi(api_client)
id = 'id_example' # str |
try:
api_instance.delete_album(id)
except Exception as e:
print("Exception when calling AlbumsApi->delete_album: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
### Return type
void (empty response body)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_album_info**
> AlbumResponseDto get_album_info(id, key=key, without_assets=without_assets)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.album_response_dto import AlbumResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AlbumsApi(api_client)
id = 'id_example' # str |
key = 'key_example' # str | (optional)
without_assets = True # bool | (optional)
try:
api_response = api_instance.get_album_info(id, key=key, without_assets=without_assets)
print("The response of AlbumsApi->get_album_info:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->get_album_info: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
**key** | **str**| | [optional]
**without_assets** | **bool**| | [optional]
### Return type
[**AlbumResponseDto**](AlbumResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_album_statistics**
> AlbumStatisticsResponseDto get_album_statistics()
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.album_statistics_response_dto import AlbumStatisticsResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AlbumsApi(api_client)
try:
api_response = api_instance.get_album_statistics()
print("The response of AlbumsApi->get_album_statistics:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->get_album_statistics: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**AlbumStatisticsResponseDto**](AlbumStatisticsResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_all_albums**
> List[AlbumResponseDto] get_all_albums(asset_id=asset_id, shared=shared)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.album_response_dto import AlbumResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AlbumsApi(api_client)
asset_id = 'asset_id_example' # str | Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums (optional)
shared = True # bool | (optional)
try:
api_response = api_instance.get_all_albums(asset_id=asset_id, shared=shared)
print("The response of AlbumsApi->get_all_albums:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->get_all_albums: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**asset_id** | **str**| Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums | [optional]
**shared** | **bool**| | [optional]
### Return type
[**List[AlbumResponseDto]**](AlbumResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **remove_asset_from_album**
> List[BulkIdResponseDto] remove_asset_from_album(id, bulk_ids_dto)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.bulk_id_response_dto import BulkIdResponseDto
from generated.immich.openapi_client.models.bulk_ids_dto import BulkIdsDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AlbumsApi(api_client)
id = 'id_example' # str |
bulk_ids_dto = generated.immich.openapi_client.BulkIdsDto() # BulkIdsDto |
try:
api_response = api_instance.remove_asset_from_album(id, bulk_ids_dto)
print("The response of AlbumsApi->remove_asset_from_album:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->remove_asset_from_album: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
**bulk_ids_dto** | [**BulkIdsDto**](BulkIdsDto.md)| |
### Return type
[**List[BulkIdResponseDto]**](BulkIdResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **remove_user_from_album**
> remove_user_from_album(id, user_id)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AlbumsApi(api_client)
id = 'id_example' # str |
user_id = 'user_id_example' # str |
try:
api_instance.remove_user_from_album(id, user_id)
except Exception as e:
print("Exception when calling AlbumsApi->remove_user_from_album: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
**user_id** | **str**| |
### Return type
void (empty response body)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_album_info**
> AlbumResponseDto update_album_info(id, update_album_dto)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.album_response_dto import AlbumResponseDto
from generated.immich.openapi_client.models.update_album_dto import UpdateAlbumDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AlbumsApi(api_client)
id = 'id_example' # str |
update_album_dto = generated.immich.openapi_client.UpdateAlbumDto() # UpdateAlbumDto |
try:
api_response = api_instance.update_album_info(id, update_album_dto)
print("The response of AlbumsApi->update_album_info:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->update_album_info: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
**update_album_dto** | [**UpdateAlbumDto**](UpdateAlbumDto.md)| |
### Return type
[**AlbumResponseDto**](AlbumResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_album_user**
> update_album_user(id, user_id, update_album_user_dto)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.update_album_user_dto import UpdateAlbumUserDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AlbumsApi(api_client)
id = 'id_example' # str |
user_id = 'user_id_example' # str |
update_album_user_dto = generated.immich.openapi_client.UpdateAlbumUserDto() # UpdateAlbumUserDto |
try:
api_instance.update_album_user(id, user_id, update_album_user_dto)
except Exception as e:
print("Exception when calling AlbumsApi->update_album_user: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **str**| |
**user_id** | **str**| |
**update_album_user_dto** | [**UpdateAlbumUserDto**](UpdateAlbumUserDto.md)| |
### Return type
void (empty response body)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,43 @@
# AllJobStatusResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**background_task** | [**JobStatusDto**](JobStatusDto.md) | |
**backup_database** | [**JobStatusDto**](JobStatusDto.md) | |
**duplicate_detection** | [**JobStatusDto**](JobStatusDto.md) | |
**face_detection** | [**JobStatusDto**](JobStatusDto.md) | |
**facial_recognition** | [**JobStatusDto**](JobStatusDto.md) | |
**library** | [**JobStatusDto**](JobStatusDto.md) | |
**metadata_extraction** | [**JobStatusDto**](JobStatusDto.md) | |
**migration** | [**JobStatusDto**](JobStatusDto.md) | |
**notifications** | [**JobStatusDto**](JobStatusDto.md) | |
**search** | [**JobStatusDto**](JobStatusDto.md) | |
**sidecar** | [**JobStatusDto**](JobStatusDto.md) | |
**smart_search** | [**JobStatusDto**](JobStatusDto.md) | |
**storage_template_migration** | [**JobStatusDto**](JobStatusDto.md) | |
**thumbnail_generation** | [**JobStatusDto**](JobStatusDto.md) | |
**video_conversion** | [**JobStatusDto**](JobStatusDto.md) | |
## Example
```python
from generated.immich.openapi_client.models.all_job_status_response_dto import AllJobStatusResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AllJobStatusResponseDto from a JSON string
all_job_status_response_dto_instance = AllJobStatusResponseDto.from_json(json)
# print the JSON string representation of the object
print(AllJobStatusResponseDto.to_json())
# convert the object into a dict
all_job_status_response_dto_dict = all_job_status_response_dto_instance.to_dict()
# create an instance of AllJobStatusResponseDto from a dict
all_job_status_response_dto_from_dict = AllJobStatusResponseDto.from_dict(all_job_status_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# AssetBulkDeleteDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**force** | **bool** | | [optional]
**ids** | **List[str]** | |
## Example
```python
from generated.immich.openapi_client.models.asset_bulk_delete_dto import AssetBulkDeleteDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetBulkDeleteDto from a JSON string
asset_bulk_delete_dto_instance = AssetBulkDeleteDto.from_json(json)
# print the JSON string representation of the object
print(AssetBulkDeleteDto.to_json())
# convert the object into a dict
asset_bulk_delete_dto_dict = asset_bulk_delete_dto_instance.to_dict()
# create an instance of AssetBulkDeleteDto from a dict
asset_bulk_delete_dto_from_dict = AssetBulkDeleteDto.from_dict(asset_bulk_delete_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# AssetBulkUpdateDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**date_time_original** | **str** | | [optional]
**duplicate_id** | **str** | | [optional]
**ids** | **List[str]** | |
**is_archived** | **bool** | | [optional]
**is_favorite** | **bool** | | [optional]
**latitude** | **float** | | [optional]
**longitude** | **float** | | [optional]
**rating** | **float** | | [optional]
## Example
```python
from generated.immich.openapi_client.models.asset_bulk_update_dto import AssetBulkUpdateDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetBulkUpdateDto from a JSON string
asset_bulk_update_dto_instance = AssetBulkUpdateDto.from_json(json)
# print the JSON string representation of the object
print(AssetBulkUpdateDto.to_json())
# convert the object into a dict
asset_bulk_update_dto_dict = asset_bulk_update_dto_instance.to_dict()
# create an instance of AssetBulkUpdateDto from a dict
asset_bulk_update_dto_from_dict = AssetBulkUpdateDto.from_dict(asset_bulk_update_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# AssetBulkUploadCheckDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**assets** | [**List[AssetBulkUploadCheckItem]**](AssetBulkUploadCheckItem.md) | |
## Example
```python
from generated.immich.openapi_client.models.asset_bulk_upload_check_dto import AssetBulkUploadCheckDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetBulkUploadCheckDto from a JSON string
asset_bulk_upload_check_dto_instance = AssetBulkUploadCheckDto.from_json(json)
# print the JSON string representation of the object
print(AssetBulkUploadCheckDto.to_json())
# convert the object into a dict
asset_bulk_upload_check_dto_dict = asset_bulk_upload_check_dto_instance.to_dict()
# create an instance of AssetBulkUploadCheckDto from a dict
asset_bulk_upload_check_dto_from_dict = AssetBulkUploadCheckDto.from_dict(asset_bulk_upload_check_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# AssetBulkUploadCheckItem
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**checksum** | **str** | base64 or hex encoded sha1 hash |
**id** | **str** | |
## Example
```python
from generated.immich.openapi_client.models.asset_bulk_upload_check_item import AssetBulkUploadCheckItem
# TODO update the JSON string below
json = "{}"
# create an instance of AssetBulkUploadCheckItem from a JSON string
asset_bulk_upload_check_item_instance = AssetBulkUploadCheckItem.from_json(json)
# print the JSON string representation of the object
print(AssetBulkUploadCheckItem.to_json())
# convert the object into a dict
asset_bulk_upload_check_item_dict = asset_bulk_upload_check_item_instance.to_dict()
# create an instance of AssetBulkUploadCheckItem from a dict
asset_bulk_upload_check_item_from_dict = AssetBulkUploadCheckItem.from_dict(asset_bulk_upload_check_item_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# AssetBulkUploadCheckResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**results** | [**List[AssetBulkUploadCheckResult]**](AssetBulkUploadCheckResult.md) | |
## Example
```python
from generated.immich.openapi_client.models.asset_bulk_upload_check_response_dto import AssetBulkUploadCheckResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetBulkUploadCheckResponseDto from a JSON string
asset_bulk_upload_check_response_dto_instance = AssetBulkUploadCheckResponseDto.from_json(json)
# print the JSON string representation of the object
print(AssetBulkUploadCheckResponseDto.to_json())
# convert the object into a dict
asset_bulk_upload_check_response_dto_dict = asset_bulk_upload_check_response_dto_instance.to_dict()
# create an instance of AssetBulkUploadCheckResponseDto from a dict
asset_bulk_upload_check_response_dto_from_dict = AssetBulkUploadCheckResponseDto.from_dict(asset_bulk_upload_check_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,33 @@
# AssetBulkUploadCheckResult
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**action** | **str** | |
**asset_id** | **str** | | [optional]
**id** | **str** | |
**is_trashed** | **bool** | | [optional]
**reason** | **str** | | [optional]
## Example
```python
from generated.immich.openapi_client.models.asset_bulk_upload_check_result import AssetBulkUploadCheckResult
# TODO update the JSON string below
json = "{}"
# create an instance of AssetBulkUploadCheckResult from a JSON string
asset_bulk_upload_check_result_instance = AssetBulkUploadCheckResult.from_json(json)
# print the JSON string representation of the object
print(AssetBulkUploadCheckResult.to_json())
# convert the object into a dict
asset_bulk_upload_check_result_dict = asset_bulk_upload_check_result_instance.to_dict()
# create an instance of AssetBulkUploadCheckResult from a dict
asset_bulk_upload_check_result_from_dict = AssetBulkUploadCheckResult.from_dict(asset_bulk_upload_check_result_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# AssetDeltaSyncDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**updated_after** | **datetime** | |
**user_ids** | **List[str]** | |
## Example
```python
from generated.immich.openapi_client.models.asset_delta_sync_dto import AssetDeltaSyncDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetDeltaSyncDto from a JSON string
asset_delta_sync_dto_instance = AssetDeltaSyncDto.from_json(json)
# print the JSON string representation of the object
print(AssetDeltaSyncDto.to_json())
# convert the object into a dict
asset_delta_sync_dto_dict = asset_delta_sync_dto_instance.to_dict()
# create an instance of AssetDeltaSyncDto from a dict
asset_delta_sync_dto_from_dict = AssetDeltaSyncDto.from_dict(asset_delta_sync_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,31 @@
# AssetDeltaSyncResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**deleted** | **List[str]** | |
**needs_full_sync** | **bool** | |
**upserted** | [**List[AssetResponseDto]**](AssetResponseDto.md) | |
## Example
```python
from generated.immich.openapi_client.models.asset_delta_sync_response_dto import AssetDeltaSyncResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetDeltaSyncResponseDto from a JSON string
asset_delta_sync_response_dto_instance = AssetDeltaSyncResponseDto.from_json(json)
# print the JSON string representation of the object
print(AssetDeltaSyncResponseDto.to_json())
# convert the object into a dict
asset_delta_sync_response_dto_dict = asset_delta_sync_response_dto_instance.to_dict()
# create an instance of AssetDeltaSyncResponseDto from a dict
asset_delta_sync_response_dto_from_dict = AssetDeltaSyncResponseDto.from_dict(asset_delta_sync_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# AssetFaceCreateDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_id** | **str** | |
**height** | **int** | |
**image_height** | **int** | |
**image_width** | **int** | |
**person_id** | **str** | |
**width** | **int** | |
**x** | **int** | |
**y** | **int** | |
## Example
```python
from generated.immich.openapi_client.models.asset_face_create_dto import AssetFaceCreateDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetFaceCreateDto from a JSON string
asset_face_create_dto_instance = AssetFaceCreateDto.from_json(json)
# print the JSON string representation of the object
print(AssetFaceCreateDto.to_json())
# convert the object into a dict
asset_face_create_dto_dict = asset_face_create_dto_instance.to_dict()
# create an instance of AssetFaceCreateDto from a dict
asset_face_create_dto_from_dict = AssetFaceCreateDto.from_dict(asset_face_create_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# AssetFaceDeleteDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**force** | **bool** | |
## Example
```python
from generated.immich.openapi_client.models.asset_face_delete_dto import AssetFaceDeleteDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetFaceDeleteDto from a JSON string
asset_face_delete_dto_instance = AssetFaceDeleteDto.from_json(json)
# print the JSON string representation of the object
print(AssetFaceDeleteDto.to_json())
# convert the object into a dict
asset_face_delete_dto_dict = asset_face_delete_dto_instance.to_dict()
# create an instance of AssetFaceDeleteDto from a dict
asset_face_delete_dto_from_dict = AssetFaceDeleteDto.from_dict(asset_face_delete_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,37 @@
# AssetFaceResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bounding_box_x1** | **int** | |
**bounding_box_x2** | **int** | |
**bounding_box_y1** | **int** | |
**bounding_box_y2** | **int** | |
**id** | **str** | |
**image_height** | **int** | |
**image_width** | **int** | |
**person** | [**PersonResponseDto**](PersonResponseDto.md) | |
**source_type** | [**SourceType**](SourceType.md) | | [optional]
## Example
```python
from generated.immich.openapi_client.models.asset_face_response_dto import AssetFaceResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetFaceResponseDto from a JSON string
asset_face_response_dto_instance = AssetFaceResponseDto.from_json(json)
# print the JSON string representation of the object
print(AssetFaceResponseDto.to_json())
# convert the object into a dict
asset_face_response_dto_dict = asset_face_response_dto_instance.to_dict()
# create an instance of AssetFaceResponseDto from a dict
asset_face_response_dto_from_dict = AssetFaceResponseDto.from_dict(asset_face_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# AssetFaceUpdateDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**List[AssetFaceUpdateItem]**](AssetFaceUpdateItem.md) | |
## Example
```python
from generated.immich.openapi_client.models.asset_face_update_dto import AssetFaceUpdateDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetFaceUpdateDto from a JSON string
asset_face_update_dto_instance = AssetFaceUpdateDto.from_json(json)
# print the JSON string representation of the object
print(AssetFaceUpdateDto.to_json())
# convert the object into a dict
asset_face_update_dto_dict = asset_face_update_dto_instance.to_dict()
# create an instance of AssetFaceUpdateDto from a dict
asset_face_update_dto_from_dict = AssetFaceUpdateDto.from_dict(asset_face_update_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# AssetFaceUpdateItem
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_id** | **str** | |
**person_id** | **str** | |
## Example
```python
from generated.immich.openapi_client.models.asset_face_update_item import AssetFaceUpdateItem
# TODO update the JSON string below
json = "{}"
# create an instance of AssetFaceUpdateItem from a JSON string
asset_face_update_item_instance = AssetFaceUpdateItem.from_json(json)
# print the JSON string representation of the object
print(AssetFaceUpdateItem.to_json())
# convert the object into a dict
asset_face_update_item_dict = asset_face_update_item_instance.to_dict()
# create an instance of AssetFaceUpdateItem from a dict
asset_face_update_item_from_dict = AssetFaceUpdateItem.from_dict(asset_face_update_item_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,36 @@
# AssetFaceWithoutPersonResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bounding_box_x1** | **int** | |
**bounding_box_x2** | **int** | |
**bounding_box_y1** | **int** | |
**bounding_box_y2** | **int** | |
**id** | **str** | |
**image_height** | **int** | |
**image_width** | **int** | |
**source_type** | [**SourceType**](SourceType.md) | | [optional]
## Example
```python
from generated.immich.openapi_client.models.asset_face_without_person_response_dto import AssetFaceWithoutPersonResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetFaceWithoutPersonResponseDto from a JSON string
asset_face_without_person_response_dto_instance = AssetFaceWithoutPersonResponseDto.from_json(json)
# print the JSON string representation of the object
print(AssetFaceWithoutPersonResponseDto.to_json())
# convert the object into a dict
asset_face_without_person_response_dto_dict = asset_face_without_person_response_dto_instance.to_dict()
# create an instance of AssetFaceWithoutPersonResponseDto from a dict
asset_face_without_person_response_dto_from_dict = AssetFaceWithoutPersonResponseDto.from_dict(asset_face_without_person_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# AssetFullSyncDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**last_id** | **str** | | [optional]
**limit** | **int** | |
**updated_until** | **datetime** | |
**user_id** | **str** | | [optional]
## Example
```python
from generated.immich.openapi_client.models.asset_full_sync_dto import AssetFullSyncDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetFullSyncDto from a JSON string
asset_full_sync_dto_instance = AssetFullSyncDto.from_json(json)
# print the JSON string representation of the object
print(AssetFullSyncDto.to_json())
# convert the object into a dict
asset_full_sync_dto_dict = asset_full_sync_dto_instance.to_dict()
# create an instance of AssetFullSyncDto from a dict
asset_full_sync_dto_from_dict = AssetFullSyncDto.from_dict(asset_full_sync_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# AssetIdsDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_ids** | **List[str]** | |
## Example
```python
from generated.immich.openapi_client.models.asset_ids_dto import AssetIdsDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetIdsDto from a JSON string
asset_ids_dto_instance = AssetIdsDto.from_json(json)
# print the JSON string representation of the object
print(AssetIdsDto.to_json())
# convert the object into a dict
asset_ids_dto_dict = asset_ids_dto_instance.to_dict()
# create an instance of AssetIdsDto from a dict
asset_ids_dto_from_dict = AssetIdsDto.from_dict(asset_ids_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,31 @@
# AssetIdsResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_id** | **str** | |
**error** | **str** | | [optional]
**success** | **bool** | |
## Example
```python
from generated.immich.openapi_client.models.asset_ids_response_dto import AssetIdsResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetIdsResponseDto from a JSON string
asset_ids_response_dto_instance = AssetIdsResponseDto.from_json(json)
# print the JSON string representation of the object
print(AssetIdsResponseDto.to_json())
# convert the object into a dict
asset_ids_response_dto_dict = asset_ids_response_dto_instance.to_dict()
# create an instance of AssetIdsResponseDto from a dict
asset_ids_response_dto_from_dict = AssetIdsResponseDto.from_dict(asset_ids_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,16 @@
# AssetJobName
## Enum
* `REFRESH_MINUS_FACES` (value: `'refresh-faces'`)
* `REFRESH_MINUS_METADATA` (value: `'refresh-metadata'`)
* `REGENERATE_MINUS_THUMBNAIL` (value: `'regenerate-thumbnail'`)
* `TRANSCODE_MINUS_VIDEO` (value: `'transcode-video'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# AssetJobsDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_ids** | **List[str]** | |
**name** | [**AssetJobName**](AssetJobName.md) | |
## Example
```python
from generated.immich.openapi_client.models.asset_jobs_dto import AssetJobsDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetJobsDto from a JSON string
asset_jobs_dto_instance = AssetJobsDto.from_json(json)
# print the JSON string representation of the object
print(AssetJobsDto.to_json())
# convert the object into a dict
asset_jobs_dto_dict = asset_jobs_dto_instance.to_dict()
# create an instance of AssetJobsDto from a dict
asset_jobs_dto_from_dict = AssetJobsDto.from_dict(asset_jobs_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# AssetMediaResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | |
**status** | [**AssetMediaStatus**](AssetMediaStatus.md) | |
## Example
```python
from generated.immich.openapi_client.models.asset_media_response_dto import AssetMediaResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetMediaResponseDto from a JSON string
asset_media_response_dto_instance = AssetMediaResponseDto.from_json(json)
# print the JSON string representation of the object
print(AssetMediaResponseDto.to_json())
# convert the object into a dict
asset_media_response_dto_dict = asset_media_response_dto_instance.to_dict()
# create an instance of AssetMediaResponseDto from a dict
asset_media_response_dto_from_dict = AssetMediaResponseDto.from_dict(asset_media_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,14 @@
# AssetMediaSize
## Enum
* `FULLSIZE` (value: `'fullsize'`)
* `PREVIEW` (value: `'preview'`)
* `THUMBNAIL` (value: `'thumbnail'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,14 @@
# AssetMediaStatus
## Enum
* `CREATED` (value: `'created'`)
* `REPLACED` (value: `'replaced'`)
* `DUPLICATE` (value: `'duplicate'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,12 @@
# AssetOrder
## Enum
* `ASC` (value: `'asc'`)
* `DESC` (value: `'desc'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,58 @@
# AssetResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**checksum** | **str** | base64 encoded sha1 hash |
**device_asset_id** | **str** | |
**device_id** | **str** | |
**duplicate_id** | **str** | | [optional]
**duration** | **str** | |
**exif_info** | [**ExifResponseDto**](ExifResponseDto.md) | | [optional]
**file_created_at** | **datetime** | |
**file_modified_at** | **datetime** | |
**has_metadata** | **bool** | |
**id** | **str** | |
**is_archived** | **bool** | |
**is_favorite** | **bool** | |
**is_offline** | **bool** | |
**is_trashed** | **bool** | |
**library_id** | **str** | This property was deprecated in v1.106.0 | [optional]
**live_photo_video_id** | **str** | | [optional]
**local_date_time** | **datetime** | |
**original_file_name** | **str** | |
**original_mime_type** | **str** | | [optional]
**original_path** | **str** | |
**owner** | [**UserResponseDto**](UserResponseDto.md) | | [optional]
**owner_id** | **str** | |
**people** | [**List[PersonWithFacesResponseDto]**](PersonWithFacesResponseDto.md) | | [optional]
**resized** | **bool** | This property was deprecated in v1.113.0 | [optional]
**stack** | [**AssetStackResponseDto**](AssetStackResponseDto.md) | | [optional]
**tags** | [**List[TagResponseDto]**](TagResponseDto.md) | | [optional]
**thumbhash** | **str** | |
**type** | [**AssetTypeEnum**](AssetTypeEnum.md) | |
**unassigned_faces** | [**List[AssetFaceWithoutPersonResponseDto]**](AssetFaceWithoutPersonResponseDto.md) | | [optional]
**updated_at** | **datetime** | |
## Example
```python
from generated.immich.openapi_client.models.asset_response_dto import AssetResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetResponseDto from a JSON string
asset_response_dto_instance = AssetResponseDto.from_json(json)
# print the JSON string representation of the object
print(AssetResponseDto.to_json())
# convert the object into a dict
asset_response_dto_dict = asset_response_dto_instance.to_dict()
# create an instance of AssetResponseDto from a dict
asset_response_dto_from_dict = AssetResponseDto.from_dict(asset_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,31 @@
# AssetStackResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_count** | **int** | |
**id** | **str** | |
**primary_asset_id** | **str** | |
## Example
```python
from generated.immich.openapi_client.models.asset_stack_response_dto import AssetStackResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetStackResponseDto from a JSON string
asset_stack_response_dto_instance = AssetStackResponseDto.from_json(json)
# print the JSON string representation of the object
print(AssetStackResponseDto.to_json())
# convert the object into a dict
asset_stack_response_dto_dict = asset_stack_response_dto_instance.to_dict()
# create an instance of AssetStackResponseDto from a dict
asset_stack_response_dto_from_dict = AssetStackResponseDto.from_dict(asset_stack_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,31 @@
# AssetStatsResponseDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**images** | **int** | |
**total** | **int** | |
**videos** | **int** | |
## Example
```python
from generated.immich.openapi_client.models.asset_stats_response_dto import AssetStatsResponseDto
# TODO update the JSON string below
json = "{}"
# create an instance of AssetStatsResponseDto from a JSON string
asset_stats_response_dto_instance = AssetStatsResponseDto.from_json(json)
# print the JSON string representation of the object
print(AssetStatsResponseDto.to_json())
# convert the object into a dict
asset_stats_response_dto_dict = asset_stats_response_dto_instance.to_dict()
# create an instance of AssetStatsResponseDto from a dict
asset_stats_response_dto_from_dict = AssetStatsResponseDto.from_dict(asset_stats_response_dto_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,16 @@
# AssetTypeEnum
## Enum
* `IMAGE` (value: `'IMAGE'`)
* `VIDEO` (value: `'VIDEO'`)
* `AUDIO` (value: `'AUDIO'`)
* `OTHER` (value: `'OTHER'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
# AudioCodec
## Enum
* `MP3` (value: `'mp3'`)
* `AAC` (value: `'aac'`)
* `LIBOPUS` (value: `'libopus'`)
* `PCM_S16LE` (value: `'pcm_s16le'`)
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,395 @@
# generated.immich.openapi_client.AuthenticationApi
All URIs are relative to *https://github.com/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**change_password**](AuthenticationApi.md#change_password) | **POST** /auth/change-password |
[**login**](AuthenticationApi.md#login) | **POST** /auth/login |
[**logout**](AuthenticationApi.md#logout) | **POST** /auth/logout |
[**sign_up_admin**](AuthenticationApi.md#sign_up_admin) | **POST** /auth/admin-sign-up |
[**validate_access_token**](AuthenticationApi.md#validate_access_token) | **POST** /auth/validateToken |
# **change_password**
> UserAdminResponseDto change_password(change_password_dto)
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.change_password_dto import ChangePasswordDto
from generated.immich.openapi_client.models.user_admin_response_dto import UserAdminResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AuthenticationApi(api_client)
change_password_dto = generated.immich.openapi_client.ChangePasswordDto() # ChangePasswordDto |
try:
api_response = api_instance.change_password(change_password_dto)
print("The response of AuthenticationApi->change_password:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthenticationApi->change_password: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**change_password_dto** | [**ChangePasswordDto**](ChangePasswordDto.md)| |
### Return type
[**UserAdminResponseDto**](UserAdminResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **login**
> LoginResponseDto login(login_credential_dto)
### Example
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.login_credential_dto import LoginCredentialDto
from generated.immich.openapi_client.models.login_response_dto import LoginResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AuthenticationApi(api_client)
login_credential_dto = generated.immich.openapi_client.LoginCredentialDto() # LoginCredentialDto |
try:
api_response = api_instance.login(login_credential_dto)
print("The response of AuthenticationApi->login:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthenticationApi->login: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**login_credential_dto** | [**LoginCredentialDto**](LoginCredentialDto.md)| |
### Return type
[**LoginResponseDto**](LoginResponseDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **logout**
> LogoutResponseDto logout()
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.logout_response_dto import LogoutResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AuthenticationApi(api_client)
try:
api_response = api_instance.logout()
print("The response of AuthenticationApi->logout:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthenticationApi->logout: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**LogoutResponseDto**](LogoutResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sign_up_admin**
> UserAdminResponseDto sign_up_admin(sign_up_dto)
### Example
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.sign_up_dto import SignUpDto
from generated.immich.openapi_client.models.user_admin_response_dto import UserAdminResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AuthenticationApi(api_client)
sign_up_dto = generated.immich.openapi_client.SignUpDto() # SignUpDto |
try:
api_response = api_instance.sign_up_admin(sign_up_dto)
print("The response of AuthenticationApi->sign_up_admin:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthenticationApi->sign_up_admin: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**sign_up_dto** | [**SignUpDto**](SignUpDto.md)| |
### Return type
[**UserAdminResponseDto**](UserAdminResponseDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **validate_access_token**
> ValidateAccessTokenResponseDto validate_access_token()
### Example
* Api Key Authentication (cookie):
* Api Key Authentication (api_key):
* Bearer (JWT) Authentication (bearer):
```python
import generated.immich.openapi_client
from generated.immich.openapi_client.models.validate_access_token_response_dto import ValidateAccessTokenResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/api"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.AuthenticationApi(api_client)
try:
api_response = api_instance.validate_access_token()
print("The response of AuthenticationApi->validate_access_token:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AuthenticationApi->validate_access_token: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ValidateAccessTokenResponseDto**](ValidateAccessTokenResponseDto.md)
### Authorization
[cookie](../README.md#cookie), [api_key](../README.md#api_key), [bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,29 @@
# AvatarResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**color** | [**UserAvatarColor**](UserAvatarColor.md) | |
## Example
```python
from generated.immich.openapi_client.models.avatar_response import AvatarResponse
# TODO update the JSON string below
json = "{}"
# create an instance of AvatarResponse from a JSON string
avatar_response_instance = AvatarResponse.from_json(json)
# print the JSON string representation of the object
print(AvatarResponse.to_json())
# convert the object into a dict
avatar_response_dict = avatar_response_instance.to_dict()
# create an instance of AvatarResponse from a dict
avatar_response_from_dict = AvatarResponse.from_dict(avatar_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Some files were not shown because too many files have changed in this diff Show More