@zeniai/client-epic-state 5.0.92-betaNB2 → 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/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
- package/lib/entity/accountRecon/accountReconPayload.d.ts +1 -20
- package/lib/entity/accountRecon/accountReconPayload.js +1 -23
- package/lib/entity/accountRecon/accountReconSelector.d.ts +1 -6
- package/lib/entity/accountRecon/accountReconSelector.js +0 -5
- package/lib/entity/accountRecon/accountReconState.d.ts +0 -19
- 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/monthEndCloseChecksPayload.d.ts +0 -7
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +0 -9
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -8
- 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 -3
- package/lib/epic.js +20 -3
- package/lib/esm/commonStateTypes/animations.js +1 -0
- package/lib/esm/entity/accountRecon/accountReconPayload.js +1 -23
- package/lib/esm/entity/accountRecon/accountReconSelector.js +0 -5
- 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/monthEndCloseChecks/monthEndCloseChecksPayload.js +0 -9
- 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 -3
- package/lib/esm/index.js +48 -15
- 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/expenseAutomationView/payload/reconciliationPayload.js +0 -73
- package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +4 -98
- package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -20
- package/lib/esm/view/expenseAutomationView/types/reconciliationViewState.js +0 -20
- 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 +57 -19
- package/lib/index.js +217 -37
- 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/payload/reconciliationPayload.d.ts +1 -83
- package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +0 -75
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +3 -35
- package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +5 -99
- package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +1 -5
- package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -20
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -129
- package/lib/view/expenseAutomationView/types/reconciliationViewState.js +0 -21
- 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/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
- package/package.json +1 -1
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +0 -34
- package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +0 -42
- package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.d.ts +0 -6
- package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +0 -38
- package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.d.ts +0 -19
- package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +0 -46
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for the KYC / KYB document autofill flow that lives inside the
|
|
3
|
+
* commonSetup feature (Setup pages + Onboarding both consume it via the same
|
|
4
|
+
* selector view; there is no separate state slice).
|
|
5
|
+
*
|
|
6
|
+
* Backed by document-communication-agent `POST /1.0/documents/process/sync`,
|
|
7
|
+
* which proxies document-service ExtendAI parsers and returns one of the
|
|
8
|
+
* parser payloads below — each value shaped as `{value, confidence}` per field.
|
|
9
|
+
*/
|
|
10
|
+
import { ID } from '../../../../commonStateTypes/common';
|
|
11
|
+
/**
|
|
12
|
+
* Form-side identity document types as picked in `SelectDocumentField`.
|
|
13
|
+
* These are camelCase per the web-components convention.
|
|
14
|
+
*/
|
|
15
|
+
export type KycSelectDocumentType = 'driverLicense' | 'passport' | 'ssnCard' | 'stateId';
|
|
16
|
+
/**
|
|
17
|
+
* KYC document types accepted by the document-service parsers (snake_case).
|
|
18
|
+
* Subset of {@link KycKybProvidedDocumentType}. `stateId` from the form maps
|
|
19
|
+
* to no parser today and is skipped at dispatch time.
|
|
20
|
+
*/
|
|
21
|
+
export type KycProvidedDocumentType = 'passport' | 'driving_license' | 'social_security_card';
|
|
22
|
+
/** KYB document types accepted by the document-service parsers. */
|
|
23
|
+
export type KybProvidedDocumentType = 'certificate_of_incorporation' | 'tax_ein';
|
|
24
|
+
/** All KYC / KYB document types accepted by document-communication-agent. */
|
|
25
|
+
export type KycKybProvidedDocumentType = KycProvidedDocumentType | KybProvidedDocumentType;
|
|
26
|
+
/** Field value with model confidence (0..1) as returned by ExtendAI parsers. */
|
|
27
|
+
export interface FieldWithConfidence<T = string | null> {
|
|
28
|
+
confidence: number;
|
|
29
|
+
value: T | null;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Parser payloads — keep in sync with document-service
|
|
33
|
+
* `processors/parsers/extend_*_parser.py`.
|
|
34
|
+
*/
|
|
35
|
+
export interface ExtendPassportParsed {
|
|
36
|
+
date_of_birth?: FieldWithConfidence;
|
|
37
|
+
date_of_expiry?: FieldWithConfidence;
|
|
38
|
+
date_of_issue?: FieldWithConfidence;
|
|
39
|
+
first_name?: FieldWithConfidence;
|
|
40
|
+
gender?: FieldWithConfidence;
|
|
41
|
+
issuing_authority?: FieldWithConfidence;
|
|
42
|
+
last_name?: FieldWithConfidence;
|
|
43
|
+
mrz_line_1?: FieldWithConfidence;
|
|
44
|
+
mrz_line_2?: FieldWithConfidence;
|
|
45
|
+
nationality?: FieldWithConfidence;
|
|
46
|
+
passport_number?: FieldWithConfidence;
|
|
47
|
+
place_of_birth?: FieldWithConfidence;
|
|
48
|
+
}
|
|
49
|
+
export interface ExtendDrivingLicenseParsed {
|
|
50
|
+
address_city?: FieldWithConfidence;
|
|
51
|
+
address_state?: FieldWithConfidence;
|
|
52
|
+
address_street?: FieldWithConfidence;
|
|
53
|
+
address_zip?: FieldWithConfidence;
|
|
54
|
+
date_of_birth?: FieldWithConfidence;
|
|
55
|
+
date_of_expiry?: FieldWithConfidence;
|
|
56
|
+
date_of_issue?: FieldWithConfidence;
|
|
57
|
+
first_name?: FieldWithConfidence;
|
|
58
|
+
issuing_state?: FieldWithConfidence;
|
|
59
|
+
last_name?: FieldWithConfidence;
|
|
60
|
+
license_number?: FieldWithConfidence;
|
|
61
|
+
middle_name?: FieldWithConfidence;
|
|
62
|
+
}
|
|
63
|
+
export interface ExtendSsnCardParsed {
|
|
64
|
+
full_name?: FieldWithConfidence;
|
|
65
|
+
}
|
|
66
|
+
export interface ExtendCertificateOfIncorporationParsed {
|
|
67
|
+
company_address?: FieldWithConfidence;
|
|
68
|
+
company_legal_name?: FieldWithConfidence;
|
|
69
|
+
countries_of_operations?: FieldWithConfidence<string[]>;
|
|
70
|
+
date_of_incorporation?: FieldWithConfidence;
|
|
71
|
+
ein?: FieldWithConfidence;
|
|
72
|
+
industry?: FieldWithConfidence;
|
|
73
|
+
phone_number?: FieldWithConfidence;
|
|
74
|
+
product_description?: FieldWithConfidence;
|
|
75
|
+
purpose_of_account?: FieldWithConfidence;
|
|
76
|
+
registered_address?: FieldWithConfidence;
|
|
77
|
+
regulated_status?: FieldWithConfidence;
|
|
78
|
+
source_of_funds?: FieldWithConfidence;
|
|
79
|
+
state_of_incorporation?: FieldWithConfidence;
|
|
80
|
+
sub_industry?: FieldWithConfidence;
|
|
81
|
+
sub_us_nexus?: FieldWithConfidence;
|
|
82
|
+
transaction_volume_expectations?: FieldWithConfidence;
|
|
83
|
+
type_of_incorporation?: FieldWithConfidence;
|
|
84
|
+
us_nexus?: FieldWithConfidence;
|
|
85
|
+
website?: FieldWithConfidence;
|
|
86
|
+
}
|
|
87
|
+
export interface ExtendTaxEinParsed {
|
|
88
|
+
ein?: FieldWithConfidence;
|
|
89
|
+
irs_address?: FieldWithConfidence;
|
|
90
|
+
legal_business_name?: FieldWithConfidence;
|
|
91
|
+
trade_name?: FieldWithConfidence;
|
|
92
|
+
}
|
|
93
|
+
/** POST /1.0/documents/process/sync request body. */
|
|
94
|
+
export interface SyncDocumentsProcessRequest {
|
|
95
|
+
files: Array<{
|
|
96
|
+
file_id: ID;
|
|
97
|
+
}>;
|
|
98
|
+
provided_document_type: KycKybProvidedDocumentType;
|
|
99
|
+
metadata?: {
|
|
100
|
+
source?: string;
|
|
101
|
+
} & Record<string, unknown>;
|
|
102
|
+
processing_priority?: number;
|
|
103
|
+
}
|
|
104
|
+
/** Parser payload union — `data.files[0].extracted_data` for any document type. */
|
|
105
|
+
export type ExtendExtractedData = ExtendPassportParsed | ExtendDrivingLicenseParsed | ExtendSsnCardParsed | ExtendCertificateOfIncorporationParsed | ExtendTaxEinParsed;
|
|
106
|
+
/** Per-file row inside the batch response. */
|
|
107
|
+
export interface SyncDocumentsProcessFileResult {
|
|
108
|
+
extracted_data: ExtendExtractedData | null;
|
|
109
|
+
file_id: ID;
|
|
110
|
+
status: string;
|
|
111
|
+
filename?: string | null;
|
|
112
|
+
processing_metadata?: Record<string, unknown>;
|
|
113
|
+
}
|
|
114
|
+
/** POST /1.0/documents/process/sync response body. */
|
|
115
|
+
export interface SyncDocumentsProcessResponse {
|
|
116
|
+
data: {
|
|
117
|
+
files: SyncDocumentsProcessFileResult[];
|
|
118
|
+
provided_document_type: KycKybProvidedDocumentType;
|
|
119
|
+
request_id: string;
|
|
120
|
+
status: string;
|
|
121
|
+
tenant_id: string;
|
|
122
|
+
metadata?: Record<string, unknown>;
|
|
123
|
+
} | null;
|
|
124
|
+
status: {
|
|
125
|
+
code: number;
|
|
126
|
+
message: string;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Discriminator for which Redux slice to apply the autofill to — setup pages
|
|
131
|
+
* (`spendManagement/commonSetup`) and onboarding (`onboardingView/customerView`)
|
|
132
|
+
* share the same field shapes but live in separate slices.
|
|
133
|
+
*/
|
|
134
|
+
export type KycKybAutofillTarget = 'setup' | 'onboarding';
|
|
135
|
+
/** Confidence floor below which we drop an autofill candidate. */
|
|
136
|
+
export declare const KYC_KYB_AUTOFILL_MIN_CONFIDENCE = 0.5;
|
|
137
|
+
/**
|
|
138
|
+
* Maps the form-side {@link KycSelectDocumentType} (camelCase) to the
|
|
139
|
+
* parser-side {@link KycProvidedDocumentType} (snake_case). Returns `null` for
|
|
140
|
+
* `stateId`, which has no parser today.
|
|
141
|
+
*/
|
|
142
|
+
export declare const toKycProvidedDocumentType: (selectType: KycSelectDocumentType) => KycProvidedDocumentType | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared types for the KYC / KYB document autofill flow that lives inside the
|
|
4
|
+
* commonSetup feature (Setup pages + Onboarding both consume it via the same
|
|
5
|
+
* selector view; there is no separate state slice).
|
|
6
|
+
*
|
|
7
|
+
* Backed by document-communication-agent `POST /1.0/documents/process/sync`,
|
|
8
|
+
* which proxies document-service ExtendAI parsers and returns one of the
|
|
9
|
+
* parser payloads below — each value shaped as `{value, confidence}` per field.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.toKycProvidedDocumentType = exports.KYC_KYB_AUTOFILL_MIN_CONFIDENCE = void 0;
|
|
13
|
+
/** Confidence floor below which we drop an autofill candidate. */
|
|
14
|
+
exports.KYC_KYB_AUTOFILL_MIN_CONFIDENCE = 0.5;
|
|
15
|
+
/**
|
|
16
|
+
* Maps the form-side {@link KycSelectDocumentType} (camelCase) to the
|
|
17
|
+
* parser-side {@link KycProvidedDocumentType} (snake_case). Returns `null` for
|
|
18
|
+
* `stateId`, which has no parser today.
|
|
19
|
+
*/
|
|
20
|
+
const toKycProvidedDocumentType = (selectType) => {
|
|
21
|
+
switch (selectType) {
|
|
22
|
+
case 'driverLicense':
|
|
23
|
+
return 'driving_license';
|
|
24
|
+
case 'passport':
|
|
25
|
+
return 'passport';
|
|
26
|
+
case 'ssnCard':
|
|
27
|
+
return 'social_security_card';
|
|
28
|
+
case 'stateId':
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.toKycProvidedDocumentType = toKycProvidedDocumentType;
|
|
@@ -14,7 +14,7 @@ export declare const fetchTaskListPage: import("@reduxjs/toolkit").ActionCreator
|
|
|
14
14
|
archived?: TaskPayload[];
|
|
15
15
|
deleted?: TaskPayload[];
|
|
16
16
|
snoozed?: TaskPayload[];
|
|
17
|
-
}, "taskList/updateTaskList">, updateTaskListTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"deleted" | "
|
|
17
|
+
}, "taskList/updateTaskList">, updateTaskListTab: import("@reduxjs/toolkit").ActionCreatorWithPayload<"deleted" | "archived" | "live" | "snoozed", "taskList/updateTaskListTab">, updateTaskListFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
18
18
|
fetchState: FetchState;
|
|
19
19
|
error?: ZeniAPIStatus;
|
|
20
20
|
}, "taskList/updateTaskListFetchStatus">, updateTaskListSearchText: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -8,7 +8,7 @@ import { JournalEntryTransactionLine, Line, TransactionLineBase } from '../../en
|
|
|
8
8
|
* is testable and reusable.
|
|
9
9
|
*/
|
|
10
10
|
export declare const JOURNAL_ENTRY_SORT_KEYS: readonly ["description", "name", "category", "class", "debit", "credit"];
|
|
11
|
-
export declare const toJournalEntrySortKey: (v: string) => "
|
|
11
|
+
export declare const toJournalEntrySortKey: (v: string) => "category" | "class" | "description" | "name" | "credit" | "debit";
|
|
12
12
|
export type JournalEntrySortKey = ReturnType<typeof toJournalEntrySortKey>;
|
|
13
13
|
export interface JournalEntryRowSortConfig {
|
|
14
14
|
sortKey: JournalEntrySortKey;
|
|
@@ -20,7 +20,7 @@ export interface VendorFiling1099ListQuery {
|
|
|
20
20
|
sortKey: VendorFiling1099ListViewSortKey;
|
|
21
21
|
sortOrder: SortOrder;
|
|
22
22
|
}
|
|
23
|
-
declare const toVendorFiling1099ListViewSortKey: (v: string) => "status" | "w9" | "
|
|
23
|
+
declare const toVendorFiling1099ListViewSortKey: (v: string) => "status" | "w9" | "legal_name" | "total" | "tax_classification" | "filing1099type";
|
|
24
24
|
export type VendorFiling1099ListViewSortKey = ReturnType<typeof toVendorFiling1099ListViewSortKey>;
|
|
25
25
|
export type Type1099Download = 'nec' | 'misc' | 'int';
|
|
26
26
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.93-beta0ND",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { from, of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
4
|
-
import { transformParseStatementPayloadToState, } from '../../payload/reconciliationPayload';
|
|
5
|
-
import { parseStatement, parseStatementFailure, parseStatementSuccess, updateParsedStatementData, } from '../../reducers/reconciliationViewReducer';
|
|
6
|
-
export const parseStatementEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(parseStatement.match), mergeMap((action) => {
|
|
7
|
-
const { accountId, selectedPeriod, statementUploadId } = action.payload;
|
|
8
|
-
const parseStatementApi$ = zeniAPI.getJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/2.0/statement-uploads/${statementUploadId}`);
|
|
9
|
-
return parseStatementApi$.pipe(mergeMap((response) => {
|
|
10
|
-
if (isSuccessResponse(response) === true && response.data != null) {
|
|
11
|
-
const actions = [];
|
|
12
|
-
const transformedData = transformParseStatementPayloadToState(response.data);
|
|
13
|
-
actions.push(updateParsedStatementData({
|
|
14
|
-
accountId,
|
|
15
|
-
selectedPeriod,
|
|
16
|
-
parsedStatementData: transformedData,
|
|
17
|
-
}));
|
|
18
|
-
actions.push(parseStatementSuccess({ accountId, selectedPeriod }));
|
|
19
|
-
return from(actions);
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
return of(parseStatementFailure({
|
|
23
|
-
accountId,
|
|
24
|
-
selectedPeriod,
|
|
25
|
-
error: response.status,
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
}), catchError((error) => of(parseStatementFailure({
|
|
29
|
-
accountId,
|
|
30
|
-
selectedPeriod,
|
|
31
|
-
error: createZeniAPIStatus('Unexpected Error', 'Parse Statement REST API call errored out ' +
|
|
32
|
-
JSON.stringify(error)),
|
|
33
|
-
}))));
|
|
34
|
-
}));
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap } from 'rxjs/operators';
|
|
3
|
-
import { toMonthYearPeriodId } from '../../../../commonStateTypes/timePeriod';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
|
|
5
|
-
import { transformStatementUpdateStateToPayload, } from '../../payload/reconciliationPayload';
|
|
6
|
-
import { submitStatementUpdate, submitStatementUpdateFailure, submitStatementUpdateSuccess, } from '../../reducers/reconciliationViewReducer';
|
|
7
|
-
export const updateStatementInfoEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(submitStatementUpdate.match), mergeMap((action) => {
|
|
8
|
-
const { accountId, selectedPeriod, statementUploadId } = action.payload;
|
|
9
|
-
const state = state$.value;
|
|
10
|
-
const reconciliationView = state.expenseAutomationReconciliationViewState;
|
|
11
|
-
const accountRecon = reconciliationView.accountReconciliationRecordsBySelectedPeriod[toMonthYearPeriodId(selectedPeriod)]?.reconciliationByAccountID[accountId];
|
|
12
|
-
const localData = accountRecon?.localData?.statementUpdateLocalData;
|
|
13
|
-
if (!localData) {
|
|
14
|
-
return of(submitStatementUpdateFailure({
|
|
15
|
-
accountId,
|
|
16
|
-
selectedPeriod,
|
|
17
|
-
error: createZeniAPIStatus('Missing Data', 'No statement update data found'),
|
|
18
|
-
}));
|
|
19
|
-
}
|
|
20
|
-
const payload = transformStatementUpdateStateToPayload(localData);
|
|
21
|
-
const updateStatementApi$ = zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/2.0/statement-uploads/${statementUploadId}`, payload);
|
|
22
|
-
return updateStatementApi$.pipe(mergeMap((response) => {
|
|
23
|
-
if (isSuccessResponse(response) === true && response.data != null) {
|
|
24
|
-
return of(submitStatementUpdateSuccess({
|
|
25
|
-
accountId,
|
|
26
|
-
selectedPeriod,
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
return of(submitStatementUpdateFailure({
|
|
31
|
-
accountId,
|
|
32
|
-
selectedPeriod,
|
|
33
|
-
error: response.status,
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
}), catchError((error) => of(submitStatementUpdateFailure({
|
|
37
|
-
accountId,
|
|
38
|
-
selectedPeriod,
|
|
39
|
-
error: createZeniAPIStatus('Unexpected Error', 'Update Statement REST API call errored out ' +
|
|
40
|
-
JSON.stringify(error)),
|
|
41
|
-
}))));
|
|
42
|
-
}));
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { RootState } from '../../../../reducer';
|
|
3
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
4
|
-
import { parseStatement, parseStatementFailure, parseStatementSuccess, updateParsedStatementData } from '../../reducers/reconciliationViewReducer';
|
|
5
|
-
export type ActionType = ReturnType<typeof parseStatement> | ReturnType<typeof parseStatementSuccess> | ReturnType<typeof parseStatementFailure> | ReturnType<typeof updateParsedStatementData>;
|
|
6
|
-
export declare const parseStatementEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseStatementEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
7
|
-
const reconciliationPayload_1 = require("../../payload/reconciliationPayload");
|
|
8
|
-
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
9
|
-
const parseStatementEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.parseStatement.match), (0, operators_1.mergeMap)((action) => {
|
|
10
|
-
const { accountId, selectedPeriod, statementUploadId } = action.payload;
|
|
11
|
-
const parseStatementApi$ = zeniAPI.getJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/2.0/statement-uploads/${statementUploadId}`);
|
|
12
|
-
return parseStatementApi$.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) === true && response.data != null) {
|
|
14
|
-
const actions = [];
|
|
15
|
-
const transformedData = (0, reconciliationPayload_1.transformParseStatementPayloadToState)(response.data);
|
|
16
|
-
actions.push((0, reconciliationViewReducer_1.updateParsedStatementData)({
|
|
17
|
-
accountId,
|
|
18
|
-
selectedPeriod,
|
|
19
|
-
parsedStatementData: transformedData,
|
|
20
|
-
}));
|
|
21
|
-
actions.push((0, reconciliationViewReducer_1.parseStatementSuccess)({ accountId, selectedPeriod }));
|
|
22
|
-
return (0, rxjs_1.from)(actions);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.parseStatementFailure)({
|
|
26
|
-
accountId,
|
|
27
|
-
selectedPeriod,
|
|
28
|
-
error: response.status,
|
|
29
|
-
}));
|
|
30
|
-
}
|
|
31
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.parseStatementFailure)({
|
|
32
|
-
accountId,
|
|
33
|
-
selectedPeriod,
|
|
34
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Parse Statement REST API call errored out ' +
|
|
35
|
-
JSON.stringify(error)),
|
|
36
|
-
}))));
|
|
37
|
-
}));
|
|
38
|
-
exports.parseStatementEpic = parseStatementEpic;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { RootState } from '../../../../reducer';
|
|
3
|
-
import { ZeniAPI } from '../../../../zeniAPI';
|
|
4
|
-
import { submitStatementUpdate, submitStatementUpdateFailure, submitStatementUpdateSuccess } from '../../reducers/reconciliationViewReducer';
|
|
5
|
-
export type ActionType = ReturnType<typeof submitStatementUpdate> | ReturnType<typeof submitStatementUpdateSuccess> | ReturnType<typeof submitStatementUpdateFailure>;
|
|
6
|
-
export declare const updateStatementInfoEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
|
-
payload: {
|
|
8
|
-
accountId: import("../../../..").ID;
|
|
9
|
-
selectedPeriod: import("../../../../commonStateTypes/timePeriod").MonthYearPeriod;
|
|
10
|
-
};
|
|
11
|
-
type: "expenseAutomationReconciliationView/submitStatementUpdateSuccess";
|
|
12
|
-
} | {
|
|
13
|
-
payload: {
|
|
14
|
-
accountId: import("../../../..").ID;
|
|
15
|
-
error: import("../../../../responsePayload").ZeniAPIStatus;
|
|
16
|
-
selectedPeriod: import("../../../../commonStateTypes/timePeriod").MonthYearPeriod;
|
|
17
|
-
};
|
|
18
|
-
type: "expenseAutomationReconciliationView/submitStatementUpdateFailure";
|
|
19
|
-
}>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateStatementInfoEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
|
|
7
|
-
const responsePayload_1 = require("../../../../responsePayload");
|
|
8
|
-
const reconciliationPayload_1 = require("../../payload/reconciliationPayload");
|
|
9
|
-
const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
|
|
10
|
-
const updateStatementInfoEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.submitStatementUpdate.match), (0, operators_1.mergeMap)((action) => {
|
|
11
|
-
const { accountId, selectedPeriod, statementUploadId } = action.payload;
|
|
12
|
-
const state = state$.value;
|
|
13
|
-
const reconciliationView = state.expenseAutomationReconciliationViewState;
|
|
14
|
-
const accountRecon = reconciliationView.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]?.reconciliationByAccountID[accountId];
|
|
15
|
-
const localData = accountRecon?.localData?.statementUpdateLocalData;
|
|
16
|
-
if (!localData) {
|
|
17
|
-
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
|
|
18
|
-
accountId,
|
|
19
|
-
selectedPeriod,
|
|
20
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Missing Data', 'No statement update data found'),
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
const payload = (0, reconciliationPayload_1.transformStatementUpdateStateToPayload)(localData);
|
|
24
|
-
const updateStatementApi$ = zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/2.0/statement-uploads/${statementUploadId}`, payload);
|
|
25
|
-
return updateStatementApi$.pipe((0, operators_1.mergeMap)((response) => {
|
|
26
|
-
if ((0, responsePayload_1.isSuccessResponse)(response) === true && response.data != null) {
|
|
27
|
-
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateSuccess)({
|
|
28
|
-
accountId,
|
|
29
|
-
selectedPeriod,
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
return (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
|
|
34
|
-
accountId,
|
|
35
|
-
selectedPeriod,
|
|
36
|
-
error: response.status,
|
|
37
|
-
}));
|
|
38
|
-
}
|
|
39
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
|
|
40
|
-
accountId,
|
|
41
|
-
selectedPeriod,
|
|
42
|
-
error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Update Statement REST API call errored out ' +
|
|
43
|
-
JSON.stringify(error)),
|
|
44
|
-
}))));
|
|
45
|
-
}));
|
|
46
|
-
exports.updateStatementInfoEpic = updateStatementInfoEpic;
|