@zeniai/client-epic-state 4.20.3-betaSS12 → 4.20.3-betaSS14

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 (431) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +19 -0
  2. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +2 -0
  3. package/lib/commonPayloadTypes/subAccountView/reportBySubAccountPayload.d.ts +2 -0
  4. package/lib/commonStateTypes/animations.d.ts +1 -1
  5. package/lib/commonStateTypes/animations.js +4 -0
  6. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.d.ts +13 -0
  7. package/lib/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +9 -0
  8. package/lib/commonStateTypes/common.d.ts +1 -1
  9. package/lib/commonStateTypes/projectView/projectViewParentID.d.ts +5 -0
  10. package/lib/commonStateTypes/projectView/projectViewParentID.js +2 -0
  11. package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
  12. package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
  13. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  14. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  15. package/lib/entity/account/accountPayload.d.ts +2 -0
  16. package/lib/entity/account/accountReducer.d.ts +5 -2
  17. package/lib/entity/account/accountReducer.js +13 -5
  18. package/lib/entity/account/accountSelector.d.ts +7 -0
  19. package/lib/entity/account/accountSelector.js +4 -2
  20. package/lib/entity/account/accountState.d.ts +3 -1
  21. package/lib/entity/account/accountState.js +4 -1
  22. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -0
  23. package/lib/entity/account/subAccountSelector.d.ts +2 -0
  24. package/lib/entity/account/subAccountSelector.js +2 -0
  25. package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -0
  26. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  27. package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -1
  28. package/lib/entity/accountRecon/accountReconPayload.js +4 -2
  29. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.d.ts +52 -0
  30. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +70 -0
  31. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.d.ts +10 -0
  32. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +51 -0
  33. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.d.ts +48 -0
  34. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +66 -0
  35. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.d.ts +52 -0
  36. package/lib/entity/aiAccountantCustomer/aiAccountantCustomerState.js +37 -0
  37. package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -2
  38. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +4 -4
  39. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  40. package/lib/entity/class/classReducer.d.ts +4 -4
  41. package/lib/entity/class/classState.d.ts +1 -1
  42. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  43. package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
  44. package/lib/entity/forecast/forecastState.d.ts +1 -1
  45. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +38 -0
  46. package/lib/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  47. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -1
  48. package/lib/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  49. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +37 -0
  50. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  51. package/lib/entity/project/projectPayload.d.ts +13 -0
  52. package/lib/entity/project/projectPayload.js +30 -0
  53. package/lib/entity/project/projectReducer.d.ts +10 -0
  54. package/lib/entity/project/projectReducer.js +31 -0
  55. package/lib/entity/project/projectSelector.d.ts +5 -0
  56. package/lib/entity/project/projectSelector.js +12 -0
  57. package/lib/entity/project/projectState.d.ts +13 -0
  58. package/lib/entity/project/projectState.js +2 -0
  59. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  60. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  61. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  62. package/lib/entity/sectionProjectView/sectionProjectView.d.ts +13 -0
  63. package/lib/entity/sectionProjectView/sectionProjectView.js +6 -0
  64. package/lib/entity/sectionProjectView/sectionProjectViewEpic.d.ts +6 -0
  65. package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +56 -0
  66. package/lib/entity/sectionProjectView/sectionProjectViewHelper.d.ts +11 -0
  67. package/lib/entity/sectionProjectView/sectionProjectViewHelper.js +15 -0
  68. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +15 -0
  69. package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +64 -0
  70. package/lib/entity/sectionProjectView/sectionProjectViewSelector.d.ts +11 -0
  71. package/lib/entity/sectionProjectView/sectionProjectViewSelector.js +57 -0
  72. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.d.ts +16 -0
  73. package/lib/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +2 -0
  74. package/lib/entity/sectionProjectView/sectionProjectViewState.d.ts +4 -0
  75. package/lib/entity/sectionProjectView/sectionProjectViewState.js +2 -0
  76. package/lib/entity/snackbar/snackbarTypes.d.ts +2 -2
  77. package/lib/entity/snackbar/snackbarTypes.js +10 -0
  78. package/lib/entity/tenant/clearAllEpic.d.ts +8 -2
  79. package/lib/entity/tenant/clearAllEpic.js +12 -0
  80. package/lib/entity/tenant/tenantPayload.d.ts +2 -0
  81. package/lib/entity/tenant/tenantReducer.d.ts +5 -2
  82. package/lib/entity/tenant/tenantReducer.js +10 -2
  83. package/lib/entity/tenant/tenantSelector.d.ts +2 -0
  84. package/lib/entity/tenant/tenantSelector.js +17 -1
  85. package/lib/entity/tenant/tenantState.d.ts +2 -0
  86. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.d.ts +4 -1
  87. package/lib/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  88. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +11 -0
  89. package/lib/entity/transaction/payloadTypes/transactionPayload.js +114 -1
  90. package/lib/entity/transaction/stateTypes/scheduleTransaction.d.ts +1 -0
  91. package/lib/entity/transaction/stateTypes/transaction.d.ts +11 -0
  92. package/lib/entity/transaction/stateTypes/transactionLine.d.ts +1 -1
  93. package/lib/entity/userRole/userRoleType.d.ts +2 -2
  94. package/lib/epic.d.ts +22 -2
  95. package/lib/epic.js +22 -2
  96. package/lib/esm/common/aiCfo/aiCfoSuggestedQuestionsPageContext.js +1 -0
  97. package/lib/esm/commonStateTypes/animations.js +4 -0
  98. package/lib/esm/commonStateTypes/coaBalance/coaBalancesFilterProjectView.js +5 -0
  99. package/lib/esm/commonStateTypes/projectView/projectViewParentID.js +1 -0
  100. package/lib/esm/commonStateTypes/viewAndReport/reportIDHelper.js +1 -0
  101. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  102. package/lib/esm/entity/account/accountReducer.js +12 -4
  103. package/lib/esm/entity/account/accountSelector.js +4 -2
  104. package/lib/esm/entity/account/accountState.js +4 -1
  105. package/lib/esm/entity/account/subAccountSelector.js +2 -0
  106. package/lib/esm/entity/accountRecon/accountReconPayload.js +4 -2
  107. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerPayload.js +64 -0
  108. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerReducer.js +47 -0
  109. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerSelector.js +62 -0
  110. package/lib/esm/entity/aiAccountantCustomer/aiAccountantCustomerState.js +31 -0
  111. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +78 -0
  112. package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +5 -1
  113. package/lib/esm/entity/project/projectPayload.js +26 -0
  114. package/lib/esm/entity/project/projectReducer.js +27 -0
  115. package/lib/esm/entity/project/projectSelector.js +8 -0
  116. package/lib/esm/entity/project/projectState.js +1 -0
  117. package/lib/esm/entity/sectionProjectView/sectionProjectView.js +3 -0
  118. package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +52 -0
  119. package/lib/esm/entity/sectionProjectView/sectionProjectViewHelper.js +11 -0
  120. package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +60 -0
  121. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelector.js +50 -0
  122. package/lib/esm/entity/sectionProjectView/sectionProjectViewSelectorTypes.js +1 -0
  123. package/lib/esm/entity/sectionProjectView/sectionProjectViewState.js +1 -0
  124. package/lib/esm/entity/snackbar/snackbarTypes.js +10 -0
  125. package/lib/esm/entity/tenant/clearAllEpic.js +12 -0
  126. package/lib/esm/entity/tenant/tenantReducer.js +9 -1
  127. package/lib/esm/entity/tenant/tenantSelector.js +14 -0
  128. package/lib/esm/entity/transaction/payloadTypes/scheduleTransactionPayload.js +1 -0
  129. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +114 -1
  130. package/lib/esm/epic.js +22 -2
  131. package/lib/esm/index.js +32 -19
  132. package/lib/esm/reducer.js +20 -2
  133. package/lib/esm/view/aiAccountantView/aiAccountantViewPayload.js +2 -0
  134. package/lib/esm/view/aiAccountantView/aiAccountantViewReducer.js +152 -0
  135. package/lib/esm/view/aiAccountantView/aiAccountantViewSelector.js +77 -0
  136. package/lib/esm/view/aiAccountantView/aiAccountantViewState.js +11 -0
  137. package/lib/esm/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +46 -0
  138. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +27 -0
  139. package/lib/esm/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +47 -0
  140. package/lib/esm/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +76 -0
  141. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +82 -1
  142. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +8 -2
  143. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +29 -0
  144. package/lib/esm/view/classList/fetchClassListEpic.js +9 -2
  145. package/lib/esm/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  146. package/lib/esm/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  147. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +19 -1
  148. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  149. package/lib/esm/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +17 -0
  150. package/lib/esm/view/companyView/companyViewReducer.js +26 -1
  151. package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +61 -0
  152. package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  153. package/lib/esm/view/creditAgentView/creditAgentViewReducer.js +74 -76
  154. package/lib/esm/view/creditAgentView/creditAgentViewSelector.js +0 -1
  155. package/lib/esm/view/creditAgentView/creditAgentViewState.js +1 -28
  156. package/lib/esm/view/creditAgentView/epics/downloadCreditReportEpic.js +20 -17
  157. package/lib/esm/view/creditAgentView/epics/fetchCardProfilesEpic.js +5 -5
  158. package/lib/esm/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +8 -8
  159. package/lib/esm/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +7 -7
  160. package/lib/esm/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +8 -3
  161. package/lib/esm/view/creditAgentView/epics/updateCardProfileEpic.js +5 -11
  162. package/lib/esm/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +63 -0
  163. package/lib/esm/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  164. package/lib/esm/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +65 -0
  165. package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  166. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +33 -0
  167. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +3 -3
  168. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +6 -4
  169. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
  170. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +12 -0
  171. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +98 -0
  172. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  173. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +21 -5
  174. package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  175. package/lib/esm/view/expenseAutomationView/helpers/bulkUploadTiming.js +16 -0
  176. package/lib/esm/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +13 -0
  177. package/lib/esm/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  178. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  179. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +9 -0
  180. package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +21 -1
  181. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +29 -6
  182. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +167 -3
  183. package/lib/esm/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +1 -2
  184. package/lib/esm/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  185. package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  186. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  187. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  188. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +15 -5
  189. package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +24 -1
  190. package/lib/esm/view/financeStatement/financeStatementSelector.js +12 -1
  191. package/lib/esm/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  192. package/lib/esm/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +47 -0
  193. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +30 -0
  194. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +1 -0
  195. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +113 -0
  196. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +65 -0
  197. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +1 -0
  198. package/lib/esm/view/profitAndLossProjectView/profitAndLossProjectViewState.js +1 -0
  199. package/lib/esm/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  200. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +26 -0
  201. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +199 -0
  202. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +52 -0
  203. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesState.js +1 -0
  204. package/lib/esm/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +100 -0
  205. package/lib/esm/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +48 -0
  206. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +36 -0
  207. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +45 -0
  208. package/lib/esm/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +50 -0
  209. package/lib/esm/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +69 -0
  210. package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
  211. package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  212. package/lib/esm/view/spendManagement/billPay/billList/billListState.js +1 -0
  213. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  214. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  215. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  216. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  217. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  218. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  219. package/lib/esm/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +7 -4
  220. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  221. package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  222. package/lib/esm/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  223. package/lib/esm/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  224. package/lib/esm/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.js +10 -3
  225. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  226. package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  227. package/lib/esm/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  228. package/lib/esm/view/transactionDetail/transactionDetailSelector.js +9 -2
  229. package/lib/esm/view/twoFactorAuthentication/resendOtpEpic.js +16 -2
  230. package/lib/index.d.ts +51 -28
  231. package/lib/index.js +117 -49
  232. package/lib/reducer.d.ts +20 -2
  233. package/lib/reducer.js +20 -2
  234. package/lib/view/aiAccountantView/aiAccountantViewPayload.d.ts +33 -0
  235. package/lib/view/aiAccountantView/aiAccountantViewPayload.js +8 -0
  236. package/lib/view/aiAccountantView/aiAccountantViewReducer.d.ts +29 -0
  237. package/lib/view/aiAccountantView/aiAccountantViewReducer.js +156 -0
  238. package/lib/view/aiAccountantView/aiAccountantViewSelector.d.ts +16 -0
  239. package/lib/view/aiAccountantView/aiAccountantViewSelector.js +83 -0
  240. package/lib/view/aiAccountantView/aiAccountantViewState.d.ts +26 -0
  241. package/lib/view/aiAccountantView/aiAccountantViewState.js +13 -0
  242. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.d.ts +33 -0
  243. package/lib/view/aiAccountantView/epics/cancelAiAccountantOnboardingEpic.js +50 -0
  244. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.d.ts +23 -0
  245. package/lib/view/aiAccountantView/epics/fetchAiAccountantCustomersEpic.js +31 -0
  246. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.d.ts +33 -0
  247. package/lib/view/aiAccountantView/epics/fetchAiAccountantJobsEpic.js +51 -0
  248. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.d.ts +28 -0
  249. package/lib/view/aiAccountantView/epics/triggerAiAccountantJobEpic.js +80 -0
  250. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +7 -0
  251. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +15 -1
  252. package/lib/view/aiCfoView/aiCfoViewReducer.js +83 -2
  253. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +4 -1
  254. package/lib/view/aiCfoView/aiCfoViewSelector.js +9 -2
  255. package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -1
  256. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -0
  257. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +33 -0
  258. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  259. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  260. package/lib/view/cardBalance/cardBalanceSelector.d.ts +2 -1
  261. package/lib/view/cashBalance/cashBalanceSelector.d.ts +2 -1
  262. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  263. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  264. package/lib/view/classList/fetchClassListEpic.d.ts +1 -1
  265. package/lib/view/classList/fetchClassListEpic.js +8 -1
  266. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -0
  267. package/lib/view/commonVendorView/vendorView/vendorViewSelector.js +18 -5
  268. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.d.ts +1 -0
  269. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewSelector.js +6 -2
  270. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
  271. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +20 -2
  272. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +4 -1
  273. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +3 -1
  274. package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +9 -1
  275. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.d.ts +7 -0
  276. package/lib/view/companyTaskManagerView/epics/fetchTaskManagerMetricsEpic.js +21 -0
  277. package/lib/view/companyView/companyViewReducer.d.ts +6 -1
  278. package/lib/view/companyView/companyViewReducer.js +28 -2
  279. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.d.ts +10 -0
  280. package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +65 -0
  281. package/lib/view/companyView/types/cockpitTypes.d.ts +6 -5
  282. package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
  283. package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
  284. package/lib/view/creditAgentView/creditAgentViewPayload.d.ts +0 -36
  285. package/lib/view/creditAgentView/creditAgentViewReducer.d.ts +20 -9
  286. package/lib/view/creditAgentView/creditAgentViewReducer.js +77 -79
  287. package/lib/view/creditAgentView/creditAgentViewSelector.d.ts +0 -1
  288. package/lib/view/creditAgentView/creditAgentViewSelector.js +1 -2
  289. package/lib/view/creditAgentView/creditAgentViewState.d.ts +5 -46
  290. package/lib/view/creditAgentView/creditAgentViewState.js +0 -29
  291. package/lib/view/creditAgentView/epics/downloadCreditReportEpic.d.ts +20 -5
  292. package/lib/view/creditAgentView/epics/downloadCreditReportEpic.js +21 -16
  293. package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.d.ts +4 -4
  294. package/lib/view/creditAgentView/epics/fetchCardProfilesEpic.js +4 -4
  295. package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.d.ts +6 -6
  296. package/lib/view/creditAgentView/epics/fetchCreditAgentAccessEpic.js +5 -5
  297. package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.d.ts +5 -5
  298. package/lib/view/creditAgentView/epics/fetchCreditAgentMacroEpic.js +5 -5
  299. package/lib/view/creditAgentView/epics/saveCreditAgentMacroEpic.js +8 -3
  300. package/lib/view/creditAgentView/epics/updateCardProfileEpic.d.ts +5 -5
  301. package/lib/view/creditAgentView/epics/updateCardProfileEpic.js +4 -10
  302. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  303. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.d.ts +9 -0
  304. package/lib/view/expenseAutomationView/epics/accountRecon/excludeAccountFromReconciliationEpic.js +67 -0
  305. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +4 -9
  306. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.d.ts +10 -0
  307. package/lib/view/expenseAutomationView/epics/accountRecon/includeAccountInReconciliationEpic.js +69 -0
  308. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +2 -2
  309. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.d.ts +13 -0
  310. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic.js +37 -0
  311. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +2 -2
  312. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +5 -3
  313. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +20 -5
  314. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.d.ts +10 -0
  315. package/lib/view/expenseAutomationView/epics/missingReceipts/refetchCompletedTransactionsOnBulkUploadSortEpic.js +16 -0
  316. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.d.ts +18 -0
  317. package/lib/view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic.js +102 -0
  318. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +7 -13
  319. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +2 -2
  320. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +20 -4
  321. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +0 -1
  322. package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.d.ts +16 -0
  323. package/lib/view/expenseAutomationView/helpers/bulkUploadTiming.js +19 -0
  324. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.d.ts +7 -0
  325. package/lib/view/expenseAutomationView/helpers/rollingCalendarDateRangeInclusive.js +16 -0
  326. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +2 -2
  327. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +2 -2
  328. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  329. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -1
  330. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +5 -0
  331. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +10 -0
  332. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +45 -0
  333. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +2 -2
  334. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +22 -2
  335. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +18 -2
  336. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +30 -7
  337. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +18 -4
  338. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +168 -4
  339. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +2 -0
  340. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +2 -0
  341. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +7 -2
  342. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +2 -2
  343. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +10 -2
  344. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +63 -6
  345. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +14 -4
  346. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +136 -9
  347. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -3
  348. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +8 -0
  349. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +27 -0
  350. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +5 -1
  351. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +14 -0
  352. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  353. package/lib/view/financeStatement/financeStatementSelector.d.ts +2 -0
  354. package/lib/view/financeStatement/financeStatementSelector.js +12 -1
  355. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  356. package/lib/view/profitAndLossClassesView/profitAndLossClassesByClassHorizontalSelector.js +3 -0
  357. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.d.ts +9 -0
  358. package/lib/view/profitAndLossProjectView/profitAndLossForTimeframeProjectViewEpic.js +51 -0
  359. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.d.ts +6 -0
  360. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewEpic.js +34 -0
  361. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +33 -0
  362. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.js +2 -0
  363. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.d.ts +33 -0
  364. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewReducer.js +117 -0
  365. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.d.ts +9 -0
  366. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelector.js +69 -0
  367. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.d.ts +19 -0
  368. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewSelectorTypes.js +2 -0
  369. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.d.ts +22 -0
  370. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewState.js +2 -0
  371. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  372. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.d.ts +2 -1
  373. package/lib/view/reportsResync/reportsClassViewRefetchingEpic.js +4 -0
  374. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  375. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  376. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  377. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.d.ts +75 -0
  378. package/lib/view/spendManagement/autotransferRules/autoTransferRulesPayload.js +30 -0
  379. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.d.ts +50 -0
  380. package/lib/view/spendManagement/autotransferRules/autoTransferRulesReducer.js +206 -0
  381. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +24 -0
  382. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +61 -0
  383. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +38 -0
  384. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.js +2 -0
  385. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.d.ts +12 -0
  386. package/lib/view/spendManagement/autotransferRules/epics/createAutoTransferRuleEpic.js +106 -0
  387. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.d.ts +8 -0
  388. package/lib/view/spendManagement/autotransferRules/epics/deleteAutoTransferRuleEpic.js +52 -0
  389. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.d.ts +7 -0
  390. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferReviewDetailEpic.js +40 -0
  391. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.d.ts +7 -0
  392. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRuleHistory.js +52 -0
  393. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.d.ts +10 -0
  394. package/lib/view/spendManagement/autotransferRules/epics/fetchAutoTransferRulesEpic.js +54 -0
  395. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.d.ts +8 -0
  396. package/lib/view/spendManagement/autotransferRules/epics/updateAutoTransferRuleEpic.js +73 -0
  397. package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic.js +5 -5
  398. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  399. package/lib/view/spendManagement/billPay/billList/billListSelector.js +10 -0
  400. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +2 -2
  401. package/lib/view/spendManagement/billPay/billList/billListState.js +1 -0
  402. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +7 -3
  403. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +5 -5
  404. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPayApproversDetailsEpic.js +7 -2
  405. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +13 -6
  406. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -4
  407. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  408. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -0
  409. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +2 -0
  410. package/lib/view/spendManagement/reimbursement/editRemiView/editRemiViewSelector.js +6 -3
  411. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
  412. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +1 -0
  413. package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +12 -0
  414. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +4 -4
  415. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +1 -0
  416. package/lib/view/spendManagement/treasury/treasuryList/epics/fetchTreasuryDetailEpic.js +2 -2
  417. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.d.ts +2 -1
  418. package/lib/view/spendManagement/treasury/treasuryList/treasuryDetailReducer.js +2 -1
  419. package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.d.ts +9 -1
  420. package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.js +10 -3
  421. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  422. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +2 -2
  423. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  424. package/lib/view/topEx/topExSelector.d.ts +1 -1
  425. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +2 -2
  426. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +16 -14
  427. package/lib/view/transactionDetail/transactionDetailSelector.d.ts +1 -0
  428. package/lib/view/transactionDetail/transactionDetailSelector.js +9 -2
  429. package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +1 -1
  430. package/lib/view/twoFactorAuthentication/resendOtpEpic.js +15 -1
  431. package/package.json +1 -1
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.updateMetaDataOnSendMonthEndReport = exports.updateCompanyMetaDataOnFailure = exports.updateCompanyMetaDataOnSuccess = exports.fetchCompanyMetaData = exports.updateCompanyDownloadState = exports.updateParentSubsidiaryViewOnFailure = exports.updateParentSubsidiaryView = exports.fetchParentSubsidiaryManagementView = exports.saveCompanyPassportDetails = exports.saveIndustryAndIncDateInCompanyPassportLocalStore = exports.updateCompanyPassportLocalStoreData = exports.companyPassportCreateCompanyOfficersFailure = exports.companyPassportCreateCompanyOfficersSuccess = exports.companyPassportCreateCompanyOfficers = exports.companyPassportUpdateCompanyOfficerFailure = exports.companyPassportUpdateCompanyOfficerSuccess = exports.companyPassportUpdateCompanyOfficer = exports.companyPassportUpdatePrimaryContactFailure = exports.companyPassportUpdatePrimaryContactSuccess = exports.companyPassportUpdatePrimaryContact = exports.companyPassportUpdateCompanyDetailsFailure = exports.companyPassportUpdateCompanyDetailsSuccess = exports.companyPassportUpdateCompanyDetails = exports.companyPassportClearDataInLocalStore = exports.deleteCompanyOfficerInLocalStore = exports.companyPassportSaveDataInLocalStore = exports.updateCompanyManagementUIState = exports.updateCompanyPortfolioUIState = exports.clearCompanyView = exports.updateZeniUsersOnFailure = exports.updateZeniUsersOnSuccess = exports.fetchZeniUsers = exports.fetchCompanyPortfolioView = exports.updateCompanyViewOnFailure = exports.updateCompanyViewOnSuccess = exports.companyManagementSaveUpdatesFailure = exports.companyManagementSaveUpdatesSuccess = exports.companyManagementDiscardUpdates = exports.companyManagementSavePendingUpdates = exports.companyManagementSaveUpdates = exports.fetchCompanyManagementView = exports.fetchPortfolioView = exports.fetchSubscriptionView = exports.fetchManagementView = exports.fetchOnboardingView = exports.fetchAllCockpitViews = exports.fetchCompanyPassportView = exports.initialState = void 0;
4
+ exports.updateCompanyMetaDataOnFailure = exports.updateCompanyMetaDataOnSuccess = exports.fetchCompanyMetaData = exports.updateCompanyDownloadState = exports.updateParentSubsidiaryViewOnFailure = exports.updateParentSubsidiaryView = exports.fetchParentSubsidiaryManagementView = exports.saveCompanyPassportDetails = exports.saveIndustryAndIncDateInCompanyPassportLocalStore = exports.updateCompanyPassportLocalStoreData = exports.companyPassportCreateCompanyOfficersFailure = exports.companyPassportCreateCompanyOfficersSuccess = exports.companyPassportCreateCompanyOfficers = exports.companyPassportUpdateCompanyOfficerFailure = exports.companyPassportUpdateCompanyOfficerSuccess = exports.companyPassportUpdateCompanyOfficer = exports.companyPassportUpdatePrimaryContactFailure = exports.companyPassportUpdatePrimaryContactSuccess = exports.companyPassportUpdatePrimaryContact = exports.updateAccountingClassesEnabledFailure = exports.updateAccountingClassesEnabledSuccess = exports.updateAccountingClassesEnabled = exports.companyPassportUpdateCompanyDetailsFailure = exports.companyPassportUpdateCompanyDetailsSuccess = exports.companyPassportUpdateCompanyDetails = exports.companyPassportClearDataInLocalStore = exports.deleteCompanyOfficerInLocalStore = exports.companyPassportSaveDataInLocalStore = exports.updateCompanyManagementUIState = exports.updateCompanyPortfolioUIState = exports.clearCompanyView = exports.updateZeniUsersOnFailure = exports.updateZeniUsersOnSuccess = exports.fetchZeniUsers = exports.fetchCompanyPortfolioView = exports.updateCompanyViewOnFailure = exports.updateCompanyViewOnSuccess = exports.companyManagementSaveUpdatesFailure = exports.companyManagementSaveUpdatesSuccess = exports.companyManagementDiscardUpdates = exports.companyManagementSavePendingUpdates = exports.companyManagementSaveUpdates = exports.fetchCompanyManagementView = exports.fetchPortfolioView = exports.fetchSubscriptionView = exports.fetchManagementView = exports.fetchOnboardingView = exports.fetchAllCockpitViews = exports.fetchCompanyPassportView = exports.initialState = void 0;
5
+ exports.updateMetaDataOnSendMonthEndReport = void 0;
5
6
  const toolkit_1 = require("@reduxjs/toolkit");
