mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
* Slim StateService down so it can be moved to state lib * Fix accidental import changes * Add `switchAccount` assertion * Needs to use mock
26 lines
882 B
TypeScript
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>;
|
|
}
|