@zeniai/client-epic-state 5.1.7 → 5.1.8-betaAS1

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 (444) hide show
  1. package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
  2. package/lib/commonPayloadTypes/commonPayload.d.ts +25 -4
  3. package/lib/commonStateTypes/amount.d.ts +1 -0
  4. package/lib/commonStateTypes/amount.js +9 -1
  5. package/lib/commonStateTypes/animations.d.ts +1 -1
  6. package/lib/commonStateTypes/animations.js +1 -0
  7. package/lib/commonStateTypes/workingDayHelper.d.ts +9 -0
  8. package/lib/commonStateTypes/workingDayHelper.js +28 -1
  9. package/lib/entity/aiCfo/aiCfoPayload.d.ts +63 -5
  10. package/lib/entity/aiCfo/aiCfoReducer.d.ts +23 -2
  11. package/lib/entity/aiCfo/aiCfoReducer.js +249 -9
  12. package/lib/entity/aiCfo/aiCfoSelector.d.ts +4 -1
  13. package/lib/entity/aiCfo/aiCfoSelector.js +19 -1
  14. package/lib/entity/aiCfo/aiCfoState.d.ts +97 -4
  15. package/lib/entity/aiCfo/aiCfoState.js +20 -1
  16. package/lib/entity/approvalRule/approvalRuleConflict.d.ts +56 -0
  17. package/lib/entity/approvalRule/approvalRuleConflict.js +77 -0
  18. package/lib/entity/approvalRule/approvalRulePayload.d.ts +34 -5
  19. package/lib/entity/approvalRule/approvalRulePayload.js +149 -10
  20. package/lib/entity/approvalRule/approvalRuleSelector.d.ts +25 -1
  21. package/lib/entity/approvalRule/approvalRuleSelector.js +40 -0
  22. package/lib/entity/approvalRule/approvalRuleState.d.ts +59 -7
  23. package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +277 -0
  24. package/lib/entity/cardPolicy/cardPolicyPayload.js +143 -0
  25. package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +19 -0
  26. package/lib/entity/cardPolicy/cardPolicyReducer.js +175 -0
  27. package/lib/entity/cardPolicy/cardPolicySelector.d.ts +32 -0
  28. package/lib/entity/cardPolicy/cardPolicySelector.js +99 -0
  29. package/lib/entity/cardPolicy/cardPolicyState.d.ts +205 -0
  30. package/lib/entity/cardPolicy/cardPolicyState.js +14 -0
  31. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +18 -0
  32. package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +68 -0
  33. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +26 -0
  34. package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +47 -0
  35. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +25 -0
  36. package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +39 -0
  37. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +24 -0
  38. package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +105 -0
  39. package/lib/entity/company/companyPayload.d.ts +4 -0
  40. package/lib/entity/company/companyPayload.js +6 -0
  41. package/lib/entity/company/companyStateTypes.d.ts +7 -0
  42. package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
  43. package/lib/entity/jeSchedules/jeSchedulesPayload.js +19 -0
  44. package/lib/entity/jeSchedules/jeSchedulesState.d.ts +2 -0
  45. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
  46. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
  47. package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
  48. package/lib/entity/paymentAccount/paymentAccountSelector.js +9 -0
  49. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  50. package/lib/entity/snackbar/snackbarTypes.js +5 -0
  51. package/lib/entity/task/taskPayload.d.ts +3 -1
  52. package/lib/entity/task/taskPayload.js +2 -0
  53. package/lib/entity/task/taskState.d.ts +2 -0
  54. package/lib/entity/tenant/clearAllEpic.d.ts +8 -2
  55. package/lib/entity/tenant/clearAllEpic.js +12 -0
  56. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
  57. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
  58. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +59 -0
  59. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
  60. package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
  61. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
  62. package/lib/entity/tenant/tenantPayload.d.ts +3 -2
  63. package/lib/entity/tenant/tenantReducer.d.ts +44 -30
  64. package/lib/entity/tenant/tenantReducer.js +130 -29
  65. package/lib/entity/tenant/tenantState.d.ts +3 -2
  66. package/lib/entity/transaction/payloadTypes/transactionPayload.js +4 -2
  67. package/lib/epic.d.ts +32 -4
  68. package/lib/epic.js +33 -4
  69. package/lib/esm/commonStateTypes/amount.js +7 -0
  70. package/lib/esm/commonStateTypes/animations.js +1 -0
  71. package/lib/esm/commonStateTypes/workingDayHelper.js +26 -0
  72. package/lib/esm/entity/aiCfo/aiCfoReducer.js +249 -9
  73. package/lib/esm/entity/aiCfo/aiCfoSelector.js +17 -1
  74. package/lib/esm/entity/aiCfo/aiCfoState.js +17 -0
  75. package/lib/esm/entity/approvalRule/approvalRuleConflict.js +74 -0
  76. package/lib/esm/entity/approvalRule/approvalRulePayload.js +149 -10
  77. package/lib/esm/entity/approvalRule/approvalRuleSelector.js +35 -0
  78. package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +130 -0
  79. package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +171 -0
  80. package/lib/esm/entity/cardPolicy/cardPolicySelector.js +75 -0
  81. package/lib/esm/entity/cardPolicy/cardPolicyState.js +9 -0
  82. package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +64 -0
  83. package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +43 -0
  84. package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +35 -0
  85. package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +101 -0
  86. package/lib/esm/entity/company/companyPayload.js +6 -0
  87. package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +19 -0
  88. package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +8 -0
  89. package/lib/esm/entity/snackbar/snackbarTypes.js +5 -0
  90. package/lib/esm/entity/task/taskPayload.js +2 -0
  91. package/lib/esm/entity/tenant/clearAllEpic.js +12 -0
  92. package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +55 -0
  93. package/lib/esm/entity/tenant/tenantReducer.js +128 -27
  94. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +4 -2
  95. package/lib/esm/epic.js +33 -4
  96. package/lib/esm/index.js +74 -28
  97. package/lib/esm/reducer.js +18 -0
  98. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +6 -3
  99. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
  100. package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +2 -1
  101. package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
  102. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +39 -11
  103. package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +14 -4
  104. package/lib/esm/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +38 -0
  105. package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +37 -28
  106. package/lib/esm/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +16 -0
  107. package/lib/esm/view/companyView/companyViewReducer.js +11 -10
  108. package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +5 -5
  109. package/lib/esm/view/companyView/epic/companyPassport/{updateCapitalizationThresholdEpic.js → updateCapitalizationAccountThresholdEpic.js} +38 -19
  110. package/lib/esm/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
  111. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -1
  112. package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
  113. package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
  114. package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +40 -0
  115. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +29 -0
  116. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
  117. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +24 -18
  118. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.js +29 -17
  119. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +223 -51
  120. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +36 -18
  121. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +45 -6
  122. package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +22 -2
  123. package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +14 -0
  124. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +109 -12
  125. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +10 -2
  126. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +8 -4
  127. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +11 -7
  128. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +54 -0
  129. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +13 -4
  130. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +144 -16
  131. package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +60 -4
  132. package/lib/esm/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +8 -2
  133. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +7 -3
  134. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +33 -34
  135. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +2 -7
  136. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +146 -0
  137. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +40 -0
  138. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +86 -0
  139. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +55 -8
  140. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +5 -6
  141. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +39 -15
  142. package/lib/esm/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +154 -0
  143. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +29 -0
  144. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +78 -0
  145. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +49 -0
  146. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +47 -0
  147. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +32 -0
  148. package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +32 -0
  149. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +54 -0
  150. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +92 -0
  151. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +212 -0
  152. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +10 -0
  153. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +23 -0
  154. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +36 -0
  155. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +27 -0
  156. package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +28 -0
  157. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +52 -0
  158. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +22 -0
  159. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +1 -0
  160. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +36 -0
  161. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +39 -0
  162. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +34 -0
  163. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +71 -0
  164. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +21 -0
  165. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +1 -0
  166. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +38 -0
  167. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +289 -0
  168. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +109 -0
  169. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +44 -0
  170. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +111 -0
  171. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +25 -0
  172. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +363 -0
  173. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +36 -0
  174. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +19 -0
  175. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +6 -0
  176. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +119 -0
  177. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +154 -0
  178. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +22 -0
  179. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +1 -0
  180. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +49 -0
  181. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +140 -0
  182. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +20 -0
  183. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +100 -0
  184. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +96 -0
  185. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +59 -0
  186. package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +24 -0
  187. package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +25 -0
  188. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +1 -0
  189. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +34 -0
  190. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +57 -0
  191. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +35 -0
  192. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
  193. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +42 -4
  194. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +35 -0
  195. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +62 -0
  196. package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +44 -0
  197. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +58 -0
  198. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +77 -0
  199. package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
  200. package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +221 -0
  201. package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +106 -52
  202. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  203. package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +41 -0
  204. package/lib/esm/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +5 -1
  205. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +10 -2
  206. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +8 -2
  207. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +11 -7
  208. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +61 -0
  209. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +13 -4
  210. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +80 -11
  211. package/lib/index.d.ts +92 -36
  212. package/lib/index.js +285 -35
  213. package/lib/reducer.d.ts +18 -0
  214. package/lib/reducer.js +18 -0
  215. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +11 -2
  216. package/lib/view/aiCfoView/aiCfoViewReducer.js +6 -3
  217. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
  218. package/lib/view/aiCfoView/epics/createSessionEpic.js +2 -1
  219. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -1
  220. package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
  221. package/lib/view/companyTaskManagerView/companyTaskManagerViewPayload.d.ts +19 -11
  222. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +11 -5
  223. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +40 -12
  224. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +2 -0
  225. package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +13 -3
  226. package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +11 -3
  227. package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.d.ts +10 -0
  228. package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +42 -0
  229. package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.d.ts +1 -3
  230. package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +37 -28
  231. package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.d.ts +6 -0
  232. package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +20 -0
  233. package/lib/view/companyView/companyViewReducer.d.ts +8 -7
  234. package/lib/view/companyView/companyViewReducer.js +12 -11
  235. package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +5 -5
  236. package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.d.ts +10 -0
  237. package/lib/view/companyView/epic/companyPassport/{updateCapitalizationThresholdEpic.js → updateCapitalizationAccountThresholdEpic.js} +38 -19
  238. package/lib/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
  239. package/lib/view/companyView/types/cockpitTypes.d.ts +3 -2
  240. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  241. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +1 -1
  242. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -1
  243. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -1
  244. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
  245. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -1
  246. package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
  247. package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
  248. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
  249. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +44 -0
  250. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +8 -0
  251. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +33 -0
  252. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
  253. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
  254. package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +24 -18
  255. package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.d.ts +2 -2
  256. package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewLocalStoreDataEpic.js +27 -15
  257. package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
  258. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +44 -5
  259. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +225 -52
  260. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +6 -1
  261. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +39 -18
  262. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +53 -8
  263. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +47 -7
  264. package/lib/view/people/peopleTypes.d.ts +1 -1
  265. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
  266. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +8 -1
  267. package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +21 -1
  268. package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +22 -0
  269. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +7 -0
  270. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +14 -0
  271. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.d.ts +14 -3
  272. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +110 -13
  273. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState.d.ts +16 -0
  274. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +10 -2
  275. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +8 -4
  276. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +10 -6
  277. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.d.ts +23 -0
  278. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +58 -0
  279. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +12 -3
  280. package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +59 -1
  281. package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +146 -17
  282. package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +31 -5
  283. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +8 -1
  284. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +60 -4
  285. package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +8 -2
  286. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +3 -3
  287. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +6 -2
  288. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +2 -1
  289. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +32 -33
  290. package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +2 -7
  291. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.d.ts +4 -0
  292. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireOnboardingDetailsToLocalData.js +150 -0
  293. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.d.ts +38 -0
  294. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationFieldConstants.js +43 -0
  295. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.d.ts +27 -0
  296. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationLocalDataHelpers.js +96 -0
  297. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +24 -1
  298. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +59 -9
  299. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +4 -5
  300. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +39 -15
  301. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +20 -1
  302. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.d.ts +32 -0
  303. package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSubmitPayload.js +159 -0
  304. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.d.ts +47 -0
  305. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +34 -0
  306. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.d.ts +23 -0
  307. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +82 -0
  308. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.d.ts +40 -0
  309. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +53 -0
  310. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.d.ts +37 -0
  311. package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +53 -0
  312. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.d.ts +14 -0
  313. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +36 -0
  314. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.d.ts +7 -0
  315. package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +36 -0
  316. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.d.ts +56 -0
  317. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +60 -0
  318. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.d.ts +22 -0
  319. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +96 -0
  320. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.d.ts +59 -0
  321. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +217 -0
  322. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.d.ts +122 -0
  323. package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +13 -0
  324. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.d.ts +7 -0
  325. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +27 -0
  326. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.d.ts +9 -0
  327. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +40 -0
  328. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.d.ts +7 -0
  329. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +31 -0
  330. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.d.ts +15 -0
  331. package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +32 -0
  332. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +14 -0
  333. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +56 -0
  334. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +15 -0
  335. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +28 -0
  336. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +8 -0
  337. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +2 -0
  338. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +8 -0
  339. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +40 -0
  340. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +8 -0
  341. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +43 -0
  342. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +8 -0
  343. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +38 -0
  344. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +15 -0
  345. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +75 -0
  346. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +15 -0
  347. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +27 -0
  348. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +7 -0
  349. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +2 -0
  350. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +8 -0
  351. package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +42 -0
  352. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +8 -0
  353. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +294 -0
  354. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +8 -0
  355. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +113 -0
  356. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +9 -0
  357. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +48 -0
  358. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +8 -0
  359. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +115 -0
  360. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +13 -0
  361. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +29 -0
  362. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +14 -0
  363. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +369 -0
  364. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +6 -0
  365. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +40 -0
  366. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +7 -0
  367. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +26 -0
  368. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +116 -0
  369. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +10 -0
  370. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +33 -0
  371. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +126 -0
  372. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +52 -0
  373. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +158 -0
  374. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +11 -0
  375. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +31 -0
  376. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +12 -0
  377. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +2 -0
  378. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +9 -0
  379. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +53 -0
  380. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +10 -0
  381. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +144 -0
  382. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +7 -0
  383. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +24 -0
  384. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +11 -0
  385. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +104 -0
  386. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +22 -0
  387. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +100 -0
  388. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +8 -0
  389. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +63 -0
  390. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +3 -0
  391. package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +28 -0
  392. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  393. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +14 -0
  394. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +27 -1
  395. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +34 -0
  396. package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +2 -0
  397. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +7 -0
  398. package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +38 -0
  399. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +12 -0
  400. package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +61 -0
  401. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +9 -0
  402. package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +39 -0
  403. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
  404. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
  405. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +12 -2
  406. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +43 -5
  407. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +7 -0
  408. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +42 -1
  409. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +5 -0
  410. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +11 -0
  411. package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +66 -0
  412. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +3 -0
  413. package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +48 -0
  414. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +28 -0
  415. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +62 -0
  416. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +9 -0
  417. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +81 -0
  418. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +24 -0
  419. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -0
  420. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +29 -0
  421. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +229 -0
  422. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +28 -2
  423. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +107 -53
  424. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +7 -2
  425. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
  426. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +19 -0
  427. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +154 -0
  428. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +46 -0
  429. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +5 -1
  430. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +10 -2
  431. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +8 -2
  432. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +10 -6
  433. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.d.ts +14 -0
  434. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +65 -0
  435. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +12 -3
  436. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.d.ts +14 -3
  437. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +81 -12
  438. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewState.d.ts +12 -0
  439. package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
  440. package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
  441. package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
  442. package/lib/zeniAPI.d.ts +1 -0
  443. package/package.json +6 -4
  444. package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.d.ts +0 -10
