2023-03-30 21:38:55 +02:00
|
|
|
import { SharedLinkEntity } from '@app/infra/entities';
|
2023-01-25 17:35:28 +01:00
|
|
|
|
|
|
|
export const ISharedLinkRepository = 'ISharedLinkRepository';
|
|
|
|
|
|
|
|
export interface ISharedLinkRepository {
|
|
|
|
getAll(userId: string): Promise<SharedLinkEntity[]>;
|
|
|
|
get(userId: string, id: string): Promise<SharedLinkEntity | null>;
|
2023-06-01 22:56:37 +02:00
|
|
|
getByKey(key: Buffer): Promise<SharedLinkEntity | null>;
|
2023-01-31 19:11:49 +01:00
|
|
|
create(entity: Omit<SharedLinkEntity, 'id' | 'user'>): Promise<SharedLinkEntity>;
|
2023-05-15 19:30:53 +02:00
|
|
|
remove(entity: SharedLinkEntity): Promise<void>;
|
2023-01-25 17:35:28 +01:00
|
|
|
save(entity: Partial<SharedLinkEntity>): Promise<SharedLinkEntity>;
|
|
|
|
hasAssetAccess(id: string, assetId: string): Promise<boolean>;
|
|
|
|
}
|