mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore(server): rename domain repositories -> interfaces (#8147)
rename domain repositories
This commit is contained in:
parent
44ed1f0919
commit
b588a87d4a
155 changed files with 385 additions and 390 deletions
48
server/src/interfaces/album.interface.ts
Normal file
48
server/src/interfaces/album.interface.ts
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
import { AlbumEntity } from 'src/entities/album.entity';
|
||||
|
||||
export const IAlbumRepository = 'IAlbumRepository';
|
||||
|
||||
export interface AlbumAssetCount {
|
||||
albumId: string;
|
||||
assetCount: number;
|
||||
startDate: Date | undefined;
|
||||
endDate: Date | undefined;
|
||||
}
|
||||
|
||||
export interface AlbumInfoOptions {
|
||||
withAssets: boolean;
|
||||
}
|
||||
|
||||
export interface AlbumAsset {
|
||||
albumId: string;
|
||||
assetId: string;
|
||||
}
|
||||
|
||||
export interface AlbumAssets {
|
||||
albumId: string;
|
||||
assetIds: string[];
|
||||
}
|
||||
|
||||
export interface IAlbumRepository {
|
||||
getById(id: string, options: AlbumInfoOptions): Promise<AlbumEntity | null>;
|
||||
getByIds(ids: string[]): Promise<AlbumEntity[]>;
|
||||
getByAssetId(ownerId: string, assetId: string): Promise<AlbumEntity[]>;
|
||||
addAssets(assets: AlbumAssets): Promise<void>;
|
||||
getAssetIds(albumId: string, assetIds?: string[]): Promise<Set<string>>;
|
||||
hasAsset(asset: AlbumAsset): Promise<boolean>;
|
||||
removeAsset(assetId: string): Promise<void>;
|
||||
removeAssets(albumId: string, assetIds: string[]): Promise<void>;
|
||||
getMetadataForIds(ids: string[]): Promise<AlbumAssetCount[]>;
|
||||
getInvalidThumbnail(): Promise<string[]>;
|
||||
getOwned(ownerId: string): Promise<AlbumEntity[]>;
|
||||
getShared(ownerId: string): Promise<AlbumEntity[]>;
|
||||
getNotShared(ownerId: string): Promise<AlbumEntity[]>;
|
||||
restoreAll(userId: string): Promise<void>;
|
||||
softDeleteAll(userId: string): Promise<void>;
|
||||
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>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue