@zeniai/client-epic-state 4.17.11 → 4.17.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/lib/entity/accountRecon/accountReconPayload.d.ts +2 -0
  2. package/lib/entity/accountRecon/accountReconPayload.js +6 -1
  3. package/lib/entity/accountRecon/accountReconState.d.ts +2 -0
  4. package/lib/entity/{aiController/aiControllerPayload.d.ts → aiCfo/aiCfoPayload.d.ts} +3 -3
  5. package/lib/entity/aiCfo/aiCfoReducer.d.ts +45 -0
  6. package/lib/entity/{aiController/aiControllerReducer.js → aiCfo/aiCfoReducer.js} +40 -42
  7. package/lib/entity/aiCfo/aiCfoSelector.d.ts +14 -0
  8. package/lib/entity/{aiController/aiControllerSelector.js → aiCfo/aiCfoSelector.js} +6 -6
  9. package/lib/entity/aiCfo/aiCfoState.d.ts +88 -0
  10. package/lib/entity/aiCfo/aiCfoState.js +46 -0
  11. package/lib/entity/tenant/clearAllEpic.d.ts +4 -4
  12. package/lib/entity/tenant/clearAllEpic.js +4 -4
  13. package/lib/epic.d.ts +7 -7
  14. package/lib/epic.js +7 -7
  15. package/lib/index.d.ts +7 -7
  16. package/lib/index.js +48 -48
  17. package/lib/reducer.d.ts +6 -6
  18. package/lib/reducer.js +6 -6
  19. package/lib/view/{aiControllerView/aiControllerViewPayload.d.ts → aiCfoView/aiCfoViewPayload.d.ts} +2 -2
  20. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +73 -0
  21. package/lib/view/{aiControllerView/aiControllerViewReducer.js → aiCfoView/aiCfoViewReducer.js} +10 -10
  22. package/lib/view/{aiControllerView/aiControllerViewSelector.d.ts → aiCfoView/aiCfoViewSelector.d.ts} +5 -5
  23. package/lib/view/{aiControllerView/aiControllerViewSelector.js → aiCfoView/aiCfoViewSelector.js} +6 -6
  24. package/lib/view/{aiControllerView/aiControllerViewState.d.ts → aiCfoView/aiCfoViewState.d.ts} +3 -3
  25. package/lib/view/{aiControllerView → aiCfoView}/epics/createSessionAndSubmitEpic.d.ts +2 -2
  26. package/lib/view/{aiControllerView → aiCfoView}/epics/createSessionAndSubmitEpic.js +9 -9
  27. package/lib/view/{aiControllerView → aiCfoView}/epics/createSessionEpic.d.ts +2 -2
  28. package/lib/view/{aiControllerView → aiCfoView}/epics/createSessionEpic.js +8 -8
  29. package/lib/view/{aiControllerView → aiCfoView}/epics/fetchChatHistoryEpic.d.ts +2 -2
  30. package/lib/view/{aiControllerView → aiCfoView}/epics/fetchChatHistoryEpic.js +9 -9
  31. package/lib/view/{aiControllerView → aiCfoView}/epics/fetchChatSessionsForUserEpic.d.ts +2 -2
  32. package/lib/view/{aiControllerView → aiCfoView}/epics/fetchChatSessionsForUserEpic.js +8 -9
  33. package/lib/view/{aiControllerView → aiCfoView}/epics/stopSubmitEpic.d.ts +2 -2
  34. package/lib/view/{aiControllerView → aiCfoView}/epics/stopSubmitEpic.js +11 -11
  35. package/lib/view/{aiControllerView → aiCfoView}/epics/stopSubmitQuestionEpic.d.ts +2 -2
  36. package/lib/view/{aiControllerView → aiCfoView}/epics/stopSubmitQuestionEpic.js +8 -8
  37. package/lib/view/{aiControllerView → aiCfoView}/epics/submitQuestionEpic.d.ts +2 -2
  38. package/lib/view/{aiControllerView → aiCfoView}/epics/submitQuestionEpic.js +10 -10
  39. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +2 -0
  40. package/lib/zeniAPI.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/lib/entity/aiController/aiControllerReducer.d.ts +0 -46
  43. package/lib/entity/aiController/aiControllerSelector.d.ts +0 -14
  44. package/lib/entity/aiController/aiControllerState.d.ts +0 -88
  45. package/lib/entity/aiController/aiControllerState.js +0 -49
  46. package/lib/view/aiControllerView/aiControllerViewReducer.d.ts +0 -73
  47. /package/lib/entity/{aiController/aiControllerPayload.js → aiCfo/aiCfoPayload.js} +0 -0
  48. /package/lib/view/{aiControllerView/aiControllerViewPayload.js → aiCfoView/aiCfoViewPayload.js} +0 -0
  49. /package/lib/view/{aiControllerView/aiControllerViewState.js → aiCfoView/aiCfoViewState.js} +0 -0
@@ -56,6 +56,8 @@ interface RecommendedActionPayload {
56
56
  recommended_actions: string;
57
57
  recommended_action_description: string;
58
58
  recommended_transactions: RecommendedReviewTransactionPayload[];
59
+ plaid_confidence_score?: string | null;
60
+ zeni_confidence_score?: number | null;
59
61
  }
