@zeniai/client-epic-state 5.1.0-betaSS2 → 5.1.0
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/amount.d.ts +1 -0
- package/lib/commonStateTypes/amount.js +9 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/commonStateTypes/workingDayHelper.d.ts +9 -0
- package/lib/commonStateTypes/workingDayHelper.js +28 -1
- package/lib/entity/account/accountSelector.d.ts +9 -0
- package/lib/entity/account/accountSelector.js +14 -1
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/aiCfo/aiCfoPayload.d.ts +64 -5
- package/lib/entity/aiCfo/aiCfoReducer.d.ts +23 -2
- package/lib/entity/aiCfo/aiCfoReducer.js +252 -10
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +4 -1
- package/lib/entity/aiCfo/aiCfoSelector.js +19 -1
- package/lib/entity/aiCfo/aiCfoState.d.ts +98 -4
- package/lib/entity/aiCfo/aiCfoState.js +20 -1
- package/lib/entity/approvalRule/approvalRuleConflict.d.ts +56 -0
- package/lib/entity/approvalRule/approvalRuleConflict.js +77 -0
- package/lib/entity/approvalRule/approvalRulePayload.d.ts +34 -5
- package/lib/entity/approvalRule/approvalRulePayload.js +145 -10
- package/lib/entity/approvalRule/approvalRuleSelector.d.ts +25 -1
- package/lib/entity/approvalRule/approvalRuleSelector.js +40 -0
- package/lib/entity/approvalRule/approvalRuleState.d.ts +59 -7
- 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/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +7 -0
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +2 -0
- package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +1 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -1
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/sectionProjectView/sectionProjectView.d.ts +1 -1
- package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +7 -0
- package/lib/entity/task/taskPayload.d.ts +3 -1
- package/lib/entity/task/taskPayload.js +2 -0
- package/lib/entity/task/taskState.d.ts +2 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +9 -2
- package/lib/entity/tenant/clearAllEpic.js +14 -0
- package/lib/entity/tenant/tenantPayload.d.ts +21 -0
- package/lib/entity/tenant/tenantReducer.d.ts +14 -5
- package/lib/entity/tenant/tenantReducer.js +132 -8
- package/lib/entity/tenant/tenantState.d.ts +24 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +4 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +18 -10
- package/lib/entity/transaction/stateTypes/transaction.d.ts +3 -0
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +2 -1
- package/lib/entity/transaction/stateTypes/transactionLine.js +2 -1
- package/lib/epic.d.ts +31 -2
- package/lib/epic.js +31 -2
- package/lib/esm/commonStateTypes/amount.js +7 -0
- package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +2 -0
- package/lib/esm/commonStateTypes/workingDayHelper.js +26 -0
- package/lib/esm/entity/account/accountSelector.js +11 -0
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +252 -10
- package/lib/esm/entity/aiCfo/aiCfoSelector.js +17 -1
- package/lib/esm/entity/aiCfo/aiCfoState.js +17 -0
- package/lib/esm/entity/approvalRule/approvalRuleConflict.js +74 -0
- package/lib/esm/entity/approvalRule/approvalRulePayload.js +145 -10
- package/lib/esm/entity/approvalRule/approvalRuleSelector.js +35 -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/jeSchedules/jeSchedulesPayload.js +7 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +7 -0
- package/lib/esm/entity/task/taskPayload.js +2 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +14 -0
- package/lib/esm/entity/tenant/tenantReducer.js +130 -7
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +18 -10
- package/lib/esm/entity/transaction/stateTypes/transactionLine.js +1 -0
- package/lib/esm/epic.js +31 -2
- package/lib/esm/index.js +68 -28
- package/lib/esm/reducer.js +21 -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/companyTaskManagerView/companyTaskManagerViewReducer.js +39 -11
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewSelector.js +14 -4
- package/lib/esm/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +38 -0
- package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +37 -28
- package/lib/esm/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +16 -0
- package/lib/esm/view/companyView/companyViewReducer.js +46 -1
- package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +25 -0
- package/lib/esm/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +98 -0
- package/lib/esm/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/esm/view/createTransferEntry/createTransferEntryReducer.js +82 -0
- package/lib/esm/view/createTransferEntry/createTransferEntrySelector.js +64 -0
- package/lib/esm/view/createTransferEntry/createTransferEntryState.js +17 -0
- package/lib/esm/view/createTransferEntry/epics/createTransferEntryEpic.js +136 -0
- package/lib/esm/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +36 -0
- package/lib/esm/view/dashboard/dashboardReducer.js +11 -1
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -3
- package/lib/esm/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +3 -4
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +13 -9
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic.js +3 -16
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +9 -16
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.js +2 -13
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +2 -6
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +2 -6
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewReducer.js +3 -20
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +20 -44
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +13 -6
- package/lib/esm/view/expenseAutomationView/transactionFilterHelpers.js +106 -18
- package/lib/esm/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +22 -2
- package/lib/esm/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +14 -0
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +109 -12
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +10 -2
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +8 -4
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +11 -7
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +54 -0
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +13 -4
- package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +140 -16
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +60 -4
- package/lib/esm/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +8 -2
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +29 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +78 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +47 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +47 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +34 -0
- package/lib/esm/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +32 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +54 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +92 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +225 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +10 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +23 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +36 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +27 -0
- package/lib/esm/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +28 -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 +71 -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 +49 -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/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +5 -1
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +10 -2
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +8 -2
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +11 -7
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +61 -0
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +13 -4
- package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +80 -11
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +18 -0
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +18 -0
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +1 -1
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +45 -1
- package/lib/esm/view/transactionDetail/journalEntryLinesViewModel.js +149 -0
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +6 -1
- package/lib/index.d.ts +84 -34
- package/lib/index.js +261 -37
- package/lib/reducer.d.ts +21 -0
- package/lib/reducer.js +21 -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/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/companyTaskManagerView/companyTaskManagerViewPayload.d.ts +19 -11
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +11 -5
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +40 -12
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.d.ts +2 -0
- package/lib/view/companyTaskManagerView/companyTaskManagerViewSelector.js +13 -3
- package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +11 -3
- package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.d.ts +10 -0
- package/lib/view/companyTaskManagerView/epics/fetchCockpitContextEpic.js +42 -0
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.d.ts +1 -3
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +37 -28
- package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.d.ts +6 -0
- package/lib/view/companyTaskManagerView/epics/updateCompanyTaskManagerViewFiltersEpic.js +20 -0
- package/lib/view/companyView/companyViewReducer.d.ts +12 -1
- package/lib/view/companyView/companyViewReducer.js +48 -3
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.d.ts +9 -0
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +29 -0
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.d.ts +10 -0
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +102 -0
- package/lib/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/view/companyView/types/cockpitTypes.d.ts +3 -2
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +1 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +4 -0
- package/lib/view/createTransferEntry/createTransferEntryReducer.d.ts +32 -0
- package/lib/view/createTransferEntry/createTransferEntryReducer.js +86 -0
- package/lib/view/createTransferEntry/createTransferEntrySelector.d.ts +39 -0
- package/lib/view/createTransferEntry/createTransferEntrySelector.js +69 -0
- package/lib/view/createTransferEntry/createTransferEntryState.d.ts +30 -0
- package/lib/view/createTransferEntry/createTransferEntryState.js +20 -0
- package/lib/view/createTransferEntry/epics/createTransferEntryEpic.d.ts +11 -0
- package/lib/view/createTransferEntry/epics/createTransferEntryEpic.js +140 -0
- package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.d.ts +14 -0
- package/lib/view/createTransferEntry/epics/fetchTransferAccountsEpic.js +40 -0
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/dashboard/dashboardReducer.js +11 -1
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +3 -3
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +3 -4
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +14 -10
- package/lib/view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic.js +3 -16
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic.js +9 -16
- package/lib/view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.js +2 -13
- package/lib/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +2 -6
- package/lib/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +2 -6
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -6
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +3 -20
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/transactionCategorizationPayload.d.ts +20 -9
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +12 -19
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +21 -45
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +8 -6
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +1 -0
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +15 -7
- package/lib/view/expenseAutomationView/transactionFilterHelpers.js +106 -18
- package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -2
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/people/peopleTypes.d.ts +1 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.d.ts +8 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesSelector.js +21 -1
- package/lib/view/spendManagement/autotransferRules/autoTransferRulesState.d.ts +22 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.d.ts +7 -0
- package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +14 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.d.ts +14 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +110 -13
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState.d.ts +16 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/deleteBillPayApprovalRuleEpic.js +10 -2
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/fetchBillPaySetupApproverViewEpic.js +8 -4
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/initializeBillPaySetupApproverViewUpdateDataEpic.js +10 -6
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.d.ts +23 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/reorderBillPayApprovalRulesEpic.js +58 -0
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +12 -3
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +59 -1
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.js +142 -17
- package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonState.d.ts +31 -5
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +8 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +60 -4
- package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +8 -2
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.d.ts +47 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowPayload.js +34 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.d.ts +23 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowReducer.js +82 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.d.ts +40 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowSelector.js +51 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.d.ts +37 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/autoSweepFlowState.js +53 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.d.ts +14 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/fetchCashManagementSettingsEpic.js +38 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.d.ts +7 -0
- package/lib/view/spendManagement/cashManagement/autoSweepFlow/epics/saveAutoSweepSettingsEpic.js +36 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.d.ts +56 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewPayload.js +60 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.d.ts +22 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewReducer.js +96 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.d.ts +59 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewSelector.js +230 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.d.ts +122 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/cashManagementOverviewState.js +13 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.d.ts +7 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementBannerEpic.js +27 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.d.ts +9 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementOverviewPageEpic.js +40 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.d.ts +7 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchCashManagementRecommendationEpic.js +31 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.d.ts +15 -0
- package/lib/view/spendManagement/cashManagement/cashManagementOverview/epics/fetchRecentTransferEpic.js +32 -0
- 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 +75 -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 +9 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic.js +53 -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/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +5 -1
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/deleteRemiApprovalRuleEpic.js +10 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/fetchRemiSetupApproverViewEpic.js +8 -2
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/initializeRemiSetupApproverViewUpdateDataEpic.js +10 -6
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.d.ts +14 -0
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/reorderRemiApprovalRulesEpic.js +65 -0
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +12 -3
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.d.ts +14 -3
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +81 -12
- package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewState.d.ts +12 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.d.ts +8 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +22 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.d.ts +8 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +22 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +1 -1
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +46 -2
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewState.d.ts +2 -0
- package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
- package/lib/view/taskManager/taskListView/taskListReducer.d.ts +1 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/view/transactionDetail/journalEntryLinesViewModel.d.ts +102 -0
- package/lib/view/transactionDetail/journalEntryLinesViewModel.js +160 -0
- package/lib/view/transactionDetail/transactionDetailPayload.d.ts +1 -1
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +6 -1
- package/lib/view/transactionDetail/transactionDetailSelector.js +6 -1
- package/lib/zeniAPI.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { ZeniAPIResponse } from '../../responsePayload';
|
|
3
|
+
import { CardPolicyStats, CardPolicyTemplate, CardPolicyTemplateEntityList, CardPolicyTemplateMode, CardPolicyTemplateSpendLimits, ExtractedCardPolicyRules, MccCategory } from './cardPolicyState';
|
|
4
|
+
export interface MccCategoryPayload {
|
|
5
|
+
count: number;
|
|
6
|
+
mcc_codes: string[];
|
|
7
|
+
name: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Wire shape for `GET /cards/1.0/cards/mcc-codes`. Beyond the universe of
|
|
11
|
+
* MCC categories used to populate the category search dropdown, the
|
|
12
|
+
* endpoint also ships **suggested** allow / block merchants and categories
|
|
13
|
+
* that the chip-pickers seed into their cloud body before the user starts
|
|
14
|
+
* editing.
|
|
15
|
+
*
|
|
16
|
+
* Field spellings (`*_catagories`) preserve the BE wire format verbatim;
|
|
17
|
+
* the camelCase mapper below corrects to `Categories`.
|
|
18
|
+
*/
|
|
19
|
+
export interface CardPolicyMccCategoriesPayload {
|
|
20
|
+
categories: MccCategoryPayload[];
|
|
21
|
+
suggested_allow_catagories?: MccCategoryPayload[];
|
|
22
|
+
suggested_allow_merchants?: string[];
|
|
23
|
+
suggested_block_catagories?: MccCategoryPayload[];
|
|
24
|
+
suggested_block_merchants?: string[];
|
|
25
|
+
}
|
|
26
|
+
export type CardPolicyMccCategoriesResponse = ZeniAPIResponse<CardPolicyMccCategoriesPayload>;
|
|
27
|
+
export declare const toMccCategory: (payload: MccCategoryPayload) => MccCategory;
|
|
28
|
+
/**
|
|
29
|
+
* Vendor row returned by `/accounting/1.0/vendors`. The card-policy
|
|
30
|
+
* vendor search dropdown only needs `vendor_id` + `vendor_name`; we
|
|
31
|
+
* deliberately ignore the rest of the payload to keep this slice
|
|
32
|
+
* independent of the heavy `vendor` entity store.
|
|
33
|
+
*/
|
|
34
|
+
export interface CardPolicyVendorSearchVendorPayload {
|
|
35
|
+
vendor_id: string;
|
|
36
|
+
vendor_name: string;
|
|
37
|
+
}
|
|
38
|
+
export interface CardPolicyVendorSearchData {
|
|
39
|
+
vendors: CardPolicyVendorSearchVendorPayload[];
|
|
40
|
+
}
|
|
41
|
+
export type CardPolicyVendorSearchResponse = ZeniAPIResponse<CardPolicyVendorSearchData>;
|
|
42
|
+
export interface CardPolicyVendorSearchOption {
|
|
43
|
+
name: string;
|
|
44
|
+
vendorId: string;
|
|
45
|
+
}
|
|
46
|
+
export declare const toCardPolicyVendorSearchOption: (payload: CardPolicyVendorSearchVendorPayload) => CardPolicyVendorSearchOption;
|
|
47
|
+
interface CardPolicyTemplateEntityListPayload {
|
|
48
|
+
category_codes: string[];
|
|
49
|
+
merchant_names: string[];
|
|
50
|
+
}
|
|
51
|
+
interface CardPolicyTemplateSpendLimitsPayload {
|
|
52
|
+
transaction: number | null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Per-template request shape. `POST /cards/1.0/policy-templates` now
|
|
56
|
+
* accepts a bulk wrapper (`CreateCardPolicyTemplatesRequest`); this
|
|
57
|
+
* interface describes a single entry inside the `templates` array.
|
|
58
|
+
*
|
|
59
|
+
* `PUT /cards/1.0/policy-templates/{id}` (update) still consumes this
|
|
60
|
+
* shape directly — see `UpdateCardPolicyTemplateRequest` below.
|
|
61
|
+
*/
|
|
62
|
+
export interface CreateCardPolicyTemplateRequest {
|
|
63
|
+
allowedEntity: CardPolicyTemplateEntityList;
|
|
64
|
+
applyToCards: ID[];
|
|
65
|
+
blockedEntity: CardPolicyTemplateEntityList;
|
|
66
|
+
description: string;
|
|
67
|
+
mode: CardPolicyTemplateMode;
|
|
68
|
+
name: string;
|
|
69
|
+
/**
|
|
70
|
+
* `null` indicates the require-receipt toggle is off (no threshold
|
|
71
|
+
* configured). The BE accepts `null` and treats it as "no requirement";
|
|
72
|
+
* `0` means the user explicitly entered zero with the toggle on.
|
|
73
|
+
*/
|
|
74
|
+
requiredReceiptThreshold: number | null;
|
|
75
|
+
spendLimits: CardPolicyTemplateSpendLimits;
|
|
76
|
+
}
|
|
77
|
+
export interface CreateCardPolicyTemplateRequestBody {
|
|
78
|
+
allowed_entity: CardPolicyTemplateEntityListPayload;
|
|
79
|
+
apply_to_cards: ID[];
|
|
80
|
+
blocked_entity: CardPolicyTemplateEntityListPayload;
|
|
81
|
+
description: string;
|
|
82
|
+
mode: string;
|
|
83
|
+
name: string;
|
|
84
|
+
required_receipt_threshold: number | null;
|
|
85
|
+
spend_limits: CardPolicyTemplateSpendLimitsPayload;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Bulk request for `POST /cards/1.0/policy-templates`. The single-policy
|
|
89
|
+
* create flow wraps its one request in a length-1 `templates` array;
|
|
90
|
+
* future multi-policy submit (AI CFO review step) sends N entries in a
|
|
91
|
+
* single round-trip.
|
|
92
|
+
*
|
|
93
|
+
* `sourceChatSessionId` ties the submit back to an AI CFO chat session so
|
|
94
|
+
* the BE can attribute the created templates to it. Manual create-page
|
|
95
|
+
* callers omit it.
|
|
96
|
+
*/
|
|
97
|
+
export interface CreateCardPolicyTemplatesRequest {
|
|
98
|
+
templates: CreateCardPolicyTemplateRequest[];
|
|
99
|
+
sourceChatSessionId?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface CreateCardPolicyTemplatesRequestBody {
|
|
102
|
+
templates: CreateCardPolicyTemplateRequestBody[];
|
|
103
|
+
source_chat_session_id?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface CardPolicyTemplatePayload {
|
|
106
|
+
allowed_entity: CardPolicyTemplateEntityListPayload;
|
|
107
|
+
applied_cards: ID[];
|
|
108
|
+
blocked_entity: CardPolicyTemplateEntityListPayload;
|
|
109
|
+
cards_count: number;
|
|
110
|
+
category_restrictions: unknown[];
|
|
111
|
+
created_at: string;
|
|
112
|
+
created_by: ID;
|
|
113
|
+
description: string;
|
|
114
|
+
mode: string;
|
|
115
|
+
name: string;
|
|
116
|
+
required_receipt_threshold: number | null;
|
|
117
|
+
spend_limits: CardPolicyTemplateSpendLimitsPayload;
|
|
118
|
+
status: string;
|
|
119
|
+
template_id: ID;
|
|
120
|
+
tenant_id: ID;
|
|
121
|
+
updated_at: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Per-template response envelope. Still returned by `PUT /policy-templates/{id}`,
|
|
125
|
+
* `GET /policy-templates/{id}`, and (as the row payload) the list endpoint.
|
|
126
|
+
* Also nested inside `CreateCardPolicyTemplatesResponseData.templates_created`.
|
|
127
|
+
*/
|
|
128
|
+
export interface CreateCardPolicyTemplateResponseData {
|
|
129
|
+
cards_applied: number;
|
|
130
|
+
template: CardPolicyTemplatePayload;
|
|
131
|
+
}
|
|
132
|
+
export type CreateCardPolicyTemplateResponse = ZeniAPIResponse<CreateCardPolicyTemplateResponseData>;
|
|
133
|
+
/**
|
|
134
|
+
* Per-item error returned by the bulk POST when one or more templates in
|
|
135
|
+
* the request fail validation / persistence. The exact field shape is
|
|
136
|
+
* **TBD** with the BE — `message` is the only guaranteed field today; the
|
|
137
|
+
* rest are best-effort placeholders that callers should not assume to be
|
|
138
|
+
* present.
|
|
139
|
+
*
|
|
140
|
+
* TODO: lock down the shape (`index`, `name`, `code`) once the BE
|
|
141
|
+
* documents it. See plan §"Open question to resolve with BE".
|
|
142
|
+
*/
|
|
143
|
+
export interface BulkCreateCardPolicyTemplateErrorPayload {
|
|
144
|
+
message: string;
|
|
145
|
+
code?: string;
|
|
146
|
+
index?: number;
|
|
147
|
+
name?: string;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Wire shape returned by the bulk `POST /cards/1.0/policy-templates`.
|
|
151
|
+
* Partial success is allowed — `templates_created` holds the successfully
|
|
152
|
+
* created rows (each in the same envelope as the single endpoint), and
|
|
153
|
+
* `errors` holds per-item failures for the rest. `status.message` follows
|
|
154
|
+
* the "N of M templates created" convention.
|
|
155
|
+
*/
|
|
156
|
+
export interface CreateCardPolicyTemplatesResponseData {
|
|
157
|
+
errors: BulkCreateCardPolicyTemplateErrorPayload[];
|
|
158
|
+
templates_created: CreateCardPolicyTemplateResponseData[];
|
|
159
|
+
}
|
|
160
|
+
export type CreateCardPolicyTemplatesResponse = ZeniAPIResponse<CreateCardPolicyTemplatesResponseData>;
|
|
161
|
+
/**
|
|
162
|
+
* Camel-cased mirror of `BulkCreateCardPolicyTemplateErrorPayload` stored
|
|
163
|
+
* on the create-card-policy view slice so the UI can render a partial-success
|
|
164
|
+
* banner without re-touching the wire types.
|
|
165
|
+
*/
|
|
166
|
+
export interface BulkCreateCardPolicyTemplateError {
|
|
167
|
+
message: string;
|
|
168
|
+
code?: string;
|
|
169
|
+
index?: number;
|
|
170
|
+
name?: string;
|
|
171
|
+
}
|
|
172
|
+
export type UpdateCardPolicyTemplateRequest = CreateCardPolicyTemplateRequest;
|
|
173
|
+
export type UpdateCardPolicyTemplateRequestBody = CreateCardPolicyTemplateRequestBody;
|
|
174
|
+
export type UpdateCardPolicyTemplateResponseData = CreateCardPolicyTemplateResponseData;
|
|
175
|
+
export type UpdateCardPolicyTemplateResponse = CreateCardPolicyTemplateResponse;
|
|
176
|
+
export type CardPolicyDetailResponseData = CreateCardPolicyTemplateResponseData;
|
|
177
|
+
export type CardPolicyDetailResponse = CreateCardPolicyTemplateResponse;
|
|
178
|
+
/**
|
|
179
|
+
* Aggregate counters returned alongside the templates list. Stored on
|
|
180
|
+
* the entity slice (alongside `cardPolicyTemplateById`) so any list
|
|
181
|
+
* surface can read it without re-fetching.
|
|
182
|
+
*/
|
|
183
|
+
export interface CardPolicyStatsPayload {
|
|
184
|
+
active_policies: number;
|
|
185
|
+
total_cards: number;
|
|
186
|
+
total_templates: number;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Each list row is wrapped in the same `{cards_applied, template}`
|
|
190
|
+
* envelope the create endpoint returns. Only the `template` portion is
|
|
191
|
+
* stored on the entity slice; `cards_applied` is a one-shot summary
|
|
192
|
+
* carried over from create and not surfaced in the list state today.
|
|
193
|
+
*/
|
|
194
|
+
export interface CardPolicyListRowPayload {
|
|
195
|
+
data: CreateCardPolicyTemplateResponseData;
|
|
196
|
+
}
|
|
197
|
+
export interface ListCardPolicyTemplatesResponseData {
|
|
198
|
+
stats: CardPolicyStatsPayload;
|
|
199
|
+
templates: CardPolicyListRowPayload[];
|
|
200
|
+
}
|
|
201
|
+
export type ListCardPolicyTemplatesResponse = ZeniAPIResponse<ListCardPolicyTemplatesResponseData>;
|
|
202
|
+
export declare const toCardPolicyStats: (payload: CardPolicyStatsPayload) => CardPolicyStats;
|
|
203
|
+
export declare const toCardPolicyTemplateList: (data: ListCardPolicyTemplatesResponseData) => CardPolicyTemplate[];
|
|
204
|
+
export declare const toCardPolicyTemplate: (payload: CardPolicyTemplatePayload) => CardPolicyTemplate;
|
|
205
|
+
/**
|
|
206
|
+
* Re-shape a single camelCase create request into the snake_case wire
|
|
207
|
+
* body. Used by the bulk-create mapper to build each entry of the
|
|
208
|
+
* `templates` array, and directly by the update epic (PUT) since the
|
|
209
|
+
* update endpoint still consumes a single object.
|
|
210
|
+
*/
|
|
211
|
+
export declare const toCreateCardPolicyTemplateRequestBody: (request: CreateCardPolicyTemplateRequest) => CreateCardPolicyTemplateRequestBody;
|
|
212
|
+
/**
|
|
213
|
+
* Re-shape a bulk create request into the snake_case wire body for
|
|
214
|
+
* `POST /cards/1.0/policy-templates`. Maps each entry through
|
|
215
|
+
* `toCreateCardPolicyTemplateRequestBody` and only emits
|
|
216
|
+
* `source_chat_session_id` when the camelCase counterpart is defined,
|
|
217
|
+
* so manual-create callers don't ship a stray `undefined` over the wire.
|
|
218
|
+
*/
|
|
219
|
+
export declare const toCreateCardPolicyTemplatesRequestBody: (request: CreateCardPolicyTemplatesRequest) => CreateCardPolicyTemplatesRequestBody;
|
|
220
|
+
/**
|
|
221
|
+
* Map a single bulk-response error payload to its camelCased view shape.
|
|
222
|
+
* Defensive against missing optional fields (see `BulkCreateCardPolicyTemplateErrorPayload`
|
|
223
|
+
* docstring — the BE contract isn't fully locked yet).
|
|
224
|
+
*/
|
|
225
|
+
export declare const toBulkCreateCardPolicyTemplateError: (payload: BulkCreateCardPolicyTemplateErrorPayload) => BulkCreateCardPolicyTemplateError;
|
|
226
|
+
export declare const toUpdateCardPolicyTemplateRequestBody: (request: CreateCardPolicyTemplateRequest) => CreateCardPolicyTemplateRequestBody;
|
|
227
|
+
/**
|
|
228
|
+
* Seed an edit-form draft (`CreateCardPolicyTemplateRequest`) from an
|
|
229
|
+
* existing camelCased `CardPolicyTemplate`. Used by the detail-fetch
|
|
230
|
+
* epic so the edit page can render with the saved values pre-populated.
|
|
231
|
+
*/
|
|
232
|
+
export declare const toCardPolicyEditFormDraft: (template: CardPolicyTemplate) => CreateCardPolicyTemplateRequest;
|
|
233
|
+
/**
|
|
234
|
+
* Wire shape returned by `POST /cards/1.0/policy-documents/extract`.
|
|
235
|
+
* The backend OCRs / parses an uploaded policy document (PDF, image, etc.)
|
|
236
|
+
* and returns a best-effort set of policy rules + a confidence score.
|
|
237
|
+
*
|
|
238
|
+
* Consumers (manual `CardPolicyCreatePage` + AI CFO `CardPolicyInteractiveForm`)
|
|
239
|
+
* use `toExtractedCardPolicyRules` to map this onto the camelCase FE shape
|
|
240
|
+
* and then feed the result through `applyExtractedPolicyRulesToFormValues`
|
|
241
|
+
* (`@zeniai/web-components`) to seed the RHF form.
|
|
242
|
+
*/
|
|
243
|
+
export interface ExtractedCardPolicyRulesPayload {
|
|
244
|
+
allowed_entity: CardPolicyTemplateEntityListPayload;
|
|
245
|
+
blocked_entity: CardPolicyTemplateEntityListPayload;
|
|
246
|
+
confidence_score: number;
|
|
247
|
+
policy_name: string;
|
|
248
|
+
required_receipt_threshold: number;
|
|
249
|
+
transaction_limit: number;
|
|
250
|
+
}
|
|
251
|
+
export interface PolicyDocumentExtractResponseData {
|
|
252
|
+
extracted_rules: ExtractedCardPolicyRulesPayload;
|
|
253
|
+
message: string;
|
|
254
|
+
}
|
|
255
|
+
export type PolicyDocumentExtractResponse = ZeniAPIResponse<PolicyDocumentExtractResponseData>;
|
|
256
|
+
export declare const toExtractedCardPolicyRules: (payload: ExtractedCardPolicyRulesPayload) => ExtractedCardPolicyRules;
|
|
257
|
+
/**
|
|
258
|
+
* Wire shape returned by `POST /cards/1.0/ai-cfo/policy-recommendation-from-upload`.
|
|
259
|
+
* Chained after `extractPolicyDocument` succeeds in the AI CFO `upload`
|
|
260
|
+
* flow: the FE forwards the just-returned `extracted_rules` and the BE
|
|
261
|
+
* synthesizes a wizard plan + upload source metadata.
|
|
262
|
+
*
|
|
263
|
+
* The response mirrors the same `mode`-discriminated envelope the
|
|
264
|
+
* controller API ships for `auto` / `guided`, but always with `mode:
|
|
265
|
+
* "upload"` and a populated `wizard_plan.step_5_review`. The FE merges
|
|
266
|
+
* the returned `wizard_plan` + `source` into the in-flight AI CFO
|
|
267
|
+
* answer's `CardPolicyInitialData` via
|
|
268
|
+
* `updateAiCfoAnswerCardPolicyWizardPlan`.
|
|
269
|
+
*/
|
|
270
|
+
export interface CardPolicyRecommendationFromUploadResponseData {
|
|
271
|
+
mode: 'upload';
|
|
272
|
+
source: import('../aiCfo/aiCfoPayload').CardPolicyUploadSourcePayload;
|
|
273
|
+
tenant_id: string;
|
|
274
|
+
wizard_plan: import('../aiCfo/aiCfoPayload').CardPolicyWizardPlanPayload;
|
|
275
|
+
}
|
|
276
|
+
export type CardPolicyRecommendationFromUploadResponse = ZeniAPIResponse<CardPolicyRecommendationFromUploadResponseData>;
|
|
277
|
+
export {};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toExtractedCardPolicyRules = exports.toCardPolicyEditFormDraft = exports.toUpdateCardPolicyTemplateRequestBody = exports.toBulkCreateCardPolicyTemplateError = exports.toCreateCardPolicyTemplatesRequestBody = exports.toCreateCardPolicyTemplateRequestBody = exports.toCardPolicyTemplate = exports.toCardPolicyTemplateList = exports.toCardPolicyStats = exports.toCardPolicyVendorSearchOption = exports.toMccCategory = void 0;
|
|
4
|
+
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
5
|
+
const cardPolicyState_1 = require("./cardPolicyState");
|
|
6
|
+
const toMccCategory = (payload) => ({
|
|
7
|
+
count: payload.count,
|
|
8
|
+
mccCodes: payload.mcc_codes ?? [],
|
|
9
|
+
name: payload.name,
|
|
10
|
+
});
|
|
11
|
+
exports.toMccCategory = toMccCategory;
|
|
12
|
+
const toCardPolicyVendorSearchOption = (payload) => ({
|
|
13
|
+
vendorId: payload.vendor_id,
|
|
14
|
+
name: payload.vendor_name,
|
|
15
|
+
});
|
|
16
|
+
exports.toCardPolicyVendorSearchOption = toCardPolicyVendorSearchOption;
|
|
17
|
+
const toCardPolicyStats = (payload) => ({
|
|
18
|
+
activePolicies: payload.active_policies,
|
|
19
|
+
totalCards: payload.total_cards,
|
|
20
|
+
totalTemplates: payload.total_templates,
|
|
21
|
+
});
|
|
22
|
+
exports.toCardPolicyStats = toCardPolicyStats;
|
|
23
|
+
const toCardPolicyTemplateList = (data) => (data.templates ?? []).map((row) => (0, exports.toCardPolicyTemplate)(row.data.template));
|
|
24
|
+
exports.toCardPolicyTemplateList = toCardPolicyTemplateList;
|
|
25
|
+
const toCardPolicyTemplateEntityList = (payload) => ({
|
|
26
|
+
categoryCodes: payload.category_codes ?? [],
|
|
27
|
+
merchantNames: payload.merchant_names ?? [],
|
|
28
|
+
});
|
|
29
|
+
const toCardPolicyTemplate = (payload) => ({
|
|
30
|
+
allowedEntity: toCardPolicyTemplateEntityList(payload.allowed_entity),
|
|
31
|
+
appliedCards: payload.applied_cards ?? [],
|
|
32
|
+
blockedEntity: toCardPolicyTemplateEntityList(payload.blocked_entity),
|
|
33
|
+
cardsCount: payload.cards_count,
|
|
34
|
+
categoryRestrictions: payload.category_restrictions ?? [],
|
|
35
|
+
createdAt: (0, zeniDayJS_1.date)(payload.created_at),
|
|
36
|
+
createdBy: payload.created_by,
|
|
37
|
+
description: payload.description,
|
|
38
|
+
mode: (0, cardPolicyState_1.toCardPolicyTemplateMode)(payload.mode),
|
|
39
|
+
name: payload.name,
|
|
40
|
+
requiredReceiptThreshold: payload.required_receipt_threshold,
|
|
41
|
+
spendLimits: {
|
|
42
|
+
transaction: payload.spend_limits.transaction,
|
|
43
|
+
},
|
|
44
|
+
status: (0, cardPolicyState_1.toCardPolicyTemplateStatus)(payload.status),
|
|
45
|
+
templateId: payload.template_id,
|
|
46
|
+
tenantId: payload.tenant_id,
|
|
47
|
+
updatedAt: (0, zeniDayJS_1.date)(payload.updated_at),
|
|
48
|
+
});
|
|
49
|
+
exports.toCardPolicyTemplate = toCardPolicyTemplate;
|
|
50
|
+
/**
|
|
51
|
+
* Re-shape a single camelCase create request into the snake_case wire
|
|
52
|
+
* body. Used by the bulk-create mapper to build each entry of the
|
|
53
|
+
* `templates` array, and directly by the update epic (PUT) since the
|
|
54
|
+
* update endpoint still consumes a single object.
|
|
55
|
+
*/
|
|
56
|
+
const toCreateCardPolicyTemplateRequestBody = (request) => ({
|
|
57
|
+
allowed_entity: {
|
|
58
|
+
category_codes: request.allowedEntity.categoryCodes,
|
|
59
|
+
merchant_names: request.allowedEntity.merchantNames,
|
|
60
|
+
},
|
|
61
|
+
apply_to_cards: request.applyToCards,
|
|
62
|
+
blocked_entity: {
|
|
63
|
+
category_codes: request.blockedEntity.categoryCodes,
|
|
64
|
+
merchant_names: request.blockedEntity.merchantNames,
|
|
65
|
+
},
|
|
66
|
+
description: request.description,
|
|
67
|
+
mode: request.mode ?? 'strict',
|
|
68
|
+
name: request.name,
|
|
69
|
+
required_receipt_threshold: request.requiredReceiptThreshold,
|
|
70
|
+
spend_limits: {
|
|
71
|
+
transaction: request.spendLimits.transaction,
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
exports.toCreateCardPolicyTemplateRequestBody = toCreateCardPolicyTemplateRequestBody;
|
|
75
|
+
/**
|
|
76
|
+
* Re-shape a bulk create request into the snake_case wire body for
|
|
77
|
+
* `POST /cards/1.0/policy-templates`. Maps each entry through
|
|
78
|
+
* `toCreateCardPolicyTemplateRequestBody` and only emits
|
|
79
|
+
* `source_chat_session_id` when the camelCase counterpart is defined,
|
|
80
|
+
* so manual-create callers don't ship a stray `undefined` over the wire.
|
|
81
|
+
*/
|
|
82
|
+
const toCreateCardPolicyTemplatesRequestBody = (request) => {
|
|
83
|
+
const body = {
|
|
84
|
+
templates: request.templates.map(exports.toCreateCardPolicyTemplateRequestBody),
|
|
85
|
+
};
|
|
86
|
+
if (request.sourceChatSessionId != null) {
|
|
87
|
+
body.source_chat_session_id = request.sourceChatSessionId;
|
|
88
|
+
}
|
|
89
|
+
return body;
|
|
90
|
+
};
|
|
91
|
+
exports.toCreateCardPolicyTemplatesRequestBody = toCreateCardPolicyTemplatesRequestBody;
|
|
92
|
+
/**
|
|
93
|
+
* Map a single bulk-response error payload to its camelCased view shape.
|
|
94
|
+
* Defensive against missing optional fields (see `BulkCreateCardPolicyTemplateErrorPayload`
|
|
95
|
+
* docstring — the BE contract isn't fully locked yet).
|
|
96
|
+
*/
|
|
97
|
+
const toBulkCreateCardPolicyTemplateError = (payload) => ({
|
|
98
|
+
message: payload.message,
|
|
99
|
+
code: payload.code,
|
|
100
|
+
index: payload.index,
|
|
101
|
+
name: payload.name,
|
|
102
|
+
});
|
|
103
|
+
exports.toBulkCreateCardPolicyTemplateError = toBulkCreateCardPolicyTemplateError;
|
|
104
|
+
// Update body uses the exact same wire shape as create — the PUT
|
|
105
|
+
// endpoint is a full replace and was not affected by the bulk migration.
|
|
106
|
+
exports.toUpdateCardPolicyTemplateRequestBody = exports.toCreateCardPolicyTemplateRequestBody;
|
|
107
|
+
/**
|
|
108
|
+
* Seed an edit-form draft (`CreateCardPolicyTemplateRequest`) from an
|
|
109
|
+
* existing camelCased `CardPolicyTemplate`. Used by the detail-fetch
|
|
110
|
+
* epic so the edit page can render with the saved values pre-populated.
|
|
111
|
+
*/
|
|
112
|
+
const toCardPolicyEditFormDraft = (template) => ({
|
|
113
|
+
allowedEntity: {
|
|
114
|
+
categoryCodes: [...template.allowedEntity.categoryCodes],
|
|
115
|
+
merchantNames: [...template.allowedEntity.merchantNames],
|
|
116
|
+
},
|
|
117
|
+
applyToCards: [...template.appliedCards],
|
|
118
|
+
blockedEntity: {
|
|
119
|
+
categoryCodes: [...template.blockedEntity.categoryCodes],
|
|
120
|
+
merchantNames: [...template.blockedEntity.merchantNames],
|
|
121
|
+
},
|
|
122
|
+
description: template.description,
|
|
123
|
+
mode: template.mode,
|
|
124
|
+
name: template.name,
|
|
125
|
+
requiredReceiptThreshold: template.requiredReceiptThreshold,
|
|
126
|
+
spendLimits: { transaction: template.spendLimits.transaction },
|
|
127
|
+
});
|
|
128
|
+
exports.toCardPolicyEditFormDraft = toCardPolicyEditFormDraft;
|
|
129
|
+
const toExtractedCardPolicyRules = (payload) => ({
|
|
130
|
+
allowedEntity: {
|
|
131
|
+
categoryCodes: payload.allowed_entity?.category_codes ?? [],
|
|
132
|
+
merchantNames: payload.allowed_entity?.merchant_names ?? [],
|
|
133
|
+
},
|
|
134
|
+
blockedEntity: {
|
|
135
|
+
categoryCodes: payload.blocked_entity?.category_codes ?? [],
|
|
136
|
+
merchantNames: payload.blocked_entity?.merchant_names ?? [],
|
|
137
|
+
},
|
|
138
|
+
confidenceScore: payload.confidence_score,
|
|
139
|
+
policyName: payload.policy_name,
|
|
140
|
+
requiredReceiptThreshold: payload.required_receipt_threshold,
|
|
141
|
+
transactionLimit: payload.transaction_limit,
|
|
142
|
+
});
|
|
143
|
+
exports.toExtractedCardPolicyRules = toExtractedCardPolicyRules;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ZeniAPIStatus } from '../../responsePayload';
|
|
2
|
+
import { CardPolicyMccCategoriesPayload, CardPolicyTemplatePayload, CardPolicyVendorSearchData, ExtractedCardPolicyRulesPayload } from './cardPolicyPayload';
|
|
3
|
+
import { CardPolicyState, CardPolicyStats, CardPolicyTemplate, ExtractedCardPolicyRules } from './cardPolicyState';
|
|
4
|
+
export declare const initialState: CardPolicyState;
|
|
5
|
+
export declare const fetchCardPolicyMccCategories: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"cardPolicy/fetchCardPolicyMccCategories">, fetchCardPolicyVendorOptions: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[searchString?: string | undefined], {
|
|
6
|
+
searchString: string;
|
|
7
|
+
}, "cardPolicy/fetchCardPolicyVendorOptions", never, never>, updateCardPolicyMccCategories: import("@reduxjs/toolkit").ActionCreatorWithPayload<CardPolicyMccCategoriesPayload, "cardPolicy/updateCardPolicyMccCategories">, updateCardPolicyMccCategoriesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "cardPolicy/updateCardPolicyMccCategoriesFailure">, updateCardPolicyVendorOptions: import("@reduxjs/toolkit").ActionCreatorWithPayload<CardPolicyVendorSearchData, "cardPolicy/updateCardPolicyVendorOptions">, updateCardPolicyVendorOptionsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "cardPolicy/updateCardPolicyVendorOptionsFailure">, updateCreatedCardPolicyTemplate: import("@reduxjs/toolkit").ActionCreatorWithPayload<CardPolicyTemplatePayload, "cardPolicy/updateCreatedCardPolicyTemplate">, updateCardPolicyTemplates: import("@reduxjs/toolkit").ActionCreatorWithPayload<CardPolicyTemplate[], "cardPolicy/updateCardPolicyTemplates">, removeCardPolicyTemplate: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "cardPolicy/removeCardPolicyTemplate">, updateCardPolicyStats: import("@reduxjs/toolkit").ActionCreatorWithPayload<CardPolicyStats, "cardPolicy/updateCardPolicyStats">, extractPolicyDocument: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[files: File[], aiCfoAnswerId?: string | undefined, aiCfoChatSessionId?: string | undefined], {
|
|
8
|
+
files: File[];
|
|
9
|
+
aiCfoAnswerId: string | undefined;
|
|
10
|
+
aiCfoChatSessionId: string | undefined;
|
|
11
|
+
}, "cardPolicy/extractPolicyDocument", never, {
|
|
12
|
+
uploadedFileName: string;
|
|
13
|
+
}>, updatePolicyDocumentExtractionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<ExtractedCardPolicyRulesPayload, "cardPolicy/updatePolicyDocumentExtractionSuccess">, updatePolicyDocumentExtractionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "cardPolicy/updatePolicyDocumentExtractionFailure">, clearPolicyDocumentExtraction: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"cardPolicy/clearPolicyDocumentExtraction">, fetchCardPolicyRecommendationFromUpload: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[answerId: string, chatSessionId: string, extractedRules: ExtractedCardPolicyRules], {
|
|
14
|
+
answerId: string;
|
|
15
|
+
chatSessionId: string;
|
|
16
|
+
extractedRules: ExtractedCardPolicyRules;
|
|
17
|
+
}, "cardPolicy/fetchCardPolicyRecommendationFromUpload", never, never>, updatePolicyRecommendationFromUploadSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"cardPolicy/updatePolicyRecommendationFromUploadSuccess">, updatePolicyRecommendationFromUploadFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "cardPolicy/updatePolicyRecommendationFromUploadFailure">, clearCardPolicy: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"cardPolicy/clearCardPolicy">;
|
|
18
|
+
declare const _default: import("redux").Reducer<CardPolicyState>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.clearCardPolicy = exports.updatePolicyRecommendationFromUploadFailure = exports.updatePolicyRecommendationFromUploadSuccess = exports.fetchCardPolicyRecommendationFromUpload = exports.clearPolicyDocumentExtraction = exports.updatePolicyDocumentExtractionFailure = exports.updatePolicyDocumentExtractionSuccess = exports.extractPolicyDocument = exports.updateCardPolicyStats = exports.removeCardPolicyTemplate = exports.updateCardPolicyTemplates = exports.updateCreatedCardPolicyTemplate = exports.updateCardPolicyVendorOptionsFailure = exports.updateCardPolicyVendorOptions = exports.updateCardPolicyMccCategoriesFailure = exports.updateCardPolicyMccCategories = exports.fetchCardPolicyVendorOptions = exports.fetchCardPolicyMccCategories = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const cardPolicyPayload_1 = require("./cardPolicyPayload");
|
|
7
|
+
// `buildVendorChipId(name)` calls `name.trim().toLowerCase()`; empty/whitespace names would crash or collapse into one colliding chip-id.
|
|
8
|
+
const isUsableMerchantName = (name) => typeof name === 'string' && name.trim() !== '';
|
|
9
|
+
const initialPolicyDocumentExtractionState = {
|
|
10
|
+
fetchState: 'Not-Started',
|
|
11
|
+
error: undefined,
|
|
12
|
+
extractedRules: undefined,
|
|
13
|
+
uploadedFileName: undefined,
|
|
14
|
+
};
|
|
15
|
+
const initialPolicyRecommendationFromUploadState = {
|
|
16
|
+
fetchState: 'Not-Started',
|
|
17
|
+
answerId: undefined,
|
|
18
|
+
chatSessionId: undefined,
|
|
19
|
+
error: undefined,
|
|
20
|
+
};
|
|
21
|
+
const initialVendorSearchState = {
|
|
22
|
+
fetchState: 'Not-Started',
|
|
23
|
+
searchString: '',
|
|
24
|
+
vendors: [],
|
|
25
|
+
error: undefined,
|
|
26
|
+
};
|
|
27
|
+
exports.initialState = {
|
|
28
|
+
cardPolicyTemplateById: {},
|
|
29
|
+
mccCategories: [],
|
|
30
|
+
mccCategoriesError: undefined,
|
|
31
|
+
mccCategoriesFetchState: 'Not-Started',
|
|
32
|
+
policyDocumentExtraction: initialPolicyDocumentExtractionState,
|
|
33
|
+
policyRecommendationFromUpload: initialPolicyRecommendationFromUploadState,
|
|
34
|
+
suggestedAllowCategories: [],
|
|
35
|
+
suggestedAllowMerchants: [],
|
|
36
|
+
suggestedBlockCategories: [],
|
|
37
|
+
suggestedBlockMerchants: [],
|
|
38
|
+
vendorSearch: initialVendorSearchState,
|
|
39
|
+
cardPolicyStats: undefined,
|
|
40
|
+
};
|
|
41
|
+
const cardPolicy = (0, toolkit_1.createSlice)({
|
|
42
|
+
name: 'cardPolicy',
|
|
43
|
+
initialState: exports.initialState,
|
|
44
|
+
reducers: {
|
|
45
|
+
fetchCardPolicyMccCategories(draft) {
|
|
46
|
+
draft.mccCategoriesFetchState = 'In-Progress';
|
|
47
|
+
draft.mccCategoriesError = undefined;
|
|
48
|
+
},
|
|
49
|
+
updateCardPolicyMccCategories(draft, action) {
|
|
50
|
+
draft.mccCategories = (action.payload.categories ?? []).map(cardPolicyPayload_1.toMccCategory);
|
|
51
|
+
// BE-suggested seeds pre-populate the chip cloud; `isUsableMerchantName` drops names that would break `buildVendorChipId`.
|
|
52
|
+
draft.suggestedAllowMerchants = (action.payload.suggested_allow_merchants ?? []).filter(isUsableMerchantName);
|
|
53
|
+
draft.suggestedBlockMerchants = (action.payload.suggested_block_merchants ?? []).filter(isUsableMerchantName);
|
|
54
|
+
draft.suggestedAllowCategories = (action.payload.suggested_allow_catagories ?? []).map(cardPolicyPayload_1.toMccCategory);
|
|
55
|
+
draft.suggestedBlockCategories = (action.payload.suggested_block_catagories ?? []).map(cardPolicyPayload_1.toMccCategory);
|
|
56
|
+
draft.mccCategoriesFetchState = 'Completed';
|
|
57
|
+
draft.mccCategoriesError = undefined;
|
|
58
|
+
},
|
|
59
|
+
updateCardPolicyMccCategoriesFailure(draft, action) {
|
|
60
|
+
draft.mccCategoriesFetchState = 'Error';
|
|
61
|
+
draft.mccCategoriesError = action.payload;
|
|
62
|
+
},
|
|
63
|
+
updateCreatedCardPolicyTemplate(draft, action) {
|
|
64
|
+
const template = (0, cardPolicyPayload_1.toCardPolicyTemplate)(action.payload);
|
|
65
|
+
draft.cardPolicyTemplateById[template.templateId] = template;
|
|
66
|
+
},
|
|
67
|
+
// Full replace so server-side deletes evict locally too; the view slice owns the ordered ID list.
|
|
68
|
+
updateCardPolicyTemplates(draft, action) {
|
|
69
|
+
const byId = {};
|
|
70
|
+
for (const template of action.payload) {
|
|
71
|
+
byId[template.templateId] = template;
|
|
72
|
+
}
|
|
73
|
+
draft.cardPolicyTemplateById = byId;
|
|
74
|
+
},
|
|
75
|
+
removeCardPolicyTemplate(draft, action) {
|
|
76
|
+
delete draft.cardPolicyTemplateById[action.payload];
|
|
77
|
+
},
|
|
78
|
+
updateCardPolicyStats(draft, action) {
|
|
79
|
+
draft.cardPolicyStats = action.payload;
|
|
80
|
+
},
|
|
81
|
+
// Captures the first file name so the upload pill can render without callers retaining a File ref.
|
|
82
|
+
extractPolicyDocument: {
|
|
83
|
+
reducer(draft, action) {
|
|
84
|
+
draft.policyDocumentExtraction.fetchState = 'In-Progress';
|
|
85
|
+
draft.policyDocumentExtraction.error = undefined;
|
|
86
|
+
draft.policyDocumentExtraction.extractedRules = undefined;
|
|
87
|
+
draft.policyDocumentExtraction.uploadedFileName =
|
|
88
|
+
action.meta.uploadedFileName;
|
|
89
|
+
draft.policyDocumentExtraction.aiCfoAnswerId =
|
|
90
|
+
action.payload.aiCfoAnswerId;
|
|
91
|
+
draft.policyDocumentExtraction.aiCfoChatSessionId =
|
|
92
|
+
action.payload.aiCfoChatSessionId;
|
|
93
|
+
// Extraction + recommendation model one upload lifecycle; reset together so a re-upload doesn't read stale lifecycle from the prior chain.
|
|
94
|
+
draft.policyRecommendationFromUpload = {
|
|
95
|
+
...initialPolicyRecommendationFromUploadState,
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
prepare(files, aiCfoAnswerId, aiCfoChatSessionId) {
|
|
99
|
+
return {
|
|
100
|
+
payload: { files, aiCfoAnswerId, aiCfoChatSessionId },
|
|
101
|
+
meta: { uploadedFileName: files[0]?.name },
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
updatePolicyDocumentExtractionSuccess(draft, action) {
|
|
106
|
+
draft.policyDocumentExtraction.fetchState = 'Completed';
|
|
107
|
+
draft.policyDocumentExtraction.error = undefined;
|
|
108
|
+
draft.policyDocumentExtraction.extractedRules =
|
|
109
|
+
(0, cardPolicyPayload_1.toExtractedCardPolicyRules)(action.payload);
|
|
110
|
+
},
|
|
111
|
+
updatePolicyDocumentExtractionFailure(draft, action) {
|
|
112
|
+
draft.policyDocumentExtraction.fetchState = 'Error';
|
|
113
|
+
draft.policyDocumentExtraction.error = action.payload;
|
|
114
|
+
draft.policyDocumentExtraction.extractedRules = undefined;
|
|
115
|
+
},
|
|
116
|
+
clearPolicyDocumentExtraction(draft) {
|
|
117
|
+
draft.policyDocumentExtraction = {
|
|
118
|
+
...initialPolicyDocumentExtractionState,
|
|
119
|
+
};
|
|
120
|
+
// Pair with extractPolicyDocument: the two sub-slices reset and advance together.
|
|
121
|
+
draft.policyRecommendationFromUpload = {
|
|
122
|
+
...initialPolicyRecommendationFromUploadState,
|
|
123
|
+
};
|
|
124
|
+
},
|
|
125
|
+
// Chained after extractPolicyDocument; epic merges the returned wizard plan into the AI CFO answer identified by answerId + chatSessionId.
|
|
126
|
+
fetchCardPolicyRecommendationFromUpload: {
|
|
127
|
+
reducer(draft, action) {
|
|
128
|
+
draft.policyRecommendationFromUpload.fetchState = 'In-Progress';
|
|
129
|
+
draft.policyRecommendationFromUpload.answerId = action.payload.answerId;
|
|
130
|
+
draft.policyRecommendationFromUpload.chatSessionId =
|
|
131
|
+
action.payload.chatSessionId;
|
|
132
|
+
draft.policyRecommendationFromUpload.error = undefined;
|
|
133
|
+
},
|
|
134
|
+
prepare(answerId, chatSessionId, extractedRules) {
|
|
135
|
+
return { payload: { answerId, chatSessionId, extractedRules } };
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
updatePolicyRecommendationFromUploadSuccess(draft) {
|
|
139
|
+
draft.policyRecommendationFromUpload.fetchState = 'Completed';
|
|
140
|
+
draft.policyRecommendationFromUpload.error = undefined;
|
|
141
|
+
},
|
|
142
|
+
updatePolicyRecommendationFromUploadFailure(draft, action) {
|
|
143
|
+
draft.policyRecommendationFromUpload.fetchState = 'Error';
|
|
144
|
+
draft.policyRecommendationFromUpload.error = action.payload;
|
|
145
|
+
},
|
|
146
|
+
// Empty searchString = top vendors by YTD spend; non-empty filters server-side.
|
|
147
|
+
fetchCardPolicyVendorOptions: {
|
|
148
|
+
reducer(draft, action) {
|
|
149
|
+
draft.vendorSearch.fetchState = 'In-Progress';
|
|
150
|
+
draft.vendorSearch.searchString = action.payload.searchString;
|
|
151
|
+
draft.vendorSearch.error = undefined;
|
|
152
|
+
},
|
|
153
|
+
prepare(searchString) {
|
|
154
|
+
return { payload: { searchString: searchString ?? '' } };
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
updateCardPolicyVendorOptions(draft, action) {
|
|
158
|
+
// Same `buildVendorChipId` guard as the suggested-merchants seeds above.
|
|
159
|
+
draft.vendorSearch.vendors = (action.payload.vendors ?? [])
|
|
160
|
+
.map(cardPolicyPayload_1.toCardPolicyVendorSearchOption)
|
|
161
|
+
.filter((vendor) => isUsableMerchantName(vendor.name));
|
|
162
|
+
draft.vendorSearch.fetchState = 'Completed';
|
|
163
|
+
draft.vendorSearch.error = undefined;
|
|
164
|
+
},
|
|
165
|
+
updateCardPolicyVendorOptionsFailure(draft, action) {
|
|
166
|
+
draft.vendorSearch.fetchState = 'Error';
|
|
167
|
+
draft.vendorSearch.error = action.payload;
|
|
168
|
+
},
|
|
169
|
+
clearCardPolicy(draft) {
|
|
170
|
+
Object.assign(draft, exports.initialState);
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
});
|
|
174
|
+
_a = cardPolicy.actions, exports.fetchCardPolicyMccCategories = _a.fetchCardPolicyMccCategories, exports.fetchCardPolicyVendorOptions = _a.fetchCardPolicyVendorOptions, exports.updateCardPolicyMccCategories = _a.updateCardPolicyMccCategories, exports.updateCardPolicyMccCategoriesFailure = _a.updateCardPolicyMccCategoriesFailure, exports.updateCardPolicyVendorOptions = _a.updateCardPolicyVendorOptions, exports.updateCardPolicyVendorOptionsFailure = _a.updateCardPolicyVendorOptionsFailure, exports.updateCreatedCardPolicyTemplate = _a.updateCreatedCardPolicyTemplate, exports.updateCardPolicyTemplates = _a.updateCardPolicyTemplates, exports.removeCardPolicyTemplate = _a.removeCardPolicyTemplate, exports.updateCardPolicyStats = _a.updateCardPolicyStats, exports.extractPolicyDocument = _a.extractPolicyDocument, exports.updatePolicyDocumentExtractionSuccess = _a.updatePolicyDocumentExtractionSuccess, exports.updatePolicyDocumentExtractionFailure = _a.updatePolicyDocumentExtractionFailure, exports.clearPolicyDocumentExtraction = _a.clearPolicyDocumentExtraction, exports.fetchCardPolicyRecommendationFromUpload = _a.fetchCardPolicyRecommendationFromUpload, exports.updatePolicyRecommendationFromUploadSuccess = _a.updatePolicyRecommendationFromUploadSuccess, exports.updatePolicyRecommendationFromUploadFailure = _a.updatePolicyRecommendationFromUploadFailure, exports.clearCardPolicy = _a.clearCardPolicy;
|
|
175
|
+
exports.default = cardPolicy.reducer;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FetchState, ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { ZeniAPIStatus } from '../../responsePayload';
|
|
3
|
+
import { CardPolicyState, CardPolicyStats, CardPolicyTemplate, CardPolicyVendorSearchEntry, ExtractedCardPolicyRules, MccCategory } from './cardPolicyState';
|
|
4
|
+
export declare function getCardPolicyMccCategories(state: CardPolicyState): MccCategory[];
|
|
5
|
+
export declare function getCardPolicyMccCategoriesFetchState(state: CardPolicyState): FetchState;
|
|
6
|
+
export declare function getCardPolicyMccCategoriesError(state: CardPolicyState): ZeniAPIStatus | undefined;
|
|
7
|
+
export declare function getCardPolicyTemplateById(state: CardPolicyState, templateId: ID): CardPolicyTemplate | undefined;
|
|
8
|
+
export declare function getAllCardPolicyTemplates(state: CardPolicyState): CardPolicyTemplate[];
|
|
9
|
+
/**
|
|
10
|
+
* Resolve an ordered list of `templateId`s against the entity store and
|
|
11
|
+
* return the corresponding `CardPolicyTemplate[]` in the same order.
|
|
12
|
+
* Missing IDs (e.g. stale local state during a refetch) are silently
|
|
13
|
+
* dropped. Pair with `getCardPolicyTemplateIds` from the view slice to
|
|
14
|
+
* render the Policy List page in server order.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getCardPolicyTemplatesByIds(state: CardPolicyState, templateIds: ID[]): CardPolicyTemplate[];
|
|
17
|
+
export declare function getCardPolicyStats(state: CardPolicyState): CardPolicyStats | undefined;
|
|
18
|
+
export declare function getPolicyDocumentExtractionFetchState(state: CardPolicyState): FetchState;
|
|
19
|
+
export declare function getPolicyDocumentExtractionError(state: CardPolicyState): ZeniAPIStatus | undefined;
|
|
20
|
+
export declare function getExtractedCardPolicyRules(state: CardPolicyState): ExtractedCardPolicyRules | undefined;
|
|
21
|
+
export declare function getUploadedPolicyDocumentFileName(state: CardPolicyState): string | undefined;
|
|
22
|
+
export declare function getPolicyRecommendationFromUploadFetchState(state: CardPolicyState): FetchState;
|
|
23
|
+
export declare function getPolicyRecommendationFromUploadError(state: CardPolicyState): ZeniAPIStatus | undefined;
|
|
24
|
+
export declare function getPolicyRecommendationFromUploadAnswerId(state: CardPolicyState): ID | undefined;
|
|
25
|
+
export declare function getPolicyRecommendationFromUploadChatSessionId(state: CardPolicyState): ID | undefined;
|
|
26
|
+
export declare function getCardPolicySuggestedAllowMerchants(state: CardPolicyState): string[];
|
|
27
|
+
export declare function getCardPolicySuggestedBlockMerchants(state: CardPolicyState): string[];
|
|
28
|
+
export declare function getCardPolicySuggestedAllowCategories(state: CardPolicyState): MccCategory[];
|
|
29
|
+
export declare function getCardPolicySuggestedBlockCategories(state: CardPolicyState): MccCategory[];
|
|
30
|
+
export declare function getCardPolicyVendorSearchOptions(state: CardPolicyState): CardPolicyVendorSearchEntry[];
|
|
31
|
+
export declare function getCardPolicyVendorSearchFetchState(state: CardPolicyState): FetchState;
|
|
32
|
+
export declare function getCardPolicyVendorSearchString(state: CardPolicyState): string;
|