diff --git a/lib/types/request-types.js b/lib/types/request-types.js --- a/lib/types/request-types.js +++ b/lib/types/request-types.js @@ -4,6 +4,7 @@ import { type ActivityUpdate } from './activity-types.js'; import type { Shape } from './core.js'; +import type { SignedIdentityKeysBlob } from './crypto-types.js'; import type { Platform, PlatformDetails } from './device-types.js'; import type { RawEntryInfo, CalendarQuery } from './entry-types.js'; import type { @@ -31,6 +32,7 @@ CHECK_STATE: 6, INITIAL_ACTIVITY_UPDATES: 7, MORE_ONE_TIME_KEYS: 8, + SIGNED_IDENTITY_KEYS_BLOB: 9, }); type ServerRequestType = $Values; export function assertServerRequestType( @@ -43,7 +45,8 @@ serverRequestType === 5 || serverRequestType === 6 || serverRequestType === 7 || - serverRequestType === 8, + serverRequestType === 8 || + serverRequestType === 9, 'number is not ServerRequestType enum', ); return serverRequestType; @@ -111,11 +114,20 @@ +keys: $ReadOnlyArray, }; +type SignedIdentityKeysBlobServerRequest = { + +type: 9, +}; +type SignedIdentityKeysBlobClientResponse = { + +type: 9, + +signedIdentityKeysBlob: SignedIdentityKeysBlob, +}; + export type ServerServerRequest = | PlatformServerRequest | PlatformDetailsServerRequest | ServerCheckStateServerRequest - | MoreOneTimeKeysServerRequest; + | MoreOneTimeKeysServerRequest + | SignedIdentityKeysBlobServerRequest; export type ClientResponse = | PlatformClientResponse | ThreadInconsistencyClientResponse @@ -123,7 +135,8 @@ | EntryInconsistencyClientResponse | CheckStateClientResponse | InitialActivityUpdatesClientResponse - | MoreOneTimeKeysClientResponse; + | MoreOneTimeKeysClientResponse + | SignedIdentityKeysBlobClientResponse; export type ClientCheckStateServerRequest = { +type: 6, @@ -147,7 +160,8 @@ | PlatformServerRequest | PlatformDetailsServerRequest | ClientCheckStateServerRequest - | MoreOneTimeKeysServerRequest; + | MoreOneTimeKeysServerRequest + | SignedIdentityKeysBlobServerRequest; // This is just the client variant of ClientResponse. The server needs to handle // multiple client versions so the type supports old versions of certain client @@ -167,7 +181,8 @@ | ClientEntryInconsistencyClientResponse | CheckStateClientResponse | InitialActivityUpdatesClientResponse - | MoreOneTimeKeysClientResponse; + | MoreOneTimeKeysClientResponse + | SignedIdentityKeysBlobClientResponse; export type ClientInconsistencyResponse = | ClientThreadInconsistencyClientResponse