mirror of
https://github.com/LukeHagar/immich.git
synced 2025-12-09 20:47:47 +00:00
* refactor: stacks * mobile: get it built * chore: feedback * fix: sync and duplicates * mobile: remove old stack reference * chore: add primary asset id * revert change to asset entity * mobile: refactor mobile api * mobile: sync stack info after creating stack * mobile: update timeline after deleting stack * server: update asset updatedAt when stack is deleted * mobile: simplify action * mobile: rename to match dto property * fix: web test --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
18 lines
582 B
TypeScript
18 lines
582 B
TypeScript
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(stack: Pick<StackEntity, 'id'> & Partial<StackEntity>): Promise<StackEntity>;
|
|
delete(id: string): Promise<void>;
|
|
deleteAll(ids: string[]): Promise<void>;
|
|
getById(id: string): Promise<StackEntity | null>;
|
|
}
|