@zeniai/client-epic-state 4.17.15 → 4.17.17

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 (75) hide show
  1. package/lib/entity/accountRecon/accountReconPayload.d.ts +0 -2
  2. package/lib/entity/accountRecon/accountReconPayload.js +1 -6
  3. package/lib/entity/accountRecon/accountReconState.d.ts +0 -2
  4. package/lib/entity/{aiCfo/aiCfoPayload.d.ts → aiController/aiControllerPayload.d.ts} +3 -3
  5. package/lib/entity/aiController/aiControllerReducer.d.ts +46 -0
  6. package/lib/entity/{aiCfo/aiCfoReducer.js → aiController/aiControllerReducer.js} +42 -40
  7. package/lib/entity/aiController/aiControllerSelector.d.ts +14 -0
  8. package/lib/entity/{aiCfo/aiCfoSelector.js → aiController/aiControllerSelector.js} +6 -6
  9. package/lib/entity/aiController/aiControllerState.d.ts +88 -0
  10. package/lib/entity/aiController/aiControllerState.js +49 -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 +8 -10
  14. package/lib/epic.js +8 -10
  15. package/lib/index.d.ts +13 -15
  16. package/lib/index.js +74 -83
  17. package/lib/reducer.d.ts +6 -6
  18. package/lib/reducer.js +6 -6
  19. package/lib/view/{aiCfoView/aiCfoViewPayload.d.ts → aiControllerView/aiControllerViewPayload.d.ts} +2 -2
  20. package/lib/view/aiControllerView/aiControllerViewReducer.d.ts +73 -0
  21. package/lib/view/{aiCfoView/aiCfoViewReducer.js → aiControllerView/aiControllerViewReducer.js} +10 -10
  22. package/lib/view/{aiCfoView/aiCfoViewSelector.d.ts → aiControllerView/aiControllerViewSelector.d.ts} +5 -5
  23. package/lib/view/{aiCfoView/aiCfoViewSelector.js → aiControllerView/aiControllerViewSelector.js} +6 -6
  24. package/lib/view/{aiCfoView/aiCfoViewState.d.ts → aiControllerView/aiControllerViewState.d.ts} +3 -3
  25. package/lib/view/{aiCfoView → aiControllerView}/epics/createSessionAndSubmitEpic.d.ts +2 -2
  26. package/lib/view/{aiCfoView → aiControllerView}/epics/createSessionAndSubmitEpic.js +9 -9
  27. package/lib/view/{aiCfoView → aiControllerView}/epics/createSessionEpic.d.ts +2 -2
  28. package/lib/view/{aiCfoView → aiControllerView}/epics/createSessionEpic.js +8 -8
  29. package/lib/view/{aiCfoView → aiControllerView}/epics/fetchChatHistoryEpic.d.ts +2 -2
  30. package/lib/view/{aiCfoView → aiControllerView}/epics/fetchChatHistoryEpic.js +9 -9
  31. package/lib/view/{aiCfoView → aiControllerView}/epics/fetchChatSessionsForUserEpic.d.ts +2 -2
  32. package/lib/view/{aiCfoView → aiControllerView}/epics/fetchChatSessionsForUserEpic.js +9 -8
  33. package/lib/view/{aiCfoView → aiControllerView}/epics/stopSubmitEpic.d.ts +2 -2
  34. package/lib/view/{aiCfoView → aiControllerView}/epics/stopSubmitEpic.js +11 -11
  35. package/lib/view/{aiCfoView → aiControllerView}/epics/stopSubmitQuestionEpic.d.ts +2 -2
  36. package/lib/view/{aiCfoView → aiControllerView}/epics/stopSubmitQuestionEpic.js +8 -8
  37. package/lib/view/{aiCfoView → aiControllerView}/epics/submitQuestionEpic.d.ts +2 -2
  38. package/lib/view/{aiCfoView → aiControllerView}/epics/submitQuestionEpic.js +10 -10
  39. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +0 -2
  40. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +34 -49
  41. package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailPayload.d.ts +0 -7
  42. package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailReducer.js +0 -11
  43. package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailSelector.d.ts +1 -2
  44. package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailSelector.js +0 -1
  45. package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailState.d.ts +0 -8
  46. package/lib/view/spendManagement/chargeCards/cashbackDetail/cashbackDetailState.js +1 -7
  47. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +0 -19
  48. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +1 -33
  49. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailPayload.d.ts +0 -13
  50. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +2 -11
  51. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +2 -18
  52. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +1 -2
  53. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +1 -2
  54. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +0 -13
  55. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -14
  56. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +0 -14
  57. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +2 -2
  58. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +2 -26
  59. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +3 -17
  60. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +4 -34
  61. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +36 -40
  62. package/lib/zeniAPI.d.ts +1 -1
  63. package/package.json +1 -1
  64. package/lib/entity/aiCfo/aiCfoReducer.d.ts +0 -45
  65. package/lib/entity/aiCfo/aiCfoSelector.d.ts +0 -14
  66. package/lib/entity/aiCfo/aiCfoState.d.ts +0 -88
  67. package/lib/entity/aiCfo/aiCfoState.js +0 -46
  68. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +0 -73
  69. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardTransactionStatisticsEpic.d.ts +0 -7
  70. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardTransactionStatisticsEpic.js +0 -39
  71. package/lib/view/spendManagement/chargeCards/chargeCardList/fetchCreditAccountRepaymentEpic.d.ts +0 -7
  72. package/lib/view/spendManagement/chargeCards/chargeCardList/fetchCreditAccountRepaymentEpic.js +0 -23
  73. /package/lib/entity/{aiCfo/aiCfoPayload.js → aiController/aiControllerPayload.js} +0 -0
  74. /package/lib/view/{aiCfoView/aiCfoViewPayload.js → aiControllerView/aiControllerViewPayload.js} +0 -0
  75. /package/lib/view/{aiCfoView/aiCfoViewState.js → aiControllerView/aiControllerViewState.js} +0 -0
