@zeniai/client-epic-state 5.1.68-betaDI2 → 5.1.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/lib/esm/index.js +2 -2
  2. package/lib/esm/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +12 -9
  3. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewPayload.js +2 -7
  4. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewReducer.js +2 -47
  5. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewSelector.js +0 -9
  6. package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewState.js +0 -1
  7. package/lib/esm/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +8 -2
  8. package/lib/esm/view/spendManagement/helpers.js +12 -0
  9. package/lib/esm/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +0 -12
  10. package/lib/esm/view/spendManagement/reimbursement/remiDetailView/remiDetailViewSelector.js +4 -2
  11. package/lib/index.d.ts +2 -2
  12. package/lib/index.js +14 -16
  13. package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.d.ts +8 -2
  14. package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +9 -6
  15. package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.d.ts +0 -1
  16. package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.js +2 -7
  17. package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.d.ts +1 -6
  18. package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.js +3 -48
  19. package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.js +0 -9
  20. package/lib/view/notificationPreferencesView/notificationPreferencesViewState.d.ts +0 -1
  21. package/lib/view/notificationPreferencesView/notificationPreferencesViewState.js +0 -1
  22. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.d.ts +1 -0
  23. package/lib/view/spendManagement/billPay/billDetailView/billDetailViewSelector.js +7 -1
  24. package/lib/view/spendManagement/helpers.d.ts +1 -0
  25. package/lib/view/spendManagement/helpers.js +14 -1
  26. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.d.ts +1 -2
  27. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchEditRemiDetailPageEpic.js +0 -12
  28. package/lib/view/spendManagement/reimbursement/remiDetailView/remiDetailViewSelector.d.ts +1 -0
  29. package/lib/view/spendManagement/reimbursement/remiDetailView/remiDetailViewSelector.js +3 -1
  30. package/package.json +1 -1
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, saveNotificationPreferences, setGroupChannelMaster, setGroupFrequency, toggleEventChannel, } from './view/notificationPreferencesView/notificationPreferencesViewReducer';
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, saveNotificationPreferences, setGroupChannelMaster, setGroupFrequency, toggleEventChannel, toNotificationChannel, toNotificationFrequency, };
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,12 +1,17 @@
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
- export const saveNotificationPreferencesEpic = (actions$, state$, zeniAPI) => actions$.pipe(filter((action) => saveNotificationPreferences.match(action)), withLatestFrom(state$),
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$),
10
15
  // `switchMap` unsubscribes from any in-flight PUT observable when a new
11
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
@@ -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
- // `saveNotificationPreferences` (the trigger) already flipped
109
- // savePreferencesState to In-Progress via its reducer case, so the PUT
110
- // observable is returned directly — re-emitting the trigger here would
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 mapChannelEnabledMap = (raw) => {
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: mapChannelEnabledMap(payload?.event_enabled_by_channel),
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,
@@ -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 debounce cycle 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',
@@ -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, setGroupChannelMaster, setGroupFrequency, toggleEventChannel, } = notificationPreferencesView.actions;
221
+ export const { clearAllNotificationPreferencesView, clearNotificationPreferencesLocalOverrides, fetchNotificationPreferencesSuccess, saveNotificationPreferences, saveNotificationPreferencesFailure, saveNotificationPreferencesSuccess, setGroupFrequency, toggleEventChannel, } = notificationPreferencesView.actions;
267
222
  export default notificationPreferencesView.reducer;
@@ -9,16 +9,8 @@ export const getEffectiveNotificationPreferences = (state) => {
9
9
  ...channels,
10
10
  };
11
11
  });