@@ -3,41 +3,40 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.initializeIntlVerificationFormEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
+ const tenantSelector_1 = require("../../../../../entity/tenant/tenantSelector");
7
+ const billPaySetupViewReducer_1 = require("../../billPaySetupView/billPaySetupViewReducer");
8
+ const internationalWireOnboardingDetailsToLocalData_1 = require("../internationalWireOnboardingDetailsToLocalData");
6
9
  const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
7
- const initializeIntlVerificationFormEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(internationalWireVerificationReducer_1.initializeIntlVerificationForm.match), (0, operators_1.mergeMap)((action) => {
8
- const { companyId, internationalWireFormPayload } = action.payload;
9
- const actions = [];
10
+ const hasSavedPersonSubfieldData = (localData) => Object.keys(localData).some((key) => /^stake_holder_\d+_/.test(key) ||
11
+ (key.startsWith('controlling_person_') && key !== 'controlling_person'));
12
+ const initializeIntlVerificationFormEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)((action) => internationalWireVerificationReducer_1.initializeIntlVerificationForm.match(action) ||
13
+ billPaySetupViewReducer_1.fetchBillPaySetupViewSuccess.match(action)), (0, operators_1.mergeMap)((action) => {
10
14
  const state = state$.value;
11
- const onboardingDataFromCompanyInfo = state.companyState.companiesById[companyId].companyBillPayInfo
12
- .internationalWireOnboardingDetails;
13
- const localData = {};
14
- Object.keys(internationalWireFormPayload).forEach((formFieldKey) => {
15
- const values = onboardingDataFromCompanyInfo != null
16
- ? onboardingDataFromCompanyInfo[formFieldKey]?.values
17
- : undefined;
18
- if (values != null) {
19
- localData[formFieldKey] =
20
- internationalWireFormPayload[formFieldKey].type === 'enum'
21
- ? internationalWireFormPayload[formFieldKey]
22
- .is_multiple_values_allowed === false
23
- ? typeof values[0] === 'object' && 'code' in values[0]
24
- ? values[0].code
25
- : ''
26
- : values.map((value) => typeof value === 'object' && 'code' in value
27
- ? value.code
28
- : '')
29
- : values[0];
15
+ const formFieldLabels = state.internationalWireVerificationState.verificationFormFieldLabels;
16
+ if (Object.keys(formFieldLabels).length === 0) {
17
+ return (0, rxjs_1.empty)();
18
+ }
19
+ const companyId = internationalWireVerificationReducer_1.initializeIntlVerificationForm.match(action) ?
20
+ action.payload.companyId
21
+ : (0, tenantSelector_1.getCurrentTenant)(state)?.companyId;
22
+ if (companyId == null) {
23
+ return (0, rxjs_1.empty)();
24
+ }
25
+ const onboardingDataFromCompanyInfo = state.companyState.companiesById[companyId]?.companyBillPayInfo
26
+ ?.internationalWireOnboardingDetails;
27
+ const localDataFromCompany = (0, internationalWireOnboardingDetailsToLocalData_1.toVerificationFormLocalDataFromOnboardingDetails)(onboardingDataFromCompanyInfo, formFieldLabels);
28
+ const existingLocalData = state.internationalWireVerificationState.verificationFormLocalData;
29
+ if (billPaySetupViewReducer_1.fetchBillPaySetupViewSuccess.match(action)) {
30
+ if (!hasSavedPersonSubfieldData(localDataFromCompany) ||
31
+ hasSavedPersonSubfieldData(existingLocalData)) {
32
+ return (0, rxjs_1.empty)();
30
33
  }
31
- else {
32
- localData[formFieldKey] =
33
- internationalWireFormPayload[formFieldKey].type === 'enum' &&
34
- internationalWireFormPayload[formFieldKey]
35
- .is_multiple_values_allowed === true
36
- ? []
37
- : '';
38
- }
39
- });
40
- actions.push((0, internationalWireVerificationReducer_1.updateVerificationFormLocalData)(localData));
41
- return (0, rxjs_1.from)(actions);
34
+ }
35
+ return (0, rxjs_1.from)([
36
+ (0, internationalWireVerificationReducer_1.updateVerificationFormLocalData)({
37
+ ...existingLocalData,
38
+ ...localDataFromCompany,
39
+ }),
40
+ ]);
42
41
  }));
43
42
  exports.initializeIntlVerificationFormEpic = initializeIntlVerificationFormEpic;
@@ -6,6 +6,7 @@ const operators_1 = require("rxjs/operators");
6
6
  const companyReducer_1 = require("../../../../../entity/company/companyReducer");
7
7
  const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
8
8
  const responsePayload_1 = require("../../../../../responsePayload");
9
+ const internationalWireVerificationSubmitPayload_1 = require("../internationalWireVerificationSubmitPayload");
9
10
  const internationalWireVerificationReducer_1 = require("../internationalWireVerificationReducer");
10
11
  const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(internationalWireVerificationReducer_1.submitInternationalVerificationForm.match), (0, operators_1.switchMap)((action) => {
11
12
  const { internationalWireVerificationState } = state$.value;
@@ -13,7 +14,7 @@ const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe(
13
14
  const localData = internationalWireVerificationState.verificationFormLocalData;
14
15
  if (localData != null) {
15
16
  return zeniAPI
16
- .postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`, toIntlWireVerificationPayload(localData))
17
+ .postAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/international-wire/onboarding`, (0, internationalWireVerificationSubmitPayload_1.toIntlWireVerificationSubmitPayload)(localData))
17
18
  .pipe((0, operators_1.mergeMap)((response) => {
18
19
  const actions = [];
19
20
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
@@ -58,9 +59,3 @@ const submitIntlVerificationEpic = (actions$, state$, zeniAPI) => actions$.pipe(
58
59
  }
59
60
  }));
60
61
  exports.submitIntlVerificationEpic = submitIntlVerificationEpic;
61
- const toIntlWireVerificationPayload = (localData) => {
62
- return {
63
- is_applicant_declaration: true,
64
- form_details: localData,
65
- };
66
- };
@@ -0,0 +1,4 @@
1
+ import { LabelValueCodesPayload } from '../../../../commonPayloadTypes/commonPayload';
2
+ import { FieldPayload } from './internationalWireVerificationPayload';
3
+ import { VerificationFormLocalData } from './internationalWireVerificationState';
4
+ export declare const toVerificationFormLocalDataFromOnboardingDetails: (onboardingDetails: Record<string, LabelValueCodesPayload> | undefined, internationalWireFormPayload: Record<string, FieldPayload>) => VerificationFormLocalData;
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toVerificationFormLocalDataFromOnboardingDetails = void 0;
4
+ const internationalWireVerificationFieldConstants_1 = require("./internationalWireVerificationFieldConstants");
5
+ const internationalWireVerificationLocalDataHelpers_1 = require("./internationalWireVerificationLocalDataHelpers");
6
+ const MULTI_OPTION_FILE_FIELD_NAMES = new Set([
7
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.businessOwnership,
8
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.companyProofOfAddress,
9
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.companyOfficerProofOfAddress,
10
+ ]);
11
+ const toValuesArray = (values) => {
12
+ if (values == null) {
13
+ return [];
14
+ }
15
+ if (Array.isArray(values)) {
16
+ return values;
17
+ }
18
+ return [values];
19
+ };
20
+ const getCodeFromValue = (value) => {
21
+ if (typeof value === 'string') {
22
+ return value;
23
+ }
24
+ if (typeof value === 'object' &&
25
+ value != null &&
26
+ 'code' in value &&
27
+ typeof value.code === 'string') {
28
+ return value.code;
29
+ }
30
+ return '';
31
+ };
32
+ const setEmptyFieldDefault = (localData, fieldKey, fieldPayload) => {
33
+ if (fieldPayload.type === 'enum') {
34
+ localData[fieldKey] =
35
+ fieldPayload.is_multiple_values_allowed === true ? [] : '';
36
+ return;
37
+ }
38
+ if (fieldPayload.type === 'boolean_with_subfields') {
39
+ if (fieldKey ===
40
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder) {
41
+ localData[fieldKey] = 'false';
42
+ return;
43
+ }
44
+ if (fieldKey ===
45
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.controllingPerson) {
46
+ localData[fieldKey] = fieldPayload.default === true ? 'true' : 'false';
47
+ }
48
+ }
49
+ };
50
+ const parseEnumValues = (localData, fieldKey, fieldPayload, values) => {
51
+ if (fieldPayload.is_multiple_values_allowed === true) {
52
+ localData[fieldKey] = values
53
+ .map(getCodeFromValue)
54
+ .filter((code) => code.length > 0);
55
+ return;
56
+ }
57
+ localData[fieldKey] = getCodeFromValue(values[0]);
58
+ };
59
+ const parseFileValues = (localData, fieldKey, fieldPayload, values) => {
60
+ if (values.length > 0 &&
61
+ ((0, internationalWireVerificationLocalDataHelpers_1.isIntlWireFileOptionLike)(values[0]) ||
62
+ MULTI_OPTION_FILE_FIELD_NAMES.has(fieldKey))) {
63
+ const fileOptions = (0, internationalWireVerificationLocalDataHelpers_1.toIntlWireFileOptionArray)(values);
64
+ if (fileOptions.length > 0) {
65
+ (0, internationalWireVerificationLocalDataHelpers_1.appendIntlWireFileOptionsToLocalData)(localData, fieldKey, fileOptions);
66
+ }
67
+ return;
68
+ }
69
+ const fileIds = values.filter((value) => typeof value === 'string' && value.length > 0);
70
+ if (fieldPayload.is_multiple_values_allowed === true) {
71
+ localData[fieldKey] = fileIds;
72
+ return;
73
+ }
74
+ localData[fieldKey] = fileIds[0] ?? '';
75
+ };
76
+ const parseBooleanWithSubfieldsValues = (localData, fieldKey, fieldPayload, rawValues) => {
77
+ if (fieldKey ===
78
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.controllingPerson) {
79
+ if ((0, internationalWireVerificationLocalDataHelpers_1.isIntlWirePersonLike)(rawValues)) {
80
+ localData[fieldKey] = 'false';
81
+ (0, internationalWireVerificationLocalDataHelpers_1.appendIntlWirePersonToLocalData)(localData, fieldKey, rawValues);
82
+ return;
83
+ }
84
+ const values = toValuesArray(rawValues);
85
+ if (values.length > 0 && (0, internationalWireVerificationLocalDataHelpers_1.isIntlWirePersonLike)(values[0])) {
86
+ localData[fieldKey] = 'false';
87
+ (0, internationalWireVerificationLocalDataHelpers_1.appendIntlWirePersonToLocalData)(localData, fieldKey, values[0]);
88
+ return;
89
+ }
90
+ const selection = getCodeFromValue(values[0]);
91
+ localData[fieldKey] =
92
+ selection.length > 0
93
+ ? selection
94
+ : fieldPayload.default === true
95
+ ? 'true'
96
+ : 'false';
97
+ return;
98
+ }
99
+ if (fieldKey ===
100
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationBooleanWithSubfieldsFieldNames.stakeHolder) {
101
+ const values = toValuesArray(rawValues);
102
+ if (values.length > 0 && (0, internationalWireVerificationLocalDataHelpers_1.isIntlWirePersonLike)(values[0])) {
103
+ localData[fieldKey] = 'true';
104
+ values.forEach((person, ownerIndex) => {
105
+ if ((0, internationalWireVerificationLocalDataHelpers_1.isIntlWirePersonLike)(person)) {
106
+ (0, internationalWireVerificationLocalDataHelpers_1.appendIntlWirePersonToLocalData)(localData, `${fieldKey}_${ownerIndex}`, person);
107
+ }
108
+ });
109
+ return;
110
+ }
111
+ const selection = getCodeFromValue(values[0]);
112
+ localData[fieldKey] = selection.length > 0 ? selection : 'false';
113
+ }
114
+ };
115
+ const toVerificationFormLocalDataFromOnboardingDetails = (onboardingDetails, internationalWireFormPayload) => {
116
+ const localData = {};
117
+ Object.keys(internationalWireFormPayload).forEach((fieldKey) => {
118
+ const fieldPayload = internationalWireFormPayload[fieldKey];
119
+ const rawValues = onboardingDetails?.[fieldKey]?.values;
120
+ if (rawValues == null) {
121
+ setEmptyFieldDefault(localData, fieldKey, fieldPayload);
122
+ return;
123
+ }
124
+ if (fieldPayload.type === 'boolean_with_subfields') {
125
+ parseBooleanWithSubfieldsValues(localData, fieldKey, fieldPayload, rawValues);
126
+ return;
127
+ }
128
+ const values = toValuesArray(rawValues);
129
+ if (values.length === 0) {
130
+ setEmptyFieldDefault(localData, fieldKey, fieldPayload);
131
+ return;
132
+ }
133
+ switch (fieldPayload.type) {
134
+ case 'enum':
135
+ parseEnumValues(localData, fieldKey, fieldPayload, values);
136
+ break;
137
+ case 'file':
138
+ parseFileValues(localData, fieldKey, fieldPayload, values);
139
+ break;
140
+ case 'date':
141
+ localData[fieldKey] = getCodeFromValue(values[0]);
142
+ break;
143
+ default:
144
+ localData[fieldKey] = getCodeFromValue(values[0]);
145
+ break;
146
+ }
147
+ });
148
+ return localData;
149
+ };
150
+ exports.toVerificationFormLocalDataFromOnboardingDetails = toVerificationFormLocalDataFromOnboardingDetails;
@@ -0,0 +1,38 @@
1
+ export declare const InternationalWireVerificationFormFieldNames: {
2
+ readonly certificateOfGoodStanding: "certificate_of_good_standing";
3
+ readonly businessOwnership: "business_ownership";
4
+ readonly companyProofOfAddress: "company_proof_of_address";
5
+ readonly companyOfficerProofOfAddress: "company_officer_proof_of_address";
6
+ readonly companyRegistrationDate: "company_registration_date";
7
+ readonly annualTurnover: "annual_turnover";
8
+ readonly expectedTransactionVolume: "expected_transaction_volume";
9
+ readonly employeeCount: "employee_count";
10
+ readonly intendedUseOfAccount: "intended_use_of_account";
11
+ readonly transactionCountries: "transaction_countries";
12
+ readonly stakeHolder: "stake_holder";
13
+ readonly controllingPerson: "controlling_person";
14
+ };
15
+ export type InternationalWireVerificationFormFieldName = (typeof InternationalWireVerificationFormFieldNames)[keyof typeof InternationalWireVerificationFormFieldNames];
16
+ export declare const InternationalWireVerificationStakeHolderFieldName: "stake_holder";
17
+ export declare const InternationalWireVerificationControllingPersonFieldName: "controlling_person";
18
+ export declare const InternationalWireVerificationBooleanWithSubfieldsFieldNames: {
19
+ readonly stakeHolder: "stake_holder";
20
+ readonly controllingPerson: "controlling_person";
21
+ };
22
+ export type InternationalWireVerificationBooleanWithSubfieldsFieldName = (typeof InternationalWireVerificationBooleanWithSubfieldsFieldNames)[keyof typeof InternationalWireVerificationBooleanWithSubfieldsFieldNames];
23
+ export declare const InternationalWireVerificationBooleanWithSubfieldsFieldNameList: InternationalWireVerificationBooleanWithSubfieldsFieldName[];
24
+ export declare const InternationalWireVerificationSubfieldNames: {
25
+ readonly companyRole: "company_role";
26
+ readonly dateOfBirth: "date_of_birth";
27
+ readonly name: "name";
28
+ readonly email: "email";
29
+ readonly nationality: "nationality";
30
+ readonly ownershipPercentage: "ownership_percentage";
31
+ readonly proofOfIdentity: "proof_of_identity";
32
+ readonly proofOfAddress: "proof_of_address";
33
+ readonly ssn: "ssn";
34
+ };
35
+ export type InternationalWireVerificationSubfieldName = (typeof InternationalWireVerificationSubfieldNames)[keyof typeof InternationalWireVerificationSubfieldNames];
36
+ export declare const InternationalWireVerificationReadonlyHideableFieldNames: readonly ["stake_holder", "controlling_person", "business_ownership", "company_proof_of_address", "company_officer_proof_of_address"];
37
+ export type InternationalWireVerificationReadonlyHideableFieldName = (typeof InternationalWireVerificationReadonlyHideableFieldNames)[number];
38
+ export declare const InternationalWireVerificationReadonlyVisibilityGateFieldName: "business_ownership";
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InternationalWireVerificationReadonlyVisibilityGateFieldName = exports.InternationalWireVerificationReadonlyHideableFieldNames = exports.InternationalWireVerificationSubfieldNames = exports.InternationalWireVerificationBooleanWithSubfieldsFieldNameList = exports.InternationalWireVerificationBooleanWithSubfieldsFieldNames = exports.InternationalWireVerificationControllingPersonFieldName = exports.InternationalWireVerificationStakeHolderFieldName = exports.InternationalWireVerificationFormFieldNames = void 0;
4
+ exports.InternationalWireVerificationFormFieldNames = {
5
+ certificateOfGoodStanding: 'certificate_of_good_standing',
6
+ businessOwnership: 'business_ownership',
7
+ companyProofOfAddress: 'company_proof_of_address',
8
+ companyOfficerProofOfAddress: 'company_officer_proof_of_address',
9
+ companyRegistrationDate: 'company_registration_date',
10
+ annualTurnover: 'annual_turnover',
11
+ expectedTransactionVolume: 'expected_transaction_volume',
12
+ employeeCount: 'employee_count',
13
+ intendedUseOfAccount: 'intended_use_of_account',
14
+ transactionCountries: 'transaction_countries',
15
+ stakeHolder: 'stake_holder',
16
+ controllingPerson: 'controlling_person',
17
+ };
18
+ exports.InternationalWireVerificationStakeHolderFieldName = exports.InternationalWireVerificationFormFieldNames.stakeHolder;
19
+ exports.InternationalWireVerificationControllingPersonFieldName = exports.InternationalWireVerificationFormFieldNames.controllingPerson;
20
+ exports.InternationalWireVerificationBooleanWithSubfieldsFieldNames = {
21
+ stakeHolder: exports.InternationalWireVerificationStakeHolderFieldName,
22
+ controllingPerson: exports.InternationalWireVerificationControllingPersonFieldName,
23
+ };
24
+ exports.InternationalWireVerificationBooleanWithSubfieldsFieldNameList = Object.values(exports.InternationalWireVerificationBooleanWithSubfieldsFieldNames);
25
+ exports.InternationalWireVerificationSubfieldNames = {
26
+ companyRole: 'company_role',
27
+ dateOfBirth: 'date_of_birth',
28
+ name: 'name',
29
+ email: 'email',
30
+ nationality: 'nationality',
31
+ ownershipPercentage: 'ownership_percentage',
32
+ proofOfIdentity: 'proof_of_identity',
33
+ proofOfAddress: 'proof_of_address',
34
+ ssn: 'ssn',
35
+ };
36
+ exports.InternationalWireVerificationReadonlyHideableFieldNames = [
37
+ exports.InternationalWireVerificationFormFieldNames.stakeHolder,
38
+ exports.InternationalWireVerificationFormFieldNames.controllingPerson,
39
+ exports.InternationalWireVerificationFormFieldNames.businessOwnership,
40
+ exports.InternationalWireVerificationFormFieldNames.companyProofOfAddress,
41
+ exports.InternationalWireVerificationFormFieldNames.companyOfficerProofOfAddress,
42
+ ];
43
+ exports.InternationalWireVerificationReadonlyVisibilityGateFieldName = exports.InternationalWireVerificationFormFieldNames.businessOwnership;
@@ -0,0 +1,27 @@
1
+ import { VerificationFormLocalData } from './internationalWireVerificationState';
2
+ export type IntlWireFileOptionLike = {
3
+ file_id: string;
4
+ option?: string;
5
+ };
6
+ export type IntlWirePersonNameLike = {
7
+ first_name?: string;
8
+ last_name?: string;
9
+ };
10
+ export type IntlWirePersonLike = {
11
+ company_role?: string;
12
+ date_of_birth?: string;
13
+ email?: string;
14
+ name?: IntlWirePersonNameLike;
15
+ nationality?: string;
16
+ ownership_percentage?: number;
17
+ proof_of_address?: IntlWireFileOptionLike[];
18
+ proof_of_identity?: IntlWireFileOptionLike[];
19
+ ssn?: string;
20
+ };
21
+ export declare const isIntlWireFileOptionLike: (value: unknown) => value is IntlWireFileOptionLike;
22
+ export declare const isIntlWirePersonLike: (value: unknown) => value is IntlWirePersonLike;
23
+ export declare const toIntlWireFileOptionArray: (items: unknown[]) => IntlWireFileOptionLike[];
24
+ export declare const appendIntlWireFileOptionsToLocalData: (localData: VerificationFormLocalData, baseKey: string, fileOptions: IntlWireFileOptionLike[]) => void;
25
+ export declare const appendIntlWirePersonToLocalData: (localData: VerificationFormLocalData, keyPrefix: string, person: IntlWirePersonLike) => void;
26
+ export declare const getStakeHolderOwnerIndicesFromLocalData: (localData: VerificationFormLocalData) => number[];
27
+ export declare const hasBusinessOwnershipValueInLocalData: (localData: VerificationFormLocalData) => boolean;
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hasBusinessOwnershipValueInLocalData = exports.getStakeHolderOwnerIndicesFromLocalData = exports.appendIntlWirePersonToLocalData = exports.appendIntlWireFileOptionsToLocalData = exports.toIntlWireFileOptionArray = exports.isIntlWirePersonLike = exports.isIntlWireFileOptionLike = void 0;
4
+ const internationalWireVerificationFieldConstants_1 = require("./internationalWireVerificationFieldConstants");
5
+ const internationalWireVerificationSubmitPayload_1 = require("./internationalWireVerificationSubmitPayload");
6
+ const isIntlWireFileOptionLike = (value) => typeof value === 'object' &&
7
+ value != null &&
8
+ 'file_id' in value &&
9
+ typeof value.file_id === 'string';
10
+ exports.isIntlWireFileOptionLike = isIntlWireFileOptionLike;
11
+ const isIntlWirePersonLike = (value) => {
12
+ if (typeof value !== 'object' || value == null || Array.isArray(value)) {
13
+ return false;
14
+ }
15
+ const person = value;
16
+ return (person.name != null ||
17
+ person.email != null ||
18
+ person.nationality != null ||
19
+ person.company_role != null ||
20
+ person.ssn != null ||
21
+ person.date_of_birth != null ||
22
+ person.ownership_percentage != null ||
23
+ person.proof_of_identity != null ||
24
+ person.proof_of_address != null);
25
+ };
26
+ exports.isIntlWirePersonLike = isIntlWirePersonLike;
27
+ const toIntlWireFileOptionArray = (items) => items.filter(exports.isIntlWireFileOptionLike);
28
+ exports.toIntlWireFileOptionArray = toIntlWireFileOptionArray;
29
+ const appendIntlWireFileOptionsToLocalData = (localData, baseKey, fileOptions) => {
30
+ const [front, back] = fileOptions;
31
+ if (front?.file_id != null && front.file_id !== '') {
32
+ localData[baseKey] = front.file_id;
33
+ if (front.option != null && front.option !== '') {
34
+ localData[`${baseKey}${internationalWireVerificationSubmitPayload_1.IntlWireVerificationLocalDataSuffix.documentOption}`] = front.option;
35
+ }
36
+ }
37
+ if (back?.file_id != null && back.file_id !== '') {
38
+ localData[`${baseKey}${internationalWireVerificationSubmitPayload_1.IntlWireVerificationLocalDataSuffix.documentBack}`] =
39
+ back.file_id;
40
+ }
41
+ };
42
+ exports.appendIntlWireFileOptionsToLocalData = appendIntlWireFileOptionsToLocalData;
43
+ const appendIntlWirePersonToLocalData = (localData, keyPrefix, person) => {
44
+ const nameBaseKey = `${keyPrefix}_${internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.name}`;
45
+ if (person.name?.first_name != null) {
46
+ localData[`${nameBaseKey}${internationalWireVerificationSubmitPayload_1.IntlWireVerificationLocalDataSuffix.nameFirst}`] = person.name.first_name;
47
+ }
48
+ if (person.name?.last_name != null) {
49
+ localData[`${nameBaseKey}${internationalWireVerificationSubmitPayload_1.IntlWireVerificationLocalDataSuffix.nameLast}`] = person.name.last_name;
50
+ }
51
+ const assignStringField = (subfieldName, fieldValue) => {
52
+ if (fieldValue != null && fieldValue !== '') {
53
+ localData[`${keyPrefix}_${subfieldName}`] = fieldValue;
54
+ }
55
+ };
56
+ assignStringField(internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.nationality, person.nationality);
57
+ assignStringField(internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.email, person.email);
58
+ assignStringField(internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.companyRole, person.company_role);
59
+ assignStringField(internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.ssn, person.ssn);
60
+ assignStringField(internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.dateOfBirth, person.date_of_birth);
61
+ if (person.ownership_percentage != null) {
62
+ localData[`${keyPrefix}_${internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.ownershipPercentage}`] = person.ownership_percentage;
63
+ }
64
+ if (person.proof_of_identity != null) {
65
+ (0, exports.appendIntlWireFileOptionsToLocalData)(localData, `${keyPrefix}_${internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.proofOfIdentity}`, (0, exports.toIntlWireFileOptionArray)(person.proof_of_identity));
66
+ }
67
+ if (person.proof_of_address != null) {
68
+ (0, exports.appendIntlWireFileOptionsToLocalData)(localData, `${keyPrefix}_${internationalWireVerificationFieldConstants_1.InternationalWireVerificationSubfieldNames.proofOfAddress}`, (0, exports.toIntlWireFileOptionArray)(person.proof_of_address));
69
+ }
70
+ };
71
+ exports.appendIntlWirePersonToLocalData = appendIntlWirePersonToLocalData;
72
+ const getStakeHolderOwnerIndicesFromLocalData = (localData) => {
73
+ const indices = new Set();
74
+ Object.keys(localData).forEach((key) => {
75
+ const match = key.match(/^stake_holder_(\d+)_/);
76
+ if (match != null) {
77
+ indices.add(Number.parseInt(match[1], 10));
78
+ }
79
+ });
80
+ return Array.from(indices).sort((a, b) => a - b);
81
+ };
82
+ exports.getStakeHolderOwnerIndicesFromLocalData = getStakeHolderOwnerIndicesFromLocalData;
83
+ const hasBusinessOwnershipValueInLocalData = (localData) => {
84
+ const baseKey = internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.businessOwnership;
85
+ const frontFileId = localData[baseKey];
86
+ if (typeof frontFileId === 'string' && frontFileId !== '') {
87
+ return true;
88
+ }
89
+ const backFileId = localData[`${baseKey}${internationalWireVerificationSubmitPayload_1.IntlWireVerificationLocalDataSuffix.documentBack}`];
90
+ if (typeof backFileId === 'string' && backFileId !== '') {
91
+ return true;
92
+ }
93
+ const documentOption = localData[`${baseKey}${internationalWireVerificationSubmitPayload_1.IntlWireVerificationLocalDataSuffix.documentOption}`];
94
+ return typeof documentOption === 'string' && documentOption !== '';
95
+ };
96
+ exports.hasBusinessOwnershipValueInLocalData = hasBusinessOwnershipValueInLocalData;
@@ -1,17 +1,40 @@
1
1
  import { AllowedValueWithCode } from '../../../../commonStateTypes/allowedValue';
2
2
  import { ZeniAPIResponse } from '../../../../responsePayload';
3
- import { VerificationFormField } from './internationalWireVerificationState';
3
+ import { VerificationFormField, VerificationFormLocalData } from './internationalWireVerificationState';
4
+ export declare const InternationalWireVerificationFormOrder: readonly ["certificate_of_good_standing", "business_ownership", "company_proof_of_address", "company_officer_proof_of_address", "company_registration_date", "annual_turnover", "expected_transaction_volume", "employee_count", "intended_use_of_account", "transaction_countries", "stake_holder", "controlling_person"];
5
+ export interface FieldOptionPayload {
6
+ label: string;
7
+ }
8
+ export interface SubFieldPayload {
9
+ label: string;
10
+ type: string;
11
+ field_hint_text?: string;
12
+ field_values?: {
13
+ code: string;
14
+ description: string;
15
+ }[];
16
+ is_multiple_options_supported?: boolean;
17
+ options?: Record<string, FieldOptionPayload>;
18
+ }
4
19
  export interface FieldPayload {
5
20
  label: string;
6
21
  type: string;
22
+ default?: boolean;
7
23
  field_hint_text?: string;
8
24
  field_values?: {
9
25
  code: string;
10
26
  description: string;
11
27
  }[];
28
+ is_multiple_options_supported?: boolean;
12
29
  is_multiple_values_allowed?: boolean;
30
+ options?: Record<string, FieldOptionPayload>;
31
+ requirements?: string[];
32
+ subfields?: Record<string, SubFieldPayload>;
13
33
  }
14
34
  export declare const toDynamicFormField: (key: string, payload: FieldPayload) => VerificationFormField;
35
+ export declare const filterVerificationFormFieldsForReadonlyView: (fields: VerificationFormField[], localData: VerificationFormLocalData, isReadonly: boolean) => VerificationFormField[];
36
+ export declare const sortVerificationFormFields: (fields: VerificationFormField[]) => VerificationFormField[];
37
+ export declare const toVerificationFormFields: (internationalWireFormPayload: Record<string, FieldPayload>) => VerificationFormField[];
15
38
  export type IntlVerificationFormResponse = ZeniAPIResponse<IntlVerificationFormPayload>;
16
39
  export interface IntlVerificationFormPayload {
17
40
  create_time: string;
@@ -1,19 +1,69 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toDynamicFormField = void 0;
3
+ exports.toVerificationFormFields = exports.sortVerificationFormFields = exports.filterVerificationFormFieldsForReadonlyView = exports.toDynamicFormField = exports.InternationalWireVerificationFormOrder = void 0;
4
+ const internationalWireVerificationFieldConstants_1 = require("./internationalWireVerificationFieldConstants");
5
+ const internationalWireVerificationLocalDataHelpers_1 = require("./internationalWireVerificationLocalDataHelpers");
6
+ exports.InternationalWireVerificationFormOrder = [
7
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.certificateOfGoodStanding,
8
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.businessOwnership,
9
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.companyProofOfAddress,
10
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.companyOfficerProofOfAddress,
11
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.companyRegistrationDate,
12
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.annualTurnover,
13
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.expectedTransactionVolume,
14
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.employeeCount,
15
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.intendedUseOfAccount,
16
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.transactionCountries,
17
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.stakeHolder,
18
+ internationalWireVerificationFieldConstants_1.InternationalWireVerificationFormFieldNames.controllingPerson,
19
+ ];
20
+ const toFieldValues = (fieldValues) => fieldValues?.map(({ code, description }) => ({ code, description })) ?? [];
21
+ const toSubField = (subfield) => ({
22
+ label: subfield.label,
23
+ placeholder: subfield.field_hint_text ?? '',
24
+ type: subfield.type,
25
+ fieldValues: toFieldValues(subfield.field_values),
26
+ isMultipleOptionsSupported: subfield.is_multiple_options_supported,
27
+ options: subfield.options,
28
+ });
4
29
  const toDynamicFormField = (key, payload) => ({
5
30
  name: key,
6
31
  label: payload.label,
7
32
  placeholder: payload.field_hint_text ?? '',
8
33
  isMultipleValuesAllowed: payload.is_multiple_values_allowed ?? false,
9
34
  type: payload.type,
10
- fieldValues: payload.field_values != null && payload.field_values.length > 0
11
- ? payload.field_values.map((fieldValue) => {
12
- return {
13
- code: fieldValue.code,
14
- description: fieldValue.description,
15
- };
16
- })
17
- : [],
35
+ fieldValues: toFieldValues(payload.field_values),
36
+ isMultipleOptionsSupported: payload.is_multiple_options_supported,
37
+ options: payload.options,
38
+ requirements: payload.requirements,
39
+ default: payload.default,
40
+ subfields: payload.subfields != null
41
+ ? Object.fromEntries(Object.entries(payload.subfields).map(([subfieldKey, subfield]) => [
42
+ subfieldKey,
43
+ toSubField(subfield),
44
+ ]))
45
+ : undefined,
18
46
  });
19
47
  exports.toDynamicFormField = toDynamicFormField;
48
+ const readonlyHideableVerificationFormFieldNames = new Set(internationalWireVerificationFieldConstants_1.InternationalWireVerificationReadonlyHideableFieldNames);
49
+ const filterVerificationFormFieldsForReadonlyView = (fields, localData, isReadonly) => {
50
+ if (!isReadonly || (0, internationalWireVerificationLocalDataHelpers_1.hasBusinessOwnershipValueInLocalData)(localData)) {
51
+ return fields;
52
+ }
53
+ return fields.filter((field) => !readonlyHideableVerificationFormFieldNames.has(field.name));
54
+ };
55
+ exports.filterVerificationFormFieldsForReadonlyView = filterVerificationFormFieldsForReadonlyView;
56
+ const sortVerificationFormFields = (fields) => {
57
+ const orderIndex = new Map(exports.InternationalWireVerificationFormOrder.map((name, index) => [name, index]));
58
+ return fields.slice().sort((a, b) => {
59
+ const aIndex = orderIndex.get(a.name) ?? exports.InternationalWireVerificationFormOrder.length;
60
+ const bIndex = orderIndex.get(b.name) ?? exports.InternationalWireVerificationFormOrder.length;
61
+ if (aIndex !== bIndex) {
62
+ return aIndex - bIndex;
63
+ }
64
+ return a.name.localeCompare(b.name);
65
+ });
66
+ };
67
+ exports.sortVerificationFormFields = sortVerificationFormFields;
68
+ const toVerificationFormFields = (internationalWireFormPayload) => (0, exports.sortVerificationFormFields)(Object.keys(internationalWireFormPayload).map((key) => (0, exports.toDynamicFormField)(key, internationalWireFormPayload[key])));
69
+ exports.toVerificationFormFields = toVerificationFormFields;
@@ -8,6 +8,7 @@ exports.initialState = {
8
8
  verificationFormFetchState: {
9
9
  fetchState: 'Not-Started',
10
10
  },
11
+ verificationFormFieldLabels: {},
11
12
  verificationFormFields: [],
12
13
  verificationFormLocalData: {},
13
14
  verificationFormSubmitState: {
@@ -35,11 +36,8 @@ const internationalWireVerification = (0, toolkit_1.createSlice)({
35
36
  },
36
37
  updateInternationalVerificationForm(draft, action) {
37
38
  const { internationalWireFormPayload } = action.payload;
38
- const verificationFormFields = [];
39
- Object.keys(internationalWireFormPayload).forEach((key) => {
40
- verificationFormFields.push((0, internationalWireVerificationPayload_1.toDynamicFormField)(key, internationalWireFormPayload[key]));
41
- });
42
- draft.verificationFormFields = verificationFormFields;
39
+ draft.verificationFormFieldLabels = internationalWireFormPayload;
40
+ draft.verificationFormFields = (0, internationalWireVerificationPayload_1.toVerificationFormFields)(internationalWireFormPayload);
43
41
  draft.verificationFormFetchState.fetchState = 'Completed';
44
42
  },
45
43
  updateVerificationFormFailure(draft, action) {
@@ -49,6 +47,7 @@ const internationalWireVerification = (0, toolkit_1.createSlice)({
49
47
  },
50
48
  updateVerificationFormLocalData(draft, action) {
51
49
  draft.verificationFormLocalData = {
50
+ ...draft.verificationFormLocalData,
52
51
  ...action.payload,
53
52
  };
54
53
  },