diff --git a/keyserver/src/responders/redux-state-responders.js b/keyserver/src/responders/redux-state-responders.js --- a/keyserver/src/responders/redux-state-responders.js +++ b/keyserver/src/responders/redux-state-responders.js @@ -42,7 +42,7 @@ import { urlInfoValidator } from 'lib/utils/url-utils.js'; import { tShape, ashoatKeyserverID, tID } from 'lib/utils/validation-utils.js'; import type { - InitialReduxStateResponse, + WebInitialReduxStateResponse, InitialKeyserverInfo, InitialReduxStateRequest, ExcludedData, @@ -84,8 +84,8 @@ threadInfos: t.dict(tID, mixedRawThreadInfoValidator), }); -export const initialReduxStateValidator: TInterface = - tShape({ +export const initialReduxStateValidator: TInterface = + tShape({ navInfo: webNavInfoValidator, currentUserInfo: currentUserInfoValidator, entryStore: entryStoreValidator, @@ -101,7 +101,7 @@ async function getInitialReduxStateResponder( viewer: Viewer, request: InitialReduxStateRequest, -): Promise { +): Promise { const { urlInfo, excludedData, clientUpdatesCurrentAsOf } = request; const useDatabase = viewer.loggedIn && canUseDatabaseOnWeb(viewer.userID); @@ -354,7 +354,7 @@ }; })(); - const initialReduxState: InitialReduxStateResponse = await promiseAll({ + const initialReduxState: WebInitialReduxStateResponse = await promiseAll({ navInfo: navInfoPromise, currentUserInfo: currentUserInfoPromise, entryStore: entryStorePromise, diff --git a/web/redux/action-types.js b/web/redux/action-types.js --- a/web/redux/action-types.js +++ b/web/redux/action-types.js @@ -10,7 +10,7 @@ import type { ExcludedData, InitialReduxState, - InitialReduxStateResponse, + WebInitialReduxStateResponse, InitialKeyserverInfo, InitialReduxStateRequest, } from '../types/redux-types.js'; @@ -74,7 +74,7 @@ } } - const responses: { +[string]: InitialReduxStateResponse } = + const responses: { +[string]: WebInitialReduxStateResponse } = await callKeyserverEndpoint( 'get_initial_redux_state', requests, diff --git a/web/types/redux-types.js b/web/types/redux-types.js --- a/web/types/redux-types.js +++ b/web/types/redux-types.js @@ -8,7 +8,7 @@ import type { CurrentUserInfo, UserInfos } from 'lib/types/user-types.js'; import type { URLInfo } from 'lib/utils/url-utils.js'; -export type InitialReduxStateResponse = { +export type WebInitialReduxStateResponse = { +navInfo: WebNavInfo, +currentUserInfo: CurrentUserInfo, +entryStore: EntryStore,