1 import type { TypedStartListening } from '@reduxjs/toolkit';
5 type GroupMembershipsState,
6 type OrganizationKeyState,
7 type SecurityCheckupReduxState,
8 type UserInvitationsState,
10 type UserSettingsState,
12 authenticationListener,
13 groupMembershipsListener,
14 organizationKeysListener,
15 organizationThemeListener,
16 securityCheckupListener,
17 userInvitationsListener,
19 } from '@proton/account';
20 import type { ProtonDispatch, ProtonThunkArguments } from '@proton/redux-shared-store-types';
22 interface RequiredState
23 extends AddressKeysState,
28 SecurityCheckupReduxState,
29 GroupMembershipsState {}
31 type AppStartListening = TypedStartListening<RequiredState, ProtonDispatch<any>, ProtonThunkArguments>;
33 export const startSharedListening = (startListening: AppStartListening) => {
34 userKeysListener(startListening);
35 addressKeysListener(startListening);
36 organizationThemeListener(startListening);
37 organizationKeysListener(startListening);
38 userInvitationsListener(startListening);
39 authenticationListener(startListening);
40 securityCheckupListener(startListening);
41 groupMembershipsListener(startListening);