1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

[PM-6072] Add get$ method on SendService (#7839)

* Added missing get$ method on SendService

* Added distinctUntilChanged to the get$ method and added more tests

* Added more validations and tests to get$

* Added some more test cases to get$

* Refactored test cases from get$
This commit is contained in:
aj-rosado
2024-02-09 18:27:50 +00:00
committed by GitHub
parent b239e3736f
commit 7d47f1496c
3 changed files with 394 additions and 1 deletions

View File

@@ -18,7 +18,17 @@ export abstract class SendService {
password: string,
key?: SymmetricCryptoKey,
) => Promise<[Send, EncArrayBuffer]>;
/**
* @deprecated Do not call this, use the get$ method
*/
get: (id: string) => Send;
/**
* Provides a send for a determined id
* updates after a change occurs to the send that matches the id
* @param id The id of the desired send
* @returns An observable that listens to the value of the desired send
*/
get$: (id: string) => Observable<Send | undefined>;
/**
* Provides re-encrypted user sends for the key rotation process
* @param newUserKey The new user key to use for re-encryption