@zeniai/client-epic-state 4.15.42 → 4.15.44

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 (248) hide show
  1. package/README.md +19 -1
  2. package/lib/commonPayloadTypes/recommendationPayload.d.ts +1 -0
  3. package/lib/commonStateTypes/common.d.ts +1 -1
  4. package/lib/commonStateTypes/fiscalYearHelpers/getFYMonths.d.ts +2 -2
  5. package/lib/commonStateTypes/fiscalYearHelpers/getFYQuarterAndYear.d.ts +2 -2
  6. package/lib/commonStateTypes/timePeriod.d.ts +7 -7
  7. package/lib/commonStateTypes/timePeriod.js +2 -2
  8. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
  9. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.js +1 -1
  10. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  11. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  12. package/lib/configureStore.js +2 -1
  13. package/lib/entity/account/accountSelector.d.ts +3 -3
  14. package/lib/entity/account/accountState.d.ts +1 -1
  15. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -1
  16. package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -22
  17. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  18. package/lib/entity/accountRecon/accountReconPayload.d.ts +70 -0
  19. package/lib/entity/accountRecon/accountReconPayload.js +125 -0
  20. package/lib/entity/accountRecon/accountReconReducer.d.ts +16 -0
  21. package/lib/entity/accountRecon/accountReconReducer.js +71 -0
  22. package/lib/entity/accountRecon/accountReconSelector.d.ts +28 -0
  23. package/lib/entity/accountRecon/accountReconSelector.js +44 -0
  24. package/lib/entity/accountRecon/accountReconState.d.ts +70 -0
  25. package/lib/entity/accountRecon/accountReconState.js +28 -0
  26. package/lib/entity/approvalRule/approvalRuleState.d.ts +2 -2
  27. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +4 -4
  28. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  29. package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
  30. package/lib/entity/class/classReducer.d.ts +4 -4
  31. package/lib/entity/class/classState.d.ts +1 -1
  32. package/lib/entity/company/companyReducer.js +0 -1
  33. package/lib/entity/customer/customerPayload.d.ts +1 -1
  34. package/lib/entity/customer/customerPayload.js +16 -6
  35. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  36. package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
  37. package/lib/entity/file/fileState.d.ts +3 -3
  38. package/lib/entity/forecast/forecastState.d.ts +1 -1
  39. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
  40. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +2 -2
  41. package/lib/entity/notification/types/notificationTypes.d.ts +2 -2
  42. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  43. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  44. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  45. package/lib/entity/snackbar/snackbarTypes.d.ts +2 -2
  46. package/lib/entity/snackbar/snackbarTypes.js +4 -0
  47. package/lib/entity/task/taskState.d.ts +3 -3
  48. package/lib/entity/tenant/clearAllEpic.d.ts +4 -2
  49. package/lib/entity/tenant/clearAllEpic.js +4 -0
  50. package/lib/entity/tenant/tenantReducer.d.ts +2 -2
  51. package/lib/entity/tenant/tenantReducer.js +0 -1
  52. package/lib/entity/transaction/payloadTypes/customerTransactionPayload.d.ts +1 -1
  53. package/lib/entity/transaction/payloadTypes/customerTransactionPayload.js +1 -2
  54. package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.d.ts +35 -0
  55. package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.js +53 -0
  56. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +2 -0
  57. package/lib/entity/transaction/payloadTypes/transactionPayload.js +9 -6
  58. package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.d.ts +9 -1
  59. package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.js +24 -2
  60. package/lib/entity/transaction/stateTypes/attachment.d.ts +2 -2
  61. package/lib/entity/transaction/stateTypes/reconciliationTransaction.d.ts +32 -0
  62. package/lib/entity/transaction/stateTypes/reconciliationTransaction.js +10 -0
  63. package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -1
  64. package/lib/entity/transaction/stateTypes/transactionType.d.ts +1 -1
  65. package/lib/entity/transaction/stateTypes/transactionType.js +1 -1
  66. package/lib/entity/transaction/stateTypes/vendorTransaction.d.ts +5 -0
  67. package/lib/entity/transaction/stateTypes/vendorTransaction.js +5 -1
  68. package/lib/entity/transaction/toSupportedTransaction.js +6 -1
  69. package/lib/entity/transaction/transactionReducer.d.ts +17 -0
  70. package/lib/entity/transaction/transactionReducer.js +47 -2
  71. package/lib/entity/transaction/transactionSelector.d.ts +2 -0
  72. package/lib/entity/transaction/transactionSelector.js +5 -0
  73. package/lib/entity/transaction/transactionState.d.ts +6 -4
  74. package/lib/entity/vendorExpense/vendorExpenseReducer.js +0 -1
  75. package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
  76. package/lib/epic.d.ts +6 -1
  77. package/lib/epic.js +6 -1
  78. package/lib/index.d.ts +22 -13
  79. package/lib/index.js +56 -27
  80. package/lib/init.d.ts +2 -1
  81. package/lib/init.js +9 -2
  82. package/lib/reducer.d.ts +7 -1
  83. package/lib/reducer.js +6 -0
  84. package/lib/view/accountList/accountListReducer.js +1 -3
  85. package/lib/view/accountMappingView/accountMappingReducer.js +0 -1
  86. package/lib/view/apAgingView/apAgingDetail/apAgingDetailReducer.js +1 -2
  87. package/lib/view/auditReportView/auditReportViewReducer.d.ts +2 -2
  88. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  89. package/lib/view/balanceSheet/balanceSheetReducer.js +1 -6
  90. package/lib/view/bankAccountView/bankAccountViewReducer.js +0 -1
  91. package/lib/view/billPayCard/billPayCardSelector.d.ts +2 -2
  92. package/lib/view/cardBalance/cardBalanceSelector.d.ts +3 -3
  93. package/lib/view/cashBalance/cashBalanceSelector.d.ts +3 -3
  94. package/lib/view/cashFlow/cashFlowReducer.js +1 -4
  95. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +2 -2
  96. package/lib/view/cashPosition/cashPositionReducer.js +0 -1
  97. package/lib/view/cashPosition/cashPositionSelector.d.ts +2 -2
  98. package/lib/view/common/reportsHelpers.d.ts +1 -1
  99. package/lib/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +7 -0
  100. package/lib/view/commonVendorView/vendorView/epics/fetchAndUpdateVendorRecommendationsEpic.js +1 -3
  101. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
  102. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
  103. package/lib/view/companyView/companyViewReducer.d.ts +1 -1
  104. package/lib/view/companyView/companyViewReducer.js +1 -10
  105. package/lib/view/companyView/types/cockpitTypes.d.ts +3 -3
  106. package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +1 -1
  107. package/lib/view/dashboard/dashboardEpic.js +0 -2
  108. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  109. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.d.ts +15 -0
  110. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +118 -0
  111. package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.d.ts +10 -0
  112. package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +49 -0
  113. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.d.ts +14 -0
  114. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.js +169 -0
  115. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.d.ts +9 -0
  116. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +154 -0
  117. package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.d.ts +6 -0
  118. package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.js +110 -0
  119. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +2 -1
  120. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +24 -10
  121. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +2 -1
  122. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +14 -0
  123. package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +30 -7
  124. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -2
  125. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +1 -5
  126. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +17 -2
  127. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +2 -2
  128. package/lib/view/expenseAutomationView/expenseAutomationViewState.js +1 -1
  129. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.d.ts +7 -0
  130. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.js +18 -0
  131. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +98 -42
  132. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  133. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +86 -10
  134. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +28 -0
  135. package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +51 -0
  136. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +11 -11
  137. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +66 -0
  138. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +384 -0
  139. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +12 -1
  140. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +66 -7
  141. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +2 -0
  142. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +1 -1
  143. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +51 -0
  144. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +7 -0
  145. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +5 -2
  146. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.d.ts +5 -0
  147. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +254 -0
  148. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +1 -1
  149. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
  150. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +103 -0
  151. package/lib/view/expenseAutomationView/types/reconciliationViewState.js +37 -0
  152. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +12 -2
  153. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  154. package/lib/view/financeStatement/financeStatementReducer.js +1 -4
  155. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +4 -4
  156. package/lib/view/netBurnOrIncome/netBurnOrIncomeReducer.js +3 -10
  157. package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer.js +1 -6
  158. package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer.js +0 -1
  159. package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardState.d.ts +1 -1
  160. package/lib/view/notificationView/notificationViewReducer.d.ts +8 -8
  161. package/lib/view/notificationView/notificationViewState.d.ts +2 -2
  162. package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.js +0 -3
  163. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +2 -2
  164. package/lib/view/opEx/opExForTimeFrameEpic.js +1 -1
  165. package/lib/view/opEx/opExReducer.js +4 -14
  166. package/lib/view/opExByVendor/opExByVendorReducer.js +1 -3
  167. package/lib/view/opExByVendor/opExByVendorState.d.ts +1 -1
  168. package/lib/view/opExClassesView/opExClassesViewReducer.js +1 -6
  169. package/lib/view/people/fetchPeopleEpic.js +1 -3
  170. package/lib/view/people/invitePeopleEpic.js +1 -3
  171. package/lib/view/people/inviteZeniPeopleEpic.js +1 -3
  172. package/lib/view/people/peopleReducer.js +0 -1
  173. package/lib/view/people/peopleSaveUpdatesEpic.js +1 -1
  174. package/lib/view/profitAndLoss/profitAndLossReducer.js +1 -6
  175. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +1 -6
  176. package/lib/view/recommendation/recommendationReducer.js +1 -4
  177. package/lib/view/referralView/referralState.d.ts +1 -1
  178. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +2 -2
  179. package/lib/view/reportUIOptions/reportUIOptionsReducer.d.ts +8 -8
  180. package/lib/view/reportUIOptions/updateReportUIOptionThisPeriodEpic.js +1 -3
  181. package/lib/view/revenue/revenueReducer.js +3 -10
  182. package/lib/view/revenueClassesView/revenueClassesViewReducer.js +1 -6
  183. package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
  184. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +4 -4
  185. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +2 -2
  186. package/lib/view/settingsView/settingsViewReducer.js +0 -1
  187. package/lib/view/settingsView/settingsViewState.d.ts +1 -1
  188. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  189. package/lib/view/spendManagement/billPay/billList/billListReducer.js +0 -1
  190. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +2 -2
  191. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigPayload.d.ts +5 -1
  192. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -1
  193. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +0 -6
  194. package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewReducer.d.ts +2 -2
  195. package/lib/view/spendManagement/billPay/billsBulkActionView/epics/validateBillsBulkActionEpic.ts.js +4 -3
  196. package/lib/view/spendManagement/billPay/editBillView/epics/fetchBillAndInitializeLocalStoreEpic.js +1 -3
  197. package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.d.ts +2 -1
  198. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +2 -2
  199. package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +1 -1
  200. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +7 -7
  201. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -1
  202. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +11 -3
  203. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +11 -10
  204. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +3 -1
  205. package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +1 -1
  206. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRecommendationsAndUpdateMerchantRecommendationsEpic.js +2 -6
  207. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRemiAndInitializeLocalStoreEpic.js +1 -3
  208. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
  209. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.js +0 -1
  210. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +4 -4
  211. package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewReducer.d.ts +2 -2
  212. package/lib/view/spendManagement/zeniAccounts/expressPay/epics/fetchExpressPayInitialDetailsEpic.d.ts +2 -2
  213. package/lib/view/spendManagement/zeniAccounts/expressPay/epics/fetchExpressPayInitialDetailsEpic.js +7 -7
  214. package/lib/view/spendManagement/zeniAccounts/expressPay/expressPaySelector.d.ts +2 -2
  215. package/lib/view/spendManagement/zeniAccounts/expressPay/expressPaySelector.js +5 -4
  216. package/lib/view/spendManagement/zeniAccounts/expressPay/expressPayState.d.ts +2 -2
  217. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigPayload.d.ts +14 -0
  218. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigPayload.js +78 -1
  219. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigReducer.js +3 -1
  220. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigSelector.d.ts +2 -1
  221. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigSelector.js +2 -1
  222. package/lib/view/spendManagement/zeniAccounts/zeniAccountsConfig/zeniAccountsConfigState.d.ts +9 -0
  223. package/lib/view/subscriptionView/subscriptionViewReducer.js +0 -1
  224. package/lib/view/subscriptionView/types/subscriptionTypes.js +0 -1
  225. package/lib/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +1 -3
  226. package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
  227. package/lib/view/taskManager/taskListView/taskListSelector.d.ts +1 -1
  228. package/lib/view/tasksCard/fetchTasksCardEpic.js +1 -2
  229. package/lib/view/tasksCard/tasksCardSelector.d.ts +2 -2
  230. package/lib/view/tasksCard/tasksCardSelector.js +1 -1
  231. package/lib/view/topEx/topExSelector.d.ts +3 -3
  232. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +30 -52
  233. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +22 -4
  234. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +66 -13
  235. package/lib/view/transactionDetail/transactionDetailReducer.d.ts +13 -4
  236. package/lib/view/transactionDetail/transactionDetailReducer.js +51 -21
  237. package/lib/view/transactionDetail/transactionDetailState.d.ts +3 -2
  238. package/lib/view/transactionDetail/transactionDetailTypes.d.ts +8 -0
  239. package/lib/view/transactionList/transactionListByEntitySelector.js +0 -2
  240. package/lib/view/transactionList/transactionListReducer.js +4 -6
  241. package/lib/view/trendWithTransactions/trendWithTransactionsReducer.js +0 -1
  242. package/lib/view/userFinancialAccount/userFinancialAccountReducer.js +1 -3
  243. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
  244. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.d.ts +1 -1
  245. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.d.ts +1 -1
  246. package/lib/zeniAPI.d.ts +1 -0
  247. package/lib/zeniUrl.d.ts +1 -1
  248. package/package.json +14 -12
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toTransactionUpdatesFromTransactionCategorizationLocalData = void 0;
4
- const entity_1 = require("../../../entity/genericEntity/entity");
5
4
  const vendorTransaction_1 = require("../../../entity/transaction/stateTypes/vendorTransaction");
