@zeniai/client-epic-state 4.19.88-betaVR3 → 4.19.89
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/account/accountPayload.d.ts +0 -2
- package/lib/entity/account/accountPayload.js +0 -2
- package/lib/entity/account/accountState.d.ts +0 -2
- package/lib/entity/aiCfo/aiCfoSelector.d.ts +2 -1
- package/lib/entity/depositAccount/depositAccount.d.ts +1 -1
- package/lib/entity/depositAccount/depositAccount.js +1 -8
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -3
- package/lib/entity/transaction/payloadTypes/transactionPayload.js +0 -11
- package/lib/entity/transaction/stateTypes/transaction.d.ts +0 -3
- package/lib/epic.d.ts +1 -13
- package/lib/epic.js +1 -13
- package/lib/esm/entity/account/accountPayload.js +0 -2
- package/lib/esm/entity/depositAccount/depositAccount.js +1 -8
- package/lib/esm/entity/snackbar/snackbarTypes.js +0 -1
- package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +0 -11
- package/lib/esm/epic.js +1 -13
- package/lib/esm/index.js +5 -11
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -82
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +2 -8
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
- package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +1 -189
- package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -433
- package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +1 -23
- package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +1 -244
- package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -2
- package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +0 -44
- package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +1 -2
- package/lib/esm/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/esm/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/esm/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/esm/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
- package/lib/esm/zeniAPI.js +2 -0
- package/lib/index.d.ts +7 -12
- package/lib/index.js +32 -88
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -7
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +1 -15
- package/lib/view/aiCfoView/aiCfoViewReducer.js +2 -83
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -4
- package/lib/view/aiCfoView/aiCfoViewSelector.js +2 -9
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +1 -18
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +5 -7
- package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +0 -118
- package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +0 -201
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +3 -76
- package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +2 -434
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +3 -11
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +2 -24
- package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +1 -69
- package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +0 -1
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
- package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +0 -243
- package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +1 -2
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +0 -142
- package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +1 -54
- package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +1 -2
- package/lib/view/expenseAutomationView/types/transactionsViewState.js +1 -2
- package/lib/view/spendManagement/billPay/billList/billListSelector.js +0 -10
- package/lib/view/spendManagement/billPay/billList/billListState.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billList/billListState.js +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +0 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +0 -2
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.d.ts +0 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListSelector.js +0 -12
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +1 -1
- package/lib/view/spendManagement/reimbursement/remiListView/remiListState.js +0 -1
- package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +3 -3
- package/lib/zeniAPI.js +2 -0
- package/package.json +1 -1
- package/lib/esm/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -29
- package/lib/esm/view/expenseAutomationView/bulkUploadTiming.js +0 -10
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -29
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -49
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -40
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -47
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -61
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -33
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -56
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -77
- package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -79
- package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -24
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.d.ts +0 -8
- package/lib/view/aiCfoView/epics/fetchSuggestedQuestionsEpic.js +0 -33
- package/lib/view/expenseAutomationView/bulkUploadTiming.d.ts +0 -10
- package/lib/view/expenseAutomationView/bulkUploadTiming.js +0 -13
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +0 -18
- package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +0 -33
- package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +0 -53
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +0 -44
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +0 -51
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +0 -65
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +0 -8
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +0 -37
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +0 -9
- package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +0 -61
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +0 -14
- package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +0 -81
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +0 -25
- package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +0 -85
- package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +0 -7
- package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +0 -28
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AiCfoAnswerPayload, ChatSessionPayload } from '../../entity/aiCfo/aiCfoPayload';
|
|
2
2
|
import { UserRolePayload } from '../../entity/userRole/userRolePayload';
|
|
3
3
|
import { ZeniAPIResponse } from '../../responsePayload';
|
|
4
|
-
import { AiCfoSuggestedQuestionsPageContext } from './aiCfoViewState';
|
|
5
4
|
export type ContextStatus = 'NONE' | 'NOT_FOUND' | 'PERMISSION_DENIED' | 'SUCCESS';
|
|
6
5
|
export interface CreateSessionResponseData {
|
|
7
6
|
chat_session_id: string;
|
|
@@ -24,10 +23,4 @@ interface AcceptMasterTOSPayload {
|
|
|
24
23
|
user_roles: UserRolePayload[];
|
|
25
24
|
}
|
|
26
25
|
export type AcceptMasterTOSResponse = ZeniAPIResponse<AcceptMasterTOSPayload>;
|
|
27
|
-
export interface SuggestedQuestionsDataPayload {
|
|
28
|
-
generated_at: string;
|
|
29
|
-
page_context: AiCfoSuggestedQuestionsPageContext;
|
|
30
|
-
suggested_questions: string[];
|
|
31
|
-
}
|
|
32
|
-
export type FetchSuggestedQuestionsResponse = ZeniAPIResponse<SuggestedQuestionsDataPayload>;
|
|
33
26
|
export {};
|
|
@@ -4,7 +4,6 @@ import { ChatSessionPayload } from '../../entity/aiCfo/aiCfoPayload';
|
|
|
4
4
|
import { AiCfoAnswerResponseType } from '../../entity/aiCfo/aiCfoState';
|
|
5
5
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
6
6
|
import { ContextStatus } from './aiCfoViewPayload';
|
|
7
|
-
import { AiCfoSuggestedQuestionsPageContext } from './aiCfoViewState';
|
|
8
7
|
import { AiCfoViewState } from './aiCfoViewState';
|
|
9
8
|
export declare const initialAiCfoViewState: AiCfoViewState;
|
|
10
9
|
export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[sessionId: string, questionAnswerId: string, userId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined], {
|
|
@@ -90,19 +89,6 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
|
|
|
90
89
|
}, "aiCfoView/clearDeleteChatSessionStatus">, clearAiCfoView: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiCfoView/clearAiCfoView">, updateCotCollapsedState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
91
90
|
isCollapsed: boolean;
|
|
92
91
|
questionAnswerId: ID;
|
|
93
|
-
}, "aiCfoView/updateCotCollapsedState"
|
|
94
|
-
pageContext: AiCfoSuggestedQuestionsPageContext;
|
|
95
|
-
}, "aiCfoView/fetchSuggestedQuestions">, fetchSuggestedQuestionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
96
|
-
generatedAt: string;
|
|
97
|
-
pageContext: AiCfoSuggestedQuestionsPageContext;
|
|
98
|
-
suggestedQuestions: string[];
|
|
99
|
-
}, "aiCfoView/fetchSuggestedQuestionsSuccess">, fetchSuggestedQuestionsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
100
|
-
error: ZeniAPIStatus;
|
|
101
|
-
pageContext: AiCfoSuggestedQuestionsPageContext;
|
|
102
|
-
}, "aiCfoView/fetchSuggestedQuestionsFailure">, applyAiCfoSidePanelHostPageTransition: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
103
|
-
newAiCfoSidePanelHostPageKey: string;
|
|
104
|
-
/** When omitted or null, clears the active session (empty / suggested questions). */
|
|
105
|
-
nextCurrentChatSessionId?: ID | null;
|
|
106
|
-
}, "aiCfoView/applyAiCfoSidePanelHostPageTransition">, clearAiCfoSidePanelHostPageContext: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiCfoView/clearAiCfoSidePanelHostPageContext">;
|
|
92
|
+
}, "aiCfoView/updateCotCollapsedState">;
|
|
107
93
|
declare const _default: import("redux").Reducer<AiCfoViewState>;
|
|
108
94
|
export default _default;
|
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.updateCotCollapsedState = exports.clearAiCfoView = exports.clearDeleteChatSessionStatus = exports.deleteChatSessionFailure = exports.deleteChatSessionSuccess = exports.deleteChatSession = exports.acceptMasterTOSFailure = exports.acceptMasterTOSSuccess = exports.acceptMasterTOS = exports.stopSubmitQuestionFailure = exports.stopSubmitQuestionSuccess = exports.stopSubmitQuestion = exports.stopSubmitFailure = exports.stopSubmitSuccess = exports.stopSubmit = exports.clearLastContextMessage = exports.clearCurrentSessionId = exports.fetchChatHistoryFailure = exports.fetchChatHistorySuccess = exports.fetchChatHistory = exports.fetchChatSessionsForUserFailure = exports.fetchChatSessionsForUserSuccess = exports.fetchChatSessionsForUser = exports.createSessionAndSubmitFailure = exports.createSessionAndSubmitSuccess = exports.initializeNewSessionState = exports.createSessionAndSubmit = exports.createSessionFailure = exports.createSessionSuccess = exports.createSession = exports.setSession = exports.clearInput = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.updateResponseState = exports.submitQuestionFailure = exports.submitQuestionSuccess = exports.submitQuestion = exports.initialAiCfoViewState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
|
-
function removeSessionIdFromPageKeyMap(draft, sessionId) {
|
|
7
|
-
const map = draft.uiState.chatSessionIdByPageKey;
|
|
8
|
-
for (const key of Object.keys(map)) {
|
|
9
|
-
if (map[key] === sessionId) {
|
|
10
|
-
delete map[key];
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
function mirrorCurrentSessionToPageKeyMapIfActive(draft) {
|
|
15
|
-
const key = draft.uiState.aiCfoSidePanelHostPageKey;
|
|
16
|
-
const sessionId = draft.uiState.currentChatSessionId;
|
|
17
|
-
if (key != null && sessionId != null) {
|
|
18
|
-
draft.uiState.chatSessionIdByPageKey[key] = sessionId;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
6
|
exports.initialAiCfoViewState = {
|
|
22
7
|
fetchState: 'Not-Started',
|
|
23
8
|
error: undefined,
|
|
@@ -25,8 +10,6 @@ exports.initialAiCfoViewState = {
|
|
|
25
10
|
currentInput: '',
|
|
26
11
|
scrollPositionByChatSessionId: {},
|
|
27
12
|
currentChatSessionId: undefined,
|
|
28
|
-
aiCfoSidePanelHostPageKey: undefined,
|
|
29
|
-
chatSessionIdByPageKey: {},
|
|
30
13
|
agentId: undefined,
|
|
31
14
|
chatHistoryNextPageToken: {},
|
|
32
15
|
chatSessionsNextPageToken: { nextPageToken: null, hasMore: false },
|
|
@@ -50,7 +33,6 @@ exports.initialAiCfoViewState = {
|
|
|
50
33
|
fetchChatSessionHistoryByChatSessionId: {},
|
|
51
34
|
responseStateByChatSessionId: {},
|
|
52
35
|
stopSubmitStateByChatSessionId: {},
|
|
53
|
-
suggestedQuestionsByPageContext: {},
|
|
54
36
|
};
|
|
55
37
|
const aiCfoView = (0, toolkit_1.createSlice)({
|
|
56
38
|
name: 'aiCfoView',
|
|
@@ -184,7 +166,6 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
184
166
|
setSession(draft, action) {
|
|
185
167
|
draft.uiState.currentChatSessionId = action.payload.sessionId;
|
|
186
168
|
draft.uiState.agentId = action.payload.agentId;
|
|
187
|
-
mirrorCurrentSessionToPageKeyMapIfActive(draft);
|
|
188
169
|
},
|
|
189
170
|
createSession: {
|
|
190
171
|
reducer(draft, action) {
|
|
@@ -208,7 +189,6 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
208
189
|
nextPageToken: null,
|
|
209
190
|
hasMore: false,
|
|
210
191
|
};
|
|
211
|
-
mirrorCurrentSessionToPageKeyMapIfActive(draft);
|
|
212
192
|
},
|
|
213
193
|
createSessionFailure(draft, action) {
|
|
214
194
|
draft.createSessionState.fetchState = 'Error';
|
|
@@ -246,7 +226,6 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
246
226
|
nextPageToken: null,
|
|
247
227
|
hasMore: false,
|
|
248
228
|
};
|
|
249
|
-
mirrorCurrentSessionToPageKeyMapIfActive(draft);
|
|
250
229
|
},
|
|
251
230
|
createSessionAndSubmitSuccess(draft) {
|
|
252
231
|
// Note: currentChatSessionId, agentId, and chatHistoryNextPageToken are set by initializeNewSessionState
|
|
@@ -363,7 +342,6 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
363
342
|
draft.uiState.currentChatSessionId = undefined;
|
|
364
343
|
draft.uiState.agentId = undefined;
|
|
365
344
|
}
|
|
366
|
-
removeSessionIdFromPageKeyMap(draft, chatSessionId);
|
|
367
345
|
delete draft.uiState.chatHistoryNextPageToken[chatSessionId];
|
|
368
346
|
delete draft.uiState.scrollPositionByChatSessionId[chatSessionId];
|
|
369
347
|
delete draft.fetchChatSessionHistoryByChatSessionId[chatSessionId];
|
|
@@ -386,65 +364,6 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
386
364
|
},
|
|
387
365
|
clearCurrentSessionId(draft) {
|
|
388
366
|
draft.uiState.currentChatSessionId = undefined;
|
|
389
|
-
const key = draft.uiState.aiCfoSidePanelHostPageKey;
|
|
390
|
-
if (key != null) {
|
|
391
|
-
delete draft.uiState.chatSessionIdByPageKey[key];
|
|
392
|
-
}
|
|
393
|
-
},
|
|
394
|
-
applyAiCfoSidePanelHostPageTransition(draft, action) {
|
|
395
|
-
const { newAiCfoSidePanelHostPageKey, nextCurrentChatSessionId } = action.payload;
|
|
396
|
-
const prevKey = draft.uiState.aiCfoSidePanelHostPageKey;
|
|
397
|
-
const curId = draft.uiState.currentChatSessionId;
|
|
398
|
-
if (prevKey != null &&
|
|
399
|
-
prevKey !== newAiCfoSidePanelHostPageKey &&
|
|
400
|
-
curId != null) {
|
|
401
|
-
draft.uiState.chatSessionIdByPageKey[prevKey] = curId;
|
|
402
|
-
}
|
|
403
|
-
draft.uiState.aiCfoSidePanelHostPageKey = newAiCfoSidePanelHostPageKey;
|
|
404
|
-
draft.uiState.currentChatSessionId =
|
|
405
|
-
nextCurrentChatSessionId != null ? nextCurrentChatSessionId : undefined;
|
|
406
|
-
draft.uiState.currentInput = '';
|
|
407
|
-
mirrorCurrentSessionToPageKeyMapIfActive(draft);
|
|
408
|
-
},
|
|
409
|
-
clearAiCfoSidePanelHostPageContext(draft) {
|
|
410
|
-
const key = draft.uiState.aiCfoSidePanelHostPageKey;
|
|
411
|
-
const curId = draft.uiState.currentChatSessionId;
|
|
412
|
-
if (key != null && curId != null) {
|
|
413
|
-
draft.uiState.chatSessionIdByPageKey[key] = curId;
|
|
414
|
-
}
|
|
415
|
-
draft.uiState.aiCfoSidePanelHostPageKey = undefined;
|
|
416
|
-
},
|
|
417
|
-
fetchSuggestedQuestions(draft, action) {
|
|
418
|
-
const { pageContext } = action.payload;
|
|
419
|
-
const prev = draft.suggestedQuestionsByPageContext[pageContext];
|
|
420
|
-
draft.suggestedQuestionsByPageContext[pageContext] = {
|
|
421
|
-
fetchState: 'In-Progress',
|
|
422
|
-
pageContext,
|
|
423
|
-
suggestedQuestions: prev?.suggestedQuestions ?? [],
|
|
424
|
-
generatedAt: prev?.generatedAt,
|
|
425
|
-
error: undefined,
|
|
426
|
-
};
|
|
427
|
-
},
|
|
428
|
-
fetchSuggestedQuestionsSuccess(draft, action) {
|
|
429
|
-
const { pageContext, generatedAt, suggestedQuestions } = action.payload;
|
|
430
|
-
draft.suggestedQuestionsByPageContext[pageContext] = {
|
|
431
|
-
fetchState: 'Completed',
|
|
432
|
-
pageContext,
|
|
433
|
-
generatedAt,
|
|
434
|
-
suggestedQuestions,
|
|
435
|
-
error: undefined,
|
|
436
|
-
};
|
|
437
|
-
},
|
|
438
|
-
fetchSuggestedQuestionsFailure(draft, action) {
|
|
439
|
-
const { pageContext, error } = action.payload;
|
|
440
|
-
const prev = draft.suggestedQuestionsByPageContext[pageContext];
|
|
441
|
-
draft.suggestedQuestionsByPageContext[pageContext] = {
|
|
442
|
-
fetchState: 'Error',
|
|
443
|
-
pageContext,
|
|
444
|
-
suggestedQuestions: prev?.suggestedQuestions ?? [],
|
|
445
|
-
generatedAt: prev?.generatedAt,
|
|
446
|
-
error,
|
|
447
|
-
};
|
|
448
367
|
},
|
|
449
368
|
clearAiCfoView(draft) {
|
|
450
369
|
Object.assign(draft, exports.initialAiCfoViewState);
|
|
@@ -456,5 +375,5 @@ const aiCfoView = (0, toolkit_1.createSlice)({
|
|
|
456
375
|
},
|
|
457
376
|
},
|
|
458
377
|
});
|
|
459
|
-
_a = aiCfoView.actions, exports.submitQuestion = _a.submitQuestion, exports.submitQuestionSuccess = _a.submitQuestionSuccess, exports.submitQuestionFailure = _a.submitQuestionFailure, exports.updateResponseState = _a.updateResponseState, exports.updateAiCfoViewScrollPosition = _a.updateAiCfoViewScrollPosition, exports.updateCurrentInput = _a.updateCurrentInput, exports.clearInput = _a.clearInput, exports.setSession = _a.setSession, exports.createSession = _a.createSession, exports.createSessionSuccess = _a.createSessionSuccess, exports.createSessionFailure = _a.createSessionFailure, exports.createSessionAndSubmit = _a.createSessionAndSubmit, exports.initializeNewSessionState = _a.initializeNewSessionState, exports.createSessionAndSubmitSuccess = _a.createSessionAndSubmitSuccess, exports.createSessionAndSubmitFailure = _a.createSessionAndSubmitFailure, exports.fetchChatSessionsForUser = _a.fetchChatSessionsForUser, exports.fetchChatSessionsForUserSuccess = _a.fetchChatSessionsForUserSuccess, exports.fetchChatSessionsForUserFailure = _a.fetchChatSessionsForUserFailure, exports.fetchChatHistory = _a.fetchChatHistory, exports.fetchChatHistorySuccess = _a.fetchChatHistorySuccess, exports.fetchChatHistoryFailure = _a.fetchChatHistoryFailure, exports.clearCurrentSessionId = _a.clearCurrentSessionId, exports.clearLastContextMessage = _a.clearLastContextMessage, exports.stopSubmit = _a.stopSubmit, exports.stopSubmitSuccess = _a.stopSubmitSuccess, exports.stopSubmitFailure = _a.stopSubmitFailure, exports.stopSubmitQuestion = _a.stopSubmitQuestion, exports.stopSubmitQuestionSuccess = _a.stopSubmitQuestionSuccess, exports.stopSubmitQuestionFailure = _a.stopSubmitQuestionFailure, exports.acceptMasterTOS = _a.acceptMasterTOS, exports.acceptMasterTOSSuccess = _a.acceptMasterTOSSuccess, exports.acceptMasterTOSFailure = _a.acceptMasterTOSFailure, exports.deleteChatSession = _a.deleteChatSession, exports.deleteChatSessionSuccess = _a.deleteChatSessionSuccess, exports.deleteChatSessionFailure = _a.deleteChatSessionFailure, exports.clearDeleteChatSessionStatus = _a.clearDeleteChatSessionStatus, exports.clearAiCfoView = _a.clearAiCfoView, exports.updateCotCollapsedState = _a.updateCotCollapsedState
|
|
378
|
+
_a = aiCfoView.actions, exports.submitQuestion = _a.submitQuestion, exports.submitQuestionSuccess = _a.submitQuestionSuccess, exports.submitQuestionFailure = _a.submitQuestionFailure, exports.updateResponseState = _a.updateResponseState, exports.updateAiCfoViewScrollPosition = _a.updateAiCfoViewScrollPosition, exports.updateCurrentInput = _a.updateCurrentInput, exports.clearInput = _a.clearInput, exports.setSession = _a.setSession, exports.createSession = _a.createSession, exports.createSessionSuccess = _a.createSessionSuccess, exports.createSessionFailure = _a.createSessionFailure, exports.createSessionAndSubmit = _a.createSessionAndSubmit, exports.initializeNewSessionState = _a.initializeNewSessionState, exports.createSessionAndSubmitSuccess = _a.createSessionAndSubmitSuccess, exports.createSessionAndSubmitFailure = _a.createSessionAndSubmitFailure, exports.fetchChatSessionsForUser = _a.fetchChatSessionsForUser, exports.fetchChatSessionsForUserSuccess = _a.fetchChatSessionsForUserSuccess, exports.fetchChatSessionsForUserFailure = _a.fetchChatSessionsForUserFailure, exports.fetchChatHistory = _a.fetchChatHistory, exports.fetchChatHistorySuccess = _a.fetchChatHistorySuccess, exports.fetchChatHistoryFailure = _a.fetchChatHistoryFailure, exports.clearCurrentSessionId = _a.clearCurrentSessionId, exports.clearLastContextMessage = _a.clearLastContextMessage, exports.stopSubmit = _a.stopSubmit, exports.stopSubmitSuccess = _a.stopSubmitSuccess, exports.stopSubmitFailure = _a.stopSubmitFailure, exports.stopSubmitQuestion = _a.stopSubmitQuestion, exports.stopSubmitQuestionSuccess = _a.stopSubmitQuestionSuccess, exports.stopSubmitQuestionFailure = _a.stopSubmitQuestionFailure, exports.acceptMasterTOS = _a.acceptMasterTOS, exports.acceptMasterTOSSuccess = _a.acceptMasterTOSSuccess, exports.acceptMasterTOSFailure = _a.acceptMasterTOSFailure, exports.deleteChatSession = _a.deleteChatSession, exports.deleteChatSessionSuccess = _a.deleteChatSessionSuccess, exports.deleteChatSessionFailure = _a.deleteChatSessionFailure, exports.clearDeleteChatSessionStatus = _a.clearDeleteChatSessionStatus, exports.clearAiCfoView = _a.clearAiCfoView, exports.updateCotCollapsedState = _a.updateCotCollapsedState;
|
|
460
379
|
exports.default = aiCfoView.reducer;
|
|
@@ -3,8 +3,7 @@ import { FetchStateAndError } from '../../commonStateTypes/common';
|
|
|
3
3
|
import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
4
4
|
import { AiCfoSelectorView } from '../../entity/aiCfo/aiCfoSelector';
|
|
5
5
|
import { RootState } from '../../reducer';
|
|
6
|
-
import {
|
|
7
|
-
import { AiCfoViewUIState, SuggestedQuestionsForPageContext } from './aiCfoViewState';
|
|
6
|
+
import { AiCfoViewUIState } from './aiCfoViewState';
|
|
8
7
|
export interface AiCfoViewSelector extends SelectorView, AiCfoSelectorView {
|
|
9
8
|
createSessionAndSubmitState: FetchStateAndError;
|
|
10
9
|
createSessionState: FetchStateAndError;
|
|
@@ -18,8 +17,6 @@ export interface AiCfoViewSelector extends SelectorView, AiCfoSelectorView {
|
|
|
18
17
|
thought: FetchStateAndError;
|
|
19
18
|
}>;
|
|
20
19
|
stopSubmitStateByChatSessionId: Record<ID, FetchStateAndError>;
|
|
21
|
-
suggestedQuestionsByPageContext: Partial<Record<AiCfoSuggestedQuestionsPageContext, SuggestedQuestionsForPageContext>>;
|
|
22
20
|
uiState: AiCfoViewUIState;
|
|
23
21
|
}
|
|
24
22
|
export declare const getAiCfoView: (state: RootState) => AiCfoViewSelector;
|
|
25
|
-
export declare function getSuggestedQuestionsForPageContext(state: RootState, pageContext: AiCfoSuggestedQuestionsPageContext): SuggestedQuestionsForPageContext | undefined;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAiCfoView = void 0;
|
|
4
|
-
exports.getSuggestedQuestionsForPageContext = getSuggestedQuestionsForPageContext;
|
|
5
|
-
const aiCfoReducer_1 = require("../../entity/aiCfo/aiCfoReducer");
|
|
6
4
|
const aiCfoSelector_1 = require("../../entity/aiCfo/aiCfoSelector");
|
|
7
|
-
const aiCfoViewReducer_1 = require("./aiCfoViewReducer");
|
|
8
5
|
const getAiCfoView = (state) => {
|
|
9
|
-
const { fetchState, error, uiState, createSessionState, createSessionAndSubmitState, deleteChatSessionStateByChatSessionId, stopSubmitStateByChatSessionId, responseStateByChatSessionId, fetchChatSessionHistoryByChatSessionId, masterTOSAcceptanceState,
|
|
6
|
+
const { fetchState, error, uiState, createSessionState, createSessionAndSubmitState, deleteChatSessionStateByChatSessionId, stopSubmitStateByChatSessionId, responseStateByChatSessionId, fetchChatSessionHistoryByChatSessionId, masterTOSAcceptanceState, } = state.aiCfoViewState;
|
|
10
7
|
return {
|
|
11
8
|
fetchState,
|
|
12
9
|
error,
|
|
@@ -18,12 +15,8 @@ const getAiCfoView = (state) => {
|
|
|
18
15
|
uiState,
|
|
19
16
|
fetchChatSessionHistoryByChatSessionId,
|
|
20
17
|
masterTOSAcceptanceState,
|
|
21
|
-
|
|
22
|
-
...(0, aiCfoSelector_1.getAiCfoSelectorView)(state.aiCfoState ?? aiCfoReducer_1.initialAiCfoState),
|
|
18
|
+
...(0, aiCfoSelector_1.getAiCfoSelectorView)(state.aiCfoState),
|
|
23
19
|
version: 1,
|
|
24
20
|
};
|
|
25
21
|
};
|
|
26
22
|
exports.getAiCfoView = getAiCfoView;
|
|
27
|
-
function getSuggestedQuestionsForPageContext(state, pageContext) {
|
|
28
|
-
return state.aiCfoViewState?.suggestedQuestionsByPageContext?.[pageContext];
|
|
29
|
-
}
|
|
@@ -9,8 +9,6 @@ export interface AiCfoViewUIState {
|
|
|
9
9
|
chatHistoryNextPageToken: {
|
|
10
10
|
[chatSessionId: ID]: PageTokenState;
|
|
11
11
|
};
|
|
12
|
-
/** Last focused chat session id per side-panel host page key (e.g. `dashboard`, `reports:profit_loss`). */
|
|
13
|
-
chatSessionIdByPageKey: Partial<Record<string, ID>>;
|
|
14
12
|
chatSessionsFirstPageFetched: boolean;
|
|
15
13
|
chatSessionsNextPageToken: PageTokenState;
|
|
16
14
|
cotCollapsedByQuestionAnswerId: {
|
|
@@ -22,24 +20,11 @@ export interface AiCfoViewUIState {
|
|
|
22
20
|
scrollTop: number;
|
|
23
21
|
};
|
|
24
22
|
};
|
|
25
|
-
agentId?: ID;
|
|
26
|
-
* When set, the side panel on host routes (e.g. dashboard/reports) is scoped to this **page key**;
|
|
27
|
-
* session ids are mirrored into {@link chatSessionIdByPageKey}. Full `/ai-cfo/...` should clear this.
|
|
28
|
-
*/
|
|
29
|
-
aiCfoSidePanelHostPageKey?: string;
|
|
23
|
+
agentId?: ID;
|
|
30
24
|
currentChatSessionId?: ID;
|
|
31
25
|
lastContextMessage?: string;
|
|
32
26
|
lastContextStatus?: ContextStatus;
|
|
33
27
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Supported `page_context` values for GET .../suggested-questions and related UI state.
|
|
36
|
-
*/
|
|
37
|
-
export type AiCfoSuggestedQuestionsPageContext = 'balance_sheet' | 'profit_loss' | 'vendors' | 'transactions' | 'cash_flow' | 'accounts_receivable' | 'accounts_payable' | 'transaction_details';
|
|
38
|
-
export interface SuggestedQuestionsForPageContext extends FetchStateAndError {
|
|
39
|
-
pageContext: AiCfoSuggestedQuestionsPageContext;
|
|
40
|
-
suggestedQuestions: string[];
|
|
41
|
-
generatedAt?: string;
|
|
42
|
-
}
|
|
43
28
|
export interface AiCfoViewState extends FetchStateAndError {
|
|
44
29
|
allChatSessionIds: ID[];
|
|
45
30
|
createSessionAndSubmitState: FetchStateAndError;
|
|
@@ -54,7 +39,5 @@ export interface AiCfoViewState extends FetchStateAndError {
|
|
|
54
39
|
thought: FetchStateAndError;
|
|
55
40
|
}>;
|
|
56
41
|
stopSubmitStateByChatSessionId: Record<ID, FetchStateAndError>;
|
|
57
|
-
/** Keyed by `page_context` query value (e.g. balance_sheet). */
|
|
58
|
-
suggestedQuestionsByPageContext: Partial<Record<AiCfoSuggestedQuestionsPageContext, SuggestedQuestionsForPageContext>>;
|
|
59
42
|
uiState: AiCfoViewUIState;
|
|
60
43
|
}
|
|
@@ -3,7 +3,7 @@ import { Status } from '../../commonStateTypes/status';
|
|
|
3
3
|
import { View } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
4
4
|
import { ZeniDate } from '../../zeniDayJS';
|
|
5
5
|
import { AuditSummary } from '../reviewCompanyView/reviewCompanyViewState';
|
|
6
|
-
export declare const toAuditRuleEntityType: (v: string) => "dashboard" | "
|
|
6
|
+
export declare const toAuditRuleEntityType: (v: string) => "dashboard" | "reports" | "transactions";
|
|
7
7
|
export type AuditRuleEntityType = ReturnType<typeof toAuditRuleEntityType>;
|
|
8
8
|
declare const toAuditRuleEntityIdType: (v: string) => "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "uncategorized-expense" | "uncategorized-income";
|
|
9
9
|
export type AuditRuleEntityIdType = ReturnType<typeof toAuditRuleEntityIdType>;
|
package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js
CHANGED
|
@@ -15,13 +15,11 @@ const uploadMissingReceiptSuccessEpic = (actions$, state$) => actions$.pipe((0,
|
|
|
15
15
|
updateActions.push((0, transactionReducer_1.updateTransaction)(transactionPayload.transaction_id, transactionPayload, updateType));
|
|
16
16
|
if (currentTenant != null) {
|
|
17
17
|
const monthEndChecksPeriod = selectedPeriodByTenantId[currentTenant.tenantId];
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
18
|
+
updateActions.push((0, monthEndCloseChecksViewReducer_1.fetchMonthEndCloseChecks)({
|
|
19
|
+
tenantId: currentTenant.tenantId,
|
|
20
|
+
period: monthEndChecksPeriod,
|
|
21
|
+
refreshViewInBackground: true,
|
|
22
|
+
}));
|
|
25
23
|
}
|
|
26
24
|
return (0, rxjs_1.from)(updateActions);
|
|
27
25
|
}));
|
package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare const getLineItemsByTransactionsIdsFromResponse: (transactions: S
|
|
|
37
37
|
export declare const getLineItemsByTransactionIdsFromLocalData: (transactionLocalData: TransactionReviewLocalDataSelectorView[], selectedTab: TransactionsTab) => Record<ID, string[]>;
|
|
38
38
|
export declare const mergeTabSpecificLineItems: (currentTabSpecificLineItems: TabSpecificLineItems, selectedTab: TransactionsTab, newLineItems: TabSpecificLineItems) => TabSpecificLineItems;
|
|
39
39
|
export declare const getSnackbarMessageForTransactionReview: (updatedCount: number, failedCount: number, categorizedCount: number) => {
|
|
40
|
-
messageSection: "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_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_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" | "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" | "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" | "
|
|
40
|
+
messageSection: "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_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_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" | "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" | "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" | "receipts_upload" | "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" | "treasury_update_portfolio_allocation" | "send_email_magic_link_to_user" | "complete_profile_done" | "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";
|
|
41
41
|
messageText: "notification" | "success" | "failed";
|
|
42
42
|
type: "error" | "success" | "info";
|
|
43
43
|
variables: {
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { URLPayload } from '../../../commonPayloadTypes/urlPayload';
|
|
2
|
-
import type { MonthYearPeriodId } from '../../../commonStateTypes/timePeriod';
|
|
3
1
|
import { TransactionPayload } from '../../../entity/transaction/payloadTypes/transactionPayload';
|
|
4
|
-
import { SupportedTransactionPayload } from '../../../entity/transaction/transactionState';
|
|
5
2
|
import { ZeniAPIResponse } from '../../../responsePayload';
|
|
6
|
-
import { type BatchDetails, type BatchFile, type BatchFileStatus, type BatchListItem, type BatchStatus, type BatchSummary, type ManualSearchResult } from '../types/missingReceiptsViewState';
|
|
7
3
|
export interface MissingReceiptsQueryPayload {
|
|
8
4
|
end_date: string;
|
|
9
5
|
is_attachment_missing_only: boolean;
|
|
@@ -17,118 +13,4 @@ interface MissingReceiptsPayload {
|
|
|
17
13
|
transactions: TransactionPayload[];
|
|
18
14
|
}
|
|
19
15
|
export type MissingReceiptsResponse = ZeniAPIResponse<MissingReceiptsPayload>;
|
|
20
|
-
export interface BatchListQueryPayload {
|
|
21
|
-
end_date: string;
|
|
22
|
-
sort_order: string;
|
|
23
|
-
start_date: string;
|
|
24
|
-
}
|
|
25
|
-
export interface BulkUploadResponsePayload {
|
|
26
|
-
batch_id: string;
|
|
27
|
-
status: string;
|
|
28
|
-
total_files: number;
|
|
29
|
-
}
|
|
30
|
-
export type BulkUploadResponse = ZeniAPIResponse<BulkUploadResponsePayload>;
|
|
31
|
-
export interface BatchListResponsePayload {
|
|
32
|
-
batches: BatchListItemPayload[];
|
|
33
|
-
}
|
|
34
|
-
export interface BatchListItemPayload {
|
|
35
|
-
batch_id: string;
|
|
36
|
-
created_at: string;
|
|
37
|
-
failed_count: number;
|
|
38
|
-
matched_count: number;
|
|
39
|
-
no_match_count: number;
|
|
40
|
-
possible_matches_count: number;
|
|
41
|
-
status: string;
|
|
42
|
-
total_files: number;
|
|
43
|
-
}
|
|
44
|
-
export type BatchListResponse = ZeniAPIResponse<BatchListResponsePayload>;
|
|
45
|
-
export interface MatchedTransactionPayload {
|
|
46
|
-
amount: number;
|
|
47
|
-
currency_code: string;
|
|
48
|
-
transaction_date: string | null;
|
|
49
|
-
transaction_id: string;
|
|
50
|
-
vendor_name: string;
|
|
51
|
-
transaction_type?: string;
|
|
52
|
-
vendor_logo?: URLPayload | null;
|
|
53
|
-
}
|
|
54
|
-
export interface MatchCandidatePayload extends MatchedTransactionPayload {
|
|
55
|
-
match_score: number;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Wire payload for a batch file row. `status` may use legacy aliases (`matched`, `un_matched`,
|
|
59
|
-
* `possible_match`, `possible_matches`, etc.) until the backend is fully migrated; canonical
|
|
60
|
-
* values are applied in {@link parseBatchFileStatus} via {@link toBatchFile}.
|
|
61
|
-
*/
|
|
62
|
-
export interface BatchFilePayload {
|
|
63
|
-
attachment_id: string;
|
|
64
|
-
file_id: string;
|
|
65
|
-
file_preview_url: string | null;
|
|
66
|
-
filename: string;
|
|
67
|
-
status: string;
|
|
68
|
-
candidates?: MatchCandidatePayload[];
|
|
69
|
-
match_source?: string;
|
|
70
|
-
matched_transaction?: MatchedTransactionPayload;
|
|
71
|
-
}
|
|
72
|
-
export interface BatchDetailsResponsePayload {
|
|
73
|
-
batch_id: string;
|
|
74
|
-
created_at: string;
|
|
75
|
-
files: BatchFilePayload[];
|
|
76
|
-
status: string;
|
|
77
|
-
summary: {
|
|
78
|
-
failed: number;
|
|
79
|
-
matched: number;
|
|
80
|
-
no_match: number;
|
|
81
|
-
possible_matches: number;
|
|
82
|
-
total: number;
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
export type BatchDetailsResponse = ZeniAPIResponse<BatchDetailsResponsePayload>;
|
|
86
|
-
/**
|
|
87
|
-
* Maps batch-details API `files[].status` strings to canonical {@link BatchFileStatus}.
|
|
88
|
-
* Legacy aliases are supported during rollout; unknown strings map to `failed` so Redux never
|
|
89
|
-
* holds untyped status values.
|
|
90
|
-
*/
|
|
91
|
-
export declare function parseBatchFileStatus(raw: string): BatchFileStatus;
|
|
92
|
-
export declare function toBatchFile(payload: BatchFilePayload, filesEndPoint?: string): BatchFile;
|
|
93
|
-
export declare function extractTransactionPayloadsFromBatchFiles(files: BatchFilePayload[]): SupportedTransactionPayload[];
|
|
94
|
-
export declare function toBatchSummary(payload: BatchDetailsResponsePayload['summary']): BatchSummary;
|
|
95
|
-
export declare function toBatchDetails(payload: BatchDetailsResponsePayload, filesEndPoint?: string): BatchDetails;
|
|
96
|
-
/** Batch list `status` is a string from the API — compare case-insensitively. */
|
|
97
|
-
export declare function isBatchListStatusCompleted(status: string): boolean;
|
|
98
|
-
/**
|
|
99
|
-
* Subset of the get-all-batches (`/batches?query=...`) list that is eligible for
|
|
100
|
-
* `GET /batches/:batchId` details fetches. The stored list may include pending, failed, or other
|
|
101
|
-
* statuses for UI; only `completed` rows should trigger batch-details requests.
|
|
102
|
-
*/
|
|
103
|
-
export declare function filterBatchListItemsForBatchDetailsFetch(batches: BatchListItem[]): BatchListItem[];
|
|
104
|
-
/**
|
|
105
|
-
* Batch details API response `status` field — only completed payloads should be stored from
|
|
106
|
-
* multi-batch fetch paths (list can be briefly stale vs. live processing state).
|
|
107
|
-
*/
|
|
108
|
-
export declare function isBatchDetailsApiStatusCompleted(status: string): boolean;
|
|
109
|
-
export declare function findBatchListItemForBatchId(batchListByPeriod: Record<MonthYearPeriodId, BatchListItem[]>, batchId: string): BatchListItem | undefined;
|
|
110
|
-
/**
|
|
111
|
-
* Whether it is appropriate to call `GET .../batches/:id` for details.
|
|
112
|
-
* Skips when live batch status or batch list row indicates the batch is not completed yet.
|
|
113
|
-
* When status is unknown in both sources, allows the request (e.g. dispatch before list refresh).
|
|
114
|
-
*/
|
|
115
|
-
export declare function shouldFetchBatchDetailsForBatchId(batchStatusById: Record<string, BatchStatus>, batchListByPeriod: Record<MonthYearPeriodId, BatchListItem[]>, batchId: string): boolean;
|
|
116
|
-
export declare function toBatchListItem(payload: BatchListItemPayload): BatchListItem;
|
|
117
|
-
/** Maps expense-automation transaction rows to manual-search list rows (Unmatched tab). */
|
|
118
|
-
export declare function supportedTransactionPayloadToManualSearchResult(payload: SupportedTransactionPayload): ManualSearchResult;
|
|
119
|
-
export interface CompletedTransactionsQueryPayload {
|
|
120
|
-
end_date?: string;
|
|
121
|
-
match_type?: string;
|
|
122
|
-
page_size?: number;
|
|
123
|
-
page_token?: string | null;
|
|
124
|
-
sort_by?: string;
|
|
125
|
-
sort_order?: string;
|
|
126
|
-
start_date?: string;
|
|
127
|
-
}
|
|
128
|
-
export interface CompletedTransactionsResponsePayload {
|
|
129
|
-
next_page_token: string | null;
|
|
130
|
-
total_count: number;
|
|
131
|
-
transactions: SupportedTransactionPayload[];
|
|
132
|
-
}
|
|
133
|
-
export type CompletedTransactionsResponse = ZeniAPIResponse<CompletedTransactionsResponsePayload>;
|
|
134
16
|
export {};
|