feat: persistent memories (#8330)

* feat: persistent memories

* refactor: use new add/remove asset utility
This commit is contained in:
Jason Rasmussen 2024-04-02 10:23:17 -04:00 committed by GitHub
parent 0849dbd1af
commit cd0e537e3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 3497 additions and 0 deletions

View file

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

View 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>;
}