12
- const mergedGroupChannelEnabledByGroupId = { ...view.preferences.groupChannelEnabledByGroupId };
13
- Object.entries(view.localOverrides.groupChannelEnabledByGroupId).forEach(([groupId, channels]) => {
14
- mergedGroupChannelEnabledByGroupId[groupId] = {
15
- ...(view.preferences.groupChannelEnabledByGroupId[groupId] ?? {}),
16
- ...channels,
17
- };
18
- });
19
12
  return {
20
13
  eventEnabledByChannel: mergedEventEnabledByChannel,
21
- groupChannelEnabledByGroupId: mergedGroupChannelEnabledByGroupId,
22
14
  groupFrequencyByGroupId: {
23
15
  ...view.preferences.groupFrequencyByGroupId,
24
16
  ...view.localOverrides.groupFrequencyByGroupId,
@@ -29,6 +21,5 @@ export const getNotificationLocalOverrides = (state) => getView(state).localOver
29
21
  export const hasUnsavedNotificationPreferences = (state) => {
30
22
  const overrides = getView(state).localOverrides;
31
23
  return (Object.keys(overrides.eventEnabledByChannel).length > 0 ||
32
- Object.keys(overrides.groupChannelEnabledByGroupId).length > 0 ||
33
24
  Object.keys(overrides.groupFrequencyByGroupId).length > 0);
34
25
  };
@@ -1,5 +1,4 @@
1
1
  export const emptyNotificationPreferences = () => ({
2
2
  eventEnabledByChannel: {},
3
- groupChannelEnabledByGroupId: {},
4
3
  groupFrequencyByGroupId: {},
5
4
  });
@@ -13,7 +13,7 @@ import { getUserByUserId } from '../../../../entity/user/userSelector';
13
13
  import { getUserRoleByUserId } from '../../../../entity/userRole/userRoleSelector';
14
14
  import { getActivityHistory, } from '../../commonHistoryView/commonHistorySelector';
15
15
  import { getAllFundingAccounts, } from '../../commonSetup/setupViewSelector';
16
- import { getLatestApprovalDate, isAwaitingMarkAsPaid, isSodAdminFallbackEligibleForStep, isSodExcludedViewerBlocked, } from '../../helpers';
16
+ import { getLatestApprovalDate, isAwaitingMarkAsPaid, isSodAdminFallbackEligibleForStep, isSodExcludedViewerBlocked, shouldShowSodAdminLabel, } from '../../helpers';
17
17
  import { getActivityRealTimeApproval, } from '../../realTimeApprovalView/realTimeApprovalSelector';
18
18
  import { getEntityRealTimeApprovalDetailKey } from '../../realTimeApprovalView/realTimeApprovalState';
19
19
  import { getBillPaymentSubConfigCodeKey, getInternationalSubConfigCodeKey, getInternationalWireMethodCodeKey, } from '../billPayConfig/billPayConfigPayload';
@@ -22,7 +22,12 @@ import { getBillPayConfigMethodKey, toBillPaymentSubConfigCodeKeyType, } from '.
22
22
  import { getPreviousBills, } from '../previousBills/previousBillsSelector';
23
23
  import { getBillTransactionDetailKey, initialBillDetailView, } from './billDetailViewState';
24
24
  export const getBillActivities = (state, billId, billStageCode) => {
25
- const { billDetailViewState, approvalRuleState, entityApprovalStatusState, userState, } = state;
25
+ const { billDetailViewState, approvalRuleState, entityApprovalStatusState, userState, billTransactionState, } = state;
26
+ // Note: createdBy is undefined until billTransactionState is populated.
27
+ // getBillActivities is called from getBillDetailView which runs after the
28
+ // bill entity epic completes — this assumption must hold for showSodAdminLabel
29
+ // to render on first paint.
30
+ const createdBy = billTransactionState.transactionById[billId]?.createdBy;
26
31
  const key = getBillTransactionDetailKey(billId);
27
32
  const billDetail = recordGet(billDetailViewState.billDetailById, key, undefined);
28
33
  let billActivities = [];
@@ -85,6 +90,7 @@ export const getBillActivities = (state, billId, billStageCode) => {
85
90
  actorsActivity,
86
91
  isOriginalApprovalStep: step.isOriginalApprovalStep,
87
92
  displayPendingApproverAsAdmin: isSodAdminFallbackEligibleForStep(sodExcludedApproverUserId, isAdminFallbackApprover, actorsActivity),
93
+ showSodAdminLabel: shouldShowSodAdminLabel(sodExcludedApproverUserId, actorsActivity, createdBy),
88
94
  };
89
95
  }),
90
96
  };
@@ -19,6 +19,18 @@ export const isSodAdminFallbackEligibleForStep = (sodExcludedApproverUserId, isA
19
19
  return (pendingResolvedApprovers.length > 0 &&
20
20
  pendingResolvedApprovers.every((activity) => getUserActorId(activity) === sodExcludedApproverUserId));
21
21
  };
