@zeniai/client-epic-state 5.0.83-betaRR5 → 5.0.84-beta0ND
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.
- package/lib/common/aiCfo/aiCfoSuggestedQuestionsPageContext.d.ts +1 -1
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +1 -0
- package/lib/entity/aiCfo/aiCfoPayload.d.ts +1 -137
- package/lib/entity/aiCfo/aiCfoReducer.d.ts +2 -23
- package/lib/entity/aiCfo/aiCfoReducer.js +5 -320
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +1 -13
- package/lib/entity/aiCfo/aiCfoSelector.js +1 -28
- package/lib/entity/aiCfo/aiCfoState.d.ts +4 -206
- package/lib/entity/aiCfo/aiCfoState.js +1 -23
- package/lib/entity/company/companyPayload.d.ts +2 -0
- package/lib/entity/company/companyPayload.js +2 -0
- package/lib/entity/company/companyStateTypes.d.ts +2 -0
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
- package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
- package/lib/entity/paymentAccount/paymentAccountSelector.js +4 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +1 -3
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -6
- package/lib/entity/tenant/clearAllEpic.js +0 -8
- package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +21 -0
- package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +54 -0
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
- package/lib/entity/tenant/tenantPayload.d.ts +19 -0
- package/lib/entity/tenant/tenantReducer.d.ts +49 -28
- package/lib/entity/tenant/tenantReducer.js +111 -5
- package/lib/entity/tenant/tenantState.d.ts +21 -0
- package/lib/epic.d.ts +7 -15
- package/lib/epic.js +8 -15
- package/lib/esm/commonStateTypes/animations.js +1 -0
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +5 -320
- package/lib/esm/entity/aiCfo/aiCfoSelector.js +1 -26
- package/lib/esm/entity/aiCfo/aiCfoState.js +0 -20
- package/lib/esm/entity/company/companyPayload.js +2 -0
- package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +3 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +1 -3
- package/lib/esm/entity/tenant/clearAllEpic.js +0 -8
- package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
- package/lib/esm/entity/tenant/tenantReducer.js +108 -3
- package/lib/esm/epic.js +8 -15
- package/lib/esm/index.js +17 -44
- package/lib/esm/reducer.js +0 -12
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -6
- package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
- package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +1 -2
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
- package/lib/esm/view/companyView/companyViewReducer.js +45 -1
- package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +25 -0
- package/lib/esm/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.js +79 -0
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +45 -0
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +168 -50
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +14 -0
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +13 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -25
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +4 -49
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +0 -61
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +49 -0
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +58 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +12 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +205 -0
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +71 -52
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +2 -0
- package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +28 -0
- package/lib/index.d.ts +20 -50
- package/lib/index.js +39 -193
- package/lib/reducer.d.ts +0 -12
- package/lib/reducer.js +0 -12
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +2 -11
- package/lib/view/aiCfoView/aiCfoViewReducer.js +3 -6
- package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -5
- package/lib/view/aiCfoView/epics/createSessionEpic.js +1 -2
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +1 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +2 -12
- package/lib/view/companyView/companyViewReducer.d.ts +11 -1
- package/lib/view/companyView/companyViewReducer.js +47 -3
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.d.ts +9 -0
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +29 -0
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.d.ts +10 -0
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationThresholdEpic.js +83 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +49 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +9 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +44 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +3 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +41 -4
- package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +170 -51
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +7 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +21 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +37 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +14 -1
- package/lib/view/people/peopleTypes.d.ts +1 -1
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +0 -14
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +1 -27
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +1 -1
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +2 -12
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +5 -50
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +0 -42
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +1 -68
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +0 -18
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +8 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +53 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +8 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +62 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +27 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +15 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +24 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +213 -0
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +24 -2
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +72 -53
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -0
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +2 -0
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +12 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +125 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +32 -0
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
- package/package.json +1 -1
- package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +0 -277
- package/lib/entity/cardPolicy/cardPolicyPayload.js +0 -143
- package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +0 -19
- package/lib/entity/cardPolicy/cardPolicyReducer.js +0 -175
- package/lib/entity/cardPolicy/cardPolicySelector.d.ts +0 -32
- package/lib/entity/cardPolicy/cardPolicySelector.js +0 -99
- package/lib/entity/cardPolicy/cardPolicyState.d.ts +0 -205
- package/lib/entity/cardPolicy/cardPolicyState.js +0 -14
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +0 -18
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -68
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +0 -26
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -47
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +0 -25
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -39
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +0 -24
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -105
- package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +0 -130
- package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +0 -171
- package/lib/esm/entity/cardPolicy/cardPolicySelector.js +0 -75
- package/lib/esm/entity/cardPolicy/cardPolicyState.js +0 -9
- package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +0 -64
- package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +0 -43
- package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +0 -35
- package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +0 -101
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -70
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -22
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -56
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -49
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -42
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -72
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -21
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -56
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -328
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -120
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -60
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -118
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -33
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -385
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -34
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -33
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -17
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -144
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -181
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -57
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -53
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -148
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -25
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -112
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -101
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -71
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -34
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -42
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -69
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -45
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -65
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -64
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +0 -14
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +0 -74
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +0 -21
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +0 -28
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +0 -25
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +0 -19
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +0 -60
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +0 -18
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +0 -53
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +0 -16
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +0 -46
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +0 -76
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +0 -21
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +0 -27
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +0 -19
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +0 -19
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +0 -60
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +0 -38
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +0 -333
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +0 -25
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +0 -124
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +0 -28
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +0 -64
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +0 -17
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +0 -122
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +0 -23
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +0 -37
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +0 -38
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +0 -391
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +0 -38
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +0 -24
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +0 -40
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +0 -253
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +0 -21
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +0 -66
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +0 -151
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +0 -52
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +0 -185
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +0 -47
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +0 -66
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +0 -73
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +0 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +0 -25
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +0 -57
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +0 -30
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +0 -152
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +0 -29
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +0 -26
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +0 -116
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +0 -35
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +0 -105
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +0 -23
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +0 -75
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +0 -15
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +0 -38
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +0 -76
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +0 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +0 -7
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -46
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +0 -28
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +0 -73
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +0 -23
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +0 -49
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +0 -69
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -68
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
2
|
import { date } from '../../../zeniDayJS';
|
|
3
|
+
import { emptyAiAgentsActivationSubview, } from './onboardingCustomerViewState';
|
|
3
4
|
const initialStatus = {
|
|
4
5
|
fetchState: 'Not-Started',
|
|
5
6
|
error: undefined,
|
|
@@ -10,60 +11,29 @@ export const initialState = {
|
|
|
10
11
|
dashboardLoadedStatus: initialStatus,
|
|
11
12
|
currentStep: 'link_payment_account',
|
|
12
13
|
companyDetails: {
|
|
14
|
+
autoFilledFields: [],
|
|
13
15
|
localData: undefined,
|
|
14
16
|
},
|
|
15
|
-
companyOfficerUpdateStatus: {
|
|
16
|
-
|
|
17
|
+
companyOfficerUpdateStatus: (() => {
|
|
18
|
+
const emptyOfficerSlot = {
|
|
19
|
+
autoFilledFields: [],
|
|
17
20
|
localData: undefined,
|
|
18
21
|
sendOtpStatus: initialStatus,
|
|
19
22
|
otpverificationStatus: initialStatus,
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
otpverificationStatus: initialStatus,
|
|
35
|
-
},
|
|
36
|
-
Officer_5: {
|
|
37
|
-
localData: undefined,
|
|
38
|
-
sendOtpStatus: initialStatus,
|
|
39
|
-
otpverificationStatus: initialStatus,
|
|
40
|
-
},
|
|
41
|
-
Officer_6: {
|
|
42
|
-
localData: undefined,
|
|
43
|
-
sendOtpStatus: initialStatus,
|
|
44
|
-
otpverificationStatus: initialStatus,
|
|
45
|
-
},
|
|
46
|
-
Officer_7: {
|
|
47
|
-
localData: undefined,
|
|
48
|
-
sendOtpStatus: initialStatus,
|
|
49
|
-
otpverificationStatus: initialStatus,
|
|
50
|
-
},
|
|
51
|
-
Officer_8: {
|
|
52
|
-
localData: undefined,
|
|
53
|
-
sendOtpStatus: initialStatus,
|
|
54
|
-
otpverificationStatus: initialStatus,
|
|
55
|
-
},
|
|
56
|
-
Officer_9: {
|
|
57
|
-
localData: undefined,
|
|
58
|
-
sendOtpStatus: initialStatus,
|
|
59
|
-
otpverificationStatus: initialStatus,
|
|
60
|
-
},
|
|
61
|
-
Officer_10: {
|
|
62
|
-
localData: undefined,
|
|
63
|
-
sendOtpStatus: initialStatus,
|
|
64
|
-
otpverificationStatus: initialStatus,
|
|
65
|
-
},
|
|
66
|
-
},
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
Officer_1: { ...emptyOfficerSlot },
|
|
26
|
+
Officer_2: { ...emptyOfficerSlot },
|
|
27
|
+
Officer_3: { ...emptyOfficerSlot },
|
|
28
|
+
Officer_4: { ...emptyOfficerSlot },
|
|
29
|
+
Officer_5: { ...emptyOfficerSlot },
|
|
30
|
+
Officer_6: { ...emptyOfficerSlot },
|
|
31
|
+
Officer_7: { ...emptyOfficerSlot },
|
|
32
|
+
Officer_8: { ...emptyOfficerSlot },
|
|
33
|
+
Officer_9: { ...emptyOfficerSlot },
|
|
34
|
+
Officer_10: { ...emptyOfficerSlot },
|
|
35
|
+
};
|
|
36
|
+
})(),
|
|
67
37
|
primaryContactDetails: {},
|
|
68
38
|
paymentAccountDetails: {
|
|
69
39
|
fetchStatus: initialStatus,
|
|
@@ -91,6 +61,7 @@ export const initialState = {
|
|
|
91
61
|
},
|
|
92
62
|
fetchState: 'Not-Started',
|
|
93
63
|
error: undefined,
|
|
64
|
+
aiAgentsActivation: { ...emptyAiAgentsActivationSubview },
|
|
94
65
|
uiState: {
|
|
95
66
|
isQBOPopupOpen: false,
|
|
96
67
|
isCardPaymentPopupOpen: false,
|
|
@@ -180,6 +151,111 @@ const onboardingCustomerView = createSlice({
|
|
|
180
151
|
};
|
|
181
152
|
},
|
|
182
153
|
},
|
|
154
|
+
acknowledgeOnboardingAiFinanceTeam: {
|
|
155
|
+
reducer(draft) {
|
|
156
|
+
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
157
|
+
fetchState: 'In-Progress',
|
|
158
|
+
error: undefined,
|
|
159
|
+
};
|
|
160
|
+
},
|
|
161
|
+
prepare(companyId) {
|
|
162
|
+
return {
|
|
163
|
+
payload: { companyId },
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
acknowledgeOnboardingAiFinanceTeamSuccess(draft) {
|
|
168
|
+
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
169
|
+
fetchState: 'Completed',
|
|
170
|
+
error: undefined,
|
|
171
|
+
};
|
|
172
|
+
},
|
|
173
|
+
acknowledgeOnboardingAiFinanceTeamFailure: {
|
|
174
|
+
reducer(draft, action) {
|
|
175
|
+
draft.aiFinanceTeamAcknowledgementStatus = {
|
|
176
|
+
fetchState: 'Error',
|
|
177
|
+
error: action.payload,
|
|
178
|
+
};
|
|
179
|
+
},
|
|
180
|
+
prepare(error) {
|
|
181
|
+
return {
|
|
182
|
+
payload: error,
|
|
183
|
+
};
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
fetchAiAgentsActivationStatus(draft) {
|
|
187
|
+
draft.aiAgentsActivation.fetchStatus = {
|
|
188
|
+
fetchState: 'In-Progress',
|
|
189
|
+
error: undefined,
|
|
190
|
+
};
|
|
191
|
+
},
|
|
192
|
+
fetchAiAgentsActivationStatusSuccess: {
|
|
193
|
+
reducer(draft, action) {
|
|
194
|
+
draft.aiAgentsActivation.fetchStatus = {
|
|
195
|
+
fetchState: 'Completed',
|
|
196
|
+
error: undefined,
|
|
197
|
+
};
|
|
198
|
+
draft.aiAgentsActivation.ledgerPhases = action.payload.ledgerPhases;
|
|
199
|
+
draft.aiAgentsActivation.backgroundPhases =
|
|
200
|
+
action.payload.backgroundPhases;
|
|
201
|
+
draft.aiAgentsActivation.counts = action.payload.counts;
|
|
202
|
+
},
|
|
203
|
+
prepare(payload) {
|
|
204
|
+
return { payload };
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
fetchAiAgentsActivationStatusFailure: {
|
|
208
|
+
reducer(draft, action) {
|
|
209
|
+
draft.aiAgentsActivation.fetchStatus = {
|
|
210
|
+
fetchState: 'Error',
|
|
211
|
+
error: action.payload,
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
prepare(error) {
|
|
215
|
+
return { payload: error };
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
aiAgentsActivationCountsUpdated: {
|
|
219
|
+
reducer(draft, action) {
|
|
220
|
+
draft.aiAgentsActivation.counts = {
|
|
221
|
+
...draft.aiAgentsActivation.counts,
|
|
222
|
+
...action.payload,
|
|
223
|
+
};
|
|
224
|
+
},
|
|
225
|
+
prepare(payload) {
|
|
226
|
+
return { payload };
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
aiAgentsActivationPhaseChanged: {
|
|
230
|
+
reducer(draft, action) {
|
|
231
|
+
const target = action.payload.section === 'ledger'
|
|
232
|
+
? draft.aiAgentsActivation.ledgerPhases
|
|
233
|
+
: draft.aiAgentsActivation.backgroundPhases;
|
|
234
|
+
const index = target.findIndex((phase) => phase.key === action.payload.key);
|
|
235
|
+
if (index === -1) {
|
|
236
|
+
target.push(action.payload);
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
target[index] = { ...target[index], ...action.payload };
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
prepare(payload) {
|
|
243
|
+
return { payload };
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
aiAgentsActivationSectionReady: {
|
|
247
|
+
reducer(draft, action) {
|
|
248
|
+
const target = action.payload.section === 'ledger'
|
|
249
|
+
? draft.aiAgentsActivation.ledgerPhases
|
|
250
|
+
: draft.aiAgentsActivation.backgroundPhases;
|
|
251
|
+
target.forEach((phase) => {
|
|
252
|
+
phase.status = 'ready';
|
|
253
|
+
});
|
|
254
|
+
},
|
|
255
|
+
prepare(payload) {
|
|
256
|
+
return { payload };
|
|
257
|
+
},
|
|
258
|
+
},
|
|
183
259
|
updateOnboardingCustomerViewDashboardLoaded: {
|
|
184
260
|
reducer(draft) {
|
|
185
261
|
draft.dashboardLoadedStatus = {
|
|
@@ -592,7 +668,49 @@ const onboardingCustomerView = createSlice({
|
|
|
592
668
|
clearOnboardingCustomerView(draft) {
|
|
593
669
|
Object.assign(draft, initialState);
|
|
594
670
|
},
|
|
671
|
+
/** Merge AI-parsed officer fields into the officer's onboarding localData. */
|
|
672
|
+
applyKycDocumentAutofillForOnboarding: {
|
|
673
|
+
reducer(draft, action) {
|
|
674
|
+
const { officerType, values, autoFilledFieldNames } = action.payload;
|
|
675
|
+
const slot = draft.companyOfficerUpdateStatus[officerType];
|
|
676
|
+
slot.localData = Object.assign({}, slot.localData, values);
|
|
677
|
+
slot.autoFilledFields = Array.from(new Set([...slot.autoFilledFields, ...autoFilledFieldNames]));
|
|
678
|
+
},
|
|
679
|
+
prepare(payload) {
|
|
680
|
+
return { payload };
|
|
681
|
+
},
|
|
682
|
+
},
|
|
683
|
+
/** Merge AI-parsed company fields into companyDetails onboarding localData. */
|
|
684
|
+
applyKybDocumentAutofillForOnboarding: {
|
|
685
|
+
reducer(draft, action) {
|
|
686
|
+
const { values, autoFilledFieldNames } = action.payload;
|
|
687
|
+
draft.companyDetails.localData = Object.assign({}, draft.companyDetails.localData, values);
|
|
688
|
+
const prev = draft.companyDetails.autoFilledFields ?? [];
|
|
689
|
+
draft.companyDetails.autoFilledFields = Array.from(new Set([...prev, ...autoFilledFieldNames]));
|
|
690
|
+
},
|
|
691
|
+
prepare(payload) {
|
|
692
|
+
return { payload };
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
/** Wipe AI-autofill badges during onboarding. */
|
|
696
|
+
clearKycKybAutofillForOnboarding: {
|
|
697
|
+
reducer(draft, action) {
|
|
698
|
+
const { officerType } = action.payload;
|
|
699
|
+
if (officerType != null) {
|
|
700
|
+
draft.companyOfficerUpdateStatus[officerType].autoFilledFields = [];
|
|
701
|
+
}
|
|
702
|
+
else {
|
|
703
|
+
draft.companyDetails.autoFilledFields = [];
|
|
704
|
+
Object.keys(draft.companyOfficerUpdateStatus).forEach((key) => {
|
|
705
|
+
draft.companyOfficerUpdateStatus[key].autoFilledFields = [];
|
|
706
|
+
});
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
prepare(payload = {}) {
|
|
710
|
+
return { payload };
|
|
711
|
+
},
|
|
712
|
+
},
|
|
595
713
|
},
|
|
596
714
|
});
|
|
597
|
-
export const { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerSetupViewSuccess, fetchOnboardingCustomerSetupViewFailure, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewCompleteStatusSuccess, updateOnboardingCustomerViewCompleteStatusFailure, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewDashboardLoadedSuccess, updateOnboardingCustomerViewDashboardLoadedFailure, updateOnboardingCustomerView, updateOnboardingCustomerViewSuccess, updateOnboardingCustomerViewFailure, updateOnboardingPaymentAccountStatus, updateOnboardingPaymentAccountStatusSuccess, updateOnboardingPaymentAccountStatusFailure, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountLoginStatusSuccess, updateOnboardingPaymentAccountLoginStatusFailure, establishOnboardingPlaidConnection, establishOnboardingPlaidConnectionSuccess, establishOnboardingPlaidConnectionFailure, getOnboardingPlaidLinkToken, getOnboardingPlaidLinkTokenSuccess, getOnboardingPlaidLinkTokenFailure, updateCurrentStep, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewLocalStoreData, saveOnboardingCustomerViewDataInLocalStore, saveOnboardingCompnayOfficerPhoneInLocalStore, updateOnboardingCustomerViewUIState, sendOnboardingOfficerOtp, sendOnboardingOfficerOtpSuccess, sendOnboardingOfficerOtpFailure, resendOnboardingOfficerOtp, verifyOnboardingOfficerOtp, verifyOnboardingOfficerOtpSuccess, verifyOnboardingOfficerOtpFailure, clearOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, } = onboardingCustomerView.actions;
|
|
715
|
+
export const { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerSetupViewSuccess, fetchOnboardingCustomerSetupViewFailure, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewCompleteStatusSuccess, updateOnboardingCustomerViewCompleteStatusFailure, acknowledgeOnboardingAiFinanceTeam, acknowledgeOnboardingAiFinanceTeamSuccess, acknowledgeOnboardingAiFinanceTeamFailure, fetchAiAgentsActivationStatus, fetchAiAgentsActivationStatusSuccess, fetchAiAgentsActivationStatusFailure, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, aiAgentsActivationSectionReady, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewDashboardLoadedSuccess, updateOnboardingCustomerViewDashboardLoadedFailure, updateOnboardingCustomerView, updateOnboardingCustomerViewSuccess, updateOnboardingCustomerViewFailure, updateOnboardingPaymentAccountStatus, updateOnboardingPaymentAccountStatusSuccess, updateOnboardingPaymentAccountStatusFailure, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountLoginStatusSuccess, updateOnboardingPaymentAccountLoginStatusFailure, establishOnboardingPlaidConnection, establishOnboardingPlaidConnectionSuccess, establishOnboardingPlaidConnectionFailure, getOnboardingPlaidLinkToken, getOnboardingPlaidLinkTokenSuccess, getOnboardingPlaidLinkTokenFailure, updateCurrentStep, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewLocalStoreData, saveOnboardingCustomerViewDataInLocalStore, saveOnboardingCompnayOfficerPhoneInLocalStore, updateOnboardingCustomerViewUIState, sendOnboardingOfficerOtp, sendOnboardingOfficerOtpSuccess, sendOnboardingOfficerOtpFailure, resendOnboardingOfficerOtp, verifyOnboardingOfficerOtp, verifyOnboardingOfficerOtpSuccess, verifyOnboardingOfficerOtpFailure, clearOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, } = onboardingCustomerView.actions;
|
|
598
716
|
export default onboardingCustomerView.reducer;
|
|
@@ -323,3 +323,17 @@ export const getProductSettingsString = (productSettings) => {
|
|
|
323
323
|
.map((key) => productKeyMap[key])
|
|
324
324
|
.join(',');
|
|
325
325
|
};
|
|
326
|
+
const fromActivationView = (state) => state.onboardingCustomerViewState.aiAgentsActivation;
|
|
327
|
+
export const getAiAgentsActivationSubview = (state) => fromActivationView(state);
|
|
328
|
+
export const getAiAgentsActivationLedgerPhases = (state) => fromActivationView(state).ledgerPhases;
|
|
329
|
+
export const getAiAgentsActivationBackgroundPhases = (state) => fromActivationView(state).backgroundPhases;
|
|
330
|
+
export const getAiAgentsActivationCounts = (state) => fromActivationView(state).counts;
|
|
331
|
+
const SECTION_ROW_STATUS_FALLBACK = 'idle';
|
|
332
|
+
const phaseStatusToRowStatus = (status) => {
|
|
333
|
+
if (status === 'ready') {
|
|
334
|
+
return 'building';
|
|
335
|
+
}
|
|
336
|
+
return status;
|
|
337
|
+
};
|
|
338
|
+
export const getAiAgentsActivationLedgerRowStatuses = (state) => fromActivationView(state).ledgerPhases.map((phase) => phaseStatusToRowStatus(phase.status ?? SECTION_ROW_STATUS_FALLBACK));
|
|
339
|
+
export const getAiAgentsActivationBackgroundRowStatuses = (state) => fromActivationView(state).backgroundPhases.map((phase) => phaseStatusToRowStatus(phase.status ?? SECTION_ROW_STATUS_FALLBACK));
|
|
@@ -26,3 +26,16 @@ export const ALL_ONBOARDING_STEPS = [
|
|
|
26
26
|
...ALL_ZENI_USER_ONBOARDING_STEPS_WITHOUT_ACCOUNT,
|
|
27
27
|
];
|
|
28
28
|
export const toOnboardingStepType = (v) => stringToUnion(v, ALL_ONBOARDING_STEPS);
|
|
29
|
+
export const emptyAiAgentsActivationCounts = {
|
|
30
|
+
customerCount: 0,
|
|
31
|
+
glAccountCount: 0,
|
|
32
|
+
targetTransactionCount: 0,
|
|
33
|
+
transactionCount: 0,
|
|
34
|
+
vendorCount: 0,
|
|
35
|
+
};
|
|
36
|
+
export const emptyAiAgentsActivationSubview = {
|
|
37
|
+
backgroundPhases: [],
|
|
38
|
+
counts: emptyAiAgentsActivationCounts,
|
|
39
|
+
fetchStatus: { fetchState: 'Not-Started', error: undefined },
|
|
40
|
+
ledgerPhases: [],
|
|
41
|
+
};
|
|
@@ -87,31 +87,6 @@ export const getChargeCardListView = (state, includeCreditAccountDebitSummaryAnd
|
|
|
87
87
|
hasDebitCard,
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
|
-
/**
|
|
91
|
-
* Returns every enriched `ChargeCardWithUser` for the tenant, without
|
|
92
|
-
* applying the cards-list screen's `searchText` filter or its column
|
|
93
|
-
* `sortKey/sortOrder`. Used by surfaces that need the raw card universe
|
|
94
|
-
* decoupled from whatever the user has typed/sorted on the cards list
|
|
95
|
-
* (e.g. the Card Policy "Apply to Cards" picker, which owns its own
|
|
96
|
-
* search + sort UI). The list-screen's filter/sort state is intentionally
|
|
97
|
-
* left untouched so revisits to the cards list still restore the user's
|
|
98
|
-
* search.
|
|
99
|
-
*/
|
|
100
|
-
export const getAllChargeCardsWithUser = (state) => {
|
|
101
|
-
const { chargeCardListState, chargeCardState, chargeCardConfigState } = state;
|
|
102
|
-
const cards = getChargeCardsByIds(chargeCardState, chargeCardListState.cardIds);
|
|
103
|
-
const chargeCardsWithUser = getChargeCardsWithUser(cards, state);
|
|
104
|
-
const fetchState = reduceFetchState([
|
|
105
|
-
chargeCardListState,
|
|
106
|
-
chargeCardConfigState,
|
|
107
|
-
]).fetchState;
|
|
108
|
-
return {
|
|
109
|
-
fetchState,
|
|
110
|
-
error: chargeCardListState.error,
|
|
111
|
-
cards: chargeCardsWithUser,
|
|
112
|
-
version: '1.0',
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
90
|
export const getMyPendingActivationChargeCardListView = (state) => {
|
|
116
91
|
const { tenantState, chargeCardListState, chargeCardState } = state;
|
|
117
92
|
const cards = getChargeCardsByIds(chargeCardState, chargeCardListState.cardIds);
|
|
@@ -7,7 +7,7 @@ import { updateAllUsers } from '../../../../entity/user/userReducer';
|
|
|
7
7
|
import { updateUserRoles } from '../../../../entity/userRole/userRoleReducer';
|
|
8
8
|
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../responsePayload';
|
|
9
9
|
import { updateChargeCardList } from '../chargeCardList/chargeCardListReducer';
|
|
10
|
-
import { issueChargeCardSuccessOrFailure, issueChargeCards, updateChargeCardCount, updateDebitCardCount,
|
|
10
|
+
import { issueChargeCardSuccessOrFailure, issueChargeCards, updateChargeCardCount, updateDebitCardCount, updateLastSelfIssuedDebitCardId, } from './issueChargeCardReducer';
|
|
11
11
|
export const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(issueChargeCards.match), switchMap(() => {
|
|
12
12
|
const state = state$.value;
|
|
13
13
|
const loggedInUserId = state$.value.tenantState.loggedInUser?.userId;
|
|
@@ -87,7 +87,7 @@ export const issueChargeCardEpic = (actions$, state$, zeniAPI) => actions$.pipe(
|
|
|
87
87
|
actions.push(updateChargeCards(issuedCards), updateAllUsers({ users: response.data.users }), updateUserRoles(response.data.user_roles), updateChargeCardList({
|
|
88
88
|
chargeCardListPayload: response.data,
|
|
89
89
|
keepExistingListItems: true,
|
|
90
|
-
}), updateAddresses(response.data.addresses), updateChargeCardCount(response.data?.cards_count_by_user_id ?? []), updateDebitCardCount(response.data?.debit_cards_count_by_deposit_account_id ?? {}),
|
|
90
|
+
}), updateAddresses(response.data.addresses), updateChargeCardCount(response.data?.cards_count_by_user_id ?? []), updateDebitCardCount(response.data?.debit_cards_count_by_deposit_account_id ?? {}), issueChargeCardSuccessOrFailure({ fetchState: 'Completed' }));
|
|
91
91
|
if (issuedCards.length === 1 &&
|
|
92
92
|
(issuedCards[0].card_type.code ===
|
|
93
93
|
'business_virtual_debit_card' ||
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
|
-
import { applyAiCardCreationFormDraftUpdate } from './applyAiCardCreationFormDraftUpdate';
|
|
3
|
-
import { buildAiCardCreationFormDraftSeed } from './buildAiCardCreationFormDraftSeed';
|
|
4
2
|
export const initialState = {
|
|
5
3
|
depositAccountIds: [],
|
|
6
4
|
depositAccountsFetchState: { fetchState: 'Not-Started', error: undefined },
|
|
@@ -16,7 +14,6 @@ export const initialState = {
|
|
|
16
14
|
},
|
|
17
15
|
activeChargeCardCount: {},
|
|
18
16
|
activeDebitCardCountByDepositAccountId: {},
|
|
19
|
-
lastIssuedCardIds: [],
|
|
20
17
|
};
|
|
21
18
|
const issueChargeCard = createSlice({
|
|
22
19
|
name: 'issueChargeCard',
|
|
@@ -37,19 +34,14 @@ const issueChargeCard = createSlice({
|
|
|
37
34
|
},
|
|
38
35
|
},
|
|
39
36
|
issueChargeCards: {
|
|
40
|
-
prepare(
|
|
41
|
-
return { payload:
|
|
37
|
+
prepare() {
|
|
38
|
+
return { payload: {} };
|
|
42
39
|
},
|
|
43
|
-
reducer(draft
|
|
40
|
+
reducer(draft) {
|
|
44
41
|
draft.saveStatus.fetchState = 'In-Progress';
|
|
45
42
|
draft.saveStatus.error = undefined;
|
|
46
|
-
draft.lastIssueSourceChatSessionId = action.payload.sourceChatSessionId;
|
|
47
|
-
draft.lastIssuedCardIds = [];
|
|
48
43
|
},
|
|
49
44
|
},
|
|
50
|
-
updateLastIssuedCardIds(draft, action) {
|
|
51
|
-
draft.lastIssuedCardIds = action.payload;
|
|
52
|
-
},
|
|
53
45
|
updateChargeCardsLocalStore(draft, action) {
|
|
54
46
|
draft.localData = action.payload;
|
|
55
47
|
},
|
|
@@ -57,8 +49,6 @@ const issueChargeCard = createSlice({
|
|
|
57
49
|
draft.localData = [...initialState.localData];
|
|
58
50
|
draft.saveStatus = initialState.saveStatus;
|
|
59
51
|
draft.lastSelfIssuedDebitCardId = undefined;
|
|
60
|
-
draft.lastIssueSourceChatSessionId = undefined;
|
|
61
|
-
draft.lastIssuedCardIds = [];
|
|
62
52
|
},
|
|
63
53
|
updateLastSelfIssuedDebitCardId(draft, action) {
|
|
64
54
|
draft.lastSelfIssuedDebitCardId = action.payload;
|
|
@@ -134,45 +124,10 @@ const issueChargeCard = createSlice({
|
|
|
134
124
|
draft.depositAccountsFetchState.fetchState = action.payload.fetchState;
|
|
135
125
|
draft.depositAccountsFetchState.error = action.payload.error;
|
|
136
126
|
},
|
|
137
|
-
/**
|
|
138
|
-
* Seed the AI card-creation form draft + companion context from the
|
|
139
|
-
* AI's `interactive_form` payload. Dispatched once when the
|
|
140
|
-
* `CardsCreationInteractiveForm` mounts (or the AI payload arrives).
|
|
141
|
-
*/
|
|
142
|
-
seedAiCardCreationFormDraft: {
|
|
143
|
-
reducer(draft, action) {
|
|
144
|
-
const { draft: nextDraft, context } = buildAiCardCreationFormDraftSeed({
|
|
145
|
-
allUsers: action.payload.allUsers,
|
|
146
|
-
initialData: action.payload.initialData,
|
|
147
|
-
});
|
|
148
|
-
draft.aiCardCreationFormDraft = nextDraft;
|
|
149
|
-
draft.aiCardCreationFormDraftContext = context;
|
|
150
|
-
},
|
|
151
|
-
prepare(allUsers, initialData) {
|
|
152
|
-
return { payload: { allUsers, initialData } };
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
/**
|
|
156
|
-
* Replace the form draft from the component's `watchHandler`. Delegates
|
|
157
|
-
* to `applyAiCardCreationFormDraftUpdate` so the same derivation rules
|
|
158
|
-
* (review-mode `cardRows` re-derivation that preserves in-place edits)
|
|
159
|
-
* are shared with the Storybook owner harness.
|
|
160
|
-
*/
|
|
161
|
-
updateAiCardCreationFormDraft(draft, action) {
|
|
162
|
-
draft.aiCardCreationFormDraft = applyAiCardCreationFormDraftUpdate({
|
|
163
|
-
prev: draft.aiCardCreationFormDraft,
|
|
164
|
-
next: action.payload,
|
|
165
|
-
context: draft.aiCardCreationFormDraftContext,
|
|
166
|
-
});
|
|
167
|
-
},
|
|
168
|
-
clearAiCardCreationFormDraft(draft) {
|
|
169
|
-
draft.aiCardCreationFormDraft = undefined;
|
|
170
|
-
draft.aiCardCreationFormDraftContext = undefined;
|
|
171
|
-
},
|
|
172
127
|
clearIssueChargeCard(draft) {
|
|
173
128
|
Object.assign(draft, initialState);
|
|
174
129
|
},
|
|
175
130
|
},
|
|
176
131
|
});
|
|
177
|
-
export const { issueChargeCards, updateChargeCardsLocalStore, updateLastSelfIssuedDebitCardId,
|
|
132
|
+
export const { issueChargeCards, updateChargeCardsLocalStore, updateLastSelfIssuedDebitCardId, issueChargeCardSuccessOrFailure, resetIssueChargeCardForm, updateCustomAddressId, updateChargeCardCount, updateDebitCardCount, fetchIssueCardPage, updateDepositAccountsInCards, fetchDepositAccountListForCards, updateDepositAccountListForCardsFetchStatus, clearIssueChargeCard, } = issueChargeCard.actions;
|
|
178
133
|
export default issueChargeCard.reducer;
|
|
@@ -5,7 +5,6 @@ import { getDepositAccountLimitsForChargeCardByDepositAccountIds } from '../../.
|
|
|
5
5
|
import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
|
|
6
6
|
import { getNewAddress } from '../../../addressView/addressViewSelector';
|
|
7
7
|
import { getUserList } from '../../../userListView/userListViewSelector';
|
|
8
|
-
import { toIssueChargeCardLocalDataFromDraft } from './toIssueChargeCardLocalDataFromDraft';
|
|
9
8
|
export const getIssueChargeCardView = (state, isCreditCardEnabled, isDebitCardEnabled) => {
|
|
10
9
|
const { issueChargeCardState, userState, userRoleState, userListViewState, chargeCardConfigState, chargeCardListState, addressState, classState, depositAccountState, classListState, } = state;
|
|
11
10
|
const userListSelectorView = getUserList(userState, userRoleState, userListViewState, 'cardHolderCandidate');
|
|
@@ -94,63 +93,3 @@ export const getIssueChargeCardView = (state, isCreditCardEnabled, isDebitCardEn
|
|
|
94
93
|
lastSelfIssuedDebitCardId: issueChargeCardState.lastSelfIssuedDebitCardId,
|
|
95
94
|
};
|
|
96
95
|
};
|
|
97
|
-
/**
|
|
98
|
-
* Returns the AI CFO chat session id that triggered the most recent
|
|
99
|
-
* `issueChargeCards` dispatch (if any). Used by the cards list screen to
|
|
100
|
-
* decide whether the in-flight bulk-create originated from an AI CFO
|
|
101
|
-
* interactive form submission and should therefore render a pending
|
|
102
|
-
* placeholder + synthetic AI CFO drawer bubble.
|
|
103
|
-
*/
|
|
104
|
-
export const getLastIssueChargeCardsSourceChatSessionId = (state) => {
|
|
105
|
-
return state.issueChargeCardState.lastIssueSourceChatSessionId;
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Returns the ids of the cards created by the most recent successful
|
|
109
|
-
* `issueChargeCards` call. Used by the AI CFO drawer's "Created" success
|
|
110
|
-
* bubble to map back to the actual created entities.
|
|
111
|
-
*/
|
|
112
|
-
export const getLastIssuedChargeCardIds = (state) => {
|
|
113
|
-
return state.issueChargeCardState.lastIssuedCardIds;
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* Returns the save-status fetch state for the most recent `issueChargeCards`
|
|
117
|
-
* dispatch. Useful for gating pending placeholder rows on `In-Progress` /
|
|
118
|
-
* swapping them out on `Completed`.
|
|
119
|
-
*/
|
|
120
|
-
export const getIssueChargeCardsSaveStatus = (state) => {
|
|
121
|
-
return state.issueChargeCardState.saveStatus;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Returns the number of card rows currently being bulk-issued via the most
|
|
125
|
-
* recent `issueChargeCards` dispatch. Mirrors `localData.length` while the
|
|
126
|
-
* call is in flight so the cards list screen can render N skeleton rows at
|
|
127
|
-
* the top of the table.
|
|
128
|
-
*/
|
|
129
|
-
export const getInFlightIssueChargeCardsCount = (state) => {
|
|
130
|
-
if (state.issueChargeCardState.saveStatus.fetchState !== 'In-Progress') {
|
|
131
|
-
return 0;
|
|
132
|
-
}
|
|
133
|
-
return state.issueChargeCardState.localData.length;
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* Returns the current AI card-creation form draft, or `undefined` before
|
|
137
|
-
* `seedAiCardCreationFormDraft` runs / after `clearAiCardCreationFormDraft`.
|
|
138
|
-
* Used by the connected screens to hydrate the
|
|
139
|
-
* `CardsCreationInteractiveForm`'s RHF.
|
|
140
|
-
*/
|
|
141
|
-
export const getAiCardCreationFormDraft = (state) => {
|
|
142
|
-
return state.issueChargeCardState.aiCardCreationFormDraft;
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* Project the AI card-creation form draft into the wire-ready
|
|
146
|
-
* `IssueChargeCardLocalData[]` payload `issueChargeCardEpic` expects.
|
|
147
|
-
* Returns an empty array when the draft is absent so callers can
|
|
148
|
-
* short-circuit submission without dispatching a no-op bulk POST.
|
|
149
|
-
*/
|
|
150
|
-
export const selectIssueChargeCardLocalDataFromDraft = (state) => {
|
|
151
|
-
const draft = state.issueChargeCardState.aiCardCreationFormDraft;
|
|
152
|
-
if (draft == null) {
|
|
153
|
-
return [];
|
|
154
|
-
}
|
|
155
|
-
return toIssueChargeCardLocalDataFromDraft(draft);
|
|
156
|
-
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { of } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { isSuccessResponse } from '../../../../../responsePayload';
|
|
4
|
+
import { applyKybDocumentAutofillForOnboarding } from '../../../../onboardingView/customerView/onboardingCustomerViewReducer';
|
|
5
|
+
import { parseUploadedKybDocument } from '../../kycKybAutofillActions';
|
|
6
|
+
import { mapCoiToCompanyDetails, mapTaxEinToCompanyDetails, } from '../../kycKybParseMapper';
|
|
7
|
+
import { applyKybDocumentAutofillForSetup } from '../../setupViewReducer';
|
|
8
|
+
const PROCESS_DOCUMENT_SYNC_PATH = '/1.0/documents/process/sync';
|
|
9
|
+
export const parseUploadedKybDocumentEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(parseUploadedKybDocument.match), mergeMap((action) => {
|
|
10
|
+
const { target, companyId, fileId, documentType } = action.payload;
|
|
11
|
+
const url = `${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}${PROCESS_DOCUMENT_SYNC_PATH}`;
|
|
12
|
+
const requestPayload = {
|
|
13
|
+
provided_document_type: documentType,
|
|
14
|
+
files: [{ file_id: fileId }],
|
|
15
|
+
processing_priority: 10,
|
|
16
|
+
metadata: { source: 'kyc_kyb_autofill' },
|
|
17
|
+
};
|
|
18
|
+
return zeniAPI
|
|
19
|
+
.postAndGetJSON(url, requestPayload)
|
|
20
|
+
.pipe(mergeMap((response) => {
|
|
21
|
+
if (!isSuccessResponse(response) || response.data == null) {
|
|
22
|
+
return of();
|
|
23
|
+
}
|
|
24
|
+
let result;
|
|
25
|
+
switch (documentType) {
|
|
26
|
+
case 'certificate_of_incorporation':
|
|
27
|
+
result = mapCoiToCompanyDetails(response.data);
|
|
28
|
+
break;
|
|
29
|
+
case 'tax_ein':
|
|
30
|
+
result = mapTaxEinToCompanyDetails(response.data);
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
if (result.autoFilledFieldNames.length === 0) {
|
|
34
|
+
return of();
|
|
35
|
+
}
|
|
36
|
+
const applyAction = target === 'setup'
|
|
37
|
+
? applyKybDocumentAutofillForSetup({
|
|
38
|
+
companyId,
|
|
39
|
+
values: result.values,
|
|
40
|
+
autoFilledFieldNames: result.autoFilledFieldNames,
|
|
41
|
+
})
|
|
42
|
+
: applyKybDocumentAutofillForOnboarding({
|
|
43
|
+
companyId,
|
|
44
|
+
values: result.values,
|
|
45
|
+
autoFilledFieldNames: result.autoFilledFieldNames,
|
|
46
|
+
});
|
|
47
|
+
return of(applyAction);
|
|
48
|
+
}), catchError(() => of()));
|
|
49
|
+
}));
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { of } from 'rxjs';
|
|
2
|
+
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
+
import { getCountryList } from '../../../../../entity/countryList/countryListSelector';
|
|
4
|
+
import { isSuccessResponse } from '../../../../../responsePayload';
|
|
5
|
+
import { applyKycDocumentAutofillForOnboarding } from '../../../../onboardingView/customerView/onboardingCustomerViewReducer';
|
|
6
|
+
import { parseUploadedKycDocument } from '../../kycKybAutofillActions';
|
|
7
|
+
import { mapDrivingLicenseToOfficer, mapPassportToOfficer, mapSsnCardToOfficer, } from '../../kycKybParseMapper';
|
|
8
|
+
import { applyKycDocumentAutofillForSetup } from '../../setupViewReducer';
|
|
9
|
+
const PROCESS_DOCUMENT_SYNC_PATH = '/1.0/documents/process/sync';
|
|
10
|
+
export const parseUploadedKycDocumentEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(parseUploadedKycDocument.match), mergeMap((action) => {
|
|
11
|
+
const { target, companyId, officerType, fileId, documentType } = action.payload;
|
|
12
|
+
const url = `${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}${PROCESS_DOCUMENT_SYNC_PATH}`;
|
|
13
|
+
const requestPayload = {
|
|
14
|
+
provided_document_type: documentType,
|
|
15
|
+
files: [{ file_id: fileId }],
|
|
16
|
+
processing_priority: 10,
|
|
17
|
+
metadata: { source: 'kyc_kyb_autofill' },
|
|
18
|
+
};
|
|
19
|
+
return zeniAPI
|
|
20
|
+
.postAndGetJSON(url, requestPayload)
|
|
21
|
+
.pipe(mergeMap((response) => {
|
|
22
|
+
if (!isSuccessResponse(response) || response.data == null) {
|
|
23
|
+
return of();
|
|
24
|
+
}
|
|
25
|
+
const allCountries = getCountryList(state$.value.countryListState, 'nationalityCountryList').countries;
|
|
26
|
+
let result;
|
|
27
|
+
switch (documentType) {
|
|
28
|
+
case 'passport':
|
|
29
|
+
result = mapPassportToOfficer(response.data, allCountries);
|
|
30
|
+
break;
|
|
31
|
+
case 'driving_license':
|
|
32
|
+
result = mapDrivingLicenseToOfficer(response.data);
|
|
33
|
+
break;
|
|
34
|
+
case 'social_security_card':
|
|
35
|
+
result = mapSsnCardToOfficer(response.data);
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
if (result.autoFilledFieldNames.length === 0) {
|
|
39
|
+
return of();
|
|
40
|
+
}
|
|
41
|
+
const applyAction = target === 'setup'
|
|
42
|
+
? applyKycDocumentAutofillForSetup({
|
|
43
|
+
companyId,
|
|
44
|
+
officerType,
|
|
45
|
+
values: result.values,
|
|
46
|
+
autoFilledFieldNames: result.autoFilledFieldNames,
|
|
47
|
+
})
|
|
48
|
+
: applyKycDocumentAutofillForOnboarding({
|
|
49
|
+
companyId,
|
|
50
|
+
officerType,
|
|
51
|
+
values: result.values,
|
|
52
|
+
autoFilledFieldNames: result.autoFilledFieldNames,
|
|
53
|
+
});
|
|
54
|
+
return of(applyAction);
|
|
55
|
+
}), catchError(() =>
|
|
56
|
+
// Autofill is best-effort; swallow errors silently so the user can keep typing.
|
|
57
|
+
of()));
|
|
58
|
+
}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trigger actions for the KYC / KYB autofill epics.
|
|
3
|
+
*
|
|
4
|
+
* These actions don't mutate state — the epic listens for them, calls
|
|
5
|
+
* document-communication-agent's sync endpoint, and dispatches the appropriate
|
|
6
|
+
* `applyKyc/KybDocumentAutofillFor{Setup,Onboarding}` against the matching
|
|
7
|
+
* slice. Co-located with the rest of the commonSetup module because the entire
|
|
8
|
+
* autofill flow is auxiliary to the setup view; there is no separate state.
|
|
9
|
+
*/
|
|
10
|
+
import { createAction } from '@reduxjs/toolkit';
|
|
11
|
+
export const parseUploadedKycDocument = createAction('commonSetup/parseUploadedKycDocument');
|
|
12
|
+
export const parseUploadedKybDocument = createAction('commonSetup/parseUploadedKybDocument');
|