60
62
  export interface TransactionsToReviewPayload {
61
63
  amount: number;
@@ -7,7 +7,7 @@ const zeniDayJS_1 = require("../../zeniDayJS");
7
7
  const reconciliationTransaction_1 = require("../transaction/stateTypes/reconciliationTransaction");
8
8
  const accountReconState_1 = require("./accountReconState");
9
9
  const toTransactionsToReview = (payload, currencyPayload) => {
10
- var _a, _b;
10
+ var _a, _b, _c, _d;
11
11
  return {
12
12
  transactionId: payload.transaction_id,
13
13
  transactionDirection: (0, reconciliationTransaction_1.toTransactionDirectionType)(payload.transaction_direction),
@@ -26,6 +26,8 @@ const toTransactionsToReview = (payload, currencyPayload) => {
26
26
  : undefined,
27
27
  recommendedAction: {
28
28
  action: (0, accountReconState_1.toRecommendedActionCodeType)(payload.recommended_action.recommended_actions),
29
+ plaidConfidenceScore: (_c = payload.recommended_action.plaid_confidence_score) !== null && _c !== void 0 ? _c : null,
30
+ zeniConfidenceScore: (_d = payload.recommended_action.zeni_confidence_score) !== null && _d !== void 0 ? _d : null,
29
31
  reason: payload.recommended_action.recommended_action_description,
30
32
  recommendedTransactions: payload.recommended_action.recommended_transactions.map((transaction) => (0, exports.toRecommendedReviewTransaction)(transaction, currencyPayload)),
31
33
  },
@@ -33,6 +35,7 @@ const toTransactionsToReview = (payload, currencyPayload) => {
33
35
  };
34
36
  exports.toTransactionsToReview = toTransactionsToReview;
35
37
  const toTransactionsToReviewPayload = (payload) => {
38
+ var _a, _b;
36
39
  return {
37
40
  transaction_id: payload.transactionId,
38
41
  transaction_direction: (0, reconciliationTransaction_1.toTransactionDirectionType)(payload.transactionDirection),
@@ -44,6 +47,8 @@ const toTransactionsToReviewPayload = (payload) => {
44
47
  recommended_actions: (0, accountReconState_1.toRecommendedActionCodeType)(payload.recommendedAction.action),
45
48
  recommended_action_description: payload.recommendedAction.reason,
46
49
  recommended_transactions: payload.recommendedAction.recommendedTransactions.map((transaction) => (0, exports.toRecommendedReviewTransactionPayload)(transaction)),
50
+ plaid_confidence_score: (_a = payload.recommendedAction.plaidConfidenceScore) !== null && _a !== void 0 ? _a : null,
51
+ zeni_confidence_score: (_b = payload.recommendedAction.zeniConfidenceScore) !== null && _b !== void 0 ? _b : null,
47
52
  },
48
53
  };
49
54
  };
@@ -78,6 +78,8 @@ export interface RecommendedAction {
78
78
  action: RecommendedActionCodeType;
79
79
  reason: string;
80
80
  recommendedTransactions: RecommendedReviewTransaction[];
81
+ plaidConfidenceScore: string | null;
82
+ zeniConfidenceScore: number | null;
81
83
  }
82
84
  export interface RecommendedReviewTransaction {
83
85
  confidenceScore: number;
@@ -13,15 +13,15 @@ export interface ChartVisualizationPayload {
13
13
  y: string | string[];
14
14
  lines?: string[] | null;
15
15
  }
16
- export interface AIControllerVisualizationPayload {
16
+ export interface AiCfoVisualizationPayload {
17
17
  type: string | null;
18
18
  data: TableVisualizationPayload | ChartVisualizationPayload | null;
19
19
  }
20
- export interface AIControllerAnswerPayload {
20
+ export interface AiCfoAnswerPayload {
21
21
  text: string;
22
22
  state: string;
23
23
  type: string;
24
- visualization: AIControllerVisualizationPayload | null;
24
+ visualization: AiCfoVisualizationPayload | null;
25
25
  metadata: Record<string, string>;
26
26
  assumptions: string | null;
27
27
  insights: string | null;
@@ -0,0 +1,45 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { ZeniDate } from '../../zeniDayJS';
3
+ import { AiCfoAnswerPayload, AiCfoVisualizationPayload, ChatSessionPayload, MessagePayload } from './aiCfoPayload';
4
+ import { AiCfoState, AiCfoVisualization } from './aiCfoState';
5
+ export declare const initialAiCfoState: AiCfoState;
6
+ export declare const toAiCfoVisualization: (visualization: AiCfoVisualizationPayload) => AiCfoVisualization | undefined;
7
+ export declare const setNewSession: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
8
+ chatSessionId: ID;
9
+ userId: ID;
10
+ createdAt: ZeniDate;
11
+ }, "aiCfo/setNewSession">, clearSession: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "aiCfo/clearSession">, setSessions: import("@reduxjs/toolkit").ActionCreatorWithPayload<ChatSessionPayload[], "aiCfo/setSessions">, setChatHistory: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
12
+ chatSessionId: ID;
13
+ history: MessagePayload[];
14
+ isPaginationComplete?: boolean;
15
+ }, "aiCfo/setChatHistory">, upsertAnswerPayload: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
16
+ chatSessionId: ID;
17
+ answerPayload: AiCfoAnswerPayload;
18
+ userId: ID;
19
+ questionAnswerId?: ID;
20
+ }, "aiCfo/upsertAnswerPayload">, upsertOrAddQuestionAnswerPayload: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
21
+ chatSessionId: ID;
22
+ questionAnswerId: ID;
23
+ question: {
24
+ questionId: ID;
25
+ text: string;
26
+ createdAt: ZeniDate;
27
+ };
28
+ answerPayload: AiCfoAnswerPayload;
29
+ userId: ID;
30
+ insertQuestionAnswer?: boolean;
31
+ }, "aiCfo/upsertOrAddQuestionAnswerPayload">, addQuestionPayload: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
32
+ chatSessionId: ID;
33
+ questionAnswerId: ID;
34
+ question: {
35
+ questionId: ID;
36
+ text: string;
37
+ createdAt: ZeniDate;
38
+ };
39
+ userId: ID;
40
+ }, "aiCfo/addQuestionPayload">, clearAiCfo: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiCfo/clearAiCfo">, deleteQuestion: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
41
+ chatSessionId: ID;
42
+ questionAnswerId: ID;
43
+ }, "aiCfo/deleteQuestion">;
44
+ declare const _default: import("redux").Reducer<AiCfoState>;
45
+ export default _default;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.deleteQuestion = exports.clearAIController = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = exports.setChatHistory = exports.setSessions = exports.clearSession = exports.setNewSession = exports.toAIControllerVisualization = exports.initialAIControllerState = void 0;
4
+ exports.deleteQuestion = exports.clearAiCfo = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = exports.setChatHistory = exports.setSessions = exports.clearSession = exports.setNewSession = exports.toAiCfoVisualization = exports.initialAiCfoState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const zeniDayJS_1 = require("../../zeniDayJS");
7
- const aiControllerState_1 = require("./aiControllerState");
8
- exports.initialAIControllerState = {
9
- aiControllerByChatSessionId: {},
7
+ const aiCfoState_1 = require("./aiCfoState");
8
+ exports.initialAiCfoState = {
9
+ aiCfoByChatSessionId: {},
10
10
  partialQuestionAnswers: {},
11
11
  };
12
12
  // Utility: Merge two arrays of Q&A pairs, combining responses for the same question
@@ -32,7 +32,7 @@ function mergeQuestionAnswerPairs(existing, newQAs) {
32
32
  // Convert back to array and sort by question creation time
33
33
  return Array.from(merged.values()).sort((a, b) => a.question.createdAt.valueOf() - b.question.createdAt.valueOf());
34
34
  }
35
- // Utility: Convert chat history (array of MessagePayload) to AIControllerQuestionWithAnswer[]
35
+ // Utility: Convert chat history (array of MessagePayload) to AiCfoQuestionWithAnswer[]
36
36
  function chatHistoryToQA(history) {
37
37
  var _a, _b, _c;
38
38
  const questionGroups = new Map();
@@ -58,7 +58,7 @@ function chatHistoryToQA(history) {
58
58
  group.responses.push(message);
59
59
  }
60
60
  }
61
- // Convert groups to AIControllerQuestionWithAnswer
61
+ // Convert groups to AiCfoQuestionWithAnswer
62
62
  const questionAnswerPairs = [];
63
63
  for (const [messageId, group] of questionGroups.entries()) {
64
64
  // Skip groups that don't have a question
@@ -69,7 +69,7 @@ function chatHistoryToQA(history) {
69
69
  messageId: group.question.message_id,
70
70
  chatSessionId: group.question.chat_session_id,
71
71
  userId: group.question.user_id,
72
- sender: (0, aiControllerState_1.toMessageSender)(group.question.sender),
72
+ sender: (0, aiCfoState_1.toMessageSender)(group.question.sender),
73
73
  state: 'complete',
74
74
  questionText: group.question.content,
75
75
  createdAt: (0, zeniDayJS_1.date)(group.question.created_at),
@@ -78,7 +78,7 @@ function chatHistoryToQA(history) {
78
78
  // Process each response for this question
79
79
  for (const agentMessage of group.responses) {
80
80
  try {
81
- const parsedAgentMessage = (0, aiControllerState_1.toMessageType)(agentMessage.message_type) === 'json'
81
+ const parsedAgentMessage = (0, aiCfoState_1.toMessageType)(agentMessage.message_type) === 'json'
82
82
  ? JSON.parse(agentMessage.content)
83
83
  : {
84
84
  text: agentMessage.content,
@@ -87,21 +87,21 @@ function chatHistoryToQA(history) {
87
87
  visualization: null,
88
88
  follow_up_questions: [],
89
89
  };
90
- const responseType = (0, aiControllerState_1.toAIControllerAnswerResponseType)(parsedAgentMessage.type);
91
- const responseState = (0, aiControllerState_1.toAIControllerAnswerStateType)(parsedAgentMessage.state);
90
+ const responseType = (0, aiCfoState_1.toAiCfoAnswerResponseType)(parsedAgentMessage.type);
91
+ const responseState = (0, aiCfoState_1.toAiCfoAnswerStateType)(parsedAgentMessage.state);
92
92
  if (typeof parsedAgentMessage.text === 'string' &&
93
- aiControllerState_1.ALL_AI_CONTROLLER_ANSWER_RESPONSE_TYPES.includes(responseType)) {
93
+ aiCfoState_1.ALL_AI_CFO_ANSWER_RESPONSE_TYPES.includes(responseType)) {
94
94
  responses[responseType] = {
95
95
  messageId: agentMessage.message_id,
96
96
  chatSessionId: agentMessage.chat_session_id,
97
97
  userId: agentMessage.user_id,
98
- sender: (0, aiControllerState_1.toMessageSender)(agentMessage.sender),
98
+ sender: (0, aiCfoState_1.toMessageSender)(agentMessage.sender),
99
99
  type: responseType,
100
100
  state: responseState,
101
101
  content: {
102
102
  text: parsedAgentMessage.text,
103
103
  visualization: parsedAgentMessage.visualization
104
- ? (0, exports.toAIControllerVisualization)(parsedAgentMessage.visualization)
104
+ ? (0, exports.toAiCfoVisualization)(parsedAgentMessage.visualization)
105
105
  : undefined,
106
106
  followUpQuestions: Array.isArray(parsedAgentMessage.follow_up_questions)
107
107
  ? parsedAgentMessage.follow_up_questions
@@ -127,18 +127,18 @@ function chatHistoryToQA(history) {
127
127
  // Sort by question creation time (oldest first)
128
128
  return questionAnswerPairs.sort((a, b) => a.question.createdAt.valueOf() - b.question.createdAt.valueOf());
129
129
  }
130
- const toAIControllerVisualization = (visualization) => {
130
+ const toAiCfoVisualization = (visualization) => {
131
131
  var _a;
132
132
  if (visualization.type == null || visualization.data == null) {
133
133
  return undefined;
134
134
  }
135
135
  return {
136
- type: (_a = (0, aiControllerState_1.toAIControllerVisualizationTypeStrict)(visualization.type)) !== null && _a !== void 0 ? _a : 'table',
137
- data: toAIControllerVisualizationData(visualization.data),
136
+ type: (_a = (0, aiCfoState_1.toAiCfoVisualizationTypeStrict)(visualization.type)) !== null && _a !== void 0 ? _a : 'table',
137
+ data: toAiCfoVisualizationData(visualization.data),
138
138
  };
139
139
  };
140
- exports.toAIControllerVisualization = toAIControllerVisualization;
141
- const toAIControllerVisualizationData = (data) => {
140
+ exports.toAiCfoVisualization = toAiCfoVisualization;
141
+ const toAiCfoVisualizationData = (data) => {
142
142
  var _a, _b;
143
143
  if ('x' in data && 'y' in data) {
144
144
  // Normalize y to always be an array
@@ -178,13 +178,11 @@ const toResponseBlockType = (answer, userId) => {
178
178
  chatSessionId: chat_session_id,
179
179
  userId,
180
180
  sender: 'agent',
181
- state: (0, aiControllerState_1.toAIControllerAnswerStateType)(state),
182
- type: (0, aiControllerState_1.toAIControllerAnswerResponseType)(type),
181
+ state: (0, aiCfoState_1.toAiCfoAnswerStateType)(state),
182
+ type: (0, aiCfoState_1.toAiCfoAnswerResponseType)(type),
183
183
  content: {
184
184
  text: text,
185
- visualization: visualization != null
186
- ? (0, exports.toAIControllerVisualization)(visualization)
187
- : undefined,
185
+ visualization: visualization != null ? (0, exports.toAiCfoVisualization)(visualization) : undefined,
188
186
  followUpQuestions: follow_up_questions !== null && follow_up_questions !== void 0 ? follow_up_questions : [],
189
187
  assumptions: assumptions !== null && assumptions !== void 0 ? assumptions : '',
190
188
  insights: insights !== null && insights !== void 0 ? insights : '',
@@ -193,13 +191,13 @@ const toResponseBlockType = (answer, userId) => {
193
191
  createdAt: (0, zeniDayJS_1.date)(timestamp),
194
192
  };
195
193
  };
196
- const aiController = (0, toolkit_1.createSlice)({
197
- name: 'aiController',
198
- initialState: exports.initialAIControllerState,
194
+ const aiCfo = (0, toolkit_1.createSlice)({
195
+ name: 'aiCfo',
196
+ initialState: exports.initialAiCfoState,
199
197
  reducers: {
200
198
  setNewSession(draft, action) {
201
199
  const { chatSessionId, userId, createdAt } = action.payload;
202
- draft.aiControllerByChatSessionId[chatSessionId] = {
200
+ draft.aiCfoByChatSessionId[chatSessionId] = {
203
201
  chatSession: {
204
202
  chatSessionId,
205
203
  userId,
@@ -215,8 +213,8 @@ const aiController = (0, toolkit_1.createSlice)({
215
213
  action.payload.forEach((chatSessionPayload) => {
216
214
  const { chat_session_id } = chatSessionPayload;
217
215
  // This is to prevent overwriting the session if it is already in state
218
- if (draft.aiControllerByChatSessionId[chat_session_id] == null) {
219
- draft.aiControllerByChatSessionId[chat_session_id] = {
216
+ if (draft.aiCfoByChatSessionId[chat_session_id] == null) {
217
+ draft.aiCfoByChatSessionId[chat_session_id] = {
220
218
  chatSession: toChatSession(chatSessionPayload),
221
219
  questionAnswers: [],
222
220
  };
@@ -227,11 +225,11 @@ const aiController = (0, toolkit_1.createSlice)({
227
225
  },
228
226
  setChatHistory(draft, action) {
229
227
  const { chatSessionId, history, isPaginationComplete = false, } = action.payload;
230
- if (draft.aiControllerByChatSessionId[chatSessionId] == null) {
228
+ if (draft.aiCfoByChatSessionId[chatSessionId] == null) {
231
229
  console.warn(`session with id ${chatSessionId} not found in setChatHistory`);
232
230
  return;
233
231
  }
234
- const session = draft.aiControllerByChatSessionId[chatSessionId];
232
+ const session = draft.aiCfoByChatSessionId[chatSessionId];
235
233
  // Check if we have an existing partial Q&A pair for this session
236
234
  const existingPartialQA = draft.partialQuestionAnswers[chatSessionId];
237
235
  // Process new messages into Q&A pairs
@@ -366,13 +364,13 @@ const aiController = (0, toolkit_1.createSlice)({
366
364
  */
367
365
  upsertOrAddQuestionAnswerPayload(draft, action) {
368
366
  const { chatSessionId, questionAnswerId, question: { questionId, createdAt, text }, answerPayload, userId, insertQuestionAnswer, } = action.payload;
369
- const session = draft.aiControllerByChatSessionId[chatSessionId];
367
+ const session = draft.aiCfoByChatSessionId[chatSessionId];
370
368
  if (session == null) {
371
369
  console.warn(`session with id ${chatSessionId} not found `);
372
370
  return;
373
371
  }
374
372
  let qa = session.questionAnswers.find((qa) => qa.questionAnswerId === questionAnswerId);
375
- const responseType = (0, aiControllerState_1.toAIControllerAnswerResponseTypeStrict)(answerPayload.type);
373
+ const responseType = (0, aiCfoState_1.toAiCfoAnswerResponseTypeStrict)(answerPayload.type);
376
374
  if (insertQuestionAnswer === true && qa == null) {
377
375
  // Add new Q/A
378
376
  qa = {
@@ -399,7 +397,7 @@ const aiController = (0, toolkit_1.createSlice)({
399
397
  },
400
398
  upsertAnswerPayload(draft, action) {
401
399
  const { chatSessionId, answerPayload, questionAnswerId, userId } = action.payload;
402
- const session = draft.aiControllerByChatSessionId[chatSessionId];
400
+ const session = draft.aiCfoByChatSessionId[chatSessionId];
403
401
  if (session == null) {
404
402
  console.warn(`session with id ${chatSessionId} not found in upsertAnswerPayload`);
405
403
  return;
@@ -407,7 +405,7 @@ const aiController = (0, toolkit_1.createSlice)({
407
405
  const latestQA = questionAnswerId != null
408
406
  ? session.questionAnswers.find((questionAnswer) => questionAnswer.questionAnswerId === questionAnswerId)
409
407
  : session.questionAnswers.slice(-1)[0];
410
- const responseType = (0, aiControllerState_1.toAIControllerAnswerResponseTypeStrict)(answerPayload.type);
408
+ const responseType = (0, aiCfoState_1.toAiCfoAnswerResponseTypeStrict)(answerPayload.type);
411
409
  if (latestQA != null && responseType != null) {
412
410
  // Directly mutate the responses property
413
411
  latestQA.responses[responseType] = toResponseBlockType(answerPayload, userId);
@@ -415,7 +413,7 @@ const aiController = (0, toolkit_1.createSlice)({
415
413
  },
416
414
  addQuestionPayload(draft, action) {
417
415
  const { chatSessionId, questionAnswerId, question: { questionId, createdAt, text }, userId, } = action.payload;
418
- const session = draft.aiControllerByChatSessionId[chatSessionId];
416
+ const session = draft.aiCfoByChatSessionId[chatSessionId];
419
417
  if (session == null) {
420
418
  console.warn(`session with id ${chatSessionId} not found in addQuestionPayload`);
421
419
  return;
@@ -442,19 +440,19 @@ const aiController = (0, toolkit_1.createSlice)({
442
440
  clearSession(draft, action) {
443
441
  var _a;
444
442
  const sessionId = action.payload;
445
- delete draft.aiControllerByChatSessionId[sessionId];
443
+ delete draft.aiCfoByChatSessionId[sessionId];
446
444
  // Clear partial Q&A if it belongs to the cleared session
447
445
  if (((_a = draft.partialQuestionAnswers) === null || _a === void 0 ? void 0 : _a[sessionId]) != null) {
448
446
  draft.partialQuestionAnswers[sessionId] = undefined;
449
447
  }
450
448
  },
451
- clearAIController(draft) {
452
- draft.aiControllerByChatSessionId = {};
449
+ clearAiCfo(draft) {
450
+ draft.aiCfoByChatSessionId = {};
453
451
  draft.partialQuestionAnswers = {};
454
452
  },
455
453
  deleteQuestion(draft, action) {
456
454
  const { chatSessionId, questionAnswerId } = action.payload;
457
- const session = draft.aiControllerByChatSessionId[chatSessionId];
455
+ const session = draft.aiCfoByChatSessionId[chatSessionId];
458
456
  if (session == null) {
459
457
  console.warn(`session with id ${chatSessionId} not found in deleteQuestion`);
460
458
  return;
@@ -475,5 +473,5 @@ const toChatSession = (chatSessionPayload) => {
475
473
  createdAt: (0, zeniDayJS_1.date)(created_at),
476
474
  };
477
475
  };
478
- _a = aiController.actions, exports.setNewSession = _a.setNewSession, exports.clearSession = _a.clearSession, exports.setSessions = _a.setSessions, exports.setChatHistory = _a.setChatHistory, exports.upsertAnswerPayload = _a.upsertAnswerPayload, exports.upsertOrAddQuestionAnswerPayload = _a.upsertOrAddQuestionAnswerPayload, exports.addQuestionPayload = _a.addQuestionPayload, exports.clearAIController = _a.clearAIController, exports.deleteQuestion = _a.deleteQuestion;
479
- exports.default = aiController.reducer;
476
+ _a = aiCfo.actions, exports.setNewSession = _a.setNewSession, exports.clearSession = _a.clearSession, exports.setSessions = _a.setSessions, exports.setChatHistory = _a.setChatHistory, exports.upsertAnswerPayload = _a.upsertAnswerPayload, exports.upsertOrAddQuestionAnswerPayload = _a.upsertOrAddQuestionAnswerPayload, exports.addQuestionPayload = _a.addQuestionPayload, exports.clearAiCfo = _a.clearAiCfo, exports.deleteQuestion = _a.deleteQuestion;
477
+ exports.default = aiCfo.reducer;
@@ -0,0 +1,14 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { AiCfoQuestionWithAnswer, AiCfoState } from './aiCfoState';
3
+ import { ChatSession } from './aiCfoState';
4
+ export declare function getAllQuestionAnswersForChatSession(state: AiCfoState, chatSessionId: ID): AiCfoQuestionWithAnswer[];
5
+ export declare function getQuestionAnswerByIdForChatSession(state: AiCfoState, chatSessionId: ID, questionAnswerId: ID): AiCfoQuestionWithAnswer | undefined;
6
+ export declare function getAllQuestionsForChatSession(state: AiCfoState, chatSessionId: ID): string[];
7
+ export interface AiCfoSelectorView {
8
+ allSessionsWithOrderedQuestionAnswers: ChatSessionWithOrderedQuestionAnswers[];
9
+ }
10
+ export interface ChatSessionWithOrderedQuestionAnswers {
11
+ chatSession: ChatSession;
12
+ questionAnswers: AiCfoQuestionWithAnswer[];
13
+ }
14
+ export declare function getAiCfoSelectorView(state: AiCfoState): AiCfoSelectorView;
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAllQuestionAnswersForChatSession = getAllQuestionAnswersForChatSession;
4
4
  exports.getQuestionAnswerByIdForChatSession = getQuestionAnswerByIdForChatSession;
5
5
  exports.getAllQuestionsForChatSession = getAllQuestionsForChatSession;
6
- exports.getAIControllerSelectorView = getAIControllerSelectorView;
6
+ exports.getAiCfoSelectorView = getAiCfoSelectorView;
7
7
  function getAllQuestionAnswersForChatSession(state, chatSessionId) {
8
8
  var _a, _b;
9
- const arr = (_b = (_a = state.aiControllerByChatSessionId[chatSessionId]) === null || _a === void 0 ? void 0 : _a.questionAnswers) !== null && _b !== void 0 ? _b : [];
9
+ const arr = (_b = (_a = state.aiCfoByChatSessionId[chatSessionId]) === null || _a === void 0 ? void 0 : _a.questionAnswers) !== null && _b !== void 0 ? _b : [];
10
10
  return arr
11
11
  .slice()
12
12
  .sort((a, b) => a.question.createdAt.valueOf() - b.question.createdAt.valueOf());
13
13
  }
14
14
  function getQuestionAnswerByIdForChatSession(state, chatSessionId, questionAnswerId) {
15
15
  var _a;
16
- const arr = (_a = state.aiControllerByChatSessionId[chatSessionId]) === null || _a === void 0 ? void 0 : _a.questionAnswers;
16
+ const arr = (_a = state.aiCfoByChatSessionId[chatSessionId]) === null || _a === void 0 ? void 0 : _a.questionAnswers;
17
17
  if (arr == null) {
18
18
  return undefined;
19
19
  }
@@ -21,7 +21,7 @@ function getQuestionAnswerByIdForChatSession(state, chatSessionId, questionAnswe
21
21
  }
22
22
  function getAllQuestionsForChatSession(state, chatSessionId) {
23
23
  var _a;
24
- const arr = (_a = state.aiControllerByChatSessionId[chatSessionId]) === null || _a === void 0 ? void 0 : _a.questionAnswers;
24
+ const arr = (_a = state.aiCfoByChatSessionId[chatSessionId]) === null || _a === void 0 ? void 0 : _a.questionAnswers;
25
25
  if (arr == null) {
26
26
  return [];
27
27
  }
@@ -30,8 +30,8 @@ function getAllQuestionsForChatSession(state, chatSessionId) {
30
30
  .sort((first, second) => first.question.createdAt.valueOf() - second.question.createdAt.valueOf())
31
31
  .map((qa) => qa.question.questionText);
32
32
  }
33
- function getAIControllerSelectorView(state) {
34
- const allSessionsWithOrderedQuestionAnswers = Object.values(state.aiControllerByChatSessionId)
33
+ function getAiCfoSelectorView(state) {
34
+ const allSessionsWithOrderedQuestionAnswers = Object.values(state.aiCfoByChatSessionId)
35
35
  .map((sessionWithQAs) => (Object.assign(Object.assign({}, sessionWithQAs), { questionAnswers: Array.isArray(sessionWithQAs.questionAnswers)
36
36
  ? sessionWithQAs.questionAnswers
37
37
  .slice()
@@ -0,0 +1,88 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { ZeniDate } from '../../zeniDayJS';
3
+ export interface AiCfoAnswerParagraph {
4
+ text: string;
5
+ orderedList?: Array<{
6
+ text: string;
7
+ subText?: string;
8
+ unorderedList?: string[];
9
+ }>;
10
+ }
11
+ export declare const ALL_AI_CFO_CHARTS_TYPES: readonly ["bar_chart", "pie_chart", "line_chart"];
12
+ export declare const ALL_AI_CFO_VISUALIZATION_TYPES: readonly ["bar_chart", "pie_chart", "line_chart", "table"];
13
+ export declare const toAiCfoVisualizationType: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table";
14
+ export declare const toAiCfoVisualizationTypeStrict: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table" | undefined;
15
+ export type AiCfoVisualizationType = ReturnType<typeof toAiCfoVisualizationType>;
16
+ export declare const toAiCfoChartType: (v: string) => "bar_chart" | "pie_chart" | "line_chart";
17
+ export declare const toAiCfoChartTypeStrict: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | undefined;
18
+ export type AiCfoChartType = ReturnType<typeof toAiCfoChartType>;
19
+ export declare const ALL_AI_CFO_ANSWER_STATE_TYPES: readonly ["complete", "partial"];
20
+ export declare const ALL_AI_CFO_ANSWER_RESPONSE_TYPES: readonly ["analysis", "answer", "reasoning", "thought"];
21
+ export declare const toAiCfoAnswerStateType: (v: string) => "complete" | "partial";
22
+ export declare const toAiCfoAnswerResponseType: (v: string) => "analysis" | "answer" | "reasoning" | "thought";
23
+ export declare const toAiCfoAnswerStateTypeStrict: (v: string) => "complete" | "partial" | undefined;
24
+ export declare const toAiCfoAnswerResponseTypeStrict: (v: string) => "analysis" | "answer" | "reasoning" | "thought" | undefined;
25
+ export type AiCfoAnswerStateType = ReturnType<typeof toAiCfoAnswerStateType>;
26
+ export type AiCfoAnswerResponseType = ReturnType<typeof toAiCfoAnswerResponseType>;
27
+ export interface TableVisualization {
28
+ rows: string[][];
29
+ columns: string[];
30
+ }
31
+ export interface ChartVisualization {
32
+ values: Array<Record<string, string | number>>;
33
+ x: string;
34
+ y: string[];
35
+ lines?: string[];
36
+ }
37
+ export interface AiCfoVisualization {
38
+ type: AiCfoVisualizationType;
39
+ data: TableVisualization | ChartVisualization;
40
+ }
41
+ export declare const toMessageSender: (v: string) => "user" | "agent";
42
+ export declare const toMessageType: (v: string) => "plain_text" | "json";
43
+ export declare const toMessageSenderStrict: (v: string) => "user" | "agent" | undefined;
44
+ export declare const toMessageTypeStrict: (v: string) => "plain_text" | "json" | undefined;
45
+ export type MessageSender = ReturnType<typeof toMessageSender>;
46
+ export type MessageType = ReturnType<typeof toMessageType>;
47
+ export interface ResponseBlockBase {
48
+ messageId: ID;
49
+ state: AiCfoAnswerStateType;
50
+ createdAt: ZeniDate;
51
+ chatSessionId: ID;
52
+ userId: ID;
53
+ sender: MessageSender;
54
+ }
55
+ export interface AnswerContentBlockBase {
56
+ text: string;
57
+ followUpQuestions: string[];
58
+ assumptions: string;
59
+ insights: string;
60
+ summarizedTitle?: string;
61
+ visualization?: AiCfoVisualization;
62
+ }
63
+ export interface QuestionContentBlockBase extends ResponseBlockBase {
64
+ questionText: string;
65
+ }
66
+ export interface ResponseBlockType extends ResponseBlockBase {
67
+ content: AnswerContentBlockBase;
68
+ type: AiCfoAnswerResponseType;
69
+ }
70
+ export interface AiCfoQuestionWithAnswer {
71
+ questionAnswerId: ID;
72
+ question: QuestionContentBlockBase;
73
+ responses: Partial<Record<AiCfoAnswerResponseType, ResponseBlockType>>;
74
+ }
75
+ export interface ChatSession {
76
+ chatSessionId: ID;
77
+ userId: ID;
78
+ createdAt: ZeniDate;
79
+ chatSessionSummary?: string;
80
+ }
81
+ export interface ChatSessionWithMessages {
82
+ chatSession: ChatSession;
83
+ questionAnswers: AiCfoQuestionWithAnswer[];
84
+ }
85
+ export interface AiCfoState {
86
+ aiCfoByChatSessionId: Record<ID, ChatSessionWithMessages>;
87
+ partialQuestionAnswers: Record<ID, AiCfoQuestionWithAnswer | undefined>;
88
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toMessageTypeStrict = exports.toMessageSenderStrict = exports.toMessageType = exports.toMessageSender = exports.toAiCfoAnswerResponseTypeStrict = exports.toAiCfoAnswerStateTypeStrict = exports.toAiCfoAnswerResponseType = exports.toAiCfoAnswerStateType = exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CFO_ANSWER_STATE_TYPES = exports.toAiCfoChartTypeStrict = exports.toAiCfoChartType = exports.toAiCfoVisualizationTypeStrict = exports.toAiCfoVisualizationType = exports.ALL_AI_CFO_VISUALIZATION_TYPES = exports.ALL_AI_CFO_CHARTS_TYPES = void 0;
4
+ const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
5
+ exports.ALL_AI_CFO_CHARTS_TYPES = [
6
+ 'bar_chart',
7
+ 'pie_chart',
8
+ 'line_chart',
9
+ ];
10
+ exports.ALL_AI_CFO_VISUALIZATION_TYPES = [
11
+ ...exports.ALL_AI_CFO_CHARTS_TYPES,
12
+ 'table',
13
+ ];
14
+ const toAiCfoVisualizationType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_AI_CFO_VISUALIZATION_TYPES);
15
+ exports.toAiCfoVisualizationType = toAiCfoVisualizationType;
16
+ const toAiCfoVisualizationTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_AI_CFO_VISUALIZATION_TYPES);
17
+ exports.toAiCfoVisualizationTypeStrict = toAiCfoVisualizationTypeStrict;
18
+ const toAiCfoChartType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_AI_CFO_CHARTS_TYPES);
19
+ exports.toAiCfoChartType = toAiCfoChartType;
20
+ const toAiCfoChartTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_AI_CFO_CHARTS_TYPES);
21
+ exports.toAiCfoChartTypeStrict = toAiCfoChartTypeStrict;
22
+ exports.ALL_AI_CFO_ANSWER_STATE_TYPES = ['complete', 'partial'];
23
+ exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES = [
24
+ 'analysis',
25
+ 'answer',
26
+ 'reasoning',
27
+ 'thought',
28
+ ];
29
+ const toAiCfoAnswerStateType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_AI_CFO_ANSWER_STATE_TYPES);
30
+ exports.toAiCfoAnswerStateType = toAiCfoAnswerStateType;
31
+ const toAiCfoAnswerResponseType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES);
32
+ exports.toAiCfoAnswerResponseType = toAiCfoAnswerResponseType;
33
+ const toAiCfoAnswerStateTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_AI_CFO_ANSWER_STATE_TYPES);
34
+ exports.toAiCfoAnswerStateTypeStrict = toAiCfoAnswerStateTypeStrict;
35
+ const toAiCfoAnswerResponseTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_AI_CFO_ANSWER_RESPONSE_TYPES);
36
+ exports.toAiCfoAnswerResponseTypeStrict = toAiCfoAnswerResponseTypeStrict;
37
+ const ALL_MESSAGE_SENDERS = ['user', 'agent'];
38
+ const ALL_MESSAGE_TYPES = ['plain_text', 'json'];
39
+ const toMessageSender = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_MESSAGE_SENDERS);
40
+ exports.toMessageSender = toMessageSender;
41
+ const toMessageType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_MESSAGE_TYPES);
42
+ exports.toMessageType = toMessageType;
43
+ const toMessageSenderStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, ALL_MESSAGE_SENDERS);
44
+ exports.toMessageSenderStrict = toMessageSenderStrict;
45
+ const toMessageTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, ALL_MESSAGE_TYPES);
46
+ exports.toMessageTypeStrict = toMessageTypeStrict;
@@ -1,5 +1,5 @@
1
1
  import { ActionsObservable } from 'redux-observable';
2
- import { clearAIController } from '../../entity/aiController/aiControllerReducer';
2
+ import { clearAiCfo } from '../../entity/aiCfo/aiCfoReducer';
3
3
  import { clearAllApprovalRules } from '../../entity/approvalRule/approvalRuleReducer';
4
4
  import { clearAllEntityApprovalStatus } from '../../entity/entityApprovalStatus/entityApprovalStatusReducer';
5
5
  import { clearAllMonthEndCloseChecks } from '../../entity/monthEndCloseChecks/monthEndCloseChecksReducer';
@@ -11,7 +11,7 @@ import { clearAccountList } from '../../view/accountList/accountListReducer';
11
11
  import { clearAccountMappingView } from '../../view/accountMappingView/accountMappingReducer';
12
12
  import { clearAddressView } from '../../view/addressView/addressViewReducer';
13
13
  import { clearPerformanceReportAndTimeSeries } from '../../view/aiAgentPerformance/performanceReportViewReducer';
14
- import { clearAIControllerView } from '../../view/aiControllerView/aiControllerViewReducer';
14
+ import { clearAiCfoView } from '../../view/aiCfoView/aiCfoViewReducer';
15
15
  import { clearApAgingDetail } from '../../view/apAgingView/apAgingDetail/apAgingDetailReducer';
16
16
  import { clearApAging } from '../../view/apAgingView/apAgingReport/apAgingReducer';
17
17
  import { clearArAgingDetail } from '../../view/arAgingView/arAgingDetail/arAgingDetailReducer';
@@ -190,8 +190,8 @@ import { clearAllUserRoles } from '../userRole/userRoleReducer';
190
190
  import { clearAllVendors } from '../vendor/vendorReducer';
191
191
  import { clearAllVendorExpenseTrends } from '../vendorExpense/vendorExpenseReducer';
192
192
  import { clearAll } from './tenantReducer';
193
- type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAIControllerView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearPerformanceReportAndTimeSeries> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard>;
194
- type clearActionTypeForEntities = ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar> | ReturnType<typeof clearAIController>;
193
+ type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearPerformanceReportAndTimeSeries> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard>;
194
+ type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
195
195
  export type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
196
196
  export declare const clearAllEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<ActionType>;
197
197
  export {};