diff --git a/lib/actions/user-actions.js b/lib/actions/user-actions.js --- a/lib/actions/user-actions.js +++ b/lib/actions/user-actions.js @@ -368,6 +368,12 @@ calendarQuery: CalendarQuery, }; +const tempIdentityLoginActionTypes = Object.freeze({ + started: 'TEMP_IDENTITY_LOG_IN_STARTED', + success: 'TEMP_IDENTITY_LOG_IN_SUCCESS', + failed: 'TEMP_IDENTITY_LOG_IN_FAILED', +}); + const logInActionTypes = Object.freeze({ started: 'LOG_IN_STARTED', success: 'LOG_IN_SUCCESS', @@ -660,6 +666,7 @@ getOlmSessionInitializationData, mergeUserInfos, logIn as logInRawAction, + tempIdentityLoginActionTypes, useLogIn, logInActionTypes, useLogOut, diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js --- a/lib/types/redux-types.js +++ b/lib/types/redux-types.js @@ -7,6 +7,7 @@ RegisterResult, DefaultNotificationPayload, ClaimUsernameResponse, + KeyserverAuthResult, } from './account-types.js'; import type { ActivityUpdateSuccessPayload, @@ -308,6 +309,38 @@ +payload: ?DeleteEntryResult, +loadingInfo: LoadingInfo, } + | { + +type: 'TEMP_IDENTITY_LOG_IN_STARTED', + +loadingInfo: LoadingInfo, + +payload?: void, + } + | { + +type: 'TEMP_IDENTITY_LOG_IN_FAILED', + +error: true, + +payload: Error, + +loadingInfo: LoadingInfo, + } + | { + +type: 'TEMP_IDENTITY_LOG_IN_SUCCESS', + +payload?: void, + +loadingInfo: LoadingInfo, + } + | { + +type: 'KEYSERVER_AUTH_STARTED', + +loadingInfo: LoadingInfo, + +payload: LogInStartingPayload, + } + | { + +type: 'KEYSERVER_AUTH_FAILED', + +error: true, + +payload: Error, + +loadingInfo: LoadingInfo, + } + | { + +type: 'KEYSERVER_AUTH_SUCCESS', + +payload: KeyserverAuthResult, + +loadingInfo: LoadingInfo, + } | { +type: 'LOG_IN_STARTED', +loadingInfo: LoadingInfo,