22
+ const isSodExcludedUserSolePendingApproverOnStep = (sodExcludedApproverUserId, stepActorsActivity = []) => {
23
+ if (sodExcludedApproverUserId == null) {
24
+ return false;
25
+ }
26
+ const pendingResolvedApprovers = stepActorsActivity.filter((activity) => activity.activity === 'pending' && getUserActorId(activity) != null);
27
+ return (pendingResolvedApprovers.length > 0 &&
28
+ pendingResolvedApprovers.every((activity) => getUserActorId(activity) === sodExcludedApproverUserId));
29
+ };
30
+ export const shouldShowSodAdminLabel = (sodExcludedApproverUserId, stepActorsActivity = [], entitySubjectUserId) => sodExcludedApproverUserId != null &&
31
+ entitySubjectUserId != null &&
32
+ sodExcludedApproverUserId === entitySubjectUserId &&
33
+ isSodExcludedUserSolePendingApproverOnStep(sodExcludedApproverUserId, stepActorsActivity);
22
34
  export const getLatestApprovalDate = (allActivities) => {
23
35
  let allStepsWithStatus = [];
24
36
  let allApprovedActions = [];
@@ -6,7 +6,6 @@ import { fetchUserFinancialAccount } from '../../../../userFinancialAccount/user
6
6
  import { getLatestCreatedUserBankAccount } from '../../../../userFinancialAccount/userFinancialAccountSelector';
7
7
  import { fetchMerchantList } from '../../../merchantList/merchantListReducer';
8
8
  import { fetchReimbursementConfig } from '../../reimbursementConfig/reimbursementConfigReducer';
9
- import { fetchRemiSetupApproverView } from '../../remiSetupApproverView/remiSetupApproverViewReducer';
10
9
  import { fetchEditRemiDetailPage, fetchRemiAndInitializeLocalStore, updatesPaymentToInLocalStore, } from '../editRemiViewReducer';
11
10
  export const fetchEditRemiDetailPageEpic = (actions$, state$) => actions$.pipe(filter(fetchEditRemiDetailPage.match), mergeMap((action) => {
12
11
  const { cacheOverride, isLimitedCategoryEnabled, reimbursementId, isShowDeletedReimbursementEnabled, } = action.payload;
@@ -59,17 +58,6 @@ export const fetchEditRemiDetailPageEpic = (actions$, state$) => actions$.pipe(f
59
58
  if (reimbursementId != null) {
60
59
  remiDetailActions.push(fetchRemiAndInitializeLocalStore(reimbursementId, false, isShowDeletedReimbursementEnabled));
61
60
  }
62
- else {
63
- const approvalRules = state.remiSetupApproverViewState;
64
- if (approvalRules.fetchState !== 'Completed' &&
65
- approvalRules.fetchState !== 'In-Progress') {
66
- // Side-fetch from the edit-reim page bootstrap. The
67
- // triggering action doesn't carry the V3 flag, so we
68
- // explicitly target v1; v3 tenants re-fetch via their
69
- // own screen connector.
70
- remiDetailActions.push(fetchRemiSetupApproverView(true, false, false, false));
71
- }
72
- }
73
61
  }
74
62
  return concat(from(remiDetailActions));
75
63
  }));
@@ -7,7 +7,7 @@ import { getEntityApprovalStatusByIds } from '../../../../entity/entityApprovalS
7
7
  import { getUserByUserId } from '../../../../entity/user/userSelector';
8
8
  import { getUserRoleByUserId } from '../../../../entity/userRole/userRoleSelector';
9
9
  import { getActivityHistory, } from '../../commonHistoryView/commonHistorySelector';
10
- import { getLatestApprovalDate, isSodAdminFallbackEligibleForStep, isSodExcludedViewerBlocked, } from '../../helpers';
10
+ import { getLatestApprovalDate, isSodAdminFallbackEligibleForStep, isSodExcludedViewerBlocked, shouldShowSodAdminLabel, } from '../../helpers';
11
11
  import { getActivityRealTimeApproval, } from '../../realTimeApprovalView/realTimeApprovalSelector';
12
12
  import { getReimbursementConfigByKey } from '../reimbursementConfig/reimbursementConfigSelector';
13
13
  import { REIMBURSEMENT_PAYMENT_NUMBER_OF_DAYS } from '../reimbursementConfig/reimbursementConfigState';
@@ -110,7 +110,8 @@ export const getRemiDetailView = (state, reimbursementId) => {
110
110
  };
111
111
  };
