mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
22 lines
1.2 KiB
TypeScript
22 lines
1.2 KiB
TypeScript
import { Observable } from "rxjs";
|
|
|
|
import { PasswordGeneratorPolicyOptions } from "@bitwarden/common/admin-console/models/domain/password-generator-policy-options";
|
|
import { GeneratedPasswordHistory } from "@bitwarden/generator-history";
|
|
|
|
import { PasswordGeneratorOptions } from "./password-generator-options";
|
|
|
|
/** @deprecated Use {@link GeneratorService} with a password or passphrase {@link GeneratorStrategy} instead. */
|
|
export abstract class PasswordGenerationServiceAbstraction {
|
|
generatePassword: (options: PasswordGeneratorOptions) => Promise<string>;
|
|
generatePassphrase: (options: PasswordGeneratorOptions) => Promise<string>;
|
|
getOptions: () => Promise<[PasswordGeneratorOptions, PasswordGeneratorPolicyOptions]>;
|
|
getOptions$: () => Observable<[PasswordGeneratorOptions, PasswordGeneratorPolicyOptions]>;
|
|
enforcePasswordGeneratorPoliciesOnOptions: (
|
|
options: PasswordGeneratorOptions,
|
|
) => Promise<[PasswordGeneratorOptions, PasswordGeneratorPolicyOptions]>;
|
|
saveOptions: (options: PasswordGeneratorOptions) => Promise<void>;
|
|
getHistory: () => Promise<GeneratedPasswordHistory[]>;
|
|
addHistory: (password: string) => Promise<void>;
|
|
clear: (userId?: string) => Promise<GeneratedPasswordHistory[]>;
|
|
}
|