internal: incomplete vault systems behind feature flag (#2340)

This commit is contained in:
Mo
2023-06-30 09:01:56 -05:00
committed by GitHub
parent d16e401bb9
commit b032eb9c9b
638 changed files with 20321 additions and 4813 deletions

View File

@@ -0,0 +1,5 @@
export enum SessionEvent {
Restored = 'SessionRestored',
Revoked = 'SessionRevoked',
UserKeyPairChanged = 'UserKeyPairChanged',
}

View File

@@ -10,7 +10,11 @@ import { SessionManagerResponse } from './SessionManagerResponse'
export interface SessionsClientInterface {
getWorkspaceDisplayIdentifier(): string
populateSessionFromDemoShareToken(token: Base64String): Promise<void>
getUser(): User | undefined
get userUuid(): string
getSureUser(): User
isCurrentSessionReadOnly(): boolean | undefined
register(email: string, password: string, ephemeral: boolean): Promise<UserRegistrationResponseBody>
signIn(
@@ -20,7 +24,7 @@ export interface SessionsClientInterface {
ephemeral: boolean,
minAllowedVersion?: ProtocolVersion,
): Promise<SessionManagerResponse>
getSureUser(): User
isSignedIn(): boolean
bypassChecksAndSignInWithRootKey(
email: string,
rootKey: RootKeyInterface,
@@ -42,4 +46,8 @@ export interface SessionsClientInterface {
rootKey: SNRootKey
wrappingKey?: SNRootKey
}): Promise<void>
getPublicKey(): string
getSigningPublicKey(): string
isUserMissingKeyPair(): boolean
}

View File

@@ -0,0 +1,9 @@
import { PkcKeyPair } from '@standardnotes/sncrypto-common'
export type UserKeyPairChangedEventData = {
oldKeyPair: PkcKeyPair | undefined
oldSigningKeyPair: PkcKeyPair | undefined
newKeyPair: PkcKeyPair
newSigningKeyPair: PkcKeyPair
}