112
112
  export const getRemiActivities = (state, reimbursementId, billStageCode) => {
113
- const { remiDetailViewState, approvalRuleState, entityApprovalStatusState, userState, } = state;
113
+ const { remiDetailViewState, approvalRuleState, entityApprovalStatusState, userState, reimbursementState, } = state;
114
+ const reimburseeUserId = reimbursementState.reimbursementById[reimbursementId]?.reimburseeUserId;
114
115
  const remiTransactionDetails = recordGet(remiDetailViewState.remiDetailById, reimbursementId, undefined);
115
116
  let remiActivities = [];
116
117
  if (remiTransactionDetails != null) {
@@ -172,6 +173,7 @@ export const getRemiActivities = (state, reimbursementId, billStageCode) => {
172
173
  actorsActivity,
173
174
  isOriginalApprovalStep: step.isOriginalApprovalStep,
174
175
  displayPendingApproverAsAdmin: isSodAdminFallbackEligibleForStep(sodExcludedApproverUserId, isAdminFallbackApprover, actorsActivity),
176
+ showSodAdminLabel: shouldShowSodAdminLabel(sodExcludedApproverUserId, actorsActivity, reimburseeUserId),
175
177
  };
176
178
  }),
177
179
  };
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, saveNotificationPreferences, setGroupChannelMaster, setGroupFrequency, toggleEventChannel } from './view/notificationPreferencesView/notificationPreferencesViewReducer';
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, saveNotificationPreferences, setGroupChannelMaster, setGroupFrequency, toggleEventChannel, toNotificationChannel, toNotificationFrequency, };
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.setGroupChannelMaster = exports.saveNotificationPreferences = 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.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 = exports.updateReferralListSortUiState = exports.saveReferralFormDataInLocalStore = void 0;
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 = exports.cancelAiAccountantOnboarding = exports.getAiAccountantJobsByTenantId = void 0;
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 = exports.removeSyntheticAiCfoAnswer = exports.updateSyntheticAiCfoAnswer = void 0;
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 = exports.getCardPolicySuggestedAllowMerchants = exports.getCardPolicySuggestedAllowCategories = void 0;
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 = exports.CARD_POLICY_LIMIT_ROW_ID_TRANSACTION = exports.CARD_POLICY_LIMIT_ROW_ID_REQUIRE_RECEIPT = void 0;
79
- exports.INVOICING_INVOICE_TABS = exports.ALL_INVOICING_INVOICE_TAB_IDS = exports.updateInvoiceListFilters = 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 = exports.createAutoTransferRule = exports.fetchAutoTransferRules = void 0;
80
- 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 = exports.getInvoiceListView = void 0;
81
- 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 = exports.getCreateInvoiceFormView = void 0;
82
- 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 = exports.isTieredCatalogPricingModel = void 0;
83
- exports.removeInvoicingTransaction = 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.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.fetchInvoicingCustomerListPage = exports.fetchInvoicingCustomerList = exports.fetchInvoicingCustomerCounts = exports.clearInvoicingCustomerListView = exports.updateInvoicingCustomers = exports.removeInvoicingCustomer = void 0;
84
- exports.getInvoicingCouponListView = exports.getInvoicingCouponListNextCursor = exports.getInvoicingCouponListItems = exports.getInvoicingCouponListHasMore = 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.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.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.fetchInvoicingTransactionListPage = exports.fetchInvoicingTransactionList = exports.clearInvoicingTransactionListView = exports.updateInvoicingTransactions = void 0;
85
- exports.saveInvoicingSettings = exports.resetSaveInvoicingSettings = exports.resetInvoicingBrandingFormDraft = exports.fetchInvoicingSettings = exports.disconnectInvoicingStripe = 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.fetchInvoicingDunningCaseListPage = exports.fetchInvoicingDunningCaseList = exports.fetchInvoicingDunningCaseCounts = exports.clearInvoicingDunningCaseListView = exports.updateInvoicingDunningCases = exports.removeInvoicingDunningCase = exports.clearAllInvoicingDunningCases = exports.getInvoicingCouponDetail = exports.fetchInvoicingCouponDetail = exports.clearInvoicingCouponDetailView = exports.getInvoicingCouponById = 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 = void 0;
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.clearAllInvoiceDetail = exports.getInvoiceListView = exports.INVOICING_INVOICE_TABS = exports.ALL_INVOICING_INVOICE_TAB_IDS = exports.updateInvoiceListFilters = 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.getRecordPaymentFormView = 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 = void 0;
81
+ exports.getEditInvoicingCatalogItemDetailViewState = 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 = void 0;
82
+ exports.updateInvoicingCustomers = 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 = void 0;
83
+ exports.clearInvoicingTransactionListView = exports.updateInvoicingTransactions = exports.removeInvoicingTransaction = 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.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.fetchInvoicingCustomerListPage = exports.fetchInvoicingCustomerList = exports.fetchInvoicingCustomerCounts = exports.clearInvoicingCustomerListView = void 0;
84
+ exports.clearInvoicingCouponDetailView = exports.getInvoicingCouponById = exports.getInvoicingCouponListView = exports.getInvoicingCouponListNextCursor = exports.getInvoicingCouponListItems = exports.getInvoicingCouponListHasMore = 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.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.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.fetchInvoicingTransactionListPage = exports.fetchInvoicingTransactionList = void 0;
85
+ exports.updateInvoicingBrandingFormDraft = exports.submitInvoicingBrandingForm = exports.saveInvoicingSettings = exports.resetSaveInvoicingSettings = exports.resetInvoicingBrandingFormDraft = exports.fetchInvoicingSettings = exports.disconnectInvoicingStripe = 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.fetchInvoicingDunningCaseListPage = exports.fetchInvoicingDunningCaseList = exports.fetchInvoicingDunningCaseCounts = exports.clearInvoicingDunningCaseListView = exports.updateInvoicingDunningCases = exports.removeInvoicingDunningCase = exports.clearAllInvoicingDunningCases = exports.getInvoicingCouponDetail = exports.fetchInvoicingCouponDetail = 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 = 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,7 +9,12 @@ 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 saveNotificationPreferencesEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)((action) => notificationPreferencesViewReducer_1.saveNotificationPreferences.match(action)), (0, operators_1.withLatestFrom)(state$),
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$),
13
18
  // `switchMap` unsubscribes from any in-flight PUT observable when a new
