mirror of
https://github.com/immich-app/immich.git
synced 2025-12-01 22:09:46 +09:00
refactor(server): stacks (#11453)
* 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>
This commit is contained in:
@@ -42,4 +42,8 @@ export interface IAccessRepository {
|
||||
partner: {
|
||||
checkUpdateAccess(userId: string, partnerIds: Set<string>): Promise<Set<string>>;
|
||||
};
|
||||
|
||||
stack: {
|
||||
checkOwnerAccess(userId: string, stackIds: Set<string>): Promise<Set<string>>;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,9 +2,16 @@ import { StackEntity } from 'src/entities/stack.entity';
|
||||
|
||||
export const IStackRepository = 'IStackRepository';
|
||||
|
||||
export interface StackSearch {
|
||||
ownerId: string;
|
||||
primaryAssetId?: string;
|
||||
}
|
||||
|
||||
export interface IStackRepository {
|
||||
create(stack: Partial<StackEntity> & { ownerId: string }): Promise<StackEntity>;
|
||||
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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user