mirror of
https://github.com/immich-app/immich.git
synced 2026-02-14 12:58:17 +03:00
New getAllAlbumsSlim endpoint
- Add new endpoint - Add slim option to albumService.getAll (default false) - Use getAllAlbumsSlim in search-albums-section
This commit is contained in:
@@ -870,6 +870,60 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/albums/slim": {
|
||||
"get": {
|
||||
"operationId": "getAllAlbumsSlim",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "assetId",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "Only returns albums that contain the asset\nIgnores the shared parameter\nundefined: get all albums",
|
||||
"schema": {
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shared",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/AlbumResponseDto"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"Albums"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/albums/statistics": {
|
||||
"get": {
|
||||
"operationId": "getAlbumStatistics",
|
||||
|
||||
@@ -1790,6 +1790,20 @@ export function createAlbum({ createAlbumDto }: {
|
||||
body: createAlbumDto
|
||||
})));
|
||||
}
|
||||
export function getAllAlbumsSlim({ assetId, shared }: {
|
||||
assetId?: string;
|
||||
shared?: boolean;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: AlbumResponseDto[];
|
||||
}>(`/albums/slim${QS.query(QS.explode({
|
||||
assetId,
|
||||
shared
|
||||
}))}`, {
|
||||
...opts
|
||||
}));
|
||||
}
|
||||
export function getAlbumStatistics(opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
|
||||
Reference in New Issue
Block a user