1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-19 07:35:48 +02:00
bitwarden-browser/src/abstractions/folder.service.ts

20 lines
718 B
TypeScript
Raw Normal View History

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
2018-01-23 23:29:15 +01:00
export abstract class FolderService {
2018-01-10 04:39:43 +01:00
decryptedFolderCache: any[];
2018-01-23 23:29:15 +01:00
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>;
2018-01-10 04:39:43 +01:00
}