6
7
  const parentSubsidiaryViewState_1 = require("./parentSubsidiaryView/parentSubsidiaryViewState");
7
8
  const companyManagementViewState_1 = require("./types/companyManagementViewState");
@@ -288,6 +289,31 @@ const companyView = (0, toolkit_1.createSlice)({
288
289
  error: status,
289
290
  };
290
291
  },
292
+ updateAccountingClassesEnabled: {
293
+ reducer(draft,
294
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
295
+ _action) {
296
+ draft.passportView.accountingClassesUpdateStatus = {
297
+ fetchState: 'In-Progress',
298
+ error: undefined,
299
+ };
300
+ },
301
+ prepare(companyId, enabled) {
302
+ return { payload: { companyId, enabled } };
303
+ },
304
+ },
305
+ updateAccountingClassesEnabledSuccess(draft) {
306
+ draft.passportView.accountingClassesUpdateStatus = {
307
+ fetchState: 'Completed',
308
+ error: undefined,
309
+ };
310
+ },
311
+ updateAccountingClassesEnabledFailure(draft, action) {
312
+ draft.passportView.accountingClassesUpdateStatus = {
313
+ fetchState: 'Error',
314
+ error: action.payload.status,
315
+ };
316
+ },
291
317
  companyPassportUpdatePrimaryContact: {
292
318
  reducer(draft, action) {
293
319
  const { primaryContact } = action.payload;
@@ -561,5 +587,5 @@ const companyView = (0, toolkit_1.createSlice)({
561
587
  },
562
588
  },
563
589
  });
