* refactor(server): shared links * chore: tests * fix: bugs and tests * fix: missed one expired at * fix: standardize file upload checks * test: lower flutter version Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
14 lines
622 B
TypeScript
14 lines
622 B
TypeScript
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>;
|
|
create(entity: Omit<SharedLinkEntity, 'id'>): Promise<SharedLinkEntity>;
|
|
remove(entity: SharedLinkEntity): Promise<SharedLinkEntity>;
|
|
save(entity: Partial<SharedLinkEntity>): Promise<SharedLinkEntity>;
|
|
hasAssetAccess(id: string, assetId: string): Promise<boolean>;
|
|
}
|