@zeniai/client-epic-state 4.13.15 → 4.13.16

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 (319) hide show
  1. package/lib/commonPayloadTypes/commonPayload.d.ts +7 -0
  2. package/lib/commonStateTypes/common.d.ts +2 -0
  3. package/lib/commonStateTypes/common.js +5 -1
  4. package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.d.ts +1 -0
  5. package/lib/commonStateTypes/fiscalYearHelpers/formatZeniDateFY.js +2 -1
  6. package/lib/commonStateTypes/timePeriod.d.ts +16 -0
  7. package/lib/commonStateTypes/timePeriod.js +31 -1
  8. package/lib/commonStateTypes/viewAndReport/reportIDHelper.d.ts +1 -0
  9. package/lib/commonStateTypes/viewAndReport/reportIDHelper.js +3 -1
  10. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  11. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
  12. package/lib/entity/account/accountState.d.ts +1 -1
  13. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  14. package/lib/entity/chargeCard/chargeCard.d.ts +16 -2
  15. package/lib/entity/chargeCard/chargeCard.js +18 -1
  16. package/lib/entity/chargeCard/chargeCardPayload.d.ts +14 -5
  17. package/lib/entity/chargeCard/chargeCardPayload.js +24 -7
  18. package/lib/entity/class/classReducer.d.ts +4 -4
  19. package/lib/entity/class/classState.d.ts +1 -1
  20. package/lib/entity/company/companyPayload.d.ts +4 -0
  21. package/lib/entity/company/companyPayload.js +6 -3
  22. package/lib/entity/company/companyReducer.d.ts +4 -1
  23. package/lib/entity/company/companyReducer.js +6 -2
  24. package/lib/entity/company/companyStateTypes.d.ts +5 -1
  25. package/lib/entity/file/fileState.d.ts +3 -3
  26. package/lib/entity/file/fileState.js +2 -0
  27. package/lib/entity/forecast/forecastState.d.ts +1 -1
  28. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
  29. package/lib/entity/jeSchedules/jeSchedulesPayload.js +7 -1
  30. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
  31. package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +3 -1
  32. package/lib/entity/jeSchedules/jeSchedulesSelector.js +2 -1
  33. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +3 -1
  34. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +2 -0
  35. package/lib/entity/jeSchedules/jeSchedulesTypes.js +12 -1
  36. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +32 -0
  37. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +60 -0
  38. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.d.ts +12 -0
  39. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksReducer.js +25 -0
  40. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.d.ts +7 -0
  41. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksSelector.js +36 -0
  42. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +38 -0
  43. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.js +10 -0
  44. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  45. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  46. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  47. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  48. package/lib/entity/snackbar/snackbarTypes.js +3 -0
  49. package/lib/entity/tenant/clearAllEpic.d.ts +12 -2
  50. package/lib/entity/tenant/clearAllEpic.js +20 -0
  51. package/lib/entity/tenant/epic/fetchActiveTenantEpic.d.ts +2 -1
  52. package/lib/entity/tenant/epic/fetchActiveTenantEpic.js +9 -1
  53. package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +7 -1
  54. package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +34 -2
  55. package/lib/entity/tenant/tenantPayload.d.ts +1 -0
  56. package/lib/entity/tenant/tenantReducer.js +3 -0
  57. package/lib/entity/tenant/tenantState.d.ts +1 -0
  58. package/lib/entity/toastNotification/epic/pushToastNotificationEpic.d.ts +1 -1
  59. package/lib/entity/transaction/payloadTypes/attachmentPayload.d.ts +1 -1
  60. package/lib/entity/transaction/payloadTypes/attachmentPayload.js +3 -3
  61. package/lib/entity/transaction/stateTypes/transactionType.d.ts +2 -2
  62. package/lib/entity/transaction/transactionSelector.d.ts +1 -0
  63. package/lib/entity/transaction/transactionSelector.js +7 -1
  64. package/lib/entity/user/userPayload.d.ts +1 -0
  65. package/lib/entity/user/userReducer.js +9 -8
  66. package/lib/entity/user/userState.d.ts +1 -0
  67. package/lib/entity/vendor/__mocks__/vendorStateMocks.d.ts +1 -0
  68. package/lib/entity/vendor/__mocks__/vendorStateMocks.js +35 -1
  69. package/lib/entity/vendor/vendorPayload.js +3 -2
  70. package/lib/entity/vendor/vendorState.d.ts +3 -3
  71. package/lib/entity/vendor/vendorType.d.ts +0 -2
  72. package/lib/entity/vendor/vendorType.js +1 -4
  73. package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
  74. package/lib/entity/vendorExpense/vendorExpenseSelector.js +1 -0
  75. package/lib/epic.d.ts +18 -2
  76. package/lib/epic.js +18 -2
  77. package/lib/index.d.ts +65 -21
  78. package/lib/index.js +102 -28
  79. package/lib/reducer.d.ts +31 -1
  80. package/lib/reducer.js +31 -1
  81. package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +7 -1
  82. package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +7 -1
  83. package/lib/view/addressView/addressViewState.d.ts +1 -1
  84. package/lib/view/addressView/toAddressViewLocalData.d.ts +2 -0
  85. package/lib/view/addressView/toAddressViewLocalData.js +9 -3
  86. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  87. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  88. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  89. package/lib/view/cardPayment/epic/addCardPaymentSourceEpic.d.ts +1 -1
  90. package/lib/view/cardPayment/epic/confirmCardSetupIntentEpic.d.ts +1 -1
  91. package/lib/view/cardPayment/epic/createCardSetupIntentEpic.d.ts +1 -1
  92. package/lib/view/cardPayment/epic/fetchPaymentSourcesEpic.d.ts +1 -1
  93. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  94. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  95. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  96. package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -1
  97. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
  98. package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +10 -5
  99. package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +10 -7
  100. package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportTemplatesEpic.js +4 -4
  101. package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportViewEpic.js +4 -4
  102. package/lib/view/companyMonthEndReportView/epics/improveUsingZeniGPTEpic.js +5 -3
  103. package/lib/view/companyMonthEndReportView/epics/saveCompanyMonthEndReportEpic.js +3 -3
  104. package/lib/view/companyMonthEndReportView/epics/sendCompanyMonthEndReportEpic.js +3 -3
  105. package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js +1 -6
  106. package/lib/view/companyView/selectorHelpers/getCompanyView.js +4 -0
  107. package/lib/view/companyView/types/cockpitTypes.d.ts +2 -2
  108. package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +2 -0
  109. package/lib/view/companyView/types/companyPassport/companyUsersLocalData.js +7 -1
  110. package/lib/view/companyView/types/companyView.d.ts +1 -0
  111. package/lib/view/countryList/countryListReducer.d.ts +17 -0
  112. package/lib/view/countryList/countryListReducer.js +58 -0
  113. package/lib/view/countryList/countryListSelector.d.ts +7 -0
  114. package/lib/view/countryList/countryListSelector.js +13 -0
  115. package/lib/view/countryList/countryListState.d.ts +12 -0
  116. package/lib/view/countryList/countryListState.js +2 -0
  117. package/lib/view/countryList/epics/fetchCountryListEpic.d.ts +6 -0
  118. package/lib/view/countryList/epics/fetchCountryListEpic.js +19 -0
  119. package/lib/view/countryList/epics/fetchNationalityCountryListEpic.d.ts +7 -0
  120. package/lib/view/countryList/epics/fetchNationalityCountryListEpic.js +38 -0
  121. package/lib/view/countryList/payloads/countryListPayload.d.ts +6 -0
  122. package/lib/view/countryList/payloads/countryListPayload.js +10 -0
  123. package/lib/view/countryList/payloads/nationalityCountryListPayload.d.ts +11 -0
  124. package/lib/view/countryList/payloads/nationalityCountryListPayload.js +2 -0
  125. package/lib/view/dashboard/dashboardEpic.d.ts +2 -1
  126. package/lib/view/dashboard/dashboardEpic.js +22 -2
  127. package/lib/view/dashboard/dashboardReducer.d.ts +3 -2
  128. package/lib/view/dashboard/dashboardReducer.js +2 -1
  129. package/lib/view/dashboard/dashboardSelector.d.ts +2 -0
  130. package/lib/view/dashboard/dashboardSelector.js +10 -2
  131. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +10 -0
  132. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +72 -0
  133. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +11 -0
  134. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +53 -0
  135. package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.d.ts +11 -0
  136. package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +66 -0
  137. package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.d.ts +7 -0
  138. package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.js +39 -0
  139. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +7 -0
  140. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +22 -0
  141. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.d.ts +8 -0
  142. package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +59 -0
  143. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.d.ts +8 -0
  144. package/lib/view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic.js +78 -0
  145. package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.d.ts +6 -0
  146. package/lib/view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic.js +28 -0
  147. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.d.ts +9 -0
  148. package/lib/view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic.js +78 -0
  149. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.d.ts +8 -0
  150. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic.js +58 -0
  151. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.d.ts +10 -0
  152. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +12 -0
  153. package/lib/view/expenseAutomationView/expenseAutomationViewPayload.d.ts +3 -0
  154. package/lib/view/expenseAutomationView/expenseAutomationViewPayload.js +2 -0
  155. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +17 -0
  156. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +66 -0
  157. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.d.ts +3 -0
  158. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +97 -0
  159. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +11 -0
  160. package/lib/view/expenseAutomationView/expenseAutomationViewState.js +14 -0
  161. package/lib/view/expenseAutomationView/helpers/helpers.d.ts +7 -0
  162. package/lib/view/expenseAutomationView/helpers/helpers.js +67 -0
  163. package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.d.ts +76 -0
  164. package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.js +9 -0
  165. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +36 -0
  166. package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.js +58 -0
  167. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +16 -0
  168. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +2 -0
  169. package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.d.ts +34 -0
  170. package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.js +205 -0
  171. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +53 -0
  172. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +245 -0
  173. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +31 -0
  174. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +130 -0
  175. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +5 -0
  176. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +45 -0
  177. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +34 -0
  178. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +44 -0
  179. package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.d.ts +32 -0
  180. package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.js +2 -0
  181. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +28 -0
  182. package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.js +2 -0
  183. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +11 -0
  184. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.js +2 -0
  185. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.d.ts +3 -0
  186. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +55 -0
  187. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +7 -0
  188. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +95 -0
  189. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +3 -0
  190. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +61 -0
  191. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +53 -0
  192. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.js +5 -0
  193. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +31 -0
  194. package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +2 -0
  195. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +20 -0
  196. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +13 -0
  197. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +28 -0
  198. package/lib/view/expenseAutomationView/types/transactionsViewState.js +15 -0
  199. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  200. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  201. package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.d.ts +8 -0
  202. package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +58 -0
  203. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +3 -0
  204. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.js +2 -0
  205. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +16 -0
  206. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +36 -0
  207. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +10 -0
  208. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +27 -0
  209. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +5 -0
  210. package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.js +2 -0
  211. package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.d.ts +8 -1
  212. package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js +3 -1
  213. package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +5 -4
  214. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +2 -0
  215. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +6 -3
  216. package/lib/view/people/changeZeniPersonRolesEpic.d.ts +1 -1
  217. package/lib/view/people/deletePersonEpic.d.ts +1 -1
  218. package/lib/view/people/invitePeopleEpic.d.ts +1 -1
  219. package/lib/view/people/inviteZeniPeopleEpic.d.ts +1 -1
  220. package/lib/view/people/resendInviteEpic.d.ts +1 -1
  221. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  222. package/lib/view/reviewCompanyView/reviewCompanyViewState.d.ts +1 -1
  223. package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
  224. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsEpic.js +3 -2
  225. package/lib/view/scheduleView/scheduleDetailView/epics/fetchScheduleDetailsPageEpic.js +1 -1
  226. package/lib/view/scheduleView/scheduleDetailView/epics/saveScheduleDetailsEpic.js +2 -2
  227. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailLocalDataHelper.js +19 -5
  228. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.d.ts +8 -3
  229. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailPayload.js +39 -57
  230. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +13 -8
  231. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.js +19 -12
  232. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.d.ts +1 -0
  233. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailSelector.js +4 -3
  234. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailState.d.ts +2 -0
  235. package/lib/view/scheduleView/scheduleListView/scheduleListSelector.js +1 -1
  236. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  237. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.d.ts +1 -1
  238. package/lib/view/settingsView/epic/updateMyProfileEpic.js +6 -4
  239. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -4
  240. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +2 -0
  241. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +3 -0
  242. package/lib/view/spendManagement/billPay/editBillView/epics/parseInvoiceToBillEpic.js +2 -2
  243. package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.d.ts +2 -1
  244. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +7 -0
  245. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +36 -0
  246. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +6 -0
  247. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +42 -0
  248. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.d.ts +9 -0
  249. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +67 -0
  250. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +26 -0
  251. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +22 -0
  252. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.d.ts +22 -0
  253. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +89 -0
  254. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.d.ts +15 -0
  255. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +30 -0
  256. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +20 -0
  257. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.js +2 -0
  258. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.d.ts +3 -1
  259. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer.js +6 -2
  260. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.d.ts +2 -3
  261. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +3 -3
  262. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingState.d.ts +1 -3
  263. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.d.ts +1 -2
  264. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic.js +1 -21
  265. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic.js +1 -3
  266. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +1 -0
  267. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +4 -0
  268. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +8 -1
  269. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +25 -2
  270. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +1 -0
  271. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +8 -4
  272. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +2 -1
  273. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.d.ts +11 -0
  274. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updatePhysicalChargeCardAttemptEpic.js +42 -0
  275. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -14
  276. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +2 -13
  277. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +3 -6
  278. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +2 -17
  279. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +8 -2
  280. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +55 -15
  281. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +9 -0
  282. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +44 -0
  283. package/lib/view/spendManagement/chargeCards/{chargeCardList → issueChargeCard}/issueChargeCardEpic.d.ts +3 -2
  284. package/lib/view/spendManagement/chargeCards/{chargeCardList → issueChargeCard}/issueChargeCardEpic.js +35 -18
  285. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +15 -0
  286. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +65 -0
  287. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +22 -0
  288. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +77 -0
  289. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +28 -0
  290. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +23 -0
  291. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -1
  292. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +31 -6
  293. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts +2 -2
  294. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +5 -2
  295. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -1
  296. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -2
  297. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -0
  298. package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +4 -0
  299. package/lib/view/spendManagement/reimbursement/editRemiView/epics/parseReceiptsToRemiEpic.js +2 -2
  300. package/lib/view/subscriptionView/types/subscriptionTypes.d.ts +1 -1
  301. package/lib/view/tagView/epics/createTagEpic.d.ts +1 -1
  302. package/lib/view/tagView/epics/deleteTagEpic.d.ts +1 -1
  303. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  304. package/lib/view/topEx/topExSelector.d.ts +1 -1
  305. package/lib/view/transactionDetail/epics/uploadMissingReceiptSuccessEpic.js +2 -2
  306. package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -2
  307. package/lib/view/userListView/fetchUserListByTypeEpic.js +4 -1
  308. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListMock.js +1 -1
  309. package/lib/view/vendorFiling1099/__mock__/vendorFiling1099ListSelectorMock.js +1 -1
  310. package/lib/view/vendorReviewView/common/state/commonTypes.d.ts +1 -1
  311. package/lib/view/vendorReviewView/vendorFirstReviewView/epics/saveVendorFirstReviewViewEpic.js +34 -3
  312. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.d.ts +1 -1
  313. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewReducer.js +2 -2
  314. package/lib/view/zeniAccStatementList/zeniAccStatementList.d.ts +2 -5
  315. package/package.json +2 -2
  316. package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -0
  317. package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +0 -1
  318. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -0
  319. package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +0 -1
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchIssueCardPageEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const userListViewReducer_1 = require("../../../userListView/userListViewReducer");
7
+ const chargeCardConfigReducer_1 = require("../chargeCardConfig/chargeCardConfigReducer");
8
+ const issueChargeCardReducer_1 = require("./issueChargeCardReducer");
9
+ const chargeCardListReducer_1 = require("../chargeCardList/chargeCardListReducer");
10
+ const fetchIssueCardPageEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(issueChargeCardReducer_1.fetchIssueCardPage.match), (0, operators_1.mergeMap)((action) => {
11
+ const { cacheOverride } = action.payload;
12
+ const issueCardPageAction = [];
13
+ const state = state$.value;
14
+ if (cacheOverride === true) {
15
+ issueCardPageAction.push((0, chargeCardConfigReducer_1.fetchChargeCardConfig)());
16
+ issueCardPageAction.push((0, chargeCardListReducer_1.fetchCreditAccount)());
17
+ issueCardPageAction.push((0, userListViewReducer_1.fetchUserListByType)('cardHolderCandidate', true));
18
+ issueCardPageAction.push((0, userListViewReducer_1.fetchUserListByType)('cardAdmin', true));
19
+ }
20
+ else {
21
+ const chargeCardConfig = state.chargeCardConfigState;
22
+ if (chargeCardConfig.fetchState !== 'In-Progress' &&
23
+ chargeCardConfig.hasValidState() === false) {
24
+ issueCardPageAction.push((0, chargeCardConfigReducer_1.fetchChargeCardConfig)());
25
+ }
26
+ const chargeCardList = state.chargeCardListState;
27
+ if (chargeCardList.creditAccount.fetchState !== 'Completed' &&
28
+ chargeCardList.creditAccount.fetchState !== 'In-Progress') {
29
+ issueCardPageAction.push((0, chargeCardListReducer_1.fetchCreditAccount)());
30
+ }
31
+ const userList = state.userListViewState.userListByType.cardHolderCandidate;
32
+ if (userList.fetchState !== 'In-Progress' &&
33
+ userList.hasValidState() === false) {
34
+ issueCardPageAction.push((0, userListViewReducer_1.fetchUserListByType)('cardHolderCandidate', false));
35
+ }
36
+ const userAdminList = state.userListViewState.userListByType.cardAdmin;
37
+ if (userAdminList.fetchState !== 'In-Progress' &&
38
+ userAdminList.hasValidState() === false) {
39
+ issueCardPageAction.push((0, userListViewReducer_1.fetchUserListByType)('cardAdmin', false));
40
+ }
41
+ }
42
+ return (0, rxjs_1.concat)((0, rxjs_1.from)(issueCardPageAction));
43
+ }));
44
+ exports.fetchIssueCardPageEpic = fetchIssueCardPageEpic;
@@ -6,7 +6,8 @@ import { updateChargeCards } from '../../../../entity/chargeCard/chargeCardReduc
6
6
  import { updateAllUsers } from '../../../../entity/user/userReducer';
