refactor: http service (#2233)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { HttpResponse, SignInResponse } from '@standardnotes/responses'
|
||||
import { AnyKeyParamsContent } from '@standardnotes/common'
|
||||
import { RootKeyInterface } from '@standardnotes/models'
|
||||
import { HttpResponse } from '@standardnotes/responses'
|
||||
|
||||
export type SessionManagerResponse = {
|
||||
response: HttpResponse
|
||||
response: HttpResponse<SignInResponse>
|
||||
rootKey?: RootKeyInterface
|
||||
keyParams?: AnyKeyParamsContent
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { UserRegistrationResponseBody } from '@standardnotes/api'
|
||||
import { ProtocolVersion } from '@standardnotes/common'
|
||||
import { SNRootKey } from '@standardnotes/encryption'
|
||||
import { RootKeyInterface } from '@standardnotes/models'
|
||||
import { ClientDisplayableError, HttpResponse, SessionBody, SignInResponse, User } from '@standardnotes/responses'
|
||||
import { ClientDisplayableError, SessionBody, SignInResponse, User, HttpResponse } from '@standardnotes/responses'
|
||||
import { Base64String } from '@standardnotes/sncrypto-common'
|
||||
|
||||
import { SessionManagerResponse } from './SessionManagerResponse'
|
||||
@@ -25,7 +25,7 @@ export interface SessionsClientInterface {
|
||||
email: string,
|
||||
rootKey: RootKeyInterface,
|
||||
ephemeral: boolean,
|
||||
): Promise<SignInResponse | HttpResponse>
|
||||
): Promise<HttpResponse<SignInResponse>>
|
||||
signOut(): Promise<void>
|
||||
changeCredentials(parameters: {
|
||||
currentServerPassword: string
|
||||
|
||||
Reference in New Issue
Block a user