6
5
  const recommendationState_1 = require("../../recommendation/recommendationState");
7
6
  const saveTransactionHelper_1 = require("../../transactionDetail/epics/saveTransactionHelper");
@@ -10,7 +9,7 @@ const saveTransactionHelper_1 = require("../../transactionDetail/epics/saveTrans
10
9
  * @param transactionCategorizationLocalData
11
10
  */
12
11
  const toTransactionUpdatesFromTransactionCategorizationLocalData = (transactionCategorizationLocalData, transaction, uncategorizedIncomeExpense) => {
13
- var _a, _b, _c;
12
+ var _a, _b, _c, _d, _e;
14
13
  const updates = {
15
14
  updatesByLineId: {},
16
15
  };
@@ -19,25 +18,39 @@ const toTransactionUpdatesFromTransactionCategorizationLocalData = (transactionC
19
18
  const isTransactionMisCategorized = (0, saveTransactionHelper_1.isTransactionMiscategorized)(transaction, true);
20
19
  const isTransactionUnCategorized = (0, saveTransactionHelper_1.isTransactionUncategorized)(transaction, uncategorizedIncomeExpense);
21
20
  updates.memo = transactionCategorizationLocalData.memo;
22
- if ((0, vendorTransaction_1.isVendorTransaction)(transaction) === true) {
23
- updates.vendorId = (_a = transactionCategorizationLocalData.vendorUpdates) === null || _a === void 0 ? void 0 : _a.id;
21
+ const currentSelectedEntity = transactionCategorizationLocalData.selectedEntity;
22
+ if ((0, vendorTransaction_1.isVendorTransaction)(transaction) === true &&
23
+ currentSelectedEntity != null &&
24
+ currentSelectedEntity.type === 'vendor') {
25
+ updates.vendorId = currentSelectedEntity.id;
26
+ }
27
+ if ((0, vendorTransaction_1.isVendorTransactionWithCustomer)(transaction) === true &&
28
+ currentSelectedEntity != null &&
29
+ currentSelectedEntity.type === 'customer') {
30
+ updates.customerId = currentSelectedEntity.id;
24
31
  }
25
- const entity = transaction.vendorId != null
26
- ? {
27
- id: transaction.vendorId,
28
- name: (_b = transaction.vendorName) !== null && _b !== void 0 ? _b : '',
29
- type: (0, entity_1.toEntityType)('vendor'),
30
- qboId: transaction.vendorId,
31
- zeniId: transaction.vendorId,
32
- }
33
- : undefined;
34
32
  let lastUpdatedCategory;
35
33
  let lastUpdatedClass;
36
- // single recommendation to just pick the last recommendation in the list of lines
37
- (_c = transaction.lines) === null || _c === void 0 ? void 0 : _c.forEach((line) => {
38
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
39
- const updatedEntityId = (_a = transactionCategorizationLocalData.vendorUpdates) === null || _a === void 0 ? void 0 : _a.qboId;
40
- const entityDetails = getEntityDetails(entity, transactionCategorizationLocalData.lineItemById[line.id], transactionCategorizationLocalData.vendorUpdates);
34
+ let updatedEntityId;
35
+ if (currentSelectedEntity != null &&
36
+ currentSelectedEntity.type === 'vendor') {
37
+ if (((_a = transactionCategorizationLocalData.vendorUpdates) === null || _a === void 0 ? void 0 : _a.qboId) !==
38
+ transaction.vendorId) {
39
+ updatedEntityId = (_b = transactionCategorizationLocalData.vendorUpdates) === null || _b === void 0 ? void 0 : _b.qboId;
40
+ }
41
+ }
42
+ else {
43
+ if (((_c = transactionCategorizationLocalData.customerUpdates) === null || _c === void 0 ? void 0 : _c.qboId) !==
44
+ transaction.customerId) {
45
+ updatedEntityId =
46
+ (_d = transactionCategorizationLocalData.customerUpdates) === null || _d === void 0 ? void 0 : _d.qboId;
47
+ }
48
+ }
49
+ (_e = transaction.lines) === null || _e === void 0 ? void 0 : _e.forEach((line) => {
50
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
51
+ const currentSelectedEntityLine = transactionCategorizationLocalData.lineItemById[line.id]
52
+ .selectedEntityLine;
53
+ const entityDetails = getEntityDetails(currentSelectedEntity, transactionCategorizationLocalData.lineItemById[line.id], transactionCategorizationLocalData.vendorUpdates, transactionCategorizationLocalData.customerUpdates, currentSelectedEntityLine);
41
54
  if (line.type === 'transaction_with_account_and_class_line' ||
42
55
  line.type === 'transaction_with_product_or_service_line' ||
43
56
  line.type === 'journal_entry_transaction_line') {
@@ -50,24 +63,44 @@ const toTransactionUpdatesFromTransactionCategorizationLocalData = (transactionC
50
63
  };
51
64
  if (line.type === 'journal_entry_transaction_line' ||
52
65
  line.platformLineDetailType === 'deposit_line_detail') {
53
- updatesByLineId[line.id] = Object.assign(Object.assign({}, updatesByLineId[line.id]), { vendor: lineItem.vendor });
66
+ updatesByLineId[line.id] = Object.assign(Object.assign({}, updatesByLineId[line.id]), { vendor: currentSelectedEntityLine != null &&
67
+ currentSelectedEntityLine.type === 'vendor'
68
+ ? lineItem.vendor
69
+ : undefined, customer: currentSelectedEntityLine != null &&
70
+ currentSelectedEntityLine.type === 'customer'
71
+ ? lineItem.customer
72
+ : undefined });
54
73
  }
55
74
  let hasCategoryChanged = false;
56
75
  let hasClassChanged = false;
57
76
  const accountLine = line;
58
77
  hasCategoryChanged =
59
- ((_b = lineItem.account) === null || _b === void 0 ? void 0 : _b.qboId) !== accountLine.account.qboId &&
60
- Boolean((_c = lineItem.account) === null || _c === void 0 ? void 0 : _c.qboId);
78
+ ((_a = lineItem.account) === null || _a === void 0 ? void 0 : _a.qboId) !== accountLine.account.qboId &&
79
+ Boolean((_b = lineItem.account) === null || _b === void 0 ? void 0 : _b.qboId);
61
80
  hasClassChanged =
62
- Boolean((_d = lineItem.class) === null || _d === void 0 ? void 0 : _d.qboId) &&
63
- ((_e = lineItem.class) === null || _e === void 0 ? void 0 : _e.qboId) !== accountLine.class.qboId;
81
+ Boolean((_c = lineItem.class) === null || _c === void 0 ? void 0 : _c.qboId) &&
82
+ ((_d = lineItem.class) === null || _d === void 0 ? void 0 : _d.qboId) !== accountLine.class.qboId;
64
83
  const recommendedAccountBase = (0, saveTransactionHelper_1.toRecommendedAccountBase)(lineItem.amount.amount, lineItem.account);
65
84
  const recommendedClassBase = (0, saveTransactionHelper_1.toRecommendedClassBase)(lineItem.amount.amount, lineItem.class);
66
- const updatedLineEntityId = ((_f = accountLine.vendor) === null || _f === void 0 ? void 0 : _f.id) != null
67
- ? ((_g = accountLine.vendor) === null || _g === void 0 ? void 0 : _g.id) != ((_h = lineItem.vendor) === null || _h === void 0 ? void 0 : _h.id)
68
- ? (_j = lineItem.vendor) === null || _j === void 0 ? void 0 : _j.id
69
- : (_k = accountLine.vendor) === null || _k === void 0 ? void 0 : _k.id
70
- : undefined;
85
+ let updatedLineEntityId;
86
+ if ((currentSelectedEntityLine === null || currentSelectedEntityLine === void 0 ? void 0 : currentSelectedEntityLine.type) === 'vendor') {
87
+ if (((_e = accountLine.vendor) === null || _e === void 0 ? void 0 : _e.id) != null) {
88
+ updatedLineEntityId =
89
+ ((_f = accountLine.vendor) === null || _f === void 0 ? void 0 : _f.id) !== ((_g = lineItem.vendor) === null || _g === void 0 ? void 0 : _g.id)
90
+ ? currentSelectedEntityLine === null || currentSelectedEntityLine === void 0 ? void 0 : currentSelectedEntityLine.qboId
91
+ : undefined;
92
+ }
93
+ }
94
+ else if (((_h = accountLine.customer) === null || _h === void 0 ? void 0 : _h.id) != null &&
95
+ (currentSelectedEntityLine === null || currentSelectedEntityLine === void 0 ? void 0 : currentSelectedEntityLine.type) === 'customer') {
96
+ updatedLineEntityId =
97
+ ((_j = accountLine.customer) === null || _j === void 0 ? void 0 : _j.id) !== ((_k = lineItem.customer) === null || _k === void 0 ? void 0 : _k.id)
98
+ ? currentSelectedEntityLine === null || currentSelectedEntityLine === void 0 ? void 0 : currentSelectedEntityLine.qboId
99
+ : undefined;
100
+ }
101
+ else {
102
+ updatedLineEntityId = undefined;
103
+ }
71
104
  if (entityDetails != null &&
72
105
  (hasCategoryChanged === true || hasClassChanged === true)) {
73
106
  lastUpdatedCategory =
@@ -83,16 +116,17 @@ const toTransactionUpdatesFromTransactionCategorizationLocalData = (transactionC
83
116
  if (recommended.class != null ||
84
117
  recommended.account != null ||
85
118
  updatedEntityId != null) {
86
- const vendorIdToUpdate = (_l = transactionCategorizationLocalData.vendorUpdates) === null || _l === void 0 ? void 0 : _l.qboId;
87
- let entityId = entityDetails.entityId;
88
- if (line.type === 'journal_entry_transaction_line' ||
89
- line.platformLineDetailType === 'deposit_line_detail') {
90
- const entityId = (_m = accountLine.vendor) === null || _m === void 0 ? void 0 : _m.id;
119
+ const vendorIdToUpdate = (_l = transactionCategorizationLocalData.selectedEntity) === null || _l === void 0 ? void 0 : _l.id;
120
+ if ((line.type === 'journal_entry_transaction_line' ||
121
+ line.platformLineDetailType === 'deposit_line_detail') &&
122
+ updatedLineEntityId != null) {
123
+ const entityId = entityDetails.entityId;
91
124
  if (entityId != null) {
92
125
  doUpdateEntityUpdates(entityUpdates, entityId, entityDetails.entityType, recommended, false, updatedLineEntityId);
93
126
  }
94
127
  }
95
128
  else {
129
+ let entityId = entityDetails.entityId;
96
130
  if (vendorIdToUpdate != null) {
97
131
  entityId = vendorIdToUpdate;
98
132
  }
@@ -135,27 +169,49 @@ const doUpdateEntityUpdates = (entityUpdates, entityId, entityType, recommendati
135
169
  entityUpdates[entityKey] = Object.assign(Object.assign({}, entityUpdate), { recommendations: recommendation });
136
170
  }
137
171
  };
138
- const getEntityDetails = (entity, lineItemLocalData, vendorUpdates) => {
172
+ const getEntityDetails = (currentSelectedEntity, lineItemLocalData, vendorUpdates, customerUpdates, currentSelectedEntityLine) => {
139
173
  var _a, _b, _c;
140
- if (entity != null) {
174
+ if (currentSelectedEntity != null) {
141
175
  return {
142
- entityId: (_a = entity.qboId) !== null && _a !== void 0 ? _a : entity.id,
143
- entityType: entity.type,
176
+ entityId: currentSelectedEntity.id,
177
+ entityType: currentSelectedEntity.type,
144
178
  };
145
179
  }
146
180
  if (lineItemLocalData.lineEntity != null) {
147
181
  return {
148
- entityId: (_b = lineItemLocalData.lineEntity.qboId) !== null && _b !== void 0 ? _b : lineItemLocalData.lineEntity.id,
182
+ entityId: (_a = lineItemLocalData.lineEntity.qboId) !== null && _a !== void 0 ? _a : lineItemLocalData.lineEntity.id,
149
183
  entityType: lineItemLocalData.vendor != null ? 'vendor' : 'customer',
150
184
  };
151
185
  }
152
- if (vendorUpdates != null && vendorUpdates.id != null) {
186
+ if (currentSelectedEntityLine != null &&
187
+ currentSelectedEntityLine.type === 'vendor') {
188
+ if (vendorUpdates != null && vendorUpdates.id != null) {
189
+ return {
190
+ entityId: vendorUpdates.id,
191
+ entityType: 'vendor',
192
+ };
193
+ }
194
+ }
195
+ if (currentSelectedEntityLine != null &&
196
+ currentSelectedEntityLine.type === 'customer') {
197
+ if (customerUpdates != null && customerUpdates.id != null) {
198
+ return {
199
+ entityId: customerUpdates.id,
200
+ entityType: 'customer',
201
+ };
202
+ }
203
+ }
204
+ if (((_b = lineItemLocalData.customer) === null || _b === void 0 ? void 0 : _b.id) != null &&
205
+ currentSelectedEntityLine != null &&
206
+ currentSelectedEntityLine.type === 'customer') {
153
207
  return {
154
- entityId: vendorUpdates.id,
155
- entityType: 'vendor',
208
+ entityId: lineItemLocalData.customer.id,
209
+ entityType: 'customer',
156
210
  };
157
211
  }
158
- if (((_c = lineItemLocalData.vendor) === null || _c === void 0 ? void 0 : _c.id) != null) {
212
+ if (((_c = lineItemLocalData.vendor) === null || _c === void 0 ? void 0 : _c.id) != null &&
213
+ currentSelectedEntityLine != null &&
214
+ currentSelectedEntityLine.type === 'vendor') {
159
215
  return {
160
216
  entityId: lineItemLocalData.vendor.id,
161
217
  entityType: 'vendor',
@@ -8,6 +8,6 @@ import { UncategorizedAccounts } from '../../accountList/accountListSelector';
8
8
  import { TransactionReviewLocalData, TransactionsTabViewState } from '../types/transactionsViewState';
9
9
  export declare const MAX_SELECTION_LIMIT = 5;
10
10
  export declare const toTransactionDetailLocalData: (transaction: SupportedTransaction) => TransactionReviewLocalData;
11
- export declare const toSetAllLineItemsToCategoryClass: (draft: TransactionsTabViewState, transaction: SupportedTransaction, transactionId: ID, transactionLineId: ID, transactionDetailLocalData: TransactionReviewLocalData, updatedItem: "category" | "class", uncategorizedAccounts: UncategorizedAccounts, vendorId?: ID, selectedAccount?: AccountBase, selectedClassBase?: ClassBase) => TransactionReviewLocalData;
11
+ export declare const toSetAllLineItemsToCategoryClass: (draft: TransactionsTabViewState, transaction: SupportedTransaction, transactionId: ID, transactionLineId: ID, transactionDetailLocalData: TransactionReviewLocalData, updatedItem: "category" | "class", uncategorizedAccounts: UncategorizedAccounts, vendorId?: ID, customerId?: ID, selectedAccount?: AccountBase, selectedClassBase?: ClassBase) => TransactionReviewLocalData;
12
12
  export declare const setEntityRecommendationForLineIdInLocalData: (draft: TransactionsTabViewState, transaction: SupportedTransaction, transactionDetailLocalData: TransactionReviewLocalData, entity: Entity, recommendationLineIds: ID[], uncategorizedAccounts: UncategorizedAccounts, recommendationByLineId?: RecommendationByLineId) => TransactionReviewLocalData;
13
13
  export declare const checkIfAllLineItemsAreCategoryClassFilled: (transaction: SupportedTransaction, transactionDetailLocalData: TransactionReviewLocalData, uncategorizedAccounts: UncategorizedAccounts) => boolean;
@@ -19,7 +19,43 @@ const toTransactionDetailLocalData = (transaction) => {
19
19
  logo: transaction.logo,
20
20
  }
21
21
  : undefined;
22
+ transactionLocal.customer =
23
+ transaction.customerId != null &&
24
+ transaction.customerName != null &&
25
+ Boolean(transaction.customerId) === true &&
26
+ Boolean(transaction.customerName) === true
27
+ ? {
28
+ id: transaction.customerId,
29
+ name: transaction.customerName,
30
+ logo: transaction.logo,
31
+ }
32
+ : undefined;
33
+ if ((0, vendorTransaction_1.isVendorTransaction)(transaction) &&
34
+ transaction.vendorId != null &&
35
+ transaction.vendorName != null) {
36
+ transactionLocal.selectedEntity = {
37
+ id: transaction.vendorId,
38
+ name: transaction.vendorName,
39
+ type: 'vendor',
40
+ qboId: transaction.vendorId,
41
+ zeniId: transaction.vendorId,
42
+ logo: transaction.logo,
43
+ };
44
+ }
45
+ if ((0, vendorTransaction_1.isVendorTransaction)(transaction) &&
46
+ transaction.customerId != null &&
47
+ transaction.customerName != null) {
48
+ transactionLocal.selectedEntity = {
49
+ id: transaction.customerId,
50
+ name: transaction.customerName,
51
+ type: 'customer',
52
+ qboId: transaction.customerId,
53
+ zeniId: transaction.customerId,
54
+ logo: transaction.logo,
55
+ };
56
+ }
22
57
  transactionLocal.vendorUpdates = undefined;
58
+ transactionLocal.customerUpdates = undefined;
23
59
  transactionLocal.lineItemById =
24
60
  transaction.lines != null && transaction.lines.length > 0
25
61
  ? buildLineItemById(transaction, transaction.recommendations)
@@ -53,7 +89,34 @@ const buildLineItemById = (transaction, recommendations) => {
53
89
  logo: accountLine.vendor.logo,
54
90
  }
55
91
  : undefined;
56
- record.customer = accountLine.customer;
92
+ record.customer =
93
+ accountLine.customer != null &&
94
+ Boolean(accountLine.customer.id) === true &&
95
+ Boolean(accountLine.customer.name) === true
96
+ ? {
97
+ id: accountLine.customer.id,
98
+ name: accountLine.customer.name,
99
+ logo: accountLine.customer.logo,
100
+ }
101
+ : undefined;
102
+ record.selectedEntityLine =
103
+ record.vendor != null
104
+ ? {
105
+ id: record.vendor.id,
106
+ name: record.vendor.name,
107
+ type: 'vendor',
108
+ qboId: record.vendor.id,
109
+ zeniId: record.vendor.id,
110
+ }
111
+ : record.customer != null
112
+ ? {
113
+ id: record.customer.id,
114
+ name: record.customer.name,
115
+ type: 'customer',
116
+ qboId: record.customer.id,
117
+ zeniId: record.customer.id,
118
+ }
119
+ : undefined;
57
120
  record.billable = accountLine.billable;
58
121
  record.categorizationStatus = accountLine.categorizationStatus;
59
122
  record.reviewPendingReasons = accountLine.reviewPendingReasons;
@@ -89,7 +152,7 @@ const buildLineItemById = (transaction, recommendations) => {
89
152
  });
90
153
  return lineItemData;
91
154
  };
92
- const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, transactionLineId, transactionDetailLocalData, updatedItem, uncategorizedAccounts, vendorId, selectedAccount, selectedClassBase) => {
155
+ const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, transactionLineId, transactionDetailLocalData, updatedItem, uncategorizedAccounts, vendorId, customerId, selectedAccount, selectedClassBase) => {
93
156
  const newLineItems = {};
94
157
  let selectedCheckBoxTransactionIds = draft.selectedCheckBoxTransactionIds;
95
158
  if (transaction.lines != null) {
@@ -124,8 +187,11 @@ const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, tra
124
187
  }
125
188
  }
126
189
  else {
127
- if ((transactionDetailLocalData.vendor != null &&
128
- transactionDetailLocalData.vendor.id === vendorId) ||
190
+ if ((transactionDetailLocalData.customer != null &&
191
+ transactionDetailLocalData.customer.id === customerId) ||
192
+ (record.customer != null && record.customer.id === customerId) ||
193
+ (transactionDetailLocalData.vendor != null &&
194
+ transactionDetailLocalData.vendor.id === vendorId) ||
129
195
  (record.vendor != null && record.vendor.id === vendorId)) {
130
196
  // if the vendor is same, then set the account and class with the selected ones and add the transaction to the selected list
131
197
  if (selectedAccount != null &&
@@ -174,7 +240,7 @@ const toSetAllLineItemsToCategoryClass = (draft, transaction, transactionId, tra
174
240
  }
175
241
  });
176
242
  }
177
- const newLocalData = Object.assign(Object.assign({}, transactionsViewState_1.initialSupportedTransactionCategorization.transactionReviewLocalData), { sortedLineItems: transactionDetailLocalData.sortedLineItems, memo: transactionDetailLocalData.memo, lineItemById: newLineItems, transactionDate: transactionDetailLocalData.transactionDate, transactionType: transactionDetailLocalData.transactionType, transactionTypeName: transactionDetailLocalData.transactionTypeName, vendor: transactionDetailLocalData.vendor, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails });
243
+ const newLocalData = Object.assign(Object.assign({}, transactionsViewState_1.initialSupportedTransactionCategorization.transactionReviewLocalData), { sortedLineItems: transactionDetailLocalData.sortedLineItems, memo: transactionDetailLocalData.memo, lineItemById: newLineItems, transactionDate: transactionDetailLocalData.transactionDate, transactionType: transactionDetailLocalData.transactionType, transactionTypeName: transactionDetailLocalData.transactionTypeName, vendor: transactionDetailLocalData.vendor, customer: transactionDetailLocalData.customer, vendorUpdates: transactionDetailLocalData.vendorUpdates, customerUpdates: transactionDetailLocalData.customerUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, customerDetails: transactionDetailLocalData.customerDetails, selectedEntity: transactionDetailLocalData.selectedEntity });
178
244
  if (!(0, exports.checkIfAllLineItemsAreCategoryClassFilled)(transaction, newLocalData, uncategorizedAccounts)) {
179
245
  selectedCheckBoxTransactionIds = selectedCheckBoxTransactionIds.filter((id) => id !== transaction.id);
180
246
  }
@@ -238,7 +304,7 @@ const setEntityRecommendationForLineIdInLocalData = (draft, transaction, transac
238
304
  const newLineItem = newLineItems[matchingEntityLineId];
239
305
  newLineItems[matchingEntityLineId] = Object.assign(Object.assign({}, newLineItem), { class: matchingRecord.class, account: matchingRecord.account, lineEntity: matchingRecord.lineEntity });
240
306
  }
241
- const newLocalData = Object.assign(Object.assign({}, transactionsViewState_1.initialSupportedTransactionCategorization.transactionReviewLocalData), { sortedLineItems: transactionDetailLocalData.sortedLineItems, memo: transactionDetailLocalData.memo, lineItemById: newLineItems, transactionDate: transactionDetailLocalData.transactionDate, transactionType: transactionDetailLocalData.transactionType, transactionTypeName: transactionDetailLocalData.transactionTypeName, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, vendor: transactionDetailLocalData.vendor });
307
+ const newLocalData = Object.assign(Object.assign({}, transactionsViewState_1.initialSupportedTransactionCategorization.transactionReviewLocalData), { sortedLineItems: transactionDetailLocalData.sortedLineItems, memo: transactionDetailLocalData.memo, lineItemById: newLineItems, transactionDate: transactionDetailLocalData.transactionDate, transactionType: transactionDetailLocalData.transactionType, transactionTypeName: transactionDetailLocalData.transactionTypeName, vendorUpdates: transactionDetailLocalData.vendorUpdates, customerUpdates: transactionDetailLocalData.customerUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, customerDetails: transactionDetailLocalData.customerDetails, vendor: transactionDetailLocalData.vendor, customer: transactionDetailLocalData.customer, selectedEntity: transactionDetailLocalData.selectedEntity });
242
308
  if (!(0, exports.checkIfAllLineItemsAreCategoryClassFilled)(transaction, newLocalData, uncategorizedAccounts)) {
243
309
  selectedCheckBoxTransactionIds = selectedCheckBoxTransactionIds.filter((id) => id !== transaction.id);
244
310
  }
@@ -250,7 +316,7 @@ const checkIfAllLineItemsAreCategoryClassFilled = (transaction, transactionDetai
250
316
  const lineItems = Object.values(transactionDetailLocalData.lineItemById);
251
317
  const isVendorTransactionAvailable = (0, vendorTransaction_1.isVendorTransaction)(transaction);
252
318
  return lineItems.every((lineItem) => {
253
- var _a, _b, _c, _d, _e;
319
+ var _a, _b, _c;
254
320
  return lineItem.account != null &&
255
321
  Boolean(lineItem.account.qboId) === true &&
256
322
  lineItem.class != null &&
@@ -260,10 +326,20 @@ const checkIfAllLineItemsAreCategoryClassFilled = (transaction, transactionDetai
260
326
  (_b = uncategorizedAccounts.expense) === null || _b === void 0 ? void 0 : _b.qboId,
261
327
  (_c = uncategorizedAccounts.income) === null || _c === void 0 ? void 0 : _c.qboId,
262
328
  ].includes(lineItem.account.qboId)) &&
263
- (isVendorTransactionAvailable
264
- ? ((_d = transactionDetailLocalData.vendor) === null || _d === void 0 ? void 0 : _d.id) != null &&
329
+ ((isVendorTransactionAvailable
330
+ ? transactionDetailLocalData.vendor != null &&
331
+ transactionDetailLocalData.vendor.id != null &&
265
332
  Boolean(transactionDetailLocalData.vendor.id) === true
266
- : ((_e = lineItem.vendor) === null || _e === void 0 ? void 0 : _e.id) != null && Boolean(lineItem.vendor.id) === true);
333
+ : lineItem.vendor != null &&
334
+ lineItem.vendor.id != null &&
335
+ Boolean(lineItem.vendor.id) === true) ||
336
+ (isVendorTransactionAvailable
337
+ ? transactionDetailLocalData.customer != null &&
338
+ transactionDetailLocalData.customer.id != null &&
339
+ Boolean(transactionDetailLocalData.customer.id) === true
340
+ : lineItem.customer != null &&
341
+ lineItem.customer.id != null &&
342
+ Boolean(lineItem.customer.id) === true));
267
343
  });
268
344
  };
269
345
  exports.checkIfAllLineItemsAreCategoryClassFilled = checkIfAllLineItemsAreCategoryClassFilled;
@@ -0,0 +1,28 @@
1
+ import { MonthYearPeriod } from '../../../commonStateTypes/timePeriod';
2
+ import { AccountPayload } from '../../../entity/account/accountPayload';
3
+ import { ReconciliationDataPayload, TransactionsToReviewPayload } from '../../../entity/accountRecon/accountReconPayload';
4
+ import { AccountReconciliationEntity } from '../../../entity/accountRecon/accountReconSelector';
5
+ import { MatchedTransactionPayload } from '../../../entity/transaction/payloadTypes/reconciliationTransactionPayloads';
6
+ import { UserPayload } from '../../../entity/user/userPayload';
7
+ import { RootState } from '../../../reducer';
8
+ import { ZeniAPIResponse } from '../../../responsePayload';
9
+ import { BalancesLocalData, SaveReconcileDetailActionPayload } from '../types/reconciliationViewState';
10
+ export interface AccountAndPaymentAccountPayload extends AccountPayload {
11
+ payment_account_id: string | null;
12
+ }
13
+ export interface ReconciliationPayload {
14
+ accounts: AccountAndPaymentAccountPayload[];
15
+ reconciliation: ReconciliationDataPayload[];
16
+ users: UserPayload[];
17
+ }
18
+ export type ReconciliationResponse = ZeniAPIResponse<ReconciliationPayload>;
19
+ export interface SaveReconciliationReviewPayload {
20
+ reconciliation: MatchedTransactionPayload;
21
+ }
22
+ export type SaveReconciliationReviewResponse = ZeniAPIResponse<SaveReconciliationReviewPayload>;
23
+ export declare function createSaveReconciliationPayloadBasedOnActionAndMethod(state: RootState, selectedPeriod: MonthYearPeriod, localData: BalancesLocalData, accountReconciliationEntity: AccountReconciliationEntity, action: SaveReconcileDetailActionPayload, method: 'PUT' | 'POST'): {
24
+ transactions: {
25
+ reconcile: MatchedTransactionPayload[];
26
+ review: TransactionsToReviewPayload[];
27
+ };
28
+ };
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createSaveReconciliationPayloadBasedOnActionAndMethod = createSaveReconciliationPayloadBasedOnActionAndMethod;
4
+ const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
5
+ const accountReconPayload_1 = require("../../../entity/accountRecon/accountReconPayload");
6
+ const reconciliationTransactionPayloads_1 = require("../../../entity/transaction/payloadTypes/reconciliationTransactionPayloads");
7
+ function createSaveReconciliationPayloadBasedOnActionAndMethod(state, selectedPeriod, localData, accountReconciliationEntity, action, method) {
8
+ var _a;
9
+ const { balance, initialClearedBalance } = accountReconciliationEntity;
10
+ const { expenseAutomationReconciliationViewState: { selectedAccountId, reconTabsState: { reconcile: { localData: { selectedTransactionIds }, }, }, }, } = state;
11
+ const period = (0, timePeriod_1.convertToPeriod)(selectedPeriod, true);
12
+ let payload = {};
13
+ payload = Object.assign({ action: action.reconcileAction === 'save_reconcile_for_later'
14
+ ? 'save_for_later'
15
+ : action.reconcileAction, account_type: 'bank', bank_balance: (_a = balance === null || balance === void 0 ? void 0 : balance.amount) !== null && _a !== void 0 ? _a : 0, cleared_balance: localData.clearedBalance.amount, variance: localData.variance.amount, currency_code: balance === null || balance === void 0 ? void 0 : balance.currencyCode }, ((initialClearedBalance === null || initialClearedBalance === void 0 ? void 0 : initialClearedBalance.amount) != null
16
+ ? {
17
+ initial_cleared_balance: initialClearedBalance.amount,
18
+ }
19
+ : {}));
20
+ if (method === 'POST') {
21
+ payload = Object.assign(Object.assign({}, payload), { account_id: selectedAccountId, start_date: period.start, end_date: period.end });
22
+ }
23
+ if (action.reconcileAction === 'exclude') {
24
+ payload = Object.assign(Object.assign({}, payload), { exclude_transaction_ids: [action.excludeTransactionId] });
25
+ }
26
+ const reconciledTransactionsPayload = createReconcileTransactionPayload(selectedTransactionIds, accountReconciliationEntity);
27
+ const reviewTransactionsPayload = createReviewTransactionPayload(accountReconciliationEntity);
28
+ return Object.assign(Object.assign({}, payload), { transactions: {
29
+ reconcile: reconciledTransactionsPayload,
30
+ review: reviewTransactionsPayload,
31
+ } });
32
+ }
33
+ function createReconcileTransactionPayload(selectedIds, accountReconciliationEntity) {
34
+ const matchedTransactionsPayload = [];
35
+ const matchedReconcileTransactions = accountReconciliationEntity.transactionsToReconcile.map((transaction) => {
36
+ return Object.assign(Object.assign({}, transaction), { isTransactionChecked: selectedIds.includes(transaction.id) });
37
+ });
38
+ matchedReconcileTransactions.forEach((transaction) => {
39
+ const matchTransactionPayload = (0, reconciliationTransactionPayloads_1.toMatchedTransactionPayload)(transaction);
40
+ matchedTransactionsPayload.push(matchTransactionPayload);
41
+ });
42
+ return matchedTransactionsPayload;
43
+ }
44
+ function createReviewTransactionPayload(accountReconciliationEntity) {
45
+ const reviewTransactionsPayload = [];
46
+ accountReconciliationEntity.transactionsToReview.forEach((transaction) => {
47
+ const matchTransactionPayload = (0, accountReconPayload_1.toTransactionsToReviewPayload)(transaction);
48
+ reviewTransactionsPayload.push(matchTransactionPayload);
49
+ });
50
+ return reviewTransactionsPayload;
51
+ }
@@ -22,23 +22,23 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
22
22
  failedJeSchedules: JEScheduledTransactionPayload[];
23
23
  selectedPeriod: MonthYearPeriod;
24
24
  refreshViewInBackground: boolean;
25
- }, "expenseAutomationJESchedulesView/fetchJeSchedulesSuccess">, fetchRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchRecommendationForAccountSettings">, ignoreRecommendedJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue"], {
26
- jeScheduleTransactionKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
25
+ }, "expenseAutomationJESchedulesView/fetchJeSchedulesSuccess">, fetchRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/fetchRecommendationForAccountSettings">, ignoreRecommendedJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue"], {
26
+ jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
27
27
  scheduleType: "prepaid_expenses" | "fixed_assets" | "accrued_expenses" | "deferred_revenue";
28
28
  }, "expenseAutomationJESchedulesView/ignoreRecommendedJeSchedule", never, never>, ignoreRecommendedJeScheduleFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
29
29
  jeScheduleTransactionKey: JEScheduleTransactionKey;
30
30
  status: ZeniAPIStatus;
31
- }, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleFailure">, ignoreRecommendedJeScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`], {
32
- jeScheduleTransactionKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
31
+ }, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleFailure">, ignoreRecommendedJeScheduleSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`], {
32
+ jeScheduleTransactionKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
33
33
  }, "expenseAutomationJESchedulesView/ignoreRecommendedJeScheduleSuccess", never, never>, initializeAccountSettingsView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationJESchedulesView/initializeAccountSettingsView">, initializeJeScheduleLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeSchedules: JEScheduledTransactionPayload[]], {
34
- jeScheduleTransactionKeys: (`${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[];
35
- }, "expenseAutomationJESchedulesView/initializeJeScheduleLocalData", never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
36
- failedJeScheduleKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
34
+ jeScheduleTransactionKeys: (`${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[];
35
+ }, "expenseAutomationJESchedulesView/initializeJeScheduleLocalData", never, never>, removeFailedJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[failedJeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
36
+ failedJeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
37
37
  selectedPeriod: MonthYearPeriod;
38
38
  }, "expenseAutomationJESchedulesView/removeFailedJeScheduleTransactionKey", never, never>, removeJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
39
39
  scheduledJournalEntryID: ID;
40
- }, "expenseAutomationJESchedulesView/removeJeScheduleLocalDataById">, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
41
- jeScheduleKey: `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
40
+ }, "expenseAutomationJESchedulesView/removeJeScheduleLocalDataById">, removeJeScheduleTransactionKey: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`, selectedPeriod: MonthYearPeriod], {
41
+ jeScheduleKey: `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
42
42
  selectedPeriod: MonthYearPeriod;
43
43
  }, "expenseAutomationJESchedulesView/removeJeScheduleTransactionKey", never, never>, retryJeSchedule: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
44
44
  scheduledJournalEntryID: ID;
@@ -59,8 +59,8 @@ export declare const clearExpenseAutomationJESchedulesView: import("@reduxjs/too
59
59
  }, "expenseAutomationJESchedulesView/updateAccountSettingsListForAccountTypesFailure">, updateJeScheduleLocalDataById: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
60
60
  scheduledJournalEntryID: ID;
61
61
  localData: Partial<JEScheduleLocalData>;
62
- }, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[], selectedPeriod: MonthYearPeriod], {
63
- jeScheduleKeys: (`${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[];
62
+ }, "expenseAutomationJESchedulesView/updateJeScheduleLocalDataById">, updateJeScheduleTransactionKeys: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[jeScheduleKeys: (`${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[], selectedPeriod: MonthYearPeriod], {
63
+ jeScheduleKeys: (`${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`)[];
64
64
  selectedPeriod: MonthYearPeriod;
65
65
  }, "expenseAutomationJESchedulesView/updateJeScheduleTransactionKeys", never, never>, updateRecommendationForAccountSettings: import("@reduxjs/toolkit").ActionCreatorWithPayload<AccountTypeRecommendationPayload, "expenseAutomationJESchedulesView/updateRecommendationForAccountSettings">, updateRecommendationForAccountSettingsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
66
66
  status: ZeniAPIStatus;
@@ -0,0 +1,66 @@
1
+ import { Amount } from '../../../commonStateTypes/amount';
2
+ import { FetchState, ID } from '../../../commonStateTypes/common';
3
+ import { SortOrder } from '../../../commonStateTypes/selectorTypes/sortOrderTypes';
4
+ import { MonthYearPeriod } from '../../../commonStateTypes/timePeriod';
5
+ import { ZeniAPIStatus } from '../../../responsePayload';
6
+ import { ReconciliationPayload } from '../payload/reconciliationPayload';
7
+ import { ActionFetchStates, ReconReconcileSortKey, ReconReviewSortKey, ReconciliationReviewTabLocalData, ReconciliationTabsState, ReconciliationViewState, ReconciliationViewTabType, SaveReconcileDetailActionPayload, SaveReconciliationDetailFailurePayload, TransactionSummary } from '../types/reconciliationViewState';
8
+ export declare const initialReconciliationTabsState: ReconciliationTabsState;
9
+ export declare const initialActionFetchState: ActionFetchStates;
10
+ export declare const initialState: ReconciliationViewState;
11
+ export declare const fetchReconciliation: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedPeriod: MonthYearPeriod, accountId?: string | undefined, cacheOverride?: any, refreshViewInBackground?: any], {
12
+ selectedPeriod: MonthYearPeriod;
13
+ accountId: string | undefined;
14
+ cacheOverride: any;
15
+ refreshViewInBackground: any;
16
+ }, "expenseAutomationReconciliationView/fetchReconciliation", never, never>, fetchReconciliationFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
17
+ selectedPeriod: MonthYearPeriod;
18
+ error: ZeniAPIStatus;
19
+ refreshViewInBackground: boolean;
20
+ accountId?: ID;
21
+ reconciliationId?: ID;
22
+ }, "expenseAutomationReconciliationView/fetchReconciliationFailure">, fetchReconciliationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedPeriod: MonthYearPeriod, reconciliation: ReconciliationPayload, refreshViewInBackground?: any, accountId?: string | undefined, reconciliationId?: string | undefined], {
23
+ selectedPeriod: MonthYearPeriod;
24
+ reconciliation: ReconciliationPayload;
25
+ refreshViewInBackground: any;
26
+ accountId: string | undefined;
27
+ reconciliationId: string | undefined;
28
+ }, "expenseAutomationReconciliationView/fetchReconciliationSuccess", never, never>, saveReconciliationDetail: import("@reduxjs/toolkit").ActionCreatorWithPayload<SaveReconcileDetailActionPayload, "expenseAutomationReconciliationView/saveReconciliationDetail">, saveReconciliationDetailFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<SaveReconciliationDetailFailurePayload, "expenseAutomationReconciliationView/saveReconciliationDetailFailure">, updateSelectedAccountId: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
29
+ selectedAccountId?: ID;
30
+ }, "expenseAutomationReconciliationView/updateSelectedAccountId">, setConnectionInProgressForAccount: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
31
+ accountId: ID;
32
+ connectionInProgress: boolean;
33
+ }, "expenseAutomationReconciliationView/setConnectionInProgressForAccount">, updateReconcileTabLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
34
+ selectedTransactionIds: ID[];
35
+ }, "expenseAutomationReconciliationView/updateReconcileTabLocalData">, updateReconcileTabListSortState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
36
+ sortKey: ReconReconcileSortKey;
37
+ sortOrder: SortOrder;
38
+ }, "expenseAutomationReconciliationView/updateReconcileTabListSortState">, updateReconcileTabListScrollState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
39
+ scrollYOffset: number;
40
+ }, "expenseAutomationReconciliationView/updateReconcileTabListScrollState">, saveReconciliationDetailSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<SaveReconcileDetailActionPayload, "expenseAutomationReconciliationView/saveReconciliationDetailSuccess">, updateSelectedTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
41
+ selectedTab: ReconciliationViewTabType;
42
+ }, "expenseAutomationReconciliationView/updateSelectedTab">, updateBalancesLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
43
+ clearedBalance: Amount;
44
+ variance: Amount;
45
+ variancePercentage: number;
46
+ payments: TransactionSummary;
47
+ deposits: TransactionSummary;
48
+ }, "expenseAutomationReconciliationView/updateBalancesLocalData">, initialiseLocalDataForSelectedAccountId: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationReconciliationView/initialiseLocalDataForSelectedAccountId">, clearExpenseAutomationReconciliationView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"expenseAutomationReconciliationView/clearExpenseAutomationReconciliationView">, updateSelectedDrawerAccountId: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
49
+ selectedDrawerAccountId?: ID;
50
+ }, "expenseAutomationReconciliationView/updateSelectedDrawerAccountId">, updateReviewTabSortState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
51
+ sortKey: ReconReviewSortKey;
52
+ sortOrder: SortOrder;
53
+ }, "expenseAutomationReconciliationView/updateReviewTabSortState">, initializeReconciliationReviewTabLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[localData: Record<string, ReconciliationReviewTabLocalData>], {
54
+ localData: Record<string, ReconciliationReviewTabLocalData>;
55
+ }, "expenseAutomationReconciliationView/initializeReconciliationReviewTabLocalData", never, never>, updateReviewTabLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
56
+ data: ReconciliationReviewTabLocalData;
57
+ transactionId: ID;
58
+ }, "expenseAutomationReconciliationView/updateReviewTabLocalData">, saveReconciliationReview: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: string], {
59
+ transactionId: string;
60
+ }, "expenseAutomationReconciliationView/saveReconciliationReview", never, never>, updateSaveReconciliationReviewFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
61
+ transactionId: ID;
62
+ fetchState: FetchState;
63
+ error?: ZeniAPIStatus;
64
+ }, "expenseAutomationReconciliationView/updateSaveReconciliationReviewFetchStatus">;
65
+ declare const _default: import("redux").Reducer<ReconciliationViewState>;
66
+ export default _default;