@zeniai/client-epic-state 5.0.95-betaML1 → 5.0.95
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/esm/index.js +2 -2
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +0 -15
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -63
- package/lib/esm/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +3 -12
- package/lib/esm/view/recommendation/recommendationReducer.js +1 -18
- package/lib/esm/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.js +0 -7
- package/lib/esm/view/transactionDetail/transactionDetailReducer.js +3 -44
- package/lib/index.d.ts +2 -2
- package/lib/index.js +16 -17
- package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.d.ts +1 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +0 -15
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +5 -63
- package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.d.ts +2 -2
- package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +1 -10
- package/lib/view/recommendation/recommendationReducer.d.ts +1 -3
- package/lib/view/recommendation/recommendationReducer.js +2 -19
- package/lib/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.d.ts +1 -2
- package/lib/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.js +0 -7
- package/lib/view/transactionDetail/transactionDetailReducer.js +3 -44
- package/package.json +1 -1
- package/lib/esm/view/recommendation/recommendationStaleResponseHelper.js +0 -26
- package/lib/view/recommendation/recommendationStaleResponseHelper.d.ts +0 -7
- package/lib/view/recommendation/recommendationStaleResponseHelper.js +0 -30
package/lib/esm/index.js
CHANGED
|
@@ -238,7 +238,7 @@ import { clearProfitAndLossProjectView, fetchProfitAndLossForTimeframeProjectVie
|
|
|
238
238
|
import { getProfitAndLossProjectView } from './view/profitAndLossProjectView/profitAndLossProjectViewSelector';
|
|
239
239
|
import { fetchProjectList } from './view/projectList/projectListReducer';
|
|
240
240
|
import { getProjectList, } from './view/projectList/projectListSelector';
|
|
241
|
-
import {
|
|
241
|
+
import { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName, } from './view/recommendation/recommendationReducer';
|
|
242
242
|
import { clearReferrals, fetchReferrals, fetchRewardsPlan, resendReferralInvite, saveReferralFormDataInLocalStore, sendReferralInvite, updateReferViewed, updateReferralListSortUiState, } from './view/referralView/referralReducer';
|
|
243
243
|
import { getInviteFormView, getReferralListView, getRewardsPlanCard, } from './view/referralView/referralSelector';
|
|
244
244
|
import { AmountStatusTypes, StatusTypes, toReferralListViewSortKeyType, } from './view/referralView/referralState';
|
|
@@ -594,7 +594,7 @@ export { getSpendManagementEffectiveListPeriod, getSelectedCompanyOfficer, showB
|
|
|
594
594
|
export { canSendMonthEndEmailReport, shouldEnableCalendarPickerForLastReportSent, };
|
|
595
595
|
export { getInternationalSubConfigCodeKey, BILL_NEW_PAYMENT_METHODS, NEW_INTERNATIONAL_METHOD_SUBTEXT, SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT, LOCAL_CURRENCY_INTERNATIONAL_METHOD_SUBTEXT, };
|
|
596
596
|
export { getVendorList, updateSortUiState, updatePageToken, updateYTDSelectionUIState, isColumnYTDSpend, isVendorsTabVisible, toVendorReportIDType, getVendorFiling1099List, fetchVendorsFiling1099Download, };
|
|
597
|
-
export {
|
|
597
|
+
export { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName, };
|
|
598
598
|
export { fetchOwnerList };
|
|
599
599
|
export { getZeniAccountsConfigDetail, getZeniAccountList, fetchZeniAccountList, fetchAccountList, createCheckingAccount, fetchPaymentAccountList, unlinkPaymentAccount, getDepositAccountDetail, getAllDepositAccounts, getDepositAccountDetailForPDF, fetchDepositAccount, fetchZeniAccountsConfig, updateTransferMoneyLocalData, updateTransferToLocalData, updateDepositToLocalData, transferMoney, getTransferDetail, clearTransferDetail, clearReviewTransferDetail, fetchReviewTransferDetail, fetchDepositAccountDetail, depositCheck, updateCheckDepositLocalData, clearCheckDeposit, getCheckDepositDetail, updateDepositAccount, fetchDepositAccountHistorySuccess, fetchDepositAccountHistoryFailure, fetchZeniAccStatementPage, getZeniAccStatements, };
|
|
600
600
|
export { fetchDepositAccountTransactionList, getDepositAccountTransactionList, };
|
|
@@ -3,7 +3,6 @@ import { filter, mergeMap } from 'rxjs/operators';
|
|
|
3
3
|
import { getTransactionWithCOT } from '../../../../entity/transaction/transactionHelper';
|
|
4
4
|
import { getSupportedTransactionsByIds } from '../../../../entity/transaction/transactionSelector';
|
|
5
5
|
import { getUncategorizedAccounts } from '../../../accountList/accountListSelector';
|
|
6
|
-
import { cancelEntityRecommendationsForLineUpdate } from '../../../recommendation/recommendationReducer';
|
|
7
6
|
import { mergeTabSpecificLineItems, toTransactionDetailLocalData, } from '../../helpers/transactionCategorizationLocalDataHelper';
|
|
8
7
|
import { initializeTransactionCategorizationViewLocalData, saveTransactionCategorizationLocalData, } from '../../reducers/transactionsViewReducer';
|
|
9
8
|
import { initialSupportedTransactionCategorization, } from '../../types/transactionsViewState';
|
|
@@ -52,20 +51,6 @@ export const initializeTransactionCategorizationViewLocalDataEpic = (actions$, s
|
|
|
52
51
|
};
|
|
53
52
|
}
|
|
54
53
|
});
|
|
55
|
-
// Cancel any in-flight line-update recommendations fetch for the
|
|
56
|
-
// transactions whose local data is about to be wiped. Only runs
|
|
57
|
-
// for the destructive `keepExistingListItems === false` branch
|
|
58
|
-
// (list-page Cancel footer, modal confirm-reset, and the silent
|
|
59
|
-
// `backgroundRefetchReviewTab` path); the merge branch keeps
|
|
60
|
-
// existing per-line state intact and races no fetches.
|
|
61
|
-
if (keepExistingListItems === false) {
|
|
62
|
-
transactions.forEach((transaction) => {
|
|
63
|
-
fetchActions.push(cancelEntityRecommendationsForLineUpdate({
|
|
64
|
-
id: transaction.id,
|
|
65
|
-
type: transaction.type,
|
|
66
|
-
}));
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
54
|
fetchActions.push(saveTransactionCategorizationLocalData({
|
|
70
55
|
selectedTab,
|
|
71
56
|
transactionIds,
|
|
@@ -3,7 +3,6 @@ import recordGet from 'lodash/get';
|
|
|
3
3
|
import uniq from 'lodash/uniq';
|
|
4
4
|
import { toMonthYearPeriodId, } from '../../../commonStateTypes/timePeriod';
|
|
5
5
|
import { isVendorTransaction } from '../../../entity/transaction/stateTypes/vendorTransaction';
|
|
6
|
-
import { getLineIdsWhereEntityStillMatches } from '../../recommendation/recommendationStaleResponseHelper';
|
|
7
6
|
import { filterAutoTabLineItems, mergeTabSpecificLineItems, removeTransactionFromTabView, setEntityRecommendationForLineIdInLocalData, shouldAutoSelectAndAdd, toSetAllLineItemsToCategoryClass, toTransactionDetailLocalData, } from '../helpers/transactionCategorizationLocalDataHelper';
|
|
8
7
|
import { DEFAULT_COMPLETED_SUB_TAB, } from '../types/completedSubTab';
|
|
9
8
|
import { TRANSACTIONS_TABS, } from '../types/transactionsViewState';
|
|
@@ -517,66 +516,11 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
517
516
|
const transactionLocalData = recordGet(draft.transactionCategorizationView[selectedTab]
|
|
518
517
|
.transactionReviewLocalDataById, transactionId.id, undefined);
|
|
519
518
|
if (transactionLocalData != null) {
|
|
520
|
-
|
|
521
|
-
// currently selected entity still matches the payload
|
|
522
|
-
// entity, so a response that lands after the user (or the
|
|
523
|
-
// silent backgroundRefetchReviewTab path) wiped local data
|
|
524
|
-
// can't overwrite the restored state. Lines that fail the
|
|
525
|
-
// guard are still released to Completed below so their
|
|
526
|
-
// inline skeletons resolve. Complements the epic-level
|
|
527
|
-
// `takeUntil`.
|
|
528
|
-
//
|
|
529
|
-
// List flow: ONLY vendor uses page-level `selectedEntity`;
|
|
530
|
-
// customer + JE + deposit all use per-line
|
|
531
|
-
// `selectedEntityLine`. This differs from the detail flow
|
|
532
|
-
// (where customer is page-level too) and matches the
|
|
533
|
-
// dichotomy in `setEntityRecommendationForLineIdInLocalData`.
|
|
534
|
-
const usesPageLevelEntity = isVendorTransaction(transaction);
|
|
535
|
-
const matchedLineIds = getLineIdsWhereEntityStillMatches({
|
|
536
|
-
lineIds,
|
|
537
|
-
payloadEntity: entity,
|
|
538
|
-
getCurrentEntityForLine: (lineId) => usesPageLevelEntity
|
|
539
|
-
? transactionLocalData.transactionReviewLocalData.selectedEntity
|
|
540
|
-
: transactionLocalData.transactionReviewLocalData.lineItemById[lineId]?.selectedEntityLine,
|
|
541
|
-
});
|
|
542
|
-
// When every line failed the guard, skip the helper entirely.
|
|
543
|
-
// The list-flow helper's `else` branch writes
|
|
544
|
-
// recommendations + account/class onto vendor-txn lines even
|
|
545
|
-
// when they're not in `recommendationLineIds` (so callers
|
|
546
|
-
// can fold full-transaction recs into untouched lines), and
|
|
547
|
-
// we don't want any of those writes when the whole response
|
|
548
|
-
// is stale. We still flip the per-line fetch flag so
|
|
549
|
-
// skeletons resolve.
|
|
550
|
-
if (matchedLineIds.length === 0) {
|
|
551
|
-
const existingLocalData = transactionLocalData.transactionReviewLocalData;
|
|
552
|
-
const releasedLineItems = { ...existingLocalData.lineItemById };
|
|
553
|
-
lineIds.forEach((lineId) => {
|
|
554
|
-
const lineItem = releasedLineItems[lineId];
|
|
555
|
-
if (lineItem != null) {
|
|
556
|
-
releasedLineItems[lineId] = {
|
|
557
|
-
...lineItem,
|
|
558
|
-
categoryClassRecommendationsFetchState: {
|
|
559
|
-
fetchState: 'Completed',
|
|
560
|
-
error: undefined,
|
|
561
|
-
},
|
|
562
|
-
};
|
|
563
|
-
}
|
|
564
|
-
});
|
|
565
|
-
draft.transactionCategorizationView[selectedTab].transactionReviewLocalDataById[transaction.id] = {
|
|
566
|
-
transactionId: transaction.id,
|
|
567
|
-
transactionReviewLocalData: {
|
|
568
|
-
...existingLocalData,
|
|
569
|
-
lineItemById: releasedLineItems,
|
|
570
|
-
},
|
|
571
|
-
};
|
|
572
|
-
return;
|
|
573
|
-
}
|
|
574
|
-
const newLocalData = setEntityRecommendationForLineIdInLocalData(draft.transactionCategorizationView[selectedTab], transaction, transactionLocalData.transactionReviewLocalData, entity, matchedLineIds, uncategorizedAccounts, action.payload.recommendationWithCOTByLineId, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled);
|
|
519
|
+
const newLocalData = setEntityRecommendationForLineIdInLocalData(draft.transactionCategorizationView[selectedTab], transaction, transactionLocalData.transactionReviewLocalData, entity, lineIds, uncategorizedAccounts, action.payload.recommendationWithCOTByLineId, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled);
|
|
575
520
|
// Release the per-line fetch flag for every line this fetch
|
|
576
|
-
// covered
|
|
577
|
-
//
|
|
578
|
-
//
|
|
579
|
-
// object), before we write it back to the draft.
|
|
521
|
+
// covered. Done in-place on the freshly returned local data
|
|
522
|
+
// (the helper produces a new mutable object), before we write
|
|
523
|
+
// it back to the draft.
|
|
580
524
|
lineIds.forEach((lineId) => {
|
|
581
525
|
const lineItem = newLocalData.lineItemById[lineId];
|
|
582
526
|
if (lineItem != null) {
|
|
@@ -593,9 +537,7 @@ const expenseAutomationTransactionsView = createSlice({
|
|
|
593
537
|
transactionId: transaction.id,
|
|
594
538
|
transactionReviewLocalData: newLocalData,
|
|
595
539
|
};
|
|
596
|
-
// Mark transaction as dirty (autofill happened)
|
|
597
|
-
// reach this point with at least one matched line, so
|
|
598
|
-
// recommendations were applied.
|
|
540
|
+
// Mark transaction as dirty (autofill happened)
|
|
599
541
|
if (!draft.transactionCategorizationView[selectedTab].transactionIdsWithUnsavedData.includes(transaction.id)) {
|
|
600
542
|
draft.transactionCategorizationView[selectedTab].transactionIdsWithUnsavedData = [
|
|
601
543
|
...draft.transactionCategorizationView[selectedTab]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { concat, of, timer } from 'rxjs';
|
|
2
|
-
import { catchError, debounce, filter, groupBy, mergeMap, switchMap,
|
|
2
|
+
import { catchError, debounce, filter, groupBy, mergeMap, switchMap, } from 'rxjs/operators';
|
|
3
3
|
import { getIsAccountingClassesEnabled } from '../../entity/tenant/tenantSelector';
|
|
4
4
|
import { getTransactionWithCOT, getTransactionWithCOTFromRecommendations, } from '../../entity/transaction/transactionHelper';
|
|
5
5
|
import { createZeniAPIStatus, isSuccessResponse } from '../../responsePayload';
|
|
@@ -7,7 +7,7 @@ import { getUncategorizedAccounts } from '../accountList/accountListSelector';
|
|
|
7
7
|
import { markCategoryClassRecommendationsCompletedForCategorization, markCategoryClassRecommendationsFailureForCategorization, markCategoryClassRecommendationsInProgressForCategorization, setEntityRecommendationForLineIdsForCategorization, } from '../expenseAutomationView/reducers/transactionsViewReducer';
|
|
8
8
|
import { markCategoryClassRecommendationsCompletedForTransactionDetail, markCategoryClassRecommendationsFailureForTransactionDetail, markCategoryClassRecommendationsInProgressForTransactionDetail, setEntityRecommendationForLineIdsForTransactionDetail, } from '../transactionDetail/transactionDetailReducer';
|
|
9
9
|
import { buildRecommendationUrl, getRecommendationByLineIdWithCOTFromRecommendationPayloadWithCOT, } from './recommendationHelper';
|
|
10
|
-
import {
|
|
10
|
+
import { fetchEntityRecommendationsForLineUpdate } from './recommendationReducer';
|
|
11
11
|
// Close the per-target groupBy bucket after this much idle time so inactive
|
|
12
12
|
// groups don't accumulate forever (each group holds a Subject + a chain of
|
|
13
13
|
// active subscribers; without a duration selector groupBy retains them for
|
|
@@ -83,14 +83,5 @@ export const fetchEntityRecommendationsForLineUpdateEpic = (actions$, state$, ze
|
|
|
83
83
|
? markCategoryClassRecommendationsFailureForCategorization(payload.selectedTab, transactionId, lineIds, status)
|
|
84
84
|
: markCategoryClassRecommendationsFailureForTransactionDetail(transactionId, lineIds, status));
|
|
85
85
|
}));
|
|
86
|
-
|
|
87
|
-
// downstream success/failure/markCompleted emission once a
|
|
88
|
-
// cancel action lands for the same transactionId. groupBy +
|
|
89
|
-
// switchMap already handle re-fetch-on-same-target; takeUntil
|
|
90
|
-
// covers the user-initiated Cancel (detail footer + list
|
|
91
|
-
// footer) and the silent backgroundRefetchReviewTab path,
|
|
92
|
-
// which both wipe local data without dispatching another
|
|
93
|
-
// fetch on the same target.
|
|
94
|
-
const cancel$ = actions$.pipe(filter(cancelEntityRecommendationsForLineUpdate.match), filter((a) => a.payload.transactionId.id === transactionId.id));
|
|
95
|
-
return concat(of(startAction), httpStream$.pipe(takeUntil(cancel$)));
|
|
86
|
+
return concat(of(startAction), httpStream$);
|
|
96
87
|
}))));
|
|
@@ -58,23 +58,6 @@ const recommendation = createSlice({
|
|
|
58
58
|
return { payload: args };
|
|
59
59
|
},
|
|
60
60
|
},
|
|
61
|
-
// No-op reducer; the action exists purely so the line-update epic
|
|
62
|
-
// can observe it via `takeUntil` and kill an in-flight HTTP request
|
|
63
|
-
// when the user (or a background refresh) wipes local data before
|
|
64
|
-
// the response lands. Without this, a stale response races the reset
|
|
65
|
-
// and overwrites the user's intent. Cancel is keyed by
|
|
66
|
-
// `transactionId` only: per-page Cancel buttons cancel everything
|
|
67
|
-
// under that transaction (including JE sibling line sets), which
|
|
68
|
-
// matches the UI semantics on both detail and categorization pages.
|
|
69
|
-
cancelEntityRecommendationsForLineUpdate: {
|
|
70
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
71
|
-
reducer(_draft, _action) {
|
|
72
|
-
// intentionally empty
|
|
73
|
-
},
|
|
74
|
-
prepare(transactionId) {
|
|
75
|
-
return { payload: { transactionId } };
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
61
|
fetchRecommendationByEntityName: {
|
|
79
62
|
reducer(draft, action) {
|
|
80
63
|
const { entityName, entityType } = action.payload;
|
|
@@ -153,7 +136,7 @@ const recommendation = createSlice({
|
|
|
153
136
|
},
|
|
154
137
|
},
|
|
155
138
|
});
|
|
156
|
-
export const { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate,
|
|
139
|
+
export const { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityName, fetchRecommendationByEntityId, updateRecommendationForEntity, updateRecommendationForEntityFailure, indicateReadyToInitializeRecommendation, clearRecommendation, } = recommendation.actions;
|
|
157
140
|
export default recommendation.reducer;
|
|
158
141
|
const doUpdateRecommendationForEntity = (draft, entityId, entityType, payload) => {
|
|
159
142
|
const key = getEntityRecommendationKey(entityType, entityId);
|
|
@@ -2,7 +2,6 @@ import { from } from 'rxjs';
|
|
|
2
2
|
import { filter, mergeMap } from 'rxjs/operators';
|
|
3
3
|
import { getSupportedTransactionById } from '../../../entity/transaction/transactionSelector';
|
|
4
4
|
import { getUncategorizedAccounts } from '../../accountList/accountListSelector';
|
|
5
|
-
import { cancelEntityRecommendationsForLineUpdate } from '../../recommendation/recommendationReducer';
|
|
6
5
|
import { toTransactionDetailLocalData } from '../transactionDetailLocalDataHelper';
|
|
7
6
|
import { clearTransactionDetailLocalData, initializeTransactionDetailLocalData, saveTransactionDetailLocalData, } from '../transactionDetailReducer';
|
|
8
7
|
import { getTransactionDetailKey } from '../transactionDetailState';
|
|
@@ -15,12 +14,6 @@ export const initializeTransactionDetailLocalDataEpic = (actions$, state$) => ac
|
|
|
15
14
|
if (detail != null) {
|
|
16
15
|
const uncategorizedIncomeExpense = getUncategorizedAccounts(state$.value.accountState, state$.value.accountListState, 'accountList');
|
|
17
16
|
const localData = toTransactionDetailLocalData(detail, vendorId, uncategorizedIncomeExpense);
|
|
18
|
-
// Cancel any in-flight line-update recommendations fetch for
|
|
19
|
-
// this transaction BEFORE the clear+restore writes land. The
|
|
20
|
-
// shared epic's takeUntil observes this action and unsubscribes
|
|
21
|
-
// the HTTP stream, preventing a stale response from being
|
|
22
|
-
// applied to the freshly-restored local data.
|
|
23
|
-
fetchActions.push(cancelEntityRecommendationsForLineUpdate(transactionId));
|
|
24
17
|
fetchActions.push(clearTransactionDetailLocalData({ transactionId }));
|
|
25
18
|
fetchActions.push(saveTransactionDetailLocalData({
|
|
26
19
|
transactionId,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
2
|
import recordGet from 'lodash/get';
|
|
3
3
|
import { toEntityType, } from '../../entity/genericEntity/entity';
|
|
4
|
-
import { isCustomerTransaction } from '../../entity/transaction/stateTypes/customerTransaction';
|
|
5
|
-
import { isVendorTransaction } from '../../entity/transaction/stateTypes/vendorTransaction';
|
|
6
|
-
import { getLineIdsWhereEntityStillMatches } from '../recommendation/recommendationStaleResponseHelper';
|
|
7
4
|
import { removeEntityRecommendationForLineIdInLocalData, setEntityRecommendationForLineIdInLocalData, toSetAllLineItemsLocalDataIsUpdateAllChecked, toSetAllLineItemsToCategoryClass, toSetAllLineItemsToVendor, toUpdateLineItemsOriginalCategoryClass, toUpdateLineItemsToOriginalVendor, } from './transactionDetailLocalDataHelper';
|
|
8
5
|
import { getTransactionDetailKey, initialSupportedTransactionDetail, } from './transactionDetailState';
|
|
9
6
|
export const initialState = {
|
|
@@ -254,17 +251,6 @@ const transactionDetail = createSlice({
|
|
|
254
251
|
// captures the snapshot before the epic's start arm runs and would
|
|
255
252
|
// otherwise clobber In-Progress back to undefined). Treat the field as
|
|
256
253
|
// sticky: only let the caller override it when they explicitly set it.
|
|
257
|
-
//
|
|
258
|
-
// Note on Cancel: the explicit user-Cancel path NO LONGER relies on
|
|
259
|
-
// this stickiness to release In-Progress lines. Cancel dispatches
|
|
260
|
-
// `cancelEntityRecommendationsForLineUpdate` ahead of the
|
|
261
|
-
// clear+save pair (see initializeTransactionDetailLocalDataEpic);
|
|
262
|
-
// the shared line-update epic's `takeUntil` catches that action
|
|
263
|
-
// and unsubscribes the HTTP stream, so no markCompleted /
|
|
264
|
-
// setEntityRecommendation arm fires for the cancelled fetch.
|
|
265
|
-
// Stickiness still matters for the BENIGN snapshot-rebuild paths
|
|
266
|
-
// described above where a fetch is legitimately in flight and
|
|
267
|
-
// must keep its skeleton until the success/failure arm lands.
|
|
268
254
|
const mergedLineItemById = {};
|
|
269
255
|
Object.entries(incoming.lineItemById ?? {}).forEach(([lineId, line]) => {
|
|
270
256
|
mergedLineItemById[lineId] = {
|
|
@@ -400,37 +386,10 @@ const transactionDetail = createSlice({
|
|
|
400
386
|
const key = getTransactionDetailKey(action.payload.transactionId);
|
|
401
387
|
const detail = recordGet(draft.transactionDetailById, key, undefined);
|
|
402
388
|
if (detail != null) {
|
|
403
|
-
|
|
404
|
-
// (or Cancel restored an earlier vendor) between the fetch
|
|
405
|
-
// starting and the response landing, the payload entity will
|
|
406
|
-
// no longer match what's currently selected on the line(s).
|
|
407
|
-
// Apply recommendations only to the still-matching subset of
|
|
408
|
-
// lines. Lines that fail the guard still flip to Completed
|
|
409
|
-
// below so their inline skeletons resolve. This complements
|
|
410
|
-
// the epic-level `takeUntil`: even if a response slips
|
|
411
|
-
// through, it can't write recommendations onto unrelated
|
|
412
|
-
// selections.
|
|
413
|
-
//
|
|
414
|
-
// Detail flow: vendor + customer use page-level
|
|
415
|
-
// `selectedEntity`; JE / deposit use per-line `lineEntity`.
|
|
416
|
-
// Match the same dichotomy used by
|
|
417
|
-
// `setEntityRecommendationForLineIdInLocalData`'s
|
|
418
|
-
// `checkIfNotJEAndDeposit` test below.
|
|
419
|
-
const usesPageLevelEntity = isVendorTransaction(transaction) === true ||
|
|
420
|
-
isCustomerTransaction(transaction) === true;
|
|
421
|
-
const matchedLineIds = getLineIdsWhereEntityStillMatches({
|
|
422
|
-
lineIds,
|
|
423
|
-
payloadEntity: action.payload.entity,
|
|
424
|
-
getCurrentEntityForLine: (lineId) => usesPageLevelEntity
|
|
425
|
-
? detail.transactionDetailLocalData.selectedEntity
|
|
426
|
-
: detail.transactionDetailLocalData.lineItemById[lineId]
|
|
427
|
-
?.lineEntity,
|
|
428
|
-
});
|
|
429
|
-
const newLocalData = setEntityRecommendationForLineIdInLocalData(transaction, detail.transactionDetailLocalData, action.payload.entity, matchedLineIds, uncategorizedIncomeExpense, recommendationWithCOTByLineId);
|
|
389
|
+
const newLocalData = setEntityRecommendationForLineIdInLocalData(transaction, detail.transactionDetailLocalData, action.payload.entity, lineIds, uncategorizedIncomeExpense, recommendationWithCOTByLineId);
|
|
430
390
|
// Release the per-line fetch flag for every line this fetch
|
|
431
|
-
// covered
|
|
432
|
-
//
|
|
433
|
-
// Unmatched lines are released without recommendation writes.
|
|
391
|
+
// covered so the inline skeleton resolves and the page-level
|
|
392
|
+
// Save button can re-enable.
|
|
434
393
|
lineIds.forEach((lineId) => {
|
|
435
394
|
const lineItem = newLocalData.lineItemById[lineId];
|
|
436
395
|
if (lineItem != null) {
|
package/lib/index.d.ts
CHANGED
|
@@ -374,7 +374,7 @@ import { ProfitAndLossProjectViewReport } from './view/profitAndLossProjectView/
|
|
|
374
374
|
import { ProfitAndLossProjectViewUIState } from './view/profitAndLossProjectView/profitAndLossProjectViewState';
|
|
375
375
|
import { fetchProjectList } from './view/projectList/projectListReducer';
|
|
376
376
|
import { ProjectListSelectorView, getProjectList } from './view/projectList/projectListSelector';
|
|
377
|
-
import {
|
|
377
|
+
import { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName } from './view/recommendation/recommendationReducer';
|
|
378
378
|
import { clearReferrals, fetchReferrals, fetchRewardsPlan, resendReferralInvite, saveReferralFormDataInLocalStore, sendReferralInvite, updateReferViewed, updateReferralListSortUiState } from './view/referralView/referralReducer';
|
|
379
379
|
import { ReferralListSelectorView, RewardsPlanCardReport, getInviteFormView, getReferralListView, getRewardsPlanCard } from './view/referralView/referralSelector';
|
|
380
380
|
import { AmountStatusTypes, InviteCompanyLocalData, ReferralAmountStatus, ReferralInvitation, ReferralListViewSortKey, ReferralStatus, ReferralViewState, ReferralViewUIState, RewardsPlanData, StatusTypes, toReferralListViewSortKeyType } from './view/referralView/referralState';
|
|
@@ -848,7 +848,7 @@ export { Filing1099TinType };
|
|
|
848
848
|
export { BillPayCardReport };
|
|
849
849
|
export { ReimbursementCardReport };
|
|
850
850
|
export { VendorListViewSortKey, VendorViewUIState, VendorListSelectorView, VendorListQuery, getVendorList, VendorListView, updateSortUiState, updatePageToken, updateYTDSelectionUIState, VendorListViewYTDSpendSortKey, isColumnYTDSpend, isVendorsTabVisible, VendorViewType, VendorReportIDType, toVendorReportIDType, VendorFiling1099ListSelectorView, getVendorFiling1099List, VendorFiling1099ListViewSortKey, VendorFiling1099ViewUIState, VendorFiling1099DownloadData, fetchVendorsFiling1099Download, Type1099Download, VendorFiling1099DownloadDataForType, };
|
|
851
|
-
export {
|
|
851
|
+
export { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName, };
|
|
852
852
|
export type { FetchEntityRecommendationsForLineUpdatePayload, RecommendationLineUpdateFlowType, } from './view/recommendation/recommendationReducer';
|
|
853
853
|
export { fetchOwnerList };
|
|
854
854
|
export { ZeniAccountsConfigSelectorView, getZeniAccountsConfigDetail, ZeniAccountListSelectorView, getZeniAccountList, fetchZeniAccountList, fetchAccountList, DepositAccount, createCheckingAccount, fetchPaymentAccountList, unlinkPaymentAccount, getDepositAccountDetail, DepositAccountDetailSelectorView, DepositAccountListSelectorView, getAllDepositAccounts, getDepositAccountDetailForPDF, DepositAccountDetailForPDF, fetchDepositAccount, fetchZeniAccountsConfig, AccountHistoryWithBalances, TransferDetailLocalData, ReviewTransferDetail, updateTransferMoneyLocalData, updateTransferToLocalData, updateDepositToLocalData, transferMoney, getTransferDetail, TransferDetailSelectorView, clearTransferDetail, clearReviewTransferDetail, fetchReviewTransferDetail, fetchDepositAccountDetail, DepositAccountTransaction, DepositAccountWithAutoTransferRules, DepositTransactionStatusCode, DepositTransactionStatus, CheckDepositLocalData, depositCheck, updateCheckDepositLocalData, clearCheckDeposit, CheckDepositSelectorView, getCheckDepositDetail, updateDepositAccount, fetchDepositAccountHistorySuccess, fetchDepositAccountHistoryFailure, DepositAccountUpdateType, ZeniAccountSummaryWithBalance, fetchZeniAccStatementPage, getZeniAccStatements, ZeniAccStatementsSelectorView, ZeniAccountPaymentMethod, };
|
package/lib/index.js
CHANGED
|
@@ -59,22 +59,22 @@ exports.updatePaymentAccount = exports.updateBusinessVerificationDetails = expor
|
|
|
59
59
|
exports.toRoleTypeStrict = exports.toAttributeOrRoleTypeStrict = exports.toAttributeTypeStrict = exports.isAccessDeniedError = exports.isInvalidSessionError = exports.isSuccessResponse = exports.VERIFIED_PAYMENT_ACCOUNT_PROVIDER_VERIFICATION_STATUS = exports.getRemiBusinessVerificationDetails = exports.getRemiSetupViewDetails = exports.clearRemiSetupView = exports.acceptEmployeeRemiTerms = exports.acceptRemiTerms = exports.saveRemiSetupViewDataInLocalStore = exports.updateMileageDetails = exports.fetchRemiSetupView = exports.getUserFinancialAccount = exports.fetchUserFinancialAccount = exports.getIntegrationsView = exports.getBankConnectionsSetupViewDetails = exports.getApprovalRuleViewDetails = exports.getTwoFactorAuthenticationViewForChargeCardHolder = exports.getTwoFactorAuthenticationViewForCardUserOnboarding = exports.getTwoFactorAuthenticationView = exports.getCommonSetupViewDetails = exports.getTreasuryBusinessVerificationDetails = exports.getZeniAccountBusinessVerificationDetails = exports.getBillPayBusinessVerificationDetails = exports.getBusinessVerificationDetails = exports.getZeniAccountSetupViewDetails = exports.getPlaidAccountDetails = exports.getBillPaySetupViewDetails = exports.verifyOtp = exports.resendOtp = exports.sendOtp = exports.clearZeniAccountSetupView = exports.clearBillPaySetupView = exports.clearSetupViewDataInLocalStore = exports.saveIndustryAndIncDateInLocalStore = exports.saveTreasuryAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerAdditionalDocumentsInLocalStore = exports.saveCompnayOfficerPhoneInLocalStore = exports.saveSetupViewDataInLocalStore = exports.acceptBillPayUpdatedTerms = exports.acceptZeniAccountTerms = exports.acceptBillPayTerms = exports.updatePrimaryFundingAccount = exports.updateMappedCashAccount = exports.establishPlaidConnection = exports.updatePaymentAccountStatus = exports.updatePaymentAccountLoginStatus = void 0;
|
|
60
60
|
exports.updateAddRemiAutoFields = exports.clearEditRemiViewDetail = exports.parseReceiptsToRemi = exports.saveRemiSuccessOrFailure = exports.saveRemiDetail = exports.removeFileFromRemiUpdatesInLocalStore = exports.discardRemiUpdatesInLocalStore = exports.fetchCurrencyConversionValue = exports.saveRemiUpdatesToLocalStore = exports.initializeRemiToLocalStore = exports.fetchRemiAndInitializeLocalStore = exports.fetchRecommendationsAndUpdateMerchantRecommendations = exports.fetchEditRemiDetailPage = exports.getEditRemiDetail = exports.removeDuplicateReimbursementByLineId = exports.clearDuplicateReimbursementDetail = exports.fetchDuplicateReimbursement = exports.clearRemiDetailView = exports.approveOrRejectRemi = exports.cancelAndDeleteRemi = exports.fetchRemiDetail = exports.deleteRemi = exports.updateIsEditModeRealTimeApprovals = exports.saveRealTimeApproval = exports.checkApproveRejectBtnShowForRemi = exports.getRemiDetailView = exports.clearRemiSetupApproverView = exports.clearRemiSetupApproverViewUpdateData = exports.setRemiSetupApproverViewListeningToPusherEvent = exports.initializeRemiSetupApproverViewUpdateData = exports.saveRemiSetupApproverViewUpdates = exports.saveRemiSetupApproverViewUpdateData = exports.deleteRemiApprovalRule = exports.fetchRemiApproversDetails = exports.fetchRemiApproversList = exports.fetchRemiSetupApproverView = exports.getRemiSetupApproverUpdateDataView = exports.getRemiSetupApproverView = exports.clearBillPaySetupApproverView = exports.clearBillPaySetupApproverViewUpdateData = exports.initializeBillPaySetupApproverViewUpdateData = exports.setBillsSetupApproverViewListeningToPusherEvent = exports.saveBillPaySetupApproverViewUpdates = exports.saveBillPaySetupApproverViewUpdateData = exports.deleteBillPayApprovalRule = exports.fetchBillPayApproversList = exports.fetchBillPayApproversDetails = exports.fetchBillPaySetupApproverView = exports.getBillPaySetupApproverUpdateDataView = exports.getBillPaySetupApproverView = void 0;
|
|
61
61
|
exports.isAccountUncategorized = exports.getChangedLineItemCountFromLocalData = exports.getTransactionListUIStateByCategoryType = exports.getTransactionsListByCategoryType = exports.retryBankAccountConnectionForOnboarding = exports.sendOnboardingCustomerViewInvite = exports.resetNewOnboardedCustomerId = exports.updateOnboardingCustomerDataInLocalStore = exports.saveOnboardingCustomerDataInLocalStore = exports.saveOnboardingCustomerNotes = exports.saveOnboardingCustomerViewUpdates = exports.updateStatusAfterOnboardingCompleted = exports.updateCustomerCreationStatus = exports.updateOnboardingCustomerListUIState = exports.saveOnboardingCustomerViewUpdateData = exports.clearOnboardingCustomerViewUpdateData = exports.initializeOnboardingCustomerViewUpdateData = exports.getOnboardingEmailGroup = exports.getNewOnboardingCustomerView = exports.getOnboardingCockpitView = exports.toProductTypeStrict = exports.toProductType = exports.saveOnboardingCustomerCompletedStatus = exports.fetchOnboardingCompletedCompanies = exports.updateQBOConnectionPoolExternalConnection = exports.fetchQBOConnectionPool = exports.fetchCompanyOnboardingView = exports.PAYMENT_BUSINESS_DAYS = exports.holidaysFormatted = exports.isHoliday = exports.getYearsList = exports.filterDays = exports.isHolidayToday = exports.getPreviousNthWorkingDay = exports.getNextNthWorkingDay = exports.toFileTypeStrict = exports.ALL_FILE_TYPES = exports.isAllFetchCompleted = exports.isAnyFetchInProgress = exports.reduceAnyCompletedFetchState = exports.reduceAllFetchState = exports.reduceAnyFetchState = exports.reduceFetchStateParallelTimeframes = exports.reduceFetchState = exports.clearAddRemiAutoFields = exports.updateHomeCurrencyConversion = exports.updateReimbursementType = exports.clearTentativeMerchantName = exports.updateTentativeMerchantNames = exports.updateUploadFetchState = void 0;
|
|
62
|
-
exports.getZeniAccountList = exports.getZeniAccountsConfigDetail = exports.fetchOwnerList = exports.fetchRecommendationByEntityName = exports.fetchRecommendationByEntityId = exports.fetchEntityRecommendationsForLineUpdate = exports.fetchEntityRecommendationsByTransactionId = exports.
|
|
63
|
-
exports.updateOnboardingPaymentAccountStatus = exports.updateOnboardingPaymentAccountLoginStatus = exports.updateOnboardingCustomerViewDashboardLoaded = exports.updateOnboardingCustomerViewCompleteStatus = exports.updateOnboardingCustomerViewAccountDetails = exports.establishOnboardingPlaidConnection = exports.getOnboardingPlaidLinkToken = exports.fetchOnboardingCustomerSetupView = exports.fetchOnboardingCustomerView = exports.isZeniClearingAccount = exports.ZENI_CLEARING_ACCOUNT = exports.isZeniClearingAccountReport = exports.getCompanyConfig = exports.fetchCompanyConfig = exports.clearTransactionVendorSaveStatus = exports.resetTransactionVendorLocalData = exports.updateTransactionVendorLocalData = exports.saveTransactionVendorSuccessOrFailure = exports.saveTransactionVendor = exports.getTransactionVendorView = exports.getDepositAccountTransactionList = exports.fetchDepositAccountTransactionList = exports.getZeniAccStatements = exports.fetchZeniAccStatementPage = exports.fetchDepositAccountHistoryFailure = exports.fetchDepositAccountHistorySuccess = exports.updateDepositAccount = exports.getCheckDepositDetail = exports.clearCheckDeposit = exports.updateCheckDepositLocalData = exports.depositCheck = exports.fetchDepositAccountDetail = exports.fetchReviewTransferDetail = exports.clearReviewTransferDetail = exports.clearTransferDetail = exports.getTransferDetail = exports.transferMoney = exports.updateDepositToLocalData = exports.updateTransferToLocalData = exports.updateTransferMoneyLocalData = exports.fetchZeniAccountsConfig = exports.fetchDepositAccount = exports.getDepositAccountDetailForPDF = exports.getAllDepositAccounts = exports.getDepositAccountDetail = exports.unlinkPaymentAccount = exports.fetchPaymentAccountList = exports.createCheckingAccount = exports.fetchAccountList =
|
|
64
|
-
exports.updateCompanyHealthMetricViewErrorStatus = exports.updateCompanyHealthMetricLocalStore = exports.saveCompanyHealthMetricById = exports.removeSelectedCompanyId = exports.initializeCompanyHealthMetricViewLocalData = exports.fetchCompanyHealthMetricView = exports.clearCompanyHealthMetricView = exports.updateCompanyHealth = exports.updateCompaniesHealth = exports.fetchCompanyHealthMetricConfig = exports.getCompanyHealthMetricConfig = exports.getUserRoleConfig = exports.fetchUserRoleConfig = exports.clearInternationalWire = exports.deletePaymentInstrument = exports.createPaymentInstrumentUpdateStatus = exports.createPaymentInstrument = exports.fetchInternationalWireDynamicForm = exports.initializeDynamicForm = exports.updateInternationalWireLocalStoreData = exports.initializeInternationalWireLocalData = exports.getInternationalWireView = exports.fetchWiseRedirectStatus = exports.getWiseRedirect = exports.saveMagicLinkAddressInLocalStore = exports.fetchMagicLinkBankNameBySwift = exports.fetchMagicLinkBankNameByRouting = exports.updateMagicLinkInternationalBankAccountLocalStoreData = exports.updateMagicLinkBankAccountLocalStoreData = exports.saveBankAccount = exports.fetchBillAttachment = exports.fetchMagicLinkTenant = exports.getMagicLinkCurrentAddressState = exports.getMagicLinkBankAccountView = exports.getMagicLinkView = exports.initializeAccountMappingView = exports.getAccountMappingView = exports.clearAccountMappingLocalData = exports.saveAccountMappingLocalData = exports.saveAccountMapping = exports.getProductSettingsString = exports.getOnboardingCustomerView = exports.clearOnboardingCustomerViewDataInLocalStore = exports.clearOnboardingCustomerView = exports.saveOnboardingCustomerViewDataInLocalStore = exports.saveOnboardingCompnayOfficerPhoneInLocalStore = exports.updateOnboardingCustomerViewUIState = exports.updateCurrentStep = exports.updateOnboardingCustomerViewLocalStoreData =
|
|
65
|
-
exports.getChargeCardControlDetailView = exports.getChargeCardDetailView = exports.fetchDepositAccountLimit = exports.fetchChargeCardTransactionStatistics = exports.fetchChargeCardDetail = exports.fetchChargeCardDetailPage = exports.getCreditAccountDetails = exports.PAYMENT_HISTORY_FILTER_CATEGORIES = exports.getPaymentStatusDisplayText = exports.getPaymentHistorySourceAccountName = exports.getChargeCardPaymentHistoryView = exports.getChargeCardPaymentHistoryDownloadReport = exports.updatePaymentHistoryUIState = exports.updatePaymentHistorySearchText = exports.updatePaymentHistoryFilters = exports.updatePaymentHistoryDownloadUIState = exports.fetchChargeCardPaymentHistory = exports.fetchChargeCardPaymentPage = exports.getChargeCardRepaymentDetail = exports.updateChargeCardRepaymentLocalStore = exports.initiateChargeCardRepayment = exports.fetchChargeCardRepaymentDetail = exports.clearChargeCardRepaymentDetail = exports.getMyRequestOnHoldChargeCardListWithShippingAddress = exports.getMyPendingActivationChargeCardListView = exports.getChargeCardListView = exports.getAllChargeCardsWithUser = exports.fetchCreditAccountRepayment = exports.fetchCreditAccount = exports.fetchChargeCardConfig = exports.fetchChargeCardListPage = exports.fetchChargeCardList = exports.fetchDebitCardSummary = exports.getChargeCardBusinessVerificationDetails = exports.companyHealthMetricDropDownOptions = exports.hasCompanyHealthMetricFormFieldChanged = exports.getCompanyHealthMetricView = exports.isCompanyRunwayInfinite = exports.attachmentFilePathToAttachment = exports.addDeclinedChargeCardTransactionFromPusher = exports.addChargeCardTransactionFromPusher = exports.updateCreditAccountBalanceFromPusher = exports.updateChargeCardTransactionReceiptFromPusher = exports.updateChargeCardTransactionFromPusher = exports.updateChargeCardTransactionStatusFromPusher = exports.updateChargeCardSpendingFromPusher = exports.updateChargeCardStatusFromPusher = exports.updateChargeCardTransactionAttachments = exports.updateCompanyHealthViewUIState =
|
|
66
|
-
exports.updateBulkActionCardIds = exports.resetIssueChargeCardForm = exports.updateLastIssuedCardIds = exports.updateChargeCardsLocalStore = exports.updateCustomAddressId = exports.getDebitCardSummary = exports.getDebitCardList = exports.fetchDepositAccountListForCards = exports.fetchIssueCardPage = exports.issueChargeCards = exports.toCardType = exports.toShippingAddressType = exports.toCardAddressType = exports.getDepositAccountLimitForChargeCardByDepositAccountId = exports.expressInterestInChargeCard = exports.acceptChargeCardTerms = exports.enableChargeCardAutoPay = exports.fetchChargeCardSetupView = exports.getChargeCardStatements = exports.fetchChargeCardStatementList = exports.getChargeCardSetupViewDetails = exports.applyAiCardCreationFormDraftUpdate = exports.deriveAiCardRowsFromTeams = exports.buildAiCardCreationFormDraftSeed = exports.toIssueChargeCardLocalDataFromDraft = exports.selectIssueChargeCardLocalDataFromDraft = exports.getAiCardCreationFormDraft = exports.updateAiCardCreationFormDraft = exports.seedAiCardCreationFormDraft = exports.clearAiCardCreationFormDraft = exports.getLastIssuedChargeCardIds = exports.getLastIssueChargeCardsSourceChatSessionId = exports.getIssueChargeCardsSaveStatus = exports.getIssueChargeCardView = exports.getInFlightIssueChargeCardsCount = exports.getDepositAccountListWithDebitCardIssued = exports.toCreditLimitFrequencyCodeType = exports.getZeniDateFromPeriod = exports.getCashbackDetail = exports.toChargeCardSortKeyType = exports.fetchCashbackDetail = exports.fetchChargeCardTransactionList = exports.getChargeCardCVVActivateView = exports.getChargeCardBulkActionView = exports.getChargeCardRowActionView = exports.getChargeCardRecurringExpensesView = exports.getChargeCardRecurringExpensesByCardIds = exports.getDebitCardSetPinView = exports.getChargeCardTransactionAttachmentView =
|
|
67
|
-
exports.getApAgingDetailForVendor = exports.fetchApAgingDetail = exports.updateApAgingUIState = exports.getApAgingReport = exports.fetchApAging = exports.aggregatedReportView = exports.fetchAggregatedReport = exports.toTimeSeriesDuration = exports.convertToTimeSeriesSelectionRange = exports.TIME_SERIES_DURATIONS = exports.anyCardOnHold = exports.getChargeCardById = exports.setCurrentDisplayedCardId = exports.setFirstViewCompleteAfterActivation = exports.setFirstViewAfterActivation = exports.completeCardUserOnboardingActivationWait = exports.startCardUserOnboardingActivationWait = exports.fetchChargeCardsRecurringExpenses = exports.updateChargeCardsSpendLimit = exports.closeChargeCards = exports.unlockChargeCards = exports.lockChargeCards = exports.revokeChargeCardsInvite = exports.updateRowActionCardId = exports.revokeCardInvite = exports.resendCardInvite = exports.updateChargeCardSpendLimitSuccessOrFailure = exports.updateChargeCardSpendLimit = exports.startCVVActivationWait = exports.completeCVVActivationWait = exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updateDebitCardPinAttempt = exports.startDebitCardSetPinWait = exports.completeDebitCardSetPinWait = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.saveCardOnboardingUserDetails = exports.updateCardUserOnboardingLocalData = exports.initializeCardUserOnboardingLocalData = exports.getCardUserOnboardingView = exports.updateChargeCardName = exports.closeChargeCard = exports.unlockChargeCard = exports.lockChargeCard = exports.updatePhysicalChargeCardAttempt = exports.updateChargeCardDetail = exports.updateCashbackDetailUIState = exports.updateChargeCardListUIState =
|
|
68
|
-
exports.getScheduleDetailsView = exports.fetchScheduleDetails = exports.updateSelectedJEScheduleKey = exports.updateScheduleListSortState = exports.updateScheduleListScrollState = exports.updateScheduleListSearchText = exports.updateScheduleListSubTab = exports.toScheduleSubTabType = exports.toScheduleListTabsFileTypeStrict = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.getFetchStateForScheduleAccountList = exports.updateScheduleListLocalData = exports.fetchSchedulesAccount = exports.fetchDownloadSchedules = exports.fetchAccruedScheduleList = exports.fetchScheduleList = exports.getAccruedScheduleListReport = exports.getScheduleListReport = exports.ALL_SCHEDULES_TYPES = exports.getJEScheduleTransactionKey = exports.resetAccruedDetailNewScheduleState = exports.resetSelectedJEAccruedScheduleKey = exports.updateSelectedJEAccruedScheduleKey = exports.updateScheduleAccruedDetailsLocalData = exports.updateLinkBillExpenseLocalData = exports.clearSelectedJELinkRowIndex = exports.fetchRecommendedTransactionRowIndex = exports.updatedJELinkInLocalDataAccruedExpenses = exports.updatedJEAccruedLinkWithRecommendedLocalData = exports.updateAmountsInScheduleAccruedDetail = exports.saveScheduleAccruedDetails = exports.resetJEAccruedLinkInLocalData = exports.fetchScheduleAccruedDetailsPage = exports.fetchScheduleAccruedDetails = exports.cancelScheduleAccruedJournalEntry = exports.deleteScheduleAccruedDetail = exports.createNewSchedulesAccrued = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateExpenseAutomationJESchedulesUIState = exports.retryExpenseAutomationJESchedule = exports.removeJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.initializeJeAccountSettingsView = exports.ignoreExpenseAutomationJESchedule = exports.fetchExpenseAutomationJESchedulesPage = exports.clearExpenseAutomationJESchedulesView = exports.clearExpenseAutomationJEScheduleLocalData =
|
|
69
|
-
exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.getVendorDetailSelectorView = exports.saveVendorDetailsView = exports.updateReviewVendorDetailLocalData = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewAttachments = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.getVendorTabView = exports.updateVendorTabViewTab = exports.fetchVendorTabView = exports.resetMarkAsCompleteStatus = exports.markAsCompleteScheduleDetail = exports.getDefaultSelectedTimeframeForScheduleType = exports.getFetchStateForScheduleListByType = exports.updatedJELinkWithRecommendedLocalData = exports.resetJELinkInLocalData = exports.updateAmountsInScheduleDetail = exports.updatedJELinkInLocalData = exports.getThirdPartyIDFromQBOURL = exports.getQBOUrlForLink = exports.updatedSelectedJELinkRowIndex = exports.updateAccruedJEScheduleAccruedByListKey = exports.updateScheduleListDownloadState = exports.updateScheduleDetailsLocalData = exports.createNewSchedules = exports.deleteScheduleDetail = exports.saveScheduleDetails = exports.fetchScheduleDetailsPage =
|
|
70
|
-
exports.toDueDateGroupKeyType = exports.toTaskStatusCodeType = exports.toPriorityCodeType = exports.getDueDateValueFromDueDateGroupId = exports.initialTaskDetail = exports.fetchAllTaskGroups = exports.getTaskUpdates = exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.getCannedResponsesView = exports.deleteCannedResponse = exports.saveCannedResponse = exports.fetchCannedResponses = exports.archiveTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = exports.fetchTaskDetailPage = exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.getTaskGroupById = exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.updateArAgingNodeCollapseState = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = exports.fetchArAging = exports.updateVendorGlobalReviewViewLocalData = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId =
|
|
71
|
-
exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = exports.updateNotificationViewNotificationStatus = exports.updateNotificationViewAllNotificationsStatus = exports.fetchNotificationUnreadCountSuccess = exports.fetchNotificationUnreadCount = exports.fetchNotificationView = exports.toNotificationTabTypeStrict = exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = exports.parseOAuthParams = exports.getZeniOAuthApproveRedirectUrl = exports.getZeniOAuthApproveFetchState = exports.getZeniOAuthApproveError = exports.clearZeniOAuthView = exports.approveOAuthConsentSuccess = exports.approveOAuthConsentFailure = exports.approveOAuthConsent = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.saveReasonForAuditRule = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getUserFromAllUsers = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.clearCardPaymentView = exports.resetCardPaymentErrorStatuses = exports.fetchPaymentSources = exports.addCardPaymentSource = exports.confirmCardSetupIntent = exports.createCardSetupIntent = exports.getAllCardsAndBankPaymentMethods = exports.deleteTag = exports.createTag = exports.fetchTagList = exports.getAllTags = exports.ALL_TASK_LIST_TABS = exports.initialTaskDetailLocalData = exports.convertHHMMStrToMinutes = exports.unsnoozeTask = exports.snoozeTask = exports.removeTaskFromList = exports.updateTaskListTab =
|
|
72
|
-
exports.acceptTreasuryTerms = exports.getExpressPayView = exports.resetExpressPayLocalData = exports.submitExpressPay = exports.updateExpressPayFormLocalData = exports.fetchExpressPayInitialDetails = exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.createTaskFromTaskGroupTemplate = exports.getCompanyTaskManagerView = exports.fetchTaskManagerMetrics = exports.fetchCompanyTaskManagerView = exports.fetchCockpitContext = exports.toRecurringFrequency = exports.toDayOfWeek = exports.getRecurringEndDateFromCount = exports.getMinAllowedEndDate = exports.SEMI_WEEKLY_REQUIRED_DAYS_COUNT = exports.ALL_WEEK_DAYS = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.getNotifications = exports.getLastNotificationTime = exports.pushToastNotification = exports.isFeatureInterestRegistered = exports.getRegisteredInterestsByFeature = exports.getRegisteredInterests = exports.getFeatureNotificationView = exports.notifyMeForFeature = exports.fetchRegisteredInterests = exports.clearFeatureNotificationView = exports.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState =
|
|
73
|
-
exports.deleteChatSession = exports.acceptMasterTOS = exports.fetchChatHistory = exports.stopSubmitQuestion = exports.stopSubmit = exports.createSessionAndSubmit = exports.clearLastContextMessage = exports.clearDeleteChatSessionStatus = exports.clearCurrentSessionId = exports.clearAiCfoView = exports.setSession = exports.clearInput = exports.updateCotCollapsedState = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.submitQuestion = exports.createSession = exports.fetchChatSessionsForUser = exports.getAiAccountantCockpitView = exports.updateAiAccountantUIState = exports.triggerAiAccountantJob = exports.setSelectedTenantIdsForJobTrigger = exports.fetchAiAccountantJobs = exports.fetchAiAccountantCustomers = exports.clearAiAccountantView = exports.cancelAiAccountantOnboarding = exports.getAiAccountantJobsByTenantId = exports.getAiAccountantCustomers = exports.updateAiAccountantJobs = exports.updateAiAccountantCustomer = exports.updateAiAccountantCustomers = exports.clearAllAiAccountantCustomers = exports.toAiAccountantJob = exports.toAiAccountantEnrollment = exports.toAiAccountantCustomer = exports.toAiAccountantOperationType = exports.toAiAccountantJobStatus = exports.toAiAccountantEnrollmentStatus = exports.getAllowedOperationsForStatus = exports.getTreasuryFundsMaximumYield = exports.getTreasurySetupViewDetails = exports.updateTreasuryVideoViewed = exports.updateTreasuryPromoRemindMeLaterClicked = exports.updateTreasuryPromoIntroClosedByOutsideClick = exports.updateFundAllocationLocalData = exports.fetchPortfolioAllocation = exports.updatePortfolioAllocation = exports.fetchTreasuryFunds = exports.clearTreasurySetupView =
|
|
74
|
-
exports.fetchCardPolicyVendorOptions = exports.fetchCardPolicyRecommendationFromUpload = exports.fetchCardPolicyMccCategories = exports.extractPolicyDocument = exports.clearPolicyDocumentExtraction = exports.toMessageType = exports.toMessageSender = exports.ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS = exports.toInteractiveFormTypeStrict = exports.toInteractiveFormType = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerStateType = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_INTERACTIVE_FORM_TYPES = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = exports.getSyntheticAiCfoAnswerByQuestionAnswerId = exports.getSyntheticAiCfoAnswersForChatSession = exports.getAiCfoSelectorView = exports.getAllQuestionsForChatSession = exports.getQuestionAnswerByIdForChatSession = exports.getAllQuestionAnswersForChatSession = exports.clearSyntheticAiCfoAnswers = exports.removeSyntheticAiCfoAnswer = exports.updateSyntheticAiCfoAnswer = exports.appendSyntheticAiCfoAnswer = exports.toAiCfoVisualization = exports.clearAiCfo = exports.clearSession = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = exports.updateAiCfoAnswerCardPolicyWizardPlan = exports.setSessions = exports.setNewSession = exports.getSuggestedQuestionsForPageContext = exports.getAiCfoView = exports.clearAiCfoSidePanelHostPageContext = exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions =
|
|
75
|
-
exports.applyExtractedPolicyToAiCardPolicyDraft = exports.toUpdateCardPolicyTemplateRequestBody = exports.toExtractedCardPolicyRules = exports.toCreateCardPolicyTemplatesRequestBody = exports.toCreateCardPolicyTemplateRequestBody = exports.toCardPolicyVendorSearchOption = exports.toCardPolicyTemplateList = exports.toCardPolicyTemplate = exports.toCardPolicyStats = exports.toCardPolicyEditFormDraft = exports.toBulkCreateCardPolicyTemplateError = exports.toCardPolicyTemplateStatus = exports.toCardPolicyTemplateMode = exports.ALL_CARD_POLICY_TEMPLATE_STATUSES = exports.ALL_CARD_POLICY_TEMPLATE_MODES = exports.getUploadedPolicyDocumentFileName = exports.getPolicyRecommendationFromUploadFetchState = exports.getPolicyRecommendationFromUploadError = exports.getPolicyRecommendationFromUploadChatSessionId = exports.getPolicyRecommendationFromUploadAnswerId = exports.getPolicyDocumentExtractionFetchState = exports.getPolicyDocumentExtractionError = exports.getExtractedCardPolicyRules = exports.getCardPolicyVendorSearchString = exports.getCardPolicyVendorSearchOptions = exports.getCardPolicyVendorSearchFetchState = exports.getCardPolicyTemplatesByIds = exports.getCardPolicyTemplateById = exports.getCardPolicySuggestedBlockMerchants = exports.getCardPolicySuggestedBlockCategories = exports.getCardPolicySuggestedAllowMerchants = exports.getCardPolicySuggestedAllowCategories = exports.getCardPolicyStats = exports.getCardPolicyMccCategoriesFetchState = exports.getCardPolicyMccCategoriesError = exports.getCardPolicyMccCategories = exports.getAllCardPolicyTemplates = exports.clearCardPolicy = exports.updatePolicyRecommendationFromUploadSuccess = exports.updatePolicyRecommendationFromUploadFailure = exports.updatePolicyDocumentExtractionSuccess = exports.updatePolicyDocumentExtractionFailure = exports.updateCreatedCardPolicyTemplate = exports.updateCardPolicyVendorOptionsFailure = exports.updateCardPolicyVendorOptions = exports.updateCardPolicyTemplates = exports.updateCardPolicyStats = exports.updateCardPolicyMccCategoriesFailure = exports.updateCardPolicyMccCategories =
|
|
76
|
-
exports.updateCardPolicyFetchStatus = exports.updateCardPolicyDetailFetchStatus = exports.updateCardPolicy = exports.fetchCardPolicyDetail = exports.clearCardPolicyDetail = exports.getCardPolicyTemplateIds = exports.getCardPolicyListView = exports.getCardPolicyListFetchState = exports.getArchiveCardPolicyFetchState = exports.updateCardPolicyListFetchStatus = exports.updateArchiveCardPolicyFetchStatus = exports.fetchCardPolicyList = exports.clearCardPolicyList = exports.archiveCardPolicy = exports.toManualCardPolicyTemplateRequestFromDraft = exports.toBulkCardPolicyTemplateRequestsFromDraft = exports.toCardPolicyTemplateRequestFromDraft = exports.applyAiCardPolicyFormDraftUpdate = exports.deriveAiPolicyReviewRowsFromInputs = exports.buildManualCardPolicyFormDraftSeed = exports.buildUploadReviewRows = exports.buildEmptyLimitRows = exports.buildAiCardPolicyFormDraftSeed = exports.toVendorChipFieldValue = exports.toMccCategoryChipFieldValue = exports.buildVendorChipId = exports.buildMccCategoryChipId = exports.VENDOR_CHIP_ID_PREFIX = exports.MCC_CHIP_ID_PREFIX = exports.toMccCategoryLike = exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION = exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT = exports.getManualCardPolicyFormDraft = exports.getLastCreatedCardPolicyTemplateIds = exports.getLastCreatedCardPolicyTemplateId = exports.getLastCreateCardPolicyTemplateErrors = exports.getLastCreateCardPolicySourceChatSessionId = exports.getCreateCardPolicyTemplateRequestState = exports.getAiCardPolicyFormDraft = exports.updateManualCardPolicyFormDraft = exports.updateCreateCardPolicyTemplateRequestState = exports.updateAiCardPolicyFormDraftFromUploadPlan = exports.updateAiCardPolicyFormDraft = exports.seedManualCardPolicyFormDraft = exports.seedAiCardPolicyFormDraft = exports.createCardPolicyTemplates = exports.clearManualCardPolicyFormDraft = exports.clearCreateCardPolicy = exports.clearAiCardPolicyFormDraft =
|
|
77
|
-
exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.fetchAutoTransferReviewDetail = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRule = exports.updateAutoTransferRule = exports.createAutoTransferRule = exports.fetchAutoTransferRules = exports.getTreasuryTaxLetters = exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.getUpdateCardPolicyFetchState = exports.getCardPolicyFormDraft = exports.getCardPolicyDetailView = exports.getCardPolicyDetailFetchState =
|
|
62
|
+
exports.fetchZeniAccountList = exports.getZeniAccountList = exports.getZeniAccountsConfigDetail = exports.fetchOwnerList = exports.fetchRecommendationByEntityName = exports.fetchRecommendationByEntityId = exports.fetchEntityRecommendationsForLineUpdate = exports.fetchEntityRecommendationsByTransactionId = exports.fetchVendorsFiling1099Download = exports.getVendorFiling1099List = exports.toVendorReportIDType = exports.isVendorsTabVisible = exports.isColumnYTDSpend = exports.updateYTDSelectionUIState = exports.updatePageToken = exports.updateSortUiState = exports.getVendorList = exports.LOCAL_CURRENCY_INTERNATIONAL_METHOD_SUBTEXT = exports.SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT = exports.NEW_INTERNATIONAL_METHOD_SUBTEXT = exports.BILL_NEW_PAYMENT_METHODS = exports.getInternationalSubConfigCodeKey = exports.shouldEnableCalendarPickerForLastReportSent = exports.canSendMonthEndEmailReport = exports.checkIfLowBalance = exports.isAwaitingMarkAsPaid = exports.isPaymentMethodOutsideZeni = exports.toSameDayAchDisablementConfig = exports.toAccountsPromoConfig = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.isVerifiedPaymentAccountProviderStatusCode = exports.isVerifiedStatusCode = exports.getActualPaymentDate = exports.showReimbursementPromoPage = exports.showBillPayPromoPage = exports.getSelectedCompanyOfficer = exports.getSpendManagementEffectiveListPeriod = exports.getSnackbar = exports.closeSnackbar = exports.openSnackbar = exports.toJournalEntrySortKey = exports.sumJournalEntryAmounts = exports.sortJournalEntryLines = exports.journalEntryTotalsByPostingSide = exports.journalEntryDefaultSortConfig = exports.filterJournalEntryLinesExcludingLinked = exports.JOURNAL_ENTRY_SORT_KEYS = void 0;
|
|
63
|
+
exports.updateOnboardingCustomerView = exports.updateOnboardingPaymentAccountStatus = exports.updateOnboardingPaymentAccountLoginStatus = exports.updateOnboardingCustomerViewDashboardLoaded = exports.updateOnboardingCustomerViewCompleteStatus = exports.updateOnboardingCustomerViewAccountDetails = exports.establishOnboardingPlaidConnection = exports.getOnboardingPlaidLinkToken = exports.fetchOnboardingCustomerSetupView = exports.fetchOnboardingCustomerView = exports.isZeniClearingAccount = exports.ZENI_CLEARING_ACCOUNT = exports.isZeniClearingAccountReport = exports.getCompanyConfig = exports.fetchCompanyConfig = exports.clearTransactionVendorSaveStatus = exports.resetTransactionVendorLocalData = exports.updateTransactionVendorLocalData = exports.saveTransactionVendorSuccessOrFailure = exports.saveTransactionVendor = exports.getTransactionVendorView = exports.getDepositAccountTransactionList = exports.fetchDepositAccountTransactionList = exports.getZeniAccStatements = exports.fetchZeniAccStatementPage = exports.fetchDepositAccountHistoryFailure = exports.fetchDepositAccountHistorySuccess = exports.updateDepositAccount = exports.getCheckDepositDetail = exports.clearCheckDeposit = exports.updateCheckDepositLocalData = exports.depositCheck = exports.fetchDepositAccountDetail = exports.fetchReviewTransferDetail = exports.clearReviewTransferDetail = exports.clearTransferDetail = exports.getTransferDetail = exports.transferMoney = exports.updateDepositToLocalData = exports.updateTransferToLocalData = exports.updateTransferMoneyLocalData = exports.fetchZeniAccountsConfig = exports.fetchDepositAccount = exports.getDepositAccountDetailForPDF = exports.getAllDepositAccounts = exports.getDepositAccountDetail = exports.unlinkPaymentAccount = exports.fetchPaymentAccountList = exports.createCheckingAccount = exports.fetchAccountList = void 0;
|
|
64
|
+
exports.updateCompanyHealthMetricViewSuccessStatus = exports.updateCompanyHealthMetricViewErrorStatus = exports.updateCompanyHealthMetricLocalStore = exports.saveCompanyHealthMetricById = exports.removeSelectedCompanyId = exports.initializeCompanyHealthMetricViewLocalData = exports.fetchCompanyHealthMetricView = exports.clearCompanyHealthMetricView = exports.updateCompanyHealth = exports.updateCompaniesHealth = exports.fetchCompanyHealthMetricConfig = exports.getCompanyHealthMetricConfig = exports.getUserRoleConfig = exports.fetchUserRoleConfig = exports.clearInternationalWire = exports.deletePaymentInstrument = exports.createPaymentInstrumentUpdateStatus = exports.createPaymentInstrument = exports.fetchInternationalWireDynamicForm = exports.initializeDynamicForm = exports.updateInternationalWireLocalStoreData = exports.initializeInternationalWireLocalData = exports.getInternationalWireView = exports.fetchWiseRedirectStatus = exports.getWiseRedirect = exports.saveMagicLinkAddressInLocalStore = exports.fetchMagicLinkBankNameBySwift = exports.fetchMagicLinkBankNameByRouting = exports.updateMagicLinkInternationalBankAccountLocalStoreData = exports.updateMagicLinkBankAccountLocalStoreData = exports.saveBankAccount = exports.fetchBillAttachment = exports.fetchMagicLinkTenant = exports.getMagicLinkCurrentAddressState = exports.getMagicLinkBankAccountView = exports.getMagicLinkView = exports.initializeAccountMappingView = exports.getAccountMappingView = exports.clearAccountMappingLocalData = exports.saveAccountMappingLocalData = exports.saveAccountMapping = exports.getProductSettingsString = exports.getOnboardingCustomerView = exports.clearOnboardingCustomerViewDataInLocalStore = exports.clearOnboardingCustomerView = exports.saveOnboardingCustomerViewDataInLocalStore = exports.saveOnboardingCompnayOfficerPhoneInLocalStore = exports.updateOnboardingCustomerViewUIState = exports.updateCurrentStep = exports.updateOnboardingCustomerViewLocalStoreData = void 0;
|
|
65
|
+
exports.getDepositAccountLimitFetchStateByDepositAccountId = exports.getChargeCardControlDetailView = exports.getChargeCardDetailView = exports.fetchDepositAccountLimit = exports.fetchChargeCardTransactionStatistics = exports.fetchChargeCardDetail = exports.fetchChargeCardDetailPage = exports.getCreditAccountDetails = exports.PAYMENT_HISTORY_FILTER_CATEGORIES = exports.getPaymentStatusDisplayText = exports.getPaymentHistorySourceAccountName = exports.getChargeCardPaymentHistoryView = exports.getChargeCardPaymentHistoryDownloadReport = exports.updatePaymentHistoryUIState = exports.updatePaymentHistorySearchText = exports.updatePaymentHistoryFilters = exports.updatePaymentHistoryDownloadUIState = exports.fetchChargeCardPaymentHistory = exports.fetchChargeCardPaymentPage = exports.getChargeCardRepaymentDetail = exports.updateChargeCardRepaymentLocalStore = exports.initiateChargeCardRepayment = exports.fetchChargeCardRepaymentDetail = exports.clearChargeCardRepaymentDetail = exports.getMyRequestOnHoldChargeCardListWithShippingAddress = exports.getMyPendingActivationChargeCardListView = exports.getChargeCardListView = exports.getAllChargeCardsWithUser = exports.fetchCreditAccountRepayment = exports.fetchCreditAccount = exports.fetchChargeCardConfig = exports.fetchChargeCardListPage = exports.fetchChargeCardList = exports.fetchDebitCardSummary = exports.getChargeCardBusinessVerificationDetails = exports.companyHealthMetricDropDownOptions = exports.hasCompanyHealthMetricFormFieldChanged = exports.getCompanyHealthMetricView = exports.isCompanyRunwayInfinite = exports.attachmentFilePathToAttachment = exports.addDeclinedChargeCardTransactionFromPusher = exports.addChargeCardTransactionFromPusher = exports.updateCreditAccountBalanceFromPusher = exports.updateChargeCardTransactionReceiptFromPusher = exports.updateChargeCardTransactionFromPusher = exports.updateChargeCardTransactionStatusFromPusher = exports.updateChargeCardSpendingFromPusher = exports.updateChargeCardStatusFromPusher = exports.updateChargeCardTransactionAttachments = exports.updateCompanyHealthViewUIState = void 0;
|
|
66
|
+
exports.updateChargeCardListSearchText = exports.updateBulkActionCardIds = exports.resetIssueChargeCardForm = exports.updateLastIssuedCardIds = exports.updateChargeCardsLocalStore = exports.updateCustomAddressId = exports.getDebitCardSummary = exports.getDebitCardList = exports.fetchDepositAccountListForCards = exports.fetchIssueCardPage = exports.issueChargeCards = exports.toCardType = exports.toShippingAddressType = exports.toCardAddressType = exports.getDepositAccountLimitForChargeCardByDepositAccountId = exports.expressInterestInChargeCard = exports.acceptChargeCardTerms = exports.enableChargeCardAutoPay = exports.fetchChargeCardSetupView = exports.getChargeCardStatements = exports.fetchChargeCardStatementList = exports.getChargeCardSetupViewDetails = exports.applyAiCardCreationFormDraftUpdate = exports.deriveAiCardRowsFromTeams = exports.buildAiCardCreationFormDraftSeed = exports.toIssueChargeCardLocalDataFromDraft = exports.selectIssueChargeCardLocalDataFromDraft = exports.getAiCardCreationFormDraft = exports.updateAiCardCreationFormDraft = exports.seedAiCardCreationFormDraft = exports.clearAiCardCreationFormDraft = exports.getLastIssuedChargeCardIds = exports.getLastIssueChargeCardsSourceChatSessionId = exports.getIssueChargeCardsSaveStatus = exports.getIssueChargeCardView = exports.getInFlightIssueChargeCardsCount = exports.getDepositAccountListWithDebitCardIssued = exports.toCreditLimitFrequencyCodeType = exports.getZeniDateFromPeriod = exports.getCashbackDetail = exports.toChargeCardSortKeyType = exports.fetchCashbackDetail = exports.fetchChargeCardTransactionList = exports.getChargeCardCVVActivateView = exports.getChargeCardBulkActionView = exports.getChargeCardRowActionView = exports.getChargeCardRecurringExpensesView = exports.getChargeCardRecurringExpensesByCardIds = exports.getDebitCardSetPinView = exports.getChargeCardTransactionAttachmentView = void 0;
|
|
67
|
+
exports.updateApAgingDetailUIState = exports.getApAgingDetailForVendor = exports.fetchApAgingDetail = exports.updateApAgingUIState = exports.getApAgingReport = exports.fetchApAging = exports.aggregatedReportView = exports.fetchAggregatedReport = exports.toTimeSeriesDuration = exports.convertToTimeSeriesSelectionRange = exports.TIME_SERIES_DURATIONS = exports.anyCardOnHold = exports.getChargeCardById = exports.setCurrentDisplayedCardId = exports.setFirstViewCompleteAfterActivation = exports.setFirstViewAfterActivation = exports.completeCardUserOnboardingActivationWait = exports.startCardUserOnboardingActivationWait = exports.fetchChargeCardsRecurringExpenses = exports.updateChargeCardsSpendLimit = exports.closeChargeCards = exports.unlockChargeCards = exports.lockChargeCards = exports.revokeChargeCardsInvite = exports.updateRowActionCardId = exports.revokeCardInvite = exports.resendCardInvite = exports.updateChargeCardSpendLimitSuccessOrFailure = exports.updateChargeCardSpendLimit = exports.startCVVActivationWait = exports.completeCVVActivationWait = exports.fetchChargeCardTransactionAttachments = exports.updateChargeCardTransactionIsViewReceiptClicked = exports.updateChargeCardTransactionReceiptsShowTickFetchStatus = exports.updateDebitCardPinAttempt = exports.startDebitCardSetPinWait = exports.completeDebitCardSetPinWait = exports.updateChargeCardTransactionUploadReceiptsFetchStatus = exports.saveCardOnboardingUserDetails = exports.updateCardUserOnboardingLocalData = exports.initializeCardUserOnboardingLocalData = exports.getCardUserOnboardingView = exports.updateChargeCardName = exports.closeChargeCard = exports.unlockChargeCard = exports.lockChargeCard = exports.updatePhysicalChargeCardAttempt = exports.updateChargeCardDetail = exports.updateCashbackDetailUIState = exports.updateChargeCardListUIState = void 0;
|
|
68
|
+
exports.getAccruedScheduleDetailsView = exports.getScheduleDetailsView = exports.fetchScheduleDetails = exports.updateSelectedJEScheduleKey = exports.updateScheduleListSortState = exports.updateScheduleListScrollState = exports.updateScheduleListSearchText = exports.updateScheduleListSubTab = exports.toScheduleSubTabType = exports.toScheduleListTabsFileTypeStrict = exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.getFetchStateForScheduleAccountList = exports.updateScheduleListLocalData = exports.fetchSchedulesAccount = exports.fetchDownloadSchedules = exports.fetchAccruedScheduleList = exports.fetchScheduleList = exports.getAccruedScheduleListReport = exports.getScheduleListReport = exports.ALL_SCHEDULES_TYPES = exports.getJEScheduleTransactionKey = exports.resetAccruedDetailNewScheduleState = exports.resetSelectedJEAccruedScheduleKey = exports.updateSelectedJEAccruedScheduleKey = exports.updateScheduleAccruedDetailsLocalData = exports.updateLinkBillExpenseLocalData = exports.clearSelectedJELinkRowIndex = exports.fetchRecommendedTransactionRowIndex = exports.updatedJELinkInLocalDataAccruedExpenses = exports.updatedJEAccruedLinkWithRecommendedLocalData = exports.updateAmountsInScheduleAccruedDetail = exports.saveScheduleAccruedDetails = exports.resetJEAccruedLinkInLocalData = exports.fetchScheduleAccruedDetailsPage = exports.fetchScheduleAccruedDetails = exports.cancelScheduleAccruedJournalEntry = exports.deleteScheduleAccruedDetail = exports.createNewSchedulesAccrued = exports.updateJeScheduleTransactionKeys = exports.updateJeScheduleLocalDataById = exports.updateExpenseAutomationJESchedulesUIState = exports.retryExpenseAutomationJESchedule = exports.removeJeScheduleTransactionKey = exports.initializeJeScheduleLocalData = exports.initializeJeAccountSettingsView = exports.ignoreExpenseAutomationJESchedule = exports.fetchExpenseAutomationJESchedulesPage = exports.clearExpenseAutomationJESchedulesView = exports.clearExpenseAutomationJEScheduleLocalData = void 0;
|
|
69
|
+
exports.getVendorGlobalReviewView = exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = exports.fetchGlobalMerchantRecommendation = exports.getVendorDetailSelectorView = exports.saveVendorDetailsView = exports.updateReviewVendorDetailLocalData = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewAttachments = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.getVendorTabView = exports.updateVendorTabViewTab = exports.fetchVendorTabView = exports.resetMarkAsCompleteStatus = exports.markAsCompleteScheduleDetail = exports.getDefaultSelectedTimeframeForScheduleType = exports.getFetchStateForScheduleListByType = exports.updatedJELinkWithRecommendedLocalData = exports.resetJELinkInLocalData = exports.updateAmountsInScheduleDetail = exports.updatedJELinkInLocalData = exports.getThirdPartyIDFromQBOURL = exports.getQBOUrlForLink = exports.updatedSelectedJELinkRowIndex = exports.updateAccruedJEScheduleAccruedByListKey = exports.updateScheduleListDownloadState = exports.updateScheduleDetailsLocalData = exports.createNewSchedules = exports.deleteScheduleDetail = exports.saveScheduleDetails = exports.fetchScheduleDetailsPage = void 0;
|
|
70
|
+
exports.updateTaskFromListView = exports.toDueDateGroupKeyType = exports.toTaskStatusCodeType = exports.toPriorityCodeType = exports.getDueDateValueFromDueDateGroupId = exports.initialTaskDetail = exports.fetchAllTaskGroups = exports.getTaskUpdates = exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.getCannedResponsesView = exports.deleteCannedResponse = exports.saveCannedResponse = exports.fetchCannedResponses = exports.archiveTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = exports.fetchTaskDetailPage = exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.getTaskGroupById = exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.updateArAgingNodeCollapseState = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = exports.fetchArAging = exports.updateVendorGlobalReviewViewLocalData = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId = void 0;
|
|
71
|
+
exports.updateNotificationViewSubTab = exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = exports.updateNotificationViewNotificationStatus = exports.updateNotificationViewAllNotificationsStatus = exports.fetchNotificationUnreadCountSuccess = exports.fetchNotificationUnreadCount = exports.fetchNotificationView = exports.toNotificationTabTypeStrict = exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = exports.parseOAuthParams = exports.getZeniOAuthApproveRedirectUrl = exports.getZeniOAuthApproveFetchState = exports.getZeniOAuthApproveError = exports.clearZeniOAuthView = exports.approveOAuthConsentSuccess = exports.approveOAuthConsentFailure = exports.approveOAuthConsent = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.saveReasonForAuditRule = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getUserFromAllUsers = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.clearCardPaymentView = exports.resetCardPaymentErrorStatuses = exports.fetchPaymentSources = exports.addCardPaymentSource = exports.confirmCardSetupIntent = exports.createCardSetupIntent = exports.getAllCardsAndBankPaymentMethods = exports.deleteTag = exports.createTag = exports.fetchTagList = exports.getAllTags = exports.ALL_TASK_LIST_TABS = exports.initialTaskDetailLocalData = exports.convertHHMMStrToMinutes = exports.unsnoozeTask = exports.snoozeTask = exports.removeTaskFromList = exports.updateTaskListTab = void 0;
|
|
72
|
+
exports.fetchTreasurySetupView = exports.acceptTreasuryTerms = exports.getExpressPayView = exports.resetExpressPayLocalData = exports.submitExpressPay = exports.updateExpressPayFormLocalData = exports.fetchExpressPayInitialDetails = exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.createTaskFromTaskGroupTemplate = exports.getCompanyTaskManagerView = exports.fetchTaskManagerMetrics = exports.fetchCompanyTaskManagerView = exports.fetchCockpitContext = exports.toRecurringFrequency = exports.toDayOfWeek = exports.getRecurringEndDateFromCount = exports.getMinAllowedEndDate = exports.SEMI_WEEKLY_REQUIRED_DAYS_COUNT = exports.ALL_WEEK_DAYS = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.getNotifications = exports.getLastNotificationTime = exports.pushToastNotification = exports.isFeatureInterestRegistered = exports.getRegisteredInterestsByFeature = exports.getRegisteredInterests = exports.getFeatureNotificationView = exports.notifyMeForFeature = exports.fetchRegisteredInterests = exports.clearFeatureNotificationView = exports.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState = void 0;
|
|
73
|
+
exports.updateResponseState = exports.deleteChatSession = exports.acceptMasterTOS = exports.fetchChatHistory = exports.stopSubmitQuestion = exports.stopSubmit = exports.createSessionAndSubmit = exports.clearLastContextMessage = exports.clearDeleteChatSessionStatus = exports.clearCurrentSessionId = exports.clearAiCfoView = exports.setSession = exports.clearInput = exports.updateCotCollapsedState = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.submitQuestion = exports.createSession = exports.fetchChatSessionsForUser = exports.getAiAccountantCockpitView = exports.updateAiAccountantUIState = exports.triggerAiAccountantJob = exports.setSelectedTenantIdsForJobTrigger = exports.fetchAiAccountantJobs = exports.fetchAiAccountantCustomers = exports.clearAiAccountantView = exports.cancelAiAccountantOnboarding = exports.getAiAccountantJobsByTenantId = exports.getAiAccountantCustomers = exports.updateAiAccountantJobs = exports.updateAiAccountantCustomer = exports.updateAiAccountantCustomers = exports.clearAllAiAccountantCustomers = exports.toAiAccountantJob = exports.toAiAccountantEnrollment = exports.toAiAccountantCustomer = exports.toAiAccountantOperationType = exports.toAiAccountantJobStatus = exports.toAiAccountantEnrollmentStatus = exports.getAllowedOperationsForStatus = exports.getTreasuryFundsMaximumYield = exports.getTreasurySetupViewDetails = exports.updateTreasuryVideoViewed = exports.updateTreasuryPromoRemindMeLaterClicked = exports.updateTreasuryPromoIntroClosedByOutsideClick = exports.updateFundAllocationLocalData = exports.fetchPortfolioAllocation = exports.updatePortfolioAllocation = exports.fetchTreasuryFunds = exports.clearTreasurySetupView = void 0;
|
|
74
|
+
exports.removeCardPolicyTemplate = exports.fetchCardPolicyVendorOptions = exports.fetchCardPolicyRecommendationFromUpload = exports.fetchCardPolicyMccCategories = exports.extractPolicyDocument = exports.clearPolicyDocumentExtraction = exports.toMessageType = exports.toMessageSender = exports.ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS = exports.toInteractiveFormTypeStrict = exports.toInteractiveFormType = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerStateType = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_INTERACTIVE_FORM_TYPES = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = exports.getSyntheticAiCfoAnswerByQuestionAnswerId = exports.getSyntheticAiCfoAnswersForChatSession = exports.getAiCfoSelectorView = exports.getAllQuestionsForChatSession = exports.getQuestionAnswerByIdForChatSession = exports.getAllQuestionAnswersForChatSession = exports.clearSyntheticAiCfoAnswers = exports.removeSyntheticAiCfoAnswer = exports.updateSyntheticAiCfoAnswer = exports.appendSyntheticAiCfoAnswer = exports.toAiCfoVisualization = exports.clearAiCfo = exports.clearSession = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = exports.updateAiCfoAnswerCardPolicyWizardPlan = exports.setSessions = exports.setNewSession = exports.getSuggestedQuestionsForPageContext = exports.getAiCfoView = exports.clearAiCfoSidePanelHostPageContext = exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions = void 0;
|
|
75
|
+
exports.applyExtractedPolicyToManualCardPolicyDraft = exports.applyExtractedPolicyToAiCardPolicyDraft = exports.toUpdateCardPolicyTemplateRequestBody = exports.toExtractedCardPolicyRules = exports.toCreateCardPolicyTemplatesRequestBody = exports.toCreateCardPolicyTemplateRequestBody = exports.toCardPolicyVendorSearchOption = exports.toCardPolicyTemplateList = exports.toCardPolicyTemplate = exports.toCardPolicyStats = exports.toCardPolicyEditFormDraft = exports.toBulkCreateCardPolicyTemplateError = exports.toCardPolicyTemplateStatus = exports.toCardPolicyTemplateMode = exports.ALL_CARD_POLICY_TEMPLATE_STATUSES = exports.ALL_CARD_POLICY_TEMPLATE_MODES = exports.getUploadedPolicyDocumentFileName = exports.getPolicyRecommendationFromUploadFetchState = exports.getPolicyRecommendationFromUploadError = exports.getPolicyRecommendationFromUploadChatSessionId = exports.getPolicyRecommendationFromUploadAnswerId = exports.getPolicyDocumentExtractionFetchState = exports.getPolicyDocumentExtractionError = exports.getExtractedCardPolicyRules = exports.getCardPolicyVendorSearchString = exports.getCardPolicyVendorSearchOptions = exports.getCardPolicyVendorSearchFetchState = exports.getCardPolicyTemplatesByIds = exports.getCardPolicyTemplateById = exports.getCardPolicySuggestedBlockMerchants = exports.getCardPolicySuggestedBlockCategories = exports.getCardPolicySuggestedAllowMerchants = exports.getCardPolicySuggestedAllowCategories = exports.getCardPolicyStats = exports.getCardPolicyMccCategoriesFetchState = exports.getCardPolicyMccCategoriesError = exports.getCardPolicyMccCategories = exports.getAllCardPolicyTemplates = exports.clearCardPolicy = exports.updatePolicyRecommendationFromUploadSuccess = exports.updatePolicyRecommendationFromUploadFailure = exports.updatePolicyDocumentExtractionSuccess = exports.updatePolicyDocumentExtractionFailure = exports.updateCreatedCardPolicyTemplate = exports.updateCardPolicyVendorOptionsFailure = exports.updateCardPolicyVendorOptions = exports.updateCardPolicyTemplates = exports.updateCardPolicyStats = exports.updateCardPolicyMccCategoriesFailure = exports.updateCardPolicyMccCategories = void 0;
|
|
76
|
+
exports.updateCardPolicyFormDraft = exports.updateCardPolicyFetchStatus = exports.updateCardPolicyDetailFetchStatus = exports.updateCardPolicy = exports.fetchCardPolicyDetail = exports.clearCardPolicyDetail = exports.getCardPolicyTemplateIds = exports.getCardPolicyListView = exports.getCardPolicyListFetchState = exports.getArchiveCardPolicyFetchState = exports.updateCardPolicyListFetchStatus = exports.updateArchiveCardPolicyFetchStatus = exports.fetchCardPolicyList = exports.clearCardPolicyList = exports.archiveCardPolicy = exports.toManualCardPolicyTemplateRequestFromDraft = exports.toBulkCardPolicyTemplateRequestsFromDraft = exports.toCardPolicyTemplateRequestFromDraft = exports.applyAiCardPolicyFormDraftUpdate = exports.deriveAiPolicyReviewRowsFromInputs = exports.buildManualCardPolicyFormDraftSeed = exports.buildUploadReviewRows = exports.buildEmptyLimitRows = exports.buildAiCardPolicyFormDraftSeed = exports.toVendorChipFieldValue = exports.toMccCategoryChipFieldValue = exports.buildVendorChipId = exports.buildMccCategoryChipId = exports.VENDOR_CHIP_ID_PREFIX = exports.MCC_CHIP_ID_PREFIX = exports.toMccCategoryLike = exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION = exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT = exports.getManualCardPolicyFormDraft = exports.getLastCreatedCardPolicyTemplateIds = exports.getLastCreatedCardPolicyTemplateId = exports.getLastCreateCardPolicyTemplateErrors = exports.getLastCreateCardPolicySourceChatSessionId = exports.getCreateCardPolicyTemplateRequestState = exports.getAiCardPolicyFormDraft = exports.updateManualCardPolicyFormDraft = exports.updateCreateCardPolicyTemplateRequestState = exports.updateAiCardPolicyFormDraftFromUploadPlan = exports.updateAiCardPolicyFormDraft = exports.seedManualCardPolicyFormDraft = exports.seedAiCardPolicyFormDraft = exports.createCardPolicyTemplates = exports.clearManualCardPolicyFormDraft = exports.clearCreateCardPolicy = exports.clearAiCardPolicyFormDraft = void 0;
|
|
77
|
+
exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.fetchAutoTransferReviewDetail = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRule = exports.updateAutoTransferRule = exports.createAutoTransferRule = exports.fetchAutoTransferRules = exports.getTreasuryTaxLetters = exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.getUpdateCardPolicyFetchState = exports.getCardPolicyFormDraft = exports.getCardPolicyDetailView = exports.getCardPolicyDetailFetchState = void 0;
|
|
78
78
|
const allowedValue_1 = require("./commonStateTypes/allowedValue");
|
|
79
79
|
Object.defineProperty(exports, "isAllowedValueWithCode", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithCode; } });
|
|
80
80
|
Object.defineProperty(exports, "isAllowedValueWithID", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithID; } });
|
|
@@ -1187,7 +1187,6 @@ Object.defineProperty(exports, "fetchProjectList", { enumerable: true, get: func
|
|
|
1187
1187
|
const projectListSelector_1 = require("./view/projectList/projectListSelector");
|
|
1188
1188
|
Object.defineProperty(exports, "getProjectList", { enumerable: true, get: function () { return projectListSelector_1.getProjectList; } });
|
|
1189
1189
|
const recommendationReducer_1 = require("./view/recommendation/recommendationReducer");
|
|
1190
|
-
Object.defineProperty(exports, "cancelEntityRecommendationsForLineUpdate", { enumerable: true, get: function () { return recommendationReducer_1.cancelEntityRecommendationsForLineUpdate; } });
|
|
1191
1190
|
Object.defineProperty(exports, "fetchEntityRecommendationsByTransactionId", { enumerable: true, get: function () { return recommendationReducer_1.fetchEntityRecommendationsByTransactionId; } });
|
|
1192
1191
|
Object.defineProperty(exports, "fetchEntityRecommendationsForLineUpdate", { enumerable: true, get: function () { return recommendationReducer_1.fetchEntityRecommendationsForLineUpdate; } });
|
|
1193
1192
|
Object.defineProperty(exports, "fetchRecommendationByEntityId", { enumerable: true, get: function () { return recommendationReducer_1.fetchRecommendationByEntityId; } });
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { RootState } from '../../../../reducer';
|
|
3
|
-
import { cancelEntityRecommendationsForLineUpdate } from '../../../recommendation/recommendationReducer';
|
|
4
3
|
import { initializeTransactionCategorizationViewLocalData, saveTransactionCategorizationLocalData } from '../../reducers/transactionsViewReducer';
|
|
5
|
-
export type ActionType = ReturnType<typeof initializeTransactionCategorizationViewLocalData> | ReturnType<typeof saveTransactionCategorizationLocalData
|
|
4
|
+
export type ActionType = ReturnType<typeof initializeTransactionCategorizationViewLocalData> | ReturnType<typeof saveTransactionCategorizationLocalData>;
|
|
6
5
|
export declare const initializeTransactionCategorizationViewLocalDataEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => import("rxjs").Observable<ActionType>;
|
|
@@ -6,7 +6,6 @@ const operators_1 = require("rxjs/operators");
|
|
|
6
6
|
const transactionHelper_1 = require("../../../../entity/transaction/transactionHelper");
|
|
7
7
|
const transactionSelector_1 = require("../../../../entity/transaction/transactionSelector");
|
|
8
8
|
const accountListSelector_1 = require("../../../accountList/accountListSelector");
|
|
9
|
-
const recommendationReducer_1 = require("../../../recommendation/recommendationReducer");
|
|
10
9
|
const transactionCategorizationLocalDataHelper_1 = require("../../helpers/transactionCategorizationLocalDataHelper");
|
|
11
10
|
const transactionsViewReducer_1 = require("../../reducers/transactionsViewReducer");
|
|
12
11
|
const transactionsViewState_1 = require("../../types/transactionsViewState");
|
|
@@ -55,20 +54,6 @@ const initializeTransactionCategorizationViewLocalDataEpic = (actions$, state$)
|
|
|
55
54
|
};
|
|
56
55
|
}
|
|
57
56
|
});
|
|
58
|
-
// Cancel any in-flight line-update recommendations fetch for the
|
|
59
|
-
// transactions whose local data is about to be wiped. Only runs
|
|
60
|
-
// for the destructive `keepExistingListItems === false` branch
|
|
61
|
-
// (list-page Cancel footer, modal confirm-reset, and the silent
|
|
62
|
-
// `backgroundRefetchReviewTab` path); the merge branch keeps
|
|
63
|
-
// existing per-line state intact and races no fetches.
|
|
64
|
-
if (keepExistingListItems === false) {
|
|
65
|
-
transactions.forEach((transaction) => {
|
|
66
|
-
fetchActions.push((0, recommendationReducer_1.cancelEntityRecommendationsForLineUpdate)({
|
|
67
|
-
id: transaction.id,
|
|
68
|
-
type: transaction.type,
|
|
69
|
-
}));
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
57
|
fetchActions.push((0, transactionsViewReducer_1.saveTransactionCategorizationLocalData)({
|
|
73
58
|
selectedTab,
|
|
74
59
|
transactionIds,
|
|
@@ -10,7 +10,6 @@ const get_1 = __importDefault(require("lodash/get"));
|
|
|
10
10
|
const uniq_1 = __importDefault(require("lodash/uniq"));
|
|
11
11
|
const timePeriod_1 = require("../../../commonStateTypes/timePeriod");
|
|
12
12
|
const vendorTransaction_1 = require("../../../entity/transaction/stateTypes/vendorTransaction");
|
|
13
|
-
const recommendationStaleResponseHelper_1 = require("../../recommendation/recommendationStaleResponseHelper");
|
|
14
13
|
const transactionCategorizationLocalDataHelper_1 = require("../helpers/transactionCategorizationLocalDataHelper");
|
|
15
14
|
const completedSubTab_1 = require("../types/completedSubTab");
|
|
16
15
|
const transactionsViewState_1 = require("../types/transactionsViewState");
|
|
@@ -524,66 +523,11 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
524
523
|
const transactionLocalData = (0, get_1.default)(draft.transactionCategorizationView[selectedTab]
|
|
525
524
|
.transactionReviewLocalDataById, transactionId.id, undefined);
|
|
526
525
|
if (transactionLocalData != null) {
|
|
527
|
-
|
|
528
|
-
// currently selected entity still matches the payload
|
|
529
|
-
// entity, so a response that lands after the user (or the
|
|
530
|
-
// silent backgroundRefetchReviewTab path) wiped local data
|
|
531
|
-
// can't overwrite the restored state. Lines that fail the
|
|
532
|
-
// guard are still released to Completed below so their
|
|
533
|
-
// inline skeletons resolve. Complements the epic-level
|
|
534
|
-
// `takeUntil`.
|
|
535
|
-
//
|
|
536
|
-
// List flow: ONLY vendor uses page-level `selectedEntity`;
|
|
537
|
-
// customer + JE + deposit all use per-line
|
|
538
|
-
// `selectedEntityLine`. This differs from the detail flow
|
|
539
|
-
// (where customer is page-level too) and matches the
|
|
540
|
-
// dichotomy in `setEntityRecommendationForLineIdInLocalData`.
|
|
541
|
-
const usesPageLevelEntity = (0, vendorTransaction_1.isVendorTransaction)(transaction);
|
|
542
|
-
const matchedLineIds = (0, recommendationStaleResponseHelper_1.getLineIdsWhereEntityStillMatches)({
|
|
543
|
-
lineIds,
|
|
544
|
-
payloadEntity: entity,
|
|
545
|
-
getCurrentEntityForLine: (lineId) => usesPageLevelEntity
|
|
546
|
-
? transactionLocalData.transactionReviewLocalData.selectedEntity
|
|
547
|
-
: transactionLocalData.transactionReviewLocalData.lineItemById[lineId]?.selectedEntityLine,
|
|
548
|
-
});
|
|
549
|
-
// When every line failed the guard, skip the helper entirely.
|
|
550
|
-
// The list-flow helper's `else` branch writes
|
|
551
|
-
// recommendations + account/class onto vendor-txn lines even
|
|
552
|
-
// when they're not in `recommendationLineIds` (so callers
|
|
553
|
-
// can fold full-transaction recs into untouched lines), and
|
|
554
|
-
// we don't want any of those writes when the whole response
|
|
555
|
-
// is stale. We still flip the per-line fetch flag so
|
|
556
|
-
// skeletons resolve.
|
|
557
|
-
if (matchedLineIds.length === 0) {
|
|
558
|
-
const existingLocalData = transactionLocalData.transactionReviewLocalData;
|
|
559
|
-
const releasedLineItems = { ...existingLocalData.lineItemById };
|
|
560
|
-
lineIds.forEach((lineId) => {
|
|
561
|
-
const lineItem = releasedLineItems[lineId];
|
|
562
|
-
if (lineItem != null) {
|
|
563
|
-
releasedLineItems[lineId] = {
|
|
564
|
-
...lineItem,
|
|
565
|
-
categoryClassRecommendationsFetchState: {
|
|
566
|
-
fetchState: 'Completed',
|
|
567
|
-
error: undefined,
|
|
568
|
-
},
|
|
569
|
-
};
|
|
570
|
-
}
|
|
571
|
-
});
|
|
572
|
-
draft.transactionCategorizationView[selectedTab].transactionReviewLocalDataById[transaction.id] = {
|
|
573
|
-
transactionId: transaction.id,
|
|
574
|
-
transactionReviewLocalData: {
|
|
575
|
-
...existingLocalData,
|
|
576
|
-
lineItemById: releasedLineItems,
|
|
577
|
-
},
|
|
578
|
-
};
|
|
579
|
-
return;
|
|
580
|
-
}
|
|
581
|
-
const newLocalData = (0, transactionCategorizationLocalDataHelper_1.setEntityRecommendationForLineIdInLocalData)(draft.transactionCategorizationView[selectedTab], transaction, transactionLocalData.transactionReviewLocalData, entity, matchedLineIds, uncategorizedAccounts, action.payload.recommendationWithCOTByLineId, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled);
|
|
526
|
+
const newLocalData = (0, transactionCategorizationLocalDataHelper_1.setEntityRecommendationForLineIdInLocalData)(draft.transactionCategorizationView[selectedTab], transaction, transactionLocalData.transactionReviewLocalData, entity, lineIds, uncategorizedAccounts, action.payload.recommendationWithCOTByLineId, isUncategorizedExpenseCategoryEnabled, isAccountingClassesEnabled);
|
|
582
527
|
// Release the per-line fetch flag for every line this fetch
|
|
583
|
-
// covered
|
|
584
|
-
//
|
|
585
|
-
//
|
|
586
|
-
// object), before we write it back to the draft.
|
|
528
|
+
// covered. Done in-place on the freshly returned local data
|
|
529
|
+
// (the helper produces a new mutable object), before we write
|
|
530
|
+
// it back to the draft.
|
|
587
531
|
lineIds.forEach((lineId) => {
|
|
588
532
|
const lineItem = newLocalData.lineItemById[lineId];
|
|
589
533
|
if (lineItem != null) {
|
|
@@ -600,9 +544,7 @@ const expenseAutomationTransactionsView = (0, toolkit_1.createSlice)({
|
|
|
600
544
|
transactionId: transaction.id,
|
|
601
545
|
transactionReviewLocalData: newLocalData,
|
|
602
546
|
};
|
|
603
|
-
// Mark transaction as dirty (autofill happened)
|
|
604
|
-
// reach this point with at least one matched line, so
|
|
605
|
-
// recommendations were applied.
|
|
547
|
+
// Mark transaction as dirty (autofill happened)
|
|
606
548
|
if (!draft.transactionCategorizationView[selectedTab].transactionIdsWithUnsavedData.includes(transaction.id)) {
|
|
607
549
|
draft.transactionCategorizationView[selectedTab].transactionIdsWithUnsavedData = [
|
|
608
550
|
...draft.transactionCategorizationView[selectedTab]
|
|
@@ -4,6 +4,6 @@ import { RootState } from '../../reducer';
|
|
|
4
4
|
import { ZeniAPI } from '../../zeniAPI';
|
|
5
5
|
import { markCategoryClassRecommendationsCompletedForCategorization, markCategoryClassRecommendationsFailureForCategorization, markCategoryClassRecommendationsInProgressForCategorization, setEntityRecommendationForLineIdsForCategorization } from '../expenseAutomationView/reducers/transactionsViewReducer';
|
|
6
6
|
import { markCategoryClassRecommendationsCompletedForTransactionDetail, markCategoryClassRecommendationsFailureForTransactionDetail, markCategoryClassRecommendationsInProgressForTransactionDetail, setEntityRecommendationForLineIdsForTransactionDetail } from '../transactionDetail/transactionDetailReducer';
|
|
7
|
-
import {
|
|
8
|
-
export type ActionType = ReturnType<typeof fetchEntityRecommendationsForLineUpdate> | ReturnType<typeof
|
|
7
|
+
import { fetchEntityRecommendationsForLineUpdate } from './recommendationReducer';
|
|
8
|
+
export type ActionType = ReturnType<typeof fetchEntityRecommendationsForLineUpdate> | ReturnType<typeof markCategoryClassRecommendationsInProgressForCategorization> | ReturnType<typeof markCategoryClassRecommendationsCompletedForCategorization> | ReturnType<typeof markCategoryClassRecommendationsFailureForCategorization> | ReturnType<typeof markCategoryClassRecommendationsInProgressForTransactionDetail> | ReturnType<typeof markCategoryClassRecommendationsCompletedForTransactionDetail> | ReturnType<typeof markCategoryClassRecommendationsFailureForTransactionDetail> | ReturnType<typeof setEntityRecommendationForLineIdsForCategorization> | ReturnType<typeof setEntityRecommendationForLineIdsForTransactionDetail>;
|
|
9
9
|
export declare const fetchEntityRecommendationsForLineUpdateEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -86,15 +86,6 @@ const fetchEntityRecommendationsForLineUpdateEpic = (actions$, state$, zeniAPI)
|
|
|
86
86
|
? (0, transactionsViewReducer_1.markCategoryClassRecommendationsFailureForCategorization)(payload.selectedTab, transactionId, lineIds, status)
|
|
87
87
|
: (0, transactionDetailReducer_1.markCategoryClassRecommendationsFailureForTransactionDetail)(transactionId, lineIds, status));
|
|
88
88
|
}));
|
|
89
|
-
|
|
90
|
-
// downstream success/failure/markCompleted emission once a
|
|
91
|
-
// cancel action lands for the same transactionId. groupBy +
|
|
92
|
-
// switchMap already handle re-fetch-on-same-target; takeUntil
|
|
93
|
-
// covers the user-initiated Cancel (detail footer + list
|
|
94
|
-
// footer) and the silent backgroundRefetchReviewTab path,
|
|
95
|
-
// which both wipe local data without dispatching another
|
|
96
|
-
// fetch on the same target.
|
|
97
|
-
const cancel$ = actions$.pipe((0, operators_1.filter)(recommendationReducer_1.cancelEntityRecommendationsForLineUpdate.match), (0, operators_1.filter)((a) => a.payload.transactionId.id === transactionId.id));
|
|
98
|
-
return (0, rxjs_1.concat)((0, rxjs_1.of)(startAction), httpStream$.pipe((0, operators_1.takeUntil)(cancel$)));
|
|
89
|
+
return (0, rxjs_1.concat)((0, rxjs_1.of)(startAction), httpStream$);
|
|
99
90
|
}))));
|
|
100
91
|
exports.fetchEntityRecommendationsForLineUpdateEpic = fetchEntityRecommendationsForLineUpdateEpic;
|
|
@@ -41,9 +41,7 @@ export declare const fetchEntityRecommendationsByTransactionId: import("@reduxjs
|
|
|
41
41
|
isTransactionCategorizationFlow: any;
|
|
42
42
|
isFetchCOT: any;
|
|
43
43
|
isUncategorizedExpenseCategoryEnabled: boolean | undefined;
|
|
44
|
-
}, "recommendation/fetchEntityRecommendationsByTransactionId", never, never>, fetchEntityRecommendationsForLineUpdate: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[args: FetchEntityRecommendationsForLineUpdatePayload], FetchEntityRecommendationsForLineUpdatePayload, "recommendation/fetchEntityRecommendationsForLineUpdate", never, never>,
|
|
45
|
-
transactionId: TransactionID;
|
|
46
|
-
}, "recommendation/cancelEntityRecommendationsForLineUpdate", never, never>, fetchRecommendationByEntityName: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[entityName: string, entityType: EntityType], {
|
|
44
|
+
}, "recommendation/fetchEntityRecommendationsByTransactionId", never, never>, fetchEntityRecommendationsForLineUpdate: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[args: FetchEntityRecommendationsForLineUpdatePayload], FetchEntityRecommendationsForLineUpdatePayload, "recommendation/fetchEntityRecommendationsForLineUpdate", never, never>, fetchRecommendationByEntityName: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[entityName: string, entityType: EntityType], {
|
|
47
45
|
entityName: string;
|
|
48
46
|
entityType: EntityType;
|
|
49
47
|
}, "recommendation/fetchRecommendationByEntityName", never, never>, fetchRecommendationByEntityId: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[entityId: string, entityType: EntityType], {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearRecommendation = exports.indicateReadyToInitializeRecommendation = exports.updateRecommendationForEntityFailure = exports.updateRecommendationForEntity = exports.fetchRecommendationByEntityId = exports.fetchRecommendationByEntityName = exports.
|
|
4
|
+
exports.clearRecommendation = exports.indicateReadyToInitializeRecommendation = exports.updateRecommendationForEntityFailure = exports.updateRecommendationForEntity = exports.fetchRecommendationByEntityId = exports.fetchRecommendationByEntityName = exports.fetchEntityRecommendationsForLineUpdate = exports.fetchEntityRecommendationsByTransactionId = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const recommendationState_1 = require("./recommendationState");
|
|
7
7
|
exports.initialState = {
|
|
@@ -62,23 +62,6 @@ const recommendation = (0, toolkit_1.createSlice)({
|
|
|
62
62
|
return { payload: args };
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
|
-
// No-op reducer; the action exists purely so the line-update epic
|
|
66
|
-
// can observe it via `takeUntil` and kill an in-flight HTTP request
|
|
67
|
-
// when the user (or a background refresh) wipes local data before
|
|
68
|
-
// the response lands. Without this, a stale response races the reset
|
|
69
|
-
// and overwrites the user's intent. Cancel is keyed by
|
|
70
|
-
// `transactionId` only: per-page Cancel buttons cancel everything
|
|
71
|
-
// under that transaction (including JE sibling line sets), which
|
|
72
|
-
// matches the UI semantics on both detail and categorization pages.
|
|
73
|
-
cancelEntityRecommendationsForLineUpdate: {
|
|
74
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
75
|
-
reducer(_draft, _action) {
|
|
76
|
-
// intentionally empty
|
|
77
|
-
},
|
|
78
|
-
prepare(transactionId) {
|
|
79
|
-
return { payload: { transactionId } };
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
65
|
fetchRecommendationByEntityName: {
|
|
83
66
|
reducer(draft, action) {
|
|
84
67
|
const { entityName, entityType } = action.payload;
|
|
@@ -157,7 +140,7 @@ const recommendation = (0, toolkit_1.createSlice)({
|
|
|
157
140
|
},
|
|
158
141
|
},
|
|
159
142
|
});
|
|
160
|
-
_a = recommendation.actions, exports.fetchEntityRecommendationsByTransactionId = _a.fetchEntityRecommendationsByTransactionId, exports.fetchEntityRecommendationsForLineUpdate = _a.fetchEntityRecommendationsForLineUpdate, exports.
|
|
143
|
+
_a = recommendation.actions, exports.fetchEntityRecommendationsByTransactionId = _a.fetchEntityRecommendationsByTransactionId, exports.fetchEntityRecommendationsForLineUpdate = _a.fetchEntityRecommendationsForLineUpdate, exports.fetchRecommendationByEntityName = _a.fetchRecommendationByEntityName, exports.fetchRecommendationByEntityId = _a.fetchRecommendationByEntityId, exports.updateRecommendationForEntity = _a.updateRecommendationForEntity, exports.updateRecommendationForEntityFailure = _a.updateRecommendationForEntityFailure, exports.indicateReadyToInitializeRecommendation = _a.indicateReadyToInitializeRecommendation, exports.clearRecommendation = _a.clearRecommendation;
|
|
161
144
|
exports.default = recommendation.reducer;
|
|
162
145
|
const doUpdateRecommendationForEntity = (draft, entityId, entityType, payload) => {
|
|
163
146
|
const key = (0, recommendationState_1.getEntityRecommendationKey)(entityType, entityId);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
2
|
import { RootState } from '../../../reducer';
|
|
3
|
-
import { cancelEntityRecommendationsForLineUpdate } from '../../recommendation/recommendationReducer';
|
|
4
3
|
import { clearTransactionDetailLocalData, initializeTransactionDetailLocalData, saveTransactionDetailLocalData } from '../transactionDetailReducer';
|
|
5
|
-
export type ActionType = ReturnType<typeof initializeTransactionDetailLocalData> | ReturnType<typeof saveTransactionDetailLocalData> | ReturnType<typeof clearTransactionDetailLocalData
|
|
4
|
+
export type ActionType = ReturnType<typeof initializeTransactionDetailLocalData> | ReturnType<typeof saveTransactionDetailLocalData> | ReturnType<typeof clearTransactionDetailLocalData>;
|
|
6
5
|
export declare const initializeTransactionDetailLocalDataEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => import("rxjs").Observable<ActionType>;
|
|
@@ -5,7 +5,6 @@ const rxjs_1 = require("rxjs");
|
|
|
5
5
|
const operators_1 = require("rxjs/operators");
|
|
6
6
|
const transactionSelector_1 = require("../../../entity/transaction/transactionSelector");
|
|
7
7
|
const accountListSelector_1 = require("../../accountList/accountListSelector");
|
|
8
|
-
const recommendationReducer_1 = require("../../recommendation/recommendationReducer");
|
|
9
8
|
const transactionDetailLocalDataHelper_1 = require("../transactionDetailLocalDataHelper");
|
|
10
9
|
const transactionDetailReducer_1 = require("../transactionDetailReducer");
|
|
11
10
|
const transactionDetailState_1 = require("../transactionDetailState");
|
|
@@ -18,12 +17,6 @@ const initializeTransactionDetailLocalDataEpic = (actions$, state$) => actions$.
|
|
|
18
17
|
if (detail != null) {
|
|
19
18
|
const uncategorizedIncomeExpense = (0, accountListSelector_1.getUncategorizedAccounts)(state$.value.accountState, state$.value.accountListState, 'accountList');
|
|
20
19
|
const localData = (0, transactionDetailLocalDataHelper_1.toTransactionDetailLocalData)(detail, vendorId, uncategorizedIncomeExpense);
|
|
21
|
-
// Cancel any in-flight line-update recommendations fetch for
|
|
22
|
-
// this transaction BEFORE the clear+restore writes land. The
|
|
23
|
-
// shared epic's takeUntil observes this action and unsubscribes
|
|
24
|
-
// the HTTP stream, preventing a stale response from being
|
|
25
|
-
// applied to the freshly-restored local data.
|
|
26
|
-
fetchActions.push((0, recommendationReducer_1.cancelEntityRecommendationsForLineUpdate)(transactionId));
|
|
27
20
|
fetchActions.push((0, transactionDetailReducer_1.clearTransactionDetailLocalData)({ transactionId }));
|
|
28
21
|
fetchActions.push((0, transactionDetailReducer_1.saveTransactionDetailLocalData)({
|
|
29
22
|
transactionId,
|
|
@@ -8,9 +8,6 @@ exports.setIsVendorUpdateAllChecked = exports.updateVendorBulkRecommendationsFet
|
|
|
8
8
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
9
|
const get_1 = __importDefault(require("lodash/get"));
|
|
10
10
|
const entity_1 = require("../../entity/genericEntity/entity");
|
|
11
|
-
const customerTransaction_1 = require("../../entity/transaction/stateTypes/customerTransaction");
|
|
12
|
-
const vendorTransaction_1 = require("../../entity/transaction/stateTypes/vendorTransaction");
|
|
13
|
-
const recommendationStaleResponseHelper_1 = require("../recommendation/recommendationStaleResponseHelper");
|
|
14
11
|
const transactionDetailLocalDataHelper_1 = require("./transactionDetailLocalDataHelper");
|
|
15
12
|
const transactionDetailState_1 = require("./transactionDetailState");
|
|
16
13
|
exports.initialState = {
|
|
@@ -261,17 +258,6 @@ const transactionDetail = (0, toolkit_1.createSlice)({
|
|
|
261
258
|
// captures the snapshot before the epic's start arm runs and would
|
|
262
259
|
// otherwise clobber In-Progress back to undefined). Treat the field as
|
|
263
260
|
// sticky: only let the caller override it when they explicitly set it.
|
|
264
|
-
//
|
|
265
|
-
// Note on Cancel: the explicit user-Cancel path NO LONGER relies on
|
|
266
|
-
// this stickiness to release In-Progress lines. Cancel dispatches
|
|
267
|
-
// `cancelEntityRecommendationsForLineUpdate` ahead of the
|
|
268
|
-
// clear+save pair (see initializeTransactionDetailLocalDataEpic);
|
|
269
|
-
// the shared line-update epic's `takeUntil` catches that action
|
|
270
|
-
// and unsubscribes the HTTP stream, so no markCompleted /
|
|
271
|
-
// setEntityRecommendation arm fires for the cancelled fetch.
|
|
272
|
-
// Stickiness still matters for the BENIGN snapshot-rebuild paths
|
|
273
|
-
// described above where a fetch is legitimately in flight and
|
|
274
|
-
// must keep its skeleton until the success/failure arm lands.
|
|
275
261
|
const mergedLineItemById = {};
|
|
276
262
|
Object.entries(incoming.lineItemById ?? {}).forEach(([lineId, line]) => {
|
|
277
263
|
mergedLineItemById[lineId] = {
|
|
@@ -407,37 +393,10 @@ const transactionDetail = (0, toolkit_1.createSlice)({
|
|
|
407
393
|
const key = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
|
|
408
394
|
const detail = (0, get_1.default)(draft.transactionDetailById, key, undefined);
|
|
409
395
|
if (detail != null) {
|
|
410
|
-
|
|
411
|
-
// (or Cancel restored an earlier vendor) between the fetch
|
|
412
|
-
// starting and the response landing, the payload entity will
|
|
413
|
-
// no longer match what's currently selected on the line(s).
|
|
414
|
-
// Apply recommendations only to the still-matching subset of
|
|
415
|
-
// lines. Lines that fail the guard still flip to Completed
|
|
416
|
-
// below so their inline skeletons resolve. This complements
|
|
417
|
-
// the epic-level `takeUntil`: even if a response slips
|
|
418
|
-
// through, it can't write recommendations onto unrelated
|
|
419
|
-
// selections.
|
|
420
|
-
//
|
|
421
|
-
// Detail flow: vendor + customer use page-level
|
|
422
|
-
// `selectedEntity`; JE / deposit use per-line `lineEntity`.
|
|
423
|
-
// Match the same dichotomy used by
|
|
424
|
-
// `setEntityRecommendationForLineIdInLocalData`'s
|
|
425
|
-
// `checkIfNotJEAndDeposit` test below.
|
|
426
|
-
const usesPageLevelEntity = (0, vendorTransaction_1.isVendorTransaction)(transaction) === true ||
|
|
427
|
-
(0, customerTransaction_1.isCustomerTransaction)(transaction) === true;
|
|
428
|
-
const matchedLineIds = (0, recommendationStaleResponseHelper_1.getLineIdsWhereEntityStillMatches)({
|
|
429
|
-
lineIds,
|
|
430
|
-
payloadEntity: action.payload.entity,
|
|
431
|
-
getCurrentEntityForLine: (lineId) => usesPageLevelEntity
|
|
432
|
-
? detail.transactionDetailLocalData.selectedEntity
|
|
433
|
-
: detail.transactionDetailLocalData.lineItemById[lineId]
|
|
434
|
-
?.lineEntity,
|
|
435
|
-
});
|
|
436
|
-
const newLocalData = (0, transactionDetailLocalDataHelper_1.setEntityRecommendationForLineIdInLocalData)(transaction, detail.transactionDetailLocalData, action.payload.entity, matchedLineIds, uncategorizedIncomeExpense, recommendationWithCOTByLineId);
|
|
396
|
+
const newLocalData = (0, transactionDetailLocalDataHelper_1.setEntityRecommendationForLineIdInLocalData)(transaction, detail.transactionDetailLocalData, action.payload.entity, lineIds, uncategorizedIncomeExpense, recommendationWithCOTByLineId);
|
|
437
397
|
// Release the per-line fetch flag for every line this fetch
|
|
438
|
-
// covered
|
|
439
|
-
//
|
|
440
|
-
// Unmatched lines are released without recommendation writes.
|
|
398
|
+
// covered so the inline skeleton resolves and the page-level
|
|
399
|
+
// Save button can re-enable.
|
|
441
400
|
lineIds.forEach((lineId) => {
|
|
442
401
|
const lineItem = newLocalData.lineItemById[lineId];
|
|
443
402
|
if (lineItem != null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.95
|
|
3
|
+
"version": "5.0.95",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Two entities refer to the same real-world thing iff they share both
|
|
2
|
-
// type and id. We deliberately compare on these fields only — qboId /
|
|
3
|
-
// zeniId can lag during entity-create flows where the persisted id
|
|
4
|
-
// hasn't been roundtripped yet, while `id` is the local-source-of-truth
|
|
5
|
-
// the line carries.
|
|
6
|
-
const entitiesMatch = (a, b) => a != null && b != null && a.type === b.type && a.id === b.id;
|
|
7
|
-
// Filters `lineIds` down to those whose currently selected entity (as
|
|
8
|
-
// reported by the caller) still matches the payload entity at the
|
|
9
|
-
// moment the success reducer fires. Used by the two
|
|
10
|
-
// `setEntityRecommendationForLineIds…` reducers as a defensive guard
|
|
11
|
-
// against stale responses landing after the user (or a background
|
|
12
|
-
// refresh) has changed or wiped their selection.
|
|
13
|
-
//
|
|
14
|
-
// Each flow decides separately where the "current entity" lives,
|
|
15
|
-
// because the rules diverge:
|
|
16
|
-
// - Detail flow: vendor + customer transactions read from page-level
|
|
17
|
-
// `selectedEntity`; JE / deposit reads per-line `lineEntity`.
|
|
18
|
-
// - List flow: ONLY vendor reads from page-level `selectedEntity`;
|
|
19
|
-
// customer, JE, deposit all read per-line `selectedEntityLine`.
|
|
20
|
-
// Pushing the lookup into the caller keeps this helper a pure
|
|
21
|
-
// comparator and avoids the helper having to know which flow / page-
|
|
22
|
-
// level rule applies.
|
|
23
|
-
export const getLineIdsWhereEntityStillMatches = (args) => {
|
|
24
|
-
const { lineIds, payloadEntity, getCurrentEntityForLine } = args;
|
|
25
|
-
return lineIds.filter((lineId) => entitiesMatch(payloadEntity, getCurrentEntityForLine(lineId)));
|
|
26
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { Entity } from '../../entity/genericEntity/entity';
|
|
3
|
-
export declare const getLineIdsWhereEntityStillMatches: (args: {
|
|
4
|
-
lineIds: ID[];
|
|
5
|
-
payloadEntity: Entity;
|
|
6
|
-
getCurrentEntityForLine: (lineId: ID) => Entity | undefined;
|
|
7
|
-
}) => ID[];
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLineIdsWhereEntityStillMatches = void 0;
|
|
4
|
-
// Two entities refer to the same real-world thing iff they share both
|
|
5
|
-
// type and id. We deliberately compare on these fields only — qboId /
|
|
6
|
-
// zeniId can lag during entity-create flows where the persisted id
|
|
7
|
-
// hasn't been roundtripped yet, while `id` is the local-source-of-truth
|
|
8
|
-
// the line carries.
|
|
9
|
-
const entitiesMatch = (a, b) => a != null && b != null && a.type === b.type && a.id === b.id;
|
|
10
|
-
// Filters `lineIds` down to those whose currently selected entity (as
|
|
11
|
-
// reported by the caller) still matches the payload entity at the
|
|
12
|
-
// moment the success reducer fires. Used by the two
|
|
13
|
-
// `setEntityRecommendationForLineIds…` reducers as a defensive guard
|
|
14
|
-
// against stale responses landing after the user (or a background
|
|
15
|
-
// refresh) has changed or wiped their selection.
|
|
16
|
-
//
|
|
17
|
-
// Each flow decides separately where the "current entity" lives,
|
|
18
|
-
// because the rules diverge:
|
|
19
|
-
// - Detail flow: vendor + customer transactions read from page-level
|
|
20
|
-
// `selectedEntity`; JE / deposit reads per-line `lineEntity`.
|
|
21
|
-
// - List flow: ONLY vendor reads from page-level `selectedEntity`;
|
|
22
|
-
// customer, JE, deposit all read per-line `selectedEntityLine`.
|
|
23
|
-
// Pushing the lookup into the caller keeps this helper a pure
|
|
24
|
-
// comparator and avoids the helper having to know which flow / page-
|
|
25
|
-
// level rule applies.
|
|
26
|
-
const getLineIdsWhereEntityStillMatches = (args) => {
|
|
27
|
-
const { lineIds, payloadEntity, getCurrentEntityForLine } = args;
|
|
28
|
-
return lineIds.filter((lineId) => entitiesMatch(payloadEntity, getCurrentEntityForLine(lineId)));
|
|
29
|
-
};
|
|
30
|
-
exports.getLineIdsWhereEntityStillMatches = getLineIdsWhereEntityStillMatches;
|