564
- _a = companyView.actions, exports.fetchCompanyPassportView = _a.fetchCompanyPassportView, exports.fetchAllCockpitViews = _a.fetchAllCockpitViews, exports.fetchOnboardingView = _a.fetchOnboardingView, exports.fetchManagementView = _a.fetchManagementView, exports.fetchSubscriptionView = _a.fetchSubscriptionView, exports.fetchPortfolioView = _a.fetchPortfolioView, exports.fetchCompanyManagementView = _a.fetchCompanyManagementView, exports.companyManagementSaveUpdates = _a.companyManagementSaveUpdates, exports.companyManagementSavePendingUpdates = _a.companyManagementSavePendingUpdates, exports.companyManagementDiscardUpdates = _a.companyManagementDiscardUpdates, exports.companyManagementSaveUpdatesSuccess = _a.companyManagementSaveUpdatesSuccess, exports.companyManagementSaveUpdatesFailure = _a.companyManagementSaveUpdatesFailure, exports.updateCompanyViewOnSuccess = _a.updateCompanyViewOnSuccess, exports.updateCompanyViewOnFailure = _a.updateCompanyViewOnFailure, exports.fetchCompanyPortfolioView = _a.fetchCompanyPortfolioView, exports.fetchZeniUsers = _a.fetchZeniUsers, exports.updateZeniUsersOnSuccess = _a.updateZeniUsersOnSuccess, exports.updateZeniUsersOnFailure = _a.updateZeniUsersOnFailure, exports.clearCompanyView = _a.clearCompanyView, exports.updateCompanyPortfolioUIState = _a.updateCompanyPortfolioUIState, exports.updateCompanyManagementUIState = _a.updateCompanyManagementUIState, exports.companyPassportSaveDataInLocalStore = _a.companyPassportSaveDataInLocalStore, exports.deleteCompanyOfficerInLocalStore = _a.deleteCompanyOfficerInLocalStore, exports.companyPassportClearDataInLocalStore = _a.companyPassportClearDataInLocalStore, exports.companyPassportUpdateCompanyDetails = _a.companyPassportUpdateCompanyDetails, exports.companyPassportUpdateCompanyDetailsSuccess = _a.companyPassportUpdateCompanyDetailsSuccess, exports.companyPassportUpdateCompanyDetailsFailure = _a.companyPassportUpdateCompanyDetailsFailure, exports.companyPassportUpdatePrimaryContact = _a.companyPassportUpdatePrimaryContact, exports.companyPassportUpdatePrimaryContactSuccess = _a.companyPassportUpdatePrimaryContactSuccess, exports.companyPassportUpdatePrimaryContactFailure = _a.companyPassportUpdatePrimaryContactFailure, exports.companyPassportUpdateCompanyOfficer = _a.companyPassportUpdateCompanyOfficer, exports.companyPassportUpdateCompanyOfficerSuccess = _a.companyPassportUpdateCompanyOfficerSuccess, exports.companyPassportUpdateCompanyOfficerFailure = _a.companyPassportUpdateCompanyOfficerFailure, exports.companyPassportCreateCompanyOfficers = _a.companyPassportCreateCompanyOfficers, exports.companyPassportCreateCompanyOfficersSuccess = _a.companyPassportCreateCompanyOfficersSuccess, exports.companyPassportCreateCompanyOfficersFailure = _a.companyPassportCreateCompanyOfficersFailure, exports.updateCompanyPassportLocalStoreData = _a.updateCompanyPassportLocalStoreData, exports.saveIndustryAndIncDateInCompanyPassportLocalStore = _a.saveIndustryAndIncDateInCompanyPassportLocalStore, exports.saveCompanyPassportDetails = _a.saveCompanyPassportDetails, exports.fetchParentSubsidiaryManagementView = _a.fetchParentSubsidiaryManagementView, exports.updateParentSubsidiaryView = _a.updateParentSubsidiaryView, exports.updateParentSubsidiaryViewOnFailure = _a.updateParentSubsidiaryViewOnFailure, exports.updateCompanyDownloadState = _a.updateCompanyDownloadState, exports.fetchCompanyMetaData = _a.fetchCompanyMetaData, exports.updateCompanyMetaDataOnSuccess = _a.updateCompanyMetaDataOnSuccess, exports.updateCompanyMetaDataOnFailure = _a.updateCompanyMetaDataOnFailure, exports.updateMetaDataOnSendMonthEndReport = _a.updateMetaDataOnSendMonthEndReport;
590
+ _a = companyView.actions, exports.fetchCompanyPassportView = _a.fetchCompanyPassportView, exports.fetchAllCockpitViews = _a.fetchAllCockpitViews, exports.fetchOnboardingView = _a.fetchOnboardingView, exports.fetchManagementView = _a.fetchManagementView, exports.fetchSubscriptionView = _a.fetchSubscriptionView, exports.fetchPortfolioView = _a.fetchPortfolioView, exports.fetchCompanyManagementView = _a.fetchCompanyManagementView, exports.companyManagementSaveUpdates = _a.companyManagementSaveUpdates, exports.companyManagementSavePendingUpdates = _a.companyManagementSavePendingUpdates, exports.companyManagementDiscardUpdates = _a.companyManagementDiscardUpdates, exports.companyManagementSaveUpdatesSuccess = _a.companyManagementSaveUpdatesSuccess, exports.companyManagementSaveUpdatesFailure = _a.companyManagementSaveUpdatesFailure, exports.updateCompanyViewOnSuccess = _a.updateCompanyViewOnSuccess, exports.updateCompanyViewOnFailure = _a.updateCompanyViewOnFailure, exports.fetchCompanyPortfolioView = _a.fetchCompanyPortfolioView, exports.fetchZeniUsers = _a.fetchZeniUsers, exports.updateZeniUsersOnSuccess = _a.updateZeniUsersOnSuccess, exports.updateZeniUsersOnFailure = _a.updateZeniUsersOnFailure, exports.clearCompanyView = _a.clearCompanyView, exports.updateCompanyPortfolioUIState = _a.updateCompanyPortfolioUIState, exports.updateCompanyManagementUIState = _a.updateCompanyManagementUIState, exports.companyPassportSaveDataInLocalStore = _a.companyPassportSaveDataInLocalStore, exports.deleteCompanyOfficerInLocalStore = _a.deleteCompanyOfficerInLocalStore, exports.companyPassportClearDataInLocalStore = _a.companyPassportClearDataInLocalStore, exports.companyPassportUpdateCompanyDetails = _a.companyPassportUpdateCompanyDetails, exports.companyPassportUpdateCompanyDetailsSuccess = _a.companyPassportUpdateCompanyDetailsSuccess, exports.companyPassportUpdateCompanyDetailsFailure = _a.companyPassportUpdateCompanyDetailsFailure, exports.updateAccountingClassesEnabled = _a.updateAccountingClassesEnabled, exports.updateAccountingClassesEnabledSuccess = _a.updateAccountingClassesEnabledSuccess, exports.updateAccountingClassesEnabledFailure = _a.updateAccountingClassesEnabledFailure, exports.companyPassportUpdatePrimaryContact = _a.companyPassportUpdatePrimaryContact, exports.companyPassportUpdatePrimaryContactSuccess = _a.companyPassportUpdatePrimaryContactSuccess, exports.companyPassportUpdatePrimaryContactFailure = _a.companyPassportUpdatePrimaryContactFailure, exports.companyPassportUpdateCompanyOfficer = _a.companyPassportUpdateCompanyOfficer, exports.companyPassportUpdateCompanyOfficerSuccess = _a.companyPassportUpdateCompanyOfficerSuccess, exports.companyPassportUpdateCompanyOfficerFailure = _a.companyPassportUpdateCompanyOfficerFailure, exports.companyPassportCreateCompanyOfficers = _a.companyPassportCreateCompanyOfficers, exports.companyPassportCreateCompanyOfficersSuccess = _a.companyPassportCreateCompanyOfficersSuccess, exports.companyPassportCreateCompanyOfficersFailure = _a.companyPassportCreateCompanyOfficersFailure, exports.updateCompanyPassportLocalStoreData = _a.updateCompanyPassportLocalStoreData, exports.saveIndustryAndIncDateInCompanyPassportLocalStore = _a.saveIndustryAndIncDateInCompanyPassportLocalStore, exports.saveCompanyPassportDetails = _a.saveCompanyPassportDetails, exports.fetchParentSubsidiaryManagementView = _a.fetchParentSubsidiaryManagementView, exports.updateParentSubsidiaryView = _a.updateParentSubsidiaryView, exports.updateParentSubsidiaryViewOnFailure = _a.updateParentSubsidiaryViewOnFailure, exports.updateCompanyDownloadState = _a.updateCompanyDownloadState, exports.fetchCompanyMetaData = _a.fetchCompanyMetaData, exports.updateCompanyMetaDataOnSuccess = _a.updateCompanyMetaDataOnSuccess, exports.updateCompanyMetaDataOnFailure = _a.updateCompanyMetaDataOnFailure, exports.updateMetaDataOnSendMonthEndReport = _a.updateMetaDataOnSendMonthEndReport;
565
591
  exports.default = companyView.reducer;
