mirror of
https://github.com/immich-app/immich.git
synced 2026-01-25 02:44:46 -08:00
18 lines
675 B
TypeScript
18 lines
675 B
TypeScript
import { Insertable, Updateable } from 'kysely';
|
|
import { Memories } from 'src/db';
|
|
import { MemoryEntity, OnThisDayData } from 'src/entities/memory.entity';
|
|
import { IBulkAsset } from 'src/utils/asset.util';
|
|
|
|
export const IMemoryRepository = 'IMemoryRepository';
|
|
|
|
export interface IMemoryRepository extends IBulkAsset {
|
|
search(ownerId: string): Promise<MemoryEntity[]>;
|
|
get(id: string): Promise<MemoryEntity | null>;
|
|
create(
|
|
memory: Omit<Insertable<Memories>, 'data'> & { data: OnThisDayData },
|
|
assetIds: Set<string>,
|
|
): Promise<MemoryEntity>;
|
|
update(id: string, memory: Updateable<Memories>): Promise<MemoryEntity>;
|
|
delete(id: string): Promise<void>;
|
|
}
|