-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
46 lines (40 loc) · 1.53 KB
/
index.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { takeLatest, all, takeEvery } from 'redux-saga/effects'
import { StartupTypes } from 'App/Stores/Startup/Actions'
import { AuthTypes } from 'App/Stores/Auth/Actions'
import { ApiTypes } from 'App/Stores/Api/Actions'
import { startup } from './StartupSaga'
import {
login,
logout,
} from './AuthSaga'
import {
getDevices,
checkDeviceRegistration,
registerDevice,
configureLoRaAutomatic,
configureLoRaManual,
initializeTemperatureSensors,
initializeWeightSensor,
createSensorDefinition,
getSensorDefinitions,
updateApiSensorDefinition,
getFirmwares,
} from './ApiSaga'
export default function* root() {
yield all([
takeLatest(StartupTypes.STARTUP, startup),
takeLatest(AuthTypes.LOGIN, login),
takeLatest(AuthTypes.LOGOUT, logout),
takeLatest(ApiTypes.GET_DEVICES, getDevices),
takeLatest(ApiTypes.CHECK_DEVICE_REGISTRATION, checkDeviceRegistration),
takeLatest(ApiTypes.REGISTER_DEVICE, registerDevice),
takeLatest(ApiTypes.CONFIGURE_LO_RA_AUTOMATIC, configureLoRaAutomatic),
takeLatest(ApiTypes.CONFIGURE_LO_RA_MANUAL, configureLoRaManual),
takeLatest(ApiTypes.GET_SENSOR_DEFINITIONS, getSensorDefinitions),
takeEvery(ApiTypes.INITIALIZE_TEMPERATURE_SENSORS, initializeTemperatureSensors),
takeEvery(ApiTypes.INITIALIZE_WEIGHT_SENSOR, initializeWeightSensor),
takeEvery(ApiTypes.CREATE_SENSOR_DEFINITION, createSensorDefinition),
takeEvery(ApiTypes.UPDATE_API_SENSOR_DEFINITION, updateApiSensorDefinition),
takeLatest(ApiTypes.GET_FIRMWARES, getFirmwares),
])
}