@zeniai/client-epic-state 5.0.92 → 5.0.93-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 +63 -5
- package/lib/entity/aiCfo/aiCfoReducer.d.ts +23 -2
- package/lib/entity/aiCfo/aiCfoReducer.js +249 -9
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +4 -1
- package/lib/entity/aiCfo/aiCfoSelector.js +19 -1
- package/lib/entity/aiCfo/aiCfoState.d.ts +97 -4
- package/lib/entity/aiCfo/aiCfoState.js +18 -1
- package/lib/entity/cardPolicy/cardPolicyPayload.d.ts +277 -0
- package/lib/entity/cardPolicy/cardPolicyPayload.js +143 -0
- package/lib/entity/cardPolicy/cardPolicyReducer.d.ts +19 -0
- package/lib/entity/cardPolicy/cardPolicyReducer.js +175 -0
- package/lib/entity/cardPolicy/cardPolicySelector.d.ts +32 -0
- package/lib/entity/cardPolicy/cardPolicySelector.js +99 -0
- package/lib/entity/cardPolicy/cardPolicyState.d.ts +205 -0
- package/lib/entity/cardPolicy/cardPolicyState.js +14 -0
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.d.ts +18 -0
- package/lib/entity/cardPolicy/extractPolicyDocumentEpic.js +68 -0
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.d.ts +26 -0
- package/lib/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +47 -0
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.d.ts +25 -0
- package/lib/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +39 -0
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +24 -0
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +105 -0
- package/lib/entity/company/companyPayload.d.ts +4 -0
- package/lib/entity/company/companyPayload.js +4 -0
- package/lib/entity/company/companyStateTypes.d.ts +4 -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 +3 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +6 -2
- package/lib/entity/tenant/clearAllEpic.js +8 -0
- 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 +1 -0
- package/lib/entity/tenant/tenantReducer.d.ts +38 -25
- package/lib/entity/tenant/tenantReducer.js +65 -5
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/epic.d.ts +19 -1
- package/lib/epic.js +20 -1
- package/lib/esm/commonStateTypes/animations.js +1 -0
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +249 -9
- package/lib/esm/entity/aiCfo/aiCfoSelector.js +17 -1
- package/lib/esm/entity/aiCfo/aiCfoState.js +15 -0
- package/lib/esm/entity/cardPolicy/cardPolicyPayload.js +130 -0
- package/lib/esm/entity/cardPolicy/cardPolicyReducer.js +171 -0
- package/lib/esm/entity/cardPolicy/cardPolicySelector.js +75 -0
- package/lib/esm/entity/cardPolicy/cardPolicyState.js +9 -0
- package/lib/esm/entity/cardPolicy/extractPolicyDocumentEpic.js +64 -0
- package/lib/esm/entity/cardPolicy/fetchCardPolicyVendorOptionsEpic.js +43 -0
- package/lib/esm/entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic.js +35 -0
- package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +101 -0
- package/lib/esm/entity/company/companyPayload.js +4 -0
- package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +3 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +8 -0
- package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +50 -0
- package/lib/esm/entity/tenant/tenantReducer.js +63 -3
- package/lib/esm/epic.js +20 -1
- package/lib/esm/index.js +46 -13
- package/lib/esm/reducer.js +12 -0
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +6 -3
- package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
- package/lib/esm/view/aiCfoView/epics/createSessionEpic.js +2 -1
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
- package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
- package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
- package/lib/esm/view/fileView/epic/updateFileNameEpic.js +2 -2
- package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +42 -0
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +29 -0
- package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +40 -0
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +217 -50
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +7 -1
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +12 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +52 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +22 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +36 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +39 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +34 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +58 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +21 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +38 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +289 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +109 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +44 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +111 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +25 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +363 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +36 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +19 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +6 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +119 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +154 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +22 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +39 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +140 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +20 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +100 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +96 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +59 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +24 -0
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +25 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +1 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +34 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +57 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +35 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +2 -2
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +42 -4
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +35 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +62 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +44 -0
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +58 -0
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +67 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +205 -0
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +105 -52
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
- package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +28 -0
- package/lib/index.d.ts +52 -14
- package/lib/index.js +219 -31
- package/lib/reducer.d.ts +12 -0
- package/lib/reducer.js +12 -0
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +11 -2
- package/lib/view/aiCfoView/aiCfoViewReducer.js +6 -3
- package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +5 -2
- package/lib/view/aiCfoView/epics/createSessionEpic.js +2 -1
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +8 -1
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +12 -2
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
- package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
- package/lib/view/fileView/epic/updateFileNameEpic.js +1 -1
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +46 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +8 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +33 -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 +219 -51
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +5 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +11 -2
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +40 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +13 -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/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.d.ts +14 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer.js +56 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailSelector.js +28 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState.js +2 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic.js +40 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic.js +43 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic.js +38 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer.js +62 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector.js +27 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState.js +2 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic.js +42 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +294 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +113 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +48 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +115 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +13 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +29 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +14 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +369 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +6 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +40 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +26 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +116 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +10 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +33 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +126 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +52 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +158 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +31 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +12 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.js +2 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +43 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +10 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +144 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic.js +24 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +104 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +22 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +100 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +63 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +3 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +28 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +14 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +27 -1
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +34 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.js +2 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +38 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +12 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +61 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +39 -0
- 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 +12 -2
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +43 -5
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +42 -1
- package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +5 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/seedAiCardCreationFormDraftEpic.js +66 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.d.ts +3 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +48 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +28 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +62 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +30 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +71 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +33 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -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 +28 -2
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +106 -53
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +7 -2
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +19 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +142 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +32 -0
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
- package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +1 -1
- package/package.json +1 -1
package/lib/reducer.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { BillTransactionState } from './entity/billPay/billTransaction/billTrans
|
|
|
10
10
|
import { ContactState } from './entity/billPay/contact/contact';
|
|
11
11
|
import { RecurringBillState } from './entity/billPay/recurringBills/recurringBillsState';
|
|
12
12
|
import { CardPaymentState } from './entity/cardPayment/cardPaymentState';
|
|
13
|
+
import { CardPolicyState } from './entity/cardPolicy/cardPolicyState';
|
|
13
14
|
import { ChargeCardState } from './entity/chargeCard/chargeCard';
|
|
14
15
|
import { ChargeCardRepaymentState } from './entity/chargeCardRepayment/chargeCardRepayment';
|
|
15
16
|
import { ChargeCardTransactionState } from './entity/chargeCardTransaction/chargeCardTransaction';
|
|
@@ -83,6 +84,9 @@ import { BankAccountViewState } from './view/bankAccountView/bankAccountViewStat
|
|
|
83
84
|
import { BillPayCardState } from './view/billPayCard/billPayCardState';
|
|
84
85
|
import { CardBalanceState } from './view/cardBalance/cardBalanceState';
|
|
85
86
|
import { CardPaymentViewState } from './view/cardPayment/cardPaymentViewState';
|
|
87
|
+
import { CardPolicyDetailState } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailState';
|
|
88
|
+
import { CardPolicyListState } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListState';
|
|
89
|
+
import { CreateCardPolicyState } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState';
|
|
86
90
|
import { CashBalanceState } from './view/cashBalance/cashBalanceState';
|
|
87
91
|
import { CashFlowState } from './view/cashFlow/cashFlowState';
|
|
88
92
|
import { CashInCashOutState } from './view/cashInCashOut/cashInCashOutState';
|
|
@@ -235,6 +239,7 @@ type EntitiesState = {
|
|
|
235
239
|
bankAccountState: BankAccountState;
|
|
236
240
|
billTransactionState: BillTransactionState;
|
|
237
241
|
cardPaymentState: CardPaymentState;
|
|
242
|
+
cardPolicyState: CardPolicyState;
|
|
238
243
|
chargeCardRepaymentState: ChargeCardRepaymentState;
|
|
239
244
|
chargeCardState: ChargeCardState;
|
|
240
245
|
chargeCardTransactionState: ChargeCardTransactionState;
|
|
@@ -319,6 +324,8 @@ type ViewsState = {
|
|
|
319
324
|
cannedResponsesState: CannedResponsesViewState;
|
|
320
325
|
cardBalanceState: CardBalanceState;
|
|
321
326
|
cardPaymentViewState: CardPaymentViewState;
|
|
327
|
+
cardPolicyDetailState: CardPolicyDetailState;
|
|
328
|
+
cardPolicyListState: CardPolicyListState;
|
|
322
329
|
cardUserOnboardingState: CardUserOnboardingState;
|
|
323
330
|
cashbackDetailState: CashbackDetailState;
|
|
324
331
|
cashBalanceState: CashBalanceState;
|
|
@@ -342,6 +349,7 @@ type ViewsState = {
|
|
|
342
349
|
companyTaskManagerViewState: CompanyTaskManagerViewState;
|
|
343
350
|
companyViewState: CompanyViewState;
|
|
344
351
|
countryListState: CountryListState;
|
|
352
|
+
createCardPolicyState: CreateCardPolicyState;
|
|
345
353
|
createTransferEntryState: CreateTransferEntryState;
|
|
346
354
|
creditAgentEntityState: CreditAgentEntityState;
|
|
347
355
|
creditAgentViewState: CreditAgentViewState;
|
|
@@ -480,6 +488,8 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
480
488
|
billsBulkActionViewState: BillsBulkActionViewState;
|
|
481
489
|
cardBalanceState: CardBalanceState;
|
|
482
490
|
cardPaymentViewState: CardPaymentViewState;
|
|
491
|
+
cardPolicyDetailState: CardPolicyDetailState;
|
|
492
|
+
cardPolicyListState: CardPolicyListState;
|
|
483
493
|
cardUserOnboardingState: CardUserOnboardingState;
|
|
484
494
|
cashbackDetailState: CashbackDetailState;
|
|
485
495
|
cashBalanceState: CashBalanceState;
|
|
@@ -503,6 +513,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
503
513
|
companyTaskManagerViewState: CompanyTaskManagerViewState;
|
|
504
514
|
companyViewState: CompanyViewState;
|
|
505
515
|
countryListState: CountryListState;
|
|
516
|
+
createCardPolicyState: CreateCardPolicyState;
|
|
506
517
|
creditAgentEntityState: CreditAgentEntityState;
|
|
507
518
|
creditAgentViewState: CreditAgentViewState;
|
|
508
519
|
dashboardState: DashboardState;
|
|
@@ -627,6 +638,7 @@ declare const reducers: import("redux").Reducer<import("redux").CombinedState<{
|
|
|
627
638
|
billPayConfigState: BillPayConfigState;
|
|
628
639
|
billTransactionState: BillTransactionState;
|
|
629
640
|
cardPaymentState: CardPaymentState;
|
|
641
|
+
cardPolicyState: CardPolicyState;
|
|
630
642
|
chargeCardState: ChargeCardState;
|
|
631
643
|
chargeCardRepaymentState: ChargeCardRepaymentState;
|
|
632
644
|
chargeCardTransactionState: ChargeCardTransactionState;
|
package/lib/reducer.js
CHANGED
|
@@ -50,6 +50,7 @@ const billTransactionReducer_1 = __importStar(require("./entity/billPay/billTran
|
|
|
50
50
|
const contactReducer_1 = __importStar(require("./entity/billPay/contact/contactReducer"));
|
|
51
51
|
const recurringBillsReducer_1 = __importStar(require("./entity/billPay/recurringBills/recurringBillsReducer"));
|
|
52
52
|
const cardPaymentReducer_1 = __importStar(require("./entity/cardPayment/cardPaymentReducer"));
|
|
53
|
+
const cardPolicyReducer_1 = __importStar(require("./entity/cardPolicy/cardPolicyReducer"));
|
|
53
54
|
const chargeCardReducer_1 = __importStar(require("./entity/chargeCard/chargeCardReducer"));
|
|
54
55
|
const chargeCardRepaymentReducer_1 = __importStar(require("./entity/chargeCardRepayment/chargeCardRepaymentReducer"));
|
|
55
56
|
const chargeCardTransactionReducer_1 = __importStar(require("./entity/chargeCardTransaction/chargeCardTransactionReducer"));
|
|
@@ -123,6 +124,9 @@ const bankAccountViewReducer_1 = __importStar(require("./view/bankAccountView/ba
|
|
|
123
124
|
const billPayCardReducer_1 = __importStar(require("./view/billPayCard/billPayCardReducer"));
|
|
124
125
|
const cardBalanceReducer_1 = __importStar(require("./view/cardBalance/cardBalanceReducer"));
|
|
125
126
|
const cardPaymentViewReducer_1 = __importStar(require("./view/cardPayment/cardPaymentViewReducer"));
|
|
127
|
+
const cardPolicyDetailReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/cardPolicyDetailReducer"));
|
|
128
|
+
const cardPolicyListReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer"));
|
|
129
|
+
const createCardPolicyReducer_1 = __importStar(require("./view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer"));
|
|
126
130
|
const cashBalanceReducer_1 = __importStar(require("./view/cashBalance/cashBalanceReducer"));
|
|
127
131
|
const cashFlowReducer_1 = __importStar(require("./view/cashFlow/cashFlowReducer"));
|
|
128
132
|
const cashInCashOutReducer_1 = __importStar(require("./view/cashInCashOut/cashInCashOutReducer"));
|
|
@@ -277,6 +281,7 @@ const initialEntitiesState = {
|
|
|
277
281
|
bankAccountState: bankAccountReducer_1.initialState,
|
|
278
282
|
billTransactionState: billTransactionReducer_1.initialState,
|
|
279
283
|
cardPaymentState: cardPaymentReducer_1.initialState,
|
|
284
|
+
cardPolicyState: cardPolicyReducer_1.initialState,
|
|
280
285
|
chargeCardState: chargeCardReducer_1.initialState,
|
|
281
286
|
chargeCardRepaymentState: chargeCardRepaymentReducer_1.initialState,
|
|
282
287
|
chargeCardTransactionState: chargeCardTransactionReducer_1.initialState,
|
|
@@ -361,6 +366,8 @@ const initialViewsState = {
|
|
|
361
366
|
billsBulkActionViewState: billsBulkActionViewReducer_1.initialState,
|
|
362
367
|
cardBalanceState: cardBalanceReducer_1.initialState,
|
|
363
368
|
cardPaymentViewState: cardPaymentViewReducer_1.initialState,
|
|
369
|
+
cardPolicyDetailState: cardPolicyDetailReducer_1.initialState,
|
|
370
|
+
cardPolicyListState: cardPolicyListReducer_1.initialState,
|
|
364
371
|
cardUserOnboardingState: cardUserOnboardingReducer_1.initialState,
|
|
365
372
|
cashbackDetailState: cashbackDetailReducer_1.initialState,
|
|
366
373
|
cashBalanceState: cashBalanceReducer_1.initialState,
|
|
@@ -384,6 +391,7 @@ const initialViewsState = {
|
|
|
384
391
|
companyTaskManagerViewState: companyTaskManagerViewReducer_1.initialState,
|
|
385
392
|
companyViewState: companyViewReducer_1.initialState,
|
|
386
393
|
countryListState: countryListReducer_1.initialState,
|
|
394
|
+
createCardPolicyState: createCardPolicyReducer_1.initialState,
|
|
387
395
|
creditAgentEntityState: creditAgentReducer_1.initialCreditAgentEntityState,
|
|
388
396
|
creditAgentViewState: creditAgentViewReducer_1.initialState,
|
|
389
397
|
dashboardLayoutState: dashboardLayoutReducer_1.initialState,
|
|
@@ -514,6 +522,7 @@ const entityReducers = {
|
|
|
514
522
|
billPayConfigState: billPayConfigReducer_1.default,
|
|
515
523
|
billTransactionState: billTransactionReducer_1.default,
|
|
516
524
|
cardPaymentState: cardPaymentReducer_1.default,
|
|
525
|
+
cardPolicyState: cardPolicyReducer_1.default,
|
|
517
526
|
chargeCardState: chargeCardReducer_1.default,
|
|
518
527
|
chargeCardRepaymentState: chargeCardRepaymentReducer_1.default,
|
|
519
528
|
chargeCardTransactionState: chargeCardTransactionReducer_1.default,
|
|
@@ -597,6 +606,8 @@ const viewReducers = {
|
|
|
597
606
|
billsBulkActionViewState: billsBulkActionViewReducer_1.default,
|
|
598
607
|
cardBalanceState: cardBalanceReducer_1.default,
|
|
599
608
|
cardPaymentViewState: cardPaymentViewReducer_1.default,
|
|
609
|
+
cardPolicyDetailState: cardPolicyDetailReducer_1.default,
|
|
610
|
+
cardPolicyListState: cardPolicyListReducer_1.default,
|
|
600
611
|
cardUserOnboardingState: cardUserOnboardingReducer_1.default,
|
|
601
612
|
cashbackDetailState: cashbackDetailReducer_1.default,
|
|
602
613
|
cashBalanceState: cashBalanceReducer_1.default,
|
|
@@ -620,6 +631,7 @@ const viewReducers = {
|
|
|
620
631
|
companyTaskManagerViewState: companyTaskManagerViewReducer_1.default,
|
|
621
632
|
companyViewState: companyViewReducer_1.default,
|
|
622
633
|
countryListState: countryListReducer_1.default,
|
|
634
|
+
createCardPolicyState: createCardPolicyReducer_1.default,
|
|
623
635
|
creditAgentEntityState: creditAgentReducer_1.default,
|
|
624
636
|
creditAgentViewState: creditAgentViewReducer_1.default,
|
|
625
637
|
dashboardState: dashboardReducer_1.default,
|
|
@@ -25,17 +25,18 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
|
|
|
25
25
|
}, "aiCfoView/updateResponseState">, updateAiCfoViewScrollPosition: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "aiCfoView/updateAiCfoViewScrollPosition">, updateCurrentInput: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "aiCfoView/updateCurrentInput">, clearInput: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiCfoView/clearInput">, setSession: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
26
26
|
agentId: string;
|
|
27
27
|
sessionId: string;
|
|
28
|
-
}, "aiCfoView/setSession">, createSession: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, contextRefId?: string | undefined, contextType?: string | undefined], {
|
|
28
|
+
}, "aiCfoView/setSession">, createSession: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, contextRefId?: string | undefined, contextType?: string | undefined, pageContext?: string | undefined], {
|
|
29
29
|
agentId: string;
|
|
30
30
|
contextRefId: string | undefined;
|
|
31
31
|
contextType: string | undefined;
|
|
32
|
+
pageContext: string | undefined;
|
|
32
33
|
userId: string;
|
|
33
34
|
}, "aiCfoView/createSession", never, never>, createSessionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
34
35
|
agentId: string;
|
|
35
36
|
sessionId: ID;
|
|
36
37
|
contextMessage?: string;
|
|
37
38
|
contextStatus?: ContextStatus;
|
|
38
|
-
}, "aiCfoView/createSessionSuccess">, createSessionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiCfoView/createSessionFailure">, createSessionAndSubmit: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, questionAnswerId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined], {
|
|
39
|
+
}, "aiCfoView/createSessionSuccess">, createSessionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiCfoView/createSessionFailure">, createSessionAndSubmit: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, questionAnswerId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined, pageContext?: string | undefined], {
|
|
39
40
|
agentId: string;
|
|
40
41
|
userId: string;
|
|
41
42
|
questionAnswerId: string;
|
|
@@ -43,6 +44,7 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
|
|
|
43
44
|
createdAt: import("dayjs").Dayjs;
|
|
44
45
|
question: string;
|
|
45
46
|
files: File[] | undefined;
|
|
47
|
+
pageContext: string | undefined;
|
|
46
48
|
}, "aiCfoView/createSessionAndSubmit", never, never>, initializeNewSessionState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
47
49
|
agentId: string;
|
|
48
50
|
sessionId: ID;
|
|
@@ -92,6 +94,13 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
|
|
|
92
94
|
questionAnswerId: ID;
|
|
93
95
|
}, "aiCfoView/updateCotCollapsedState">, fetchSuggestedQuestions: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
94
96
|
pageContext: AiCfoSuggestedQuestionsPageContext;
|
|
97
|
+
/**
|
|
98
|
+
* AI Card Creation flow: when true, the epic appends `&no_card_created=true`
|
|
99
|
+
* so the backend tailors prompts for a tenant that has not yet created a
|
|
100
|
+
* card. The bucket key is unchanged (`pageContext`); see
|
|
101
|
+
* `useFetchSuggestedQuestionsWhenReady` for the refetch-on-flag-flip rule.
|
|
102
|
+
*/
|
|
103
|
+
noCardCreated?: boolean;
|
|
95
104
|
}, "aiCfoView/fetchSuggestedQuestions">, fetchSuggestedQuestionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
96
105
|
generatedAt: string;
|
|
97
106
|
pageContext: AiCfoSuggestedQuestionsPageContext;
|
|
@@ -192,8 +192,10 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
192
192
|
draft.createSessionState.fetchState = 'In-Progress';
|
|
193
193
|
draft.createSessionState.error = undefined;
|
|
194
194
|
},
|
|
195
|
-
prepare(agentId, userId, contextRefId, contextType) {
|
|
196
|
-
return {
|
|
195
|
+
prepare(agentId, userId, contextRefId, contextType, pageContext) {
|
|
196
|
+
return {
|
|
197
|
+
payload: { agentId, contextRefId, contextType, pageContext, userId },
|
|
198
|
+
};
|
|
197
199
|
},
|
|
198
200
|
},
|
|
199
201
|
createSessionSuccess(draft, action) {
|
|
@@ -224,7 +226,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
224
226
|
draft.createSessionAndSubmitState.fetchState = 'In-Progress';
|
|
225
227
|
draft.createSessionAndSubmitState.error = undefined;
|
|
226
228
|
},
|
|
227
|
-
prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files) {
|
|
229
|
+
prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext) {
|
|
228
230
|
return {
|
|
229
231
|
payload: {
|
|
230
232
|
agentId,
|
|
@@ -234,6 +236,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
234
236
|
createdAt,
|
|
235
237
|
question,
|
|
236
238
|
files,
|
|
239
|
+
pageContext,
|
|
237
240
|
},
|
|
238
241
|
};
|
|
239
242
|
},
|
|
@@ -69,8 +69,11 @@ function waitForChannelSubscription(pusherInstance, channelName, timeoutMs = 500
|
|
|
69
69
|
}));
|
|
70
70
|
}
|
|
71
71
|
const createSessionAndSubmitEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.createSessionAndSubmit.match), (0, operators_1.switchMap)((action) => {
|
|
72
|
-
const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, } = action.payload;
|
|
73
|
-
const payload = {
|
|
72
|
+
const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext, } = action.payload;
|
|
73
|
+
const payload = {
|
|
74
|
+
agent_id: agentId,
|
|
75
|
+
...(pageContext != null && { page_context: pageContext }),
|
|
76
|
+
};
|
|
74
77
|
return zeniAPI
|
|
75
78
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
|
|
76
79
|
.pipe((0, operators_1.mergeMap)((response) => {
|
|
@@ -8,11 +8,12 @@ const responsePayload_1 = require("../../../responsePayload");
|
|
|
8
8
|
const zeniDayJS_1 = require("../../../zeniDayJS");
|
|
9
9
|
const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
|
|
10
10
|
const createSessionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.createSession.match), (0, operators_1.switchMap)((action) => {
|
|
11
|
-
const { agentId, contextRefId, contextType, userId } = action.payload;
|
|
11
|
+
const { agentId, contextRefId, contextType, pageContext, userId } = action.payload;
|
|
12
12
|
const payload = {
|
|
13
13
|
agent_id: agentId,
|
|
14
14
|
...(contextRefId != null && { context_ref_id: contextRefId }),
|
|
15
15
|
...(contextType != null && { context_type: contextType }),
|
|
16
|
+
...(pageContext != null && { page_context: pageContext }),
|
|
16
17
|
};
|
|
17
18
|
return zeniAPI
|
|
18
19
|
.postAndGetJSON(`${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/sessions`, payload)
|
|
@@ -4,5 +4,12 @@ import { RootState } from '../../../reducer';
|
|
|
4
4
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
5
|
import { fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess } from '../aiCfoViewReducer';
|
|
6
6
|
export type ActionType = ReturnType<typeof fetchSuggestedQuestions> | ReturnType<typeof fetchSuggestedQuestionsSuccess> | ReturnType<typeof fetchSuggestedQuestionsFailure>;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=...
|
|
9
|
+
*
|
|
10
|
+
* Appends `&no_card_created=true` when the action payload sets
|
|
11
|
+
* `noCardCreated: true` (AI Card Creation flow on the cards list — the tenant
|
|
12
|
+
* has not yet created any card). Any other value omits the flag entirely so
|
|
13
|
+
* the existing call sites continue to issue the unchanged request.
|
|
14
|
+
*/
|
|
8
15
|
export declare const fetchSuggestedQuestionsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -5,13 +5,23 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const responsePayload_1 = require("../../../responsePayload");
|
|
7
7
|
const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* GET {aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?page_context=...
|
|
10
|
+
*
|
|
11
|
+
* Appends `&no_card_created=true` when the action payload sets
|
|
12
|
+
* `noCardCreated: true` (AI Card Creation flow on the cards list — the tenant
|
|
13
|
+
* has not yet created any card). Any other value omits the flag entirely so
|
|
14
|
+
* the existing call sites continue to issue the unchanged request.
|
|
15
|
+
*/
|
|
9
16
|
const fetchSuggestedQuestionsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.fetchSuggestedQuestions.match),
|
|
10
17
|
// mergeMap (not switchMap): each page_context is keyed separately in Redux; switchMap
|
|
11
18
|
// would cancel in-flight HTTP for context A when B is requested, leaving A stuck In-Progress.
|
|
12
19
|
(0, operators_1.mergeMap)((action) => {
|
|
13
|
-
const { pageContext } = action.payload;
|
|
20
|
+
const { pageContext, noCardCreated } = action.payload;
|
|
14
21
|
const query = new URLSearchParams({ page_context: pageContext });
|
|
22
|
+
if (noCardCreated === true) {
|
|
23
|
+
query.set('no_card_created', 'true');
|
|
24
|
+
}
|
|
15
25
|
const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/suggested-questions?${query.toString()}`;
|
|
16
26
|
return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
|
|
17
27
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
|
|
|
39
39
|
export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
|
|
40
40
|
export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
|
|
41
41
|
export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
|
|
42
|
-
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
|
|
42
|
+
messageSection: "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron";
|
|
43
43
|
messageText: "notification" | "failed" | "success";
|
|
44
44
|
type: "error" | "success" | "info";
|
|
45
45
|
variables: {
|
|
@@ -20,7 +20,7 @@ export interface SaveReconciliationDetailFailurePayload {
|
|
|
20
20
|
error: ZeniAPIStatus;
|
|
21
21
|
fetchStateByAction: SaveReconcileDetailActionPayload;
|
|
22
22
|
}
|
|
23
|
-
export declare const toReconciliationTabsType: (v: string) => "
|
|
23
|
+
export declare const toReconciliationTabsType: (v: string) => "review" | "reconcile";
|
|
24
24
|
export declare type ReconciliationViewTabType = ReturnType<typeof toReconciliationTabsType>;
|
|
25
25
|
declare const toReconReconcileSortKeysType: (v: string) => "date" | "amount" | "type" | "account" | "memo" | "clearedDate" | "payee" | "transactionDirection" | "recommended";
|
|
26
26
|
export declare type ReconReconcileSortKey = ReturnType<typeof toReconReconcileSortKeysType>;
|
|
@@ -6,7 +6,7 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const fileReducer_1 = require("../../../entity/file/fileReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const fileViewReducer_1 = require("../fileViewReducer");
|
|
9
|
-
const deleteFileEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.deleteFile.match), (0, operators_1.
|
|
9
|
+
const deleteFileEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.deleteFile.match), (0, operators_1.mergeMap)((action) => {
|
|
10
10
|
/**
|
|
11
11
|
* tenantId is required for deleting onboarding files.
|
|
12
12
|
*/
|
|
@@ -6,7 +6,7 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const fileReducer_1 = require("../../../entity/file/fileReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const fileViewReducer_1 = require("../fileViewReducer");
|
|
9
|
-
const deleteFileListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.deleteFileList.match), (0, operators_1.
|
|
9
|
+
const deleteFileListEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.deleteFileList.match), (0, operators_1.mergeMap)((action) => {
|
|
10
10
|
const { fileIds } = action.payload;
|
|
11
11
|
return zeniAPI
|
|
12
12
|
.deleteAndGetJSON(`${zeniAPI.apiEndPoints.fileMicroServiceBaseUrl}/1.0/files?query=${encodeURIComponent(JSON.stringify({ file_ids: fileIds }))}`)
|
|
@@ -6,7 +6,7 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const fileReducer_1 = require("../../../entity/file/fileReducer");
|
|
7
7
|
const responsePayload_1 = require("../../../responsePayload");
|
|
8
8
|
const fileViewReducer_1 = require("../fileViewReducer");
|
|
9
|
-
const updateFileNameEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.updateFileName.match), (0, operators_1.
|
|
9
|
+
const updateFileNameEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(fileViewReducer_1.updateFileName.match), (0, operators_1.mergeMap)((action) => {
|
|
10
10
|
/**
|
|
11
11
|
* tenantId is required for updating onboarding file names.
|
|
12
12
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RootState } from '../../../../../reducer';
|
|
4
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
5
|
+
import { fetchAiAgentsActivationStatus, fetchAiAgentsActivationStatusFailure, fetchAiAgentsActivationStatusSuccess } from '../../onboardingCustomerViewReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof fetchAiAgentsActivationStatus> | ReturnType<typeof fetchAiAgentsActivationStatusSuccess> | ReturnType<typeof fetchAiAgentsActivationStatusFailure>;
|
|
7
|
+
export declare const fetchAiAgentsActivationStatusEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchAiAgentsActivationStatusEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
7
|
+
const onboardingCustomerViewReducer_1 = require("../../onboardingCustomerViewReducer");
|
|
8
|
+
const toPhaseStatus = (raw) => {
|
|
9
|
+
if (raw === 'idle' ||
|
|
10
|
+
raw === 'starting' ||
|
|
11
|
+
raw === 'building' ||
|
|
12
|
+
raw === 'ready') {
|
|
13
|
+
return raw;
|
|
14
|
+
}
|
|
15
|
+
return 'idle';
|
|
16
|
+
};
|
|
17
|
+
const toPhase = (row) => ({
|
|
18
|
+
key: row.key,
|
|
19
|
+
status: toPhaseStatus(row.status),
|
|
20
|
+
startedAt: row.started_at,
|
|
21
|
+
completedAt: row.completed_at,
|
|
22
|
+
});
|
|
23
|
+
const toCounts = (payload) => ({
|
|
24
|
+
customerCount: payload?.customer_count ?? 0,
|
|
25
|
+
glAccountCount: payload?.gl_account_count ?? 0,
|
|
26
|
+
targetTransactionCount: payload?.target_transaction_count ?? 0,
|
|
27
|
+
transactionCount: payload?.transaction_count ?? 0,
|
|
28
|
+
vendorCount: payload?.vendor_count ?? 0,
|
|
29
|
+
});
|
|
30
|
+
const fetchAiAgentsActivationStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(onboardingCustomerViewReducer_1.fetchAiAgentsActivationStatus.match), (0, operators_1.mergeMap)(() => {
|
|
31
|
+
const url = `${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/ai-agents-activation/status`;
|
|
32
|
+
return zeniAPI
|
|
33
|
+
.getJSON(url)
|
|
34
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
35
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
36
|
+
const phases = (response.data.phases ?? []).map(toPhase);
|
|
37
|
+
return (0, rxjs_1.of)((0, onboardingCustomerViewReducer_1.fetchAiAgentsActivationStatusSuccess)({
|
|
38
|
+
phases,
|
|
39
|
+
counts: toCounts(response.data.counts),
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
return (0, rxjs_1.of)((0, onboardingCustomerViewReducer_1.fetchAiAgentsActivationStatusFailure)(response.status));
|
|
43
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, onboardingCustomerViewReducer_1.fetchAiAgentsActivationStatusFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'fetchAiAgentsActivationStatus errored out ' +
|
|
44
|
+
JSON.stringify(error))))));
|
|
45
|
+
}));
|
|
46
|
+
exports.fetchAiAgentsActivationStatusEpic = fetchAiAgentsActivationStatusEpic;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateCompanies } from '../../../../../entity/company/companyReducer';
|
|
4
|
+
import { RootState } from '../../../../../reducer';
|
|
5
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
6
|
+
import { acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiActivationViewedFailure, acknowledgeOnboardingAiActivationViewedSuccess } from '../../onboardingCustomerViewReducer';
|
|
7
|
+
export type ActionType = ReturnType<typeof acknowledgeOnboardingAiActivationViewed> | ReturnType<typeof updateCompanies> | ReturnType<typeof acknowledgeOnboardingAiActivationViewedSuccess> | ReturnType<typeof acknowledgeOnboardingAiActivationViewedFailure>;
|
|
8
|
+
export declare const acknowledgeOnboardingAiActivationViewedEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.acknowledgeOnboardingAiActivationViewedEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const companyReducer_1 = require("../../../../../entity/company/companyReducer");
|
|
7
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
8
|
+
const onboardingCustomerViewReducer_1 = require("../../onboardingCustomerViewReducer");
|
|
9
|
+
const acknowledgeOnboardingAiActivationViewedEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(onboardingCustomerViewReducer_1.acknowledgeOnboardingAiActivationViewed.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
+
const { companyId } = action.payload;
|
|
11
|
+
const payload = {
|
|
12
|
+
is_onboarding_ai_activation_viewed: true,
|
|
13
|
+
};
|
|
14
|
+
return zeniAPI
|
|
15
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, payload)
|
|
16
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
17
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
18
|
+
const actions = [
|
|
19
|
+
(0, companyReducer_1.updateCompanies)({
|
|
20
|
+
payload: response.data.companies,
|
|
21
|
+
schema: {},
|
|
22
|
+
}),
|
|
23
|
+
(0, onboardingCustomerViewReducer_1.acknowledgeOnboardingAiActivationViewedSuccess)(),
|
|
24
|
+
];
|
|
25
|
+
return (0, rxjs_1.from)(actions);
|
|
26
|
+
}
|
|
27
|
+
return (0, rxjs_1.of)((0, onboardingCustomerViewReducer_1.acknowledgeOnboardingAiActivationViewedFailure)(response.status));
|
|
28
|
+
}),
|
|
29
|
+
// Best-effort — failure is silent; cascade just runs again next visit.
|
|
30
|
+
(0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, onboardingCustomerViewReducer_1.acknowledgeOnboardingAiActivationViewedFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Acknowledge - Onboarding AI Activation Viewed errored out' +
|
|
31
|
+
JSON.stringify(error))))));
|
|
32
|
+
}));
|
|
33
|
+
exports.acknowledgeOnboardingAiActivationViewedEpic = acknowledgeOnboardingAiActivationViewedEpic;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { updateCompanies } from '../../../../../entity/company/companyReducer';
|
|
4
|
+
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
5
|
+
import { RootState } from '../../../../../reducer';
|
|
6
|
+
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
7
|
+
import { acknowledgeOnboardingAiFinanceTeam, acknowledgeOnboardingAiFinanceTeamFailure, acknowledgeOnboardingAiFinanceTeamSuccess } from '../../onboardingCustomerViewReducer';
|
|
8
|
+
export type ActionType = ReturnType<typeof acknowledgeOnboardingAiFinanceTeam> | ReturnType<typeof updateCompanies> | ReturnType<typeof openSnackbar> | ReturnType<typeof acknowledgeOnboardingAiFinanceTeamSuccess> | ReturnType<typeof acknowledgeOnboardingAiFinanceTeamFailure>;
|
|
9
|
+
export declare const acknowledgeOnboardingAiFinanceTeamEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.acknowledgeOnboardingAiFinanceTeamEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const companyReducer_1 = require("../../../../../entity/company/companyReducer");
|
|
7
|
+
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
8
|
+
const responsePayload_1 = require("../../../../../responsePayload");
|
|
9
|
+
const onboardingCustomerViewReducer_1 = require("../../onboardingCustomerViewReducer");
|
|
10
|
+
const acknowledgeOnboardingAiFinanceTeamEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(onboardingCustomerViewReducer_1.acknowledgeOnboardingAiFinanceTeam.match), (0, operators_1.mergeMap)((action) => {
|
|
11
|
+
const { companyId } = action.payload;
|
|
12
|
+
const payload = {
|
|
13
|
+
is_onboarding_ai_finance_team_acknowledged: true,
|
|
14
|
+
};
|
|
15
|
+
return zeniAPI
|
|
16
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, payload)
|
|
17
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
18
|
+
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
|
|
19
|
+
const actions = [
|
|
20
|
+
(0, companyReducer_1.updateCompanies)({
|
|
21
|
+
payload: response.data.companies,
|
|
22
|
+
schema: {},
|
|
23
|
+
}),
|
|
24
|
+
(0, onboardingCustomerViewReducer_1.acknowledgeOnboardingAiFinanceTeamSuccess)(),
|
|
25
|
+
];
|
|
26
|
+
return (0, rxjs_1.from)(actions);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return (0, rxjs_1.of)((0, snackbarReducer_1.openSnackbar)({
|
|
30
|
+
messageSection: 'onboarding_customer_view_complete',
|
|
31
|
+
messageText: 'failed',
|
|
32
|
+
type: 'error',
|
|
33
|
+
variables: [
|
|
34
|
+
{
|
|
35
|
+
variableName: '_api-error_',
|
|
36
|
+
variableValue: response.status.message,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
}), (0, onboardingCustomerViewReducer_1.acknowledgeOnboardingAiFinanceTeamFailure)(response.status));
|
|
40
|
+
}
|
|
41
|
+
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, onboardingCustomerViewReducer_1.acknowledgeOnboardingAiFinanceTeamFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Acknowledge - Onboarding AI Finance Team errored out' +
|
|
42
|
+
JSON.stringify(error))))));
|
|
43
|
+
}));
|
|
44
|
+
exports.acknowledgeOnboardingAiFinanceTeamEpic = acknowledgeOnboardingAiFinanceTeamEpic;
|
|
@@ -15,6 +15,9 @@ export interface OnboardingStatusPayload {
|
|
|
15
15
|
is_user_landed_to_interim_page: boolean;
|
|
16
16
|
should_complete_onboarding: boolean;
|
|
17
17
|
}
|
|
18
|
+
export interface AiFinanceTeamAcknowledgementPayload {
|
|
19
|
+
is_onboarding_ai_finance_team_acknowledged: boolean;
|
|
20
|
+
}
|
|
18
21
|
interface CompaniesData {
|
|
19
22
|
companies: CompanyPayload[];
|
|
20
23
|
}
|