@zeniai/client-epic-state 5.1.0-betaSS3 → 5.1.1-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/amount.d.ts +1 -0
- package/lib/commonStateTypes/amount.js +9 -1
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +1 -0
- 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/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/forecast/forecastState.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +1 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +19 -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/paymentAccount/paymentAccountSelector.d.ts +1 -0
- package/lib/entity/paymentAccount/paymentAccountSelector.js +9 -0
- 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/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 +22 -0
- package/lib/entity/tenant/tenantReducer.d.ts +52 -30
- package/lib/entity/tenant/tenantReducer.js +195 -11
- package/lib/entity/tenant/tenantState.d.ts +25 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +4 -0
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +17 -7
- 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 +36 -2
- package/lib/epic.js +37 -2
- package/lib/esm/commonStateTypes/amount.js +7 -0
- package/lib/esm/commonStateTypes/animations.js +1 -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/company/companyPayload.js +4 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +19 -0
- package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +8 -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/epic/initEmailConnectOAuthEpic.js +50 -0
- package/lib/esm/entity/tenant/tenantReducer.js +192 -9
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +17 -7
- package/lib/esm/entity/transaction/stateTypes/transactionLine.js +1 -0
- package/lib/esm/epic.js +37 -2
- package/lib/esm/index.js +77 -34
- 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 +21 -49
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +14 -7
- package/lib/esm/view/expenseAutomationView/transactionFilterHelpers.js +106 -18
- 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 +40 -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 +218 -50
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +12 -2
- package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +12 -0
- 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 +32 -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 +224 -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/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +58 -0
- package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +77 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +14 -0
- package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +207 -0
- package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +106 -52
- package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +6 -1
- package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +41 -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 +94 -40
- package/lib/index.js +281 -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 +11 -18
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +22 -50
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +8 -6
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.d.ts +2 -1
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +16 -8
- 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 +2 -3
- 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/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +7 -0
- package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +44 -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 +220 -51
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +5 -1
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +15 -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/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 +36 -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 +229 -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/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 +9 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +81 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +24 -0
- package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +17 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +29 -0
- package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +215 -0
- package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +28 -2
- package/lib/view/spendManagement/commonSetup/setupViewReducer.js +107 -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 +154 -0
- package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +46 -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,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.detectRuleOverlap = detectRuleOverlap;
|
|
4
|
+
function detectRuleOverlap({ candidateCriteria, existingRules, excludeRuleId, }) {
|
|
5
|
+
const candidateAmount = pickAmount(candidateCriteria);
|
|
6
|
+
const candidateVendor = pickVendor(candidateCriteria);
|
|
7
|
+
const candidateDepartment = pickDepartment(candidateCriteria);
|
|
8
|
+
const overlaps = [];
|
|
9
|
+
for (const rule of existingRules) {
|
|
10
|
+
if (rule.approvalRuleId === excludeRuleId) {
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
if (rule.isFallback === true) {
|
|
14
|
+
continue;
|
|
15
|
+
}
|
|
16
|
+
const ruleVendor = pickVendor(rule.criteria);
|
|
17
|
+
const ruleDepartment = pickDepartment(rule.criteria);
|
|
18
|
+
if (!areVendorCriteriaEqual(candidateVendor, ruleVendor)) {
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
if (!areDepartmentCriteriaEqual(candidateDepartment, ruleDepartment)) {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
const ruleAmount = pickAmount(rule.criteria);
|
|
25
|
+
if (amountsOverlap(candidateAmount, ruleAmount)) {
|
|
26
|
+
overlaps.push({ conflictingRule: rule });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return overlaps;
|
|
30
|
+
}
|
|
31
|
+
const pickAmount = (criteria) => criteria.find((c) => c.type === 'amount');
|
|
32
|
+
const pickVendor = (criteria) => criteria.find((c) => c.type === 'vendor');
|
|
33
|
+
const pickDepartment = (criteria) => criteria.find((c) => c.type === 'department');
|
|
34
|
+
const areVendorCriteriaEqual = (a, b) => {
|
|
35
|
+
if (a == null && b == null) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
if (a == null || b == null) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
if (a.operator !== b.operator) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
return idsEqual(a.vendorIds, b.vendorIds);
|
|
45
|
+
};
|
|
46
|
+
const areDepartmentCriteriaEqual = (a, b) => {
|
|
47
|
+
if (a == null && b == null) {
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
if (a == null || b == null) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
if (a.operator !== b.operator) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return idsEqual(a.departmentIds, b.departmentIds);
|
|
57
|
+
};
|
|
58
|
+
const idsEqual = (a, b) => {
|
|
59
|
+
if (a.length !== b.length) {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
const aSorted = [...a].sort();
|
|
63
|
+
const bSorted = [...b].sort();
|
|
64
|
+
return aSorted.every((id, i) => id === bSorted[i]);
|
|
65
|
+
};
|
|
66
|
+
const amountsOverlap = (a, b) => {
|
|
67
|
+
// Absent amount criteria covers the whole real line, so any
|
|
68
|
+
// pairing involving an absent one is a guaranteed overlap.
|
|
69
|
+
if (a == null || b == null) {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
const aLow = a.min?.amount ?? Number.NEGATIVE_INFINITY;
|
|
73
|
+
const aHigh = a.max?.amount ?? Number.POSITIVE_INFINITY;
|
|
74
|
+
const bLow = b.min?.amount ?? Number.NEGATIVE_INFINITY;
|
|
75
|
+
const bHigh = b.max?.amount ?? Number.POSITIVE_INFINITY;
|
|
76
|
+
return Math.max(aLow, bLow) <= Math.min(aHigh, bHigh);
|
|
77
|
+
};
|
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
import { ApprovalRule } from './approvalRuleState';
|
|
2
|
+
/**
|
|
3
|
+
* Condition Payload — one entry inside criteria.conditions[].
|
|
4
|
+
*
|
|
5
|
+
* field examples: 'amount' | 'vendor_id' | 'department_id'
|
|
6
|
+
* type examples: 'gte' | 'lte' | 'eq' | 'in' | 'not_in'
|
|
7
|
+
* value: number for amount comparisons; string[] for in / not_in lookups.
|
|
8
|
+
*/
|
|
9
|
+
export interface ConditionPayload {
|
|
10
|
+
field: string;
|
|
11
|
+
type: string;
|
|
12
|
+
value: number | string[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Criteria Payload — list of conditions joined by `criteria_operator`.
|
|
16
|
+
*
|
|
17
|
+
* `currency_code` / `currency_symbol` apply to amount conditions inside
|
|
18
|
+
* `conditions[]`. Kept here pending confirmation that they should remain.
|
|
19
|
+
*/
|
|
2
20
|
export interface CriteriaPayload {
|
|
21
|
+
conditions: ConditionPayload[];
|
|
22
|
+
criteria_operator: string;
|
|
3
23
|
currency_code: string;
|
|
4
24
|
currency_symbol: string;
|
|
5
|
-
min: number;
|
|
6
|
-
range_entity: string;
|
|
7
|
-
type: string;
|
|
8
|
-
max?: number | null;
|
|
9
25
|
}
|
|
10
26
|
export interface ActorPayload {
|
|
11
27
|
type: string;
|
|
@@ -25,11 +41,24 @@ export interface StepPayload {
|
|
|
25
41
|
export interface ApprovalRulePayload {
|
|
26
42
|
approval_rule_id: string;
|
|
27
43
|
create_time: string;
|
|
28
|
-
criteria: CriteriaPayload
|
|
44
|
+
criteria: CriteriaPayload;
|
|
29
45
|
entity_type: string;
|
|
30
46
|
name: string | null;
|
|
31
47
|
steps: StepPayload[];
|
|
32
48
|
update_time: string;
|
|
49
|
+
are_approvals_serialized?: boolean;
|
|
50
|
+
description?: string | null;
|
|
51
|
+
is_fallback?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Approval Rules 3.0 — when `true`, the rule enforces separation of
|
|
54
|
+
* duties (a user can't approve their own request even if they are
|
|
55
|
+
* also an approver). The list-page rule card surfaces this as a
|
|
56
|
+
* green "Separation of duties" capsule.
|
|
57
|
+
*/
|
|
58
|
+
is_separation_of_duty_enabled?: boolean;
|
|
59
|
+
pending_approvals_count?: number;
|
|
60
|
+
pending_entity_approval_update_status?: string;
|
|
61
|
+
priority?: number;
|
|
33
62
|
version?: number | string;
|
|
34
63
|
}
|
|
35
64
|
/**
|
|
@@ -17,19 +17,154 @@ const toApprovalRule = (payload) => ({
|
|
|
17
17
|
version: payload.version,
|
|
18
18
|
criteria: toApprovalCriteria(payload.criteria),
|
|
19
19
|
steps: toApprovalSteps(payload.steps),
|
|
20
|
+
description: payload.description ?? undefined,
|
|
21
|
+
priority: payload.priority,
|
|
22
|
+
isFallback: payload.is_fallback ?? false,
|
|
23
|
+
separationOfDuties: payload.is_separation_of_duty_enabled ?? false,
|
|
24
|
+
areApprovalsSerialized: payload.are_approvals_serialized,
|
|
25
|
+
pendingApprovalsCount: payload.pending_approvals_count,
|
|
26
|
+
pendingEntityApprovalUpdateStatus: payload.pending_entity_approval_update_status,
|
|
20
27
|
});
|
|
21
28
|
exports.toApprovalRule = toApprovalRule;
|
|
29
|
+
/**
|
|
30
|
+
* Maps the wire-level criteria block into the state-side discriminated
|
|
31
|
+
* `Criteria[]` union.
|
|
32
|
+
*
|
|
33
|
+
* The wire keeps each condition as a flat row inside `conditions[]`.
|
|
34
|
+
* Amount comparisons can show up as a `gte` only, a `lte` only, or a
|
|
35
|
+
* `gte` + `lte` pair — those collapse into a single AmountCriteria whose
|
|
36
|
+
* `comparator` is `greater_than`, `less_than`, or `range` respectively.
|
|
37
|
+
*
|
|
38
|
+
* Vendor and department conditions map one-to-one: `in` becomes `is`,
|
|
39
|
+
* `not_in` becomes `is_not`.
|
|
40
|
+
*
|
|
41
|
+
* Resilient to two forms of upstream drift:
|
|
42
|
+
* - Missing / null criteria → returns [].
|
|
43
|
+
* - Legacy criteria shape (array of amount-range objects, the pre-3.0
|
|
44
|
+
* wire) → converted to an AmountCriteria so existing rules in production
|
|
45
|
+
* still render while the backend rolls out.
|
|
46
|
+
*/
|
|
22
47
|
const toApprovalCriteria = (payload) => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
48
|
+
if (payload == null) {
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
if (Array.isArray(payload)) {
|
|
52
|
+
// Legacy pre-3.0 wire: an array of amount-range entries.
|
|
53
|
+
return legacyAmountRangeToCriteria(payload);
|
|
54
|
+
}
|
|
55
|
+
if (!Array.isArray(payload.conditions)) {
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
const results = [];
|
|
59
|
+
const amountCriteria = toAmountCriteria(payload);
|
|
60
|
+
if (amountCriteria != null) {
|
|
61
|
+
results.push(amountCriteria);
|
|
62
|
+
}
|
|
63
|
+
payload.conditions
|
|
64
|
+
.filter((condition) => condition.field === 'vendor_id')
|
|
65
|
+
.forEach((condition) => {
|
|
66
|
+
const vendor = toVendorCriteria(condition);
|
|
67
|
+
if (vendor != null) {
|
|
68
|
+
results.push(vendor);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
payload.conditions
|
|
72
|
+
.filter((condition) => condition.field === 'department_id')
|
|
73
|
+
.forEach((condition) => {
|
|
74
|
+
const department = toDepartmentCriteria(condition);
|
|
75
|
+
if (department != null) {
|
|
76
|
+
results.push(department);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
return results;
|
|
80
|
+
};
|
|
81
|
+
const legacyAmountRangeToCriteria = (legacy) => {
|
|
82
|
+
if (legacy.length === 0) {
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
// The state-side 'Criteria[]' model allows at most one
|
|
86
|
+
// 'AmountCriteria' per rule (see 'approvalRuleState.ts'). The legacy
|
|
87
|
+
// wire was an array, so a multi-entry payload can't be represented
|
|
88
|
+
// here without losing data. Read the first entry and log a warning
|
|
89
|
+
// if production rules ever ship more — that would signal a backend
|
|
90
|
+
// regression we want to catch early rather than silently truncating.
|
|
91
|
+
if (legacy.length > 1) {
|
|
92
|
+
console.warn('[approvalRulePayload] legacyAmountRangeToCriteria: received ' +
|
|
93
|
+
legacy.length +
|
|
94
|
+
' entries but the state model only supports one; using the ' +
|
|
95
|
+
'first entry and dropping the rest.');
|
|
96
|
+
}
|
|
97
|
+
const first = legacy[0] ?? {};
|
|
98
|
+
const currency = first.currency_code ?? 'USD';
|
|
99
|
+
const symbol = first.currency_symbol ?? '$';
|
|
100
|
+
const min = typeof first.min === 'number'
|
|
101
|
+
? (0, amount_1.toAmount)(first.min, currency, symbol)
|
|
102
|
+
: undefined;
|
|
103
|
+
const max = typeof first.max === 'number'
|
|
104
|
+
? (0, amount_1.toAmount)(first.max, currency, symbol)
|
|
105
|
+
: undefined;
|
|
106
|
+
if (min == null && max == null) {
|
|
107
|
+
return [];
|
|
108
|
+
}
|
|
109
|
+
const comparator = min != null && max != null
|
|
110
|
+
? 'range'
|
|
111
|
+
: min != null
|
|
112
|
+
? 'greater_than'
|
|
113
|
+
: 'less_than';
|
|
114
|
+
return [{ type: 'amount', comparator, min, max }];
|
|
115
|
+
};
|
|
116
|
+
const toAmountCriteria = (payload) => {
|
|
117
|
+
if (!Array.isArray(payload.conditions)) {
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
const amountConditions = payload.conditions.filter((condition) => condition.field === 'amount');
|
|
121
|
+
// Approval Rules 3.0 — an 'eq' condition represents min === max. Fold
|
|
122
|
+
// it into both finders so it decodes as comparator: 'range' (closed
|
|
123
|
+
// single-point) rather than 'greater_than' (open upper).
|
|
124
|
+
const gteCondition = amountConditions.find((condition) => condition.type === 'gte' || condition.type === 'eq');
|
|
125
|
+
const lteCondition = amountConditions.find((condition) => condition.type === 'lte' || condition.type === 'eq');
|
|
126
|
+
if (gteCondition == null && lteCondition == null) {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
const currencyCode = payload.currency_code ?? 'USD';
|
|
130
|
+
const currencySymbol = payload.currency_symbol ?? '$';
|
|
131
|
+
const min = typeof gteCondition?.value === 'number'
|
|
132
|
+
? (0, amount_1.toAmount)(gteCondition.value, currencyCode, currencySymbol)
|
|
133
|
+
: undefined;
|
|
134
|
+
const max = typeof lteCondition?.value === 'number'
|
|
135
|
+
? (0, amount_1.toAmount)(lteCondition.value, currencyCode, currencySymbol)
|
|
136
|
+
: undefined;
|
|
137
|
+
let comparator;
|
|
138
|
+
if (min != null && max != null) {
|
|
139
|
+
comparator = 'range';
|
|
140
|
+
}
|
|
141
|
+
else if (min != null) {
|
|
142
|
+
comparator = 'greater_than';
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
comparator = 'less_than';
|
|
146
|
+
}
|
|
147
|
+
return { type: 'amount', comparator, min, max };
|
|
148
|
+
};
|
|
149
|
+
const toVendorCriteria = (condition) => {
|
|
150
|
+
if (!Array.isArray(condition.value)) {
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
type: 'vendor',
|
|
155
|
+
operator: condition.type === 'not_in' ? 'is_not' : 'is',
|
|
156
|
+
vendorIds: condition.value,
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
const toDepartmentCriteria = (condition) => {
|
|
160
|
+
if (!Array.isArray(condition.value)) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
return {
|
|
164
|
+
type: 'department',
|
|
165
|
+
operator: condition.type === 'not_in' ? 'is_not' : 'is',
|
|
166
|
+
departmentIds: condition.value,
|
|
167
|
+
};
|
|
33
168
|
};
|
|
34
169
|
const toApprovalSteps = (payload) => {
|
|
35
170
|
return payload.map((step) => ({
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import { ID } from '../../commonStateTypes/common';
|
|
2
|
-
import {
|
|
2
|
+
import { EntityType } from '../entityApprovalStatus/entityApprovalStatusState';
|
|
3
|
+
import { AmountCriteria, ApprovalRule, ApprovalRuleState, Criteria, DepartmentCriteria, VendorCriteria } from './approvalRuleState';
|
|
3
4
|
export declare function getApprovalRuleById(approvalRuleState: ApprovalRuleState, approvalRuleId: ID): ApprovalRule | undefined;
|
|
4
5
|
export declare function getApprovalRulesByIds(approvalRuleState: ApprovalRuleState, approvalRuleIds: ID[]): ApprovalRule[];
|
|
6
|
+
/**
|
|
7
|
+
* Returns the amount-range portion of a rule's criteria, if any.
|
|
8
|
+
*
|
|
9
|
+
* Use this whenever a caller needs to read amount min/max from the new
|
|
10
|
+
* discriminated `Criteria` union without inlining a type guard.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getAmountCriteria(criteria: Criteria[]): AmountCriteria | undefined;
|
|
13
|
+
export declare function getVendorCriteria(criteria: Criteria[]): VendorCriteria | undefined;
|
|
14
|
+
export declare function getDepartmentCriteria(criteria: Criteria[]): DepartmentCriteria | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Returns all rules of the given entityType, sorted by `priority` ascending.
|
|
17
|
+
*
|
|
18
|
+
* Rules without a `priority` value sort to the end (treated as Infinity).
|
|
19
|
+
* Use this for the list page where rules render in evaluation order.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getApprovalRulesByEntityType(approvalRuleState: ApprovalRuleState, entityType: EntityType): ApprovalRule[];
|
|
22
|
+
/**
|
|
23
|
+
* Returns the tenant's fallback rule for the given entityType, if one exists.
|
|
24
|
+
*
|
|
25
|
+
* The fallback rule is shown by the "fallback engine active" banner on the
|
|
26
|
+
* list page and is used to handle bills/reimbursements that match no other rule.
|
|
27
|
+
*/
|
|
28
|
+
export declare function getFallbackApprovalRule(approvalRuleState: ApprovalRuleState, entityType: EntityType): ApprovalRule | undefined;
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getApprovalRuleById = getApprovalRuleById;
|
|
4
4
|
exports.getApprovalRulesByIds = getApprovalRulesByIds;
|
|
5
|
+
exports.getAmountCriteria = getAmountCriteria;
|
|
6
|
+
exports.getVendorCriteria = getVendorCriteria;
|
|
7
|
+
exports.getDepartmentCriteria = getDepartmentCriteria;
|
|
8
|
+
exports.getApprovalRulesByEntityType = getApprovalRulesByEntityType;
|
|
9
|
+
exports.getFallbackApprovalRule = getFallbackApprovalRule;
|
|
5
10
|
function getApprovalRuleById(approvalRuleState, approvalRuleId) {
|
|
6
11
|
return approvalRuleState.approvalRuleById[approvalRuleId] ?? undefined;
|
|
7
12
|
}
|
|
@@ -11,3 +16,38 @@ function getApprovalRulesByIds(approvalRuleState, approvalRuleIds) {
|
|
|
11
16
|
.filter((value) => value != null);
|
|
12
17
|
return approvalRulesByIds;
|
|
13
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Returns the amount-range portion of a rule's criteria, if any.
|
|
21
|
+
*
|
|
22
|
+
* Use this whenever a caller needs to read amount min/max from the new
|
|
23
|
+
* discriminated `Criteria` union without inlining a type guard.
|
|
24
|
+
*/
|
|
25
|
+
function getAmountCriteria(criteria) {
|
|
26
|
+
return criteria.find((c) => c.type === 'amount');
|
|
27
|
+
}
|
|
28
|
+
function getVendorCriteria(criteria) {
|
|
29
|
+
return criteria.find((c) => c.type === 'vendor');
|
|
30
|
+
}
|
|
31
|
+
function getDepartmentCriteria(criteria) {
|
|
32
|
+
return criteria.find((c) => c.type === 'department');
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Returns all rules of the given entityType, sorted by `priority` ascending.
|
|
36
|
+
*
|
|
37
|
+
* Rules without a `priority` value sort to the end (treated as Infinity).
|
|
38
|
+
* Use this for the list page where rules render in evaluation order.
|
|
39
|
+
*/
|
|
40
|
+
function getApprovalRulesByEntityType(approvalRuleState, entityType) {
|
|
41
|
+
return Object.values(approvalRuleState.approvalRuleById)
|
|
42
|
+
.filter((rule) => rule.entityType === entityType)
|
|
43
|
+
.sort((a, b) => (a.priority ?? Infinity) - (b.priority ?? Infinity));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Returns the tenant's fallback rule for the given entityType, if one exists.
|
|
47
|
+
*
|
|
48
|
+
* The fallback rule is shown by the "fallback engine active" banner on the
|
|
49
|
+
* list page and is used to handle bills/reimbursements that match no other rule.
|
|
50
|
+
*/
|
|
51
|
+
function getFallbackApprovalRule(approvalRuleState, entityType) {
|
|
52
|
+
return Object.values(approvalRuleState.approvalRuleById).find((rule) => rule.entityType === entityType && rule.isFallback === true);
|
|
53
|
+
}
|
|
@@ -25,14 +25,48 @@ export interface Actor {
|
|
|
25
25
|
subType?: AttributeType | RoleType;
|
|
26
26
|
userId?: ID;
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Approval rule criteria — discriminated union over the three condition
|
|
30
|
+
* types the wire format supports: amount, vendor, and department.
|
|
31
|
+
*
|
|
32
|
+
* State-side, each rule carries a `Criteria[]` with at most one variant of
|
|
33
|
+
* each kind (e.g. one AmountCriteria + one VendorCriteria + one DepartmentCriteria).
|
|
34
|
+
*
|
|
35
|
+
* Form-side, the rule create/edit form uses `ApprovalRuleFormCriteria`
|
|
36
|
+
* (defined in commonState) — a structured object with named slots for
|
|
37
|
+
* amount/vendor/department. Epics translate between the two.
|
|
38
|
+
*/
|
|
39
|
+
export type AmountComparator = 'greater_than' | 'less_than' | 'range';
|
|
40
|
+
export interface AmountCriteria {
|
|
41
|
+
comparator: AmountComparator;
|
|
42
|
+
type: 'amount';
|
|
43
|
+
/** Upper bound. Present for `less_than` and `range`. */
|
|
44
|
+
max?: Amount;
|
|
45
|
+
/** Lower bound. Present for `greater_than` and `range`. */
|
|
46
|
+
min?: Amount;
|
|
47
|
+
}
|
|
48
|
+
export interface VendorCriteria {
|
|
49
|
+
operator: 'is' | 'is_not';
|
|
50
|
+
type: 'vendor';
|
|
51
|
+
vendorIds: ID[];
|
|
35
52
|
}
|
|
53
|
+
export interface DepartmentCriteria {
|
|
54
|
+
departmentIds: ID[];
|
|
55
|
+
operator: 'is' | 'is_not';
|
|
56
|
+
type: 'department';
|
|
57
|
+
}
|
|
58
|
+
export type Criteria = AmountCriteria | VendorCriteria | DepartmentCriteria;
|
|
59
|
+
/**
|
|
60
|
+
* Approval Rules 3.0 — canonical discriminator across the three
|
|
61
|
+
* condition variants. Derived from the `Criteria` union's `type`
|
|
62
|
+
* field so it can't drift from the underlying data model.
|
|
63
|
+
*
|
|
64
|
+
* Used by the unified `ConditionRow` UI component to switch which
|
|
65
|
+
* variant body to render, and by chip-rendering helpers on the list
|
|
66
|
+
* page to pick a label format. Consumers should import this type
|
|
67
|
+
* rather than redeclaring the three string literals locally.
|
|
68
|
+
*/
|
|
69
|
+
export type ConditionType = Criteria['type'];
|
|
36
70
|
export interface Step {
|
|
37
71
|
actors: Actor[];
|
|
38
72
|
operator: StepOperatorType;
|
|
@@ -51,7 +85,25 @@ export interface ApprovalRule {
|
|
|
51
85
|
entityType: EntityType;
|
|
52
86
|
steps: Step[];
|
|
53
87
|
updateTime: ZeniDate;
|
|
88
|
+
/** Backend bookkeeping: whether approval steps must run serialized. */
|
|
89
|
+
areApprovalsSerialized?: boolean;
|
|
90
|
+
/** Free-text description shown beneath the rule name on the list page. */
|
|
91
|
+
description?: string;
|
|
92
|
+
/** True when this rule is the tenant's default fallback rule. */
|
|
93
|
+
isFallback?: boolean;
|
|
54
94
|
name?: string;
|
|
95
|
+
/** Backend bookkeeping: number of entities currently pending against this rule. */
|
|
96
|
+
pendingApprovalsCount?: number;
|
|
97
|
+
/** Backend bookkeeping: status of background updates against this rule. */
|
|
98
|
+
pendingEntityApprovalUpdateStatus?: string;
|
|
99
|
+
/** Rule's position in the evaluation order; lower number = higher priority. */
|
|
100
|
+
priority?: number;
|
|
101
|
+
/**
|
|
102
|
+
* When on, the creator of a bill/reimbursement cannot auto-approve
|
|
103
|
+
* their own request even if they are also an approver. Backend spec
|
|
104
|
+
* is still pending — kept optional for now.
|
|
105
|
+
*/
|
|
106
|
+
separationOfDuties?: boolean;
|
|
55
107
|
version?: number | string;
|
|
56
108
|
}
|
|
57
109
|
export interface Approvers {
|