vineanova-redux-artifacts
Version:
## Overview
2,268 lines (1,939 loc) • 270 kB
JavaScript
/**
* @module Sagas/vineaNovaApi.sagas
* @desc common sagas for vinea nova api actions
*/
import { put, call, takeLatest, all, takeLeading } from "redux-saga/effects";
import { normalize, schema } from "normalizr";
import * as APIServices from "../services";
import { VineaNovaActions } from '../actions'
/**
* commonActionCreator
*/
export function* getActivityDefaultRatesSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getActivityDefaultRates, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postActivityDefaultRatesSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postActivityDefaultRates, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putActivityDefaultRatesSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putActivityDefaultRates, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteActivityDefaultRatesSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteActivityDefaultRates, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getBlockVintageSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getBlockVintage, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postBlockVintageSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postBlockVintage, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putBlockVintageSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putBlockVintage, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteBlockVintageSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteBlockVintage, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getChartsSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getCharts, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postChartsSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postCharts, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postChartsByChartFiltersSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postChartsByChartFilters, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postChartsByPageFiltersSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postChartsByPageFilters, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getChartFilterSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getChartFilter, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postChartFiltersSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postChartFilters, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getDashboardPagesSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getDashboardPages, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getDashboardPageFiltersSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getDashboardPageFilters, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postDashboardPageFiltersSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postDashboardPageFilters, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getCropBlockNotesSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getCropBlockNotes, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postCropBlockNotesSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postCropBlockNotes, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putCropBlockNotesSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putCropBlockNotes, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteCropBlockNotesSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteCropBlockNotes, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postMeasurementNoteImageSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postMeasurementNoteImage, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getCropBlockPhenologySagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getCropBlockPhenology, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postCropBlockPhenologySagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postCropBlockPhenology, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putCropBlockPhenologySagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putCropBlockPhenology, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteCropBlockPhenologySagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteCropBlockPhenology, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getCropBlockSettingSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getCropBlockSetting, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postCropBlockSettingSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postCropBlockSetting, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putCropBlockSettingSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putCropBlockSetting, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteCropBlockSettingSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteCropBlockSetting, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getCropBlockVintageSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getCropBlockVintage, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postCropBlockVintageSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postCropBlockVintage, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putCropBlockVintageSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putCropBlockVintage, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteCropBlockVintageSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteCropBlockVintage, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getSitesSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getSites, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putSitesSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putSites, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getSensorsSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getSensors, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putSensorsSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putSensors, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getSensorBlocksSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getSensorBlocks, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getTriggerSensorSummaryDataSyncSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getTriggerSensorSummaryDataSync, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getEventLogSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getEventLog, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putEventLogStatusSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putEventLogStatus, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postNewLoginEventLogSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postNewLoginEventLog, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getDemoExcelDataSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getDemoExcelData, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getHealthCheckSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getHealthCheck, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postIdentityAccommodationSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postIdentityAccommodation, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putIdentityAccommodationSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putIdentityAccommodation, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getIdentityAccommodationSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getIdentityAccommodation, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteIdentityAccommodationSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteIdentityAccommodation, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getIdentityActivitySagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getIdentityActivity, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postIdentityActivitySagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postIdentityActivity, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putIdentityActivitySagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putIdentityActivity, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteIdentityActivitySagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteIdentityActivity, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getIdentityClassificationSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getIdentityClassification, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postIdentityClassificationSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postIdentityClassification, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putIdentityClassificationSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putIdentityClassification, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteIdentityClassificationSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteIdentityClassification, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postIdentityConsumableSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postIdentityConsumable, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putIdentityConsumableSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putIdentityConsumable, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getIdentityConsumableSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getIdentityConsumable, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteIdentityConsumableSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteIdentityConsumable, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getIdentityContactMethodSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getIdentityContactMethod, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postContactMethodSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postContactMethod, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putContactMethodSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putContactMethod, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteContactMethodSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteContactMethod, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getIdentityContactMethodAddressSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getIdentityContactMethodAddress, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postIdentityContactMethodAddressSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postIdentityContactMethodAddress, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putIdentityContactMethodAddressSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putIdentityContactMethodAddress, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postIdentityCourseSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postIdentityCourse, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putIdentityCourseSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putIdentityCourse, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getIdentityCourseSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getIdentityCourse, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* deleteIdentityCourseSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteIdentityCourse, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* getIdentityDataConnectorSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getIdentityDataConnector, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* postIdentityDataConnectorSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postIdentityDataConnector, payload);
yield put({
type: "SUCCESS",
payload: response,
name: reducerName,
});
} catch (err) {
console.error(err);
/* istanbul ignore next */
yield put({
type: "ERROR",
payload: err,
name: reducerName,
});
}
}
export function* putIdentityDataConnectorSagas(action) {
const {
payload = {},
meta: { reducer