[TASK] (untested) Updated API to work with Immich 3.0
This commit is contained in:
@@ -6,19 +6,23 @@ 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.authentication_admin_api import AuthenticationAdminApi
|
||||
from generated.immich.openapi_client.api.database_backups_admin_api import DatabaseBackupsAdminApi
|
||||
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.maintenance_admin_api import MaintenanceAdminApi
|
||||
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.notifications_admin_api import NotificationsAdminApi
|
||||
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.plugins_api import PluginsApi
|
||||
from generated.immich.openapi_client.api.queues_api import QueuesApi
|
||||
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
|
||||
@@ -32,5 +36,6 @@ 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
|
||||
from generated.immich.openapi_client.api.views_api import ViewsApi
|
||||
from generated.immich.openapi_client.api.workflows_api import WorkflowsApi
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -16,8 +16,10 @@ 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 pydantic import Field
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from uuid import UUID
|
||||
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
|
||||
@@ -59,8 +61,9 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ActivityResponseDto:
|
||||
"""create_activity
|
||||
"""Create an activity
|
||||
|
||||
Create a like or a comment for an album, or an asset in an album.
|
||||
|
||||
:param activity_create_dto: (required)
|
||||
:type activity_create_dto: ActivityCreateDto
|
||||
@@ -125,8 +128,9 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ActivityResponseDto]:
|
||||
"""create_activity
|
||||
"""Create an activity
|
||||
|
||||
Create a like or a comment for an album, or an asset in an album.
|
||||
|
||||
:param activity_create_dto: (required)
|
||||
:type activity_create_dto: ActivityCreateDto
|
||||
@@ -191,8 +195,9 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""create_activity
|
||||
"""Create an activity
|
||||
|
||||
Create a like or a comment for an album, or an asset in an album.
|
||||
|
||||
:param activity_create_dto: (required)
|
||||
:type activity_create_dto: ActivityCreateDto
|
||||
@@ -318,7 +323,7 @@ class ActivitiesApi:
|
||||
@validate_call
|
||||
def delete_activity(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -332,11 +337,12 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_activity
|
||||
"""Delete an activity
|
||||
|
||||
Removes a like or comment from a given album or asset in an album.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -384,7 +390,7 @@ class ActivitiesApi:
|
||||
@validate_call
|
||||
def delete_activity_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -398,11 +404,12 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_activity
|
||||
"""Delete an activity
|
||||
|
||||
Removes a like or comment from a given album or asset in an album.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -450,7 +457,7 @@ class ActivitiesApi:
|
||||
@validate_call
|
||||
def delete_activity_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -464,11 +471,12 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_activity
|
||||
"""Delete an activity
|
||||
|
||||
Removes a like or comment from a given album or asset in an album.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -571,11 +579,11 @@ class ActivitiesApi:
|
||||
@validate_call
|
||||
def get_activities(
|
||||
self,
|
||||
album_id: StrictStr,
|
||||
asset_id: Optional[StrictStr] = None,
|
||||
album_id: Annotated[UUID, Field(description="Album ID")],
|
||||
asset_id: Annotated[Optional[UUID], Field(description="Asset ID (if activity is for an asset)")] = None,
|
||||
level: Optional[ReactionLevel] = None,
|
||||
type: Optional[ReactionType] = None,
|
||||
user_id: Optional[StrictStr] = None,
|
||||
user_id: Annotated[Optional[UUID], Field(description="Filter by user ID")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -589,19 +597,20 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[ActivityResponseDto]:
|
||||
"""get_activities
|
||||
"""List all activities
|
||||
|
||||
Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.
|
||||
|
||||
:param album_id: (required)
|
||||
:type album_id: str
|
||||
:param asset_id:
|
||||
:type asset_id: str
|
||||
:param album_id: Album ID (required)
|
||||
:type album_id: UUID
|
||||
:param asset_id: Asset ID (if activity is for an asset)
|
||||
:type asset_id: UUID
|
||||
:param level:
|
||||
:type level: ReactionLevel
|
||||
:param type:
|
||||
:type type: ReactionType
|
||||
:param user_id:
|
||||
:type user_id: str
|
||||
:param user_id: Filter by user ID
|
||||
:type user_id: UUID
|
||||
: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
|
||||
@@ -653,11 +662,11 @@ class ActivitiesApi:
|
||||
@validate_call
|
||||
def get_activities_with_http_info(
|
||||
self,
|
||||
album_id: StrictStr,
|
||||
asset_id: Optional[StrictStr] = None,
|
||||
album_id: Annotated[UUID, Field(description="Album ID")],
|
||||
asset_id: Annotated[Optional[UUID], Field(description="Asset ID (if activity is for an asset)")] = None,
|
||||
level: Optional[ReactionLevel] = None,
|
||||
type: Optional[ReactionType] = None,
|
||||
user_id: Optional[StrictStr] = None,
|
||||
user_id: Annotated[Optional[UUID], Field(description="Filter by user ID")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -671,19 +680,20 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[ActivityResponseDto]]:
|
||||
"""get_activities
|
||||
"""List all activities
|
||||
|
||||
Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.
|
||||
|
||||
:param album_id: (required)
|
||||
:type album_id: str
|
||||
:param asset_id:
|
||||
:type asset_id: str
|
||||
:param album_id: Album ID (required)
|
||||
:type album_id: UUID
|
||||
:param asset_id: Asset ID (if activity is for an asset)
|
||||
:type asset_id: UUID
|
||||
:param level:
|
||||
:type level: ReactionLevel
|
||||
:param type:
|
||||
:type type: ReactionType
|
||||
:param user_id:
|
||||
:type user_id: str
|
||||
:param user_id: Filter by user ID
|
||||
:type user_id: UUID
|
||||
: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
|
||||
@@ -735,11 +745,11 @@ class ActivitiesApi:
|
||||
@validate_call
|
||||
def get_activities_without_preload_content(
|
||||
self,
|
||||
album_id: StrictStr,
|
||||
asset_id: Optional[StrictStr] = None,
|
||||
album_id: Annotated[UUID, Field(description="Album ID")],
|
||||
asset_id: Annotated[Optional[UUID], Field(description="Asset ID (if activity is for an asset)")] = None,
|
||||
level: Optional[ReactionLevel] = None,
|
||||
type: Optional[ReactionType] = None,
|
||||
user_id: Optional[StrictStr] = None,
|
||||
user_id: Annotated[Optional[UUID], Field(description="Filter by user ID")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -753,19 +763,20 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_activities
|
||||
"""List all activities
|
||||
|
||||
Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first.
|
||||
|
||||
:param album_id: (required)
|
||||
:type album_id: str
|
||||
:param asset_id:
|
||||
:type asset_id: str
|
||||
:param album_id: Album ID (required)
|
||||
:type album_id: UUID
|
||||
:param asset_id: Asset ID (if activity is for an asset)
|
||||
:type asset_id: UUID
|
||||
:param level:
|
||||
:type level: ReactionLevel
|
||||
:param type:
|
||||
:type type: ReactionType
|
||||
:param user_id:
|
||||
:type user_id: str
|
||||
:param user_id: Filter by user ID
|
||||
:type user_id: UUID
|
||||
: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
|
||||
@@ -901,8 +912,8 @@ class ActivitiesApi:
|
||||
@validate_call
|
||||
def get_activity_statistics(
|
||||
self,
|
||||
album_id: StrictStr,
|
||||
asset_id: Optional[StrictStr] = None,
|
||||
album_id: Annotated[UUID, Field(description="Album ID")],
|
||||
asset_id: Annotated[Optional[UUID], Field(description="Asset ID (if activity is for an asset)")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -916,13 +927,14 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ActivityStatisticsResponseDto:
|
||||
"""get_activity_statistics
|
||||
"""Retrieve activity statistics
|
||||
|
||||
Returns the number of likes and comments for a given album or asset in an album.
|
||||
|
||||
:param album_id: (required)
|
||||
:type album_id: str
|
||||
:param asset_id:
|
||||
:type asset_id: str
|
||||
:param album_id: Album ID (required)
|
||||
:type album_id: UUID
|
||||
:param asset_id: Asset ID (if activity is for an asset)
|
||||
:type asset_id: UUID
|
||||
: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
|
||||
@@ -971,8 +983,8 @@ class ActivitiesApi:
|
||||
@validate_call
|
||||
def get_activity_statistics_with_http_info(
|
||||
self,
|
||||
album_id: StrictStr,
|
||||
asset_id: Optional[StrictStr] = None,
|
||||
album_id: Annotated[UUID, Field(description="Album ID")],
|
||||
asset_id: Annotated[Optional[UUID], Field(description="Asset ID (if activity is for an asset)")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -986,13 +998,14 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ActivityStatisticsResponseDto]:
|
||||
"""get_activity_statistics
|
||||
"""Retrieve activity statistics
|
||||
|
||||
Returns the number of likes and comments for a given album or asset in an album.
|
||||
|
||||
:param album_id: (required)
|
||||
:type album_id: str
|
||||
:param asset_id:
|
||||
:type asset_id: str
|
||||
:param album_id: Album ID (required)
|
||||
:type album_id: UUID
|
||||
:param asset_id: Asset ID (if activity is for an asset)
|
||||
:type asset_id: UUID
|
||||
: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
|
||||
@@ -1041,8 +1054,8 @@ class ActivitiesApi:
|
||||
@validate_call
|
||||
def get_activity_statistics_without_preload_content(
|
||||
self,
|
||||
album_id: StrictStr,
|
||||
asset_id: Optional[StrictStr] = None,
|
||||
album_id: Annotated[UUID, Field(description="Album ID")],
|
||||
asset_id: Annotated[Optional[UUID], Field(description="Asset ID (if activity is for an asset)")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1056,13 +1069,14 @@ class ActivitiesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_activity_statistics
|
||||
"""Retrieve activity statistics
|
||||
|
||||
Returns the number of likes and comments for a given album or asset in an album.
|
||||
|
||||
:param album_id: (required)
|
||||
:type album_id: str
|
||||
:param asset_id:
|
||||
:type asset_id: str
|
||||
:param album_id: Album ID (required)
|
||||
:type album_id: UUID
|
||||
:param asset_id: Asset ID (if activity is for an asset)
|
||||
:type asset_id: UUID
|
||||
: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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -16,12 +16,12 @@ 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.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 uuid import UUID
|
||||
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.api_client import ApiClient, RequestSerialized
|
||||
from generated.immich.openapi_client.api_response import ApiResponse
|
||||
@@ -44,7 +44,7 @@ class APIKeysApi:
|
||||
@validate_call
|
||||
def create_api_key(
|
||||
self,
|
||||
api_key_create_dto: APIKeyCreateDto,
|
||||
api_key_create_dto: ApiKeyCreateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -57,12 +57,13 @@ class APIKeysApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> APIKeyCreateResponseDto:
|
||||
"""create_api_key
|
||||
) -> ApiKeyCreateResponseDto:
|
||||
"""Create an API key
|
||||
|
||||
Creates a new API key. It will be limited to the permissions specified.
|
||||
|
||||
:param api_key_create_dto: (required)
|
||||
:type api_key_create_dto: APIKeyCreateDto
|
||||
:type api_key_create_dto: ApiKeyCreateDto
|
||||
: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
|
||||
@@ -94,7 +95,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "APIKeyCreateResponseDto",
|
||||
'201': "ApiKeyCreateResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -110,7 +111,7 @@ class APIKeysApi:
|
||||
@validate_call
|
||||
def create_api_key_with_http_info(
|
||||
self,
|
||||
api_key_create_dto: APIKeyCreateDto,
|
||||
api_key_create_dto: ApiKeyCreateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -123,12 +124,13 @@ class APIKeysApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[APIKeyCreateResponseDto]:
|
||||
"""create_api_key
|
||||
) -> ApiResponse[ApiKeyCreateResponseDto]:
|
||||
"""Create an API key
|
||||
|
||||
Creates a new API key. It will be limited to the permissions specified.
|
||||
|
||||
:param api_key_create_dto: (required)
|
||||
:type api_key_create_dto: APIKeyCreateDto
|
||||
:type api_key_create_dto: ApiKeyCreateDto
|
||||
: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
|
||||
@@ -160,7 +162,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "APIKeyCreateResponseDto",
|
||||
'201': "ApiKeyCreateResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -176,7 +178,7 @@ class APIKeysApi:
|
||||
@validate_call
|
||||
def create_api_key_without_preload_content(
|
||||
self,
|
||||
api_key_create_dto: APIKeyCreateDto,
|
||||
api_key_create_dto: ApiKeyCreateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -190,11 +192,12 @@ class APIKeysApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""create_api_key
|
||||
"""Create an API key
|
||||
|
||||
Creates a new API key. It will be limited to the permissions specified.
|
||||
|
||||
:param api_key_create_dto: (required)
|
||||
:type api_key_create_dto: APIKeyCreateDto
|
||||
:type api_key_create_dto: ApiKeyCreateDto
|
||||
: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
|
||||
@@ -226,7 +229,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "APIKeyCreateResponseDto",
|
||||
'201': "ApiKeyCreateResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -317,7 +320,7 @@ class APIKeysApi:
|
||||
@validate_call
|
||||
def delete_api_key(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -331,11 +334,12 @@ class APIKeysApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_api_key
|
||||
"""Delete an API key
|
||||
|
||||
Deletes an API key identified by its ID. The current user must own this API key.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -383,7 +387,7 @@ class APIKeysApi:
|
||||
@validate_call
|
||||
def delete_api_key_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -397,11 +401,12 @@ class APIKeysApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_api_key
|
||||
"""Delete an API key
|
||||
|
||||
Deletes an API key identified by its ID. The current user must own this API key.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -449,7 +454,7 @@ class APIKeysApi:
|
||||
@validate_call
|
||||
def delete_api_key_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -463,11 +468,12 @@ class APIKeysApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_api_key
|
||||
"""Delete an API key
|
||||
|
||||
Deletes an API key identified by its ID. The current user must own this API key.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -570,7 +576,7 @@ class APIKeysApi:
|
||||
@validate_call
|
||||
def get_api_key(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -583,12 +589,13 @@ class APIKeysApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> APIKeyResponseDto:
|
||||
"""get_api_key
|
||||
) -> ApiKeyResponseDto:
|
||||
"""Retrieve an API key
|
||||
|
||||
Retrieve an API key by its ID. The current user must own this API key.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -620,7 +627,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "APIKeyResponseDto",
|
||||
'200': "ApiKeyResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -636,7 +643,7 @@ class APIKeysApi:
|
||||
@validate_call
|
||||
def get_api_key_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -649,12 +656,13 @@ class APIKeysApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[APIKeyResponseDto]:
|
||||
"""get_api_key
|
||||
) -> ApiResponse[ApiKeyResponseDto]:
|
||||
"""Retrieve an API key
|
||||
|
||||
Retrieve an API key by its ID. The current user must own this API key.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -686,7 +694,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "APIKeyResponseDto",
|
||||
'200': "ApiKeyResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -702,7 +710,7 @@ class APIKeysApi:
|
||||
@validate_call
|
||||
def get_api_key_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -716,11 +724,12 @@ class APIKeysApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_api_key
|
||||
"""Retrieve an API key
|
||||
|
||||
Retrieve an API key by its ID. The current user must own this API key.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -752,7 +761,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "APIKeyResponseDto",
|
||||
'200': "ApiKeyResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -842,9 +851,10 @@ class APIKeysApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[APIKeyResponseDto]:
|
||||
"""get_api_keys
|
||||
) -> List[ApiKeyResponseDto]:
|
||||
"""List all API keys
|
||||
|
||||
Retrieve all API keys of the current user.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -876,7 +886,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[APIKeyResponseDto]",
|
||||
'200': "List[ApiKeyResponseDto]",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -904,9 +914,10 @@ class APIKeysApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[APIKeyResponseDto]]:
|
||||
"""get_api_keys
|
||||
) -> ApiResponse[List[ApiKeyResponseDto]]:
|
||||
"""List all API keys
|
||||
|
||||
Retrieve all API keys of the current user.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -938,7 +949,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[APIKeyResponseDto]",
|
||||
'200': "List[ApiKeyResponseDto]",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -967,8 +978,9 @@ class APIKeysApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_api_keys
|
||||
"""List all API keys
|
||||
|
||||
Retrieve all API keys of the current user.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1000,7 +1012,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[APIKeyResponseDto]",
|
||||
'200': "List[ApiKeyResponseDto]",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -1073,10 +1085,8 @@ class APIKeysApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def update_api_key(
|
||||
def get_my_api_key(
|
||||
self,
|
||||
id: StrictStr,
|
||||
api_key_update_dto: APIKeyUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1089,14 +1099,11 @@ class APIKeysApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> APIKeyResponseDto:
|
||||
"""update_api_key
|
||||
) -> ApiKeyResponseDto:
|
||||
"""Retrieve the current API key
|
||||
|
||||
Retrieve the API key that is used to access this endpoint.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:param api_key_update_dto: (required)
|
||||
:type api_key_update_dto: APIKeyUpdateDto
|
||||
: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
|
||||
@@ -1119,6 +1126,261 @@ class APIKeysApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_my_api_key_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ApiKeyResponseDto",
|
||||
}
|
||||
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_my_api_key_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[ApiKeyResponseDto]:
|
||||
"""Retrieve the current API key
|
||||
|
||||
Retrieve the API key that is used to access this endpoint.
|
||||
|
||||
: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_my_api_key_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ApiKeyResponseDto",
|
||||
}
|
||||
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_my_api_key_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:
|
||||
"""Retrieve the current API key
|
||||
|
||||
Retrieve the API key that is used to access this endpoint.
|
||||
|
||||
: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_my_api_key_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ApiKeyResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _get_my_api_key_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='/api-keys/me',
|
||||
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_api_key(
|
||||
self,
|
||||
id: UUID,
|
||||
api_key_update_dto: ApiKeyUpdateDto,
|
||||
_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,
|
||||
) -> ApiKeyResponseDto:
|
||||
"""(Deprecated) Update an API key
|
||||
|
||||
Updates the name and permissions of an API key by its ID. The current user must own this API key.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
:param api_key_update_dto: (required)
|
||||
:type api_key_update_dto: ApiKeyUpdateDto
|
||||
: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("PUT /api-keys/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_api_key_serialize(
|
||||
id=id,
|
||||
api_key_update_dto=api_key_update_dto,
|
||||
@@ -1129,7 +1391,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "APIKeyResponseDto",
|
||||
'200': "ApiKeyResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -1145,8 +1407,8 @@ class APIKeysApi:
|
||||
@validate_call
|
||||
def update_api_key_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
api_key_update_dto: APIKeyUpdateDto,
|
||||
id: UUID,
|
||||
api_key_update_dto: ApiKeyUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1159,14 +1421,15 @@ class APIKeysApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[APIKeyResponseDto]:
|
||||
"""update_api_key
|
||||
) -> ApiResponse[ApiKeyResponseDto]:
|
||||
"""(Deprecated) Update an API key
|
||||
|
||||
Updates the name and permissions of an API key by its ID. The current user must own this API key.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param api_key_update_dto: (required)
|
||||
:type api_key_update_dto: APIKeyUpdateDto
|
||||
:type api_key_update_dto: ApiKeyUpdateDto
|
||||
: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
|
||||
@@ -1188,6 +1451,7 @@ class APIKeysApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /api-keys/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_api_key_serialize(
|
||||
id=id,
|
||||
@@ -1199,7 +1463,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "APIKeyResponseDto",
|
||||
'200': "ApiKeyResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -1215,8 +1479,8 @@ class APIKeysApi:
|
||||
@validate_call
|
||||
def update_api_key_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
api_key_update_dto: APIKeyUpdateDto,
|
||||
id: UUID,
|
||||
api_key_update_dto: ApiKeyUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1230,13 +1494,14 @@ class APIKeysApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""update_api_key
|
||||
"""(Deprecated) Update an API key
|
||||
|
||||
Updates the name and permissions of an API key by its ID. The current user must own this API key.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param api_key_update_dto: (required)
|
||||
:type api_key_update_dto: APIKeyUpdateDto
|
||||
:type api_key_update_dto: ApiKeyUpdateDto
|
||||
: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
|
||||
@@ -1258,6 +1523,7 @@ class APIKeysApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /api-keys/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_api_key_serialize(
|
||||
id=id,
|
||||
@@ -1269,7 +1535,7 @@ class APIKeysApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "APIKeyResponseDto",
|
||||
'200': "ApiKeyResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
|
||||
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
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -18,7 +18,7 @@ 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_archive_dto import DownloadArchiveDto
|
||||
from generated.immich.openapi_client.models.download_info_dto import DownloadInfoDto
|
||||
from generated.immich.openapi_client.models.download_response_dto import DownloadResponseDto
|
||||
|
||||
@@ -43,8 +43,9 @@ class DownloadApi:
|
||||
@validate_call
|
||||
def download_archive(
|
||||
self,
|
||||
asset_ids_dto: AssetIdsDto,
|
||||
download_archive_dto: DownloadArchiveDto,
|
||||
key: Optional[StrictStr] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -58,13 +59,16 @@ class DownloadApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> bytearray:
|
||||
"""download_archive
|
||||
"""Download asset archive
|
||||
|
||||
Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint.
|
||||
|
||||
:param asset_ids_dto: (required)
|
||||
:type asset_ids_dto: AssetIdsDto
|
||||
:param download_archive_dto: (required)
|
||||
:type download_archive_dto: DownloadArchiveDto
|
||||
:param key:
|
||||
:type key: str
|
||||
:param slug:
|
||||
:type slug: 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
|
||||
@@ -88,8 +92,9 @@ class DownloadApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._download_archive_serialize(
|
||||
asset_ids_dto=asset_ids_dto,
|
||||
download_archive_dto=download_archive_dto,
|
||||
key=key,
|
||||
slug=slug,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -113,8 +118,9 @@ class DownloadApi:
|
||||
@validate_call
|
||||
def download_archive_with_http_info(
|
||||
self,
|
||||
asset_ids_dto: AssetIdsDto,
|
||||
download_archive_dto: DownloadArchiveDto,
|
||||
key: Optional[StrictStr] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -128,13 +134,16 @@ class DownloadApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[bytearray]:
|
||||
"""download_archive
|
||||
"""Download asset archive
|
||||
|
||||
Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint.
|
||||
|
||||
:param asset_ids_dto: (required)
|
||||
:type asset_ids_dto: AssetIdsDto
|
||||
:param download_archive_dto: (required)
|
||||
:type download_archive_dto: DownloadArchiveDto
|
||||
:param key:
|
||||
:type key: str
|
||||
:param slug:
|
||||
:type slug: 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
|
||||
@@ -158,8 +167,9 @@ class DownloadApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._download_archive_serialize(
|
||||
asset_ids_dto=asset_ids_dto,
|
||||
download_archive_dto=download_archive_dto,
|
||||
key=key,
|
||||
slug=slug,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -183,8 +193,9 @@ class DownloadApi:
|
||||
@validate_call
|
||||
def download_archive_without_preload_content(
|
||||
self,
|
||||
asset_ids_dto: AssetIdsDto,
|
||||
download_archive_dto: DownloadArchiveDto,
|
||||
key: Optional[StrictStr] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -198,13 +209,16 @@ class DownloadApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""download_archive
|
||||
"""Download asset archive
|
||||
|
||||
Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint.
|
||||
|
||||
:param asset_ids_dto: (required)
|
||||
:type asset_ids_dto: AssetIdsDto
|
||||
:param download_archive_dto: (required)
|
||||
:type download_archive_dto: DownloadArchiveDto
|
||||
:param key:
|
||||
:type key: str
|
||||
:param slug:
|
||||
:type slug: 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
|
||||
@@ -228,8 +242,9 @@ class DownloadApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._download_archive_serialize(
|
||||
asset_ids_dto=asset_ids_dto,
|
||||
download_archive_dto=download_archive_dto,
|
||||
key=key,
|
||||
slug=slug,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -248,8 +263,9 @@ class DownloadApi:
|
||||
|
||||
def _download_archive_serialize(
|
||||
self,
|
||||
asset_ids_dto,
|
||||
download_archive_dto,
|
||||
key,
|
||||
slug,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
@@ -276,11 +292,15 @@ class DownloadApi:
|
||||
|
||||
_query_params.append(('key', key))
|
||||
|
||||
if slug is not None:
|
||||
|
||||
_query_params.append(('slug', slug))
|
||||
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
if asset_ids_dto is not None:
|
||||
_body_params = asset_ids_dto
|
||||
if download_archive_dto is not None:
|
||||
_body_params = download_archive_dto
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
@@ -335,6 +355,7 @@ class DownloadApi:
|
||||
self,
|
||||
download_info_dto: DownloadInfoDto,
|
||||
key: Optional[StrictStr] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -348,13 +369,16 @@ class DownloadApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> DownloadResponseDto:
|
||||
"""get_download_info
|
||||
"""Retrieve download information
|
||||
|
||||
Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together.
|
||||
|
||||
:param download_info_dto: (required)
|
||||
:type download_info_dto: DownloadInfoDto
|
||||
:param key:
|
||||
:type key: str
|
||||
:param slug:
|
||||
:type slug: 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
|
||||
@@ -380,6 +404,7 @@ class DownloadApi:
|
||||
_param = self._get_download_info_serialize(
|
||||
download_info_dto=download_info_dto,
|
||||
key=key,
|
||||
slug=slug,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -405,6 +430,7 @@ class DownloadApi:
|
||||
self,
|
||||
download_info_dto: DownloadInfoDto,
|
||||
key: Optional[StrictStr] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -418,13 +444,16 @@ class DownloadApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[DownloadResponseDto]:
|
||||
"""get_download_info
|
||||
"""Retrieve download information
|
||||
|
||||
Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together.
|
||||
|
||||
:param download_info_dto: (required)
|
||||
:type download_info_dto: DownloadInfoDto
|
||||
:param key:
|
||||
:type key: str
|
||||
:param slug:
|
||||
:type slug: 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
|
||||
@@ -450,6 +479,7 @@ class DownloadApi:
|
||||
_param = self._get_download_info_serialize(
|
||||
download_info_dto=download_info_dto,
|
||||
key=key,
|
||||
slug=slug,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -475,6 +505,7 @@ class DownloadApi:
|
||||
self,
|
||||
download_info_dto: DownloadInfoDto,
|
||||
key: Optional[StrictStr] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -488,13 +519,16 @@ class DownloadApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_download_info
|
||||
"""Retrieve download information
|
||||
|
||||
Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together.
|
||||
|
||||
:param download_info_dto: (required)
|
||||
:type download_info_dto: DownloadInfoDto
|
||||
:param key:
|
||||
:type key: str
|
||||
:param slug:
|
||||
:type slug: 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
|
||||
@@ -520,6 +554,7 @@ class DownloadApi:
|
||||
_param = self._get_download_info_serialize(
|
||||
download_info_dto=download_info_dto,
|
||||
key=key,
|
||||
slug=slug,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -540,6 +575,7 @@ class DownloadApi:
|
||||
self,
|
||||
download_info_dto,
|
||||
key,
|
||||
slug,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
@@ -566,6 +602,10 @@ class DownloadApi:
|
||||
|
||||
_query_params.append(('key', key))
|
||||
|
||||
if slug is not None:
|
||||
|
||||
_query_params.append(('slug', slug))
|
||||
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -17,6 +17,10 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
from typing_extensions import Annotated
|
||||
|
||||
from typing import List
|
||||
from uuid import UUID
|
||||
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.duplicate_resolve_dto import DuplicateResolveDto
|
||||
from generated.immich.openapi_client.models.duplicate_response_dto import DuplicateResponseDto
|
||||
|
||||
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
|
||||
@@ -37,6 +41,531 @@ class DuplicatesApi:
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@validate_call
|
||||
def delete_duplicate(
|
||||
self,
|
||||
id: UUID,
|
||||
_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:
|
||||
"""Dismiss a duplicate group
|
||||
|
||||
Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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_duplicate_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_duplicate_with_http_info(
|
||||
self,
|
||||
id: UUID,
|
||||
_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]:
|
||||
"""Dismiss a duplicate group
|
||||
|
||||
Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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_duplicate_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_duplicate_without_preload_content(
|
||||
self,
|
||||
id: UUID,
|
||||
_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:
|
||||
"""Dismiss a duplicate group
|
||||
|
||||
Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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_duplicate_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_duplicate_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='/duplicates/{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 delete_duplicates(
|
||||
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,
|
||||
) -> None:
|
||||
"""Delete duplicates
|
||||
|
||||
Delete multiple duplicate assets specified by their IDs.
|
||||
|
||||
: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._delete_duplicates_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]] = {
|
||||
'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_duplicates_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[None]:
|
||||
"""Delete duplicates
|
||||
|
||||
Delete multiple duplicate assets specified by their IDs.
|
||||
|
||||
: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._delete_duplicates_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]] = {
|
||||
'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_duplicates_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:
|
||||
"""Delete duplicates
|
||||
|
||||
Delete multiple duplicate assets specified by their IDs.
|
||||
|
||||
: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._delete_duplicates_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]] = {
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _delete_duplicates_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 `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='DELETE',
|
||||
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
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_asset_duplicates(
|
||||
self,
|
||||
@@ -53,8 +582,9 @@ class DuplicatesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[DuplicateResponseDto]:
|
||||
"""get_asset_duplicates
|
||||
"""Retrieve duplicates
|
||||
|
||||
Retrieve a list of duplicate assets available to the authenticated user.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -115,8 +645,9 @@ class DuplicatesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[DuplicateResponseDto]]:
|
||||
"""get_asset_duplicates
|
||||
"""Retrieve duplicates
|
||||
|
||||
Retrieve a list of duplicate assets available to the authenticated user.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -177,8 +708,9 @@ class DuplicatesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_asset_duplicates
|
||||
"""Retrieve duplicates
|
||||
|
||||
Retrieve a list of duplicate assets available to the authenticated user.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -280,3 +812,279 @@ class DuplicatesApi:
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def resolve_duplicates(
|
||||
self,
|
||||
duplicate_resolve_dto: DuplicateResolveDto,
|
||||
_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[BulkIdResponseDto]:
|
||||
"""Resolve duplicate groups
|
||||
|
||||
Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates.
|
||||
|
||||
:param duplicate_resolve_dto: (required)
|
||||
:type duplicate_resolve_dto: DuplicateResolveDto
|
||||
: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._resolve_duplicates_serialize(
|
||||
duplicate_resolve_dto=duplicate_resolve_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[BulkIdResponseDto]",
|
||||
}
|
||||
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 resolve_duplicates_with_http_info(
|
||||
self,
|
||||
duplicate_resolve_dto: DuplicateResolveDto,
|
||||
_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[BulkIdResponseDto]]:
|
||||
"""Resolve duplicate groups
|
||||
|
||||
Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates.
|
||||
|
||||
:param duplicate_resolve_dto: (required)
|
||||
:type duplicate_resolve_dto: DuplicateResolveDto
|
||||
: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._resolve_duplicates_serialize(
|
||||
duplicate_resolve_dto=duplicate_resolve_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[BulkIdResponseDto]",
|
||||
}
|
||||
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 resolve_duplicates_without_preload_content(
|
||||
self,
|
||||
duplicate_resolve_dto: DuplicateResolveDto,
|
||||
_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:
|
||||
"""Resolve duplicate groups
|
||||
|
||||
Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates.
|
||||
|
||||
:param duplicate_resolve_dto: (required)
|
||||
:type duplicate_resolve_dto: DuplicateResolveDto
|
||||
: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._resolve_duplicates_serialize(
|
||||
duplicate_resolve_dto=duplicate_resolve_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[BulkIdResponseDto]",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _resolve_duplicates_serialize(
|
||||
self,
|
||||
duplicate_resolve_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 duplicate_resolve_dto is not None:
|
||||
_body_params = duplicate_resolve_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='/duplicates/resolve',
|
||||
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
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -16,8 +16,10 @@ 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 pydantic import Field
|
||||
from typing import List
|
||||
from typing_extensions import Annotated
|
||||
from uuid import UUID
|
||||
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
|
||||
@@ -59,8 +61,9 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""create_face
|
||||
"""Create a face
|
||||
|
||||
Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.
|
||||
|
||||
:param asset_face_create_dto: (required)
|
||||
:type asset_face_create_dto: AssetFaceCreateDto
|
||||
@@ -125,8 +128,9 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""create_face
|
||||
"""Create a face
|
||||
|
||||
Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.
|
||||
|
||||
:param asset_face_create_dto: (required)
|
||||
:type asset_face_create_dto: AssetFaceCreateDto
|
||||
@@ -191,8 +195,9 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""create_face
|
||||
"""Create a face
|
||||
|
||||
Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.
|
||||
|
||||
:param asset_face_create_dto: (required)
|
||||
:type asset_face_create_dto: AssetFaceCreateDto
|
||||
@@ -311,7 +316,7 @@ class FacesApi:
|
||||
@validate_call
|
||||
def delete_face(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
asset_face_delete_dto: AssetFaceDeleteDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -326,11 +331,12 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_face
|
||||
"""Delete a face
|
||||
|
||||
Delete a face identified by the id. Optionally can be force deleted.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param asset_face_delete_dto: (required)
|
||||
:type asset_face_delete_dto: AssetFaceDeleteDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -365,7 +371,7 @@ class FacesApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -381,7 +387,7 @@ class FacesApi:
|
||||
@validate_call
|
||||
def delete_face_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
asset_face_delete_dto: AssetFaceDeleteDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -396,11 +402,12 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_face
|
||||
"""Delete a face
|
||||
|
||||
Delete a face identified by the id. Optionally can be force deleted.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param asset_face_delete_dto: (required)
|
||||
:type asset_face_delete_dto: AssetFaceDeleteDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -435,7 +442,7 @@ class FacesApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -451,7 +458,7 @@ class FacesApi:
|
||||
@validate_call
|
||||
def delete_face_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
asset_face_delete_dto: AssetFaceDeleteDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -466,11 +473,12 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_face
|
||||
"""Delete a face
|
||||
|
||||
Delete a face identified by the id. Optionally can be force deleted.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param asset_face_delete_dto: (required)
|
||||
:type asset_face_delete_dto: AssetFaceDeleteDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -505,7 +513,7 @@ class FacesApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -592,7 +600,7 @@ class FacesApi:
|
||||
@validate_call
|
||||
def get_faces(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: Annotated[UUID, Field(description="Face ID")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -606,11 +614,12 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[AssetFaceResponseDto]:
|
||||
"""get_faces
|
||||
"""Retrieve faces for asset
|
||||
|
||||
Retrieve all faces belonging to an asset.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:param id: Face ID (required)
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -658,7 +667,7 @@ class FacesApi:
|
||||
@validate_call
|
||||
def get_faces_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: Annotated[UUID, Field(description="Face ID")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -672,11 +681,12 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[AssetFaceResponseDto]]:
|
||||
"""get_faces
|
||||
"""Retrieve faces for asset
|
||||
|
||||
Retrieve all faces belonging to an asset.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:param id: Face ID (required)
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -724,7 +734,7 @@ class FacesApi:
|
||||
@validate_call
|
||||
def get_faces_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: Annotated[UUID, Field(description="Face ID")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -738,11 +748,12 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_faces
|
||||
"""Retrieve faces for asset
|
||||
|
||||
Retrieve all faces belonging to an asset.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:param id: Face ID (required)
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -854,7 +865,7 @@ class FacesApi:
|
||||
@validate_call
|
||||
def reassign_faces_by_id(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
face_dto: FaceDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -869,11 +880,12 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> PersonResponseDto:
|
||||
"""reassign_faces_by_id
|
||||
"""Re-assign a face to another person
|
||||
|
||||
Re-assign the face provided in the body to the person identified by the id in the path parameter.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param face_dto: (required)
|
||||
:type face_dto: FaceDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -924,7 +936,7 @@ class FacesApi:
|
||||
@validate_call
|
||||
def reassign_faces_by_id_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
face_dto: FaceDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -939,11 +951,12 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[PersonResponseDto]:
|
||||
"""reassign_faces_by_id
|
||||
"""Re-assign a face to another person
|
||||
|
||||
Re-assign the face provided in the body to the person identified by the id in the path parameter.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param face_dto: (required)
|
||||
:type face_dto: FaceDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -994,7 +1007,7 @@ class FacesApi:
|
||||
@validate_call
|
||||
def reassign_faces_by_id_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
face_dto: FaceDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1009,11 +1022,12 @@ class FacesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""reassign_faces_by_id
|
||||
"""Re-assign a face to another person
|
||||
|
||||
Re-assign the face provided in the body to the person identified by the id in the path parameter.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param face_dto: (required)
|
||||
:type face_dto: FaceDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
|
||||
@@ -1,824 +0,0 @@
|
||||
# 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
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -16,11 +16,11 @@ 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.models.queue_command_dto import QueueCommandDto
|
||||
from generated.immich.openapi_client.models.queue_name import QueueName
|
||||
from generated.immich.openapi_client.models.queue_response_legacy_dto import QueueResponseLegacyDto
|
||||
from generated.immich.openapi_client.models.queues_response_legacy_dto import QueuesResponseLegacyDto
|
||||
|
||||
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
|
||||
from generated.immich.openapi_client.api_response import ApiResponse
|
||||
@@ -57,8 +57,9 @@ class JobsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""create_job
|
||||
"""Create a manual job
|
||||
|
||||
Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.
|
||||
|
||||
:param job_create_dto: (required)
|
||||
:type job_create_dto: JobCreateDto
|
||||
@@ -93,7 +94,7 @@ class JobsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -123,8 +124,9 @@ class JobsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""create_job
|
||||
"""Create a manual job
|
||||
|
||||
Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.
|
||||
|
||||
:param job_create_dto: (required)
|
||||
:type job_create_dto: JobCreateDto
|
||||
@@ -159,7 +161,7 @@ class JobsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -189,8 +191,9 @@ class JobsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""create_job
|
||||
"""Create a manual job
|
||||
|
||||
Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup.
|
||||
|
||||
:param job_create_dto: (required)
|
||||
:type job_create_dto: JobCreateDto
|
||||
@@ -225,7 +228,7 @@ class JobsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -307,7 +310,7 @@ class JobsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_all_jobs_status(
|
||||
def get_queues_legacy(
|
||||
self,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -321,9 +324,10 @@ class JobsApi:
|
||||
_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
|
||||
) -> QueuesResponseLegacyDto:
|
||||
"""(Deprecated) Retrieve queue counts and status
|
||||
|
||||
Retrieve the counts of the current queue, as well as the current status.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -346,8 +350,9 @@ class JobsApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("GET /jobs is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._get_all_jobs_status_serialize(
|
||||
_param = self._get_queues_legacy_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -355,7 +360,7 @@ class JobsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "AllJobStatusResponseDto",
|
||||
'200': "QueuesResponseLegacyDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -369,7 +374,7 @@ class JobsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_all_jobs_status_with_http_info(
|
||||
def get_queues_legacy_with_http_info(
|
||||
self,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -383,9 +388,10 @@ class JobsApi:
|
||||
_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
|
||||
) -> ApiResponse[QueuesResponseLegacyDto]:
|
||||
"""(Deprecated) Retrieve queue counts and status
|
||||
|
||||
Retrieve the counts of the current queue, as well as the current status.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -408,8 +414,9 @@ class JobsApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("GET /jobs is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._get_all_jobs_status_serialize(
|
||||
_param = self._get_queues_legacy_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -417,7 +424,7 @@ class JobsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "AllJobStatusResponseDto",
|
||||
'200': "QueuesResponseLegacyDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -431,7 +438,7 @@ class JobsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_all_jobs_status_without_preload_content(
|
||||
def get_queues_legacy_without_preload_content(
|
||||
self,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -446,8 +453,9 @@ class JobsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_all_jobs_status
|
||||
"""(Deprecated) Retrieve queue counts and status
|
||||
|
||||
Retrieve the counts of the current queue, as well as the current status.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -470,8 +478,9 @@ class JobsApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("GET /jobs is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._get_all_jobs_status_serialize(
|
||||
_param = self._get_queues_legacy_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -479,7 +488,7 @@ class JobsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "AllJobStatusResponseDto",
|
||||
'200': "QueuesResponseLegacyDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -488,7 +497,7 @@ class JobsApi:
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _get_all_jobs_status_serialize(
|
||||
def _get_queues_legacy_serialize(
|
||||
self,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
@@ -552,10 +561,10 @@ class JobsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def send_job_command(
|
||||
def run_queue_command_legacy(
|
||||
self,
|
||||
id: JobName,
|
||||
job_command_dto: JobCommandDto,
|
||||
name: QueueName,
|
||||
queue_command_dto: QueueCommandDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -568,14 +577,15 @@ class JobsApi:
|
||||
_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
|
||||
) -> QueueResponseLegacyDto:
|
||||
"""(Deprecated) Run jobs
|
||||
|
||||
Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: JobName
|
||||
:param job_command_dto: (required)
|
||||
:type job_command_dto: JobCommandDto
|
||||
:param name: (required)
|
||||
:type name: QueueName
|
||||
:param queue_command_dto: (required)
|
||||
:type queue_command_dto: QueueCommandDto
|
||||
: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
|
||||
@@ -597,10 +607,11 @@ class JobsApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /jobs/{name} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._send_job_command_serialize(
|
||||
id=id,
|
||||
job_command_dto=job_command_dto,
|
||||
_param = self._run_queue_command_legacy_serialize(
|
||||
name=name,
|
||||
queue_command_dto=queue_command_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -608,7 +619,7 @@ class JobsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "JobStatusDto",
|
||||
'200': "QueueResponseLegacyDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -622,10 +633,10 @@ class JobsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def send_job_command_with_http_info(
|
||||
def run_queue_command_legacy_with_http_info(
|
||||
self,
|
||||
id: JobName,
|
||||
job_command_dto: JobCommandDto,
|
||||
name: QueueName,
|
||||
queue_command_dto: QueueCommandDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -638,14 +649,15 @@ class JobsApi:
|
||||
_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
|
||||
) -> ApiResponse[QueueResponseLegacyDto]:
|
||||
"""(Deprecated) Run jobs
|
||||
|
||||
Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: JobName
|
||||
:param job_command_dto: (required)
|
||||
:type job_command_dto: JobCommandDto
|
||||
:param name: (required)
|
||||
:type name: QueueName
|
||||
:param queue_command_dto: (required)
|
||||
:type queue_command_dto: QueueCommandDto
|
||||
: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
|
||||
@@ -667,10 +679,11 @@ class JobsApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /jobs/{name} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._send_job_command_serialize(
|
||||
id=id,
|
||||
job_command_dto=job_command_dto,
|
||||
_param = self._run_queue_command_legacy_serialize(
|
||||
name=name,
|
||||
queue_command_dto=queue_command_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -678,7 +691,7 @@ class JobsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "JobStatusDto",
|
||||
'200': "QueueResponseLegacyDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -692,10 +705,10 @@ class JobsApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def send_job_command_without_preload_content(
|
||||
def run_queue_command_legacy_without_preload_content(
|
||||
self,
|
||||
id: JobName,
|
||||
job_command_dto: JobCommandDto,
|
||||
name: QueueName,
|
||||
queue_command_dto: QueueCommandDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -709,13 +722,14 @@ class JobsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""send_job_command
|
||||
"""(Deprecated) Run jobs
|
||||
|
||||
Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: JobName
|
||||
:param job_command_dto: (required)
|
||||
:type job_command_dto: JobCommandDto
|
||||
:param name: (required)
|
||||
:type name: QueueName
|
||||
:param queue_command_dto: (required)
|
||||
:type queue_command_dto: QueueCommandDto
|
||||
: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
|
||||
@@ -737,10 +751,11 @@ class JobsApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /jobs/{name} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._send_job_command_serialize(
|
||||
id=id,
|
||||
job_command_dto=job_command_dto,
|
||||
_param = self._run_queue_command_legacy_serialize(
|
||||
name=name,
|
||||
queue_command_dto=queue_command_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -748,7 +763,7 @@ class JobsApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "JobStatusDto",
|
||||
'200': "QueueResponseLegacyDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -757,10 +772,10 @@ class JobsApi:
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _send_job_command_serialize(
|
||||
def _run_queue_command_legacy_serialize(
|
||||
self,
|
||||
id,
|
||||
job_command_dto,
|
||||
name,
|
||||
queue_command_dto,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
@@ -782,14 +797,14 @@ class JobsApi:
|
||||
_body_params: Optional[bytes] = None
|
||||
|
||||
# process the path parameters
|
||||
if id is not None:
|
||||
_path_params['id'] = id.value
|
||||
if name is not None:
|
||||
_path_params['name'] = name.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
|
||||
if queue_command_dto is not None:
|
||||
_body_params = queue_command_dto
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
@@ -823,7 +838,7 @@ class JobsApi:
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='PUT',
|
||||
resource_path='/jobs/{id}',
|
||||
resource_path='/jobs/{name}',
|
||||
path_params=_path_params,
|
||||
query_params=_query_params,
|
||||
header_params=_header_params,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -16,8 +16,8 @@ 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 uuid import UUID
|
||||
from generated.immich.openapi_client.models.create_library_dto import CreateLibraryDto
|
||||
from generated.immich.openapi_client.models.library_response_dto import LibraryResponseDto
|
||||
from generated.immich.openapi_client.models.library_stats_response_dto import LibraryStatsResponseDto
|
||||
@@ -60,8 +60,9 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> LibraryResponseDto:
|
||||
"""create_library
|
||||
"""Create a library
|
||||
|
||||
Create a new external library.
|
||||
|
||||
:param create_library_dto: (required)
|
||||
:type create_library_dto: CreateLibraryDto
|
||||
@@ -126,8 +127,9 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[LibraryResponseDto]:
|
||||
"""create_library
|
||||
"""Create a library
|
||||
|
||||
Create a new external library.
|
||||
|
||||
:param create_library_dto: (required)
|
||||
:type create_library_dto: CreateLibraryDto
|
||||
@@ -192,8 +194,9 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""create_library
|
||||
"""Create a library
|
||||
|
||||
Create a new external library.
|
||||
|
||||
:param create_library_dto: (required)
|
||||
:type create_library_dto: CreateLibraryDto
|
||||
@@ -319,7 +322,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def delete_library(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -333,11 +336,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_library
|
||||
"""Delete a library
|
||||
|
||||
Delete an external library by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -385,7 +389,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def delete_library_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -399,11 +403,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_library
|
||||
"""Delete a library
|
||||
|
||||
Delete an external library by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -451,7 +456,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def delete_library_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -465,11 +470,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_library
|
||||
"""Delete a library
|
||||
|
||||
Delete an external library by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -585,8 +591,9 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[LibraryResponseDto]:
|
||||
"""get_all_libraries
|
||||
"""Retrieve libraries
|
||||
|
||||
Retrieve a list of external libraries.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -647,8 +654,9 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[LibraryResponseDto]]:
|
||||
"""get_all_libraries
|
||||
"""Retrieve libraries
|
||||
|
||||
Retrieve a list of external libraries.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -709,8 +717,9 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_all_libraries
|
||||
"""Retrieve libraries
|
||||
|
||||
Retrieve a list of external libraries.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -817,7 +826,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def get_library(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -831,11 +840,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> LibraryResponseDto:
|
||||
"""get_library
|
||||
"""Retrieve a library
|
||||
|
||||
Retrieve an external library by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -883,7 +893,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def get_library_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -897,11 +907,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[LibraryResponseDto]:
|
||||
"""get_library
|
||||
"""Retrieve a library
|
||||
|
||||
Retrieve an external library by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -949,7 +960,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def get_library_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -963,11 +974,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_library
|
||||
"""Retrieve a library
|
||||
|
||||
Retrieve an external library by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1077,7 +1089,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def get_library_statistics(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1091,11 +1103,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> LibraryStatsResponseDto:
|
||||
"""get_library_statistics
|
||||
"""Retrieve library statistics
|
||||
|
||||
Retrieve statistics for a specific external library, including number of videos, images, and storage usage.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1143,7 +1156,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def get_library_statistics_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1157,11 +1170,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[LibraryStatsResponseDto]:
|
||||
"""get_library_statistics
|
||||
"""Retrieve library statistics
|
||||
|
||||
Retrieve statistics for a specific external library, including number of videos, images, and storage usage.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1209,7 +1223,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def get_library_statistics_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1223,11 +1237,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_library_statistics
|
||||
"""Retrieve library statistics
|
||||
|
||||
Retrieve statistics for a specific external library, including number of videos, images, and storage usage.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1337,7 +1352,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def scan_library(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1351,11 +1366,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""scan_library
|
||||
"""Scan a library
|
||||
|
||||
Queue a scan for the external library to find and import new assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1403,7 +1419,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def scan_library_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1417,11 +1433,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""scan_library
|
||||
"""Scan a library
|
||||
|
||||
Queue a scan for the external library to find and import new assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1469,7 +1486,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def scan_library_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1483,11 +1500,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""scan_library
|
||||
"""Scan a library
|
||||
|
||||
Queue a scan for the external library to find and import new assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1590,7 +1608,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def update_library(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
update_library_dto: UpdateLibraryDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1605,11 +1623,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> LibraryResponseDto:
|
||||
"""update_library
|
||||
"""(Deprecated) Update a library
|
||||
|
||||
Update an existing external library.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param update_library_dto: (required)
|
||||
:type update_library_dto: UpdateLibraryDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1633,6 +1652,7 @@ class LibrariesApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /libraries/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_library_serialize(
|
||||
id=id,
|
||||
@@ -1660,7 +1680,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def update_library_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
update_library_dto: UpdateLibraryDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1675,11 +1695,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[LibraryResponseDto]:
|
||||
"""update_library
|
||||
"""(Deprecated) Update a library
|
||||
|
||||
Update an existing external library.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param update_library_dto: (required)
|
||||
:type update_library_dto: UpdateLibraryDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1703,6 +1724,7 @@ class LibrariesApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /libraries/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_library_serialize(
|
||||
id=id,
|
||||
@@ -1730,7 +1752,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def update_library_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
update_library_dto: UpdateLibraryDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1745,11 +1767,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""update_library
|
||||
"""(Deprecated) Update a library
|
||||
|
||||
Update an existing external library.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param update_library_dto: (required)
|
||||
:type update_library_dto: UpdateLibraryDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1773,6 +1796,7 @@ class LibrariesApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /libraries/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_library_serialize(
|
||||
id=id,
|
||||
@@ -1878,7 +1902,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def validate(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
validate_library_dto: ValidateLibraryDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1893,11 +1917,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ValidateLibraryResponseDto:
|
||||
"""validate
|
||||
"""Validate library settings
|
||||
|
||||
Validate the settings of an external library.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param validate_library_dto: (required)
|
||||
:type validate_library_dto: ValidateLibraryDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1948,7 +1973,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def validate_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
validate_library_dto: ValidateLibraryDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1963,11 +1988,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ValidateLibraryResponseDto]:
|
||||
"""validate
|
||||
"""Validate library settings
|
||||
|
||||
Validate the settings of an external library.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param validate_library_dto: (required)
|
||||
:type validate_library_dto: ValidateLibraryDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -2018,7 +2044,7 @@ class LibrariesApi:
|
||||
@validate_call
|
||||
def validate_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
validate_library_dto: ValidateLibraryDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -2033,11 +2059,12 @@ class LibrariesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""validate
|
||||
"""Validate library settings
|
||||
|
||||
Validate the settings of an external library.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param validate_library_dto: (required)
|
||||
:type validate_library_dto: ValidateLibraryDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -17,8 +17,9 @@ 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 pydantic import Field, StrictBool, StrictFloat, StrictInt
|
||||
from typing import List, Optional, Union
|
||||
from typing_extensions import Annotated
|
||||
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
|
||||
|
||||
@@ -43,12 +44,12 @@ class MapApi:
|
||||
@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,
|
||||
file_created_after: Annotated[Optional[datetime], Field(description="Filter assets created after this date")] = None,
|
||||
file_created_before: Annotated[Optional[datetime], Field(description="Filter assets created before this date")] = None,
|
||||
is_archived: Annotated[Optional[StrictBool], Field(description="Filter by archived status")] = None,
|
||||
is_favorite: Annotated[Optional[StrictBool], Field(description="Filter by favorite status")] = None,
|
||||
with_partners: Annotated[Optional[StrictBool], Field(description="Include partner assets")] = None,
|
||||
with_shared_albums: Annotated[Optional[StrictBool], Field(description="Include shared album assets")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -62,20 +63,21 @@ class MapApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[MapMarkerResponseDto]:
|
||||
"""get_map_markers
|
||||
"""Retrieve map markers
|
||||
|
||||
Retrieve a list of latitude and longitude coordinates for every asset with location data.
|
||||
|
||||
:param file_created_after:
|
||||
:param file_created_after: Filter assets created after this date
|
||||
:type file_created_after: datetime
|
||||
:param file_created_before:
|
||||
:param file_created_before: Filter assets created before this date
|
||||
:type file_created_before: datetime
|
||||
:param is_archived:
|
||||
:param is_archived: Filter by archived status
|
||||
:type is_archived: bool
|
||||
:param is_favorite:
|
||||
:param is_favorite: Filter by favorite status
|
||||
:type is_favorite: bool
|
||||
:param with_partners:
|
||||
:param with_partners: Include partner assets
|
||||
:type with_partners: bool
|
||||
:param with_shared_albums:
|
||||
:param with_shared_albums: Include shared album assets
|
||||
:type with_shared_albums: bool
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -129,12 +131,12 @@ class MapApi:
|
||||
@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,
|
||||
file_created_after: Annotated[Optional[datetime], Field(description="Filter assets created after this date")] = None,
|
||||
file_created_before: Annotated[Optional[datetime], Field(description="Filter assets created before this date")] = None,
|
||||
is_archived: Annotated[Optional[StrictBool], Field(description="Filter by archived status")] = None,
|
||||
is_favorite: Annotated[Optional[StrictBool], Field(description="Filter by favorite status")] = None,
|
||||
with_partners: Annotated[Optional[StrictBool], Field(description="Include partner assets")] = None,
|
||||
with_shared_albums: Annotated[Optional[StrictBool], Field(description="Include shared album assets")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -148,20 +150,21 @@ class MapApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[MapMarkerResponseDto]]:
|
||||
"""get_map_markers
|
||||
"""Retrieve map markers
|
||||
|
||||
Retrieve a list of latitude and longitude coordinates for every asset with location data.
|
||||
|
||||
:param file_created_after:
|
||||
:param file_created_after: Filter assets created after this date
|
||||
:type file_created_after: datetime
|
||||
:param file_created_before:
|
||||
:param file_created_before: Filter assets created before this date
|
||||
:type file_created_before: datetime
|
||||
:param is_archived:
|
||||
:param is_archived: Filter by archived status
|
||||
:type is_archived: bool
|
||||
:param is_favorite:
|
||||
:param is_favorite: Filter by favorite status
|
||||
:type is_favorite: bool
|
||||
:param with_partners:
|
||||
:param with_partners: Include partner assets
|
||||
:type with_partners: bool
|
||||
:param with_shared_albums:
|
||||
:param with_shared_albums: Include shared album assets
|
||||
:type with_shared_albums: bool
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -215,12 +218,12 @@ class MapApi:
|
||||
@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,
|
||||
file_created_after: Annotated[Optional[datetime], Field(description="Filter assets created after this date")] = None,
|
||||
file_created_before: Annotated[Optional[datetime], Field(description="Filter assets created before this date")] = None,
|
||||
is_archived: Annotated[Optional[StrictBool], Field(description="Filter by archived status")] = None,
|
||||
is_favorite: Annotated[Optional[StrictBool], Field(description="Filter by favorite status")] = None,
|
||||
with_partners: Annotated[Optional[StrictBool], Field(description="Include partner assets")] = None,
|
||||
with_shared_albums: Annotated[Optional[StrictBool], Field(description="Include shared album assets")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -234,20 +237,21 @@ class MapApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_map_markers
|
||||
"""Retrieve map markers
|
||||
|
||||
Retrieve a list of latitude and longitude coordinates for every asset with location data.
|
||||
|
||||
:param file_created_after:
|
||||
:param file_created_after: Filter assets created after this date
|
||||
:type file_created_after: datetime
|
||||
:param file_created_before:
|
||||
:param file_created_before: Filter assets created before this date
|
||||
:type file_created_before: datetime
|
||||
:param is_archived:
|
||||
:param is_archived: Filter by archived status
|
||||
:type is_archived: bool
|
||||
:param is_favorite:
|
||||
:param is_favorite: Filter by favorite status
|
||||
:type is_favorite: bool
|
||||
:param with_partners:
|
||||
:param with_partners: Include partner assets
|
||||
:type with_partners: bool
|
||||
:param with_shared_albums:
|
||||
:param with_shared_albums: Include shared album assets
|
||||
:type with_shared_albums: bool
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -408,8 +412,8 @@ class MapApi:
|
||||
@validate_call
|
||||
def reverse_geocode(
|
||||
self,
|
||||
lat: Union[StrictFloat, StrictInt],
|
||||
lon: Union[StrictFloat, StrictInt],
|
||||
lat: Annotated[Union[StrictFloat, StrictInt], Field(description="Latitude (-90 to 90)")],
|
||||
lon: Annotated[Union[StrictFloat, StrictInt], Field(description="Longitude (-180 to 180)")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -423,12 +427,13 @@ class MapApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[MapReverseGeocodeResponseDto]:
|
||||
"""reverse_geocode
|
||||
"""Reverse geocode coordinates
|
||||
|
||||
Retrieve location information (e.g., city, country) for given latitude and longitude coordinates.
|
||||
|
||||
:param lat: (required)
|
||||
:param lat: Latitude (-90 to 90) (required)
|
||||
:type lat: float
|
||||
:param lon: (required)
|
||||
:param lon: Longitude (-180 to 180) (required)
|
||||
:type lon: float
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -478,8 +483,8 @@ class MapApi:
|
||||
@validate_call
|
||||
def reverse_geocode_with_http_info(
|
||||
self,
|
||||
lat: Union[StrictFloat, StrictInt],
|
||||
lon: Union[StrictFloat, StrictInt],
|
||||
lat: Annotated[Union[StrictFloat, StrictInt], Field(description="Latitude (-90 to 90)")],
|
||||
lon: Annotated[Union[StrictFloat, StrictInt], Field(description="Longitude (-180 to 180)")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -493,12 +498,13 @@ class MapApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[MapReverseGeocodeResponseDto]]:
|
||||
"""reverse_geocode
|
||||
"""Reverse geocode coordinates
|
||||
|
||||
Retrieve location information (e.g., city, country) for given latitude and longitude coordinates.
|
||||
|
||||
:param lat: (required)
|
||||
:param lat: Latitude (-90 to 90) (required)
|
||||
:type lat: float
|
||||
:param lon: (required)
|
||||
:param lon: Longitude (-180 to 180) (required)
|
||||
:type lon: float
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -548,8 +554,8 @@ class MapApi:
|
||||
@validate_call
|
||||
def reverse_geocode_without_preload_content(
|
||||
self,
|
||||
lat: Union[StrictFloat, StrictInt],
|
||||
lon: Union[StrictFloat, StrictInt],
|
||||
lat: Annotated[Union[StrictFloat, StrictInt], Field(description="Latitude (-90 to 90)")],
|
||||
lon: Annotated[Union[StrictFloat, StrictInt], Field(description="Longitude (-180 to 180)")],
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -563,12 +569,13 @@ class MapApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""reverse_geocode
|
||||
"""Reverse geocode coordinates
|
||||
|
||||
Retrieve location information (e.g., city, country) for given latitude and longitude coordinates.
|
||||
|
||||
:param lat: (required)
|
||||
:param lat: Latitude (-90 to 90) (required)
|
||||
:type lat: float
|
||||
:param lon: (required)
|
||||
:param lon: Longitude (-180 to 180) (required)
|
||||
:type lon: float
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -17,12 +17,16 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
from typing_extensions import Annotated
|
||||
|
||||
from datetime import datetime
|
||||
from pydantic import StrictBool, StrictStr
|
||||
from pydantic import Field, StrictBool
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from uuid import UUID
|
||||
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.memory_create_dto import MemoryCreateDto
|
||||
from generated.immich.openapi_client.models.memory_response_dto import MemoryResponseDto
|
||||
from generated.immich.openapi_client.models.memory_search_order import MemorySearchOrder
|
||||
from generated.immich.openapi_client.models.memory_statistics_response_dto import MemoryStatisticsResponseDto
|
||||
from generated.immich.openapi_client.models.memory_type import MemoryType
|
||||
from generated.immich.openapi_client.models.memory_update_dto import MemoryUpdateDto
|
||||
|
||||
@@ -47,7 +51,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def add_memory_assets(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -62,11 +66,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[BulkIdResponseDto]:
|
||||
"""add_memory_assets
|
||||
"""Add assets to a memory
|
||||
|
||||
Add a list of asset IDs to a specific memory.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -117,7 +122,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def add_memory_assets_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -132,11 +137,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[BulkIdResponseDto]]:
|
||||
"""add_memory_assets
|
||||
"""Add assets to a memory
|
||||
|
||||
Add a list of asset IDs to a specific memory.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -187,7 +193,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def add_memory_assets_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -202,11 +208,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""add_memory_assets
|
||||
"""Add assets to a memory
|
||||
|
||||
Add a list of asset IDs to a specific memory.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -349,8 +356,9 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> MemoryResponseDto:
|
||||
"""create_memory
|
||||
"""Create a memory
|
||||
|
||||
Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.
|
||||
|
||||
:param memory_create_dto: (required)
|
||||
:type memory_create_dto: MemoryCreateDto
|
||||
@@ -415,8 +423,9 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[MemoryResponseDto]:
|
||||
"""create_memory
|
||||
"""Create a memory
|
||||
|
||||
Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.
|
||||
|
||||
:param memory_create_dto: (required)
|
||||
:type memory_create_dto: MemoryCreateDto
|
||||
@@ -481,8 +490,9 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""create_memory
|
||||
"""Create a memory
|
||||
|
||||
Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.
|
||||
|
||||
:param memory_create_dto: (required)
|
||||
:type memory_create_dto: MemoryCreateDto
|
||||
@@ -608,7 +618,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def delete_memory(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -622,11 +632,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_memory
|
||||
"""Delete a memory
|
||||
|
||||
Delete a specific memory by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -674,7 +685,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def delete_memory_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -688,11 +699,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_memory
|
||||
"""Delete a memory
|
||||
|
||||
Delete a specific memory by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -740,7 +752,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def delete_memory_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -754,11 +766,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_memory
|
||||
"""Delete a memory
|
||||
|
||||
Delete a specific memory by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -861,7 +874,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def get_memory(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -875,11 +888,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> MemoryResponseDto:
|
||||
"""get_memory
|
||||
"""Retrieve a memory
|
||||
|
||||
Retrieve a specific memory by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -927,7 +941,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def get_memory_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -941,11 +955,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[MemoryResponseDto]:
|
||||
"""get_memory
|
||||
"""Retrieve a memory
|
||||
|
||||
Retrieve a specific memory by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -993,7 +1008,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def get_memory_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1007,11 +1022,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_memory
|
||||
"""Retrieve a memory
|
||||
|
||||
Retrieve a specific memory by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1118,10 +1134,369 @@ class MemoriesApi:
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def memories_statistics(
|
||||
self,
|
||||
var_for: Annotated[Optional[datetime], Field(description="Filter by date")] = None,
|
||||
is_saved: Annotated[Optional[StrictBool], Field(description="Filter by saved status")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Include trashed memories")] = None,
|
||||
order: Optional[MemorySearchOrder] = None,
|
||||
size: Annotated[Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=1)]], Field(description="Number of memories to return")] = None,
|
||||
type: Optional[MemoryType] = 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,
|
||||
) -> MemoryStatisticsResponseDto:
|
||||
"""Retrieve memories statistics
|
||||
|
||||
Retrieve statistics about memories, such as total count and other relevant metrics.
|
||||
|
||||
:param var_for: Filter by date
|
||||
:type var_for: datetime
|
||||
:param is_saved: Filter by saved status
|
||||
:type is_saved: bool
|
||||
:param is_trashed: Include trashed memories
|
||||
:type is_trashed: bool
|
||||
:param order:
|
||||
:type order: MemorySearchOrder
|
||||
:param size: Number of memories to return
|
||||
:type size: int
|
||||
:param type:
|
||||
:type type: MemoryType
|
||||
: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._memories_statistics_serialize(
|
||||
var_for=var_for,
|
||||
is_saved=is_saved,
|
||||
is_trashed=is_trashed,
|
||||
order=order,
|
||||
size=size,
|
||||
type=type,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "MemoryStatisticsResponseDto",
|
||||
}
|
||||
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 memories_statistics_with_http_info(
|
||||
self,
|
||||
var_for: Annotated[Optional[datetime], Field(description="Filter by date")] = None,
|
||||
is_saved: Annotated[Optional[StrictBool], Field(description="Filter by saved status")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Include trashed memories")] = None,
|
||||
order: Optional[MemorySearchOrder] = None,
|
||||
size: Annotated[Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=1)]], Field(description="Number of memories to return")] = None,
|
||||
type: Optional[MemoryType] = 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[MemoryStatisticsResponseDto]:
|
||||
"""Retrieve memories statistics
|
||||
|
||||
Retrieve statistics about memories, such as total count and other relevant metrics.
|
||||
|
||||
:param var_for: Filter by date
|
||||
:type var_for: datetime
|
||||
:param is_saved: Filter by saved status
|
||||
:type is_saved: bool
|
||||
:param is_trashed: Include trashed memories
|
||||
:type is_trashed: bool
|
||||
:param order:
|
||||
:type order: MemorySearchOrder
|
||||
:param size: Number of memories to return
|
||||
:type size: int
|
||||
:param type:
|
||||
:type type: MemoryType
|
||||
: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._memories_statistics_serialize(
|
||||
var_for=var_for,
|
||||
is_saved=is_saved,
|
||||
is_trashed=is_trashed,
|
||||
order=order,
|
||||
size=size,
|
||||
type=type,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "MemoryStatisticsResponseDto",
|
||||
}
|
||||
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 memories_statistics_without_preload_content(
|
||||
self,
|
||||
var_for: Annotated[Optional[datetime], Field(description="Filter by date")] = None,
|
||||
is_saved: Annotated[Optional[StrictBool], Field(description="Filter by saved status")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Include trashed memories")] = None,
|
||||
order: Optional[MemorySearchOrder] = None,
|
||||
size: Annotated[Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=1)]], Field(description="Number of memories to return")] = None,
|
||||
type: Optional[MemoryType] = 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:
|
||||
"""Retrieve memories statistics
|
||||
|
||||
Retrieve statistics about memories, such as total count and other relevant metrics.
|
||||
|
||||
:param var_for: Filter by date
|
||||
:type var_for: datetime
|
||||
:param is_saved: Filter by saved status
|
||||
:type is_saved: bool
|
||||
:param is_trashed: Include trashed memories
|
||||
:type is_trashed: bool
|
||||
:param order:
|
||||
:type order: MemorySearchOrder
|
||||
:param size: Number of memories to return
|
||||
:type size: int
|
||||
:param type:
|
||||
:type type: MemoryType
|
||||
: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._memories_statistics_serialize(
|
||||
var_for=var_for,
|
||||
is_saved=is_saved,
|
||||
is_trashed=is_trashed,
|
||||
order=order,
|
||||
size=size,
|
||||
type=type,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "MemoryStatisticsResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _memories_statistics_serialize(
|
||||
self,
|
||||
var_for,
|
||||
is_saved,
|
||||
is_trashed,
|
||||
order,
|
||||
size,
|
||||
type,
|
||||
_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 var_for is not None:
|
||||
if isinstance(var_for, datetime):
|
||||
_query_params.append(
|
||||
(
|
||||
'for',
|
||||
var_for.strftime(
|
||||
self.api_client.configuration.datetime_format
|
||||
)
|
||||
)
|
||||
)
|
||||
else:
|
||||
_query_params.append(('for', var_for))
|
||||
|
||||
if is_saved is not None:
|
||||
|
||||
_query_params.append(('isSaved', is_saved))
|
||||
|
||||
if is_trashed is not None:
|
||||
|
||||
_query_params.append(('isTrashed', is_trashed))
|
||||
|
||||
if order is not None:
|
||||
|
||||
_query_params.append(('order', order.value))
|
||||
|
||||
if size is not None:
|
||||
|
||||
_query_params.append(('size', size))
|
||||
|
||||
if type is not None:
|
||||
|
||||
_query_params.append(('type', type.value))
|
||||
|
||||
# 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='/memories/statistics',
|
||||
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 remove_memory_assets(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1136,11 +1511,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[BulkIdResponseDto]:
|
||||
"""remove_memory_assets
|
||||
"""Remove assets from a memory
|
||||
|
||||
Remove a list of asset IDs from a specific memory.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1191,7 +1567,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def remove_memory_assets_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1206,11 +1582,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[BulkIdResponseDto]]:
|
||||
"""remove_memory_assets
|
||||
"""Remove assets from a memory
|
||||
|
||||
Remove a list of asset IDs from a specific memory.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1261,7 +1638,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def remove_memory_assets_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1276,11 +1653,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""remove_memory_assets
|
||||
"""Remove assets from a memory
|
||||
|
||||
Remove a list of asset IDs from a specific memory.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1409,9 +1787,11 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def search_memories(
|
||||
self,
|
||||
var_for: Optional[datetime] = None,
|
||||
is_saved: Optional[StrictBool] = None,
|
||||
is_trashed: Optional[StrictBool] = None,
|
||||
var_for: Annotated[Optional[datetime], Field(description="Filter by date")] = None,
|
||||
is_saved: Annotated[Optional[StrictBool], Field(description="Filter by saved status")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Include trashed memories")] = None,
|
||||
order: Optional[MemorySearchOrder] = None,
|
||||
size: Annotated[Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=1)]], Field(description="Number of memories to return")] = None,
|
||||
type: Optional[MemoryType] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1426,15 +1806,20 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[MemoryResponseDto]:
|
||||
"""search_memories
|
||||
"""Retrieve memories
|
||||
|
||||
Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
|
||||
|
||||
:param var_for:
|
||||
:param var_for: Filter by date
|
||||
:type var_for: datetime
|
||||
:param is_saved:
|
||||
:param is_saved: Filter by saved status
|
||||
:type is_saved: bool
|
||||
:param is_trashed:
|
||||
:param is_trashed: Include trashed memories
|
||||
:type is_trashed: bool
|
||||
:param order:
|
||||
:type order: MemorySearchOrder
|
||||
:param size: Number of memories to return
|
||||
:type size: int
|
||||
:param type:
|
||||
:type type: MemoryType
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1463,6 +1848,8 @@ class MemoriesApi:
|
||||
var_for=var_for,
|
||||
is_saved=is_saved,
|
||||
is_trashed=is_trashed,
|
||||
order=order,
|
||||
size=size,
|
||||
type=type,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
@@ -1487,9 +1874,11 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def search_memories_with_http_info(
|
||||
self,
|
||||
var_for: Optional[datetime] = None,
|
||||
is_saved: Optional[StrictBool] = None,
|
||||
is_trashed: Optional[StrictBool] = None,
|
||||
var_for: Annotated[Optional[datetime], Field(description="Filter by date")] = None,
|
||||
is_saved: Annotated[Optional[StrictBool], Field(description="Filter by saved status")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Include trashed memories")] = None,
|
||||
order: Optional[MemorySearchOrder] = None,
|
||||
size: Annotated[Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=1)]], Field(description="Number of memories to return")] = None,
|
||||
type: Optional[MemoryType] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1504,15 +1893,20 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[MemoryResponseDto]]:
|
||||
"""search_memories
|
||||
"""Retrieve memories
|
||||
|
||||
Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
|
||||
|
||||
:param var_for:
|
||||
:param var_for: Filter by date
|
||||
:type var_for: datetime
|
||||
:param is_saved:
|
||||
:param is_saved: Filter by saved status
|
||||
:type is_saved: bool
|
||||
:param is_trashed:
|
||||
:param is_trashed: Include trashed memories
|
||||
:type is_trashed: bool
|
||||
:param order:
|
||||
:type order: MemorySearchOrder
|
||||
:param size: Number of memories to return
|
||||
:type size: int
|
||||
:param type:
|
||||
:type type: MemoryType
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1541,6 +1935,8 @@ class MemoriesApi:
|
||||
var_for=var_for,
|
||||
is_saved=is_saved,
|
||||
is_trashed=is_trashed,
|
||||
order=order,
|
||||
size=size,
|
||||
type=type,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
@@ -1565,9 +1961,11 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def search_memories_without_preload_content(
|
||||
self,
|
||||
var_for: Optional[datetime] = None,
|
||||
is_saved: Optional[StrictBool] = None,
|
||||
is_trashed: Optional[StrictBool] = None,
|
||||
var_for: Annotated[Optional[datetime], Field(description="Filter by date")] = None,
|
||||
is_saved: Annotated[Optional[StrictBool], Field(description="Filter by saved status")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Include trashed memories")] = None,
|
||||
order: Optional[MemorySearchOrder] = None,
|
||||
size: Annotated[Optional[Annotated[int, Field(le=9007199254740991, strict=True, ge=1)]], Field(description="Number of memories to return")] = None,
|
||||
type: Optional[MemoryType] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1582,15 +1980,20 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""search_memories
|
||||
"""Retrieve memories
|
||||
|
||||
Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.
|
||||
|
||||
:param var_for:
|
||||
:param var_for: Filter by date
|
||||
:type var_for: datetime
|
||||
:param is_saved:
|
||||
:param is_saved: Filter by saved status
|
||||
:type is_saved: bool
|
||||
:param is_trashed:
|
||||
:param is_trashed: Include trashed memories
|
||||
:type is_trashed: bool
|
||||
:param order:
|
||||
:type order: MemorySearchOrder
|
||||
:param size: Number of memories to return
|
||||
:type size: int
|
||||
:param type:
|
||||
:type type: MemoryType
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1619,6 +2022,8 @@ class MemoriesApi:
|
||||
var_for=var_for,
|
||||
is_saved=is_saved,
|
||||
is_trashed=is_trashed,
|
||||
order=order,
|
||||
size=size,
|
||||
type=type,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
@@ -1641,6 +2046,8 @@ class MemoriesApi:
|
||||
var_for,
|
||||
is_saved,
|
||||
is_trashed,
|
||||
order,
|
||||
size,
|
||||
type,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
@@ -1685,6 +2092,14 @@ class MemoriesApi:
|
||||
|
||||
_query_params.append(('isTrashed', is_trashed))
|
||||
|
||||
if order is not None:
|
||||
|
||||
_query_params.append(('order', order.value))
|
||||
|
||||
if size is not None:
|
||||
|
||||
_query_params.append(('size', size))
|
||||
|
||||
if type is not None:
|
||||
|
||||
_query_params.append(('type', type.value))
|
||||
@@ -1731,7 +2146,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def update_memory(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
memory_update_dto: MemoryUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1746,11 +2161,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> MemoryResponseDto:
|
||||
"""update_memory
|
||||
"""(Deprecated) Update a memory
|
||||
|
||||
Update an existing memory by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param memory_update_dto: (required)
|
||||
:type memory_update_dto: MemoryUpdateDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1774,6 +2190,7 @@ class MemoriesApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /memories/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_memory_serialize(
|
||||
id=id,
|
||||
@@ -1801,7 +2218,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def update_memory_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
memory_update_dto: MemoryUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1816,11 +2233,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[MemoryResponseDto]:
|
||||
"""update_memory
|
||||
"""(Deprecated) Update a memory
|
||||
|
||||
Update an existing memory by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param memory_update_dto: (required)
|
||||
:type memory_update_dto: MemoryUpdateDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1844,6 +2262,7 @@ class MemoriesApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /memories/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_memory_serialize(
|
||||
id=id,
|
||||
@@ -1871,7 +2290,7 @@ class MemoriesApi:
|
||||
@validate_call
|
||||
def update_memory_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
memory_update_dto: MemoryUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1886,11 +2305,12 @@ class MemoriesApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""update_memory
|
||||
"""(Deprecated) Update a memory
|
||||
|
||||
Update an existing memory by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param memory_update_dto: (required)
|
||||
:type memory_update_dto: MemoryUpdateDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1914,6 +2334,7 @@ class MemoriesApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /memories/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_memory_serialize(
|
||||
id=id,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -16,11 +16,12 @@ 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 uuid import UUID
|
||||
from generated.immich.openapi_client.models.partner_create_dto import PartnerCreateDto
|
||||
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.update_partner_dto import UpdatePartnerDto
|
||||
from generated.immich.openapi_client.models.partner_update_dto import PartnerUpdateDto
|
||||
|
||||
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
|
||||
from generated.immich.openapi_client.api_response import ApiResponse
|
||||
@@ -43,7 +44,7 @@ class PartnersApi:
|
||||
@validate_call
|
||||
def create_partner(
|
||||
self,
|
||||
id: StrictStr,
|
||||
partner_create_dto: PartnerCreateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -57,11 +58,12 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> PartnerResponseDto:
|
||||
"""create_partner
|
||||
"""Create a partner
|
||||
|
||||
Create a new partner to share assets with.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:param partner_create_dto: (required)
|
||||
:type partner_create_dto: PartnerCreateDto
|
||||
: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
|
||||
@@ -85,7 +87,7 @@ class PartnersApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._create_partner_serialize(
|
||||
id=id,
|
||||
partner_create_dto=partner_create_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -109,7 +111,7 @@ class PartnersApi:
|
||||
@validate_call
|
||||
def create_partner_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
partner_create_dto: PartnerCreateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -123,11 +125,12 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[PartnerResponseDto]:
|
||||
"""create_partner
|
||||
"""Create a partner
|
||||
|
||||
Create a new partner to share assets with.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:param partner_create_dto: (required)
|
||||
:type partner_create_dto: PartnerCreateDto
|
||||
: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
|
||||
@@ -151,7 +154,7 @@ class PartnersApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._create_partner_serialize(
|
||||
id=id,
|
||||
partner_create_dto=partner_create_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -175,7 +178,7 @@ class PartnersApi:
|
||||
@validate_call
|
||||
def create_partner_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
partner_create_dto: PartnerCreateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -189,11 +192,12 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""create_partner
|
||||
"""Create a partner
|
||||
|
||||
Create a new partner to share assets with.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:param partner_create_dto: (required)
|
||||
:type partner_create_dto: PartnerCreateDto
|
||||
: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
|
||||
@@ -217,7 +221,7 @@ class PartnersApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._create_partner_serialize(
|
||||
id=id,
|
||||
partner_create_dto=partner_create_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -235,6 +239,285 @@ class PartnersApi:
|
||||
|
||||
|
||||
def _create_partner_serialize(
|
||||
self,
|
||||
partner_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 partner_create_dto is not None:
|
||||
_body_params = partner_create_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='/partners',
|
||||
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 create_partner_deprecated(
|
||||
self,
|
||||
id: UUID,
|
||||
_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,
|
||||
) -> PartnerResponseDto:
|
||||
"""(Deprecated) Create a partner
|
||||
|
||||
Create a new partner to share assets with.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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("POST /partners/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._create_partner_deprecated_serialize(
|
||||
id=id,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "PartnerResponseDto",
|
||||
}
|
||||
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_partner_deprecated_with_http_info(
|
||||
self,
|
||||
id: UUID,
|
||||
_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[PartnerResponseDto]:
|
||||
"""(Deprecated) Create a partner
|
||||
|
||||
Create a new partner to share assets with.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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("POST /partners/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._create_partner_deprecated_serialize(
|
||||
id=id,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "PartnerResponseDto",
|
||||
}
|
||||
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_partner_deprecated_without_preload_content(
|
||||
self,
|
||||
id: UUID,
|
||||
_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) Create a partner
|
||||
|
||||
Create a new partner to share assets with.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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("POST /partners/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._create_partner_deprecated_serialize(
|
||||
id=id,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "PartnerResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _create_partner_deprecated_serialize(
|
||||
self,
|
||||
id,
|
||||
_request_auth,
|
||||
@@ -317,8 +600,9 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[PartnerResponseDto]:
|
||||
"""get_partners
|
||||
"""Retrieve partners
|
||||
|
||||
Retrieve a list of partners with whom assets are shared.
|
||||
|
||||
:param direction: (required)
|
||||
:type direction: PartnerDirection
|
||||
@@ -383,8 +667,9 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[PartnerResponseDto]]:
|
||||
"""get_partners
|
||||
"""Retrieve partners
|
||||
|
||||
Retrieve a list of partners with whom assets are shared.
|
||||
|
||||
:param direction: (required)
|
||||
:type direction: PartnerDirection
|
||||
@@ -449,8 +734,9 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_partners
|
||||
"""Retrieve partners
|
||||
|
||||
Retrieve a list of partners with whom assets are shared.
|
||||
|
||||
:param direction: (required)
|
||||
:type direction: PartnerDirection
|
||||
@@ -565,7 +851,7 @@ class PartnersApi:
|
||||
@validate_call
|
||||
def remove_partner(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -579,11 +865,12 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""remove_partner
|
||||
"""Remove a partner
|
||||
|
||||
Stop sharing assets with a partner.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -615,7 +902,7 @@ class PartnersApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -631,7 +918,7 @@ class PartnersApi:
|
||||
@validate_call
|
||||
def remove_partner_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -645,11 +932,12 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""remove_partner
|
||||
"""Remove a partner
|
||||
|
||||
Stop sharing assets with a partner.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -681,7 +969,7 @@ class PartnersApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -697,7 +985,7 @@ class PartnersApi:
|
||||
@validate_call
|
||||
def remove_partner_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -711,11 +999,12 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""remove_partner
|
||||
"""Remove a partner
|
||||
|
||||
Stop sharing assets with a partner.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -747,7 +1036,7 @@ class PartnersApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -818,8 +1107,8 @@ class PartnersApi:
|
||||
@validate_call
|
||||
def update_partner(
|
||||
self,
|
||||
id: StrictStr,
|
||||
update_partner_dto: UpdatePartnerDto,
|
||||
id: UUID,
|
||||
partner_update_dto: PartnerUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -833,13 +1122,14 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> PartnerResponseDto:
|
||||
"""update_partner
|
||||
"""Update a partner
|
||||
|
||||
Specify whether a partner's assets should appear in the user's timeline.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:param update_partner_dto: (required)
|
||||
:type update_partner_dto: UpdatePartnerDto
|
||||
:type id: UUID
|
||||
:param partner_update_dto: (required)
|
||||
:type partner_update_dto: PartnerUpdateDto
|
||||
: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
|
||||
@@ -864,7 +1154,7 @@ class PartnersApi:
|
||||
|
||||
_param = self._update_partner_serialize(
|
||||
id=id,
|
||||
update_partner_dto=update_partner_dto,
|
||||
partner_update_dto=partner_update_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -888,8 +1178,8 @@ class PartnersApi:
|
||||
@validate_call
|
||||
def update_partner_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
update_partner_dto: UpdatePartnerDto,
|
||||
id: UUID,
|
||||
partner_update_dto: PartnerUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -903,13 +1193,14 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[PartnerResponseDto]:
|
||||
"""update_partner
|
||||
"""Update a partner
|
||||
|
||||
Specify whether a partner's assets should appear in the user's timeline.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:param update_partner_dto: (required)
|
||||
:type update_partner_dto: UpdatePartnerDto
|
||||
:type id: UUID
|
||||
:param partner_update_dto: (required)
|
||||
:type partner_update_dto: PartnerUpdateDto
|
||||
: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
|
||||
@@ -934,7 +1225,7 @@ class PartnersApi:
|
||||
|
||||
_param = self._update_partner_serialize(
|
||||
id=id,
|
||||
update_partner_dto=update_partner_dto,
|
||||
partner_update_dto=partner_update_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -958,8 +1249,8 @@ class PartnersApi:
|
||||
@validate_call
|
||||
def update_partner_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
update_partner_dto: UpdatePartnerDto,
|
||||
id: UUID,
|
||||
partner_update_dto: PartnerUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -973,13 +1264,14 @@ class PartnersApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""update_partner
|
||||
"""Update a partner
|
||||
|
||||
Specify whether a partner's assets should appear in the user's timeline.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:param update_partner_dto: (required)
|
||||
:type update_partner_dto: UpdatePartnerDto
|
||||
:type id: UUID
|
||||
:param partner_update_dto: (required)
|
||||
:type partner_update_dto: PartnerUpdateDto
|
||||
: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
|
||||
@@ -1004,7 +1296,7 @@ class PartnersApi:
|
||||
|
||||
_param = self._update_partner_serialize(
|
||||
id=id,
|
||||
update_partner_dto=update_partner_dto,
|
||||
partner_update_dto=partner_update_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -1024,7 +1316,7 @@ class PartnersApi:
|
||||
def _update_partner_serialize(
|
||||
self,
|
||||
id,
|
||||
update_partner_dto,
|
||||
partner_update_dto,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
_headers,
|
||||
@@ -1052,8 +1344,8 @@ class PartnersApi:
|
||||
# process the header parameters
|
||||
# process the form parameters
|
||||
# process the body parameter
|
||||
if update_partner_dto is not None:
|
||||
_body_params = update_partner_dto
|
||||
if partner_update_dto is not None:
|
||||
_body_params = partner_update_dto
|
||||
|
||||
|
||||
# set the HTTP header `Accept`
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -18,17 +18,18 @@ from typing_extensions import Annotated
|
||||
|
||||
from typing import List
|
||||
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.server_about_response_dto import ServerAboutResponseDto
|
||||
from generated.immich.openapi_client.models.server_apk_links_dto import ServerApkLinksDto
|
||||
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.user_license import UserLicense
|
||||
from generated.immich.openapi_client.models.version_check_state_response_dto import VersionCheckStateResponseDto
|
||||
|
||||
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
|
||||
from generated.immich.openapi_client.api_response import ApiResponse
|
||||
@@ -64,8 +65,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_server_license
|
||||
"""Delete server product key
|
||||
|
||||
Delete the currently set server product key.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -97,7 +99,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -126,8 +128,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_server_license
|
||||
"""Delete server product key
|
||||
|
||||
Delete the currently set server product key.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -159,7 +162,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -188,8 +191,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_server_license
|
||||
"""Delete server product key
|
||||
|
||||
Delete the currently set server product key.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -221,7 +225,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': None,
|
||||
'204': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -302,8 +306,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ServerAboutResponseDto:
|
||||
"""get_about_info
|
||||
"""Get server information
|
||||
|
||||
Retrieve a list of information about the server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -364,8 +369,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ServerAboutResponseDto]:
|
||||
"""get_about_info
|
||||
"""Get server information
|
||||
|
||||
Retrieve a list of information about the server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -426,8 +432,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_about_info
|
||||
"""Get server information
|
||||
|
||||
Retrieve a list of information about the server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -531,6 +538,254 @@ class ServerApi:
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_apk_links(
|
||||
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,
|
||||
) -> ServerApkLinksDto:
|
||||
"""Get APK links
|
||||
|
||||
Retrieve links to the APKs for the current server version.
|
||||
|
||||
: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_apk_links_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ServerApkLinksDto",
|
||||
}
|
||||
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_apk_links_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[ServerApkLinksDto]:
|
||||
"""Get APK links
|
||||
|
||||
Retrieve links to the APKs for the current server version.
|
||||
|
||||
: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_apk_links_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ServerApkLinksDto",
|
||||
}
|
||||
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_apk_links_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 APK links
|
||||
|
||||
Retrieve links to the APKs for the current server version.
|
||||
|
||||
: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_apk_links_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ServerApkLinksDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _get_apk_links_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='/server/apk-links',
|
||||
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_server_config(
|
||||
self,
|
||||
@@ -547,8 +802,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ServerConfigDto:
|
||||
"""get_server_config
|
||||
"""Get config
|
||||
|
||||
Retrieve the current server configuration.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -609,8 +865,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ServerConfigDto]:
|
||||
"""get_server_config
|
||||
"""Get config
|
||||
|
||||
Retrieve the current server configuration.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -671,8 +928,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_server_config
|
||||
"""Get config
|
||||
|
||||
Retrieve the current server configuration.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -789,8 +1047,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ServerFeaturesDto:
|
||||
"""get_server_features
|
||||
"""Get features
|
||||
|
||||
Retrieve available features supported by this server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -851,8 +1110,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ServerFeaturesDto]:
|
||||
"""get_server_features
|
||||
"""Get features
|
||||
|
||||
Retrieve available features supported by this server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -913,8 +1173,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_server_features
|
||||
"""Get features
|
||||
|
||||
Retrieve available features supported by this server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1030,9 +1291,10 @@ class ServerApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> LicenseResponseDto:
|
||||
"""get_server_license
|
||||
) -> UserLicense:
|
||||
"""Get product key
|
||||
|
||||
Retrieve information about whether the server currently has a product key registered.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1064,7 +1326,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "LicenseResponseDto",
|
||||
'200': "UserLicense",
|
||||
'404': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
@@ -1093,9 +1355,10 @@ class ServerApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[LicenseResponseDto]:
|
||||
"""get_server_license
|
||||
) -> ApiResponse[UserLicense]:
|
||||
"""Get product key
|
||||
|
||||
Retrieve information about whether the server currently has a product key registered.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1127,7 +1390,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "LicenseResponseDto",
|
||||
'200': "UserLicense",
|
||||
'404': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
@@ -1157,8 +1420,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_server_license
|
||||
"""Get product key
|
||||
|
||||
Retrieve information about whether the server currently has a product key registered.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1190,7 +1454,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "LicenseResponseDto",
|
||||
'200': "UserLicense",
|
||||
'404': None,
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
@@ -1279,8 +1543,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ServerStatsResponseDto:
|
||||
"""get_server_statistics
|
||||
"""Get statistics
|
||||
|
||||
Retrieve statistics about the entire Immich instance such as asset counts.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1341,8 +1606,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ServerStatsResponseDto]:
|
||||
"""get_server_statistics
|
||||
"""Get statistics
|
||||
|
||||
Retrieve statistics about the entire Immich instance such as asset counts.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1403,8 +1669,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_server_statistics
|
||||
"""Get statistics
|
||||
|
||||
Retrieve statistics about the entire Immich instance such as asset counts.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1524,8 +1791,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ServerVersionResponseDto:
|
||||
"""get_server_version
|
||||
"""Get server version
|
||||
|
||||
Retrieve the current server version in semantic versioning (semver) format.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1586,8 +1854,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ServerVersionResponseDto]:
|
||||
"""get_server_version
|
||||
"""Get server version
|
||||
|
||||
Retrieve the current server version in semantic versioning (semver) format.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1648,8 +1917,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_server_version
|
||||
"""Get server version
|
||||
|
||||
Retrieve the current server version in semantic versioning (semver) format.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1766,8 +2036,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ServerStorageResponseDto:
|
||||
"""get_storage
|
||||
"""Get storage
|
||||
|
||||
Retrieve the current storage utilization information of the server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1828,8 +2099,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ServerStorageResponseDto]:
|
||||
"""get_storage
|
||||
"""Get storage
|
||||
|
||||
Retrieve the current storage utilization information of the server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1890,8 +2162,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_storage
|
||||
"""Get storage
|
||||
|
||||
Retrieve the current storage utilization information of the server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2011,8 +2284,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ServerMediaTypesResponseDto:
|
||||
"""get_supported_media_types
|
||||
"""Get supported media types
|
||||
|
||||
Retrieve all media types supported by the server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2073,8 +2347,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ServerMediaTypesResponseDto]:
|
||||
"""get_supported_media_types
|
||||
"""Get supported media types
|
||||
|
||||
Retrieve all media types supported by the server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2135,8 +2410,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_supported_media_types
|
||||
"""Get supported media types
|
||||
|
||||
Retrieve all media types supported by the server.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2238,7 +2514,7 @@ class ServerApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_theme(
|
||||
def get_version_check(
|
||||
self,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -2252,9 +2528,10 @@ class ServerApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ServerThemeDto:
|
||||
"""get_theme
|
||||
) -> VersionCheckStateResponseDto:
|
||||
"""Get version check status
|
||||
|
||||
Retrieve information about the last time the version check ran.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2278,7 +2555,7 @@ class ServerApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_theme_serialize(
|
||||
_param = self._get_version_check_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -2286,7 +2563,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ServerThemeDto",
|
||||
'200': "VersionCheckStateResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -2300,7 +2577,7 @@ class ServerApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_theme_with_http_info(
|
||||
def get_version_check_with_http_info(
|
||||
self,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -2314,9 +2591,10 @@ class ServerApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ServerThemeDto]:
|
||||
"""get_theme
|
||||
) -> ApiResponse[VersionCheckStateResponseDto]:
|
||||
"""Get version check status
|
||||
|
||||
Retrieve information about the last time the version check ran.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2340,7 +2618,7 @@ class ServerApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_theme_serialize(
|
||||
_param = self._get_version_check_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -2348,7 +2626,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ServerThemeDto",
|
||||
'200': "VersionCheckStateResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -2362,7 +2640,7 @@ class ServerApi:
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_theme_without_preload_content(
|
||||
def get_version_check_without_preload_content(
|
||||
self,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -2377,8 +2655,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_theme
|
||||
"""Get version check status
|
||||
|
||||
Retrieve information about the last time the version check ran.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2402,7 +2681,7 @@ class ServerApi:
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_theme_serialize(
|
||||
_param = self._get_version_check_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
@@ -2410,7 +2689,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "ServerThemeDto",
|
||||
'200': "VersionCheckStateResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -2419,7 +2698,7 @@ class ServerApi:
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _get_theme_serialize(
|
||||
def _get_version_check_serialize(
|
||||
self,
|
||||
_request_auth,
|
||||
_content_type,
|
||||
@@ -2459,11 +2738,14 @@ class ServerApi:
|
||||
|
||||
# authentication setting
|
||||
_auth_settings: List[str] = [
|
||||
'cookie',
|
||||
'api_key',
|
||||
'bearer'
|
||||
]
|
||||
|
||||
return self.api_client.param_serialize(
|
||||
method='GET',
|
||||
resource_path='/server/theme',
|
||||
resource_path='/server/version-check',
|
||||
path_params=_path_params,
|
||||
query_params=_query_params,
|
||||
header_params=_header_params,
|
||||
@@ -2495,8 +2777,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[ServerVersionHistoryResponseDto]:
|
||||
"""get_version_history
|
||||
"""Get version history
|
||||
|
||||
Retrieve a list of past versions the server has been on.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2557,8 +2840,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[ServerVersionHistoryResponseDto]]:
|
||||
"""get_version_history
|
||||
"""Get version history
|
||||
|
||||
Retrieve a list of past versions the server has been on.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2619,8 +2903,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_version_history
|
||||
"""Get version history
|
||||
|
||||
Retrieve a list of past versions the server has been on.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2737,8 +3022,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ServerPingResponse:
|
||||
"""ping_server
|
||||
"""Ping
|
||||
|
||||
Pong
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2799,8 +3085,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ServerPingResponse]:
|
||||
"""ping_server
|
||||
"""Ping
|
||||
|
||||
Pong
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2861,8 +3148,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""ping_server
|
||||
"""Ping
|
||||
|
||||
Pong
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -2979,9 +3267,10 @@ class ServerApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> LicenseResponseDto:
|
||||
"""set_server_license
|
||||
) -> UserLicense:
|
||||
"""Set server product key
|
||||
|
||||
Validate and set the server product key if successful.
|
||||
|
||||
:param license_key_dto: (required)
|
||||
:type license_key_dto: LicenseKeyDto
|
||||
@@ -3016,7 +3305,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "LicenseResponseDto",
|
||||
'200': "UserLicense",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -3045,9 +3334,10 @@ class ServerApi:
|
||||
_content_type: Optional[StrictStr] = None,
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[LicenseResponseDto]:
|
||||
"""set_server_license
|
||||
) -> ApiResponse[UserLicense]:
|
||||
"""Set server product key
|
||||
|
||||
Validate and set the server product key if successful.
|
||||
|
||||
:param license_key_dto: (required)
|
||||
:type license_key_dto: LicenseKeyDto
|
||||
@@ -3082,7 +3372,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "LicenseResponseDto",
|
||||
'200': "UserLicense",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -3112,8 +3402,9 @@ class ServerApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""set_server_license
|
||||
"""Set server product key
|
||||
|
||||
Validate and set the server product key if successful.
|
||||
|
||||
:param license_key_dto: (required)
|
||||
:type license_key_dto: LicenseKeyDto
|
||||
@@ -3148,7 +3439,7 @@ class ServerApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "LicenseResponseDto",
|
||||
'200': "UserLicense",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -16,9 +16,12 @@ 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 uuid import UUID
|
||||
from generated.immich.openapi_client.models.session_create_dto import SessionCreateDto
|
||||
from generated.immich.openapi_client.models.session_create_response_dto import SessionCreateResponseDto
|
||||
from generated.immich.openapi_client.models.session_response_dto import SessionResponseDto
|
||||
from generated.immich.openapi_client.models.session_update_dto import SessionUpdateDto
|
||||
|
||||
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
|
||||
from generated.immich.openapi_client.api_response import ApiResponse
|
||||
@@ -38,6 +41,282 @@ class SessionsApi:
|
||||
self.api_client = api_client
|
||||
|
||||
|
||||
@validate_call
|
||||
def create_session(
|
||||
self,
|
||||
session_create_dto: SessionCreateDto,
|
||||
_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,
|
||||
) -> SessionCreateResponseDto:
|
||||
"""Create a session
|
||||
|
||||
Create a session as a child to the current session. This endpoint is used for casting.
|
||||
|
||||
:param session_create_dto: (required)
|
||||
:type session_create_dto: SessionCreateDto
|
||||
: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_session_serialize(
|
||||
session_create_dto=session_create_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "SessionCreateResponseDto",
|
||||
}
|
||||
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_session_with_http_info(
|
||||
self,
|
||||
session_create_dto: SessionCreateDto,
|
||||
_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[SessionCreateResponseDto]:
|
||||
"""Create a session
|
||||
|
||||
Create a session as a child to the current session. This endpoint is used for casting.
|
||||
|
||||
:param session_create_dto: (required)
|
||||
:type session_create_dto: SessionCreateDto
|
||||
: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_session_serialize(
|
||||
session_create_dto=session_create_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "SessionCreateResponseDto",
|
||||
}
|
||||
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_session_without_preload_content(
|
||||
self,
|
||||
session_create_dto: SessionCreateDto,
|
||||
_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 a session
|
||||
|
||||
Create a session as a child to the current session. This endpoint is used for casting.
|
||||
|
||||
:param session_create_dto: (required)
|
||||
:type session_create_dto: SessionCreateDto
|
||||
: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_session_serialize(
|
||||
session_create_dto=session_create_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'201': "SessionCreateResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _create_session_serialize(
|
||||
self,
|
||||
session_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 session_create_dto is not None:
|
||||
_body_params = session_create_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='/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_all_sessions(
|
||||
self,
|
||||
@@ -54,8 +333,9 @@ class SessionsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_all_sessions
|
||||
"""Delete all sessions
|
||||
|
||||
Delete all sessions for the user. This will not delete the current session.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -116,8 +396,9 @@ class SessionsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_all_sessions
|
||||
"""Delete all sessions
|
||||
|
||||
Delete all sessions for the user. This will not delete the current session.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -178,8 +459,9 @@ class SessionsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_all_sessions
|
||||
"""Delete all sessions
|
||||
|
||||
Delete all sessions for the user. This will not delete the current session.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -279,7 +561,7 @@ class SessionsApi:
|
||||
@validate_call
|
||||
def delete_session(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -293,11 +575,12 @@ class SessionsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_session
|
||||
"""Delete a session
|
||||
|
||||
Delete a specific session by id.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -345,7 +628,7 @@ class SessionsApi:
|
||||
@validate_call
|
||||
def delete_session_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -359,11 +642,12 @@ class SessionsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_session
|
||||
"""Delete a session
|
||||
|
||||
Delete a specific session by id.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -411,7 +695,7 @@ class SessionsApi:
|
||||
@validate_call
|
||||
def delete_session_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -425,11 +709,12 @@ class SessionsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_session
|
||||
"""Delete a session
|
||||
|
||||
Delete a specific session by id.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -545,8 +830,9 @@ class SessionsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[SessionResponseDto]:
|
||||
"""get_sessions
|
||||
"""Retrieve sessions
|
||||
|
||||
Retrieve a list of sessions for the user.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -607,8 +893,9 @@ class SessionsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[SessionResponseDto]]:
|
||||
"""get_sessions
|
||||
"""Retrieve sessions
|
||||
|
||||
Retrieve a list of sessions for the user.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -669,8 +956,9 @@ class SessionsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_sessions
|
||||
"""Retrieve sessions
|
||||
|
||||
Retrieve a list of sessions for the user.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -772,3 +1060,553 @@ class SessionsApi:
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def lock_session(
|
||||
self,
|
||||
id: UUID,
|
||||
_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:
|
||||
"""Lock a session
|
||||
|
||||
Lock a specific session by id.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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._lock_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 lock_session_with_http_info(
|
||||
self,
|
||||
id: UUID,
|
||||
_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]:
|
||||
"""Lock a session
|
||||
|
||||
Lock a specific session by id.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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._lock_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 lock_session_without_preload_content(
|
||||
self,
|
||||
id: UUID,
|
||||
_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:
|
||||
"""Lock a session
|
||||
|
||||
Lock a specific session by id.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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._lock_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 _lock_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='POST',
|
||||
resource_path='/sessions/{id}/lock',
|
||||
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_session(
|
||||
self,
|
||||
id: UUID,
|
||||
session_update_dto: SessionUpdateDto,
|
||||
_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,
|
||||
) -> SessionResponseDto:
|
||||
"""(Deprecated) Update a session
|
||||
|
||||
Update a specific session identified by id.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
:param session_update_dto: (required)
|
||||
:type session_update_dto: SessionUpdateDto
|
||||
: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("PUT /sessions/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_session_serialize(
|
||||
id=id,
|
||||
session_update_dto=session_update_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "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 update_session_with_http_info(
|
||||
self,
|
||||
id: UUID,
|
||||
session_update_dto: SessionUpdateDto,
|
||||
_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[SessionResponseDto]:
|
||||
"""(Deprecated) Update a session
|
||||
|
||||
Update a specific session identified by id.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
:param session_update_dto: (required)
|
||||
:type session_update_dto: SessionUpdateDto
|
||||
: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("PUT /sessions/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_session_serialize(
|
||||
id=id,
|
||||
session_update_dto=session_update_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "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 update_session_without_preload_content(
|
||||
self,
|
||||
id: UUID,
|
||||
session_update_dto: SessionUpdateDto,
|
||||
_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) Update a session
|
||||
|
||||
Update a specific session identified by id.
|
||||
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
:param session_update_dto: (required)
|
||||
:type session_update_dto: SessionUpdateDto
|
||||
: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("PUT /sessions/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_session_serialize(
|
||||
id=id,
|
||||
session_update_dto=session_update_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "SessionResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _update_session_serialize(
|
||||
self,
|
||||
id,
|
||||
session_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
|
||||
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
|
||||
if session_update_dto is not None:
|
||||
_body_params = session_update_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='/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
|
||||
)
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -16,8 +16,10 @@ 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 pydantic import Field
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from uuid import UUID
|
||||
from generated.immich.openapi_client.models.bulk_ids_dto import BulkIdsDto
|
||||
from generated.immich.openapi_client.models.stack_create_dto import StackCreateDto
|
||||
from generated.immich.openapi_client.models.stack_response_dto import StackResponseDto
|
||||
@@ -58,8 +60,9 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> StackResponseDto:
|
||||
"""create_stack
|
||||
"""Create a stack
|
||||
|
||||
Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
|
||||
|
||||
:param stack_create_dto: (required)
|
||||
:type stack_create_dto: StackCreateDto
|
||||
@@ -124,8 +127,9 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[StackResponseDto]:
|
||||
"""create_stack
|
||||
"""Create a stack
|
||||
|
||||
Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
|
||||
|
||||
:param stack_create_dto: (required)
|
||||
:type stack_create_dto: StackCreateDto
|
||||
@@ -190,8 +194,9 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""create_stack
|
||||
"""Create a stack
|
||||
|
||||
Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
|
||||
|
||||
:param stack_create_dto: (required)
|
||||
:type stack_create_dto: StackCreateDto
|
||||
@@ -317,7 +322,7 @@ class StacksApi:
|
||||
@validate_call
|
||||
def delete_stack(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -331,11 +336,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_stack
|
||||
"""Delete a stack
|
||||
|
||||
Delete a specific stack by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -383,7 +389,7 @@ class StacksApi:
|
||||
@validate_call
|
||||
def delete_stack_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -397,11 +403,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_stack
|
||||
"""Delete a stack
|
||||
|
||||
Delete a specific stack by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -449,7 +456,7 @@ class StacksApi:
|
||||
@validate_call
|
||||
def delete_stack_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -463,11 +470,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_stack
|
||||
"""Delete a stack
|
||||
|
||||
Delete a specific stack by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -584,8 +592,9 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_stacks
|
||||
"""Delete stacks
|
||||
|
||||
Delete multiple stacks by providing a list of stack IDs.
|
||||
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
@@ -650,8 +659,9 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_stacks
|
||||
"""Delete stacks
|
||||
|
||||
Delete multiple stacks by providing a list of stack IDs.
|
||||
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
@@ -716,8 +726,9 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_stacks
|
||||
"""Delete stacks
|
||||
|
||||
Delete multiple stacks by providing a list of stack IDs.
|
||||
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
@@ -836,7 +847,7 @@ class StacksApi:
|
||||
@validate_call
|
||||
def get_stack(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -850,11 +861,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> StackResponseDto:
|
||||
"""get_stack
|
||||
"""Retrieve a stack
|
||||
|
||||
Retrieve a specific stack by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -902,7 +914,7 @@ class StacksApi:
|
||||
@validate_call
|
||||
def get_stack_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -916,11 +928,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[StackResponseDto]:
|
||||
"""get_stack
|
||||
"""Retrieve a stack
|
||||
|
||||
Retrieve a specific stack by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -968,7 +981,7 @@ class StacksApi:
|
||||
@validate_call
|
||||
def get_stack_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -982,11 +995,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_stack
|
||||
"""Retrieve a stack
|
||||
|
||||
Retrieve a specific stack by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1093,10 +1107,281 @@ class StacksApi:
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def remove_asset_from_stack(
|
||||
self,
|
||||
asset_id: UUID,
|
||||
id: UUID,
|
||||
_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:
|
||||
"""Remove an asset from a stack
|
||||
|
||||
Remove a specific asset from a stack by providing the stack ID and asset ID.
|
||||
|
||||
:param asset_id: (required)
|
||||
:type asset_id: UUID
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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._remove_asset_from_stack_serialize(
|
||||
asset_id=asset_id,
|
||||
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 remove_asset_from_stack_with_http_info(
|
||||
self,
|
||||
asset_id: UUID,
|
||||
id: UUID,
|
||||
_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]:
|
||||
"""Remove an asset from a stack
|
||||
|
||||
Remove a specific asset from a stack by providing the stack ID and asset ID.
|
||||
|
||||
:param asset_id: (required)
|
||||
:type asset_id: UUID
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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._remove_asset_from_stack_serialize(
|
||||
asset_id=asset_id,
|
||||
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 remove_asset_from_stack_without_preload_content(
|
||||
self,
|
||||
asset_id: UUID,
|
||||
id: UUID,
|
||||
_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:
|
||||
"""Remove an asset from a stack
|
||||
|
||||
Remove a specific asset from a stack by providing the stack ID and asset ID.
|
||||
|
||||
:param asset_id: (required)
|
||||
:type asset_id: UUID
|
||||
:param id: (required)
|
||||
:type id: UUID
|
||||
: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._remove_asset_from_stack_serialize(
|
||||
asset_id=asset_id,
|
||||
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 _remove_asset_from_stack_serialize(
|
||||
self,
|
||||
asset_id,
|
||||
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 asset_id is not None:
|
||||
_path_params['assetId'] = asset_id
|
||||
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='/stacks/{id}/assets/{assetId}',
|
||||
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 search_stacks(
|
||||
self,
|
||||
primary_asset_id: Optional[StrictStr] = None,
|
||||
primary_asset_id: Annotated[Optional[UUID], Field(description="Filter by primary asset ID")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1110,11 +1395,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[StackResponseDto]:
|
||||
"""search_stacks
|
||||
"""Retrieve stacks
|
||||
|
||||
Retrieve a list of stacks.
|
||||
|
||||
:param primary_asset_id:
|
||||
:type primary_asset_id: str
|
||||
:param primary_asset_id: Filter by primary asset ID
|
||||
:type primary_asset_id: UUID
|
||||
: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
|
||||
@@ -1162,7 +1448,7 @@ class StacksApi:
|
||||
@validate_call
|
||||
def search_stacks_with_http_info(
|
||||
self,
|
||||
primary_asset_id: Optional[StrictStr] = None,
|
||||
primary_asset_id: Annotated[Optional[UUID], Field(description="Filter by primary asset ID")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1176,11 +1462,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[StackResponseDto]]:
|
||||
"""search_stacks
|
||||
"""Retrieve stacks
|
||||
|
||||
Retrieve a list of stacks.
|
||||
|
||||
:param primary_asset_id:
|
||||
:type primary_asset_id: str
|
||||
:param primary_asset_id: Filter by primary asset ID
|
||||
:type primary_asset_id: UUID
|
||||
: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
|
||||
@@ -1228,7 +1515,7 @@ class StacksApi:
|
||||
@validate_call
|
||||
def search_stacks_without_preload_content(
|
||||
self,
|
||||
primary_asset_id: Optional[StrictStr] = None,
|
||||
primary_asset_id: Annotated[Optional[UUID], Field(description="Filter by primary asset ID")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1242,11 +1529,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""search_stacks
|
||||
"""Retrieve stacks
|
||||
|
||||
Retrieve a list of stacks.
|
||||
|
||||
:param primary_asset_id:
|
||||
:type primary_asset_id: str
|
||||
:param primary_asset_id: Filter by primary asset ID
|
||||
:type primary_asset_id: UUID
|
||||
: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
|
||||
@@ -1358,7 +1646,7 @@ class StacksApi:
|
||||
@validate_call
|
||||
def update_stack(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
stack_update_dto: StackUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1373,11 +1661,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> StackResponseDto:
|
||||
"""update_stack
|
||||
"""(Deprecated) Update a stack
|
||||
|
||||
Update an existing stack by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param stack_update_dto: (required)
|
||||
:type stack_update_dto: StackUpdateDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1401,6 +1690,7 @@ class StacksApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /stacks/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_stack_serialize(
|
||||
id=id,
|
||||
@@ -1428,7 +1718,7 @@ class StacksApi:
|
||||
@validate_call
|
||||
def update_stack_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
stack_update_dto: StackUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1443,11 +1733,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[StackResponseDto]:
|
||||
"""update_stack
|
||||
"""(Deprecated) Update a stack
|
||||
|
||||
Update an existing stack by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param stack_update_dto: (required)
|
||||
:type stack_update_dto: StackUpdateDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1471,6 +1762,7 @@ class StacksApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /stacks/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_stack_serialize(
|
||||
id=id,
|
||||
@@ -1498,7 +1790,7 @@ class StacksApi:
|
||||
@validate_call
|
||||
def update_stack_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
stack_update_dto: StackUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1513,11 +1805,12 @@ class StacksApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""update_stack
|
||||
"""(Deprecated) Update a stack
|
||||
|
||||
Update an existing stack by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param stack_update_dto: (required)
|
||||
:type stack_update_dto: StackUpdateDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1541,6 +1834,7 @@ class StacksApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /stacks/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_stack_serialize(
|
||||
id=id,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -17,10 +17,6 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
from typing_extensions import Annotated
|
||||
|
||||
from typing import List
|
||||
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_full_sync_dto import AssetFullSyncDto
|
||||
from generated.immich.openapi_client.models.asset_response_dto import AssetResponseDto
|
||||
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
|
||||
@@ -61,8 +57,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_sync_ack
|
||||
"""Delete acknowledgements
|
||||
|
||||
Delete specific synchronization acknowledgments.
|
||||
|
||||
:param sync_ack_delete_dto: (required)
|
||||
:type sync_ack_delete_dto: SyncAckDeleteDto
|
||||
@@ -127,8 +124,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_sync_ack
|
||||
"""Delete acknowledgements
|
||||
|
||||
Delete specific synchronization acknowledgments.
|
||||
|
||||
:param sync_ack_delete_dto: (required)
|
||||
:type sync_ack_delete_dto: SyncAckDeleteDto
|
||||
@@ -193,8 +191,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_sync_ack
|
||||
"""Delete acknowledgements
|
||||
|
||||
Delete specific synchronization acknowledgments.
|
||||
|
||||
:param sync_ack_delete_dto: (required)
|
||||
:type sync_ack_delete_dto: SyncAckDeleteDto
|
||||
@@ -310,552 +309,6 @@ class SyncApi:
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_delta_sync(
|
||||
self,
|
||||
asset_delta_sync_dto: AssetDeltaSyncDto,
|
||||
_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,
|
||||
) -> AssetDeltaSyncResponseDto:
|
||||
"""get_delta_sync
|
||||
|
||||
|
||||
:param asset_delta_sync_dto: (required)
|
||||
:type asset_delta_sync_dto: AssetDeltaSyncDto
|
||||
: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_delta_sync_serialize(
|
||||
asset_delta_sync_dto=asset_delta_sync_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "AssetDeltaSyncResponseDto",
|
||||
}
|
||||
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_delta_sync_with_http_info(
|
||||
self,
|
||||
asset_delta_sync_dto: AssetDeltaSyncDto,
|
||||
_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[AssetDeltaSyncResponseDto]:
|
||||
"""get_delta_sync
|
||||
|
||||
|
||||
:param asset_delta_sync_dto: (required)
|
||||
:type asset_delta_sync_dto: AssetDeltaSyncDto
|
||||
: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_delta_sync_serialize(
|
||||
asset_delta_sync_dto=asset_delta_sync_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "AssetDeltaSyncResponseDto",
|
||||
}
|
||||
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_delta_sync_without_preload_content(
|
||||
self,
|
||||
asset_delta_sync_dto: AssetDeltaSyncDto,
|
||||
_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_delta_sync
|
||||
|
||||
|
||||
:param asset_delta_sync_dto: (required)
|
||||
:type asset_delta_sync_dto: AssetDeltaSyncDto
|
||||
: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_delta_sync_serialize(
|
||||
asset_delta_sync_dto=asset_delta_sync_dto,
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "AssetDeltaSyncResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _get_delta_sync_serialize(
|
||||
self,
|
||||
asset_delta_sync_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 asset_delta_sync_dto is not None:
|
||||
_body_params = asset_delta_sync_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='/sync/delta-sync',
|
||||
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_full_sync_for_user(
|
||||
self,
|
||||
asset_full_sync_dto: AssetFullSyncDto,
|
||||
_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_full_sync_for_user
|
||||
|
||||
|
||||
:param asset_full_sync_dto: (required)
|
||||
:type asset_full_sync_dto: AssetFullSyncDto
|
||||
: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_full_sync_for_user_serialize(
|
||||
asset_full_sync_dto=asset_full_sync_dto,
|
||||
_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_full_sync_for_user_with_http_info(
|
||||
self,
|
||||
asset_full_sync_dto: AssetFullSyncDto,
|
||||
_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_full_sync_for_user
|
||||
|
||||
|
||||
:param asset_full_sync_dto: (required)
|
||||
:type asset_full_sync_dto: AssetFullSyncDto
|
||||
: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_full_sync_for_user_serialize(
|
||||
asset_full_sync_dto=asset_full_sync_dto,
|
||||
_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_full_sync_for_user_without_preload_content(
|
||||
self,
|
||||
asset_full_sync_dto: AssetFullSyncDto,
|
||||
_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_full_sync_for_user
|
||||
|
||||
|
||||
:param asset_full_sync_dto: (required)
|
||||
:type asset_full_sync_dto: AssetFullSyncDto
|
||||
: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_full_sync_for_user_serialize(
|
||||
asset_full_sync_dto=asset_full_sync_dto,
|
||||
_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_full_sync_for_user_serialize(
|
||||
self,
|
||||
asset_full_sync_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 asset_full_sync_dto is not None:
|
||||
_body_params = asset_full_sync_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='/sync/full-sync',
|
||||
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_sync_ack(
|
||||
self,
|
||||
@@ -872,8 +325,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[SyncAckDto]:
|
||||
"""get_sync_ack
|
||||
"""Retrieve acknowledgements
|
||||
|
||||
Retrieve the synchronization acknowledgments for the current session.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -934,8 +388,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[SyncAckDto]]:
|
||||
"""get_sync_ack
|
||||
"""Retrieve acknowledgements
|
||||
|
||||
Retrieve the synchronization acknowledgments for the current session.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -996,8 +451,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_sync_ack
|
||||
"""Retrieve acknowledgements
|
||||
|
||||
Retrieve the synchronization acknowledgments for the current session.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1118,8 +574,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""get_sync_stream
|
||||
"""Stream sync changes
|
||||
|
||||
Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes.
|
||||
|
||||
:param sync_stream_dto: (required)
|
||||
:type sync_stream_dto: SyncStreamDto
|
||||
@@ -1184,8 +641,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""get_sync_stream
|
||||
"""Stream sync changes
|
||||
|
||||
Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes.
|
||||
|
||||
:param sync_stream_dto: (required)
|
||||
:type sync_stream_dto: SyncStreamDto
|
||||
@@ -1250,8 +708,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_sync_stream
|
||||
"""Stream sync changes
|
||||
|
||||
Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes.
|
||||
|
||||
:param sync_stream_dto: (required)
|
||||
:type sync_stream_dto: SyncStreamDto
|
||||
@@ -1384,8 +843,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""send_sync_ack
|
||||
"""Acknowledge changes
|
||||
|
||||
Send a list of synchronization acknowledgements to confirm that the latest changes have been received.
|
||||
|
||||
:param sync_ack_set_dto: (required)
|
||||
:type sync_ack_set_dto: SyncAckSetDto
|
||||
@@ -1450,8 +910,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""send_sync_ack
|
||||
"""Acknowledge changes
|
||||
|
||||
Send a list of synchronization acknowledgements to confirm that the latest changes have been received.
|
||||
|
||||
:param sync_ack_set_dto: (required)
|
||||
:type sync_ack_set_dto: SyncAckSetDto
|
||||
@@ -1516,8 +977,9 @@ class SyncApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""send_sync_ack
|
||||
"""Acknowledge changes
|
||||
|
||||
Send a list of synchronization acknowledgements to confirm that the latest changes have been received.
|
||||
|
||||
:param sync_ack_set_dto: (required)
|
||||
:type sync_ack_set_dto: SyncAckSetDto
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -53,8 +53,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> SystemConfigDto:
|
||||
"""get_config
|
||||
"""Get system configuration
|
||||
|
||||
Retrieve the current system configuration.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -115,8 +116,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[SystemConfigDto]:
|
||||
"""get_config
|
||||
"""Get system configuration
|
||||
|
||||
Retrieve the current system configuration.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -177,8 +179,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_config
|
||||
"""Get system configuration
|
||||
|
||||
Retrieve the current system configuration.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -298,8 +301,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> SystemConfigDto:
|
||||
"""get_config_defaults
|
||||
"""Get system configuration defaults
|
||||
|
||||
Retrieve the default values for the system configuration.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -360,8 +364,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[SystemConfigDto]:
|
||||
"""get_config_defaults
|
||||
"""Get system configuration defaults
|
||||
|
||||
Retrieve the default values for the system configuration.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -422,8 +427,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_config_defaults
|
||||
"""Get system configuration defaults
|
||||
|
||||
Retrieve the default values for the system configuration.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -543,8 +549,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> SystemConfigTemplateStorageOptionDto:
|
||||
"""get_storage_template_options
|
||||
"""Get storage template options
|
||||
|
||||
Retrieve exemplary storage template options.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -605,8 +612,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[SystemConfigTemplateStorageOptionDto]:
|
||||
"""get_storage_template_options
|
||||
"""Get storage template options
|
||||
|
||||
Retrieve exemplary storage template options.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -667,8 +675,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_storage_template_options
|
||||
"""Get storage template options
|
||||
|
||||
Retrieve exemplary storage template options.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -789,8 +798,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> SystemConfigDto:
|
||||
"""update_config
|
||||
"""Update system configuration
|
||||
|
||||
Update the system configuration with a new system configuration.
|
||||
|
||||
:param system_config_dto: (required)
|
||||
:type system_config_dto: SystemConfigDto
|
||||
@@ -855,8 +865,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[SystemConfigDto]:
|
||||
"""update_config
|
||||
"""Update system configuration
|
||||
|
||||
Update the system configuration with a new system configuration.
|
||||
|
||||
:param system_config_dto: (required)
|
||||
:type system_config_dto: SystemConfigDto
|
||||
@@ -921,8 +932,9 @@ class SystemConfigApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""update_config
|
||||
"""Update system configuration
|
||||
|
||||
Update the system configuration with a new system configuration.
|
||||
|
||||
:param system_config_dto: (required)
|
||||
:type system_config_dto: SystemConfigDto
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -18,6 +18,7 @@ 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.models.version_check_state_response_dto import VersionCheckStateResponseDto
|
||||
|
||||
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
|
||||
from generated.immich.openapi_client.api_response import ApiResponse
|
||||
@@ -53,8 +54,9 @@ class SystemMetadataApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> AdminOnboardingUpdateDto:
|
||||
"""get_admin_onboarding
|
||||
"""Retrieve admin onboarding
|
||||
|
||||
Retrieve the current admin onboarding status.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -115,8 +117,9 @@ class SystemMetadataApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[AdminOnboardingUpdateDto]:
|
||||
"""get_admin_onboarding
|
||||
"""Retrieve admin onboarding
|
||||
|
||||
Retrieve the current admin onboarding status.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -177,8 +180,9 @@ class SystemMetadataApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_admin_onboarding
|
||||
"""Retrieve admin onboarding
|
||||
|
||||
Retrieve the current admin onboarding status.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -298,8 +302,9 @@ class SystemMetadataApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ReverseGeocodingStateResponseDto:
|
||||
"""get_reverse_geocoding_state
|
||||
"""Retrieve reverse geocoding state
|
||||
|
||||
Retrieve the current state of the reverse geocoding import.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -360,8 +365,9 @@ class SystemMetadataApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[ReverseGeocodingStateResponseDto]:
|
||||
"""get_reverse_geocoding_state
|
||||
"""Retrieve reverse geocoding state
|
||||
|
||||
Retrieve the current state of the reverse geocoding import.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -422,8 +428,9 @@ class SystemMetadataApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_reverse_geocoding_state
|
||||
"""Retrieve reverse geocoding state
|
||||
|
||||
Retrieve the current state of the reverse geocoding import.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -527,6 +534,254 @@ class SystemMetadataApi:
|
||||
|
||||
|
||||
|
||||
@validate_call
|
||||
def get_version_check_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,
|
||||
) -> VersionCheckStateResponseDto:
|
||||
"""Retrieve version check state
|
||||
|
||||
Retrieve the current state of the version check process.
|
||||
|
||||
: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_version_check_state_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "VersionCheckStateResponseDto",
|
||||
}
|
||||
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_version_check_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[VersionCheckStateResponseDto]:
|
||||
"""Retrieve version check state
|
||||
|
||||
Retrieve the current state of the version check process.
|
||||
|
||||
: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_version_check_state_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "VersionCheckStateResponseDto",
|
||||
}
|
||||
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_version_check_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:
|
||||
"""Retrieve version check state
|
||||
|
||||
Retrieve the current state of the version check process.
|
||||
|
||||
: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_version_check_state_serialize(
|
||||
_request_auth=_request_auth,
|
||||
_content_type=_content_type,
|
||||
_headers=_headers,
|
||||
_host_index=_host_index
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "VersionCheckStateResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
_request_timeout=_request_timeout
|
||||
)
|
||||
return response_data.response
|
||||
|
||||
|
||||
def _get_version_check_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/version-check-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,
|
||||
@@ -544,8 +799,9 @@ class SystemMetadataApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""update_admin_onboarding
|
||||
"""Update admin onboarding
|
||||
|
||||
Update the admin onboarding status.
|
||||
|
||||
:param admin_onboarding_update_dto: (required)
|
||||
:type admin_onboarding_update_dto: AdminOnboardingUpdateDto
|
||||
@@ -610,8 +866,9 @@ class SystemMetadataApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""update_admin_onboarding
|
||||
"""Update admin onboarding
|
||||
|
||||
Update the admin onboarding status.
|
||||
|
||||
:param admin_onboarding_update_dto: (required)
|
||||
:type admin_onboarding_update_dto: AdminOnboardingUpdateDto
|
||||
@@ -676,8 +933,9 @@ class SystemMetadataApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""update_admin_onboarding
|
||||
"""Update admin onboarding
|
||||
|
||||
Update the admin onboarding status.
|
||||
|
||||
:param admin_onboarding_update_dto: (required)
|
||||
:type admin_onboarding_update_dto: AdminOnboardingUpdateDto
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -16,8 +16,8 @@ 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 uuid import UUID
|
||||
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.tag_bulk_assets_dto import TagBulkAssetsDto
|
||||
@@ -62,8 +62,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> TagBulkAssetsResponseDto:
|
||||
"""bulk_tag_assets
|
||||
"""Tag assets
|
||||
|
||||
Add multiple tags to multiple assets in a single request.
|
||||
|
||||
:param tag_bulk_assets_dto: (required)
|
||||
:type tag_bulk_assets_dto: TagBulkAssetsDto
|
||||
@@ -128,8 +129,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[TagBulkAssetsResponseDto]:
|
||||
"""bulk_tag_assets
|
||||
"""Tag assets
|
||||
|
||||
Add multiple tags to multiple assets in a single request.
|
||||
|
||||
:param tag_bulk_assets_dto: (required)
|
||||
:type tag_bulk_assets_dto: TagBulkAssetsDto
|
||||
@@ -194,8 +196,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""bulk_tag_assets
|
||||
"""Tag assets
|
||||
|
||||
Add multiple tags to multiple assets in a single request.
|
||||
|
||||
:param tag_bulk_assets_dto: (required)
|
||||
:type tag_bulk_assets_dto: TagBulkAssetsDto
|
||||
@@ -335,8 +338,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> TagResponseDto:
|
||||
"""create_tag
|
||||
"""Create a tag
|
||||
|
||||
Create a new tag by providing a name and optional color.
|
||||
|
||||
:param tag_create_dto: (required)
|
||||
:type tag_create_dto: TagCreateDto
|
||||
@@ -401,8 +405,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[TagResponseDto]:
|
||||
"""create_tag
|
||||
"""Create a tag
|
||||
|
||||
Create a new tag by providing a name and optional color.
|
||||
|
||||
:param tag_create_dto: (required)
|
||||
:type tag_create_dto: TagCreateDto
|
||||
@@ -467,8 +472,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""create_tag
|
||||
"""Create a tag
|
||||
|
||||
Create a new tag by providing a name and optional color.
|
||||
|
||||
:param tag_create_dto: (required)
|
||||
:type tag_create_dto: TagCreateDto
|
||||
@@ -594,7 +600,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def delete_tag(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -608,11 +614,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> None:
|
||||
"""delete_tag
|
||||
"""Delete a tag
|
||||
|
||||
Delete a specific tag by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -660,7 +667,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def delete_tag_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -674,11 +681,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[None]:
|
||||
"""delete_tag
|
||||
"""Delete a tag
|
||||
|
||||
Delete a specific tag by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -726,7 +734,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def delete_tag_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -740,11 +748,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""delete_tag
|
||||
"""Delete a tag
|
||||
|
||||
Delete a specific tag by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -860,8 +869,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[TagResponseDto]:
|
||||
"""get_all_tags
|
||||
"""Retrieve tags
|
||||
|
||||
Retrieve a list of all tags.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -922,8 +932,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[TagResponseDto]]:
|
||||
"""get_all_tags
|
||||
"""Retrieve tags
|
||||
|
||||
Retrieve a list of all tags.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -984,8 +995,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_all_tags
|
||||
"""Retrieve tags
|
||||
|
||||
Retrieve a list of all tags.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -1092,7 +1104,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def get_tag_by_id(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1106,11 +1118,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> TagResponseDto:
|
||||
"""get_tag_by_id
|
||||
"""Retrieve a tag
|
||||
|
||||
Retrieve a specific tag by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1158,7 +1171,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def get_tag_by_id_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1172,11 +1185,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[TagResponseDto]:
|
||||
"""get_tag_by_id
|
||||
"""Retrieve a tag
|
||||
|
||||
Retrieve a specific tag by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1224,7 +1238,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def get_tag_by_id_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -1238,11 +1252,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_tag_by_id
|
||||
"""Retrieve a tag
|
||||
|
||||
Retrieve a specific tag by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
: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
|
||||
@@ -1352,7 +1367,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def tag_assets(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1367,11 +1382,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[BulkIdResponseDto]:
|
||||
"""tag_assets
|
||||
"""Tag assets
|
||||
|
||||
Add a tag to all the specified assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1422,7 +1438,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def tag_assets_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1437,11 +1453,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[BulkIdResponseDto]]:
|
||||
"""tag_assets
|
||||
"""Tag assets
|
||||
|
||||
Add a tag to all the specified assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1492,7 +1509,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def tag_assets_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1507,11 +1524,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""tag_assets
|
||||
"""Tag assets
|
||||
|
||||
Add a tag to all the specified assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1640,7 +1658,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def untag_assets(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1655,11 +1673,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[BulkIdResponseDto]:
|
||||
"""untag_assets
|
||||
"""Untag assets
|
||||
|
||||
Remove a tag from all the specified assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1710,7 +1729,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def untag_assets_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1725,11 +1744,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[BulkIdResponseDto]]:
|
||||
"""untag_assets
|
||||
"""Untag assets
|
||||
|
||||
Remove a tag from all the specified assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1780,7 +1800,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def untag_assets_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
bulk_ids_dto: BulkIdsDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1795,11 +1815,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""untag_assets
|
||||
"""Untag assets
|
||||
|
||||
Remove a tag from all the specified assets.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1928,7 +1949,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def update_tag(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
tag_update_dto: TagUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -1943,11 +1964,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> TagResponseDto:
|
||||
"""update_tag
|
||||
"""(Deprecated) Update a tag
|
||||
|
||||
Update an existing tag identified by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param tag_update_dto: (required)
|
||||
:type tag_update_dto: TagUpdateDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -1971,6 +1993,7 @@ class TagsApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /tags/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_tag_serialize(
|
||||
id=id,
|
||||
@@ -1998,7 +2021,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def update_tag_with_http_info(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
tag_update_dto: TagUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -2013,11 +2036,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[TagResponseDto]:
|
||||
"""update_tag
|
||||
"""(Deprecated) Update a tag
|
||||
|
||||
Update an existing tag identified by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param tag_update_dto: (required)
|
||||
:type tag_update_dto: TagUpdateDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -2041,6 +2065,7 @@ class TagsApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /tags/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_tag_serialize(
|
||||
id=id,
|
||||
@@ -2068,7 +2093,7 @@ class TagsApi:
|
||||
@validate_call
|
||||
def update_tag_without_preload_content(
|
||||
self,
|
||||
id: StrictStr,
|
||||
id: UUID,
|
||||
tag_update_dto: TagUpdateDto,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
@@ -2083,11 +2108,12 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""update_tag
|
||||
"""(Deprecated) Update a tag
|
||||
|
||||
Update an existing tag identified by its ID.
|
||||
|
||||
:param id: (required)
|
||||
:type id: str
|
||||
:type id: UUID
|
||||
:param tag_update_dto: (required)
|
||||
:type tag_update_dto: TagUpdateDto
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
@@ -2111,6 +2137,7 @@ class TagsApi:
|
||||
:type _host_index: int, optional
|
||||
:return: Returns the result object.
|
||||
""" # noqa: E501
|
||||
warnings.warn("PUT /tags/{id} is deprecated.", DeprecationWarning)
|
||||
|
||||
_param = self._update_tag_serialize(
|
||||
id=id,
|
||||
@@ -2230,8 +2257,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> List[TagResponseDto]:
|
||||
"""upsert_tags
|
||||
"""Upsert tags
|
||||
|
||||
Create or update multiple tags in a single request.
|
||||
|
||||
:param tag_upsert_dto: (required)
|
||||
:type tag_upsert_dto: TagUpsertDto
|
||||
@@ -2296,8 +2324,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[List[TagResponseDto]]:
|
||||
"""upsert_tags
|
||||
"""Upsert tags
|
||||
|
||||
Create or update multiple tags in a single request.
|
||||
|
||||
:param tag_upsert_dto: (required)
|
||||
:type tag_upsert_dto: TagUpsertDto
|
||||
@@ -2362,8 +2391,9 @@ class TagsApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""upsert_tags
|
||||
"""Upsert tags
|
||||
|
||||
Create or update multiple tags in a single request.
|
||||
|
||||
:param tag_upsert_dto: (required)
|
||||
:type tag_upsert_dto: TagUpsertDto
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -16,12 +16,15 @@ 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 pydantic import Field, StrictBool, StrictStr
|
||||
from typing import List, Optional
|
||||
from typing_extensions import Annotated
|
||||
from uuid import UUID
|
||||
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.models.asset_order_by import AssetOrderBy
|
||||
from generated.immich.openapi_client.models.asset_visibility import AssetVisibility
|
||||
from generated.immich.openapi_client.models.time_bucket_asset_response_dto import TimeBucketAssetResponseDto
|
||||
from generated.immich.openapi_client.models.time_buckets_response_dto import TimeBucketsResponseDto
|
||||
|
||||
from generated.immich.openapi_client.api_client import ApiClient, RequestSerialized
|
||||
from generated.immich.openapi_client.api_response import ApiResponse
|
||||
@@ -44,19 +47,22 @@ class TimelineApi:
|
||||
@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,
|
||||
time_bucket: Annotated[StrictStr, Field(description="Time bucket identifier in YYYY-MM-DD format")],
|
||||
album_id: Annotated[Optional[UUID], Field(description="Filter assets belonging to a specific album")] = None,
|
||||
bbox: Annotated[Optional[StrictStr], Field(description="Bounding box coordinates as west,south,east,north (WGS84)")] = None,
|
||||
is_favorite: Annotated[Optional[StrictBool], Field(description="Filter by favorite status (true for favorites only, false for non-favorites only)")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Filter by trash status (true for trashed assets only, false for non-trashed only)")] = 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,
|
||||
order: Annotated[Optional[AssetOrder], Field(description="Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)")] = None,
|
||||
order_by: Annotated[Optional[AssetOrderBy], Field(description="Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)")] = None,
|
||||
person_id: Annotated[Optional[UUID], Field(description="Filter assets containing a specific person (face recognition)")] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
tag_id: Annotated[Optional[UUID], Field(description="Filter assets with a specific tag")] = None,
|
||||
user_id: Annotated[Optional[UUID], Field(description="Filter assets by specific user ID")] = None,
|
||||
visibility: Annotated[Optional[AssetVisibility], Field(description="Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)")] = None,
|
||||
with_coordinates: Annotated[Optional[StrictBool], Field(description="Include location data in the response")] = None,
|
||||
with_partners: Annotated[Optional[StrictBool], Field(description="Include assets shared by partners")] = None,
|
||||
with_stacked: Annotated[Optional[StrictBool], Field(description="Include stacked assets in the response. When true, only primary assets from stacks are returned.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -69,35 +75,42 @@ class TimelineApi:
|
||||
_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
|
||||
) -> TimeBucketAssetResponseDto:
|
||||
"""Get time bucket
|
||||
|
||||
Retrieve a string of all asset ids in a given time bucket.
|
||||
|
||||
:param size: (required)
|
||||
:type size: TimeBucketSize
|
||||
:param time_bucket: (required)
|
||||
:param time_bucket: Time bucket identifier in YYYY-MM-DD format (required)
|
||||
:type time_bucket: str
|
||||
:param album_id:
|
||||
:type album_id: str
|
||||
:param is_archived:
|
||||
:type is_archived: bool
|
||||
:param is_favorite:
|
||||
:param album_id: Filter assets belonging to a specific album
|
||||
:type album_id: UUID
|
||||
:param bbox: Bounding box coordinates as west,south,east,north (WGS84)
|
||||
:type bbox: str
|
||||
:param is_favorite: Filter by favorite status (true for favorites only, false for non-favorites only)
|
||||
:type is_favorite: bool
|
||||
:param is_trashed:
|
||||
:param is_trashed: Filter by trash status (true for trashed assets only, false for non-trashed only)
|
||||
:type is_trashed: bool
|
||||
:param key:
|
||||
:type key: str
|
||||
:param order:
|
||||
:param order: Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
|
||||
: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:
|
||||
:param order_by: Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)
|
||||
:type order_by: AssetOrderBy
|
||||
:param person_id: Filter assets containing a specific person (face recognition)
|
||||
:type person_id: UUID
|
||||
:param slug:
|
||||
:type slug: str
|
||||
:param tag_id: Filter assets with a specific tag
|
||||
:type tag_id: UUID
|
||||
:param user_id: Filter assets by specific user ID
|
||||
:type user_id: UUID
|
||||
:param visibility: Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
|
||||
:type visibility: AssetVisibility
|
||||
:param with_coordinates: Include location data in the response
|
||||
:type with_coordinates: bool
|
||||
:param with_partners: Include assets shared by partners
|
||||
:type with_partners: bool
|
||||
:param with_stacked:
|
||||
:param with_stacked: Include stacked assets in the response. When true, only primary assets from stacks are returned.
|
||||
:type with_stacked: bool
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -122,17 +135,20 @@ class TimelineApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_time_bucket_serialize(
|
||||
size=size,
|
||||
time_bucket=time_bucket,
|
||||
album_id=album_id,
|
||||
is_archived=is_archived,
|
||||
bbox=bbox,
|
||||
is_favorite=is_favorite,
|
||||
is_trashed=is_trashed,
|
||||
key=key,
|
||||
order=order,
|
||||
order_by=order_by,
|
||||
person_id=person_id,
|
||||
slug=slug,
|
||||
tag_id=tag_id,
|
||||
user_id=user_id,
|
||||
visibility=visibility,
|
||||
with_coordinates=with_coordinates,
|
||||
with_partners=with_partners,
|
||||
with_stacked=with_stacked,
|
||||
_request_auth=_request_auth,
|
||||
@@ -142,7 +158,7 @@ class TimelineApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[AssetResponseDto]",
|
||||
'200': "TimeBucketAssetResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -158,19 +174,22 @@ class TimelineApi:
|
||||
@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,
|
||||
time_bucket: Annotated[StrictStr, Field(description="Time bucket identifier in YYYY-MM-DD format")],
|
||||
album_id: Annotated[Optional[UUID], Field(description="Filter assets belonging to a specific album")] = None,
|
||||
bbox: Annotated[Optional[StrictStr], Field(description="Bounding box coordinates as west,south,east,north (WGS84)")] = None,
|
||||
is_favorite: Annotated[Optional[StrictBool], Field(description="Filter by favorite status (true for favorites only, false for non-favorites only)")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Filter by trash status (true for trashed assets only, false for non-trashed only)")] = 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,
|
||||
order: Annotated[Optional[AssetOrder], Field(description="Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)")] = None,
|
||||
order_by: Annotated[Optional[AssetOrderBy], Field(description="Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)")] = None,
|
||||
person_id: Annotated[Optional[UUID], Field(description="Filter assets containing a specific person (face recognition)")] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
tag_id: Annotated[Optional[UUID], Field(description="Filter assets with a specific tag")] = None,
|
||||
user_id: Annotated[Optional[UUID], Field(description="Filter assets by specific user ID")] = None,
|
||||
visibility: Annotated[Optional[AssetVisibility], Field(description="Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)")] = None,
|
||||
with_coordinates: Annotated[Optional[StrictBool], Field(description="Include location data in the response")] = None,
|
||||
with_partners: Annotated[Optional[StrictBool], Field(description="Include assets shared by partners")] = None,
|
||||
with_stacked: Annotated[Optional[StrictBool], Field(description="Include stacked assets in the response. When true, only primary assets from stacks are returned.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -183,35 +202,42 @@ class TimelineApi:
|
||||
_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
|
||||
) -> ApiResponse[TimeBucketAssetResponseDto]:
|
||||
"""Get time bucket
|
||||
|
||||
Retrieve a string of all asset ids in a given time bucket.
|
||||
|
||||
:param size: (required)
|
||||
:type size: TimeBucketSize
|
||||
:param time_bucket: (required)
|
||||
:param time_bucket: Time bucket identifier in YYYY-MM-DD format (required)
|
||||
:type time_bucket: str
|
||||
:param album_id:
|
||||
:type album_id: str
|
||||
:param is_archived:
|
||||
:type is_archived: bool
|
||||
:param is_favorite:
|
||||
:param album_id: Filter assets belonging to a specific album
|
||||
:type album_id: UUID
|
||||
:param bbox: Bounding box coordinates as west,south,east,north (WGS84)
|
||||
:type bbox: str
|
||||
:param is_favorite: Filter by favorite status (true for favorites only, false for non-favorites only)
|
||||
:type is_favorite: bool
|
||||
:param is_trashed:
|
||||
:param is_trashed: Filter by trash status (true for trashed assets only, false for non-trashed only)
|
||||
:type is_trashed: bool
|
||||
:param key:
|
||||
:type key: str
|
||||
:param order:
|
||||
:param order: Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
|
||||
: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:
|
||||
:param order_by: Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)
|
||||
:type order_by: AssetOrderBy
|
||||
:param person_id: Filter assets containing a specific person (face recognition)
|
||||
:type person_id: UUID
|
||||
:param slug:
|
||||
:type slug: str
|
||||
:param tag_id: Filter assets with a specific tag
|
||||
:type tag_id: UUID
|
||||
:param user_id: Filter assets by specific user ID
|
||||
:type user_id: UUID
|
||||
:param visibility: Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
|
||||
:type visibility: AssetVisibility
|
||||
:param with_coordinates: Include location data in the response
|
||||
:type with_coordinates: bool
|
||||
:param with_partners: Include assets shared by partners
|
||||
:type with_partners: bool
|
||||
:param with_stacked:
|
||||
:param with_stacked: Include stacked assets in the response. When true, only primary assets from stacks are returned.
|
||||
:type with_stacked: bool
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -236,17 +262,20 @@ class TimelineApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_time_bucket_serialize(
|
||||
size=size,
|
||||
time_bucket=time_bucket,
|
||||
album_id=album_id,
|
||||
is_archived=is_archived,
|
||||
bbox=bbox,
|
||||
is_favorite=is_favorite,
|
||||
is_trashed=is_trashed,
|
||||
key=key,
|
||||
order=order,
|
||||
order_by=order_by,
|
||||
person_id=person_id,
|
||||
slug=slug,
|
||||
tag_id=tag_id,
|
||||
user_id=user_id,
|
||||
visibility=visibility,
|
||||
with_coordinates=with_coordinates,
|
||||
with_partners=with_partners,
|
||||
with_stacked=with_stacked,
|
||||
_request_auth=_request_auth,
|
||||
@@ -256,7 +285,7 @@ class TimelineApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[AssetResponseDto]",
|
||||
'200': "TimeBucketAssetResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -272,19 +301,22 @@ class TimelineApi:
|
||||
@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,
|
||||
time_bucket: Annotated[StrictStr, Field(description="Time bucket identifier in YYYY-MM-DD format")],
|
||||
album_id: Annotated[Optional[UUID], Field(description="Filter assets belonging to a specific album")] = None,
|
||||
bbox: Annotated[Optional[StrictStr], Field(description="Bounding box coordinates as west,south,east,north (WGS84)")] = None,
|
||||
is_favorite: Annotated[Optional[StrictBool], Field(description="Filter by favorite status (true for favorites only, false for non-favorites only)")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Filter by trash status (true for trashed assets only, false for non-trashed only)")] = 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,
|
||||
order: Annotated[Optional[AssetOrder], Field(description="Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)")] = None,
|
||||
order_by: Annotated[Optional[AssetOrderBy], Field(description="Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)")] = None,
|
||||
person_id: Annotated[Optional[UUID], Field(description="Filter assets containing a specific person (face recognition)")] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
tag_id: Annotated[Optional[UUID], Field(description="Filter assets with a specific tag")] = None,
|
||||
user_id: Annotated[Optional[UUID], Field(description="Filter assets by specific user ID")] = None,
|
||||
visibility: Annotated[Optional[AssetVisibility], Field(description="Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)")] = None,
|
||||
with_coordinates: Annotated[Optional[StrictBool], Field(description="Include location data in the response")] = None,
|
||||
with_partners: Annotated[Optional[StrictBool], Field(description="Include assets shared by partners")] = None,
|
||||
with_stacked: Annotated[Optional[StrictBool], Field(description="Include stacked assets in the response. When true, only primary assets from stacks are returned.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -298,34 +330,41 @@ class TimelineApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_time_bucket
|
||||
"""Get time bucket
|
||||
|
||||
Retrieve a string of all asset ids in a given time bucket.
|
||||
|
||||
:param size: (required)
|
||||
:type size: TimeBucketSize
|
||||
:param time_bucket: (required)
|
||||
:param time_bucket: Time bucket identifier in YYYY-MM-DD format (required)
|
||||
:type time_bucket: str
|
||||
:param album_id:
|
||||
:type album_id: str
|
||||
:param is_archived:
|
||||
:type is_archived: bool
|
||||
:param is_favorite:
|
||||
:param album_id: Filter assets belonging to a specific album
|
||||
:type album_id: UUID
|
||||
:param bbox: Bounding box coordinates as west,south,east,north (WGS84)
|
||||
:type bbox: str
|
||||
:param is_favorite: Filter by favorite status (true for favorites only, false for non-favorites only)
|
||||
:type is_favorite: bool
|
||||
:param is_trashed:
|
||||
:param is_trashed: Filter by trash status (true for trashed assets only, false for non-trashed only)
|
||||
:type is_trashed: bool
|
||||
:param key:
|
||||
:type key: str
|
||||
:param order:
|
||||
:param order: Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
|
||||
: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:
|
||||
:param order_by: Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)
|
||||
:type order_by: AssetOrderBy
|
||||
:param person_id: Filter assets containing a specific person (face recognition)
|
||||
:type person_id: UUID
|
||||
:param slug:
|
||||
:type slug: str
|
||||
:param tag_id: Filter assets with a specific tag
|
||||
:type tag_id: UUID
|
||||
:param user_id: Filter assets by specific user ID
|
||||
:type user_id: UUID
|
||||
:param visibility: Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
|
||||
:type visibility: AssetVisibility
|
||||
:param with_coordinates: Include location data in the response
|
||||
:type with_coordinates: bool
|
||||
:param with_partners: Include assets shared by partners
|
||||
:type with_partners: bool
|
||||
:param with_stacked:
|
||||
:param with_stacked: Include stacked assets in the response. When true, only primary assets from stacks are returned.
|
||||
:type with_stacked: bool
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -350,17 +389,20 @@ class TimelineApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_time_bucket_serialize(
|
||||
size=size,
|
||||
time_bucket=time_bucket,
|
||||
album_id=album_id,
|
||||
is_archived=is_archived,
|
||||
bbox=bbox,
|
||||
is_favorite=is_favorite,
|
||||
is_trashed=is_trashed,
|
||||
key=key,
|
||||
order=order,
|
||||
order_by=order_by,
|
||||
person_id=person_id,
|
||||
slug=slug,
|
||||
tag_id=tag_id,
|
||||
user_id=user_id,
|
||||
visibility=visibility,
|
||||
with_coordinates=with_coordinates,
|
||||
with_partners=with_partners,
|
||||
with_stacked=with_stacked,
|
||||
_request_auth=_request_auth,
|
||||
@@ -370,7 +412,7 @@ class TimelineApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[AssetResponseDto]",
|
||||
'200': "TimeBucketAssetResponseDto",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -381,17 +423,20 @@ class TimelineApi:
|
||||
|
||||
def _get_time_bucket_serialize(
|
||||
self,
|
||||
size,
|
||||
time_bucket,
|
||||
album_id,
|
||||
is_archived,
|
||||
bbox,
|
||||
is_favorite,
|
||||
is_trashed,
|
||||
key,
|
||||
order,
|
||||
order_by,
|
||||
person_id,
|
||||
slug,
|
||||
tag_id,
|
||||
user_id,
|
||||
visibility,
|
||||
with_coordinates,
|
||||
with_partners,
|
||||
with_stacked,
|
||||
_request_auth,
|
||||
@@ -420,9 +465,9 @@ class TimelineApi:
|
||||
|
||||
_query_params.append(('albumId', album_id))
|
||||
|
||||
if is_archived is not None:
|
||||
if bbox is not None:
|
||||
|
||||
_query_params.append(('isArchived', is_archived))
|
||||
_query_params.append(('bbox', bbox))
|
||||
|
||||
if is_favorite is not None:
|
||||
|
||||
@@ -440,13 +485,17 @@ class TimelineApi:
|
||||
|
||||
_query_params.append(('order', order.value))
|
||||
|
||||
if order_by is not None:
|
||||
|
||||
_query_params.append(('orderBy', order_by.value))
|
||||
|
||||
if person_id is not None:
|
||||
|
||||
_query_params.append(('personId', person_id))
|
||||
|
||||
if size is not None:
|
||||
if slug is not None:
|
||||
|
||||
_query_params.append(('size', size.value))
|
||||
_query_params.append(('slug', slug))
|
||||
|
||||
if tag_id is not None:
|
||||
|
||||
@@ -460,6 +509,14 @@ class TimelineApi:
|
||||
|
||||
_query_params.append(('userId', user_id))
|
||||
|
||||
if visibility is not None:
|
||||
|
||||
_query_params.append(('visibility', visibility.value))
|
||||
|
||||
if with_coordinates is not None:
|
||||
|
||||
_query_params.append(('withCoordinates', with_coordinates))
|
||||
|
||||
if with_partners is not None:
|
||||
|
||||
_query_params.append(('withPartners', with_partners))
|
||||
@@ -510,18 +567,21 @@ class TimelineApi:
|
||||
@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,
|
||||
album_id: Annotated[Optional[UUID], Field(description="Filter assets belonging to a specific album")] = None,
|
||||
bbox: Annotated[Optional[StrictStr], Field(description="Bounding box coordinates as west,south,east,north (WGS84)")] = None,
|
||||
is_favorite: Annotated[Optional[StrictBool], Field(description="Filter by favorite status (true for favorites only, false for non-favorites only)")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Filter by trash status (true for trashed assets only, false for non-trashed only)")] = 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,
|
||||
order: Annotated[Optional[AssetOrder], Field(description="Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)")] = None,
|
||||
order_by: Annotated[Optional[AssetOrderBy], Field(description="Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)")] = None,
|
||||
person_id: Annotated[Optional[UUID], Field(description="Filter assets containing a specific person (face recognition)")] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
tag_id: Annotated[Optional[UUID], Field(description="Filter assets with a specific tag")] = None,
|
||||
user_id: Annotated[Optional[UUID], Field(description="Filter assets by specific user ID")] = None,
|
||||
visibility: Annotated[Optional[AssetVisibility], Field(description="Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)")] = None,
|
||||
with_coordinates: Annotated[Optional[StrictBool], Field(description="Include location data in the response")] = None,
|
||||
with_partners: Annotated[Optional[StrictBool], Field(description="Include assets shared by partners")] = None,
|
||||
with_stacked: Annotated[Optional[StrictBool], Field(description="Include stacked assets in the response. When true, only primary assets from stacks are returned.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -534,33 +594,40 @@ class TimelineApi:
|
||||
_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
|
||||
) -> List[TimeBucketsResponseDto]:
|
||||
"""Get time buckets
|
||||
|
||||
Retrieve a list of all minimal 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:
|
||||
:param album_id: Filter assets belonging to a specific album
|
||||
:type album_id: UUID
|
||||
:param bbox: Bounding box coordinates as west,south,east,north (WGS84)
|
||||
:type bbox: str
|
||||
:param is_favorite: Filter by favorite status (true for favorites only, false for non-favorites only)
|
||||
:type is_favorite: bool
|
||||
:param is_trashed:
|
||||
:param is_trashed: Filter by trash status (true for trashed assets only, false for non-trashed only)
|
||||
:type is_trashed: bool
|
||||
:param key:
|
||||
:type key: str
|
||||
:param order:
|
||||
:param order: Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
|
||||
: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:
|
||||
:param order_by: Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)
|
||||
:type order_by: AssetOrderBy
|
||||
:param person_id: Filter assets containing a specific person (face recognition)
|
||||
:type person_id: UUID
|
||||
:param slug:
|
||||
:type slug: str
|
||||
:param tag_id: Filter assets with a specific tag
|
||||
:type tag_id: UUID
|
||||
:param user_id: Filter assets by specific user ID
|
||||
:type user_id: UUID
|
||||
:param visibility: Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
|
||||
:type visibility: AssetVisibility
|
||||
:param with_coordinates: Include location data in the response
|
||||
:type with_coordinates: bool
|
||||
:param with_partners: Include assets shared by partners
|
||||
:type with_partners: bool
|
||||
:param with_stacked:
|
||||
:param with_stacked: Include stacked assets in the response. When true, only primary assets from stacks are returned.
|
||||
:type with_stacked: bool
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -585,16 +652,19 @@ class TimelineApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_time_buckets_serialize(
|
||||
size=size,
|
||||
album_id=album_id,
|
||||
is_archived=is_archived,
|
||||
bbox=bbox,
|
||||
is_favorite=is_favorite,
|
||||
is_trashed=is_trashed,
|
||||
key=key,
|
||||
order=order,
|
||||
order_by=order_by,
|
||||
person_id=person_id,
|
||||
slug=slug,
|
||||
tag_id=tag_id,
|
||||
user_id=user_id,
|
||||
visibility=visibility,
|
||||
with_coordinates=with_coordinates,
|
||||
with_partners=with_partners,
|
||||
with_stacked=with_stacked,
|
||||
_request_auth=_request_auth,
|
||||
@@ -604,7 +674,7 @@ class TimelineApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[TimeBucketResponseDto]",
|
||||
'200': "List[TimeBucketsResponseDto]",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -620,18 +690,21 @@ class TimelineApi:
|
||||
@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,
|
||||
album_id: Annotated[Optional[UUID], Field(description="Filter assets belonging to a specific album")] = None,
|
||||
bbox: Annotated[Optional[StrictStr], Field(description="Bounding box coordinates as west,south,east,north (WGS84)")] = None,
|
||||
is_favorite: Annotated[Optional[StrictBool], Field(description="Filter by favorite status (true for favorites only, false for non-favorites only)")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Filter by trash status (true for trashed assets only, false for non-trashed only)")] = 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,
|
||||
order: Annotated[Optional[AssetOrder], Field(description="Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)")] = None,
|
||||
order_by: Annotated[Optional[AssetOrderBy], Field(description="Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)")] = None,
|
||||
person_id: Annotated[Optional[UUID], Field(description="Filter assets containing a specific person (face recognition)")] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
tag_id: Annotated[Optional[UUID], Field(description="Filter assets with a specific tag")] = None,
|
||||
user_id: Annotated[Optional[UUID], Field(description="Filter assets by specific user ID")] = None,
|
||||
visibility: Annotated[Optional[AssetVisibility], Field(description="Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)")] = None,
|
||||
with_coordinates: Annotated[Optional[StrictBool], Field(description="Include location data in the response")] = None,
|
||||
with_partners: Annotated[Optional[StrictBool], Field(description="Include assets shared by partners")] = None,
|
||||
with_stacked: Annotated[Optional[StrictBool], Field(description="Include stacked assets in the response. When true, only primary assets from stacks are returned.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -644,33 +717,40 @@ class TimelineApi:
|
||||
_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
|
||||
) -> ApiResponse[List[TimeBucketsResponseDto]]:
|
||||
"""Get time buckets
|
||||
|
||||
Retrieve a list of all minimal 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:
|
||||
:param album_id: Filter assets belonging to a specific album
|
||||
:type album_id: UUID
|
||||
:param bbox: Bounding box coordinates as west,south,east,north (WGS84)
|
||||
:type bbox: str
|
||||
:param is_favorite: Filter by favorite status (true for favorites only, false for non-favorites only)
|
||||
:type is_favorite: bool
|
||||
:param is_trashed:
|
||||
:param is_trashed: Filter by trash status (true for trashed assets only, false for non-trashed only)
|
||||
:type is_trashed: bool
|
||||
:param key:
|
||||
:type key: str
|
||||
:param order:
|
||||
:param order: Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
|
||||
: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:
|
||||
:param order_by: Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)
|
||||
:type order_by: AssetOrderBy
|
||||
:param person_id: Filter assets containing a specific person (face recognition)
|
||||
:type person_id: UUID
|
||||
:param slug:
|
||||
:type slug: str
|
||||
:param tag_id: Filter assets with a specific tag
|
||||
:type tag_id: UUID
|
||||
:param user_id: Filter assets by specific user ID
|
||||
:type user_id: UUID
|
||||
:param visibility: Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
|
||||
:type visibility: AssetVisibility
|
||||
:param with_coordinates: Include location data in the response
|
||||
:type with_coordinates: bool
|
||||
:param with_partners: Include assets shared by partners
|
||||
:type with_partners: bool
|
||||
:param with_stacked:
|
||||
:param with_stacked: Include stacked assets in the response. When true, only primary assets from stacks are returned.
|
||||
:type with_stacked: bool
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -695,16 +775,19 @@ class TimelineApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_time_buckets_serialize(
|
||||
size=size,
|
||||
album_id=album_id,
|
||||
is_archived=is_archived,
|
||||
bbox=bbox,
|
||||
is_favorite=is_favorite,
|
||||
is_trashed=is_trashed,
|
||||
key=key,
|
||||
order=order,
|
||||
order_by=order_by,
|
||||
person_id=person_id,
|
||||
slug=slug,
|
||||
tag_id=tag_id,
|
||||
user_id=user_id,
|
||||
visibility=visibility,
|
||||
with_coordinates=with_coordinates,
|
||||
with_partners=with_partners,
|
||||
with_stacked=with_stacked,
|
||||
_request_auth=_request_auth,
|
||||
@@ -714,7 +797,7 @@ class TimelineApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[TimeBucketResponseDto]",
|
||||
'200': "List[TimeBucketsResponseDto]",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -730,18 +813,21 @@ class TimelineApi:
|
||||
@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,
|
||||
album_id: Annotated[Optional[UUID], Field(description="Filter assets belonging to a specific album")] = None,
|
||||
bbox: Annotated[Optional[StrictStr], Field(description="Bounding box coordinates as west,south,east,north (WGS84)")] = None,
|
||||
is_favorite: Annotated[Optional[StrictBool], Field(description="Filter by favorite status (true for favorites only, false for non-favorites only)")] = None,
|
||||
is_trashed: Annotated[Optional[StrictBool], Field(description="Filter by trash status (true for trashed assets only, false for non-trashed only)")] = 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,
|
||||
order: Annotated[Optional[AssetOrder], Field(description="Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)")] = None,
|
||||
order_by: Annotated[Optional[AssetOrderBy], Field(description="Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)")] = None,
|
||||
person_id: Annotated[Optional[UUID], Field(description="Filter assets containing a specific person (face recognition)")] = None,
|
||||
slug: Optional[StrictStr] = None,
|
||||
tag_id: Annotated[Optional[UUID], Field(description="Filter assets with a specific tag")] = None,
|
||||
user_id: Annotated[Optional[UUID], Field(description="Filter assets by specific user ID")] = None,
|
||||
visibility: Annotated[Optional[AssetVisibility], Field(description="Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)")] = None,
|
||||
with_coordinates: Annotated[Optional[StrictBool], Field(description="Include location data in the response")] = None,
|
||||
with_partners: Annotated[Optional[StrictBool], Field(description="Include assets shared by partners")] = None,
|
||||
with_stacked: Annotated[Optional[StrictBool], Field(description="Include stacked assets in the response. When true, only primary assets from stacks are returned.")] = None,
|
||||
_request_timeout: Union[
|
||||
None,
|
||||
Annotated[StrictFloat, Field(gt=0)],
|
||||
@@ -755,32 +841,39 @@ class TimelineApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""get_time_buckets
|
||||
"""Get time buckets
|
||||
|
||||
Retrieve a list of all minimal 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:
|
||||
:param album_id: Filter assets belonging to a specific album
|
||||
:type album_id: UUID
|
||||
:param bbox: Bounding box coordinates as west,south,east,north (WGS84)
|
||||
:type bbox: str
|
||||
:param is_favorite: Filter by favorite status (true for favorites only, false for non-favorites only)
|
||||
:type is_favorite: bool
|
||||
:param is_trashed:
|
||||
:param is_trashed: Filter by trash status (true for trashed assets only, false for non-trashed only)
|
||||
:type is_trashed: bool
|
||||
:param key:
|
||||
:type key: str
|
||||
:param order:
|
||||
:param order: Sort order for assets within time buckets (ASC for oldest first, DESC for newest first)
|
||||
: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:
|
||||
:param order_by: Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich)
|
||||
:type order_by: AssetOrderBy
|
||||
:param person_id: Filter assets containing a specific person (face recognition)
|
||||
:type person_id: UUID
|
||||
:param slug:
|
||||
:type slug: str
|
||||
:param tag_id: Filter assets with a specific tag
|
||||
:type tag_id: UUID
|
||||
:param user_id: Filter assets by specific user ID
|
||||
:type user_id: UUID
|
||||
:param visibility: Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED)
|
||||
:type visibility: AssetVisibility
|
||||
:param with_coordinates: Include location data in the response
|
||||
:type with_coordinates: bool
|
||||
:param with_partners: Include assets shared by partners
|
||||
:type with_partners: bool
|
||||
:param with_stacked:
|
||||
:param with_stacked: Include stacked assets in the response. When true, only primary assets from stacks are returned.
|
||||
:type with_stacked: bool
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -805,16 +898,19 @@ class TimelineApi:
|
||||
""" # noqa: E501
|
||||
|
||||
_param = self._get_time_buckets_serialize(
|
||||
size=size,
|
||||
album_id=album_id,
|
||||
is_archived=is_archived,
|
||||
bbox=bbox,
|
||||
is_favorite=is_favorite,
|
||||
is_trashed=is_trashed,
|
||||
key=key,
|
||||
order=order,
|
||||
order_by=order_by,
|
||||
person_id=person_id,
|
||||
slug=slug,
|
||||
tag_id=tag_id,
|
||||
user_id=user_id,
|
||||
visibility=visibility,
|
||||
with_coordinates=with_coordinates,
|
||||
with_partners=with_partners,
|
||||
with_stacked=with_stacked,
|
||||
_request_auth=_request_auth,
|
||||
@@ -824,7 +920,7 @@ class TimelineApi:
|
||||
)
|
||||
|
||||
_response_types_map: Dict[str, Optional[str]] = {
|
||||
'200': "List[TimeBucketResponseDto]",
|
||||
'200': "List[TimeBucketsResponseDto]",
|
||||
}
|
||||
response_data = self.api_client.call_api(
|
||||
*_param,
|
||||
@@ -835,16 +931,19 @@ class TimelineApi:
|
||||
|
||||
def _get_time_buckets_serialize(
|
||||
self,
|
||||
size,
|
||||
album_id,
|
||||
is_archived,
|
||||
bbox,
|
||||
is_favorite,
|
||||
is_trashed,
|
||||
key,
|
||||
order,
|
||||
order_by,
|
||||
person_id,
|
||||
slug,
|
||||
tag_id,
|
||||
user_id,
|
||||
visibility,
|
||||
with_coordinates,
|
||||
with_partners,
|
||||
with_stacked,
|
||||
_request_auth,
|
||||
@@ -873,9 +972,9 @@ class TimelineApi:
|
||||
|
||||
_query_params.append(('albumId', album_id))
|
||||
|
||||
if is_archived is not None:
|
||||
if bbox is not None:
|
||||
|
||||
_query_params.append(('isArchived', is_archived))
|
||||
_query_params.append(('bbox', bbox))
|
||||
|
||||
if is_favorite is not None:
|
||||
|
||||
@@ -893,13 +992,17 @@ class TimelineApi:
|
||||
|
||||
_query_params.append(('order', order.value))
|
||||
|
||||
if order_by is not None:
|
||||
|
||||
_query_params.append(('orderBy', order_by.value))
|
||||
|
||||
if person_id is not None:
|
||||
|
||||
_query_params.append(('personId', person_id))
|
||||
|
||||
if size is not None:
|
||||
if slug is not None:
|
||||
|
||||
_query_params.append(('size', size.value))
|
||||
_query_params.append(('slug', slug))
|
||||
|
||||
if tag_id is not None:
|
||||
|
||||
@@ -909,6 +1012,14 @@ class TimelineApi:
|
||||
|
||||
_query_params.append(('userId', user_id))
|
||||
|
||||
if visibility is not None:
|
||||
|
||||
_query_params.append(('visibility', visibility.value))
|
||||
|
||||
if with_coordinates is not None:
|
||||
|
||||
_query_params.append(('withCoordinates', with_coordinates))
|
||||
|
||||
if with_partners is not None:
|
||||
|
||||
_query_params.append(('withPartners', with_partners))
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
Immich API
|
||||
|
||||
The version of the OpenAPI document: 1.131.3
|
||||
The version of the OpenAPI document: 3.0.1
|
||||
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
||||
|
||||
Do not edit the class manually.
|
||||
@@ -53,8 +53,9 @@ class TrashApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> TrashResponseDto:
|
||||
"""empty_trash
|
||||
"""Empty trash
|
||||
|
||||
Permanently delete all items in the trash.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -115,8 +116,9 @@ class TrashApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[TrashResponseDto]:
|
||||
"""empty_trash
|
||||
"""Empty trash
|
||||
|
||||
Permanently delete all items in the trash.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -177,8 +179,9 @@ class TrashApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""empty_trash
|
||||
"""Empty trash
|
||||
|
||||
Permanently delete all items in the trash.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -299,8 +302,9 @@ class TrashApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> TrashResponseDto:
|
||||
"""restore_assets
|
||||
"""Restore assets
|
||||
|
||||
Restore specific assets from the trash.
|
||||
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
@@ -365,8 +369,9 @@ class TrashApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[TrashResponseDto]:
|
||||
"""restore_assets
|
||||
"""Restore assets
|
||||
|
||||
Restore specific assets from the trash.
|
||||
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
@@ -431,8 +436,9 @@ class TrashApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""restore_assets
|
||||
"""Restore assets
|
||||
|
||||
Restore specific assets from the trash.
|
||||
|
||||
:param bulk_ids_dto: (required)
|
||||
:type bulk_ids_dto: BulkIdsDto
|
||||
@@ -571,8 +577,9 @@ class TrashApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> TrashResponseDto:
|
||||
"""restore_trash
|
||||
"""Restore trash
|
||||
|
||||
Restore all items in the trash.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -633,8 +640,9 @@ class TrashApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> ApiResponse[TrashResponseDto]:
|
||||
"""restore_trash
|
||||
"""Restore trash
|
||||
|
||||
Restore all items in the trash.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
@@ -695,8 +703,9 @@ class TrashApi:
|
||||
_headers: Optional[Dict[StrictStr, Any]] = None,
|
||||
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
||||
) -> RESTResponseType:
|
||||
"""restore_trash
|
||||
"""Restore trash
|
||||
|
||||
Restore all items in the trash.
|
||||
|
||||
:param _request_timeout: timeout setting for this request. If one
|
||||
number provided, it will be total request
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,545 +0,0 @@
|
||||
# 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
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user