@zeniai/client-epic-state 5.2.34 → 5.2.35-beta10MM
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/actualMatching/actualMatchingPayload.d.ts +31 -0
- package/lib/entity/actualMatching/actualMatchingPayload.js +50 -0
- package/lib/entity/actualMatching/actualMatchingReducer.d.ts +9 -0
- package/lib/entity/actualMatching/actualMatchingReducer.js +33 -0
- package/lib/entity/actualMatching/actualMatchingSelector.d.ts +3 -0
- package/lib/entity/actualMatching/actualMatchingSelector.js +6 -0
- package/lib/entity/actualMatching/actualMatchingState.d.ts +23 -0
- package/lib/entity/actualMatching/actualMatchingState.js +2 -0
- package/lib/entity/actualMatching/actualMatchingTypes.d.ts +1 -0
- package/lib/entity/actualMatching/actualMatchingTypes.js +2 -0
- package/lib/entity/aiCfo/aiCfoReducer.js +78 -4
- package/lib/entity/aiCfo/aiCfoState.d.ts +16 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.d.ts +31 -0
- package/lib/entity/jeSchedules/jeSchedulesPayload.js +53 -0
- package/lib/entity/jeSchedules/jeSchedulesState.d.ts +33 -0
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +2 -0
- package/lib/epic.d.ts +8 -1
- package/lib/epic.js +14 -0
- package/lib/esm/entity/actualMatching/actualMatchingPayload.js +46 -0
- package/lib/esm/entity/actualMatching/actualMatchingReducer.js +30 -0
- package/lib/esm/entity/actualMatching/actualMatchingSelector.js +3 -0
- package/lib/esm/entity/actualMatching/actualMatchingState.js +1 -0
- package/lib/esm/entity/actualMatching/actualMatchingTypes.js +1 -0
- package/lib/esm/entity/aiCfo/aiCfoReducer.js +79 -5
- package/lib/esm/entity/jeSchedules/jeSchedulesPayload.js +53 -0
- package/lib/esm/entity/snackbar/snackbarTypes.js +2 -0
- package/lib/esm/epic.js +14 -0
- package/lib/esm/index.js +7 -3
- package/lib/esm/reducer.js +6 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.js +44 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingMatchEpic.js +36 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.js +7 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +107 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/refreshActualMatchingList.js +16 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.js +54 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.js +74 -0
- package/lib/esm/view/expenseAutomationView/epics/actualMatching/undoReversalAccrualsEpic.js +76 -0
- package/lib/esm/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +25 -12
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +13 -3
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +35 -15
- package/lib/esm/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +8 -3
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewReducer.js +2 -1
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewSelector.js +24 -6
- package/lib/esm/view/expenseAutomationView/expenseAutomationViewState.js +4 -2
- package/lib/esm/view/expenseAutomationView/payload/actualMatchingPayload.js +68 -0
- package/lib/esm/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +434 -0
- package/lib/esm/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -1
- package/lib/esm/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js +1 -0
- package/lib/esm/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +426 -0
- package/lib/esm/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +4 -0
- package/lib/esm/view/expenseAutomationView/types/actualMatchingViewState.js +35 -0
- package/lib/esm/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -1
- package/lib/esm/view/financeStatement/financeStatementReducer.js +17 -27
- package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.js +4 -0
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +3 -3
- package/lib/index.d.ts +15 -6
- package/lib/index.js +82 -48
- package/lib/reducer.d.ts +2 -0
- package/lib/reducer.js +6 -0
- package/lib/rootStateTypes.d.ts +4 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingEpic.js +48 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingMatchEpic.d.ts +12 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingMatchEpic.js +40 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.d.ts +5 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/fetchActualMatchingPageEpic.js +11 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/matchAndReverseAccrualsEpic.js +111 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/refreshActualMatchingList.d.ts +3 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/refreshActualMatchingList.js +19 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchAccrualsEpic.js +58 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.d.ts +8 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/searchMatchTransactionsEpic.js +78 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/undoReversalAccrualsEpic.d.ts +9 -0
- package/lib/view/expenseAutomationView/epics/actualMatching/undoReversalAccrualsEpic.js +80 -0
- package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +25 -12
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.d.ts +2 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/fetchJeSchedulePageEpic.js +13 -3
- package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.d.ts +5 -1
- package/lib/view/expenseAutomationView/epics/jeSchedule/prefetchOtherJeSchedulesTabEpic.js +34 -14
- package/lib/view/expenseAutomationView/epics/jeSchedule/switchJESchedulesTabEpic.js +8 -3
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -1
- package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +2 -1
- package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +24 -6
- package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +2 -1
- package/lib/view/expenseAutomationView/expenseAutomationViewState.js +6 -3
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/actualMatchingPayload.d.ts +85 -0
- package/lib/view/expenseAutomationView/payload/actualMatchingPayload.js +74 -0
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.d.ts +79 -0
- package/lib/view/expenseAutomationView/reducers/actualMatchingViewReducer.js +438 -0
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +6 -5
- package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.js +2 -1
- package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.d.ts +87 -0
- package/lib/view/expenseAutomationView/selectorTypes/actualMatchingViewSelectorTypes.js +2 -0
- package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +11 -0
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.d.ts +38 -0
- package/lib/view/expenseAutomationView/selectors/actualMatchingViewSelector.js +445 -0
- package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +4 -0
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.d.ts +105 -0
- package/lib/view/expenseAutomationView/types/actualMatchingViewState.js +42 -0
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/types/jeSchedulesViewState.js +8 -1
- package/lib/view/financeStatement/financeStatementReducer.js +17 -27
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.d.ts +1 -11
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.js +4 -0
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +1 -2
- package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewState.d.ts +15 -1
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewReducer.d.ts +1 -1
- package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ID } from '../../commonStateTypes/common';
|
|
2
|
+
import { JEOneTimeAccrualPayload } from '../jeSchedules/jeSchedulesPayload';
|
|
3
|
+
import { ActualMatchingMatch } from './actualMatchingState';
|
|
4
|
+
import { ActualMatchingMatchId } from './actualMatchingTypes';
|
|
5
|
+
export interface DisplayCurrencyFallback {
|
|
6
|
+
currencyCode: string;
|
|
7
|
+
currencySymbol: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ActualMatchingMatchPayload {
|
|
10
|
+
accrued_amount: number;
|
|
11
|
+
actual_amount: number;
|
|
12
|
+
kind: string;
|
|
13
|
+
match_id: ActualMatchingMatchId;
|
|
14
|
+
members: JEOneTimeAccrualPayload[];
|
|
15
|
+
transaction_integration_id: string;
|
|
16
|
+
transaction_type: string;
|
|
17
|
+
currency_code?: string | null;
|
|
18
|
+
currency_symbol?: string | null;
|
|
19
|
+
leftovers?: JEOneTimeAccrualPayload[];
|
|
20
|
+
match_shape?: string | null;
|
|
21
|
+
match_tier?: string | null;
|
|
22
|
+
transaction_date?: string | null;
|
|
23
|
+
vendor_id?: ID | null;
|
|
24
|
+
vendor_name?: string | null;
|
|
25
|
+
}
|
|
26
|
+
export interface ActualMatchingListResponsePayload {
|
|
27
|
+
matches: ActualMatchingMatchPayload[];
|
|
28
|
+
total: number;
|
|
29
|
+
}
|
|
30
|
+
export declare function withInheritedAccrualCurrency(member: JEOneTimeAccrualPayload, fallbackCurrencyCode: string): JEOneTimeAccrualPayload;
|
|
31
|
+
export declare function toActualMatchingMatch(payload: ActualMatchingMatchPayload, fallbackCurrency?: DisplayCurrencyFallback): ActualMatchingMatch;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.withInheritedAccrualCurrency = withInheritedAccrualCurrency;
|
|
4
|
+
exports.toActualMatchingMatch = toActualMatchingMatch;
|
|
5
|
+
const amount_1 = require("../../commonStateTypes/amount");
|
|
6
|
+
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
7
|
+
const jeSchedulesPayload_1 = require("../jeSchedules/jeSchedulesPayload");
|
|
8
|
+
const MATCH_KINDS = [
|
|
9
|
+
'auto_reversed',
|
|
10
|
+
'pending_review',
|
|
11
|
+
'manually_reversed',
|
|
12
|
+
];
|
|
13
|
+
function toMatchKind(raw) {
|
|
14
|
+
return (0, stringToUnion_1.stringToUnion)(raw, MATCH_KINDS);
|
|
15
|
+
}
|
|
16
|
+
function withInheritedAccrualCurrency(member, fallbackCurrencyCode) {
|
|
17
|
+
if (member.currency != null && member.currency !== '') {
|
|
18
|
+
return member;
|
|
19
|
+
}
|
|
20
|
+
return { ...member, currency: fallbackCurrencyCode };
|
|
21
|
+
}
|
|
22
|
+
function toMatchMemberAccrual(member, matchCurrencyCode) {
|
|
23
|
+
return (0, jeSchedulesPayload_1.toJEOneTimeAccrual)(withInheritedAccrualCurrency(member, matchCurrencyCode));
|
|
24
|
+
}
|
|
25
|
+
function toActualMatchingMatch(payload, fallbackCurrency) {
|
|
26
|
+
const currencyCode = payload.currency_code != null && payload.currency_code !== ''
|
|
27
|
+
? payload.currency_code
|
|
28
|
+
: fallbackCurrency?.currencyCode ?? '';
|
|
29
|
+
const currencySymbol = payload.currency_symbol != null && payload.currency_symbol !== ''
|
|
30
|
+
? payload.currency_symbol
|
|
31
|
+
: fallbackCurrency != null &&
|
|
32
|
+
currencyCode === fallbackCurrency.currencyCode
|
|
33
|
+
? fallbackCurrency.currencySymbol
|
|
34
|
+
: currencyCode;
|
|
35
|
+
return {
|
|
36
|
+
matchId: payload.match_id,
|
|
37
|
+
transactionType: (payload.transaction_type || '').toLowerCase(),
|
|
38
|
+
transactionIntegrationId: payload.transaction_integration_id,
|
|
39
|
+
transactionDate: payload.transaction_date ?? undefined,
|
|
40
|
+
vendorId: payload.vendor_id ?? undefined,
|
|
41
|
+
vendorName: payload.vendor_name ?? undefined,
|
|
42
|
+
kind: toMatchKind(payload.kind),
|
|
43
|
+
matchTier: payload.match_tier ?? undefined,
|
|
44
|
+
matchShape: payload.match_shape ?? undefined,
|
|
45
|
+
accruedAmount: (0, amount_1.toAmount)(payload.accrued_amount, currencyCode, currencySymbol),
|
|
46
|
+
actualAmount: (0, amount_1.toAmount)(payload.actual_amount, currencyCode, currencySymbol),
|
|
47
|
+
members: payload.members.map((member) => toMatchMemberAccrual(member, currencyCode)),
|
|
48
|
+
leftovers: (payload.leftovers ?? []).map((member) => toMatchMemberAccrual(member, currencyCode)),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActualMatchingMatchPayload, DisplayCurrencyFallback } from './actualMatchingPayload';
|
|
2
|
+
import { ActualMatchingState } from './actualMatchingState';
|
|
3
|
+
export declare const initialState: ActualMatchingState;
|
|
4
|
+
export declare const updateActualMatchingMatches: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[matches: ActualMatchingMatchPayload[], fallbackCurrency?: DisplayCurrencyFallback | undefined], {
|
|
5
|
+
matches: ActualMatchingMatchPayload[];
|
|
6
|
+
fallbackCurrency: DisplayCurrencyFallback | undefined;
|
|
7
|
+
}, "actualMatching/updateActualMatchingMatches", never, never>;
|
|
8
|
+
declare const _default: import("redux").Reducer<ActualMatchingState>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateActualMatchingMatches = exports.initialState = void 0;
|
|
4
|
+
const toolkit_1 = require("@reduxjs/toolkit");
|
|
5
|
+
const rootActions_1 = require("../../rootActions");
|
|
6
|
+
const actualMatchingPayload_1 = require("./actualMatchingPayload");
|
|
7
|
+
exports.initialState = {
|
|
8
|
+
byMatchId: {},
|
|
9
|
+
};
|
|
10
|
+
const actualMatching = (0, toolkit_1.createSlice)({
|
|
11
|
+
name: 'actualMatching',
|
|
12
|
+
initialState: exports.initialState,
|
|
13
|
+
reducers: {
|
|
14
|
+
updateActualMatchingMatches: {
|
|
15
|
+
prepare(matches, fallbackCurrency) {
|
|
16
|
+
return { payload: { matches, fallbackCurrency } };
|
|
17
|
+
},
|
|
18
|
+
reducer(draft, action) {
|
|
19
|
+
action.payload.matches.forEach((payload) => {
|
|
20
|
+
const match = (0, actualMatchingPayload_1.toActualMatchingMatch)(payload, action.payload.fallbackCurrency);
|
|
21
|
+
draft.byMatchId[match.matchId] = match;
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
extraReducers: (builder) => {
|
|
27
|
+
builder.addCase(rootActions_1.clearAll, (draft) => {
|
|
28
|
+
Object.assign(draft, exports.initialState);
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
exports.updateActualMatchingMatches = actualMatching.actions.updateActualMatchingMatches;
|
|
33
|
+
exports.default = actualMatching.reducer;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ActualMatchingMatch, ActualMatchingState } from './actualMatchingState';
|
|
2
|
+
import { ActualMatchingMatchId } from './actualMatchingTypes';
|
|
3
|
+
export declare function getActualMatchingMatchById(actualMatchingState: ActualMatchingState, matchId: ActualMatchingMatchId): ActualMatchingMatch | undefined;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Amount } from '../../commonStateTypes/amount';
|
|
2
|
+
import { ID } from '../../commonStateTypes/common';
|
|
3
|
+
import { JEOneTimeAccrualState } from '../jeSchedules/jeSchedulesState';
|
|
4
|
+
import { ActualMatchingMatchId } from './actualMatchingTypes';
|
|
5
|
+
export type ActualMatchingMatchKind = 'auto_reversed' | 'pending_review' | 'manually_reversed';
|
|
6
|
+
export interface ActualMatchingMatch {
|
|
7
|
+
accruedAmount: Amount;
|
|
8
|
+
actualAmount: Amount;
|
|
9
|
+
kind: ActualMatchingMatchKind;
|
|
10
|
+
matchId: ActualMatchingMatchId;
|
|
11
|
+
members: JEOneTimeAccrualState[];
|
|
12
|
+
transactionIntegrationId: ID;
|
|
13
|
+
transactionType: string;
|
|
14
|
+
leftovers?: JEOneTimeAccrualState[];
|
|
15
|
+
matchShape?: string;
|
|
16
|
+
matchTier?: string;
|
|
17
|
+
transactionDate?: string;
|
|
18
|
+
vendorId?: ID;
|
|
19
|
+
vendorName?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ActualMatchingState {
|
|
22
|
+
byMatchId: Record<ActualMatchingMatchId, ActualMatchingMatch>;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ActualMatchingMatchId = string;
|
|
@@ -7,6 +7,7 @@ const rootActions_1 = require("../../rootActions");
|
|
|
7
7
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
8
8
|
const aiCfoState_1 = require("./aiCfoState");
|
|
9
9
|
exports.initialAiCfoState = {
|
|
10
|
+
deletedChatSessionIds: [],
|
|
10
11
|
aiCfoByChatSessionId: {},
|
|
11
12
|
partialQuestionAnswers: {},
|
|
12
13
|
syntheticAnswersByChatSessionId: {},
|
|
@@ -474,6 +475,11 @@ const toResponseBlockType = (answer, userId) => {
|
|
|
474
475
|
createdAt: (0, zeniDayJS_1.date)(timestamp),
|
|
475
476
|
};
|
|
476
477
|
};
|
|
478
|
+
// How many deleted session ids to remember. The tombstone only has to outlive
|
|
479
|
+
// an in-flight history request, which is seconds, so this is generous. Capped
|
|
480
|
+
// because `clearSession` would otherwise grow the array for the life of the
|
|
481
|
+
// store and every `setChatHistory` scans it.
|
|
482
|
+
const DELETED_SESSION_MEMORY = 100;
|
|
477
483
|
const aiCfo = (0, toolkit_1.createSlice)({
|
|
478
484
|
name: 'aiCfo',
|
|
479
485
|
initialState: exports.initialAiCfoState,
|
|
@@ -495,8 +501,25 @@ const aiCfo = (0, toolkit_1.createSlice)({
|
|
|
495
501
|
setSessions(draft, action) {
|
|
496
502
|
action.payload.forEach((chatSessionPayload) => {
|
|
497
503
|
const { chat_session_id } = chatSessionPayload;
|
|
498
|
-
|
|
499
|
-
|
|
504
|
+
if (draft.aiCfoByChatSessionId[chat_session_id] != null) {
|
|
505
|
+
// The list is authoritative for a session's metadata, and a session
|
|
506
|
+
// seeded by `setChatHistory` has guessed metadata: no summary, and a
|
|
507
|
+
// `createdAt` taken from one page of a newest-first paginated
|
|
508
|
+
// history, which is later than the session really started.
|
|
509
|
+
// `questionAnswers` is left alone — the list must never wipe a
|
|
510
|
+
// thread that is on screen.
|
|
511
|
+
const entry = draft.aiCfoByChatSessionId[chat_session_id];
|
|
512
|
+
const incoming = toChatSession(chatSessionPayload);
|
|
513
|
+
entry.chatSession = {
|
|
514
|
+
...incoming,
|
|
515
|
+
// Never downgrade a title already in state: a page of the list can
|
|
516
|
+
// carry a nullish summary, and assigning it wholesale would blank
|
|
517
|
+
// a header that was correct.
|
|
518
|
+
chatSessionSummary: incoming.chatSessionSummary ??
|
|
519
|
+
entry.chatSession.chatSessionSummary,
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
else {
|
|
500
523
|
draft.aiCfoByChatSessionId[chat_session_id] = {
|
|
501
524
|
chatSession: toChatSession(chatSessionPayload),
|
|
502
525
|
questionAnswers: [],
|
|
@@ -509,8 +532,52 @@ const aiCfo = (0, toolkit_1.createSlice)({
|
|
|
509
532
|
setChatHistory(draft, action) {
|
|
510
533
|
const { chatSessionId, history, isPaginationComplete = false, } = action.payload;
|
|
511
534
|
if (draft.aiCfoByChatSessionId[chatSessionId] == null) {
|
|
512
|
-
|
|
513
|
-
|
|
535
|
+
// Sessions created server-side (a routine run) are opened by deep
|
|
536
|
+
// link, so their history can arrive before the sessions list has
|
|
537
|
+
// registered them. Dropping it here loses the messages for good: the
|
|
538
|
+
// response's null page token sets `hasMore: false`, which is the
|
|
539
|
+
// condition the refetch is guarded on. The response is itself proof
|
|
540
|
+
// the session exists, so seed the entry from the messages.
|
|
541
|
+
if (history.length === 0) {
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
// A deleted session. Its history request is never cancelled
|
|
545
|
+
// (`mergeMap`), so seeding would resurrect the conversation into the
|
|
546
|
+
// rail, where clicking it 404s. Only this path is guarded:
|
|
547
|
+
// `clearSession` is optimistic, so if the server still lists the
|
|
548
|
+
// session, `setSessions` re-adding it is correct.
|
|
549
|
+
if (draft.deletedChatSessionIds?.includes(chatSessionId) === true) {
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
// The human's id, taken off a message they actually sent. The API
|
|
553
|
+
// returns newest first, so `history[0]` is usually the agent's reply,
|
|
554
|
+
// and `chatSession.userId` is read as "whose conversation is this".
|
|
555
|
+
const owner = history.find((message) => message.sender === 'user') ?? history[0];
|
|
556
|
+
// Oldest message in the page, not `history[0]`: a session cannot
|
|
557
|
+
// start after its own messages, and the API returns newest first.
|
|
558
|
+
//
|
|
559
|
+
// Compared as instants, not strings. The wire format is an RFC 1123
|
|
560
|
+
// HTTP-date ("Thu, 03 Sep 2026 12:34:56 GMT") because `set_200`
|
|
561
|
+
// bypasses chat's isoformat encoder, and lexically "Mon…" precedes
|
|
562
|
+
// "Sat…" while being the later day. Unparseable values are filtered
|
|
563
|
+
// out, not compared: every comparison against NaN is false, so one
|
|
564
|
+
// used as the reduce's seed would carry through to an Invalid Date.
|
|
565
|
+
const oldest = history
|
|
566
|
+
.map((message) => ({ at: Date.parse(message.created_at), message }))
|
|
567
|
+
.filter(({ at }) => !Number.isNaN(at))
|
|
568
|
+
.reduce((min, entry) => (min == null || entry.at < min.at ? entry : min), undefined)?.message;
|
|
569
|
+
draft.aiCfoByChatSessionId[chatSessionId] = {
|
|
570
|
+
chatSession: {
|
|
571
|
+
chatSessionId,
|
|
572
|
+
userId: owner.user_id,
|
|
573
|
+
chatSessionSummary: undefined,
|
|
574
|
+
// Nothing in the page carried a usable timestamp. "Now" is a
|
|
575
|
+
// guess, but it is a sane one and it keeps the row out of the
|
|
576
|
+
// Invalid-Date behaviour above; the sessions list corrects it.
|
|
577
|
+
createdAt: oldest != null ? (0, zeniDayJS_1.date)(oldest.created_at) : (0, zeniDayJS_1.dateNow)(),
|
|
578
|
+
},
|
|
579
|
+
questionAnswers: [],
|
|
580
|
+
};
|
|
514
581
|
}
|
|
515
582
|
const session = draft.aiCfoByChatSessionId[chatSessionId];
|
|
516
583
|
// Check if we have an existing partial Q&A pair for this session
|
|
@@ -790,6 +857,13 @@ const aiCfo = (0, toolkit_1.createSlice)({
|
|
|
790
857
|
},
|
|
791
858
|
clearSession(draft, action) {
|
|
792
859
|
const sessionId = action.payload;
|
|
860
|
+
draft.deletedChatSessionIds ?? (draft.deletedChatSessionIds = []);
|
|
861
|
+
if (!draft.deletedChatSessionIds.includes(sessionId)) {
|
|
862
|
+
draft.deletedChatSessionIds.push(sessionId);
|
|
863
|
+
if (draft.deletedChatSessionIds.length > DELETED_SESSION_MEMORY) {
|
|
864
|
+
draft.deletedChatSessionIds.splice(0, draft.deletedChatSessionIds.length - DELETED_SESSION_MEMORY);
|
|
865
|
+
}
|
|
866
|
+
}
|
|
793
867
|
delete draft.aiCfoByChatSessionId[sessionId];
|
|
794
868
|
delete draft.syntheticAnswersByChatSessionId[sessionId];
|
|
795
869
|
if (draft.partialQuestionAnswers?.[sessionId] != null) {
|
|
@@ -241,4 +241,20 @@ export interface AiCfoState {
|
|
|
241
241
|
aiCfoByChatSessionId: Record<ID, ChatSessionWithMessages>;
|
|
242
242
|
partialQuestionAnswers: Record<ID, AiCfoQuestionWithAnswer | undefined>;
|
|
243
243
|
syntheticAnswersByChatSessionId: Record<ID, SyntheticAiCfoAnswer[]>;
|
|
244
|
+
/**
|
|
245
|
+
* Sessions this client has deleted. `setChatHistory` seeds an entry for a
|
|
246
|
+
* session it has not seen, so without a tombstone an in-flight history
|
|
247
|
+
* response arriving after the delete would recreate the whole conversation
|
|
248
|
+
* and put the deleted chat back in the rail. `fetchChatHistoryEpic` uses
|
|
249
|
+
* `mergeMap`, so that request is never cancelled. Same race, and the same
|
|
250
|
+
* reasoning, as `deletedScheduleIds` on the view slice. Bounded — it only
|
|
251
|
+
* needs to outlive an in-flight request.
|
|
252
|
+
*
|
|
253
|
+
* Optional because `AiCfoState` is public API of a package four apps
|
|
254
|
+
* consume: making it required turns a bug fix into a compile break for
|
|
255
|
+
* every literal of this type, in this repo and in theirs. The reducer's
|
|
256
|
+
* initial state always sets it, so it is only ever absent on a
|
|
257
|
+
* hand-built literal — which is exactly the case that must keep working.
|
|
258
|
+
*/
|
|
259
|
+
deletedChatSessionIds?: ID[];
|
|
244
260
|
}
|
|
@@ -127,6 +127,33 @@ export interface JEOneTimeAccrualAiSuggestionPayload {
|
|
|
127
127
|
je_debit_account_name?: string | null;
|
|
128
128
|
memo?: string | null;
|
|
129
129
|
}
|
|
130
|
+
export interface JEOneTimeAccrualClearedPayload {
|
|
131
|
+
accrual_ids?: string[] | null;
|
|
132
|
+
consumed_line_ids?: string[] | null;
|
|
133
|
+
group_sum?: number | null;
|
|
134
|
+
intended_accrual_ids?: string[] | null;
|
|
135
|
+
match_shape?: string | null;
|
|
136
|
+
match_tier?: string | null;
|
|
137
|
+
matched_amount?: number | null;
|
|
138
|
+
matched_line_id?: string | null;
|
|
139
|
+
matched_transaction_date?: string | null;
|
|
140
|
+
matched_transaction_id?: string | null;
|
|
141
|
+
matched_transaction_integration_id?: string | null;
|
|
142
|
+
matched_transaction_sync_token?: string | null;
|
|
143
|
+
matched_transaction_type?: string | null;
|
|
144
|
+
reversed_at?: string | null;
|
|
145
|
+
}
|
|
146
|
+
export interface JEOneTimeAccrualMatchSuggestionPayload {
|
|
147
|
+
match_tier?: string | null;
|
|
148
|
+
matched_amount?: number | null;
|
|
149
|
+
matched_line_id?: string | null;
|
|
150
|
+
matched_transaction_date?: string | null;
|
|
151
|
+
matched_transaction_id?: string | null;
|
|
152
|
+
matched_transaction_integration_id?: string | null;
|
|
153
|
+
matched_transaction_sync_token?: string | null;
|
|
154
|
+
matched_transaction_type?: string | null;
|
|
155
|
+
resolution?: string | null;
|
|
156
|
+
}
|
|
130
157
|
export interface JEOneTimeAccrualPayload {
|
|
131
158
|
_id: ID;
|
|
132
159
|
estimated_amount: number;
|
|
@@ -139,6 +166,7 @@ export interface JEOneTimeAccrualPayload {
|
|
|
139
166
|
actual_reversal_post_date?: string | null;
|
|
140
167
|
ai_suggestion?: JEOneTimeAccrualAiSuggestionPayload | null;
|
|
141
168
|
automation_tier?: string | null;
|
|
169
|
+
cleared?: JEOneTimeAccrualClearedPayload | null;
|
|
142
170
|
created_by_user?: UserPayload | null;
|
|
143
171
|
currency?: string | null;
|
|
144
172
|
expected_reversal_date?: string | null;
|
|
@@ -151,12 +179,15 @@ export interface JEOneTimeAccrualPayload {
|
|
|
151
179
|
je_debit_account_name?: string | null;
|
|
152
180
|
je_debit_accounting_class_id?: ID | null;
|
|
153
181
|
je_debit_accounting_class_name?: string | null;
|
|
182
|
+
match_suggestion?: JEOneTimeAccrualMatchSuggestionPayload | null;
|
|
154
183
|
memo?: string | null;
|
|
155
184
|
posting_date?: string | null;
|
|
156
185
|
profile_snapshot?: JEOneTimeAccrualProfileSnapshotPayload | null;
|
|
157
186
|
reversal_policy?: string | null;
|
|
187
|
+
reversal_posting_date?: string | null;
|
|
158
188
|
reversal_transaction_id?: ID | null;
|
|
159
189
|
reversal_trigger?: string | null;
|
|
190
|
+
reversed_by_user?: UserPayload | null;
|
|
160
191
|
transaction_id?: ID | null;
|
|
161
192
|
transaction_integration_id?: ID | null;
|
|
162
193
|
}
|
|
@@ -455,6 +455,53 @@ function toJEOneTimeAccrualAiSuggestion(payload, currencyCode) {
|
|
|
455
455
|
: undefined,
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
|
+
function toJEOneTimeAccrualCleared(payload, currencyCode) {
|
|
459
|
+
if (payload == null) {
|
|
460
|
+
return undefined;
|
|
461
|
+
}
|
|
462
|
+
return {
|
|
463
|
+
matchedTransactionIntegrationId: payload.matched_transaction_integration_id ?? undefined,
|
|
464
|
+
matchedTransactionId: payload.matched_transaction_id ?? undefined,
|
|
465
|
+
matchedTransactionType: payload.matched_transaction_type ?? undefined,
|
|
466
|
+
matchedLineId: payload.matched_line_id ?? undefined,
|
|
467
|
+
consumedLineIds: payload.consumed_line_ids ?? undefined,
|
|
468
|
+
matchedAmount: payload.matched_amount != null
|
|
469
|
+
? toOneTimeAccrualAmount(payload.matched_amount, currencyCode)
|
|
470
|
+
: undefined,
|
|
471
|
+
groupSum: payload.group_sum != null
|
|
472
|
+
? toOneTimeAccrualAmount(payload.group_sum, currencyCode)
|
|
473
|
+
: undefined,
|
|
474
|
+
accrualIds: payload.accrual_ids ?? undefined,
|
|
475
|
+
intendedAccrualIds: payload.intended_accrual_ids ?? undefined,
|
|
476
|
+
reversedAt: payload.reversed_at != null ? (0, zeniDayJS_1.date)(payload.reversed_at) : undefined,
|
|
477
|
+
matchedTransactionDate: payload.matched_transaction_date != null
|
|
478
|
+
? (0, zeniDayJS_1.date)(payload.matched_transaction_date)
|
|
479
|
+
: undefined,
|
|
480
|
+
matchTier: payload.match_tier ?? undefined,
|
|
481
|
+
matchShape: payload.match_shape ?? undefined,
|
|
482
|
+
matchedTransactionSyncToken: payload.matched_transaction_sync_token ?? undefined,
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
function toJEOneTimeAccrualMatchSuggestion(payload, currencyCode) {
|
|
486
|
+
if (payload == null) {
|
|
487
|
+
return undefined;
|
|
488
|
+
}
|
|
489
|
+
return {
|
|
490
|
+
resolution: payload.resolution ?? undefined,
|
|
491
|
+
matchTier: payload.match_tier ?? undefined,
|
|
492
|
+
matchedTransactionIntegrationId: payload.matched_transaction_integration_id ?? undefined,
|
|
493
|
+
matchedTransactionId: payload.matched_transaction_id ?? undefined,
|
|
494
|
+
matchedTransactionType: payload.matched_transaction_type ?? undefined,
|
|
495
|
+
matchedLineId: payload.matched_line_id ?? undefined,
|
|
496
|
+
matchedAmount: payload.matched_amount != null
|
|
497
|
+
? toOneTimeAccrualAmount(payload.matched_amount, currencyCode)
|
|
498
|
+
: undefined,
|
|
499
|
+
matchedTransactionDate: payload.matched_transaction_date != null
|
|
500
|
+
? (0, zeniDayJS_1.date)(payload.matched_transaction_date)
|
|
501
|
+
: undefined,
|
|
502
|
+
matchedTransactionSyncToken: payload.matched_transaction_sync_token ?? undefined,
|
|
503
|
+
};
|
|
504
|
+
}
|
|
458
505
|
function toJEOneTimeAccrual(payload) {
|
|
459
506
|
return {
|
|
460
507
|
accrualId: payload._id,
|
|
@@ -471,6 +518,8 @@ function toJEOneTimeAccrual(payload) {
|
|
|
471
518
|
profileSnapshot: toJEOneTimeAccrualProfileSnapshot(payload.profile_snapshot, payload.currency),
|
|
472
519
|
isIgnored: payload.is_ignored === true,
|
|
473
520
|
aiSuggestion: toJEOneTimeAccrualAiSuggestion(payload.ai_suggestion, payload.currency),
|
|
521
|
+
cleared: toJEOneTimeAccrualCleared(payload.cleared, payload.currency),
|
|
522
|
+
matchSuggestion: toJEOneTimeAccrualMatchSuggestion(payload.match_suggestion, payload.currency),
|
|
474
523
|
// Exclusive by contract: a scheduled row reverses on expectedReversalDate and bills never
|
|
475
524
|
// drive it, so the two never need reconciling. Defaulting to on_bill_match matches the
|
|
476
525
|
// create path's default when the field is absent on an older document.
|
|
@@ -486,6 +535,9 @@ function toJEOneTimeAccrual(payload) {
|
|
|
486
535
|
actualReversalPostDate: payload.actual_reversal_post_date != null
|
|
487
536
|
? (0, zeniDayJS_1.date)(payload.actual_reversal_post_date)
|
|
488
537
|
: undefined,
|
|
538
|
+
reversalPostingDate: payload.reversal_posting_date != null
|
|
539
|
+
? (0, zeniDayJS_1.date)(payload.reversal_posting_date)
|
|
540
|
+
: undefined,
|
|
489
541
|
jeDebitAccountId: payload.je_debit_account_id ?? undefined,
|
|
490
542
|
jeDebitAccountName: payload.je_debit_account_name ?? undefined,
|
|
491
543
|
jeDebitAccountingClassId: payload.je_debit_accounting_class_id ?? undefined,
|
|
@@ -498,6 +550,7 @@ function toJEOneTimeAccrual(payload) {
|
|
|
498
550
|
transactionIntegrationId: payload.transaction_integration_id ?? undefined,
|
|
499
551
|
reversalTransactionId: payload.reversal_transaction_id ?? undefined,
|
|
500
552
|
createdBy: toJEOneTimeAccrualCreator(payload.created_by_user),
|
|
553
|
+
reversedBy: toJEOneTimeAccrualCreator(payload.reversed_by_user),
|
|
501
554
|
};
|
|
502
555
|
}
|
|
503
556
|
// The accrual wire format carries a currency CODE but no symbol, so the symbol has to be derived.
|
|
@@ -204,6 +204,35 @@ export interface JEOneTimeAccrualAiSuggestion {
|
|
|
204
204
|
jeDebitAccountName?: string;
|
|
205
205
|
memo?: string;
|
|
206
206
|
}
|
|
207
|
+
/** Cleared-bill stamp written when an accrual is matched and reversed. */
|
|
208
|
+
export interface JEOneTimeAccrualCleared {
|
|
209
|
+
accrualIds?: ID[];
|
|
210
|
+
consumedLineIds?: string[];
|
|
211
|
+
groupSum?: Amount;
|
|
212
|
+
intendedAccrualIds?: ID[];
|
|
213
|
+
matchedAmount?: Amount;
|
|
214
|
+
matchedLineId?: string;
|
|
215
|
+
matchedTransactionDate?: ZeniDate;
|
|
216
|
+
matchedTransactionId?: string;
|
|
217
|
+
matchedTransactionIntegrationId?: string;
|
|
218
|
+
matchedTransactionSyncToken?: string;
|
|
219
|
+
matchedTransactionType?: string;
|
|
220
|
+
matchShape?: string;
|
|
221
|
+
matchTier?: string;
|
|
222
|
+
reversedAt?: ZeniDate;
|
|
223
|
+
}
|
|
224
|
+
/** AI match suggestion on a posted on-bill-match accrual awaiting review. */
|
|
225
|
+
export interface JEOneTimeAccrualMatchSuggestion {
|
|
226
|
+
matchedAmount?: Amount;
|
|
227
|
+
matchedLineId?: string;
|
|
228
|
+
matchedTransactionDate?: ZeniDate;
|
|
229
|
+
matchedTransactionId?: string;
|
|
230
|
+
matchedTransactionIntegrationId?: string;
|
|
231
|
+
matchedTransactionSyncToken?: string;
|
|
232
|
+
matchedTransactionType?: string;
|
|
233
|
+
matchTier?: string;
|
|
234
|
+
resolution?: string;
|
|
235
|
+
}
|
|
207
236
|
export interface JEOneTimeAccrualState {
|
|
208
237
|
accrualId: ID;
|
|
209
238
|
accrualStatus: OneTimeAccrualStatusCodeType;
|
|
@@ -223,6 +252,7 @@ export interface JEOneTimeAccrualState {
|
|
|
223
252
|
actualReversalPostDate?: ZeniDate;
|
|
224
253
|
aiSuggestion?: JEOneTimeAccrualAiSuggestion;
|
|
225
254
|
automationTier?: OneTimeAccrualAutomationTierType;
|
|
255
|
+
cleared?: JEOneTimeAccrualCleared;
|
|
226
256
|
createdBy?: JEOneTimeAccrualCreator;
|
|
227
257
|
expectedReversalDate?: ZeniDate;
|
|
228
258
|
jeCreditAccountId?: ID;
|
|
@@ -233,10 +263,13 @@ export interface JEOneTimeAccrualState {
|
|
|
233
263
|
jeDebitAccountingClassId?: ID;
|
|
234
264
|
jeDebitAccountingClassName?: string;
|
|
235
265
|
jeDebitAccountName?: string;
|
|
266
|
+
matchSuggestion?: JEOneTimeAccrualMatchSuggestion;
|
|
236
267
|
postingDate?: ZeniDate;
|
|
237
268
|
profileSnapshot?: JEOneTimeAccrualProfileSnapshot;
|
|
269
|
+
reversalPostingDate?: ZeniDate;
|
|
238
270
|
reversalTransactionId?: ID;
|
|
239
271
|
reversalTrigger?: OneTimeAccrualReversalTriggerType;
|
|
272
|
+
reversedBy?: JEOneTimeAccrualCreator;
|
|
240
273
|
transactionId?: ID;
|
|
241
274
|
transactionIntegrationId?: ID;
|
|
242
275
|
}
|
|
@@ -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" | "revert_schedule" | "ignore_accrual" | "revert_accrual" | "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" | "confirm_statement_mapping" | "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" | "product_services_update" | "qbo_realm_id_update" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed";
|
|
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" | "actual_matching_match_and_reverse" | "actual_matching_undo_reversal" | "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" | "revert_schedule" | "ignore_accrual" | "revert_accrual" | "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" | "confirm_statement_mapping" | "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" | "product_services_update" | "qbo_realm_id_update" | "invoicing_dunning_case_resolved" | "invoicing_dunning_retry" | "invoicing_dunning_cancel" | "invoicing_dunning_settings_save" | "invoicing_qbo_backfill" | "invoicing_qbo_sync_health_retry" | "invoicing_qbo_settings_save" | "invoicing_branding_save" | "invoicing_discount_archive" | "invoicing_discount_unarchive" | "invoicing_discount_delete" | "invoicing_invoice_reminder_sent" | "invoicing_invoice_regenerated" | "invoicing_invoice_voided" | "invoicing_catalog_item_saved" | "invoicing_customer_saved" | "invoicing_subscription_saved" | "invoicing_coupon_saved" | "invoicing_invoice_saved" | "invoicing_credit_note_saved" | "invoicing_payment_recorded" | "invoicing_subscription_activated" | "invoicing_subscription_cancellation_removed" | "invoicing_subscription_cancelled" | "invoicing_subscription_non_renewing" | "invoicing_subscription_paused" | "invoicing_subscription_reactivated" | "invoicing_subscription_resumed" | "invoicing_subscription_term_end_changed";
|
|
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>;
|
|
@@ -11,6 +11,8 @@ const ALL_SNACKBAR_MESSAGE_SECTIONS = [
|
|
|
11
11
|
'cockpit_month_end_email_attachment_upload',
|
|
12
12
|
'je_bill_link',
|
|
13
13
|
'je_posted',
|
|
14
|
+
'actual_matching_match_and_reverse',
|
|
15
|
+
'actual_matching_undo_reversal',
|
|
14
16
|
'audit_score_updated',
|
|
15
17
|
'people_invite_people',
|
|
16
18
|
'people_invite_multiple_people',
|