@@ -56,8 +56,6 @@ 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;
61
59
  }
62
60
  export interface TransactionsToReviewPayload {
63
61
  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, _c, _d;
10
+ var _a, _b;
11
11
  return {
12
12
  transactionId: payload.transaction_id,
13
13
  transactionDirection: (0, reconciliationTransaction_1.toTransactionDirectionType)(payload.transaction_direction),
@@ -26,8 +26,6 @@ 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,
31
29
  reason: payload.recommended_action.recommended_action_description,
32
30
  recommendedTransactions: payload.recommended_action.recommended_transactions.map((transaction) => (0, exports.toRecommendedReviewTransaction)(transaction, currencyPayload)),
33
31
  },
@@ -35,7 +33,6 @@ const toTransactionsToReview = (payload, currencyPayload) => {
35
33
  };
36
34
  exports.toTransactionsToReview = toTransactionsToReview;
37
35
  const toTransactionsToReviewPayload = (payload) => {
38
- var _a, _b;
39
36
  return {
40
37
  transaction_id: payload.transactionId,
41
38
  transaction_direction: (0, reconciliationTransaction_1.toTransactionDirectionType)(payload.transactionDirection),
@@ -47,8 +44,6 @@ const toTransactionsToReviewPayload = (payload) => {
47
44
  recommended_actions: (0, accountReconState_1.toRecommendedActionCodeType)(payload.recommendedAction.action),
48
45
  recommended_action_description: payload.recommendedAction.reason,
49
46
  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,
52
47
  },
53
48
  };
54
49
  };
@@ -78,8 +78,6 @@ export interface RecommendedAction {
78
78
  action: RecommendedActionCodeType;
79
79
  reason: string;
80
80
  recommendedTransactions: RecommendedReviewTransaction[];
81
- plaidConfidenceScore: string | null;
82
- zeniConfidenceScore: number | null;
83
81
  }
84
82
  export interface RecommendedReviewTransaction {
85
83
  confidenceScore: number;
@@ -13,15 +13,15 @@ export interface ChartVisualizationPayload {
13
13
  y: string | string[];
14
14
  lines?: string[] | null;
15
15
  }
16
- export interface AiCfoVisualizationPayload {
16
+ export interface AIControllerVisualizationPayload {
17
17
  type: string | null;
18
18
  data: TableVisualizationPayload | ChartVisualizationPayload | null;
19
19
  }
20
- export interface AiCfoAnswerPayload {
20
+ export interface AIControllerAnswerPayload {
21
21
  text: string;
22
22
  state: string;
23
23
  type: string;
24
- visualization: AiCfoVisualizationPayload | null;
24
+ visualization: AIControllerVisualizationPayload | null;
25
25
  metadata: Record<string, string>;
26
26
  assumptions: string | null;
27
27
  insights: string | null;
@@ -0,0 +1,46 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { ZeniDate } from '../../zeniDayJS';
3
+ import { AIControllerVisualizationPayload, ChatSessionPayload } from './aiControllerPayload';
4
+ import { AIControllerAnswerPayload, MessagePayload } from './aiControllerPayload';
5
+ import { AIControllerState, AIControllerVisualization } from './aiControllerState';
6
+ export declare const initialAIControllerState: AIControllerState;
7
+ export declare const toAIControllerVisualization: (visualization: AIControllerVisualizationPayload) => AIControllerVisualization | undefined;
8
+ export declare const setNewSession: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
9
+ chatSessionId: ID;
10
+ userId: ID;
11
+ createdAt: ZeniDate;
12
+ }, "aiController/setNewSession">, clearSession: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "aiController/clearSession">, setSessions: import("@reduxjs/toolkit").ActionCreatorWithPayload<ChatSessionPayload[], "aiController/setSessions">, setChatHistory: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
13
+ chatSessionId: ID;
14
+ history: MessagePayload[];
15
+ isPaginationComplete?: boolean;
16
+ }, "aiController/setChatHistory">, upsertAnswerPayload: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
17
+ chatSessionId: ID;
18
+ answerPayload: AIControllerAnswerPayload;
19
+ userId: ID;
20
+ questionAnswerId?: ID;
21
+ }, "aiController/upsertAnswerPayload">, upsertOrAddQuestionAnswerPayload: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
22
+ chatSessionId: ID;
23
+ questionAnswerId: ID;
24
+ question: {
25
+ questionId: ID;
26
+ text: string;
27
+ createdAt: ZeniDate;
28
+ };
29
+ answerPayload: AIControllerAnswerPayload;
30
+ userId: ID;
31
+ insertQuestionAnswer?: boolean;
32
+ }, "aiController/upsertOrAddQuestionAnswerPayload">, addQuestionPayload: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
33
+ chatSessionId: ID;
34
+ questionAnswerId: ID;
35
+ question: {
36
+ questionId: ID;
37
+ text: string;
38
+ createdAt: ZeniDate;
39
+ };
40
+ userId: ID;
41
+ }, "aiController/addQuestionPayload">, clearAIController: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiController/clearAIController">, deleteQuestion: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
42
+ chatSessionId: ID;
43
+ questionAnswerId: ID;
44
+ }, "aiController/deleteQuestion">;
45
+ declare const _default: import("redux").Reducer<AIControllerState>;
46
+ 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.clearAiCfo = exports.addQuestionPayload = exports.upsertOrAddQuestionAnswerPayload = exports.upsertAnswerPayload = exports.setChatHistory = exports.setSessions = exports.clearSession = exports.setNewSession = exports.toAiCfoVisualization = exports.initialAiCfoState = void 0;
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;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  const zeniDayJS_1 = require("../../zeniDayJS");
7
- const aiCfoState_1 = require("./aiCfoState");
8
- exports.initialAiCfoState = {
9
- aiCfoByChatSessionId: {},
7
+ const aiControllerState_1 = require("./aiControllerState");
8
+ exports.initialAIControllerState = {
9
+ aiControllerByChatSessionId: {},
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 AiCfoQuestionWithAnswer[]
35
+ // Utility: Convert chat history (array of MessagePayload) to AIControllerQuestionWithAnswer[]
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 AiCfoQuestionWithAnswer
61
+ // Convert groups to AIControllerQuestionWithAnswer
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, aiCfoState_1.toMessageSender)(group.question.sender),
72
+ sender: (0, aiControllerState_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, aiCfoState_1.toMessageType)(agentMessage.message_type) === 'json'
81
+ const parsedAgentMessage = (0, aiControllerState_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, aiCfoState_1.toAiCfoAnswerResponseType)(parsedAgentMessage.type);
91
- const responseState = (0, aiCfoState_1.toAiCfoAnswerStateType)(parsedAgentMessage.state);
90
+ const responseType = (0, aiControllerState_1.toAIControllerAnswerResponseType)(parsedAgentMessage.type);
91
+ const responseState = (0, aiControllerState_1.toAIControllerAnswerStateType)(parsedAgentMessage.state);
92
92
  if (typeof parsedAgentMessage.text === 'string' &&
93
- aiCfoState_1.ALL_AI_CFO_ANSWER_RESPONSE_TYPES.includes(responseType)) {
93
+ aiControllerState_1.ALL_AI_CONTROLLER_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, aiCfoState_1.toMessageSender)(agentMessage.sender),
98
+ sender: (0, aiControllerState_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.toAiCfoVisualization)(parsedAgentMessage.visualization)
104
+ ? (0, exports.toAIControllerVisualization)(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 toAiCfoVisualization = (visualization) => {
130
+ const toAIControllerVisualization = (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, aiCfoState_1.toAiCfoVisualizationTypeStrict)(visualization.type)) !== null && _a !== void 0 ? _a : 'table',
137
- data: toAiCfoVisualizationData(visualization.data),
136
+ type: (_a = (0, aiControllerState_1.toAIControllerVisualizationTypeStrict)(visualization.type)) !== null && _a !== void 0 ? _a : 'table',
137
+ data: toAIControllerVisualizationData(visualization.data),
138
138
  };
139
139
  };
