mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
* wip * wip: add tags * wip * sql * pr feedback * pr feedback * ergonomic * pr feedback * pr feedback
18 lines
614 B
TypeScript
18 lines
614 B
TypeScript
import { Updateable } from 'kysely';
|
|
import { StackEntity } from 'src/entities/stack.entity';
|
|
|
|
export const IStackRepository = 'IStackRepository';
|
|
|
|
export interface StackSearch {
|
|
ownerId: string;
|
|
primaryAssetId?: string;
|
|
}
|
|
|
|
export interface IStackRepository {
|
|
search(query: StackSearch): Promise<StackEntity[]>;
|
|
create(stack: { ownerId: string; assetIds: string[] }): Promise<StackEntity>;
|
|
update(id: string, entity: Updateable<StackEntity>): Promise<StackEntity>;
|
|
delete(id: string): Promise<void>;
|
|
deleteAll(ids: string[]): Promise<void>;
|
|
getById(id: string): Promise<StackEntity | undefined>;
|
|
}
|