refactor: application dependency management (#2363)

This commit is contained in:
Mo
2023-07-23 15:54:31 -05:00
committed by GitHub
parent e698b1c990
commit a77535456c
299 changed files with 7415 additions and 4890 deletions

View File

@@ -2,7 +2,14 @@ import { UserRegistrationResponseBody } from '@standardnotes/api'
import { ProtocolVersion } from '@standardnotes/common'
import { SNRootKey } from '@standardnotes/encryption'
import { RootKeyInterface } from '@standardnotes/models'
import { SessionBody, SignInResponse, User, HttpResponse } from '@standardnotes/responses'
import {
SessionBody,
SignInResponse,
User,
HttpResponse,
SessionListEntry,
SessionListResponse,
} from '@standardnotes/responses'
import { Base64String } from '@standardnotes/sncrypto-common'
import { SessionManagerResponse } from './SessionManagerResponse'
@@ -11,12 +18,18 @@ export interface SessionsClientInterface {
getWorkspaceDisplayIdentifier(): string
populateSessionFromDemoShareToken(token: Base64String): Promise<void>
initializeFromDisk(): Promise<void>
getUser(): User | undefined
isSignedIn(): boolean
get userUuid(): string
getSureUser(): User
isSignedIntoFirstPartyServer(): boolean
getSessionsList(): Promise<HttpResponse<SessionListEntry[]>>
revokeSession(sessionId: string): Promise<HttpResponse<SessionListResponse>>
revokeAllOtherSessions(): Promise<void>
isCurrentSessionReadOnly(): boolean | undefined
register(email: string, password: string, ephemeral: boolean): Promise<UserRegistrationResponseBody>
signIn(

View File

@@ -1,9 +1,12 @@
import { PkcKeyPair } from '@standardnotes/sncrypto-common'
export type UserKeyPairChangedEventData = {
oldKeyPair: PkcKeyPair | undefined
oldSigningKeyPair: PkcKeyPair | undefined
newKeyPair: PkcKeyPair
newSigningKeyPair: PkcKeyPair
current: {
encryption: PkcKeyPair
signing: PkcKeyPair
}
previous?: {
encryption: PkcKeyPair
signing: PkcKeyPair
}
}