mirror of
https://github.com/immich-app/immich.git
synced 2026-07-08 21:09:10 +08: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>
50 lines
1.8 KiB
TypeScript
50 lines
1.8 KiB
TypeScript
import { AlbumUserRole } from 'src/enum';
|
|
|
|
export const IAccessRepository = 'IAccessRepository';
|
|
|
|
export interface IAccessRepository {
|
|
activity: {
|
|
checkOwnerAccess(userId: string, activityIds: Set<string>): Promise<Set<string>>;
|
|
checkAlbumOwnerAccess(userId: string, activityIds: Set<string>): Promise<Set<string>>;
|
|
checkCreateAccess(userId: string, albumIds: Set<string>): Promise<Set<string>>;
|
|
};
|
|
|
|
asset: {
|
|
checkOwnerAccess(userId: string, assetIds: Set<string>): Promise<Set<string>>;
|
|
checkAlbumAccess(userId: string, assetIds: Set<string>): Promise<Set<string>>;
|
|
checkPartnerAccess(userId: string, assetIds: Set<string>): Promise<Set<string>>;
|
|
checkSharedLinkAccess(sharedLinkId: string, assetIds: Set<string>): Promise<Set<string>>;
|
|
};
|
|
|
|
authDevice: {
|
|
checkOwnerAccess(userId: string, deviceIds: Set<string>): Promise<Set<string>>;
|
|
};
|
|
|
|
album: {
|
|
checkOwnerAccess(userId: string, albumIds: Set<string>): Promise<Set<string>>;
|
|
checkSharedAlbumAccess(userId: string, albumIds: Set<string>, access: AlbumUserRole): Promise<Set<string>>;
|
|
checkSharedLinkAccess(sharedLinkId: string, albumIds: Set<string>): Promise<Set<string>>;
|
|
};
|
|
|
|
timeline: {
|
|
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>>;
|
|
};
|
|
|
|
partner: {
|
|
checkUpdateAccess(userId: string, partnerIds: Set<string>): Promise<Set<string>>;
|
|
};
|
|
|
|
stack: {
|
|
checkOwnerAccess(userId: string, stackIds: Set<string>): Promise<Set<string>>;
|
|
};
|
|
}
|