@zeniai/client-epic-state 4.15.34 → 4.15.35

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 (188) hide show
  1. package/lib/commonStateTypes/timePeriod.d.ts +1 -1
  2. package/lib/commonStateTypes/timePeriod.js +2 -2
  3. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.js +1 -1
  4. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  5. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  6. package/lib/configureStore.js +2 -1
  7. package/lib/entity/account/accountState.d.ts +1 -1
  8. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  9. package/lib/entity/accountRecon/accountReconPayload.d.ts +70 -0
  10. package/lib/entity/accountRecon/accountReconPayload.js +125 -0
  11. package/lib/entity/accountRecon/accountReconReducer.d.ts +16 -0
  12. package/lib/entity/accountRecon/accountReconReducer.js +71 -0
  13. package/lib/entity/accountRecon/accountReconSelector.d.ts +28 -0
  14. package/lib/entity/accountRecon/accountReconSelector.js +44 -0
  15. package/lib/entity/accountRecon/accountReconState.d.ts +70 -0
  16. package/lib/entity/accountRecon/accountReconState.js +28 -0
  17. package/lib/entity/class/classReducer.d.ts +4 -4
  18. package/lib/entity/class/classState.d.ts +1 -1
  19. package/lib/entity/company/companyReducer.js +0 -1
  20. package/lib/entity/customer/customerPayload.d.ts +1 -1
  21. package/lib/entity/customer/customerPayload.js +16 -6
  22. package/lib/entity/forecast/forecastState.d.ts +1 -1
  23. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  24. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  25. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  26. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  27. package/lib/entity/snackbar/snackbarTypes.js +4 -0
  28. package/lib/entity/task/taskState.d.ts +1 -1
  29. package/lib/entity/tenant/clearAllEpic.d.ts +4 -2
  30. package/lib/entity/tenant/clearAllEpic.js +4 -0
  31. package/lib/entity/tenant/tenantReducer.js +0 -1
  32. package/lib/entity/transaction/payloadTypes/customerTransactionPayload.d.ts +1 -1
  33. package/lib/entity/transaction/payloadTypes/customerTransactionPayload.js +1 -2
  34. package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.d.ts +35 -0
  35. package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.js +53 -0
  36. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +2 -0
  37. package/lib/entity/transaction/payloadTypes/transactionPayload.js +7 -3
  38. package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.d.ts +9 -1
  39. package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.js +23 -2
  40. package/lib/entity/transaction/stateTypes/reconciliationTransaction.d.ts +32 -0
  41. package/lib/entity/transaction/stateTypes/reconciliationTransaction.js +10 -0
  42. package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -1
  43. package/lib/entity/transaction/stateTypes/transactionType.d.ts +1 -1
  44. package/lib/entity/transaction/stateTypes/transactionType.js +1 -1
  45. package/lib/entity/transaction/stateTypes/vendorTransaction.d.ts +5 -0
  46. package/lib/entity/transaction/stateTypes/vendorTransaction.js +5 -1
  47. package/lib/entity/transaction/toSupportedTransaction.js +6 -1
  48. package/lib/entity/transaction/transactionReducer.d.ts +17 -0
  49. package/lib/entity/transaction/transactionReducer.js +47 -2
  50. package/lib/entity/transaction/transactionSelector.d.ts +2 -0
  51. package/lib/entity/transaction/transactionSelector.js +5 -0
  52. package/lib/entity/transaction/transactionState.d.ts +6 -4
  53. package/lib/entity/vendorExpense/vendorExpenseReducer.js +0 -1
  54. package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
  55. package/lib/epic.d.ts +6 -1
  56. package/lib/epic.js +6 -1
  57. package/lib/index.d.ts +16 -7
  58. package/lib/index.js +52 -27
  59. package/lib/init.d.ts +2 -1
  60. package/lib/init.js +9 -2
  61. package/lib/reducer.d.ts +7 -1
  62. package/lib/reducer.js +6 -0
  63. package/lib/view/accountList/accountListReducer.js +1 -3
  64. package/lib/view/accountMappingView/accountMappingReducer.js +0 -1
  65. package/lib/view/apAgingView/apAgingDetail/apAgingDetailReducer.js +1 -2
  66. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  67. package/lib/view/balanceSheet/balanceSheetReducer.js +1 -6
  68. package/lib/view/bankAccountView/bankAccountViewReducer.js +0 -1
  69. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  70. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  71. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  72. package/lib/view/cashFlow/cashFlowReducer.js +1 -4
  73. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  74. package/lib/view/cashPosition/cashPositionReducer.js +0 -1
  75. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  76. package/lib/view/commonVendorView/vendorView/epics/fetchAndUpdateVendorRecommendationsEpic.js +1 -3
  77. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
  78. package/lib/view/companyView/companyViewReducer.js +1 -10
  79. package/lib/view/dashboard/dashboardEpic.js +0 -2
  80. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  81. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.d.ts +15 -0
  82. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +118 -0
  83. package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.d.ts +10 -0
  84. package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +49 -0
  85. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.d.ts +14 -0
  86. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.js +169 -0
  87. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.d.ts +9 -0
  88. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +154 -0
  89. package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.d.ts +6 -0
  90. package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.js +110 -0
  91. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +2 -1
  92. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +24 -10
  93. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +2 -1
  94. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +14 -0
  95. package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +20 -4
  96. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -2
  97. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +1 -5
  98. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +17 -2
  99. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +2 -2
  100. package/lib/view/expenseAutomationView/expenseAutomationViewState.js +1 -1
  101. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.d.ts +7 -0
  102. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.js +18 -0
  103. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +81 -30
  104. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  105. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +54 -10
  106. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +28 -0
  107. package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +51 -0
  108. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +66 -0
  109. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +384 -0
  110. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +2 -1
  111. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -4
  112. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +2 -0
  113. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +1 -1
  114. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +51 -0
  115. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +7 -0
  116. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.d.ts +5 -0
  117. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +250 -0
  118. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +103 -0
  119. package/lib/view/expenseAutomationView/types/reconciliationViewState.js +38 -0
  120. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +8 -0
  121. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  122. package/lib/view/financeStatement/financeStatementReducer.js +1 -4
  123. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  124. package/lib/view/netBurnOrIncome/netBurnOrIncomeReducer.js +3 -10
  125. package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer.js +1 -6
  126. package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer.js +0 -1
  127. package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.js +0 -3
  128. package/lib/view/opEx/opExForTimeFrameEpic.js +1 -1
  129. package/lib/view/opEx/opExReducer.js +4 -14
  130. package/lib/view/opExByVendor/opExByVendorReducer.js +1 -3
  131. package/lib/view/opExClassesView/opExClassesViewReducer.js +1 -6
  132. package/lib/view/people/fetchPeopleEpic.js +1 -3
  133. package/lib/view/people/invitePeopleEpic.js +1 -3
  134. package/lib/view/people/inviteZeniPeopleEpic.js +1 -3
  135. package/lib/view/people/peopleReducer.js +0 -1
  136. package/lib/view/people/peopleSaveUpdatesEpic.js +1 -1
  137. package/lib/view/profitAndLoss/profitAndLossReducer.js +1 -6
  138. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +1 -6
  139. package/lib/view/recommendation/recommendationReducer.js +1 -4
  140. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  141. package/lib/view/reportUIOptions/updateReportUIOptionThisPeriodEpic.js +1 -3
  142. package/lib/view/revenue/revenueReducer.js +3 -10
  143. package/lib/view/revenueClassesView/revenueClassesViewReducer.js +1 -6
  144. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  145. package/lib/view/settingsView/settingsViewReducer.js +0 -1
  146. package/lib/view/spendManagement/billPay/billList/billListReducer.js +0 -1
  147. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +5 -1
  148. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +0 -6
  149. package/lib/view/spendManagement/billPay/billsBulkActionView/epics/validateBillsBulkActionEpic.ts.js +4 -3
  150. package/lib/view/spendManagement/billPay/editBillView/epics/fetchBillAndInitializeLocalStoreEpic.js +1 -3
  151. package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.d.ts +2 -1
  152. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +11 -3
  153. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +2 -1
  154. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +3 -1
  155. package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +1 -1
  156. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRecommendationsAndUpdateMerchantRecommendationsEpic.js +2 -6
  157. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRemiAndInitializeLocalStoreEpic.js +1 -3
  158. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.js +0 -1
  159. package/lib/view/spendManagement/zeniAccounts/expressPay/epics/fetchExpressPayInitialDetailsEpic.d.ts +2 -2
  160. package/lib/view/spendManagement/zeniAccounts/expressPay/epics/fetchExpressPayInitialDetailsEpic.js +7 -7
  161. package/lib/view/spendManagement/zeniAccounts/expressPay/expressPaySelector.d.ts +2 -2
  162. package/lib/view/spendManagement/zeniAccounts/expressPay/expressPaySelector.js +5 -4
  163. package/lib/view/spendManagement/zeniAccounts/expressPay/expressPayState.d.ts +2 -2
  164. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigPayload.d.ts +14 -0
  165. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigPayload.js +78 -1
  166. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigReducer.js +3 -1
  167. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigSelector.d.ts +2 -1
  168. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigSelector.js +2 -1
  169. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigState.d.ts +9 -0
  170. package/lib/view/subscriptionView/subscriptionViewReducer.js +0 -1
  171. package/lib/view/subscriptionView/types/subscriptionTypes.js +0 -1
  172. package/lib/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +1 -3
  173. package/lib/view/tasksCard/fetchTasksCardEpic.js +1 -2
  174. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  175. package/lib/view/tasksCard/tasksCardSelector.js +1 -1
  176. package/lib/view/topEx/topExSelector.d.ts +1 -1
  177. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +13 -4
  178. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +16 -3
  179. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +22 -5
  180. package/lib/view/transactionDetail/transactionDetailState.d.ts +1 -0
  181. package/lib/view/transactionDetail/transactionDetailTypes.d.ts +6 -0
  182. package/lib/view/transactionList/transactionListByEntitySelector.js +0 -2
  183. package/lib/view/transactionList/transactionListReducer.js +4 -6
  184. package/lib/view/trendWithTransactions/trendWithTransactionsReducer.js +0 -1
  185. package/lib/view/userFinancialAccount/userFinancialAccountReducer.js +1 -3
  186. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.d.ts +1 -1
  187. package/lib/zeniAPI.d.ts +1 -0
  188. package/package.json +9 -3
