@zeniai/client-epic-state 5.2.11-betaRD1 → 5.2.12

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 (174) hide show
  1. package/lib/entity/invoicing/invoicingCommonPayload.d.ts +27 -29
  2. package/lib/entity/invoicing/invoicingCommonPayload.js +37 -75
  3. package/lib/entity/invoicing/product/productPayload.d.ts +10 -0
  4. package/lib/entity/invoicing/product/productPayload.js +14 -2
  5. package/lib/entity/jeSchedules/jeScheduleHelper.d.ts +0 -1
  6. package/lib/entity/jeSchedules/jeScheduleHelper.js +0 -7
  7. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -66
  8. package/lib/entity/jeSchedules/jeSchedulesPayload.js +0 -135
  9. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -4
  10. package/lib/entity/jeSchedules/jeSchedulesReducer.js +2 -30
  11. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +2 -11
  12. package/lib/entity/jeSchedules/jeSchedulesSelector.js +3 -38
  13. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +1 -79
  14. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -24
  15. package/lib/entity/jeSchedules/jeSchedulesTypes.js +1 -88
  16. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  17. package/lib/entity/snackbar/snackbarTypes.js +0 -3
  18. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +0 -2
  19. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
  20. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +0 -2
  21. package/lib/epic.d.ts +2 -10
  22. package/lib/epic.js +10 -21
  23. package/lib/esm/entity/invoicing/invoicingCommonPayload.js +33 -73
  24. package/lib/esm/entity/invoicing/product/productPayload.js +14 -2
  25. package/lib/esm/entity/jeSchedules/jeScheduleHelper.js +0 -6
  26. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +1 -135
  27. package/lib/esm/entity/jeSchedules/jeSchedulesReducer.js +2 -30
  28. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +2 -36
  29. package/lib/esm/entity/jeSchedules/jeSchedulesTypes.js +0 -78
  30. package/lib/esm/entity/snackbar/snackbarTypes.js +0 -3
  31. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +0 -2
  32. package/lib/esm/epic.js +6 -17
  33. package/lib/esm/index.js +13 -18
  34. package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
  35. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +5 -41
  36. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +2 -14
  37. package/lib/esm/view/expenseAutomationView/payload/jeSchedulesPayload.js +0 -55
  38. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +29 -306
  39. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +22 -294
  40. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +6 -5
  41. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +25 -9
  42. package/lib/esm/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +6 -1
  43. package/lib/esm/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +40 -0
  44. package/lib/esm/view/invoicing/settingsView/epics/connectInvoicingStripeEpic.js +27 -0
  45. package/lib/esm/view/invoicing/settingsView/epics/disconnectInvoicingStripeEpic.js +19 -0
  46. package/lib/esm/view/invoicing/settingsView/epics/fetchInvoicingSettingsEpic.js +19 -0
  47. package/lib/esm/view/invoicing/settingsView/epics/saveInvoicingSettingsEpic.js +39 -0
  48. package/lib/esm/view/invoicing/settingsView/epics/submitInvoicingQboSettingsEpic.js +25 -0
  49. package/lib/esm/view/invoicing/settingsView/invoicingQboSettingsFormConfig.js +48 -0
  50. package/lib/esm/view/invoicing/settingsView/settingsViewReducer.js +25 -1
  51. package/lib/esm/view/invoicing/settingsView/settingsViewSelector.js +41 -0
  52. package/lib/esm/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
  53. package/lib/esm/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +2 -7
  54. package/lib/esm/view/scheduleView/scheduleListView/scheduleListReducer.js +3 -5
  55. package/lib/index.d.ts +19 -22
  56. package/lib/index.js +59 -96
  57. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -6
  58. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +2 -3
  59. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +3 -39
  60. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +2 -14
  61. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  62. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +3 -72
  63. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +1 -58
  64. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +12 -91
  65. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +29 -308
  66. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +1 -1
  67. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -2
  68. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +7 -36
  69. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +0 -34
  70. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +21 -302
  71. package/lib/view/expenseAutomationView/types/completedSubTab.d.ts +1 -1
  72. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -82
  73. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -8
  74. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +2 -2
  75. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.d.ts +12 -1
  76. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/editInvoicingCatalogItemDetailViewPayload.js +25 -9
  77. package/lib/view/invoicing/editInvoicingCatalogItemDetailView/saveInvoicingCatalogItemEpic.js +6 -1
  78. package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.d.ts +10 -1
  79. package/lib/view/invoicing/invoicingQboView/invoicingQboViewSelector.js +43 -1
  80. package/lib/view/invoicing/settingsView/epics/connectInvoicingStripeEpic.d.ts +6 -0
  81. package/lib/view/invoicing/settingsView/epics/connectInvoicingStripeEpic.js +31 -0
  82. package/lib/view/invoicing/settingsView/epics/disconnectInvoicingStripeEpic.d.ts +6 -0
  83. package/lib/view/invoicing/settingsView/epics/disconnectInvoicingStripeEpic.js +23 -0
  84. package/lib/view/invoicing/settingsView/epics/fetchInvoicingSettingsEpic.d.ts +6 -0
  85. package/lib/view/invoicing/settingsView/epics/fetchInvoicingSettingsEpic.js +23 -0
  86. package/lib/view/invoicing/settingsView/epics/saveInvoicingSettingsEpic.d.ts +6 -0
  87. package/lib/view/invoicing/settingsView/epics/saveInvoicingSettingsEpic.js +43 -0
  88. package/lib/view/invoicing/settingsView/epics/settingsViewActionType.d.ts +5 -0
  89. package/lib/view/invoicing/settingsView/epics/submitInvoicingQboSettingsEpic.d.ts +11 -0
  90. package/lib/view/invoicing/settingsView/epics/submitInvoicingQboSettingsEpic.js +29 -0
  91. package/lib/view/invoicing/settingsView/invoicingQboSettingsFormConfig.d.ts +34 -0
  92. package/lib/view/invoicing/settingsView/invoicingQboSettingsFormConfig.js +53 -0
  93. package/lib/view/invoicing/settingsView/settingsViewReducer.d.ts +4 -1
  94. package/lib/view/invoicing/settingsView/settingsViewReducer.js +26 -2
  95. package/lib/view/invoicing/settingsView/settingsViewSelector.d.ts +35 -0
  96. package/lib/view/invoicing/settingsView/settingsViewSelector.js +43 -1
  97. package/lib/view/invoicing/settingsView/settingsViewState.d.ts +8 -0
  98. package/lib/view/scheduleView/scheduleListView/epics/fetchAccruedScheduleListEpic.js +1 -1
  99. package/lib/view/scheduleView/scheduleListView/epics/fetchDownloadSchedulesEpic.js +2 -7
  100. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.d.ts +2 -4
  101. package/lib/view/scheduleView/scheduleListView/scheduleListReducer.js +3 -5
  102. package/package.json +1 -1
  103. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.d.ts +0 -0
  104. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSection.js +0 -1
  105. package/lib/entity/invoicing/coupon/couponConstants.d.ts +0 -11
  106. package/lib/entity/invoicing/coupon/couponConstants.js +0 -29
  107. package/lib/esm/commonStateTypes/selectorTypes/pickAndMergeForecastSection.js +0 -1
  108. package/lib/esm/entity/invoicing/coupon/couponConstants.js +0 -26
  109. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +0 -45
  110. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +0 -99
  111. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -25
  112. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -110
  113. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -79
  114. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -139
  115. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +0 -106
  116. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -22
  117. package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -140
  118. package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -106
  119. package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +0 -25
  120. package/lib/esm/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +0 -15
  121. package/lib/esm/view/invoicing/settingsView/settingsViewEpics.js +0 -92
  122. package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +0 -18
  123. package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +0 -18
  124. package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +0 -18
  125. package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.js +0 -16
  126. package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.js +0 -1
  127. package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +0 -60
  128. package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.js +0 -12
  129. package/lib/esm/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.js +0 -1
  130. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.d.ts +0 -20
  131. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchOneTimeAccrualEpic.js +0 -49
  132. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.d.ts +0 -8
  133. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/createOneTimeAccrualEpic.js +0 -103
  134. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +0 -8
  135. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +0 -29
  136. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +0 -45
  137. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +0 -114
  138. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +0 -8
  139. package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +0 -83
  140. package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.d.ts +0 -12
  141. package/lib/view/expenseAutomationView/epics/jeSchedule/oneTimeAccrualActionsEpic.js +0 -146
  142. package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.d.ts +0 -64
  143. package/lib/view/expenseAutomationView/epics/jeSchedule/revertJeScheduleEpic.js +0 -110
  144. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +0 -6
  145. package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +0 -26
  146. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +0 -36
  147. package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +0 -145
  148. package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +0 -42
  149. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +0 -21
  150. package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +0 -112
  151. package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.d.ts +0 -6
  152. package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboAccountsEpic.js +0 -29
  153. package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.d.ts +0 -6
  154. package/lib/view/invoicing/invoicingQboView/epics/fetchInvoicingQboClassesEpic.js +0 -19
  155. package/lib/view/invoicing/settingsView/settingsViewEpics.d.ts +0 -12
  156. package/lib/view/invoicing/settingsView/settingsViewEpics.js +0 -99
  157. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.d.ts +0 -8
  158. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +0 -22
  159. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.d.ts +0 -8
  160. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +0 -22
  161. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.d.ts +0 -8
  162. package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +0 -22
  163. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.d.ts +0 -13
  164. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic.js +0 -20
  165. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.d.ts +0 -11
  166. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardPayload.js +0 -2
  167. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.d.ts +0 -7
  168. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardReducer.js +0 -64
  169. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.d.ts +0 -12
  170. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardSelector.js +0 -15
  171. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.d.ts +0 -9
  172. package/lib/view/zeniAccountsPromoCard/zeniAccountsPromoCardState.js +0 -2
  173. /package/lib/esm/view/{expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js → invoicing/settingsView/epics/settingsViewActionType.js} +0 -0
  174. /package/lib/view/{expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js → invoicing/settingsView/epics/settingsViewActionType.js} +0 -0
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchZeniAccountsPromoCardEpic = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const responsePayload_1 = require("../../responsePayload");
7
- const zeniAccountsPromoCardReducer_1 = require("./zeniAccountsPromoCardReducer");
8
- const fetchZeniAccountsPromoCardEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(zeniAccountsPromoCardReducer_1.fetchZeniAccountsPromoCard.match), (0, operators_1.switchMap)(() => zeniAPI
9
- .getJSON(`${zeniAPI.apiEndPoints.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/promo-card`)
10
- .pipe((0, operators_1.mergeMap)((response) => {
11
- if ((0, responsePayload_1.isSuccessResponse)(response)) {
12
- return (0, rxjs_1.of)((0, zeniAccountsPromoCardReducer_1.updateZeniAccountsPromoCard)(response.data) // eslint-disable-line @typescript-eslint/no-non-null-assertion
13
- );
14
- }
15
- else {
16
- return (0, rxjs_1.of)((0, zeniAccountsPromoCardReducer_1.updateZeniAccountsPromoCardFailure)(response.status));
17
- }
18
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, zeniAccountsPromoCardReducer_1.updateZeniAccountsPromoCardFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Zeni Accounts Promo Card REST API call errored out' +
19
- JSON.stringify(error))))))));
20
- exports.fetchZeniAccountsPromoCardEpic = fetchZeniAccountsPromoCardEpic;
@@ -1,11 +0,0 @@
1
- import { ID } from '../../commonStateTypes/common';
2
- import { ZeniAPIResponse } from '../../responsePayload';
3
- export interface ZeniAccountsPromoCardPayload {
4
- is_show_deposit_accounts_promo_card: boolean;
5
- max_apy: number;
6
- max_cash_balance_available: number | null;
7
- max_insured_amount: number;
8
- max_possible_interest: number | null;
9
- primary_deposit_account_id: ID | null;
10
- }
11
- export type ZeniAccountsPromoCardResponse = ZeniAPIResponse<ZeniAccountsPromoCardPayload>;
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- import { ZeniAPIStatus } from '../../responsePayload';
2
- import { ZeniAccountsPromoCardPayload } from './zeniAccountsPromoCardPayload';
3
- import { ZeniAccountsPromoCardState } from './zeniAccountsPromoCardState';
4
- export declare const initialState: ZeniAccountsPromoCardState;
5
- export declare const fetchZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"zeniAccountsPromoCard/fetchZeniAccountsPromoCard">, updateZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAccountsPromoCardPayload, "zeniAccountsPromoCard/updateZeniAccountsPromoCard">, updateZeniAccountsPromoCardFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "zeniAccountsPromoCard/updateZeniAccountsPromoCardFailure">, clearZeniAccountsPromoCard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"zeniAccountsPromoCard/clearZeniAccountsPromoCard">;
6
- declare const _default: import("redux").Reducer<ZeniAccountsPromoCardState>;
7
- export default _default;
@@ -1,64 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearZeniAccountsPromoCard = exports.updateZeniAccountsPromoCardFailure = exports.updateZeniAccountsPromoCard = exports.fetchZeniAccountsPromoCard = exports.initialState = void 0;
5
- const toolkit_1 = require("@reduxjs/toolkit");
6
- const rootActions_1 = require("../../rootActions");
7
- exports.initialState = {
8
- fetchState: 'Not-Started',
9
- error: undefined,
10
- depositAccountId: undefined,
11
- maxInsuredAmount: 0,
12
- maxAnnualPercentageYield: 0,
13
- maxPossibleInterest: 0,
14
- maxCashBalanceAvailable: 0,
15
- isShowDepositAccountsPromo: false,
16
- hasValidState() {
17
- return this.fetchState == 'Completed';
18
- },
19
- };
20
- const zeniAccountsPromoCard = (0, toolkit_1.createSlice)({
21
- name: 'zeniAccountsPromoCard',
22
- initialState: exports.initialState,
23
- reducers: {
24
- fetchZeniAccountsPromoCard(draft) {
25
- draft.fetchState = 'In-Progress';
26
- draft.error = undefined;
27
- },
28
- updateZeniAccountsPromoCard(draft, action) {
29
- draft.fetchState = 'Completed';
30
- draft.error = undefined;
31
- const promoPayload = action.payload;
32
- draft.isShowDepositAccountsPromo =
33
- promoPayload.is_show_deposit_accounts_promo_card;
34
- draft.maxAnnualPercentageYield = promoPayload.max_apy;
35
- draft.maxPossibleInterest =
36
- promoPayload.max_possible_interest != null
37
- ? promoPayload.max_possible_interest
38
- : undefined;
39
- draft.maxCashBalanceAvailable =
40
- promoPayload.max_cash_balance_available != null
41
- ? promoPayload.max_cash_balance_available
42
- : undefined;
43
- draft.maxInsuredAmount = promoPayload.max_insured_amount;
44
- draft.depositAccountId =
45
- promoPayload.primary_deposit_account_id != null
46
- ? promoPayload.primary_deposit_account_id
47
- : undefined;
48
- },
49
- updateZeniAccountsPromoCardFailure(draft, action) {
50
- draft.fetchState = 'Error';
51
- draft.error = action.payload;
52
- },
53
- clearZeniAccountsPromoCard(draft) {
54
- Object.assign(draft, exports.initialState);
55
- },
56
- },
57
- extraReducers: (builder) => {
58
- builder.addCase(rootActions_1.clearAll, (draft) => {
59
- Object.assign(draft, exports.initialState);
60
- });
61
- },
62
- });
63
- _a = zeniAccountsPromoCard.actions, exports.fetchZeniAccountsPromoCard = _a.fetchZeniAccountsPromoCard, exports.updateZeniAccountsPromoCard = _a.updateZeniAccountsPromoCard, exports.updateZeniAccountsPromoCardFailure = _a.updateZeniAccountsPromoCardFailure, exports.clearZeniAccountsPromoCard = _a.clearZeniAccountsPromoCard;
64
- exports.default = zeniAccountsPromoCard.reducer;
@@ -1,12 +0,0 @@
1
- import { ID } from '../../commonStateTypes/common';
2
- import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
3
- import { RootState } from '../../reducer';
4
- export interface ZeniAccountsPromoCardReport extends SelectorView {
5
- isShowDepositAccountsPromo: boolean;
6
- maxAnnualPercentageYield: number;
7
- maxInsuredAmount: number;
8
- depositAccountId?: ID;
9
- maxCashBalanceAvailable?: number;
10
- maxPossibleInterest?: number;
11
- }
12
- export declare const getZeniAccountsPromoCard: (state: RootState) => ZeniAccountsPromoCardReport;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getZeniAccountsPromoCard = void 0;
4
- const toolkit_1 = require("@reduxjs/toolkit");
5
- exports.getZeniAccountsPromoCard = (0, toolkit_1.createSelector)((state) => state.zeniAccountsPromoCardState, (zeniAccountsPromoCardState) => ({
6
- isShowDepositAccountsPromo: zeniAccountsPromoCardState.isShowDepositAccountsPromo,
7
- maxAnnualPercentageYield: zeniAccountsPromoCardState.maxAnnualPercentageYield,
8
- maxPossibleInterest: zeniAccountsPromoCardState.maxPossibleInterest,
9
- maxCashBalanceAvailable: zeniAccountsPromoCardState.maxCashBalanceAvailable,
10
- maxInsuredAmount: zeniAccountsPromoCardState.maxInsuredAmount,
11
- depositAccountId: zeniAccountsPromoCardState.depositAccountId,
12
- reportId: 'zeni_accounts_promo_card',
13
- fetchState: zeniAccountsPromoCardState.fetchState,
14
- error: zeniAccountsPromoCardState.error,
15
- }));
@@ -1,9 +0,0 @@
1
- import { FetchedState, ID } from '../../commonStateTypes/common';
2
- export interface ZeniAccountsPromoCardState extends FetchedState {
3
- isShowDepositAccountsPromo: boolean;
4
- maxAnnualPercentageYield: number;
5
- maxInsuredAmount: number;
6
- depositAccountId?: ID;
7
- maxCashBalanceAvailable?: number;
8
- maxPossibleInterest?: number;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });