1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 07:13:32 +00:00
Files
browser/libs/state/src/legacy/state.service.ts
Justin Baur 939fd402c3 [PM-24677] Slim StateService down so it can be moved to state lib (#16021)
* Slim StateService down so it can be moved to state lib

* Fix accidental import changes

* Add `switchAccount` assertion

* Needs to use mock
2025-08-18 12:37:25 -04:00

26 lines
882 B
TypeScript

import { UserId } from "@bitwarden/user-core";
export type RequiredUserId = { userId: UserId };
/**
* This class exists for various legacy reasons, there are likely better things to use than this service.
*/
export abstract class StateService {
abstract clean(options: RequiredUserId): Promise<void>;
/**
* Gets the user's auto key
*/
abstract getUserKeyAutoUnlock(options: RequiredUserId): Promise<string | null>;
/**
* Sets the user's auto key
*/
abstract setUserKeyAutoUnlock(value: string | null, options: RequiredUserId): Promise<void>;
/**
* @deprecated For backwards compatible purposes only, use DesktopAutofillSettingsService
*/
abstract setEnableDuckDuckGoBrowserIntegration(value: boolean): Promise<void>;
abstract getDuckDuckGoSharedKey(): Promise<string | null>;
abstract setDuckDuckGoSharedKey(value: string): Promise<void>;
}