diff --git a/lib/types/socket-types.js b/lib/types/socket-types.js --- a/lib/types/socket-types.js +++ b/lib/types/socket-types.js @@ -486,11 +486,17 @@ | 'disconnecting' | 'forcedDisconnecting' | 'disconnected'; + +export type ConnectionIssue = + | 'policy_acknowledgement_socket_crash_loop' + | 'not_logged_in_error'; + export type ConnectionInfo = { +status: ConnectionStatus, +queuedActivityUpdates: $ReadOnlyArray, +lateResponses: $ReadOnlyArray, +showDisconnectedBar: boolean, + +connectionIssue: ?ConnectionIssue, }; export const connectionInfoValidator: TInterface = tShape({ @@ -505,12 +511,19 @@ queuedActivityUpdates: t.list(activityUpdateValidator), lateResponses: t.list(t.Number), showDisconnectedBar: t.Boolean, + connectionIssue: t.maybe( + t.enums.of([ + 'policy_acknowledgement_socket_crash_loop', + 'not_logged_in_error', + ]), + ), }); export const defaultConnectionInfo: ConnectionInfo = { status: 'connecting', queuedActivityUpdates: [], lateResponses: [], showDisconnectedBar: false, + connectionIssue: null, }; export const updateConnectionStatusActionType = 'UPDATE_CONNECTION_STATUS'; export type UpdateConnectionStatusPayload = {