mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
send service and syncing send data (#205)
* send service and syncing send data * Update send.service.ts
This commit is contained in:
22
src/abstractions/send.service.ts
Normal file
22
src/abstractions/send.service.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { SendData } from '../models/data/sendData';
|
||||
|
||||
import { Send } from '../models/domain/send';
|
||||
import { SymmetricCryptoKey } from '../models/domain/symmetricCryptoKey';
|
||||
|
||||
import { SendView } from '../models/view/sendView';
|
||||
|
||||
export abstract class SendService {
|
||||
decryptedSendCache: SendView[];
|
||||
|
||||
clearCache: () => void;
|
||||
encrypt: (model: SendView, file: File, password: string, key?: SymmetricCryptoKey) => Promise<[Send, ArrayBuffer]>;
|
||||
get: (id: string) => Promise<Send>;
|
||||
getAll: () => Promise<Send[]>;
|
||||
getAllDecrypted: () => Promise<SendView[]>;
|
||||
saveWithServer: (sendData: [Send, ArrayBuffer]) => Promise<any>;
|
||||
upsert: (send: SendData | SendData[]) => Promise<any>;
|
||||
replace: (sends: { [id: string]: SendData; }) => Promise<any>;
|
||||
clear: (userId: string) => Promise<any>;
|
||||
delete: (id: string | string[]) => Promise<any>;
|
||||
deleteWithServer: (id: string) => Promise<any>;
|
||||
}
|
||||
Reference in New Issue
Block a user