@zeniai/client-epic-state 5.0.95-beta1ND → 5.0.95-betaML1

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.
Files changed (95) hide show
  1. package/lib/commonStateTypes/animations.d.ts +1 -1
  2. package/lib/commonStateTypes/animations.js +0 -1
  3. package/lib/entity/company/companyPayload.d.ts +0 -4
  4. package/lib/entity/company/companyPayload.js +0 -4
  5. package/lib/entity/company/companyStateTypes.d.ts +0 -4
  6. package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +0 -1
  7. package/lib/entity/paymentAccount/paymentAccountSelector.js +0 -4
  8. package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +1 -1
  9. package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +1 -1
  10. package/lib/entity/tenant/epic/saveConnectorCredentialsEpic.d.ts +3 -3
  11. package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +1 -1
  12. package/lib/entity/tenant/tenantPayload.d.ts +0 -1
  13. package/lib/entity/tenant/tenantReducer.d.ts +25 -38
  14. package/lib/entity/tenant/tenantReducer.js +5 -65
  15. package/lib/entity/tenant/tenantState.d.ts +0 -1
  16. package/lib/epic.d.ts +1 -6
  17. package/lib/epic.js +1 -7
  18. package/lib/esm/commonStateTypes/animations.js +0 -1
  19. package/lib/esm/entity/company/companyPayload.js +0 -4
  20. package/lib/esm/entity/paymentAccount/paymentAccountSelector.js +0 -3
  21. package/lib/esm/entity/tenant/tenantReducer.js +3 -63
  22. package/lib/esm/epic.js +1 -7
  23. package/lib/esm/index.js +8 -11
  24. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +15 -0
  25. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +63 -5
  26. package/lib/esm/view/fileView/epic/deleteFileEpic.js +2 -2
  27. package/lib/esm/view/fileView/epic/deleteFileListEpic.js +2 -2
  28. package/lib/esm/view/fileView/epic/updateFileNameEpic.js +2 -2
  29. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewReducer.js +50 -217
  30. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +1 -7
  31. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewState.js +0 -12
  32. package/lib/esm/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +12 -3
  33. package/lib/esm/view/recommendation/recommendationReducer.js +18 -1
  34. package/lib/esm/view/recommendation/recommendationStaleResponseHelper.js +26 -0
  35. package/lib/esm/view/spendManagement/commonSetup/setupViewReducer.js +52 -105
  36. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +1 -6
  37. package/lib/esm/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.js +7 -0
  38. package/lib/esm/view/transactionDetail/transactionDetailReducer.js +44 -3
  39. package/lib/index.d.ts +9 -13
  40. package/lib/index.js +35 -54
  41. package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.d.ts +2 -1
  42. package/lib/view/expenseAutomationView/epics/transactionCategorization/initializeTransactionCategorizationLocalDataEpic.js +15 -0
  43. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +63 -5
  44. package/lib/view/fileView/epic/deleteFileEpic.js +1 -1
  45. package/lib/view/fileView/epic/deleteFileListEpic.js +1 -1
  46. package/lib/view/fileView/epic/updateFileNameEpic.js +1 -1
  47. package/lib/view/onboardingView/customerView/onboardingCustomerViewPayload.d.ts +0 -3
  48. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +4 -41
  49. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.js +51 -219
  50. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +1 -5
  51. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +2 -11
  52. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +0 -40
  53. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.js +1 -13
  54. package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.d.ts +2 -2
  55. package/lib/view/recommendation/fetchEntityRecommendationsForLineUpdateEpic.js +10 -1
  56. package/lib/view/recommendation/recommendationReducer.d.ts +3 -1
  57. package/lib/view/recommendation/recommendationReducer.js +19 -2
  58. package/lib/view/recommendation/recommendationStaleResponseHelper.d.ts +7 -0
  59. package/lib/view/recommendation/recommendationStaleResponseHelper.js +30 -0
  60. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +2 -28
  61. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +53 -106
  62. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +2 -7
  63. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +1 -6
  64. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +0 -19
  65. package/lib/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.d.ts +2 -1
  66. package/lib/view/transactionDetail/epics/initializeTransactionDetailLocalDataEpic.js +7 -0
  67. package/lib/view/transactionDetail/transactionDetailReducer.js +44 -3
  68. package/package.json +1 -1
  69. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.d.ts +0 -21
  70. package/lib/entity/tenant/epic/initEmailConnectOAuthEpic.js +0 -54
  71. package/lib/esm/entity/tenant/epic/initEmailConnectOAuthEpic.js +0 -50
  72. package/lib/esm/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +0 -42
  73. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +0 -29
  74. package/lib/esm/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +0 -40
  75. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +0 -58
  76. package/lib/esm/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +0 -77
  77. package/lib/esm/view/spendManagement/commonSetup/kycKybAutofillActions.js +0 -14
  78. package/lib/esm/view/spendManagement/commonSetup/kycKybParseMapper.js +0 -210
  79. package/lib/esm/view/spendManagement/commonSetup/types/kycKybAutofill.js +0 -50
  80. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.d.ts +0 -7
  81. package/lib/view/onboardingView/customerView/epic/aiAgentsActivation/fetchAiAgentsActivationStatusEpic.js +0 -46
  82. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.d.ts +0 -8
  83. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiActivationViewedEpic.js +0 -33
  84. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.d.ts +0 -9
  85. package/lib/view/onboardingView/customerView/epic/customerDetails/acknowledgeOnboardingAiFinanceTeamEpic.js +0 -44
  86. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.d.ts +0 -28
  87. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKybDocumentEpic.js +0 -62
  88. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.d.ts +0 -9
  89. package/lib/view/spendManagement/commonSetup/epic/setup/parseUploadedKycDocumentEpic.js +0 -81
  90. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.d.ts +0 -33
  91. package/lib/view/spendManagement/commonSetup/kycKybAutofillActions.js +0 -17
  92. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.d.ts +0 -36
  93. package/lib/view/spendManagement/commonSetup/kycKybParseMapper.js +0 -218
  94. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.d.ts +0 -154
  95. package/lib/view/spendManagement/commonSetup/types/kycKybAutofill.js +0 -55
