@zeniai/client-epic-state 4.19.94 → 4.19.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/lib/entity/account/accountPayload.d.ts +2 -0
  2. package/lib/entity/account/accountPayload.js +2 -0
  3. package/lib/entity/account/accountState.d.ts +2 -0
  4. package/lib/entity/depositAccount/depositAccount.d.ts +1 -1
  5. package/lib/entity/depositAccount/depositAccount.js +8 -1
  6. package/lib/entity/reimbursement/reimbursementPayload.d.ts +2 -0
  7. package/lib/entity/reimbursement/reimbursementPayload.js +7 -0
  8. package/lib/entity/reimbursement/reimbursementState.d.ts +2 -0
  9. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  10. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  11. package/lib/entity/task/taskPayload.d.ts +1 -0
  12. package/lib/entity/task/taskPayload.js +1 -0
  13. package/lib/entity/task/taskState.d.ts +1 -0
  14. package/lib/entity/userGroups/userGroupsPayload.d.ts +7 -0
  15. package/lib/entity/userGroups/userGroupsPayload.js +10 -0
  16. package/lib/entity/userGroups/userGroupsReducer.d.ts +8 -0
  17. package/lib/entity/userGroups/userGroupsReducer.js +29 -0
  18. package/lib/entity/userGroups/userGroupsSelector.d.ts +4 -0
  19. package/lib/entity/userGroups/userGroupsSelector.js +12 -0
  20. package/lib/entity/userGroups/userGroupsState.d.ts +9 -0
  21. package/lib/entity/userGroups/userGroupsState.js +2 -0
  22. package/lib/epic.d.ts +12 -1
  23. package/lib/epic.js +12 -1
  24. package/lib/esm/entity/account/accountPayload.js +2 -0
  25. package/lib/esm/entity/depositAccount/depositAccount.js +8 -1
  26. package/lib/esm/entity/reimbursement/reimbursementPayload.js +7 -0
  27. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  28. package/lib/esm/entity/task/taskPayload.js +1 -0
  29. package/lib/esm/entity/userGroups/userGroupsPayload.js +7 -0
  30. package/lib/esm/entity/userGroups/userGroupsReducer.js +25 -0
  31. package/lib/esm/entity/userGroups/userGroupsSelector.js +8 -0
  32. package/lib/esm/entity/userGroups/userGroupsState.js +1 -0
  33. package/lib/esm/epic.js +12 -1
  34. package/lib/esm/index.js +9 -3
  35. package/lib/esm/reducer.js +6 -0
  36. package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +10 -0
  37. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +29 -0
  38. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +49 -0
  39. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +40 -0
  40. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +47 -0
  41. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +61 -0
  42. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +33 -0
  43. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +56 -0
  44. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +77 -0
  45. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
  46. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +79 -0
  47. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +24 -0
  48. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +189 -1
  49. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +433 -2
  50. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +23 -1
  51. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +244 -1
  52. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
  53. package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +44 -0
  54. package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +2 -1
  55. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +1 -1
  56. package/lib/esm/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +1 -0
  57. package/lib/esm/view/taskManager/taskListView/taskListSelector.js +3 -1
  58. package/lib/esm/view/userGroupListView/userGroupListViewReducer.js +65 -0
  59. package/lib/esm/view/userGroupListView/userGroupListViewSelector.js +16 -0
  60. package/lib/esm/view/userGroupListView/userGroupListViewState.js +1 -0
  61. package/lib/esm/view/userListView/fetchUserListByTypeEpic.js +11 -0
  62. package/lib/esm/zeniAPI.js +0 -2
  63. package/lib/index.d.ts +8 -4
  64. package/lib/index.js +82 -32
  65. package/lib/reducer.d.ts +6 -0
  66. package/lib/reducer.js +6 -0
  67. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  68. package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +10 -0
  69. package/lib/view/expenseAutomationView/bulkUploadTiming.js +13 -0
  70. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +18 -0
  71. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +33 -0
  72. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +7 -0
  73. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +53 -0
  74. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +8 -0
  75. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +44 -0
  76. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +7 -0
  77. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +51 -0
  78. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +8 -0
  79. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +65 -0
  80. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +8 -0
  81. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +37 -0
  82. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +9 -0
  83. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +61 -0
  84. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +14 -0
  85. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +81 -0
  86. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
  87. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +25 -0
  88. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +85 -0
  89. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +7 -0
  90. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +28 -0
  91. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  92. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +118 -0
  93. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +201 -0
  94. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +76 -3
  95. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +434 -2
  96. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +11 -3
  97. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +24 -2
  98. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +69 -1
  99. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +1 -0
  100. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
  101. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +243 -0
  102. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
  103. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +142 -0
  104. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +54 -1
  105. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -1
  106. package/lib/view/expenseAutomationView/types/transactionsViewState.js +2 -1
  107. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +1 -1
  108. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.d.ts +1 -0
  109. package/lib/view/taskManager/taskListView/epics/bulkUpdateTaskListEpic.js +1 -0
  110. package/lib/view/taskManager/taskListView/taskListSelector.d.ts +2 -0
  111. package/lib/view/taskManager/taskListView/taskListSelector.js +3 -1
  112. package/lib/view/userGroupListView/userGroupListViewReducer.d.ts +23 -0
  113. package/lib/view/userGroupListView/userGroupListViewReducer.js +69 -0
  114. package/lib/view/userGroupListView/userGroupListViewSelector.d.ts +7 -0
  115. package/lib/view/userGroupListView/userGroupListViewSelector.js +20 -0
  116. package/lib/view/userGroupListView/userGroupListViewState.d.ts +8 -0
  117. package/lib/view/userGroupListView/userGroupListViewState.js +2 -0
  118. package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +3 -1
  119. package/lib/view/userListView/fetchUserListByTypeEpic.js +11 -0
  120. package/lib/view/userListView/userListViewPayload.d.ts +2 -0
  121. package/lib/zeniAPI.js +0 -2
  122. package/package.json +2 -2
