import { FileType, UUID } from 'ozone-type'; export interface FileTypeClient { /** * Update or create a new type * @param type */ save(type: FileType): Promise; /** * get a type * @param identifier */ findByIdentifier(identifier: string): Promise; /** * get a type * @param id */ findById(id: UUID): Promise; /** * get all types */ findAll(): Promise; /** * delete a type * @param id */ delete(id: UUID): Promise; /** * */ getFileTypeCache(): Promise; } export interface FileTypeCache { fileTypes: FileType[]; /** * get a type * @param identifier */ findByIdentifier(identifier: string): FileType | undefined; /** * get a type * @param id */ findById(id: UUID): FileType | undefined; refreshCache(): Promise; }