internal: incomplete vault systems behind feature flag (#2340)
This commit is contained in:
5
packages/services/src/Domain/Session/SessionEvent.ts
Normal file
5
packages/services/src/Domain/Session/SessionEvent.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export enum SessionEvent {
|
||||
Restored = 'SessionRestored',
|
||||
Revoked = 'SessionRevoked',
|
||||
UserKeyPairChanged = 'UserKeyPairChanged',
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import { PkcKeyPair } from '@standardnotes/sncrypto-common'
|
||||
|
||||
export type UserKeyPairChangedEventData = {
|
||||
oldKeyPair: PkcKeyPair | undefined
|
||||
oldSigningKeyPair: PkcKeyPair | undefined
|
||||
|
||||
newKeyPair: PkcKeyPair
|
||||
newSigningKeyPair: PkcKeyPair
|
||||
}
|
||||
Reference in New Issue
Block a user