@@ -0,0 +1,10 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { updateCompanies } from '../../../../entity/company/companyReducer';
4
+ import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
5
+ import { updateTenantAccountingClassesEnabled } from '../../../../entity/tenant/tenantReducer';
6
+ import { RootState } from '../../../../reducer';
7
+ import { ZeniAPI } from '../../../../zeniAPI';
8
+ import { updateAccountingClassesEnabled, updateAccountingClassesEnabledFailure, updateAccountingClassesEnabledSuccess } from '../../companyViewReducer';
9
+ export type ActionType = ReturnType<typeof updateCompanies> | ReturnType<typeof updateTenantAccountingClassesEnabled> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateAccountingClassesEnabled> | ReturnType<typeof updateAccountingClassesEnabledSuccess> | ReturnType<typeof updateAccountingClassesEnabledFailure>;
10
+ export declare const updateAccountingClassesEnabledEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateAccountingClassesEnabledEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const companyReducer_1 = require("../../../../entity/company/companyReducer");
7
+ const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
8
+ const tenantReducer_1 = require("../../../../entity/tenant/tenantReducer");
9
+ const responsePayload_1 = require("../../../../responsePayload");
10
+ const companyViewReducer_1 = require("../../companyViewReducer");
11
+ const updateAccountingClassesEnabledEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(companyViewReducer_1.updateAccountingClassesEnabled.match), (0, operators_1.switchMap)((action) => {
12
+ const { companyId, enabled } = action.payload;
13
+ const tenantId = Object.values(state$.value.tenantState.tenantsById).find((t) => t.companyId === companyId)?.tenantId;
14
+ return zeniAPI
15
+ .putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, { is_accounting_classes_enabled: enabled })
16
+ .pipe((0, operators_1.mergeMap)((response) => {
17
+ const companies = response.data?.companies ?? [];
18
+ if ((0, responsePayload_1.isSuccessResponse)(response) && companies.length > 0) {
19
+ const actions = [
20
+ (0, companyReducer_1.updateCompanies)({
21
+ payload: companies,
22
+ schema: {},
23
+ }),
24
+ ];
25
+ if (tenantId != null) {
26
+ actions.push((0, tenantReducer_1.updateTenantAccountingClassesEnabled)({
27
+ enabled,
28
+ tenantId,
29
+ }));
30
+ }
31
+ actions.push((0, companyViewReducer_1.updateAccountingClassesEnabledSuccess)());
32
+ actions.push((0, snackbarReducer_1.openSnackbar)({
33
+ messageSection: 'accounting_classes_enabled_update',
34
+ messageText: 'success',
35
+ type: 'success',
36
+ }));
37
+ return (0, rxjs_1.from)(actions);
38
+ }
39
+ else {
40
+ return (0, rxjs_1.from)([
41
+ (0, companyViewReducer_1.updateAccountingClassesEnabledFailure)({
42
+ status: response.status,
43
+ }),
44
+ (0, snackbarReducer_1.openSnackbar)({
45
+ messageSection: 'accounting_classes_enabled_update',
46
+ messageText: 'failed',
47
+ type: 'error',
48
+ }),
49
+ ]);
50
+ }
51
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.from)([
52
+ (0, companyViewReducer_1.updateAccountingClassesEnabledFailure)({
53
+ status: (0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update Accounting Classes Enabled errored out' +
54
+ (error instanceof Error
55
+ ? error.message
56
+ : JSON.stringify(error))),
57
+ }),
58
+ (0, snackbarReducer_1.openSnackbar)({
59
+ messageSection: 'accounting_classes_enabled_update',
60
+ messageText: 'failed',
61
+ type: 'error',
62
+ }),
63
+ ])));
64
+ }));
65
+ exports.updateAccountingClassesEnabledEpic = updateAccountingClassesEnabledEpic;
@@ -3,16 +3,17 @@ import { ZeniDate } from '../../../zeniDayJS';
3
3
  import { SubscriptionViewSortKey } from '../../subscriptionView/types/subscriptionTypes';