@@ -37,7 +37,6 @@ const opExClassesView = (0, toolkit_1.createSlice)({
37
37
  initialState: exports.initialState,
38
38
  reducers: {
39
39
  fetchOpExClassesView: {
40
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
41
40
  prepare(cacheOverride = false) {
42
41
  return { payload: { cacheOverride } };
43
42
  },
@@ -50,11 +49,7 @@ const opExClassesView = (0, toolkit_1.createSlice)({
50
49
  },
51
50
  },
52
51
  fetchOpExForTimeframeClassesView: {
53
- prepare(timeframe,
54
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
55
- fetchFullReport = true,
56
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
57
- cacheOverride = false) {
52
+ prepare(timeframe, fetchFullReport = true, cacheOverride = false) {
58
53
  return { payload: { timeframe, fetchFullReport, cacheOverride } };
59
54
  },
60
55
  reducer(draft, action) {
@@ -19,9 +19,7 @@ const fetchPeopleEpic = (actions$, state, zeniAPI) => actions$.pipe((0, operator
19
19
  return zeniAPI.getJSON(URL).pipe((0, operators_1.mergeMap)((response) => {
20
20
  var _a, _b, _c, _d;
21
21
  if ((0, responsePayload_1.isSuccessResponse)(response)) {
22
- return (0, rxjs_1.of)((0, userRoleReducer_1.updateUserRoles)((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.user_roles) !== null && _b !== void 0 ? _b : []), // eslint-disable-line @typescript-eslint/no-non-null-assertion
23
- (0, userReducer_1.updateAllUsers)({ users: (_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.users) !== null && _d !== void 0 ? _d : [] }), // eslint-disable-line @typescript-eslint/no-non-null-assertion
24
- (0, peopleReducer_1.updatePersonUserIds)(response.data) // eslint-disable-line @typescript-eslint/no-non-null-assertion
22
+ return (0, rxjs_1.of)((0, userRoleReducer_1.updateUserRoles)((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.user_roles) !== null && _b !== void 0 ? _b : []), (0, userReducer_1.updateAllUsers)({ users: (_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.users) !== null && _d !== void 0 ? _d : [] }), (0, peopleReducer_1.updatePersonUserIds)(response.data) // eslint-disable-line @typescript-eslint/no-non-null-assertion
25
23
  );
26
24
  }
27
25
  else {
@@ -21,9 +21,7 @@ const invitePeopleEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operat
21
21
  if (Boolean((_a = response.data) === null || _a === void 0 ? void 0 : _a.user_roles) === true) {
22
22
  (0, updateManagersListOnRoleChange_1.updateManagersListOnRoleChange)(actions, (_b = response.data) === null || _b === void 0 ? void 0 : _b.user_roles[0], false);
23
23
  }
24
- return (0, rxjs_1.of)((0, userRoleReducer_1.updateUserRoles)((_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.user_roles) !== null && _d !== void 0 ? _d : []), // eslint-disable-line @typescript-eslint/no-non-null-assertion
25
- (0, userReducer_1.updateAllUsers)({ users: (_f = (_e = response.data) === null || _e === void 0 ? void 0 : _e.users) !== null && _f !== void 0 ? _f : [] }), // eslint-disable-line @typescript-eslint/no-non-null-assertion
26
- (0, peopleReducer_1.invitePeopleSuccess)(response.data), // eslint-disable-line @typescript-eslint/no-non-null-assertion
24
+ return (0, rxjs_1.of)((0, userRoleReducer_1.updateUserRoles)((_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.user_roles) !== null && _d !== void 0 ? _d : []), (0, userReducer_1.updateAllUsers)({ users: (_f = (_e = response.data) === null || _e === void 0 ? void 0 : _e.users) !== null && _f !== void 0 ? _f : [] }), (0, peopleReducer_1.invitePeopleSuccess)(response.data), // eslint-disable-line @typescript-eslint/no-non-null-assertion
27
25
  (0, snackbarReducer_1.openSnackbar)({
28
26
  messageSection: invitePayload.invites.length > 1
29
27
  ? 'people_invite_multiple_people'
@@ -21,9 +21,7 @@ const inviteZeniPeopleEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, op
21
21
  if (Boolean((_a = response.data) === null || _a === void 0 ? void 0 : _a.user_roles) === true) {
22
22
  (0, updateManagersListOnRoleChange_1.updateManagersListOnRoleChange)(actions, (_b = response.data) === null || _b === void 0 ? void 0 : _b.user_roles[0], true);
23
23
  }
24
- return (0, rxjs_1.of)((0, userRoleReducer_1.updateUserRoles)((_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.user_roles) !== null && _d !== void 0 ? _d : []), // eslint-disable-line @typescript-eslint/no-non-null-assertion
25
- (0, userReducer_1.updateAllUsers)({ users: (_f = (_e = response.data) === null || _e === void 0 ? void 0 : _e.users) !== null && _f !== void 0 ? _f : [] }), // eslint-disable-line @typescript-eslint/no-non-null-assertion
26
- (0, peopleReducer_1.invitePeopleSuccess)(response.data), // eslint-disable-line @typescript-eslint/no-non-null-assertion
24
+ return (0, rxjs_1.of)((0, userRoleReducer_1.updateUserRoles)((_d = (_c = response.data) === null || _c === void 0 ? void 0 : _c.user_roles) !== null && _d !== void 0 ? _d : []), (0, userReducer_1.updateAllUsers)({ users: (_f = (_e = response.data) === null || _e === void 0 ? void 0 : _e.users) !== null && _f !== void 0 ? _f : [] }), (0, peopleReducer_1.invitePeopleSuccess)(response.data), // eslint-disable-line @typescript-eslint/no-non-null-assertion
27
25
  (0, snackbarReducer_1.openSnackbar)({
28
26
  messageSection: invitePayload.users.length > 1
29
27
  ? 'people_invite_multiple_people'
@@ -201,7 +201,6 @@ const people = (0, toolkit_1.createSlice)({
201
201
  reducer() {
202
202
  // Do nothing.
203
203
  },
204
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
205
204
  prepare(companyId, shouldFetchClassList) {
206
205
  return { payload: { companyId, shouldFetchClassList } };
207
206
  },
@@ -20,7 +20,7 @@ const peopleSaveUpdatesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, o
20
20
  var _a, _b, _c, _d;
21
21
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
22
22
  const actions = [
23
- (0, userRoleReducer_1.updateUserRoles)((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.user_roles) !== null && _b !== void 0 ? _b : []), // eslint-disable-line @typescript-eslint/no-non-null-assertion
23
+ (0, userRoleReducer_1.updateUserRoles)((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.user_roles) !== null && _b !== void 0 ? _b : []),
24
24
  (0, peopleReducer_1.peopleSaveUpdatesSuccess)(),
25
25
  (0, snackbarReducer_1.openSnackbar)({
26
26
  messageSection: 'people_update_person',
@@ -41,7 +41,6 @@ const profitAndLoss = (0, toolkit_1.createSlice)({
41
41
  initialState: exports.initialState,
42
42
  reducers: {
43
43
  fetchProfitAndLoss: {
44
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
45
44
  prepare(forecastId, cacheOverride = false) {
46
45
  return { payload: { forecastId, cacheOverride } };
47
46
  },
@@ -54,11 +53,7 @@ const profitAndLoss = (0, toolkit_1.createSlice)({
54
53
  },
55
54
  },
56
55
  fetchProfitAndLossForTimeframe: {
57
- prepare(timeframe, forecastId,
58
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
59
- fetchFullReport = true,
60
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
61
- cacheOverride = false) {
56
+ prepare(timeframe, forecastId, fetchFullReport = true, cacheOverride = false) {
62
57
  return {
63
58
  payload: { forecastId, timeframe, fetchFullReport, cacheOverride },
64
59
  };
@@ -38,7 +38,6 @@ const profitAndLossClassesView = (0, toolkit_1.createSlice)({
38
38
  initialState: exports.initialState,
39
39
  reducers: {
40
40
  fetchProfitAndLossClassesView: {
41
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
42
41
  prepare(cacheOverride = false) {
43
42
  return { payload: { cacheOverride } };
44
43
  },
@@ -51,11 +50,7 @@ const profitAndLossClassesView = (0, toolkit_1.createSlice)({
51
50
  },
52
51
  },
53
52
  fetchProfitAndLossForTimeframeClassesView: {
54
- prepare(timeframe,
55
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
56
- fetchFullReport = true,
57
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
58
- cacheOverride = false) {
53
+ prepare(timeframe, fetchFullReport = true, cacheOverride = false) {
59
54
  return { payload: { timeframe, fetchFullReport, cacheOverride } };
60
55
  },
61
56
  reducer(draft, action) {
@@ -12,9 +12,7 @@ const recommendation = (0, toolkit_1.createSlice)({
12
12
  initialState: exports.initialState,
13
13
  reducers: {
14
14
  fetchEntityRecommendationsByTransactionId: {
15
- reducer(draft,
16
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
17
- action) {
15
+ reducer(draft, action) {
18
16
  const { entity } = action.payload;
19
17
  const key = (0, recommendationState_1.getEntityRecommendationKey)(entity.type, entity.id);
20
18
  const existingRecommendation = draft.recommendationByEntity[key];
@@ -75,7 +73,6 @@ const recommendation = (0, toolkit_1.createSlice)({
75
73
  updateRecommendationForEntity(draft, action) {
76
74
  doUpdateRecommendationForEntity(draft.recommendationByEntity, action.payload.entityId, action.payload.entityType, action.payload.recommendations);
77
75
  },
78
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
79
76
  updateRecommendationForEntityFailure(draft, action) {
80
77
  const { entityId, entityType, status } = action.payload;
81
78
  const key = (0, recommendationState_1.getEntityRecommendationKey)(entityType, entityId);
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getReimbursementCardReport: (state: RootState) => {
3
- reportId: "billing" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "flux_analysis_operating_expense";
3
+ reportId: "billing" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "flux_analysis_operating_expense" | "account_reconciliation";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  fetchState: import("../..").FetchState;
@@ -24,9 +24,7 @@ const updateReportUIOptionThisPeriodEpic = (actions$, state) => actions$.pipe((0
24
24
  firstMonthOfFY: action.payload.firstMonthOfFY,
25
25
  thisPeriod: action.payload.thisPeriod,
26
26
  coaBalances: financeStatementState.balancesInTimeframe,
27
- maxNumOfPeriodsToHighlight:
28
- // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
29
- (_a = action.payload.maxNumOfPeriodsToSelect) !== null && _a !== void 0 ? _a : financeStatementReducer_1.initialFinanceStatementState.maxNumOfPeriodsToHighlight,
27
+ maxNumOfPeriodsToHighlight: (_a = action.payload.maxNumOfPeriodsToSelect) !== null && _a !== void 0 ? _a : financeStatementReducer_1.initialFinanceStatementState.maxNumOfPeriodsToHighlight,
30
28
  }));
31
29
  }));
32
30
  exports.updateReportUIOptionThisPeriodEpic = updateReportUIOptionThisPeriodEpic;
@@ -72,7 +72,6 @@ const revenue = (0, toolkit_1.createSlice)({
72
72
  initialState: exports.initialState,
73
73
  reducers: {
74
74
  fetchRevenue: {
75
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
76
75
  prepare(fetchFullReport = false, forecastId, cacheOverride = false) {
77
76
  return { payload: { fetchFullReport, forecastId, cacheOverride } };
78
77
  },
@@ -85,11 +84,7 @@ const revenue = (0, toolkit_1.createSlice)({
85
84
  },
86
85
  },
87
86
  fetchRevenueForTimeframe: {
88
- prepare(timeframe, forecastId,
89
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
90
- fetchFullReport = true,
91
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- cacheOverride = false) {
87
+ prepare(timeframe, forecastId, fetchFullReport = true, cacheOverride = false) {
93
88
  return {
94
89
  payload: { forecastId, timeframe, fetchFullReport, cacheOverride },
95
90
  };
@@ -109,8 +104,7 @@ const revenue = (0, toolkit_1.createSlice)({
109
104
  reducer(draft) {
110
105
  draft.lastFetchRequestTime = (0, zeniDayJS_1.dateNow)();
111
106
  },
112
- prepare(cacheOverride = false, // eslint-disable-line @typescript-eslint/no-inferrable-types
113
- forecastId) {
107
+ prepare(cacheOverride = false, forecastId) {
114
108
  return {
115
109
  payload: {
116
110
  cacheOverride,
@@ -123,8 +117,7 @@ const revenue = (0, toolkit_1.createSlice)({
123
117
  reducer(draft) {
124
118
  draft.lastFetchRequestTime = (0, zeniDayJS_1.dateNow)();
125
119
  },
126
- prepare(cacheOverride = false, // eslint-disable-line @typescript-eslint/no-inferrable-types
127
- forecastId) {
120
+ prepare(cacheOverride = false, forecastId) {
128
121
  return {
129
122
  payload: {
130
123
  cacheOverride,
@@ -37,7 +37,6 @@ const revenueClassesView = (0, toolkit_1.createSlice)({
37
37
  initialState: exports.initialState,
38
38
  reducers: {
39
39
  fetchRevenueClassesView: {
40
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
41
40
  prepare(cacheOverride = false) {
42
41
  return { payload: { cacheOverride } };
43
42
  },
@@ -50,11 +49,7 @@ const revenueClassesView = (0, toolkit_1.createSlice)({
50
49
  },
51
50
  },
52
51
  fetchRevenueForTimeframeClassesView: {
53
- prepare(timeframe,
54
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
55
- fetchFullReport = true,
56
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
57
- cacheOverride = false) {
52
+ prepare(timeframe, fetchFullReport = true, cacheOverride = false) {
58
53
  return { payload: { timeframe, fetchFullReport, cacheOverride } };
59
54
  },
60
55
  reducer(draft, action) {
@@ -7,7 +7,7 @@ export declare const getScheduleListKey: (selectedCategory: ID, selectedTimefram
7
7
  export type ScheduleListKey = ReturnType<typeof getScheduleListKey>;
8
8
  export declare const toScheduleSubTabType: (v: string) => "all" | "new" | "completed" | "ongoing";
9
9
  export type ScheduleSubTabType = ReturnType<typeof toScheduleSubTabType>;
10
- declare const toScheduleSortKeyType: (v: string) => "status" | "user" | "months" | "class" | "vendor" | "amount" | "createTime" | "balanceAsOfToday" | "memo" | "assetId" | "transactionType" | "transactionDate" | "accruedExpenseCategory" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth";
10
+ declare const toScheduleSortKeyType: (v: string) => "status" | "user" | "months" | "class" | "vendor" | "amount" | "createTime" | "balanceAsOfToday" | "memo" | "assetId" | "transactionDate" | "transactionType" | "accruedExpenseCategory" | "scheduleCategory" | "expenseCategory" | "accumulatedDepreciationCategory" | "startMonth" | "endMonth";
11
11
  export declare type ScheduleListSortKey = ReturnType<typeof toScheduleSortKeyType>;
12
12
  export interface DownloadJEScheduleTabOptions {
13
13
  timezone: string;
@@ -93,7 +93,6 @@ const settings = (0, toolkit_1.createSlice)({
93
93
  reducer() {
94
94
  // Do nothing.
95
95
  },
96
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
97
96
  prepare(companyId, shouldFetchClassList) {
98
97
  return { payload: { companyId, shouldFetchClassList } };
99
98
  },
@@ -163,7 +163,6 @@ function doUpdateBillList(draft, payload, tab) {
163
163
  const pendingApprovalTransactionIDs = payload.pending_approval_transaction_ids_for_user;
164
164
  const start = (0, timePeriod_1.toAbsoluteDay)(payload === null || payload === void 0 ? void 0 : payload.query.start_date); // eslint-disable-line @typescript-eslint/no-non-null-assertion
165
165
  const end = (0, timePeriod_1.toAbsoluteDay)(payload === null || payload === void 0 ? void 0 : payload.query.end_date); // eslint-disable-line @typescript-eslint/no-non-null-assertion
166
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
167
166
  const key = (0, billListState_1.getBillListKey)({ start, end }, tab);
168
167
  draft[key] = Object.assign(Object.assign({}, billListState_1.billListInitialState), { uiState: draft[key] != null ? draft[key].uiState : billListState_1.billListInitialState.uiState, fetchState: 'Completed', error: undefined, transactionIDs,
169
168
  pendingApprovalTransactionIDs });
@@ -3,7 +3,7 @@ import { Currency } from '../../../../commonStateTypes/amount';
3
3
  import { AccountBasePayload } from '../../../../entity/account/accountPayload';
4
4
  import { ClassBasePayload } from '../../../../entity/class/classPayload';
5
5
  import { ZeniAPIResponse } from '../../../../responsePayload';
6
- import { AccType, AccountTypeSubConfigCodeKeyType, BillPayConfig, BillPaymentConfigCodeType, BillPaymentOutsideZeniSubConfigCodeType, BillPaymentSubConfigCodeKeyType, BillPaymentSubConfigCodeType, BillPaymentWireSubConfigCodeKeyType, BillPaymentWireSubConfigCodeType, InternationalSubConfigCodeKeyType, InternationalSubConfigCodeType, InternationalWireMethodCodeKeyType, InternationalWireMethodCodeType, PaymentAchSubConfigCodeKeyType, PaymentAchSubConfigCodeType, VendorCurrency } from './billPayConfigState';
6
+ import { AccType, AccountTypeSubConfigCodeKeyType, BillPayConfig, BillPaymentConfigCodeType, BillPaymentOutsideZeniSubConfigCodeType, BillPaymentSubConfigCodeKeyType, BillPaymentSubConfigCodeType, BillPaymentWireSubConfigCodeKeyType, BillPaymentWireSubConfigCodeType, ConfigPeriod, InternationalSubConfigCodeKeyType, InternationalSubConfigCodeType, InternationalWireMethodCodeKeyType, InternationalWireMethodCodeType, PaymentAchSubConfigCodeKeyType, PaymentAchSubConfigCodeType, VendorCurrency } from './billPayConfigState';
7
7
  export interface BillPayConfigPayload {
8
8
  bill_pay_bot_email: string;
9
9
  is_us_domestic_wire_enabled: boolean;
@@ -106,6 +106,10 @@ export declare const getBillPaymentWireSubConfigCodeKey: (subCode: BillPaymentWi
106
106
  export declare const getInternationalSubConfigCodeKey: (subCode: InternationalSubConfigCodeType) => InternationalSubConfigCodeKeyType;
107
107
  export declare const getInternationalWireMethodCodeKey: (subCode: InternationalWireMethodCodeType) => InternationalWireMethodCodeKeyType;
108
108
  export declare const getAccountTypeSubConfigCodeKey: (subCode: AccType) => AccountTypeSubConfigCodeKeyType;
109
+ export interface TimelineDetail {
110
+ minPeriod: ConfigPeriod;
111
+ maxPeriod: ConfigPeriod;
112
+ }
109
113
  export declare const mapBillPayConfigPayloadToBillPayConfig: (paymentProcessor: BillPayConfigPaymentProcessorPayload, isEnabled: boolean, isVerified: boolean, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType, accType?: AccType, internationalMethod?: InternationalWireMethodCodeType, internationalSubMethod?: InternationalSubConfigCodeType) => BillPayConfig;
110
114
  export declare const mapBillPayVendorConfigPayloadToBillPayVendorConfig: (payload: BillPayConfigPayload, code: BillPaymentConfigCodeType, subCode: BillPaymentSubConfigCodeType) => Currency[];
111
115
  export declare const toVendorCurrency: (payload: VendorCurrencyPayload) => VendorCurrency;
@@ -30,11 +30,9 @@ exports.BILL_PAYMENT_METHOD_CODE = [
30
30
  'wire',
31
31
  'outside-zeni',
32
32
  ];
33
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
34
33
  const toBillPaymentMethodCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.BILL_PAYMENT_METHOD_CODE);
35
34
  exports.toBillPaymentMethodCodeType = toBillPaymentMethodCodeType;
36
35
  exports.PAYMENT_ACH_SUB_CODES = ['standard', 'same-day'];
37
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
38
36
  const toPaymentAchSubMethodCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.PAYMENT_ACH_SUB_CODES);
39
37
  exports.toPaymentAchSubMethodCodeType = toPaymentAchSubMethodCodeType;
40
38
  const PAYMENT_ACH_SUB_CODES_KEYS = ['standard', 'sameDay'];
@@ -44,7 +42,6 @@ exports.BILL_PAYMENT_WIRE_SUB_CODES = [
44
42
  'us-domestic',
45
43
  'international',
46
44
  ];
47
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
48
45
  const toBillPaymentWireSubMethodCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.BILL_PAYMENT_WIRE_SUB_CODES);
49
46
  exports.toBillPaymentWireSubMethodCodeType = toBillPaymentWireSubMethodCodeType;
50
47
  const BILL_PAYMENT_WIRE_SUB_CODES_KEYS = [
@@ -54,7 +51,6 @@ const BILL_PAYMENT_WIRE_SUB_CODES_KEYS = [
54
51
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
55
52
  const toBillPaymentWireSubMethodCodeKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, BILL_PAYMENT_WIRE_SUB_CODES_KEYS);
56
53
  exports.BILL_PAYMENT_OUTSIDE_ZENI_SUB_CODES = ['outside-zeni'];
57
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
58
54
  const toBillPaymentOutsideZeniSubMethodCodeType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.BILL_PAYMENT_OUTSIDE_ZENI_SUB_CODES);
59
55
  exports.toBillPaymentOutsideZeniSubMethodCodeType = toBillPaymentOutsideZeniSubMethodCodeType;
60
56
  const BILL_PAYMENT_OUTSIDE_ZENI_SUB_CODES_KEYS = ['outsideZeni'];
@@ -91,14 +87,12 @@ exports.ACCOUNT_TYPE_CODES = [
91
87
  'deposit_account',
92
88
  'payment_account',
93
89
  ];
94
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
95
90
  const toAccType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ACCOUNT_TYPE_CODES);
96
91
  exports.toAccType = toAccType;
97
92
  const ACCOUNT_TYPE_SUB_CODES_KEYS = [
98
93
  'depositAccount',
99
94
  'paymentAccount',
100
95
  ];
101
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
102
96
  const toAccountTypeSubConfigCodeKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ACCOUNT_TYPE_SUB_CODES_KEYS);
103
97
  exports.toAccountTypeSubConfigCodeKeyType = toAccountTypeSubConfigCodeKeyType;
104
98
  //These const are used in web-components
@@ -8,11 +8,12 @@ const billsBulkActionViewReducer_1 = require("../billsBulkActionViewReducer");
8
8
  const validateBillsBulkActionEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(billsBulkActionViewReducer_1.validateBillsBulkAction.match), (0, operators_1.mergeMap)(() => {
9
9
  const { billsBulkActionViewState } = state$.value;
10
10
  const { billsSelectedForBulkAction: transactionIds, bulkOperationTypeSelected, } = billsBulkActionViewState;
11
+ const validationValue = bulkOperationTypeSelected === 'send_for_approval'
12
+ ? 'all'
13
+ : 'sufficient_funds';
11
14
  const queryParam = {
12
15
  entity_ids: transactionIds,
13
- validations: bulkOperationTypeSelected === 'send_for_approval'
14
- ? 'all'
15
- : 'sufficient_funds',
16
+ validations: [validationValue],
16
17
  };
17
18
  return zeniAPI
18
19
  .getJSON(`${zeniAPI.apiEndPoints.spendManagementMicroServiceBaseUrl}/1.0/bulk/bills/transactions/validate?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
@@ -10,9 +10,7 @@ const operators_1 = require("rxjs/operators");
10
10
  const billDetailViewReducer_1 = require("../../billDetailView/billDetailViewReducer");
11
11
  const billDetailViewState_1 = require("../../billDetailView/billDetailViewState");
12
12
  const editBillViewReducer_1 = require("../editBillViewReducer");
13
- const fetchBillAndInitializeLocalStoreEpic = (actions$,
14
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
15
- state$) => actions$.pipe((0, operators_1.filter)(editBillViewReducer_1.fetchBillAndInitializeLocalStore.match), (0, operators_1.mergeMap)((action) => {
13
+ const fetchBillAndInitializeLocalStoreEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(editBillViewReducer_1.fetchBillAndInitializeLocalStore.match), (0, operators_1.mergeMap)((action) => {
16
14
  const { billId, cacheOverride, isShowDeletedBillsEnabled, hasZeniAssistAccess, } = action.payload;
17
15
  const state = state$.value;
18
16
  const billDetailActions = [];
@@ -10,13 +10,14 @@ import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
10
10
  import { TransactionWithAccountAndClassLinePayload } from '../../../../../entity/transaction/payloadTypes/transactionLinePayload';
11
11
  import { RootState } from '../../../../../reducer';
12
12
  import { ZeniAPI } from '../../../../../zeniAPI';
13
+ import { ZeniAccountPaymentMethod } from '../../../zeniAccounts/zeniAccountsConfig/zeniAccountsConfigState';
13
14
  import { BillPayConfig, BillPaymentConfigCodeType, BillPaymentSubConfigCodeType } from '../../billPayConfig/billPayConfigState';
14
15
  import { saveBillDetail, saveBillSuccessOrFailure } from '../editBillViewReducer';
15
16
  import { EditBillDetail } from '../editBillViewState';
16
17
  export type ActionType = ReturnType<typeof saveBillDetail> | ReturnType<typeof updateBillTransaction> | ReturnType<typeof openSnackbar> | ReturnType<typeof saveBillSuccessOrFailure> | ReturnType<typeof updateRecurringBillConfigs> | ReturnType<typeof updateRecurringBills>;
17
18
  export declare const saveBillDetailEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;
18
19
  export declare function prepareSaveBillPayload(accountState: AccountState, billTransactionState: BillTransactionState, paymentAccountState: PaymentAccountState, recurringBillState: RecurringBillState, billDetail: EditBillDetail, billStageCode: BillStageCodeType, isForMarkAsPaid: boolean, isApproverMarkingAsPaid: boolean): Partial<SaveBillPayload>;
19
- export declare const getBillPaymentMethodTypePayload: (paymentType?: BillPayConfig) => BillPaymentMethodTypePayload;
20
+ export declare const getBillPaymentMethodTypePayload: (paymentType?: BillPayConfig | ZeniAccountPaymentMethod) => BillPaymentMethodTypePayload;
20
21
  interface BillPaymentMethodTypePayload {
21
22
  code: BillPaymentConfigCodeType | null;
22
23
  name: string;
@@ -14,14 +14,16 @@ const paymentAccountListReducer_1 = require("../../../zeniAccounts/paymentAccoun
14
14
  const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
15
15
  const establishPlaidConnectionEpic = (actions$, state, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.establishPlaidConnection.match), (0, operators_1.mergeMap)((action) => {
16
16
  var _a, _b;
17
- const { publicToken, companyId, setupViewType, linkTokenType, plaidAccountKeyType, } = action.payload;
17
+ const { publicToken, companyId, setupViewType, linkTokenType, plaidAccountKeyType, zeniMappedAccountId, } = action.payload;
18
18
  const requestPayload = {
19
19
  public_token: publicToken,
20
20
  };
21
+ const queryPayload = {};
21
22
  const userId = (_b = (_a = state.value.tenantState.loggedInUser) === null || _a === void 0 ? void 0 : _a.userId) !== null && _b !== void 0 ? _b : '';
22
23
  //setupViewType not passed means this is a user account
23
24
  if (linkTokenType !== 'link_external_account') {
24
- if (setupViewType == null) {
25
+ if (setupViewType == null &&
26
+ plaidAccountKeyType !== 'expense_automation_reconcile') {
25
27
  requestPayload.is_user_account = true;
26
28
  }
27
29
  else if (plaidAccountKeyType === 'bill_pay_setup') {
@@ -39,9 +41,15 @@ const establishPlaidConnectionEpic = (actions$, state, zeniAPI) => actions$.pipe
39
41
  else if (plaidAccountKeyType === 'billing_setup') {
40
42
  requestPayload.is_primary_for_onboarding = true;
41
43
  }
44
+ else if (plaidAccountKeyType === 'expense_automation_reconcile') {
45
+ queryPayload.zeni_mapped_account_id = zeniMappedAccountId !== null && zeniMappedAccountId !== void 0 ? zeniMappedAccountId : '';
46
+ }
42
47
  }
48
+ const queryString = Object.entries(queryPayload).length > 0
49
+ ? `?query=${JSON.stringify(queryPayload)}`
50
+ : '';
43
51
  return zeniAPI
44
- .postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/plaid/public-token`, requestPayload)
52
+ .postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/plaid/public-token${queryString}`, requestPayload)
45
53
  .pipe((0, operators_1.mergeMap)((response) => {
46
54
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
47
55
  const paymentAccount = response.data.payment_accounts[0];
@@ -61,12 +61,13 @@ export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreato
61
61
  error: ZeniAPIStatus<Record<string, unknown>>;
62
62
  linkTokenType: PlaidLinkTokenType;
63
63
  plaidAccountKeyType: PlaidAccountKeyType;
64
- }, "plaidAccountView/getPlaidLinkTokenFailure", never, never>, establishPlaidConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[publicToken: string, companyId: string, plaidAccountKeyType: PlaidAccountKeyType, setupViewType?: "billing" | "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | undefined, linkTokenType?: PlaidLinkTokenType | undefined], {
64
+ }, "plaidAccountView/getPlaidLinkTokenFailure", never, never>, establishPlaidConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[publicToken: string, companyId: string, plaidAccountKeyType: PlaidAccountKeyType, setupViewType?: "billing" | "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | undefined, linkTokenType?: PlaidLinkTokenType | undefined, zeniMappedAccountId?: string | undefined], {
65
65
  publicToken: string;
66
66
  companyId: string;
67
67
  setupViewType: "billing" | "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | undefined;
68
68
  linkTokenType: PlaidLinkTokenType;
69
69
  plaidAccountKeyType: PlaidAccountKeyType;
70
+ zeniMappedAccountId: string | undefined;
70
71
  }, "plaidAccountView/establishPlaidConnection", never, never>, establishPlaidConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[linkTokenType: PlaidLinkTokenType, plaidAccountKeyType: PlaidAccountKeyType], {
71
72
  linkTokenType: PlaidLinkTokenType;
72
73
  plaidAccountKeyType: PlaidAccountKeyType;
@@ -14,6 +14,7 @@ exports.initialState = {
14
14
  user_reimbursement_account: plaidAccountViewState_1.initialPlaidAccountState,
15
15
  external_account: plaidAccountViewState_1.initialPlaidAccountState,
16
16
  billing_setup: plaidAccountViewState_1.initialPlaidAccountState,
17
+ expense_automation_reconcile: plaidAccountViewState_1.initialPlaidAccountState,
17
18
  };
18
19
  const plaidAccountView = (0, toolkit_1.createSlice)({
19
20
  name: 'plaidAccountView',
@@ -264,7 +265,7 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
264
265
  error: undefined,
265
266
  } });
266
267
  },
267
- prepare(publicToken, companyId, plaidAccountKeyType, setupViewType, linkTokenType) {
268
+ prepare(publicToken, companyId, plaidAccountKeyType, setupViewType, linkTokenType, zeniMappedAccountId) {
268
269
  return {
269
270
  payload: {
270
271
  publicToken,
@@ -272,6 +273,7 @@ const plaidAccountView = (0, toolkit_1.createSlice)({
272
273
  setupViewType,
273
274
  linkTokenType: linkTokenType !== null && linkTokenType !== void 0 ? linkTokenType : 'link_account',
274
275
  plaidAccountKeyType,
276
+ zeniMappedAccountId,
275
277
  },
276
278
  };
277
279
  },
@@ -1,7 +1,7 @@
1
1
  import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
2
  import { ZeniDate } from '../../../zeniDayJS';
3
3
  export type PlaidLinkTokenType = 'link_account' | 'update_account' | 'link_account_no_microdeposit' | 'link_external_account';
4
- export type PlaidAccountKeyType = 'spend_management_setup' | 'bill_pay_setup' | 'reimbursement_setup' | 'account_setup' | 'charge_card_setup' | 'user_reimbursement_account' | 'external_account' | 'billing_setup';
4
+ export type PlaidAccountKeyType = 'spend_management_setup' | 'bill_pay_setup' | 'reimbursement_setup' | 'account_setup' | 'charge_card_setup' | 'user_reimbursement_account' | 'external_account' | 'billing_setup' | 'expense_automation_reconcile';
5
5
  export type PlaidConnectionDetails = Record<PlaidLinkTokenType, {
6
6
  linkToken?: string;
7
7
  expiration?: ZeniDate;
@@ -6,9 +6,7 @@ const operators_1 = require("rxjs/operators");
6
6
  const recommendationReducer_1 = require("../../../../recommendation/recommendationReducer");
7
7
  const recommendationSelector_1 = require("../../../../recommendation/recommendationSelector");
8
8
  const editRemiViewReducer_1 = require("../editRemiViewReducer");
9
- const fetchRecommendationsAndUpdateMerchantRecommendationsEpic = (actions$,
10
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
11
- state$) => actions$.pipe((0, operators_1.filter)(editRemiViewReducer_1.fetchRecommendationsAndUpdateMerchantRecommendations.match), (0, operators_1.mergeMap)((action) => {
9
+ const fetchRecommendationsAndUpdateMerchantRecommendationsEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(editRemiViewReducer_1.fetchRecommendationsAndUpdateMerchantRecommendations.match), (0, operators_1.mergeMap)((action) => {
12
10
  const { cacheOverride, lineId, reimbursementId, merchantId, merchantName } = action.payload;
13
11
  const state = state$.value;
14
12
  const reimbursement = reimbursementId != null
@@ -67,9 +65,7 @@ state$) => actions$.pipe((0, operators_1.filter)(editRemiViewReducer_1.fetchReco
67
65
  return (0, rxjs_1.from)(merchantRecommendationActions);
68
66
  }));
69
67
  exports.fetchRecommendationsAndUpdateMerchantRecommendationsEpic = fetchRecommendationsAndUpdateMerchantRecommendationsEpic;
70
- const waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic = (actions$,
71
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
72
- state$) => actions$.pipe((0, operators_1.filter)(editRemiViewReducer_1.waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchant.match),
68
+ const waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(editRemiViewReducer_1.waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchant.match),
73
69
  //used concatMap here, as with mergeMap it was triggering below flow for first completed recommendations (in case of multi receipts)
74
70
  (0, operators_1.concatMap)((action) => {
75
71
  const { reimbursementId } = action.payload;
@@ -9,9 +9,7 @@ const rxjs_1 = require("rxjs");
9
9
  const operators_1 = require("rxjs/operators");
10
10
  const remiDetailViewReducer_1 = require("../../remiDetailView/remiDetailViewReducer");
11
11
  const editRemiViewReducer_1 = require("../editRemiViewReducer");
12
- const fetchRemiAndInitializeLocalStoreEpic = (actions$,
13
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
14
- state$) => actions$.pipe((0, operators_1.filter)(editRemiViewReducer_1.fetchRemiAndInitializeLocalStore.match), (0, operators_1.mergeMap)((action) => {
12
+ const fetchRemiAndInitializeLocalStoreEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(editRemiViewReducer_1.fetchRemiAndInitializeLocalStore.match), (0, operators_1.mergeMap)((action) => {
15
13
  const { reimbursementId, cacheOverride, isShowDeletedReimbursementEnabled, } = action.payload;
16
14
  const state = state$.value;
17
15
  const remiDetailActions = [];
@@ -173,7 +173,6 @@ function doUpdateRemiList(draft, payload, tab) {
173
173
  const pendingApprovalTransactionIDs = payload.pending_approval_transaction_ids_for_user;
174
174
  const start = (0, timePeriod_1.toAbsoluteDay)(payload === null || payload === void 0 ? void 0 : payload.query.start_date); // eslint-disable-line @typescript-eslint/no-non-null-assertion
175
175
  const end = (0, timePeriod_1.toAbsoluteDay)(payload === null || payload === void 0 ? void 0 : payload.query.end_date); // eslint-disable-line @typescript-eslint/no-non-null-assertion
176
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
177
176
  const key = (0, remiListState_1.getRemiListKey)({ start, end }, tab);
178
177
  draft[key] = Object.assign(Object.assign({}, remiListState_1.remiListInitialState), { uiState: draft[key] != null ? draft[key].uiState : remiListState_1.remiListInitialState.uiState, fetchState: 'Completed', error: undefined, transactionIDs,
179
178
  pendingApprovalTransactionIDs });
@@ -2,8 +2,8 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
2
2
  import { Observable } from 'rxjs';
3
3
  import { RootState } from '../../../../../reducer';
4
4
  import { fetchVendorTypeList } from '../../../../vendorTypeList/vendorTypeListReducer';
5
- import { fetchBillPayConfig } from '../../../billPay/billPayConfig/billPayConfigReducer';
6
5
  import { fetchDepositAccountList } from '../../depositAccountList/depositAccountListReducer';
6
+ import { fetchZeniAccountsConfig } from '../../zeniAccountsConfig/zeniAccountsConfigReducer';
7
7
  import { fetchExpressPayInitialDetails, updateExpressPayFetchState } from '../expressPayReducer';
8
- export type ActionType = ReturnType<typeof fetchExpressPayInitialDetails> | ReturnType<typeof fetchBillPayConfig> | ReturnType<typeof fetchVendorTypeList> | ReturnType<typeof fetchDepositAccountList> | ReturnType<typeof updateExpressPayFetchState>;
8
+ export type ActionType = ReturnType<typeof fetchExpressPayInitialDetails> | ReturnType<typeof fetchZeniAccountsConfig> | ReturnType<typeof fetchVendorTypeList> | ReturnType<typeof fetchDepositAccountList> | ReturnType<typeof updateExpressPayFetchState>;
9
9
  export declare const fetchExpressPayInitialDetailsEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -4,16 +4,16 @@ exports.fetchExpressPayInitialDetailsEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const vendorTypeListReducer_1 = require("../../../../vendorTypeList/vendorTypeListReducer");
7
- const billPayConfigReducer_1 = require("../../../billPay/billPayConfig/billPayConfigReducer");
8
7
  const depositAccountListReducer_1 = require("../../depositAccountList/depositAccountListReducer");
8
+ const zeniAccountsConfigReducer_1 = require("../../zeniAccountsConfig/zeniAccountsConfigReducer");
9
9
  const expressPayReducer_1 = require("../expressPayReducer");
10
10
  const fetchExpressPayInitialDetailsEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(expressPayReducer_1.fetchExpressPayInitialDetails.match), (0, operators_1.mergeMap)((action) => {
11
- const { cacheOverride, isInternationalWireEnabled } = action.payload;
11
+ const { cacheOverride } = action.payload;
12
12
  const state = state$.value;
13
13
  const fetchActions = [];
14
14
  if (cacheOverride === true) {
15
15
  fetchActions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
16
- fetchActions.push((0, billPayConfigReducer_1.fetchBillPayConfig)(isInternationalWireEnabled));
16
+ fetchActions.push((0, zeniAccountsConfigReducer_1.fetchZeniAccountsConfig)());
17
17
  fetchActions.push((0, depositAccountListReducer_1.fetchDepositAccountList)());
18
18
  fetchActions.push((0, expressPayReducer_1.updateExpressPayFetchState)());
19
19
  }
@@ -22,10 +22,10 @@ const fetchExpressPayInitialDetailsEpic = (actions$, state$) => actions$.pipe((0
22
22
  state.vendorTypeListState.fetchState !== 'In-Progress') {
23
23
  fetchActions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
24
24
  }
25
- const billPayConfigFetchState = state.billPayConfigState.fetchState;
26
- if (billPayConfigFetchState !== 'Completed' &&
27
- billPayConfigFetchState !== 'In-Progress') {
28
- fetchActions.push((0, billPayConfigReducer_1.fetchBillPayConfig)(isInternationalWireEnabled));
25
+ const zeniAccountsConfig = state.zeniAccountsConfigState;
26
+ if (zeniAccountsConfig.hasValidState() === false &&
27
+ zeniAccountsConfig.fetchState !== 'In-Progress') {
28
+ fetchActions.push((0, zeniAccountsConfigReducer_1.fetchZeniAccountsConfig)());
29
29
  }
30
30
  const depositAccounts = state.depositAccountListState;
31
31
  if (depositAccounts.fetchState !== 'In-Progress' &&
@@ -5,9 +5,9 @@ import { File } from '../../../../entity/file/fileState';
5
5
  import { RootState } from '../../../../reducer';
6
6
  import { VendorViewSelectorView } from '../../../commonVendorView/vendorView/vendorViewSelector';
7
7
  import { VendorType } from '../../../vendorTypeList/vendorTypeListPayload';
8
- import { BillPayConfig } from '../../billPay/billPayConfig/billPayConfigState';
9
8
  import { PaymentDetailsSectionView, PaymentToOption } from '../../billPay/editBillView/editBillViewSelector';
10
9
  import { FundingAccount } from '../../commonSetup/setupViewSelector';
10
+ import { ZeniAccountPaymentMethod } from '../zeniAccountsConfig/zeniAccountsConfigState';
11
11
  import { ExpressPayFormLocalData } from './expressPayState';
12
12
  export interface ExpressPayView extends SelectorView {
13
13
  vendorViewDetails: VendorViewSelectorView;
@@ -15,7 +15,7 @@ export interface ExpressPayView extends SelectorView {
15
15
  expressPayLocalData?: ExpressPayFormLocalData;
16
16
  paymentDetails?: PaymentDetailsSectionView;
17
17
  paymentToOptions: PaymentToOption[];
18
- allPaymentMethods: BillPayConfig[];
18
+ allPaymentMethods: ZeniAccountPaymentMethod[];
19
19
  withdrawFromList: FundingAccount[];
20
20
  receiptFile?: File;
21
21
  internationalWireOnboardingStatus?: AllowedValueWithCode;