@@ -1,30 +1,62 @@
1
1
  import { createSlice } from '@reduxjs/toolkit';
2
- import { parseUploadedKybDocument, parseUploadedKybDocumentFailure, parseUploadedKycDocument, parseUploadedKycDocumentFailure, } from './kycKybAutofillActions';
3
2
  const initialFetchStatus = {
4
3
  fetchState: 'Not-Started',
5
4
  error: undefined,
6
5
  };
7
- const emptyOfficerSlot = {
8
- autoFilledFields: [],
9
- localData: undefined,
10
- sendOtpStatus: initialFetchStatus,
11
- otpverificationStatus: initialFetchStatus,
12
- };
13
6
  export const initialState = {
14
7
  updateStatus: { fetchState: 'Not-Started', error: undefined },
15
- parsingDocumentFileIds: [],
16
- companyDetails: { autoFilledFields: [] },
8
+ companyDetails: {},
17
9
  companyOfficerUpdateStatus: {
18
- Officer_1: { ...emptyOfficerSlot },
19
- Officer_2: { ...emptyOfficerSlot },
20
- Officer_3: { ...emptyOfficerSlot },
21
- Officer_4: { ...emptyOfficerSlot },
22
- Officer_5: { ...emptyOfficerSlot },
23
- Officer_6: { ...emptyOfficerSlot },
24
- Officer_7: { ...emptyOfficerSlot },
25
- Officer_8: { ...emptyOfficerSlot },
26
- Officer_9: { ...emptyOfficerSlot },
27
- Officer_10: { ...emptyOfficerSlot },
10
+ Officer_1: {
11
+ localData: undefined,
12
+ sendOtpStatus: initialFetchStatus,
13
+ otpverificationStatus: initialFetchStatus,
14
+ },
15
+ Officer_2: {
16
+ localData: undefined,
17
+ sendOtpStatus: initialFetchStatus,
18
+ otpverificationStatus: initialFetchStatus,
19
+ },
20
+ Officer_3: {
21
+ localData: undefined,
22
+ sendOtpStatus: initialFetchStatus,
23
+ otpverificationStatus: initialFetchStatus,
24
+ },
25
+ Officer_4: {
26
+ localData: undefined,
27
+ sendOtpStatus: initialFetchStatus,
28
+ otpverificationStatus: initialFetchStatus,
29
+ },
30
+ Officer_5: {
31
+ localData: undefined,
32
+ sendOtpStatus: initialFetchStatus,
33
+ otpverificationStatus: initialFetchStatus,
34
+ },
35
+ Officer_6: {
36
+ localData: undefined,
37
+ sendOtpStatus: initialFetchStatus,
38
+ otpverificationStatus: initialFetchStatus,
39
+ },
40
+ Officer_7: {
41
+ localData: undefined,
42
+ sendOtpStatus: initialFetchStatus,
43
+ otpverificationStatus: initialFetchStatus,
44
+ },
45
+ Officer_8: {
46
+ localData: undefined,
47
+ sendOtpStatus: initialFetchStatus,
48
+ otpverificationStatus: initialFetchStatus,
49
+ },
50
+ Officer_9: {
51
+ localData: undefined,
52
+ sendOtpStatus: initialFetchStatus,
53
+ otpverificationStatus: initialFetchStatus,
54
+ },
55
+ Officer_10: {
56
+ localData: undefined,
57
+ sendOtpStatus: initialFetchStatus,
58
+ otpverificationStatus: initialFetchStatus,
59
+ },
28
60
  },
29
61
  primaryContactDetails: {},
30
62
  };
