2018-01-10 05:12:18 +01:00
|
|
|
import { CollectionData } from '../models/data/collectionData';
|
|
|
|
|
|
|
|
import { Collection } from '../models/domain/collection';
|
|
|
|
|
2018-01-23 23:29:15 +01:00
|
|
|
export abstract class CollectionService {
|
2018-01-10 05:12:18 +01:00
|
|
|
decryptedCollectionCache: any[];
|
|
|
|
|
2018-01-23 23:29:15 +01:00
|
|
|
clearCache: () => void;
|
|
|
|
get: (id: string) => Promise<Collection>;
|
|
|
|
getAll: () => Promise<Collection[]>;
|
|
|
|
getAllDecrypted: () => Promise<any[]>;
|
|
|
|
upsert: (collection: CollectionData | CollectionData[]) => Promise<any>;
|
|
|
|
replace: (collections: { [id: string]: CollectionData; }) => Promise<any>;
|
|
|
|
clear: (userId: string) => Promise<any>;
|
|
|
|
delete: (id: string | string[]) => Promise<any>;
|
2018-01-10 05:12:18 +01:00
|
|
|
}
|