Changeset View
Changeset View
Standalone View
Standalone View
lib/types/redux-types.js
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | import type { | ||||
ChangeThreadSettingsPayload, | ChangeThreadSettingsPayload, | ||||
LeaveThreadPayload, | LeaveThreadPayload, | ||||
NewThreadResult, | NewThreadResult, | ||||
ThreadJoinPayload, | ThreadJoinPayload, | ||||
} from './thread-types.js'; | } from './thread-types.js'; | ||||
import type { ClientUpdatesResultWithUserInfos } from './update-types.js'; | import type { ClientUpdatesResultWithUserInfos } from './update-types.js'; | ||||
import type { CurrentUserInfo, UserStore } from './user-types.js'; | import type { CurrentUserInfo, UserStore } from './user-types.js'; | ||||
import type { Shape } from '../types/core.js'; | import type { Shape } from '../types/core.js'; | ||||
import type { NotifPermissionAlertInfo } from '../utils/push-alerts.js'; | |||||
export type BaseAppState<NavInfo: BaseNavInfo> = { | export type BaseAppState<NavInfo: BaseNavInfo> = { | ||||
navInfo: NavInfo, | navInfo: NavInfo, | ||||
currentUserInfo: ?CurrentUserInfo, | currentUserInfo: ?CurrentUserInfo, | ||||
draftStore: DraftStore, | draftStore: DraftStore, | ||||
entryStore: EntryStore, | entryStore: EntryStore, | ||||
threadStore: ThreadStore, | threadStore: ThreadStore, | ||||
userStore: UserStore, | userStore: UserStore, | ||||
messageStore: MessageStore, | messageStore: MessageStore, | ||||
updatesCurrentAsOf: number, // millisecond timestamp | updatesCurrentAsOf: number, // millisecond timestamp | ||||
loadingStatuses: { [key: string]: { [idx: number]: LoadingStatus } }, | loadingStatuses: { [key: string]: { [idx: number]: LoadingStatus } }, | ||||
calendarFilters: $ReadOnlyArray<CalendarFilter>, | calendarFilters: $ReadOnlyArray<CalendarFilter>, | ||||
urlPrefix: string, | urlPrefix: string, | ||||
notifPermissionAlertInfo: NotifPermissionAlertInfo, | |||||
connection: ConnectionInfo, | connection: ConnectionInfo, | ||||
watchedThreadIDs: $ReadOnlyArray<string>, | watchedThreadIDs: $ReadOnlyArray<string>, | ||||
lifecycleState: LifecycleState, | lifecycleState: LifecycleState, | ||||
enabledApps: EnabledApps, | enabledApps: EnabledApps, | ||||
reportStore: ReportStore, | reportStore: ReportStore, | ||||
nextLocalID: number, | nextLocalID: number, | ||||
dataLoaded: boolean, | dataLoaded: boolean, | ||||
userPolicies: UserPolicies, | userPolicies: UserPolicies, | ||||
▲ Show 20 Lines • Show All 798 Lines • ▼ Show 20 Lines | | { | ||||
+payload: LogInResult, | +payload: LogInResult, | ||||
+loadingInfo: LoadingInfo, | +loadingInfo: LoadingInfo, | ||||
} | } | ||||
| { | | { | ||||
+type: 'SIWE_AUTH_FAILED', | +type: 'SIWE_AUTH_FAILED', | ||||
+error: true, | +error: true, | ||||
+payload: Error, | +payload: Error, | ||||
+loadingInfo: LoadingInfo, | +loadingInfo: LoadingInfo, | ||||
} | |||||
| { | |||||
+type: 'RECORD_NOTIF_PERMISSION_ALERT', | |||||
+payload: { +time: number }, | |||||
}; | }; | ||||
export type ActionPayload = ?(Object | Array<*> | $ReadOnlyArray<*> | string); | export type ActionPayload = ?(Object | Array<*> | $ReadOnlyArray<*> | string); | ||||
export type SuperAction = { | export type SuperAction = { | ||||
type: string, | type: string, | ||||
payload?: ActionPayload, | payload?: ActionPayload, | ||||
loadingInfo?: LoadingInfo, | loadingInfo?: LoadingInfo, | ||||
error?: boolean, | error?: boolean, | ||||
Show All 11 Lines |