2018-01-10 05:01:16 +01:00
|
|
|
import { FolderData } from '../models/data/folderData';
|
2018-01-10 04:39:43 +01:00
|
|
|
|
2018-01-10 05:01:16 +01:00
|
|
|
import { Folder } from '../models/domain/folder';
|
2018-01-10 04:39:43 +01:00
|
|
|
|
|
|
|
export interface FolderService {
|
|
|
|
decryptedFolderCache: any[];
|
|
|
|
|
|
|
|
clearCache(): void;
|
|
|
|
encrypt(model: any): Promise<Folder>;
|
|
|
|
get(id: string): Promise<Folder>;
|
|
|
|
getAll(): Promise<Folder[]>;
|
|
|
|
getAllDecrypted(): Promise<any[]>;
|
|
|
|
saveWithServer(folder: Folder): Promise<any>;
|
|
|
|
upsert(folder: FolderData | FolderData[]): Promise<any>;
|
|
|
|
replace(folders: { [id: string]: FolderData; }): Promise<any>;
|
|
|
|
clear(userId: string): Promise<any>;
|
|
|
|
delete(id: string | string[]): Promise<any>;
|
|
|
|
deleteWithServer(id: string): Promise<any>;
|
|
|
|
}
|