mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
[PM-328] Move Send to Tools (#5104)
* Move send in libs/common * Move send in libs/angular * Move send in browser * Move send in cli * Move send in desktop * Move send in web
This commit is contained in:
committed by
GitHub
parent
e645688f8a
commit
e238ea20a9
@@ -0,0 +1,39 @@
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
import { EncArrayBuffer } from "../../../models/domain/enc-array-buffer";
|
||||
import { SymmetricCryptoKey } from "../../../models/domain/symmetric-crypto-key";
|
||||
import { SendData } from "../models/data/send.data";
|
||||
import { Send } from "../models/domain/send";
|
||||
import { SendView } from "../models/view/send.view";
|
||||
|
||||
export abstract class SendService {
|
||||
sends$: Observable<Send[]>;
|
||||
sendViews$: Observable<SendView[]>;
|
||||
|
||||
encrypt: (
|
||||
model: SendView,
|
||||
file: File | ArrayBuffer,
|
||||
password: string,
|
||||
key?: SymmetricCryptoKey
|
||||
) => Promise<[Send, EncArrayBuffer]>;
|
||||
get: (id: string) => Send;
|
||||
/**
|
||||
* @deprecated Do not call this, use the sends$ observable collection
|
||||
*/
|
||||
getAll: () => Promise<Send[]>;
|
||||
/**
|
||||
* @deprecated Only use in CLI
|
||||
*/
|
||||
getFromState: (id: string) => Promise<Send>;
|
||||
/**
|
||||
* @deprecated Only use in CLI
|
||||
*/
|
||||
getAllDecryptedFromState: () => Promise<SendView[]>;
|
||||
}
|
||||
|
||||
export abstract class InternalSendService extends SendService {
|
||||
upsert: (send: SendData | SendData[]) => Promise<any>;
|
||||
replace: (sends: { [id: string]: SendData }) => Promise<void>;
|
||||
clear: (userId: string) => Promise<any>;
|
||||
delete: (id: string | string[]) => Promise<any>;
|
||||
}
|
||||
Reference in New Issue
Block a user