cleanup types

This commit is contained in:
Bruno Windels 2022-01-26 10:17:31 +01:00
parent cfb94206f9
commit 85155a43bb
2 changed files with 4 additions and 4 deletions

View file

@ -28,7 +28,7 @@ export type BackupInfo = BaseBackupInfo & {
auth_data: AuthData, auth_data: AuthData,
} }
export type AuthData = { type AuthData = {
public_key: string, public_key: string,
signatures: SignatureMap signatures: SignatureMap
} }

View file

@ -24,7 +24,6 @@ import type {IncomingRoomKey, RoomKey} from "../decryption/RoomKey";
import type {KeyLoader} from "../decryption/KeyLoader"; import type {KeyLoader} from "../decryption/KeyLoader";
import type {SecretStorage} from "../../../ssss/SecretStorage"; import type {SecretStorage} from "../../../ssss/SecretStorage";
import type {Storage} from "../../../storage/idb/Storage"; import type {Storage} from "../../../storage/idb/Storage";
import type {DeviceIdentity} from "../../../storage/idb/stores/DeviceIdentityStore";
import type {ILogItem} from "../../../../logging/types"; import type {ILogItem} from "../../../../logging/types";
import type {Platform} from "../../../../platform/web/Platform"; import type {Platform} from "../../../../platform/web/Platform";
import type {Transaction} from "../../../storage/idb/Transaction"; import type {Transaction} from "../../../storage/idb/Transaction";
@ -46,13 +45,13 @@ type OtherBackupInfo = BaseBackupInfo & {
}; };
type BackupInfo = Curve25519.BackupInfo | OtherBackupInfo; type BackupInfo = Curve25519.BackupInfo | OtherBackupInfo;
type AuthData = Curve25519.AuthData; type SessionData = Curve25519.SessionData;
type SessionInfo = { type SessionInfo = {
first_message_index: number, first_message_index: number,
forwarded_count: number, forwarded_count: number,
is_verified: boolean, is_verified: boolean,
session_data: Curve25519.SessionData | any session_data: SessionData
} }
type MegOlmSessionKeyInfo = { type MegOlmSessionKeyInfo = {
@ -63,6 +62,7 @@ type MegOlmSessionKeyInfo = {
session_key: string session_key: string
} }
// the type that session_data decrypts from / encrypts to
export type SessionKeyInfo = MegOlmSessionKeyInfo | {algorithm: string}; export type SessionKeyInfo = MegOlmSessionKeyInfo | {algorithm: string};
type KeyBackupPayload = { type KeyBackupPayload = {