@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,8 +1,8 @@
1
1
  import { Amount } from '../../../../commonStateTypes/amount';
2
2
  import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
3
3
  import { ZeniDate } from '../../../../zeniDayJS';
4
- import { BillPayConfig } from '../../billPay/billPayConfig/billPayConfigState';
5
4
  import { FundingAccount } from '../../commonSetup/setupViewSelector';
5
+ import { ZeniAccountPaymentMethod } from '../zeniAccountsConfig/zeniAccountsConfigState';
6
6
  export interface ExpressPayState extends FetchStateAndError {
7
7
  expressPayId?: ID;
8
8
  formLocalData?: ExpressPayFormLocalData;
@@ -12,7 +12,7 @@ export interface ExpressPayFormLocalData {
12
12
  vendorId?: ID;
13
13
  withdrawFrom?: FundingAccount;
14
14
  paymentToAccountId?: ID;
15
- paymentType?: BillPayConfig;
15
+ paymentType?: ZeniAccountPaymentMethod;
16
16
  amount: Amount;
17
17
  paymentDate: ZeniDate;
18
18
  receiptFileId?: ID;
@@ -1,5 +1,7 @@
1
1
  import { AddressPayload } from '../../../../entity/address/addressPayload';
2
2
  import { ZeniAPIResponse } from '../../../../responsePayload';
3
+ import { ConfigTimelinePayload, TimelineDetail } from '../../billPay/billPayConfig/billPayConfigPayload';
4
+ import { BillPaymentConfigCodeType, PaymentAchSubConfigCodeType } from '../../billPay/billPayConfig/billPayConfigState';
3
5
  import { ZeniAccountsConfig } from './zeniAccountsConfigState';
4
6
  export interface ZeniAccountsConfigPayload {
5
7
  apy: string | null;
@@ -7,7 +9,18 @@ export interface ZeniAccountsConfigPayload {
7
9
  deposit_product_config: DepositProductConfigPayload;
8
10
  mailing_address: AddressPayload;
9
11
  bank_address: AddressPayload;
12
+ payment_processor: PaymentProcessorPayload;
13
+ is_us_domestic_wire_enabled: boolean;
14
+ is_same_day_ach_enabled: boolean;
10
15
  }
16
+ export interface PaymentProcessorPayload {
17
+ payment_timeline: PaymentTimeline;
18
+ }
19
+ interface PaymentTimeline {
20
+ ach: Record<PaymentAchSubConfigCodeType, ConfigTimelineForAccTypePayload>;
21
+ wire: Record<'us-domestic', ConfigTimelineForAccTypePayload>;
22
+ }
23
+ export type ConfigTimelineForAccTypePayload = Record<'deposit_account', ConfigTimelinePayload>;
11
24
  export declare const mapZeniAccountsConfigPayloadToZeniAccountsConfigState: (payload: ZeniAccountsConfigPayload) => ZeniAccountsConfig;
12
25
  interface DepositProductConfigPayload {
13
26
  deposit_products: DepositProductsPayload[];
@@ -17,4 +30,5 @@ interface DepositProductsPayload {
17
30
  range: (number | null)[];
18
31
  }
19
32
  export type FetchZeniAccountsConfigResponse = ZeniAPIResponse<ZeniAccountsConfigPayload>;
33
+ export declare const getTimelineDetail: (paymentTimeline: PaymentTimeline, code: BillPaymentConfigCodeType, subCode: "standard" | "same-day" | "us-domestic") => TimelineDetail;
20
34
  export {};
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mapZeniAccountsConfigPayloadToZeniAccountsConfigState = void 0;
3
+ exports.getTimelineDetail = exports.mapZeniAccountsConfigPayloadToZeniAccountsConfigState = void 0;
4
+ const billPayConfigPayload_1 = require("../../billPay/billPayConfig/billPayConfigPayload");
5
+ const billPayConfigState_1 = require("../../billPay/billPayConfig/billPayConfigState");
4
6
  const mapZeniAccountsConfigPayloadToZeniAccountsConfigState = (payload) => ({
5
7
  annualPercentageYield: payload.apy != null ? payload.apy : '',
6
8
  bankName: payload.bank_name,
7
9
  mailingAddressId: payload.mailing_address.address_id,
8
10
  bankAddressId: payload.bank_address.address_id,
9
11
  depositProductConfig: mapDepositProductConfigPayloadToDepositProductConfig(payload.deposit_product_config),
12
+ paymentMethods: mapZeniAccountConfigPayloadToPaymentMethods(payload.payment_processor, payload.is_same_day_ach_enabled, payload.is_us_domestic_wire_enabled),
10
13
  });
11
14
  exports.mapZeniAccountsConfigPayloadToZeniAccountsConfigState = mapZeniAccountsConfigPayloadToZeniAccountsConfigState;
12
15
  const mapDepositProductConfigPayloadToDepositProductConfig = (payload) => {
@@ -20,3 +23,77 @@ const mapDepositProductConfigPayloadToDepositProductConfig = (payload) => {
20
23
  depositProducts: array,
21
24
  };
22
25
  };
26
+ const mapZeniAccountConfigPayloadToPaymentMethods = (paymentProcessor, isSameDayAchEnabled, isDomesticWireEnabled) => {
27
+ const paymentMethods = [];
28
+ billPayConfigState_1.BILL_PAYMENT_METHOD_CODE.forEach((code) => {
29
+ switch (code) {
30
+ case 'ach': {
31
+ billPayConfigState_1.PAYMENT_ACH_SUB_CODES.forEach((subCode) => {
32
+ billPayConfigState_1.ACCOUNT_TYPE_CODES.forEach((accType) => {
33
+ paymentMethods.push(mapBillPayConfigPayloadToBillPayConfig(paymentProcessor, subCode === 'standard' ? true : isSameDayAchEnabled, true, code, subCode, accType));
34
+ });
35
+ });
36
+ break;
37
+ }
38
+ case 'wire': {
39
+ billPayConfigState_1.BILL_PAYMENT_WIRE_SUB_CODES.forEach((subCode) => {
40
+ if (subCode === 'us-domestic') {
41
+ billPayConfigState_1.ACCOUNT_TYPE_CODES.forEach((accType) => {
42
+ paymentMethods.push(mapBillPayConfigPayloadToBillPayConfig(paymentProcessor, isDomesticWireEnabled, true, code, subCode, accType));
43
+ });
44
+ }
45
+ });
46
+ break;
47
+ }
48
+ }
49
+ });
50
+ return paymentMethods;
51
+ };
52
+ const mapBillPayConfigPayloadToBillPayConfig = (paymentProcessor, isEnabled, isVerified, code, subCode, accType) => {
53
+ const { payment_timeline } = paymentProcessor;
54
+ const { minPeriod, maxPeriod } = (0, exports.getTimelineDetail)(payment_timeline, code, subCode);
55
+ return {
56
+ minPeriod: minPeriod,
57
+ maxPeriod: maxPeriod,
58
+ method: (0, billPayConfigState_1.getBillPayConfigMethodKey)(code, (0, billPayConfigState_1.toBillPaymentSubConfigCodeKeyType)((0, billPayConfigPayload_1.getBillPaymentSubConfigCodeKey)(subCode)), accType != null ? (0, billPayConfigPayload_1.getAccountTypeSubConfigCodeKey)(accType) : undefined),
59
+ isEnabled,
60
+ isVerified,
61
+ };
62
+ };
63
+ const getTimelineDetail = (paymentTimeline, code, subCode) => {
64
+ const accType = 'deposit_account';
65
+ let minPeriod = {
66
+ value: 0,
67
+ units: 'days',
68
+ };
69
+ let maxPeriod = {
70
+ value: 0,
71
+ units: 'days',
72
+ };
73
+ if (code === 'ach') {
74
+ minPeriod = {
75
+ value: paymentTimeline[code][(0, billPayConfigState_1.toPaymentAchSubMethodCodeType)(subCode)][accType]
76
+ .min.value,
77
+ units: paymentTimeline[code][(0, billPayConfigState_1.toPaymentAchSubMethodCodeType)(subCode)][accType]
78
+ .min.units,
79
+ };
80
+ maxPeriod = {
81
+ value: paymentTimeline[code][(0, billPayConfigState_1.toPaymentAchSubMethodCodeType)(subCode)][accType]
82
+ .max.value,
83
+ units: paymentTimeline[code][(0, billPayConfigState_1.toPaymentAchSubMethodCodeType)(subCode)][accType]
84
+ .max.units,
85
+ };
86
+ }
87
+ else if (code === 'wire') {
88
+ minPeriod = {
89
+ value: paymentTimeline[code]['us-domestic'][accType].min.value,
90
+ units: paymentTimeline[code]['us-domestic'][accType].min.units,
91
+ };
92
+ maxPeriod = {
93
+ value: paymentTimeline[code]['us-domestic'][accType].max.value,
94
+ units: paymentTimeline[code]['us-domestic'][accType].max.units,
95
+ };
96
+ }
97
+ return { minPeriod, maxPeriod };
98
+ };
99
+ exports.getTimelineDetail = getTimelineDetail;
@@ -13,6 +13,7 @@ exports.initialState = {
13
13
  depositProductConfig: {
14
14
  depositProducts: [{ annualPercentageYield: 0, range: [] }],
15
15
  },
16
+ paymentMethods: [],
16
17
  },
17
18
  hasValidState() {
18
19
  return this.fetchState == 'Completed';
@@ -29,13 +30,14 @@ const zeniAccountsConfig = (0, toolkit_1.createSlice)({
29
30
  draft.error = undefined;
30
31
  },
31
32
  updateZeniAccountsConfigSuccess(draft, action) {
32
- const { bankName, mailingAddressId, bankAddressId, depositProductConfig, annualPercentageYield, } = (0, zeniAccountsConfigPayload_1.mapZeniAccountsConfigPayloadToZeniAccountsConfigState)(action.payload);
33
+ const { bankName, mailingAddressId, bankAddressId, depositProductConfig, annualPercentageYield, paymentMethods, } = (0, zeniAccountsConfigPayload_1.mapZeniAccountsConfigPayloadToZeniAccountsConfigState)(action.payload);
33
34
  draft.zeniAccountsConfig = {
34
35
  annualPercentageYield,
35
36
  bankName,
36
37
  mailingAddressId,
37
38
  bankAddressId,
38
39
  depositProductConfig,
40
+ paymentMethods,
39
41
  };
40
42
  draft.fetchState = 'Completed';
41
43
  draft.error = undefined;
@@ -1,7 +1,7 @@
1
1
  import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
2
2
  import { Address } from '../../../../entity/address/addressState';
3
3
  import { RootState } from '../../../../reducer';
4
- import { DepositProductConfig } from './zeniAccountsConfigState';
4
+ import { DepositProductConfig, ZeniAccountPaymentMethod } from './zeniAccountsConfigState';
5
5
  export interface ZeniAccountsConfigSelectorView extends SelectorView {
6
6
  zeniAccountsConfigDetail: {
7
7
  annualPercentageYield: string;
@@ -9,6 +9,7 @@ export interface ZeniAccountsConfigSelectorView extends SelectorView {
9
9
  depositProductConfig: DepositProductConfig;
10
10
  mailingAddress?: Address;
11
11
  bankAddress?: Address;
12
+ paymentMethods: ZeniAccountPaymentMethod[];
12
13
  };
13
14
  }
14
15
  export declare const getZeniAccountsConfigDetail: (state: RootState) => ZeniAccountsConfigSelectorView;
@@ -4,7 +4,7 @@ exports.getZeniAccountsConfigDetail = void 0;
4
4
  const addressSelector_1 = require("../../../../entity/address/addressSelector");
5
5
  const getZeniAccountsConfigDetail = (state) => {
6
6
  const { zeniAccountsConfigState, addressState } = state;
7
- const { bankName, depositProductConfig, bankAddressId, mailingAddressId, annualPercentageYield, } = zeniAccountsConfigState.zeniAccountsConfig;
7
+ const { bankName, depositProductConfig, bankAddressId, mailingAddressId, annualPercentageYield, paymentMethods, } = zeniAccountsConfigState.zeniAccountsConfig;
8
8
  const mailingAddress = (0, addressSelector_1.getAddressByAddressId)(addressState, mailingAddressId);
9
9
  const bankAddress = (0, addressSelector_1.getAddressByAddressId)(addressState, bankAddressId);
10
10
  return {
@@ -14,6 +14,7 @@ const getZeniAccountsConfigDetail = (state) => {
14
14
  depositProductConfig: depositProductConfig,
15
15
  mailingAddress,
16
16
  bankAddress,
17
+ paymentMethods,
17
18
  },
18
19
  fetchState: zeniAccountsConfigState.fetchState,
19
20
  error: zeniAccountsConfigState.error,
@@ -1,4 +1,5 @@
1
1
  import { FetchedState, ID } from '../../../../commonStateTypes/common';
2
+ import { ConfigPeriod } from '../../billPay/billPayConfig/billPayConfigState';
2
3
  export interface ZeniAccountsConfigState extends FetchedState {
3
4
  zeniAccountsConfig: ZeniAccountsConfig;
4
5
  }
@@ -8,6 +9,14 @@ export interface ZeniAccountsConfig {
8
9
  mailingAddressId: ID;
9
10
  bankAddressId: ID;
10
11
  depositProductConfig: DepositProductConfig;
12
+ paymentMethods: ZeniAccountPaymentMethod[];
13
+ }
14
+ export interface ZeniAccountPaymentMethod {
15
+ minPeriod: ConfigPeriod;
16
+ maxPeriod: ConfigPeriod;
17
+ method: string;
18
+ isEnabled: boolean;
19
+ isVerified: boolean;
11
20
  }
12
21
  export interface DepositProductConfig {
13
22
  depositProducts: DepositProduct[];
@@ -191,7 +191,6 @@ const subscriptionView = (0, toolkit_1.createSlice)({
191
191
  },
192
192
  },
193
193
  fetchSubscriptionList: {
194
- // eslint-disable-next-line @typescript-eslint/no-inferrable-types
195
194
  prepare(fetchFullResponse = false) {
196
195
  return { payload: { fetchFullResponse } };
197
196
  },
@@ -15,7 +15,6 @@ const ALL_SUBSCRIPTION_SORT_KEYS = [
15
15
  'monthlyRecurringRevenue',
16
16
  'notes',
17
17
  ];
18
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
19
18
  const toSubscriptionSortKeyType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_SUBSCRIPTION_SORT_KEYS);
20
19
  exports.toSubscriptionSortKeyType = toSubscriptionSortKeyType;
21
20
  exports.SUBSCRIPTION_STATUS_CODES = [
@@ -5,9 +5,7 @@ const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const taskListReducer_1 = require("../taskListReducer");
7
7
  const taskListViewHelpers_1 = require("../taskListViewHelpers");
8
- const dragNDropTasksEpic = (actions$,
9
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
- state$) => actions$.pipe((0, operators_1.filter)(taskListReducer_1.dragNDropTasks.match), (0, operators_1.mergeMap)((action) => {
8
+ const dragNDropTasksEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(taskListReducer_1.dragNDropTasks.match), (0, operators_1.mergeMap)((action) => {
11
9
  const { taskIds, groupId } = action.payload;
12
10
  const state = state$.value;
13
11
  const { groupByKey } = state.taskListState.uiState;
@@ -37,15 +37,15 @@ export interface TaskFilterCategory {
37
37
  }
38
38
  export type TaskListFilterCategoryField = 'status' | 'dueDate' | 'assignee' | 'creationDate' | 'priority' | 'tag';
39
39
  export declare const TASK_LIST_GROUP_BY_KEYS: readonly ["groupName", "status", "dueDate", "assignee", "priority", "tag"];
40
- export declare const toTaskListGroupByKeyType: (v: string) => "priority" | "status" | "dueDate" | "groupName" | "tag" | "assignee";
41
- export declare const toTaskListGroupByKeyTypeStrict: (v: string) => "priority" | "status" | "dueDate" | "groupName" | "tag" | "assignee" | undefined;
40
+ export declare const toTaskListGroupByKeyType: (v: string) => "status" | "dueDate" | "groupName" | "tag" | "priority" | "assignee";
41
+ export declare const toTaskListGroupByKeyTypeStrict: (v: string) => "status" | "dueDate" | "groupName" | "tag" | "priority" | "assignee" | undefined;
42
42
  export declare type TaskGroupKey = ReturnType<typeof toTaskListGroupByKeyType>;
43
43
  export interface TaskListUIState extends SpendManagementUIState {
44
44
  sortKey: TaskListViewSortKey;
45
45
  searchText: string;
46
46
  groupByKey: TaskGroupKey;
47
47
  }
48
- declare const toTaskListSortKeyType: (v: string) => "name" | "priority" | "status" | "dueDate" | "tag" | "timeSpent" | "assignee" | "creationDate";
48
+ declare const toTaskListSortKeyType: (v: string) => "status" | "name" | "dueDate" | "tag" | "priority" | "timeSpent" | "assignee" | "creationDate";
49
49
  export declare type TaskListViewSortKey = ReturnType<typeof toTaskListSortKeyType>;
50
50
  export declare const TASK_LIST_FILTER_CATEGORIES: TaskListFilterCategoryOption[];
51
51
  interface TaskListFilterCategoryOption {
@@ -54,7 +54,7 @@ export declare const getTaskListGroupedByPriority: ({ taskListState, taskState,
54
54
  tagState: TagState;
55
55
  }) => {
56
56
  groupName: string;
57
- id: "normal" | "high" | "low" | "medium" | "urgent";
57
+ id: "urgent" | "high" | "normal" | "medium" | "low";
58
58
  isDefault: boolean;
59
59
  tasks: TaskWithUserDetails[];
60
60
  }[];
@@ -9,8 +9,7 @@ const fetchTasksCardEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators
9
9
  .getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/reports/task_card`)
10
10
  .pipe((0, operators_1.mergeMap)((response) => {
11
11
  if ((0, responsePayload_1.isSuccessResponse)(response)) {
12
- return (0, rxjs_1.of)((0, tasksCardReducer_1.updateTasksCard)(response.data) // eslint-disable-line @typescript-eslint/no-non-null-assertion
13
- );
12
+ return (0, rxjs_1.of)((0, tasksCardReducer_1.updateTasksCard)(response.data));
14
13
  }
15
14
  else {
16
15
  return (0, rxjs_1.of)((0, tasksCardReducer_1.updateTasksCardFailure)(response.status));
@@ -1,11 +1,11 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getTasksCardReport: (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: "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" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  status: import("../..").Status | undefined;
7
7
  fetchState: import("../..").FetchState;
8
- firstMonthOfFY: 2 | 1 | 3 | 4 | 8 | 5 | 6 | 10 | 7 | 12 | 11 | 9;
8
+ firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
9
9
  tasks: {
10
10
  isUncategorizedIncomeTransactionsExist: boolean;
11
11
  numOfBillsPendingApproval: number;
@@ -4,7 +4,7 @@ exports.getTasksCardReport = void 0;
4
4
  const toolkit_1 = require("@reduxjs/toolkit");
5
5
  const getTasksCardReportSelector = (0, toolkit_1.createSelector)((state) => state.tasksCardState, (tasksCardState) => {
6
6
  const { tasks, fetchState } = tasksCardState;
7
- let showCard = false || fetchState !== 'Completed';
7
+ let showCard = fetchState !== 'Completed';
8
8
  let isMulti = false;
9
9
  if (fetchState === 'Completed') {
10
10
  for (const key in tasks) {
@@ -4,7 +4,7 @@ import { RootState } from '../../reducer';
4
4
  import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
5
5
  import { TopExState } from './topExState';
6
6
  export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number) => {
7
- 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";
7
+ reportId: "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" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
8
8
  reportTitle: string;
9
9
  version: string | number | undefined;
10
10
  status: import("../..").Status | undefined;
@@ -24,13 +24,13 @@ export declare const getTopExpenses: (accountState: AccountState, topExState: To
24
24
  accountType: "cash_position" | "fixed_assets" | "bank" | "credit_card" | "expenses" | "cogs" | "income" | "cash_in" | "cash_out" | "other_income" | "other_expense" | "accounts_receivable" | "other_current_assets" | "other_assets" | "accounts_payable" | "other_current_liabilities" | "long_term_liabilities" | "equity" | "current_liabilities" | "current_assets" | undefined;
25
25
  accountSubType: string | undefined;
26
26
  accountDescription: string;
27
- logo: import("url-parse")<string> | import("url-parse")<Record<string, string | undefined>> | undefined;
27
+ logo: import("url-parse")<Record<string, string | undefined>> | import("url-parse")<string> | undefined;
28
28
  balance: import("../..").Balance;
29
29
  }[];
30
30
  };
31
31
  allTimePeriods: TopExTimePeriodWithMetaData[];
32
32
  dataAvailable: import("../..").TimeframeTick | undefined;
33
- firstMonthOfFY: 2 | 1 | 3 | 4 | 8 | 5 | 6 | 10 | 7 | 12 | 11 | 9;
33
+ firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
34
34
  downloadState: import("../..").FetchState;
35
35
  };
36
36
  export declare const getTop6Expenses: (state: RootState) => TopExReport;
@@ -2,8 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isAccountUncategorized = exports.isTransactionUncategorized = exports.isTransactionMiscategorized = exports.toRecommendedClassBase = exports.toRecommendedAccountBase = exports.toTransactionUpdatesFromTransactionDetailLocalData = void 0;
4
4
  const recommendationBase_1 = require("../../../commonStateTypes/recommendationBase");
5
- const entity_1 = require("../../../entity/genericEntity/entity");
6
- const customerTransaction_1 = require("../../../entity/transaction/stateTypes/customerTransaction");
7
5
  const transactionType_1 = require("../../../entity/transaction/stateTypes/transactionType");
8
6
  const vendorTransaction_1 = require("../../../entity/transaction/stateTypes/vendorTransaction");
9
7
  const recommendationState_1 = require("../../recommendation/recommendationState");
@@ -25,7 +23,7 @@ const recommendationState_1 = require("../../recommendation/recommendationState"
25
23
  * additionally fire “Mark as not miscat” for every point above.
26
24
  */
27
25
  const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLocalData, transaction, isExpenseAutomationEnabled) => {
28
- var _a, _b, _c;
26
+ var _a, _b;
29
27
  const updates = {
30
28
  updatesByLineId: {},
31
29
  };
@@ -33,21 +31,28 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
33
31
  const entityUpdates = {};
34
32
  const isTransactionMisCategorized = (0, exports.isTransactionMiscategorized)(transaction, isExpenseAutomationEnabled);
35
33
  updates.memo = transactionDetailLocalData.memo;
34
+ const selectedEntity = transactionDetailLocalData.selectedEntity;
36
35
  const updatedEntityId = transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor ===
37
36
  true
38
37
  ? (_a = transactionDetailLocalData.vendorUpdates) === null || _a === void 0 ? void 0 : _a.qboId
39
38
  : undefined;
40
- if ((0, vendorTransaction_1.isVendorTransaction)(transaction)) {
41
- updates.vendorId = (_b = transactionDetailLocalData.vendorUpdates) === null || _b === void 0 ? void 0 : _b.id;
39
+ if ((0, vendorTransaction_1.isVendorTransaction)(transaction) &&
40
+ selectedEntity != null &&
41
+ selectedEntity.type === 'vendor') {
42
+ updates.vendorId = selectedEntity.id;
43
+ }
44
+ if ((0, vendorTransaction_1.isVendorTransaction)(transaction) &&
45
+ selectedEntity != null &&
46
+ selectedEntity.type === 'customer') {
47
+ updates.customerId = selectedEntity.id;
42
48
  }
43
49
  let isBulkUpdate = false;
44
- const entity = getEntityFromTransaction(transaction);
45
50
  let lastUpdatedCategory;
46
51
  let lastUpdatedClass;
47
52
  // single recommendation to just pick the last recommendation in the list of lines
48
- (_c = transaction.lines) === null || _c === void 0 ? void 0 : _c.forEach((line) => {
53
+ (_b = transaction.lines) === null || _b === void 0 ? void 0 : _b.forEach((line) => {
49
54
  var _a, _b, _c, _d, _e, _f;
50
- const entityDetails = getEntityDetails(entity, transactionDetailLocalData.lineItemById[line.id], transactionDetailLocalData.vendorUpdates);
55
+ const entityDetails = getEntityDetails(selectedEntity, transactionDetailLocalData.lineItemById[line.id], transactionDetailLocalData.vendorUpdates, transactionDetailLocalData.customerUpdates);
51
56
  if (line.type === 'transaction_with_account_and_class_line' ||
52
57
  line.type === 'transaction_with_product_or_service_line' ||
53
58
  line.type === 'journal_entry_transaction_line') {
@@ -60,7 +65,14 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
60
65
  };
61
66
  if (line.type === 'journal_entry_transaction_line' ||
62
67
  line.platformLineDetailType === 'deposit_line_detail') {
63
- updatesByLineId[line.id] = Object.assign(Object.assign({}, updatesByLineId[line.id]), getVendorOrCustomerDetails(lineItem));
68
+ const currentSelectedEntityLine = lineItem.lineEntity;
69
+ updatesByLineId[line.id] = Object.assign(Object.assign({}, updatesByLineId[line.id]), { customer: currentSelectedEntityLine != null &&
70
+ currentSelectedEntityLine.type === 'customer'
71
+ ? lineItem.customer
72
+ : undefined, vendor: currentSelectedEntityLine != null &&
73
+ currentSelectedEntityLine.type === 'vendor'
74
+ ? lineItem.vendor
75
+ : undefined });
64
76
  }
65
77
  let hasCategoryChanged = false;
66
78
  let hasClassChanged = false;
@@ -187,49 +199,7 @@ const toRecommendedClassBase = (amountValue, classBase, recommendationBase) => {
187
199
  }
188
200
  };
189
201
  exports.toRecommendedClassBase = toRecommendedClassBase;
190
- const getVendorOrCustomerDetails = (lineItem) => {
191
- var _a;
192
- if (lineItem.lineEntity != null) {
193
- const lineEntity = lineItem.lineEntity;
194
- const type = lineItem.vendor != null ? 'vendor' : 'customer';
195
- return {
196
- [type]: {
197
- name: lineEntity === null || lineEntity === void 0 ? void 0 : lineEntity.name,
198
- id: (_a = lineEntity === null || lineEntity === void 0 ? void 0 : lineEntity.qboId) !== null && _a !== void 0 ? _a : lineEntity === null || lineEntity === void 0 ? void 0 : lineEntity.id, // For vendor we don't have qbo_id in VendorBase so using id instead
199
- },
200
- };
201
- }
202
- return {};
203
- };
204
- const getEntityFromTransaction = (transaction) => {
205
- let entity = undefined;
206
- if ((0, vendorTransaction_1.isVendorTransaction)(transaction)) {
207
- const vendorEntity = transaction.vendor;
208
- if (vendorEntity != null) {
209
- entity = {
210
- id: vendorEntity.id,
211
- name: vendorEntity.name,
212
- type: (0, entity_1.toEntityType)('vendor'),
213
- qboId: vendorEntity.id,
214
- zeniId: vendorEntity.id,
215
- };
216
- }
217
- }
218
- if ((0, customerTransaction_1.isCustomerTransaction)(transaction)) {
219
- const customerEntity = transaction.customer;
220
- if (customerEntity != null) {
221
- entity = {
222
- id: customerEntity.id,
223
- name: customerEntity.name,
224
- type: (0, entity_1.toEntityType)('customer'),
225
- qboId: customerEntity.id,
226
- zeniId: customerEntity.id,
227
- };
228
- }
229
- }
230
- return entity;
231
- };
232
- const getEntityDetails = (entity, lineItemLocalData, vendorUpdates) => {
202
+ const getEntityDetails = (entity, lineItemLocalData, vendorUpdates, customerUpdates) => {
233
203
  var _a, _b, _c, _d;
234
204
  if (entity != null) {
235
205
  return {
@@ -243,6 +213,14 @@ const getEntityDetails = (entity, lineItemLocalData, vendorUpdates) => {
243
213
  entityType: lineItemLocalData.vendor != null ? 'vendor' : 'customer',
244
214
  };
245
215
  }
216
+ if (customerUpdates != null &&
217
+ Boolean(customerUpdates.id) === true &&
218
+ customerUpdates.id != null) {
219
+ return {
220
+ entityId: customerUpdates.id,
221
+ entityType: 'customer',
222
+ };
223
+ }
246
224
  if (vendorUpdates != null && vendorUpdates.id != null) {
247
225
  return {
248
226
  entityId: vendorUpdates.id,
@@ -126,8 +126,12 @@ function preparePayload(transactionState, vendorState, transactionDetailState, t
126
126
  const detail = (0, transactionSelector_1.getSupportedTransactionById)(transactionState, transactionDetailKey);
127
127
  const tranDetail = (0, get_1.default)(transactionDetailState.transactionDetailById, transactionDetailKey, undefined);
128
128
  const tranVendorUpdates = tranDetail === null || tranDetail === void 0 ? void 0 : tranDetail.transactionDetailLocalData.vendorUpdates;
129
+ const tranCustomerUpdates = tranDetail === null || tranDetail === void 0 ? void 0 : tranDetail.transactionDetailLocalData.customerUpdates;
130
+ const currentSelectedEntity = tranDetail === null || tranDetail === void 0 ? void 0 : tranDetail.transactionDetailLocalData.selectedEntity;
129
131
  let vendorUpdates = undefined;
130
- if ((tranVendorUpdates === null || tranVendorUpdates === void 0 ? void 0 : tranVendorUpdates.qboId) != null) {
132
+ if ((tranVendorUpdates === null || tranVendorUpdates === void 0 ? void 0 : tranVendorUpdates.qboId) != null &&
133
+ currentSelectedEntity != null &&
134
+ currentSelectedEntity.type === 'vendor') {
131
135
  const vendor = (0, vendorSelector_1.getVendorByVendorId)(vendorState, tranVendorUpdates.qboId);
132
136
  if (vendor != null) {
133
137
  vendorUpdates = {
@@ -142,8 +146,17 @@ function preparePayload(transactionState, vendorState, transactionDetailState, t
142
146
  };
143
147
  }
144
148
  }
149
+ let customerUpdates = undefined;
150
+ if ((tranCustomerUpdates === null || tranCustomerUpdates === void 0 ? void 0 : tranCustomerUpdates.qboId) != null &&
151
+ currentSelectedEntity != null &&
152
+ currentSelectedEntity.type === 'customer') {
153
+ customerUpdates = {
154
+ id: tranCustomerUpdates.qboId,
155
+ name: tranCustomerUpdates.name,
156
+ };
157
+ }
145
158
  if (detail != null) {
146
- const transUpdates = toTransactionUpdatePayload(saveUpdates.updates, detail, vendorUpdates);
159
+ const transUpdates = toTransactionUpdatePayload(saveUpdates.updates, detail, vendorUpdates, customerUpdates, currentSelectedEntity);
147
160
  const entityUpdates = toEntityUpdatePayload(saveUpdates.entityRelatedUpdates);
148
161
  return {
149
162
  entity_related_updates: entityUpdates,
@@ -153,7 +166,7 @@ function preparePayload(transactionState, vendorState, transactionDetailState, t
153
166
  }
154
167
  return undefined;
155
168
  }
156
- const toTransactionUpdatePayload = (updates, detail, vendorUpdates) => {
169
+ const toTransactionUpdatePayload = (updates, detail, vendorUpdates, customerUpdates, tranSelectedEntity) => {
157
170
  var _a, _b;
158
171
  const transaction = Object.assign({}, detail);
159
172
  transaction.memo = (_a = updates.memo) !== null && _a !== void 0 ? _a : '';
@@ -197,7 +210,12 @@ const toTransactionUpdatePayload = (updates, detail, vendorUpdates) => {
197
210
  return (0, customerTransactionPayload_1.toCustomerTransactionPayload)(transaction);
198
211
  }
199
212
  else if ((0, vendorTransaction_1.isVendorTransaction)(transaction)) {
200
- return (0, vendorTransactionPayload_1.toVendorTransactionPayload)(transaction, vendorUpdates);
213
+ if (tranSelectedEntity != null && tranSelectedEntity.type === 'customer') {
214
+ return (0, vendorTransactionPayload_1.toVendorTransactionWithCustomerPayload)(transaction, customerUpdates);
215
+ }
216
+ else {
217
+ return (0, vendorTransactionPayload_1.toVendorTransactionPayload)(transaction, vendorUpdates);
218
+ }
201
219
  }
202
220
  else if ((0, otherTransaction_1.isTransferTransaction)(transaction)) {
203
221
  return (0, otherTransactionPayload_1.toTransferTransactionPayload)(transaction);