14
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
@@ -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
- // `saveNotificationPreferences` (the trigger) already flipped
112
- // savePreferencesState to In-Progress via its reducer case, so the PUT
113
- // observable is returned directly — re-emitting the trigger here would
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,7 +1,6 @@
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;
@@ -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 mapChannelEnabledMap = (raw) => {
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: mapChannelEnabledMap(payload?.event_enabled_by_channel),
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">, setGroupChannelMaster: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetGroupChannelMasterPayload, "notificationPreferencesView/setGroupChannelMaster">, setGroupFrequency: import("@reduxjs/toolkit").ActionCreatorWithPayload<SetFrequencyPayload, "notificationPreferencesView/setGroupFrequency">, toggleEventChannel: import("@reduxjs/toolkit").ActionCreatorWithPayload<TogglePreferencePayload, "notificationPreferencesView/toggleEventChannel">;
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.setGroupChannelMaster = exports.saveNotificationPreferencesSuccess = exports.saveNotificationPreferencesFailure = exports.saveNotificationPreferences = exports.fetchNotificationPreferencesSuccess = exports.clearNotificationPreferencesLocalOverrides = exports.clearAllNotificationPreferencesView = exports.initialState = void 0;
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,
@@ -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 debounce cycle 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',
@@ -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.setGroupChannelMaster = _a.setGroupChannelMaster, exports.setGroupFrequency = _a.setGroupFrequency, exports.toggleEventChannel = _a.toggleEventChannel;
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;
@@ -13,16 +13,8 @@ const getEffectiveNotificationPreferences = (state) => {
13
13
  ...channels,
14
14
  };
15
15
  });