@@ -265,92 +297,7 @@ const setupView = createSlice({
265
297
  clearSetupView(draft) {
266
298
  Object.assign(draft, initialState);
267
299
  },
268
- /**
269
- * Merge AI-parsed officer fields into the selected officer's localData and
270
- * track which field names were autofilled so the form can show the ✦ badge.
271
- */
272
- applyKycDocumentAutofillForSetup: {
273
- reducer(draft, action) {
274
- const { officerType, values, autoFilledFieldNames, fileId } = action.payload;
275
- const slot = draft.companyOfficerUpdateStatus[officerType];
276
- slot.localData = Object.assign({}, slot.localData, values);
277
- slot.autoFilledFields = Array.from(new Set([...slot.autoFilledFields, ...autoFilledFieldNames]));
278
- draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
279
- },
280
- prepare(payload) {
281
- return { payload };
282
- },
283
- },
284
- /**
285
- * Merge AI-parsed company fields into companyDetails.localData and track
286
- * which field names were autofilled.
287
- */
288
- applyKybDocumentAutofillForSetup: {
289
- reducer(draft, action) {
290
- const { values, autoFilledFieldNames, fileId } = action.payload;
291
- draft.companyDetails.localData = Object.assign({}, draft.companyDetails.localData, values);
292
- draft.companyDetails.autoFilledFields = Array.from(new Set([
293
- ...draft.companyDetails.autoFilledFields,
294
- ...autoFilledFieldNames,
295
- ]));
296
- draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
297
- },
298
- prepare(payload) {
299
- return { payload };
300
- },
301
- },
302
- /**
303
- * Wipe AI-autofill badges. If `officerType` is provided, clears only that
304
- * officer; otherwise clears company details too.
305
- */
306
- clearKycKybAutofillForSetup: {
307
- reducer(draft, action) {
308
- const { officerType } = action.payload;
309
- if (officerType != null) {
310
- draft.companyOfficerUpdateStatus[officerType].autoFilledFields = [];
311
- }
312
- else {
313
- draft.companyDetails.autoFilledFields = [];
314
- Object.keys(draft.companyOfficerUpdateStatus).forEach((key) => {
315
- draft.companyOfficerUpdateStatus[key].autoFilledFields = [];
316
- });
317
- }
318
- },
319
- prepare(payload = {}) {
320
- return { payload };
321
- },
322
- },
323
- },
324
- extraReducers: (builder) => {
325
- const addParsingFileId = (draft, fileId) => {
326
- if (!draft.parsingDocumentFileIds.includes(fileId)) {
327
- draft.parsingDocumentFileIds.push(fileId);
328
- }
329
- };
330
- const removeParsingFileId = (draft, fileId) => {
331
- draft.parsingDocumentFileIds = draft.parsingDocumentFileIds.filter((id) => id !== fileId);
332
- };
333
- builder.addCase(parseUploadedKycDocument, (draft, action) => {
334
- if (action.payload.target === 'setup') {
335
- addParsingFileId(draft, action.payload.fileId);
336
- }
337
- });
338
- builder.addCase(parseUploadedKybDocument, (draft, action) => {
339
- if (action.payload.target === 'setup') {
340
- addParsingFileId(draft, action.payload.fileId);
341
- }
342
- });
343
- builder.addCase(parseUploadedKycDocumentFailure, (draft, action) => {
344
- if (action.payload.target === 'setup') {
345
- removeParsingFileId(draft, action.payload.fileId);
346
- }
347
- });
348
- builder.addCase(parseUploadedKybDocumentFailure, (draft, action) => {
349
- if (action.payload.target === 'setup') {
350
- removeParsingFileId(draft, action.payload.fileId);
351
- }
352
- });
353
300
  },
354
301
  });
355
- export const { enableSetup, enableSetupSuccess, enableSetupFailure, updateBusinessVerificationDetails, updateBusinessVerificationDetailsSuccess, updateBusinessVerificationDetailsFailure, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, sendOtp: sendOtpSpendManagementSetUp, resendOtp: resendOtpSpendManagementSetUp, sendOtpSuccess: sendOtpSuccessSpendManagementSetUp, sendOtpFailure: sendOtpFailureSpendManagementSetUp, verifyOtp: verifyOtpSpendManagementSetUp, verifyOtpSuccess: verifyOtpSuccessSpendManagementSetUp, verifyOtpFailure: verifyOtpFailureSpendManagementSetUp, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearSetupView, applyKycDocumentAutofillForSetup, applyKybDocumentAutofillForSetup, clearKycKybAutofillForSetup, } = setupView.actions;
302
+ export const { enableSetup, enableSetupSuccess, enableSetupFailure, updateBusinessVerificationDetails, updateBusinessVerificationDetailsSuccess, updateBusinessVerificationDetailsFailure, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, sendOtp: sendOtpSpendManagementSetUp, resendOtp: resendOtpSpendManagementSetUp, sendOtpSuccess: sendOtpSuccessSpendManagementSetUp, sendOtpFailure: sendOtpFailureSpendManagementSetUp, verifyOtp: verifyOtpSpendManagementSetUp, verifyOtpSuccess: verifyOtpSuccessSpendManagementSetUp, verifyOtpFailure: verifyOtpFailureSpendManagementSetUp, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearSetupView, } = setupView.actions;
356
303
  export default setupView.reducer;
@@ -87,17 +87,15 @@ export function getBusinessVerificationDetails(state, companyId) {
87
87
  const { setupViewState, countryListState } = state;
88
88
  const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, updateStatus, } = setupViewState;
89
89
  const companyView = getCompanyView(state, companyId, []);
