mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-01-04 16:25:50 +00:00
* refactor: add/remove album assets * chore: open api * feat: remove owned assets from album * refactor: move to bulk id req/res dto * chore: open api * chore: merge main * dev: mobile work * fix: adding asset from web not sync with mobile * remove print statement --------- Co-authored-by: Alex Tran <Alex.Tran@conductix.com>
27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
import { AlbumEntity } from '@app/infra/entities';
|
|
|
|
export const IAlbumRepository = 'IAlbumRepository';
|
|
|
|
export interface AlbumAssetCount {
|
|
albumId: string;
|
|
assetCount: number;
|
|
}
|
|
|
|
export interface IAlbumRepository {
|
|
getById(id: string): Promise<AlbumEntity | null>;
|
|
getByIds(ids: string[]): Promise<AlbumEntity[]>;
|
|
getByAssetId(ownerId: string, assetId: string): Promise<AlbumEntity[]>;
|
|
hasAsset(id: string, assetId: string): Promise<boolean>;
|
|
getAssetCountForIds(ids: string[]): Promise<AlbumAssetCount[]>;
|
|
getInvalidThumbnail(): Promise<string[]>;
|
|
getOwned(ownerId: string): Promise<AlbumEntity[]>;
|
|
getShared(ownerId: string): Promise<AlbumEntity[]>;
|
|
getNotShared(ownerId: string): Promise<AlbumEntity[]>;
|
|
deleteAll(userId: string): Promise<void>;
|
|
getAll(): Promise<AlbumEntity[]>;
|
|
create(album: Partial<AlbumEntity>): Promise<AlbumEntity>;
|
|
update(album: Partial<AlbumEntity>): Promise<AlbumEntity>;
|
|
delete(album: AlbumEntity): Promise<void>;
|
|
updateThumbnails(): Promise<number | undefined>;
|
|
}
|