16
- const mergedGroupChannelEnabledByGroupId = { ...view.preferences.groupChannelEnabledByGroupId };
17
- Object.entries(view.localOverrides.groupChannelEnabledByGroupId).forEach(([groupId, channels]) => {
18
- mergedGroupChannelEnabledByGroupId[groupId] = {
19
- ...(view.preferences.groupChannelEnabledByGroupId[groupId] ?? {}),
20
- ...channels,
21
- };
22
- });
23
16
  return {
24
17
  eventEnabledByChannel: mergedEventEnabledByChannel,
25
- groupChannelEnabledByGroupId: mergedGroupChannelEnabledByGroupId,
26
18
  groupFrequencyByGroupId: {
27
19
  ...view.preferences.groupFrequencyByGroupId,
28
20
  ...view.localOverrides.groupFrequencyByGroupId,
@@ -35,7 +27,6 @@ exports.getNotificationLocalOverrides = getNotificationLocalOverrides;
35
27
  const hasUnsavedNotificationPreferences = (state) => {
36
28
  const overrides = getView(state).localOverrides;
37
29
  return (Object.keys(overrides.eventEnabledByChannel).length > 0 ||
38
- Object.keys(overrides.groupChannelEnabledByGroupId).length > 0 ||
39
30
  Object.keys(overrides.groupFrequencyByGroupId).length > 0);
40
31
  };
41
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;
@@ -55,6 +55,7 @@ export interface StepWithStatus extends StepWithUser {
55
55
  actorsActivity: ActorActivityWithUser[];
56
56
  isOriginalApprovalStep: boolean;
57
57
  displayPendingApproverAsAdmin?: boolean;
58
+ showSodAdminLabel?: boolean;
58
59
  }
59
60
  export interface ActorActivityWithUser {
60
61
  activity: ActivityStatus;
@@ -28,7 +28,12 @@ const billPayConfigState_1 = require("../billPayConfig/billPayConfigState");
28
28
  const previousBillsSelector_1 = require("../previousBills/previousBillsSelector");
29
29
  const billDetailViewState_1 = require("./billDetailViewState");
30
30
  const getBillActivities = (state, billId, billStageCode) => {
31
- const { billDetailViewState, approvalRuleState, entityApprovalStatusState, userState, } = state;
31
+ const { billDetailViewState, approvalRuleState, entityApprovalStatusState, userState, billTransactionState, } = state;
32
+ // Note: createdBy is undefined until billTransactionState is populated.
33
+ // getBillActivities is called from getBillDetailView which runs after the
34
+ // bill entity epic completes — this assumption must hold for showSodAdminLabel
35
+ // to render on first paint.
36
+ const createdBy = billTransactionState.transactionById[billId]?.createdBy;
32
37
  const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
33
38
  const billDetail = (0, get_1.default)(billDetailViewState.billDetailById, key, undefined);
34
39
  let billActivities = [];
@@ -91,6 +96,7 @@ const getBillActivities = (state, billId, billStageCode) => {
91
96
  actorsActivity,
92
97
  isOriginalApprovalStep: step.isOriginalApprovalStep,
93
98
  displayPendingApproverAsAdmin: (0, helpers_1.isSodAdminFallbackEligibleForStep)(sodExcludedApproverUserId, isAdminFallbackApprover, actorsActivity),
99
+ showSodAdminLabel: (0, helpers_1.shouldShowSodAdminLabel)(sodExcludedApproverUserId, actorsActivity, createdBy),
94
100
  };
95
101
  }),
96
102
  };
@@ -17,6 +17,7 @@ import { RemiActivity } from './reimbursement/remiDetailView/remiDetailViewSelec
17
17
  export declare const isUserActorOnApprovalStep: (userId: ID, stepActorsActivity: ActorActivityWithUser[]) => boolean;
18
18
  export declare const isSodExcludedViewerBlocked: (sodExcludedApproverUserId?: ID, signedInUserId?: ID, stepActorsActivity?: ActorActivityWithUser[]) => boolean;
19
19
  export declare const isSodAdminFallbackEligibleForStep: (sodExcludedApproverUserId?: ID, isAdminFallbackApprover?: boolean, stepActorsActivity?: ActorActivityWithUser[]) => boolean;
20
+ export declare const shouldShowSodAdminLabel: (sodExcludedApproverUserId?: ID, stepActorsActivity?: ActorActivityWithUser[], entitySubjectUserId?: ID) => boolean;
20
21
  export declare const getLatestApprovalDate: (allActivities: BillActivity[] | RemiActivity[]) => ZeniDate | undefined;
21
22
  export declare function getSpendManagementEffectiveListPeriod(): import("../..").TimePeriod;
22
23
  export declare const getSelectedCompanyOfficer: (verificationDetails: BusinessVerificationDetails) => CompanyOfficersDetails | undefined;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.toSameDayAchDisablementConfig = exports.checkIfLowBalance = exports.getReportIDPlusForecastIDFromSetupViewType = exports.isAwaitingMarkAsPaid = exports.isPaymentMethodOutsideZeni = exports.toAccountsPromoConfig = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.getActualPaymentDate = exports.accountTypeSubConfigCodeToAccType = exports.isRecurringConfigChanged = exports.updateRecurringBillDetails = exports.getPaymentDateFromVendorReceiveDate = exports.getSelectedCompanyOfficer = exports.getLatestApprovalDate = exports.isSodAdminFallbackEligibleForStep = exports.isSodExcludedViewerBlocked = exports.isUserActorOnApprovalStep = void 0;
6
+ exports.toSameDayAchDisablementConfig = exports.checkIfLowBalance = exports.getReportIDPlusForecastIDFromSetupViewType = exports.isAwaitingMarkAsPaid = exports.isPaymentMethodOutsideZeni = exports.toAccountsPromoConfig = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.getActualPaymentDate = exports.accountTypeSubConfigCodeToAccType = exports.isRecurringConfigChanged = exports.updateRecurringBillDetails = exports.getPaymentDateFromVendorReceiveDate = exports.getSelectedCompanyOfficer = exports.getLatestApprovalDate = exports.shouldShowSodAdminLabel = exports.isSodAdminFallbackEligibleForStep = exports.isSodExcludedViewerBlocked = exports.isUserActorOnApprovalStep = void 0;
7
7
  exports.getSpendManagementEffectiveListPeriod = getSpendManagementEffectiveListPeriod;
8
8
  exports.showReimbursementPromoPage = showReimbursementPromoPage;
9
9
  exports.showBillPayPromoPage = showBillPayPromoPage;
@@ -33,6 +33,19 @@ const isSodAdminFallbackEligibleForStep = (sodExcludedApproverUserId, isAdminFal
33
33
  pendingResolvedApprovers.every((activity) => getUserActorId(activity) === sodExcludedApproverUserId));
34
34
  };