90
- const { companyDetailsLocalData, companyOfficerLocalData, parsingDocumentFileIds } = getCompanyAndIdentityDetails(state, companyId, {
90
+ const { companyDetailsLocalData, companyOfficerLocalData } = getCompanyAndIdentityDetails(state, companyId, {
91
91
  companyDetails,
92
92
  companyOfficerUpdateStatus,
93
93
  primaryContactDetails,
94
- parsingDocumentFileIds: setupViewState.parsingDocumentFileIds,
95
94
  });
96
95
  const allNationalityCountries = countryListState.byCountryListCode.nationalityCountryList.countries;
97
96
  return {
98
97
  companyDetailsLocalData,
99
98
  companyOfficerLocalData,
100
- parsingDocumentFileIds,
101
99
  companyView,
102
100
  updateStatus,
103
101
  allNationalityCountries,
@@ -121,7 +119,6 @@ export const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentit
121
119
  const companyAddress = addressViewState.newAddressState?.company_address;
122
120
  const registeredCompanyAddress = addressViewState.newAddressState?.company_registered_address;
123
121
  companyDetailsLocalData = {
124
- autoFilledFields: companyDetails.autoFilledFields,
125
122
  companyId,
126
123
  companyDescription,
127
124
  companyLegalName,
@@ -194,7 +191,6 @@ export const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentit
194
191
  const companyOfficerAddress = addressViewState.newAddressState?.[addressType];
195
192
  companyOfficerLocalData[officerType] = {
196
193
  ...companyOfficer.localData,
197
- autoFilledFields: companyOfficer.autoFilledFields,
198
194
  userFiles: getFilesByFileIds(fileState, fileIds),
199
195
  additionalFiles: getFilesByFileIds(fileState, additionalSubmittedDocumentsForVerificationFileIds),
200
196
  deleteFileStatusById,
@@ -208,7 +204,6 @@ export const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentit
208
204
  return {
209
205
  companyDetailsLocalData,
210
206
  companyOfficerLocalData,
211
- parsingDocumentFileIds: companyAndIdentityDetails.parsingDocumentFileIds,
212
207
  };
213
208
  };
214
209
  /* This helper function takes deposit accounts and payment accounts
@@ -2,6 +2,7 @@ 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';
5
6
  import { toTransactionDetailLocalData } from '../transactionDetailLocalDataHelper';
6
7
  import { clearTransactionDetailLocalData, initializeTransactionDetailLocalData, saveTransactionDetailLocalData, } from '../transactionDetailReducer';
7
8
  import { getTransactionDetailKey } from '../transactionDetailState';
@@ -14,6 +15,12 @@ export const initializeTransactionDetailLocalDataEpic = (actions$, state$) => ac
14
15
  if (detail != null) {
15
16
  const uncategorizedIncomeExpense = getUncategorizedAccounts(state$.value.accountState, state$.value.accountListState, 'accountList');
16
17
  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));
17
24
  fetchActions.push(clearTransactionDetailLocalData({ transactionId }));
18
25
  fetchActions.push(saveTransactionDetailLocalData({
19
26
  transactionId,
@@ -1,6 +1,9 @@
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';
4
7
  import { removeEntityRecommendationForLineIdInLocalData, setEntityRecommendationForLineIdInLocalData, toSetAllLineItemsLocalDataIsUpdateAllChecked, toSetAllLineItemsToCategoryClass, toSetAllLineItemsToVendor, toUpdateLineItemsOriginalCategoryClass, toUpdateLineItemsToOriginalVendor, } from './transactionDetailLocalDataHelper';
5
8
  import { getTransactionDetailKey, initialSupportedTransactionDetail, } from './transactionDetailState';
6
9
  export const initialState = {
@@ -251,6 +254,17 @@ const transactionDetail = createSlice({
251
254
  // captures the snapshot before the epic's start arm runs and would
252
255
  // otherwise clobber In-Progress back to undefined). Treat the field as
253
256
  // 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.
254
268
  const mergedLineItemById = {};
255
269
  Object.entries(incoming.lineItemById ?? {}).forEach(([lineId, line]) => {
256
270
  mergedLineItemById[lineId] = {
@@ -386,10 +400,37 @@ const transactionDetail = createSlice({
386
400
  const key = getTransactionDetailKey(action.payload.transactionId);
387
401
  const detail = recordGet(draft.transactionDetailById, key, undefined);
388
402
  if (detail != null) {
389
- const newLocalData = setEntityRecommendationForLineIdInLocalData(transaction, detail.transactionDetailLocalData, action.payload.entity, lineIds, uncategorizedIncomeExpense, recommendationWithCOTByLineId);
403
+ // Stale-response guard. If the user has changed their selection
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);
390
430
  // Release the per-line fetch flag for every line this fetch
391
- // covered so the inline skeleton resolves and the page-level
392
- // Save button can re-enable.
431
+ // covered (matched AND unmatched) so the inline skeleton
432
+ // resolves and the page-level Save button can re-enable.
433
+ // Unmatched lines are released without recommendation writes.
393
434
  lineIds.forEach((lineId) => {
394
435
  const lineItem = newLocalData.lineItemById[lineId];
395
436
  if (lineItem != null) {
package/lib/index.d.ts CHANGED
@@ -103,7 +103,6 @@ import { updateCommentsNotifications, updateCommentsNotificationsStatuses } from
103
103
  import { NotificationWithAuthors } from './entity/notification/types/notificationSelectorTypes';
104
104
  import { Notification, NotificationActivity, NotificationEventData, NotificationMetaData, NotificationUpdates, NotificationValueFormat } from './entity/notification/types/notificationStateTypes';
105
105
  import { ExternalNotificationData, NotificationActivityType, NotificationGroup, NotificationIdentifierType, NotificationMode, NotificationStatus, NotificationUpdateValue, toNotificationModeStrict } from './entity/notification/types/notificationTypes';
106
- import { getPlaidPaymentAccounts } from './entity/paymentAccount/paymentAccountSelector';
107
106
  import { Logo, PaymentAccount, VERIFIED_PAYMENT_ACCOUNT_PROVIDER_VERIFICATION_STATUS } from './entity/paymentAccount/paymentAccountState';
108
107
  import { PaymentInstrument } from './entity/paymentInstrument/paymentInstrument';
109
108
  import { AccountingSummary, Runway } from './entity/portfolio/accountingSummary/accountingSummaryState';
@@ -130,7 +129,7 @@ import { TaskPayload } from './entity/task/taskPayload';
130
129
  import { getTaskGroupById } from './entity/taskGroup/taskGroupSelector';
131
130
  import { TaskGroupState } from './entity/taskGroup/taskGroupState';
132
131
  import { TaskGroupTemplate } from './entity/taskGroupTemplate/taskGroupTemplateState';
133
- import { DoSignInPayload, clearAll, deleteConnection, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, initEmailConnectOAuth, resendVerifyDeviceOTP, resetSignInState, saveAPIKeyConnection, saveConnectorCredentials, saveExternalConnection as saveExternalConnectionForTenant, saveOAuthConnection, sendEmailMagicLinkToUser, sendSessionHeartbeat, toExternalIntegrationType, toExternalSupportedTool, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA } from './entity/tenant/tenantReducer';
132
+ import { DoSignInPayload, clearAll, deleteConnection, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, resendVerifyDeviceOTP, resetSignInState, saveAPIKeyConnection, saveConnectorCredentials, saveExternalConnection as saveExternalConnectionForTenant, saveOAuthConnection, sendEmailMagicLinkToUser, sendSessionHeartbeat, toExternalIntegrationType, toExternalSupportedTool, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA } from './entity/tenant/tenantReducer';
134
133
  import { CurrentTenant, TenantBaseView, TenantCoreDetailsView, TenantView, TenantsBaseOrdered, TenantsOrdered, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantBaseById, getTenantBaseViewForTenantId, getTenantBaseViewForTenantView, getTenantsBaseByCheckInDateSelector, getTenantsByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, isOtherProductsEnabledForTenant, isTenantBankingOnly, isTenantBookkeepingEnabled, isTenantCardsOnly, isTenantUsingZeniCOA, isZeniDomainTenant, toTenantCoreDetailsView } from './entity/tenant/tenantSelector';
135
134
  import { CapitalizableAccount, CapitalizableAccounts, CapitalizableClassificationType, CapitalizableMatchPattern, Connection, LoggedInUser, RoleResource, Tenant, TenantProductSettings } from './entity/tenant/tenantState';
136
135
  import { ToastNotificationPayload } from './entity/toastNotification/toastNotificationPayload';
@@ -339,9 +338,9 @@ import { clearOnboardingCustomerViewUpdateData, fetchCompanyOnboardingView, fetc
339
338
  import { NewOnboardingCustomerLocalData, NewOnboardingCustomerView, OnboardingCockpitView, ProductInfo, getNewOnboardingCustomerView, getOnboardingCockpitView } from './view/onboardingView/cockpitView/onboardingCockpitViewSelector';
340
339
  import { OnboardingCustomerListUIState, QBOConnectionPool } from './view/onboardingView/cockpitView/onboardingCockpitViewState';
341
340
  import { CustomerCreationStatus, NewOnboardingCustomer, OnboardingCompanyDetails, OnboardingCustomer, OnboardingCustomerCompletedStatus, ProductGroupType, ProductType, toProductType, toProductTypeStrict } from './view/onboardingView/cockpitView/types/onboardingCockpitViewTypes';
342
- import { acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, applyKybDocumentAutofillForOnboarding, applyKycDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, establishOnboardingPlaidConnection, fetchAiAgentsActivationStatus, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerView, getOnboardingPlaidLinkToken, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, updateCurrentStep, updateOnboardingCustomerView, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewLocalStoreData, updateOnboardingCustomerViewUIState, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus } from './view/onboardingView/customerView/onboardingCustomerViewReducer';
341
+ import { clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, establishOnboardingPlaidConnection, fetchOnboardingCustomerSetupView, fetchOnboardingCustomerView, getOnboardingPlaidLinkToken, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, updateCurrentStep, updateOnboardingCustomerView, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingCustomerViewLocalStoreData, updateOnboardingCustomerViewUIState, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus } from './view/onboardingView/customerView/onboardingCustomerViewReducer';
343
342
  import { OnboardingCustomerView, getOnboardingCustomerView, getProductSettingsString } from './view/onboardingView/customerView/onboardingCustomerViewSelector';
344
- import { AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationPhaseStatus, AiAgentsActivationSubview, OnboardingCustomerViewLocalData, OnboardingCustomerViewUIState, OnboardingStep } from './view/onboardingView/customerView/onboardingCustomerViewState';
343
+ import { OnboardingCustomerViewLocalData, OnboardingCustomerViewUIState, OnboardingStep } from './view/onboardingView/customerView/onboardingCustomerViewState';
345
344
  import { fetchOpEx, fetchOpExWithForecast, updateOpExCOABalancesRange, updateOpExDownloadState, updateOpExUIState } from './view/opEx/opExReducer';
346
345
  import { getOperatingExpensesForHighlightedRange, getOperatingExpensesForSelectedRange, getOperatingExpensesReport, getOperatingExpensesReportFetchState, getOperatingExpensesUIState } from './view/opEx/opExSelector';
347
346
  import { OpExReport, OpExUIStateSelectorView } from './view/opEx/opExSelectorTypes';
@@ -375,7 +374,7 @@ import { ProfitAndLossProjectViewReport } from './view/profitAndLossProjectView/
375
374
  import { ProfitAndLossProjectViewUIState } from './view/profitAndLossProjectView/profitAndLossProjectViewState';
376
375
  import { fetchProjectList } from './view/projectList/projectListReducer';
377
376
  import { ProjectListSelectorView, getProjectList } from './view/projectList/projectListSelector';
378
- import { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName } from './view/recommendation/recommendationReducer';
377
+ import { cancelEntityRecommendationsForLineUpdate, fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName } from './view/recommendation/recommendationReducer';
379
378
  import { clearReferrals, fetchReferrals, fetchRewardsPlan, resendReferralInvite, saveReferralFormDataInLocalStore, sendReferralInvite, updateReferViewed, updateReferralListSortUiState } from './view/referralView/referralReducer';
380
379
  import { ReferralListSelectorView, RewardsPlanCardReport, getInviteFormView, getReferralListView, getRewardsPlanCard } from './view/referralView/referralSelector';
381
380
  import { AmountStatusTypes, InviteCompanyLocalData, ReferralAmountStatus, ReferralInvitation, ReferralListViewSortKey, ReferralStatus, ReferralViewState, ReferralViewUIState, RewardsPlanData, StatusTypes, toReferralListViewSortKeyType } from './view/referralView/referralState';
@@ -485,8 +484,7 @@ import { ActiveChargeCardCount, ActiveDebitCardCount, ActiveDebitCardCountByUser
485
484
  import { toIssueChargeCardLocalDataFromDraft } from './view/spendManagement/chargeCards/issueChargeCard/toIssueChargeCardLocalDataFromDraft';
486
485
  import { CommonHistoryView, HistoricEvent, HistoricEventUpdate } from './view/spendManagement/commonHistoryView/commonHistory';
487
486
  import { ActivityHistorySelectorView } from './view/spendManagement/commonHistoryView/commonHistorySelector';
488
- import { parseUploadedKybDocument, parseUploadedKycDocument } from './view/spendManagement/commonSetup/kycKybAutofillActions';
489
- import { applyKybDocumentAutofillForSetup, applyKycDocumentAutofillForSetup, clearKycKybAutofillForSetup, clearSetupViewDataInLocalStore, enableSetup, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveIndustryAndIncDateInLocalStore, saveSetupViewDataInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, updateBusinessVerificationDetails, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData } from './view/spendManagement/commonSetup/setupViewReducer';
487
+ import { clearSetupViewDataInLocalStore, enableSetup, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveIndustryAndIncDateInLocalStore, saveSetupViewDataInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, updateBusinessVerificationDetails, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData } from './view/spendManagement/commonSetup/setupViewReducer';
490
488
  import { BusinessVerificationDetails, CompanyDetails, CompanyOfficersDetails, FundingAccount, SetupView, getBusinessVerificationDetails, getCommonSetupViewDetails } from './view/spendManagement/commonSetup/setupViewSelector';
491
489
  import { SetupViewLocalData, SetupViewState } from './view/spendManagement/commonSetup/setupViewState';
492
490
  import { COMPANY_ONBOARDING_INDUSTRY_TYPE_CODES, COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY, COMPANY_PURPOSE_OF_ACCOUNT_CODES, COMPANY_SOURCE_OF_FUNDS_CODES, COMPANY_TRANSACTION_VOLUME_CODES, COMPANY_US_NEXUS_TYPE_CODES, CompanyOnboardingIndustryTypeCode, CompanyOnboardingSubIndustryTypeCode, CompanyPurposeOfAccountCode, CompanySourceOfFundsCode, CompanyTransactionVolumeCode, CompanyUsNexusTypeCode, getCompanyOnboardingSubIndustryCodesForIndustry } from './view/spendManagement/commonSetup/types/businessVerification';
@@ -680,7 +678,7 @@ export { TimeframeTick, TimeframeTickWithMetaData, toTimeframeTick, mapTimePerio
680
678
  export { VendorSpendTrendFilterTabType, toVendorSpendTrendFilterTabsTypeStrict, } from './entity/vendorExpense/vendorExpenseSelector';
681
679
  export { getNumberOfPeriods };
682
680
  export { SCHEDULE_DAYS_OF_MONTH, ScheduleDaysOfMonth, toScheduleDaysOfMonth, Day, Month, toMonth, toMonthStrict, Quarter, toQuarter, toQuarterStrict, AbsoluteDay, TimePeriod, };
683
- export { CapitalizableAccount, CapitalizableAccounts, CapitalizableClassificationType, CapitalizableMatchPattern, Tenant, TenantView, LoggedInUser, TenantBaseView, CurrentTenant, TenantProductSettings, getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, TenantsBaseOrdered, TenantsOrdered, TenantCoreDetailsView, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, DoSignInPayload, doSignOut, sendSessionHeartbeat, resetSignInState, RoleResource, Connection, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, deleteConnection, saveAPIKeyConnection, saveConnectorCredentials, saveOAuthConnection, initEmailConnectOAuth, toExternalIntegrationType, toExternalSupportedTool, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
681
+ export { CapitalizableAccount, CapitalizableAccounts, CapitalizableClassificationType, CapitalizableMatchPattern, Tenant, TenantView, LoggedInUser, TenantBaseView, CurrentTenant, TenantProductSettings, getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, TenantsBaseOrdered, TenantsOrdered, TenantCoreDetailsView, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, DoSignInPayload, doSignOut, sendSessionHeartbeat, resetSignInState, RoleResource, Connection, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, deleteConnection, saveAPIKeyConnection, saveConnectorCredentials, saveOAuthConnection, toExternalIntegrationType, toExternalSupportedTool, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, };
684
682
  export { Account, AccountType, AccountBase, StatementCloseDay, toAccountType, AccountReport, NestedAccountReport, AccountWithBalanceReport, AccountGroup, AccountGroupReportV2, AccountGroupType, toAccountGroupType, AccountGroupReport, getAccountGroupKey, AccountGroupKey, RecommendedAccountBase, AccountFilterOption, getAllAccounts, getTransactionFilterAccountOptions, };
685
683
  export { Class, ClassBase, RecommendedClassBase, } from './entity/class/classState';
686
684
  export { ClassFilterOption, getAllClasses, getClassById, getClassFilterOptions, } from './entity/class/classSelector';
@@ -810,7 +808,7 @@ export { AccountListSelectorView, ClassListSelectorView, getClassList, fetchClas
810
808
  export { BillTab, BillsSubTabType, SaveBillStageCode, BillPayReviewSelectorView, DuplicateBillsSelectorView, EditBillDetailSelectorView, LineItemRecommendationsLocalData, EditBillInitialDetails, BillableStatus, PaymentDetailsSection, BillListReport, BillListDownloadReport, WhatForSection, fetchBillList, fetchBillListPerTab, updateTab, updateSubTab, updateSelectedBillId, updateBillDetailSaveBillCode, fetchVendorByNameAndParseInvoice, saveBillUpdatesToLocalStore, discardBillUpdatesInLocalStore, saveBillDetail, approveOrRejectBill, updateApprovalStatusOnSuccess, deleteBill, cancelAndDeleteBill, retryOrRefundBill, getBillList, getBillDownloadList, BillDetailViewSelector, ActorActivityWithUser, BillActivity, StepWithStatus, getBillDetailView, checkApproveRejectBtnShowForBill, BillDetailView, getBillTransactionDetailKey, fetchBillDetail, fetchEditBillDetailPage, fetchAndUpdateVendorRecommendations, fetchDuplicateBill, clearBillPayReview, EditBillDetail, EditBillDetailViewState, getEditBillDetail, getReviewPageBillDetail, BillDetailLocalData, PaymentDetailsSectionView, fetchBillAndInitializeLocalStore, updateShowAutofill, saveVendorSuccessOrFailure, BillPaymentStatus, BillPaymentStatusCodeType, BillPaymentRefundStatus, BillPaymentRefundStatusCodeType, BillStatus, BillStatusCodeType, BillApprovalType, updateBillListUIState, BillListUIState, BillPayViewSortKey, BillPayFilters, BillPayFilterCategory, BillListViewFilterCategoryField, BILL_PAY_FILTER_CATEGORIES, updateVendorDetailLocalData, resetVendorDetailLocalData, resetVendorSaveStatus, updateContactsInVendorDetailLocalData, updateVendorTabDetailUIState, updateContactsInVendorTabDetailLocalData, updateBillUploadFetchState, updateBillListSearchResult, fetchUserDetails, verifyUser, updateVendorContact, PaymentToOption, toPaymentToOption, convertAmountToHomeCurrency, RecurringBillInstance, RecurringBillConfigLocalData, EditRecurringBillType, fetchVendorAndUpdateBillLocalData, markBillForRetry, updateWithdrawFromAccountId, removeBillFileFromLocalStore, replaceBillFileInLocalStore, updateShouldReplaceBillData, };
811
809
  export { SpendManagementFiltersType, SpendManagementFilterEntityType, FilterCategoryType, BillPayFilterCategoryDropdownOption, ReimbursementFilterCategoryDropdownOption, TaskFilterCategoryDropdownOption, SpendManagementFilterCategoryDropdownOption, MatchingOperatorDropdownOption, CategoryCombinationOperator, hideCreatedByFilter, };
812
810
  export { TRANSACTION_FILTER_CATEGORIES, TransactionFilterAmountMatchingOperator, TransactionFilterCategory, TransactionFilterCategoryDropdownOption, TransactionFilterCategoryField, TransactionFilterEntityType, TransactionFilters, applyTransactionFilters, };
813
- export { BillPaySetupViewState, ZeniAccountSetupViewState, BillPaySetupViewLocalData, ZeniAccountSetupViewLocalData, PlaidAccountState, fetchBillPaySetupView, fetchZeniAccountSetupView, enableSetup, getPaymentAccounts, getPlaidLinkToken, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, updateBusinessVerificationDetails, updatePaymentAccount, updatePaymentAccountLoginStatus, updatePaymentAccountStatus, establishPlaidConnection, updateMappedCashAccount, updatePrimaryFundingAccount, acceptBillPayTerms, acceptZeniAccountTerms, acceptBillPayUpdatedTerms, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearBillPaySetupView, clearZeniAccountSetupView, applyKycDocumentAutofillForSetup, applyKybDocumentAutofillForSetup, clearKycKybAutofillForSetup, parseUploadedKycDocument, parseUploadedKybDocument, sendOtp, resendOtp, verifyOtp, CompanyDetails, CompanyOfficersDetails, BillPaySetupView, ZeniAccountSetupView, BillPayBusinessVerificationDetails, ZeniAccountBusinessVerificationDetails, TreasuryBusinessVerificationDetails, SetupViewState, SetupViewLocalData, SetupView, BusinessVerificationDetails, getBillPaySetupViewDetails, getPlaidAccountDetails, getPlaidPaymentAccounts, getZeniAccountSetupViewDetails, getBusinessVerificationDetails, getBillPayBusinessVerificationDetails, getZeniAccountBusinessVerificationDetails, getTreasuryBusinessVerificationDetails, getCommonSetupViewDetails, PlaidConnectionDetails, PlaidLinkTokenType, PlaidAccountKeyType, Token, FundingAccount, getTwoFactorAuthenticationView, getTwoFactorAuthenticationViewForCardUserOnboarding, getTwoFactorAuthenticationViewForChargeCardHolder, TwoFactorAuthenticationView, };
811
+ export { BillPaySetupViewState, ZeniAccountSetupViewState, BillPaySetupViewLocalData, ZeniAccountSetupViewLocalData, PlaidAccountState, fetchBillPaySetupView, fetchZeniAccountSetupView, enableSetup, getPaymentAccounts, getPlaidLinkToken, updateSelectedCompanyOfficer, updateSetupViewLocalStoreData, updateBusinessVerificationDetails, updatePaymentAccount, updatePaymentAccountLoginStatus, updatePaymentAccountStatus, establishPlaidConnection, updateMappedCashAccount, updatePrimaryFundingAccount, acceptBillPayTerms, acceptZeniAccountTerms, acceptBillPayUpdatedTerms, saveSetupViewDataInLocalStore, saveCompnayOfficerPhoneInLocalStore, saveCompnayOfficerAdditionalDocumentsInLocalStore, saveTreasuryAdditionalDocumentsInLocalStore, saveIndustryAndIncDateInLocalStore, clearSetupViewDataInLocalStore, clearBillPaySetupView, clearZeniAccountSetupView, sendOtp, resendOtp, verifyOtp, CompanyDetails, CompanyOfficersDetails, BillPaySetupView, ZeniAccountSetupView, BillPayBusinessVerificationDetails, ZeniAccountBusinessVerificationDetails, TreasuryBusinessVerificationDetails, SetupViewState, SetupViewLocalData, SetupView, BusinessVerificationDetails, getBillPaySetupViewDetails, getPlaidAccountDetails, getZeniAccountSetupViewDetails, getBusinessVerificationDetails, getBillPayBusinessVerificationDetails, getZeniAccountBusinessVerificationDetails, getTreasuryBusinessVerificationDetails, getCommonSetupViewDetails, PlaidConnectionDetails, PlaidLinkTokenType, PlaidAccountKeyType, Token, FundingAccount, getTwoFactorAuthenticationView, getTwoFactorAuthenticationViewForCardUserOnboarding, getTwoFactorAuthenticationViewForChargeCardHolder, TwoFactorAuthenticationView, };
814
812
  export { BankConnectionsSetupView, IntegrationsView, getApprovalRuleViewDetails, getBankConnectionsSetupViewDetails, getIntegrationsView, };
815
813
  export { fetchUserFinancialAccount };
816
814
  export { getUserFinancialAccount, UserFinancialAccountSelectorView };
@@ -850,7 +848,7 @@ export { Filing1099TinType };
850
848
  export { BillPayCardReport };
851
849
  export { ReimbursementCardReport };
852
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, };
853
- export { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName, };
851
+ export { cancelEntityRecommendationsForLineUpdate, fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName, };
854
852
  export type { FetchEntityRecommendationsForLineUpdatePayload, RecommendationLineUpdateFlowType, } from './view/recommendation/recommendationReducer';
855
853
  export { fetchOwnerList };
856
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, };
@@ -864,7 +862,7 @@ export { CountryWithCurrency };
864
862
  export { fetchCompanyConfig };
865
863
  export { getCompanyConfig };
866
864
  export { isZeniClearingAccountReport, ZENI_CLEARING_ACCOUNT, isZeniClearingAccount, };
867
- export { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, getOnboardingPlaidLinkToken, establishOnboardingPlaidConnection, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, updateOnboardingCustomerView, updateOnboardingCustomerViewLocalStoreData, updateCurrentStep, updateOnboardingCustomerViewUIState, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, fetchAiAgentsActivationStatus, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, getOnboardingCustomerView, getProductSettingsString, OnboardingCustomerView, OnboardingStep, OnboardingCustomerViewUIState, OnboardingCustomerViewLocalData, AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationPhaseStatus, AiAgentsActivationSubview, };
865
+ export { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, getOnboardingPlaidLinkToken, establishOnboardingPlaidConnection, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, updateOnboardingCustomerView, updateOnboardingCustomerViewLocalStoreData, updateCurrentStep, updateOnboardingCustomerViewUIState, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerView, clearOnboardingCustomerViewDataInLocalStore, getOnboardingCustomerView, getProductSettingsString, OnboardingCustomerView, OnboardingStep, OnboardingCustomerViewUIState, OnboardingCustomerViewLocalData, };
868
866
  export { saveAccountMapping, saveAccountMappingLocalData, clearAccountMappingLocalData, AccountMappingLocalData, AccountMappingView, VendorAccountMappingView, getAccountMappingView, initializeAccountMappingView, ExpenseCategory1099Filing, };
869
867
  export { MagicLinkView, getMagicLinkView, getMagicLinkBankAccountView, getMagicLinkCurrentAddressState, };
870
868
  export { fetchMagicLinkTenant, fetchBillAttachment, saveBankAccount, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, saveMagicLinkAddressInLocalStore, };
@@ -977,5 +975,3 @@ export { UserGroup } from './entity/userGroups/userGroupsState';
977
975
  export { SessionManager } from './entity/tenant/SessionManager';
978
976
  export type { SessionCallbacks, SessionConfig, } from './entity/tenant/sessionTypes';
979
977
  export { DEFAULT_SESSION_CONFIG } from './entity/tenant/sessionTypes';
980
- export type { KybProvidedDocumentType, KycKybAutofillTarget, KycKybProvidedDocumentType, KycProvidedDocumentType, KycSelectDocumentType, } from './view/spendManagement/commonSetup/types/kycKybAutofill';
981
- export { toKycProvidedDocumentType, toKycProvidedDocumentTypeFromAllowed, } from './view/spendManagement/commonSetup/types/kycKybAutofill';