140
- exports.toAiCfoVisualization = toAiCfoVisualization;
141
- const toAiCfoVisualizationData = (data) => {
140
+ exports.toAIControllerVisualization = toAIControllerVisualization;
141
+ const toAIControllerVisualizationData = (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,11 +178,13 @@ const toResponseBlockType = (answer, userId) => {
178
178
  chatSessionId: chat_session_id,
179
179
  userId,
180
180
  sender: 'agent',
181
- state: (0, aiCfoState_1.toAiCfoAnswerStateType)(state),
182
- type: (0, aiCfoState_1.toAiCfoAnswerResponseType)(type),
181
+ state: (0, aiControllerState_1.toAIControllerAnswerStateType)(state),
182
+ type: (0, aiControllerState_1.toAIControllerAnswerResponseType)(type),
183
183
  content: {
184
184
  text: text,
185
- visualization: visualization != null ? (0, exports.toAiCfoVisualization)(visualization) : undefined,
185
+ visualization: visualization != null
186
+ ? (0, exports.toAIControllerVisualization)(visualization)
187
+ : undefined,
186
188
  followUpQuestions: follow_up_questions !== null && follow_up_questions !== void 0 ? follow_up_questions : [],
187
189
  assumptions: assumptions !== null && assumptions !== void 0 ? assumptions : '',
188
190
  insights: insights !== null && insights !== void 0 ? insights : '',
@@ -191,13 +193,13 @@ const toResponseBlockType = (answer, userId) => {
191
193
  createdAt: (0, zeniDayJS_1.date)(timestamp),
192
194
  };
193
195
  };
194
- const aiCfo = (0, toolkit_1.createSlice)({
195
- name: 'aiCfo',
196
- initialState: exports.initialAiCfoState,
196
+ const aiController = (0, toolkit_1.createSlice)({
197
+ name: 'aiController',
198
+ initialState: exports.initialAIControllerState,
197
199
  reducers: {
198
200
  setNewSession(draft, action) {
199
201
  const { chatSessionId, userId, createdAt } = action.payload;
200
- draft.aiCfoByChatSessionId[chatSessionId] = {
202
+ draft.aiControllerByChatSessionId[chatSessionId] = {
201
203
  chatSession: {
202
204
  chatSessionId,
203
205
  userId,
@@ -213,8 +215,8 @@ const aiCfo = (0, toolkit_1.createSlice)({
213
215
  action.payload.forEach((chatSessionPayload) => {
214
216
  const { chat_session_id } = chatSessionPayload;
215
217
  // This is to prevent overwriting the session if it is already in state
216
- if (draft.aiCfoByChatSessionId[chat_session_id] == null) {
217
- draft.aiCfoByChatSessionId[chat_session_id] = {
218
+ if (draft.aiControllerByChatSessionId[chat_session_id] == null) {
219
+ draft.aiControllerByChatSessionId[chat_session_id] = {
218
220
  chatSession: toChatSession(chatSessionPayload),
219
221
  questionAnswers: [],
220
222
  };
@@ -225,11 +227,11 @@ const aiCfo = (0, toolkit_1.createSlice)({
225
227
  },
226
228
  setChatHistory(draft, action) {
227
229
  const { chatSessionId, history, isPaginationComplete = false, } = action.payload;
228
- if (draft.aiCfoByChatSessionId[chatSessionId] == null) {
230
+ if (draft.aiControllerByChatSessionId[chatSessionId] == null) {
229
231
  console.warn(`session with id ${chatSessionId} not found in setChatHistory`);
230
232
  return;
231
233
  }
232
- const session = draft.aiCfoByChatSessionId[chatSessionId];
234
+ const session = draft.aiControllerByChatSessionId[chatSessionId];
233
235
  // Check if we have an existing partial Q&A pair for this session
234
236
  const existingPartialQA = draft.partialQuestionAnswers[chatSessionId];
235
237
  // Process new messages into Q&A pairs
@@ -364,13 +366,13 @@ const aiCfo = (0, toolkit_1.createSlice)({
364
366
  */
365
367
  upsertOrAddQuestionAnswerPayload(draft, action) {
366
368
  const { chatSessionId, questionAnswerId, question: { questionId, createdAt, text }, answerPayload, userId, insertQuestionAnswer, } = action.payload;
367
- const session = draft.aiCfoByChatSessionId[chatSessionId];
369
+ const session = draft.aiControllerByChatSessionId[chatSessionId];
368
370
  if (session == null) {
369
371
  console.warn(`session with id ${chatSessionId} not found `);
370
372
  return;
371
373
  }
372
374
  let qa = session.questionAnswers.find((qa) => qa.questionAnswerId === questionAnswerId);
373
- const responseType = (0, aiCfoState_1.toAiCfoAnswerResponseTypeStrict)(answerPayload.type);
375
+ const responseType = (0, aiControllerState_1.toAIControllerAnswerResponseTypeStrict)(answerPayload.type);
374
376
  if (insertQuestionAnswer === true && qa == null) {
375
377
  // Add new Q/A
376
378
  qa = {
@@ -397,7 +399,7 @@ const aiCfo = (0, toolkit_1.createSlice)({
397
399
  },
398
400
  upsertAnswerPayload(draft, action) {
399
401
  const { chatSessionId, answerPayload, questionAnswerId, userId } = action.payload;
400
- const session = draft.aiCfoByChatSessionId[chatSessionId];
402
+ const session = draft.aiControllerByChatSessionId[chatSessionId];
401
403
  if (session == null) {
402
404
  console.warn(`session with id ${chatSessionId} not found in upsertAnswerPayload`);
403
405
  return;
@@ -405,7 +407,7 @@ const aiCfo = (0, toolkit_1.createSlice)({
405
407
  const latestQA = questionAnswerId != null
406
408
  ? session.questionAnswers.find((questionAnswer) => questionAnswer.questionAnswerId === questionAnswerId)
407
409
  : session.questionAnswers.slice(-1)[0];
408
- const responseType = (0, aiCfoState_1.toAiCfoAnswerResponseTypeStrict)(answerPayload.type);
410
+ const responseType = (0, aiControllerState_1.toAIControllerAnswerResponseTypeStrict)(answerPayload.type);
409
411
  if (latestQA != null && responseType != null) {
410
412
  // Directly mutate the responses property
411
413
  latestQA.responses[responseType] = toResponseBlockType(answerPayload, userId);
@@ -413,7 +415,7 @@ const aiCfo = (0, toolkit_1.createSlice)({
413
415
  },
414
416
  addQuestionPayload(draft, action) {
415
417
  const { chatSessionId, questionAnswerId, question: { questionId, createdAt, text }, userId, } = action.payload;
416
- const session = draft.aiCfoByChatSessionId[chatSessionId];
418
+ const session = draft.aiControllerByChatSessionId[chatSessionId];
417
419
  if (session == null) {
418
420
  console.warn(`session with id ${chatSessionId} not found in addQuestionPayload`);
419
421
  return;
@@ -440,19 +442,19 @@ const aiCfo = (0, toolkit_1.createSlice)({
440
442
  clearSession(draft, action) {
441
443
  var _a;
442
444
  const sessionId = action.payload;
443
- delete draft.aiCfoByChatSessionId[sessionId];
445
+ delete draft.aiControllerByChatSessionId[sessionId];
444
446
  // Clear partial Q&A if it belongs to the cleared session
445
447
  if (((_a = draft.partialQuestionAnswers) === null || _a === void 0 ? void 0 : _a[sessionId]) != null) {
446
448
  draft.partialQuestionAnswers[sessionId] = undefined;
447
449
  }
448
450
  },
449
- clearAiCfo(draft) {
450
- draft.aiCfoByChatSessionId = {};
451
+ clearAIController(draft) {
452
+ draft.aiControllerByChatSessionId = {};
451
453
  draft.partialQuestionAnswers = {};
452
454
  },
453
455
  deleteQuestion(draft, action) {
454
456
  const { chatSessionId, questionAnswerId } = action.payload;
455
- const session = draft.aiCfoByChatSessionId[chatSessionId];
457
+ const session = draft.aiControllerByChatSessionId[chatSessionId];
456
458
  if (session == null) {
457
459
  console.warn(`session with id ${chatSessionId} not found in deleteQuestion`);
458
460
  return;
@@ -473,5 +475,5 @@ const toChatSession = (chatSessionPayload) => {
473
475
  createdAt: (0, zeniDayJS_1.date)(created_at),
474
476
  };
475
477
  };
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;
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;
@@ -0,0 +1,14 @@
1
+ import { ID } from '../../commonStateTypes/common';
2
+ import { AIControllerQuestionWithAnswer, AIControllerState } from './aiControllerState';
3
+ import { ChatSession } from './aiControllerState';
4
+ export declare function getAllQuestionAnswersForChatSession(state: AIControllerState, chatSessionId: ID): AIControllerQuestionWithAnswer[];
5
+ export declare function getQuestionAnswerByIdForChatSession(state: AIControllerState, chatSessionId: ID, questionAnswerId: ID): AIControllerQuestionWithAnswer | undefined;
6
+ export declare function getAllQuestionsForChatSession(state: AIControllerState, chatSessionId: ID): string[];
7
+ export interface AIControllerSelectorView {
8
+ allSessionsWithOrderedQuestionAnswers: ChatSessionWithOrderedQuestionAnswers[];
9
+ }
10
+ export interface ChatSessionWithOrderedQuestionAnswers {
11
+ chatSession: ChatSession;
12
+ questionAnswers: AIControllerQuestionWithAnswer[];
13
+ }
14
+ export declare function getAIControllerSelectorView(state: AIControllerState): AIControllerSelectorView;
@@ -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.getAiCfoSelectorView = getAiCfoSelectorView;
6
+ exports.getAIControllerSelectorView = getAIControllerSelectorView;
7
7
  function getAllQuestionAnswersForChatSession(state, chatSessionId) {
8
8
  var _a, _b;
9
- const arr = (_b = (_a = state.aiCfoByChatSessionId[chatSessionId]) === null || _a === void 0 ? void 0 : _a.questionAnswers) !== null && _b !== void 0 ? _b : [];
9
+ const arr = (_b = (_a = state.aiControllerByChatSessionId[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.aiCfoByChatSessionId[chatSessionId]) === null || _a === void 0 ? void 0 : _a.questionAnswers;
16
+ const arr = (_a = state.aiControllerByChatSessionId[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.aiCfoByChatSessionId[chatSessionId]) === null || _a === void 0 ? void 0 : _a.questionAnswers;
24
+ const arr = (_a = state.aiControllerByChatSessionId[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 getAiCfoSelectorView(state) {
34
- const allSessionsWithOrderedQuestionAnswers = Object.values(state.aiCfoByChatSessionId)
33
+ function getAIControllerSelectorView(state) {
34
+ const allSessionsWithOrderedQuestionAnswers = Object.values(state.aiControllerByChatSessionId)
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 AIControllerAnswerParagraph {
4
+ text: string;
5
+ orderedList?: Array<{
6
+ text: string;
7
+ subText?: string;
8
+ unorderedList?: string[];
9
+ }>;
10
+ }
11
+ export declare const ALL_AI_CONTROLLER_CHARTS_TYPES: readonly ["bar_chart", "pie_chart", "line_chart"];
12
+ export declare const ALL_AI_CONTROLLER_VISUALIZATION_TYPES: readonly ["bar_chart", "pie_chart", "line_chart", "table"];
13
+ export declare const toAIControllerVisualizationType: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table";
14
+ export declare const toAIControllerVisualizationTypeStrict: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | "table" | undefined;
15
+ export type AIControllerVisualizationType = ReturnType<typeof toAIControllerVisualizationType>;
16
+ export declare const toAIControllerChartType: (v: string) => "bar_chart" | "pie_chart" | "line_chart";
17
+ export declare const toAIControllerChartTypeStrict: (v: string) => "bar_chart" | "pie_chart" | "line_chart" | undefined;
18
+ export type AIControllerChartType = ReturnType<typeof toAIControllerChartType>;
19
+ export declare const ALL_AI_CONTROLLER_ANSWER_STATE_TYPES: readonly ["complete", "partial"];
20
+ export declare const ALL_AI_CONTROLLER_ANSWER_RESPONSE_TYPES: readonly ["analysis", "answer", "reasoning", "thought"];
21
+ export declare const toAIControllerAnswerStateType: (v: string) => "complete" | "partial";
22
+ export declare const toAIControllerAnswerResponseType: (v: string) => "analysis" | "answer" | "reasoning" | "thought";
23
+ export declare const toAIControllerAnswerStateTypeStrict: (v: string) => "complete" | "partial" | undefined;
24
+ export declare const toAIControllerAnswerResponseTypeStrict: (v: string) => "analysis" | "answer" | "reasoning" | "thought" | undefined;
25
+ export type AIControllerAnswerStateType = ReturnType<typeof toAIControllerAnswerStateType>;
26
+ export type AIControllerAnswerResponseType = ReturnType<typeof toAIControllerAnswerResponseType>;
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 AIControllerVisualization {
38
+ type: AIControllerVisualizationType;
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: AIControllerAnswerStateType;
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?: AIControllerVisualization;
62
+ }
63
+ export interface QuestionContentBlockBase extends ResponseBlockBase {
64
+ questionText: string;
65
+ }
66
+ export interface ResponseBlockType extends ResponseBlockBase {
67
+ content: AnswerContentBlockBase;
68
+ type: AIControllerAnswerResponseType;
69
+ }
70
+ export interface AIControllerQuestionWithAnswer {
71
+ questionAnswerId: ID;
72
+ question: QuestionContentBlockBase;
73
+ responses: Partial<Record<AIControllerAnswerResponseType, 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: AIControllerQuestionWithAnswer[];
84
+ }
85
+ export interface AIControllerState {
86
+ aiControllerByChatSessionId: Record<ID, ChatSessionWithMessages>;
87
+ partialQuestionAnswers: Record<ID, AIControllerQuestionWithAnswer | undefined>;
88
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toMessageTypeStrict = exports.toMessageSenderStrict = exports.toMessageType = exports.toMessageSender = exports.toAIControllerAnswerResponseTypeStrict = exports.toAIControllerAnswerStateTypeStrict = exports.toAIControllerAnswerResponseType = exports.toAIControllerAnswerStateType = exports.ALL_AI_CONTROLLER_ANSWER_RESPONSE_TYPES = exports.ALL_AI_CONTROLLER_ANSWER_STATE_TYPES = exports.toAIControllerChartTypeStrict = exports.toAIControllerChartType = exports.toAIControllerVisualizationTypeStrict = exports.toAIControllerVisualizationType = exports.ALL_AI_CONTROLLER_VISUALIZATION_TYPES = exports.ALL_AI_CONTROLLER_CHARTS_TYPES = void 0;
4
+ const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
5
+ exports.ALL_AI_CONTROLLER_CHARTS_TYPES = [
6
+ 'bar_chart',
7
+ 'pie_chart',
8
+ 'line_chart',
9
+ ];
10
+ exports.ALL_AI_CONTROLLER_VISUALIZATION_TYPES = [
11
+ ...exports.ALL_AI_CONTROLLER_CHARTS_TYPES,
12
+ 'table',
13
+ ];
14
+ const toAIControllerVisualizationType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_AI_CONTROLLER_VISUALIZATION_TYPES);
15
+ exports.toAIControllerVisualizationType = toAIControllerVisualizationType;
16
+ const toAIControllerVisualizationTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_AI_CONTROLLER_VISUALIZATION_TYPES);
17
+ exports.toAIControllerVisualizationTypeStrict = toAIControllerVisualizationTypeStrict;
18
+ const toAIControllerChartType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_AI_CONTROLLER_CHARTS_TYPES);
19
+ exports.toAIControllerChartType = toAIControllerChartType;
20
+ const toAIControllerChartTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_AI_CONTROLLER_CHARTS_TYPES);
21
+ exports.toAIControllerChartTypeStrict = toAIControllerChartTypeStrict;
22
+ exports.ALL_AI_CONTROLLER_ANSWER_STATE_TYPES = [
23
+ 'complete',
24
+ 'partial',
25
+ ];
26
+ exports.ALL_AI_CONTROLLER_ANSWER_RESPONSE_TYPES = [
27
+ 'analysis',
28
+ 'answer',
29
+ 'reasoning',
30
+ 'thought',
31
+ ];
32
+ const toAIControllerAnswerStateType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_AI_CONTROLLER_ANSWER_STATE_TYPES);
33
+ exports.toAIControllerAnswerStateType = toAIControllerAnswerStateType;
34
+ const toAIControllerAnswerResponseType = (v) => (0, stringToUnion_1.stringToUnion)(v, exports.ALL_AI_CONTROLLER_ANSWER_RESPONSE_TYPES);
35
+ exports.toAIControllerAnswerResponseType = toAIControllerAnswerResponseType;
36
+ const toAIControllerAnswerStateTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_AI_CONTROLLER_ANSWER_STATE_TYPES);
37
+ exports.toAIControllerAnswerStateTypeStrict = toAIControllerAnswerStateTypeStrict;
38
+ const toAIControllerAnswerResponseTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, exports.ALL_AI_CONTROLLER_ANSWER_RESPONSE_TYPES);
39
+ exports.toAIControllerAnswerResponseTypeStrict = toAIControllerAnswerResponseTypeStrict;
40
+ const ALL_MESSAGE_SENDERS = ['user', 'agent'];
41
+ const ALL_MESSAGE_TYPES = ['plain_text', 'json'];
42
+ const toMessageSender = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_MESSAGE_SENDERS);
43
+ exports.toMessageSender = toMessageSender;
44
+ const toMessageType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_MESSAGE_TYPES);
45
+ exports.toMessageType = toMessageType;
46
+ const toMessageSenderStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, ALL_MESSAGE_SENDERS);
47
+ exports.toMessageSenderStrict = toMessageSenderStrict;
48
+ const toMessageTypeStrict = (v) => (0, stringToUnion_1.stringToUnionStrict)(v, ALL_MESSAGE_TYPES);
49
+ exports.toMessageTypeStrict = toMessageTypeStrict;
@@ -1,5 +1,5 @@
1
1
  import { ActionsObservable } from 'redux-observable';
2
- import { clearAiCfo } from '../../entity/aiCfo/aiCfoReducer';
2
+ import { clearAIController } from '../../entity/aiController/aiControllerReducer';
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 { clearAiCfoView } from '../../view/aiCfoView/aiCfoViewReducer';
14
+ import { clearAIControllerView } from '../../view/aiControllerView/aiControllerViewReducer';
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 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>;
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>;
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 {};