mirror of
https://github.com/bitwarden/browser
synced 2025-12-20 02:03:39 +00:00
[PM-5606] Add reactive generator service (#7446)
This commit is contained in:
49
libs/common/src/tools/generator/key-definitions.ts
Normal file
49
libs/common/src/tools/generator/key-definitions.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { GENERATOR_DISK, GENERATOR_MEMORY, KeyDefinition } from "../../platform/state";
|
||||
|
||||
import { GeneratedPasswordHistory } from "./password/generated-password-history";
|
||||
import { PasswordGenerationOptions } from "./password/password-generation-options";
|
||||
|
||||
/** plaintext password generation options */
|
||||
export const PASSWORD_SETTINGS = new KeyDefinition<PasswordGenerationOptions>(
|
||||
GENERATOR_DISK,
|
||||
"passwordGeneratorSettings",
|
||||
{
|
||||
deserializer: (value) => value,
|
||||
},
|
||||
);
|
||||
|
||||
/** plaintext passphrase generation options */
|
||||
export const PASSPHRASE_SETTINGS = new KeyDefinition<PasswordGenerationOptions>(
|
||||
GENERATOR_DISK,
|
||||
"passphraseGeneratorSettings",
|
||||
{
|
||||
deserializer: (value) => value,
|
||||
},
|
||||
);
|
||||
|
||||
/** plaintext username generation options */
|
||||
export const ENCRYPTED_USERNAME_SETTINGS = new KeyDefinition<PasswordGenerationOptions>(
|
||||
GENERATOR_DISK,
|
||||
"usernameGeneratorSettings",
|
||||
{
|
||||
deserializer: (value) => value,
|
||||
},
|
||||
);
|
||||
|
||||
/** plaintext username generation options */
|
||||
export const PLAINTEXT_USERNAME_SETTINGS = new KeyDefinition<PasswordGenerationOptions>(
|
||||
GENERATOR_MEMORY,
|
||||
"usernameGeneratorSettings",
|
||||
{
|
||||
deserializer: (value) => value,
|
||||
},
|
||||
);
|
||||
|
||||
/** encrypted password generation history */
|
||||
export const ENCRYPTED_HISTORY = new KeyDefinition<GeneratedPasswordHistory>(
|
||||
GENERATOR_DISK,
|
||||
"passwordGeneratorHistory",
|
||||
{
|
||||
deserializer: (value) => value,
|
||||
},
|
||||
);
|
||||
Reference in New Issue
Block a user