7
7
  import { updateUserRoles } from '../../../../entity/userRole/userRoleReducer';
8
8
  import { updateAddresses } from '../../../../entity/address/addressReducer';
9
- import { issueChargeCard, issueChargeCardSuccessOrFailure, updateChargeCardList } from './chargeCardListReducer';
10
9
  import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
11
- export declare type ActionType = ReturnType<typeof issueChargeCard> | ReturnType<typeof updateChargeCards> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateChargeCardList> | ReturnType<typeof issueChargeCardSuccessOrFailure> | ReturnType<typeof updateAddresses>;
10
+ import { issueChargeCards, issueChargeCardSuccessOrFailure } from './issueChargeCardReducer';
11
+ import { updateChargeCardList } from '../chargeCardList/chargeCardListReducer';
12
+ export declare type ActionType = ReturnType<typeof issueChargeCards> | ReturnType<typeof updateChargeCards> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateChargeCardList> | ReturnType<typeof issueChargeCardSuccessOrFailure> | ReturnType<typeof updateAddresses>;
12
13
  export declare const issueChargeCardEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -8,22 +8,39 @@ const chargeCardReducer_1 = require("../../../../entity/chargeCard/chargeCardRed
8
8
  const userReducer_1 = require("../../../../entity/user/userReducer");
9
9
  const userRoleReducer_1 = require("../../../../entity/userRole/userRoleReducer");
10
10
  const addressReducer_1 = require("../../../../entity/address/addressReducer");
11
- const chargeCardListReducer_1 = require("./chargeCardListReducer");
12
11
  const snackbarReducer_1 = require("../../../../entity/snackbar/snackbarReducer");
13
- const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(chargeCardListReducer_1.issueChargeCard.match), (0, operators_1.switchMap)(() => {
14
- var _a, _b, _c, _d;
12
+ const issueChargeCardReducer_1 = require("./issueChargeCardReducer");
13
+ const chargeCardListReducer_1 = require("../chargeCardList/chargeCardListReducer");
14
+ const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(issueChargeCardReducer_1.issueChargeCards.match), (0, operators_1.switchMap)(() => {
15
15
  const state = state$.value;
16
- const localData = state.chargeCardListState.issueChargeCard.localData;
17
- const payload = [
18
- {
19
- card_holder_user_ids: localData.userIds,
20
- card_name: localData.cardName,
21
- credit_limit: (_b = (_a = localData.amount) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : 0,
22
- currency_code: (_d = (_c = localData.amount) === null || _c === void 0 ? void 0 : _c.currencyCode) !== null && _d !== void 0 ? _d : 'USD',
23
- credit_limit_frequency: { code: localData.frequency },
24
- card_type: 'business_virtual_credit_card',
25
- },
26
- ];
16
+ const localData = state.issueChargeCardState.localData;
17
+ const payload = localData.map((data) => {
18
+ var _a, _b, _c, _d, _e, _f, _g, _h;
19
+ if (data.cardType === 'business_physical_credit_card') {
20
+ return {
21
+ card_holder_user_ids: data.physicalCard.userIds != null
22
+ ? [data.physicalCard.userIds]
23
+ : [],
24
+ card_name: data.physicalCard.cardName,
25
+ credit_limit: (_b = (_a = data.physicalCard.amount) === null || _a === void 0 ? void 0 : _a.amount) !== null && _b !== void 0 ? _b : 0,
26
+ currency_code: (_d = (_c = data.physicalCard.amount) === null || _c === void 0 ? void 0 : _c.currencyCode) !== null && _d !== void 0 ? _d : 'USD',
27
+ credit_limit_frequency: { code: data.physicalCard.frequency },
28
+ card_type: data.cardType,
29
+ shipping_address_type: data.physicalCard.addressType,
30
+ shipping_address_id: data.physicalCard.addressId,
31
+ };
32
+ }
33
+ else {
34
+ return {
35
+ card_holder_user_ids: data.virtualCard.userIds,
36
+ card_name: data.virtualCard.cardName,
37
+ credit_limit: (_f = (_e = data.virtualCard.amount) === null || _e === void 0 ? void 0 : _e.amount) !== null && _f !== void 0 ? _f : 0,
38
+ currency_code: (_h = (_g = data.virtualCard.amount) === null || _g === void 0 ? void 0 : _g.currencyCode) !== null && _h !== void 0 ? _h : 'USD',
39
+ credit_limit_frequency: { code: data.virtualCard.frequency },
40
+ card_type: data.cardType,
41
+ };
42
+ }
43
+ });
27
44
  return zeniAPI
28
45
  .postAndGetJSON(`${zeniAPI.apiEndPoints.cardMicroServiceBaseUrl}/1.0/cards`, { cards: payload })
29
46
  .pipe((0, operators_1.mergeMap)((response) => {
@@ -32,7 +49,7 @@ const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
32
49
  actions.push((0, chargeCardReducer_1.updateChargeCards)(response.data.cards), (0, userReducer_1.updateAllUsers)({ users: response.data.users }), (0, userRoleReducer_1.updateUserRoles)(response.data.user_roles), (0, chargeCardListReducer_1.updateChargeCardList)({
33
50
  chargeCardListPayload: response.data,
34
51
  keepExistingListItems: true,
35
- }), (0, addressReducer_1.updateAddresses)(response.data.addresses), (0, chargeCardListReducer_1.issueChargeCardSuccessOrFailure)({ fetchState: 'Completed' }));
52
+ }), (0, addressReducer_1.updateAddresses)(response.data.addresses), (0, issueChargeCardReducer_1.issueChargeCardSuccessOrFailure)({ fetchState: 'Completed' }));
36
53
  const cardHolderIds = response.data.cards.map((card) => card.holder_user_id);
37
54
  const names = response.data.users
38
55
  .filter((user) => cardHolderIds.includes(user.user_id))
@@ -45,20 +62,20 @@ const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, ope
45
62
  variables: [
46
63
  {
47
64
  variableName: '_user-name_',
48
- variableValue: names !== null && names !== void 0 ? names : '',
65
+ variableValue: names,
49
66
  },
50
67
  ],
51
68
  }));
52
69
  return (0, rxjs_1.from)(actions);
53
70
  }
54
71
  else {
55
- return (0, rxjs_1.of)((0, chargeCardListReducer_1.issueChargeCardSuccessOrFailure)({
72
+ return (0, rxjs_1.of)((0, issueChargeCardReducer_1.issueChargeCardSuccessOrFailure)({
56
73
  fetchState: 'Error',
57
74
  error: response.status,
58
75
  }));
59
76
  }
60
77
  }), (0, operators_1.catchError)((error) => {
61
- return (0, rxjs_1.of)((0, chargeCardListReducer_1.issueChargeCardSuccessOrFailure)({
78
+ return (0, rxjs_1.of)((0, issueChargeCardReducer_1.issueChargeCardSuccessOrFailure)({
62
79
  fetchState: 'Error',
63
80
  error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Issue Charge Card REST API call errored out' +
64
81
  JSON.stringify(error)),
@@ -0,0 +1,15 @@
1
+ import { ZeniAPIStatus } from '../../../../responsePayload';
2
+ import { FetchState, ID } from '../../../../commonStateTypes/common';
3
+ import { IssueChargeCardState, IssueChargeCardLocalData } from './issueChargeCardState';
4
+ export declare const initialState: IssueChargeCardState;
5
+ export declare const issueChargeCards: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[], {}, string, never, never>, updateChargeCardsLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<IssueChargeCardLocalData[], string>, issueChargeCardSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
6
+ fetchState: FetchState;
7
+ error?: ZeniAPIStatus<Record<string, unknown>> | undefined;
8
+ }, string>, resetIssueChargeCardForm: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateCustomAddressId: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
9
+ addressId: ID;
10
+ cardLineId: ID;
11
+ }, string>, fetchIssueCardPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cacheOverride?: any], {
12
+ cacheOverride: any;
13
+ }, string, never, never>, clearIssueChargeCard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>;
14
+ declare const _default: import("@reduxjs/toolkit").Reducer<IssueChargeCardState, import("@reduxjs/toolkit").AnyAction>;
15
+ export default _default;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.clearIssueChargeCard = exports.fetchIssueCardPage = exports.updateCustomAddressId = exports.resetIssueChargeCardForm = exports.issueChargeCardSuccessOrFailure = exports.updateChargeCardsLocalStore = exports.issueChargeCards = exports.initialState = void 0;
5
+ const toolkit_1 = require("@reduxjs/toolkit");
6
+ const issueChargeCardState_1 = require("./issueChargeCardState");
7
+ exports.initialState = {
8
+ localData: issueChargeCardState_1.initialIssueChargeCardLocalData,
9
+ fetchState: 'Not-Started',
10
+ error: undefined,
11
+ saveStatus: {
12
+ fetchState: 'Not-Started',
13
+ error: undefined,
14
+ },
15
+ hasValidState() {
16
+ return this.fetchState == 'Completed';
17
+ },
18
+ };
19
+ const issueChargeCard = (0, toolkit_1.createSlice)({
20
+ name: 'issueChargeCard',
21
+ initialState: exports.initialState,
22
+ reducers: {
23
+ fetchIssueCardPage: {
24
+ reducer() {
25
+ //do nothing
26
+ },
27
+ prepare(cacheOverride = false) {
28
+ return {
29
+ payload: { cacheOverride },
30
+ };
31
+ },
32
+ },
33
+ issueChargeCards: {
34
+ prepare() {
35
+ return { payload: {} };
36
+ },
37
+ reducer(draft) {
38
+ draft.saveStatus.fetchState = 'In-Progress';
39
+ draft.saveStatus.error = undefined;
40
+ },
41
+ },
42
+ updateChargeCardsLocalStore(draft, action) {
43
+ draft.localData = action.payload;
44
+ },
45
+ resetIssueChargeCardForm(draft) {
46
+ draft.localData = [...exports.initialState.localData];
47
+ },
48
+ issueChargeCardSuccessOrFailure(draft, action) {
49
+ draft.saveStatus.fetchState = action.payload.fetchState;
50
+ draft.saveStatus.error = action.payload.error;
51
+ },
52
+ updateCustomAddressId(draft, action) {
53
+ const { addressId, cardLineId } = action.payload;
54
+ const targetIndex = draft.localData.findIndex((lineItem) => lineItem.lineId === cardLineId);
55
+ if (targetIndex > -1) {
56
+ draft.localData[targetIndex] = Object.assign(Object.assign({}, draft.localData[targetIndex]), { physicalCard: Object.assign(Object.assign({}, draft.localData[targetIndex].physicalCard), { addressId: addressId }) });
57
+ }
58
+ },
59
+ clearIssueChargeCard(draft) {
60
+ Object.assign(draft, exports.initialState);
61
+ },
62
+ },
63
+ });
64
+ _a = issueChargeCard.actions, exports.issueChargeCards = _a.issueChargeCards, exports.updateChargeCardsLocalStore = _a.updateChargeCardsLocalStore, exports.issueChargeCardSuccessOrFailure = _a.issueChargeCardSuccessOrFailure, exports.resetIssueChargeCardForm = _a.resetIssueChargeCardForm, exports.updateCustomAddressId = _a.updateCustomAddressId, exports.fetchIssueCardPage = _a.fetchIssueCardPage, exports.clearIssueChargeCard = _a.clearIssueChargeCard;
65
+ exports.default = issueChargeCard.reducer;
@@ -0,0 +1,22 @@
1
+ import { RootState } from '../../../../reducer';
2
+ import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
3
+ import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
4
+ import { Address } from '../../../../entity/address/addressState';
5
+ import { Person } from '../../../people/peopleSelectorTypes';
6
+ import { Class } from '../../../../entity/class/classState';
7
+ import { IssueChargeCardLocalData } from './issueChargeCardState';
8
+ import { ChargeCardConfigState } from '../chargeCardConfig/chargeCardConfigState';
9
+ import { CreditAccount } from '../chargeCardList/chargeCardList';
10
+ export interface IssueChargeCardSelectorView extends SelectorView {
11
+ localData: IssueChargeCardLocalData[];
12
+ issueCardStatus: FetchStateAndError;
13
+ userList: Person[];
14
+ allAccountingClasses: Class[];
15
+ chargeCardConfig: ChargeCardConfigState;
16
+ creditAccount: CreditAccount;
17
+ customAddress: Record<ID, Address>;
18
+ customAddressStatus: Record<ID, FetchStateAndError>;
19
+ userAddress: Record<ID, Address>;
20
+ companyAddress?: Address;
21
+ }
22
+ export declare const getIssueChargeCardView: (state: RootState) => IssueChargeCardSelectorView;
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getIssueChargeCardView = void 0;
4
+ const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
5
+ const addressSelector_1 = require("../../../../entity/address/addressSelector");
6
+ const addressViewSelector_1 = require("../../../addressView/addressViewSelector");
7
+ const getCompanyView_1 = require("../../../companyView/selectorHelpers/getCompanyView");
8
+ const classSelector_1 = require("../../../../entity/class/classSelector");
9
+ const userListViewSelector_1 = require("../../../userListView/userListViewSelector");
10
+ const getIssueChargeCardView = (state) => {
11
+ var _a, _b;
12
+ const { issueChargeCardState, userState, userRoleState, userListViewState, chargeCardConfigState, chargeCardListState, tenantState, addressState, classState, classListState, } = state;
13
+ const userListSelectorView = (0, userListViewSelector_1.getUserList)(userState, userRoleState, userListViewState, 'cardHolderCandidate');
14
+ const userList = userListSelectorView.users;
15
+ let selectedUserAddress = {};
16
+ userList.forEach((user) => {
17
+ var _a, _b;
18
+ const userAddress = (0, addressSelector_1.getAddressByAddressId)(addressState, (_b = (_a = user.userRole) === null || _a === void 0 ? void 0 : _a.addressId) !== null && _b !== void 0 ? _b : '');
19
+ if (userAddress != null) {
20
+ selectedUserAddress = Object.assign(Object.assign({}, selectedUserAddress), { [user.userId]: userAddress });
21
+ }
22
+ });
23
+ const { currentTenantId } = tenantState;
24
+ const companyId = currentTenantId != null
25
+ ? (_b = (_a = tenantState.tenantsById) === null || _a === void 0 ? void 0 : _a[currentTenantId]) === null || _b === void 0 ? void 0 : _b.companyId
26
+ : '';
27
+ const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId, []);
28
+ const companyAddress = companyView === null || companyView === void 0 ? void 0 : companyView.companyAddress;
29
+ let customAddressStatus = {};
30
+ let customAddress = {};
31
+ const defaultFetchState = {
32
+ fetchState: 'Not-Started',
33
+ error: undefined,
34
+ };
35
+ issueChargeCardState.localData.forEach((lineItem) => {
36
+ var _a;
37
+ if (lineItem.cardType === 'business_physical_credit_card') {
38
+ const targetLineId = lineItem.lineId;
39
+ const newlyAddedAddress = (0, addressViewSelector_1.getNewAddress)(`custom_shipping_${targetLineId}_address`, state);
40
+ customAddressStatus = Object.assign(Object.assign({}, customAddressStatus), { [targetLineId]: (_a = newlyAddedAddress === null || newlyAddedAddress === void 0 ? void 0 : newlyAddedAddress.status) !== null && _a !== void 0 ? _a : defaultFetchState });
41
+ if (newlyAddedAddress != null &&
42
+ newlyAddedAddress.status.fetchState === 'Completed' &&
43
+ newlyAddedAddress.newAddressId != null) {
44
+ const addressFromEntity = (0, addressSelector_1.getAddressByAddressId)(addressState, newlyAddedAddress.newAddressId);
45
+ if (addressFromEntity != null) {
46
+ customAddress = Object.assign(Object.assign({}, customAddress), { [targetLineId]: addressFromEntity });
47
+ }
48
+ }
49
+ }
50
+ });
51
+ const issueCardPageFetchState = (0, reduceFetchState_1.reduceFetchState)([
52
+ chargeCardConfigState,
53
+ userListSelectorView,
54
+ chargeCardListState.creditAccount,
55
+ tenantState,
56
+ ]);
57
+ const { classIds } = classListState;
58
+ const allAccountingClasses = (0, classSelector_1.getClassesByIds)(classState, {
59
+ classIds: classIds,
60
+ reportId: 'class_list',
61
+ });
62
+ return {
63
+ fetchState: issueCardPageFetchState.fetchState,
64
+ error: issueCardPageFetchState.error,
65
+ issueCardStatus: issueChargeCardState.saveStatus,
66
+ localData: issueChargeCardState.localData,
67
+ userList,
68
+ chargeCardConfig: chargeCardConfigState,
69
+ creditAccount: chargeCardListState.creditAccount,
70
+ companyAddress: companyAddress,
71
+ customAddress,
72
+ customAddressStatus,
73
+ userAddress: selectedUserAddress,
74
+ allAccountingClasses,
75
+ };
76
+ };
77
+ exports.getIssueChargeCardView = getIssueChargeCardView;
@@ -0,0 +1,28 @@
1
+ import { Amount } from '../../../../commonStateTypes/amount';
2
+ import { FetchedState, FetchStateAndError, ID } from '../../../../commonStateTypes/common';
3
+ import { CreditLimitFrequencyCodeType, CardCodeType, ShippingAddressType } from '../../../../entity/chargeCard/chargeCard';
4
+ export interface IssueChargeCardState extends FetchedState {
5
+ localData: IssueChargeCardLocalData[];
6
+ saveStatus: FetchStateAndError;
7
+ }
8
+ export interface PhysicalCardData {
9
+ addressType: ShippingAddressType;
10
+ cardName: string;
11
+ frequency: CreditLimitFrequencyCodeType;
12
+ addressId?: ID;
13
+ amount?: Amount;
14
+ userIds?: ID;
15
+ }
16
+ export interface VirtualCardData {
17
+ userIds: ID[];
18
+ cardName: string;
19
+ frequency: CreditLimitFrequencyCodeType;
20
+ amount?: Amount;
21
+ }
22
+ export interface IssueChargeCardLocalData {
23
+ lineId: ID;
24
+ cardType: CardCodeType;
25
+ physicalCard: PhysicalCardData;
26
+ virtualCard: VirtualCardData;
27
+ }
28
+ export declare const initialIssueChargeCardLocalData: IssueChargeCardLocalData[];
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initialIssueChargeCardLocalData = void 0;
4
+ exports.initialIssueChargeCardLocalData = [
5
+ {
6
+ lineId: '1',
7
+ cardType: 'business_virtual_credit_card',
8
+ physicalCard: {
9
+ addressType: 'company_address',
10
+ cardName: '',
11
+ frequency: 'monthly',
12
+ addressId: undefined,
13
+ amount: undefined,
14
+ userIds: undefined,
15
+ },
16
+ virtualCard: {
17
+ userIds: [],
18
+ cardName: '',
19
+ frequency: 'monthly',
20
+ amount: undefined,
21
+ },
22
+ },
23
+ ];
@@ -16,6 +16,6 @@ import { CompanyDetailsVerificationPayload, CompanyOfficerVerificationPayload, N
16
16
  import { CompanyDetailsLocalData, CompanyOfficerLocalData, PrimaryContactLocalData } from '../../setupViewState';
17
17
  export declare type ActionType = ReturnType<typeof updateBusinessVerificationDetails> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateFiles> | ReturnType<typeof updateAccounts> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof updateSelectedCompanyOfficer> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateBusinessVerificationDetailsSuccess> | ReturnType<typeof updateBusinessVerificationDetailsFailure>;
18
18
  export declare const updateBusinessVerificationDetailsEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
19
- export declare const toBusinessVerificationCompanyDataPayload: (companyLocalData: CompanyDetailsLocalData, sendForVerification: boolean, companyAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyDetailsVerificationPayload>;
19
+ export declare const toBusinessVerificationCompanyDataPayload: (companyLocalData: CompanyDetailsLocalData, sendForVerification: boolean, companyAddressData?: AddressUpdatableInfo | undefined, registeredAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyDetailsVerificationPayload>;
20
20
  export declare const toBusinessVerificationPrimaryContactDataPayload: (primaryContact: PrimaryContactLocalData, isNewPrimaryContactUser: boolean) => Partial<PrimaryContactVerificationPayload>;
21
21
  export declare const toBusinessVerificationOfficerDataPayload: (companyOfficer: CompanyOfficerLocalData, isSubmittingAdditionalDocuments: boolean, companyOfficerAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyOfficerVerificationPayload> | Partial<NewCompanyOfficerVerificationPayload>;
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.toBusinessVerificationOfficerDataPayload = exports.toBusinessVerificationPrimaryContactDataPayload = exports.toBusinessVerificationCompanyDataPayload = exports.updateBusinessVerificationDetailsEpic = void 0;
4
7
  const rxjs_1 = require("rxjs");
@@ -15,8 +18,10 @@ const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/pa
15
18
  const addressViewPayload_1 = require("../../../../addressView/addressViewPayload");
16
19
  const getCompanyView_1 = require("../../../../companyView/selectorHelpers/getCompanyView");
17
20
  const setupViewReducer_1 = require("../../setupViewReducer");
21
+ const addressViewSelector_1 = require("../../../../addressView/addressViewSelector");
22
+ const isEqual_1 = __importDefault(require("lodash/isEqual"));
18
23
  const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.updateBusinessVerificationDetails.match), (0, operators_1.mergeMap)((action) => {
19
- var _a, _b, _c;
24
+ var _a, _b, _c, _d;
20
25
  const { companyId, officerType, setupViewType, sendForVerification, fromBillListScreen, isSubmittingAdditionalDocuments, } = action.payload;
21
26
  const { setupViewState } = state$.value;
22
27
  const companyLocalData = setupViewState.companyDetails.localData;
@@ -26,14 +31,15 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
26
31
  const companyView = (0, getCompanyView_1.getCompanyView)(state$.value, companyId, []);
27
32
  const { newAddressState } = state$.value.addressViewState;
28
33
  const companyAddressToCreate = (_a = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_address) === null || _a === void 0 ? void 0 : _a.addressToCreate;
34
+ const registeredAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_registered_address) === null || _b === void 0 ? void 0 : _b.addressToCreate;
29
35
  const addressType = officerType
30
36
  .toLowerCase()
31
37
  .concat('_address');
32
- const companyOfficerAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState[addressType]) === null || _b === void 0 ? void 0 : _b.addressToCreate;
38
+ const companyOfficerAddressToCreate = (_c = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState[addressType]) === null || _c === void 0 ? void 0 : _c.addressToCreate;
33
39
  const isNewPrimaryContactUser = (primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.userId) == null ||
34
40
  (primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.email) !==
35
- ((_c = companyView === null || companyView === void 0 ? void 0 : companyView.primaryContact) === null || _c === void 0 ? void 0 : _c.user.email);
36
- const company = (0, exports.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate);
41
+ ((_d = companyView === null || companyView === void 0 ? void 0 : companyView.primaryContact) === null || _d === void 0 ? void 0 : _d.user.email);
42
+ const company = (0, exports.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate, registeredAddressToCreate);
37
43
  const primary_contact_user = primaryContactLocalData != null &&
38
44
  Boolean(primaryContactLocalData.email) === true // Don't save Empty Primary Contact details
39
45
  ? (0, exports.toBusinessVerificationPrimaryContactDataPayload)(primaryContactLocalData, isNewPrimaryContactUser)
@@ -104,7 +110,7 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
104
110
  }
105
111
  }));
106
112
  exports.updateBusinessVerificationDetailsEpic = updateBusinessVerificationDetailsEpic;
107
- const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerification, companyAddressData) => {
113
+ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerification, companyAddressData, registeredAddressData) => {
108
114
  const { companyDescription, companyLegalName, companyIndustry, website, incDate, taxIdOrEIN, phone, syncToken, fileIds, typeOfIncorporation, } = companyLocalData;
109
115
  const company = {
110
116
  is_ready_for_verification: sendForVerification,
@@ -113,6 +119,19 @@ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerif
113
119
  const companyAddressPayload = companyAddressData != null
114
120
  ? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(companyAddressData)
115
121
  : undefined;
122
+ const registeredAddressPayload = registeredAddressData != null
123
+ ? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(registeredAddressData)
124
+ : undefined;
125
+ if ((0, isEqual_1.default)(companyAddressData != null
126
+ ? (0, addressViewSelector_1.getFormattedAddress)(companyAddressData)
127
+ : companyAddressData, registeredAddressData != null
128
+ ? (0, addressViewSelector_1.getFormattedAddress)(registeredAddressData)
129
+ : registeredAddressData)) {
130
+ company['is_registered_address_same_as_company_address'] = true;
131
+ }
132
+ else {
133
+ company['is_registered_address_same_as_company_address'] = false;
134
+ }
116
135
  if (companyDescription != null) {
117
136
  company['company_description'] = companyDescription;
118
137
  }
@@ -137,6 +156,9 @@ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerif
137
156
  if (companyAddressPayload != null) {
138
157
  company['address'] = companyAddressPayload;
139
158
  }
159
+ if (registeredAddressPayload != null) {
160
+ company['registered_address'] = registeredAddressPayload;
161
+ }
140
162
  if (typeOfIncorporation != null) {
141
163
  company['company_inc_type'] = typeOfIncorporation;
142
164
  }
@@ -163,7 +185,7 @@ const toBusinessVerificationPrimaryContactDataPayload = (primaryContact, isNewPr
163
185
  };
164
186
  exports.toBusinessVerificationPrimaryContactDataPayload = toBusinessVerificationPrimaryContactDataPayload;
165
187
  const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAdditionalDocuments, companyOfficerAddressData) => {
166
- const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday, phone: userPhone, otpChallenge, isPhoneVerified, titleAtCompany, ownershipInCompany, documentTypeSelectedForVerification, fileIds: userFileIds, additionalSubmittedDocumentsForVerificationFileIds, } = companyOfficer;
188
+ const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday, nationalityCountryCode, phone: userPhone, otpChallenge, isPhoneVerified, titleAtCompany, ownershipInCompany, documentTypeSelectedForVerification, fileIds: userFileIds, additionalSubmittedDocumentsForVerificationFileIds, } = companyOfficer;
167
189
  const company_officer = {
168
190
  first_name: firstName,
169
191
  last_name: lastName,
@@ -194,6 +216,9 @@ const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAd
194
216
  if (birthday != null) {
195
217
  company_officer['birthday'] = birthday.format('YYYY-MM-DD');
196
218
  }
219
+ if (nationalityCountryCode != null) {
220
+ company_officer['nationality_country_code'] = nationalityCountryCode;
221
+ }
197
222
  if (userPhone != null) {
198
223
  company_officer['phone'] = userPhone;
199
224
  }
@@ -5,8 +5,8 @@ import { Company } from '../../../../../entity/company/companyStateTypes';
5
5
  import { clearSetupViewDataInLocalStore, saveSetupViewDataInLocalStore, updateSetupViewLocalStoreData } from '../../setupViewReducer';
6
6
  import { SetupViewLocalData } from '../../setupViewState';
7
7
  import { UserRole } from '../../../../../entity/userRole/userRoleState';
8
- import { newAddressInLocalStore, resetNewAddressesInLocalStore } from '../../../../addressView/addressViewReducer';
9
- export declare type ActionType = ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof saveSetupViewDataInLocalStore> | ReturnType<typeof clearSetupViewDataInLocalStore> | ReturnType<typeof resetNewAddressesInLocalStore> | ReturnType<typeof newAddressInLocalStore>;
8
+ import { newAddressInLocalStore, resetNewAddressDataInLocalStoreForAddressTypes } from '../../../../addressView/addressViewReducer';
9
+ export declare type ActionType = ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof saveSetupViewDataInLocalStore> | ReturnType<typeof clearSetupViewDataInLocalStore> | ReturnType<typeof resetNewAddressDataInLocalStoreForAddressTypes> | ReturnType<typeof newAddressInLocalStore>;
10
10
  export declare const updateSetupViewLocalStoreDataEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => import("rxjs").Observable<ActionType>;
11
11
  /**
12
12
  * Helpers
@@ -29,7 +29,8 @@ const updateSetupViewLocalStoreDataEpic = (actions$, state$) => actions$.pipe((0
29
29
  const fetchActions = [];
30
30
  if (company != null) {
31
31
  const setupViewLocalData = toSetupViewLocalData(company, companyOfficers, companyOfficerRoles, primaryContact);
32
- fetchActions.push((0, setupViewReducer_1.clearSetupViewDataInLocalStore)(), (0, setupViewReducer_1.saveSetupViewDataInLocalStore)(setupViewLocalData), (0, addressViewReducer_1.resetNewAddressesInLocalStore)());
32
+ fetchActions.push((0, setupViewReducer_1.clearSetupViewDataInLocalStore)(), (0, setupViewReducer_1.saveSetupViewDataInLocalStore)(setupViewLocalData));
33
+ fetchActions.push((0, addressViewReducer_1.resetNewAddressDataInLocalStoreForAddressTypes)(companyUsersLocalData_1.AllCompanyPassportAddressTypes));
33
34
  }
34
35
  if (companyView != null) {
35
36
  const addresses = (0, toAddressViewLocalData_1.toAddressViewLocalData)(companyView);
@@ -90,7 +91,7 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
90
91
  }
91
92
  const officers = companyOfficers.map((user, index) => {
92
93
  var _a, _b, _c, _d, _e;
93
- const { userId, firstName, lastName, birthday, email, phone: userPhone, isPhoneVerified, ssn, syncToken, } = user;
94
+ const { userId, firstName, lastName, birthday, email, nationalityCountryCode, phone: userPhone, isPhoneVerified, ssn, syncToken, } = user;
94
95
  const userRole = userRoles.find((userRole) => userRole.userId === userId);
95
96
  return {
96
97
  officerType: `Officer_${index + 1}`,
@@ -99,6 +100,7 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
99
100
  lastName,
100
101
  birthday,
101
102
  email,
103
+ nationalityCountryCode,
102
104
  phone: userPhone,
103
105
  isPhoneVerified,
104
106
  ssn,
@@ -122,6 +124,7 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
122
124
  firstName: '',
123
125
  lastName: '',
124
126
  email: '',
127
+ nationalityCountryCode: undefined,
125
128
  fileIds: [],
126
129
  isSelectedForVerification: false,
127
130
  additionalDocumentTypesRequestedForVerification: [],
@@ -16,6 +16,7 @@ import { DepositAccount } from '../../../entity/depositAccount/depositAccount';
16
16
  import { AllowedValueWithCode } from '../../../commonStateTypes/allowedValue';
17
17
  import { Amount } from '../../../commonStateTypes/amount';
18
18
  import { BalanceChange } from '../../../commonStateTypes/balance';
19
+ import { Country } from '../../countryList/countryListState';
19
20
  export interface SetupView {
20
21
  allFundingAccounts: FundingAccount[];
21
22
  allBankAccounts: AccountBase[];
@@ -72,6 +73,7 @@ export interface CompanyDetails {
72
73
  incDate?: ZeniDate;
73
74
  syncToken?: string;
74
75
  addressStatus?: NewAddressData;
76
+ registeredAddressStatus?: NewAddressData;
75
77
  primaryContactLocalData?: PrimaryContactLocalData;
76
78
  typeOfIncorporation?: string;
77
79
  }
@@ -80,8 +82,9 @@ interface CompanyAndOfficerLocalData {
80
82
  companyOfficerLocalData: Record<CompanyOfficerType, CompanyOfficersDetails | undefined>;
81
83
  }
82
84
  export interface BusinessVerificationDetails extends CompanyAndOfficerLocalData {
83
- companyView?: CompanyView;
84
85
  updateStatus: FetchStateAndError;
86
+ allNationalityCountries: Country[];
87
+ companyView?: CompanyView;
85
88
  }
86
89
  export declare function getCommonSetupViewDetails(state: RootState, companyId: ID, setupViewType: SetupViewType, plaidAccountKeyType: PlaidAccountKeyType): SetupView;
87
90
  export declare function getBusinessVerificationDetails(state: RootState, companyId: ID): BusinessVerificationDetails;
@@ -82,7 +82,7 @@ function getPrimaryAccountForTheProduct(state, companyId, setupViewType) {
82
82
  return primaryFundingAccount;
83
83
  }
84
84
  function getBusinessVerificationDetails(state, companyId) {
85
- const { setupViewState } = state;
85
+ const { setupViewState, countryListState } = state;
86
86
  const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, updateStatus, } = setupViewState;
87
87
  const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId, []);
88
88
  const { companyDetailsLocalData, companyOfficerLocalData } = (0, exports.getCompanyAndIdentityDetails)(state, companyId, {
@@ -90,16 +90,18 @@ function getBusinessVerificationDetails(state, companyId) {
90
90
  companyOfficerUpdateStatus,
91
91
  primaryContactDetails,
92
92
  });
93
+ const allNationalityCountries = countryListState.byCountryListCode.nationalityCountryList.countries;
93
94
  return {
94
95
  companyDetailsLocalData,
95
96
  companyOfficerLocalData,
96
97
  companyView,
97
98
  updateStatus,
99
+ allNationalityCountries,
98
100
  };
99
101
  }
100
102
  exports.getBusinessVerificationDetails = getBusinessVerificationDetails;
101
103
  const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetails) => {
102
- var _a;
104
+ var _a, _b;
103
105
  const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails } = companyAndIdentityDetails;
104
106
  const { fileState, addressViewState } = state;
105
107
  const { localData: primaryContactLocalData } = primaryContactDetails;
@@ -115,6 +117,7 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
115
117
  updateFileStatusById[fileId] = (0, fileViewSelector_1.getFileUpdateNameStatusById)(state, fileId);
116
118
  });
117
119
  const companyAddress = (_a = addressViewState.newAddressState) === null || _a === void 0 ? void 0 : _a.company_address;
120
+ const registeredCompanyAddress = (_b = addressViewState.newAddressState) === null || _b === void 0 ? void 0 : _b.company_registered_address;
118
121
  companyDetailsLocalData = {
119
122
  companyId,
120
123
  companyDescription,
@@ -129,6 +132,7 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
129
132
  deleteFileStatusById,
130
133
  updateFileStatusById,
131
134
  addressStatus: companyAddress,
135
+ registeredAddressStatus: registeredCompanyAddress,
132
136
  primaryContactLocalData,
133
137
  typeOfIncorporation,
134
138
  };
@@ -35,6 +35,7 @@ export interface CompanyOfficerLocalData {
35
35
  firstName: string;
36
36
  lastName: string;
37
37
  email: string;
38
+ nationalityCountryCode?: string;
38
39
  ssn?: string;
39
40
  phone?: string;
40
41
  isPhoneVerified?: boolean;