@zeniai/client-epic-state 4.12.20 → 4.12.21

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 (82) hide show
  1. package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +0 -2
  2. package/lib/entity/chargeCardTransaction/chargeCardTransactionPayload.d.ts +0 -5
  3. package/lib/entity/chargeCardTransaction/chargeCardTransactionPayload.js +2 -4
  4. package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.d.ts +2 -6
  5. package/lib/entity/chargeCardTransaction/chargeCardTransactionReducer.js +2 -8
  6. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  7. package/lib/entity/snackbar/snackbarTypes.js +0 -1
  8. package/lib/entity/task/taskState.d.ts +3 -0
  9. package/lib/entity/task/taskState.js +13 -0
  10. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  11. package/lib/epic.d.ts +1 -4
  12. package/lib/epic.js +1 -4
  13. package/lib/index.d.ts +16 -18
  14. package/lib/index.js +5 -17
  15. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  16. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  17. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  18. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  19. package/lib/view/globalMerchantView/epics/fetchGlobalMerchantRecommendationEpic.d.ts +3 -3
  20. package/lib/view/globalMerchantView/epics/fetchGlobalMerchantRecommendationEpic.js +4 -20
  21. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -5
  22. package/lib/view/globalMerchantView/globalMerchantViewReducer.js +3 -8
  23. package/lib/view/globalMerchantView/globalMerchantViewSelector.d.ts +1 -1
  24. package/lib/view/globalMerchantView/globalMerchantViewSelector.js +5 -6
  25. package/lib/view/globalMerchantView/globalMerchantViewState.d.ts +0 -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/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  32. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +0 -4
  33. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigReducer.js +0 -9
  34. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +0 -4
  35. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +4 -10
  36. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +29 -82
  37. package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.js +2 -2
  38. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +1 -1
  39. package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigPayload.d.ts +0 -6
  40. package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +0 -9
  41. package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigState.d.ts +0 -3
  42. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -11
  43. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +2 -20
  44. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailPayload.d.ts +0 -5
  45. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +2 -27
  46. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +4 -77
  47. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +0 -8
  48. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +2 -19
  49. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardTransactionListEpic.js +1 -3
  50. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewReducer.js +2 -4
  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/taskDetail.js +1 -1
  54. package/lib/view/taskManager/taskListView/bulkUpdateTaskListEpic.d.ts +0 -23
  55. package/lib/view/taskManager/taskListView/bulkUpdateTaskListEpic.js +2 -3
  56. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +0 -5
  57. package/lib/view/taskManager/taskListView/taskListReducer.js +3 -64
  58. package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +1 -2
  59. package/lib/view/vendorReviewView/common/state/commonTypes.js +4 -4
  60. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewPayload.d.ts +1 -7
  61. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewPayload.js +1 -11
  62. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.d.ts +4 -14
  63. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +49 -57
  64. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.d.ts +0 -10
  65. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewSelector.js +1 -21
  66. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.d.ts +2 -20
  67. package/lib/view/vendorReviewView/vendorGlobalReviewView/epics/fetchVendorGlobalReviewViewEpic.js +4 -4
  68. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewPayload.d.ts +1 -1
  69. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewPayload.js +2 -2
  70. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewReducer.d.ts +1 -6
  71. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewReducer.js +6 -18
  72. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewSelector.d.ts +1 -3
  73. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewSelector.js +5 -7
  74. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.d.ts +1 -9
  75. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.js +2 -2
  76. package/package.json +1 -1
  77. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardTransactionAttachmentsEpic.d.ts +0 -10
  78. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardTransactionAttachmentsEpic.js +0 -42
  79. package/lib/view/taskManager/taskListView/updateTaskFromListViewEpic.d.ts +0 -8
  80. package/lib/view/taskManager/taskListView/updateTaskFromListViewEpic.js +0 -38
  81. package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorDetailsViewEpic.d.ts +0 -8
  82. package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorDetailsViewEpic.js +0 -62
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.saveVendorDetailsViewEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const responsePayload_1 = require("../../../../responsePayload");
7
- const vendorFirstReviewViewReducer_1 = require("../vendorFirstReviewViewReducer");
8
- const vendorReducer_1 = require("../../../../entity/vendor/vendorReducer");
9
- const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
10
- const vendorFirstReviewViewPayload_1 = require("../vendorFirstReviewViewPayload");
11
- const saveVendorDetailsViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(vendorFirstReviewViewReducer_1.saveVendorDetailsView.match), (0, operators_1.mergeMap)(() => {
12
- var _a, _b;
13
- const { vendorFirstReviewViewState } = state$.value;
14
- const vendorDetails = (_a = vendorFirstReviewViewState.vendorLocalData) === null || _a === void 0 ? void 0 : _a.vendorDetails;
15
- const payload = (0, vendorFirstReviewViewPayload_1.prepareVendorPayload)(vendorDetails);
16
- const vendorId = (_b = vendorFirstReviewViewState.vendorLocalData) === null || _b === void 0 ? void 0 : _b.vendorDetails.id;
17
- if (vendorId != null) {
18
- const saveVendorApi = zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/vendors/${vendorId}`, payload);
19
- return saveVendorApi.pipe((0, operators_1.mergeMap)((response) => {
20
- if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
21
- const actions = [
22
- (0, vendorReducer_1.updateVendors)(response.data.vendors),
23
- ];
24
- actions.push((0, vendorFirstReviewViewReducer_1.updateVendorDetailsViewFailureOrSuccess)({
25
- vendorId,
26
- fetchState: 'Completed',
27
- }));
28
- return (0, rxjs_1.from)(actions);
29
- }
30
- else {
31
- const actions = [];
32
- // Note: We need to skip snackbar when error code is 409, which is Vendor already exists error code.
33
- // We show inline error message in this case instead of snackbar
34
- if (response.status.code !== 409) {
35
- actions.push((0, vendorFirstReviewViewReducer_1.updateVendorDetailsViewFailureOrSuccess)({
36
- vendorId,
37
- fetchState: 'Error',
38
- }));
39
- actions.push((0, snackbarReducer_1.openSnackbar)({
40
- messageSection: 'update_vendor',
41
- messageText: 'failed',
42
- type: 'error',
43
- variables: [
44
- {
45
- variableName: '_api-error_',
46
- variableValue: response.status.message,
47
- },
48
- ],
49
- }));
50
- }
51
- return (0, rxjs_1.from)(actions);
52
- }
53
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, vendorFirstReviewViewReducer_1.updateVendorDetailsViewFailureOrSuccess)({
54
- vendorId,
55
- fetchState: 'Error',
56
- error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Vendor Save on First Review View REST API call errored out ' +
57
- JSON.stringify(error)),
58
- }))));
59
- }
60
- return (0, rxjs_1.from)([]);
61
- }));
62
- exports.saveVendorDetailsViewEpic = saveVendorDetailsViewEpic;