4
4
  import { FilterCategoryValueType } from '../helpers/cockpitHelpers';
5
5
  import { CockpitDownloadTabsID, CockpitTabsFileType } from './cockpitTabsID';
6
- export declare const toPortfolioSortKeyType: (v: string) => "expenses" | "runway" | "companyName" | "cashBalance" | "revenues" | "netIncome";
7
- export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "group" | "taxStatus" | "controller" | "preparer" | "reviewer" | "annualRecurringRevenue" | "companyName" | "monthlyRecurringRevenue" | "task" | "notes" | "plans" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
8
- export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "businessVerified" | "identityVerified" | "bankAccountLinked" | "customerCreated" | "groupCreated" | "qboLinked" | "notes" | "enroller" | "invite" | "latestCreated";
9
- export declare const toHealthSortKeyType: (v: string) => "group" | "runway" | "controller" | "companyName" | "monthlyRecurringRevenue" | "companyEngagementMetricsUpdatedAt" | "customerSatisfactionScore" | "externalProductServiceExposure" | "netPromoterScore" | "customerSuccessManager" | "lastReportSent" | "issues" | "productVerticals" | "churnProbability" | "subscriptionDate" | "renewalDate" | "dashboardLastSeen" | "lastEngagement";
6
+ export declare const toPortfolioSortKeyType: (v: string) => "companyName" | "expenses" | "runway" | "cashBalance" | "revenues" | "netIncome";
7
+ export declare const toManagementSortKeyType: (v: string) => "status" | "bookCloseDate" | "companyName" | "group" | "controller" | "plans" | "monthlyRecurringRevenue" | "notes" | "taxStatus" | "preparer" | "reviewer" | "annualRecurringRevenue" | "task" | "customerSuccessManager" | "apAnalyst" | "reportSent" | "taxLead" | "satisfaction";
8
+ export declare const toOnboardingSortKeyType: (v: string) => "companyName" | "notes" | "businessVerified" | "identityVerified" | "bankAccountLinked" | "customerCreated" | "groupCreated" | "qboLinked" | "enroller" | "invite" | "latestCreated";
9
+ export declare const toHealthSortKeyType: (v: string) => "companyName" | "group" | "controller" | "monthlyRecurringRevenue" | "runway" | "companyEngagementMetricsUpdatedAt" | "customerSatisfactionScore" | "externalProductServiceExposure" | "netPromoterScore" | "customerSuccessManager" | "issues" | "productVerticals" | "churnProbability" | "lastReportSent" | "subscriptionDate" | "renewalDate" | "dashboardLastSeen" | "lastEngagement";
10
10
  export declare const toTaskManagerSortKeyType: (v: string) => "status" | "name" | "tags" | "createdBy" | "dueDate" | "priority" | "assignee" | "taskName";
11
11
  export type PortfolioViewSortKey = ReturnType<typeof toPortfolioSortKeyType>;
12
12
  export type ManagementViewSortKey = ReturnType<typeof toManagementSortKeyType>;
13
13
  export type OnboardingViewSortKey = ReturnType<typeof toOnboardingSortKeyType>;
14
14
  export type HealthViewSortKey = ReturnType<typeof toHealthSortKeyType>;
15
15
  export type TaskManagerViewSortKey = ReturnType<typeof toTaskManagerSortKeyType>;
16
+ export type AiAccountantFilterCategoryField = 'enrollmentStatus';
16
17
  export type ManagementViewFilterCategoryField = 'controllerUserIds' | 'customerSuccessManagerUserIds' | 'preparerUserIds' | 'reviewerUserIds' | 'apAnalystUserIds' | 'taxLeadUserIds' | 'companyGroupId' | 'taxStatusCode' | 'statusCode' | 'plans' | 'annualRecurringRevenue' | 'monthlyRecurringRevenue' | 'customerSatisfaction' | 'zeniSatisfaction';
17
18
  export type SubscriptionViewFilterCategoryField = 'controllerUserIds' | 'statusCode' | 'recommendedActionCode' | 'subscriptionPlans' | 'subscriptionAddOns' | 'avg2MonthExpenses' | 'slabLowerLimit' | 'slabUpperLimit' | 'monthlyRecurringRevenue';
18
19
  export type PortfolioViewFilterCategoryField = 'netBurnOrIncome' | 'cashPosition' | 'income' | 'expenses' | 'runway';
@@ -21,7 +22,7 @@ export interface CockpitFilterCategory {
21
22
  matchingOperator: 'equal' | 'not-equal';
22
23
  values: FilterCategoryValueType[];
23
24
  valuesCombinationOperator: 'ANY' | 'ALL';
24
- field?: ManagementViewFilterCategoryField | SubscriptionViewFilterCategoryField | PortfolioViewFilterCategoryField | HealthMonitorViewFilterCategoryField;
25
+ field?: AiAccountantFilterCategoryField | ManagementViewFilterCategoryField | SubscriptionViewFilterCategoryField | PortfolioViewFilterCategoryField | HealthMonitorViewFilterCategoryField;
25
26
  }
