@zeniai/client-epic-state 5.1.61 → 5.1.62-betaRD2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/coreEpics.js +3 -2
- package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +2 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +2 -0
- package/lib/entity/jeSchedules/jeSchedulesSelector.d.ts +4 -0
- package/lib/entity/jeSchedules/jeSchedulesSelector.js +11 -1
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +2 -0
- package/lib/entity/notificationRegistry/notificationRegistryPayload.d.ts +18 -0
- package/lib/entity/notificationRegistry/notificationRegistryPayload.js +28 -0
- package/lib/entity/notificationRegistry/notificationRegistryReducer.d.ts +10 -0
- package/lib/entity/notificationRegistry/notificationRegistryReducer.js +50 -0
- package/lib/entity/notificationRegistry/notificationRegistrySelector.d.ts +2 -0
- package/lib/entity/notificationRegistry/notificationRegistrySelector.js +10 -0
- package/lib/entity/notificationRegistry/notificationRegistryState.d.ts +32 -0
- package/lib/entity/notificationRegistry/notificationRegistryState.js +10 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
- package/lib/entity/tenant/clearAllEpic.js +4 -0
- package/lib/entity/tenant/tenantReducer.d.ts +4 -1
- package/lib/entity/tenant/tenantReducer.js +8 -2
- package/lib/entity/tenant/tenantSelector.d.ts +1 -0
- package/lib/entity/tenant/tenantSelector.js +4 -0
- package/lib/entity/transaction/scheduleTransactionHelper.d.ts +15 -0
- package/lib/entity/transaction/scheduleTransactionHelper.js +43 -0
- package/lib/epic.d.ts +9 -1
- package/lib/epic.js +9 -1
- package/lib/esm/coreEpics.js +3 -2
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +2 -0
- package/lib/esm/entity/jeSchedules/jeSchedulesSelector.js +11 -1
- package/lib/esm/entity/notificationRegistry/notificationRegistryPayload.js +24 -0
- package/lib/esm/entity/notificationRegistry/notificationRegistryReducer.js +46 -0
- package/lib/esm/entity/notificationRegistry/notificationRegistrySelector.js +6 -0
- package/lib/esm/entity/notificationRegistry/notificationRegistryState.js +5 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +3 -0
- package/lib/esm/entity/tenant/clearAllEpic.js +4 -0
- package/lib/esm/entity/tenant/tenantReducer.js +7 -1
- package/lib/esm/entity/tenant/tenantSelector.js +3 -0
- package/lib/esm/entity/transaction/scheduleTransactionHelper.js +39 -0
- package/lib/esm/epic.js +9 -1
- package/lib/esm/index.js +14 -6
- package/lib/esm/reducer.js +6 -0
- package/lib/esm/view/companyView/companyViewReducer.js +68 -1
- package/lib/esm/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +2 -1
- package/lib/esm/view/companyView/epic/companyPassport/projects/disableAccountingProjectsEpic.js +56 -0
- package/lib/esm/view/companyView/epic/companyPassport/projects/enableAccountingProjectsEpic.js +37 -0
- package/lib/esm/view/companyView/epic/companyPassport/projects/resumeEnableAccountingProjectsEpic.js +73 -0
- package/lib/esm/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +2 -1
- package/lib/esm/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +2 -1
- package/lib/esm/view/companyView/types/companyPassport/companyPassportViewState.js +5 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +15 -2
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +21 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +110 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +44 -0
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +22 -0
- package/lib/esm/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +152 -0
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +126 -6
- package/lib/esm/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +1 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +71 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +78 -11
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +3 -6
- package/lib/esm/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +116 -0
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesEndpoint.js +5 -0
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewPayload.js +36 -0
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewReducer.js +222 -0
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewSelector.js +25 -0
- package/lib/esm/view/notificationPreferencesView/notificationPreferencesViewState.js +4 -0
- package/lib/esm/view/settingsView/epic/fetchNotificationSettingsEpic.js +34 -2
- package/lib/esm/view/settingsView/epic/saveNotificationSettingsEpic.js +2 -1
- package/lib/esm/view/settingsView/settingsViewHelpers.js +3 -2
- package/lib/index.d.ts +17 -8
- package/lib/index.js +85 -47
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/view/common/recurringViewHelper.d.ts +2 -2
- package/lib/view/companyView/companyViewReducer.d.ts +9 -1
- package/lib/view/companyView/companyViewReducer.js +70 -3
- package/lib/view/companyView/epic/companyPassport/dismissCapitalizationOnboardingEpic.js +2 -1
- package/lib/view/companyView/epic/companyPassport/projects/disableAccountingProjectsEpic.d.ts +10 -0
- package/lib/view/companyView/epic/companyPassport/projects/disableAccountingProjectsEpic.js +60 -0
- package/lib/view/companyView/epic/companyPassport/projects/enableAccountingProjectsEpic.d.ts +11 -0
- package/lib/view/companyView/epic/companyPassport/projects/enableAccountingProjectsEpic.js +41 -0
- package/lib/view/companyView/epic/companyPassport/projects/resumeEnableAccountingProjectsEpic.d.ts +13 -0
- package/lib/view/companyView/epic/companyPassport/projects/resumeEnableAccountingProjectsEpic.js +77 -0
- package/lib/view/companyView/epic/companyPassport/updateAccountingClassesEnabledEpic.js +2 -1
- package/lib/view/companyView/epic/companyPassport/updateCapitalizationAccountThresholdEpic.js +2 -1
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.d.ts +2 -0
- package/lib/view/companyView/types/companyPassport/companyPassportViewState.js +5 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulesEpic.js +14 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/initializeNewScheduleEpic.js +25 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.d.ts +45 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/saveNewScheduleEpic.js +114 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/newSchedule/searchTransactionsForNewScheduleEpic.js +48 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.d.ts +6 -0
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +26 -0
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.d.ts +43 -0
- package/lib/view/expenseAutomationView/helpers/newScheduleLocalDataHelper.js +158 -0
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/jeSchedulesPayload.d.ts +1 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +36 -8
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +128 -7
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.d.ts +25 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeNewScheduleViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/jeSchedulesSelectorTypes.d.ts +29 -4
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.d.ts +10 -0
- package/lib/view/expenseAutomationView/selectors/jeNewScheduleViewSelector.js +76 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.d.ts +1 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +80 -11
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +53 -6
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +5 -8
- package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.d.ts +40 -0
- package/lib/view/notificationPreferencesView/epics/saveNotificationPreferencesEpic.js +120 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesEndpoint.d.ts +2 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesEndpoint.js +9 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.d.ts +7 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewPayload.js +41 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.d.ts +30 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewReducer.js +226 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.d.ts +7 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewSelector.js +32 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewState.d.ts +14 -0
- package/lib/view/notificationPreferencesView/notificationPreferencesViewState.js +8 -0
- package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.d.ts +9 -1
- package/lib/view/settingsView/epic/fetchNotificationSettingsEpic.js +34 -2
- package/lib/view/settingsView/epic/saveNotificationSettingsEpic.js +2 -1
- package/lib/view/settingsView/settingsViewHelpers.d.ts +1 -1
- package/lib/view/settingsView/settingsViewHelpers.js +3 -2
- package/lib/view/settingsView/settingsViewPayload.d.ts +4 -0
- package/lib/view/settingsView/settingsViewState.d.ts +1 -1
- package/package.json +1 -1
package/lib/coreEpics.js
CHANGED
|
@@ -36,7 +36,8 @@ const verifyUserEpic_1 = require("./view/commonVendorView/vendorView/epics/twoFa
|
|
|
36
36
|
// ── Company Config Epics ─────────────────────────────────────────────
|
|
37
37
|
const companyConfigEpic_1 = require("./view/companyConfigView/companyConfigEpic");
|
|
38
38
|
const fetchCompanyMetaDataEpic_1 = require("./view/companyView/epic/fetchCompanyMetaDataEpic");
|
|
39
|
-
|
|
39
|
+
const saveNotificationPreferencesEpic_1 = require("./view/notificationPreferencesView/epics/saveNotificationPreferencesEpic");
|
|
40
|
+
// ── Notification Epics ───────────────────────────────────────────────
|
|
40
41
|
const fetchNotificationUnreadCountEpic_1 = require("./view/notificationView/epics/fetchNotificationUnreadCountEpic");
|
|
41
42
|
// ── User Profile Epics ───────────────────────────────────────────────
|
|
42
43
|
const fetchMyProfileEpic_1 = require("./view/settingsView/epic/fetchMyProfileEpic");
|
|
@@ -59,7 +60,7 @@ resendOtpEpic_1.resendOtpEpic, sendOtpEpic_1.sendOtpEpic, verifyOtpEpic_1.verify
|
|
|
59
60
|
// Company config
|
|
60
61
|
companyConfigEpic_1.fetchCompanyConfigEpic, fetchCompanyMetaDataEpic_1.fetchCompanyMetaDataEpic,
|
|
61
62
|
// Notifications
|
|
62
|
-
fetchNotificationUnreadCountEpic_1.fetchNotificationUnreadCountEpic,
|
|
63
|
+
fetchNotificationUnreadCountEpic_1.fetchNotificationUnreadCountEpic, saveNotificationPreferencesEpic_1.saveNotificationPreferencesEpic,
|
|
63
64
|
// User profile
|
|
64
65
|
fetchMyProfileEpic_1.fetchMyProfileEpic, fetchMyProfileViewEpic_1.fetchMyProfileViewEpic);
|
|
65
66
|
exports.default = coreRootEpic;
|
|
@@ -63,7 +63,7 @@ export interface CreditLimitFrequency {
|
|
|
63
63
|
code: CreditLimitFrequencyCodeType;
|
|
64
64
|
name: string;
|
|
65
65
|
}
|
|
66
|
-
export declare const toCreditLimitFrequencyCodeType: (v: string) => "
|
|
66
|
+
export declare const toCreditLimitFrequencyCodeType: (v: string) => "daily" | "weekly" | "monthly" | "quarterly" | "yearly";
|
|
67
67
|
export type CreditLimitFrequencyCodeType = ReturnType<typeof toCreditLimitFrequencyCodeType>;
|
|
68
68
|
interface CardStatus {
|
|
69
69
|
code: CardStatusCodeType;
|
|
@@ -72,6 +72,8 @@ export interface JEScheduledTransactionPayload {
|
|
|
72
72
|
updated_by: UserPayload;
|
|
73
73
|
vendor: VendorPayload;
|
|
74
74
|
ai_summaries?: JEScheduleAISummariesPayload;
|
|
75
|
+
confidence_score?: number | null;
|
|
76
|
+
create_time?: string | null;
|
|
75
77
|
created_by?: UserPayload;
|
|
76
78
|
end_date?: string | null;
|
|
77
79
|
recommendations?: JEScheduleRecommendationsPayload;
|
|
@@ -261,6 +261,7 @@ function toJEScheduledTransaction(payload) {
|
|
|
261
261
|
updatedByUserID: payload.updated_by.user_id,
|
|
262
262
|
balanceAsOfToday: payload.balance ?? undefined,
|
|
263
263
|
updatedAt: payload.updated_at != null ? (0, zeniDayJS_1.date)(payload.updated_at) : undefined,
|
|
264
|
+
createTime: payload.create_time != null ? (0, zeniDayJS_1.date)(payload.create_time) : undefined,
|
|
264
265
|
jeCredit: {
|
|
265
266
|
accountId: payload.je_credit_account_id ?? undefined,
|
|
266
267
|
accountingClassId: payload.je_credit_accounting_class_id ?? undefined,
|
|
@@ -285,6 +286,7 @@ function toJEScheduledTransaction(payload) {
|
|
|
285
286
|
: {},
|
|
286
287
|
scheduledJournalEntry: [],
|
|
287
288
|
aiSummaries: toJEScheduleAISummaries(payload.ai_summaries),
|
|
289
|
+
confidenceScore: payload.confidence_score ?? undefined,
|
|
288
290
|
createdByUserID: payload.created_by?.user_id ?? undefined,
|
|
289
291
|
recommendations: toJEScheduleRecommendations(payload.recommendations),
|
|
290
292
|
};
|
|
@@ -55,13 +55,17 @@ export interface JEScheduledTransaction {
|
|
|
55
55
|
accountingClass?: Class;
|
|
56
56
|
};
|
|
57
57
|
jeScheduleTransactionKey: JEScheduleTransactionKey;
|
|
58
|
+
lifecycleTotal: number;
|
|
58
59
|
otherAttributes: JEScheduleOtherAttributes;
|
|
60
|
+
postedCount: number;
|
|
59
61
|
scheduledJournalEntry: ScheduledJournalEntry[];
|
|
60
62
|
status: ScheduleStatus;
|
|
61
63
|
vendor: Vendor;
|
|
62
64
|
aiSummaries?: JEScheduleAISummaries;
|
|
63
65
|
balanceAsOfToday?: Amount;
|
|
66
|
+
confidenceScore?: number;
|
|
64
67
|
createdByUser?: User;
|
|
68
|
+
createTime?: ZeniDate;
|
|
65
69
|
dayOfPostingDate?: ScheduleDaysOfMonth;
|
|
66
70
|
endDate?: ZeniDate;
|
|
67
71
|
jeScheduleId?: ID;
|
|
@@ -41,6 +41,8 @@ const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
|
|
|
41
41
|
reportId: 'class_list',
|
|
42
42
|
})
|
|
43
43
|
: undefined;
|
|
44
|
+
const postedCount = scheduledJournalEntry.filter((sje) => sje.status.code === 'posted' || sje.status.code === 'recorded').length;
|
|
45
|
+
const lifecycleTotal = period ?? scheduledJournalEntry.length;
|
|
44
46
|
return {
|
|
45
47
|
jeScheduleId,
|
|
46
48
|
otherAttributes,
|
|
@@ -49,6 +51,8 @@ const getJEAccruedScheduleByJEScheduleKey = (JEScheduleKey, state) => {
|
|
|
49
51
|
updatedAt,
|
|
50
52
|
currencyCode,
|
|
51
53
|
currencySymbol,
|
|
54
|
+
lifecycleTotal,
|
|
55
|
+
postedCount,
|
|
52
56
|
jeCredit: {
|
|
53
57
|
accountingClass: classCredit,
|
|
54
58
|
account: accountCredit,
|
|
@@ -77,7 +81,7 @@ exports.getJEAccruedScheduleByJEScheduleKey = getJEAccruedScheduleByJEScheduleKe
|
|
|
77
81
|
const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransactionKey, state) => {
|
|
78
82
|
const { jeSchedulesState, vendorState, accountState, userState, classState, transactionState, } = state;
|
|
79
83
|
const jeScheduleTransactionState = (0, get_1.default)(jeSchedulesState.schedulesByTransactionKey, jeScheduleTransactionKey);
|
|
80
|
-
const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, recommendations, } = jeScheduleTransactionState;
|
|
84
|
+
const { period, updatedByUserID: updatedBy, createdByUserID: createdBy, createTime, vendorId, jeCredit, jeDebit, currencyCode, currencySymbol, balanceAsOfToday, baseTransaction, startDate, endDate, status, updatedAt, jeScheduleId, scheduledJournalEntry, dayOfPostingDate: postingDate, lastDayOfMonth, otherAttributes, jeScheduleType, aiSummaries, confidenceScore, recommendations, } = jeScheduleTransactionState;
|
|
81
85
|
const vendorDetails = (0, vendorSelector_1.getVendorByVendorId)(vendorState, vendorId);
|
|
82
86
|
if (vendorDetails == null) {
|
|
83
87
|
throw new Error(`Vendor with ${vendorId} doesn't exist`);
|
|
@@ -106,6 +110,8 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
|
|
|
106
110
|
reportId: 'class_list',
|
|
107
111
|
})
|
|
108
112
|
: undefined;
|
|
113
|
+
const postedCount = scheduledJournalEntry.filter((sje) => sje.status.code === 'posted' || sje.status.code === 'recorded').length;
|
|
114
|
+
const lifecycleTotal = period ?? scheduledJournalEntry.length;
|
|
109
115
|
return {
|
|
110
116
|
jeScheduleId,
|
|
111
117
|
jeScheduleType,
|
|
@@ -114,6 +120,8 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
|
|
|
114
120
|
updatedByUser: userDetails,
|
|
115
121
|
updatedAt: updatedAt,
|
|
116
122
|
period,
|
|
123
|
+
lifecycleTotal,
|
|
124
|
+
postedCount,
|
|
117
125
|
balanceAsOfToday: balanceAsOfToday != null
|
|
118
126
|
? (0, amount_1.toAmount)(balanceAsOfToday, currencyCode, currencySymbol)
|
|
119
127
|
: undefined,
|
|
@@ -136,7 +144,9 @@ const getJEScheduledTransactionByJEScheduleTransactionKey = (jeScheduleTransacti
|
|
|
136
144
|
},
|
|
137
145
|
scheduledJournalEntry,
|
|
138
146
|
aiSummaries,
|
|
147
|
+
confidenceScore,
|
|
139
148
|
createdByUser: createdByUserDetails,
|
|
149
|
+
createTime,
|
|
140
150
|
recommendations,
|
|
141
151
|
};
|
|
142
152
|
};
|
|
@@ -94,7 +94,9 @@ export interface JEScheduledTransactionState {
|
|
|
94
94
|
vendorId: ID;
|
|
95
95
|
aiSummaries?: JEScheduleAISummaries;
|
|
96
96
|
balanceAsOfToday?: number;
|
|
97
|
+
confidenceScore?: number;
|
|
97
98
|
createdByUserID?: ID;
|
|
99
|
+
createTime?: ZeniDate;
|
|
98
100
|
dayOfPostingDate?: ScheduleDaysOfMonth;
|
|
99
101
|
endDate?: ZeniDate;
|
|
100
102
|
jeScheduleId?: ID;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NotificationRegistry } from './notificationRegistryState';
|
|
2
|
+
export interface NotificationEventPayload {
|
|
3
|
+
channels: string[];
|
|
4
|
+
default_enabled: Record<string, boolean>;
|
|
5
|
+
display_name: string;
|
|
6
|
+
event_id: string;
|
|
7
|
+
suppressible: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface NotificationGroupPayload {
|
|
10
|
+
display_name: string;
|
|
11
|
+
events: NotificationEventPayload[];
|
|
12
|
+
group_id: string;
|
|
13
|
+
}
|
|
14
|
+
export interface NotificationRegistryPayload {
|
|
15
|
+
frequency_options: string[];
|
|
16
|
+
groups: NotificationGroupPayload[];
|
|
17
|
+
}
|
|
18
|
+
export declare const mapNotificationRegistryPayloadToRegistry: (payload: NotificationRegistryPayload) => NotificationRegistry;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mapNotificationRegistryPayloadToRegistry = void 0;
|
|
4
|
+
const notificationRegistryState_1 = require("./notificationRegistryState");
|
|
5
|
+
const mapDefaultEnabled = (raw) => {
|
|
6
|
+
const out = {};
|
|
7
|
+
Object.entries(raw).forEach(([channel, enabled]) => {
|
|
8
|
+
out[(0, notificationRegistryState_1.toNotificationChannel)(channel)] = enabled;
|
|
9
|
+
});
|
|
10
|
+
return out;
|
|
11
|
+
};
|
|
12
|
+
const mapEvent = (payload) => ({
|
|
13
|
+
channels: payload.channels.map(notificationRegistryState_1.toNotificationChannel),
|
|
14
|
+
defaultEnabled: mapDefaultEnabled(payload.default_enabled),
|
|
15
|
+
displayName: payload.display_name,
|
|
16
|
+
eventId: payload.event_id,
|
|
17
|
+
suppressible: payload.suppressible,
|
|
18
|
+
});
|
|
19
|
+
const mapGroup = (payload) => ({
|
|
20
|
+
displayName: payload.display_name,
|
|
21
|
+
events: payload.events.map(mapEvent),
|
|
22
|
+
groupId: payload.group_id,
|
|
23
|
+
});
|
|
24
|
+
const mapNotificationRegistryPayloadToRegistry = (payload) => ({
|
|
25
|
+
frequencyOptions: payload.frequency_options.map(notificationRegistryState_1.toNotificationFrequency),
|
|
26
|
+
groups: payload.groups.map(mapGroup),
|
|
27
|
+
});
|
|
28
|
+
exports.mapNotificationRegistryPayloadToRegistry = mapNotificationRegistryPayloadToRegistry;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NotificationRegistryPayload } from './notificationRegistryPayload';
|
|
2
|
+
import { NotificationRegistryState } from './notificationRegistryState';
|
|
3
|
+
export declare const initialState: NotificationRegistryState;
|
|
4
|
+
export interface UpdateNotificationRegistryPayload {
|
|
5
|
+
registry: NotificationRegistryPayload | undefined;
|
|
6
|
+
registryEpochAtDispatch: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const clearAllNotificationRegistry: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notificationRegistry/clearAllNotificationRegistry">, updateNotificationRegistry: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdateNotificationRegistryPayload, "notificationRegistry/updateNotificationRegistry">;
|
|
9
|
+
declare const _default: import("redux").Reducer<NotificationRegistryState>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.updateNotificationRegistry = exports.clearAllNotificationRegistry = exports.initialState = void 0;
|
|
5
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
+
const notificationRegistryPayload_1 = require("./notificationRegistryPayload");
|
|
7
|
+
exports.initialState = { registryEpoch: 0 };
|
|
8
|
+
const notificationRegistry = (0, toolkit_1.createSlice)({
|
|
9
|
+
name: 'notificationRegistry',
|
|
10
|
+
initialState: exports.initialState,
|
|
11
|
+
reducers: {
|
|
12
|
+
clearAllNotificationRegistry(draft) {
|
|
13
|
+
// Bump `registryEpoch` (don't rewind to 0) so any settings-envelope
|
|
14
|
+
// GET that was already in flight when the tenant switched is treated
|
|
15
|
+
// as stale: its captured `registryEpochAtDispatch` is now lower than
|
|
16
|
+
// the current epoch, so `updateNotificationRegistry` skips its write.
|
|
17
|
+
// Mirrors the `saveEpoch` bump in `clearAllNotificationPreferencesView`
|
|
18
|
+
// — Cursor Bugbot 67d6918e. Returning `initialState` verbatim would
|
|
19
|
+
// rewind the counter and let a stale in-flight GET restore A's
|
|
20
|
+
// registry over B's.
|
|
21
|
+
return { registryEpoch: draft.registryEpoch + 1 };
|
|
22
|
+
},
|
|
23
|
+
updateNotificationRegistry(draft, action) {
|
|
24
|
+
// Stale-response guard (Cursor Bugbot 67d6918e): if the fetch epic
|
|
25
|
+
// captured a `registryEpoch` lower than the current one, a clear
|
|
26
|
+
// (tenant switch) has landed since this GET dispatched. The response
|
|
27
|
+
// carries the prior tenant's snapshot and must not restore it — nor,
|
|
28
|
+
// when it omits the registry, wipe the fresh one. Skip entirely.
|
|
29
|
+
if (action.payload.registryEpochAtDispatch < draft.registryEpoch) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
// Gate-off / absent-registry case: an envelope that omits
|
|
33
|
+
// `task_checklist_registry` CLEARS so tenant B doesn't inherit A's
|
|
34
|
+
// Task Checklist section. Guarded by the epoch check above so a stale
|
|
35
|
+
// absent-response can't wipe a fresh registry.
|
|
36
|
+
if (action.payload.registry == null) {
|
|
37
|
+
draft.registry = undefined;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
// Full-replace contract: the registry payload is atomic — every fetch
|
|
41
|
+
// returns the complete group/event tree. If the backend ever ships a
|
|
42
|
+
// partial registry response, this write MUST switch to a merge (mirror
|
|
43
|
+
// the preferences slice's `mergePreferences`). Do not assume the
|
|
44
|
+
// current payload is partial without also updating this reducer.
|
|
45
|
+
draft.registry = (0, notificationRegistryPayload_1.mapNotificationRegistryPayloadToRegistry)(action.payload.registry);
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
_a = notificationRegistry.actions, exports.clearAllNotificationRegistry = _a.clearAllNotificationRegistry, exports.updateNotificationRegistry = _a.updateNotificationRegistry;
|
|
50
|
+
exports.default = notificationRegistry.reducer;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNotificationRegistry = void 0;
|
|
4
|
+
// Current behavior: a null / undefined registry means the whole notification
|
|
5
|
+
// section is hidden by consumers. This conflates two distinct states —
|
|
6
|
+
// "user has no saved preferences yet" vs "the Task Checklist feature gate is
|
|
7
|
+
// off for this tenant". Both currently surface as `undefined`. Distinguishing
|
|
8
|
+
// them (e.g. an explicit `gate_off` signal from the server) is a follow-up.
|
|
9
|
+
const getNotificationRegistry = (slice) => slice.registry;
|
|
10
|
+
exports.getNotificationRegistry = getNotificationRegistry;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const NOTIFICATION_CHANNELS: readonly ["email", "slack", "in_app"];
|
|
2
|
+
export type NotificationChannel = (typeof NOTIFICATION_CHANNELS)[number];
|
|
3
|
+
export declare const toNotificationChannel: (raw: string) => NotificationChannel;
|
|
4
|
+
export declare const NOTIFICATION_FREQUENCIES: readonly ["instant", "daily"];
|
|
5
|
+
export type NotificationFrequency = (typeof NOTIFICATION_FREQUENCIES)[number];
|
|
6
|
+
export declare const toNotificationFrequency: (raw: string) => NotificationFrequency;
|
|
7
|
+
export interface RegistryNotificationEvent {
|
|
8
|
+
channels: NotificationChannel[];
|
|
9
|
+
defaultEnabled: Partial<Record<NotificationChannel, boolean>>;
|
|
10
|
+
displayName: string;
|
|
11
|
+
eventId: string;
|
|
12
|
+
suppressible: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface RegistryNotificationGroup {
|
|
15
|
+
displayName: string;
|
|
16
|
+
events: RegistryNotificationEvent[];
|
|
17
|
+
groupId: string;
|
|
18
|
+
}
|
|
19
|
+
export interface NotificationRegistry {
|
|
20
|
+
frequencyOptions: NotificationFrequency[];
|
|
21
|
+
groups: RegistryNotificationGroup[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The registry is a singleton (not per-tenant). We keep the wrapper so
|
|
25
|
+
* Immer/RTK can safely represent "cleared" as `registry: undefined` — a bare
|
|
26
|
+
* top-level `undefined` state is not observable by Immer, which prevents
|
|
27
|
+
* `clearAllNotificationRegistry` from taking effect.
|
|
28
|
+
*/
|
|
29
|
+
export interface NotificationRegistryState {
|
|
30
|
+
registryEpoch: number;
|
|
31
|
+
registry?: NotificationRegistry;
|
|
32
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toNotificationFrequency = exports.NOTIFICATION_FREQUENCIES = exports.toNotificationChannel = exports.NOTIFICATION_CHANNELS = void 0;
|
|
4
|
+
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
5
|
+
exports.NOTIFICATION_CHANNELS = ['email', 'slack', 'in_app'];
|
|
6
|
+
const toNotificationChannel = (raw) => (0, stringToUnion_1.stringToUnion)(raw, exports.NOTIFICATION_CHANNELS);
|
|
7
|
+
exports.toNotificationChannel = toNotificationChannel;
|
|
8
|
+
exports.NOTIFICATION_FREQUENCIES = ['instant', 'daily'];
|
|
9
|
+
const toNotificationFrequency = (raw) => (0, stringToUnion_1.stringToUnion)(raw, exports.NOTIFICATION_FREQUENCIES);
|
|
10
|
+
exports.toNotificationFrequency = toNotificationFrequency;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const toSnackbarMessageSection: (v: string) => "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_approval_reorder" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_approval_reorder" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed";
|
|
1
|
+
export declare const toSnackbarMessageSection: (v: string) => "common" | "transactionDetails_updatingPastTransactions" | "transactionDetails_transactionUpdated" | "cockpit_month_end_email_sent" | "cockpit_month_end_email_save" | "cockpit_month_end_email_attachment_upload" | "je_bill_link" | "je_posted" | "audit_score_updated" | "people_invite_people" | "people_invite_multiple_people" | "people_delete_person" | "people_update_person" | "reimbursement_updated" | "reimbursement_deleted" | "reimbursement_cancelled_deleted" | "reimbursement_cancelled" | "reimbursement_approved" | "reimbursement_rejected" | "reimbursement_sent_for_approval" | "account_added" | "business_verification_save" | "business_verification_submit" | "business_verification_from_bills_submit" | "plaid_connection" | "unlink_deposit_account" | "reimbursement_setup" | "reimbursement_approval_create" | "reimbursement_duplicate_approval_create" | "reimbursement_approval_update" | "reimbursement_duplicate_approval_update" | "reimbursement_approval_delete" | "reimbursement_approval_reorder" | "reimbursement_create_mileage" | "reimbursement_update_mileage" | "reimbursement_accept_term" | "reimbursement_accept_employee_term" | "reimbursement_bulk_submit" | "reimbursement_bulk_processed" | "bill_pay_setup" | "zeni_accounts_setup" | "bill_pay_approval_create" | "bill_pay_duplicate_approval_create" | "bill_pay_approval_update" | "bill_pay_duplicate_approval_update" | "bill_pay_approval_delete" | "bill_pay_approval_reorder" | "bill_pay_updated" | "bill_pay_deleted" | "bill_pay_cancelled_deleted" | "bill_pay_cancelled" | "bill_pay_approved" | "real_time_approver_added" | "bill_pay_rejected" | "bill_pay_sent_for_approval" | "bill_pay_accept_term" | "bill_pay_bulk_submit" | "bill_pay_bulk_processed" | "bill_pay_refund" | "bill_pay_retry" | "bill_pay_marked_as_paid" | "zeni_account_accept_term" | "update_vendor" | "data_refresh_update" | "delete_bank_account" | "create_bank_account" | "create_bank_account_ach" | "create_bank_account_wire" | "create_bank_account_international" | "transfer_money" | "update_zeni_account_nickname" | "create_checking_account" | "deposit_check" | "create_vendor" | "onboarding_customer_view" | "onboarding_customer_view_complete" | "onboarding_customer_identity_verification_save" | "onboarding_customer_identity_verification_submit" | "onboarding_customer_business_verification_save" | "onboarding_customer_business_verification_submit" | "retry_bank_account_connection" | "dashboard_invite_sent" | "onboarding_info_saved" | "approve_original_merchant" | "approve_global_merchant" | "reject_global_merchant" | "create_global_merchant" | "fetch_global_merchant_no_recommendation" | "save_vendor_renamed" | "save_vendor_sent_for_review" | "save_vendor_marked_as_employee" | "save_vendor_marked_as_local_contractor" | "charge_card_setup" | "charge_card_accept_term" | "charge_card_receipt_upload" | "charge_card_resend_invite" | "charge_card_revoke_invite" | "card_policy_created" | "card_policy_updated" | "card_policy_deleted" | "charge_card_update_limit" | "charge_cards_update_limit" | "close_charge_card" | "lock_charge_card" | "lock_charge_card_card_user" | "lock_charge_cards" | "unlock_charge_card" | "unlock_charge_card_card_user" | "unlock_charge_cards" | "close_charge_cards" | "revoke_invite_charge_cards" | "charge_card_express_interest" | "create_schedule" | "save_schedule" | "delete_schedule" | "ignore_schedule" | "save_task_detail" | "fetch_task_detail" | "delete_task" | "archive_task" | "snooze_task" | "unsnooze_task" | "create_tag" | "delete_tag" | "update_charge_card" | "update_charge_card_name" | "update_charge_card_name_card_user" | "issue_charge_card" | "issue_charge_cards" | "notification_settings_saved" | "referral_invite_sent" | "notification_mark_as_read" | "mark_as_complete_schedule" | "cancel_journal_entry" | "settings_accounting_accounts_updated" | "create_card_setup" | "confirm_card_setup" | "add_card_payment_source" | "fetch_payment_sources" | "task_assigned_toast_notification" | "task_due_tomorrow_toast_notification" | "task_deleted_toast_notification" | "task_archived_toast_notification" | "task_overdue_toast_notification" | "task_overdue_toast_notification_creator" | "task_notification_count" | "task_activities_toast_notification" | "task_created_toast_notification" | "task_group_creation_success" | "task_group_deletion_success" | "task_group_update_success" | "primary_funding_account_updated" | "task_time_spent_validation" | "missing_receipts_attachment" | "flux_analysis_unreviewed" | "flux_analysis_reviewed" | "receipt_match" | "receipts_upload" | "receipts_bulk_match" | "billing_address_view" | "express_pay_submit" | "exclude_transaction" | "reconcile" | "save_reconcile_for_later" | "recon_transaction_categorize" | "recon_transaction_match" | "update_debit_card_pin_attempt" | "set_debit_card_pin" | "ai_cfo_create_session_and_submit" | "ai_cfo_chat_session_deleted" | "charge_card_auto_pay_enable" | "charge_card_auto_pay_disable" | "treasury_setup" | "treasury_accept_term" | "treasury_transfer_money" | "treasury_transfer_money_failed" | "auto_transfer_rule_create" | "auto_transfer_rule_update" | "auto_transfer_rule_delete" | "auto_transfer_rule_pause" | "auto_transfer_rule_resume" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "create_transfer_entry" | "reports_resync" | "invalid_phone_number" | "transactions_categorized_updated_failed" | "transaction_categorized_updated_failed" | "transactionsCategorized_transactionsUpdated" | "transactionsCategorized_transactionUpdated" | "transactionCategorized_transactionsUpdated" | "transactionCategorized_transactionUpdated" | "transactionsCategorized_transactionsFailed" | "transactionsCategorized_transactionFailed" | "transactionCategorized_transactionsFailed" | "transactionCategorized_transactionFailed" | "transactionsUpdated_transactionsFailed" | "transactionsUpdated_transactionFailed" | "transactionUpdated_transactionsFailed" | "transactionUpdated_transactionFailed" | "transactionsCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionsUpdated_transactionFailed" | "transactionsCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionsUpdated_transactionsFailed" | "transactionsCategorized_transactionUpdated_transactionFailed" | "transactionCategorized_transactionsUpdated_transactionFailed" | "transactionCategorized_transactionUpdated_transactionsFailed" | "transactionCategorized_transactionUpdated_transactionFailed" | "accounting_classes_enabled_update" | "accounting_projects_enabled_update" | "accounting_projects_qbo_not_enabled" | "capitalization_threshold_update" | "account_excluded_from_reconciliation" | "account_included_in_reconciliation" | "statement_parsing_in_progress" | "statement_parsing_complete" | "ai_accountant_trigger_job" | "oauth_consent_approve" | "oauth_consent_invalid_request" | "credit_agent_update_profile" | "credit_agent_save_macro" | "credit_agent_schedule_cron" | "create_sub_task" | "qbo_connection_already_linked" | "qbo_connection_failed" | "accounting_projects_qbo_reconnect_failed";
|
|
2
2
|
export type SnackbarMessageSections = ReturnType<typeof toSnackbarMessageSection>;
|
|
3
3
|
export declare const toSnackbarMessageSectionTexts: (v: string) => "notification" | "failed" | "success";
|
|
4
4
|
export type SnackbarMessageSectionTexts = ReturnType<typeof toSnackbarMessageSectionTexts>;
|
|
@@ -213,6 +213,8 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
|
|
|
213
213
|
'transactionCategorized_transactionUpdated_transactionsFailed',
|
|
214
214
|
'transactionCategorized_transactionUpdated_transactionFailed',
|
|
215
215
|
'accounting_classes_enabled_update',
|
|
216
|
+
'accounting_projects_enabled_update',
|
|
217
|
+
'accounting_projects_qbo_not_enabled',
|
|
216
218
|
'capitalization_threshold_update',
|
|
217
219
|
'account_excluded_from_reconciliation',
|
|
218
220
|
'account_included_in_reconciliation',
|
|
@@ -227,6 +229,7 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
|
|
|
227
229
|
'create_sub_task',
|
|
228
230
|
'qbo_connection_already_linked',
|
|
229
231
|
'qbo_connection_failed',
|
|
232
|
+
'accounting_projects_qbo_reconnect_failed',
|
|
230
233
|
];
|
|
231
234
|
const toSnackbarMessageSection = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_SNACKBAR_MESSAGE_SECTIONS);
|
|
232
235
|
exports.toSnackbarMessageSection = toSnackbarMessageSection;
|
|
@@ -6,6 +6,7 @@ import { clearAllCreditAgent } from '../../entity/creditAgent/creditAgentReducer
|
|
|
6
6
|
import { clearAllEntityApprovalStatus } from '../../entity/entityApprovalStatus/entityApprovalStatusReducer';
|
|
7
7
|
import { clearAllMonthEndCloseChecks } from '../../entity/monthEndCloseChecks/monthEndCloseChecksReducer';
|
|
8
8
|
import { clearAllNotifications } from '../../entity/notification/notificationReducer';
|
|
9
|
+
import { clearAllNotificationRegistry } from '../../entity/notificationRegistry/notificationRegistryReducer';
|
|
9
10
|
import { clearAllSectionsClassesViewV2 } from '../../entity/sectionClassesViewV2/sectionClassesViewReducer';
|
|
10
11
|
import { clearAllSectionsProjectView } from '../../entity/sectionProjectView/sectionProjectViewReducer';
|
|
11
12
|
import { clearAllTaskGroups } from '../../entity/taskGroup/taskGroupReducer';
|
|
@@ -98,6 +99,7 @@ import { clearAllMonthEndCloseChecksView } from '../../view/monthEndCloseChecksV
|
|
|
98
99
|
import { clearNetBurnOrIncome } from '../../view/netBurnOrIncome/netBurnOrIncomeReducer';
|
|
99
100
|
import { clearNetBurnOrIncomeClassesView } from '../../view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer';
|
|
100
101
|
import { clearNetBurnOrIncomeStoryCard } from '../../view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer';
|
|
102
|
+
import { clearAllNotificationPreferencesView } from '../../view/notificationPreferencesView/notificationPreferencesViewReducer';
|
|
101
103
|
import { clearNotificationView } from '../../view/notificationView/notificationViewReducer';
|
|
102
104
|
import { clearOnboardingCockpitView } from '../../view/onboardingView/cockpitView/onboardingCockpitViewReducer';
|
|
103
105
|
import { clearOnboardingCustomerView } from '../../view/onboardingView/customerView/onboardingCustomerViewReducer';
|
|
@@ -262,7 +264,7 @@ import { clearAllVendors } from '../vendor/vendorReducer';
|
|
|
262
264
|
import { clearAllVendorExpenseTrends } from '../vendorExpense/vendorExpenseReducer';
|
|
263
265
|
import { clearAll } from './tenantReducer';
|
|
264
266
|
type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearAutoTransferRules> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardPolicyDetail> | ReturnType<typeof clearCardPolicyList> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearCreateCardPolicy> | ReturnType<typeof clearCreateTransferEntry> | ReturnType<typeof clearAllCreditAgent> | ReturnType<typeof clearCreditAgentView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFeatureNotificationView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearAllInvoiceDetail> | ReturnType<typeof clearInvoiceList> | ReturnType<typeof resetCreateInvoice> | ReturnType<typeof resetRecordPayment> | ReturnType<typeof resetIssueCreditNote> | ReturnType<typeof resetCreateCreditNote> | ReturnType<typeof clearInvoicingOverview> | ReturnType<typeof clearInvoicingAuditView> | ReturnType<typeof resetEditInvoicingCatalogItemDetailView> | ReturnType<typeof resetEditInvoicingCouponDetailView> | ReturnType<typeof clearInvoicingCouponDetailView> | ReturnType<typeof resetEditInvoicingCustomerDetailView> | ReturnType<typeof resetEditInvoicingSubscriptionDetailView> | ReturnType<typeof clearAllInvoicingCatalogActions> | ReturnType<typeof clearAllInvoicingDataImportActions> | ReturnType<typeof clearInvoicingDataImportView> | ReturnType<typeof clearAllInvoicingDiscountActions> | ReturnType<typeof clearAllInvoicingInvoiceActions> | ReturnType<typeof clearAllInvoicingSubscriptionActions> | ReturnType<typeof clearAllInvoicingDunningActions> | ReturnType<typeof clearAllInvoicingPaymentActions> | ReturnType<typeof resetSaveInvoicingSettings> | ReturnType<typeof clearInvoicingCatalogItemDetailView> | ReturnType<typeof clearInvoicingCatalogListView> | ReturnType<typeof clearInvoicingCouponView> | ReturnType<typeof clearInvoicingCreditNoteDetailView> | ReturnType<typeof clearInvoicingCreditNoteListView> | ReturnType<typeof clearInvoicingCustomerDetailView> | ReturnType<typeof clearInvoicingCustomerListView> | ReturnType<typeof resetInvoicingCustomerPaymentMethod> | ReturnType<typeof resetPromotionalCreditAction> | ReturnType<typeof clearInvoicingDunningCaseDetailView> | ReturnType<typeof clearInvoicingDunningCaseListView> | ReturnType<typeof clearInvoicingConfig> | ReturnType<typeof clearInvoicingSettings> | ReturnType<typeof clearInvoicingSubscriptionDetailView> | ReturnType<typeof clearInvoicingSubscriptionListView> | ReturnType<typeof clearInvoicingTransactionDetailView> | ReturnType<typeof clearInvoicingTransactionListView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearProjectList> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard> | ReturnType<typeof clearZeniOAuthView>;
|
|
265
|
-
type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllInvoices> | ReturnType<typeof clearAllInvoicingCoupons> | ReturnType<typeof clearAllInvoicingCreditNotes> | ReturnType<typeof clearAllInvoicingCustomers> | ReturnType<typeof clearAllInvoicingDunningCases> | ReturnType<typeof clearAllInvoicingPlans> | ReturnType<typeof clearAllInvoicingProducts> | ReturnType<typeof clearAllInvoicingSubscriptions> | ReturnType<typeof clearAllInvoicingTransactions> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSectionsProjectView> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearCannedResponses> | ReturnType<typeof clearCardPolicy> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
|
|
267
|
+
type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllInvoices> | ReturnType<typeof clearAllInvoicingCoupons> | ReturnType<typeof clearAllInvoicingCreditNotes> | ReturnType<typeof clearAllInvoicingCustomers> | ReturnType<typeof clearAllInvoicingDunningCases> | ReturnType<typeof clearAllInvoicingPlans> | ReturnType<typeof clearAllInvoicingProducts> | ReturnType<typeof clearAllInvoicingSubscriptions> | ReturnType<typeof clearAllInvoicingTransactions> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotificationPreferencesView> | ReturnType<typeof clearAllNotificationRegistry> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSectionsProjectView> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearCannedResponses> | ReturnType<typeof clearCardPolicy> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
|
|
266
268
|
export type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
|
|
267
269
|
export declare const clearAllEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<ActionType>;
|
|
268
270
|
export {};
|
|
@@ -10,6 +10,7 @@ const creditAgentReducer_1 = require("../../entity/creditAgent/creditAgentReduce
|
|
|
10
10
|
const entityApprovalStatusReducer_1 = require("../../entity/entityApprovalStatus/entityApprovalStatusReducer");
|
|
11
11
|
const monthEndCloseChecksReducer_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksReducer");
|
|
12
12
|
const notificationReducer_1 = require("../../entity/notification/notificationReducer");
|
|
13
|
+
const notificationRegistryReducer_1 = require("../../entity/notificationRegistry/notificationRegistryReducer");
|
|
13
14
|
const sectionClassesViewReducer_1 = require("../../entity/sectionClassesViewV2/sectionClassesViewReducer");
|
|
14
15
|
const sectionProjectViewReducer_1 = require("../../entity/sectionProjectView/sectionProjectViewReducer");
|
|
15
16
|
const taskGroupReducer_1 = require("../../entity/taskGroup/taskGroupReducer");
|
|
@@ -102,6 +103,7 @@ const monthEndCloseChecksViewReducer_1 = require("../../view/monthEndCloseChecks
|
|
|
102
103
|
const netBurnOrIncomeReducer_1 = require("../../view/netBurnOrIncome/netBurnOrIncomeReducer");
|
|
103
104
|
const netBurnOrIncomeClassesViewReducer_1 = require("../../view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer");
|
|
104
105
|
const netBurnOrIncomeStoryCardReducer_1 = require("../../view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer");
|
|
106
|
+
const notificationPreferencesViewReducer_1 = require("../../view/notificationPreferencesView/notificationPreferencesViewReducer");
|
|
105
107
|
const notificationViewReducer_1 = require("../../view/notificationView/notificationViewReducer");
|
|
106
108
|
const onboardingCockpitViewReducer_1 = require("../../view/onboardingView/cockpitView/onboardingCockpitViewReducer");
|
|
107
109
|
const onboardingCustomerViewReducer_1 = require("../../view/onboardingView/customerView/onboardingCustomerViewReducer");
|
|
@@ -503,6 +505,8 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
|
|
|
503
505
|
(0, jeSchedulesReducer_1.clearAllJEScheduleTransactions)(),
|
|
504
506
|
(0, merchantReducer_1.clearAllMerchants)(),
|
|
505
507
|
(0, monthEndCloseChecksReducer_1.clearAllMonthEndCloseChecks)(),
|
|
508
|
+
(0, notificationPreferencesViewReducer_1.clearAllNotificationPreferencesView)(),
|
|
509
|
+
(0, notificationRegistryReducer_1.clearAllNotificationRegistry)(),
|
|
506
510
|
(0, notificationReducer_1.clearAllNotifications)(),
|
|
507
511
|
(0, onboardingCustomerReducer_1.clearAllOnboardingCustomersInfo)(),
|
|
508
512
|
(0, paymentAccountReducer_1.clearAllPaymentAccounts)(),
|
|
@@ -217,7 +217,10 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
217
217
|
}, "tenant/trigger2FA", never, never>, updateTenantAccountingClassesEnabled: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
218
218
|
enabled: boolean;
|
|
219
219
|
tenantId: ID;
|
|
220
|
-
}, "tenant/updateTenantAccountingClassesEnabled">,
|
|
220
|
+
}, "tenant/updateTenantAccountingClassesEnabled">, updateTenantAccountingProjectsEnabled: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
221
|
+
enabled: boolean;
|
|
222
|
+
tenantId: ID;
|
|
223
|
+
}, "tenant/updateTenantAccountingProjectsEnabled">, updateTenantCapitalizationOnboardingDismissed: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
221
224
|
accountId: string;
|
|
222
225
|
tenantId: ID;
|
|
223
226
|
}, "tenant/updateTenantCapitalizationOnboardingDismissed">, updateTenantCapitalizationAccountOverride: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.clearAll = exports.deleteConnectionFailure = exports.deleteConnectionSuccess = exports.deleteConnection = exports.initEmailConnectOAuthFailure = exports.initEmailConnectOAuthSuccess = exports.initEmailConnectOAuth = exports.saveConnectorCredentialsFailure = exports.saveConnectorCredentialsSuccess = exports.saveConnectorCredentials = exports.saveOAuthConnectionFailure = exports.saveOAuthConnectionSuccess = exports.saveOAuthConnection = exports.saveAPIKeyConnectionFailure = exports.saveAPIKeyConnectionSuccess = exports.saveAPIKeyConnection = exports.fetchExternalConnectionsSuccess = exports.fetchExternalConnectionsFailure = exports.saveExternalConnectionFailure = exports.saveExternalConnectionSuccess = exports.saveExternalConnection = exports.fetchExternalConnections = exports.updateLoggedInUser = exports.sessionHeartbeatFailure = exports.sessionHeartbeatSuccess = exports.sendSessionHeartbeat = exports.signOutSuccess = exports.doSignOut = exports.updateSignInState = exports.sendEmailMagicLinkToUserFailure = exports.sendEmailMagicLinkToUserSuccess = exports.sendEmailMagicLinkToUser = exports.magicLinkSignInFailure = exports.magicLinkSignInSuccess = exports.doMagicLinkSignIn = exports.doSignIn = exports.updateExcludedResourcesFailure = exports.updateExcludedResourcesSuccess = exports.fetchExcludedResources = exports.updateCurrentTenant = exports.updateTenantFailure = exports.updateTenantSuccess = exports.fetchActiveTenant = exports.updateTenantsFailure = exports.updateTenantsSuccess = exports.fetchAllTenants = exports.updateTenants = exports.initialState = exports.toExternalSupportedTool = exports.toExternalIntegrationType = void 0;
|
|
8
|
-
exports.toConnection = exports.toRoleResource = exports.resendVerifyDeviceOTPFailure = exports.resendVerifyDeviceOTPSuccess = exports.resendVerifyDeviceOTP = exports.updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser = exports.updateTreasuryPromoRemindMeLaterClickedForLoggedInUser = exports.updateTreasuryVideoViewedForLoggedInUser = exports.verifyDeviceWithTwoFAFailure = exports.verifyDeviceWithTwoFASuccess = exports.verifyDeviceWithTwoFA = exports.updateTenantMasterTOSInfo = exports.updateTenantCapitalizationAccountOverride = exports.updateTenantCapitalizationOnboardingDismissed = exports.updateTenantAccountingClassesEnabled = exports.trigger2FA = exports.resetSignInState = exports.updateReferViewedForLoggedInUser = exports.updateTenantReimbursementInfo = exports.removeOnboardingTenant = exports.updateOnboardingTenants = exports.updateSubscriptionSummaryForTenantFailure = exports.updateSubscriptionSummaryForTenantSuccess = exports.fetchSubscriptionSummaryForTenant = void 0;
|
|
8
|
+
exports.toConnection = exports.toRoleResource = exports.resendVerifyDeviceOTPFailure = exports.resendVerifyDeviceOTPSuccess = exports.resendVerifyDeviceOTP = exports.updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser = exports.updateTreasuryPromoRemindMeLaterClickedForLoggedInUser = exports.updateTreasuryVideoViewedForLoggedInUser = exports.verifyDeviceWithTwoFAFailure = exports.verifyDeviceWithTwoFASuccess = exports.verifyDeviceWithTwoFA = exports.updateTenantMasterTOSInfo = exports.updateTenantCapitalizationAccountOverride = exports.updateTenantCapitalizationOnboardingDismissed = exports.updateTenantAccountingProjectsEnabled = exports.updateTenantAccountingClassesEnabled = exports.trigger2FA = exports.resetSignInState = exports.updateReferViewedForLoggedInUser = exports.updateTenantReimbursementInfo = exports.removeOnboardingTenant = exports.updateOnboardingTenants = exports.updateSubscriptionSummaryForTenantFailure = exports.updateSubscriptionSummaryForTenantSuccess = exports.fetchSubscriptionSummaryForTenant = void 0;
|
|
9
9
|
exports.mapCapitalizableAccountsPayload = mapCapitalizableAccountsPayload;
|
|
10
10
|
exports.mapConnectionsPayloadToState = mapConnectionsPayloadToState;
|
|
11
11
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
@@ -182,6 +182,12 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
182
182
|
draft.tenantsById[tenantId].isAccountingClassesEnabled = enabled;
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
|
+
updateTenantAccountingProjectsEnabled(draft, action) {
|
|
186
|
+
const { tenantId, enabled } = action.payload;
|
|
187
|
+
if (draft.tenantsById[tenantId] != null) {
|
|
188
|
+
draft.tenantsById[tenantId].isAccountingProjectsEnabled = enabled;
|
|
189
|
+
}
|
|
190
|
+
},
|
|
185
191
|
// Optimistic per-key merge: assumes the backend PATCH merges
|
|
186
192
|
// capitalizable_account_overrides by key rather than replacing the whole field.
|
|
187
193
|
updateTenantCapitalizationAccountOverride(draft, action) {
|
|
@@ -923,7 +929,7 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
923
929
|
},
|
|
924
930
|
},
|
|
925
931
|
});
|
|
926
|
-
_a = tenant.actions, exports.updateTenants = _a.updateTenants, exports.fetchAllTenants = _a.fetchAllTenants, exports.updateTenantsSuccess = _a.updateTenantsSuccess, exports.updateTenantsFailure = _a.updateTenantsFailure, exports.fetchActiveTenant = _a.fetchActiveTenant, exports.updateTenantSuccess = _a.updateTenantSuccess, exports.updateTenantFailure = _a.updateTenantFailure, exports.updateCurrentTenant = _a.updateCurrentTenant, exports.fetchExcludedResources = _a.fetchExcludedResources, exports.updateExcludedResourcesSuccess = _a.updateExcludedResourcesSuccess, exports.updateExcludedResourcesFailure = _a.updateExcludedResourcesFailure, exports.doSignIn = _a.doSignIn, exports.doMagicLinkSignIn = _a.doMagicLinkSignIn, exports.magicLinkSignInSuccess = _a.magicLinkSignInSuccess, exports.magicLinkSignInFailure = _a.magicLinkSignInFailure, exports.sendEmailMagicLinkToUser = _a.sendEmailMagicLinkToUser, exports.sendEmailMagicLinkToUserSuccess = _a.sendEmailMagicLinkToUserSuccess, exports.sendEmailMagicLinkToUserFailure = _a.sendEmailMagicLinkToUserFailure, exports.updateSignInState = _a.updateSignInState, exports.doSignOut = _a.doSignOut, exports.signOutSuccess = _a.signOutSuccess, exports.sendSessionHeartbeat = _a.sendSessionHeartbeat, exports.sessionHeartbeatSuccess = _a.sessionHeartbeatSuccess, exports.sessionHeartbeatFailure = _a.sessionHeartbeatFailure, exports.updateLoggedInUser = _a.updateLoggedInUser, exports.fetchExternalConnections = _a.fetchExternalConnections, exports.saveExternalConnection = _a.saveExternalConnection, exports.saveExternalConnectionSuccess = _a.saveExternalConnectionSuccess, exports.saveExternalConnectionFailure = _a.saveExternalConnectionFailure, exports.fetchExternalConnectionsFailure = _a.fetchExternalConnectionsFailure, exports.fetchExternalConnectionsSuccess = _a.fetchExternalConnectionsSuccess, exports.saveAPIKeyConnection = _a.saveAPIKeyConnection, exports.saveAPIKeyConnectionSuccess = _a.saveAPIKeyConnectionSuccess, exports.saveAPIKeyConnectionFailure = _a.saveAPIKeyConnectionFailure, exports.saveOAuthConnection = _a.saveOAuthConnection, exports.saveOAuthConnectionSuccess = _a.saveOAuthConnectionSuccess, exports.saveOAuthConnectionFailure = _a.saveOAuthConnectionFailure, exports.saveConnectorCredentials = _a.saveConnectorCredentials, exports.saveConnectorCredentialsSuccess = _a.saveConnectorCredentialsSuccess, exports.saveConnectorCredentialsFailure = _a.saveConnectorCredentialsFailure, exports.initEmailConnectOAuth = _a.initEmailConnectOAuth, exports.initEmailConnectOAuthSuccess = _a.initEmailConnectOAuthSuccess, exports.initEmailConnectOAuthFailure = _a.initEmailConnectOAuthFailure, exports.deleteConnection = _a.deleteConnection, exports.deleteConnectionSuccess = _a.deleteConnectionSuccess, exports.deleteConnectionFailure = _a.deleteConnectionFailure, exports.clearAll = _a.clearAll, exports.fetchSubscriptionSummaryForTenant = _a.fetchSubscriptionSummaryForTenant, exports.updateSubscriptionSummaryForTenantSuccess = _a.updateSubscriptionSummaryForTenantSuccess, exports.updateSubscriptionSummaryForTenantFailure = _a.updateSubscriptionSummaryForTenantFailure, exports.updateOnboardingTenants = _a.updateOnboardingTenants, exports.removeOnboardingTenant = _a.removeOnboardingTenant, exports.updateTenantReimbursementInfo = _a.updateTenantReimbursementInfo, exports.updateReferViewedForLoggedInUser = _a.updateReferViewedForLoggedInUser, exports.resetSignInState = _a.resetSignInState, exports.trigger2FA = _a.trigger2FA, exports.updateTenantAccountingClassesEnabled = _a.updateTenantAccountingClassesEnabled, exports.updateTenantCapitalizationOnboardingDismissed = _a.updateTenantCapitalizationOnboardingDismissed, exports.updateTenantCapitalizationAccountOverride = _a.updateTenantCapitalizationAccountOverride, exports.updateTenantMasterTOSInfo = _a.updateTenantMasterTOSInfo, exports.verifyDeviceWithTwoFA = _a.verifyDeviceWithTwoFA, exports.verifyDeviceWithTwoFASuccess = _a.verifyDeviceWithTwoFASuccess, exports.verifyDeviceWithTwoFAFailure = _a.verifyDeviceWithTwoFAFailure, exports.updateTreasuryVideoViewedForLoggedInUser = _a.updateTreasuryVideoViewedForLoggedInUser, exports.updateTreasuryPromoRemindMeLaterClickedForLoggedInUser = _a.updateTreasuryPromoRemindMeLaterClickedForLoggedInUser, exports.updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser = _a.updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser, exports.resendVerifyDeviceOTP = _a.resendVerifyDeviceOTP, exports.resendVerifyDeviceOTPSuccess = _a.resendVerifyDeviceOTPSuccess, exports.resendVerifyDeviceOTPFailure = _a.resendVerifyDeviceOTPFailure;
|
|
932
|
+
_a = tenant.actions, exports.updateTenants = _a.updateTenants, exports.fetchAllTenants = _a.fetchAllTenants, exports.updateTenantsSuccess = _a.updateTenantsSuccess, exports.updateTenantsFailure = _a.updateTenantsFailure, exports.fetchActiveTenant = _a.fetchActiveTenant, exports.updateTenantSuccess = _a.updateTenantSuccess, exports.updateTenantFailure = _a.updateTenantFailure, exports.updateCurrentTenant = _a.updateCurrentTenant, exports.fetchExcludedResources = _a.fetchExcludedResources, exports.updateExcludedResourcesSuccess = _a.updateExcludedResourcesSuccess, exports.updateExcludedResourcesFailure = _a.updateExcludedResourcesFailure, exports.doSignIn = _a.doSignIn, exports.doMagicLinkSignIn = _a.doMagicLinkSignIn, exports.magicLinkSignInSuccess = _a.magicLinkSignInSuccess, exports.magicLinkSignInFailure = _a.magicLinkSignInFailure, exports.sendEmailMagicLinkToUser = _a.sendEmailMagicLinkToUser, exports.sendEmailMagicLinkToUserSuccess = _a.sendEmailMagicLinkToUserSuccess, exports.sendEmailMagicLinkToUserFailure = _a.sendEmailMagicLinkToUserFailure, exports.updateSignInState = _a.updateSignInState, exports.doSignOut = _a.doSignOut, exports.signOutSuccess = _a.signOutSuccess, exports.sendSessionHeartbeat = _a.sendSessionHeartbeat, exports.sessionHeartbeatSuccess = _a.sessionHeartbeatSuccess, exports.sessionHeartbeatFailure = _a.sessionHeartbeatFailure, exports.updateLoggedInUser = _a.updateLoggedInUser, exports.fetchExternalConnections = _a.fetchExternalConnections, exports.saveExternalConnection = _a.saveExternalConnection, exports.saveExternalConnectionSuccess = _a.saveExternalConnectionSuccess, exports.saveExternalConnectionFailure = _a.saveExternalConnectionFailure, exports.fetchExternalConnectionsFailure = _a.fetchExternalConnectionsFailure, exports.fetchExternalConnectionsSuccess = _a.fetchExternalConnectionsSuccess, exports.saveAPIKeyConnection = _a.saveAPIKeyConnection, exports.saveAPIKeyConnectionSuccess = _a.saveAPIKeyConnectionSuccess, exports.saveAPIKeyConnectionFailure = _a.saveAPIKeyConnectionFailure, exports.saveOAuthConnection = _a.saveOAuthConnection, exports.saveOAuthConnectionSuccess = _a.saveOAuthConnectionSuccess, exports.saveOAuthConnectionFailure = _a.saveOAuthConnectionFailure, exports.saveConnectorCredentials = _a.saveConnectorCredentials, exports.saveConnectorCredentialsSuccess = _a.saveConnectorCredentialsSuccess, exports.saveConnectorCredentialsFailure = _a.saveConnectorCredentialsFailure, exports.initEmailConnectOAuth = _a.initEmailConnectOAuth, exports.initEmailConnectOAuthSuccess = _a.initEmailConnectOAuthSuccess, exports.initEmailConnectOAuthFailure = _a.initEmailConnectOAuthFailure, exports.deleteConnection = _a.deleteConnection, exports.deleteConnectionSuccess = _a.deleteConnectionSuccess, exports.deleteConnectionFailure = _a.deleteConnectionFailure, exports.clearAll = _a.clearAll, exports.fetchSubscriptionSummaryForTenant = _a.fetchSubscriptionSummaryForTenant, exports.updateSubscriptionSummaryForTenantSuccess = _a.updateSubscriptionSummaryForTenantSuccess, exports.updateSubscriptionSummaryForTenantFailure = _a.updateSubscriptionSummaryForTenantFailure, exports.updateOnboardingTenants = _a.updateOnboardingTenants, exports.removeOnboardingTenant = _a.removeOnboardingTenant, exports.updateTenantReimbursementInfo = _a.updateTenantReimbursementInfo, exports.updateReferViewedForLoggedInUser = _a.updateReferViewedForLoggedInUser, exports.resetSignInState = _a.resetSignInState, exports.trigger2FA = _a.trigger2FA, exports.updateTenantAccountingClassesEnabled = _a.updateTenantAccountingClassesEnabled, exports.updateTenantAccountingProjectsEnabled = _a.updateTenantAccountingProjectsEnabled, exports.updateTenantCapitalizationOnboardingDismissed = _a.updateTenantCapitalizationOnboardingDismissed, exports.updateTenantCapitalizationAccountOverride = _a.updateTenantCapitalizationAccountOverride, exports.updateTenantMasterTOSInfo = _a.updateTenantMasterTOSInfo, exports.verifyDeviceWithTwoFA = _a.verifyDeviceWithTwoFA, exports.verifyDeviceWithTwoFASuccess = _a.verifyDeviceWithTwoFASuccess, exports.verifyDeviceWithTwoFAFailure = _a.verifyDeviceWithTwoFAFailure, exports.updateTreasuryVideoViewedForLoggedInUser = _a.updateTreasuryVideoViewedForLoggedInUser, exports.updateTreasuryPromoRemindMeLaterClickedForLoggedInUser = _a.updateTreasuryPromoRemindMeLaterClickedForLoggedInUser, exports.updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser = _a.updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser, exports.resendVerifyDeviceOTP = _a.resendVerifyDeviceOTP, exports.resendVerifyDeviceOTPSuccess = _a.resendVerifyDeviceOTPSuccess, exports.resendVerifyDeviceOTPFailure = _a.resendVerifyDeviceOTPFailure;
|
|
927
933
|
exports.default = tenant.reducer;
|
|
928
934
|
/**
|
|
929
935
|
* Applies treasury promo user fields from the tenants API user block when present.
|
|
@@ -21,6 +21,7 @@ export interface TenantBaseView extends TenantCoreDetailsView {
|
|
|
21
21
|
companyLocaleInfo?: CompanyLocaleInfo;
|
|
22
22
|
}
|
|
23
23
|
export declare function getTenant(tenantState: TenantState, companyState: CompanyState, tenantId: ID): TenantView | undefined;
|
|
24
|
+
export declare function getTenantIdByCompanyId(tenantState: TenantState, companyId: ID): ID | undefined;
|
|
24
25
|
declare function getTenantsByCheckInDate(tenantState: TenantState, companyState: CompanyState): {
|
|
25
26
|
order: "descending_last_check_in";
|
|
26
27
|
tenantsInOrder: TenantView[];
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.isTenantTreasuryEnabled = exports.isOtherProductsEnabledForTenant = exports.isTenantBookkeepingEnabled = exports.getIsAccountingProjectsEnabled = exports.getIsAccountingClassesEnabled = exports.isTenantAccountingServicesEnabled = exports.isTenantCardsOnly = exports.isTenantBankingOnly = exports.toTenantCoreDetailsView = exports.getCurrentTenantExternalConnections = exports.isTenantUsingZeniCOA = exports.isZeniDomainTenant = exports.getTenantBaseViewForTenantView = exports.getTenantsCoreDetailsByCheckInDateSelector = exports.getTenantsBaseByCheckInDateSelector = exports.getTenantBaseById = exports.getTenantsByCheckInDateSelector = exports.getCurrentTenant = exports.getTenantBaseViewForTenantId = void 0;
|
|
7
7
|
exports.getTenant = getTenant;
|
|
8
|
+
exports.getTenantIdByCompanyId = getTenantIdByCompanyId;
|
|
8
9
|
exports.getOnboardingTenantByTenantId = getOnboardingTenantByTenantId;
|
|
9
10
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
10
11
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
@@ -23,6 +24,9 @@ function getTenant(tenantState, companyState, tenantId) {
|
|
|
23
24
|
return undefined;
|
|
24
25
|
}
|
|
25
26
|
}
|
|
27
|
+
function getTenantIdByCompanyId(tenantState, companyId) {
|
|
28
|
+
return Object.values(tenantState.tenantsById).find((tenant) => tenant.companyId === companyId)?.tenantId;
|
|
29
|
+
}
|
|
26
30
|
function getTenantsByCheckInDate(tenantState, companyState) {
|
|
27
31
|
const tenants = tenantState.tenantIds
|
|
28
32
|
.map((tenantId) => getTenant(tenantState, companyState, tenantId))
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { ScheduleTransaction } from './stateTypes/scheduleTransaction';
|
|
3
|
+
import { Line, TransactionWithAccountAndClassLine } from './stateTypes/transactionLine';
|
|
4
|
+
import { SupportedTransaction } from './transactionState';
|
|
5
|
+
export declare function hasAccountAndClassDetail(line: Line): line is TransactionWithAccountAndClassLine;
|
|
6
|
+
/**
|
|
7
|
+
* Builds a ScheduleTransaction directly from a Base Transaction search result
|
|
8
|
+
* (SupportedTransaction) and the chosen line, for schedule types where the
|
|
9
|
+
* user selects a transaction the search endpoint already returned — as
|
|
10
|
+
* opposed to the legacy flow's ScheduleTransaction, which only ever arrives
|
|
11
|
+
* via a GET /1.0/schedules/:id round trip. transaction.qboId stands in for
|
|
12
|
+
* thirdPartyTransactionId since this search endpoint doesn't send a field by
|
|
13
|
+
* that name, but qbo_id is the same identifier.
|
|
14
|
+
*/
|
|
15
|
+
export declare function mapSupportedTransactionLineToScheduleTransaction(transaction: SupportedTransaction, lineId: ID): ScheduleTransaction | undefined;
|