-
Notifications
You must be signed in to change notification settings - Fork 1
/
authSession.ts
29 lines (24 loc) · 978 Bytes
/
authSession.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { createAction } from '@reduxjs/toolkit';
import { actionType } from 'services/utils';
const types = {
AUTH_SESSION_START: actionType('AUTH_SESSION_START'),
AUTH_SESSION_END: actionType('AUTH_SESSION_END'),
AUTH_SESSION_PAUSE: actionType('AUTH_SESSION_PAUSE'),
AUTH_SESSION_RESUME: actionType('AUTH_SESSION_RESUME'),
} as const;
/**
* @category Redux Action Creator
*/
export const authSessionStart = createAction<void, typeof types['AUTH_SESSION_START']>(types.AUTH_SESSION_START);
/**
* @category Redux Action Creator
*/
export const authSessionEnd = createAction<void, typeof types['AUTH_SESSION_END']>(types.AUTH_SESSION_END);
/**
* @category Redux Action Creator
*/
export const authSessionPause = createAction<void, typeof types['AUTH_SESSION_PAUSE']>(types.AUTH_SESSION_PAUSE);
/**
* @category Redux Action Creator
*/
export const authSessionResume = createAction<void, typeof types['AUTH_SESSION_RESUME']>(types.AUTH_SESSION_RESUME);