26
27
  export interface CockpitFilters {
27
28
  categories?: CockpitFilterCategory[];
@@ -4,6 +4,7 @@ import { CompanyDetailsLocalData } from '../companyPassport/companyDetailsLocalD
4
4
  import { CompanyOfficerLocalData, CompanyOfficerType, PrimaryContactLocalData } from '../companyPassport/companyUsersLocalData';
5
5
  export type UpdateActionType = 'company_update' | 'user_create' | 'user_update';
6
6
  export interface CompanyPassportViewState extends CommonState, FetchedState {
7
+ accountingClassesUpdateStatus: FetchStateAndError;
7
8
  companyDetails: {
8
9
  updateStatus: FetchStateAndError;
9
10
  localData?: CompanyDetailsLocalData;
@@ -4,6 +4,10 @@ exports.initialCompanyPassportView = void 0;
4
4
  const commonState_1 = require("../commonState");
5
5
  exports.initialCompanyPassportView = {
6
6
  ...commonState_1.initialCommonState,
7
+ accountingClassesUpdateStatus: {
8
+ fetchState: 'Not-Started',
9
+ error: undefined,
10
+ },
7
11
  companyDetails: {
8
12
  localData: undefined,
9
13
  updateStatus: {
@@ -1,39 +1,3 @@
1
- export interface TenantCreditScoreRowPayload {
2
- burn_rate_monthly: number;
3
- cards: string;
4
- confidence: number;
5
- cons: string;
6
- conservative_limit_rationale: string;
7
- controller_name: string;
8
- credit_amount: number;
9
- credit_limit: number;
10
- credit_score: string;
11
- customer_name: string;
12
- going_concern_analysis: string;
13
- health_monitor_score: number;
14
- key_ratios: Record<string, unknown>;
15
- liberal_credit_limit: number;
16
- liberal_limit_rationale: string;
17
- period: string;
18
- pros: string;
19
- reasoning: string;
20
- run_date: string;
21
- runway: number;
22
- status: string;
23
- total_card_balance: number;
24
- total_cash_balance: number;
25
- }
26
- export interface TenantCreditScoreReportPayload {
27
- count: number;
28
- report: TenantCreditScoreRowPayload[];
29
- }
30
- export interface TenantCreditScoreReportResponse {
31
- data: TenantCreditScoreReportPayload;
32
- status: {
33
- code: number;
34
- message: string;
35
- };
36
- }
37
1
  export interface ScheduleCreditScoreCronResponse {
38
2
  data: string;
39
3
  status: {
@@ -1,12 +1,13 @@
1
1
  import { ZeniAPIStatus } from '../../responsePayload';
2
- import { CardTenantProfileRowPayload, MacroPayload, TenantCreditScoreReportPayload } from './creditAgentViewPayload';
3
- import { CardStatus, CardTenantProfileRow, CreditAgentViewState, initialCreditAgentViewState } from './creditAgentViewState';
2
+ import { CardTenantProfileRowPayload, MacroPayload } from './creditAgentViewPayload';
3
+ import { CardStatus, CardTenantProfileRow, CreditAgentViewState } from './creditAgentViewState';
4
+ export declare const initialCreditAgentViewState: CreditAgentViewState;
4
5
  export declare function mapCardTenantProfileRowPayload(row: CardTenantProfileRowPayload): CardTenantProfileRow;
5
- export declare const fetchCreditAgentAccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/fetchCreditAgentAccess">, fetchCreditAgentAccessCompleted: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "creditAgentView/fetchCreditAgentAccessCompleted">, fetchCreditAgentAccessFailed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/fetchCreditAgentAccessFailed">, fetchTenantCreditScoreReport: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/fetchTenantCreditScoreReport">, updateTenantCreditScoreReport: import("@reduxjs/toolkit").ActionCreatorWithPayload<TenantCreditScoreReportPayload, "creditAgentView/updateTenantCreditScoreReport">, updateTenantCreditScoreReportFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/updateTenantCreditScoreReportFailure">, scheduleTenantCreditScoreCron: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
6
- tenantId?: string;
7
- }, "creditAgentView/scheduleTenantCreditScoreCron">, scheduleTenantCreditScoreCronSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/scheduleTenantCreditScoreCronSuccess">, scheduleTenantCreditScoreCronFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/scheduleTenantCreditScoreCronFailure">, resetScheduleCronState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/resetScheduleCronState">, fetchCreditAgentMacro: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/fetchCreditAgentMacro">, updateCreditAgentMacro: import("@reduxjs/toolkit").ActionCreatorWithPayload<MacroPayload, "creditAgentView/updateCreditAgentMacro">, updateCreditAgentMacroFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/updateCreditAgentMacroFailure">, saveCreditAgentMacro: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
6
+ export declare const fetchCreditAgentAccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/fetchCreditAgentAccess">, fetchCreditAgentAccessSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "creditAgentView/fetchCreditAgentAccessSuccess">, fetchCreditAgentAccessFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/fetchCreditAgentAccessFailure">, scheduleTenantCreditScoreCron: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId?: string | undefined], {
7
+ tenantId: string | undefined;
8
+ }, "creditAgentView/scheduleTenantCreditScoreCron", never, never>, scheduleTenantCreditScoreCronSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/scheduleTenantCreditScoreCronSuccess">, scheduleTenantCreditScoreCronFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/scheduleTenantCreditScoreCronFailure">, resetScheduleCronState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/resetScheduleCronState">, fetchCreditAgentMacro: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/fetchCreditAgentMacro">, fetchCreditAgentMacroSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<MacroPayload, "creditAgentView/fetchCreditAgentMacroSuccess">, fetchCreditAgentMacroFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/fetchCreditAgentMacroFailure">, saveCreditAgentMacro: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[instructions: string], {
8
9
  instructions: string;
9
- }, "creditAgentView/saveCreditAgentMacro">, saveCreditAgentMacroSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<MacroPayload, "creditAgentView/saveCreditAgentMacroSuccess">, saveCreditAgentMacroFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/saveCreditAgentMacroFailure">, resetSaveMacroState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/resetSaveMacroState">, fetchCardProfiles: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/fetchCardProfiles">, fetchCardProfilesCompleted: import("@reduxjs/toolkit").ActionCreatorWithPayload<CardTenantProfileRow[], "creditAgentView/fetchCardProfilesCompleted">, fetchCardProfilesFailed: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/fetchCardProfilesFailed">, updateCardProfile: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
10
+ }, "creditAgentView/saveCreditAgentMacro", never, never>, saveCreditAgentMacroSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<MacroPayload, "creditAgentView/saveCreditAgentMacroSuccess">, saveCreditAgentMacroFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/saveCreditAgentMacroFailure">, resetSaveMacroState: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/resetSaveMacroState">, fetchCardProfiles: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/fetchCardProfiles">, fetchCardProfilesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<CardTenantProfileRow[], "creditAgentView/fetchCardProfilesSuccess">, fetchCardProfilesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/fetchCardProfilesFailure">, updateCardProfile: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
10
11
  tenantNamespace: string;
11
12
  update: {
12
13
  cardStatus?: CardStatus;
@@ -14,10 +15,20 @@ export declare const fetchCreditAgentAccess: import("@reduxjs/toolkit").ActionCr
14
15
  reason?: string;
15
16
  updatedByName?: string;
16
17
  };
17
- }, "creditAgentView/updateCardProfile">, updateCardProfileCompleted: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
18
- profile: Partial<CardTenantProfileRow>;
18
+ }], {
19
19
  tenantNamespace: string;
20
- }, "creditAgentView/updateCardProfileCompleted">, updateCardProfileFailed: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/updateCardProfileFailed">, downloadCreditReport: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/downloadCreditReport">, downloadCreditReportCompleted: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/downloadCreditReportCompleted">, downloadCreditReportFailed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/downloadCreditReportFailed">;
20
+ update: {
21
+ cardStatus?: CardStatus;
22
+ creditLimit?: number;
23
+ reason?: string;
24
+ updatedByName?: string;
25
+ };
26
+ }, "creditAgentView/updateCardProfile", never, never>, updateCardProfileSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
27
+ profile: CardTenantProfileRow;
28
+ tenantNamespace: string;
29
+ }, "creditAgentView/updateCardProfileSuccess">, updateCardProfileFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "creditAgentView/updateCardProfileFailure", never, never>, downloadCreditReport: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/downloadCreditReport">, downloadCreditReportSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[csv: string], {
30
+ csv: string;
31
+ }, "creditAgentView/downloadCreditReportSuccess", never, never>, downloadCreditReportFailure: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"creditAgentView/downloadCreditReportFailure">;
21
32
  export { initialCreditAgentViewState as initialState, CreditAgentViewState };
22
33
  declare const _default: import("redux").Reducer<CreditAgentViewState>;
23
34
  export default _default;
@@ -1,70 +1,56 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.initialState = exports.downloadCreditReportFailed = exports.downloadCreditReportCompleted = exports.downloadCreditReport = exports.updateCardProfileFailed = exports.updateCardProfileCompleted = exports.updateCardProfile = exports.fetchCardProfilesFailed = exports.fetchCardProfilesCompleted = exports.fetchCardProfiles = exports.resetSaveMacroState = exports.saveCreditAgentMacroFailure = exports.saveCreditAgentMacroSuccess = exports.saveCreditAgentMacro = exports.updateCreditAgentMacroFailure = exports.updateCreditAgentMacro = exports.fetchCreditAgentMacro = exports.resetScheduleCronState = exports.scheduleTenantCreditScoreCronFailure = exports.scheduleTenantCreditScoreCronSuccess = exports.scheduleTenantCreditScoreCron = exports.updateTenantCreditScoreReportFailure = exports.updateTenantCreditScoreReport = exports.fetchTenantCreditScoreReport = exports.fetchCreditAgentAccessFailed = exports.fetchCreditAgentAccessCompleted = exports.fetchCreditAgentAccess = void 0;
4
+ exports.initialState = exports.downloadCreditReportFailure = exports.downloadCreditReportSuccess = exports.downloadCreditReport = exports.updateCardProfileFailure = exports.updateCardProfileSuccess = exports.updateCardProfile = exports.fetchCardProfilesFailure = exports.fetchCardProfilesSuccess = exports.fetchCardProfiles = exports.resetSaveMacroState = exports.saveCreditAgentMacroFailure = exports.saveCreditAgentMacroSuccess = exports.saveCreditAgentMacro = exports.fetchCreditAgentMacroFailure = exports.fetchCreditAgentMacroSuccess = exports.fetchCreditAgentMacro = exports.resetScheduleCronState = exports.scheduleTenantCreditScoreCronFailure = exports.scheduleTenantCreditScoreCronSuccess = exports.scheduleTenantCreditScoreCron = exports.fetchCreditAgentAccessFailure = exports.fetchCreditAgentAccessSuccess = exports.fetchCreditAgentAccess = exports.initialCreditAgentViewState = void 0;
5
5
  exports.mapCardTenantProfileRowPayload = mapCardTenantProfileRowPayload;
