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:
CJPeckover
2025-07-14 13:44:05 -04:00
parent 4a6ba4a40a
commit 419175d79b
6 changed files with 113 additions and 11 deletions

View File

@@ -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",

View File

@@ -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;