@zeniai/client-epic-state 5.1.60-beta0ND → 5.1.60-betaDI0

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 (64) hide show
  1. package/lib/coreEpics.js +3 -2
  2. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  3. package/lib/entity/notificationRegistry/notificationRegistryPayload.d.ts +18 -0
  4. package/lib/entity/notificationRegistry/notificationRegistryPayload.js +28 -0
  5. package/lib/entity/notificationRegistry/notificationRegistryReducer.d.ts +6 -0
  6. package/lib/entity/notificationRegistry/notificationRegistryReducer.js +26 -0
  7. package/lib/entity/notificationRegistry/notificationRegistrySelector.d.ts +2 -0
  8. package/lib/entity/notificationRegistry/notificationRegistrySelector.js +10 -0
  9. package/lib/entity/notificationRegistry/notificationRegistryState.d.ts +31 -0
  10. package/lib/entity/notificationRegistry/notificationRegistryState.js +10 -0
  11. package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
  12. package/lib/entity/tenant/clearAllEpic.js +4 -0
  13. package/lib/epic.d.ts +2 -2
  14. package/lib/epic.js +2 -2
  15. package/lib/esm/coreEpics.js +3 -2
  16. package/lib/esm/entity/notificationRegistry/notificationRegistryPayload.js +24 -0
  17. package/lib/esm/entity/notificationRegistry/notificationRegistryReducer.js +22 -0
  18. package/lib/esm/entity/notificationRegistry/notificationRegistrySelector.js +6 -0
  19. package/lib/esm/entity/notificationRegistry/notificationRegistryState.js +5 -0
  20. package/lib/esm/entity/tenant/clearAllEpic.js +4 -0
  21. package/lib/esm/epic.js +2 -2
  22. package/lib/esm/index.js +7 -2
  23. package/lib/esm/reducer.js +6 -0
  24. package/lib/esm/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +116 -0
  25. package/lib/esm/view/notificationPreferencesView/notificationPreferencesEndpoint.js +5 -0
  26. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewPayload.js +36 -0
  27. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewReducer.js +222 -0
  28. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewSelector.js +25 -0
  29. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewState.js +4 -0
  30. package/lib/esm/view/recommendation/recommendationReducer.js +1 -17
  31. package/lib/esm/view/settingsView/epic/fetchNotificationSettingsEpic.js +21 -2
  32. package/lib/esm/view/settingsView/epic/saveNotificationSettingsEpic.js +2 -1
  33. package/lib/esm/view/settingsView/settingsViewHelpers.js +3 -2
  34. package/lib/index.d.ts +9 -3
  35. package/lib/index.js +32 -18
  36. package/lib/reducer.d.ts +6 -0
  37. package/lib/reducer.js +6 -0
  38. package/lib/view/common/recurringViewHelper.d.ts +2 -2
  39. package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.d.ts +40 -0
  40. package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +120 -0
  41. package/lib/view/notificationPreferencesView/notificationPreferencesEndpoint.d.ts +2 -0
  42. package/lib/view/notificationPreferencesView/notificationPreferencesEndpoint.js +9 -0
  43. package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.d.ts +7 -0
  44. package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.js +41 -0
  45. package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.d.ts +30 -0
  46. package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.js +226 -0
  47. package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.d.ts +7 -0
  48. package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.js +32 -0
  49. package/lib/view/notificationPreferencesView/notificationPreferencesViewState.d.ts +14 -0
  50. package/lib/view/notificationPreferencesView/notificationPreferencesViewState.js +8 -0
  51. package/lib/view/recommendation/recommendationPayload.d.ts +0 -33
  52. package/lib/view/recommendation/recommendationReducer.d.ts +1 -2
  53. package/lib/view/recommendation/recommendationReducer.js +2 -18
  54. package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.d.ts +9 -1
  55. package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.js +21 -2
  56. package/lib/view/settingsView/epic/saveNotificationSettingsEpic.js +2 -1
  57. package/lib/view/settingsView/settingsViewHelpers.d.ts +1 -1
  58. package/lib/view/settingsView/settingsViewHelpers.js +3 -2
  59. package/lib/view/settingsView/settingsViewPayload.d.ts +4 -0
  60. package/lib/view/settingsView/settingsViewState.d.ts +1 -1
  61. package/package.json +1 -1
  62. package/lib/esm/view/recommendation/submitRecommendationFeedbackEpic.js +0 -51
  63. package/lib/view/recommendation/submitRecommendationFeedbackEpic.d.ts +0 -7
  64. package/lib/view/recommendation/submitRecommendationFeedbackEpic.js +0 -55
@@ -34,7 +34,8 @@ import { verifyUserEpic } from './view/commonVendorView/vendorView/epics/twoFact
34
34
  // ── Company Config Epics ─────────────────────────────────────────────
35
35
  import { fetchCompanyConfigEpic } from './view/companyConfigView/companyConfigEpic';
36
36
  import { fetchCompanyMetaDataEpic } from './view/companyView/epic/fetchCompanyMetaDataEpic';
37
- // ── Notification Badge Epic ──────────────────────────────────────────
37
+ import { saveNotificationPreferencesEpic } from './view/notificationPreferencesView/epics/saveNotificationPreferencesEpic';
38
+ // ── Notification Epics ───────────────────────────────────────────────
38
39
  import { fetchNotificationUnreadCountEpic } from './view/notificationView/epics/fetchNotificationUnreadCountEpic';
39
40
  // ── User Profile Epics ───────────────────────────────────────────────
40
41
  import { fetchMyProfileEpic } from './view/settingsView/epic/fetchMyProfileEpic';
@@ -57,7 +58,7 @@ resendOtpEpic, sendOtpEpic, verifyOtpEpic, verifyUserEpic,
57
58
  // Company config
58
59
  fetchCompanyConfigEpic, fetchCompanyMetaDataEpic,
59
60
  // Notifications
60
- fetchNotificationUnreadCountEpic,
61
+ fetchNotificationUnreadCountEpic, saveNotificationPreferencesEpic,
61
62
  // User profile
62
63
  fetchMyProfileEpic, fetchMyProfileViewEpic);
63
64
  export default coreRootEpic;
@@ -0,0 +1,24 @@
1
+ import { toNotificationChannel, toNotificationFrequency, } from './notificationRegistryState';
2
+ const mapDefaultEnabled = (raw) => {
3
+ const out = {};
4
+ Object.entries(raw).forEach(([channel, enabled]) => {
5
+ out[toNotificationChannel(channel)] = enabled;
6
+ });
7
+ return out;
8
+ };
9
+ const mapEvent = (payload) => ({
10
+ channels: payload.channels.map(toNotificationChannel),
11
+ defaultEnabled: mapDefaultEnabled(payload.default_enabled),
12
+ displayName: payload.display_name,
13
+ eventId: payload.event_id,
14
+ suppressible: payload.suppressible,
15
+ });
16
+ const mapGroup = (payload) => ({
17
+ displayName: payload.display_name,
18
+ events: payload.events.map(mapEvent),
19
+ groupId: payload.group_id,
20
+ });
21
+ export const mapNotificationRegistryPayloadToRegistry = (payload) => ({
22
+ frequencyOptions: payload.frequency_options.map(toNotificationFrequency),
23
+ groups: payload.groups.map(mapGroup),
24
+ });
@@ -0,0 +1,22 @@
1
+ import { createSlice } from '@reduxjs/toolkit';
2
+ import { mapNotificationRegistryPayloadToRegistry, } from './notificationRegistryPayload';
3
+ export const initialState = {};
4
+ const notificationRegistry = createSlice({
5
+ name: 'notificationRegistry',
6
+ initialState,
7
+ reducers: {
8
+ clearAllNotificationRegistry() {
9
+ return initialState;
10
+ },
11
+ updateNotificationRegistry(draft, action) {
12
+ // Full-replace contract: the registry payload is atomic — every fetch
13
+ // returns the complete group/event tree. If the backend ever ships a
14
+ // partial registry response, this write MUST switch to a merge (mirror
15
+ // the preferences slice's `mergePreferences`). Do not assume the
16
+ // current payload is partial without also updating this reducer.
17
+ draft.registry = mapNotificationRegistryPayloadToRegistry(action.payload);
18
+ },
19
+ },
20
+ });
21
+ export const { clearAllNotificationRegistry, updateNotificationRegistry } = notificationRegistry.actions;
22
+ export default notificationRegistry.reducer;
@@ -0,0 +1,6 @@
1
+ // Current behavior: a null / undefined registry means the whole notification
2
+ // section is hidden by consumers. This conflates two distinct states —
3
+ // "user has no saved preferences yet" vs "the Task Checklist feature gate is
4
+ // off for this tenant". Both currently surface as `undefined`. Distinguishing
5
+ // them (e.g. an explicit `gate_off` signal from the server) is a follow-up.
6
+ export const getNotificationRegistry = (slice) => slice.registry;
@@ -0,0 +1,5 @@
1
+ import { stringToUnion } from '../../commonStateTypes/stringToUnion';
2
+ export const NOTIFICATION_CHANNELS = ['email', 'slack', 'in_app'];
3
+ export const toNotificationChannel = (raw) => stringToUnion(raw, NOTIFICATION_CHANNELS);
4
+ export const NOTIFICATION_FREQUENCIES = ['instant', 'daily'];
5
+ export const toNotificationFrequency = (raw) => stringToUnion(raw, NOTIFICATION_FREQUENCIES);
@@ -7,6 +7,7 @@ import { clearAllCreditAgent } from '../../entity/creditAgent/creditAgentReducer
7
7
  import { clearAllEntityApprovalStatus } from '../../entity/entityApprovalStatus/entityApprovalStatusReducer';
