@zeniai/client-epic-state 5.1.72 → 5.1.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +1 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +1 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +1 -0
- package/lib/esm/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +1 -0
- package/lib/esm/index.js +2 -2
- package/lib/esm/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +16 -13
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewPayload.js +2 -7
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewReducer.js +10 -55
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewSelector.js +13 -23
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewState.js +0 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +14 -16
- package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.d.ts +8 -2
- package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +13 -10
- package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.d.ts +1 -2
- package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.js +2 -7
- package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.d.ts +1 -6
- package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.js +11 -56
- package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.js +15 -23
- package/lib/view/notificationPreferencesView/notificationPreferencesViewState.d.ts +0 -1
- package/lib/view/notificationPreferencesView/notificationPreferencesViewState.js +0 -1
- package/package.json +1 -1
|
@@ -43,6 +43,7 @@ export interface MonthEndCloseChecksPayload {
|
|
|
43
43
|
history_month_and_year_flag: string[];
|
|
44
44
|
insights: MonthEndInsightsPayload;
|
|
45
45
|
month_close_checks: MonthCloseChecksPayload[];
|
|
46
|
+
is_ai_progress_card_data_available?: boolean;
|
|
46
47
|
report_email_sent_date?: string;
|
|
47
48
|
target_month_end_email_sent_date?: string;
|
|
48
49
|
}
|
|
@@ -69,6 +69,7 @@ const toMonthYearPeriods = (historicMonthYearPayload) => {
|
|
|
69
69
|
const toMonthEndCloseChecksInfo = (payload, period) => ({
|
|
70
70
|
id: (0, timePeriod_1.toMonthYearPeriodId)(period),
|
|
71
71
|
insights: toMonthEndInsights(payload.insights),
|
|
72
|
+
isAiProgressCardDataAvailable: payload.is_ai_progress_card_data_available ?? false,
|
|
72
73
|
monthEndCloseCheckList: payload.month_close_checks.map((monthCloseCheck) => toMonthEndCloseCheck(monthCloseCheck)),
|
|
73
74
|
auditSummary: {
|
|
74
75
|
auditScorePercentage: payload.audit_summary.audit_score_percentage,
|
|
@@ -48,6 +48,7 @@ export interface MonthEndCloseChecksInfo {
|
|
|
48
48
|
historicMonthYear: MonthYearPeriod[];
|
|
49
49
|
id: MonthYearPeriodId;
|
|
50
50
|
insights: MonthEndInsights;
|
|
51
|
+
isAiProgressCardDataAvailable: boolean;
|
|
51
52
|
monthEndCloseCheckList: MonthEndCloseCheck[];
|
|
52
53
|
reportEmailSentDate?: ZeniDate;
|
|
53
54
|
targetCloseDate?: ZeniDate;
|
|
@@ -66,6 +66,7 @@ const toMonthYearPeriods = (historicMonthYearPayload) => {
|
|
|
66
66
|
export const toMonthEndCloseChecksInfo = (payload, period) => ({
|
|
67
67
|
id: toMonthYearPeriodId(period),
|
|
68
68
|
insights: toMonthEndInsights(payload.insights),
|
|
69
|
+
isAiProgressCardDataAvailable: payload.is_ai_progress_card_data_available ?? false,
|
|
69
70
|
monthEndCloseCheckList: payload.month_close_checks.map((monthCloseCheck) => toMonthEndCloseCheck(monthCloseCheck)),
|
|
70
71
|
auditSummary: {
|
|
71
72
|
auditScorePercentage: payload.audit_summary.audit_score_percentage,
|
package/lib/esm/index.js
CHANGED
|
@@ -212,7 +212,7 @@ import { isNetBurnOrIncomeClassesViewCalculatedSectionID, isNetBurnOrIncomeClass
|
|
|
212
212
|
import { toAverageMonthsCount } from './view/netBurnOrIncomeStoryCard/epic/updateNetBurnOrIncomeStoryCardSettingsEpic';
|
|
213
213
|
import { fetchNetBurnOrIncomeStoryCard, updateNetBurnOrIncomeStoryCardSettings, } from './view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer';
|
|
214
214
|
import { getNetBurnOrIncomeStoryCardReport } from './view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardSelector';
|
|
215
|
-
import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides,
|
|
215
|
+
import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, setGroupFrequency, toggleEventChannel, } from './view/notificationPreferencesView/notificationPreferencesViewReducer';
|
|
216
216
|
import { getEffectiveNotificationPreferences, getNotificationLocalOverrides, getNotificationPreferencesSaveState, hasUnsavedNotificationPreferences, } from './view/notificationPreferencesView/notificationPreferencesViewSelector';
|
|
217
217
|
import { fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, fetchNotificationView, updateNotificationViewAllNotificationsStatus, updateNotificationViewCurrentTabAndSubTab, updateNotificationViewNotificationStatus, updateNotificationViewSubTab, updateNotificationViewTabState, updateNotificationViewUIState, } from './view/notificationView/notificationViewReducer';
|
|
218
218
|
import { getExternalNotificationsForSelectedSubTab, getNotificationView, getNotificationsForSelectedSubTab, } from './view/notificationView/notificationViewSelector';
|
|
@@ -646,7 +646,7 @@ export { toNotificationModeStrict, updateCommentsNotifications, updateCommentsNo
|
|
|
646
646
|
export { toNotificationSubTabTypeStrict, toNotificationTabTypeStrict, fetchNotificationView, fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, updateNotificationViewAllNotificationsStatus, updateNotificationViewNotificationStatus, updateNotificationViewTabState, updateNotificationViewCurrentTabAndSubTab, updateNotificationViewSubTab, updateNotificationViewUIState, getNotificationView, getExternalNotificationsForSelectedSubTab, getNotificationsForSelectedSubTab, };
|
|
647
647
|
export { clearFeatureNotificationView, fetchRegisteredInterests, notifyMeForFeature, getFeatureNotificationView, getRegisteredInterests, getRegisteredInterestsByFeature, isFeatureInterestRegistered, };
|
|
648
648
|
export { pushToastNotification, getLastNotificationTime, getNotifications, };
|
|
649
|
-
export { getEffectiveNotificationPreferences, getNotificationLocalOverrides, getNotificationPreferencesSaveState, getNotificationRegistry, hasUnsavedNotificationPreferences, clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides,
|
|
649
|
+
export { getEffectiveNotificationPreferences, getNotificationLocalOverrides, getNotificationPreferencesSaveState, getNotificationRegistry, hasUnsavedNotificationPreferences, clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, setGroupFrequency, toggleEventChannel, toNotificationChannel, toNotificationFrequency, };
|
|
650
650
|
export { getReferralListView, getInviteFormView, toReferralListViewSortKeyType, StatusTypes, AmountStatusTypes, DEFAULT_REFERRER_AMOUNT, fetchReferrals, sendReferralInvite, clearReferrals, saveReferralFormDataInLocalStore, updateReferralListSortUiState, resendReferralInvite, fetchRewardsPlan, getRewardsPlanCard, updateReferViewed, };
|
|
651
651
|
export { ALL_WEEK_DAYS, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toDayOfWeek, toRecurringFrequency, };
|
|
652
652
|
export { fetchCockpitContext, fetchCompanyTaskManagerView, fetchTaskManagerMetrics, getCompanyTaskManagerView, createTaskFromTaskGroupTemplate, };
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { EMPTY, of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, finalize, mergeMap, switchMap, takeUntil, withLatestFrom, } from 'rxjs/operators';
|
|
1
|
+
import { EMPTY, concat, of } from 'rxjs';
|
|
2
|
+
import { catchError, debounceTime, filter, finalize, mergeMap, switchMap, takeUntil, withLatestFrom, } from 'rxjs/operators';
|
|
3
3
|
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
4
4
|
import { createZeniAPIStatus, isSuccessResponse, } from '../../../responsePayload';
|
|
5
5
|
import { notificationPreferencesUrl } from '../notificationPreferencesEndpoint';
|
|
6
6
|
import { mapPreferencesToPayload, } from '../notificationPreferencesViewPayload';
|
|
7
|
-
import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess, } from '../notificationPreferencesViewReducer';
|
|
7
|
+
import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess, setGroupFrequency, toggleEventChannel, } from '../notificationPreferencesViewReducer';
|
|
8
8
|
import { getNotificationLocalOverrides } from '../notificationPreferencesViewSelector';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//
|
|
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
|
|
12
17
|
// client — the network call is NOT cancelled — but its response is
|
|
13
18
|
// ignored, so stale success/failure actions cannot clobber the newer
|
|
14
19
|
// batch's state. Server-side ordering is arrival-order LWW.
|
|
@@ -43,7 +48,7 @@ switchMap(([, state]) => {
|
|
|
43
48
|
const isCancelledSince = () => cancelEpochAtDispatch <
|
|
44
49
|
state$.value.notificationPreferencesViewState.cancelEpoch;
|
|
45
50
|
// Abort the in-flight HTTP request when `switchMap` disposes this
|
|
46
|
-
// observable (
|
|
51
|
+
// observable (new debounced batch fires, tenant switch, unmount).
|
|
47
52
|
// Without an AbortSignal, `switchMap` would drop the response
|
|
48
53
|
// client-side but the older PUT would still land on the server —
|
|
49
54
|
// under patch-semantic LWW, a slower older PUT arriving after a
|
|
@@ -69,7 +74,7 @@ switchMap(([, state]) => {
|
|
|
69
74
|
];
|
|
70
75
|
if (!isCancelledSince()) {
|
|
71
76
|
// Surface a user-visible error — without it the UI reverts to
|
|
72
|
-
// server truth after
|
|
77
|
+
// server truth after debounce and the failed toggle looks like
|
|
73
78
|
// a mystery UI bug.
|
|
74
79
|
actions.push(errorSnackbar);
|
|
75
80
|
}
|
|
@@ -105,9 +110,7 @@ switchMap(([, state]) => {
|
|
|
105
110
|
// under patch-semantic LWW. Cursor Bugbot 3637969823 + 3641372002.
|
|
106
111
|
takeUntil(actions$.pipe(filter((action) => clearNotificationPreferencesLocalOverrides.match(action) ||
|
|
107
112
|
clearAllNotificationPreferencesView.match(action)))));
|
|
108
|
-
//
|
|
109
|
-
//
|
|
110
|
-
|
|
111
|
-
// loop the epic on itself.
|
|
112
|
-
return request$;
|
|
113
|
+
// Flip savePreferencesState to In-Progress BEFORE the network call so
|
|
114
|
+
// any "saving…" UI can render.
|
|
115
|
+
return concat(of(saveNotificationPreferences()), request$);
|
|
113
116
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toNotificationChannel, toNotificationFrequency, } from '../../entity/notificationRegistry/notificationRegistryState';
|
|
2
|
-
const
|
|
2
|
+
const mapEventEnabledByChannel = (raw) => {
|
|
3
3
|
if (raw == null) {
|
|
4
4
|
return {};
|
|
5
5
|
}
|
|
@@ -20,8 +20,7 @@ export const mapPayloadToPreferences = (payload) => {
|
|
|
20
20
|
toNotificationFrequency(frequency),
|
|
21
21
|
]));
|
|
22
22
|
return {
|
|
23
|
-
eventEnabledByChannel:
|
|
24
|
-
groupChannelEnabledByGroupId: mapChannelEnabledMap(payload?.group_channel_enabled_by_group_id),
|
|
23
|
+
eventEnabledByChannel: mapEventEnabledByChannel(payload?.event_enabled_by_channel),
|
|
25
24
|
groupFrequencyByGroupId,
|
|
26
25
|
};
|
|
27
26
|
};
|
|
@@ -30,10 +29,6 @@ export const mapPreferencesToPayload = (preferences) => {
|
|
|
30
29
|
if (Object.keys(preferences.eventEnabledByChannel).length > 0) {
|
|
31
30
|
payload.event_enabled_by_channel = preferences.eventEnabledByChannel;
|
|
32
31
|
}
|
|
33
|
-
if (Object.keys(preferences.groupChannelEnabledByGroupId).length > 0) {
|
|
34
|
-
payload.group_channel_enabled_by_group_id =
|
|
35
|
-
preferences.groupChannelEnabledByGroupId;
|
|
36
|
-
}
|
|
37
32
|
if (Object.keys(preferences.groupFrequencyByGroupId).length > 0) {
|
|
38
33
|
payload.group_frequency_by_group_id = preferences.groupFrequencyByGroupId;
|
|
39
34
|
}
|
|
@@ -18,18 +18,8 @@ const mergePreferences = (base, patch) => {
|
|
|
18
18
|
...channels,
|
|
19
19
|
};
|
|
20
20
|
});
|
|
21
|
-
const groupChannelEnabledByGroupId = {
|
|
22
|
-
...base.groupChannelEnabledByGroupId,
|
|
23
|
-
};
|
|
24
|
-
Object.entries(patch.groupChannelEnabledByGroupId).forEach(([groupId, channels]) => {
|
|
25
|
-
groupChannelEnabledByGroupId[groupId] = {
|
|
26
|
-
...(base.groupChannelEnabledByGroupId[groupId] ?? {}),
|
|
27
|
-
...channels,
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
21
|
return {
|
|
31
22
|
eventEnabledByChannel,
|
|
32
|
-
groupChannelEnabledByGroupId,
|
|
33
23
|
groupFrequencyByGroupId: {
|
|
34
24
|
...base.groupFrequencyByGroupId,
|
|
35
25
|
...patch.groupFrequencyByGroupId,
|
|
@@ -40,16 +30,16 @@ const mergePreferences = (base, patch) => {
|
|
|
40
30
|
// to the server from `localOverrides` — AND whose current value still equals
|
|
41
31
|
// what was saved. Any new edits the user added while the PUT was in flight
|
|
42
32
|
// (either new keys not present in `saved`, OR same keys the user flipped back
|
|
43
|
-
// to a different value) are preserved so the next
|
|
33
|
+
// to a different value) are preserved so the next debounce cycle picks them up.
|
|
44
34
|
//
|
|
45
35
|
// Presence-only subtraction (the prior implementation) silently dropped a
|
|
46
|
-
// same-key re-edit that landed AFTER
|
|
36
|
+
// same-key re-edit that landed AFTER debounce fired but BEFORE the response
|
|
47
37
|
// returned. Concrete case:
|
|
48
38
|
// 1. toggle evt1.email = false → localOverrides = {evt1:{email:false}}
|
|
49
|
-
// 2.
|
|
39
|
+
// 2. debounce PUT #1 fires with savedOverrides = {evt1:{email:false}}
|
|
50
40
|
// 3. user re-toggles evt1.email = true → localOverrides = {evt1:{email:true}}
|
|
51
41
|
// 4. PUT #1 success → subtract dropped `email` on presence, so the true
|
|
52
|
-
// re-edit disappeared and
|
|
42
|
+
// re-edit disappeared and next-debounce found nothing to send.
|
|
53
43
|
const subtractSavedOverrides = (current, saved) => {
|
|
54
44
|
const eventEnabledByChannel = {};
|
|
55
45
|
Object.entries(current.eventEnabledByChannel).forEach(([eventId, channels]) => {
|
|
@@ -71,38 +61,13 @@ const subtractSavedOverrides = (current, saved) => {
|
|
|
71
61
|
eventEnabledByChannel[eventId] = remainingChannels;
|
|
72
62
|
}
|
|
73
63
|
});
|
|
74
|
-
// Same value-equality subtraction as eventEnabledByChannel above — a
|
|
75
|
-
// group-channel master the user re-flipped while a PUT was in flight must
|
|
76
|
-
// survive so the next Save re-sends it.
|
|
77
|
-
const groupChannelEnabledByGroupId = {};
|
|
78
|
-
Object.entries(current.groupChannelEnabledByGroupId).forEach(([groupId, channels]) => {
|
|
79
|
-
const savedChannels = saved.groupChannelEnabledByGroupId[groupId];
|
|
80
|
-
if (savedChannels == null) {
|
|
81
|
-
groupChannelEnabledByGroupId[groupId] = channels;
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
const remainingChannels = {};
|
|
85
|
-
Object.keys(channels).forEach((channel) => {
|
|
86
|
-
if (!(channel in savedChannels) ||
|
|
87
|
-
channels[channel] !== savedChannels[channel]) {
|
|
88
|
-
remainingChannels[channel] = channels[channel];
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
if (Object.keys(remainingChannels).length > 0) {
|
|
92
|
-
groupChannelEnabledByGroupId[groupId] = remainingChannels;
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
64
|
const groupFrequencyByGroupId = {};
|
|
96
65
|
Object.entries(current.groupFrequencyByGroupId).forEach(([groupId, frequency]) => {
|
|
97
66
|
if (saved.groupFrequencyByGroupId[groupId] !== frequency) {
|
|
98
67
|
groupFrequencyByGroupId[groupId] = frequency;
|
|
99
68
|
}
|
|
100
69
|
});
|
|
101
|
-
return {
|
|
102
|
-
eventEnabledByChannel,
|
|
103
|
-
groupChannelEnabledByGroupId,
|
|
104
|
-
groupFrequencyByGroupId,
|
|
105
|
-
};
|
|
70
|
+
return { eventEnabledByChannel, groupFrequencyByGroupId };
|
|
106
71
|
};
|
|
107
72
|
const notificationPreferencesView = createSlice({
|
|
108
73
|
name: 'notificationPreferencesView',
|
|
@@ -158,8 +123,8 @@ const notificationPreferencesView = createSlice({
|
|
|
158
123
|
// snapshot of the server-known preferences (empty maps included), so
|
|
159
124
|
// REPLACE `preferences` rather than merging — merging would leak keys
|
|
160
125
|
// the server has since removed. DO NOT touch `localOverrides`: a refetch
|
|
161
|
-
// that fires while the user has
|
|
162
|
-
// them; the save-success path is the only clearer.
|
|
126
|
+
// that fires while the user has in-flight edits (pre-debounce) must not
|
|
127
|
+
// silently drop them; the save-success path is the only clearer.
|
|
163
128
|
// A `null`/`undefined` payload isn't a snapshot at all (e.g. the
|
|
164
129
|
// envelope key was omitted); no-op instead of wiping preferences.
|
|
165
130
|
if (action.payload.preferences == null) {
|
|
@@ -212,8 +177,8 @@ const notificationPreferencesView = createSlice({
|
|
|
212
177
|
// In-flight-edit invariant: `savedOverrides` is the exact snapshot the
|
|
213
178
|
// epic PUT to the server. Subtracting those keys from `localOverrides`
|
|
214
179
|
// (instead of clearing it wholesale) preserves any edits the user
|
|
215
|
-
// added AFTER the
|
|
216
|
-
// next
|
|
180
|
+
// added AFTER the debounce fired but BEFORE the response landed. The
|
|
181
|
+
// next debounce cycle will pick them up. Clearing wholesale drops
|
|
217
182
|
// in-flight edits from both UI (once server echo lands) and server.
|
|
218
183
|
// Cancel/in-flight-save race: `cancelEpoch` monotonically increases
|
|
219
184
|
// on every Cancel. If the save captured a lower epoch at dispatch,
|
|
@@ -239,16 +204,6 @@ const notificationPreferencesView = createSlice({
|
|
|
239
204
|
draft.preferences = mergePreferences(draft.preferences, patch);
|
|
240
205
|
draft.localOverrides = subtractSavedOverrides(draft.localOverrides, action.payload.savedOverrides);
|
|
241
206
|
},
|
|
242
|
-
setGroupChannelMaster(draft, action) {
|
|
243
|
-
// Mirror of `toggleEventChannel` but scoped to the group-channel master
|
|
244
|
-
// held under `groupChannelEnabledByGroupId[groupId][channel]`.
|
|
245
|
-
const { channel, enabled, groupId } = action.payload;
|
|
246
|
-
const groupMap = {
|
|
247
|
-
...(draft.localOverrides.groupChannelEnabledByGroupId[groupId] ?? {}),
|
|
248
|
-
};
|
|
249
|
-
groupMap[channel] = enabled;
|
|
250
|
-
draft.localOverrides.groupChannelEnabledByGroupId[groupId] = groupMap;
|
|
251
|
-
},
|
|
252
207
|
setGroupFrequency(draft, action) {
|
|
253
208
|
draft.localOverrides.groupFrequencyByGroupId[action.payload.groupId] =
|
|
254
209
|
action.payload.frequency;
|
|
@@ -263,5 +218,5 @@ const notificationPreferencesView = createSlice({
|
|
|
263
218
|
},
|
|
264
219
|
},
|
|
265
220
|
});
|
|
266
|
-
export const { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, fetchNotificationPreferencesSuccess, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess,
|
|
221
|
+
export const { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, fetchNotificationPreferencesSuccess, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess, setGroupFrequency, toggleEventChannel, } = notificationPreferencesView.actions;
|
|
267
222
|
export default notificationPreferencesView.reducer;
|
|
@@ -1,35 +1,25 @@
|
|
|
1
|
-
import { createSelector } from '@reduxjs/toolkit';
|
|
2
1
|
const getView = (state) => state.notificationPreferencesViewState;
|
|
3
2
|
export const getNotificationPreferencesSaveState = (state) => getView(state).savePreferencesState;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export const getEffectiveNotificationPreferences = createSelector((state) => getView(state).preferences, (state) => getView(state).localOverrides, (preferences, localOverrides) => {
|
|
9
|
-
const mergedEventEnabledByChannel = { ...preferences.eventEnabledByChannel };
|
|
10
|
-
Object.entries(localOverrides.eventEnabledByChannel).forEach(([eventId, channels]) => {
|
|
3
|
+
export const getEffectiveNotificationPreferences = (state) => {
|
|
4
|
+
const view = getView(state);
|
|
5
|
+
const mergedEventEnabledByChannel = { ...view.preferences.eventEnabledByChannel };
|
|
6
|
+
Object.entries(view.localOverrides.eventEnabledByChannel).forEach(([eventId, channels]) => {
|
|
11
7
|
mergedEventEnabledByChannel[eventId] = {
|
|
12
|
-
...(preferences.eventEnabledByChannel[eventId] ?? {}),
|
|
13
|
-
...channels,
|
|
14
|
-
};
|
|
15
|
-
});
|
|
16
|
-
const mergedGroupChannelEnabledByGroupId = { ...preferences.groupChannelEnabledByGroupId };
|
|
17
|
-
Object.entries(localOverrides.groupChannelEnabledByGroupId).forEach(([groupId, channels]) => {
|
|
18
|
-
mergedGroupChannelEnabledByGroupId[groupId] = {
|
|
19
|
-
...(preferences.groupChannelEnabledByGroupId[groupId] ?? {}),
|
|
8
|
+
...(view.preferences.eventEnabledByChannel[eventId] ?? {}),
|
|
20
9
|
...channels,
|
|
21
10
|
};
|
|
22
11
|
});
|
|
23
12
|
return {
|
|
24
13
|
eventEnabledByChannel: mergedEventEnabledByChannel,
|
|
25
|
-
groupChannelEnabledByGroupId: mergedGroupChannelEnabledByGroupId,
|
|
26
14
|
groupFrequencyByGroupId: {
|
|
27
|
-
...preferences.groupFrequencyByGroupId,
|
|
28
|
-
...localOverrides.groupFrequencyByGroupId,
|
|
15
|
+
...view.preferences.groupFrequencyByGroupId,
|
|
16
|
+
...view.localOverrides.groupFrequencyByGroupId,
|
|
29
17
|
},
|
|
30
18
|
};
|
|
31
|
-
}
|
|
19
|
+
};
|
|
32
20
|
export const getNotificationLocalOverrides = (state) => getView(state).localOverrides;
|
|
33
|
-
export const hasUnsavedNotificationPreferences =
|
|
34
|
-
|
|
35
|
-
Object.keys(
|
|
21
|
+
export const hasUnsavedNotificationPreferences = (state) => {
|
|
22
|
+
const overrides = getView(state).localOverrides;
|
|
23
|
+
return (Object.keys(overrides.eventEnabledByChannel).length > 0 ||
|
|
24
|
+
Object.keys(overrides.groupFrequencyByGroupId).length > 0);
|
|
25
|
+
};
|
package/lib/index.d.ts
CHANGED
|
@@ -337,7 +337,7 @@ import { fetchNetBurnOrIncomeStoryCard, updateNetBurnOrIncomeStoryCardSettings }
|
|
|
337
337
|
import { getNetBurnOrIncomeStoryCardReport } from './view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardSelector';
|
|
338
338
|
import { AccountingMethod, NetBurnOrIncomeStoryCardReport } from './view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardSelectorTypes';
|
|
339
339
|
import { AverageMonthsCount, NetBurnOrIncomeRunway, NetBurnOrIncomeStoryCardState, TimeSpanIdForAverage } from './view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardState';
|
|
340
|
-
import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides,
|
|
340
|
+
import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, setGroupFrequency, toggleEventChannel } from './view/notificationPreferencesView/notificationPreferencesViewReducer';
|
|
341
341
|
import { getEffectiveNotificationPreferences, getNotificationLocalOverrides, getNotificationPreferencesSaveState, hasUnsavedNotificationPreferences } from './view/notificationPreferencesView/notificationPreferencesViewSelector';
|
|
342
342
|
import { NotificationPreferences } from './view/notificationPreferencesView/notificationPreferencesViewState';
|
|
343
343
|
import { fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, fetchNotificationView, updateNotificationViewAllNotificationsStatus, updateNotificationViewCurrentTabAndSubTab, updateNotificationViewNotificationStatus, updateNotificationViewSubTab, updateNotificationViewTabState, updateNotificationViewUIState } from './view/notificationView/notificationViewReducer';
|
|
@@ -908,7 +908,7 @@ export { ExternalNotificationData, NotificationGroup, NotificationActivityType,
|
|
|
908
908
|
export { NotificationView, NotificationViewUIState, NotificationTabState, NotificationTabType, NotificationSubTabType, toNotificationSubTabTypeStrict, toNotificationTabTypeStrict, fetchNotificationView, fetchNotificationUnreadCount, fetchNotificationUnreadCountSuccess, updateNotificationViewAllNotificationsStatus, updateNotificationViewNotificationStatus, updateNotificationViewTabState, updateNotificationViewCurrentTabAndSubTab, updateNotificationViewSubTab, updateNotificationViewUIState, getNotificationView, getExternalNotificationsForSelectedSubTab, getNotificationsForSelectedSubTab, };
|
|
909
909
|
export { clearFeatureNotificationView, fetchRegisteredInterests, notifyMeForFeature, getFeatureNotificationView, getRegisteredInterests, getRegisteredInterestsByFeature, isFeatureInterestRegistered, FeatureInterest, FeatureNotificationViewState, };
|
|
910
910
|
export { pushToastNotification, ToastNotification, ToastNotificationPayload, getLastNotificationTime, getNotifications, };
|
|
911
|
-
export { getEffectiveNotificationPreferences, getNotificationLocalOverrides, getNotificationPreferencesSaveState, getNotificationRegistry, hasUnsavedNotificationPreferences, NotificationChannel, NotificationFrequency, NotificationPreferences, NotificationRegistry, RegistryNotificationEvent, RegistryNotificationGroup, clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides,
|
|
911
|
+
export { getEffectiveNotificationPreferences, getNotificationLocalOverrides, getNotificationPreferencesSaveState, getNotificationRegistry, hasUnsavedNotificationPreferences, NotificationChannel, NotificationFrequency, NotificationPreferences, NotificationRegistry, RegistryNotificationEvent, RegistryNotificationGroup, clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, setGroupFrequency, toggleEventChannel, toNotificationChannel, toNotificationFrequency, };
|
|
912
912
|
export { getReferralListView, getInviteFormView, ReferralListSelectorView, ReferralViewState, InviteCompanyLocalData, ReferralInvitation, ReferralListViewSortKey, ReferralViewUIState, toReferralListViewSortKeyType, ReferralStatus, ReferralAmountStatus, StatusTypes, AmountStatusTypes, DEFAULT_REFERRER_AMOUNT, fetchReferrals, sendReferralInvite, clearReferrals, saveReferralFormDataInLocalStore, updateReferralListSortUiState, resendReferralInvite, fetchRewardsPlan, RewardsPlanCardReport, getRewardsPlanCard, updateReferViewed, RewardsPlanData, };
|
|
913
913
|
export { ALL_WEEK_DAYS, DayOfWeek, RecurringDatePickerOptions, RecurringFrequencyType, SEMI_WEEKLY_REQUIRED_DAYS_COUNT, getMinAllowedEndDate, getRecurringEndDateFromCount, toDayOfWeek, toRecurringFrequency, };
|
|
914
914
|
export { fetchCockpitContext, fetchCompanyTaskManagerView, fetchTaskManagerMetrics, CompanyTaskManagerSelectorView, CompanyTaskManagerViewUIState, TaskManagerMetrics, getCompanyTaskManagerView, TaskWithCompanyDetail, createTaskFromTaskGroupTemplate, TaskGroupTemplate, };
|
package/lib/index.js
CHANGED
|
@@ -70,20 +70,20 @@ exports.toScheduleTypesTypeStrict = exports.toScheduleTypesType = exports.getFet
|
|
|
70
70
|
exports.fetchGlobalMerchantRecommendation = exports.getVendorDetailSelectorView = exports.saveVendorDetailsView = exports.updateReviewVendorDetailLocalData = exports.clearGlobalMerchantAutoCompleteResults = exports.fetchGlobalMerchantAutoCompleteView = exports.updateVendorFirstReviewSortUiState = exports.updateVendorFirstReviewViewLocalData = exports.saveVendorFirstReviewView = exports.clearRecentlySavedErroredVendorData = exports.updateVendorFirstReviewViewPageToken = exports.resetVendorFirstReviewLocalData = exports.updateVendorFirstReviewViewScrollYOffset = exports.fetchVendorFirstReviewAttachments = exports.fetchVendorFirstReviewView = exports.getVendorFirstReviewAttachmentView = exports.getVendorFirstReviewView = exports.getGlobalMerchantAutoCompleteResults = exports.toVendorFirstReviewViewColumnKeyType = exports.getVendorTabView = exports.updateVendorTabViewTab = exports.fetchVendorTabView = exports.resetMarkAsCompleteStatus = exports.markAsCompleteScheduleDetail = exports.getDefaultSelectedTimeframeForScheduleType = exports.getFetchStateForScheduleListByType = exports.updatedJELinkWithRecommendedLocalData = exports.resetJELinkInLocalData = exports.updateAmountsInScheduleDetail = exports.updatedJELinkInLocalData = exports.getThirdPartyIDFromQBOURL = exports.getQBOUrlForLink = exports.updatedSelectedJELinkRowIndex = exports.updateAccruedJEScheduleAccruedByListKey = exports.updateScheduleListDownloadState = exports.updateScheduleDetailsLocalData = exports.createNewSchedules = exports.deleteScheduleDetail = exports.saveScheduleDetails = exports.fetchScheduleDetailsPage = exports.getAccruedScheduleDetailsView = exports.getScheduleDetailsView = exports.fetchScheduleDetails = exports.updateSelectedJEScheduleKey = exports.updateScheduleListSortState = exports.updateScheduleListScrollState = exports.updateScheduleListSearchText = exports.updateScheduleListSubTab = exports.toScheduleSubTabType = exports.toScheduleListTabsFileTypeStrict = void 0;
|
|
71
71
|
exports.deleteTaskGroup = exports.initiateTaskListLocalData = exports.createNewTaskGroup = exports.bulkUpdateTaskList = exports.discardTaskUpdatesInLocalStore = exports.deleteTask = exports.TASK_LIST_GROUP_BY_CATEGORIES = exports.TASK_LIST_FILTER_CATEGORIES = exports.updateTaskFilters = exports.allTaskPriority = exports.allTaskStatus = exports.updateTaskListUIState = exports.updateTaskListSearchText = exports.getCannedResponsesView = exports.deleteCannedResponse = exports.saveCannedResponse = exports.fetchCannedResponses = exports.archiveTask = exports.fetchSubTasks = exports.resetSubTaskCreateStatus = exports.createSubTask = exports.saveTaskDetail = exports.saveTaskUpdatesToLocalStore = exports.fetchTaskDetailPage = exports.getTaskDetail = exports.fetchTaskListPage = exports.getAllTasks = exports.getTaskGroupById = exports.toRecurringBillFrequencyStrict = exports.toRecurringBillFrequency = exports.updateArAgingNodeCollapseState = exports.getArAgingDetailForCustomer = exports.getArAgingReport = exports.updateArAgingDetailUIState = exports.fetchArAgingDetail = exports.updateArAgingUIState = exports.fetchArAging = exports.updateVendorGlobalReviewViewLocalData = exports.toVendorGlobalReviewColumnSortKeyType = exports.getTenantMerchantByMerchantId = exports.getVendorGlobalReviewView = exports.updateVendorGlobalReviewViewUIState = exports.updateSelectedGlobalMerchant = exports.fetchVendorGlobalReviewView = exports.rejectVendorGlobalReview = exports.approveVendorGlobalReview = exports.getGlobalMerchantView = exports.clearGlobalMerchantView = exports.updateCreateGlobalMerchantLocalData = exports.createGlobalMerchant = void 0;
|
|
72
72
|
exports.getZeniOAuthApproveRedirectUrl = exports.getZeniOAuthApproveFetchState = exports.getZeniOAuthApproveError = exports.clearZeniOAuthView = exports.approveOAuthConsentSuccess = exports.approveOAuthConsentFailure = exports.approveOAuthConsent = exports.fetchZeniAccountsPromoCard = exports.getZeniAccountsPromoCard = exports.getAuthenticationView = exports.fetchCollaborationAuthToken = exports.clearAuditReportGroupViewByCompanyId = exports.saveReasonForAuditRule = exports.fetchAuditReportGroupView = exports.fetchAuditRuleGroupView = exports.getUserFromAllUsers = exports.getAuditRuleGroupViewSelectorView = exports.getAuditReportGroupViewSelectorView = exports.clearCardPaymentView = exports.resetCardPaymentErrorStatuses = exports.fetchPaymentSources = exports.addCardPaymentSource = exports.confirmCardSetupIntent = exports.createCardSetupIntent = exports.getAllCardsAndBankPaymentMethods = exports.deleteTag = exports.createTag = exports.fetchTagList = exports.getAllTags = exports.ALL_TASK_LIST_TABS = exports.initialTaskDetailLocalData = exports.convertHHMMStrToMinutes = exports.unsnoozeTask = exports.snoozeTask = exports.removeTaskFromList = exports.updateTaskListTab = exports.updateTaskFromListView = exports.toDueDateGroupKeyType = exports.toTaskStatusCodeType = exports.toPriorityCodeType = exports.getDueDateValueFromDueDateGroupId = exports.initialTaskDetail = exports.fetchAllTaskGroups = exports.sortSubtasks = exports.getTaskUpdates = exports.toTaskListGroupByKeyTypeStrict = exports.toTaskListGroupByKeyType = exports.updateTaskGroupName = exports.dragNDropTasks = exports.updateTaskListLocalData = void 0;
|
|
73
|
-
exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.DEFAULT_REFERRER_AMOUNT = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.toNotificationFrequency = exports.toNotificationChannel = exports.toggleEventChannel = exports.setGroupFrequency = exports.
|
|
74
|
-
exports.getAiAccountantCustomers = exports.updateAiAccountantJobs = exports.updateAiAccountantCustomer = exports.updateAiAccountantCustomers = exports.clearAllAiAccountantCustomers = exports.toAiAccountantJob = exports.toAiAccountantEnrollment = exports.toAiAccountantCustomer = exports.toAiAccountantOperationType = exports.toAiAccountantJobStatus = exports.toAiAccountantEnrollmentStatus = exports.getAllowedOperationsForStatus = exports.getTreasuryFundsMaximumYield = exports.getTreasurySetupViewDetails = exports.updateTreasuryVideoViewed = exports.updateTreasuryPromoRemindMeLaterClicked = exports.updateTreasuryPromoIntroClosedByOutsideClick = exports.updateFundAllocationLocalData = exports.fetchPortfolioAllocation = exports.updatePortfolioAllocation = exports.fetchTreasuryFunds = exports.clearTreasurySetupView = exports.fetchTreasurySetupView = exports.acceptTreasuryTerms = exports.getExpressPayView = exports.resetExpressPayLocalData = exports.submitExpressPay = exports.updateExpressPayFormLocalData = exports.fetchExpressPayInitialDetails = exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.createTaskFromTaskGroupTemplate = exports.getCompanyTaskManagerView = exports.fetchTaskManagerMetrics = exports.fetchCompanyTaskManagerView = exports.fetchCockpitContext = exports.toRecurringFrequency = exports.toDayOfWeek = exports.getRecurringEndDateFromCount = exports.getMinAllowedEndDate = exports.SEMI_WEEKLY_REQUIRED_DAYS_COUNT = exports.ALL_WEEK_DAYS = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite =
|
|
75
|
-
exports.appendSyntheticAiCfoAnswer = exports.toAiCfoVisualization = exports.clearAiCfo = exports.clearSession = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = exports.updateAiCfoAnswerCardPolicyWizardPlan = exports.setSessions = exports.setNewSession = exports.getSkills = exports.getSuggestedQuestionsForPageContext = exports.getAiCfoView = exports.clearAiCfoSidePanelHostPageContext = exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSkillsFailure = exports.fetchSkillsSuccess = exports.fetchSkills = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions = exports.updateResponseState = exports.submitFeedback = exports.deleteChatSession = exports.acceptMasterTOS = exports.fetchChatHistory = exports.stopSubmitQuestion = exports.stopSubmit = exports.createSessionAndSubmit = exports.clearLastContextMessage = exports.clearDeleteChatSessionStatus = exports.clearCurrentSessionId = exports.clearAiCfoView = exports.setSession = exports.clearInput = exports.updateCotCollapsedState = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.submitQuestion = exports.createSession = exports.fetchChatSessionsForUser = exports.getAiAccountantCockpitView = exports.updateAiAccountantUIState = exports.triggerAiAccountantJob = exports.setSelectedTenantIdsForJobTrigger = exports.fetchAiAccountantJobs = exports.fetchAiAccountantCustomers = exports.clearAiAccountantView =
|
|
76
|
-
exports.getCardPolicyStats = exports.getCardPolicyMccCategoriesFetchState = exports.getCardPolicyMccCategoriesError = exports.getCardPolicyMccCategories = exports.getAllCardPolicyTemplates = exports.clearCardPolicy = exports.updatePolicyRecommendationFromUploadSuccess = exports.updatePolicyRecommendationFromUploadFailure = exports.updatePolicyDocumentExtractionSuccess = exports.updatePolicyDocumentExtractionFailure = exports.updateCreatedCardPolicyTemplate = exports.updateCardPolicyVendorOptionsFailure = exports.updateCardPolicyVendorOptions = exports.updateCardPolicyTemplates = exports.updateCardPolicyStats = exports.updateCardPolicyMccCategoriesFailure = exports.updateCardPolicyMccCategories = exports.removeCardPolicyTemplate = exports.fetchCardPolicyVendorOptions = exports.fetchCardPolicyRecommendationFromUpload = exports.fetchCardPolicyMccCategories = exports.extractPolicyDocument = exports.clearPolicyDocumentExtraction = exports.toMessageType = exports.toMessageSender = exports.ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS = exports.toInteractiveFormTypeStrict = exports.toInteractiveFormType = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerStateType = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_INTERACTIVE_FORM_TYPES = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = exports.getSyntheticAiCfoAnswerByQuestionAnswerId = exports.getSyntheticAiCfoAnswersForChatSession = exports.getAiCfoSelectorView = exports.getAllQuestionsForChatSession = exports.getQuestionAnswerByIdForChatSession = exports.getAllQuestionAnswersForChatSession = exports.clearSyntheticAiCfoAnswers =
|
|
77
|
-
exports.getManualCardPolicyFormDraft = exports.getLastCreatedCardPolicyTemplateIds = exports.getLastCreatedCardPolicyTemplateId = exports.getLastCreateCardPolicyTemplateErrors = exports.getLastCreateCardPolicySourceChatSessionId = exports.getCreateCardPolicyTemplateRequestState = exports.getAiCardPolicyFormDraft = exports.updateManualCardPolicyFormDraft = exports.updateCreateCardPolicyTemplateRequestState = exports.updateAiCardPolicyFormDraftFromUploadPlan = exports.updateAiCardPolicyFormDraft = exports.seedManualCardPolicyFormDraft = exports.seedAiCardPolicyFormDraft = exports.createCardPolicyTemplates = exports.clearManualCardPolicyFormDraft = exports.clearCreateCardPolicy = exports.clearAiCardPolicyFormDraft = exports.applyExtractedPolicyToManualCardPolicyDraft = exports.applyExtractedPolicyToAiCardPolicyDraft = exports.toUpdateCardPolicyTemplateRequestBody = exports.toExtractedCardPolicyRules = exports.toCreateCardPolicyTemplatesRequestBody = exports.toCreateCardPolicyTemplateRequestBody = exports.toCardPolicyVendorSearchOption = exports.toCardPolicyTemplateList = exports.toCardPolicyTemplate = exports.toCardPolicyStats = exports.toCardPolicyEditFormDraft = exports.toBulkCreateCardPolicyTemplateError = exports.toCardPolicyTemplateStatus = exports.toCardPolicyTemplateMode = exports.ALL_CARD_POLICY_TEMPLATE_STATUSES = exports.ALL_CARD_POLICY_TEMPLATE_MODES = exports.getUploadedPolicyDocumentFileName = exports.getPolicyRecommendationFromUploadFetchState = exports.getPolicyRecommendationFromUploadError = exports.getPolicyRecommendationFromUploadChatSessionId = exports.getPolicyRecommendationFromUploadAnswerId = exports.getPolicyDocumentExtractionFetchState = exports.getPolicyDocumentExtractionError = exports.getExtractedCardPolicyRules = exports.getCardPolicyVendorSearchString = exports.getCardPolicyVendorSearchOptions = exports.getCardPolicyVendorSearchFetchState = exports.getCardPolicyTemplatesByIds = exports.getCardPolicyTemplateById = exports.getCardPolicySuggestedBlockMerchants = exports.getCardPolicySuggestedBlockCategories =
|
|
78
|
-
exports.getTreasuryTaxLetters = exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.getUpdateCardPolicyFetchState = exports.getCardPolicyFormDraft = exports.getCardPolicyDetailView = exports.getCardPolicyDetailFetchState = exports.updateCardPolicyFormDraft = exports.updateCardPolicyFetchStatus = exports.updateCardPolicyDetailFetchStatus = exports.updateCardPolicy = exports.fetchCardPolicyDetail = exports.clearCardPolicyDetail = exports.getCardPolicyTemplateIds = exports.getCardPolicyListView = exports.getCardPolicyListFetchState = exports.getArchiveCardPolicyFetchState = exports.updateCardPolicyListFetchStatus = exports.updateArchiveCardPolicyFetchStatus = exports.prependCardPolicyTemplateIds = exports.fetchCardPolicyList = exports.clearCardPolicyList = exports.archiveCardPolicy = exports.toManualCardPolicyTemplateRequestFromDraft = exports.toBulkCardPolicyTemplateRequestsFromDraft = exports.toCardPolicyTemplateRequestFromDraft = exports.applyAiCardPolicyFormDraftUpdate = exports.deriveAiPolicyReviewRowsFromInputs = exports.buildManualCardPolicyFormDraftSeed = exports.buildUploadReviewRows = exports.buildEmptyLimitRows = exports.buildAiCardPolicyFormDraftSeed = exports.toVendorChipFieldValue = exports.toMccCategoryChipFieldValue = exports.buildVendorChipId = exports.buildMccCategoryChipId = exports.VENDOR_CHIP_ID_PREFIX = exports.MCC_CHIP_ID_PREFIX = exports.toMccCategoryLike =
|
|
79
|
-
exports.ALL_INVOICING_INVOICE_TAB_IDS = exports.updateInvoiceListFilters = exports.setInvoiceActiveTab = exports.fetchInvoiceListPage = exports.fetchInvoiceList = exports.fetchInvoiceKPIs = exports.fetchInvoiceCounts = exports.clearInvoiceList = exports.getInvoicesByIds = exports.getInvoiceById = exports.updateInvoices = exports.removeInvoice = exports.clearAllInvoices = exports.mapAuditLogEntry = exports.toAuditLogEntityRouteOption = exports.isInvoicingEntityLinkable = exports.buildInvoicingEntityPath = exports.toInvoicingDiscountLifecycleActionOption = exports.toInvoicingDiscountLifecycleAction = exports.toInvoicingCatalogProductLifecycleActionOption = exports.toInvoicingCatalogItemLifecycleActionOption = exports.toInvoicingCatalogProductLifecycleAction = exports.toInvoicingCatalogItemLifecycleAction = exports.toInvoicingSubscriptionLifecycleActionOption = exports.toInvoicingSubscriptionLifecycleAction = exports.toInvoicingDunningAction = exports.INVOICING_DISCOUNT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_PRODUCT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_ITEM_LIFECYCLE_ACTIONS = exports.INVOICING_SUBSCRIPTION_LIFECYCLE_ACTIONS = exports.INVOICING_DUNNING_ACTIONS = exports.toKycProvidedDocumentTypeFromAllowed = exports.toKycProvidedDocumentType = exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.fetchAutoTransferReviewDetail = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRule = exports.updateAutoTransferRule =
|
|
80
|
-
exports.fetchInvoicingAuditLog = exports.clearInvoicingAuditView = exports.getInvoicingOverview = exports.buildPeriodOptions = exports.fetchInvoicingOverview = exports.clearInvoicingOverview = exports.initialRecordPaymentFormLocalData = exports.INVOICING_PAYMENT_METHOD_VALUES = exports.INVOICING_PAYMENT_GATEWAY_VALUES = exports.localDataToRecordPaymentPayload = exports.localDataToInvoiceRecordPaymentBody = exports.initializeRecordPaymentDraftFromInvoice = exports.getCreateCreditNoteView = exports.getCreateCreditNoteFormView = exports.initialCreateCreditNoteFormLocalData = exports.localDataToCreateCreditNotePayload = exports.updateCreateCreditNoteFormDraft = exports.submitCreateCreditNote = exports.resetCreateCreditNote = exports.createCreditNoteSuccess = exports.createCreditNoteFailure = exports.getIssueCreditNoteView = exports.getIssueCreditNoteFormView = exports.initialIssueCreditNoteFormLocalData = exports.INVOICING_CREDIT_NOTE_REASON_CODES = exports.localDataToIssueCreditNotePayload = exports.initializeIssueCreditNoteDraftFromInvoice = exports.computeIssueCreditNoteTotal = exports.updateIssueCreditNoteFormDraft = exports.submitIssueCreditNote = exports.resetIssueCreditNote = exports.issueCreditNoteSuccess = exports.issueCreditNoteFailure = exports.initializeIssueCreditNoteDraft = exports.updateRecordPaymentFormDraft = exports.submitRecordPayment = exports.initializeRecordPaymentDraft = exports.resetRecordPayment = exports.initialInvoicingCreateInvoiceFormLocalData = exports.createInvoiceFormLocalDataToRequest = exports.blankInvoicingCreateInvoiceLineItem = exports.updateInvoicingCreateInvoiceFormDraft = exports.resetCreateInvoice = exports.fetchCreateInvoiceFormPage = exports.createInvoice = exports.getInvoiceDetail = exports.fetchInvoiceDetail = exports.clearAllInvoiceDetail =
|
|
81
|
-
exports.entityToInvoicingCatalogItemFormLocalData = exports.blankInvoicingCatalogTier = exports.blankInvoicingCatalogSubFamily = exports.INVOICING_CATALOG_TYPE_VALUES = exports.INVOICING_CATALOG_TRIAL_UNIT_VALUES = exports.INVOICING_CATALOG_TRIAL_END_ACTION_VALUES = exports.INVOICING_CATALOG_TIER_TYPE_VALUES = exports.INVOICING_CATALOG_PRORATION_VALUES = exports.INVOICING_CATALOG_PRICING_MODEL_VALUES = exports.INVOICING_CATALOG_PERIOD_UNIT_VALUES = exports.INVOICING_CATALOG_APPLICABILITY_VALUES = exports.productToCreateSubFamilyFormValues = exports.planToCatalogDetailEditValues = exports.createSubFamilyFormToPayload = exports.catalogDetailEditValuesToSavePayload = exports.updateInvoicingCatalogItemFormDraft = exports.submitInvoicingCatalogItemForm = exports.saveInvoicingCatalogItem = exports.resetEditInvoicingCatalogItemDetailView = exports.createInvoicingCatalogSubFamily = exports.archiveInvoicingCatalogSubFamily = exports.getInvoicingSubscriptionFormView = exports.getEditInvoicingSubscriptionDetailViewState = exports.initialInvoicingSubscriptionFormLocalData = exports.entityToInvoicingSubscriptionFormLocalData = exports.INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE = exports.INVOICING_SUBSCRIPTION_BILLING_FREQUENCY_VALUES = exports.updateInvoicingSubscriptionFormDraft = exports.submitInvoicingSubscriptionForm = exports.resetEditInvoicingSubscriptionDetailView = exports.initializeInvoicingSubscriptionAddress = exports.fetchInvoicingSubscriptionFormPage = exports.getInvoicingCustomerFormView = exports.initialInvoicingCustomerFormLocalData = exports.entityToInvoicingCustomerFormLocalData = exports.INVOICING_TAXABILITY_VALUES = exports.INVOICING_NET_TERM_DAY_VALUES = exports.INVOICING_CUSTOMER_TYPE_VALUES = exports.INVOICING_CUSTOMER_BILLING_ADDRESS_TYPE = exports.updateInvoicingCustomerFormDraft = exports.submitInvoicingCustomerFormSuccess = exports.submitInvoicingCustomerFormFailure = exports.submitInvoicingCustomerForm = exports.resetEditInvoicingCustomerDetailView = exports.initializeInvoicingCustomerAddress = exports.getRecordPaymentView = exports.getRecordPaymentInvoiceOptions = exports.getRecordPaymentFormView =
|
|
82
|
-
exports.INVOICING_LIST_PAGE_SIZE = exports.getInvoicingDataImportActionState = exports.uploadInvoicingMigrationFiles = exports.startInvoicingMigration = exports.rollbackInvoicingMigration = exports.retryInvoicingMigration = exports.connectInvoicingChargebee = exports.clearAllInvoicingDataImportActions = exports.getInvoicingDataImportView = exports.setInvoicingActiveMigrationSessionId = exports.fetchInvoicingMigrationSessions = exports.fetchInvoicingMigrationSession = exports.fetchInvoicingMigrationDiagnostics = exports.fetchInvoicingDataImportStatus = exports.clearInvoicingDataImportView = exports.getInvoicingPaymentActionState = exports.runInvoicingPaymentAction = exports.clearInvoicingPaymentAction = exports.getInvoicingDunningActionState = exports.runInvoicingDunningAction = exports.clearInvoicingDunningAction = exports.getInvoicingSubscriptionActionState = exports.runInvoicingSubscriptionAction = exports.clearInvoicingSubscriptionAction = exports.getInvoicingDiscountActionState = exports.runInvoicingDiscountAction = exports.clearInvoicingDiscountAction = exports.getInvoicingCatalogActionState = exports.runInvoicingCatalogProductAction = exports.runInvoicingCatalogPlanAction = exports.clearInvoicingCatalogAction = exports.getInvoicingInvoiceActionState = exports.updateInvoicingInvoice = exports.runInvoicingInvoiceAction = exports.clearInvoicingInvoiceAction = exports.getInvoicingCouponFormView = exports.getEditInvoicingCouponDetailViewState = exports.initialInvoicingCouponFormLocalData = exports.entityToInvoicingCouponFormLocalData = exports.updateInvoicingCouponFormDraft = exports.submitInvoicingCouponForm = exports.saveInvoicingCoupon = exports.resetEditInvoicingCouponDetailView = exports.getSavedInvoicingCatalogItemKind = exports.getSavedInvoicingCatalogItemId = exports.getInvoicingCatalogItemFormView = exports.getInvoicingApplicableCatalogItemOptions = exports.getEditInvoicingCatalogItemDetailViewState =
|
|
83
|
-
exports.getInvoicingSubscriptionById = exports.fetchInvoicingSubscriptionDetail = exports.clearInvoicingSubscriptionDetailView = exports.getInvoicingSubscriptionListView = exports.INVOICING_SUBSCRIPTION_TABS = exports.INVOICING_SUBSCRIPTION_COLUMNS = exports.ALL_INVOICING_SUBSCRIPTION_TAB_IDS = exports.ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = exports.updateInvoicingSubscriptionFilters = exports.setInvoicingSubscriptionActiveTab = exports.fetchInvoicingSubscriptionListPage = exports.fetchInvoicingSubscriptionList = exports.fetchInvoicingSubscriptionCounts = exports.clearInvoicingSubscriptionListView = exports.updateInvoicingSubscriptions = exports.removeInvoicingSubscription = exports.clearAllInvoicingSubscriptions = exports.resetPromotionalCreditAction = exports.submitAddPromotionalCredits = exports.getInvoicingSetupIntentFetchState = exports.getInvoicingSetupIntent = exports.getInvoicingSentPaymentLinkMagicUrl = exports.getInvoicingSentPaymentLinkEmail = exports.getInvoicingPlaidLinkTokenFetchState = exports.getInvoicingPlaidLinkToken = exports.getInvoicingPaymentMethodSaveState = exports.getInvoicingPaymentLinkSendState = exports.sendInvoicingPaymentLink = exports.saveInvoicingPaymentMethod = exports.resetInvoicingCustomerPaymentMethod = exports.fetchInvoicingPlaidLinkToken = exports.createInvoicingSetupIntent = exports.getInvoicingCustomerDetail = exports.fetchInvoicingCustomerDetailPage = exports.fetchInvoicingCustomerDetail = exports.clearInvoicingCustomerDetailView = exports.getInvoicingCustomerListView = exports.INVOICING_CUSTOMER_TABS = exports.INVOICING_CUSTOMER_COLUMNS = exports.ALL_INVOICING_CUSTOMER_TAB_IDS = exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = exports.updateInvoicingCustomerFilters = exports.setInvoicingCustomerActiveTab = exports.fetchInvoicingCustomerListPage = exports.fetchInvoicingCustomerList = exports.fetchInvoicingCustomerCounts = exports.clearInvoicingCustomerListView = exports.updateInvoicingCustomers =
|
|
84
|
-
exports.getInvoicingCouponCounts = exports.INVOICING_COUPON_TABS = exports.INVOICING_COUPON_COLUMNS = exports.ALL_INVOICING_COUPON_TAB_IDS = exports.ALL_INVOICING_COUPON_SORT_KEYS = exports.updateInvoicingCouponFilters = exports.setInvoicingCouponActiveTab = exports.fetchInvoicingCouponListPage = exports.fetchInvoicingCouponList = exports.fetchInvoicingCouponCounts = exports.clearInvoicingCouponView = exports.updateInvoicingCoupons = exports.removeInvoicingCoupon = exports.clearAllInvoicingCoupons = exports.getInvoicingCreditNoteDetail = exports.getInvoicingCreditNoteById = exports.fetchInvoicingCreditNoteDetail = exports.clearInvoicingCreditNoteDetailView = exports.getInvoicingCreditNoteListView = exports.INVOICING_CREDIT_NOTE_TABS = exports.INVOICING_CREDIT_NOTE_COLUMNS = exports.ALL_INVOICING_CREDIT_NOTE_TAB_IDS = exports.ALL_INVOICING_CREDIT_NOTE_SORT_KEYS = exports.updateInvoicingCreditNoteFilters = exports.setInvoicingCreditNoteActiveTab = exports.fetchInvoicingCreditNoteListPage = exports.fetchInvoicingCreditNoteList = exports.fetchInvoicingCreditNoteCounts = exports.clearInvoicingCreditNoteListView = exports.updateInvoicingCreditNotes = exports.removeInvoicingCreditNote = exports.clearAllInvoicingCreditNotes = exports.getInvoicingTransactionDetail = exports.getInvoicingTransactionById = exports.fetchInvoicingTransactionDetail = exports.clearInvoicingTransactionDetailView = exports.getInvoicingTransactionListView = exports.INVOICING_TRANSACTION_TABS = exports.INVOICING_TRANSACTION_COLUMNS = exports.ALL_INVOICING_TRANSACTION_TAB_IDS = exports.ALL_INVOICING_TRANSACTION_SORT_KEYS = exports.updateInvoicingTransactionFilters = exports.setInvoicingTransactionActiveTab = exports.fetchInvoicingTransactionListPage = exports.fetchInvoicingTransactionList = exports.clearInvoicingTransactionListView = exports.updateInvoicingTransactions = exports.removeInvoicingTransaction =
|
|
85
|
-
exports.getInvoicingProductById = exports.getInvoicingPlanById = exports.getInvoicingCatalogItemDetail = exports.fetchInvoicingCatalogItemDetail = exports.clearInvoicingCatalogItemDetailView = exports.getInvoicingCatalogListView = exports.INVOICING_PRODUCT_COLUMNS = exports.ALL_INVOICING_PRODUCT_SORT_KEYS = exports.updateInvoicingCatalogProductFilters = exports.updateInvoicingCatalogPlanFilters = exports.fetchInvoicingCatalogProductList = exports.fetchInvoicingCatalogPlanList = exports.fetchInvoicingCatalogListPage = exports.fetchInvoicingCatalogCounts = exports.clearInvoicingCatalogListView = exports.updateInvoicingProducts = exports.removeInvoicingProduct = exports.clearAllInvoicingProducts = exports.updateInvoicingPlans = exports.removeInvoicingPlan = exports.mergeInvoicingPlanSubFamily = exports.clearAllInvoicingPlans = exports.getInvoicingDunningCaseDetail = exports.getInvoicingDunningCaseById = exports.fetchInvoicingDunningCaseDetail = exports.clearInvoicingDunningCaseDetailView = exports.getInvoicingDunningCaseListView = exports.INVOICING_DUNNING_CASE_TABS = exports.INVOICING_DUNNING_CASE_COLUMNS = exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS = exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = exports.updateInvoicingDunningCaseFilters = exports.setInvoicingDunningCaseActiveTab = exports.fetchInvoicingDunningCaseListPage = exports.fetchInvoicingDunningCaseList = exports.fetchInvoicingDunningCaseCounts = exports.clearInvoicingDunningCaseListView = exports.updateInvoicingDunningCases = exports.removeInvoicingDunningCase = exports.clearAllInvoicingDunningCases = exports.getInvoicingCouponDetail = exports.fetchInvoicingCouponDetail = exports.clearInvoicingCouponDetailView = exports.getInvoicingCouponById = exports.getInvoicingCouponListView = exports.getInvoicingCouponListNextCursor = exports.getInvoicingCouponListItems = exports.getInvoicingCouponListHasMore =
|
|
86
|
-
exports.getInvoicingConfigView = exports.updateInvoicingConfig = exports.resetInvoicingConfigActionStates = exports.fetchInvoicingConfig = exports.enableInvoicing = exports.clearInvoicingConfig = exports.acceptInvoicingTerms = exports.isStripeConnectedFromSettings = exports.initialInvoicingBrandingFormLocalData = exports.entityToInvoicingBrandingFormLocalData = exports.INVOICING_BUSINESS_ADDRESS_TYPE = exports.getInvoicingSettingsView = exports.getInvoicingSettingsFetchState = exports.getInvoicingSettings = exports.getInvoicingBrandingFormView = exports.updateInvoicingSettings = exports.updateInvoicingBrandingFormDraft = exports.submitInvoicingBrandingForm = exports.saveInvoicingSettings = exports.resetSaveInvoicingSettings = exports.resetInvoicingBrandingFormDraft = exports.fetchInvoicingSettings = exports.disconnectInvoicingStripe =
|
|
73
|
+
exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = exports.clearReferrals = exports.sendReferralInvite = exports.fetchReferrals = exports.DEFAULT_REFERRER_AMOUNT = exports.AmountStatusTypes = exports.StatusTypes = exports.toReferralListViewSortKeyType = exports.getInviteFormView = exports.getReferralListView = exports.toNotificationFrequency = exports.toNotificationChannel = exports.toggleEventChannel = exports.setGroupFrequency = exports.clearNotificationPreferencesLocalOverrides = exports.clearAllNotificationPreferencesView = exports.hasUnsavedNotificationPreferences = exports.getNotificationRegistry = exports.getNotificationPreferencesSaveState = exports.getNotificationLocalOverrides = exports.getEffectiveNotificationPreferences = exports.getNotifications = exports.getLastNotificationTime = exports.pushToastNotification = exports.isFeatureInterestRegistered = exports.getRegisteredInterestsByFeature = exports.getRegisteredInterests = exports.getFeatureNotificationView = exports.notifyMeForFeature = exports.fetchRegisteredInterests = exports.clearFeatureNotificationView = exports.getNotificationsForSelectedSubTab = exports.getExternalNotificationsForSelectedSubTab = exports.getNotificationView = exports.updateNotificationViewUIState = exports.updateNotificationViewSubTab = exports.updateNotificationViewCurrentTabAndSubTab = exports.updateNotificationViewTabState = exports.updateNotificationViewNotificationStatus = exports.updateNotificationViewAllNotificationsStatus = exports.fetchNotificationUnreadCountSuccess = exports.fetchNotificationUnreadCount = exports.fetchNotificationView = exports.toNotificationTabTypeStrict = exports.toNotificationSubTabTypeStrict = exports.updateCommentsNotificationsStatuses = exports.updateCommentsNotifications = exports.toNotificationModeStrict = exports.parseOAuthParams = void 0;
|
|
74
|
+
exports.cancelAiAccountantOnboarding = exports.getAiAccountantJobsByTenantId = exports.getAiAccountantCustomers = exports.updateAiAccountantJobs = exports.updateAiAccountantCustomer = exports.updateAiAccountantCustomers = exports.clearAllAiAccountantCustomers = exports.toAiAccountantJob = exports.toAiAccountantEnrollment = exports.toAiAccountantCustomer = exports.toAiAccountantOperationType = exports.toAiAccountantJobStatus = exports.toAiAccountantEnrollmentStatus = exports.getAllowedOperationsForStatus = exports.getTreasuryFundsMaximumYield = exports.getTreasurySetupViewDetails = exports.updateTreasuryVideoViewed = exports.updateTreasuryPromoRemindMeLaterClicked = exports.updateTreasuryPromoIntroClosedByOutsideClick = exports.updateFundAllocationLocalData = exports.fetchPortfolioAllocation = exports.updatePortfolioAllocation = exports.fetchTreasuryFunds = exports.clearTreasurySetupView = exports.fetchTreasurySetupView = exports.acceptTreasuryTerms = exports.getExpressPayView = exports.resetExpressPayLocalData = exports.submitExpressPay = exports.updateExpressPayFormLocalData = exports.fetchExpressPayInitialDetails = exports.getIntlWireVerificationView = exports.updateVerificationFormLocalData = exports.submitInternationalVerificationForm = exports.fetchInternationalVerificationForm = exports.createTaskFromTaskGroupTemplate = exports.getCompanyTaskManagerView = exports.fetchTaskManagerMetrics = exports.fetchCompanyTaskManagerView = exports.fetchCockpitContext = exports.toRecurringFrequency = exports.toDayOfWeek = exports.getRecurringEndDateFromCount = exports.getMinAllowedEndDate = exports.SEMI_WEEKLY_REQUIRED_DAYS_COUNT = exports.ALL_WEEK_DAYS = exports.updateReferViewed = exports.getRewardsPlanCard = exports.fetchRewardsPlan = exports.resendReferralInvite = void 0;
|
|
75
|
+
exports.removeSyntheticAiCfoAnswer = exports.updateSyntheticAiCfoAnswer = exports.appendSyntheticAiCfoAnswer = exports.toAiCfoVisualization = exports.clearAiCfo = exports.clearSession = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = exports.updateAiCfoAnswerCardPolicyWizardPlan = exports.setSessions = exports.setNewSession = exports.getSkills = exports.getSuggestedQuestionsForPageContext = exports.getAiCfoView = exports.clearAiCfoSidePanelHostPageContext = exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSkillsFailure = exports.fetchSkillsSuccess = exports.fetchSkills = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions = exports.updateResponseState = exports.submitFeedback = exports.deleteChatSession = exports.acceptMasterTOS = exports.fetchChatHistory = exports.stopSubmitQuestion = exports.stopSubmit = exports.createSessionAndSubmit = exports.clearLastContextMessage = exports.clearDeleteChatSessionStatus = exports.clearCurrentSessionId = exports.clearAiCfoView = exports.setSession = exports.clearInput = exports.updateCotCollapsedState = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.submitQuestion = exports.createSession = exports.fetchChatSessionsForUser = exports.getAiAccountantCockpitView = exports.updateAiAccountantUIState = exports.triggerAiAccountantJob = exports.setSelectedTenantIdsForJobTrigger = exports.fetchAiAccountantJobs = exports.fetchAiAccountantCustomers = exports.clearAiAccountantView = void 0;
|
|
76
|
+
exports.getCardPolicySuggestedAllowMerchants = exports.getCardPolicySuggestedAllowCategories = exports.getCardPolicyStats = exports.getCardPolicyMccCategoriesFetchState = exports.getCardPolicyMccCategoriesError = exports.getCardPolicyMccCategories = exports.getAllCardPolicyTemplates = exports.clearCardPolicy = exports.updatePolicyRecommendationFromUploadSuccess = exports.updatePolicyRecommendationFromUploadFailure = exports.updatePolicyDocumentExtractionSuccess = exports.updatePolicyDocumentExtractionFailure = exports.updateCreatedCardPolicyTemplate = exports.updateCardPolicyVendorOptionsFailure = exports.updateCardPolicyVendorOptions = exports.updateCardPolicyTemplates = exports.updateCardPolicyStats = exports.updateCardPolicyMccCategoriesFailure = exports.updateCardPolicyMccCategories = exports.removeCardPolicyTemplate = exports.fetchCardPolicyVendorOptions = exports.fetchCardPolicyRecommendationFromUpload = exports.fetchCardPolicyMccCategories = exports.extractPolicyDocument = exports.clearPolicyDocumentExtraction = exports.toMessageType = exports.toMessageSender = exports.ALL_SYNTHETIC_AI_CFO_ANSWER_KINDS = exports.toInteractiveFormTypeStrict = exports.toInteractiveFormType = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerStateType = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_INTERACTIVE_FORM_TYPES = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = exports.getSyntheticAiCfoAnswerByQuestionAnswerId = exports.getSyntheticAiCfoAnswersForChatSession = exports.getAiCfoSelectorView = exports.getAllQuestionsForChatSession = exports.getQuestionAnswerByIdForChatSession = exports.getAllQuestionAnswersForChatSession = exports.clearSyntheticAiCfoAnswers = void 0;
|
|
77
|
+
exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION = exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT = exports.getManualCardPolicyFormDraft = exports.getLastCreatedCardPolicyTemplateIds = exports.getLastCreatedCardPolicyTemplateId = exports.getLastCreateCardPolicyTemplateErrors = exports.getLastCreateCardPolicySourceChatSessionId = exports.getCreateCardPolicyTemplateRequestState = exports.getAiCardPolicyFormDraft = exports.updateManualCardPolicyFormDraft = exports.updateCreateCardPolicyTemplateRequestState = exports.updateAiCardPolicyFormDraftFromUploadPlan = exports.updateAiCardPolicyFormDraft = exports.seedManualCardPolicyFormDraft = exports.seedAiCardPolicyFormDraft = exports.createCardPolicyTemplates = exports.clearManualCardPolicyFormDraft = exports.clearCreateCardPolicy = exports.clearAiCardPolicyFormDraft = exports.applyExtractedPolicyToManualCardPolicyDraft = exports.applyExtractedPolicyToAiCardPolicyDraft = exports.toUpdateCardPolicyTemplateRequestBody = exports.toExtractedCardPolicyRules = exports.toCreateCardPolicyTemplatesRequestBody = exports.toCreateCardPolicyTemplateRequestBody = exports.toCardPolicyVendorSearchOption = exports.toCardPolicyTemplateList = exports.toCardPolicyTemplate = exports.toCardPolicyStats = exports.toCardPolicyEditFormDraft = exports.toBulkCreateCardPolicyTemplateError = exports.toCardPolicyTemplateStatus = exports.toCardPolicyTemplateMode = exports.ALL_CARD_POLICY_TEMPLATE_STATUSES = exports.ALL_CARD_POLICY_TEMPLATE_MODES = exports.getUploadedPolicyDocumentFileName = exports.getPolicyRecommendationFromUploadFetchState = exports.getPolicyRecommendationFromUploadError = exports.getPolicyRecommendationFromUploadChatSessionId = exports.getPolicyRecommendationFromUploadAnswerId = exports.getPolicyDocumentExtractionFetchState = exports.getPolicyDocumentExtractionError = exports.getExtractedCardPolicyRules = exports.getCardPolicyVendorSearchString = exports.getCardPolicyVendorSearchOptions = exports.getCardPolicyVendorSearchFetchState = exports.getCardPolicyTemplatesByIds = exports.getCardPolicyTemplateById = exports.getCardPolicySuggestedBlockMerchants = exports.getCardPolicySuggestedBlockCategories = void 0;
|
|
78
|
+
exports.createAutoTransferRule = exports.fetchAutoTransferRules = exports.getTreasuryTaxLetters = exports.fetchTreasuryTaxLetterList = exports.getTreasuryStatements = exports.fetchTreasuryStatementList = exports.getTreasuryTransferMoney = exports.clearTreasuryTransferMoney = exports.updateTreasuryTransferMoneyLocalData = exports.executeTreasuryTransferMoney = exports.getTreasuryDetail = exports.updateTreasuryTransactionListUIState = exports.fetchTreasuryTransactionList = exports.fetchTreasuryOverviewDetail = exports.getUpdateCardPolicyFetchState = exports.getCardPolicyFormDraft = exports.getCardPolicyDetailView = exports.getCardPolicyDetailFetchState = exports.updateCardPolicyFormDraft = exports.updateCardPolicyFetchStatus = exports.updateCardPolicyDetailFetchStatus = exports.updateCardPolicy = exports.fetchCardPolicyDetail = exports.clearCardPolicyDetail = exports.getCardPolicyTemplateIds = exports.getCardPolicyListView = exports.getCardPolicyListFetchState = exports.getArchiveCardPolicyFetchState = exports.updateCardPolicyListFetchStatus = exports.updateArchiveCardPolicyFetchStatus = exports.prependCardPolicyTemplateIds = exports.fetchCardPolicyList = exports.clearCardPolicyList = exports.archiveCardPolicy = exports.toManualCardPolicyTemplateRequestFromDraft = exports.toBulkCardPolicyTemplateRequestsFromDraft = exports.toCardPolicyTemplateRequestFromDraft = exports.applyAiCardPolicyFormDraftUpdate = exports.deriveAiPolicyReviewRowsFromInputs = exports.buildManualCardPolicyFormDraftSeed = exports.buildUploadReviewRows = exports.buildEmptyLimitRows = exports.buildAiCardPolicyFormDraftSeed = exports.toVendorChipFieldValue = exports.toMccCategoryChipFieldValue = exports.buildVendorChipId = exports.buildMccCategoryChipId = exports.VENDOR_CHIP_ID_PREFIX = exports.MCC_CHIP_ID_PREFIX = exports.toMccCategoryLike = void 0;
|
|
79
|
+
exports.getInvoiceListView = exports.INVOICING_INVOICE_TABS = exports.ALL_INVOICING_INVOICE_TAB_IDS = exports.updateInvoiceListFilters = exports.setInvoiceActiveTab = exports.fetchInvoiceListPage = exports.fetchInvoiceList = exports.fetchInvoiceKPIs = exports.fetchInvoiceCounts = exports.clearInvoiceList = exports.getInvoicesByIds = exports.getInvoiceById = exports.updateInvoices = exports.removeInvoice = exports.clearAllInvoices = exports.mapAuditLogEntry = exports.toAuditLogEntityRouteOption = exports.isInvoicingEntityLinkable = exports.buildInvoicingEntityPath = exports.toInvoicingDiscountLifecycleActionOption = exports.toInvoicingDiscountLifecycleAction = exports.toInvoicingCatalogProductLifecycleActionOption = exports.toInvoicingCatalogItemLifecycleActionOption = exports.toInvoicingCatalogProductLifecycleAction = exports.toInvoicingCatalogItemLifecycleAction = exports.toInvoicingSubscriptionLifecycleActionOption = exports.toInvoicingSubscriptionLifecycleAction = exports.toInvoicingDunningAction = exports.INVOICING_DISCOUNT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_PRODUCT_LIFECYCLE_ACTIONS = exports.INVOICING_CATALOG_ITEM_LIFECYCLE_ACTIONS = exports.INVOICING_SUBSCRIPTION_LIFECYCLE_ACTIONS = exports.INVOICING_DUNNING_ACTIONS = exports.toKycProvidedDocumentTypeFromAllowed = exports.toKycProvidedDocumentType = exports.DEFAULT_SESSION_CONFIG = exports.SessionManager = exports.getTransactionActivityLogView = exports.fetchTransactionActivityLog = exports.BULK_UPLOAD_BAR_COMPLETE_HOLD_MS = exports.BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS = exports.getAutoTransferRuleHistory = exports.getAutoTransferRuleById = exports.getAutoTransferRules = exports.clearRuleUpdateLocalData = exports.updateRuleLocalData = exports.fetchAutoTransferReviewDetail = exports.fetchAutoTransferRuleHistory = exports.deleteAutoTransferRule = exports.updateAutoTransferRule = void 0;
|
|
80
|
+
exports.getCreateInvoiceFormView = exports.getInvoicingAuditView = exports.fetchInvoicingAuditLog = exports.clearInvoicingAuditView = exports.getInvoicingOverview = exports.buildPeriodOptions = exports.fetchInvoicingOverview = exports.clearInvoicingOverview = exports.initialRecordPaymentFormLocalData = exports.INVOICING_PAYMENT_METHOD_VALUES = exports.INVOICING_PAYMENT_GATEWAY_VALUES = exports.localDataToRecordPaymentPayload = exports.localDataToInvoiceRecordPaymentBody = exports.initializeRecordPaymentDraftFromInvoice = exports.getCreateCreditNoteView = exports.getCreateCreditNoteFormView = exports.initialCreateCreditNoteFormLocalData = exports.localDataToCreateCreditNotePayload = exports.updateCreateCreditNoteFormDraft = exports.submitCreateCreditNote = exports.resetCreateCreditNote = exports.createCreditNoteSuccess = exports.createCreditNoteFailure = exports.getIssueCreditNoteView = exports.getIssueCreditNoteFormView = exports.initialIssueCreditNoteFormLocalData = exports.INVOICING_CREDIT_NOTE_REASON_CODES = exports.localDataToIssueCreditNotePayload = exports.initializeIssueCreditNoteDraftFromInvoice = exports.computeIssueCreditNoteTotal = exports.updateIssueCreditNoteFormDraft = exports.submitIssueCreditNote = exports.resetIssueCreditNote = exports.issueCreditNoteSuccess = exports.issueCreditNoteFailure = exports.initializeIssueCreditNoteDraft = exports.updateRecordPaymentFormDraft = exports.submitRecordPayment = exports.initializeRecordPaymentDraft = exports.resetRecordPayment = exports.initialInvoicingCreateInvoiceFormLocalData = exports.createInvoiceFormLocalDataToRequest = exports.blankInvoicingCreateInvoiceLineItem = exports.updateInvoicingCreateInvoiceFormDraft = exports.resetCreateInvoice = exports.fetchCreateInvoiceFormPage = exports.createInvoice = exports.getInvoiceDetail = exports.fetchInvoiceDetail = exports.clearAllInvoiceDetail = void 0;
|
|
81
|
+
exports.isTieredCatalogPricingModel = exports.initialInvoicingCatalogItemFormLocalData = exports.entityToInvoicingCatalogItemFormLocalData = exports.blankInvoicingCatalogTier = exports.blankInvoicingCatalogSubFamily = exports.INVOICING_CATALOG_TYPE_VALUES = exports.INVOICING_CATALOG_TRIAL_UNIT_VALUES = exports.INVOICING_CATALOG_TRIAL_END_ACTION_VALUES = exports.INVOICING_CATALOG_TIER_TYPE_VALUES = exports.INVOICING_CATALOG_PRORATION_VALUES = exports.INVOICING_CATALOG_PRICING_MODEL_VALUES = exports.INVOICING_CATALOG_PERIOD_UNIT_VALUES = exports.INVOICING_CATALOG_APPLICABILITY_VALUES = exports.productToCreateSubFamilyFormValues = exports.planToCatalogDetailEditValues = exports.createSubFamilyFormToPayload = exports.catalogDetailEditValuesToSavePayload = exports.updateInvoicingCatalogItemFormDraft = exports.submitInvoicingCatalogItemForm = exports.saveInvoicingCatalogItem = exports.resetEditInvoicingCatalogItemDetailView = exports.createInvoicingCatalogSubFamily = exports.archiveInvoicingCatalogSubFamily = exports.getInvoicingSubscriptionFormView = exports.getEditInvoicingSubscriptionDetailViewState = exports.initialInvoicingSubscriptionFormLocalData = exports.entityToInvoicingSubscriptionFormLocalData = exports.INVOICING_SUBSCRIPTION_SHIPPING_ADDRESS_TYPE = exports.INVOICING_SUBSCRIPTION_BILLING_FREQUENCY_VALUES = exports.updateInvoicingSubscriptionFormDraft = exports.submitInvoicingSubscriptionForm = exports.resetEditInvoicingSubscriptionDetailView = exports.initializeInvoicingSubscriptionAddress = exports.fetchInvoicingSubscriptionFormPage = exports.getInvoicingCustomerFormView = exports.initialInvoicingCustomerFormLocalData = exports.entityToInvoicingCustomerFormLocalData = exports.INVOICING_TAXABILITY_VALUES = exports.INVOICING_NET_TERM_DAY_VALUES = exports.INVOICING_CUSTOMER_TYPE_VALUES = exports.INVOICING_CUSTOMER_BILLING_ADDRESS_TYPE = exports.updateInvoicingCustomerFormDraft = exports.submitInvoicingCustomerFormSuccess = exports.submitInvoicingCustomerFormFailure = exports.submitInvoicingCustomerForm = exports.resetEditInvoicingCustomerDetailView = exports.initializeInvoicingCustomerAddress = exports.getRecordPaymentView = exports.getRecordPaymentInvoiceOptions = exports.getRecordPaymentFormView = void 0;
|
|
82
|
+
exports.removeInvoicingCustomer = exports.clearAllInvoicingCustomers = exports.INVOICING_LIST_PAGE_SIZE = exports.getInvoicingDataImportActionState = exports.uploadInvoicingMigrationFiles = exports.startInvoicingMigration = exports.rollbackInvoicingMigration = exports.retryInvoicingMigration = exports.connectInvoicingChargebee = exports.clearAllInvoicingDataImportActions = exports.getInvoicingDataImportView = exports.setInvoicingActiveMigrationSessionId = exports.fetchInvoicingMigrationSessions = exports.fetchInvoicingMigrationSession = exports.fetchInvoicingMigrationDiagnostics = exports.fetchInvoicingDataImportStatus = exports.clearInvoicingDataImportView = exports.getInvoicingPaymentActionState = exports.runInvoicingPaymentAction = exports.clearInvoicingPaymentAction = exports.getInvoicingDunningActionState = exports.runInvoicingDunningAction = exports.clearInvoicingDunningAction = exports.getInvoicingSubscriptionActionState = exports.runInvoicingSubscriptionAction = exports.clearInvoicingSubscriptionAction = exports.getInvoicingDiscountActionState = exports.runInvoicingDiscountAction = exports.clearInvoicingDiscountAction = exports.getInvoicingCatalogActionState = exports.runInvoicingCatalogProductAction = exports.runInvoicingCatalogPlanAction = exports.clearInvoicingCatalogAction = exports.getInvoicingInvoiceActionState = exports.updateInvoicingInvoice = exports.runInvoicingInvoiceAction = exports.clearInvoicingInvoiceAction = exports.getInvoicingCouponFormView = exports.getEditInvoicingCouponDetailViewState = exports.initialInvoicingCouponFormLocalData = exports.entityToInvoicingCouponFormLocalData = exports.updateInvoicingCouponFormDraft = exports.submitInvoicingCouponForm = exports.saveInvoicingCoupon = exports.resetEditInvoicingCouponDetailView = exports.getSavedInvoicingCatalogItemKind = exports.getSavedInvoicingCatalogItemId = exports.getInvoicingCatalogItemFormView = exports.getInvoicingApplicableCatalogItemOptions = exports.getEditInvoicingCatalogItemDetailViewState = void 0;
|
|
83
|
+
exports.clearAllInvoicingTransactions = exports.getInvoicingSubscriptionDetail = exports.getInvoicingSubscriptionById = exports.fetchInvoicingSubscriptionDetail = exports.clearInvoicingSubscriptionDetailView = exports.getInvoicingSubscriptionListView = exports.INVOICING_SUBSCRIPTION_TABS = exports.INVOICING_SUBSCRIPTION_COLUMNS = exports.ALL_INVOICING_SUBSCRIPTION_TAB_IDS = exports.ALL_INVOICING_SUBSCRIPTION_SORT_KEYS = exports.updateInvoicingSubscriptionFilters = exports.setInvoicingSubscriptionActiveTab = exports.fetchInvoicingSubscriptionListPage = exports.fetchInvoicingSubscriptionList = exports.fetchInvoicingSubscriptionCounts = exports.clearInvoicingSubscriptionListView = exports.updateInvoicingSubscriptions = exports.removeInvoicingSubscription = exports.clearAllInvoicingSubscriptions = exports.resetPromotionalCreditAction = exports.submitAddPromotionalCredits = exports.getInvoicingSetupIntentFetchState = exports.getInvoicingSetupIntent = exports.getInvoicingSentPaymentLinkMagicUrl = exports.getInvoicingSentPaymentLinkEmail = exports.getInvoicingPlaidLinkTokenFetchState = exports.getInvoicingPlaidLinkToken = exports.getInvoicingPaymentMethodSaveState = exports.getInvoicingPaymentLinkSendState = exports.sendInvoicingPaymentLink = exports.saveInvoicingPaymentMethod = exports.resetInvoicingCustomerPaymentMethod = exports.fetchInvoicingPlaidLinkToken = exports.createInvoicingSetupIntent = exports.getInvoicingCustomerDetail = exports.fetchInvoicingCustomerDetailPage = exports.fetchInvoicingCustomerDetail = exports.clearInvoicingCustomerDetailView = exports.getInvoicingCustomerListView = exports.INVOICING_CUSTOMER_TABS = exports.INVOICING_CUSTOMER_COLUMNS = exports.ALL_INVOICING_CUSTOMER_TAB_IDS = exports.ALL_INVOICING_CUSTOMER_SORT_KEYS = exports.updateInvoicingCustomerFilters = exports.setInvoicingCustomerActiveTab = exports.fetchInvoicingCustomerListPage = exports.fetchInvoicingCustomerList = exports.fetchInvoicingCustomerCounts = exports.clearInvoicingCustomerListView = exports.updateInvoicingCustomers = void 0;
|
|
84
|
+
exports.getInvoicingCouponListFilters = exports.getInvoicingCouponListFetchState = exports.getInvoicingCouponCounts = exports.INVOICING_COUPON_TABS = exports.INVOICING_COUPON_COLUMNS = exports.ALL_INVOICING_COUPON_TAB_IDS = exports.ALL_INVOICING_COUPON_SORT_KEYS = exports.updateInvoicingCouponFilters = exports.setInvoicingCouponActiveTab = exports.fetchInvoicingCouponListPage = exports.fetchInvoicingCouponList = exports.fetchInvoicingCouponCounts = exports.clearInvoicingCouponView = exports.updateInvoicingCoupons = exports.removeInvoicingCoupon = exports.clearAllInvoicingCoupons = exports.getInvoicingCreditNoteDetail = exports.getInvoicingCreditNoteById = exports.fetchInvoicingCreditNoteDetail = exports.clearInvoicingCreditNoteDetailView = exports.getInvoicingCreditNoteListView = exports.INVOICING_CREDIT_NOTE_TABS = exports.INVOICING_CREDIT_NOTE_COLUMNS = exports.ALL_INVOICING_CREDIT_NOTE_TAB_IDS = exports.ALL_INVOICING_CREDIT_NOTE_SORT_KEYS = exports.updateInvoicingCreditNoteFilters = exports.setInvoicingCreditNoteActiveTab = exports.fetchInvoicingCreditNoteListPage = exports.fetchInvoicingCreditNoteList = exports.fetchInvoicingCreditNoteCounts = exports.clearInvoicingCreditNoteListView = exports.updateInvoicingCreditNotes = exports.removeInvoicingCreditNote = exports.clearAllInvoicingCreditNotes = exports.getInvoicingTransactionDetail = exports.getInvoicingTransactionById = exports.fetchInvoicingTransactionDetail = exports.clearInvoicingTransactionDetailView = exports.getInvoicingTransactionListView = exports.INVOICING_TRANSACTION_TABS = exports.INVOICING_TRANSACTION_COLUMNS = exports.ALL_INVOICING_TRANSACTION_TAB_IDS = exports.ALL_INVOICING_TRANSACTION_SORT_KEYS = exports.updateInvoicingTransactionFilters = exports.setInvoicingTransactionActiveTab = exports.fetchInvoicingTransactionListPage = exports.fetchInvoicingTransactionList = exports.clearInvoicingTransactionListView = exports.updateInvoicingTransactions = exports.removeInvoicingTransaction = void 0;
|
|
85
|
+
exports.connectInvoicingStripe = exports.clearInvoicingSettings = exports.getInvoicingProductById = exports.getInvoicingPlanById = exports.getInvoicingCatalogItemDetail = exports.fetchInvoicingCatalogItemDetail = exports.clearInvoicingCatalogItemDetailView = exports.getInvoicingCatalogListView = exports.INVOICING_PRODUCT_COLUMNS = exports.ALL_INVOICING_PRODUCT_SORT_KEYS = exports.updateInvoicingCatalogProductFilters = exports.updateInvoicingCatalogPlanFilters = exports.fetchInvoicingCatalogProductList = exports.fetchInvoicingCatalogPlanList = exports.fetchInvoicingCatalogListPage = exports.fetchInvoicingCatalogCounts = exports.clearInvoicingCatalogListView = exports.updateInvoicingProducts = exports.removeInvoicingProduct = exports.clearAllInvoicingProducts = exports.updateInvoicingPlans = exports.removeInvoicingPlan = exports.mergeInvoicingPlanSubFamily = exports.clearAllInvoicingPlans = exports.getInvoicingDunningCaseDetail = exports.getInvoicingDunningCaseById = exports.fetchInvoicingDunningCaseDetail = exports.clearInvoicingDunningCaseDetailView = exports.getInvoicingDunningCaseListView = exports.INVOICING_DUNNING_CASE_TABS = exports.INVOICING_DUNNING_CASE_COLUMNS = exports.ALL_INVOICING_DUNNING_CASE_TAB_IDS = exports.ALL_INVOICING_DUNNING_CASE_SORT_KEYS = exports.updateInvoicingDunningCaseFilters = exports.setInvoicingDunningCaseActiveTab = exports.fetchInvoicingDunningCaseListPage = exports.fetchInvoicingDunningCaseList = exports.fetchInvoicingDunningCaseCounts = exports.clearInvoicingDunningCaseListView = exports.updateInvoicingDunningCases = exports.removeInvoicingDunningCase = exports.clearAllInvoicingDunningCases = exports.getInvoicingCouponDetail = exports.fetchInvoicingCouponDetail = exports.clearInvoicingCouponDetailView = exports.getInvoicingCouponById = exports.getInvoicingCouponListView = exports.getInvoicingCouponListNextCursor = exports.getInvoicingCouponListItems = exports.getInvoicingCouponListHasMore = void 0;
|
|
86
|
+
exports.getInvoicingConfigView = exports.updateInvoicingConfig = exports.resetInvoicingConfigActionStates = exports.fetchInvoicingConfig = exports.enableInvoicing = exports.clearInvoicingConfig = exports.acceptInvoicingTerms = exports.isStripeConnectedFromSettings = exports.initialInvoicingBrandingFormLocalData = exports.entityToInvoicingBrandingFormLocalData = exports.INVOICING_BUSINESS_ADDRESS_TYPE = exports.getInvoicingSettingsView = exports.getInvoicingSettingsFetchState = exports.getInvoicingSettings = exports.getInvoicingBrandingFormView = exports.updateInvoicingSettings = exports.updateInvoicingBrandingFormDraft = exports.submitInvoicingBrandingForm = exports.saveInvoicingSettings = exports.resetSaveInvoicingSettings = exports.resetInvoicingBrandingFormDraft = exports.fetchInvoicingSettings = exports.disconnectInvoicingStripe = void 0;
|
|
87
87
|
const allowedValue_1 = require("./commonStateTypes/allowedValue");
|
|
88
88
|
Object.defineProperty(exports, "isAllowedValueWithCode", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithCode; } });
|
|
89
89
|
Object.defineProperty(exports, "isAllowedValueWithID", { enumerable: true, get: function () { return allowedValue_1.isAllowedValueWithID; } });
|
|
@@ -1068,8 +1068,6 @@ Object.defineProperty(exports, "getNetBurnOrIncomeStoryCardReport", { enumerable
|
|
|
1068
1068
|
const notificationPreferencesViewReducer_1 = require("./view/notificationPreferencesView/notificationPreferencesViewReducer");
|
|
1069
1069
|
Object.defineProperty(exports, "clearAllNotificationPreferencesView", { enumerable: true, get: function () { return notificationPreferencesViewReducer_1.clearAllNotificationPreferencesView; } });
|
|
1070
1070
|
Object.defineProperty(exports, "clearNotificationPreferencesLocalOverrides", { enumerable: true, get: function () { return notificationPreferencesViewReducer_1.clearNotificationPreferencesLocalOverrides; } });
|
|
1071
|
-
Object.defineProperty(exports, "saveNotificationPreferences", { enumerable: true, get: function () { return notificationPreferencesViewReducer_1.saveNotificationPreferences; } });
|
|
1072
|
-
Object.defineProperty(exports, "setGroupChannelMaster", { enumerable: true, get: function () { return notificationPreferencesViewReducer_1.setGroupChannelMaster; } });
|
|
1073
1071
|
Object.defineProperty(exports, "setGroupFrequency", { enumerable: true, get: function () { return notificationPreferencesViewReducer_1.setGroupFrequency; } });
|
|
1074
1072
|
Object.defineProperty(exports, "toggleEventChannel", { enumerable: true, get: function () { return notificationPreferencesViewReducer_1.toggleEventChannel; } });
|
|
1075
1073
|
const notificationPreferencesViewSelector_1 = require("./view/notificationPreferencesView/notificationPreferencesViewSelector");
|
|
@@ -2,8 +2,8 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
|
2
2
|
import { openSnackbar } from '../../../entity/snackbar/snackbarReducer';
|
|
3
3
|
import { RootState } from '../../../reducer';
|
|
4
4
|
import { ZeniAPI } from '../../../zeniAPI';
|
|
5
|
-
import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess } from '../notificationPreferencesViewReducer';
|
|
6
|
-
export type ActionType = ReturnType<typeof clearAllNotificationPreferencesView> | ReturnType<typeof clearNotificationPreferencesLocalOverrides> | ReturnType<typeof saveNotificationPreferences> | ReturnType<typeof saveNotificationPreferencesFailure> | ReturnType<typeof saveNotificationPreferencesSuccess> | ReturnType<typeof openSnackbar>;
|
|
5
|
+
import { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess, setGroupFrequency, toggleEventChannel } from '../notificationPreferencesViewReducer';
|
|
6
|
+
export type ActionType = ReturnType<typeof clearAllNotificationPreferencesView> | ReturnType<typeof clearNotificationPreferencesLocalOverrides> | ReturnType<typeof saveNotificationPreferences> | ReturnType<typeof saveNotificationPreferencesFailure> | ReturnType<typeof saveNotificationPreferencesSuccess> | ReturnType<typeof setGroupFrequency> | ReturnType<typeof toggleEventChannel> | ReturnType<typeof openSnackbar>;
|
|
7
7
|
export declare const saveNotificationPreferencesEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
8
8
|
payload: undefined;
|
|
9
9
|
type: "notificationPreferencesView/clearAllNotificationPreferencesView";
|
|
@@ -31,4 +31,10 @@ export declare const saveNotificationPreferencesEpic: (actions$: ActionsObservab
|
|
|
31
31
|
} | {
|
|
32
32
|
payload: import("../notificationPreferencesViewReducer").SaveNotificationPreferencesSuccessPayload;
|
|
33
33
|
type: "notificationPreferencesView/saveNotificationPreferencesSuccess";
|
|
34
|
+
} | {
|
|
35
|
+
payload: import("../notificationPreferencesViewReducer").SetFrequencyPayload;
|
|
36
|
+
type: "notificationPreferencesView/setGroupFrequency";
|
|
37
|
+
} | {
|
|
38
|
+
payload: import("../notificationPreferencesViewReducer").TogglePreferencePayload;
|
|
39
|
+
type: "notificationPreferencesView/toggleEventChannel";
|
|
34
40
|
}>;
|
|
@@ -9,9 +9,14 @@ const notificationPreferencesEndpoint_1 = require("../notificationPreferencesEnd
|
|
|
9
9
|
const notificationPreferencesViewPayload_1 = require("../notificationPreferencesViewPayload");
|
|
10
10
|
const notificationPreferencesViewReducer_1 = require("../notificationPreferencesViewReducer");
|
|
11
11
|
const notificationPreferencesViewSelector_1 = require("../notificationPreferencesViewSelector");
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
//
|
|
12
|
+
const DEBOUNCE_MS = 300;
|
|
13
|
+
const saveNotificationPreferencesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)((action) => notificationPreferencesViewReducer_1.toggleEventChannel.match(action) || notificationPreferencesViewReducer_1.setGroupFrequency.match(action)),
|
|
14
|
+
// Coalesce bursts of toggles into a single PUT. Trade-off: rapid clickers
|
|
15
|
+
// defer saves until they pause. Consider a max-wait wrapper if this
|
|
16
|
+
// becomes a UX problem.
|
|
17
|
+
(0, operators_1.debounceTime)(DEBOUNCE_MS), (0, operators_1.withLatestFrom)(state$),
|
|
18
|
+
// `switchMap` unsubscribes from any in-flight PUT observable when a new
|
|
19
|
+
// debounced batch fires. The prior HTTP request has already left the
|
|
15
20
|
// client — the network call is NOT cancelled — but its response is
|
|
16
21
|
// ignored, so stale success/failure actions cannot clobber the newer
|
|
17
22
|
// batch's state. Server-side ordering is arrival-order LWW.
|
|
@@ -46,7 +51,7 @@ const saveNotificationPreferencesEpic = (actions$, state$, zeniAPI) => actions$.
|
|
|
46
51
|
const isCancelledSince = () => cancelEpochAtDispatch <
|
|
47
52
|
state$.value.notificationPreferencesViewState.cancelEpoch;
|
|
48
53
|
// Abort the in-flight HTTP request when `switchMap` disposes this
|
|
49
|
-
// observable (
|
|
54
|
+
// observable (new debounced batch fires, tenant switch, unmount).
|
|
50
55
|
// Without an AbortSignal, `switchMap` would drop the response
|
|
51
56
|
// client-side but the older PUT would still land on the server —
|
|
52
57
|
// under patch-semantic LWW, a slower older PUT arriving after a
|
|
@@ -72,7 +77,7 @@ const saveNotificationPreferencesEpic = (actions$, state$, zeniAPI) => actions$.
|
|
|
72
77
|
];
|
|
73
78
|
if (!isCancelledSince()) {
|
|
74
79
|
// Surface a user-visible error — without it the UI reverts to
|
|
75
|
-
// server truth after
|
|
80
|
+
// server truth after debounce and the failed toggle looks like
|
|
76
81
|
// a mystery UI bug.
|
|
77
82
|
actions.push(errorSnackbar);
|
|
78
83
|
}
|
|
@@ -108,10 +113,8 @@ const saveNotificationPreferencesEpic = (actions$, state$, zeniAPI) => actions$.
|
|
|
108
113
|
// under patch-semantic LWW. Cursor Bugbot 3637969823 + 3641372002.
|
|
109
114
|
(0, operators_1.takeUntil)(actions$.pipe((0, operators_1.filter)((action) => notificationPreferencesViewReducer_1.clearNotificationPreferencesLocalOverrides.match(action) ||
|
|
110
115
|
notificationPreferencesViewReducer_1.clearAllNotificationPreferencesView.match(action)))));
|
|
111
|
-
//
|
|
112
|
-
//
|
|
113
|
-
|
|
114
|
-
// loop the epic on itself.
|
|
115
|
-
return request$;
|
|
116
|
+
// Flip savePreferencesState to In-Progress BEFORE the network call so
|
|
117
|
+
// any "saving…" UI can render.
|
|
118
|
+
return (0, rxjs_1.concat)((0, rxjs_1.of)((0, notificationPreferencesViewReducer_1.saveNotificationPreferences)()), request$);
|
|
116
119
|
}));
|
|
117
120
|
exports.saveNotificationPreferencesEpic = saveNotificationPreferencesEpic;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { NotificationPreferences } from './notificationPreferencesViewState';
|
|
2
2
|
export interface NotificationPreferencesPayload {
|
|
3
3
|
event_enabled_by_channel?: Record<string, Record<string, boolean>>;
|
|
4
|
-
group_channel_enabled_by_group_id?: Record<string, Record<string, boolean>>;
|
|
5
4
|
group_frequency_by_group_id?: Record<string, string>;
|
|
6
5
|
}
|
|
7
6
|
export declare const mapPayloadToPreferences: (payload?: NotificationPreferencesPayload) => NotificationPreferences;
|
|
8
|
-
export declare const mapPreferencesToPayload: (preferences: NotificationPreferences) =>
|
|
7
|
+
export declare const mapPreferencesToPayload: (preferences: NotificationPreferences) => Record<string, unknown>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mapPreferencesToPayload = exports.mapPayloadToPreferences = void 0;
|
|
4
4
|
const notificationRegistryState_1 = require("../../entity/notificationRegistry/notificationRegistryState");
|
|
5
|
-
const
|
|
5
|
+
const mapEventEnabledByChannel = (raw) => {
|
|
6
6
|
if (raw == null) {
|
|
7
7
|
return {};
|
|
8
8
|
}
|
|
@@ -23,8 +23,7 @@ const mapPayloadToPreferences = (payload) => {
|
|
|
23
23
|
(0, notificationRegistryState_1.toNotificationFrequency)(frequency),
|
|
24
24
|
]));
|
|
25
25
|
return {
|
|
26
|
-
eventEnabledByChannel:
|
|
27
|
-
groupChannelEnabledByGroupId: mapChannelEnabledMap(payload?.group_channel_enabled_by_group_id),
|
|
26
|
+
eventEnabledByChannel: mapEventEnabledByChannel(payload?.event_enabled_by_channel),
|
|
28
27
|
groupFrequencyByGroupId,
|
|
29
28
|
};
|
|
30
29
|
};
|
|
@@ -34,10 +33,6 @@ const mapPreferencesToPayload = (preferences) => {
|
|
|
34
33
|
if (Object.keys(preferences.eventEnabledByChannel).length > 0) {
|
|
35
34
|
payload.event_enabled_by_channel = preferences.eventEnabledByChannel;
|
|
36
35
|
}
|
|
37
|
-
if (Object.keys(preferences.groupChannelEnabledByGroupId).length > 0) {
|
|
38
|
-
payload.group_channel_enabled_by_group_id =
|
|
39
|
-
preferences.groupChannelEnabledByGroupId;
|
|
40
|
-
}
|
|
41
36
|
if (Object.keys(preferences.groupFrequencyByGroupId).length > 0) {
|
|
42
37
|
payload.group_frequency_by_group_id = preferences.groupFrequencyByGroupId;
|
|
43
38
|
}
|
|
@@ -12,11 +12,6 @@ export interface TogglePreferencePayload {
|
|
|
12
12
|
enabled: boolean;
|
|
13
13
|
eventId: string;
|
|
14
14
|
}
|
|
15
|
-
export interface SetGroupChannelMasterPayload {
|
|
16
|
-
channel: NotificationChannel;
|
|
17
|
-
enabled: boolean;
|
|
18
|
-
groupId: string;
|
|
19
|
-
}
|
|
20
15
|
export interface FetchNotificationPreferencesSuccessPayload {
|
|
21
16
|
preferences: NotificationPreferencesPayload | undefined;
|
|
22
17
|
saveEpochAtDispatch: number;
|
|
@@ -30,6 +25,6 @@ export interface SaveNotificationPreferencesFailurePayload {
|
|
|
30
25
|
cancelEpochAtDispatch: number;
|
|
31
26
|
error?: ZeniAPIStatus;
|
|
32
27
|
}
|
|
33
|
-
export declare const clearAllNotificationPreferencesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notificationPreferencesView/clearAllNotificationPreferencesView">, clearNotificationPreferencesLocalOverrides: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notificationPreferencesView/clearNotificationPreferencesLocalOverrides">, fetchNotificationPreferencesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<FetchNotificationPreferencesSuccessPayload, "notificationPreferencesView/fetchNotificationPreferencesSuccess">, saveNotificationPreferences: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notificationPreferencesView/saveNotificationPreferences">, saveNotificationPreferencesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<SaveNotificationPreferencesFailurePayload, "notificationPreferencesView/saveNotificationPreferencesFailure">, saveNotificationPreferencesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<SaveNotificationPreferencesSuccessPayload, "notificationPreferencesView/saveNotificationPreferencesSuccess">,
|
|
28
|
+
export declare const clearAllNotificationPreferencesView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notificationPreferencesView/clearAllNotificationPreferencesView">, clearNotificationPreferencesLocalOverrides: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notificationPreferencesView/clearNotificationPreferencesLocalOverrides">, fetchNotificationPreferencesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<FetchNotificationPreferencesSuccessPayload, "notificationPreferencesView/fetchNotificationPreferencesSuccess">, saveNotificationPreferences: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notificationPreferencesView/saveNotificationPreferences">, saveNotificationPreferencesFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<SaveNotificationPreferencesFailurePayload, "notificationPreferencesView/saveNotificationPreferencesFailure">, saveNotificationPreferencesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<SaveNotificationPreferencesSuccessPayload, "notificationPreferencesView/saveNotificationPreferencesSuccess">, setGroupFrequency: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetFrequencyPayload, "notificationPreferencesView/setGroupFrequency">, toggleEventChannel: import("@reduxjs/toolkit").ActionCreatorWithPayload<TogglePreferencePayload, "notificationPreferencesView/toggleEventChannel">;
|
|
34
29
|
declare const _default: import("redux").Reducer<NotificationPreferencesViewState>;
|
|
35
30
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.toggleEventChannel = exports.setGroupFrequency = exports.
|
|
4
|
+
exports.toggleEventChannel = exports.setGroupFrequency = exports.saveNotificationPreferencesSuccess = exports.saveNotificationPreferencesFailure = exports.saveNotificationPreferences = exports.fetchNotificationPreferencesSuccess = exports.clearNotificationPreferencesLocalOverrides = exports.clearAllNotificationPreferencesView = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const notificationPreferencesViewPayload_1 = require("./notificationPreferencesViewPayload");
|
|
7
7
|
const notificationPreferencesViewState_1 = require("./notificationPreferencesViewState");
|
|
@@ -22,18 +22,8 @@ const mergePreferences = (base, patch) => {
|
|
|
22
22
|
...channels,
|
|
23
23
|
};
|
|
24
24
|
});
|
|
25
|
-
const groupChannelEnabledByGroupId = {
|
|
26
|
-
...base.groupChannelEnabledByGroupId,
|
|
27
|
-
};
|
|
28
|
-
Object.entries(patch.groupChannelEnabledByGroupId).forEach(([groupId, channels]) => {
|
|
29
|
-
groupChannelEnabledByGroupId[groupId] = {
|
|
30
|
-
...(base.groupChannelEnabledByGroupId[groupId] ?? {}),
|
|
31
|
-
...channels,
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
25
|
return {
|
|
35
26
|
eventEnabledByChannel,
|
|
36
|
-
groupChannelEnabledByGroupId,
|
|
37
27
|
groupFrequencyByGroupId: {
|
|
38
28
|
...base.groupFrequencyByGroupId,
|
|
39
29
|
...patch.groupFrequencyByGroupId,
|
|
@@ -44,16 +34,16 @@ const mergePreferences = (base, patch) => {
|
|
|
44
34
|
// to the server from `localOverrides` — AND whose current value still equals
|
|
45
35
|
// what was saved. Any new edits the user added while the PUT was in flight
|
|
46
36
|
// (either new keys not present in `saved`, OR same keys the user flipped back
|
|
47
|
-
// to a different value) are preserved so the next
|
|
37
|
+
// to a different value) are preserved so the next debounce cycle picks them up.
|
|
48
38
|
//
|
|
49
39
|
// Presence-only subtraction (the prior implementation) silently dropped a
|
|
50
|
-
// same-key re-edit that landed AFTER
|
|
40
|
+
// same-key re-edit that landed AFTER debounce fired but BEFORE the response
|
|
51
41
|
// returned. Concrete case:
|
|
52
42
|
// 1. toggle evt1.email = false → localOverrides = {evt1:{email:false}}
|
|
53
|
-
// 2.
|
|
43
|
+
// 2. debounce PUT #1 fires with savedOverrides = {evt1:{email:false}}
|
|
54
44
|
// 3. user re-toggles evt1.email = true → localOverrides = {evt1:{email:true}}
|
|
55
45
|
// 4. PUT #1 success → subtract dropped `email` on presence, so the true
|
|
56
|
-
// re-edit disappeared and
|
|
46
|
+
// re-edit disappeared and next-debounce found nothing to send.
|
|
57
47
|
const subtractSavedOverrides = (current, saved) => {
|
|
58
48
|
const eventEnabledByChannel = {};
|
|
59
49
|
Object.entries(current.eventEnabledByChannel).forEach(([eventId, channels]) => {
|
|
@@ -75,38 +65,13 @@ const subtractSavedOverrides = (current, saved) => {
|
|
|
75
65
|
eventEnabledByChannel[eventId] = remainingChannels;
|
|
76
66
|
}
|
|
77
67
|
});
|
|
78
|
-
// Same value-equality subtraction as eventEnabledByChannel above — a
|
|
79
|
-
// group-channel master the user re-flipped while a PUT was in flight must
|
|
80
|
-
// survive so the next Save re-sends it.
|
|
81
|
-
const groupChannelEnabledByGroupId = {};
|
|
82
|
-
Object.entries(current.groupChannelEnabledByGroupId).forEach(([groupId, channels]) => {
|
|
83
|
-
const savedChannels = saved.groupChannelEnabledByGroupId[groupId];
|
|
84
|
-
if (savedChannels == null) {
|
|
85
|
-
groupChannelEnabledByGroupId[groupId] = channels;
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
const remainingChannels = {};
|
|
89
|
-
Object.keys(channels).forEach((channel) => {
|
|
90
|
-
if (!(channel in savedChannels) ||
|
|
91
|
-
channels[channel] !== savedChannels[channel]) {
|
|
92
|
-
remainingChannels[channel] = channels[channel];
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
if (Object.keys(remainingChannels).length > 0) {
|
|
96
|
-
groupChannelEnabledByGroupId[groupId] = remainingChannels;
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
68
|
const groupFrequencyByGroupId = {};
|
|
100
69
|
Object.entries(current.groupFrequencyByGroupId).forEach(([groupId, frequency]) => {
|
|
101
70
|
if (saved.groupFrequencyByGroupId[groupId] !== frequency) {
|
|
102
71
|
groupFrequencyByGroupId[groupId] = frequency;
|
|
103
72
|
}
|
|
104
73
|
});
|
|
105
|
-
return {
|
|
106
|
-
eventEnabledByChannel,
|
|
107
|
-
groupChannelEnabledByGroupId,
|
|
108
|
-
groupFrequencyByGroupId,
|
|
109
|
-
};
|
|
74
|
+
return { eventEnabledByChannel, groupFrequencyByGroupId };
|
|
110
75
|
};
|
|
111
76
|
const notificationPreferencesView = (0, toolkit_1.createSlice)({
|
|
112
77
|
name: 'notificationPreferencesView',
|
|
@@ -162,8 +127,8 @@ const notificationPreferencesView = (0, toolkit_1.createSlice)({
|
|
|
162
127
|
// snapshot of the server-known preferences (empty maps included), so
|
|
163
128
|
// REPLACE `preferences` rather than merging — merging would leak keys
|
|
164
129
|
// the server has since removed. DO NOT touch `localOverrides`: a refetch
|
|
165
|
-
// that fires while the user has
|
|
166
|
-
// them; the save-success path is the only clearer.
|
|
130
|
+
// that fires while the user has in-flight edits (pre-debounce) must not
|
|
131
|
+
// silently drop them; the save-success path is the only clearer.
|
|
167
132
|
// A `null`/`undefined` payload isn't a snapshot at all (e.g. the
|
|
168
133
|
// envelope key was omitted); no-op instead of wiping preferences.
|
|
169
134
|
if (action.payload.preferences == null) {
|
|
@@ -216,8 +181,8 @@ const notificationPreferencesView = (0, toolkit_1.createSlice)({
|
|
|
216
181
|
// In-flight-edit invariant: `savedOverrides` is the exact snapshot the
|
|
217
182
|
// epic PUT to the server. Subtracting those keys from `localOverrides`
|
|
218
183
|
// (instead of clearing it wholesale) preserves any edits the user
|
|
219
|
-
// added AFTER the
|
|
220
|
-
// next
|
|
184
|
+
// added AFTER the debounce fired but BEFORE the response landed. The
|
|
185
|
+
// next debounce cycle will pick them up. Clearing wholesale drops
|
|
221
186
|
// in-flight edits from both UI (once server echo lands) and server.
|
|
222
187
|
// Cancel/in-flight-save race: `cancelEpoch` monotonically increases
|
|
223
188
|
// on every Cancel. If the save captured a lower epoch at dispatch,
|
|
@@ -243,16 +208,6 @@ const notificationPreferencesView = (0, toolkit_1.createSlice)({
|
|
|
243
208
|
draft.preferences = mergePreferences(draft.preferences, patch);
|
|
244
209
|
draft.localOverrides = subtractSavedOverrides(draft.localOverrides, action.payload.savedOverrides);
|
|
245
210
|
},
|
|
246
|
-
setGroupChannelMaster(draft, action) {
|
|
247
|
-
// Mirror of `toggleEventChannel` but scoped to the group-channel master
|
|
248
|
-
// held under `groupChannelEnabledByGroupId[groupId][channel]`.
|
|
249
|
-
const { channel, enabled, groupId } = action.payload;
|
|
250
|
-
const groupMap = {
|
|
251
|
-
...(draft.localOverrides.groupChannelEnabledByGroupId[groupId] ?? {}),
|
|
252
|
-
};
|
|
253
|
-
groupMap[channel] = enabled;
|
|
254
|
-
draft.localOverrides.groupChannelEnabledByGroupId[groupId] = groupMap;
|
|
255
|
-
},
|
|
256
211
|
setGroupFrequency(draft, action) {
|
|
257
212
|
draft.localOverrides.groupFrequencyByGroupId[action.payload.groupId] =
|
|
258
213
|
action.payload.frequency;
|
|
@@ -267,5 +222,5 @@ const notificationPreferencesView = (0, toolkit_1.createSlice)({
|
|
|
267
222
|
},
|
|
268
223
|
},
|
|
269
224
|
});
|
|
270
|
-
_a = notificationPreferencesView.actions, exports.clearAllNotificationPreferencesView = _a.clearAllNotificationPreferencesView, exports.clearNotificationPreferencesLocalOverrides = _a.clearNotificationPreferencesLocalOverrides, exports.fetchNotificationPreferencesSuccess = _a.fetchNotificationPreferencesSuccess, exports.saveNotificationPreferences = _a.saveNotificationPreferences, exports.saveNotificationPreferencesFailure = _a.saveNotificationPreferencesFailure, exports.saveNotificationPreferencesSuccess = _a.saveNotificationPreferencesSuccess, exports.
|
|
225
|
+
_a = notificationPreferencesView.actions, exports.clearAllNotificationPreferencesView = _a.clearAllNotificationPreferencesView, exports.clearNotificationPreferencesLocalOverrides = _a.clearNotificationPreferencesLocalOverrides, exports.fetchNotificationPreferencesSuccess = _a.fetchNotificationPreferencesSuccess, exports.saveNotificationPreferences = _a.saveNotificationPreferences, exports.saveNotificationPreferencesFailure = _a.saveNotificationPreferencesFailure, exports.saveNotificationPreferencesSuccess = _a.saveNotificationPreferencesSuccess, exports.setGroupFrequency = _a.setGroupFrequency, exports.toggleEventChannel = _a.toggleEventChannel;
|
|
271
226
|
exports.default = notificationPreferencesView.reducer;
|
|
@@ -1,40 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.hasUnsavedNotificationPreferences = exports.getNotificationLocalOverrides = exports.getEffectiveNotificationPreferences = exports.getNotificationPreferencesSaveState = void 0;
|
|
4
|
-
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
4
|
const getView = (state) => state.notificationPreferencesViewState;
|
|
6
5
|
const getNotificationPreferencesSaveState = (state) => getView(state).savePreferencesState;
|
|
7
6
|
exports.getNotificationPreferencesSaveState = getNotificationPreferencesSaveState;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.getEffectiveNotificationPreferences = (0, toolkit_1.createSelector)((state) => getView(state).preferences, (state) => getView(state).localOverrides, (preferences, localOverrides) => {
|
|
13
|
-
const mergedEventEnabledByChannel = { ...preferences.eventEnabledByChannel };
|
|
14
|
-
Object.entries(localOverrides.eventEnabledByChannel).forEach(([eventId, channels]) => {
|
|
7
|
+
const getEffectiveNotificationPreferences = (state) => {
|
|
8
|
+
const view = getView(state);
|
|
9
|
+
const mergedEventEnabledByChannel = { ...view.preferences.eventEnabledByChannel };
|
|
10
|
+
Object.entries(view.localOverrides.eventEnabledByChannel).forEach(([eventId, channels]) => {
|
|
15
11
|
mergedEventEnabledByChannel[eventId] = {
|
|
16
|
-
...(preferences.eventEnabledByChannel[eventId] ?? {}),
|
|
17
|
-
...channels,
|
|
18
|
-
};
|
|
19
|
-
});
|
|
20
|
-
const mergedGroupChannelEnabledByGroupId = { ...preferences.groupChannelEnabledByGroupId };
|
|
21
|
-
Object.entries(localOverrides.groupChannelEnabledByGroupId).forEach(([groupId, channels]) => {
|
|
22
|
-
mergedGroupChannelEnabledByGroupId[groupId] = {
|
|
23
|
-
...(preferences.groupChannelEnabledByGroupId[groupId] ?? {}),
|
|
12
|
+
...(view.preferences.eventEnabledByChannel[eventId] ?? {}),
|
|
24
13
|
...channels,
|
|
25
14
|
};
|
|
26
15
|
});
|
|
27
16
|
return {
|
|
28
17
|
eventEnabledByChannel: mergedEventEnabledByChannel,
|
|
29
|
-
groupChannelEnabledByGroupId: mergedGroupChannelEnabledByGroupId,
|
|
30
18
|
groupFrequencyByGroupId: {
|
|
31
|
-
...preferences.groupFrequencyByGroupId,
|
|
32
|
-
...localOverrides.groupFrequencyByGroupId,
|
|
19
|
+
...view.preferences.groupFrequencyByGroupId,
|
|
20
|
+
...view.localOverrides.groupFrequencyByGroupId,
|
|
33
21
|
},
|
|
34
22
|
};
|
|
35
|
-
}
|
|
23
|
+
};
|
|
24
|
+
exports.getEffectiveNotificationPreferences = getEffectiveNotificationPreferences;
|
|
36
25
|
const getNotificationLocalOverrides = (state) => getView(state).localOverrides;
|
|
37
26
|
exports.getNotificationLocalOverrides = getNotificationLocalOverrides;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Object.keys(
|
|
27
|
+
const hasUnsavedNotificationPreferences = (state) => {
|
|
28
|
+
const overrides = getView(state).localOverrides;
|
|
29
|
+
return (Object.keys(overrides.eventEnabledByChannel).length > 0 ||
|
|
30
|
+
Object.keys(overrides.groupFrequencyByGroupId).length > 0);
|
|
31
|
+
};
|
|
32
|
+
exports.hasUnsavedNotificationPreferences = hasUnsavedNotificationPreferences;
|
|
@@ -2,7 +2,6 @@ import { FetchStateAndError } from '../../commonStateTypes/common';
|
|
|
2
2
|
import { NotificationChannel, NotificationFrequency } from '../../entity/notificationRegistry/notificationRegistryState';
|
|
3
3
|
export interface NotificationPreferences {
|
|
4
4
|
eventEnabledByChannel: Record<string, Partial<Record<NotificationChannel, boolean>>>;
|
|
5
|
-
groupChannelEnabledByGroupId: Record<string, Partial<Record<NotificationChannel, boolean>>>;
|
|
6
5
|
groupFrequencyByGroupId: Record<string, NotificationFrequency>;
|
|
7
6
|
}
|
|
8
7
|
export interface NotificationPreferencesViewState {
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.emptyNotificationPreferences = void 0;
|
|
4
4
|
const emptyNotificationPreferences = () => ({
|
|
5
5
|
eventEnabledByChannel: {},
|
|
6
|
-
groupChannelEnabledByGroupId: {},
|
|
7
6
|
groupFrequencyByGroupId: {},
|
|
8
7
|
});
|
|
9
8
|
exports.emptyNotificationPreferences = emptyNotificationPreferences;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.74",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|