@@ -10,6 +10,8 @@ export const mapAccountBasePayloadToAccountBase = (payload) => ({
10
10
  accountDescription: payload.account_description ?? '',
11
11
  last4Digits: payload.last_4_digits ?? undefined,
12
12
  logo: payload.logo == null ? undefined : toURL(payload.logo),
13
+ paymentType: payload.payment_type ?? undefined,
14
+ paymentTypeName: payload.payment_type_name ?? undefined,
13
15
  qboId: payload.qbo_id ?? undefined,
14
16
  coaId: payload.coa_id ?? undefined,
15
17
  labels: toAccountLabelArray(payload.labels ?? []),
@@ -1,5 +1,12 @@
1
1
  import { stringToUnion } from '../../commonStateTypes/stringToUnion';
2
- const ALL_DEPOSIT_SUB_ACCOUNT_TYPE_CODE = ['checking', 'savings'];
2
+ const ALL_DEPOSIT_SUB_ACCOUNT_TYPE_CODE = [
3
+ 'Zinc',
4
+ 'Bronze',
5
+ 'Gold',
6
+ 'Silver',
7
+ 'Platinum',
8
+ 'Checking',
9
+ ];
3
10
  export const toDepositSubAccounTypeCodeType = (v) => stringToUnion(v, ALL_DEPOSIT_SUB_ACCOUNT_TYPE_CODE);
4
11
  const ALL_DEPOSIT_ACCOUNT_STATUS_TYPE = ['Closed', 'Open', 'Frozen'];
5
12
  export const toDepositAccountStatusType = (v) => stringToUnion(v, ALL_DEPOSIT_ACCOUNT_STATUS_TYPE);
@@ -5,6 +5,7 @@ import { date, dateNow } from '../../zeniDayJS';
5
5
  import { mapAccountBasePayloadToAccountBase, toAccountPayload, } from '../account/accountPayload';
6
6
  import { toBillPaymentMethod, toBillPaymentStatus, toBillStage, toBillStatus, toBulkProcessingDetail, toDeletionInfo, } from '../billPay/billTransaction/billTransactionPayload';
7
7
  import { mapClassBasePayloadToClassBase, toClassBasePayload, } from '../class/classPayload';
8
+ import { toCustomerBase, toCustomerBasePayload, } from '../customer/customerPayload';
8
9
  import { mapMerchantBasePayloadToMerchantBase, toMerchantBasePayload, } from '../merchant/merchantPayload';
9
10
  import { toAttachment, } from '../transaction/payloadTypes/attachmentPayload';
10
11
  const ALL_REIMBURSEMENT_TRANSACTION_TYPE = ['reimbursement'];
@@ -166,6 +167,9 @@ export const toLineDetailPayload = (lineDetail) => ({
166
167
  account: lineDetail.account != null
167
168
  ? toAccountPayload(lineDetail.account)
168
169
  : undefined,
170
+ customer: lineDetail.customer != null
171
+ ? toCustomerBasePayload(undefined, lineDetail.customer)
172
+ : undefined,
169
173
  });
170
174
  const toLineDetail = (payload) => ({
171
175
  class: payload.class.accounting_class_id != null
@@ -174,6 +178,9 @@ const toLineDetail = (payload) => ({
174
178
  account: payload.account?.account_id != null
175
179
  ? mapAccountBasePayloadToAccountBase(payload.account)
176
180
  : undefined,
181
+ customer: payload.customer?.customer_id != null
182
+ ? toCustomerBase(payload.customer, false)
183
+ : undefined,
177
184
  });
178
185
  const toDistanceMilage = (payload) => ({
179
186
  unit: payload.unit,
@@ -149,6 +149,7 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
149
149
  'missing_receipts_attachment',
150
150
  'flux_analysis_unreviewed',
151
151
  'flux_analysis_reviewed',
152
+ 'receipt_match',
152
153
  'receipts_upload',
153
154
  'billing_address_view',
154
155
  'express_pay_submit',
@@ -39,4 +39,5 @@ export const mapTaskPayloadToTask = (payload) => ({
39
39
  timeSpent: payload.time_spent != null
40
40
  ? convertMinutesToHHMM(payload.time_spent)
41
41
  : convertMinutesToHHMM(0),
42
+ groupAssignees: payload.group_assignees ?? [],
42
43
  });
@@ -0,0 +1,7 @@
1
+ export function mapUserGroupPayloadToUserGroup(payload) {
2
+ return {
3
+ userGroupId: payload.id,
4
+ name: payload.name,
5
+ userIds: payload.user_ids ?? [],
6
+ };
7
+ }
@@ -0,0 +1,25 @@
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ import { mapUserGroupPayloadToUserGroup, } from './userGroupsPayload';
3
+ export const initialState = {
4
+ userGroupByUserGroupId: {},
5
+ };
6
+ const userGroups = createSlice({
7
+ name: 'userGroups',
8
+ initialState,
9
+ reducers: {
10
+ updateAllUserGroups(draft, action) {
11
+ action.payload.userGroups.forEach((payload) => {
12
+ const userGroup = mapUserGroupPayloadToUserGroup(payload);
13
+ draft.userGroupByUserGroupId[userGroup.userGroupId] = userGroup;
14
+ });
15
+ },
16
+ removeUserGroup(draft, action) {
17
+ delete draft.userGroupByUserGroupId[action.payload];
18
+ },
19
+ clearAllUserGroups(draft) {
20
+ Object.assign(draft, initialState);
21
+ },
22
+ },
23
+ });
24
+ export const { updateAllUserGroups, removeUserGroup, clearAllUserGroups } = userGroups.actions;
25
+ export default userGroups.reducer;
@@ -0,0 +1,8 @@
1
+ export function getUserGroupsByUserGroupIds(userGroupsState, userGroupIds) {
2
+ return userGroupIds
3
+ .map((id) => getUserGroupByUserGroupId(userGroupsState, id))
4
+ .filter((value) => value != null);
5
+ }
6
+ export function getUserGroupByUserGroupId(userGroupsState, userGroupId) {
7
+ return userGroupsState.userGroupByUserGroupId[userGroupId] ?? undefined;
8
+ }
@@ -0,0 +1 @@
1
+ export {};
package/lib/esm/epic.js CHANGED
@@ -144,7 +144,17 @@ import { fetchJeSchedulesEpic as fetchExpenseAutomationJeSchedulesEpic, } from '
144
144
  import { ignoreRecommendedJeScheduleEpic as ignoreExpenseAutomationJEScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/ignoreRecommendedJeScheduleEpic';
145
145
  import { initializeJeScheduleLocalDataEpic as initializeExpenseAutomationJeScheduleLocalDataEpic, } from './view/expenseAutomationView/epics/jeSchedule/initializeJeScheduleLocalDataEpic';
146
146
  import { retryJeScheduleEpic as retryExpenseAutomationJEScheduleEpic, } from './view/expenseAutomationView/epics/jeSchedule/retryJeSchedulesEpic';
147
+ import { bulkUploadReceiptsEpic, } from './view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic';
148
+ import { confirmBulkUploadMatchEpic, } from './view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic';
149
+ import { fetchBulkUploadBatchDetailsEpic, } from './view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic';
150
+ import { fetchBulkUploadBatchesEpic, } from './view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic';
151
+ import { fetchCompletedTransactionsEpic, } from './view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic';
147
152
  import { fetchMissingReceiptsEpic as fetchExpenseAutomationMissingReceiptsEpic, } from './view/expenseAutomationView/epics/missingReceipts/fetchMissingReceiptsEpic';
153
+ import { fetchMoreBatchDetailsEpic, } from './view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic';
154
+ import { fetchMultipleBatchDetailsEpic, } from './view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic';
155
+ import { searchTransactionsForManualMatchEpic, } from './view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic';
156
+ import { uploadMissingReceiptSuccessEpic, } from './view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic';
157
+ import { bulkUploadAutomatchingTimeoutEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, } from './view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic';
148
158
  import { backgroundRefetchReviewTabEpic, } from './view/expenseAutomationView/epics/transactionCategorization/backgroundRefetchReviewTabEpic';
149
159
  import { fetchTransactionCategorizationEpic as fetchExpenseAutomationTransactionCategorizationEpic, } from './view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationEpic';
150
160
  import { fetchTransactionCategorizationViewEpic as fetchExpenseAutomationTransactionCategorizationViewEpic, } from './view/expenseAutomationView/epics/transactionCategorization/fetchTransactionCategorizationViewEpic';
@@ -153,6 +163,7 @@ import { markTransactionAsNotMiscategorizedEpic as fetchExpenseAutomationMarkTra
153
163
  import { saveTransactionCategorizationEpic as fetchExpenseAutomationSaveTransactionCategorizationEpic, } from './view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic';
154
164
  import { triggerReviewTabRefetchEpic, } from './view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic';
155
165
  import { updateTransactionCategorizationEpic as fetchExpenseAutomationUpdateTransactionCategorizationEpic, } from './view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic';
166
+ import { uploadTransactionReceiptSuccessEpic, } from './view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic';
156
167
  import { deleteFileEpic, } from './view/fileView/epic/deleteFileEpic';
157
168
  import { deleteFileListEpic, } from './view/fileView/epic/deleteFileListEpic';
158
169
  import { fetchFileEpic, } from './view/fileView/epic/fetchFileEpic';
@@ -524,7 +535,7 @@ import { fetchZeniAccStatementListEpic, } from './view/zeniAccStatementList/fetc
524
535
  import { fetchZeniAccStatementPageEpic, } from './view/zeniAccStatementList/fetchZeniAccStatementPageEpic';
525
536
  import { fetchZeniAccountsPromoCardEpic, } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic';
526
537
  // Note: Please maintain strict alphabetical order
527
- const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, addCardPaymentSourceEpic, approveOrRejectBillEpic, approveOrRejectBillsBulkActionEpic, approveOrRejectRemiEpic, approveOrRejectRemisBulkActionEpic, approveVendorGlobalReviewEpic, archiveTaskEpic, backgroundRefetchReviewTabEpic, bulkUpdateTaskListEpic, cancelAndDeleteBillEpic, cancelAndDeleteRemiEpic, cancelOrDeleteBillsBulkActionEpic, cancelOrDeleteRemisBulkActionEpic, cancelScheduleAccruedJournalEntryEpic, changeZeniPersonRolesEpic, checkDepositEpic, clearAllEpic, closeChargeCardEpic, closeChargeCardsEpic, companyManagementSavePendingUpdatesEpic, companyManagementSaveUpdatesEpic, confirmCardSetupIntentEpic, convertAmountToHomeCurrencyEpic, createAddressEpic, createBankAccountEpic, createCardSetupIntentEpic, createCheckingAccountEpic, createCompanyAddressEpic, createCompanyOfficersEpic, createCompanyUserAddressEpic, createGlobalMerchantEpic, createInternationalBankAccountEpic, createNewSchedulesAccruedEpic, createNewSchedulesEpic, createNewTaskGroupEpic, createPaymentInstrumentEpic, createSessionAndSubmitEpic, createSessionEpic, createTagEpic, createTaskFromTaskGroupTemplateEpic, createUserBankAccountEpic, deleteAccountStatementEpic, deleteBankAccountEpic, deleteBillEpic, deleteChatSessionEpic, deleteBillPayApprovalRuleEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, sendEmailMagicLinkToUserEpic, verifyDeviceWithTwoFAEpic, downloadAccountingProviderAttachmentEpic, dragNDropTasksEpic, enableChargeCardAutoPayEpic, enableSetupEpic, establishOnboardingPlaidConnectionEpic, establishPlaidConnectionEpic, expressInterestChargeCardEpic, fetchAccountListEpic, fetchAccountListForAccountTypesEpic, fetchAccountSettingsListForAccountTypesEpic, fetchAccruedScheduleListEpic, fetchActiveTenantEpic, fetchAddressEpic, fetchAllCockpitViewsEpic, fetchAllExpenseAutomationTabsEpic, fetchAllPeopleRequiredViewsEpic, fetchAllTagsEpic, fetchAllTaskGroupsEpic, fetchAllTenantsEpic, fetchAndUpdateVendorRecommendationsEpic, fetchAggregatedReportEpic, fetchApAgingDetailEpic, fetchApAgingEpic, fetchArAgingDetailEpic, fetchArAgingEpic, fetchAuditReportGroupViewEpic, fetchAuditRuleGroupViewEpic, fetchBalanceSheetEpic, fetchBalanceSheetForTimeframeEpic, fetchBankAccountsListEpic, fetchBankConnectionsViewEpic, fetchBankCountryNameByIbanEpic, fetchBankNameByRoutingEpic, fetchBankNameBySwiftEpic, fetchBillAndInitializeLocalStoreEpic, fetchBillDetailEpic, fetchBillingAccountsListEpic, fetchBillListEpic, fetchBillListPerTabEpic, fetchBillPayApproversDetailsEpic, fetchBillPayApproversListEpic, fetchBillPayCardEpic, fetchBillPayConfigEpic, fetchBillPaySetupApproverViewEpic, fetchBillPaySetupViewEpic, fetchCardBalanceEpic, 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, fetchCreditAccountEpic, fetchCreditAccountRepaymentEpic, fetchCurrencyConversionValueEpic, fetchDashboardEpic, fetchDashboardLayoutEpic, fetchDebitCardSummaryEpic, fetchDepositAccountDetailEpic, fetchDepositAccountEpic, fetchDepositAccountHistoryEpic, fetchDepositAccountLimitEpic, fetchDepositAccountListEpic, fetchDepositAccountListForCardsEpic, fetchDepositAccountTransactionListEpic, fetchDownloadSchedulesEpic, fetchDuplicateBillPayReviewEpic, fetchDuplicateReimbursementEpic, fetchEditBillDetailPageEpic, fetchEditRemiDetailPageEpic, fetchEligibleActionsForBillEpic, fetchEntityAutoCompleteEpic, fetchEntityHistoryEpic, fetchEntityRecommendationsByTransactionIdEpic, fetchExcludedResourcesEpic, fetchExpenseAutomationFluxAnalysisViewEpic, fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic, fetchExpenseAutomationJeSchedulesEpic, fetchExpenseAutomationJESchedulesPageEpic, fetchExpenseAutomationMarkTransactionAsNotMiscategorizedEpic, fetchExpenseAutomationMissingReceiptsEpic, fetchExpenseAutomationReconciliationsViewEpic, fetchExpenseAutomationSaveTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationViewEpic, fetchExpenseAutomationUpdateTransactionCategorizationEpic, fetchExpenseTrendEpic, fetchExpressPayInitialDetailsEpic, fetchExternalConnectionsEpic, fetchFileEpic, fetchFileListEpic, fetchFinanceStatementEpic, fetchForecastListEpic, initiateReportsClassViewRefetchingEpic, reportsResyncEpic, fetchGlobalMerchantAutoCompleteViewEpic, fetchGlobalMerchantRecommendationEpic, fetchIncomeTrendEpic, fetchInsightsCardEpic, fetchInternationalWireDynamicFormEpic, fetchIntlVerificationFormEpic, fetchIssueCardPageEpic, fetchMagicLinkBankNameByRoutingEpic, fetchMagicLinkBankNameBySwiftEpic, fetchMagicLinkBillEpic, fetchMagicLinkTenantEpic, fetchManagementViewEpic, fetchMerchantListEpic, fetchMonthClosePerformanceTrendEpic, fetchMonthEndCloseChecksEpic, fetchMyProfileEpic, fetchMyProfileViewEpic, fetchNetBurnOrIncomeClassesViewEpic, fetchNetBurnOrIncomeEpic, fetchNetBurnOrIncomeForTimeframeClassesViewEpic, fetchNetBurnOrIncomeForTimeframeEpic, fetchNetBurnOrIncomeStoryCardEpic, fetchNetBurnOrIncomeWithForecastEpic, fetchNotificationSettingsEpic, fetchNotificationSettingsViewEpic, fetchNotificationUnreadCountEpic, fetchNotificationViewEpic, fetchOnboardingCompletedCompaniesEpic, fetchOnboardingCustomerSetupViewEpic, fetchOnboardingCustomerViewEpic, fetchOnboardingViewEpic, fetchOpExByVendorEpic, fetchOpExByVendorReportForTimeframeEpic, fetchOpExByVendorReportSummaryEpic, fetchOpExClassesViewEpic, fetchOpExEpic, fetchOpExForTimeframeClassesViewEpic, fetchOpExReportForTimeframeEpic, fetchOpExWithForecastEpic, fetchOwnerListEpic, fetchParentSubsidiaryManagementViewEpic, fetchPaymentAccountBalanceEpic, fetchPaymentAccountListEpic, fetchPaymentSourcesEpic, fetchPeopleEpic, fetchPeoplePageEpic, fetchPortfolioViewEpic, fetchPreviousBillsEpic, fetchProfitAndLossClassesViewEpic, fetchProfitAndLossEpic, fetchProfitAndLossForTimeframeClassesViewEpic, fetchProfitAndLossForTimeframeEpic, 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, fetchTaskDetailEpic, fetchTaskDetailPageEpic, fetchTaskGroupTemplatesEpic, fetchTaskHistoryEpic, fetchTaskListEpic, fetchTaskListPageEpic, fetchTasksCardEpic, fetchTopExEpic, fetchTransactionActivityLogEpic, fetchTransactionDetailEpic, fetchTransactionListByAccountEpic, fetchTransactionListByClassEpic, fetchTransactionListByEntityEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, 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, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, 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, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCardOnboardingUserDetailsEpic, saveCompanyBillingAddressEpic, saveCompanyHealthMetricByIdEpic, saveCompanyMonthEndReportEpic, saveCompanyPassportDetailsEpic, saveExpenseAutomationReconciliationDetailsEpic, saveExpenseAutomationReconciliationReviewEpic, saveExternalConnectionEpic, saveMagicLinkBankAccountEpic, saveNewAddressEpic, saveNotificationSettingsEpic, saveOnboardingCustomerCompletedStatusEpic, saveOnboardingCustomerNotesEpic, saveOnboardingCustomerViewUpdatesEpic, saveRealTimeApprovalEpic, saveReasonForAuditRuleEpic, saveRemiDetailEpic, saveRemiSetupApproverViewUpdatesEpic, saveScheduleAccruedDetailsEpic, saveScheduleDetailsEpic, saveSubscriptionNotesUpdatesEpic, saveSubscriptionUpdatesEpic, saveTaskDetailEpic, saveTransactionDetailEpic, saveTransactionVendorEpic, saveVendorDetailsViewEpic, saveVendorEpic, saveVendorFirstReviewViewEpic, saveVendorsTabVendorEpic, sendCompanyMonthEndReportEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitIntlVerificationEpic, submitQuestionEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateBusinessVerificationDetailsEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, 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, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, updateTransactionDetailEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, vendorFiling1099UploadDetailsSaveEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
538
+ const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, addCardPaymentSourceEpic, approveOrRejectBillEpic, approveOrRejectBillsBulkActionEpic, approveOrRejectRemiEpic, approveOrRejectRemisBulkActionEpic, approveVendorGlobalReviewEpic, archiveTaskEpic, backgroundRefetchReviewTabEpic, bulkUpdateTaskListEpic, cancelAndDeleteBillEpic, cancelAndDeleteRemiEpic, cancelOrDeleteBillsBulkActionEpic, cancelOrDeleteRemisBulkActionEpic, cancelScheduleAccruedJournalEntryEpic, changeZeniPersonRolesEpic, checkDepositEpic, clearAllEpic, closeChargeCardEpic, closeChargeCardsEpic, companyManagementSavePendingUpdatesEpic, companyManagementSaveUpdatesEpic, confirmCardSetupIntentEpic, convertAmountToHomeCurrencyEpic, createAddressEpic, createBankAccountEpic, createCardSetupIntentEpic, createCheckingAccountEpic, createCompanyAddressEpic, createCompanyOfficersEpic, createCompanyUserAddressEpic, createGlobalMerchantEpic, createInternationalBankAccountEpic, createNewSchedulesAccruedEpic, createNewSchedulesEpic, createNewTaskGroupEpic, createPaymentInstrumentEpic, createSessionAndSubmitEpic, createSessionEpic, createTagEpic, createTaskFromTaskGroupTemplateEpic, createUserBankAccountEpic, deleteAccountStatementEpic, deleteBankAccountEpic, deleteBillEpic, deleteChatSessionEpic, deleteBillPayApprovalRuleEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, sendEmailMagicLinkToUserEpic, verifyDeviceWithTwoFAEpic, downloadAccountingProviderAttachmentEpic, dragNDropTasksEpic, enableChargeCardAutoPayEpic, enableSetupEpic, establishOnboardingPlaidConnectionEpic, establishPlaidConnectionEpic, expressInterestChargeCardEpic, fetchAccountListEpic, fetchAccountListForAccountTypesEpic, fetchAccountSettingsListForAccountTypesEpic, fetchAccruedScheduleListEpic, fetchActiveTenantEpic, fetchAddressEpic, fetchAllCockpitViewsEpic, fetchAllExpenseAutomationTabsEpic, fetchAllPeopleRequiredViewsEpic, fetchAllTagsEpic, fetchAllTaskGroupsEpic, fetchAllTenantsEpic, fetchAndUpdateVendorRecommendationsEpic, fetchAggregatedReportEpic, fetchApAgingDetailEpic, fetchApAgingEpic, fetchArAgingDetailEpic, fetchArAgingEpic, fetchAuditReportGroupViewEpic, fetchAuditRuleGroupViewEpic, fetchBalanceSheetEpic, fetchBalanceSheetForTimeframeEpic, fetchBankAccountsListEpic, fetchBankConnectionsViewEpic, fetchBankCountryNameByIbanEpic, fetchBankNameByRoutingEpic, fetchBankNameBySwiftEpic, fetchBillAndInitializeLocalStoreEpic, fetchBillDetailEpic, fetchBillingAccountsListEpic, fetchBillListEpic, fetchBillListPerTabEpic, fetchBillPayApproversDetailsEpic, fetchBillPayApproversListEpic, fetchBillPayCardEpic, fetchBillPayConfigEpic, fetchBillPaySetupApproverViewEpic, fetchBillPaySetupViewEpic, fetchCardBalanceEpic, 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, fetchCreditAccountEpic, fetchCreditAccountRepaymentEpic, fetchCurrencyConversionValueEpic, fetchDashboardEpic, fetchDashboardLayoutEpic, fetchDebitCardSummaryEpic, fetchDepositAccountDetailEpic, fetchDepositAccountEpic, fetchDepositAccountHistoryEpic, fetchDepositAccountLimitEpic, fetchDepositAccountListEpic, fetchDepositAccountListForCardsEpic, fetchDepositAccountTransactionListEpic, fetchDownloadSchedulesEpic, fetchDuplicateBillPayReviewEpic, fetchDuplicateReimbursementEpic, fetchEditBillDetailPageEpic, fetchEditRemiDetailPageEpic, fetchEligibleActionsForBillEpic, fetchEntityAutoCompleteEpic, fetchEntityHistoryEpic, fetchEntityRecommendationsByTransactionIdEpic, fetchExcludedResourcesEpic, fetchExpenseAutomationFluxAnalysisViewEpic, fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic, fetchExpenseAutomationJeSchedulesEpic, fetchExpenseAutomationJESchedulesPageEpic, fetchExpenseAutomationMarkTransactionAsNotMiscategorizedEpic, fetchExpenseAutomationMissingReceiptsEpic, bulkUploadReceiptsEpic, confirmBulkUploadMatchEpic, fetchBulkUploadBatchDetailsEpic, fetchMultipleBatchDetailsEpic, fetchMoreBatchDetailsEpic, fetchBulkUploadBatchesEpic, fetchCompletedTransactionsEpic, bulkUploadAutomatchingTimeoutEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, searchTransactionsForManualMatchEpic, fetchExpenseAutomationReconciliationsViewEpic, fetchExpenseAutomationSaveTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationViewEpic, fetchExpenseAutomationUpdateTransactionCategorizationEpic, fetchExpenseTrendEpic, fetchExpressPayInitialDetailsEpic, fetchExternalConnectionsEpic, fetchFileEpic, fetchFileListEpic, fetchFinanceStatementEpic, fetchForecastListEpic, initiateReportsClassViewRefetchingEpic, reportsResyncEpic, fetchGlobalMerchantAutoCompleteViewEpic, fetchGlobalMerchantRecommendationEpic, fetchIncomeTrendEpic, fetchInsightsCardEpic, fetchInternationalWireDynamicFormEpic, fetchIntlVerificationFormEpic, fetchIssueCardPageEpic, fetchMagicLinkBankNameByRoutingEpic, fetchMagicLinkBankNameBySwiftEpic, fetchMagicLinkBillEpic, fetchMagicLinkTenantEpic, fetchManagementViewEpic, fetchMerchantListEpic, fetchMonthClosePerformanceTrendEpic, fetchMonthEndCloseChecksEpic, fetchMyProfileEpic, fetchMyProfileViewEpic, fetchNetBurnOrIncomeClassesViewEpic, fetchNetBurnOrIncomeEpic, fetchNetBurnOrIncomeForTimeframeClassesViewEpic, fetchNetBurnOrIncomeForTimeframeEpic, fetchNetBurnOrIncomeStoryCardEpic, fetchNetBurnOrIncomeWithForecastEpic, fetchNotificationSettingsEpic, fetchNotificationSettingsViewEpic, fetchNotificationUnreadCountEpic, fetchNotificationViewEpic, fetchOnboardingCompletedCompaniesEpic, fetchOnboardingCustomerSetupViewEpic, fetchOnboardingCustomerViewEpic, fetchOnboardingViewEpic, fetchOpExByVendorEpic, fetchOpExByVendorReportForTimeframeEpic, fetchOpExByVendorReportSummaryEpic, fetchOpExClassesViewEpic, fetchOpExEpic, fetchOpExForTimeframeClassesViewEpic, fetchOpExReportForTimeframeEpic, fetchOpExWithForecastEpic, fetchOwnerListEpic, fetchParentSubsidiaryManagementViewEpic, fetchPaymentAccountBalanceEpic, fetchPaymentAccountListEpic, fetchPaymentSourcesEpic, fetchPeopleEpic, fetchPeoplePageEpic, fetchPortfolioViewEpic, fetchPreviousBillsEpic, fetchProfitAndLossClassesViewEpic, fetchProfitAndLossEpic, fetchProfitAndLossForTimeframeClassesViewEpic, fetchProfitAndLossForTimeframeEpic, 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, fetchTaskDetailEpic, fetchTaskDetailPageEpic, fetchTaskGroupTemplatesEpic, fetchTaskHistoryEpic, fetchTaskListEpic, fetchTaskListPageEpic, fetchTasksCardEpic, fetchTopExEpic, fetchTransactionActivityLogEpic, fetchTransactionDetailEpic, fetchTransactionListByAccountEpic, fetchTransactionListByClassEpic, fetchTransactionListByEntityEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, 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, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, 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, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCardOnboardingUserDetailsEpic, saveCompanyBillingAddressEpic, saveCompanyHealthMetricByIdEpic, saveCompanyMonthEndReportEpic, saveCompanyPassportDetailsEpic, saveExpenseAutomationReconciliationDetailsEpic, saveExpenseAutomationReconciliationReviewEpic, saveExternalConnectionEpic, saveMagicLinkBankAccountEpic, saveNewAddressEpic, saveNotificationSettingsEpic, saveOnboardingCustomerCompletedStatusEpic, saveOnboardingCustomerNotesEpic, saveOnboardingCustomerViewUpdatesEpic, saveRealTimeApprovalEpic, saveReasonForAuditRuleEpic, saveRemiDetailEpic, saveRemiSetupApproverViewUpdatesEpic, saveScheduleAccruedDetailsEpic, saveScheduleDetailsEpic, saveSubscriptionNotesUpdatesEpic, saveSubscriptionUpdatesEpic, saveTaskDetailEpic, saveTransactionDetailEpic, saveTransactionVendorEpic, saveVendorDetailsViewEpic, saveVendorEpic, saveVendorFirstReviewViewEpic, saveVendorsTabVendorEpic, sendCompanyMonthEndReportEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitIntlVerificationEpic, submitQuestionEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateBusinessVerificationDetailsEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, 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, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, updateTransactionDetailEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, vendorFiling1099UploadDetailsSaveEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
528
539
  const rootEpic = (action$, store$, dependencies) => combinedEpics(action$, store$, dependencies).pipe(map(identity), catchError((error, source) => {
529
540
  console.error(error);
530
541
  return source;
package/lib/esm/index.js CHANGED
@@ -163,12 +163,13 @@ import { isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType
163
163
  import { MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, } from './view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper';
164
164
  import { clearExpenseAutomationFluxAnalysisView, fetchFluxAnalysisView, reviewFluxAnalysisView, updateFluxAnalysisViewPageMetaData, updateFluxAnalysisViewUIState, updateOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview, } from './view/expenseAutomationView/reducers/fluxAnalysisViewReducer';
165
165
  import { clearJeScheduleLocalData as clearExpenseAutomationJEScheduleLocalData, clearExpenseAutomationJESchedulesView, fetchJeSchedulesPage as fetchExpenseAutomationJESchedulesPage, ignoreRecommendedJeSchedule as ignoreExpenseAutomationJESchedule, initializeAccountSettingsView as initializeJeAccountSettingsView, initializeJeScheduleLocalData, removeJeScheduleTransactionKey, retryJeSchedule as retryExpenseAutomationJESchedule, saveAccountSettings as saveJeAccountSettings, saveAccountSettingsLocalData as saveJeAccountSettingsLocalData, updateJeScheduleLocalDataById, updateJeScheduleTransactionKeys, } from './view/expenseAutomationView/reducers/jeSchedulesViewReducer';
166
- import { fetchMissingReceipts as fetchExpenseAutomationMissingReceipts, markMissingReceiptAsDone as markExpenseAutomationMissingReceiptAsDone, updateMissingReceiptUploadState as updateExpenseAutomationMissingReceiptUploadState, updateMissingReceiptsUIState as updateExpenseAutomationMissingReceiptsUIState, uploadMissingReceiptSuccess as uploadExpenseAutomationMissingReceiptSuccess, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
166
+ import { acknowledgeBulkUploadConfirmMatchComplete, bulkUploadAutomatchingTimedOut, bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, clearBulkUpload, clearManualSearchResults, clearMissingReceiptsTabNavigation, confirmBulkUploadMatch, confirmBulkUploadMatchFailure, confirmBulkUploadMatchSuccess, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsFailure, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, fetchBulkUploadBatchesFailure, fetchBulkUploadBatchesSuccess, fetchCompletedTransactions, fetchCompletedTransactionsFailure, fetchCompletedTransactionsSuccess, fetchMissingReceipts as fetchExpenseAutomationMissingReceipts, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, markMissingReceiptAsDone as markExpenseAutomationMissingReceiptAsDone, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, searchTransactionsForManualMatch, searchTransactionsForManualMatchFailure, searchTransactionsForManualMatchSuccess, setBulkUploadCompletedSubTab, setBulkUploadResultsTab, setBulkUploadSortConfig, storeBatchDetails, updateBulkUploadProgress, updateMissingReceiptUploadState as updateExpenseAutomationMissingReceiptUploadState, updateMissingReceiptsUIState as updateExpenseAutomationMissingReceiptsUIState, uploadMissingReceiptSuccess as uploadExpenseAutomationMissingReceiptSuccess, } from './view/expenseAutomationView/reducers/missingReceiptsViewReducer';
167
167
  import { deleteAccountStatement, fetchReconciliation as fetchReconciliationView, saveReconciliationDetail as saveExpenseAutomationReconciliationDetail, saveReconciliationReview as saveExpenseAutomationReconciliationReview, setConnectionInProgressForAccount as setConnectionInProgressForAccountReconciliation, setStatementParseInProgress, updateAccountReconciliationLocalData as updateExpenseAutomationAccountReconciliationLocalData, updateSelectedAccountId as updateExpenseAutomationAccountReconciliationSelectedAccountId, updateSelectedTab as updateExpenseAutomationAccountReconciliationSelectedTab, updateReconListScrollPosition as updateExpenseAutomationReconListScrollPosition, updateReviewTabSortState as updateExpenseAutomationReconReviewTabListSortState, updateReviewTabLocalData as updateExpenseAutomationReconReviewTabLocalData, updateReconcileTabListScrollState as updateExpenseAutomationReconcileTabListScrollState, updateReconcileTabListSortState as updateExpenseAutomationReconcileTabListSortState, updateReconcileTabLocalData as updateExpenseAutomationReconcileTabLocalData, updateSelectedDrawerAccountId as updateExpenseAutomationSelectedDrawerAccountId, updateStatementUploadChosen, uploadAccountStatement, } from './view/expenseAutomationView/reducers/reconciliationViewReducer';
168
- import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
168
+ import { backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, fetchTransactionCategorization, fetchTransactionCategorizationFailure, fetchTransactionCategorizationView, initializeTransactionCategorizationViewLocalData, markTransactionAsNotMiscategorized, saveTransactionCategorization, saveTransactionCategorizationLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, setEntityRecommendationForLineIdsForCategorization, syncTransactionCategorizationFromDetailSave, updateCurrentSelectedTransactionCategorizationTab, updateSelectedCheckboxTransactionIds, updateSelectedCustomerForTransaction, updateSelectedTransactionId, updateSelectedVendorForTransaction, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, updateTransactionCategorizationUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, } from './view/expenseAutomationView/reducers/transactionsViewReducer';
169
169
  import { getExpenseAutomationFluxAnalysisView } from './view/expenseAutomationView/selectors/fluxAnalysisViewSelector';
170
170
  import { getExpenseAutomationReconciliationView, isAccountReconReport, } from './view/expenseAutomationView/selectors/reconciliationViewSelector';
171
171
  import { getExpenseAutomationTransactionView } from './view/expenseAutomationView/selectors/transactionCategorizationSelector';
172
+ import { BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, } from './view/expenseAutomationView/types/missingReceiptsViewState';
172
173
  import { toMissingReceiptsSortKey as toExpenseAutomationMissingReceiptsSortKey, } from './view/expenseAutomationView/types/missingReceiptsViewState';
173
174
  import { toReconciliationTabsType, } from './view/expenseAutomationView/types/reconciliationViewState';
174
175
  import { toTransactionsTabKey as toExpenseAutomationTransactionsTabKey, toTransactionsSortKey, } from './view/expenseAutomationView/types/transactionsViewState';
@@ -415,7 +416,11 @@ export { newBalancesFilterClassesView };
415
416
  export { toCOABalanceTypeStrict, toCOABalanceType as toCOABlanaceType, isCalculatedBalanceType, };
416
417
  export { stringToUnion, stringToUnionStrict };
417
418
  export { fetchMonthEndCloseChecks, fetchMonthClosePerformanceTrend, getMonthEndCloseChecksViewByTenantId, ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, };
418
- export { getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, fetchExpenseAutomationMissingReceipts, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, updateStatementUploadChosen, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, };
419
+ export {
420
+ // Bulk Upload Types
421
+ BATCH_FILE_STATUSES, isUnmatchedTabFileStatus, toBatchFileStatus, toBatchStatusValue, toBulkUploadPhase, toBulkUploadResultsTab, toBulkUploadSortKey, toCompletedSubTab, toMatchSource, toMissingReceiptsTab, getExpenseAutomationView, toExpenseAutomationMissingReceiptsSortKey, toExpenseAutomationTransactionsTabKey, toExpenseAutomationViewType, uploadExpenseAutomationMissingReceiptSuccess, markExpenseAutomationMissingReceiptAsDone, fetchAllExpenseAutomationTabs, refreshExpenseAutomationCurrentTab, updateCurrentSelectedTransactionCategorizationTab, fetchExpenseAutomationMissingReceipts,
422
+ // Bulk Upload Actions
423
+ bulkUploadReceipts, bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, bulkUploadReceiptsFailure, updateBulkUploadProgress, pusherBatchStatusUpdate, requestMissingReceiptsTabNavigation, clearMissingReceiptsTabNavigation, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatchDetailsFailure, storeBatchDetails, fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, fetchBulkUploadBatches, fetchBulkUploadBatchesSuccess, fetchBulkUploadBatchesFailure, confirmBulkUploadMatch, confirmBulkUploadMatchSuccess, confirmBulkUploadMatchFailure, setBulkUploadResultsTab, setBulkUploadCompletedSubTab, setBulkUploadSortConfig, clearBulkUpload, searchTransactionsForManualMatch, searchTransactionsForManualMatchSuccess, searchTransactionsForManualMatchFailure, clearManualSearchResults, acknowledgeBulkUploadConfirmMatchComplete, fetchCompletedTransactions, fetchCompletedTransactionsSuccess, fetchCompletedTransactionsFailure, fetchFluxAnalysisView, clearExpenseAutomationFluxAnalysisView, updateOperatingExpensesIdsForReview as updateFluxOperatingExpensesIdsForReview, updateSelectedSectionIdsForReview as updateFluxAnalysisSelectedSectionIdsForReview, reviewFluxAnalysisView, updateExpenseAutomationMissingReceiptUploadState, updateExpenseAutomationMissingReceiptsUIState, updateTransactionCategorizationUploadReceiptState, uploadTransactionCategorizationReceiptSuccess, getExpenseAutomationFluxAnalysisView, updateCurrentSelectedView, updateCurrentSelectedPeriod, getExpenseAutomationTransactionView, updateFluxAnalysisViewUIState, updateFluxAnalysisViewPageMetaData, MAX_SELECTION_LIMIT, checkIfAllLineItemsAreCategoryClassFilled, getLineItemsByTransactionIdsFromLocalData, isAnyItemWithUncategorizedExpenseAccount, saveExpenseAutomationReconciliationDetail, updateExpenseAutomationReconcileTabListScrollState, updateExpenseAutomationReconReviewTabListSortState, updateExpenseAutomationReconcileTabListSortState, updateExpenseAutomationReconcileTabLocalData, updateExpenseAutomationAccountReconciliationSelectedTab, updateExpenseAutomationAccountReconciliationSelectedAccountId, getExpenseAutomationReconciliationView, fetchReconciliationView, uploadAccountStatementIntoDocumentAI, updateExpenseAutomationReconListScrollPosition, setConnectionInProgressForAccountReconciliation, getAccountReconByAccountIdAndSelectedPeriod, toReconciliationTabsType, isAccountReconReport, updateExpenseAutomationReconReviewTabLocalData, updateExpenseAutomationSelectedDrawerAccountId, saveExpenseAutomationReconciliationReview, updateExpenseAutomationAccountReconciliationLocalData, toReconciliationAccountSource, deleteAccountStatement, uploadAccountStatement, updateStatementUploadChosen, isReviewTransactionBankTransferType, isReviewTransactionBillPaymentType, isReviewTransactionCreditCardPaymentType, isReviewTransactionDepositType, isReviewTransactionExpenseType, isReviewTransactionCreditCardCreditType, setStatementParseInProgress, };
419
424
  export { fetchTransactionCategorization, fetchTransactionCategorizationView, updateTransactionCategorizationUIState, updateSelectedCheckboxTransactionIds, setEntityRecommendationForLineIdsForCategorization, initializeTransactionCategorizationViewLocalData, setAllItemsToCategoryClassInLocalDataForCategorization, saveTransactionCategorizationLocalData, fetchTransactionCategorizationFailure, saveTransactionCategorization, updateTransactionCategorization, updateTransactionCategorizationSaveStatus, markTransactionAsNotMiscategorized, updateSelectedVendorForTransaction, updateSelectedCustomerForTransaction, updateSelectedTransactionId, syncTransactionCategorizationFromDetailSave, backgroundRefetchReviewTab, clearExpenseAutomationTransactionsView, toTransactionsSortKey, };
420
425
  export { TOP_EX_TIME_PERIODS };
421
426
  export { toTimeframeTick, mapTimePeriodtoTimeframeTick, toTimePeriod, toAbsoluteDay, toMonthYearPeriodId, convertToPeriod, };
@@ -607,5 +612,6 @@ export { fetchTreasuryStatementList } from './view/spendManagement/treasury/trea
607
612
  export { getTreasuryStatements, } from './view/spendManagement/treasury/treasuryStatementList/treasuryStatementListSelector';
608
613
  export { fetchTreasuryTaxLetterList } from './view/spendManagement/treasury/treasuryTaxLetterList/treasuryTaxLetterListReducer';
609
614
  export { getTreasuryTaxLetters, } from './view/spendManagement/treasury/treasuryTaxLetterList/treasuryTaxLetterListSelector';
615
+ export { BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS, BULK_UPLOAD_BAR_COMPLETE_HOLD_MS, } from './view/expenseAutomationView/bulkUploadTiming';
610
616
  export { fetchTransactionActivityLog } from './view/transactionActivityLogView/transactionActivityLogViewReducer';
611
617
  export { getTransactionActivityLogView, } from './view/transactionActivityLogView/transactionActivityLogViewSelector';
@@ -58,6 +58,7 @@ import toastNotification, { initialState as initialToastNotificationState, } fro
58
58
  import transaction, { initialState as initialTransactionState, } from './entity/transaction/transactionReducer';
59
59
  import transactionActivityLog, { initialState as initialTransactionActivityLogState, } from './entity/transactionActivityLog/transactionActivityLogReducer';
60
60
  import user, { initialState as initialUserState, } from './entity/user/userReducer';
61
+ import userGroups, { initialState as initialUserGroupsState, } from './entity/userGroups/userGroupsReducer';
61
62
  import userRole, { initialState as initialUserRoleState, } from './entity/userRole/userRoleReducer';
62
63
  import vendor, { initialState as initialVendorState, } from './entity/vendor/vendorReducer';
63
64
  import vendorExpense, { initialState as initialVendorExpenseState, } from './entity/vendorExpense/vendorExpenseReducer';
@@ -198,6 +199,7 @@ import trend, { initialTrendState } from './view/trend/trendReducer';
198
199
  import trendWithTransactions, { initialTrendWithTransactionsState, } from './view/trendWithTransactions/trendWithTransactionsReducer';
199
200
  import twoFactorAuthentication, { initialState as initialTwoFactorAuthenticationState, } from './view/twoFactorAuthentication/twoFactorAuthenticationReducer';
200
201
  import userFinancialAccountState, { initialState as initialUserFinancialAccountState, } from './view/userFinancialAccount/userFinancialAccountReducer';
202
+ import userGroupListView, { initialState as initialUserGroupListViewState, } from './view/userGroupListView/userGroupListViewReducer';
201
203
  import userListView, { initialState as initialUserListViewState, } from './view/userListView/userListViewReducer';
202
204
  import userRoleConfig, { initialState as initialUserRoleConfigState, } from './view/userRoleConfigView/userRoleConfigReducer';
203
205
  import vendor1099TypeList, { initialState as initialVendor1099TypeListState, } from './view/vendor1099TypeList/vendor1099TypeListReducer';
@@ -270,6 +272,7 @@ const initialEntitiesState = {
270
272
  toastNotificationState: initialToastNotificationState,
271
273
  transactionActivityLogState: initialTransactionActivityLogState,
272
274
  transactionState: initialTransactionState,
275
+ userGroupsState: initialUserGroupsState,
273
276
  userRoleState: initialUserRoleState,
274
277
  userState: initialUserState,
275
278
  vendorExpenseState: initialVendorExpenseState,
@@ -408,6 +411,7 @@ const initialViewsState = {
408
411
  trendWithTransactionsState: initialTrendWithTransactionsState,
409
412
  twoFactorAuthenticationState: initialTwoFactorAuthenticationState,
410
413
  userFinancialAccountState: initialUserFinancialAccountState,
414
+ userGroupListViewState: initialUserGroupListViewState,
411
415
  userListViewState: initialUserListViewState,
412
416
  userRoleConfigState: initialUserRoleConfigState,
413
417
  vendorFirstReviewViewState: initialVendorFirstReviewViewState,
@@ -492,6 +496,7 @@ const entityReducers = {
492
496
  toastNotificationState: toastNotification,
493
497
  transactionActivityLogState: transactionActivityLog,
494
498
  transactionState: transaction,
499
+ userGroupsState: userGroups,
495
500
  userRoleState: userRole,
496
501
  userState: user,
497
502
  vendorExpenseState: vendorExpense,
@@ -630,6 +635,7 @@ const viewReducers = {
630
635
  trendWithTransactionsState: trendWithTransactions,
631
636
  twoFactorAuthenticationState: twoFactorAuthentication,
632
637
  userFinancialAccountState: userFinancialAccountState,
638
+ userGroupListViewState: userGroupListView,
633
639
  userListViewState: userListView,
634
640
  userRoleConfigState: userRoleConfig,
635
641
  vendorFirstReviewViewState: vendorFirstReviewView,
@@ -0,0 +1,10 @@
1
+ /**
2
+ * After upload API success, hold the bar at 100% this long before transitioning to matching,
3
+ * so the fill animation can complete without an abrupt swap to the auto-matching banner.
4
+ */
5
+ export const BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = 400;
6
+ /**
7
+ * Max wall-clock wait for Pusher + batch-details resolution after upload. If exceeded, we stop
8
+ * fallback polling, clear the automatching banner (`phase` → completed), and refresh batch list.
9
+ */
10
+ export const BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = 300000;
@@ -0,0 +1,29 @@
1
+ import { concat, of, timer } from 'rxjs';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
4
+ import { BULK_UPLOAD_BAR_COMPLETE_HOLD_MS } from '../../bulkUploadTiming';
5
+ import { bulkUploadReceipts, bulkUploadReceiptsFailure, bulkUploadReceiptsSuccess, updateBulkUploadProgress, } from '../../reducers/missingReceiptsViewReducer';
6
+ export const bulkUploadReceiptsEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(bulkUploadReceipts.match), mergeMap((action) => {
7
+ const { files } = action.payload;
8
+ const formData = new FormData();
9
+ for (const file of files) {
10
+ formData.append('files', file, file.name);
11
+ }
12
+ return zeniAPI
13
+ .postFormData(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`, formData)
14
+ .pipe(mergeMap((response) => {
15
+ if (isSuccessResponse(response) && response.data != null) {
16
+ const batchId = String(response.data.batch_id ?? '').trim();
17
+ if (batchId === '') {
18
+ return of(bulkUploadReceiptsFailure({
19
+ error: createZeniAPIStatus('Unexpected Error', 'Bulk upload succeeded but batch_id was missing or empty.'),
20
+ }));
21
+ }
22
+ return concat(of(updateBulkUploadProgress(100)), timer(BULK_UPLOAD_BAR_COMPLETE_HOLD_MS).pipe(mergeMap(() => of(bulkUploadReceiptsSuccess({ batchId })))));
23
+ }
24
+ return of(bulkUploadReceiptsFailure({ error: response.status }));
25
+ }), catchError((error) => of(bulkUploadReceiptsFailure({
26
+ error: createZeniAPIStatus('Unexpected Error', 'Bulk upload receipts API call errored out: ' +
27
+ JSON.stringify(error)),
28
+ }))));
29
+ }));
@@ -0,0 +1,49 @@
1
+ import { from } from 'rxjs';
2
+ import { catchError, exhaustMap, filter, mergeMap } from 'rxjs/operators';
3
+ import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer';
4
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
5
+ import { confirmBulkUploadMatch, confirmBulkUploadMatchFailure, confirmBulkUploadMatchSuccess, } from '../../reducers/missingReceiptsViewReducer';
6
+ export const confirmBulkUploadMatchEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(confirmBulkUploadMatch.match), exhaustMap((action) => {
7
+ const { batchId, attachmentId, transactionId, transactionType, fileName } = action.payload;
8
+ return zeniAPI
9
+ .postAndGetJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/receipts/manual-match`, {
10
+ attachment_id: attachmentId,
11
+ transaction_id: transactionId,
12
+ transaction_type: transactionType,
13
+ file_name: fileName,
14
+ })
15
+ .pipe(mergeMap((response) => {
16
+ if (isSuccessResponse(response)) {
17
+ return from([
18
+ confirmBulkUploadMatchSuccess({
19
+ batchId,
20
+ attachmentId,
21
+ transactionId,
22
+ }),
23
+ openSnackbar({
24
+ messageSection: 'receipt_match',
25
+ messageText: 'success',
26
+ type: 'success',
27
+ }),
28
+ ]);
29
+ }
30
+ return from([
31
+ confirmBulkUploadMatchFailure({ error: response.status }),
32
+ openSnackbar({
33
+ messageSection: 'receipt_match',
34
+ messageText: 'failed',
35
+ type: 'error',
36
+ }),
37
+ ]);
38
+ }), catchError((error) => from([
39
+ confirmBulkUploadMatchFailure({
40
+ error: createZeniAPIStatus('Unexpected Error', 'Confirm bulk upload match errored out: ' +
41
+ JSON.stringify(error)),
42
+ }),
43
+ openSnackbar({
44
+ messageSection: 'receipt_match',
45
+ messageText: 'failed',
46
+ type: 'error',
47
+ }),
48
+ ])));
49
+ }));
@@ -0,0 +1,40 @@
1
+ import { EMPTY, from, of } from 'rxjs';
2
+ import { catchError, filter, mergeMap } from 'rxjs/operators';
3
+ import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
4
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
5
+ import { extractTransactionPayloadsFromBatchFiles, isBatchDetailsApiStatusCompleted, shouldFetchBatchDetailsForBatchId, toBatchDetails, } from '../../payload/missingReceiptsPayload';
6
+ import { fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsFailure, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, } from '../../reducers/missingReceiptsViewReducer';
7
+ export const fetchBulkUploadBatchDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchBulkUploadBatchDetails.match), mergeMap(() => {
8
+ const bulkUpload = state$.value.expenseAutomationMissingReceiptsViewState.bulkUpload;
9
+ const { currentBatchId } = bulkUpload;
10
+ if (currentBatchId == null) {
11
+ return of(fetchBulkUploadBatchDetailsFailure({
12
+ error: createZeniAPIStatus('Unexpected Error', 'No current batch ID available'),
13
+ }));
14
+ }
15
+ if (!shouldFetchBatchDetailsForBatchId(bulkUpload.batchStatusById, bulkUpload.batchListByPeriod, currentBatchId)) {
16
+ return EMPTY;
17
+ }
18
+ return zeniAPI
19
+ .getJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/batches/${currentBatchId}`)
20
+ .pipe(mergeMap((response) => {
21
+ if (!isSuccessResponse(response) ||
22
+ response.data == null ||
23
+ !isBatchDetailsApiStatusCompleted(response.data.status)) {
24
+ if (isSuccessResponse(response) && response.data != null) {
25
+ return EMPTY;
26
+ }
27
+ return of(fetchBulkUploadBatchDetailsFailure({ error: response.status }));
28
+ }
29
+ const actions = [];
30
+ const transactionPayloads = extractTransactionPayloadsFromBatchFiles(response.data.files);
31
+ if (transactionPayloads.length > 0) {
32
+ actions.push(updateTransactions(transactionPayloads, (value) => value.transaction_id));
33
+ }
34
+ actions.push(fetchBulkUploadBatchDetailsSuccess(toBatchDetails(response.data, zeniAPI.apiEndPoints.fileMicroServiceBaseUrl)));
35
+ actions.push(fetchBulkUploadBatches({ cacheOverride: true }));
36
+ return from(actions);
37
+ }), catchError((error) => of(fetchBulkUploadBatchDetailsFailure({
38
+ error: createZeniAPIStatus('Unexpected Error', 'Fetch batch details errored out: ' + JSON.stringify(error)),
39
+ }))));
40
+ }));
@@ -0,0 +1,47 @@
1
+ import { of } from 'rxjs';
2
+ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
+ import { convertToPeriod, toMonthYearPeriodId, } from '../../../../commonStateTypes/timePeriod';
4
+ import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
5
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
6
+ import { toBatchListItem, } from '../../payload/missingReceiptsPayload';
7
+ import { fetchBulkUploadBatches, fetchBulkUploadBatchesFailure, fetchBulkUploadBatchesSuccess, } from '../../reducers/missingReceiptsViewReducer';
8
+ export const fetchBulkUploadBatchesEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchBulkUploadBatches.match), switchMap((action) => {
9
+ const { cacheOverride } = action.payload;
10
+ const state = state$.value;
11
+ const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { bulkUpload }, } = state;
12
+ const currentTenant = getCurrentTenant(state);
13
+ const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
14
+ const periodId = toMonthYearPeriodId(selectedPeriod);
15
+ const existingBatches = bulkUpload.batchListByPeriod[periodId] ?? [];
16
+ if (cacheOverride !== true && existingBatches.length > 0) {
17
+ return of(fetchBulkUploadBatchesSuccess({
18
+ batchList: existingBatches,
19
+ selectedPeriod,
20
+ }));
21
+ }
22
+ const period = convertToPeriod(selectedPeriod);
23
+ const queryParam = {
24
+ start_date: period.start,
25
+ end_date: period.end,
26
+ sort_order: 'desc',
27
+ };
28
+ return zeniAPI
29
+ .getJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/batches?query=${encodeURIComponent(JSON.stringify(queryParam))}`)
30
+ .pipe(mergeMap((response) => {
31
+ if (isSuccessResponse(response) && response.data != null) {
32
+ /** Full list (all statuses) for UI; batch-details epics filter to `completed` only. */
33
+ return of(fetchBulkUploadBatchesSuccess({
34
+ batchList: response.data.batches.map(toBatchListItem),
35
+ selectedPeriod,
36
+ }));
37
+ }
38
+ return of(fetchBulkUploadBatchesFailure({
39
+ error: response.status,
40
+ selectedPeriod,
41
+ }));
42
+ }), catchError((error) => of(fetchBulkUploadBatchesFailure({
43
+ error: createZeniAPIStatus('Unexpected Error', 'Fetch bulk upload batches errored out: ' +
44
+ JSON.stringify(error)),
45
+ selectedPeriod,
46
+ }))));
47
+ }));
@@ -0,0 +1,61 @@
1
+ import { from, of } from 'rxjs';
2
+ import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
3
+ import { convertToPeriod, toMonthYearPeriodId, } from '../../../../commonStateTypes/timePeriod';
4
+ import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
5
+ import { updateTransactions } from '../../../../entity/transaction/transactionReducer';
6
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../../responsePayload';
7
+ import { fetchCompletedTransactions, fetchCompletedTransactionsFailure, fetchCompletedTransactionsSuccess, getCompletedTransactionsCacheKey, } from '../../reducers/missingReceiptsViewReducer';
8
+ export const fetchCompletedTransactionsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchCompletedTransactions.match), switchMap((action) => {
9
+ const state = state$.value;
10
+ const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { bulkUpload }, } = state;
11
+ const currentTenant = getCurrentTenant(state);
12
+ const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
13
+ const periodId = toMonthYearPeriodId(selectedPeriod);
14
+ const isInitialLoad = action.payload.pageToken == null;
15
+ const cacheKey = getCompletedTransactionsCacheKey(periodId, bulkUpload.sortKey, bulkUpload.sortOrder, bulkUpload.completedSubTab);
16
+ const existingData = bulkUpload.completedTransactionsByPeriod[cacheKey];
17
+ if (isInitialLoad &&
18
+ action.payload.cacheOverride !== true &&
19
+ existingData != null &&
20
+ existingData.transactionIds.length > 0) {
21
+ return from([]);
22
+ }
23
+ const period = convertToPeriod(selectedPeriod);
24
+ const queryPayload = {
25
+ start_date: period.start,
26
+ end_date: period.end,
27
+ sort_by: bulkUpload.sortKey,
28
+ sort_order: bulkUpload.sortOrder === 'ascending' ? 'asc' : 'desc',
29
+ page_token: action.payload.pageToken ?? null,
30
+ page_size: 25,
31
+ };
32
+ if (bulkUpload.completedSubTab !== 'all') {
33
+ queryPayload.match_type = bulkUpload.completedSubTab;
34
+ }
35
+ const encodedQuery = encodeURIComponent(JSON.stringify(queryPayload));
36
+ return zeniAPI
37
+ .getJSON(`${zeniAPI.apiEndPoints.communicationAgentMicroServiceBaseUrl}/1.0/receipt-agent/transactions/completed?query=${encodedQuery}`)
38
+ .pipe(mergeMap((response) => {
39
+ if (isSuccessResponse(response) && response.data != null) {
40
+ const transactionIds = response.data.transactions.map((t) => t.transaction_id);
41
+ const updateActions = [];
42
+ updateActions.push(updateTransactions(response.data.transactions, (value) => value.transaction_id));
43
+ updateActions.push(fetchCompletedTransactionsSuccess({
44
+ isInitialLoad,
45
+ transactionIds,
46
+ nextPageToken: response.data.next_page_token,
47
+ totalCount: response.data.total_count,
48
+ selectedPeriod,
49
+ }));
50
+ return from(updateActions);
51
+ }
52
+ return of(fetchCompletedTransactionsFailure({
53
+ error: response.status,
54
+ selectedPeriod,
55
+ }));
56
+ }), catchError((error) => of(fetchCompletedTransactionsFailure({
57
+ error: createZeniAPIStatus('Unexpected Error', 'Fetch completed transactions errored: ' +
58
+ JSON.stringify(error)),
59
+ selectedPeriod,
60
+ }))));
61
+ }));
@@ -0,0 +1,33 @@
1
+ import { concat, of } from 'rxjs';
2
+ import { catchError, exhaustMap, filter } from 'rxjs/operators';
3
+ import { toMonthYearPeriodId } from '../../../../commonStateTypes/timePeriod';
4
+ import { getCurrentTenant } from '../../../../entity/tenant/tenantSelector';
5
+ import { createZeniAPIStatus } from '../../../../responsePayload';
6
+ import { filterBatchListItemsForBatchDetailsFetch } from '../../payload/missingReceiptsPayload';
7
+ import { fetchMoreBatchDetails, fetchMoreBatchDetailsComplete, fetchMoreBatchDetailsFailure, } from '../../reducers/missingReceiptsViewReducer';
8
+ import { fetchBatchDetailsByIds } from './fetchMultipleBatchDetailsEpic';
9
+ const MORE_BATCH_PAGE_SIZE = 5;
10
+ export const fetchMoreBatchDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter(fetchMoreBatchDetails.match),
11
+ /** One page at a time — avoids duplicate loads if IO + scroll fallback both fire. */
12
+ exhaustMap(() => {
13
+ const state = state$.value;
14
+ const { expenseAutomationViewState: { selectedPeriodByTenantId }, expenseAutomationMissingReceiptsViewState: { bulkUpload }, } = state;
15
+ const currentTenant = getCurrentTenant(state);
16
+ const selectedPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
17
+ if (selectedPeriod == null) {
18
+ return of(fetchMoreBatchDetailsComplete());
19
+ }
20
+ const periodId = toMonthYearPeriodId(selectedPeriod);
21
+ const batchList = bulkUpload.batchListByPeriod[periodId] ?? [];
22
+ const failedIds = new Set(bulkUpload.failedBatchDetailIds);
23
+ const unfetchedBatches = filterBatchListItemsForBatchDetailsFetch(batchList).filter((batch) => bulkUpload.batchDetailsById[batch.batchId] == null &&
24
+ !failedIds.has(batch.batchId));
25
+ const unfetchedBatchIds = unfetchedBatches.map((batch) => batch.batchId);
26
+ if (unfetchedBatchIds.length === 0) {
27
+ return of(fetchMoreBatchDetailsComplete());
28
+ }
29
+ const nextPage = unfetchedBatchIds.slice(0, MORE_BATCH_PAGE_SIZE);
30
+ return concat(fetchBatchDetailsByIds(nextPage, zeniAPI), of(fetchMoreBatchDetailsComplete())).pipe(catchError((error) => of(fetchMoreBatchDetailsFailure({
31
+ error: createZeniAPIStatus('Unexpected Error', 'Fetch more batch details errored out: ' + JSON.stringify(error)),
32
+ }))));
33
+ }));