8
8
  import { clearAllMonthEndCloseChecks } from '../../entity/monthEndCloseChecks/monthEndCloseChecksReducer';
9
9
  import { clearAllNotifications } from '../../entity/notification/notificationReducer';
10
+ import { clearAllNotificationRegistry } from '../../entity/notificationRegistry/notificationRegistryReducer';
10
11
  import { clearAllSectionsClassesViewV2 } from '../../entity/sectionClassesViewV2/sectionClassesViewReducer';
11
12
  import { clearAllSectionsProjectView } from '../../entity/sectionProjectView/sectionProjectViewReducer';
12
13
  import { clearAllTaskGroups } from '../../entity/taskGroup/taskGroupReducer';
@@ -61,6 +62,7 @@ import { clearAllMonthEndCloseChecksView } from '../../view/monthEndCloseChecksV
61
62
  import { clearNetBurnOrIncome } from '../../view/netBurnOrIncome/netBurnOrIncomeReducer';
62
63
  import { clearNetBurnOrIncomeClassesView } from '../../view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer';
63
64
  import { clearNetBurnOrIncomeStoryCard } from '../../view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer';
65
+ import { clearAllNotificationPreferencesView } from '../../view/notificationPreferencesView/notificationPreferencesViewReducer';
64
66
  import { clearNotificationView } from '../../view/notificationView/notificationViewReducer';
65
67
  import { clearOnboardingCockpitView } from '../../view/onboardingView/cockpitView/onboardingCockpitViewReducer';
66
68
  import { clearOnboardingCustomerView } from '../../view/onboardingView/customerView/onboardingCustomerViewReducer';
