2023-01-25 17:35:28 +01:00
|
|
|
import { SharedLinkEntity } from '@app/infra/db/entities';
|
|
|
|
|
|
|
|
export const ISharedLinkRepository = 'ISharedLinkRepository';
|
|
|
|
|
|
|
|
export interface ISharedLinkRepository {
|
|
|
|
getAll(userId: string): Promise<SharedLinkEntity[]>;
|
|
|
|
get(userId: string, id: string): Promise<SharedLinkEntity | null>;
|
|
|
|
getByKey(key: string): Promise<SharedLinkEntity | null>;
|
2023-01-31 19:11:49 +01:00
|
|
|
create(entity: Omit<SharedLinkEntity, 'id' | 'user'>): Promise<SharedLinkEntity>;
|
2023-01-25 17:35:28 +01:00
|
|
|
remove(entity: SharedLinkEntity): Promise<SharedLinkEntity>;
|
|
|
|
save(entity: Partial<SharedLinkEntity>): Promise<SharedLinkEntity>;
|
|
|
|
hasAssetAccess(id: string, assetId: string): Promise<boolean>;
|
|
|
|
}
|