mirror of
https://github.com/immich-app/immich.git
synced 2025-12-22 09:15:34 +03:00
feat: persistent memories (#8330)
* feat: persistent memories * refactor: use new add/remove asset utility
This commit is contained in:
@@ -32,6 +32,10 @@ export interface IAccessRepository {
|
||||
checkPartnerAccess(userId: string, partnerIds: Set<string>): Promise<Set<string>>;
|
||||
};
|
||||
|
||||
memory: {
|
||||
checkOwnerAccess(userId: string, memoryIds: Set<string>): Promise<Set<string>>;
|
||||
};
|
||||
|
||||
person: {
|
||||
checkFaceOwnerAccess(userId: string, assetFaceId: Set<string>): Promise<Set<string>>;
|
||||
checkOwnerAccess(userId: string, personIds: Set<string>): Promise<Set<string>>;
|
||||
|
||||
14
server/src/interfaces/memory.interface.ts
Normal file
14
server/src/interfaces/memory.interface.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { MemoryEntity } from 'src/entities/memory.entity';
|
||||
|
||||
export const IMemoryRepository = 'IMemoryRepository';
|
||||
|
||||
export interface IMemoryRepository {
|
||||
search(ownerId: string): Promise<MemoryEntity[]>;
|
||||
get(id: string): Promise<MemoryEntity | null>;
|
||||
create(memory: Partial<MemoryEntity>): Promise<MemoryEntity>;
|
||||
update(memory: Partial<MemoryEntity>): Promise<MemoryEntity>;
|
||||
delete(id: string): Promise<void>;
|
||||
getAssetIds(id: string, assetIds: string[]): Promise<Set<string>>;
|
||||
addAssetIds(id: string, assetIds: string[]): Promise<void>;
|
||||
removeAssetIds(id: string, assetIds: string[]): Promise<void>;
|
||||
}
|
||||
Reference in New Issue
Block a user