@zeniai/client-epic-state 5.2.54 → 5.2.55
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/entity/billPay/billTransaction/billTransactionReducer.d.ts +5 -1
- package/lib/entity/billPay/billTransaction/billTransactionReducer.js +17 -2
- package/lib/epic.d.ts +3 -1
- package/lib/epic.js +4 -0
- package/lib/esm/entity/billPay/billTransaction/billTransactionReducer.js +16 -1
- package/lib/esm/epic.js +4 -0
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/spendManagement/billPay/billDetailView/billDetailViewReducer.js +87 -1
- package/lib/esm/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +1 -0
- package/lib/esm/view/spendManagement/billPay/billDetailView/billDetailViewState.js +4 -0
- package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillRecommendationsEpic.js +97 -0
- package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchRecommendationsForBill.js +85 -0
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewReducer.js +18 -1
- package/lib/esm/view/spendManagement/billPay/editBillView/editBillViewSelector.js +3 -0
- package/lib/esm/view/spendManagement/billPay/editBillView/epics/applyBillRecommendationsToLocalStoreEpic.js +95 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +30 -29
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewPayload.d.ts +19 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewReducer.d.ts +10 -1
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewReducer.js +88 -2
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +1 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +1 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewState.d.ts +7 -0
- package/lib/view/spendManagement/billPay/billDetailView/billDetailViewState.js +4 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillRecommendationsEpic.d.ts +37 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchBillRecommendationsEpic.js +104 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchRecommendationsForBill.d.ts +24 -0
- package/lib/view/spendManagement/billPay/billDetailView/epics/fetchRecommendationsForBill.js +92 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +4 -1
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +19 -2
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +1 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +3 -0
- package/lib/view/spendManagement/billPay/editBillView/epics/applyBillRecommendationsToLocalStoreEpic.d.ts +18 -0
- package/lib/view/spendManagement/billPay/editBillView/epics/applyBillRecommendationsToLocalStoreEpic.js +102 -0
- package/package.json +1 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { BulkActionItemResponsePayload } from '../../../view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewPayload';
|
|
2
|
+
import { RecommendationByLineId } from '../../transaction/stateTypes/transaction';
|
|
2
3
|
import { BillTransactionPayload } from './billTransactionPayload';
|
|
3
4
|
import { BillTransactionState } from './billTransactionState';
|
|
4
5
|
export declare const initialState: BillTransactionState;
|
|
5
|
-
export declare const updateBillTransactions: import("@reduxjs/toolkit").ActionCreatorWithPayload<BillTransactionPayload[], "billTransaction/updateBillTransactions">, updateBillTransaction: import("@reduxjs/toolkit").ActionCreatorWithPayload<BillTransactionPayload, "billTransaction/updateBillTransaction">,
|
|
6
|
+
export declare const updateBillTransactions: import("@reduxjs/toolkit").ActionCreatorWithPayload<BillTransactionPayload[], "billTransaction/updateBillTransactions">, updateBillTransaction: import("@reduxjs/toolkit").ActionCreatorWithPayload<BillTransactionPayload, "billTransaction/updateBillTransaction">, updateBillTransactionRecommendations: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[billId: string, recommendations: RecommendationByLineId], {
|
|
7
|
+
billId: string;
|
|
8
|
+
recommendations: RecommendationByLineId;
|
|
9
|
+
}, "billTransaction/updateBillTransactionRecommendations", never, never>, updateBillTransactionsWithBulkActionStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<BulkActionItemResponsePayload[], "billTransaction/updateBillTransactionsWithBulkActionStatus">, removeBillTransaction: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "billTransaction/removeBillTransaction">;
|
|
6
10
|
declare const _default: import("redux").Reducer<BillTransactionState>;
|
|
7
11
|
export default _default;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.removeBillTransaction = exports.updateBillTransactionsWithBulkActionStatus = exports.updateBillTransaction = exports.updateBillTransactions = exports.initialState = void 0;
|
|
7
|
+
exports.removeBillTransaction = exports.updateBillTransactionsWithBulkActionStatus = exports.updateBillTransactionRecommendations = exports.updateBillTransaction = exports.updateBillTransactions = exports.initialState = void 0;
|
|
8
8
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
9
|
const assignWith_1 = __importDefault(require("lodash/assignWith"));
|
|
10
10
|
const rootActions_1 = require("../../../rootActions");
|
|
@@ -30,6 +30,21 @@ const billTransaction = (0, toolkit_1.createSlice)({
|
|
|
30
30
|
doUpdateBillTransactionWithBulkActionStatus(draft.transactionById, transactionPayload.entity_id, transactionPayload);
|
|
31
31
|
});
|
|
32
32
|
},
|
|
33
|
+
// Separate from `updateBillTransaction` because that mapper only derives
|
|
34
|
+
// `recommendations` from a transaction payload; the bill detail response
|
|
35
|
+
// carries none when recommendation composition is skipped.
|
|
36
|
+
updateBillTransactionRecommendations: {
|
|
37
|
+
reducer(draft, action) {
|
|
38
|
+
const { billId, recommendations } = action.payload;
|
|
39
|
+
const transaction = draft.transactionById[billId];
|
|
40
|
+
if (transaction != null) {
|
|
41
|
+
transaction.recommendations = recommendations;
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
prepare(billId, recommendations) {
|
|
45
|
+
return { payload: { billId, recommendations } };
|
|
46
|
+
},
|
|
47
|
+
},
|
|
33
48
|
removeBillTransaction(draft, action) {
|
|
34
49
|
delete draft.transactionById[action.payload];
|
|
35
50
|
},
|
|
@@ -40,7 +55,7 @@ const billTransaction = (0, toolkit_1.createSlice)({
|
|
|
40
55
|
});
|
|
41
56
|
},
|
|
42
57
|
});
|
|
43
|
-
_a = billTransaction.actions, exports.updateBillTransactions = _a.updateBillTransactions, exports.updateBillTransaction = _a.updateBillTransaction, exports.updateBillTransactionsWithBulkActionStatus = _a.updateBillTransactionsWithBulkActionStatus, exports.removeBillTransaction = _a.removeBillTransaction;
|
|
58
|
+
_a = billTransaction.actions, exports.updateBillTransactions = _a.updateBillTransactions, exports.updateBillTransaction = _a.updateBillTransaction, exports.updateBillTransactionRecommendations = _a.updateBillTransactionRecommendations, exports.updateBillTransactionsWithBulkActionStatus = _a.updateBillTransactionsWithBulkActionStatus, exports.removeBillTransaction = _a.removeBillTransaction;
|
|
44
59
|
exports.default = billTransaction.reducer;
|
|
45
60
|
/**
|
|
46
61
|
* Helper functions
|
package/lib/epic.d.ts
CHANGED
|
@@ -438,6 +438,7 @@ import { ActionType as ApproveOrRejectBillActionType } from './view/spendManagem
|
|
|
438
438
|
import { ActionType as CancelAndDeleteBillActionType } from './view/spendManagement/billPay/billDetailView/epics/cancelAndDeleteBillEpic';
|
|
439
439
|
import { ActionType as DeleteBillActionType } from './view/spendManagement/billPay/billDetailView/epics/deleteBillEpic';
|
|
440
440
|
import { ActionType as FetchBillDetailActionType } from './view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic';
|
|
441
|
+
import { ActionType as FetchBillRecommendationsActionType } from './view/spendManagement/billPay/billDetailView/epics/fetchBillRecommendationsEpic';
|
|
441
442
|
import { ActionType as FetchEligibleActionsForBillActionType } from './view/spendManagement/billPay/billDetailView/epics/fetchEligibleActionsForBillEpic';
|
|
442
443
|
import { ActionType as RetryOrRefundBillActionType } from './view/spendManagement/billPay/billDetailView/epics/retryOrRefundBillEpic';
|
|
443
444
|
import { ActionType as FetchBillListActionType } from './view/spendManagement/billPay/billList/fetchBillListEpic';
|
|
@@ -459,6 +460,7 @@ import { ActionType as CancelOrDeleteBillsBulkActionActionType } from './view/sp
|
|
|
459
460
|
import { ActionType as SubmitDraftBillsBulkActionActionType } from './view/spendManagement/billPay/billsBulkActionView/epics/submitDraftBillsBulkActionEpic';
|
|
460
461
|
import { ActionType as ValidateBillsBulkActionActionType } from './view/spendManagement/billPay/billsBulkActionView/epics/validateBillsBulkActionEpic.ts';
|
|
461
462
|
import { ActionType as CurrencyConversionActionType } from './view/spendManagement/billPay/editBillView/epics/convertAmountToHomeCurrencyEpic';
|
|
463
|
+
import { ActionType as ApplyBillRecommendationsToLocalStoreActionType } from './view/spendManagement/billPay/editBillView/epics/applyBillRecommendationsToLocalStoreEpic';
|
|
462
464
|
import { ActionType as FetchBillAndInitializeLocalStoreActionType } from './view/spendManagement/billPay/editBillView/epics/fetchBillAndInitializeLocalStoreEpic';
|
|
463
465
|
import { ActionType as FetchEditBillDetailPageActionType } from './view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic';
|
|
464
466
|
import { ActionType as FetchVendorAndUpdateBillLocalDataActionType } from './view/spendManagement/billPay/editBillView/epics/fetchVendorAndUpdateBillLocalDataEpic';
|
|
@@ -699,5 +701,5 @@ import { ActionType as FetchDepositAccStatementListActionType } from './view/zen
|
|
|
699
701
|
import { ActionType as FetchZeniAccStatePageActionType } from './view/zeniAccStatementList/fetchZeniAccStatementPageEpic';
|
|
700
702
|
import { ActionType as ApproveOAuthConsentActionType } from './view/zeniOAuthView/epics/approveOAuthConsentEpic';
|
|
701
703
|
/** Root action type is union of all the epic action type */
|
|
702
|
-
export type RootActionType = AcceptBillPayTermsActionType | AcceptBillPayUpdatedTermsActionType | AcceptChargeCardTermsActionType | AcceptEmployeeRemiTermsActionType | AcceptMasterTOSEpicActionType | AcceptRemiTermsActionType | AcceptTreasuryTermsActionType | AcceptZeniAccountTermsActionType | AcknowledgeOnboardingAiActivationViewedActionType | AcknowledgeOnboardingAiFinanceTeamActionType | AddCardPaymentSourceActionType | ApplyExtractedPolicyToDraftActionType | ApproveOAuthConsentActionType | ApproveOrRejectBillActionType | ApproveOrRejectBillsBulkActionActionType | ApproveOrRejectRemiActionType | ApproveOrRejectRemisBulkActionActionType | ApproveVendorGlobalReviewActionType | ArchiveCardPolicyActionType | ArchiveTaskActionType | BackgroundRefetchReviewTabActionType | BalanceSheetActionType | BalanceSheetClassesViewActionType | BalanceSheetForTimeframeActionType | BalanceSheetForTimeframeClassesViewActionType | BalanceSheetForTimeframeProjectViewActionType | BalanceSheetProjectViewActionType | BulkUpdateTasksListActionType | BulkUploadMatchResultToastActionType | BulkUploadReceiptsActionType | CancelAiAccountantOnboardingActionType | CancelAndDeleteBillActionType | CancelAndDeleteRemiActionType | CancelOrDeleteBillsBulkActionActionType | CancelOrDeleteRemisBulkActionActionType | CancelScheduleAccruedJournalEntryActionType | CardBalanceActionType | CashBalanceActionType | CashFlowActionType | CashFlowClassesViewActionType | CashFlowForTimeframeActionType | CashFlowForTimeframeClassesViewActionType | CashFlowForTimeframeProjectViewActionType | CashFlowProjectViewActionType | CashInCashOutActionType | CashPositionActionType | ChangeZeniPersonRolesActionType | CheckDepositActionType | CloseChargeCardActionType | CloseChargeCardsActionType | CombinedStatementActionType | CompanyManagementSavePendingUpdatesActionType | CompanyManagementSaveUpdatesActionType | ConfirmBulkUploadMatchActionType | ConfirmCardSetupIntentActionType | ConfirmStatementMappingActionType | CreateAddressActionType | CreateAutoTransferRuleActionType | CreateBankAccountActionType | CreateCardPolicyTemplateActionType | CreateCardSetupIntentActionType | CreateCheckingAccountActionType | CreateCompanyAddressActionType | CreateCompanyOfficersActionType | CreateCompanyUserAddressActionType | CreateGlobalMerchantActionType | CreateInternationalBankAccountActionType | CreateInvoiceActionType | CreateNewSchedulesAccruedActionType | CreateNewSchedulesActionType | CreateNewTaskGroupActionType | CreateOneTimeAccrualActionType | CreatePaymentInstrumentActionType | CreateSessionActionType | CreateSessionAndSubmitActionType | CreateSubTaskActionType | CreateTagActionType | CreateTaskFromTaskGroupTemplateActionType | CreateTransferEntryActionType | CreateUserBankAccountActionType | CurrencyConversionActionType | DeleteAccountStatementActionType | DeleteAutoTransferRuleActionType | DeleteBankAccountActionType | DeleteBillActionType | DeleteBillPayApprovalRuleActionType | DeleteCannedResponseActionType | DeleteChatSessionActionType | DeleteCombinedStatementActionType | DeleteFileActionType | DeleteFileListActionType | DeleteInternationalBankAccountActionType | DeletePaymentInstrumentActionType | DeletePersonActionType | DeleteRemiActionType | DeleteRemiApprovalRuleActionType | DeleteScheduleAccruedDetailActionType | DeleteScheduleDetailActionType | DeleteTagActionType | DeleteTaskActionType | DeleteTaskGroupActionType | DeleteTransactionAttachmentActionType | DeleteUserBankAccountActionType | DepositAccountTransactionListActionType | DisableAccountingProjectsActionType | DismissCapitalizationOnboardingActionType | DoMagicLinkSignInActionType | DownloadAccountingProviderAttachmentActionType | DragNDropTasksActionType | EditInvoicingCatalogItemDetailViewActionType | EditInvoicingCouponDetailViewActionType | EditInvoicingCustomerDetailViewActionType | EditInvoicingSubscriptionDetailViewActionType | EnableAccountingProjectsActionType | EnableChargeCardAutoPayActionType | EnableSetupActionType | EstablishOnboardingPlaidConnectionActionType | EstablishPlaidConnectionActionType | ExcludeAccountFromReconciliationActionType | ExpressInterestChargeCardActionType | ExpressPayActionType | ExtractPolicyDocumentActionType | FetchAccountHistoryActionType | FetchAccountListActionType | FetchAccountListForAccountTypesActionType | FetchAccountSettingsListForAccountTypesActionType | FetchAccruedScheduleListActionType | FetchActiveTenantActionType | FetchAddressActionType | FetchAggregatedReportActionType | FetchAiAccountantCustomersActionType | FetchAiAccountantJobsActionType | FetchAiAgentsActivationStatusActionType | FetchAllCockpitViewsActionType | FetchAllExpenseAutomationTabsActionType | FetchAllPeopleRequiredActionType | FetchAllTagsActionType | FetchAllTaskGroupsActionType | FetchAllTenantsActionType | FetchApAgingActionType | FetchApAgingDetailActionType | FetchArAgingActionType | FetchArAgingDetailActionType | FetchAuditReportGroupViewActionType | FetchAuditRuleGroupViewActionType | FetchAutoTransferReviewDetailActionType | FetchAutoTransferRuleHistoryActionType | FetchAutoTransferRulesActionType | FetchBankAccountsListActionType | FetchBankConnectionsViewActionType | FetchBankCountryNameByIbanActionType | FetchBankNameByRoutingActionType | FetchBankNameBySwiftActionType | FetchBillAndInitializeLocalStoreActionType | FetchBillDetailActionType | FetchBillingAccountsListActionType | FetchBillListActionType | FetchBillListPerTabActionType | FetchBillPayApproversDetailsActionType | FetchBillPayApproversListActionType | FetchBillPayCardActionType | FetchBillPayConfigActionType | FetchBillPaySetupApproverViewActionType | FetchBillPaySetupViewActionType | FetchBulkUploadBatchDetailsActionType | FetchBulkUploadBatchesActionType | FetchCannedResponsesActionType | FetchCardPolicyDetailActionType | FetchCardPolicyListActionType | FetchCardPolicyMccCategoriesActionType | FetchCardPolicyVendorOptionsActionType | FetchCardProfilesActionType | FetchCashbackDetailActionType | FetchChargeCardConfigActionType | FetchChargeCardDetailActionType | FetchChargeCardDetailPageActionType | FetchChargeCardListActionType | FetchChargeCardListPageActionType | FetchChargeCardPaymentHistoryActionType | FetchChargeCardPaymentPageActionType | FetchChargeCardRepaymentDetailActionType | FetchChargeCardSetupViewActionType | FetchChargeCardsRecurringExpensesActionType | FetchChargeCardStatementListActionType | FetchChargeCardTransactionAttachmentsActionType | FetchChargeCardTransactionListActionType | FetchChargeCardTransactionStatisticsActionType | FetchChatHistoryActionType | FetchChatSessionsForUserActionType | FetchClassListActionType | FetchCockpitContextActionType | FetchCollaborationAuthTokenActionType | FetchCompanyBillingAddressActionType | FetchCompanyConfigActionType | FetchCompanyHealthMetricConfigViewEpicActionType | FetchCompanyHealthMetricViewEpicActionType | FetchCompanyManagementActionType | FetchCompanyMetaDataActionType | FetchCompanyMonthEndReportHistoricDataActionType | FetchCompanyMonthEndReportHistoricDatesActionType | FetchCompanyMonthEndReportTemplatesActionType | FetchCompanyMonthEndReportViewActionType | FetchCompanyOnboardingViewActionType | FetchCompanyPassportViewActionType | FetchCompanyPortfolioActionType | FetchCompanyTaskManagerViewActionType | FetchCompletedTransactionsActionType | FetchCreateInvoiceFormPageActionType | FetchCreditAccountActionType | FetchCreditAccountRepaymentActionType | FetchCreditAgentMacroActionType | FetchCurrencyConversionValueActionType | FetchDashboardActionType | FetchDashboardLayoutActionType | FetchDebitCardSummaryActionType | FetchDepositAccountActionType | FetchDepositAccountDetailActionType | FetchDepositAccountLimitActionType | FetchDepositAccountListActionType | FetchDepositAccountListForCardsActionType | FetchDepositAccStatementListActionType | FetchDownloadSchedulesActionType | FetchDuplicateBillActionType | FetchDuplicateReimbursementEpicActionType | FetchEditBillDetailPageActionType | FetchEditRemiDetailPageActionType | FetchEligibleActionsForBillActionType | FetchEntityAutoCompleteActionType | FetchEntityHistoryActionType | FetchEntityRecommendationsByTransactionIdActionType | FetchEntityRecommendationsForLineUpdateActionType | FetchExcludedResourcesActionType | FetchExpenseAutomationActualMatchingActionType | FetchExpenseAutomationActualMatchingMatchActionType | FetchExpenseAutomationActualMatchingPageActionType | FetchExpenseAutomationFluxAnalysisActionType | FetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataActionType | FetchExpenseAutomationJEScheduleActionType | FetchExpenseAutomationJESchedulePageActionType | FetchExpenseAutomationMarkTransactionAsNotMiscategorizedActionType | FetchExpenseAutomationMissingReceiptsActionType | FetchExpenseAutomationReconciliationsViewActionType | FetchExpenseAutomationSaveTransactionCategorizationActionType | FetchExpenseAutomationTransactionCategorizationActionType | FetchExpenseAutomationTransactionCategorizationViewActionType | FetchExpenseAutomationUpdateTransactionCategorizationEpicActionType | FetchExpenseTrendActionType | FetchExternalConnectionsActionType | FetchFileActionType | FetchFileListActionType | FetchForecastListActionType | FetchGlobalMerchantAutoCompleteActionType | FetchGlobalMerchantRecommendationActionType | FetchIncomeTrendActionType | FetchInternationalWireDynamicFormActionType | FetchIntlVerificationFormActionType | FetchInvoiceCountsActionType | FetchInvoiceDetailActionType | FetchInvoiceKPIsActionType | FetchInvoiceListActionType | FetchInvoiceListPageActionType | FetchIssueCardPageActionType | FetchMagicLinkBankNameByRoutingActionType | FetchMagicLinkBankNameBySwiftActionType | FetchMagicLinkBillActionType | FetchMagicLinkTenantActionType | FetchManagementActionType | FetchMerchantListActionType | FetchMonthClosePerformanceTrendActionType | FetchMonthEndCloseChecksActionType | FetchMoreBatchDetailsActionType | FetchMultipleBatchDetailsActionType | FetchMyProfileActionType | FetchMyProfileViewActionType | FetchNetBurnOrIncomeStoryCardActionType | FetchNetBurnOrIncomeWithForecastActionType | FetchNotificationSettingsActionType | FetchNotificationSettingsViewActionType | FetchNotificationUnreadCountActionType | FetchNotificationViewActionType | FetchOnboardingActionType | FetchOnboardingCompletedCompaniesActionType | FetchOnboardingCustomerSetupViewActionType | FetchOnboardingCustomerViewActionType | FetchOneTimeAccrualActionType | FetchOpExWithForecastActionType | FetchOwnerListActionType | FetchParentSubsidiaryManagementActionType | FetchPaymentAccountBalanceActionType | FetchPaymentAccountListActionType | FetchPaymentSourcesActionType | FetchPortfolioActionType | FetchPortfolioAllocationActionType | FetchPreviousBillsActionType | FetchProjectListActionType | FetchQBOConnectionPoolActionType | FetchRecommendationByEntityIdActionType | FetchRecommendationByEntityNameActionType | FetchRecommendationsAndUpdateMerchantRecommendationsActionType | FetchRecommendationsAndUpdateVendorRecommendationsActionType | FetchRecommendedBillExpenseActionType | FetchReferralsActionType | FetchRegisteredInterestsActionType | FetchReimbursementCardActionType | FetchReimbursementConfigActionType | FetchRemiAndInitializeLocalStoreActionType | FetchRemiApproversDetailsActionType | FetchRemiApproversListActionType | FetchRemiDetailActionType | FetchRemiListActionType | FetchRemiListPerTabActionType | FetchRemiSetupApproverViewActionType | FetchRemiSetupViewActionType | FetchRevenueWithForecastActionType | FetchReviewCompanyActionType | FetchReviewTransferDetailActionType | FetchRewardsPlanActionType | FetchScheduleAccruedDetailsActionType | FetchScheduleAccruedDetailsPageActionType | FetchScheduleDetailsActionType | FetchScheduleDetailsPageActionType | FetchScheduleListActionType | FetchSchedulesListActionType | FetchSkillsActionType | FetchSubscriptionActionType | FetchSubscriptionAddOnsActionType | FetchSubscriptionCouponsActionType | FetchSubscriptionCreateEstimateActionType | FetchSubscriptionDetailsActionType | FetchSubscriptionListActionType | FetchSubscriptionPlansActionType | FetchSubscriptionSummaryForTenantActionType | FetchSubscriptionUpdateEstimateActionType | FetchSubTasksActionType | FetchSuggestedQuestionsActionType | FetchTaskDetailActionType | FetchTaskDetailPageActionType | FetchTaskGroupTemplatesActionType | FetchTaskHistoryActionType | FetchTaskListActionType | FetchTaskListPageActionType | FetchTaskManagerMetricsActionType | FetchTasksCardActionType | FetchTransactionActivityLogActionType | FetchTransactionDetailActionType | FetchTransactionListByAccountActionType | FetchTransactionListByClassActionType | FetchTransactionListByEntityActionType | FetchTransactionListByProjectActionType | FetchTransactionsForEntityActionType | FetchTransactionsListByCategoryTypeActionType | FetchTransferAccountsActionType | FetchTreasuryDetailActionType | FetchTreasuryFundsActionType | FetchTreasuryHistoryActionType | FetchTreasurySetupViewActionType | FetchTreasuryStatementListActionType | FetchTreasuryTaxLetterListActionType | FetchTreasuryTransactionListActionType | FetchTrendForEntityActionType | FetchUserDetailActionType | FetchUserFinancialAccountActionType | FetchUserListByTypeActionType | FetchUserRoleConfigActionType | FetchVendor1099TypeListActionType | FetchVendorActionType | FetchVendorAndUpdateBillLocalDataActionType | FetchVendorByNameAndParseInvoiceActionType | FetchVendorDetailsActionType | FetchVendorFirstReviewAttachmentsActionType | FetchVendorFirstReviewViewActionType | FetchVendorGlobalReviewViewActionType | FetchVendorsActionType | FetchVendorsFiling1099ActionType | FetchVendorsFiling1099AllActionType | FetchVendorsFiling1099DownloadActionType | FetchVendorTabViewActionType | FetchVendorTypeListActionType | FetchZeniAccountListPageActionType | FetchZeniAccountsConfigActionType | FetchZeniAccountSetupViewActionType | FetchZeniAccStatePageActionType | FetchZeniUsersActionType | GetOnboardingEmailGroupActionType | GetOnboardingPlaidLinkTokenActionType | GetPaymentAccountsActionType | GetPlaidLinkTokenActionType | IgnoreExpenseAutomationJEScheduleActionType | ImproveUsingZeniGPTActionType | IncludeAccountInReconciliationActionType | InitialiseExpenseAutomationLocalDataForSelectedAccountIdActionType | InitializeAccountMappingViewActionType | InitializeAccountSettingsViewEpicActionType | InitializeBillPaySetupApproverViewUpdateDataActionType | InitializeBillToLocalStoreActionType | InitializeCardUserOnboardingLocalDataActionType | InitializeCompanyHealthMetricViewLocalDataEpicActionType | InitializeEditPersonActionType | InitializeExpenseAutomationJeScheduleLocalDataActionType | InitializeInternationalWireLocalDataActionType | InitializeIntlVerificationFormEpicActionType | InitializeMyProfileLocalDataActionType | InitializeNewScheduleActionType | InitializeOnboardingCustomerViewUpdateDataActionType | InitializeRemiSetupApproverViewUpdateDataActionType | InitializeRemiToLocalStoreActionType | InitializeScheduleAccruedDetailLocalDataActionType | InitializeScheduleDetailLocalDataActionType | InitializeSubscriptionLocalDataActionType | InitializeTaskToLocalStoreActionType | InitializeTransactionDetailLocalDataActionType | InitializeVendorAddressActionType | InitiateChargeCardRepaymentActionType | InitiateReportsClassViewRefetchingActionType | InitiateReportsProjectViewRefetchingActionType | InsightsCardActionType | InvitePeopleActionType | InviteZeniPeopleActionType | InvoiceDetailPageActionType | InvoicingAuditViewActionType | InvoicingCatalogItemDetailFetchActionType | InvoicingCatalogItemDetailPageActionType | InvoicingCatalogItemFormDraftSeedActionType | InvoicingCatalogListViewActionType | InvoicingCatalogPlanActionActionType | InvoicingCatalogProductActionActionType | InvoicingConfigViewActionType | InvoicingCouponDetailFetchActionType | InvoicingCouponDetailPageActionType | InvoicingCouponFormDraftSeedActionType | InvoicingCouponViewActionType | InvoicingCreditNoteDetailViewActionType | InvoicingCreditNoteListViewActionType | InvoicingCustomerDetailPageActionType | InvoicingCustomerFormDraftSeedActionType | InvoicingCustomerListViewActionType | InvoicingCustomerPaymentMethodActionType | InvoicingCustomerRecordViewActionType | InvoicingDataImportViewActionType | InvoicingDiscountActionActionType | InvoicingDunningActionActionType | InvoicingDunningCaseDetailPageActionType | InvoicingDunningCaseDetailViewActionType | InvoicingDunningCaseListViewActionType | InvoicingInvoiceActionActionType | InvoicingOverviewActionType | InvoicingPaymentActionActionType | InvoicingPaymentLinkEmailPreviewActionType | InvoicingPaymentLinkEmailPreviewPageActionType | InvoicingPromotionalCreditActionActionType | InvoicingQboViewActionType | InvoicingSettingsViewActionType | InvoicingSubscriptionActionActionType | InvoicingSubscriptionDetailFetchActionType | InvoicingSubscriptionDetailPageActionType | InvoicingSubscriptionFormDraftSeedActionType | InvoicingSubscriptionFormPageActionType | InvoicingSubscriptionListViewActionType | InvoicingTransactionDetailViewActionType | InvoicingTransactionListViewActionType | IssueChargeCardActionType | LockChargeCardActionType | LockChargeCardsActionType | MarkAsCompleteScheduleDetailActionType | MarkTransactionAsNotMiscategorizedActionType | MatchAndReverseAccrualsActionType | NetBurnOrIncomeActionType | NetBurnOrIncomeClassesViewActionType | NetBurnOrIncomeForTimeframeActionType | NetBurnOrIncomeForTimeframeClassesViewActionType | NetBurnOrIncomeForTimeframeProjectViewActionType | NetBurnOrIncomeProjectViewActionType | NotifyMeForFeatureActionType | OneTimeAccrualActionsActionType | OpExActionType | OpExByVendorReportActionType | OpExByVendorReportForTimeframeActionType | OpExByVendorReportSummaryActionType | OpExClassesViewActionType | OpExForTimeframeClassesViewActionType | OpExForTimeframeProjectViewActionType | OpExForTimeframeViewActionType | OpExProjectViewActionType | ParallelFetchAccountTransactionListActionType | ParallelFetchClassTransactionListActionType | ParallelFetchEntityTransactionListActionType | ParallelFetchProjectTransactionListActionType | ParallelFetchTransactionListByCategoryTypeActionType | ParseCombinedStatementActionType | ParseInvoiceToBillActionType | ParseReceiptsToRemiActionType | ParseStatementActionType | ParseUploadedKybDocumentActionType | ParseUploadedKycDocumentActionType | PeopleActionType | PeoplePageActionType | PeopleSaveUpdatesActionType | PolicyDocumentExtractionToRecommendationBridgeActionType | PolicyRecommendationFromUploadActionType | PrefetchOtherJeSchedulesTabActionType | ProfitAndLossActionType | ProfitAndLossClassesViewActionType | ProfitAndLossForTimeframeActionType | ProfitAndLossForTimeframeClassesViewActionType | ProfitAndLossForTimeframeProjectViewActionType | ProfitAndLossProjectViewActionType | PushToastNotificationActionType | RecommendationForAccountSettingsActionType | RecommendationForAccountTypeActionType | RecordPaymentActionType | RefetchCompletedTransactionsOnBulkUploadSortActionType | RefreshBatchDetailsForBatchIdActionType | RefreshExpenseAutomationCurrentTabActionType | RefreshIntegrationsDataActionType | RefreshOpExByVendorReportActionType | RejectVendorGlobalReviewActionType | ReorderBillPayApprovalRulesActionType | ReorderRemiApprovalRulesActionType | ReparseStatementActionType | ReportsResyncActionType | ResendCardInviteActionType | ResendInviteActionType | ResendOtpActionType | ResendReferralInviteActionType | ResendVerifyDeviceOTPActionType | ResetTransactionVendorLocalDataActionType | ResetVendorDetailLocalDataActionType | RestoreAutomatchingActionType | ResumeEnableAccountingProjectsActionType | RetryBankAccountConnectionActionType | RetryBankAccountConnectionForOnboardingActionType | RetryExpenseAutomationJEScheduleActionType | RetryOrRefundBillActionType | RevenueActionType | RevenueClassesViewActionType | RevenueForTimeframeClassesViewActionType | RevenueForTimeframeProjectViewActionType | RevenueForTimeframeViewActionType | RevenueProjectViewActionType | RevertJeScheduleActionType | ReviewDraftRemisBulkActionActionTye | ReviewExpenseAutomationFluxAnalysisActionType | RevokeCardInviteActionType | RevokeChargeCardsInviteActionType | SaveAccountMappingViewActionType | SaveAccountSettingsViewEpicActionType | SaveAddressActionType | SaveBillDetailActionType | SaveBillPaySetupApproverViewUpdatesActionType | SaveCannedResponseActionType | saveCardOnboardingUserDetailsActionType | SaveCompanyBillingAddressActionType | SaveCompanyHealthMetricByIdEpicActionType | SaveCompanyMonthEndReportActionType | SaveCompanyPassportDetailsActionType | SaveCreditAgentMacroActionType | SaveExpenseAutomationReconciliationDetailActionType | SaveExternalConnectionActionType | SaveMagicLinkBankAccountActionType | SaveNewScheduleActionType | SaveNotificationPreferencesActionType | SaveNotificationSettingsEpicActionType | SaveOnboardingCustomerCompletedStatusActionType | SaveOnboardingCustomerNotesActionType | SaveOnboardingCustomerViewUpdatesActionType | SaveRealTimeApprovalActionType | SaveReasonForAuditRuleActionType | SaveReconciliationReviewActionType | SaveRemiDetailActionType | SaveRemiSetupApproverViewUpdatesActionType | SaveScheduleAccruedDetailsActionType | SaveScheduleDetailsActionType | SaveSubscriptionNotesUpdatesActionType | SaveSubscriptionUpdatesActionType | SaveTaskDetailActionType | SaveTranactionVendorActionType | SaveTransactionDetailActionType | SaveVendorActionType | SaveVendorDetailsViewActionType | SaveVendorFirstReviewViewActionType | ScheduleTenantCreditScoreCronActionType | SearchMatchAccrualsActionType | SearchMatchTransactionsActionType | SearchTransactionsForManualMatchActionType | SearchTransactionsForNewScheduleActionType | SeedAiCardCreationFormDraftActionType | SeedAiCardPolicyFormDraftActionType | SendCompanyMonthEndReportActionType | SendEmailMagicLinkToUserActionType | SendOnboardingCustomerViewInviteActionType | SendOtpActionType | SendReferralInviteActionType | SessionHeartbeatActionType | SignInActionType | SignOutActionType | SnoozeTaskActionType | StatementCloseDayActionType | StopSubmitActionType | StopSubmitQuestionActionType | SubmitDraftBillsBulkActionActionType | SubmitDraftRemisBulkActionActionType | SubmitExpressPayActionType | SubmitFeedbackActionType | SubmitIntlVerificationActionType | SubmitQuestionActionType | SubmitRecommendationFeedbackActionType | SwitchExpenseAutomationJESchedulesTabActionType | SyncInvoicingSubscriptionCouponsActionType | SyncTabsAfterAutomatchActionType | ToggleReportUIOptionForecastModeActionType | TopExActionType | TransferMoneyActionType | TreasuryTransferMoneyActionType | TriggerAiAccountantJobActionType | TriggerReviewTabRefetchActionType | UndoReversalAccrualsActionType | UnlinkPaymentAccountActionType | UnlockChargeCardActionType | UnlockChargeCardsActionType | UnsnoozeTaskActionType | UpdateAccountingClassesEnabledActionType | UpdateAccruedJESchedulesActionType | UpdateAddressActionType | UpdateAmountsInScheduleAccruedDetailActionType | UpdateAmountsInScheduleDetailActionType | UpdateAutoTransferRuleActionType | UpdateBusinessVerificationDetailsActionType | UpdateCapitalizationAccountThresholdActionType | UpdateCardPolicyActionType | UpdateCardProfileActionType | UpdateChargeCardDetailActionType | UpdateChargeCardLimitActionType | UpdateChargeCardNameActionType | UpdateChargeCardsLimitActionType | UpdateCombinedStatementInfoActionType | UpdateCompanyDetailsActionType | UpdateCompanyOfficerActionType | UpdateCompanyPassportLocalStoreDataActionType | UpdateCompanyProductServicesActionType | UpdateCompanyQboRealmIdActionType | UpdateCompanyTaskManagerViewFiltersActionType | UpdateDashboardLayoutActionType | UpdateDebitCardPinAttemptActionType | UpdateDepositAccountActionType | UpdateDynamicFormActionType | UpdateExpenseAutomationReconciliationBalanceLocalDataActionType | UpdateFileNameActionType | UpdateFilesMetadataActionType | UpdateJESchedulesActionType | UpdateMappedCashAccountActionType | UpdateMileageDetailsActionType | UpdateMyProfileActionType | UpdateNetBurnOrIncomeStoryCardSettingsActionType | UpdateNotificationViewAllNotificationsStatusActionType | UpdateNotificationViewNotificationStatusActionType | UpdateOnboardingCustomerViewActionType | UpdateOnboardingCustomerViewCompleteStatusActionType | UpdateOnboardingCustomerViewDashboardLoadedActionType | UpdateOnboardingCustomerViewLocalStoreDataActionType | UpdateOnboardingPaymentAccountLoginStatusActionType | UpdateOnboardingPaymentAccountStatusActionType | UpdatePaymentAccountActionType | UpdatePaymentAccountLoginStatusActionType | UpdatePaymentAccountStatusActionType | UpdatePhysicalChargeCardAttemptActionType | UpdatePortfolioAllocationActionType | UpdatePrimaryContactActionType | UpdatePrimaryFundingAccountActionType | UpdateQBOConnectionPoolExternalConnectionActionType | UpdateReferViewedActionType | UpdateRemiSetupViewLocalStoreDataActionType | UpdateReportUIOptionCOABalancesRangeActionType | UpdateReportUIOptionIsCompareModeActionType | UpdateReportUIOptionIsCompareModeOnActionType | UpdateReportUIOptionThisPeriodActionType | UpdateReportUIOptionTimeFrameActionType | UpdateSectionAccountsViewActionType | UpdateSectionClassesViewV2ActionType | UpdateSectionProjectViewActionType | UpdateSelectedVendorForCreateFlowActionType | UpdateSetupViewLocalStoreDataActionType | UpdateStatementInfoActionType | UpdateTaskFromListViewActionType | UpdateTaskGroupNameActionType | UpdateTransactionDetailActionType | UpdateTransactionOnUploadSuccessActionType | UpdateVendorContactActionType | UploadAccountStatementActionType | UploadMissingReceiptSuccessEpicActionType | UploadTransactionReceiptSuccessEpicActionType | ValidateBillsBulkActionActionType | VendorFiling1099UploadDetailsSaveActionType | VendorsTabFetchVendorActionType | VendorsTabFetchVendorDetailPageViewActionType | VendorsTabFetchVendorDetailsActionType | VendorsTabResetVendorDetailLocalDataActionType | VendorsTabSaveVendorActionType | VerifyDeviceWithTwoFAActionType | VerifyOtpActionType | VerifyUserActionType | WatchBulkUploadBatchStatusActionType | WiseRedirectActionType;
|
|
704
|
+
export type RootActionType = AcceptBillPayTermsActionType | AcceptBillPayUpdatedTermsActionType | AcceptChargeCardTermsActionType | AcceptEmployeeRemiTermsActionType | AcceptMasterTOSEpicActionType | AcceptRemiTermsActionType | AcceptTreasuryTermsActionType | AcceptZeniAccountTermsActionType | AcknowledgeOnboardingAiActivationViewedActionType | AcknowledgeOnboardingAiFinanceTeamActionType | AddCardPaymentSourceActionType | ApplyBillRecommendationsToLocalStoreActionType | ApplyExtractedPolicyToDraftActionType | ApproveOAuthConsentActionType | ApproveOrRejectBillActionType | ApproveOrRejectBillsBulkActionActionType | ApproveOrRejectRemiActionType | ApproveOrRejectRemisBulkActionActionType | ApproveVendorGlobalReviewActionType | ArchiveCardPolicyActionType | ArchiveTaskActionType | BackgroundRefetchReviewTabActionType | BalanceSheetActionType | BalanceSheetClassesViewActionType | BalanceSheetForTimeframeActionType | BalanceSheetForTimeframeClassesViewActionType | BalanceSheetForTimeframeProjectViewActionType | BalanceSheetProjectViewActionType | BulkUpdateTasksListActionType | BulkUploadMatchResultToastActionType | BulkUploadReceiptsActionType | CancelAiAccountantOnboardingActionType | CancelAndDeleteBillActionType | CancelAndDeleteRemiActionType | CancelOrDeleteBillsBulkActionActionType | CancelOrDeleteRemisBulkActionActionType | CancelScheduleAccruedJournalEntryActionType | CardBalanceActionType | CashBalanceActionType | CashFlowActionType | CashFlowClassesViewActionType | CashFlowForTimeframeActionType | CashFlowForTimeframeClassesViewActionType | CashFlowForTimeframeProjectViewActionType | CashFlowProjectViewActionType | CashInCashOutActionType | CashPositionActionType | ChangeZeniPersonRolesActionType | CheckDepositActionType | CloseChargeCardActionType | CloseChargeCardsActionType | CombinedStatementActionType | CompanyManagementSavePendingUpdatesActionType | CompanyManagementSaveUpdatesActionType | ConfirmBulkUploadMatchActionType | ConfirmCardSetupIntentActionType | ConfirmStatementMappingActionType | CreateAddressActionType | CreateAutoTransferRuleActionType | CreateBankAccountActionType | CreateCardPolicyTemplateActionType | CreateCardSetupIntentActionType | CreateCheckingAccountActionType | CreateCompanyAddressActionType | CreateCompanyOfficersActionType | CreateCompanyUserAddressActionType | CreateGlobalMerchantActionType | CreateInternationalBankAccountActionType | CreateInvoiceActionType | CreateNewSchedulesAccruedActionType | CreateNewSchedulesActionType | CreateNewTaskGroupActionType | CreateOneTimeAccrualActionType | CreatePaymentInstrumentActionType | CreateSessionActionType | CreateSessionAndSubmitActionType | CreateSubTaskActionType | CreateTagActionType | CreateTaskFromTaskGroupTemplateActionType | CreateTransferEntryActionType | CreateUserBankAccountActionType | CurrencyConversionActionType | DeleteAccountStatementActionType | DeleteAutoTransferRuleActionType | DeleteBankAccountActionType | DeleteBillActionType | DeleteBillPayApprovalRuleActionType | DeleteCannedResponseActionType | DeleteChatSessionActionType | DeleteCombinedStatementActionType | DeleteFileActionType | DeleteFileListActionType | DeleteInternationalBankAccountActionType | DeletePaymentInstrumentActionType | DeletePersonActionType | DeleteRemiActionType | DeleteRemiApprovalRuleActionType | DeleteScheduleAccruedDetailActionType | DeleteScheduleDetailActionType | DeleteTagActionType | DeleteTaskActionType | DeleteTaskGroupActionType | DeleteTransactionAttachmentActionType | DeleteUserBankAccountActionType | DepositAccountTransactionListActionType | DisableAccountingProjectsActionType | DismissCapitalizationOnboardingActionType | DoMagicLinkSignInActionType | DownloadAccountingProviderAttachmentActionType | DragNDropTasksActionType | EditInvoicingCatalogItemDetailViewActionType | EditInvoicingCouponDetailViewActionType | EditInvoicingCustomerDetailViewActionType | EditInvoicingSubscriptionDetailViewActionType | EnableAccountingProjectsActionType | EnableChargeCardAutoPayActionType | EnableSetupActionType | EstablishOnboardingPlaidConnectionActionType | EstablishPlaidConnectionActionType | ExcludeAccountFromReconciliationActionType | ExpressInterestChargeCardActionType | ExpressPayActionType | ExtractPolicyDocumentActionType | FetchAccountHistoryActionType | FetchAccountListActionType | FetchAccountListForAccountTypesActionType | FetchAccountSettingsListForAccountTypesActionType | FetchAccruedScheduleListActionType | FetchActiveTenantActionType | FetchAddressActionType | FetchAggregatedReportActionType | FetchAiAccountantCustomersActionType | FetchAiAccountantJobsActionType | FetchAiAgentsActivationStatusActionType | FetchAllCockpitViewsActionType | FetchAllExpenseAutomationTabsActionType | FetchAllPeopleRequiredActionType | FetchAllTagsActionType | FetchAllTaskGroupsActionType | FetchAllTenantsActionType | FetchApAgingActionType | FetchApAgingDetailActionType | FetchArAgingActionType | FetchArAgingDetailActionType | FetchAuditReportGroupViewActionType | FetchAuditRuleGroupViewActionType | FetchAutoTransferReviewDetailActionType | FetchAutoTransferRuleHistoryActionType | FetchAutoTransferRulesActionType | FetchBankAccountsListActionType | FetchBankConnectionsViewActionType | FetchBankCountryNameByIbanActionType | FetchBankNameByRoutingActionType | FetchBankNameBySwiftActionType | FetchBillAndInitializeLocalStoreActionType | FetchBillDetailActionType | FetchBillingAccountsListActionType | FetchBillListActionType | FetchBillListPerTabActionType | FetchBillPayApproversDetailsActionType | FetchBillPayApproversListActionType | FetchBillPayCardActionType | FetchBillPayConfigActionType | FetchBillPaySetupApproverViewActionType | FetchBillPaySetupViewActionType | FetchBillRecommendationsActionType | FetchBulkUploadBatchDetailsActionType | FetchBulkUploadBatchesActionType | FetchCannedResponsesActionType | FetchCardPolicyDetailActionType | FetchCardPolicyListActionType | FetchCardPolicyMccCategoriesActionType | FetchCardPolicyVendorOptionsActionType | FetchCardProfilesActionType | FetchCashbackDetailActionType | FetchChargeCardConfigActionType | FetchChargeCardDetailActionType | FetchChargeCardDetailPageActionType | FetchChargeCardListActionType | FetchChargeCardListPageActionType | FetchChargeCardPaymentHistoryActionType | FetchChargeCardPaymentPageActionType | FetchChargeCardRepaymentDetailActionType | FetchChargeCardSetupViewActionType | FetchChargeCardsRecurringExpensesActionType | FetchChargeCardStatementListActionType | FetchChargeCardTransactionAttachmentsActionType | FetchChargeCardTransactionListActionType | FetchChargeCardTransactionStatisticsActionType | FetchChatHistoryActionType | FetchChatSessionsForUserActionType | FetchClassListActionType | FetchCockpitContextActionType | FetchCollaborationAuthTokenActionType | FetchCompanyBillingAddressActionType | FetchCompanyConfigActionType | FetchCompanyHealthMetricConfigViewEpicActionType | FetchCompanyHealthMetricViewEpicActionType | FetchCompanyManagementActionType | FetchCompanyMetaDataActionType | FetchCompanyMonthEndReportHistoricDataActionType | FetchCompanyMonthEndReportHistoricDatesActionType | FetchCompanyMonthEndReportTemplatesActionType | FetchCompanyMonthEndReportViewActionType | FetchCompanyOnboardingViewActionType | FetchCompanyPassportViewActionType | FetchCompanyPortfolioActionType | FetchCompanyTaskManagerViewActionType | FetchCompletedTransactionsActionType | FetchCreateInvoiceFormPageActionType | FetchCreditAccountActionType | FetchCreditAccountRepaymentActionType | FetchCreditAgentMacroActionType | FetchCurrencyConversionValueActionType | FetchDashboardActionType | FetchDashboardLayoutActionType | FetchDebitCardSummaryActionType | FetchDepositAccountActionType | FetchDepositAccountDetailActionType | FetchDepositAccountLimitActionType | FetchDepositAccountListActionType | FetchDepositAccountListForCardsActionType | FetchDepositAccStatementListActionType | FetchDownloadSchedulesActionType | FetchDuplicateBillActionType | FetchDuplicateReimbursementEpicActionType | FetchEditBillDetailPageActionType | FetchEditRemiDetailPageActionType | FetchEligibleActionsForBillActionType | FetchEntityAutoCompleteActionType | FetchEntityHistoryActionType | FetchEntityRecommendationsByTransactionIdActionType | FetchEntityRecommendationsForLineUpdateActionType | FetchExcludedResourcesActionType | FetchExpenseAutomationActualMatchingActionType | FetchExpenseAutomationActualMatchingMatchActionType | FetchExpenseAutomationActualMatchingPageActionType | FetchExpenseAutomationFluxAnalysisActionType | FetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataActionType | FetchExpenseAutomationJEScheduleActionType | FetchExpenseAutomationJESchedulePageActionType | FetchExpenseAutomationMarkTransactionAsNotMiscategorizedActionType | FetchExpenseAutomationMissingReceiptsActionType | FetchExpenseAutomationReconciliationsViewActionType | FetchExpenseAutomationSaveTransactionCategorizationActionType | FetchExpenseAutomationTransactionCategorizationActionType | FetchExpenseAutomationTransactionCategorizationViewActionType | FetchExpenseAutomationUpdateTransactionCategorizationEpicActionType | FetchExpenseTrendActionType | FetchExternalConnectionsActionType | FetchFileActionType | FetchFileListActionType | FetchForecastListActionType | FetchGlobalMerchantAutoCompleteActionType | FetchGlobalMerchantRecommendationActionType | FetchIncomeTrendActionType | FetchInternationalWireDynamicFormActionType | FetchIntlVerificationFormActionType | FetchInvoiceCountsActionType | FetchInvoiceDetailActionType | FetchInvoiceKPIsActionType | FetchInvoiceListActionType | FetchInvoiceListPageActionType | FetchIssueCardPageActionType | FetchMagicLinkBankNameByRoutingActionType | FetchMagicLinkBankNameBySwiftActionType | FetchMagicLinkBillActionType | FetchMagicLinkTenantActionType | FetchManagementActionType | FetchMerchantListActionType | FetchMonthClosePerformanceTrendActionType | FetchMonthEndCloseChecksActionType | FetchMoreBatchDetailsActionType | FetchMultipleBatchDetailsActionType | FetchMyProfileActionType | FetchMyProfileViewActionType | FetchNetBurnOrIncomeStoryCardActionType | FetchNetBurnOrIncomeWithForecastActionType | FetchNotificationSettingsActionType | FetchNotificationSettingsViewActionType | FetchNotificationUnreadCountActionType | FetchNotificationViewActionType | FetchOnboardingActionType | FetchOnboardingCompletedCompaniesActionType | FetchOnboardingCustomerSetupViewActionType | FetchOnboardingCustomerViewActionType | FetchOneTimeAccrualActionType | FetchOpExWithForecastActionType | FetchOwnerListActionType | FetchParentSubsidiaryManagementActionType | FetchPaymentAccountBalanceActionType | FetchPaymentAccountListActionType | FetchPaymentSourcesActionType | FetchPortfolioActionType | FetchPortfolioAllocationActionType | FetchPreviousBillsActionType | FetchProjectListActionType | FetchQBOConnectionPoolActionType | FetchRecommendationByEntityIdActionType | FetchRecommendationByEntityNameActionType | FetchRecommendationsAndUpdateMerchantRecommendationsActionType | FetchRecommendationsAndUpdateVendorRecommendationsActionType | FetchRecommendedBillExpenseActionType | FetchReferralsActionType | FetchRegisteredInterestsActionType | FetchReimbursementCardActionType | FetchReimbursementConfigActionType | FetchRemiAndInitializeLocalStoreActionType | FetchRemiApproversDetailsActionType | FetchRemiApproversListActionType | FetchRemiDetailActionType | FetchRemiListActionType | FetchRemiListPerTabActionType | FetchRemiSetupApproverViewActionType | FetchRemiSetupViewActionType | FetchRevenueWithForecastActionType | FetchReviewCompanyActionType | FetchReviewTransferDetailActionType | FetchRewardsPlanActionType | FetchScheduleAccruedDetailsActionType | FetchScheduleAccruedDetailsPageActionType | FetchScheduleDetailsActionType | FetchScheduleDetailsPageActionType | FetchScheduleListActionType | FetchSchedulesListActionType | FetchSkillsActionType | FetchSubscriptionActionType | FetchSubscriptionAddOnsActionType | FetchSubscriptionCouponsActionType | FetchSubscriptionCreateEstimateActionType | FetchSubscriptionDetailsActionType | FetchSubscriptionListActionType | FetchSubscriptionPlansActionType | FetchSubscriptionSummaryForTenantActionType | FetchSubscriptionUpdateEstimateActionType | FetchSubTasksActionType | FetchSuggestedQuestionsActionType | FetchTaskDetailActionType | FetchTaskDetailPageActionType | FetchTaskGroupTemplatesActionType | FetchTaskHistoryActionType | FetchTaskListActionType | FetchTaskListPageActionType | FetchTaskManagerMetricsActionType | FetchTasksCardActionType | FetchTransactionActivityLogActionType | FetchTransactionDetailActionType | FetchTransactionListByAccountActionType | FetchTransactionListByClassActionType | FetchTransactionListByEntityActionType | FetchTransactionListByProjectActionType | FetchTransactionsForEntityActionType | FetchTransactionsListByCategoryTypeActionType | FetchTransferAccountsActionType | FetchTreasuryDetailActionType | FetchTreasuryFundsActionType | FetchTreasuryHistoryActionType | FetchTreasurySetupViewActionType | FetchTreasuryStatementListActionType | FetchTreasuryTaxLetterListActionType | FetchTreasuryTransactionListActionType | FetchTrendForEntityActionType | FetchUserDetailActionType | FetchUserFinancialAccountActionType | FetchUserListByTypeActionType | FetchUserRoleConfigActionType | FetchVendor1099TypeListActionType | FetchVendorActionType | FetchVendorAndUpdateBillLocalDataActionType | FetchVendorByNameAndParseInvoiceActionType | FetchVendorDetailsActionType | FetchVendorFirstReviewAttachmentsActionType | FetchVendorFirstReviewViewActionType | FetchVendorGlobalReviewViewActionType | FetchVendorsActionType | FetchVendorsFiling1099ActionType | FetchVendorsFiling1099AllActionType | FetchVendorsFiling1099DownloadActionType | FetchVendorTabViewActionType | FetchVendorTypeListActionType | FetchZeniAccountListPageActionType | FetchZeniAccountsConfigActionType | FetchZeniAccountSetupViewActionType | FetchZeniAccStatePageActionType | FetchZeniUsersActionType | GetOnboardingEmailGroupActionType | GetOnboardingPlaidLinkTokenActionType | GetPaymentAccountsActionType | GetPlaidLinkTokenActionType | IgnoreExpenseAutomationJEScheduleActionType | ImproveUsingZeniGPTActionType | IncludeAccountInReconciliationActionType | InitialiseExpenseAutomationLocalDataForSelectedAccountIdActionType | InitializeAccountMappingViewActionType | InitializeAccountSettingsViewEpicActionType | InitializeBillPaySetupApproverViewUpdateDataActionType | InitializeBillToLocalStoreActionType | InitializeCardUserOnboardingLocalDataActionType | InitializeCompanyHealthMetricViewLocalDataEpicActionType | InitializeEditPersonActionType | InitializeExpenseAutomationJeScheduleLocalDataActionType | InitializeInternationalWireLocalDataActionType | InitializeIntlVerificationFormEpicActionType | InitializeMyProfileLocalDataActionType | InitializeNewScheduleActionType | InitializeOnboardingCustomerViewUpdateDataActionType | InitializeRemiSetupApproverViewUpdateDataActionType | InitializeRemiToLocalStoreActionType | InitializeScheduleAccruedDetailLocalDataActionType | InitializeScheduleDetailLocalDataActionType | InitializeSubscriptionLocalDataActionType | InitializeTaskToLocalStoreActionType | InitializeTransactionDetailLocalDataActionType | InitializeVendorAddressActionType | InitiateChargeCardRepaymentActionType | InitiateReportsClassViewRefetchingActionType | InitiateReportsProjectViewRefetchingActionType | InsightsCardActionType | InvitePeopleActionType | InviteZeniPeopleActionType | InvoiceDetailPageActionType | InvoicingAuditViewActionType | InvoicingCatalogItemDetailFetchActionType | InvoicingCatalogItemDetailPageActionType | InvoicingCatalogItemFormDraftSeedActionType | InvoicingCatalogListViewActionType | InvoicingCatalogPlanActionActionType | InvoicingCatalogProductActionActionType | InvoicingConfigViewActionType | InvoicingCouponDetailFetchActionType | InvoicingCouponDetailPageActionType | InvoicingCouponFormDraftSeedActionType | InvoicingCouponViewActionType | InvoicingCreditNoteDetailViewActionType | InvoicingCreditNoteListViewActionType | InvoicingCustomerDetailPageActionType | InvoicingCustomerFormDraftSeedActionType | InvoicingCustomerListViewActionType | InvoicingCustomerPaymentMethodActionType | InvoicingCustomerRecordViewActionType | InvoicingDataImportViewActionType | InvoicingDiscountActionActionType | InvoicingDunningActionActionType | InvoicingDunningCaseDetailPageActionType | InvoicingDunningCaseDetailViewActionType | InvoicingDunningCaseListViewActionType | InvoicingInvoiceActionActionType | InvoicingOverviewActionType | InvoicingPaymentActionActionType | InvoicingPaymentLinkEmailPreviewActionType | InvoicingPaymentLinkEmailPreviewPageActionType | InvoicingPromotionalCreditActionActionType | InvoicingQboViewActionType | InvoicingSettingsViewActionType | InvoicingSubscriptionActionActionType | InvoicingSubscriptionDetailFetchActionType | InvoicingSubscriptionDetailPageActionType | InvoicingSubscriptionFormDraftSeedActionType | InvoicingSubscriptionFormPageActionType | InvoicingSubscriptionListViewActionType | InvoicingTransactionDetailViewActionType | InvoicingTransactionListViewActionType | IssueChargeCardActionType | LockChargeCardActionType | LockChargeCardsActionType | MarkAsCompleteScheduleDetailActionType | MarkTransactionAsNotMiscategorizedActionType | MatchAndReverseAccrualsActionType | NetBurnOrIncomeActionType | NetBurnOrIncomeClassesViewActionType | NetBurnOrIncomeForTimeframeActionType | NetBurnOrIncomeForTimeframeClassesViewActionType | NetBurnOrIncomeForTimeframeProjectViewActionType | NetBurnOrIncomeProjectViewActionType | NotifyMeForFeatureActionType | OneTimeAccrualActionsActionType | OpExActionType | OpExByVendorReportActionType | OpExByVendorReportForTimeframeActionType | OpExByVendorReportSummaryActionType | OpExClassesViewActionType | OpExForTimeframeClassesViewActionType | OpExForTimeframeProjectViewActionType | OpExForTimeframeViewActionType | OpExProjectViewActionType | ParallelFetchAccountTransactionListActionType | ParallelFetchClassTransactionListActionType | ParallelFetchEntityTransactionListActionType | ParallelFetchProjectTransactionListActionType | ParallelFetchTransactionListByCategoryTypeActionType | ParseCombinedStatementActionType | ParseInvoiceToBillActionType | ParseReceiptsToRemiActionType | ParseStatementActionType | ParseUploadedKybDocumentActionType | ParseUploadedKycDocumentActionType | PeopleActionType | PeoplePageActionType | PeopleSaveUpdatesActionType | PolicyDocumentExtractionToRecommendationBridgeActionType | PolicyRecommendationFromUploadActionType | PrefetchOtherJeSchedulesTabActionType | ProfitAndLossActionType | ProfitAndLossClassesViewActionType | ProfitAndLossForTimeframeActionType | ProfitAndLossForTimeframeClassesViewActionType | ProfitAndLossForTimeframeProjectViewActionType | ProfitAndLossProjectViewActionType | PushToastNotificationActionType | RecommendationForAccountSettingsActionType | RecommendationForAccountTypeActionType | RecordPaymentActionType | RefetchCompletedTransactionsOnBulkUploadSortActionType | RefreshBatchDetailsForBatchIdActionType | RefreshExpenseAutomationCurrentTabActionType | RefreshIntegrationsDataActionType | RefreshOpExByVendorReportActionType | RejectVendorGlobalReviewActionType | ReorderBillPayApprovalRulesActionType | ReorderRemiApprovalRulesActionType | ReparseStatementActionType | ReportsResyncActionType | ResendCardInviteActionType | ResendInviteActionType | ResendOtpActionType | ResendReferralInviteActionType | ResendVerifyDeviceOTPActionType | ResetTransactionVendorLocalDataActionType | ResetVendorDetailLocalDataActionType | RestoreAutomatchingActionType | ResumeEnableAccountingProjectsActionType | RetryBankAccountConnectionActionType | RetryBankAccountConnectionForOnboardingActionType | RetryExpenseAutomationJEScheduleActionType | RetryOrRefundBillActionType | RevenueActionType | RevenueClassesViewActionType | RevenueForTimeframeClassesViewActionType | RevenueForTimeframeProjectViewActionType | RevenueForTimeframeViewActionType | RevenueProjectViewActionType | RevertJeScheduleActionType | ReviewDraftRemisBulkActionActionTye | ReviewExpenseAutomationFluxAnalysisActionType | RevokeCardInviteActionType | RevokeChargeCardsInviteActionType | SaveAccountMappingViewActionType | SaveAccountSettingsViewEpicActionType | SaveAddressActionType | SaveBillDetailActionType | SaveBillPaySetupApproverViewUpdatesActionType | SaveCannedResponseActionType | saveCardOnboardingUserDetailsActionType | SaveCompanyBillingAddressActionType | SaveCompanyHealthMetricByIdEpicActionType | SaveCompanyMonthEndReportActionType | SaveCompanyPassportDetailsActionType | SaveCreditAgentMacroActionType | SaveExpenseAutomationReconciliationDetailActionType | SaveExternalConnectionActionType | SaveMagicLinkBankAccountActionType | SaveNewScheduleActionType | SaveNotificationPreferencesActionType | SaveNotificationSettingsEpicActionType | SaveOnboardingCustomerCompletedStatusActionType | SaveOnboardingCustomerNotesActionType | SaveOnboardingCustomerViewUpdatesActionType | SaveRealTimeApprovalActionType | SaveReasonForAuditRuleActionType | SaveReconciliationReviewActionType | SaveRemiDetailActionType | SaveRemiSetupApproverViewUpdatesActionType | SaveScheduleAccruedDetailsActionType | SaveScheduleDetailsActionType | SaveSubscriptionNotesUpdatesActionType | SaveSubscriptionUpdatesActionType | SaveTaskDetailActionType | SaveTranactionVendorActionType | SaveTransactionDetailActionType | SaveVendorActionType | SaveVendorDetailsViewActionType | SaveVendorFirstReviewViewActionType | ScheduleTenantCreditScoreCronActionType | SearchMatchAccrualsActionType | SearchMatchTransactionsActionType | SearchTransactionsForManualMatchActionType | SearchTransactionsForNewScheduleActionType | SeedAiCardCreationFormDraftActionType | SeedAiCardPolicyFormDraftActionType | SendCompanyMonthEndReportActionType | SendEmailMagicLinkToUserActionType | SendOnboardingCustomerViewInviteActionType | SendOtpActionType | SendReferralInviteActionType | SessionHeartbeatActionType | SignInActionType | SignOutActionType | SnoozeTaskActionType | StatementCloseDayActionType | StopSubmitActionType | StopSubmitQuestionActionType | SubmitDraftBillsBulkActionActionType | SubmitDraftRemisBulkActionActionType | SubmitExpressPayActionType | SubmitFeedbackActionType | SubmitIntlVerificationActionType | SubmitQuestionActionType | SubmitRecommendationFeedbackActionType | SwitchExpenseAutomationJESchedulesTabActionType | SyncInvoicingSubscriptionCouponsActionType | SyncTabsAfterAutomatchActionType | ToggleReportUIOptionForecastModeActionType | TopExActionType | TransferMoneyActionType | TreasuryTransferMoneyActionType | TriggerAiAccountantJobActionType | TriggerReviewTabRefetchActionType | UndoReversalAccrualsActionType | UnlinkPaymentAccountActionType | UnlockChargeCardActionType | UnlockChargeCardsActionType | UnsnoozeTaskActionType | UpdateAccountingClassesEnabledActionType | UpdateAccruedJESchedulesActionType | UpdateAddressActionType | UpdateAmountsInScheduleAccruedDetailActionType | UpdateAmountsInScheduleDetailActionType | UpdateAutoTransferRuleActionType | UpdateBusinessVerificationDetailsActionType | UpdateCapitalizationAccountThresholdActionType | UpdateCardPolicyActionType | UpdateCardProfileActionType | UpdateChargeCardDetailActionType | UpdateChargeCardLimitActionType | UpdateChargeCardNameActionType | UpdateChargeCardsLimitActionType | UpdateCombinedStatementInfoActionType | UpdateCompanyDetailsActionType | UpdateCompanyOfficerActionType | UpdateCompanyPassportLocalStoreDataActionType | UpdateCompanyProductServicesActionType | UpdateCompanyQboRealmIdActionType | UpdateCompanyTaskManagerViewFiltersActionType | UpdateDashboardLayoutActionType | UpdateDebitCardPinAttemptActionType | UpdateDepositAccountActionType | UpdateDynamicFormActionType | UpdateExpenseAutomationReconciliationBalanceLocalDataActionType | UpdateFileNameActionType | UpdateFilesMetadataActionType | UpdateJESchedulesActionType | UpdateMappedCashAccountActionType | UpdateMileageDetailsActionType | UpdateMyProfileActionType | UpdateNetBurnOrIncomeStoryCardSettingsActionType | UpdateNotificationViewAllNotificationsStatusActionType | UpdateNotificationViewNotificationStatusActionType | UpdateOnboardingCustomerViewActionType | UpdateOnboardingCustomerViewCompleteStatusActionType | UpdateOnboardingCustomerViewDashboardLoadedActionType | UpdateOnboardingCustomerViewLocalStoreDataActionType | UpdateOnboardingPaymentAccountLoginStatusActionType | UpdateOnboardingPaymentAccountStatusActionType | UpdatePaymentAccountActionType | UpdatePaymentAccountLoginStatusActionType | UpdatePaymentAccountStatusActionType | UpdatePhysicalChargeCardAttemptActionType | UpdatePortfolioAllocationActionType | UpdatePrimaryContactActionType | UpdatePrimaryFundingAccountActionType | UpdateQBOConnectionPoolExternalConnectionActionType | UpdateReferViewedActionType | UpdateRemiSetupViewLocalStoreDataActionType | UpdateReportUIOptionCOABalancesRangeActionType | UpdateReportUIOptionIsCompareModeActionType | UpdateReportUIOptionIsCompareModeOnActionType | UpdateReportUIOptionThisPeriodActionType | UpdateReportUIOptionTimeFrameActionType | UpdateSectionAccountsViewActionType | UpdateSectionClassesViewV2ActionType | UpdateSectionProjectViewActionType | UpdateSelectedVendorForCreateFlowActionType | UpdateSetupViewLocalStoreDataActionType | UpdateStatementInfoActionType | UpdateTaskFromListViewActionType | UpdateTaskGroupNameActionType | UpdateTransactionDetailActionType | UpdateTransactionOnUploadSuccessActionType | UpdateVendorContactActionType | UploadAccountStatementActionType | UploadMissingReceiptSuccessEpicActionType | UploadTransactionReceiptSuccessEpicActionType | ValidateBillsBulkActionActionType | VendorFiling1099UploadDetailsSaveActionType | VendorsTabFetchVendorActionType | VendorsTabFetchVendorDetailPageViewActionType | VendorsTabFetchVendorDetailsActionType | VendorsTabResetVendorDetailLocalDataActionType | VendorsTabSaveVendorActionType | VerifyDeviceWithTwoFAActionType | VerifyOtpActionType | VerifyUserActionType | WatchBulkUploadBatchStatusActionType | WiseRedirectActionType;
|
|
703
705
|
export declare const featureRootEpic: Epic<RootActionType>;
|
package/lib/epic.js
CHANGED
|
@@ -510,6 +510,7 @@ const approveOrRejectBillEpic_1 = require("./view/spendManagement/billPay/billDe
|
|
|
510
510
|
const cancelAndDeleteBillEpic_1 = require("./view/spendManagement/billPay/billDetailView/epics/cancelAndDeleteBillEpic");
|
|
511
511
|
const deleteBillEpic_1 = require("./view/spendManagement/billPay/billDetailView/epics/deleteBillEpic");
|
|
512
512
|
const fetchBillDetailEpic_1 = require("./view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic");
|
|
513
|
+
const fetchBillRecommendationsEpic_1 = require("./view/spendManagement/billPay/billDetailView/epics/fetchBillRecommendationsEpic");
|
|
513
514
|
const fetchEligibleActionsForBillEpic_1 = require("./view/spendManagement/billPay/billDetailView/epics/fetchEligibleActionsForBillEpic");
|
|
514
515
|
const retryOrRefundBillEpic_1 = require("./view/spendManagement/billPay/billDetailView/epics/retryOrRefundBillEpic");
|
|
515
516
|
const fetchBillListEpic_1 = require("./view/spendManagement/billPay/billList/fetchBillListEpic");
|
|
@@ -531,6 +532,7 @@ const cancelOrDeleteBillsBulkActionEpic_1 = require("./view/spendManagement/bill
|
|
|
531
532
|
const submitDraftBillsBulkActionEpic_1 = require("./view/spendManagement/billPay/billsBulkActionView/epics/submitDraftBillsBulkActionEpic");
|
|
532
533
|
const validateBillsBulkActionEpic_ts_1 = require("./view/spendManagement/billPay/billsBulkActionView/epics/validateBillsBulkActionEpic.ts");
|
|
533
534
|
const convertAmountToHomeCurrencyEpic_1 = require("./view/spendManagement/billPay/editBillView/epics/convertAmountToHomeCurrencyEpic");
|
|
535
|
+
const applyBillRecommendationsToLocalStoreEpic_1 = require("./view/spendManagement/billPay/editBillView/epics/applyBillRecommendationsToLocalStoreEpic");
|
|
534
536
|
const fetchBillAndInitializeLocalStoreEpic_1 = require("./view/spendManagement/billPay/editBillView/epics/fetchBillAndInitializeLocalStoreEpic");
|
|
535
537
|
const fetchEditBillDetailPageEpic_1 = require("./view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic");
|
|
536
538
|
const fetchVendorAndUpdateBillLocalDataEpic_1 = require("./view/spendManagement/billPay/editBillView/epics/fetchVendorAndUpdateBillLocalDataEpic");
|
|
@@ -785,6 +787,7 @@ const ALL_EPICS = [
|
|
|
785
787
|
acknowledgeOnboardingAiFinanceTeamEpic_1.acknowledgeOnboardingAiFinanceTeamEpic,
|
|
786
788
|
addCardPaymentSourceEpic_1.addCardPaymentSourceEpic,
|
|
787
789
|
addPromotionalCreditsEpic_1.addPromotionalCreditsEpic,
|
|
790
|
+
applyBillRecommendationsToLocalStoreEpic_1.applyBillRecommendationsToLocalStoreEpic,
|
|
788
791
|
applyExtractedPolicyToDraftEpic_1.applyExtractedPolicyToDraftEpic,
|
|
789
792
|
approveOAuthConsentEpic_1.approveOAuthConsentEpic,
|
|
790
793
|
approveOrRejectBillEpic_1.approveOrRejectBillEpic,
|
|
@@ -932,6 +935,7 @@ const ALL_EPICS = [
|
|
|
932
935
|
fetchBillPayConfigEpic_1.fetchBillPayConfigEpic,
|
|
933
936
|
fetchBillPaySetupApproverViewEpic_1.fetchBillPaySetupApproverViewEpic,
|
|
934
937
|
fetchBillPaySetupViewEpic_1.fetchBillPaySetupViewEpic,
|
|
938
|
+
fetchBillRecommendationsEpic_1.fetchBillRecommendationsEpic,
|
|
935
939
|
fetchBulkUploadBatchDetailsEpic_1.fetchBulkUploadBatchDetailsEpic,
|
|
936
940
|
fetchBulkUploadBatchesEpic_1.fetchBulkUploadBatchesEpic,
|
|
937
941
|
fetchCannedResponsesEpic_1.fetchCannedResponsesEpic,
|
|
@@ -23,6 +23,21 @@ const billTransaction = createSlice({
|
|
|
23
23
|
doUpdateBillTransactionWithBulkActionStatus(draft.transactionById, transactionPayload.entity_id, transactionPayload);
|
|
24
24
|
});
|
|
25
25
|
},
|
|
26
|
+
// Separate from `updateBillTransaction` because that mapper only derives
|
|
27
|
+
// `recommendations` from a transaction payload; the bill detail response
|
|
28
|
+
// carries none when recommendation composition is skipped.
|
|
29
|
+
updateBillTransactionRecommendations: {
|
|
30
|
+
reducer(draft, action) {
|
|
31
|
+
const { billId, recommendations } = action.payload;
|
|
32
|
+
const transaction = draft.transactionById[billId];
|
|
33
|
+
if (transaction != null) {
|
|
34
|
+
transaction.recommendations = recommendations;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
prepare(billId, recommendations) {
|
|
38
|
+
return { payload: { billId, recommendations } };
|
|
39
|
+
},
|
|
40
|
+
},
|
|
26
41
|
removeBillTransaction(draft, action) {
|
|
27
42
|
delete draft.transactionById[action.payload];
|
|
28
43
|
},
|
|
@@ -33,7 +48,7 @@ const billTransaction = createSlice({
|
|
|
33
48
|
});
|
|
34
49
|
},
|
|
35
50
|
});
|
|
36
|
-
export const { updateBillTransactions, updateBillTransaction, updateBillTransactionsWithBulkActionStatus, removeBillTransaction, } = billTransaction.actions;
|
|
51
|
+
export const { updateBillTransactions, updateBillTransaction, updateBillTransactionRecommendations, updateBillTransactionsWithBulkActionStatus, removeBillTransaction, } = billTransaction.actions;
|
|
37
52
|
export default billTransaction.reducer;
|
|
38
53
|
/**
|
|
39
54
|
* Helper functions
|
package/lib/esm/epic.js
CHANGED
|
@@ -507,6 +507,7 @@ import { approveOrRejectBillEpic, } from './view/spendManagement/billPay/billDet
|
|
|
507
507
|
import { cancelAndDeleteBillEpic, } from './view/spendManagement/billPay/billDetailView/epics/cancelAndDeleteBillEpic';
|
|
508
508
|
import { deleteBillEpic, } from './view/spendManagement/billPay/billDetailView/epics/deleteBillEpic';
|
|
509
509
|
import { fetchBillDetailEpic, waitForVendorByNameThenUpdateBillDetailEpic, } from './view/spendManagement/billPay/billDetailView/epics/fetchBillDetailEpic';
|
|
510
|
+
import { fetchBillRecommendationsEpic, } from './view/spendManagement/billPay/billDetailView/epics/fetchBillRecommendationsEpic';
|
|
510
511
|
import { fetchEligibleActionsForBillEpic, } from './view/spendManagement/billPay/billDetailView/epics/fetchEligibleActionsForBillEpic';
|
|
511
512
|
import { retryOrRefundBillEpic, } from './view/spendManagement/billPay/billDetailView/epics/retryOrRefundBillEpic';
|
|
512
513
|
import { fetchBillListEpic, } from './view/spendManagement/billPay/billList/fetchBillListEpic';
|
|
@@ -528,6 +529,7 @@ import { cancelOrDeleteBillsBulkActionEpic, } from './view/spendManagement/billP
|
|
|
528
529
|
import { submitDraftBillsBulkActionEpic, } from './view/spendManagement/billPay/billsBulkActionView/epics/submitDraftBillsBulkActionEpic';
|
|
529
530
|
import { validateBillsBulkActionEpic, } from './view/spendManagement/billPay/billsBulkActionView/epics/validateBillsBulkActionEpic.ts';
|
|
530
531
|
import { convertAmountToHomeCurrencyEpic, } from './view/spendManagement/billPay/editBillView/epics/convertAmountToHomeCurrencyEpic';
|
|
532
|
+
import { applyBillRecommendationsToLocalStoreEpic, } from './view/spendManagement/billPay/editBillView/epics/applyBillRecommendationsToLocalStoreEpic';
|
|
531
533
|
import { fetchBillAndInitializeLocalStoreEpic, waitForBillDetailThenInitializeLocalStoreEpic, } from './view/spendManagement/billPay/editBillView/epics/fetchBillAndInitializeLocalStoreEpic';
|
|
532
534
|
import { fetchEditBillDetailPageEpic, } from './view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic';
|
|
533
535
|
import { fetchVendorAndUpdateBillLocalDataEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, } from './view/spendManagement/billPay/editBillView/epics/fetchVendorAndUpdateBillLocalDataEpic';
|
|
@@ -782,6 +784,7 @@ const ALL_EPICS = [
|
|
|
782
784
|
acknowledgeOnboardingAiFinanceTeamEpic,
|
|
783
785
|
addCardPaymentSourceEpic,
|
|
784
786
|
addPromotionalCreditsEpic,
|
|
787
|
+
applyBillRecommendationsToLocalStoreEpic,
|
|
785
788
|
applyExtractedPolicyToDraftEpic,
|
|
786
789
|
approveOAuthConsentEpic,
|
|
787
790
|
approveOrRejectBillEpic,
|
|
@@ -929,6 +932,7 @@ const ALL_EPICS = [
|
|
|
929
932
|
fetchBillPayConfigEpic,
|
|
930
933
|
fetchBillPaySetupApproverViewEpic,
|
|
931
934
|
fetchBillPaySetupViewEpic,
|
|
935
|
+
fetchBillRecommendationsEpic,
|
|
932
936
|
fetchBulkUploadBatchDetailsEpic,
|
|
933
937
|
fetchBulkUploadBatchesEpic,
|
|
934
938
|
fetchCannedResponsesEpic,
|
package/lib/esm/index.js
CHANGED
|
@@ -303,7 +303,7 @@ import { isAccountingTabVisible, isApprovalRulesTabVisible, isBankConnectionsTab
|
|
|
303
303
|
import { clearSettingsView, fetchBankConnectionsView, fetchBillingAccountsView, fetchCompanyBillingAddress, fetchMyProfile, fetchMyProfileView, fetchNotificationSettings, fetchNotificationSettingsView, initializeMyProfileLocalData, refreshQBOData, resetNotificationSettingsLocalData, resetNotificationSettingsUpdateStatus, saveCompanyBillingAddress, saveNotificationSettings, updateMyProfile, updateMyProfileLocalData, updateNotificationSettingsLocalData, updateSettingsViewUIState, } from './view/settingsView/settingsViewReducer';
|
|
304
304
|
import { getApprovalRuleViewDetails, getBankConnectionsSetupViewDetails, getBillingAccountsViewDetails, getIntegrationsView, getMyBankConnectionsDetails, getMyProfileView, getNotificationSettings, getNotificationSettingsView, } from './view/settingsView/settingsViewSelector';
|
|
305
305
|
import { NOTIFICATION_MODES, REMINDER_NOTIFICATION_TYPES, } from './view/settingsView/settingsViewState';
|
|
306
|
-
import { approveOrRejectBill, cancelAndDeleteBill, deleteBill, fetchBillDetail, retryOrRefundBill, updateApprovalStatusOnSuccess, } from './view/spendManagement/billPay/billDetailView/billDetailViewReducer';
|
|
306
|
+
import { approveOrRejectBill, cancelAndDeleteBill, deleteBill, fetchBillDetail, fetchBillRecommendations, retryOrRefundBill, updateApprovalStatusOnSuccess, } from './view/spendManagement/billPay/billDetailView/billDetailViewReducer';
|
|
307
307
|
import { checkApproveRejectBtnShow as checkApproveRejectBtnShowForBill, checkShowMarkAsPaidButton, getBillDetailView, } from './view/spendManagement/billPay/billDetailView/billDetailViewSelector';
|
|
308
308
|
import { getBillTransactionDetailKey, } from './view/spendManagement/billPay/billDetailView/billDetailViewState';
|
|
309
309
|
import { getBillDownloadList, } from './view/spendManagement/billPay/billList/billListDownloadSelector';
|
|
@@ -606,7 +606,7 @@ export { updateW9FormUploadFetchState, updateW9FormUploadFile, getVendorUploadDe
|
|
|
606
606
|
export { toOutsideZeniPaymentModeType, checkShowMarkAsPaidButton, };
|
|
607
607
|
export { toRemiSubTabType, toRemiSubTabTypeStrict, toRemiTabType, toRemiTabTypeStrict, toReimbursementTypeCode, getRemiList, getRemiDownloadList, fetchRemiList, fetchRemiListPerTab, updateRemiListTab, updateRemiListSubTab, updateRemiDetailSaveRemiCode, updateRemiListUIState, updateRemiListSearchResult, updateBillListFilterResult, updateRemiListFilterResult, REIMBURSEMENT_FILTER_CATEGORIES, REIMBURSEMENT_FILTER_CATEGORIES_RESTRICTED, updateRemiListDownloadUIState, updateBillListDownloadUIState, updateBillsBulkActionList, removeBillFromBulkActionList, clearAllBillsFromBulkActionList, getBillsBulkReviewView, validateBillsBulkAction, approveOrRejectBillsBulkAction, cancelOrDeleteBillsBulkAction, submitDraftBillsBulkAction, autoReviewPendingApprovalBills, incrementBulkActionProcessedCount, getBillsBulkOperationProgress, clearBillPayBulkActionView, isBillConditionallyValid, getRemisBulkReviewView, getRemisBulkOperationProgress, updateRemisBulkActionList, removeRemiFromBulkActionList, clearAllRemisFromBulkActionList, reviewDraftRemisBulkAction, approveOrRejectRemisBulkAction, cancelOrDeleteRemisBulkAction, submitDraftRemisBulkAction, autoReviewPendingApprovalRemis, clearRemiBulkActionView, incrementRemiBulkActionProcessedCount, updateOutsideZeniPaymentLocalData, discardOutsideZeniPaymentLocalData, checkIfCreatorIsApprover, };
|
|
608
608
|
export { getClassList, fetchClassList, getProjectList, fetchProjectList, };
|
|
609
|
-
export { fetchBillList, fetchBillListPerTab, updateTab, updateSubTab, updateSelectedBillId, updateBillDetailSaveBillCode, fetchVendorByNameAndParseInvoice, saveBillUpdatesToLocalStore, discardBillUpdatesInLocalStore, saveBillDetail, approveOrRejectBill, updateApprovalStatusOnSuccess, deleteBill, cancelAndDeleteBill, retryOrRefundBill, getBillList, getBillDownloadList, getBillDetailView, checkApproveRejectBtnShowForBill, getBillTransactionDetailKey, fetchBillDetail, fetchEditBillDetailPage, fetchAndUpdateVendorRecommendations, fetchDuplicateBill, clearBillPayReview, getEditBillDetail, getReviewPageBillDetail, fetchBillAndInitializeLocalStore, updateShowAutofill, saveVendorSuccessOrFailure, updateBillListUIState, BILL_PAY_FILTER_CATEGORIES, updateVendorDetailLocalData, resetVendorDetailLocalData, resetVendorSaveStatus, updateContactsInVendorDetailLocalData, updateVendorTabDetailUIState, updateContactsInVendorTabDetailLocalData, updateBillUploadFetchState, updateBillListSearchResult, fetchUserDetails, verifyUser, updateVendorContact, toPaymentToOption, convertAmountToHomeCurrency, fetchVendorAndUpdateBillLocalData, markBillForRetry, updateWithdrawFromAccountId, removeBillFileFromLocalStore, replaceBillFileInLocalStore, updateShouldReplaceBillData, };
|
|
609
|
+
export { fetchBillList, fetchBillListPerTab, updateTab, updateSubTab, updateSelectedBillId, updateBillDetailSaveBillCode, fetchVendorByNameAndParseInvoice, saveBillUpdatesToLocalStore, discardBillUpdatesInLocalStore, saveBillDetail, approveOrRejectBill, updateApprovalStatusOnSuccess, deleteBill, cancelAndDeleteBill, retryOrRefundBill, getBillList, getBillDownloadList, getBillDetailView, checkApproveRejectBtnShowForBill, getBillTransactionDetailKey, fetchBillDetail, fetchBillRecommendations, fetchEditBillDetailPage, fetchAndUpdateVendorRecommendations, fetchDuplicateBill, clearBillPayReview, getEditBillDetail, getReviewPageBillDetail, fetchBillAndInitializeLocalStore, updateShowAutofill, saveVendorSuccessOrFailure, updateBillListUIState, BILL_PAY_FILTER_CATEGORIES, updateVendorDetailLocalData, resetVendorDetailLocalData, resetVendorSaveStatus, updateContactsInVendorDetailLocalData, updateVendorTabDetailUIState, updateContactsInVendorTabDetailLocalData, updateBillUploadFetchState, updateBillListSearchResult, fetchUserDetails, verifyUser, updateVendorContact, toPaymentToOption, convertAmountToHomeCurrency, fetchVendorAndUpdateBillLocalData, markBillForRetry, updateWithdrawFromAccountId, removeBillFileFromLocalStore, replaceBillFileInLocalStore, updateShouldReplaceBillData, };
|
|
610
610
|
export { hideCreatedByFilter, };
|
|
611
611
|
// Transaction Categorization filter API — lives under Expense Automation,
|
|
612
612
|
// not Spend Management. Kept in a separate re-export block to make the
|
|
@@ -18,6 +18,12 @@ const billDetailView = createSlice({
|
|
|
18
18
|
detail.fetchState !== 'In-Progress') {
|
|
19
19
|
draft.billDetailById[key] = {
|
|
20
20
|
...initialBillDetailView,
|
|
21
|
+
// Deliberately independent of the detail fetch: recommendations
|
|
22
|
+
// are requested separately and must not be reset by a detail
|
|
23
|
+
// refresh, which on the edit route lands right after the
|
|
24
|
+
// recommendations request has already started.
|
|
25
|
+
recommendationsFetchStatus: detail?.recommendationsFetchStatus ??
|
|
26
|
+
initialBillDetailView.recommendationsFetchStatus,
|
|
21
27
|
};
|
|
22
28
|
}
|
|
23
29
|
},
|
|
@@ -69,6 +75,86 @@ const billDetailView = createSlice({
|
|
|
69
75
|
};
|
|
70
76
|
},
|
|
71
77
|
},
|
|
78
|
+
fetchBillRecommendations: {
|
|
79
|
+
reducer(draft, action) {
|
|
80
|
+
const key = getBillTransactionDetailKey(action.payload.billId);
|
|
81
|
+
// The edit route can mount before the bill detail entry exists — its
|
|
82
|
+
// screen dispatches this before the parent requests the detail. Seed
|
|
83
|
+
// the entry rather than bailing, or the status would sit at
|
|
84
|
+
// `Not-Started` for the whole wait and round trip.
|
|
85
|
+
const detail = recordGet(draft.billDetailById, key, undefined) ?? {
|
|
86
|
+
...initialBillDetailView,
|
|
87
|
+
billId: action.payload.billId,
|
|
88
|
+
};
|
|
89
|
+
const { fetchState } = detail.recommendationsFetchStatus;
|
|
90
|
+
// Both screens dispatch once per bill — on mount, keyed by bill id,
|
|
91
|
+
// not on every render — so this guard is not what prevents a render
|
|
92
|
+
// loop; the epic's per-bill `exhaustMap` is what collapses the two
|
|
93
|
+
// sites' dispatches into one request.
|
|
94
|
+
//
|
|
95
|
+
// `Error` is deliberately allowed through: a bill whose fetch failed
|
|
96
|
+
// must be able to try again when the screen is next opened.
|
|
97
|
+
if (action.payload.cacheOverride === true ||
|
|
98
|
+
(fetchState !== 'In-Progress' && fetchState !== 'Completed')) {
|
|
99
|
+
draft.billDetailById[key] = {
|
|
100
|
+
...detail,
|
|
101
|
+
recommendationsFetchStatus: {
|
|
102
|
+
fetchState: 'In-Progress',
|
|
103
|
+
error: undefined,
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
prepare(billId, cacheOverride = false) {
|
|
109
|
+
return {
|
|
110
|
+
payload: { billId, cacheOverride },
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
fetchBillRecommendationsSuccess: {
|
|
115
|
+
reducer(draft, action) {
|
|
116
|
+
const key = getBillTransactionDetailKey(action.payload.billId);
|
|
117
|
+
const detail = recordGet(draft.billDetailById, key, undefined);
|
|
118
|
+
if (detail != null) {
|
|
119
|
+
draft.billDetailById[key] = {
|
|
120
|
+
...detail,
|
|
121
|
+
recommendationsFetchStatus: {
|
|
122
|
+
fetchState: 'Completed',
|
|
123
|
+
error: undefined,
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
// `didWriteRecommendations` is false on the skip paths, which resolve
|
|
129
|
+
// the status without fetching anything. Consumers that react by
|
|
130
|
+
// recomputing local state must not run then — there is nothing new to
|
|
131
|
+
// apply, and recomputing would reset the line's "update to" selections.
|
|
132
|
+
prepare(billId, didWriteRecommendations = false) {
|
|
133
|
+
return {
|
|
134
|
+
payload: { billId, didWriteRecommendations },
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
fetchBillRecommendationsFailure: {
|
|
139
|
+
reducer(draft, action) {
|
|
140
|
+
const key = getBillTransactionDetailKey(action.payload.billId);
|
|
141
|
+
const detail = recordGet(draft.billDetailById, key, undefined);
|
|
142
|
+
if (detail != null) {
|
|
143
|
+
draft.billDetailById[key] = {
|
|
144
|
+
...detail,
|
|
145
|
+
recommendationsFetchStatus: {
|
|
146
|
+
fetchState: 'Error',
|
|
147
|
+
error: action.payload.error,
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
prepare(billId, error) {
|
|
153
|
+
return {
|
|
154
|
+
payload: { billId, error },
|
|
155
|
+
};
|
|
156
|
+
},
|
|
157
|
+
},
|
|
72
158
|
deleteBill: {
|
|
73
159
|
reducer(draft, action) {
|
|
74
160
|
const key = getBillTransactionDetailKey(action.payload.billId);
|
|
@@ -462,5 +548,5 @@ const billDetailView = createSlice({
|
|
|
462
548
|
});
|
|
463
549
|
},
|
|
464
550
|
});
|
|
465
|
-
export const { fetchBillDetail, updateBillDetail, updateBillDetailFetchState, removeBillDetail, deleteBill, deleteBillSuccessOrFailure, approveOrRejectBill, approveOrRejectBillSuccess, approveOrRejectBillFailure, updateApprovalStatusOnSuccess, cancelAndDeleteBill, cancelAndDeleteBillSuccessOrFailure, waitForVendorByNameThenUpdateBillDetail, fetchEligibleActionsForBill, updateEligibleActionsForBill, updateFetchEligibleActionsFailureState, retryOrRefundBill, retryOrRefundBillSuccess, retryOrRefundBillFailure, } = billDetailView.actions;
|
|
551
|
+
export const { fetchBillDetail, fetchBillRecommendations, fetchBillRecommendationsSuccess, fetchBillRecommendationsFailure, updateBillDetail, updateBillDetailFetchState, removeBillDetail, deleteBill, deleteBillSuccessOrFailure, approveOrRejectBill, approveOrRejectBillSuccess, approveOrRejectBillFailure, updateApprovalStatusOnSuccess, cancelAndDeleteBill, cancelAndDeleteBillSuccessOrFailure, waitForVendorByNameThenUpdateBillDetail, fetchEligibleActionsForBill, updateEligibleActionsForBill, updateFetchEligibleActionsFailureState, retryOrRefundBill, retryOrRefundBillSuccess, retryOrRefundBillFailure, } = billDetailView.actions;
|
|
466
552
|
export default billDetailView.reducer;
|
|
@@ -219,6 +219,7 @@ export const getBillDetailView = (state, billId) => {
|
|
|
219
219
|
fetchState: fetchState.fetchState,
|
|
220
220
|
error: fetchState.error,
|
|
221
221
|
version: 0,
|
|
222
|
+
recommendationsFetchStatus: billTransactionDetails?.recommendationsFetchStatus,
|
|
222
223
|
transactionDetails: transaction,
|
|
223
224
|
createdBy,
|
|
224
225
|
bankAccount,
|
package/lib/esm/view/spendManagement/billPay/billDetailView/epics/fetchBillRecommendationsEpic.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import recordGet from 'lodash/get';
|
|
2
|
+
import { of } from 'rxjs';
|
|
3
|
+
import { exhaustMap, filter, groupBy, mergeMap, take } from 'rxjs/operators';
|
|
4
|
+
import { createZeniAPIStatus } from '../../../../../responsePayload';
|
|
5
|
+
import { fetchBillRecommendations, fetchBillRecommendationsFailure, updateBillDetail, updateBillDetailFetchState, } from '../billDetailViewReducer';
|
|
6
|
+
import { getBillTransactionDetailKey } from '../billDetailViewState';
|
|
7
|
+
import { fetchRecommendationsForBill, getBillTransaction, } from './fetchRecommendationsForBill';
|
|
8
|
+
/**
|
|
9
|
+
* Standalone recommendations fetch for a bill, so neither the bill detail nor
|
|
10
|
+
* the bill edit screen waits on recommendation composition.
|
|
11
|
+
*
|
|
12
|
+
* Which bills need it is decided from the bill's stage: an approval-stage bill
|
|
13
|
+
* gets them from the dedicated endpoint
|
|
14
|
+
* (`GET /1.0/bills/transactions/{transaction_id}/recommendations`), while a
|
|
15
|
+
* draft gets them on the bill detail response itself. The platform makes that
|
|
16
|
+
* split from the bill's status, so neither request carries a flag asking for
|
|
17
|
+
* one behaviour or the other.
|
|
18
|
+
*
|
|
19
|
+
* Only `recommendations` is read — per line, and what drives the "Update to X"
|
|
20
|
+
* checkbox and the Recommended group in the category/class dropdowns. The
|
|
21
|
+
* endpoint returns no entity-level recommendation and the edit form does not
|
|
22
|
+
* render one.
|
|
23
|
+
*
|
|
24
|
+
* Failure is confined to `recommendationsFetchStatus` — no bill-detail action
|
|
25
|
+
* is emitted, so a failed or slow recommendations fetch can neither block nor
|
|
26
|
+
* error out either screen.
|
|
27
|
+
*
|
|
28
|
+
* @precondition Every site dispatching `fetchBillRecommendations` must also
|
|
29
|
+
* cause the bill detail to be requested for that bill. This epic waits for the
|
|
30
|
+
* detail when it is not already in the store, and that wait settles only on a
|
|
31
|
+
* detail write or a detail error. A caller that dispatches without one would
|
|
32
|
+
* leave the wait open, and the per-bill `exhaustMap` would then drop later
|
|
33
|
+
* retries for that bill. Both current callers satisfy this: the bill detail
|
|
34
|
+
* route dispatches `fetchBillDetail` alongside, and the edit route reaches it
|
|
35
|
+
* through `fetchEditBillDetailPage`.
|
|
36
|
+
*/
|
|
37
|
+
export const fetchBillRecommendationsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchBillRecommendations.match),
|
|
38
|
+
// The bill detail route requests these and the edit screen asks again on
|
|
39
|
+
// every mount, so repeats are normal. Drop the ones whose bill is already
|
|
40
|
+
// done before they reach the request.
|
|
41
|
+
filter((action) => action.payload.cacheOverride === true ||
|
|
42
|
+
areRecommendationsAlreadyFetched(state$.value, action.payload.billId) === false),
|
|
43
|
+
// Per bill, then `exhaustMap` rather than `switchMap`: a repeat that
|
|
44
|
+
// arrives while the request (or the wait for the bill detail) is still
|
|
45
|
+
// running is ignored, where `switchMap` would cancel the in-flight one and
|
|
46
|
+
// re-issue it. `groupBy` keeps that per bill, so navigating to another
|
|
47
|
+
// bill mid-flight still fetches for the new one.
|
|
48
|
+
groupBy((action) => action.payload.billId), mergeMap((actionsForBill$) => actionsForBill$.pipe(exhaustMap((action) => {
|
|
49
|
+
const { billId, cacheOverride } = action.payload;
|
|
50
|
+
if (isBillReadyForRecommendations(state$.value, billId)) {
|
|
51
|
+
return fetchRecommendationsForBill(state$.value, billId, zeniAPI, cacheOverride);
|
|
52
|
+
}
|
|
53
|
+
// The edit route can mount before the bill detail response lands,
|
|
54
|
+
// and the request needs the vendor / line ids / amount from it. Wait
|
|
55
|
+
// for the detail write for this bill rather than dropping the fetch,
|
|
56
|
+
// and settle on a detail error too.
|
|
57
|
+
//
|
|
58
|
+
// A leftover `Error` on the bill detail is deliberately NOT treated
|
|
59
|
+
// as terminal here. On the edit route this action is dispatched
|
|
60
|
+
// before the parent screen re-requests the detail — React runs the
|
|
61
|
+
// child's effect first — so failing on the stale error would leave
|
|
62
|
+
// recommendations failed even though the detail is about to succeed.
|
|
63
|
+
//
|
|
64
|
+
// The invariant this relies on: every dispatch site also causes the
|
|
65
|
+
// bill detail to be requested. Both do today. A future site that
|
|
66
|
+
// does not would leave this waiting, and `exhaustMap` would drop
|
|
67
|
+
// later retries for that bill.
|
|
68
|
+
const billDetailSettled$ = actions$.pipe(filter((waited) => {
|
|
69
|
+
if (updateBillDetail.match(waited)) {
|
|
70
|
+
return waited.payload.billId === billId;
|
|
71
|
+
}
|
|
72
|
+
return (updateBillDetailFetchState.match(waited) &&
|
|
73
|
+
waited.payload.fetchState === 'Error' &&
|
|
74
|
+
waited.payload.billId === billId);
|
|
75
|
+
}), take(1) // don't listen forever! IMPORTANT!
|
|
76
|
+
);
|
|
77
|
+
return billDetailSettled$.pipe(mergeMap((waited) => {
|
|
78
|
+
if (updateBillDetail.match(waited)) {
|
|
79
|
+
return fetchRecommendationsForBill(state$.value, billId, zeniAPI, cacheOverride);
|
|
80
|
+
}
|
|
81
|
+
// Bill detail failed; there is nothing to recommend against.
|
|
82
|
+
return of(fetchBillRecommendationsFailure(billId, waited.payload.error ??
|
|
83
|
+
createZeniAPIStatus('Unexpected Error', 'Bill detail fetch failed before recommendations could be requested')));
|
|
84
|
+
}));
|
|
85
|
+
}))));
|
|
86
|
+
/**
|
|
87
|
+
* Helper functions
|
|
88
|
+
*/
|
|
89
|
+
function areRecommendationsAlreadyFetched(state, billId) {
|
|
90
|
+
const billDetail = recordGet(state.billDetailViewState.billDetailById, getBillTransactionDetailKey(billId), undefined);
|
|
91
|
+
return billDetail?.recommendationsFetchStatus.fetchState === 'Completed';
|
|
92
|
+
}
|
|
93
|
+
function isBillReadyForRecommendations(state, billId) {
|
|
94
|
+
const billDetail = recordGet(state.billDetailViewState.billDetailById, getBillTransactionDetailKey(billId), undefined);
|
|
95
|
+
return (billDetail?.fetchState === 'Completed' &&
|
|
96
|
+
getBillTransaction(state, billId) != null);
|
|
97
|
+
}
|