6
6
  const toolkit_1 = require("@reduxjs/toolkit");
7
- const creditAgentViewState_1 = require("./creditAgentViewState");
8
- Object.defineProperty(exports, "initialState", { enumerable: true, get: function () { return creditAgentViewState_1.initialCreditAgentViewState; } });
7
+ exports.initialCreditAgentViewState = {
8
+ access: {
9
+ fetchState: 'Not-Started',
10
+ isAllowed: null,
11
+ },
12
+ cardProfiles: {
13
+ downloadState: 'Not-Started',
14
+ error: undefined,
15
+ fetchState: 'Not-Started',
16
+ rows: [],
17
+ },
18
+ macro: {
19
+ data: null,
20
+ error: undefined,
21
+ fetchState: 'Not-Started',
22
+ updateState: 'Not-Started',
23
+ },
24
+ scheduleCron: {
25
+ error: undefined,
26
+ fetchState: 'Not-Started',
27
+ },
28
+ };
29
+ exports.initialState = exports.initialCreditAgentViewState;
9
30
  const creditAgentView = (0, toolkit_1.createSlice)({
10
31
  name: 'creditAgentView',
11
- initialState: creditAgentViewState_1.initialCreditAgentViewState,
32
+ initialState: exports.initialCreditAgentViewState,
12
33
  reducers: {
13
34
  fetchCreditAgentAccess(draft) {
14
35
  draft.access.fetchState = 'In-Progress';
15
36
  draft.access.isAllowed = null;
16
37
  },
17
- fetchCreditAgentAccessCompleted(draft, action) {
38
+ fetchCreditAgentAccessSuccess(draft, action) {
18
39
  draft.access.fetchState = 'Completed';
19
40
  draft.access.isAllowed = action.payload;
20
41
  },
21
- fetchCreditAgentAccessFailed(draft) {
42
+ fetchCreditAgentAccessFailure(draft, action) {
22
43
  draft.access.fetchState = 'Error';
23
- draft.access.isAllowed = false;
24
- },
25
- fetchTenantCreditScoreReport(draft) {
26
- draft.report.fetchState = 'In-Progress';
27
- draft.report.error = undefined;
28
- },
29
- updateTenantCreditScoreReport(draft, action) {
30
- draft.report.fetchState = 'Completed';
31
- draft.report.error = undefined;
32
- draft.report.rows = action.payload.report.map((row) => ({
33
- customerName: row.customer_name,
34
- totalCashBalance: row.total_cash_balance,
35
- totalCardBalance: row.total_card_balance,
36
- cards: row.cards,
37
- controllerName: row.controller_name,
38
- period: row.period,
39
- runway: row.runway,
40
- burnRateMonthly: row.burn_rate_monthly,
41
- healthMonitorScore: row.health_monitor_score,
42
- creditScore: row.credit_score,
43
- confidence: row.confidence,
44
- creditAmount: row.credit_amount,
45
- creditLimit: row.credit_limit,
46
- conservativeLimitRationale: row.conservative_limit_rationale,
47
- liberalCreditLimit: row.liberal_credit_limit,
48
- liberalLimitRationale: row.liberal_limit_rationale,
49
- pros: row.pros,
50
- cons: row.cons,
51
- reasoning: row.reasoning,
52
- goingConcernAnalysis: row.going_concern_analysis,
53
- keyRatios: row.key_ratios,
54
- runDate: row.run_date,
55
- status: row.status,
56
- }));
57
- draft.report.count = action.payload.count;
58
- },
59
- updateTenantCreditScoreReportFailure(draft, action) {
60
- draft.report.fetchState = 'Error';
61
- draft.report.error = action.payload;
62
- },
63
- scheduleTenantCreditScoreCron(draft,
64
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
65
- _action) {
66
- draft.scheduleCron.fetchState = 'In-Progress';
67
- draft.scheduleCron.error = undefined;
44
+ draft.access.error = action.payload;
45
+ },
46
+ scheduleTenantCreditScoreCron: {
47
+ reducer(draft) {
48
+ draft.scheduleCron.fetchState = 'In-Progress';
49
+ draft.scheduleCron.error = undefined;
50
+ },
51
+ prepare(tenantId) {
52
+ return { payload: { tenantId } };
53
+ },
68
54
  },
69
55
  scheduleTenantCreditScoreCronSuccess(draft) {
70
56
  draft.scheduleCron.fetchState = 'Completed';
@@ -82,20 +68,23 @@ const creditAgentView = (0, toolkit_1.createSlice)({
82
68
  draft.macro.fetchState = 'In-Progress';
83
69
  draft.macro.error = undefined;
84
70
  },
85
- updateCreditAgentMacro(draft, action) {
71
+ fetchCreditAgentMacroSuccess(draft, action) {
86
72
  draft.macro.fetchState = 'Completed';
87
73
  draft.macro.error = undefined;
88
74
  draft.macro.data = mapMacroPayload(action.payload);
89
75
  },
90
- updateCreditAgentMacroFailure(draft, action) {
76
+ fetchCreditAgentMacroFailure(draft, action) {
91
77
  draft.macro.fetchState = 'Error';
92
78
  draft.macro.error = action.payload;
93
79
  },
94
- saveCreditAgentMacro(draft,
95
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
96
- _action) {
97
- draft.macro.updateState = 'In-Progress';
98
- draft.macro.error = undefined;
80
+ saveCreditAgentMacro: {
81
+ reducer(draft) {
82
+ draft.macro.updateState = 'In-Progress';
83
+ draft.macro.error = undefined;
84
+ },
85
+ prepare(instructions) {
86
+ return { payload: { instructions } };
87
+ },
99
88
  },
100
89
  saveCreditAgentMacroSuccess(draft, action) {
101
90
  draft.macro.updateState = 'Completed';
@@ -114,40 +103,49 @@ const creditAgentView = (0, toolkit_1.createSlice)({
114
103
  draft.cardProfiles.fetchState = 'In-Progress';
115
104
  draft.cardProfiles.error = undefined;
116
105
  },
117
- fetchCardProfilesCompleted(draft, action) {
106
+ fetchCardProfilesSuccess(draft, action) {
118
107
  draft.cardProfiles.fetchState = 'Completed';
119
108
  draft.cardProfiles.error = undefined;
120
109
  draft.cardProfiles.rows = action.payload;
121
110
  },
122
- fetchCardProfilesFailed(draft, action) {
111
+ fetchCardProfilesFailure(draft, action) {
123
112
  draft.cardProfiles.fetchState = 'Error';
124
113
  draft.cardProfiles.error = action.payload;
125
114
  },
126
- updateCardProfile(
127
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
128
- _draft,
129
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
130
- _action) {
131
- // action dispatched to trigger the epic; no optimistic state update needed
115
+ updateCardProfile: {
116
+ reducer() {
117
+ // action dispatched to trigger the epic; no optimistic state update needed
118
+ },
119
+ prepare(payload) {
120
+ return { payload };
121
+ },
132
122
  },
133
- updateCardProfileCompleted(draft, action) {
123
+ updateCardProfileSuccess(draft, action) {
134
124
  const { tenantNamespace, profile } = action.payload;
135
125
  draft.cardProfiles.rows = draft.cardProfiles.rows.map((row) => row.tenantNamespace === tenantNamespace ? { ...row, ...profile } : row);
136
126
  },
137
- updateCardProfileFailed(
138
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
139
- _draft,
140
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
141
- _action) {
142
- // noop — the epic will surface the error via alert
127
+ updateCardProfileFailure: {
128
+ reducer() {
129
+ // noop — the epic will surface the error via alert
130
+ },
131
+ prepare(payload) {
132
+ return { payload };
133
+ },
143
134
  },
144
135
  downloadCreditReport(draft) {
145
136
  draft.cardProfiles.downloadState = 'In-Progress';
146
137
  },
147
- downloadCreditReportCompleted(draft) {
148
- draft.cardProfiles.downloadState = 'Completed';
149
- },
150
- downloadCreditReportFailed(draft) {
138
+ // Payload carries the CSV string so the consuming app can trigger the actual
139
+ // file download using its platform-appropriate mechanism (browser Blob / RN file API).
140
+ downloadCreditReportSuccess: {
141
+ reducer(draft) {
142
+ draft.cardProfiles.downloadState = 'Completed';
143
+ },
144
+ prepare(csv) {
145
+ return { payload: { csv } };
146
+ },
147
+ },
148
+ downloadCreditReportFailure(draft) {
151
149
  draft.cardProfiles.downloadState = 'Error';
152
150
  },
153
151
  },
@@ -164,7 +162,7 @@ function mapCardTenantProfileRowPayload(row) {
164
162
  recommendedAmount: row.recommended_amount ?? null,
165
163
  reportDate: row.report_date ?? null,
166
164
  tenantId: row.tenant_id ?? null,
167
- tenantNamespace: String(row.tenant_namespace ?? ''),
165
+ tenantNamespace: row.tenant_namespace,
168
166
  updatedByName: row.updated_by_name ?? null,
169
167
  updatedByUserId: row.updated_by_user_id ?? null,
170
168
  updatedOn: row.updated_on ?? null,
@@ -184,5 +182,5 @@ function mapMacroPayload(payload) {
184
182
  updatedAt: payload.updated_at,
185
183
  };
186
184
  }
187
- _a = creditAgentView.actions, exports.fetchCreditAgentAccess = _a.fetchCreditAgentAccess, exports.fetchCreditAgentAccessCompleted = _a.fetchCreditAgentAccessCompleted, exports.fetchCreditAgentAccessFailed = _a.fetchCreditAgentAccessFailed, exports.fetchTenantCreditScoreReport = _a.fetchTenantCreditScoreReport, exports.updateTenantCreditScoreReport = _a.updateTenantCreditScoreReport, exports.updateTenantCreditScoreReportFailure = _a.updateTenantCreditScoreReportFailure, exports.scheduleTenantCreditScoreCron = _a.scheduleTenantCreditScoreCron, exports.scheduleTenantCreditScoreCronSuccess = _a.scheduleTenantCreditScoreCronSuccess, exports.scheduleTenantCreditScoreCronFailure = _a.scheduleTenantCreditScoreCronFailure, exports.resetScheduleCronState = _a.resetScheduleCronState, exports.fetchCreditAgentMacro = _a.fetchCreditAgentMacro, exports.updateCreditAgentMacro = _a.updateCreditAgentMacro, exports.updateCreditAgentMacroFailure = _a.updateCreditAgentMacroFailure, exports.saveCreditAgentMacro = _a.saveCreditAgentMacro, exports.saveCreditAgentMacroSuccess = _a.saveCreditAgentMacroSuccess, exports.saveCreditAgentMacroFailure = _a.saveCreditAgentMacroFailure, exports.resetSaveMacroState = _a.resetSaveMacroState, exports.fetchCardProfiles = _a.fetchCardProfiles, exports.fetchCardProfilesCompleted = _a.fetchCardProfilesCompleted, exports.fetchCardProfilesFailed = _a.fetchCardProfilesFailed, exports.updateCardProfile = _a.updateCardProfile, exports.updateCardProfileCompleted = _a.updateCardProfileCompleted, exports.updateCardProfileFailed = _a.updateCardProfileFailed, exports.downloadCreditReport = _a.downloadCreditReport, exports.downloadCreditReportCompleted = _a.downloadCreditReportCompleted, exports.downloadCreditReportFailed = _a.downloadCreditReportFailed;
185
+ _a = creditAgentView.actions, exports.fetchCreditAgentAccess = _a.fetchCreditAgentAccess, exports.fetchCreditAgentAccessSuccess = _a.fetchCreditAgentAccessSuccess, exports.fetchCreditAgentAccessFailure = _a.fetchCreditAgentAccessFailure, exports.scheduleTenantCreditScoreCron = _a.scheduleTenantCreditScoreCron, exports.scheduleTenantCreditScoreCronSuccess = _a.scheduleTenantCreditScoreCronSuccess, exports.scheduleTenantCreditScoreCronFailure = _a.scheduleTenantCreditScoreCronFailure, exports.resetScheduleCronState = _a.resetScheduleCronState, exports.fetchCreditAgentMacro = _a.fetchCreditAgentMacro, exports.fetchCreditAgentMacroSuccess = _a.fetchCreditAgentMacroSuccess, exports.fetchCreditAgentMacroFailure = _a.fetchCreditAgentMacroFailure, exports.saveCreditAgentMacro = _a.saveCreditAgentMacro, exports.saveCreditAgentMacroSuccess = _a.saveCreditAgentMacroSuccess, exports.saveCreditAgentMacroFailure = _a.saveCreditAgentMacroFailure, exports.resetSaveMacroState = _a.resetSaveMacroState, exports.fetchCardProfiles = _a.fetchCardProfiles, exports.fetchCardProfilesSuccess = _a.fetchCardProfilesSuccess, exports.fetchCardProfilesFailure = _a.fetchCardProfilesFailure, exports.updateCardProfile = _a.updateCardProfile, exports.updateCardProfileSuccess = _a.updateCardProfileSuccess, exports.updateCardProfileFailure = _a.updateCardProfileFailure, exports.downloadCreditReport = _a.downloadCreditReport, exports.downloadCreditReportSuccess = _a.downloadCreditReportSuccess, exports.downloadCreditReportFailure = _a.downloadCreditReportFailure;
188
186
  exports.default = creditAgentView.reducer;
@@ -1,6 +1,5 @@
1
1
  import { RootState } from '../../reducer';
2
2
  import { CreditAgentViewState } from './creditAgentViewState';
3
- export declare const getCreditAgentReport: (state: RootState) => CreditAgentViewState['report'];
4
3
  export declare const getCreditAgentMacro: (state: RootState) => CreditAgentViewState['macro'];
5
4
  export declare const getScheduleCronState: (state: RootState) => CreditAgentViewState['scheduleCron'];
6
5
  export declare const getCardProfilesData: (state: RootState) => CreditAgentViewState['cardProfiles'];
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCardProfilesData = exports.getScheduleCronState = exports.getCreditAgentMacro = exports.getCreditAgentReport = void 0;
3
+ exports.getCardProfilesData = exports.getScheduleCronState = exports.getCreditAgentMacro = void 0;
4
4
  const toolkit_1 = require("@reduxjs/toolkit");
5
5
  const getCreditAgentViewState = (state) => state.creditAgentViewState;
6
- exports.getCreditAgentReport = (0, toolkit_1.createSelector)(getCreditAgentViewState, (creditAgentViewState) => creditAgentViewState.report);
7
6
  exports.getCreditAgentMacro = (0, toolkit_1.createSelector)(getCreditAgentViewState, (creditAgentViewState) => creditAgentViewState.macro);
8
7
  exports.getScheduleCronState = (0, toolkit_1.createSelector)(getCreditAgentViewState, (creditAgentViewState) => creditAgentViewState.scheduleCron);
9
8
  exports.getCardProfilesData = (0, toolkit_1.createSelector)(getCreditAgentViewState, (creditAgentViewState) => creditAgentViewState.cardProfiles);
@@ -1,5 +1,4 @@
1
- import { FetchState } from '../../commonStateTypes/common';
2
- import { ZeniAPIStatus } from '../../responsePayload';
1
+ import { FetchState, FetchStateAndError } from '../../commonStateTypes/common';
3
2
  export type CardStatus = 'Not-Initiated' | 'Interested' | 'Pre-approved' | 'Approved' | 'Enabled' | 'Active' | 'Rejected' | 'Locked';
4
3
  export interface CardTenantProfileRow {
5
4
  cardStatus: CardStatus;
@@ -17,31 +16,6 @@ export interface CardTenantProfileRow {
17
16
  updatedByUserId: string | null;
18
17
  updatedOn: string | null;
19
18
  }
20
- export interface TenantCreditScoreRow {
21
- customerName: string;
22
- period: string;
23
- runDate: string;
24
- status: string;
25
- burnRateMonthly?: number | null;
26
- cards?: string | null;
27
- confidence?: number | null;
28
- cons?: string | null;
29
- conservativeLimitRationale?: string | null;
30
- controllerName?: string | null;
31
- creditAmount?: number | null;
32
- creditLimit?: number | null;
33
- creditScore?: string | null;
34
- goingConcernAnalysis?: string | null;
35
- healthMonitorScore?: number | null;
36
- keyRatios?: Record<string, unknown> | null;
37
- liberalCreditLimit?: number | null;
38
- liberalLimitRationale?: string | null;
39
- pros?: string | null;
40
- reasoning?: string | null;
41
- runway?: number | null;
42
- totalCardBalance?: number | null;
43
- totalCashBalance?: number | null;
44
- }
45
19
  export interface CreditAgentMacro {
46
20
  createdAt: string;
47
21
  description: string;
@@ -55,31 +29,16 @@ export interface CreditAgentMacro {
55
29
  version: number;
56
30
  }
57
31
  export interface CreditAgentViewState {
58
- access: {
59
- fetchState: FetchState;
32
+ access: FetchStateAndError & {
60
33
  isAllowed: boolean | null;
61
34
  };
62
- cardProfiles: {
35
+ cardProfiles: FetchStateAndError & {
63
36
  downloadState: FetchState;
64
- fetchState: FetchState;
65
37
  rows: CardTenantProfileRow[];
66
- error?: ZeniAPIStatus;
67
38
  };
68
- macro: {
39
+ macro: FetchStateAndError & {
69
40
  data: CreditAgentMacro | null;
70
- fetchState: FetchState;
71
41
  updateState: FetchState;
72
- error?: ZeniAPIStatus;
73
- };
74
- report: {
75
- count: number;
76
- fetchState: FetchState;
77
- rows: TenantCreditScoreRow[];
78
- error?: ZeniAPIStatus;
79
- };
80
- scheduleCron: {
81
- fetchState: FetchState;
82
- error?: ZeniAPIStatus;
83
42
  };
43
+ scheduleCron: FetchStateAndError;
84
44
  }
85
- export declare const initialCreditAgentViewState: CreditAgentViewState;