@zeniai/client-epic-state 5.0.83-betaRR3 → 5.0.83-betaRR5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/aiCfo/aiCfoPayload.d.ts +1 -4
- package/lib/entity/aiCfo/aiCfoReducer.js +3 -11
- package/lib/entity/aiCfo/aiCfoState.d.ts +0 -19
- package/lib/entity/aiCfo/aiCfoState.js +1 -8
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.d.ts +3 -2
- package/lib/entity/cardPolicy/policyRecommendationFromUploadEpic.js +3 -2
- package/lib/epic.d.ts +14 -12
- package/lib/epic.js +14 -12
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +4 -12
- package/lib/esm/entity/aiCfo/aiCfoState.js +0 -7
- package/lib/esm/entity/cardPolicy/policyRecommendationFromUploadEpic.js +4 -3
- package/lib/esm/epic.js +14 -12
- package/lib/esm/index.js +14 -3
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +328 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +120 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +60 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +118 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +33 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +385 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +34 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +33 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +17 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +144 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +137 -1
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +18 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +148 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +112 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +101 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +71 -0
- package/lib/esm/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +34 -0
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +13 -6
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +1 -3
- package/lib/esm/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -5
- package/lib/index.d.ts +20 -4
- package/lib/index.js +45 -4
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.d.ts +38 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate.js +333 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.d.ts +25 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToAiCardPolicyDraft.js +124 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.d.ts +28 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic.js +64 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.d.ts +17 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToManualCardPolicyDraft.js +122 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.d.ts +23 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyUploadPlanToAiCardPolicyDraft.js +37 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.d.ts +38 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed.js +391 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.d.ts +11 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed.js +38 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.d.ts +24 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds.js +40 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.d.ts +253 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes.js +21 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.d.ts +66 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyRequestParts.js +151 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.d.ts +40 -1
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer.js +138 -2
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector.js +20 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyState.d.ts +28 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.d.ts +30 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs.js +152 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.d.ts +26 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic.js +116 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.d.ts +35 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft.js +105 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.d.ts +23 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft.js +75 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.d.ts +15 -0
- package/lib/view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft.js +38 -0
- package/lib/view/spendManagement/chargeCards/issueChargeCard/aiCardCreationFormDraftTypes.d.ts +3 -6
- package/lib/view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate.js +0 -1
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.d.ts +6 -3
- package/lib/view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed.js +13 -6
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.d.ts +1 -4
- package/lib/view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams.js +1 -3
- package/lib/view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft.js +0 -5
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSlice } from '@reduxjs/toolkit';
|
|
2
2
|
import { date as zeniDate } from '../../zeniDayJS';
|
|
3
|
-
import { ALL_AI_CFO_ANSWER_RESPONSE_TYPES,
|
|
3
|
+
import { ALL_AI_CFO_ANSWER_RESPONSE_TYPES, toAiCfoAnswerResponseType, toAiCfoAnswerResponseTypeStrict, toAiCfoAnswerStateType, toAiCfoVisualizationTypeStrict, toInteractiveFormTypeStrict, toMessageSender, toMessageType, toYFormatScaleStrict, toYFormatTypeStrict, toYFormatUnitStrict, } from './aiCfoState';
|
|
4
4
|
export const initialAiCfoState = {
|
|
5
5
|
aiCfoByChatSessionId: {},
|
|
6
6
|
partialQuestionAnswers: {},
|
|
@@ -197,14 +197,8 @@ const inferInteractiveFormTypeFromPayload = (payload) => {
|
|
|
197
197
|
* universe -> `cardNameOptions` (step-2 swap + step-1 "Add something
|
|
198
198
|
* else" search).
|
|
199
199
|
* - `create` (1-step): `is_suggested: true` rows -> `cardRows` pre-seeded
|
|
200
|
-
* for the step-2 editable table
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
* `cardOptions` (physical / virtual / subscription) is intentionally not
|
|
204
|
-
* derived here — the wire never carries it. The component prop is fed
|
|
205
|
-
* from `AI_CARD_CREATION_VIRTUAL_ONLY_CARD_OPTIONS` at render time. The
|
|
206
|
-
* state field is preserved as `[]` for backward compatibility with
|
|
207
|
-
* consumers that still narrow on it.
|
|
200
|
+
* for the step-2 editable table; the full universe -> `cardNameOptions`
|
|
201
|
+
* (step-2 swap).
|
|
208
202
|
*/
|
|
209
203
|
const toCardsCreationInitialData = (payload) => {
|
|
210
204
|
const suggestedCards = payload.suggested_cards ?? [];
|
|
@@ -222,7 +216,6 @@ const toCardsCreationInitialData = (payload) => {
|
|
|
222
216
|
]));
|
|
223
217
|
const common = {
|
|
224
218
|
cardNameOptions,
|
|
225
|
-
cardOptions: [],
|
|
226
219
|
suggestedOwnerUserIdByTeamId,
|
|
227
220
|
};
|
|
228
221
|
if (payload.mode === 'create') {
|
|
@@ -231,7 +224,6 @@ const toCardsCreationInitialData = (payload) => {
|
|
|
231
224
|
mode: 'create',
|
|
232
225
|
cardRows: suggestedOnly.map(({ card, uniqueId }) => ({
|
|
233
226
|
cardKind: toCardKind(card.card_type),
|
|
234
|
-
cardOptionId: CARDS_CREATION_DEFAULT_CARD_OPTION_ID,
|
|
235
227
|
id: uniqueId,
|
|
236
228
|
label: card.card_name,
|
|
237
229
|
recommendedLimit: card.credit_limit > 0 ? card.credit_limit : undefined,
|
|
@@ -263,7 +255,7 @@ const CURRENCY_FORMATTER = new Intl.NumberFormat('en-US', {
|
|
|
263
255
|
* collapse to `undefined` so downstream resolvers don't try to look up
|
|
264
256
|
* a user with an empty id.
|
|
265
257
|
*/
|
|
266
|
-
const normalizeOwnerId = (ownerId) => ownerId != null && ownerId !== '' ? ownerId : undefined;
|
|
258
|
+
const normalizeOwnerId = (ownerId) => (ownerId != null && ownerId !== '' ? ownerId : undefined);
|
|
267
259
|
const KIND_RANK = {
|
|
268
260
|
vendor: 0,
|
|
269
261
|
category: 1,
|
|
@@ -59,13 +59,6 @@ export const toAiCfoAnswerStateType = (v) => stringToUnion(v, ALL_AI_CFO_ANSWER_
|
|
|
59
59
|
export const toAiCfoAnswerResponseType = (v) => stringToUnion(v, ALL_AI_CFO_ANSWER_RESPONSE_TYPES);
|
|
60
60
|
export const toAiCfoAnswerStateTypeStrict = (v) => stringToUnionStrict(v, ALL_AI_CFO_ANSWER_STATE_TYPES);
|
|
61
61
|
export const toAiCfoAnswerResponseTypeStrict = (v) => stringToUnionStrict(v, ALL_AI_CFO_ANSWER_RESPONSE_TYPES);
|
|
62
|
-
/**
|
|
63
|
-
* Default `cardOptionId` (physical / virtual / subscription) assigned to
|
|
64
|
-
* every seeded card row. The AI Card Creation flow currently issues virtual
|
|
65
|
-
* credit cards only — this constant is kept in sync with
|
|
66
|
-
* `AI_CARD_CREATION_VIRTUAL_ONLY_CARD_OPTIONS` in `zeni-web-app-ui`.
|
|
67
|
-
*/
|
|
68
|
-
export const CARDS_CREATION_DEFAULT_CARD_OPTION_ID = 'virtual';
|
|
69
62
|
const ALL_MESSAGE_SENDERS = ['user', 'agent'];
|
|
70
63
|
const ALL_MESSAGE_TYPES = ['plain_text', 'json'];
|
|
71
64
|
export const toMessageSender = (v) => stringToUnion(v, ALL_MESSAGE_SENDERS);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap, switchMap, takeUntil } from 'rxjs/operators';
|
|
3
|
-
import { updateAiCfoAnswerCardPolicyWizardPlan } from '../aiCfo/aiCfoReducer';
|
|
2
|
+
import { catchError, filter, mergeMap, switchMap, takeUntil, } from 'rxjs/operators';
|
|
4
3
|
import { createZeniAPIStatus, isSuccessStatus } from '../../responsePayload';
|
|
4
|
+
import { updateAiCardPolicyFormDraftFromUploadPlan } from '../../view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer';
|
|
5
|
+
import { updateAiCfoAnswerCardPolicyWizardPlan } from '../aiCfo/aiCfoReducer';
|
|
5
6
|
import { clearPolicyDocumentExtraction, fetchCardPolicyRecommendationFromUpload, updatePolicyRecommendationFromUploadFailure, updatePolicyRecommendationFromUploadSuccess, } from './cardPolicyReducer';
|
|
6
7
|
/**
|
|
7
8
|
* Listens for `fetchCardPolicyRecommendationFromUpload` and POSTs the
|
|
@@ -92,7 +93,7 @@ switchMap((action) => {
|
|
|
92
93
|
chatSessionId,
|
|
93
94
|
wizardPlan,
|
|
94
95
|
source,
|
|
95
|
-
}));
|
|
96
|
+
}), updateAiCardPolicyFormDraftFromUploadPlan(wizardPlan, source));
|
|
96
97
|
}), catchError((error) => of(updatePolicyRecommendationFromUploadFailure(createZeniAPIStatus('Unexpected Error', 'Policy recommendation from upload REST API call errored out' +
|
|
97
98
|
JSON.stringify(error))))),
|
|
98
99
|
// Guards the user-dismissed case that switchMap doesn't cover: a late response would patch a wizard plan the user already cleared.
|
package/lib/esm/epic.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { combineEpics } from 'redux-observable';
|
|
2
2
|
import { identity } from 'rxjs';
|
|
3
3
|
import { catchError, map } from 'rxjs/operators';
|
|
4
|
+
import { extractPolicyDocumentEpic, } from './entity/cardPolicy/extractPolicyDocumentEpic';
|
|
5
|
+
import { fetchCardPolicyVendorOptionsEpic, } from './entity/cardPolicy/fetchCardPolicyVendorOptionsEpic';
|
|
6
|
+
import { policyDocumentExtractionToRecommendationBridgeEpic, } from './entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic';
|
|
7
|
+
import { policyRecommendationFromUploadEpic, } from './entity/cardPolicy/policyRecommendationFromUploadEpic';
|
|
4
8
|
import { updateAccruedJESchedulesEpic, } from './entity/jeSchedules/updateAccruedJESchedulesEpic';
|
|
5
9
|
import { updateJESchedulesEpic, } from './entity/jeSchedules/updateJESchedulesEpic';
|
|
6
10
|
import { updateSectionAccountsViewEpic, } from './entity/sectionAccountsView/sectionAccountsViewEpic';
|
|
@@ -167,7 +171,6 @@ import { ignoreRecommendedJeScheduleEpic as ignoreExpenseAutomationJEScheduleEpi
|
|
|
167
171
|
import { initializeJeScheduleLocalDataEpic as initializeExpenseAutomationJeScheduleLocalDataEpic, } from './view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic';
|
|
168
172
|
import { retryJeScheduleEpic as retryExpenseAutomationJEScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic';
|
|
169
173
|
import { bulkUploadMatchResultToastEpic, } from './view/expenseAutomationView/epics/missingReceipts/bulkUploadMatchResultToastEpic';
|
|
170
|
-
import { syncTabsAfterAutomatchEpic, } from './view/expenseAutomationView/epics/missingReceipts/syncTabsAfterAutomatchEpic';
|
|
171
174
|
import { bulkUploadReceiptsEpic, } from './view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic';
|
|
172
175
|
import { confirmBulkUploadMatchEpic, } from './view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic';
|
|
173
176
|
import { fetchBulkUploadBatchDetailsEpic, } from './view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic';
|
|
@@ -180,6 +183,7 @@ import { refetchCompletedTransactionsOnBulkUploadSortEpic, } from './view/expens
|
|
|
180
183
|
import { refreshBatchDetailsForBatchIdEpic, } from './view/expenseAutomationView/epics/missingReceipts/refreshBatchDetailsForBatchIdEpic';
|
|
181
184
|
import { restoreBulkUploadAutomatchingOnMountEpic, } from './view/expenseAutomationView/epics/missingReceipts/restoreBulkUploadAutomatchingOnMountEpic';
|
|
182
185
|
import { searchTransactionsForManualMatchEpic, } from './view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic';
|
|
186
|
+
import { syncTabsAfterAutomatchEpic, } from './view/expenseAutomationView/epics/missingReceipts/syncTabsAfterAutomatchEpic';
|
|
183
187
|
import { uploadMissingReceiptSuccessEpic, } from './view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic';
|
|
184
188
|
import { bulkUploadAutomatchingTimeoutEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, } from './view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic';
|
|
185
189
|
import { backgroundRefetchReviewTabEpic, } from './view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic';
|
|
@@ -377,18 +381,16 @@ import { fetchMagicLinkTenantEpic, } from './view/spendManagement/billPay/magicL
|
|
|
377
381
|
import { saveMagicLinkBankAccountEpic, } from './view/spendManagement/billPay/magicLinkView/epics/saveMagicLinkBankAccountEpic';
|
|
378
382
|
import { fetchPreviousBillsEpic, } from './view/spendManagement/billPay/previousBills/fetchPreviousBillsEpic';
|
|
379
383
|
import { wiseRedirectEpic, } from './view/spendManagement/billPay/wiseRedirectView/wiseRedirectEpic';
|
|
380
|
-
import { initializeCardUserOnboardingLocalDataEpic, } from './view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic';
|
|
381
|
-
import { saveCardOnboardingUserDetailsEpic, } from './view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic';
|
|
382
|
-
import { fetchCardPolicyMccCategoriesEpic, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic';
|
|
383
|
-
import { createCardPolicyTemplatesEpic, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic';
|
|
384
|
-
import { extractPolicyDocumentEpic, } from './entity/cardPolicy/extractPolicyDocumentEpic';
|
|
385
|
-
import { policyRecommendationFromUploadEpic, } from './entity/cardPolicy/policyRecommendationFromUploadEpic';
|
|
386
|
-
import { policyDocumentExtractionToRecommendationBridgeEpic, } from './entity/cardPolicy/policyDocumentExtractionToRecommendationBridgeEpic';
|
|
387
|
-
import { fetchCardPolicyVendorOptionsEpic, } from './entity/cardPolicy/fetchCardPolicyVendorOptionsEpic';
|
|
388
|
-
import { fetchCardPolicyListEpic, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic';
|
|
389
|
-
import { archiveCardPolicyEpic, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic';
|
|
390
384
|
import { fetchCardPolicyDetailEpic, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/fetchCardPolicyDetailEpic';
|
|
391
385
|
import { updateCardPolicyEpic, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyDetail/updateCardPolicyEpic';
|
|
386
|
+
import { archiveCardPolicyEpic, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/archiveCardPolicyEpic';
|
|
387
|
+
import { fetchCardPolicyListEpic, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/fetchCardPolicyListEpic';
|
|
388
|
+
import { applyExtractedPolicyToDraftEpic, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyExtractedPolicyToDraftEpic';
|
|
389
|
+
import { createCardPolicyTemplatesEpic, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyTemplateEpic';
|
|
390
|
+
import { fetchCardPolicyMccCategoriesEpic, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/fetchCardPolicyMccCategoriesEpic';
|
|
391
|
+
import { seedAiCardPolicyFormDraftEpic, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/seedAiCardPolicyFormDraftEpic';
|
|
392
|
+
import { initializeCardUserOnboardingLocalDataEpic, } from './view/spendManagement/chargeCards/cardUserOnboarding/epics/initializeCardUserOnboardingLocalDataEpic';
|
|
393
|
+
import { saveCardOnboardingUserDetailsEpic, } from './view/spendManagement/chargeCards/cardUserOnboarding/epics/saveCardOnboardingUserDetailsEpic';
|
|
392
394
|
import { fetchCashbackDetailEpic, } from './view/spendManagement/chargeCards/cashbackDetail/fetchCashbackDetailEpic';
|
|
393
395
|
import { fetchChargeCardConfigEpic, } from './view/spendManagement/chargeCards/chargeCardConfig/fetchChargeCardConfigEpic';
|
|
394
396
|
import { closeChargeCardEpic, } from './view/spendManagement/chargeCards/chargeCardDetail/closeChargeCardEpic';
|
|
@@ -593,7 +595,7 @@ import { fetchZeniAccStatementPageEpic, } from './view/zeniAccStatementList/fetc
|
|
|
593
595
|
import { fetchZeniAccountsPromoCardEpic, } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic';
|
|
594
596
|
import { approveOAuthConsentEpic, } from './view/zeniOAuthView/epics/approveOAuthConsentEpic';
|
|
595
597
|
// Note: Please maintain strict alphabetical order
|
|
596
|
-
const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, addCardPaymentSourceEpic, approveOAuthConsentEpic, approveOrRejectBillEpic, approveOrRejectBillsBulkActionEpic, approveOrRejectRemiEpic, approveOrRejectRemisBulkActionEpic, approveVendorGlobalReviewEpic, archiveTaskEpic, backgroundRefetchReviewTabEpic, bulkUpdateTaskListEpic, cancelAiAccountantOnboardingEpic, cancelAndDeleteBillEpic, cancelAndDeleteRemiEpic, cancelOrDeleteBillsBulkActionEpic, cancelOrDeleteRemisBulkActionEpic, cancelScheduleAccruedJournalEntryEpic, changeZeniPersonRolesEpic, checkDepositEpic, clearAllEpic, closeChargeCardEpic, closeChargeCardsEpic, companyManagementSavePendingUpdatesEpic, companyManagementSaveUpdatesEpic, confirmCardSetupIntentEpic, convertAmountToHomeCurrencyEpic, createAddressEpic, createAutoTransferRuleEpic, createBankAccountEpic, createCardSetupIntentEpic, createCheckingAccountEpic, createCompanyAddressEpic, createCompanyOfficersEpic, createCompanyUserAddressEpic, createGlobalMerchantEpic, createInternationalBankAccountEpic, createNewSchedulesAccruedEpic, createNewSchedulesEpic, createNewTaskGroupEpic, createPaymentInstrumentEpic, createSessionAndSubmitEpic, createSessionEpic, createTagEpic, createTaskFromTaskGroupTemplateEpic, createTransferEntryEpic, createUserBankAccountEpic, deleteAccountStatementEpic, deleteAutoTransferRuleEpic, excludeAccountFromReconciliationEpic, includeAccountInReconciliationEpic, deleteBankAccountEpic, deleteBillEpic, deleteChatSessionEpic, deleteConnectionEpic, deleteBillPayApprovalRuleEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, snoozeTaskEpic, unsnoozeTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, sendEmailMagicLinkToUserEpic, sessionHeartbeatEpic, verifyDeviceWithTwoFAEpic, downloadAccountingProviderAttachmentEpic, dragNDropTasksEpic, enableChargeCardAutoPayEpic, enableSetupEpic, establishOnboardingPlaidConnectionEpic, establishPlaidConnectionEpic, expressInterestChargeCardEpic, fetchAccountListEpic, fetchAccountListForAccountTypesEpic, fetchAccountSettingsListForAccountTypesEpic, fetchAccruedScheduleListEpic, fetchActiveTenantEpic, fetchAddressEpic, fetchAiAccountantCustomersEpic, fetchAiAccountantJobsEpic, fetchAllCockpitViewsEpic, fetchAllExpenseAutomationTabsEpic, fetchAllPeopleRequiredViewsEpic, fetchAllTagsEpic, fetchAllTaskGroupsEpic, fetchAllTenantsEpic, fetchAndUpdateVendorRecommendationsEpic, fetchAggregatedReportEpic, fetchApAgingDetailEpic, fetchApAgingEpic, fetchArAgingDetailEpic, fetchArAgingEpic, fetchAuditReportGroupViewEpic, fetchAuditRuleGroupViewEpic, fetchAutoTransferReviewDetailEpic, fetchAutoTransferRuleHistoryEpic, fetchAutoTransferRulesEpic, fetchBalanceSheetEpic, fetchBalanceSheetForTimeframeEpic, fetchBankAccountsListEpic, fetchBankConnectionsViewEpic, fetchBankCountryNameByIbanEpic, fetchBankNameByRoutingEpic, fetchBankNameBySwiftEpic, fetchBillAndInitializeLocalStoreEpic, fetchBillDetailEpic, fetchBillingAccountsListEpic, fetchBillListEpic, fetchBillListPerTabEpic, fetchBillPayApproversDetailsEpic, fetchBillPayApproversListEpic, fetchBillPayCardEpic, fetchBillPayConfigEpic, fetchBillPaySetupApproverViewEpic, fetchBillPaySetupViewEpic, fetchCardBalanceEpic, archiveCardPolicyEpic, createCardPolicyTemplatesEpic, extractPolicyDocumentEpic, policyRecommendationFromUploadEpic, policyDocumentExtractionToRecommendationBridgeEpic, fetchCardPolicyDetailEpic, fetchCardPolicyListEpic, fetchCardPolicyMccCategoriesEpic, fetchCardPolicyVendorOptionsEpic, fetchCardProfilesEpic, updateCardPolicyEpic, fetchCashbackDetailEpic, fetchCashBalanceEpic, fetchCashFlowEpic, fetchCashFlowForTimeframeEpic, fetchCashInCashOutEpic, fetchCashPositionEpic, fetchChargeCardConfigEpic, fetchChargeCardDetailEpic, fetchChargeCardDetailPageEpic, fetchChargeCardListEpic, fetchChargeCardListPageEpic, fetchChargeCardPaymentPageEpic, fetchChargeCardRepaymentDetailEpic, fetchChargeCardPaymentHistoryEpic, fetchChargeCardSetupViewEpic, fetchChargeCardStatementListEpic, fetchChargeCardTransactionAttachmentsEpic, fetchChargeCardTransactionListEpic, fetchChargeCardTransactionStatisticsEpic, fetchChargeCardsRecurringExpensesEpic, fetchChatHistoryEpic, fetchChatSessionsForUserEpic, fetchClassListEpic, fetchCollaborationAuthTokenEpic, fetchCompanyBillingAddressEpic, fetchCompanyConfigEpic, fetchCompanyHealthMetricConfigEpic, fetchCompanyHealthMetricViewEpic, fetchCompanyManagementViewEpic, fetchCompanyMetaDataEpic, fetchCompanyMonthEndReportHistoricDataEpic, fetchCompanyMonthEndReportHistoricDatesEpic, fetchCompanyMonthEndReportTemplatesEpic, fetchCompanyMonthEndReportViewEpic, fetchCompanyOnboardingViewEpic, fetchCompanyPassportViewEpic, fetchCompanyPortfolioViewEpic, fetchCompanyTaskManagerViewEpic, fetchTaskManagerMetricsEpic, fetchCreditAccountEpic, fetchCreditAccountRepaymentEpic, fetchCreditAgentMacroEpic, fetchCurrencyConversionValueEpic, fetchDashboardEpic, fetchDashboardLayoutEpic, fetchDebitCardSummaryEpic, fetchDepositAccountDetailEpic, fetchDepositAccountEpic, fetchDepositAccountHistoryEpic, fetchDepositAccountLimitEpic, fetchDepositAccountListEpic, fetchDepositAccountListForCardsEpic, fetchDepositAccountTransactionListEpic, fetchDownloadSchedulesEpic, fetchDuplicateBillPayReviewEpic, fetchDuplicateReimbursementEpic, fetchEditBillDetailPageEpic, fetchEditRemiDetailPageEpic, fetchEligibleActionsForBillEpic, fetchEntityAutoCompleteEpic, fetchEntityHistoryEpic, fetchEntityRecommendationsByTransactionIdEpic, fetchEntityRecommendationsForLineUpdateEpic, fetchExcludedResourcesEpic, fetchExpenseAutomationFluxAnalysisViewEpic, fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic, fetchExpenseAutomationJeSchedulesEpic, fetchExpenseAutomationJESchedulesPageEpic, fetchExpenseAutomationMarkTransactionAsNotMiscategorizedEpic, fetchExpenseAutomationMissingReceiptsEpic, bulkUploadReceiptsEpic, confirmBulkUploadMatchEpic, fetchBulkUploadBatchDetailsEpic, fetchMultipleBatchDetailsEpic, fetchMoreBatchDetailsEpic, fetchBulkUploadBatchesEpic, fetchCompletedTransactionsEpic, refetchCompletedTransactionsOnBulkUploadSortEpic, refreshBatchDetailsForBatchIdEpic, bulkUploadAutomatchingTimeoutEpic, bulkUploadMatchResultToastEpic, syncTabsAfterAutomatchEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, restoreBulkUploadAutomatchingOnMountEpic, searchTransactionsForManualMatchEpic, fetchExpenseAutomationReconciliationsViewEpic, fetchExpenseAutomationSaveTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationViewEpic, fetchExpenseAutomationUpdateTransactionCategorizationEpic, fetchExpenseTrendEpic, fetchExpressPayInitialDetailsEpic, fetchExternalConnectionsEpic, fetchFileEpic, fetchFileListEpic, fetchFinanceStatementEpic, fetchForecastListEpic, initiateReportsClassViewRefetchingEpic, reportsResyncEpic, fetchGlobalMerchantAutoCompleteViewEpic, fetchGlobalMerchantRecommendationEpic, fetchIncomeTrendEpic, fetchInsightsCardEpic, fetchInternationalWireDynamicFormEpic, fetchIntlVerificationFormEpic, fetchIssueCardPageEpic, seedAiCardCreationFormDraftEpic, fetchMagicLinkBankNameByRoutingEpic, fetchMagicLinkBankNameBySwiftEpic, fetchMagicLinkBillEpic, fetchMagicLinkTenantEpic, fetchManagementViewEpic, fetchMerchantListEpic, fetchMonthClosePerformanceTrendEpic, fetchMonthEndCloseChecksEpic, fetchMyProfileEpic, fetchMyProfileViewEpic, fetchNetBurnOrIncomeClassesViewEpic, fetchNetBurnOrIncomeEpic, fetchNetBurnOrIncomeForTimeframeClassesViewEpic, fetchNetBurnOrIncomeForTimeframeEpic, fetchNetBurnOrIncomeStoryCardEpic, fetchNetBurnOrIncomeWithForecastEpic, fetchNotificationSettingsEpic, fetchNotificationSettingsViewEpic, fetchNotificationUnreadCountEpic, fetchNotificationViewEpic, fetchRegisteredInterestsEpic, fetchOnboardingCompletedCompaniesEpic, fetchOnboardingCustomerSetupViewEpic, fetchOnboardingCustomerViewEpic, fetchOnboardingViewEpic, fetchOpExByVendorEpic, fetchOpExByVendorReportForTimeframeEpic, fetchOpExByVendorReportSummaryEpic, fetchOpExClassesViewEpic, fetchOpExEpic, fetchOpExForTimeframeClassesViewEpic, fetchOpExReportForTimeframeEpic, fetchOpExWithForecastEpic, fetchOwnerListEpic, fetchParentSubsidiaryManagementViewEpic, fetchPaymentAccountBalanceEpic, fetchPaymentAccountListEpic, fetchPaymentSourcesEpic, fetchPeopleEpic, fetchPeoplePageEpic, fetchPortfolioViewEpic, fetchPreviousBillsEpic, fetchProfitAndLossClassesViewEpic, fetchProfitAndLossEpic, fetchProfitAndLossForTimeframeClassesViewEpic, fetchProfitAndLossForTimeframeProjectViewEpic, fetchProfitAndLossForTimeframeEpic, fetchProfitAndLossProjectViewEpic, fetchProjectListEpic, fetchQBOConnectionPoolEpic, fetchRecommendationByEntityIdEpic, fetchRecommendationByEntityNameEpic, fetchRecommendationForAccountSettingsEpic, fetchRecommendationForAccountTypeEpic, fetchRecommendationsAndUpdateMerchantRecommendationsEpic, fetchRecommendedTransactionRowIndexEpic, fetchReferralsEpic, fetchReimbursementCardEpic, fetchReimbursementConfigEpic, fetchRemiAndInitializeLocalStoreEpic, fetchRemiApproversDetailsEpic, fetchRemiApproversListEpic, fetchRemiDetailEpic, fetchRemiListEpic, fetchRemiListPerTabEpic, fetchRemiSetupApproverViewEpic, fetchRemiSetupViewEpic, fetchRevenueClassesViewEpic, fetchRevenueEpic, fetchRevenueForTimeframeClassesViewEpic, fetchRevenueForTimeframeEpic, fetchRevenueWithForecastEpic, fetchReviewCompanyViewEpic, fetchReviewTransferDetailEpic, fetchRewardsPlanEpic, fetchScheduleAccruedDetailsEpic, fetchScheduleAccruedDetailsPageEpic, fetchScheduleDetailsEpic, fetchScheduleDetailsPageEpic, fetchScheduleListEpic, fetchSchedulesAccountEpic, fetchSubscriptionAddOnsEpic, fetchSubscriptionCouponsEpic, fetchSubscriptionCreateEstimateEpic, fetchSubscriptionDetailsEpic, fetchSubscriptionListEpic, fetchSubscriptionPlansEpic, fetchSubscriptionSummaryForTenantEpic, fetchSubscriptionUpdateEstimateEpic, fetchSubscriptionViewEpic, fetchSuggestedQuestionsEpic, fetchTaskDetailEpic, fetchTaskDetailPageEpic, fetchTaskGroupTemplatesEpic, fetchTaskHistoryEpic, fetchTaskListEpic, fetchTaskListPageEpic, fetchTasksCardEpic, fetchTopExEpic, fetchTransactionActivityLogEpic, fetchTransactionDetailEpic, fetchTransactionListByAccountEpic, fetchTransactionListByClassEpic, fetchTransactionListByProjectEpic, fetchTransactionListByEntityEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, fetchTransferAccountsEpic, fetchTreasuryDetailEpic, fetchTreasuryFundsEpic, fetchTreasuryHistoryEpic, fetchTreasurySetupViewEpic, fetchTreasuryStatementListEpic, fetchTreasuryTaxLetterListEpic, fetchTreasuryTransactionListEpic, updatePortfolioAllocationEpic, fetchPortfolioAllocationEpic, fetchTrendForEntityEpic, fetchUserDetailEpic, fetchUserFinancialAccountEpic, fetchUserListByTypeEpic, fetchUserRoleConfigEpic, fetchVendor1099TypeListEpic, fetchVendorAndUpdateBillLocalDataEpic, fetchVendorByNameAndParseInvoiceEpic, fetchVendorDetailsEpic, fetchVendorEpic, fetchVendorFirstReviewAttachmentsEpic, fetchVendorFirstReviewViewEpic, fetchVendorGlobalReviewViewEpic, fetchVendorsFiling1099AllEpic, fetchVendorsFiling1099DownloadEpic, fetchVendorsFiling1099ListEpic, fetchVendorsListEpic, fetchVendorsTabVendorDetailPageViewEpic, fetchVendorsTabVendorDetailsEpic, fetchVendorsTabVendorEpic, fetchVendorTabViewEpic, fetchVendorTypeListEpic, fetchZeniAccountListEpic, fetchZeniAccountsConfigEpic, fetchZeniAccountSetupViewEpic, fetchZeniAccountsPromoCardEpic, fetchZeniAccStatementListEpic, fetchZeniAccStatementPageEpic, fetchZeniUsersEpic, getOnboardingEmailGroupEpic, getOnboardingPlaidLinkTokenEpic, getPaymentAccountsEpic, getPlaidLinkTokenEpic, ignoreExpenseAutomationJEScheduleEpic, improveUsingZeniGPTEpic, initialiseExpenseAutomationReconciliationLocalDataForSelectedAccountIdEpic, initializeAccountMappingViewEpic, initializeAccountSettingsViewEpic, initializeBillPaySetupApproverViewUpdateDataEpic, initializeBillToLocalStoreEpic, initializeCardUserOnboardingLocalDataEpic, initializeCompanyHealthMetricViewLocalDataEpic, initializeDynamicFormEpic, initializeEditPersonEpic, initializeExpenseAutomationJeScheduleLocalDataEpic, initializeInternationalWireLocalDataEpic, initializeIntlVerificationFormEpic, initializeMyProfileLocalDataEpic, initializeOnboardingCustomerViewUpdateDataEpic, initializeRemiSetupApproverViewUpdateDataEpic, initializeRemiToLocalStoreEpic, initializeScheduleAccruedDetailLocalDataEpic, initializeScheduleDetailLocalDataEpic, initializeSubscriptionLocalDataEpic, initializeTaskToLocalStoreEpic, initializeTransactionDetailLocalDataEpic, initializeVendorAddressEpic, initiateChargeCardRepaymentEpic, invitePeopleEpic, inviteZeniPeopleEpic, issueChargeCardEpic, lockChargeCardEpic, lockChargeCardsEpic, markAsCompleteScheduleDetailEpic, markTransactionAsNotMiscategorizedEpic, notifyMeForFeatureEpic, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, parallelFetchProjectTransactionListEpic, parallelFetchEntityTransactionListEpic, parallelFetchTransactionListByCategoryTypeEpic, parseInvoiceToBillEpic, parseReceiptsToRemiEpic, peopleSaveUpdatesEpic, pushToastNotificationEpic, refreshExpenseAutomationCurrentTabEpic, refreshIntegrationsDataEpic, rejectVendorGlobalReviewEpic, resendCardInviteEpic, resendInviteEpic, resendOtpEpic, resendVerifyDeviceOTPEpic, resendReferralInviteEpic, resetTransactionVendorLocalDataEpic, resetVendorDetailLocalDataEpic, resetVendorsTabVendorDetailLocalDataEpic, retryBankAccountConnectionEpic, retryBankAccountConnectionForOnboardingEpic, retryExpenseAutomationJEScheduleEpic, retryOrRefundBillEpic, validateBillsBulkActionEpic, reviewDraftRemisBulkActionEpic, reviewExpenseAutomationFluxAnalysisViewEpic, revokeCardInviteEpic, revokeChargeCardsInviteEpic, saveAccountMappingViewEpic, saveAccountSettingsViewEpic, saveAPIKeyConnectionEpic, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCardOnboardingUserDetailsEpic, saveCompanyBillingAddressEpic, saveCompanyHealthMetricByIdEpic, saveCompanyMonthEndReportEpic, saveCompanyPassportDetailsEpic, saveConnectorCredentialsEpic, saveCreditAgentMacroEpic, saveExpenseAutomationReconciliationDetailsEpic, saveExpenseAutomationReconciliationReviewEpic, saveExternalConnectionEpic, saveMagicLinkBankAccountEpic, saveNewAddressEpic, saveNotificationSettingsEpic, saveOAuthConnectionEpic, saveOnboardingCustomerCompletedStatusEpic, saveOnboardingCustomerNotesEpic, saveOnboardingCustomerViewUpdatesEpic, saveRealTimeApprovalEpic, saveReasonForAuditRuleEpic, saveRemiDetailEpic, saveRemiSetupApproverViewUpdatesEpic, saveScheduleAccruedDetailsEpic, saveScheduleDetailsEpic, saveSubscriptionNotesUpdatesEpic, saveSubscriptionUpdatesEpic, saveTaskDetailEpic, saveTransactionDetailEpic, saveTransactionVendorEpic, saveVendorDetailsViewEpic, saveVendorEpic, saveVendorFirstReviewViewEpic, saveVendorsTabVendorEpic, scheduleTenantCreditScoreCronEpic, sendCompanyMonthEndReportEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitIntlVerificationEpic, submitQuestionEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerAiAccountantJobEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateAutoTransferRuleEpic, updateBusinessVerificationDetailsEpic, updateCardProfileEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, updateAccountingClassesEnabledEpic, updateCompanyDetailsEpic, updateCompanyOfficerEpic, updateCompanyPassportLocalStoreDataEpic, updateDashboardLayoutEpic, updateDebitCardPinAttemptEpic, updateDepositAccountEpic, updateExpenseAutomationReconciliationBalanceLocalDataEpic, updateFileNameEpic, updateFilesMetadataEpic, updateJESchedulesEpic, updateMappedCashAccountEpic, updateMileageDetailsEpic, updateMyProfileEpic, updateNetBurnOrIncomeStoryCardSettingsEpic, updateNotificationViewAllNotificationsStatusEpic, updateNotificationViewNotificationStatusEpic, updateOnboardingCustomerViewCompleteStatusEpic, updateOnboardingCustomerViewDashboardLoadedEpic, updateOnboardingCustomerViewEpic, updateOnboardingCustomerViewLocalStoreDataEpic, updateOnboardingPaymentAccountLoginStatusEpic, updateOnboardingPaymentAccountStatusEpic, updatePaymentAccountEpic, updatePaymentAccountLoginStatusEpic, updatePaymentAccountStatusEpic, updatePhysicalChargeCardAttemptEpic, updatePrimaryContactEpic, updatePrimaryFundingAccountEpic, updateQBOConnectionPoolExternalConnectionEpic, updateReferViewedEpic, updateRemiSetupViewLocalStoreDataEpic, updateReportUIOptionCOABalancesRangeEpic, updateReportUIOptionIsCompareModeEpic, updateReportUIOptionIsCompareModeOnEpic, updateReportUIOptionThisPeriodEpic, updateReportUIOptionTimeFrameEpic, updateSectionAccountsViewEpic, updateSectionClassesViewEpicV2, updateSectionProjectViewEpic, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, fetchCannedResponsesEpic, saveCannedResponseEpic, deleteCannedResponseEpic, updateTransactionDetailEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, vendorFiling1099UploadDetailsSaveEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
|
|
598
|
+
const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, addCardPaymentSourceEpic, approveOAuthConsentEpic, approveOrRejectBillEpic, approveOrRejectBillsBulkActionEpic, approveOrRejectRemiEpic, approveOrRejectRemisBulkActionEpic, approveVendorGlobalReviewEpic, archiveTaskEpic, backgroundRefetchReviewTabEpic, bulkUpdateTaskListEpic, cancelAiAccountantOnboardingEpic, cancelAndDeleteBillEpic, cancelAndDeleteRemiEpic, cancelOrDeleteBillsBulkActionEpic, cancelOrDeleteRemisBulkActionEpic, cancelScheduleAccruedJournalEntryEpic, changeZeniPersonRolesEpic, checkDepositEpic, clearAllEpic, closeChargeCardEpic, closeChargeCardsEpic, companyManagementSavePendingUpdatesEpic, companyManagementSaveUpdatesEpic, confirmCardSetupIntentEpic, convertAmountToHomeCurrencyEpic, createAddressEpic, createAutoTransferRuleEpic, createBankAccountEpic, createCardSetupIntentEpic, createCheckingAccountEpic, createCompanyAddressEpic, createCompanyOfficersEpic, createCompanyUserAddressEpic, createGlobalMerchantEpic, createInternationalBankAccountEpic, createNewSchedulesAccruedEpic, createNewSchedulesEpic, createNewTaskGroupEpic, createPaymentInstrumentEpic, createSessionAndSubmitEpic, createSessionEpic, createTagEpic, createTaskFromTaskGroupTemplateEpic, createTransferEntryEpic, createUserBankAccountEpic, deleteAccountStatementEpic, deleteAutoTransferRuleEpic, excludeAccountFromReconciliationEpic, includeAccountInReconciliationEpic, deleteBankAccountEpic, deleteBillEpic, deleteChatSessionEpic, deleteConnectionEpic, deleteBillPayApprovalRuleEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, snoozeTaskEpic, unsnoozeTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, sendEmailMagicLinkToUserEpic, sessionHeartbeatEpic, verifyDeviceWithTwoFAEpic, downloadAccountingProviderAttachmentEpic, dragNDropTasksEpic, enableChargeCardAutoPayEpic, enableSetupEpic, establishOnboardingPlaidConnectionEpic, establishPlaidConnectionEpic, expressInterestChargeCardEpic, fetchAccountListEpic, fetchAccountListForAccountTypesEpic, fetchAccountSettingsListForAccountTypesEpic, fetchAccruedScheduleListEpic, fetchActiveTenantEpic, fetchAddressEpic, fetchAiAccountantCustomersEpic, fetchAiAccountantJobsEpic, fetchAllCockpitViewsEpic, fetchAllExpenseAutomationTabsEpic, fetchAllPeopleRequiredViewsEpic, fetchAllTagsEpic, fetchAllTaskGroupsEpic, fetchAllTenantsEpic, fetchAndUpdateVendorRecommendationsEpic, fetchAggregatedReportEpic, fetchApAgingDetailEpic, fetchApAgingEpic, fetchArAgingDetailEpic, fetchArAgingEpic, fetchAuditReportGroupViewEpic, fetchAuditRuleGroupViewEpic, fetchAutoTransferReviewDetailEpic, fetchAutoTransferRuleHistoryEpic, fetchAutoTransferRulesEpic, fetchBalanceSheetEpic, fetchBalanceSheetForTimeframeEpic, fetchBankAccountsListEpic, fetchBankConnectionsViewEpic, fetchBankCountryNameByIbanEpic, fetchBankNameByRoutingEpic, fetchBankNameBySwiftEpic, fetchBillAndInitializeLocalStoreEpic, fetchBillDetailEpic, fetchBillingAccountsListEpic, fetchBillListEpic, fetchBillListPerTabEpic, fetchBillPayApproversDetailsEpic, fetchBillPayApproversListEpic, fetchBillPayCardEpic, fetchBillPayConfigEpic, fetchBillPaySetupApproverViewEpic, fetchBillPaySetupViewEpic, fetchCardBalanceEpic, archiveCardPolicyEpic, createCardPolicyTemplatesEpic, extractPolicyDocumentEpic, policyRecommendationFromUploadEpic, policyDocumentExtractionToRecommendationBridgeEpic, fetchCardPolicyDetailEpic, fetchCardPolicyListEpic, fetchCardPolicyMccCategoriesEpic, fetchCardPolicyVendorOptionsEpic, fetchCardProfilesEpic, updateCardPolicyEpic, fetchCashbackDetailEpic, fetchCashBalanceEpic, fetchCashFlowEpic, fetchCashFlowForTimeframeEpic, fetchCashInCashOutEpic, fetchCashPositionEpic, fetchChargeCardConfigEpic, fetchChargeCardDetailEpic, fetchChargeCardDetailPageEpic, fetchChargeCardListEpic, fetchChargeCardListPageEpic, fetchChargeCardPaymentPageEpic, fetchChargeCardRepaymentDetailEpic, fetchChargeCardPaymentHistoryEpic, fetchChargeCardSetupViewEpic, fetchChargeCardStatementListEpic, fetchChargeCardTransactionAttachmentsEpic, fetchChargeCardTransactionListEpic, fetchChargeCardTransactionStatisticsEpic, fetchChargeCardsRecurringExpensesEpic, fetchChatHistoryEpic, fetchChatSessionsForUserEpic, fetchClassListEpic, fetchCollaborationAuthTokenEpic, fetchCompanyBillingAddressEpic, fetchCompanyConfigEpic, fetchCompanyHealthMetricConfigEpic, fetchCompanyHealthMetricViewEpic, fetchCompanyManagementViewEpic, fetchCompanyMetaDataEpic, fetchCompanyMonthEndReportHistoricDataEpic, fetchCompanyMonthEndReportHistoricDatesEpic, fetchCompanyMonthEndReportTemplatesEpic, fetchCompanyMonthEndReportViewEpic, fetchCompanyOnboardingViewEpic, fetchCompanyPassportViewEpic, fetchCompanyPortfolioViewEpic, fetchCompanyTaskManagerViewEpic, fetchTaskManagerMetricsEpic, fetchCreditAccountEpic, fetchCreditAccountRepaymentEpic, fetchCreditAgentMacroEpic, fetchCurrencyConversionValueEpic, fetchDashboardEpic, fetchDashboardLayoutEpic, fetchDebitCardSummaryEpic, fetchDepositAccountDetailEpic, fetchDepositAccountEpic, fetchDepositAccountHistoryEpic, fetchDepositAccountLimitEpic, fetchDepositAccountListEpic, fetchDepositAccountListForCardsEpic, fetchDepositAccountTransactionListEpic, fetchDownloadSchedulesEpic, fetchDuplicateBillPayReviewEpic, fetchDuplicateReimbursementEpic, fetchEditBillDetailPageEpic, fetchEditRemiDetailPageEpic, fetchEligibleActionsForBillEpic, fetchEntityAutoCompleteEpic, fetchEntityHistoryEpic, fetchEntityRecommendationsByTransactionIdEpic, fetchEntityRecommendationsForLineUpdateEpic, fetchExcludedResourcesEpic, fetchExpenseAutomationFluxAnalysisViewEpic, fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic, fetchExpenseAutomationJeSchedulesEpic, fetchExpenseAutomationJESchedulesPageEpic, fetchExpenseAutomationMarkTransactionAsNotMiscategorizedEpic, fetchExpenseAutomationMissingReceiptsEpic, bulkUploadReceiptsEpic, confirmBulkUploadMatchEpic, fetchBulkUploadBatchDetailsEpic, fetchMultipleBatchDetailsEpic, fetchMoreBatchDetailsEpic, fetchBulkUploadBatchesEpic, fetchCompletedTransactionsEpic, refetchCompletedTransactionsOnBulkUploadSortEpic, refreshBatchDetailsForBatchIdEpic, bulkUploadAutomatchingTimeoutEpic, bulkUploadMatchResultToastEpic, syncTabsAfterAutomatchEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, restoreBulkUploadAutomatchingOnMountEpic, searchTransactionsForManualMatchEpic, fetchExpenseAutomationReconciliationsViewEpic, fetchExpenseAutomationSaveTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationViewEpic, fetchExpenseAutomationUpdateTransactionCategorizationEpic, fetchExpenseTrendEpic, fetchExpressPayInitialDetailsEpic, fetchExternalConnectionsEpic, fetchFileEpic, fetchFileListEpic, fetchFinanceStatementEpic, fetchForecastListEpic, initiateReportsClassViewRefetchingEpic, reportsResyncEpic, fetchGlobalMerchantAutoCompleteViewEpic, fetchGlobalMerchantRecommendationEpic, fetchIncomeTrendEpic, fetchInsightsCardEpic, fetchInternationalWireDynamicFormEpic, fetchIntlVerificationFormEpic, fetchIssueCardPageEpic, seedAiCardCreationFormDraftEpic, seedAiCardPolicyFormDraftEpic, applyExtractedPolicyToDraftEpic, fetchMagicLinkBankNameByRoutingEpic, fetchMagicLinkBankNameBySwiftEpic, fetchMagicLinkBillEpic, fetchMagicLinkTenantEpic, fetchManagementViewEpic, fetchMerchantListEpic, fetchMonthClosePerformanceTrendEpic, fetchMonthEndCloseChecksEpic, fetchMyProfileEpic, fetchMyProfileViewEpic, fetchNetBurnOrIncomeClassesViewEpic, fetchNetBurnOrIncomeEpic, fetchNetBurnOrIncomeForTimeframeClassesViewEpic, fetchNetBurnOrIncomeForTimeframeEpic, fetchNetBurnOrIncomeStoryCardEpic, fetchNetBurnOrIncomeWithForecastEpic, fetchNotificationSettingsEpic, fetchNotificationSettingsViewEpic, fetchNotificationUnreadCountEpic, fetchNotificationViewEpic, fetchRegisteredInterestsEpic, fetchOnboardingCompletedCompaniesEpic, fetchOnboardingCustomerSetupViewEpic, fetchOnboardingCustomerViewEpic, fetchOnboardingViewEpic, fetchOpExByVendorEpic, fetchOpExByVendorReportForTimeframeEpic, fetchOpExByVendorReportSummaryEpic, fetchOpExClassesViewEpic, fetchOpExEpic, fetchOpExForTimeframeClassesViewEpic, fetchOpExReportForTimeframeEpic, fetchOpExWithForecastEpic, fetchOwnerListEpic, fetchParentSubsidiaryManagementViewEpic, fetchPaymentAccountBalanceEpic, fetchPaymentAccountListEpic, fetchPaymentSourcesEpic, fetchPeopleEpic, fetchPeoplePageEpic, fetchPortfolioViewEpic, fetchPreviousBillsEpic, fetchProfitAndLossClassesViewEpic, fetchProfitAndLossEpic, fetchProfitAndLossForTimeframeClassesViewEpic, fetchProfitAndLossForTimeframeProjectViewEpic, fetchProfitAndLossForTimeframeEpic, fetchProfitAndLossProjectViewEpic, fetchProjectListEpic, fetchQBOConnectionPoolEpic, fetchRecommendationByEntityIdEpic, fetchRecommendationByEntityNameEpic, fetchRecommendationForAccountSettingsEpic, fetchRecommendationForAccountTypeEpic, fetchRecommendationsAndUpdateMerchantRecommendationsEpic, fetchRecommendedTransactionRowIndexEpic, fetchReferralsEpic, fetchReimbursementCardEpic, fetchReimbursementConfigEpic, fetchRemiAndInitializeLocalStoreEpic, fetchRemiApproversDetailsEpic, fetchRemiApproversListEpic, fetchRemiDetailEpic, fetchRemiListEpic, fetchRemiListPerTabEpic, fetchRemiSetupApproverViewEpic, fetchRemiSetupViewEpic, fetchRevenueClassesViewEpic, fetchRevenueEpic, fetchRevenueForTimeframeClassesViewEpic, fetchRevenueForTimeframeEpic, fetchRevenueWithForecastEpic, fetchReviewCompanyViewEpic, fetchReviewTransferDetailEpic, fetchRewardsPlanEpic, fetchScheduleAccruedDetailsEpic, fetchScheduleAccruedDetailsPageEpic, fetchScheduleDetailsEpic, fetchScheduleDetailsPageEpic, fetchScheduleListEpic, fetchSchedulesAccountEpic, fetchSubscriptionAddOnsEpic, fetchSubscriptionCouponsEpic, fetchSubscriptionCreateEstimateEpic, fetchSubscriptionDetailsEpic, fetchSubscriptionListEpic, fetchSubscriptionPlansEpic, fetchSubscriptionSummaryForTenantEpic, fetchSubscriptionUpdateEstimateEpic, fetchSubscriptionViewEpic, fetchSuggestedQuestionsEpic, fetchTaskDetailEpic, fetchTaskDetailPageEpic, fetchTaskGroupTemplatesEpic, fetchTaskHistoryEpic, fetchTaskListEpic, fetchTaskListPageEpic, fetchTasksCardEpic, fetchTopExEpic, fetchTransactionActivityLogEpic, fetchTransactionDetailEpic, fetchTransactionListByAccountEpic, fetchTransactionListByClassEpic, fetchTransactionListByProjectEpic, fetchTransactionListByEntityEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, fetchTransferAccountsEpic, fetchTreasuryDetailEpic, fetchTreasuryFundsEpic, fetchTreasuryHistoryEpic, fetchTreasurySetupViewEpic, fetchTreasuryStatementListEpic, fetchTreasuryTaxLetterListEpic, fetchTreasuryTransactionListEpic, updatePortfolioAllocationEpic, fetchPortfolioAllocationEpic, fetchTrendForEntityEpic, fetchUserDetailEpic, fetchUserFinancialAccountEpic, fetchUserListByTypeEpic, fetchUserRoleConfigEpic, fetchVendor1099TypeListEpic, fetchVendorAndUpdateBillLocalDataEpic, fetchVendorByNameAndParseInvoiceEpic, fetchVendorDetailsEpic, fetchVendorEpic, fetchVendorFirstReviewAttachmentsEpic, fetchVendorFirstReviewViewEpic, fetchVendorGlobalReviewViewEpic, fetchVendorsFiling1099AllEpic, fetchVendorsFiling1099DownloadEpic, fetchVendorsFiling1099ListEpic, fetchVendorsListEpic, fetchVendorsTabVendorDetailPageViewEpic, fetchVendorsTabVendorDetailsEpic, fetchVendorsTabVendorEpic, fetchVendorTabViewEpic, fetchVendorTypeListEpic, fetchZeniAccountListEpic, fetchZeniAccountsConfigEpic, fetchZeniAccountSetupViewEpic, fetchZeniAccountsPromoCardEpic, fetchZeniAccStatementListEpic, fetchZeniAccStatementPageEpic, fetchZeniUsersEpic, getOnboardingEmailGroupEpic, getOnboardingPlaidLinkTokenEpic, getPaymentAccountsEpic, getPlaidLinkTokenEpic, ignoreExpenseAutomationJEScheduleEpic, improveUsingZeniGPTEpic, initialiseExpenseAutomationReconciliationLocalDataForSelectedAccountIdEpic, initializeAccountMappingViewEpic, initializeAccountSettingsViewEpic, initializeBillPaySetupApproverViewUpdateDataEpic, initializeBillToLocalStoreEpic, initializeCardUserOnboardingLocalDataEpic, initializeCompanyHealthMetricViewLocalDataEpic, initializeDynamicFormEpic, initializeEditPersonEpic, initializeExpenseAutomationJeScheduleLocalDataEpic, initializeInternationalWireLocalDataEpic, initializeIntlVerificationFormEpic, initializeMyProfileLocalDataEpic, initializeOnboardingCustomerViewUpdateDataEpic, initializeRemiSetupApproverViewUpdateDataEpic, initializeRemiToLocalStoreEpic, initializeScheduleAccruedDetailLocalDataEpic, initializeScheduleDetailLocalDataEpic, initializeSubscriptionLocalDataEpic, initializeTaskToLocalStoreEpic, initializeTransactionDetailLocalDataEpic, initializeVendorAddressEpic, initiateChargeCardRepaymentEpic, invitePeopleEpic, inviteZeniPeopleEpic, issueChargeCardEpic, lockChargeCardEpic, lockChargeCardsEpic, markAsCompleteScheduleDetailEpic, markTransactionAsNotMiscategorizedEpic, notifyMeForFeatureEpic, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, parallelFetchProjectTransactionListEpic, parallelFetchEntityTransactionListEpic, parallelFetchTransactionListByCategoryTypeEpic, parseInvoiceToBillEpic, parseReceiptsToRemiEpic, peopleSaveUpdatesEpic, pushToastNotificationEpic, refreshExpenseAutomationCurrentTabEpic, refreshIntegrationsDataEpic, rejectVendorGlobalReviewEpic, resendCardInviteEpic, resendInviteEpic, resendOtpEpic, resendVerifyDeviceOTPEpic, resendReferralInviteEpic, resetTransactionVendorLocalDataEpic, resetVendorDetailLocalDataEpic, resetVendorsTabVendorDetailLocalDataEpic, retryBankAccountConnectionEpic, retryBankAccountConnectionForOnboardingEpic, retryExpenseAutomationJEScheduleEpic, retryOrRefundBillEpic, validateBillsBulkActionEpic, reviewDraftRemisBulkActionEpic, reviewExpenseAutomationFluxAnalysisViewEpic, revokeCardInviteEpic, revokeChargeCardsInviteEpic, saveAccountMappingViewEpic, saveAccountSettingsViewEpic, saveAPIKeyConnectionEpic, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCardOnboardingUserDetailsEpic, saveCompanyBillingAddressEpic, saveCompanyHealthMetricByIdEpic, saveCompanyMonthEndReportEpic, saveCompanyPassportDetailsEpic, saveConnectorCredentialsEpic, saveCreditAgentMacroEpic, saveExpenseAutomationReconciliationDetailsEpic, saveExpenseAutomationReconciliationReviewEpic, saveExternalConnectionEpic, saveMagicLinkBankAccountEpic, saveNewAddressEpic, saveNotificationSettingsEpic, saveOAuthConnectionEpic, saveOnboardingCustomerCompletedStatusEpic, saveOnboardingCustomerNotesEpic, saveOnboardingCustomerViewUpdatesEpic, saveRealTimeApprovalEpic, saveReasonForAuditRuleEpic, saveRemiDetailEpic, saveRemiSetupApproverViewUpdatesEpic, saveScheduleAccruedDetailsEpic, saveScheduleDetailsEpic, saveSubscriptionNotesUpdatesEpic, saveSubscriptionUpdatesEpic, saveTaskDetailEpic, saveTransactionDetailEpic, saveTransactionVendorEpic, saveVendorDetailsViewEpic, saveVendorEpic, saveVendorFirstReviewViewEpic, saveVendorsTabVendorEpic, scheduleTenantCreditScoreCronEpic, sendCompanyMonthEndReportEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitIntlVerificationEpic, submitQuestionEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerAiAccountantJobEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateAutoTransferRuleEpic, updateBusinessVerificationDetailsEpic, updateCardProfileEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, updateAccountingClassesEnabledEpic, updateCompanyDetailsEpic, updateCompanyOfficerEpic, updateCompanyPassportLocalStoreDataEpic, updateDashboardLayoutEpic, updateDebitCardPinAttemptEpic, updateDepositAccountEpic, updateExpenseAutomationReconciliationBalanceLocalDataEpic, updateFileNameEpic, updateFilesMetadataEpic, updateJESchedulesEpic, updateMappedCashAccountEpic, updateMileageDetailsEpic, updateMyProfileEpic, updateNetBurnOrIncomeStoryCardSettingsEpic, updateNotificationViewAllNotificationsStatusEpic, updateNotificationViewNotificationStatusEpic, updateOnboardingCustomerViewCompleteStatusEpic, updateOnboardingCustomerViewDashboardLoadedEpic, updateOnboardingCustomerViewEpic, updateOnboardingCustomerViewLocalStoreDataEpic, updateOnboardingPaymentAccountLoginStatusEpic, updateOnboardingPaymentAccountStatusEpic, updatePaymentAccountEpic, updatePaymentAccountLoginStatusEpic, updatePaymentAccountStatusEpic, updatePhysicalChargeCardAttemptEpic, updatePrimaryContactEpic, updatePrimaryFundingAccountEpic, updateQBOConnectionPoolExternalConnectionEpic, updateReferViewedEpic, updateRemiSetupViewLocalStoreDataEpic, updateReportUIOptionCOABalancesRangeEpic, updateReportUIOptionIsCompareModeEpic, updateReportUIOptionIsCompareModeOnEpic, updateReportUIOptionThisPeriodEpic, updateReportUIOptionTimeFrameEpic, updateSectionAccountsViewEpic, updateSectionClassesViewEpicV2, updateSectionProjectViewEpic, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, fetchCannedResponsesEpic, saveCannedResponseEpic, deleteCannedResponseEpic, updateTransactionDetailEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, vendorFiling1099UploadDetailsSaveEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
|
|
597
599
|
const rootEpic = (action$, store$, dependencies) => combinedEpics(action$, store$, dependencies).pipe(map(identity), catchError((error, source) => {
|
|
598
600
|
console.error(error);
|
|
599
601
|
return source;
|
package/lib/esm/index.js
CHANGED
|
@@ -315,9 +315,9 @@ import { acceptChargeCardTerms, enableChargeCardAutoPay, expressInterestInCharge
|
|
|
315
315
|
import { getChargeCardBusinessVerificationDetails, getChargeCardSetupViewDetails, } from './view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector';
|
|
316
316
|
import { fetchChargeCardStatementList } from './view/spendManagement/chargeCards/chargeCardStatementList/chargeCardStatementListReducer';
|
|
317
317
|
import { getChargeCardStatements, } from './view/spendManagement/chargeCards/chargeCardStatementList/chargeCardStatementListSelector';
|
|
318
|
+
import { applyAiCardCreationFormDraftUpdate, } from './view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate';
|
|
318
319
|
import { buildAiCardCreationFormDraftSeed, } from './view/spendManagement/chargeCards/issueChargeCard/buildAiCardCreationFormDraftSeed';
|
|
319
320
|
import { deriveAiCardRowsFromTeams, } from './view/spendManagement/chargeCards/issueChargeCard/deriveAiCardRowsFromTeams';
|
|
320
|
-
import { applyAiCardCreationFormDraftUpdate, } from './view/spendManagement/chargeCards/issueChargeCard/applyAiCardCreationFormDraftUpdate';
|
|
321
321
|
import { clearAiCardCreationFormDraft, fetchDepositAccountListForCards, fetchIssueCardPage, issueChargeCards, resetIssueChargeCardForm, seedAiCardCreationFormDraft, updateAiCardCreationFormDraft, updateChargeCardsLocalStore, updateCustomAddressId, updateLastIssuedCardIds, } from './view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer';
|
|
322
322
|
import { getAiCardCreationFormDraft, getInFlightIssueChargeCardsCount, getIssueChargeCardView, getIssueChargeCardsSaveStatus, getLastIssueChargeCardsSourceChatSessionId, getLastIssuedChargeCardIds, selectIssueChargeCardLocalDataFromDraft, } from './view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector';
|
|
323
323
|
import { toIssueChargeCardLocalDataFromDraft } from './view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft';
|
|
@@ -659,8 +659,19 @@ export { ALL_CARD_POLICY_TEMPLATE_MODES, ALL_CARD_POLICY_TEMPLATE_STATUSES, toCa
|
|
|
659
659
|
export { toBulkCreateCardPolicyTemplateError, toCardPolicyEditFormDraft, toCardPolicyStats, toCardPolicyTemplate, toCardPolicyTemplateList, toCardPolicyVendorSearchOption, toCreateCardPolicyTemplateRequestBody, toCreateCardPolicyTemplatesRequestBody, toExtractedCardPolicyRules, toUpdateCardPolicyTemplateRequestBody, } from './entity/cardPolicy/cardPolicyPayload';
|
|
660
660
|
// Create flow (bulk POST /policy-templates — single-policy callers wrap
|
|
661
661
|
// their one request in a length-1 `templates` array).
|
|
662
|
-
export { clearCreateCardPolicy, createCardPolicyTemplates, updateCreateCardPolicyTemplateRequestState, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer';
|
|
663
|
-
export { getCreateCardPolicyTemplateRequestState, getLastCreateCardPolicySourceChatSessionId, getLastCreateCardPolicyTemplateErrors, getLastCreatedCardPolicyTemplateId, getLastCreatedCardPolicyTemplateIds, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector';
|
|
662
|
+
export { applyExtractedPolicyToAiCardPolicyDraft, applyExtractedPolicyToManualCardPolicyDraft, clearAiCardPolicyFormDraft, clearCreateCardPolicy, clearManualCardPolicyFormDraft, createCardPolicyTemplates, seedAiCardPolicyFormDraft, seedManualCardPolicyFormDraft, updateAiCardPolicyFormDraft, updateAiCardPolicyFormDraftFromUploadPlan, updateCreateCardPolicyTemplateRequestState, updateManualCardPolicyFormDraft, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicyReducer';
|
|
663
|
+
export { getAiCardPolicyFormDraft, getCreateCardPolicyTemplateRequestState, getLastCreateCardPolicySourceChatSessionId, getLastCreateCardPolicyTemplateErrors, getLastCreatedCardPolicyTemplateId, getLastCreatedCardPolicyTemplateIds, getManualCardPolicyFormDraft, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/createCardPolicySelector';
|
|
664
|
+
// Card policy form draft types + helpers (consumed by the AI CFO
|
|
665
|
+
// `CardPolicyInteractiveForm` and the manual `CardPolicyCreatePage`).
|
|
666
|
+
export { CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT, CARD_POLICY_LIMIT_ROW_ID_TRANSACTION, toMccCategoryLike, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyFormDraftTypes';
|
|
667
|
+
export { MCC_CHIP_ID_PREFIX, VENDOR_CHIP_ID_PREFIX, buildMccCategoryChipId, buildVendorChipId, toMccCategoryChipFieldValue, toVendorChipFieldValue, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/cardPolicyChipIds';
|
|
668
|
+
export { buildAiCardPolicyFormDraftSeed, buildEmptyLimitRows, buildUploadReviewRows, } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildAiCardPolicyFormDraftSeed';
|
|
669
|
+
export { buildManualCardPolicyFormDraftSeed } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/buildManualCardPolicyFormDraftSeed';
|
|
670
|
+
export { deriveAiPolicyReviewRowsFromInputs } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/deriveAiPolicyReviewRowsFromInputs';
|
|
671
|
+
export { applyAiCardPolicyFormDraftUpdate } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/applyAiCardPolicyFormDraftUpdate';
|
|
672
|
+
export { toCardPolicyTemplateRequestFromDraft } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toCardPolicyTemplateRequestFromDraft';
|
|
673
|
+
export { toBulkCardPolicyTemplateRequestsFromDraft } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toBulkCardPolicyTemplateRequestsFromDraft';
|
|
674
|
+
export { toManualCardPolicyTemplateRequestFromDraft } from './view/spendManagement/chargeCards/cardPolicy/createCardPolicy/toManualCardPolicyTemplateRequestFromDraft';
|
|
664
675
|
// List
|
|
665
676
|
export { archiveCardPolicy, clearCardPolicyList, fetchCardPolicyList, updateArchiveCardPolicyFetchStatus, updateCardPolicyListFetchStatus, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListReducer';
|
|
666
677
|
export { getArchiveCardPolicyFetchState, getCardPolicyListFetchState, getCardPolicyListView, getCardPolicyTemplateIds, } from './view/spendManagement/chargeCards/cardPolicy/cardPolicyList/cardPolicyListSelector';
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { deriveAiPolicyReviewRowsFromInputs } from './deriveAiPolicyReviewRowsFromInputs';
|
|
2
|
+
/**
|
|
3
|
+
* Single source of truth for "what the next AI card-policy form draft
|
|
4
|
+
* should look like after a `watchHandler` flush".
|
|
5
|
+
*
|
|
6
|
+
* Branches on `next.policyKind`:
|
|
7
|
+
*
|
|
8
|
+
* - `auto`: pass-through. Chip groups on `policiesReview` are the
|
|
9
|
+
* canonical source of truth; the source slices stay empty.
|
|
10
|
+
*
|
|
11
|
+
* - `guided`: mirrors review-step chip edits (diffed against
|
|
12
|
+
* `prev.policiesReview`) back into the source slices
|
|
13
|
+
* (`vendorPolicy` / `categoryPolicy` / `cardSelections` / `limits`),
|
|
14
|
+
* then re-derives `policiesReview` from the bridged source slices
|
|
15
|
+
* via `deriveAiPolicyReviewRowsFromInputs` so the review always
|
|
16
|
+
* reflects the freshest live state. Replaces the
|
|
17
|
+
* `useReviewChipEditBridge` hook that previously lived in
|
|
18
|
+
* `CardPolicyInteractiveForm`.
|
|
19
|
+
*
|
|
20
|
+
* - `upload`: passes through the user's chip edits on
|
|
21
|
+
* `policiesReview` (the wire reads from those chip groups). The
|
|
22
|
+
* "Applied to Cards" chip group is patched in-place from
|
|
23
|
+
* `cardSelections` (the user's Step 2 picks).
|
|
24
|
+
*/
|
|
25
|
+
export const applyAiCardPolicyFormDraftUpdate = ({ next, prev, context, }) => {
|
|
26
|
+
if (next.policyKind === 'auto') {
|
|
27
|
+
return next;
|
|
28
|
+
}
|
|
29
|
+
if (next.policyKind === 'upload') {
|
|
30
|
+
return applyUploadUpdate({ next, prev });
|
|
31
|
+
}
|
|
32
|
+
return applyGuidedUpdate({ next, prev, context });
|
|
33
|
+
};
|
|
34
|
+
const applyGuidedUpdate = ({ next, prev, context, }) => {
|
|
35
|
+
const bridged = bridgeGuidedPoliciesReviewToSources({ next, prev });
|
|
36
|
+
if (context == null) {
|
|
37
|
+
return bridged;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
...bridged,
|
|
41
|
+
policiesReview: deriveAiPolicyReviewRowsFromInputs({
|
|
42
|
+
vendorPolicy: bridged.vendorPolicy,
|
|
43
|
+
categoryPolicy: bridged.categoryPolicy,
|
|
44
|
+
cardSelections: bridged.cardSelections,
|
|
45
|
+
limits: bridged.limits,
|
|
46
|
+
suggestedPoliciesSeed: context.suggestedPoliciesSeed,
|
|
47
|
+
prevPoliciesReview: bridged.policiesReview,
|
|
48
|
+
}),
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
const APPLIED_TO_CARDS_GROUP_ID = 'applied-to-cards';
|
|
52
|
+
const LIMITS_GROUP_ID = 'limits';
|
|
53
|
+
const applyUploadUpdate = ({ next, prev, }) => {
|
|
54
|
+
// Mirror review-side avatar / limits edits into source slices so the
|
|
55
|
+
// bulk-submit builder (which reads `cardSelections` for upload's
|
|
56
|
+
// applyToCards) sees the user's latest intent.
|
|
57
|
+
const bridged = bridgeUploadPoliciesReviewToSources({ next, prev });
|
|
58
|
+
if (!haveCardSelectionsChanged(prev?.cardSelections, bridged.cardSelections)) {
|
|
59
|
+
return bridged;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
...bridged,
|
|
63
|
+
policiesReview: patchUploadReviewWithAppliedCards(bridged.policiesReview, bridged.cardSelections),
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
const haveCardSelectionsChanged = (prevSelections, nextSelections) => {
|
|
67
|
+
const prevCheckedIds = (prevSelections ?? [])
|
|
68
|
+
.filter((row) => row.isChecked)
|
|
69
|
+
.map((row) => row.id);
|
|
70
|
+
const nextCheckedIds = nextSelections
|
|
71
|
+
.filter((row) => row.isChecked)
|
|
72
|
+
.map((row) => row.id);
|
|
73
|
+
if (prevCheckedIds.length !== nextCheckedIds.length) {
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
return prevCheckedIds.some((id, idx) => id !== nextCheckedIds[idx]);
|
|
77
|
+
};
|
|
78
|
+
const buildAppliedOwnerSummaries = (cardSelections) => {
|
|
79
|
+
const summaries = new Map();
|
|
80
|
+
for (const card of cardSelections) {
|
|
81
|
+
if (!card.isChecked) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const existing = summaries.get(card.owner.userId);
|
|
85
|
+
if (existing != null) {
|
|
86
|
+
existing.cardIds.push(card.id);
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
summaries.set(card.owner.userId, {
|
|
90
|
+
userId: card.owner.userId,
|
|
91
|
+
displayName: card.owner.displayName,
|
|
92
|
+
cardIds: [card.id],
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return Array.from(summaries.values());
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Replace (or insert) the "Applied to Cards" chip group on every
|
|
99
|
+
* upload review row with avatar chips derived from the current
|
|
100
|
+
* `cardSelections`. The new group is inserted before the "Limits"
|
|
101
|
+
* group so the visual order stays Vendors → Categories → Cards →
|
|
102
|
+
* Limits.
|
|
103
|
+
*/
|
|
104
|
+
export const patchUploadReviewWithAppliedCards = (reviewRows, cardSelections) => {
|
|
105
|
+
const owners = buildAppliedOwnerSummaries(cardSelections);
|
|
106
|
+
const cardChips = owners.map((owner) => ({
|
|
107
|
+
id: owner.userId,
|
|
108
|
+
label: owner.displayName,
|
|
109
|
+
chipKind: 'avatar',
|
|
110
|
+
cardIds: owner.cardIds,
|
|
111
|
+
isSelected: true,
|
|
112
|
+
}));
|
|
113
|
+
const cardsGroup = cardChips.length > 0
|
|
114
|
+
? {
|
|
115
|
+
id: APPLIED_TO_CARDS_GROUP_ID,
|
|
116
|
+
label: 'Applied to Cards',
|
|
117
|
+
chips: cardChips,
|
|
118
|
+
}
|
|
119
|
+
: null;
|
|
120
|
+
return reviewRows.map((row) => {
|
|
121
|
+
const withoutCards = row.chipGroups.filter((group) => group.id !== APPLIED_TO_CARDS_GROUP_ID);
|
|
122
|
+
if (cardsGroup == null) {
|
|
123
|
+
return { ...row, chipGroups: withoutCards };
|
|
124
|
+
}
|
|
125
|
+
const limitsIdx = withoutCards.findIndex((group) => group.id === LIMITS_GROUP_ID);
|
|
126
|
+
if (limitsIdx === -1) {
|
|
127
|
+
return { ...row, chipGroups: [...withoutCards, cardsGroup] };
|
|
128
|
+
}
|
|
129
|
+
const before = withoutCards.slice(0, limitsIdx);
|
|
130
|
+
const after = withoutCards.slice(limitsIdx);
|
|
131
|
+
return { ...row, chipGroups: [...before, cardsGroup, ...after] };
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Mirror diffs in `next.policiesReview` chips back into the source
|
|
136
|
+
* slices for guided mode. Detects per-chip `isSelected` and
|
|
137
|
+
* `optionalCode` changes vs `prev` and writes them to:
|
|
138
|
+
* - `limits` for `kind: "limits"` group chips,
|
|
139
|
+
* - `cardSelections` for avatar chips, and
|
|
140
|
+
* - `vendorPolicy` / `categoryPolicy` for positive/negative chips.
|
|
141
|
+
*/
|
|
142
|
+
const bridgeGuidedPoliciesReviewToSources = ({ next, prev, }) => {
|
|
143
|
+
if (prev == null || prev.policiesReview.length === 0) {
|
|
144
|
+
return next;
|
|
145
|
+
}
|
|
146
|
+
const reviewDiffs = collectReviewChipDiffs(prev.policiesReview, next.policiesReview);
|
|
147
|
+
if (reviewDiffs.length === 0) {
|
|
148
|
+
return next;
|
|
149
|
+
}
|
|
150
|
+
let limits = next.limits;
|
|
151
|
+
let cardSelections = next.cardSelections;
|
|
152
|
+
let vendorPolicy = next.vendorPolicy;
|
|
153
|
+
let categoryPolicy = next.categoryPolicy;
|
|
154
|
+
for (const diff of reviewDiffs) {
|
|
155
|
+
if (diff.groupKind === 'limits' || diff.chip.id.startsWith('limit-')) {
|
|
156
|
+
limits = applyLimitChipDiffToLimits(limits, diff);
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
if (diff.chip.chipKind === 'avatar') {
|
|
160
|
+
cardSelections = applyAvatarChipDiffToCardSelections(cardSelections, diff);
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
if (diff.changedFields.has('isSelected')) {
|
|
164
|
+
const writtenToVendor = tryWriteAllowBlock(vendorPolicy, diff);
|
|
165
|
+
if (writtenToVendor != null) {
|
|
166
|
+
vendorPolicy = writtenToVendor;
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
const writtenToCategory = tryWriteAllowBlock(categoryPolicy, diff);
|
|
170
|
+
if (writtenToCategory != null) {
|
|
171
|
+
categoryPolicy = writtenToCategory;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return {
|
|
176
|
+
...next,
|
|
177
|
+
limits,
|
|
178
|
+
cardSelections,
|
|
179
|
+
vendorPolicy,
|
|
180
|
+
categoryPolicy,
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Upload-mode bridge — narrower than guided. Vendor / category chips in
|
|
185
|
+
* the review are the wire's source of truth (no source slice to write
|
|
186
|
+
* back to); avatar chips mirror into `cardSelections` (the wire's
|
|
187
|
+
* `applyToCards` projection for upload reads from there); limit chips
|
|
188
|
+
* are read from the review chip group directly by the wire, so no
|
|
189
|
+
* mirror is needed.
|
|
190
|
+
*/
|
|
191
|
+
const bridgeUploadPoliciesReviewToSources = ({ next, prev, }) => {
|
|
192
|
+
if (prev == null || prev.policiesReview.length === 0) {
|
|
193
|
+
return next;
|
|
194
|
+
}
|
|
195
|
+
const reviewDiffs = collectReviewChipDiffs(prev.policiesReview, next.policiesReview);
|
|
196
|
+
if (reviewDiffs.length === 0) {
|
|
197
|
+
return next;
|
|
198
|
+
}
|
|
199
|
+
let cardSelections = next.cardSelections;
|
|
200
|
+
for (const diff of reviewDiffs) {
|
|
201
|
+
if (diff.chip.chipKind === 'avatar') {
|
|
202
|
+
cardSelections = applyAvatarChipDiffToCardSelections(cardSelections, diff);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if (cardSelections === next.cardSelections) {
|
|
206
|
+
return next;
|
|
207
|
+
}
|
|
208
|
+
return { ...next, cardSelections };
|
|
209
|
+
};
|
|
210
|
+
const collectReviewChipDiffs = (prevRows, nextRows) => {
|
|
211
|
+
const prevById = new Map(prevRows.map((row) => [row.id, row]));
|
|
212
|
+
const diffs = [];
|
|
213
|
+
for (const row of nextRows) {
|
|
214
|
+
const prevRow = prevById.get(row.id);
|
|
215
|
+
if (prevRow == null) {
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
const prevGroupsById = new Map(prevRow.chipGroups.map((group) => [group.id, group]));
|
|
219
|
+
for (const group of row.chipGroups) {
|
|
220
|
+
const prevGroup = prevGroupsById.get(group.id);
|
|
221
|
+
if (prevGroup == null) {
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
const prevChipsById = new Map(prevGroup.chips.map((chip) => [chip.id, chip]));
|
|
225
|
+
for (const chip of group.chips) {
|
|
226
|
+
const prevChip = prevChipsById.get(chip.id);
|
|
227
|
+
if (prevChip == null) {
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
const changed = new Set();
|
|
231
|
+
if (chip.isSelected !== prevChip.isSelected) {
|
|
232
|
+
changed.add('isSelected');
|
|
233
|
+
}
|
|
234
|
+
if (chip.optionalCode !== prevChip.optionalCode) {
|
|
235
|
+
changed.add('optionalCode');
|
|
236
|
+
}
|
|
237
|
+
if (changed.size > 0) {
|
|
238
|
+
diffs.push({ chip, changedFields: changed, groupKind: group.kind });
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return diffs;
|
|
244
|
+
};
|
|
245
|
+
const REVIEW_LIMIT_CHIP_ID_TO_LIMIT_ROW_ID = {
|
|
246
|
+
'limit-transaction': 'transactionLimit',
|
|
247
|
+
'limit-receipt': 'requireReceipt',
|
|
248
|
+
};
|
|
249
|
+
const applyLimitChipDiffToLimits = (limits, diff) => {
|
|
250
|
+
const mapped = REVIEW_LIMIT_CHIP_ID_TO_LIMIT_ROW_ID[diff.chip.id];
|
|
251
|
+
const directMatch = limits.find((row) => row.id === diff.chip.id) != null;
|
|
252
|
+
const rowId = mapped ?? (directMatch ? diff.chip.id : undefined);
|
|
253
|
+
if (rowId == null) {
|
|
254
|
+
return limits;
|
|
255
|
+
}
|
|
256
|
+
const idx = limits.findIndex((row) => row.id === rowId);
|
|
257
|
+
if (idx === -1) {
|
|
258
|
+
return limits;
|
|
259
|
+
}
|
|
260
|
+
let nextRow = limits[idx];
|
|
261
|
+
if (diff.changedFields.has('isSelected')) {
|
|
262
|
+
nextRow = { ...nextRow, isEnabled: diff.chip.isSelected === true };
|
|
263
|
+
}
|
|
264
|
+
if (diff.changedFields.has('optionalCode')) {
|
|
265
|
+
const raw = diff.chip.optionalCode;
|
|
266
|
+
const numericNext = raw != null && raw !== '' ? Number(raw) : undefined;
|
|
267
|
+
nextRow = { ...nextRow, amount: numericNext };
|
|
268
|
+
}
|
|
269
|
+
if (nextRow === limits[idx]) {
|
|
270
|
+
return limits;
|
|
271
|
+
}
|
|
272
|
+
const copy = limits.slice();
|
|
273
|
+
copy[idx] = nextRow;
|
|
274
|
+
return copy;
|
|
275
|
+
};
|
|
276
|
+
const applyAvatarChipDiffToCardSelections = (cardSelections, diff) => {
|
|
277
|
+
if (!diff.changedFields.has('isSelected')) {
|
|
278
|
+
return cardSelections;
|
|
279
|
+
}
|
|
280
|
+
const targetIds = diff.chip.cardIds != null && diff.chip.cardIds.length > 0
|
|
281
|
+
? diff.chip.cardIds
|
|
282
|
+
: [diff.chip.id];
|
|
283
|
+
const targetSet = new Set(targetIds);
|
|
284
|
+
let mutated = false;
|
|
285
|
+
const next = cardSelections.map((row) => {
|
|
286
|
+
if (!targetSet.has(row.id)) {
|
|
287
|
+
return row;
|
|
288
|
+
}
|
|
289
|
+
const desired = diff.chip.isSelected === true;
|
|
290
|
+
if (row.isChecked === desired) {
|
|
291
|
+
return row;
|
|
292
|
+
}
|
|
293
|
+
mutated = true;
|
|
294
|
+
return { ...row, isChecked: desired };
|
|
295
|
+
});
|
|
296
|
+
return mutated ? next : cardSelections;
|
|
297
|
+
};
|
|
298
|
+
const tryWriteAllowBlock = (field, diff) => {
|
|
299
|
+
const desired = diff.chip.isSelected === true;
|
|
300
|
+
const written = tryFlipItemInSide(field.allowItems, diff, desired);
|
|
301
|
+
if (written != null) {
|
|
302
|
+
return { ...field, allowItems: written };
|
|
303
|
+
}
|
|
304
|
+
const writtenBlock = tryFlipItemInSide(field.blockItems, diff, desired);
|
|
305
|
+
if (writtenBlock != null) {
|
|
306
|
+
return { ...field, blockItems: writtenBlock };
|
|
307
|
+
}
|
|
308
|
+
return null;
|
|
309
|
+
};
|
|
310
|
+
const tryFlipItemInSide = (items, diff, desired) => {
|
|
311
|
+
let idx = items.findIndex((item) => item.id === diff.chip.id);
|
|
312
|
+
if (idx === -1 && diff.chip.optionalCode != null) {
|
|
313
|
+
// Auto / upload mode category chips use the raw MCC code as
|
|
314
|
+
// `chip.id` while the source items use `mcc-{name}`; fall back to
|
|
315
|
+
// matching by code so the bridge round-trips both shapes.
|
|
316
|
+
idx = items.findIndex((item) => item.optionalCode === diff.chip.optionalCode ||
|
|
317
|
+
(item.optionalCodes ?? []).includes(diff.chip.optionalCode ?? ''));
|
|
318
|
+
}
|
|
319
|
+
if (idx === -1) {
|
|
320
|
+
return null;
|
|
321
|
+
}
|
|
322
|
+
if (items[idx].isSelected === desired) {
|
|
323
|
+
return items;
|
|
324
|
+
}
|
|
325
|
+
const copy = items.slice();
|
|
326
|
+
copy[idx] = { ...items[idx], isSelected: desired };
|
|
327
|
+
return copy;
|
|
328
|
+
};
|