mirror of
https://github.com/immich-app/immich.git
synced 2026-01-22 09:28:56 -08:00
* refactor: rename share => shared-link * refactor: shared link crud methods * chore: open api
14 lines
618 B
TypeScript
14 lines
618 B
TypeScript
import { SharedLinkEntity } from '@app/infra/entities';
|
|
|
|
export const ISharedLinkRepository = 'ISharedLinkRepository';
|
|
|
|
export interface ISharedLinkRepository {
|
|
getAll(userId: string): Promise<SharedLinkEntity[]>;
|
|
get(userId: string, id: string): Promise<SharedLinkEntity | null>;
|
|
getByKey(key: Buffer): Promise<SharedLinkEntity | null>;
|
|
create(entity: Omit<SharedLinkEntity, 'id' | 'user'>): Promise<SharedLinkEntity>;
|
|
update(entity: Partial<SharedLinkEntity>): Promise<SharedLinkEntity>;
|
|
remove(entity: SharedLinkEntity): Promise<void>;
|
|
hasAssetAccess(id: string, assetId: string): Promise<boolean>;
|
|
}
|