@@ -405,6 +407,8 @@ export const clearAllEpic = (actions$) => actions$.pipe(filter(clearAll.match),
405
407
  clearAllJEScheduleTransactions(),
406
408
  clearAllMerchants(),
407
409
  clearAllMonthEndCloseChecks(),
410
+ clearAllNotificationPreferencesView(),
411
+ clearAllNotificationRegistry(),
408
412
  clearAllNotifications(),
409
413
  clearAllOnboardingCustomersInfo(),
410
414
  clearAllPaymentAccounts(),
package/lib/esm/epic.js CHANGED
@@ -228,6 +228,7 @@ import { fetchNetBurnOrIncomeClassesViewEpic, } from './view/netBurnOrIncomeClas
228
228
  import { fetchNetBurnOrIncomeForTimeframeClassesViewEpic, } from './view/netBurnOrIncomeClassesView/netBurnOrIncomeForTimeframeClassesViewEpic';
229
229
  import { fetchNetBurnOrIncomeStoryCardEpic, } from './view/netBurnOrIncomeStoryCard/epic/fetchNetBurnOrIncomeStoryCardEpic';
230
230
  import { updateNetBurnOrIncomeStoryCardSettingsEpic, } from './view/netBurnOrIncomeStoryCard/epic/updateNetBurnOrIncomeStoryCardSettingsEpic';
231
+ import { saveNotificationPreferencesEpic, } from './view/notificationPreferencesView/epics/saveNotificationPreferencesEpic';
231
232
  import { fetchNotificationUnreadCountEpic, } from './view/notificationView/epics/fetchNotificationUnreadCountEpic';
232
233
  import { fetchNotificationViewEpic, } from './view/notificationView/epics/fetchNotificationViewEpic';
233
234
  import { updateNotificationViewAllNotificationsStatusEpic, } from './view/notificationView/epics/updateNotificationViewAllNotificationsStatusEpic';
@@ -287,7 +288,6 @@ import { fetchEntityRecommendationsByTransactionIdEpic, } from './view/recommend
287
288
  import { fetchEntityRecommendationsForLineUpdateEpic, } from './view/recommendation/fetchEntityRecommendationsForLineUpdateEpic';
288
289
  import { fetchRecommendationByEntityIdEpic, } from './view/recommendation/fetchRecommendationByEntityIdEpic';
289
290
  import { fetchRecommendationByEntityNameEpic, } from './view/recommendation/fetchRecommendationByEntityNameEpic';
290
- import { submitRecommendationFeedbackEpic, } from './view/recommendation/submitRecommendationFeedbackEpic';
291
291
  import { fetchReferralsEpic, } from './view/referralView/epics/fetchReferralsEpic';
292
292
  import { fetchRewardsPlanEpic, } from './view/referralView/epics/fetchRewardsPlanEpic';
293
293
  import { resendReferralInviteEpic, } from './view/referralView/epics/resendReferralInviteEpic';
@@ -618,7 +618,7 @@ import { fetchZeniAccStatementPageEpic, } from './view/zeniAccStatementList/fetc
618
618
  import { fetchZeniAccountsPromoCardEpic, } from './view/zeniAccountsPromoCard/zeniAccountsPromoCardEpic';
619
619
  import { approveOAuthConsentEpic, } from './view/zeniOAuthView/epics/approveOAuthConsentEpic';
620
620
  // Note: Please maintain strict alphabetical order
621
- const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, acknowledgeOnboardingAiActivationViewedEpic, acknowledgeOnboardingAiFinanceTeamEpic, addCardPaymentSourceEpic, applyExtractedPolicyToDraftEpic, approveOAuthConsentEpic, approveOrRejectBillEpic, approveOrRejectBillsBulkActionEpic, approveOrRejectRemiEpic, approveOrRejectRemisBulkActionEpic, approveVendorGlobalReviewEpic, archiveCardPolicyEpic, archiveTaskEpic, backgroundRefetchReviewTabEpic, bulkUpdateTaskListEpic, bulkUploadAutomatchingTimeoutEpic, bulkUploadMatchResultToastEpic, bulkUploadReceiptsEpic, cancelAiAccountantOnboardingEpic, cancelAndDeleteBillEpic, cancelAndDeleteRemiEpic, cancelOrDeleteBillsBulkActionEpic, cancelOrDeleteRemisBulkActionEpic, cancelScheduleAccruedJournalEntryEpic, changeZeniPersonRolesEpic, checkDepositEpic, clearAllEpic, closeChargeCardEpic, closeChargeCardsEpic, companyManagementSavePendingUpdatesEpic, companyManagementSaveUpdatesEpic, confirmBulkUploadMatchEpic, confirmCardSetupIntentEpic, convertAmountToHomeCurrencyEpic, createAddressEpic, createAutoTransferRuleEpic, createBankAccountEpic, createCardPolicyTemplatesEpic, createCardSetupIntentEpic, createCheckingAccountEpic, createCompanyAddressEpic, createCompanyOfficersEpic, createCompanyUserAddressEpic, createGlobalMerchantEpic, createInternationalBankAccountEpic, createNewSchedulesAccruedEpic, createNewSchedulesEpic, createNewTaskGroupEpic, createPaymentInstrumentEpic, createSessionAndSubmitEpic, createSessionEpic, createSubTaskEpic, createTagEpic, createTaskFromTaskGroupTemplateEpic, createTransferEntryEpic, createUserBankAccountEpic, deleteAccountStatementEpic, deleteAutoTransferRuleEpic, deleteBankAccountEpic, deleteBillEpic, deleteBillPayApprovalRuleEpic, deleteCannedResponseEpic, deleteChatSessionEpic, deleteConnectionEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, dismissCapitalizationOnboardingEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, downloadAccountingProviderAttachmentEpic, dragNDropTasksEpic, enableChargeCardAutoPayEpic, enableSetupEpic, establishOnboardingPlaidConnectionEpic, establishPlaidConnectionEpic, excludeAccountFromReconciliationEpic, expressInterestChargeCardEpic, extractPolicyDocumentEpic, fetchAccountListEpic, fetchAccountListForAccountTypesEpic, fetchAccountSettingsListForAccountTypesEpic, fetchAccruedScheduleListEpic, fetchActiveTenantEpic, fetchAddressEpic, fetchAggregatedReportEpic, fetchAiAccountantCustomersEpic, fetchAiAccountantJobsEpic, fetchAiAgentsActivationStatusEpic, fetchAllCockpitViewsEpic, fetchAllExpenseAutomationTabsEpic, fetchAllPeopleRequiredViewsEpic, fetchAllTagsEpic, fetchAllTaskGroupsEpic, fetchAllTenantsEpic, fetchAndUpdateVendorRecommendationsEpic, fetchApAgingDetailEpic, fetchApAgingEpic, fetchArAgingDetailEpic, fetchArAgingEpic, fetchAuditReportGroupViewEpic, fetchAuditRuleGroupViewEpic, fetchAutoTransferReviewDetailEpic, fetchAutoTransferRuleHistoryEpic, fetchAutoTransferRulesEpic, fetchBalanceSheetEpic, fetchBalanceSheetForTimeframeEpic, fetchBankAccountsListEpic, fetchBankConnectionsViewEpic, fetchBankCountryNameByIbanEpic, fetchBankNameByRoutingEpic, fetchBankNameBySwiftEpic, fetchBillAndInitializeLocalStoreEpic, fetchBillDetailEpic, fetchBillingAccountsListEpic, fetchBillListEpic, fetchBillListPerTabEpic, fetchBillPayApproversDetailsEpic, fetchBillPayApproversListEpic, fetchBillPayCardEpic, fetchBillPayConfigEpic, fetchBillPaySetupApproverViewEpic, fetchBillPaySetupViewEpic, fetchBulkUploadBatchDetailsEpic, fetchBulkUploadBatchesEpic, fetchCannedResponsesEpic, fetchCardBalanceEpic, fetchCardPolicyDetailEpic, fetchCardPolicyListEpic, fetchCardPolicyMccCategoriesEpic, fetchCardPolicyVendorOptionsEpic, fetchCardProfilesEpic, fetchCashbackDetailEpic, fetchCashBalanceEpic, fetchCashFlowEpic, fetchCashFlowForTimeframeEpic, fetchCashInCashOutEpic, fetchCashPositionEpic, fetchChargeCardConfigEpic, fetchChargeCardDetailEpic, fetchChargeCardDetailPageEpic, fetchChargeCardListEpic, fetchChargeCardListPageEpic, fetchChargeCardPaymentHistoryEpic, fetchChargeCardPaymentPageEpic, fetchChargeCardRepaymentDetailEpic, fetchChargeCardSetupViewEpic, fetchChargeCardsRecurringExpensesEpic, fetchChargeCardStatementListEpic, fetchChargeCardTransactionAttachmentsEpic, fetchChargeCardTransactionListEpic, fetchChargeCardTransactionStatisticsEpic, fetchChatHistoryEpic, fetchChatSessionsForUserEpic, fetchClassListEpic, fetchCockpitContextEpic, fetchCollaborationAuthTokenEpic, fetchCompanyBillingAddressEpic, fetchCompanyConfigEpic, fetchCompanyHealthMetricConfigEpic, fetchCompanyHealthMetricViewEpic, fetchCompanyManagementViewEpic, fetchCompanyMetaDataEpic, fetchCompanyMonthEndReportHistoricDataEpic, fetchCompanyMonthEndReportHistoricDatesEpic, fetchCompanyMonthEndReportTemplatesEpic, fetchCompanyMonthEndReportViewEpic, fetchCompanyOnboardingViewEpic, fetchCompanyPassportViewEpic, fetchCompanyPortfolioViewEpic, fetchCompanyTaskManagerViewEpic, fetchCompletedTransactionsEpic, fetchCreditAccountEpic, fetchCreditAccountRepaymentEpic, fetchCreditAgentMacroEpic, fetchCurrencyConversionValueEpic, fetchDashboardEpic, fetchDashboardLayoutEpic, fetchDebitCardSummaryEpic, fetchDepositAccountDetailEpic, fetchDepositAccountEpic, fetchDepositAccountHistoryEpic, fetchDepositAccountLimitEpic, fetchDepositAccountListEpic, fetchDepositAccountListForCardsEpic, fetchDepositAccountTransactionListEpic, fetchDownloadSchedulesEpic, fetchDuplicateBillPayReviewEpic, fetchDuplicateReimbursementEpic, fetchEditBillDetailPageEpic, fetchEditRemiDetailPageEpic, fetchEligibleActionsForBillEpic, fetchEntityAutoCompleteEpic, fetchEntityHistoryEpic, fetchEntityRecommendationsByTransactionIdEpic, fetchEntityRecommendationsForLineUpdateEpic, fetchExcludedResourcesEpic, fetchExpenseAutomationFluxAnalysisViewEpic, fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic, fetchExpenseAutomationJeSchedulesEpic, fetchExpenseAutomationJESchedulesPageEpic, fetchExpenseAutomationMarkTransactionAsNotMiscategorizedEpic, fetchExpenseAutomationMissingReceiptsEpic, fetchExpenseAutomationReconciliationsViewEpic, fetchExpenseAutomationSaveTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationViewEpic, fetchExpenseAutomationUpdateTransactionCategorizationEpic, fetchExpenseTrendEpic, fetchExpressPayInitialDetailsEpic, fetchExternalConnectionsEpic, fetchFileEpic, fetchFileListEpic, fetchFinanceStatementEpic, fetchForecastListEpic, fetchGlobalMerchantAutoCompleteViewEpic, fetchGlobalMerchantRecommendationEpic, fetchIncomeTrendEpic, fetchInsightsCardEpic, fetchInternationalWireDynamicFormEpic, fetchIntlVerificationFormEpic, fetchIssueCardPageEpic, fetchMagicLinkBankNameByRoutingEpic, fetchMagicLinkBankNameBySwiftEpic, fetchMagicLinkBillEpic, fetchMagicLinkTenantEpic, fetchManagementViewEpic, fetchMerchantListEpic, fetchMonthClosePerformanceTrendEpic, fetchMonthEndCloseChecksEpic, fetchMoreBatchDetailsEpic, fetchMultipleBatchDetailsEpic, 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, fetchPortfolioAllocationEpic, fetchPortfolioViewEpic, fetchPreviousBillsEpic, fetchProfitAndLossClassesViewEpic, fetchProfitAndLossEpic, fetchProfitAndLossForTimeframeClassesViewEpic, fetchProfitAndLossForTimeframeEpic, fetchProfitAndLossForTimeframeProjectViewEpic, fetchProfitAndLossProjectViewEpic, fetchProjectListEpic, fetchQBOConnectionPoolEpic, fetchRecommendationByEntityIdEpic, fetchRecommendationByEntityNameEpic, fetchRecommendationForAccountSettingsEpic, fetchRecommendationForAccountTypeEpic, fetchRecommendationsAndUpdateMerchantRecommendationsEpic, fetchRecommendedTransactionRowIndexEpic, fetchReferralsEpic, fetchRegisteredInterestsEpic, fetchReimbursementCardEpic, fetchReimbursementConfigEpic, fetchRemiAndInitializeLocalStoreEpic, fetchRemiApproversDetailsEpic, fetchRemiApproversListEpic, fetchRemiDetailEpic, fetchRemiListEpic, fetchRemiListPerTabEpic, fetchRemiSetupApproverViewEpic, fetchRemiSetupViewEpic, fetchRevenueClassesViewEpic, fetchRevenueEpic, fetchRevenueForTimeframeClassesViewEpic, fetchRevenueForTimeframeEpic, fetchRevenueWithForecastEpic, fetchReviewCompanyViewEpic, fetchReviewTransferDetailEpic, fetchRewardsPlanEpic, fetchScheduleAccruedDetailsEpic, fetchScheduleAccruedDetailsPageEpic, fetchScheduleDetailsEpic, fetchScheduleDetailsPageEpic, fetchScheduleListEpic, fetchSchedulesAccountEpic, fetchSkillsEpic, fetchSubscriptionAddOnsEpic, fetchSubscriptionCouponsEpic, fetchSubscriptionCreateEstimateEpic, fetchSubscriptionDetailsEpic, fetchSubscriptionListEpic, fetchSubscriptionPlansEpic, fetchSubscriptionSummaryForTenantEpic, fetchSubscriptionUpdateEstimateEpic, fetchSubscriptionViewEpic, fetchSubTasksEpic, fetchSuggestedQuestionsEpic, fetchTaskDetailEpic, fetchTaskDetailPageEpic, fetchTaskGroupTemplatesEpic, fetchTaskHistoryEpic, fetchTaskListEpic, fetchTaskListPageEpic, fetchTaskManagerMetricsEpic, fetchTasksCardEpic, fetchTopExEpic, fetchTransactionActivityLogEpic, fetchTransactionDetailEpic, fetchTransactionListByAccountEpic, fetchTransactionListByClassEpic, fetchTransactionListByEntityEpic, fetchTransactionListByProjectEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, fetchTransferAccountsEpic, fetchTreasuryDetailEpic, fetchTreasuryFundsEpic, fetchTreasuryHistoryEpic, fetchTreasurySetupViewEpic, fetchTreasuryStatementListEpic, fetchTreasuryTaxLetterListEpic, fetchTreasuryTransactionListEpic, 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, includeAccountInReconciliationEpic, initEmailConnectOAuthEpic, initialiseExpenseAutomationReconciliationLocalDataForSelectedAccountIdEpic, initializeAccountMappingViewEpic, initializeAccountSettingsViewEpic, initializeBillPaySetupApproverViewUpdateDataEpic, initializeBillToLocalStoreEpic, initializeCardUserOnboardingLocalDataEpic, initializeCompanyHealthMetricViewLocalDataEpic, initializeDynamicFormEpic, initializeEditPersonEpic, initializeExpenseAutomationJeScheduleLocalDataEpic, initializeInternationalWireLocalDataEpic, initializeIntlVerificationFormEpic, initializeMyProfileLocalDataEpic, initializeOnboardingCustomerViewUpdateDataEpic, initializeRemiSetupApproverViewUpdateDataEpic, initializeRemiToLocalStoreEpic, initializeScheduleAccruedDetailLocalDataEpic, initializeScheduleDetailLocalDataEpic, initializeSubscriptionLocalDataEpic, initializeTaskToLocalStoreEpic, initializeTransactionDetailLocalDataEpic, initializeVendorAddressEpic, initiateChargeCardRepaymentEpic, initiateReportsClassViewRefetchingEpic, invitePeopleEpic, inviteZeniPeopleEpic, issueChargeCardEpic, lockChargeCardEpic, lockChargeCardsEpic, markAsCompleteScheduleDetailEpic, markTransactionAsNotMiscategorizedEpic, notifyMeForFeatureEpic, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, parallelFetchEntityTransactionListEpic, parallelFetchProjectTransactionListEpic, parallelFetchTransactionListByCategoryTypeEpic, parseInvoiceToBillEpic, parseReceiptsToRemiEpic, parseStatementEpic, parseUploadedKybDocumentEpic, parseUploadedKycDocumentEpic, peopleSaveUpdatesEpic, policyDocumentExtractionToRecommendationBridgeEpic, policyRecommendationFromUploadEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, pushToastNotificationEpic, refetchCompletedTransactionsOnBulkUploadSortEpic, refreshBatchDetailsForBatchIdEpic, refreshExpenseAutomationCurrentTabEpic, refreshIntegrationsDataEpic, refreshOpExByVendorReportEpic, rejectVendorGlobalReviewEpic, reorderBillPayApprovalRulesEpic, reorderRemiApprovalRulesEpic, reparseStatementEpic, reportsResyncEpic, resendCardInviteEpic, resendInviteEpic, resendOtpEpic, resendReferralInviteEpic, resendVerifyDeviceOTPEpic, resetTransactionVendorLocalDataEpic, resetVendorDetailLocalDataEpic, resetVendorsTabVendorDetailLocalDataEpic, restoreBulkUploadAutomatchingOnMountEpic, retryBankAccountConnectionEpic, retryBankAccountConnectionForOnboardingEpic, retryExpenseAutomationJEScheduleEpic, retryOrRefundBillEpic, reviewDraftRemisBulkActionEpic, reviewExpenseAutomationFluxAnalysisViewEpic, revokeCardInviteEpic, revokeChargeCardsInviteEpic, saveAccountMappingViewEpic, saveAccountSettingsViewEpic, saveAPIKeyConnectionEpic, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCannedResponseEpic, saveCardOnboardingUserDetailsEpic, saveCompanyBillingAddressEpic, saveCompanyHealthMetricByIdEpic, saveCompanyMonthEndReportEpic, saveCompanyPassportDetailsEpic, saveConnectorCredentialsEpic, saveCreditAgentMacroEpic, saveExpenseAutomationReconciliationDetailsEpic, saveExpenseAutomationReconciliationReviewEpic, saveExternalConnectionEpic, saveMagicLinkBankAccountEpic, saveNewAddressEpic, saveNotificationSettingsEpic, saveOAuthConnectionEpic, saveOnboardingCustomerCompletedStatusEpic, saveOnboardingCustomerNotesEpic, saveOnboardingCustomerViewUpdatesEpic, saveRealTimeApprovalEpic, saveReasonForAuditRuleEpic, saveRemiDetailEpic, saveRemiSetupApproverViewUpdatesEpic, saveScheduleAccruedDetailsEpic, saveScheduleDetailsEpic, saveSubscriptionNotesUpdatesEpic, saveSubscriptionUpdatesEpic, saveTaskDetailEpic, saveTransactionDetailEpic, saveTransactionVendorEpic, saveVendorDetailsViewEpic, saveVendorEpic, saveVendorFirstReviewViewEpic, saveVendorsTabVendorEpic, scheduleTenantCreditScoreCronEpic, searchTransactionsForManualMatchEpic, seedAiCardCreationFormDraftEpic, seedAiCardPolicyFormDraftEpic, sendCompanyMonthEndReportEpic, sendEmailMagicLinkToUserEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, sessionHeartbeatEpic, snoozeTaskEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitFeedbackEpic, submitIntlVerificationEpic, submitQuestionEpic, submitRecommendationFeedbackEpic, syncTabsAfterAutomatchEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerAiAccountantJobEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, unsnoozeTaskEpic, updateAccountingClassesEnabledEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateAutoTransferRuleEpic, updateBusinessVerificationDetailsEpic, updateCapitalizationAccountThresholdEpic, updateCardPolicyEpic, updateCardProfileEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, updateCompanyDetailsEpic, updateCompanyOfficerEpic, updateCompanyPassportLocalStoreDataEpic, updateCompanyTaskManagerViewFiltersEpic, updateDashboardLayoutEpic, updateDebitCardPinAttemptEpic, updateDepositAccountEpic, updateExpenseAutomationReconciliationBalanceLocalDataEpic, updateFileNameEpic, updateFilesMetadataEpic, updateJESchedulesEpic, updateMappedCashAccountEpic, updateMileageDetailsEpic, updateMyProfileEpic, updateNetBurnOrIncomeStoryCardSettingsEpic, updateNotificationViewAllNotificationsStatusEpic, updateNotificationViewNotificationStatusEpic, updateOnboardingCustomerViewCompleteStatusEpic, updateOnboardingCustomerViewDashboardLoadedEpic, updateOnboardingCustomerViewEpic, updateOnboardingCustomerViewLocalStoreDataEpic, updateOnboardingPaymentAccountLoginStatusEpic, updateOnboardingPaymentAccountStatusEpic, updatePaymentAccountEpic, updatePaymentAccountLoginStatusEpic, updatePaymentAccountStatusEpic, updatePhysicalChargeCardAttemptEpic, updatePortfolioAllocationEpic, updatePrimaryContactEpic, updatePrimaryFundingAccountEpic, updateQBOConnectionPoolExternalConnectionEpic, updateReferViewedEpic, updateRemiSetupViewLocalStoreDataEpic, updateReportUIOptionCOABalancesRangeEpic, updateReportUIOptionIsCompareModeEpic, updateReportUIOptionIsCompareModeOnEpic, updateReportUIOptionThisPeriodEpic, updateReportUIOptionTimeFrameEpic, updateSectionAccountsViewEpic, updateSectionClassesViewEpicV2, updateSectionProjectViewEpic, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateStatementInfoEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, updateTransactionDetailEpic, updateTreasuryPromoIntroClosedByOutsideClickEpic, updateTreasuryPromoRemindMeLaterClickedEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, validateBillsBulkActionEpic, vendorFiling1099UploadDetailsSaveEpic, verifyDeviceWithTwoFAEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
621
+ const combinedEpics = combineEpics(acceptBillPayTermsEpic, acceptBillPayUpdatedTermsEpic, acceptChargeCardTermsEpic, acceptEmployeeRemiTermsEpic, acceptMasterTOSEpic, acceptRemiTermsEpic, acceptTreasuryTermsEpic, acceptZeniAccountTermsEpic, acknowledgeOnboardingAiActivationViewedEpic, acknowledgeOnboardingAiFinanceTeamEpic, addCardPaymentSourceEpic, applyExtractedPolicyToDraftEpic, approveOAuthConsentEpic, approveOrRejectBillEpic, approveOrRejectBillsBulkActionEpic, approveOrRejectRemiEpic, approveOrRejectRemisBulkActionEpic, approveVendorGlobalReviewEpic, archiveCardPolicyEpic, archiveTaskEpic, backgroundRefetchReviewTabEpic, bulkUpdateTaskListEpic, bulkUploadAutomatchingTimeoutEpic, bulkUploadMatchResultToastEpic, bulkUploadReceiptsEpic, cancelAiAccountantOnboardingEpic, cancelAndDeleteBillEpic, cancelAndDeleteRemiEpic, cancelOrDeleteBillsBulkActionEpic, cancelOrDeleteRemisBulkActionEpic, cancelScheduleAccruedJournalEntryEpic, changeZeniPersonRolesEpic, checkDepositEpic, clearAllEpic, closeChargeCardEpic, closeChargeCardsEpic, companyManagementSavePendingUpdatesEpic, companyManagementSaveUpdatesEpic, confirmBulkUploadMatchEpic, confirmCardSetupIntentEpic, convertAmountToHomeCurrencyEpic, createAddressEpic, createAutoTransferRuleEpic, createBankAccountEpic, createCardPolicyTemplatesEpic, createCardSetupIntentEpic, createCheckingAccountEpic, createCompanyAddressEpic, createCompanyOfficersEpic, createCompanyUserAddressEpic, createGlobalMerchantEpic, createInternationalBankAccountEpic, createNewSchedulesAccruedEpic, createNewSchedulesEpic, createNewTaskGroupEpic, createPaymentInstrumentEpic, createSessionAndSubmitEpic, createSessionEpic, createSubTaskEpic, createTagEpic, createTaskFromTaskGroupTemplateEpic, createTransferEntryEpic, createUserBankAccountEpic, deleteAccountStatementEpic, deleteAutoTransferRuleEpic, deleteBankAccountEpic, deleteBillEpic, deleteBillPayApprovalRuleEpic, deleteCannedResponseEpic, deleteChatSessionEpic, deleteConnectionEpic, deleteFileEpic, deleteFileListEpic, deleteInternationalBankAccountEpic, deletePaymentInstrumentEpic, deletePersonEpic, deleteRemiApprovalRuleEpic, deleteRemiEpic, deleteScheduleAccruedDetailEpic, deleteScheduleDetailEpic, deleteTagEpic, deleteTaskEpic, deleteTaskGroupEpic, deleteTransactionAttachmentEpic, deleteUserBankAccountEpic, dismissCapitalizationOnboardingEpic, doMagicLinkSignInEpic, doSignInEpic, doSignOutEpic, downloadAccountingProviderAttachmentEpic, dragNDropTasksEpic, enableChargeCardAutoPayEpic, enableSetupEpic, establishOnboardingPlaidConnectionEpic, establishPlaidConnectionEpic, excludeAccountFromReconciliationEpic, expressInterestChargeCardEpic, extractPolicyDocumentEpic, fetchAccountListEpic, fetchAccountListForAccountTypesEpic, fetchAccountSettingsListForAccountTypesEpic, fetchAccruedScheduleListEpic, fetchActiveTenantEpic, fetchAddressEpic, fetchAggregatedReportEpic, fetchAiAccountantCustomersEpic, fetchAiAccountantJobsEpic, fetchAiAgentsActivationStatusEpic, fetchAllCockpitViewsEpic, fetchAllExpenseAutomationTabsEpic, fetchAllPeopleRequiredViewsEpic, fetchAllTagsEpic, fetchAllTaskGroupsEpic, fetchAllTenantsEpic, fetchAndUpdateVendorRecommendationsEpic, fetchApAgingDetailEpic, fetchApAgingEpic, fetchArAgingDetailEpic, fetchArAgingEpic, fetchAuditReportGroupViewEpic, fetchAuditRuleGroupViewEpic, fetchAutoTransferReviewDetailEpic, fetchAutoTransferRuleHistoryEpic, fetchAutoTransferRulesEpic, fetchBalanceSheetEpic, fetchBalanceSheetForTimeframeEpic, fetchBankAccountsListEpic, fetchBankConnectionsViewEpic, fetchBankCountryNameByIbanEpic, fetchBankNameByRoutingEpic, fetchBankNameBySwiftEpic, fetchBillAndInitializeLocalStoreEpic, fetchBillDetailEpic, fetchBillingAccountsListEpic, fetchBillListEpic, fetchBillListPerTabEpic, fetchBillPayApproversDetailsEpic, fetchBillPayApproversListEpic, fetchBillPayCardEpic, fetchBillPayConfigEpic, fetchBillPaySetupApproverViewEpic, fetchBillPaySetupViewEpic, fetchBulkUploadBatchDetailsEpic, fetchBulkUploadBatchesEpic, fetchCannedResponsesEpic, fetchCardBalanceEpic, fetchCardPolicyDetailEpic, fetchCardPolicyListEpic, fetchCardPolicyMccCategoriesEpic, fetchCardPolicyVendorOptionsEpic, fetchCardProfilesEpic, fetchCashbackDetailEpic, fetchCashBalanceEpic, fetchCashFlowEpic, fetchCashFlowForTimeframeEpic, fetchCashInCashOutEpic, fetchCashPositionEpic, fetchChargeCardConfigEpic, fetchChargeCardDetailEpic, fetchChargeCardDetailPageEpic, fetchChargeCardListEpic, fetchChargeCardListPageEpic, fetchChargeCardPaymentHistoryEpic, fetchChargeCardPaymentPageEpic, fetchChargeCardRepaymentDetailEpic, fetchChargeCardSetupViewEpic, fetchChargeCardsRecurringExpensesEpic, fetchChargeCardStatementListEpic, fetchChargeCardTransactionAttachmentsEpic, fetchChargeCardTransactionListEpic, fetchChargeCardTransactionStatisticsEpic, fetchChatHistoryEpic, fetchChatSessionsForUserEpic, fetchClassListEpic, fetchCockpitContextEpic, fetchCollaborationAuthTokenEpic, fetchCompanyBillingAddressEpic, fetchCompanyConfigEpic, fetchCompanyHealthMetricConfigEpic, fetchCompanyHealthMetricViewEpic, fetchCompanyManagementViewEpic, fetchCompanyMetaDataEpic, fetchCompanyMonthEndReportHistoricDataEpic, fetchCompanyMonthEndReportHistoricDatesEpic, fetchCompanyMonthEndReportTemplatesEpic, fetchCompanyMonthEndReportViewEpic, fetchCompanyOnboardingViewEpic, fetchCompanyPassportViewEpic, fetchCompanyPortfolioViewEpic, fetchCompanyTaskManagerViewEpic, fetchCompletedTransactionsEpic, fetchCreditAccountEpic, fetchCreditAccountRepaymentEpic, fetchCreditAgentMacroEpic, fetchCurrencyConversionValueEpic, fetchDashboardEpic, fetchDashboardLayoutEpic, fetchDebitCardSummaryEpic, fetchDepositAccountDetailEpic, fetchDepositAccountEpic, fetchDepositAccountHistoryEpic, fetchDepositAccountLimitEpic, fetchDepositAccountListEpic, fetchDepositAccountListForCardsEpic, fetchDepositAccountTransactionListEpic, fetchDownloadSchedulesEpic, fetchDuplicateBillPayReviewEpic, fetchDuplicateReimbursementEpic, fetchEditBillDetailPageEpic, fetchEditRemiDetailPageEpic, fetchEligibleActionsForBillEpic, fetchEntityAutoCompleteEpic, fetchEntityHistoryEpic, fetchEntityRecommendationsByTransactionIdEpic, fetchEntityRecommendationsForLineUpdateEpic, fetchExcludedResourcesEpic, fetchExpenseAutomationFluxAnalysisViewEpic, fetchExpenseAutomationInitializeTransactionCategorizationViewLocalDataEpic, fetchExpenseAutomationJeSchedulesEpic, fetchExpenseAutomationJESchedulesPageEpic, fetchExpenseAutomationMarkTransactionAsNotMiscategorizedEpic, fetchExpenseAutomationMissingReceiptsEpic, fetchExpenseAutomationReconciliationsViewEpic, fetchExpenseAutomationSaveTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationEpic, fetchExpenseAutomationTransactionCategorizationViewEpic, fetchExpenseAutomationUpdateTransactionCategorizationEpic, fetchExpenseTrendEpic, fetchExpressPayInitialDetailsEpic, fetchExternalConnectionsEpic, fetchFileEpic, fetchFileListEpic, fetchFinanceStatementEpic, fetchForecastListEpic, fetchGlobalMerchantAutoCompleteViewEpic, fetchGlobalMerchantRecommendationEpic, fetchIncomeTrendEpic, fetchInsightsCardEpic, fetchInternationalWireDynamicFormEpic, fetchIntlVerificationFormEpic, fetchIssueCardPageEpic, fetchMagicLinkBankNameByRoutingEpic, fetchMagicLinkBankNameBySwiftEpic, fetchMagicLinkBillEpic, fetchMagicLinkTenantEpic, fetchManagementViewEpic, fetchMerchantListEpic, fetchMonthClosePerformanceTrendEpic, fetchMonthEndCloseChecksEpic, fetchMoreBatchDetailsEpic, fetchMultipleBatchDetailsEpic, 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, fetchPortfolioAllocationEpic, fetchPortfolioViewEpic, fetchPreviousBillsEpic, fetchProfitAndLossClassesViewEpic, fetchProfitAndLossEpic, fetchProfitAndLossForTimeframeClassesViewEpic, fetchProfitAndLossForTimeframeEpic, fetchProfitAndLossForTimeframeProjectViewEpic, fetchProfitAndLossProjectViewEpic, fetchProjectListEpic, fetchQBOConnectionPoolEpic, fetchRecommendationByEntityIdEpic, fetchRecommendationByEntityNameEpic, fetchRecommendationForAccountSettingsEpic, fetchRecommendationForAccountTypeEpic, fetchRecommendationsAndUpdateMerchantRecommendationsEpic, fetchRecommendedTransactionRowIndexEpic, fetchReferralsEpic, fetchRegisteredInterestsEpic, fetchReimbursementCardEpic, fetchReimbursementConfigEpic, fetchRemiAndInitializeLocalStoreEpic, fetchRemiApproversDetailsEpic, fetchRemiApproversListEpic, fetchRemiDetailEpic, fetchRemiListEpic, fetchRemiListPerTabEpic, fetchRemiSetupApproverViewEpic, fetchRemiSetupViewEpic, fetchRevenueClassesViewEpic, fetchRevenueEpic, fetchRevenueForTimeframeClassesViewEpic, fetchRevenueForTimeframeEpic, fetchRevenueWithForecastEpic, fetchReviewCompanyViewEpic, fetchReviewTransferDetailEpic, fetchRewardsPlanEpic, fetchScheduleAccruedDetailsEpic, fetchScheduleAccruedDetailsPageEpic, fetchScheduleDetailsEpic, fetchScheduleDetailsPageEpic, fetchScheduleListEpic, fetchSchedulesAccountEpic, fetchSkillsEpic, fetchSubscriptionAddOnsEpic, fetchSubscriptionCouponsEpic, fetchSubscriptionCreateEstimateEpic, fetchSubscriptionDetailsEpic, fetchSubscriptionListEpic, fetchSubscriptionPlansEpic, fetchSubscriptionSummaryForTenantEpic, fetchSubscriptionUpdateEstimateEpic, fetchSubscriptionViewEpic, fetchSubTasksEpic, fetchSuggestedQuestionsEpic, fetchTaskDetailEpic, fetchTaskDetailPageEpic, fetchTaskGroupTemplatesEpic, fetchTaskHistoryEpic, fetchTaskListEpic, fetchTaskListPageEpic, fetchTaskManagerMetricsEpic, fetchTasksCardEpic, fetchTopExEpic, fetchTransactionActivityLogEpic, fetchTransactionDetailEpic, fetchTransactionListByAccountEpic, fetchTransactionListByClassEpic, fetchTransactionListByEntityEpic, fetchTransactionListByProjectEpic, fetchTransactionsForEntityEpic, fetchTransactionsListByCategoryTypeEpic, fetchTransferAccountsEpic, fetchTreasuryDetailEpic, fetchTreasuryFundsEpic, fetchTreasuryHistoryEpic, fetchTreasurySetupViewEpic, fetchTreasuryStatementListEpic, fetchTreasuryTaxLetterListEpic, fetchTreasuryTransactionListEpic, 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, includeAccountInReconciliationEpic, initEmailConnectOAuthEpic, initialiseExpenseAutomationReconciliationLocalDataForSelectedAccountIdEpic, initializeAccountMappingViewEpic, initializeAccountSettingsViewEpic, initializeBillPaySetupApproverViewUpdateDataEpic, initializeBillToLocalStoreEpic, initializeCardUserOnboardingLocalDataEpic, initializeCompanyHealthMetricViewLocalDataEpic, initializeDynamicFormEpic, initializeEditPersonEpic, initializeExpenseAutomationJeScheduleLocalDataEpic, initializeInternationalWireLocalDataEpic, initializeIntlVerificationFormEpic, initializeMyProfileLocalDataEpic, initializeOnboardingCustomerViewUpdateDataEpic, initializeRemiSetupApproverViewUpdateDataEpic, initializeRemiToLocalStoreEpic, initializeScheduleAccruedDetailLocalDataEpic, initializeScheduleDetailLocalDataEpic, initializeSubscriptionLocalDataEpic, initializeTaskToLocalStoreEpic, initializeTransactionDetailLocalDataEpic, initializeVendorAddressEpic, initiateChargeCardRepaymentEpic, initiateReportsClassViewRefetchingEpic, invitePeopleEpic, inviteZeniPeopleEpic, issueChargeCardEpic, lockChargeCardEpic, lockChargeCardsEpic, markAsCompleteScheduleDetailEpic, markTransactionAsNotMiscategorizedEpic, notifyMeForFeatureEpic, parallelFetchAccountTransactionListEpic, parallelFetchClassTransactionListEpic, parallelFetchEntityTransactionListEpic, parallelFetchProjectTransactionListEpic, parallelFetchTransactionListByCategoryTypeEpic, parseInvoiceToBillEpic, parseReceiptsToRemiEpic, parseStatementEpic, parseUploadedKybDocumentEpic, parseUploadedKycDocumentEpic, peopleSaveUpdatesEpic, policyDocumentExtractionToRecommendationBridgeEpic, policyRecommendationFromUploadEpic, pollBulkUploadBatchStatusEpic, pusherBatchStatusCompletionEpic, pushToastNotificationEpic, refetchCompletedTransactionsOnBulkUploadSortEpic, refreshBatchDetailsForBatchIdEpic, refreshExpenseAutomationCurrentTabEpic, refreshIntegrationsDataEpic, refreshOpExByVendorReportEpic, rejectVendorGlobalReviewEpic, reorderBillPayApprovalRulesEpic, reorderRemiApprovalRulesEpic, reparseStatementEpic, reportsResyncEpic, resendCardInviteEpic, resendInviteEpic, resendOtpEpic, resendReferralInviteEpic, resendVerifyDeviceOTPEpic, resetTransactionVendorLocalDataEpic, resetVendorDetailLocalDataEpic, resetVendorsTabVendorDetailLocalDataEpic, restoreBulkUploadAutomatchingOnMountEpic, retryBankAccountConnectionEpic, retryBankAccountConnectionForOnboardingEpic, retryExpenseAutomationJEScheduleEpic, retryOrRefundBillEpic, reviewDraftRemisBulkActionEpic, reviewExpenseAutomationFluxAnalysisViewEpic, revokeCardInviteEpic, revokeChargeCardsInviteEpic, saveAccountMappingViewEpic, saveAccountSettingsViewEpic, saveAPIKeyConnectionEpic, saveBillDetailEpic, saveBillPaySetupApproverViewUpdatesEpic, saveCannedResponseEpic, saveCardOnboardingUserDetailsEpic, saveCompanyBillingAddressEpic, saveCompanyHealthMetricByIdEpic, saveCompanyMonthEndReportEpic, saveCompanyPassportDetailsEpic, saveConnectorCredentialsEpic, saveCreditAgentMacroEpic, saveExpenseAutomationReconciliationDetailsEpic, saveExpenseAutomationReconciliationReviewEpic, saveExternalConnectionEpic, saveMagicLinkBankAccountEpic, saveNewAddressEpic, saveNotificationPreferencesEpic, saveNotificationSettingsEpic, saveOAuthConnectionEpic, saveOnboardingCustomerCompletedStatusEpic, saveOnboardingCustomerNotesEpic, saveOnboardingCustomerViewUpdatesEpic, saveRealTimeApprovalEpic, saveReasonForAuditRuleEpic, saveRemiDetailEpic, saveRemiSetupApproverViewUpdatesEpic, saveScheduleAccruedDetailsEpic, saveScheduleDetailsEpic, saveSubscriptionNotesUpdatesEpic, saveSubscriptionUpdatesEpic, saveTaskDetailEpic, saveTransactionDetailEpic, saveTransactionVendorEpic, saveVendorDetailsViewEpic, saveVendorEpic, saveVendorFirstReviewViewEpic, saveVendorsTabVendorEpic, scheduleTenantCreditScoreCronEpic, searchTransactionsForManualMatchEpic, seedAiCardCreationFormDraftEpic, seedAiCardPolicyFormDraftEpic, sendCompanyMonthEndReportEpic, sendEmailMagicLinkToUserEpic, sendOnboardingCustomerViewInviteEpic, sendOtpEpic, sendReferralInviteEpic, sessionHeartbeatEpic, snoozeTaskEpic, statementCloseDayEpic, stopSubmitEpic, stopSubmitQuestionEpic, submitDraftBillsBulkActionEpic, submitDraftRemisBulkActionEpic, submitExpressPayEpic, submitFeedbackEpic, submitIntlVerificationEpic, submitQuestionEpic, syncTabsAfterAutomatchEpic, toggleReportUIOptionForecastModeEpic, transferMoneyEpic, treasuryTransferMoneyEpic, triggerAiAccountantJobEpic, triggerReviewTabRefetchEpic, unlinkPaymentAccountEpic, unlockChargeCardEpic, unlockChargeCardsEpic, unsnoozeTaskEpic, updateAccountingClassesEnabledEpic, updateAccruedJESchedulesEpic, updateAddressEpic, updateAmountsInScheduleAccruedDetailEpic, updateAmountsInScheduleDetailEpic, updateAutoTransferRuleEpic, updateBusinessVerificationDetailsEpic, updateCapitalizationAccountThresholdEpic, updateCardPolicyEpic, updateCardProfileEpic, updateChargeCardDetailEpic, updateChargeCardLimitEpic, updateChargeCardNameEpic, updateChargeCardsLimitEpic, updateCompanyDetailsEpic, updateCompanyOfficerEpic, updateCompanyPassportLocalStoreDataEpic, updateCompanyTaskManagerViewFiltersEpic, updateDashboardLayoutEpic, updateDebitCardPinAttemptEpic, updateDepositAccountEpic, updateExpenseAutomationReconciliationBalanceLocalDataEpic, updateFileNameEpic, updateFilesMetadataEpic, updateJESchedulesEpic, updateMappedCashAccountEpic, updateMileageDetailsEpic, updateMyProfileEpic, updateNetBurnOrIncomeStoryCardSettingsEpic, updateNotificationViewAllNotificationsStatusEpic, updateNotificationViewNotificationStatusEpic, updateOnboardingCustomerViewCompleteStatusEpic, updateOnboardingCustomerViewDashboardLoadedEpic, updateOnboardingCustomerViewEpic, updateOnboardingCustomerViewLocalStoreDataEpic, updateOnboardingPaymentAccountLoginStatusEpic, updateOnboardingPaymentAccountStatusEpic, updatePaymentAccountEpic, updatePaymentAccountLoginStatusEpic, updatePaymentAccountStatusEpic, updatePhysicalChargeCardAttemptEpic, updatePortfolioAllocationEpic, updatePrimaryContactEpic, updatePrimaryFundingAccountEpic, updateQBOConnectionPoolExternalConnectionEpic, updateReferViewedEpic, updateRemiSetupViewLocalStoreDataEpic, updateReportUIOptionCOABalancesRangeEpic, updateReportUIOptionIsCompareModeEpic, updateReportUIOptionIsCompareModeOnEpic, updateReportUIOptionThisPeriodEpic, updateReportUIOptionTimeFrameEpic, updateSectionAccountsViewEpic, updateSectionClassesViewEpicV2, updateSectionProjectViewEpic, updateSelectedVendorForCreateFlowEpic, updateSetupViewLocalStoreDataEpic, updateStatementInfoEpic, updateTaskFromListViewEpic, updateTaskGroupNameEpic, updateTransactionDetailEpic, updateTreasuryPromoIntroClosedByOutsideClickEpic, updateTreasuryPromoRemindMeLaterClickedEpic, updateTreasuryVideoViewedEpic, updateVendorContactEpic, uploadAccountStatementEpic, uploadMissingAttachmentSuccessEpic, uploadMissingReceiptSuccessEpic, uploadTransactionReceiptSuccessEpic, validateBillsBulkActionEpic, vendorFiling1099UploadDetailsSaveEpic, verifyDeviceWithTwoFAEpic, verifyOtpEpic, verifyUserEpic, waitForBillDetailThenInitializeLocalStoreEpic, waitForForecastListThenFetchNetBurnOrIncomeWithForecastEpic, waitForForecastListThenFetchOpExWithForecastEpic, waitForForecastListThenFetchRevenueWithForecastEpic, waitForMerchantRecommendationFetchThenUpdateRecommendationInMerchantEpic, waitForVendorByIdThenSaveBillUpdatetoLocalStoreEpic, waitForVendorByNameThenParsetoLocalStoreEpic, waitForVendorByNameThenUpdateBillDetailEpic, waitForVendorRecommendationFetchThenUpdateRecommendationInBillEpic, wiseRedirectEpic);
622
622
  const rootEpic = (action$, store$, dependencies) => combinedEpics(action$, store$, dependencies).pipe(map(identity), catchError((error, source) => {
623
623
  console.error(error);
624
624
  return source;
package/lib/esm/index.js CHANGED
@@ -61,6 +61,8 @@ import { ALL_SCHEDULES_TYPES, getJEScheduleTransactionKey, toScheduleTypesType,
61
61
  import { ALL_MONTH_END_CLOSE_CHECKS_FREQUENCY, } from './entity/monthEndCloseChecks/monthEndCloseChecksState';
62
62
  import { updateCommentsNotifications, updateCommentsNotificationsStatuses, } from './entity/notification/notificationReducer';
63
63
  import { toNotificationModeStrict, } from './entity/notification/types/notificationTypes';
64
+ import { getNotificationRegistry } from './entity/notificationRegistry/notificationRegistrySelector';
65
+ import { toNotificationChannel, toNotificationFrequency, } from './entity/notificationRegistry/notificationRegistryState';
64
66
  import { getPlaidPaymentAccounts } from './entity/paymentAccount/paymentAccountSelector';
65
67
  import { VERIFIED_PAYMENT_ACCOUNT_PROVIDER_VERIFICATION_STATUS, } from './entity/paymentAccount/paymentAccountState';
66
68
  import { closeSnackbar, openSnackbar } from './entity/snackbar/snackbarReducer';
@@ -210,6 +212,8 @@ import { isNetBurnOrIncomeClassesViewCalculatedSectionID, isNetBurnOrIncomeClass
210
212
  import { toAverageMonthsCount } from './view/netBurnOrIncomeStoryCard/epic/updateNetBurnOrIncomeStoryCardSettingsEpic';
211
213
  import { fetchNetBurnOrIncomeStoryCard, updateNetBurnOrIncomeStoryCardSettings, } from './view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer';
212
214
  import { getNetBurnOrIncomeStoryCardReport } from './view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardSelector';
215
+ import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, setGroupFrequency, toggleEventChannel, } from './view/notificationPreferencesView/notificationPreferencesViewReducer';
216
+ import { getEffectiveNotificationPreferences, getNotificationLocalOverrides, getNotificationPreferencesSaveState, hasUnsavedNotificationPreferences, } from './view/notificationPreferencesView/notificationPreferencesViewSelector';
213
217
  import { fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, fetchNotificationView, updateNotificationViewAllNotificationsStatus, updateNotificationViewCurrentTabAndSubTab, updateNotificationViewNotificationStatus, updateNotificationViewSubTab, updateNotificationViewTabState, updateNotificationViewUIState, } from './view/notificationView/notificationViewReducer';
214
218
  import { getExternalNotificationsForSelectedSubTab, getNotificationView, getNotificationsForSelectedSubTab, } from './view/notificationView/notificationViewSelector';
215
219
  import { toNotificationSubTabTypeStrict, toNotificationTabTypeStrict, } from './view/notificationView/notificationViewState';
@@ -243,7 +247,7 @@ import { clearProfitAndLossProjectView, fetchProfitAndLossForTimeframeProjectVie
243
247
  import { getProfitAndLossProjectView } from './view/profitAndLossProjectView/profitAndLossProjectViewSelector';
244
248
  import { fetchProjectList } from './view/projectList/projectListReducer';
245
249
  import { getProjectList, } from './view/projectList/projectListSelector';
246
- import { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName, submitRecommendationFeedback, } from './view/recommendation/recommendationReducer';
250
+ import { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName, } from './view/recommendation/recommendationReducer';
247
251
  import { DEFAULT_REFERRER_AMOUNT, clearReferrals, fetchReferrals, fetchRewardsPlan, resendReferralInvite, saveReferralFormDataInLocalStore, sendReferralInvite, updateReferViewed, updateReferralListSortUiState, } from './view/referralView/referralReducer';
248
252
  import { getInviteFormView, getReferralListView, getRewardsPlanCard, } from './view/referralView/referralSelector';
249
253
  import { AmountStatusTypes, StatusTypes, toReferralListViewSortKeyType, } from './view/referralView/referralState';
@@ -600,7 +604,7 @@ export { getSpendManagementEffectiveListPeriod, getSelectedCompanyOfficer, showB
600
604
  export { canSendMonthEndEmailReport, shouldEnableCalendarPickerForLastReportSent, };
601
605
  export { getInternationalSubConfigCodeKey, BILL_NEW_PAYMENT_METHODS, NEW_INTERNATIONAL_METHOD_SUBTEXT, SWIFT_OUR_INTERNATIONAL_METHOD_SUBTEXT, LOCAL_CURRENCY_INTERNATIONAL_METHOD_SUBTEXT, };
602
606
  export { getVendorList, updateSortUiState, updatePageToken, updateYTDSelectionUIState, isColumnYTDSpend, isVendorsTabVisible, toVendorReportIDType, getVendorFiling1099List, fetchVendorsFiling1099Download, };
603
- export { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName, submitRecommendationFeedback, };
607
+ export { fetchEntityRecommendationsByTransactionId, fetchEntityRecommendationsForLineUpdate, fetchRecommendationByEntityId, fetchRecommendationByEntityName, };
604
608
  export { fetchOwnerList };
605
609
  export { getZeniAccountsConfigDetail, getZeniAccountList, fetchZeniAccountList, fetchAccountList, createCheckingAccount, fetchPaymentAccountList, unlinkPaymentAccount, getDepositAccountDetail, getAllDepositAccounts, getDepositAccountDetailForPDF, fetchDepositAccount, fetchZeniAccountsConfig, updateTransferMoneyLocalData, updateTransferToLocalData, updateDepositToLocalData, transferMoney, getTransferDetail, clearTransferDetail, clearReviewTransferDetail, fetchReviewTransferDetail, fetchDepositAccountDetail, depositCheck, updateCheckDepositLocalData, clearCheckDeposit, getCheckDepositDetail, updateDepositAccount, fetchDepositAccountHistorySuccess, fetchDepositAccountHistoryFailure, fetchZeniAccStatementPage, getZeniAccStatements, };
606
610
  export { fetchDepositAccountTransactionList, getDepositAccountTransactionList, };
@@ -642,6 +646,7 @@ export { toNotificationModeStrict, updateCommentsNotifications, updateCommentsNo
642
646
  export { toNotificationSubTabTypeStrict, toNotificationTabTypeStrict, fetchNotificationView, fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, updateNotificationViewAllNotificationsStatus, updateNotificationViewNotificationStatus, updateNotificationViewTabState, updateNotificationViewCurrentTabAndSubTab, updateNotificationViewSubTab, updateNotificationViewUIState, getNotificationView, getExternalNotificationsForSelectedSubTab, getNotificationsForSelectedSubTab, };
643
647
  export { clearFeatureNotificationView, fetchRegisteredInterests, notifyMeForFeature, getFeatureNotificationView, getRegisteredInterests, getRegisteredInterestsByFeature, isFeatureInterestRegistered, };
644
648
  export { pushToastNotification, getLastNotificationTime, getNotifications, };
649
+ export { getEffectiveNotificationPreferences, getNotificationLocalOverrides, getNotificationPreferencesSaveState, getNotificationRegistry, hasUnsavedNotificationPreferences, clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, setGroupFrequency, toggleEventChannel, toNotificationChannel, toNotificationFrequency, };
645
650
  export { getReferralListView, getInviteFormView, toReferralListViewSortKeyType, StatusTypes, AmountStatusTypes, DEFAULT_REFERRER_AMOUNT, fetchReferrals, sendReferralInvite, clearReferrals, saveReferralFormDataInLocalStore, updateReferralListSortUiState, resendReferralInvite, fetchRewardsPlan, getRewardsPlanCard, updateReferViewed, };
646
651
  export { ALL_WEEK_DAYS, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toDayOfWeek, toRecurringFrequency, };
647
652
  export { fetchCockpitContext, fetchCompanyTaskManagerView, fetchTaskManagerMetrics, getCompanyTaskManagerView, createTaskFromTaskGroupTemplate, };
@@ -37,6 +37,7 @@ import jeSchedules, { initialState as initialJESchedulesState, } from './entity/
37
37
  import merchant, { initialState as initialMerchantState, } from './entity/merchant/merchantReducer';
38
38
  import monthEndCloseChecks, { initialState as initialMonthEndCloseChecksState, } from './entity/monthEndCloseChecks/monthEndCloseChecksReducer';
39
39
  import notification, { initialState as initialNotificationState, } from './entity/notification/notificationReducer';
40
+ import notificationRegistry, { initialState as initialNotificationRegistryState, } from './entity/notificationRegistry/notificationRegistryReducer';
40
41
  import onboardingCustomer, { initialState as initialOnboardingCustomerState, } from './entity/onboardingCustomer/onboardingCustomerReducer';
41
42
  import paymentAccount, { initialState as initialPaymentAccountState, } from './entity/paymentAccount/paymentAccountReducer';
42
43
  import paymentInstrument, { initialState as initialPaymentInstrumentState, } from './entity/paymentInstrument/paymentInstrumentReducer';
@@ -121,6 +122,7 @@ import monthEndCloseChecksView, { initialState as initialMonthEndCloseChecksView
121
122
  import netBurnOrIncome, { initialState as initialNetBurnOrIncomeWithForecastState, } from './view/netBurnOrIncome/netBurnOrIncomeReducer';
122
123
  import netBurnOrIncomeClassesView, { initialState as initialNetBurnOrIncomeClassesViewState, } from './view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer';
123
124
  import netBurnOrIncomeStoryCard, { initialState as initialNetBurnOrIncomeStoryCardState, } from './view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer';
125
+ import notificationPreferencesView, { initialState as initialNotificationPreferencesViewState, } from './view/notificationPreferencesView/notificationPreferencesViewReducer';
124
126
  import notificationView, { initialState as initialNotificationViewState, } from './view/notificationView/notificationViewReducer';
125
127
  import onboardingCockpitView, { initialState as initialOnboardingCockpitViewState, } from './view/onboardingView/cockpitView/onboardingCockpitViewReducer';
126
128
  import onboardingCustomerView, { initialState as initialOnboardingCustomerViewState, } from './view/onboardingView/customerView/onboardingCustomerViewReducer';
@@ -387,6 +389,8 @@ const initialViewsState = {
387
389
  netBurnOrIncomeClassesViewState: initialNetBurnOrIncomeClassesViewState,
388
390
  netBurnOrIncomeState: initialNetBurnOrIncomeWithForecastState,
389
391
  netBurnOrIncomeStoryCardState: initialNetBurnOrIncomeStoryCardState,
392
+ notificationPreferencesViewState: initialNotificationPreferencesViewState,
393
+ notificationRegistryState: initialNotificationRegistryState,
390
394
  notificationViewState: initialNotificationViewState,
391
395
  onboardingCockpitViewState: initialOnboardingCockpitViewState,
392
396
  onboardingCustomerViewState: initialOnboardingCustomerViewState,
@@ -627,6 +631,8 @@ const viewReducers = {
627
631
  netBurnOrIncomeClassesViewState: netBurnOrIncomeClassesView,
628
632
  netBurnOrIncomeState: netBurnOrIncome,
629
633
  netBurnOrIncomeStoryCardState: netBurnOrIncomeStoryCard,
634
+ notificationPreferencesViewState: notificationPreferencesView,
635
+ notificationRegistryState: notificationRegistry,
630
636
  notificationViewState: notificationView,
631
637
  onboardingCockpitViewState: onboardingCockpitView,
632
638
  onboardingCustomerViewState: onboardingCustomerView,
@@ -0,0 +1,116 @@
1
+ import { EMPTY, concat, of } from 'rxjs';
2
+ import { catchError, debounceTime, filter, finalize, mergeMap, switchMap, takeUntil, withLatestFrom, } from 'rxjs/operators';
3
+ import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
4
+ import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
5
+ import { notificationPreferencesUrl } from '../notificationPreferencesEndpoint';
6
+ import { mapPreferencesToPayload, } from '../notificationPreferencesViewPayload';
7
+ import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess, setGroupFrequency, toggleEventChannel, } from '../notificationPreferencesViewReducer';
8
+ import { getNotificationLocalOverrides } from '../notificationPreferencesViewSelector';
9
+ const DEBOUNCE_MS = 300;
10
+ export const saveNotificationPreferencesEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter((action) => toggleEventChannel.match(action) || setGroupFrequency.match(action)),
11
+ // Coalesce bursts of toggles into a single PUT. Trade-off: rapid clickers
12
+ // defer saves until they pause. Consider a max-wait wrapper if this
13
+ // becomes a UX problem.
14
+ debounceTime(DEBOUNCE_MS), withLatestFrom(state$),
15
+ // `switchMap` unsubscribes from any in-flight PUT observable when a new
16
+ // debounced batch fires. The prior HTTP request has already left the
17
+ // client — the network call is NOT cancelled — but its response is
18
+ // ignored, so stale success/failure actions cannot clobber the newer
19
+ // batch's state. Server-side ordering is arrival-order LWW.
20
+ switchMap(([, state]) => {
21
+ const overrides = getNotificationLocalOverrides(state);
22
+ const preferencesPatch = mapPreferencesToPayload(overrides);
23
+ if (Object.keys(preferencesPatch).length === 0) {
24
+ // No diff → do not dispatch a synthetic success (that would wipe
25
+ // stored preferences via the reducer). Simply no-op.
26
+ return EMPTY;
27
+ }
28
+ // Snapshot the Cancel epoch at PUT-dispatch time. Every Cancel bumps
29
+ // `cancelEpoch`; the reducer compares the captured value on Success/
30
+ // Failure and skips the merge when the value has advanced (user
31
+ // pressed Cancel since this save started). See Cursor Bugbot 4aa021f7
32
+ // — the earlier counter model failed when `switchMap` abandoned an
33
+ // in-flight save's response (Success/Failure never dispatched, so
34
+ // the counter never drained and future saves got their merge dropped).
35
+ const cancelEpochAtDispatch = state.notificationPreferencesViewState.cancelEpoch;
36
+ const body = { task_checklist_preferences: preferencesPatch };
37
+ // Suppress the error snackbar when the response lands AFTER the user
38
+ // pressed Cancel — the Failure reducer already swallows the state
39
+ // update, so the toast would be a stale error for a save the user
40
+ // abandoned. `StateObservable#value` reads the current cancelEpoch at
41
+ // response time (not at dispatch time — that's what
42
+ // `cancelEpochAtDispatch` captures). Cursor Bugbot da2f4fe2 + Nikunj.
43
+ const errorSnackbar = openSnackbar({
44
+ messageSection: 'notification_settings_saved',
45
+ messageText: 'failed',
46
+ type: 'error',
47
+ });
48
+ const isCancelledSince = () => cancelEpochAtDispatch <
49
+ state$.value.notificationPreferencesViewState.cancelEpoch;
50
+ // Abort the in-flight HTTP request when `switchMap` disposes this
51
+ // observable (new debounced batch fires, tenant switch, unmount).
52
+ // Without an AbortSignal, `switchMap` would drop the response
53
+ // client-side but the older PUT would still land on the server —
54
+ // under patch-semantic LWW, a slower older PUT arriving after a
55
+ // newer one silently reverts the user's latest choice on the
56
+ // server. Cursor Bugbot e3861a76. `AbortController.abort()` is
57
+ // idempotent so it's safe if the request already completed.
58
+ const controller = new AbortController();
59
+ const request$ = zeniAPI
60
+ .putAndGetJSON(notificationPreferencesUrl(zeniAPI), body, undefined, controller.signal)
61
+ .pipe(mergeMap((response) => {
62
+ if (isSuccessResponse(response)) {
63
+ return of(saveNotificationPreferencesSuccess({
64
+ cancelEpochAtDispatch,
65
+ savedOverrides: overrides,
66
+ serverEcho: response.data?.task_checklist_preferences,
67
+ }));
68
+ }
69
+ const actions = [
70
+ saveNotificationPreferencesFailure({
71
+ cancelEpochAtDispatch,
72
+ error: response.status,
73
+ }),
74
+ ];
75
+ if (!isCancelledSince()) {
76
+ // Surface a user-visible error — without it the UI reverts to
77
+ // server truth after debounce and the failed toggle looks like
78
+ // a mystery UI bug.
79
+ actions.push(errorSnackbar);
80
+ }
81
+ return of(...actions);
82
+ }), catchError((error) => {
83
+ const actions = [
84
+ saveNotificationPreferencesFailure({
85
+ cancelEpochAtDispatch,
86
+ error: createZeniAPIStatus('Unexpected Error', 'Save notification preferences failed: ' +
87
+ JSON.stringify(error)),
88
+ }),
89
+ ];
90
+ if (!isCancelledSince()) {
91
+ actions.push(errorSnackbar);
92
+ }
93
+ return of(...actions);
94
+ }), finalize(() => {
95
+ // switchMap disposal (new batch fires, unmount) OR the takeUntil
96
+ // below (Cancel fires) → abort the still-in-flight HTTP request.
97
+ // No-op if the request has already completed successfully or
98
+ // errored. Without this, the pre-Cancel PUT would still land on
99
+ // the server; under patch-semantic LWW, a slower older PUT
100
+ // arriving after Cancel silently reverts the user's just-cleared
101
+ // overrides on the server.
102
+ controller.abort();
103
+ }),
104
+ // Cancel and tenant-switch/logout do not flow through the outer
105
+ // `filter`, so switchMap would never dispose this observable on
106
+ // either. `takeUntil` completes request$ on Cancel OR clear-all,
107
+ // which triggers finalize above (aborts the in-flight HTTP
108
+ // request). Without matching clear-all, a tenant switch during
109
+ // an in-flight PUT would let the older PUT land on the server
110
+ // under patch-semantic LWW. Cursor Bugbot 3637969823 + 3641372002.
111
+ takeUntil(actions$.pipe(filter((action) => clearNotificationPreferencesLocalOverrides.match(action) ||
112
+ clearAllNotificationPreferencesView.match(action)))));
113
+ // Flip savePreferencesState to In-Progress BEFORE the network call so
114
+ // any "saving…" UI can render.
115
+ return concat(of(saveNotificationPreferences()), request$);
116
+ }));
@@ -0,0 +1,5 @@
1
+ // Shared endpoint used by both the GET (envelope refresh in
2
+ // `fetchNotificationSettingsEpic`) and the PUT (patch in
3
+ // `saveNotificationPreferencesEpic`). Kept as a helper so an endpoint rename
4
+ // can't drift between the two callers.
5
+ export const notificationPreferencesUrl = (zeniAPI) => `${zeniAPI.apiEndPoints.notificationMicroServiceBaseUrl}/1.0/notification-preferences`;
@@ -0,0 +1,36 @@
1
+ import { toNotificationChannel, toNotificationFrequency, } from '../../entity/notificationRegistry/notificationRegistryState';
2
+ const mapEventEnabledByChannel = (raw) => {
3
+ if (raw == null) {
4
+ return {};
5
+ }
6
+ const out = {};
7
+ Object.entries(raw).forEach(([eventId, channelMap]) => {
8
+ const mapped = {};
9
+ Object.entries(channelMap).forEach(([channel, enabled]) => {
10
+ mapped[toNotificationChannel(channel)] = enabled;
11
+ });
12
+ out[eventId] = mapped;
13
+ });
14
+ return out;
15
+ };
16
+ export const mapPayloadToPreferences = (payload) => {
17
+ const groupFrequencyRaw = payload?.group_frequency_by_group_id ?? {};
18
+ const groupFrequencyByGroupId = Object.fromEntries(Object.entries(groupFrequencyRaw).map(([groupId, frequency]) => [
19
+ groupId,
20
+ toNotificationFrequency(frequency),
21
+ ]));
22
+ return {
23
+ eventEnabledByChannel: mapEventEnabledByChannel(payload?.event_enabled_by_channel),
24
+ groupFrequencyByGroupId,
25
+ };
26
+ };
27
+ export const mapPreferencesToPayload = (preferences) => {
28
+ const payload = {};
29
+ if (Object.keys(preferences.eventEnabledByChannel).length > 0) {
30
+ payload.event_enabled_by_channel = preferences.eventEnabledByChannel;
31
+ }
32
+ if (Object.keys(preferences.groupFrequencyByGroupId).length > 0) {
33
+ payload.group_frequency_by_group_id = preferences.groupFrequencyByGroupId;
34
+ }
35
+ return payload;
36
+ };