@zeniai/client-epic-state 4.12.49 → 4.12.50

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.
Files changed (80) hide show
  1. package/lib/entity/billPay/billTransaction/billTransactionPayload.d.ts +1 -12
  2. package/lib/entity/billPay/billTransaction/billTransactionPayload.js +1 -23
  3. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +0 -12
  4. package/lib/entity/billPay/billTransaction/billTransactionState.js +0 -8
  5. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
  6. package/lib/entity/snackbar/snackbarState.d.ts +0 -6
  7. package/lib/entity/snackbar/snackbarTypes.d.ts +5 -1
  8. package/lib/entity/snackbar/snackbarTypes.js +0 -3
  9. package/lib/entity/task/taskPayload.d.ts +0 -1
  10. package/lib/entity/task/taskPayload.js +1 -5
  11. package/lib/entity/task/taskState.d.ts +0 -1
  12. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  13. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.js +5 -12
  14. package/lib/entity/toastNotification/toastNotificationPayload.js +15 -28
  15. package/lib/entity/toastNotification/toastNotificationState.d.ts +8 -8
  16. package/lib/entity/toastNotification/toastNotificationState.js +8 -9
  17. package/lib/entity/transaction/stateTypes/transactionType.d.ts +2 -2
  18. package/lib/epic.d.ts +6 -8
  19. package/lib/epic.js +6 -8
  20. package/lib/index.d.ts +6 -8
  21. package/lib/index.js +12 -16
  22. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  23. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  24. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  25. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  26. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  27. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  28. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  29. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  30. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  31. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +4 -4
  32. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  33. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewPayload.d.ts +0 -5
  34. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewReducer.d.ts +1 -22
  35. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewReducer.js +2 -133
  36. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +1 -2
  37. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +0 -2
  38. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewState.d.ts +0 -9
  39. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewState.js +0 -14
  40. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.d.ts +2 -2
  41. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +1 -10
  42. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +0 -1
  43. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +0 -3
  44. package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +1 -3
  45. package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +2 -6
  46. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +0 -1
  47. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +0 -3
  48. package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +0 -1
  49. package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.d.ts +0 -68
  50. package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.js +1 -2
  51. package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
  52. package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
  53. package/lib/view/taskManager/taskDetailView/epics/initializeTaskToLocalStoreEpic.js +0 -1
  54. package/lib/view/taskManager/taskDetailView/epics/saveTaskDetailEpic.js +0 -2
  55. package/lib/view/taskManager/taskDetailView/taskDetail.d.ts +0 -1
  56. package/lib/view/taskManager/taskDetailView/taskDetail.js +0 -1
  57. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +1 -2
  58. package/lib/view/taskManager/taskListView/{epics/bulkUpdateTaskListEpic.d.ts → bulkUpdateTaskListEpic.d.ts} +6 -8
  59. package/lib/view/taskManager/taskListView/{epics/bulkUpdateTaskListEpic.js → bulkUpdateTaskListEpic.js} +5 -13
  60. package/lib/view/taskManager/taskListView/{epics/dragNDropTasksEpic.d.ts → dragNDropTasksEpic.d.ts} +2 -2
  61. package/lib/view/taskManager/taskListView/{epics/dragNDropTasksEpic.js → dragNDropTasksEpic.js} +2 -2
  62. package/lib/view/taskManager/taskListView/{epics/fetchTaskListEpic.d.ts → fetchTaskListEpic.d.ts} +5 -5
  63. package/lib/view/taskManager/taskListView/{epics/fetchTaskListEpic.js → fetchTaskListEpic.js} +4 -4
  64. package/lib/view/taskManager/taskListView/{epics/fetchTaskListPageEpic.d.ts → fetchTaskListPageEpic.d.ts} +6 -6
  65. package/lib/view/taskManager/taskListView/{epics/fetchTaskListPageEpic.js → fetchTaskListPageEpic.js} +5 -5
  66. package/lib/view/taskManager/taskListView/taskList.d.ts +1 -1
  67. package/lib/view/taskManager/taskListView/taskList.js +0 -1
  68. package/lib/view/taskManager/taskListView/taskListSelector.js +0 -2
  69. package/lib/view/taskManager/taskListView/{epics/updateTaskFromListViewEpic.d.ts → updateTaskFromListViewEpic.d.ts} +4 -4
  70. package/lib/view/taskManager/taskListView/{epics/updateTaskFromListViewEpic.js → updateTaskFromListViewEpic.js} +7 -5
  71. package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
  72. package/package.json +2 -3
  73. package/lib/commonStateTypes/fiscalYearHelpers/formatMinutesToFromHHMM.d.ts +0 -2
  74. package/lib/commonStateTypes/fiscalYearHelpers/formatMinutesToFromHHMM.js +0 -26
  75. package/lib/entity/toastNotification/toastNotificationConstants.d.ts +0 -4
  76. package/lib/entity/toastNotification/toastNotificationConstants.js +0 -7
  77. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchEligibleActionsForBillEpic.d.ts +0 -7
  78. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchEligibleActionsForBillEpic.js +0 -42
  79. package/lib/view/spendManagement/billPay/billDetailView/epics/retryOrRefundBillEpic.d.ts +0 -9
  80. package/lib/view/spendManagement/billPay/billDetailView/epics/retryOrRefundBillEpic.js +0 -76
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.fetchEligibleActionsForBillEpic = void 0;
7
- const rxjs_1 = require("rxjs");
8
- const operators_1 = require("rxjs/operators");
9
- const billDetailViewReducer_1 = require("../billDetailViewReducer");
10
- const responsePayload_1 = require("../../../../../responsePayload");
11
- const get_1 = __importDefault(require("lodash/get"));
12
- const billDetailViewState_1 = require("../billDetailViewState");
13
- const fetchEligibleActionsForBillEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(billDetailViewReducer_1.fetchEligibleActionsForBill.match), (0, operators_1.mergeMap)((action) => {
14
- const { billId, cacheOverride } = action.payload;
15
- const detailKey = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
16
- const state = state$.value;
17
- const billDetail = (0, get_1.default)(state.billDetailViewState.billDetailById, detailKey, undefined);
18
- if (cacheOverride == true ||
19
- billDetail == null ||
20
- billDetail.zeniAssist.eligibleActionsFetchStatus.fetchState !==
21
- 'In-Progress') {
22
- return zeniAPI
23
- .getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions/${billId}/eligible-actions`)
24
- .pipe((0, operators_1.mergeMap)((response) => {
25
- var _a, _b;
26
- if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
27
- const fetchActions = [
28
- (0, billDetailViewReducer_1.updateEligibleActionsForBill)(billId, (_a = response.data.is_refund_eligible) !== null && _a !== void 0 ? _a : undefined, (_b = response.data.is_retry_eligible) !== null && _b !== void 0 ? _b : undefined),
29
- ];
30
- return (0, rxjs_1.from)(fetchActions);
31
- }
32
- else {
33
- return (0, rxjs_1.of)((0, billDetailViewReducer_1.updateFetchEligibleActionsFailureState)(action.payload.billId, response.status));
34
- }
35
- }), (0, operators_1.catchError)((error) => {
36
- console.error(`Fetch eligible actions REST API call errored out ${error}`);
37
- return (0, rxjs_1.of)((0, billDetailViewReducer_1.updateFetchEligibleActionsFailureState)(action.payload.billId, (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Fetch eligible actions REST API call errored out ${error}`)));
38
- }));
39
- }
40
- return (0, rxjs_1.from)([]);
41
- }));
42
- exports.fetchEligibleActionsForBillEpic = fetchEligibleActionsForBillEpic;
@@ -1,9 +0,0 @@
1
- import { ActionsObservable, StateObservable } from 'redux-observable';
2
- import { Observable } from 'rxjs';
3
- import { ZeniAPI } from '../../../../../zeniAPI';
4
- import { RootState } from '../../../../../reducer';
5
- import { retryOrRefundBillSuccess, retryOrRefundBillFailure } from '../billDetailViewReducer';
6
- import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
7
- import { updateBillTransaction } from '../../../../../entity/billPay/billTransaction/billTransactionReducer';
8
- export declare type ActionType = ReturnType<typeof updateBillTransaction> | ReturnType<typeof openSnackbar> | ReturnType<typeof retryOrRefundBillSuccess> | ReturnType<typeof retryOrRefundBillFailure>;
9
- export declare const retryOrRefundBillEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -1,76 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.retryOrRefundBillEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const responsePayload_1 = require("../../../../../responsePayload");
7
- const billDetailViewReducer_1 = require("../billDetailViewReducer");
8
- const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
9
- const billDetailViewState_1 = require("../billDetailViewState");
10
- const billTransactionReducer_1 = require("../../../../../entity/billPay/billTransaction/billTransactionReducer");
11
- const retryOrRefundBillEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(billDetailViewReducer_1.retryOrRefundBill.match), (0, operators_1.mergeMap)((action) => {
12
- var _a, _b, _c, _d, _e, _f;
13
- const { billId, actionType } = action.payload;
14
- const { editBillDetailViewState } = state$.value;
15
- const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
16
- const billDetail = editBillDetailViewState.editBillStateById[key];
17
- let apiUrl = `${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bills/transactions/${billId}`;
18
- let payload;
19
- if (actionType === 'retry') {
20
- apiUrl = `${apiUrl}/payment/retry`;
21
- payload = {
22
- bill_pay_info: {
23
- to_account: ((_b = (_a = billDetail.billDetailLocalData.paymentDetailsSection) === null || _a === void 0 ? void 0 : _a.paymentType) === null || _b === void 0 ? void 0 : _b.method.includes('international')) === true
24
- ? {
25
- payment_instrument_id: Boolean(billDetail.billDetailLocalData
26
- .isCollectToAccountInfoFromVendorContact) === false
27
- ? (_d = (_c = billDetail.billDetailLocalData.paymentDetailsSection) === null || _c === void 0 ? void 0 : _c.paymentTo) !== null && _d !== void 0 ? _d : null
28
- : null,
29
- }
30
- : {
31
- account_id: Boolean(billDetail.billDetailLocalData
32
- .isCollectToAccountInfoFromVendorContact) === false
33
- ? (_f = (_e = billDetail.billDetailLocalData.paymentDetailsSection) === null || _e === void 0 ? void 0 : _e.paymentTo) !== null && _f !== void 0 ? _f : null
34
- : null,
35
- },
36
- },
37
- };
38
- }
39
- else {
40
- apiUrl = `${apiUrl}/payment/refund`;
41
- }
42
- return zeniAPI.putAndGetJSON(apiUrl, payload).pipe((0, operators_1.mergeMap)((response) => {
43
- var _a;
44
- if ((0, responsePayload_1.isSuccessResponse)(response)) {
45
- const actions = [];
46
- if (response.data != null &&
47
- ((_a = response.data.transactions[0]) === null || _a === void 0 ? void 0 : _a.transaction_id) != null) {
48
- actions.push((0, billTransactionReducer_1.updateBillTransaction)(response.data.transactions[0]));
49
- }
50
- actions.push((0, billDetailViewReducer_1.retryOrRefundBillSuccess)(action.payload.billId, action.payload.actionType));
51
- actions.push((0, snackbarReducer_1.openSnackbar)({
52
- messageSection: action.payload.actionType === 'refund'
53
- ? 'bill_pay_refund'
54
- : 'bill_pay_retry',
55
- messageText: 'success',
56
- type: 'success',
57
- }));
58
- return (0, rxjs_1.from)(actions);
59
- }
60
- else {
61
- return (0, rxjs_1.of)((0, billDetailViewReducer_1.retryOrRefundBillFailure)(billId, action.payload.actionType, response.status), (0, snackbarReducer_1.openSnackbar)({
62
- messageSection: 'bill_pay_cancelled_deleted',
63
- messageText: 'failed',
64
- type: 'error',
65
- variables: [
66
- {
67
- variableName: '_api-error_',
68
- variableValue: response.status.message,
69
- },
70
- ],
71
- }));
72
- }
73
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, billDetailViewReducer_1.retryOrRefundBillFailure)(action.payload.billId, action.payload.actionType, (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', `Retry Refund bill REST API call errored out ` +
74
- JSON.stringify(error))))));
75
- }));
76
- exports.retryOrRefundBillEpic = retryOrRefundBillEpic;