mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat(server,web): favorite albums per user
This commit is contained in:
@@ -1648,6 +1648,15 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "favorite",
|
||||
"required": false,
|
||||
"in": "query",
|
||||
"description": "Filter to only albums favorited by the authenticated user",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "shared",
|
||||
"required": false,
|
||||
@@ -15324,6 +15333,10 @@
|
||||
"description": "Activity feed enabled",
|
||||
"type": "boolean"
|
||||
},
|
||||
"isFavorite": {
|
||||
"description": "Whether the authenticated user has favorited this album",
|
||||
"type": "boolean"
|
||||
},
|
||||
"lastModifiedAssetTimestamp": {
|
||||
"description": "Last modified asset timestamp",
|
||||
"format": "date-time",
|
||||
@@ -15357,6 +15370,7 @@
|
||||
"hasSharedLink",
|
||||
"id",
|
||||
"isActivityEnabled",
|
||||
"isFavorite",
|
||||
"shared",
|
||||
"updatedAt"
|
||||
],
|
||||
@@ -22452,6 +22466,10 @@
|
||||
"description": "Album ID",
|
||||
"type": "string"
|
||||
},
|
||||
"isFavorite": {
|
||||
"description": "Favorite flag",
|
||||
"type": "boolean"
|
||||
},
|
||||
"role": {
|
||||
"$ref": "#/components/schemas/AlbumUserRole"
|
||||
},
|
||||
@@ -22462,6 +22480,7 @@
|
||||
},
|
||||
"required": [
|
||||
"albumId",
|
||||
"isFavorite",
|
||||
"role",
|
||||
"userId"
|
||||
],
|
||||
@@ -25202,13 +25221,14 @@
|
||||
},
|
||||
"UpdateAlbumUserDto": {
|
||||
"properties": {
|
||||
"isFavorite": {
|
||||
"description": "Mark album as favorite for the user (only the user themselves can update)",
|
||||
"type": "boolean"
|
||||
},
|
||||
"role": {
|
||||
"$ref": "#/components/schemas/AlbumUserRole"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"role"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"UpdateAssetDto": {
|
||||
|
||||
@@ -474,6 +474,8 @@ export type AlbumResponseDto = {
|
||||
id: string;
|
||||
/** Activity feed enabled */
|
||||
isActivityEnabled: boolean;
|
||||
/** Whether the authenticated user has favorited this album */
|
||||
isFavorite: boolean;
|
||||
/** Last modified asset timestamp */
|
||||
lastModifiedAssetTimestamp?: string;
|
||||
order?: AssetOrder;
|
||||
@@ -556,7 +558,9 @@ export type MapMarkerResponseDto = {
|
||||
state: string | null;
|
||||
};
|
||||
export type UpdateAlbumUserDto = {
|
||||
role: AlbumUserRole;
|
||||
/** Mark album as favorite for the user (only the user themselves can update) */
|
||||
isFavorite?: boolean;
|
||||
role?: AlbumUserRole;
|
||||
};
|
||||
export type AlbumUserAddDto = {
|
||||
/** Album user role */
|
||||
@@ -2856,6 +2860,8 @@ export type SyncAlbumUserDeleteV1 = {
|
||||
export type SyncAlbumUserV1 = {
|
||||
/** Album ID */
|
||||
albumId: string;
|
||||
/** Favorite flag */
|
||||
isFavorite: boolean;
|
||||
role: AlbumUserRole;
|
||||
/** User ID */
|
||||
userId: string;
|
||||
@@ -3619,8 +3625,9 @@ export function getUserStatisticsAdmin({ id, isFavorite, isTrashed, visibility }
|
||||
/**
|
||||
* List all albums
|
||||
*/
|
||||
export function getAllAlbums({ assetId, shared }: {
|
||||
export function getAllAlbums({ assetId, favorite, shared }: {
|
||||
assetId?: string;
|
||||
favorite?: boolean;
|
||||
shared?: boolean;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
@@ -3628,6 +3635,7 @@ export function getAllAlbums({ assetId, shared }: {
|
||||
data: AlbumResponseDto[];
|
||||
}>(`/albums${QS.query(QS.explode({
|
||||
assetId,
|
||||
favorite,
|
||||
shared
|
||||
}))}`, {
|
||||
...opts
|
||||
|
||||
Reference in New Issue
Block a user