mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 21:33:27 +00:00
* add premium badge to web filter when the user does not have access to premium * remove feature flag pass through in favor of showing/hiding archive vault observable * refactor archive observable to be more generic * add archive premium badge for the web * show premium badge inline for archive filter * show premium subscription ended message when user has archived ciphers * fix missing refactor * remove unneeded can archive check * reference observable directly * reduce the number of firstValueFroms by combining observables into a single stream * fix failing tests * add import to storybook * update variable naming for premium filters * pass event to `promptForPremium` * remove check for organization * fix footer variable reference * refactor back to `hasArchiveFlagEnabled$` - more straight forward to the underlying logic * update archive service test with new feature flag format
15 lines
758 B
TypeScript
15 lines
758 B
TypeScript
import { Observable } from "rxjs";
|
|
|
|
import { CipherId, UserId } from "@bitwarden/common/types/guid";
|
|
import { CipherViewLike } from "@bitwarden/common/vault/utils/cipher-view-like-utils";
|
|
|
|
export abstract class CipherArchiveService {
|
|
abstract hasArchiveFlagEnabled$: Observable<boolean>;
|
|
abstract archivedCiphers$(userId: UserId): Observable<CipherViewLike[]>;
|
|
abstract userCanArchive$(userId: UserId): Observable<boolean>;
|
|
abstract userHasPremium$(userId: UserId): Observable<boolean>;
|
|
abstract archiveWithServer(ids: CipherId | CipherId[], userId: UserId): Promise<void>;
|
|
abstract unarchiveWithServer(ids: CipherId | CipherId[], userId: UserId): Promise<void>;
|
|
abstract showSubscriptionEndedMessaging$(userId: UserId): Observable<boolean>;
|
|
}
|