@zeniai/client-epic-state 5.0.41-betaRD1 → 5.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/chargeCardRepayment/chargeCardRepayment.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/entity/task/taskPayload.d.ts +0 -1
- package/lib/entity/task/taskPayload.js +0 -5
- package/lib/entity/task/taskState.d.ts +0 -5
- package/lib/entity/task/taskState.js +1 -6
- package/lib/entity/tenant/clearAllEpic.d.ts +3 -5
- package/lib/entity/tenant/clearAllEpic.js +2 -6
- package/lib/entity/tenant/tenantReducer.js +11 -1
- package/lib/epic.d.ts +1 -7
- package/lib/epic.js +1 -7
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
- package/lib/esm/entity/task/taskPayload.js +1 -6
- package/lib/esm/entity/task/taskState.js +0 -3
- package/lib/esm/entity/tenant/clearAllEpic.js +2 -6
- package/lib/esm/entity/tenant/tenantReducer.js +11 -1
- package/lib/esm/epic.js +1 -7
- package/lib/esm/index.js +9 -15
- package/lib/esm/reducer.js +3 -9
- package/lib/esm/view/common/recurringViewHelper.js +0 -17
- package/lib/esm/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +0 -2
- package/lib/esm/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +0 -5
- package/lib/esm/view/taskManager/taskDetailView/taskDetail.js +0 -1
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +0 -5
- package/lib/index.d.ts +13 -21
- package/lib/index.js +46 -77
- package/lib/reducer.d.ts +3 -9
- package/lib/reducer.js +3 -9
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/common/recurringViewHelper.d.ts +2 -3
- package/lib/view/common/recurringViewHelper.js +1 -18
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +0 -2
- package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +0 -5
- package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +1 -3
- package/lib/view/taskManager/taskDetailView/taskDetail.js +0 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.d.ts +0 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +0 -5
- package/package.json +1 -1
- package/lib/entity/creditAgent/creditAgentPayload.d.ts +0 -41
- package/lib/entity/creditAgent/creditAgentPayload.js +0 -40
- package/lib/entity/creditAgent/creditAgentReducer.d.ts +0 -9
- package/lib/entity/creditAgent/creditAgentReducer.js +0 -37
- package/lib/entity/creditAgent/creditAgentSelector.d.ts +0 -3
- package/lib/entity/creditAgent/creditAgentSelector.js +0 -10
- package/lib/entity/creditAgent/creditAgentState.d.ts +0 -39
- package/lib/entity/creditAgent/creditAgentState.js +0 -17
- package/lib/esm/entity/creditAgent/creditAgentPayload.js +0 -36
- package/lib/esm/entity/creditAgent/creditAgentReducer.js +0 -33
- package/lib/esm/entity/creditAgent/creditAgentSelector.js +0 -6
- package/lib/esm/entity/creditAgent/creditAgentState.js +0 -13
- package/lib/esm/view/creditAgentView/buildCreditReportCsv.js +0 -44
- package/lib/esm/view/creditAgentView/creditAgentViewPayload.js +0 -2
- package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +0 -183
- package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +0 -85
- package/lib/esm/view/creditAgentView/creditAgentViewState.js +0 -20
- package/lib/esm/view/creditAgentView/epics/fetchCardProfilesEpic.js +0 -20
- package/lib/esm/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +0 -13
- package/lib/esm/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +0 -19
- package/lib/esm/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +0 -58
- package/lib/esm/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +0 -39
- package/lib/esm/view/creditAgentView/epics/updateCardProfileEpic.js +0 -62
- package/lib/view/creditAgentView/buildCreditReportCsv.d.ts +0 -17
- package/lib/view/creditAgentView/buildCreditReportCsv.js +0 -47
- package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +0 -9
- package/lib/view/creditAgentView/creditAgentViewPayload.js +0 -7
- package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +0 -41
- package/lib/view/creditAgentView/creditAgentViewReducer.js +0 -187
- package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +0 -20
- package/lib/view/creditAgentView/creditAgentViewSelector.js +0 -93
- package/lib/view/creditAgentView/creditAgentViewState.d.ts +0 -34
- package/lib/view/creditAgentView/creditAgentViewState.js +0 -22
- package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.d.ts +0 -15
- package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.js +0 -24
- package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.d.ts +0 -11
- package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +0 -17
- package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.d.ts +0 -15
- package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +0 -23
- package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.d.ts +0 -29
- package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +0 -62
- package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.d.ts +0 -30
- package/lib/view/creditAgentView/epics/scheduleTenantCreditScoreCronEpic.js +0 -43
- package/lib/view/creditAgentView/epics/updateCardProfileEpic.d.ts +0 -37
- package/lib/view/creditAgentView/epics/updateCardProfileEpic.js +0 -66
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { updateCreditAgentRow } from '../../../entity/creditAgent/creditAgentReducer';
|
|
3
|
-
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
4
|
-
import { RootState } from '../../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../../zeniAPI';
|
|
6
|
-
import { updateCardProfile, updateCardProfileFailure, updateCardProfileSuccess } from '../creditAgentViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof updateCardProfile> | ReturnType<typeof updateCardProfileSuccess> | ReturnType<typeof updateCardProfileFailure> | ReturnType<typeof updateCreditAgentRow> | ReturnType<typeof openSnackbar>;
|
|
8
|
-
export declare const updateCardProfileEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
9
|
-
payload: {
|
|
10
|
-
messageSection: import("../../..").SnackbarMessageSections;
|
|
11
|
-
messageText: import("../../..").SnackbarMessageSectionTexts;
|
|
12
|
-
type: import("../../..").SnackbarMessageType;
|
|
13
|
-
showStatusIcon?: boolean;
|
|
14
|
-
variables?: {
|
|
15
|
-
variableName: string;
|
|
16
|
-
variableValue: string;
|
|
17
|
-
}[];
|
|
18
|
-
};
|
|
19
|
-
type: "snackbar/openSnackbar";
|
|
20
|
-
} | {
|
|
21
|
-
payload: {
|
|
22
|
-
tenantId: string;
|
|
23
|
-
};
|
|
24
|
-
type: "creditAgentView/updateCardProfileSuccess";
|
|
25
|
-
} | {
|
|
26
|
-
payload: {
|
|
27
|
-
tenantId: string;
|
|
28
|
-
error: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
29
|
-
};
|
|
30
|
-
type: "creditAgentView/updateCardProfileFailure";
|
|
31
|
-
} | {
|
|
32
|
-
payload: {
|
|
33
|
-
payload: import("../creditAgentViewPayload").CardTenantProfileRowPayload;
|
|
34
|
-
tenantId: string;
|
|
35
|
-
};
|
|
36
|
-
type: "creditAgent/updateCreditAgentRow";
|
|
37
|
-
}>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateCardProfileEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const creditAgentReducer_1 = require("../../../entity/creditAgent/creditAgentReducer");
|
|
7
|
-
const snackbarReducer_1 = require("../../../entity/snackbar/snackbarReducer");
|
|
8
|
-
const responsePayload_1 = require("../../../responsePayload");
|
|
9
|
-
const creditAgentViewReducer_1 = require("../creditAgentViewReducer");
|
|
10
|
-
const updateCardProfileEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(creditAgentViewReducer_1.updateCardProfile.match), (0, operators_1.mergeMap)((action) => {
|
|
11
|
-
const { tenantId, tenantEmailDomain, update } = action.payload;
|
|
12
|
-
const url = `${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cockpit/card-tenant-profiles`;
|
|
13
|
-
const body = {
|
|
14
|
-
tenant_namespace: tenantEmailDomain,
|
|
15
|
-
};
|
|
16
|
-
if (update.cardStatus != null) {
|
|
17
|
-
body.card_status = update.cardStatus;
|
|
18
|
-
}
|
|
19
|
-
if (update.creditLimit != null) {
|
|
20
|
-
body.credit_limit = update.creditLimit;
|
|
21
|
-
}
|
|
22
|
-
if (update.updatedByName != null) {
|
|
23
|
-
body.updated_by_name = update.updatedByName;
|
|
24
|
-
}
|
|
25
|
-
if (update.reason != null && update.reason.trim() !== '') {
|
|
26
|
-
body.reason = update.reason.trim();
|
|
27
|
-
}
|
|
28
|
-
return zeniAPI
|
|
29
|
-
.putAndGetJSON(url, body)
|
|
30
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
31
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) &&
|
|
32
|
-
response.data != null &&
|
|
33
|
-
response.data.profile != null) {
|
|
34
|
-
return (0, rxjs_1.from)([
|
|
35
|
-
(0, creditAgentReducer_1.updateCreditAgentRow)({
|
|
36
|
-
payload: response.data.profile,
|
|
37
|
-
tenantId,
|
|
38
|
-
}),
|
|
39
|
-
(0, creditAgentViewReducer_1.updateCardProfileSuccess)(tenantId),
|
|
40
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
41
|
-
messageSection: 'credit_agent_update_profile',
|
|
42
|
-
messageText: 'success',
|
|
43
|
-
type: 'success',
|
|
44
|
-
}),
|
|
45
|
-
]);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
return (0, rxjs_1.from)([
|
|
49
|
-
(0, creditAgentViewReducer_1.updateCardProfileFailure)(tenantId, response.status),
|
|
50
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
51
|
-
messageSection: 'credit_agent_update_profile',
|
|
52
|
-
messageText: 'failed',
|
|
53
|
-
type: 'error',
|
|
54
|
-
}),
|
|
55
|
-
]);
|
|
56
|
-
}
|
|
57
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
|
|
58
|
-
(0, creditAgentViewReducer_1.updateCardProfileFailure)(tenantId, (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'REST API call errored out: ' + JSON.stringify(error))),
|
|
59
|
-
(0, snackbarReducer_1.openSnackbar)({
|
|
60
|
-
messageSection: 'credit_agent_update_profile',
|
|
61
|
-
messageText: 'failed',
|
|
62
|
-
type: 'error',
|
|
63
|
-
}),
|
|
64
|
-
])));
|
|
65
|
-
}));
|
|
66
|
-
exports.updateCardProfileEpic = updateCardProfileEpic;
|