Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update models (#2524)
Leendert de Borst4e8378ef5afe
diff --git a/core/client/src/sync/VaultSyncHold.ts b/core/client/src/sync/VaultSyncHold.tsindex bd22d00e1..ed258bb26 100644--- a/core/client/src/sync/VaultSyncHold.ts+++ b/core/client/src/sync/VaultSyncHold.ts@@ -12,6 +12,7 @@ import { getPlatform } from '../platform/ClientPlatform';*/export enum VaultSyncHoldReason {PasswordChange = 'passwordChange',+ KeyRotation = 'keyRotation',}/** How long a hold stays valid without being released, so a crashed holder is forgotten. */diff --git a/core/models/src/webapi/AuthEventType.ts b/core/models/src/webapi/AuthEventType.tsindex d39f96c64..e31df6bca 100644--- a/core/models/src/webapi/AuthEventType.ts+++ b/core/models/src/webapi/AuthEventType.ts@@ -47,6 +47,11 @@ export enum AuthEventType {*/TwoFactorAuthDisable = 'two-factor-auth-disable',+ /**+ * Represents a rotation of the account's encryption keys, confirmed with the master password.+ */+ KeyRotation = 'key-rotation',+/*** Represents a user registration event.*/diff --git a/core/models/src/webapi/KeyRotation.ts b/core/models/src/webapi/KeyRotation.tsnew file mode 100644index 000000000..ab68f0099--- /dev/null+++ b/core/models/src/webapi/KeyRotation.ts@@ -0,0 +1,16 @@+/**+ * Response of GET /v2/KeyRotation/initiate: the SRP challenge for the current password and the key generations a+ * rotation starts from.+ */+export type KeyRotationInitiateResponse = {+ salt: string;+ serverEphemeral: string;+ encryptionType: string;+ encryptionSettings: string;+ srpIdentity: string;+ userId: string;+ accountKeyVersion: number;+ personalManifestId: string;+ manifestKeyVersion: number;+};+diff --git a/core/models/src/webapi/StatusResponseV2.ts b/core/models/src/webapi/StatusResponseV2.tsindex 63bfd301a..ebf3968f1 100644--- a/core/models/src/webapi/StatusResponseV2.ts+++ b/core/models/src/webapi/StatusResponseV2.ts@@ -6,6 +6,8 @@ export type ManifestRevision = {revision: number;/** The name of a shared manifest, encrypted with the manifest's own key (base64). */encryptedName?: string | null;+ /** The generation of the manifest's VEK its content is encrypted with. */+ keyVersion?: number;}/**diff --git a/core/models/src/webapi/VaultKey.ts b/core/models/src/webapi/VaultKey.tsindex b417c1de1..c2cb90dd2 100644--- a/core/models/src/webapi/VaultKey.ts+++ b/core/models/src/webapi/VaultKey.ts@@ -13,6 +13,7 @@ export type VaultKeyResponse = {salt: string;encryptionType: string;encryptionSettings: string;+ keyVersion?: number;}/**diff --git a/core/models/src/webapi/index.ts b/core/models/src/webapi/index.tsindex d318fd82e..28ad59b03 100644--- a/core/models/src/webapi/index.ts+++ b/core/models/src/webapi/index.ts@@ -23,6 +23,7 @@ export * from './DeleteAccountInitiate';export * from './DeleteAccountRequest';export * from './PasswordChangeInitiateResponse';export * from './PasswordChangeRequest';+export * from './KeyRotation';export * from './VaultPasswordChangeRequest';export * from './BadRequestResponse';export * from './AuthEventType';