35
35
  exports.isSodAdminFallbackEligibleForStep = isSodAdminFallbackEligibleForStep;
36
+ const isSodExcludedUserSolePendingApproverOnStep = (sodExcludedApproverUserId, stepActorsActivity = []) => {
37
+ if (sodExcludedApproverUserId == null) {
38
+ return false;
39
+ }
40
+ const pendingResolvedApprovers = stepActorsActivity.filter((activity) => activity.activity === 'pending' && getUserActorId(activity) != null);
41
+ return (pendingResolvedApprovers.length > 0 &&
42
+ pendingResolvedApprovers.every((activity) => getUserActorId(activity) === sodExcludedApproverUserId));
43
+ };
44
+ const shouldShowSodAdminLabel = (sodExcludedApproverUserId, stepActorsActivity = [], entitySubjectUserId) => sodExcludedApproverUserId != null &&
45
+ entitySubjectUserId != null &&
46
+ sodExcludedApproverUserId === entitySubjectUserId &&
47
+ isSodExcludedUserSolePendingApproverOnStep(sodExcludedApproverUserId, stepActorsActivity);
48
+ exports.shouldShowSodAdminLabel = shouldShowSodAdminLabel;
36
49
  const getLatestApprovalDate = (allActivities) => {
37
50
  let allStepsWithStatus = [];
38
51
  let allApprovedActions = [];
@@ -7,7 +7,6 @@ import { fetchUserFinancialAccount } from '../../../../userFinancialAccount/user
7
7
  import { fetchMerchantList } from '../../../merchantList/merchantListReducer';
8
8
  import { fetchReimbursementConfig } from '../../reimbursementConfig/reimbursementConfigReducer';
9
9
  import { fetchRemiDetail } from '../../remiDetailView/remiDetailViewReducer';
10
- import { fetchRemiSetupApproverView } from '../../remiSetupApproverView/remiSetupApproverViewReducer';
11
10
  import { fetchEditRemiDetailPage, fetchRemiAndInitializeLocalStore, updatesPaymentToInLocalStore } from '../editRemiViewReducer';
12
- export type ActionType = ReturnType<typeof fetchEditRemiDetailPage> | ReturnType<typeof fetchRemiDetail> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchMerchantList> | ReturnType<typeof fetchUserFinancialAccount> | ReturnType<typeof updatesPaymentToInLocalStore> | ReturnType<typeof fetchReimbursementConfig> | ReturnType<typeof fetchAccountList> | ReturnType<typeof fetchRemiAndInitializeLocalStore> | ReturnType<typeof fetchRemiSetupApproverView>;
11
+ export type ActionType = ReturnType<typeof fetchEditRemiDetailPage> | ReturnType<typeof fetchRemiDetail> | ReturnType<typeof fetchClassList> | ReturnType<typeof fetchMerchantList> | ReturnType<typeof fetchUserFinancialAccount> | ReturnType<typeof updatesPaymentToInLocalStore> | ReturnType<typeof fetchReimbursementConfig> | ReturnType<typeof fetchAccountList> | ReturnType<typeof fetchRemiAndInitializeLocalStore>;
13
12
  export declare const fetchEditRemiDetailPageEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => Observable<ActionType>;
@@ -9,7 +9,6 @@ const userFinancialAccountReducer_1 = require("../../../../userFinancialAccount/
9
9
  const userFinancialAccountSelector_1 = require("../../../../userFinancialAccount/userFinancialAccountSelector");
10
10
  const merchantListReducer_1 = require("../../../merchantList/merchantListReducer");
11
11
  const reimbursementConfigReducer_1 = require("../../reimbursementConfig/reimbursementConfigReducer");
12
- const remiSetupApproverViewReducer_1 = require("../../remiSetupApproverView/remiSetupApproverViewReducer");
13
12
  const editRemiViewReducer_1 = require("../editRemiViewReducer");
14
13
  const fetchEditRemiDetailPageEpic = (actions$, state$) => actions$.pipe((0, operators_1.filter)(editRemiViewReducer_1.fetchEditRemiDetailPage.match), (0, operators_1.mergeMap)((action) => {
15
14
  const { cacheOverride, isLimitedCategoryEnabled, reimbursementId, isShowDeletedReimbursementEnabled, } = action.payload;
@@ -62,17 +61,6 @@ const fetchEditRemiDetailPageEpic = (actions$, state$) => actions$.pipe((0, oper
62
61
  if (reimbursementId != null) {
63
62
  remiDetailActions.push((0, editRemiViewReducer_1.fetchRemiAndInitializeLocalStore)(reimbursementId, false, isShowDeletedReimbursementEnabled));
64
63
  }
65
- else {
66
- const approvalRules = state.remiSetupApproverViewState;
67
- if (approvalRules.fetchState !== 'Completed' &&
68
- approvalRules.fetchState !== 'In-Progress') {
69
- // Side-fetch from the edit-reim page bootstrap. The
70
- // triggering action doesn't carry the V3 flag, so we
71
- // explicitly target v1; v3 tenants re-fetch via their
72
- // own screen connector.
73
- remiDetailActions.push((0, remiSetupApproverViewReducer_1.fetchRemiSetupApproverView)(true, false, false, false));
74
- }
75
- }
76
64
  }
77
65
  return (0, rxjs_1.concat)((0, rxjs_1.from)(remiDetailActions));
78
66
  }));
@@ -44,6 +44,7 @@ export interface StepWithStatus extends StepWithUser {
44
44
  actorsActivity: ActorActivityWithUser[];
45
45
  isOriginalApprovalStep: boolean;
46
46
  displayPendingApproverAsAdmin?: boolean;
47
+ showSodAdminLabel?: boolean;
47
48
  }
48
49
  export interface ActorActivityWithUser extends Actor {
49
50
  activity: ActivityStatus;
@@ -117,7 +117,8 @@ const getRemiDetailView = (state, reimbursementId) => {
117
117
  };
118
118
  exports.getRemiDetailView = getRemiDetailView;
119
119
  const getRemiActivities = (state, reimbursementId, billStageCode) => {
120
- const { remiDetailViewState, approvalRuleState, entityApprovalStatusState, userState, } = state;
120
+ const { remiDetailViewState, approvalRuleState, entityApprovalStatusState, userState, reimbursementState, } = state;
121
+ const reimburseeUserId = reimbursementState.reimbursementById[reimbursementId]?.reimburseeUserId;
121
122
  const remiTransactionDetails = (0, get_1.default)(remiDetailViewState.remiDetailById, reimbursementId, undefined);
122
123
  let remiActivities = [];
123
124
  if (remiTransactionDetails != null) {
@@ -179,6 +180,7 @@ const getRemiActivities = (state, reimbursementId, billStageCode) => {
179
180
  actorsActivity,
180
181
  isOriginalApprovalStep: step.isOriginalApprovalStep,
181
182
  displayPendingApproverAsAdmin: (0, helpers_1.isSodAdminFallbackEligibleForStep)(sodExcludedApproverUserId, isAdminFallbackApprover, actorsActivity),
183
+ showSodAdminLabel: (0, helpers_1.shouldShowSodAdminLabel)(sodExcludedApproverUserId, actorsActivity, reimburseeUserId),
182
184
  };
183
185
  }),
184
186
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "5.1.68-betaDI2",
3
+ "version": "5.1.69",
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",