vineanova-redux-artifacts
Version:
VineaOpenApiReduxArtifacts is a powerful npm library designed to simplify the integration of Swagger APIs into Redux architecture. By leveraging templates (Mustache files), this library automatically generates Redux ducks, actions, sagas, selectors, and A
2,252 lines (1,926 loc) • 383 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* getBlockRowPlantSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getBlockRowPlant, 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* postBlockRowPlantSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postBlockRowPlant, 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* putBlockRowPlantSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putBlockRowPlant, 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* deleteBlockRowPlantSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteBlockRowPlant, 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* getPlantsForBlockSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getPlantsForBlock, 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* getCalculatorsSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getCalculators, 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* postCalculatorSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postCalculator, 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* putCalculatorSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.putCalculator, 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* deleteCalculatorSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.deleteCalculator, 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* 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* 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* getClientDBConnectionCheckSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getClientDBConnectionCheck, 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,
});
const CropBlockPhenologySchema = new schema.Entity("byId");
const CropBlockPhenologyListSchema = new schema.Array(CropBlockPhenologySchema);
const {entities: {byId}, result: allIds} = normalize(response, CropBlockPhenologyListSchema);
yield put({
type: "MERGE_ALL_IDS",
payload: {byId, allIds},
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,
});
const CropBlockVintageSchema = new schema.Entity("byId");
const CropBlockVintageListSchema = new schema.Array(CropBlockVintageSchema);
const {entities: {byId}, result: allIds} = normalize(response, CropBlockVintageListSchema);
yield put({
type: "MERGE_ALL_IDS",
payload: {byId, allIds},
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* postEventLogSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.postEventLog, 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* 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* getIdentityConsumableTransactionsSagas(action) {
const {
payload = {},
meta: { reducerName },
} = action;
try {
yield put({
type: "FETCHING",
name: reducerName,
});
const response = yield call(APIServices.getIdentityConsumableTransactions, 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(acti