@zeniai/client-epic-state 5.1.22 → 5.1.23-betaNB1

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 (63) hide show
  1. package/README.md +2 -1
  2. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
  3. package/lib/entity/accountRecon/accountReconPayload.d.ts +23 -1
  4. package/lib/entity/accountRecon/accountReconPayload.js +26 -1
  5. package/lib/entity/accountRecon/accountReconReducer.d.ts +5 -2
  6. package/lib/entity/accountRecon/accountReconReducer.js +33 -2
  7. package/lib/entity/accountRecon/accountReconSelector.d.ts +6 -1
  8. package/lib/entity/accountRecon/accountReconSelector.js +5 -0
  9. package/lib/entity/accountRecon/accountReconState.d.ts +22 -0
  10. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +8 -0
  11. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +10 -0
  12. package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +8 -0
  13. package/lib/epic.d.ts +5 -1
  14. package/lib/epic.js +5 -1
  15. package/lib/esm/entity/accountRecon/accountReconPayload.js +26 -1
  16. package/lib/esm/entity/accountRecon/accountReconReducer.js +32 -1
  17. package/lib/esm/entity/accountRecon/accountReconSelector.js +5 -0
  18. package/lib/esm/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +10 -0
  19. package/lib/esm/epic.js +5 -1
  20. package/lib/esm/index.js +5 -5
  21. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +29 -3
  22. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +11 -0
  23. package/lib/esm/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -2
  24. package/lib/esm/view/aiCfoView/epics/fetchSkillsEpic.js +34 -0
  25. package/lib/esm/view/aiCfoView/epics/submitQuestionEpic.js +7 -1
  26. package/lib/esm/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +34 -0
  27. package/lib/esm/view/expenseAutomationView/epics/accountRecon/reparseStatementEpic.js +31 -0
  28. package/lib/esm/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +57 -0
  29. package/lib/esm/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +1 -3
  30. package/lib/esm/view/expenseAutomationView/payload/reconciliationPayload.js +142 -0
  31. package/lib/esm/view/expenseAutomationView/reducers/reconciliationViewReducer.js +178 -8
  32. package/lib/esm/view/expenseAutomationView/selectors/reconciliationViewSelector.js +27 -0
  33. package/lib/esm/view/expenseAutomationView/types/reconciliationViewState.js +29 -0
  34. package/lib/index.d.ts +10 -10
  35. package/lib/index.js +55 -37
  36. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +14 -0
  37. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +8 -4
  38. package/lib/view/aiCfoView/aiCfoViewReducer.js +30 -4
  39. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +2 -1
  40. package/lib/view/aiCfoView/aiCfoViewSelector.js +12 -0
  41. package/lib/view/aiCfoView/aiCfoViewState.d.ts +15 -0
  42. package/lib/view/aiCfoView/epics/createSessionAndSubmitEpic.js +2 -2
  43. package/lib/view/aiCfoView/epics/fetchSkillsEpic.d.ts +8 -0
  44. package/lib/view/aiCfoView/epics/fetchSkillsEpic.js +38 -0
  45. package/lib/view/aiCfoView/epics/submitQuestionEpic.js +7 -1
  46. package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.d.ts +6 -0
  47. package/lib/view/expenseAutomationView/epics/accountRecon/parseStatementEpic.js +38 -0
  48. package/lib/view/expenseAutomationView/epics/accountRecon/reparseStatementEpic.d.ts +26 -0
  49. package/lib/view/expenseAutomationView/epics/accountRecon/reparseStatementEpic.js +35 -0
  50. package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.d.ts +27 -0
  51. package/lib/view/expenseAutomationView/epics/accountRecon/updateStatementInfoEpic.js +61 -0
  52. package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +1 -3
  53. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +163 -9
  54. package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +146 -0
  55. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +53 -3
  56. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +180 -9
  57. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +7 -1
  58. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.d.ts +2 -0
  59. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +29 -1
  60. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +172 -0
  61. package/lib/view/expenseAutomationView/types/reconciliationViewState.js +30 -0
  62. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
  63. package/package.json +4 -2
@@ -5,9 +5,9 @@ import { ChatSessionPayload } from '../../entity/aiCfo/aiCfoPayload';
5
5
  import { AiCfoAnswerResponseType } from '../../entity/aiCfo/aiCfoState';
6
6
  import { ZeniAPIStatus } from '../../responsePayload';
7
7
  import { ContextStatus } from './aiCfoViewPayload';
8
- import { AiCfoViewState } from './aiCfoViewState';
8
+ import { AiCfoViewState, Skill } from './aiCfoViewState';
9
9
  export declare const initialAiCfoViewState: AiCfoViewState;
10
- export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[sessionId: string, questionAnswerId: string, userId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined], {
10
+ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[sessionId: string, questionAnswerId: string, userId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined, macroId?: string | undefined], {
11
11
  sessionId: string;
12
12
  questionAnswerId: string;
13
13
  userId: string;
@@ -15,6 +15,7 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
15
15
  createdAt: import("dayjs").Dayjs;
16
16
  question: string;
17
17
  files: File[] | undefined;
18
+ macroId: string | undefined;
18
19
  }, "aiCfoView/submitQuestion", never, never>, submitQuestionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "aiCfoView/submitQuestionSuccess">, submitQuestionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
19
20
  error: ZeniAPIStatus;
20
21
  sessionId: ID;
@@ -36,7 +37,7 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
36
37
  sessionId: ID;
37
38
  contextMessage?: string;
38
39
  contextStatus?: ContextStatus;
39
- }, "aiCfoView/createSessionSuccess">, createSessionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiCfoView/createSessionFailure">, createSessionAndSubmit: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, questionAnswerId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined, pageContext?: string | undefined], {
40
+ }, "aiCfoView/createSessionSuccess">, createSessionFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiCfoView/createSessionFailure">, createSessionAndSubmit: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[agentId: string, userId: string, questionAnswerId: string, questionId: string, createdAt: import("dayjs").Dayjs, question: string, files?: File[] | undefined, pageContext?: string | undefined, macroId?: string | undefined], {
40
41
  agentId: string;
41
42
  userId: string;
42
43
  questionAnswerId: string;
@@ -45,6 +46,7 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
45
46
  question: string;
46
47
  files: File[] | undefined;
47
48
  pageContext: string | undefined;
49
+ macroId: string | undefined;
48
50
  }, "aiCfoView/createSessionAndSubmit", never, never>, initializeNewSessionState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
49
51
  agentId: string;
50
52
  sessionId: ID;
@@ -108,7 +110,9 @@ export declare const submitQuestion: import("@reduxjs/toolkit").ActionCreatorWit
108
110
  }, "aiCfoView/fetchSuggestedQuestionsSuccess">, fetchSuggestedQuestionsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
109
111
  error: ZeniAPIStatus;
110
112
  pageContext: AiCfoSuggestedQuestionsPageContext;
111
- }, "aiCfoView/fetchSuggestedQuestionsFailure">, applyAiCfoSidePanelHostPageTransition: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
113
+ }, "aiCfoView/fetchSuggestedQuestionsFailure">, fetchSkills: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"aiCfoView/fetchSkills">, fetchSkillsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
114
+ skills: Skill[];
115
+ }, "aiCfoView/fetchSkillsSuccess">, fetchSkillsFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "aiCfoView/fetchSkillsFailure">, applyAiCfoSidePanelHostPageTransition: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
112
116
  newAiCfoSidePanelHostPageKey: string;
113
117
  /** When omitted or null, clears the active session (empty / suggested questions). */
114
118
  nextCurrentChatSessionId?: ID | null;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  var _a;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.clearAiCfoSidePanelHostPageContext = exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions = exports.updateCotCollapsedState = exports.clearAiCfoView = exports.clearDeleteChatSessionStatus = exports.deleteChatSessionFailure = exports.deleteChatSessionSuccess = exports.deleteChatSession = exports.acceptMasterTOSFailure = exports.acceptMasterTOSSuccess = exports.acceptMasterTOS = exports.stopSubmitQuestionFailure = exports.stopSubmitQuestionSuccess = exports.stopSubmitQuestion = exports.stopSubmitFailure = exports.stopSubmitSuccess = exports.stopSubmit = exports.clearLastContextMessage = exports.clearCurrentSessionId = exports.fetchChatHistoryFailure = exports.fetchChatHistorySuccess = exports.fetchChatHistory = exports.fetchChatSessionsForUserFailure = exports.fetchChatSessionsForUserSuccess = exports.fetchChatSessionsForUser = exports.createSessionAndSubmitFailure = exports.createSessionAndSubmitSuccess = exports.initializeNewSessionState = exports.createSessionAndSubmit = exports.createSessionFailure = exports.createSessionSuccess = exports.createSession = exports.setSession = exports.clearInput = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.updateResponseState = exports.submitQuestionFailure = exports.submitQuestionSuccess = exports.submitQuestion = exports.initialAiCfoViewState = void 0;
4
+ exports.clearAiCfoSidePanelHostPageContext = exports.applyAiCfoSidePanelHostPageTransition = exports.fetchSkillsFailure = exports.fetchSkillsSuccess = exports.fetchSkills = exports.fetchSuggestedQuestionsFailure = exports.fetchSuggestedQuestionsSuccess = exports.fetchSuggestedQuestions = exports.updateCotCollapsedState = exports.clearAiCfoView = exports.clearDeleteChatSessionStatus = exports.deleteChatSessionFailure = exports.deleteChatSessionSuccess = exports.deleteChatSession = exports.acceptMasterTOSFailure = exports.acceptMasterTOSSuccess = exports.acceptMasterTOS = exports.stopSubmitQuestionFailure = exports.stopSubmitQuestionSuccess = exports.stopSubmitQuestion = exports.stopSubmitFailure = exports.stopSubmitSuccess = exports.stopSubmit = exports.clearLastContextMessage = exports.clearCurrentSessionId = exports.fetchChatHistoryFailure = exports.fetchChatHistorySuccess = exports.fetchChatHistory = exports.fetchChatSessionsForUserFailure = exports.fetchChatSessionsForUserSuccess = exports.fetchChatSessionsForUser = exports.createSessionAndSubmitFailure = exports.createSessionAndSubmitSuccess = exports.initializeNewSessionState = exports.createSessionAndSubmit = exports.createSessionFailure = exports.createSessionSuccess = exports.createSession = exports.setSession = exports.clearInput = exports.updateCurrentInput = exports.updateAiCfoViewScrollPosition = exports.updateResponseState = exports.submitQuestionFailure = exports.submitQuestionSuccess = exports.submitQuestion = exports.initialAiCfoViewState = void 0;
5
5
  const toolkit_1 = require("@reduxjs/toolkit");
6
6
  function removeSessionIdFromPageKeyMap(draft, sessionId) {
7
7
  const map = draft.uiState.chatSessionIdByPageKey;
@@ -51,6 +51,7 @@ exports.initialAiCfoViewState = {
51
51
  responseStateByChatSessionId: {},
52
52
  stopSubmitStateByChatSessionId: {},
53
53
  suggestedQuestionsByPageContext: {},
54
+ skills: { fetchState: 'Not-Started', error: undefined, skills: [] },
54
55
  };
55
56
  const aiCfoView = (0, toolkit_1.createSlice)({
56
57
  name: 'aiCfoView',
@@ -66,7 +67,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
66
67
  answer: { fetchState: 'In-Progress', error: undefined },
67
68
  };
68
69
  },
69
- prepare(sessionId, questionAnswerId, userId, questionId, createdAt, question, files) {
70
+ prepare(sessionId, questionAnswerId, userId, questionId, createdAt, question, files, macroId) {
70
71
  return {
71
72
  payload: {
72
73
  sessionId,
@@ -76,6 +77,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
76
77
  createdAt,
77
78
  question,
78
79
  files,
80
+ macroId,
79
81
  },
80
82
  };
81
83
  },
@@ -226,7 +228,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
226
228
  draft.createSessionAndSubmitState.fetchState = 'In-Progress';
227
229
  draft.createSessionAndSubmitState.error = undefined;
228
230
  },
229
- prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext) {
231
+ prepare(agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext, macroId) {
230
232
  return {
231
233
  payload: {
232
234
  agentId,
@@ -237,6 +239,7 @@ const aiCfoView = (0, toolkit_1.createSlice)({
237
239
  question,
238
240
  files,
239
241
  pageContext,
242
+ macroId,
240
243
  },
241
244
  };
242
245
  },
@@ -449,6 +452,29 @@ const aiCfoView = (0, toolkit_1.createSlice)({
449
452
  error,
450
453
  };
451
454
  },
455
+ fetchSkills(draft) {
456
+ // Optional-chain: persisted/rehydrated state from before this slice existed
457
+ // may have no `skills`, so don't assume draft.skills is set.
458
+ draft.skills = {
459
+ fetchState: 'In-Progress',
460
+ error: undefined,
461
+ skills: draft.skills?.skills ?? [],
462
+ };
463
+ },
464
+ fetchSkillsSuccess(draft, action) {
465
+ draft.skills = {
466
+ fetchState: 'Completed',
467
+ error: undefined,
468
+ skills: action.payload.skills,
469
+ };
470
+ },
471
+ fetchSkillsFailure(draft, action) {
472
+ draft.skills = {
473
+ fetchState: 'Error',
474
+ error: action.payload,
475
+ skills: draft.skills?.skills ?? [],
476
+ };
477
+ },
452
478
  clearAiCfoView(draft) {
453
479
  Object.assign(draft, exports.initialAiCfoViewState);
454
480
  },
@@ -459,5 +485,5 @@ const aiCfoView = (0, toolkit_1.createSlice)({
459
485
  },
460
486
  },
461
487
  });
462
- _a = aiCfoView.actions, exports.submitQuestion = _a.submitQuestion, exports.submitQuestionSuccess = _a.submitQuestionSuccess, exports.submitQuestionFailure = _a.submitQuestionFailure, exports.updateResponseState = _a.updateResponseState, exports.updateAiCfoViewScrollPosition = _a.updateAiCfoViewScrollPosition, exports.updateCurrentInput = _a.updateCurrentInput, exports.clearInput = _a.clearInput, exports.setSession = _a.setSession, exports.createSession = _a.createSession, exports.createSessionSuccess = _a.createSessionSuccess, exports.createSessionFailure = _a.createSessionFailure, exports.createSessionAndSubmit = _a.createSessionAndSubmit, exports.initializeNewSessionState = _a.initializeNewSessionState, exports.createSessionAndSubmitSuccess = _a.createSessionAndSubmitSuccess, exports.createSessionAndSubmitFailure = _a.createSessionAndSubmitFailure, exports.fetchChatSessionsForUser = _a.fetchChatSessionsForUser, exports.fetchChatSessionsForUserSuccess = _a.fetchChatSessionsForUserSuccess, exports.fetchChatSessionsForUserFailure = _a.fetchChatSessionsForUserFailure, exports.fetchChatHistory = _a.fetchChatHistory, exports.fetchChatHistorySuccess = _a.fetchChatHistorySuccess, exports.fetchChatHistoryFailure = _a.fetchChatHistoryFailure, exports.clearCurrentSessionId = _a.clearCurrentSessionId, exports.clearLastContextMessage = _a.clearLastContextMessage, exports.stopSubmit = _a.stopSubmit, exports.stopSubmitSuccess = _a.stopSubmitSuccess, exports.stopSubmitFailure = _a.stopSubmitFailure, exports.stopSubmitQuestion = _a.stopSubmitQuestion, exports.stopSubmitQuestionSuccess = _a.stopSubmitQuestionSuccess, exports.stopSubmitQuestionFailure = _a.stopSubmitQuestionFailure, exports.acceptMasterTOS = _a.acceptMasterTOS, exports.acceptMasterTOSSuccess = _a.acceptMasterTOSSuccess, exports.acceptMasterTOSFailure = _a.acceptMasterTOSFailure, exports.deleteChatSession = _a.deleteChatSession, exports.deleteChatSessionSuccess = _a.deleteChatSessionSuccess, exports.deleteChatSessionFailure = _a.deleteChatSessionFailure, exports.clearDeleteChatSessionStatus = _a.clearDeleteChatSessionStatus, exports.clearAiCfoView = _a.clearAiCfoView, exports.updateCotCollapsedState = _a.updateCotCollapsedState, exports.fetchSuggestedQuestions = _a.fetchSuggestedQuestions, exports.fetchSuggestedQuestionsSuccess = _a.fetchSuggestedQuestionsSuccess, exports.fetchSuggestedQuestionsFailure = _a.fetchSuggestedQuestionsFailure, exports.applyAiCfoSidePanelHostPageTransition = _a.applyAiCfoSidePanelHostPageTransition, exports.clearAiCfoSidePanelHostPageContext = _a.clearAiCfoSidePanelHostPageContext;
488
+ _a = aiCfoView.actions, exports.submitQuestion = _a.submitQuestion, exports.submitQuestionSuccess = _a.submitQuestionSuccess, exports.submitQuestionFailure = _a.submitQuestionFailure, exports.updateResponseState = _a.updateResponseState, exports.updateAiCfoViewScrollPosition = _a.updateAiCfoViewScrollPosition, exports.updateCurrentInput = _a.updateCurrentInput, exports.clearInput = _a.clearInput, exports.setSession = _a.setSession, exports.createSession = _a.createSession, exports.createSessionSuccess = _a.createSessionSuccess, exports.createSessionFailure = _a.createSessionFailure, exports.createSessionAndSubmit = _a.createSessionAndSubmit, exports.initializeNewSessionState = _a.initializeNewSessionState, exports.createSessionAndSubmitSuccess = _a.createSessionAndSubmitSuccess, exports.createSessionAndSubmitFailure = _a.createSessionAndSubmitFailure, exports.fetchChatSessionsForUser = _a.fetchChatSessionsForUser, exports.fetchChatSessionsForUserSuccess = _a.fetchChatSessionsForUserSuccess, exports.fetchChatSessionsForUserFailure = _a.fetchChatSessionsForUserFailure, exports.fetchChatHistory = _a.fetchChatHistory, exports.fetchChatHistorySuccess = _a.fetchChatHistorySuccess, exports.fetchChatHistoryFailure = _a.fetchChatHistoryFailure, exports.clearCurrentSessionId = _a.clearCurrentSessionId, exports.clearLastContextMessage = _a.clearLastContextMessage, exports.stopSubmit = _a.stopSubmit, exports.stopSubmitSuccess = _a.stopSubmitSuccess, exports.stopSubmitFailure = _a.stopSubmitFailure, exports.stopSubmitQuestion = _a.stopSubmitQuestion, exports.stopSubmitQuestionSuccess = _a.stopSubmitQuestionSuccess, exports.stopSubmitQuestionFailure = _a.stopSubmitQuestionFailure, exports.acceptMasterTOS = _a.acceptMasterTOS, exports.acceptMasterTOSSuccess = _a.acceptMasterTOSSuccess, exports.acceptMasterTOSFailure = _a.acceptMasterTOSFailure, exports.deleteChatSession = _a.deleteChatSession, exports.deleteChatSessionSuccess = _a.deleteChatSessionSuccess, exports.deleteChatSessionFailure = _a.deleteChatSessionFailure, exports.clearDeleteChatSessionStatus = _a.clearDeleteChatSessionStatus, exports.clearAiCfoView = _a.clearAiCfoView, exports.updateCotCollapsedState = _a.updateCotCollapsedState, exports.fetchSuggestedQuestions = _a.fetchSuggestedQuestions, exports.fetchSuggestedQuestionsSuccess = _a.fetchSuggestedQuestionsSuccess, exports.fetchSuggestedQuestionsFailure = _a.fetchSuggestedQuestionsFailure, exports.fetchSkills = _a.fetchSkills, exports.fetchSkillsSuccess = _a.fetchSkillsSuccess, exports.fetchSkillsFailure = _a.fetchSkillsFailure, exports.applyAiCfoSidePanelHostPageTransition = _a.applyAiCfoSidePanelHostPageTransition, exports.clearAiCfoSidePanelHostPageContext = _a.clearAiCfoSidePanelHostPageContext;
463
489
  exports.default = aiCfoView.reducer;
@@ -4,7 +4,7 @@ import { FetchStateAndError } from '../../commonStateTypes/common';
4
4
  import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport';
5
5
  import { AiCfoSelectorView } from '../../entity/aiCfo/aiCfoSelector';
6
6
  import { RootState } from '../../reducer';
7
- import { AiCfoViewUIState, SuggestedQuestionsForPageContext } from './aiCfoViewState';
7
+ import { AiCfoViewUIState, SkillsState, SuggestedQuestionsForPageContext } from './aiCfoViewState';
8
8
  export interface AiCfoViewSelector extends SelectorView, AiCfoSelectorView {
9
9
  createSessionAndSubmitState: FetchStateAndError;
10
10
  createSessionState: FetchStateAndError;
@@ -23,3 +23,4 @@ export interface AiCfoViewSelector extends SelectorView, AiCfoSelectorView {
23
23
  }
24
24
  export declare const getAiCfoView: (state: RootState) => AiCfoViewSelector;
25
25
  export declare function getSuggestedQuestionsForPageContext(state: RootState, pageContext: AiCfoSuggestedQuestionsPageContext): SuggestedQuestionsForPageContext | undefined;
26
+ export declare function getSkills(state: RootState): SkillsState;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAiCfoView = void 0;
4
4
  exports.getSuggestedQuestionsForPageContext = getSuggestedQuestionsForPageContext;
5
+ exports.getSkills = getSkills;
5
6
  const aiCfoReducer_1 = require("../../entity/aiCfo/aiCfoReducer");
6
7
  const aiCfoSelector_1 = require("../../entity/aiCfo/aiCfoSelector");
7
8
  const aiCfoViewReducer_1 = require("./aiCfoViewReducer");
@@ -27,3 +28,14 @@ exports.getAiCfoView = getAiCfoView;
27
28
  function getSuggestedQuestionsForPageContext(state, pageContext) {
28
29
  return state.aiCfoViewState?.suggestedQuestionsByPageContext?.[pageContext];
29
30
  }
31
+ // Stable fallback so getSkills returns a referentially-stable object when skills
32
+ // state is absent — a fresh literal each call would defeat useSelector identity
33
+ // checks and cause needless re-renders.
34
+ const EMPTY_SKILLS_STATE = {
35
+ fetchState: 'Not-Started',
36
+ error: undefined,
37
+ skills: [],
38
+ };
39
+ function getSkills(state) {
40
+ return state.aiCfoViewState?.skills ?? EMPTY_SKILLS_STATE;
41
+ }
@@ -37,6 +37,19 @@ export interface SuggestedQuestionsForPageContext extends FetchStateAndError {
37
37
  suggestedQuestions: string[];
38
38
  generatedAt?: string;
39
39
  }
40
+ /** A chat-visible skill shown in the `/` menu. */
41
+ export interface Skill {
42
+ description: string | null;
43
+ displayName: string | null;
44
+ hasScripts: boolean;
45
+ macroId: string;
46
+ name: string;
47
+ parameterHints: Record<string, unknown> | null;
48
+ semver: string | null;
49
+ }
50
+ export interface SkillsState extends FetchStateAndError {
51
+ skills: Skill[];
52
+ }
40
53
  export interface AiCfoViewState extends FetchStateAndError {
41
54
  allChatSessionIds: ID[];
42
55
  createSessionAndSubmitState: FetchStateAndError;
@@ -50,6 +63,8 @@ export interface AiCfoViewState extends FetchStateAndError {
50
63
  reasoning: FetchStateAndError;
51
64
  thought: FetchStateAndError;
52
65
  }>;
66
+ /** Chat-visible skills for the `/` menu. */
67
+ skills: SkillsState;
53
68
  stopSubmitStateByChatSessionId: Record<ID, FetchStateAndError>;
54
69
  /** Keyed by `page_context` query value (e.g. balance_sheet). */
55
70
  suggestedQuestionsByPageContext: Partial<Record<AiCfoSuggestedQuestionsPageContext, SuggestedQuestionsForPageContext>>;
@@ -69,7 +69,7 @@ function waitForChannelSubscription(pusherInstance, channelName, timeoutMs = 500
69
69
  }));
70
70
  }
71
71
  const createSessionAndSubmitEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.createSessionAndSubmit.match), (0, operators_1.switchMap)((action) => {
72
- const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext, } = action.payload;
72
+ const { agentId, userId, questionAnswerId, questionId, createdAt, question, files, pageContext, macroId, } = action.payload;
73
73
  const payload = {
74
74
  agent_id: agentId,
75
75
  ...(pageContext != null && { page_context: pageContext }),
@@ -116,7 +116,7 @@ const createSessionAndSubmitEpic = (actions$, _state$, zeniAPI) => actions$.pipe
116
116
  // This allows fetchChatHistory to run after the question is submitted
117
117
  (0, rxjs_1.of)((0, aiCfoViewReducer_1.createSessionAndSubmitSuccess)(),
118
118
  // Submit the question after handlers are bound
119
- (0, aiCfoViewReducer_1.submitQuestion)(sessionId, questionAnswerId, userId, questionId, createdAt, question, files),
119
+ (0, aiCfoViewReducer_1.submitQuestion)(sessionId, questionAnswerId, userId, questionId, createdAt, question, files, macroId),
120
120
  // Add question payload optimistically after submitQuestion (matches original order)
121
121
  // This is idempotent - won't create duplicates if called multiple times
122
122
  // submitQuestionEpic will find the question already exists and only update the response
@@ -0,0 +1,8 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { Observable } from 'rxjs';
3
+ import { RootState } from '../../../reducer';
4
+ import { ZeniAPI } from '../../../zeniAPI';
5
+ import { fetchSkills, fetchSkillsFailure, fetchSkillsSuccess } from '../aiCfoViewReducer';
6
+ export type ActionType = ReturnType<typeof fetchSkills> | ReturnType<typeof fetchSkillsSuccess> | ReturnType<typeof fetchSkillsFailure>;
7
+ /** GET {aiCfoMicroServiceBaseUrl}/1.0/skills — chat-visible skills for the `/` menu. */
8
+ export declare const fetchSkillsEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchSkillsEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../responsePayload");
7
+ const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
8
+ const toSkill = (s) => ({
9
+ macroId: s.macro_id,
10
+ name: s.name,
11
+ displayName: s.display_name,
12
+ description: s.description,
13
+ semver: s.semver,
14
+ parameterHints: s.parameter_hints,
15
+ hasScripts: s.has_scripts,
16
+ });
17
+ /** GET {aiCfoMicroServiceBaseUrl}/1.0/skills — chat-visible skills for the `/` menu. */
18
+ const fetchSkillsEpic = (actions$,
19
+ // state$ intentionally unused: the `/` menu dispatches this once per slash-entry
20
+ // (the composer dedupes), so we always re-fetch the (small, singleton) list.
21
+ _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.fetchSkills.match),
22
+ // switchMap: a singleton list endpoint with no key — cancel any in-flight
23
+ // fetch so the latest dispatch wins (no racing writes to `skills`).
24
+ (0, operators_1.switchMap)(() => {
25
+ // aiCfoMicroServiceBaseUrl already targets the chat service (it serves the
26
+ // /1.0/agents/{id} submit route too); /1.0/skills lives on the same service.
27
+ const url = `${zeniAPI.apiEndPoints.aiCfoMicroServiceBaseUrl}/1.0/skills`;
28
+ return zeniAPI.getJSON(url).pipe((0, operators_1.mergeMap)((response) => {
29
+ if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
30
+ // Guard the array: a malformed 2xx body without `skills` must not crash .map.
31
+ return (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSkillsSuccess)({
32
+ skills: (response.data.skills ?? []).map(toSkill),
33
+ }));
34
+ }
35
+ return (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSkillsFailure)(response.status));
36
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, aiCfoViewReducer_1.fetchSkillsFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Fetch skills REST API call failed', error instanceof Error ? { message: error.message } : undefined)))));
37
+ }));
38
+ exports.fetchSkillsEpic = fetchSkillsEpic;
@@ -7,7 +7,7 @@ const aiCfoReducer_1 = require("../../../entity/aiCfo/aiCfoReducer");
7
7
  const responsePayload_1 = require("../../../responsePayload");
8
8
  const aiCfoViewReducer_1 = require("../aiCfoViewReducer");
9
9
  const submitQuestionEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(aiCfoViewReducer_1.submitQuestion.match), (0, operators_1.mergeMap)((action) => {
10
- const { questionAnswerId, userId, sessionId, questionId, createdAt, question, files, } = action.payload;
10
+ const { questionAnswerId, userId, sessionId, questionId, createdAt, question, files, macroId, } = action.payload;
11
11
  const { aiCfoViewState } = state$.value;
12
12
  const { uiState } = aiCfoViewState;
13
13
  const agentId = uiState.agentId;
@@ -20,15 +20,21 @@ const submitQuestionEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, oper
20
20
  const formData = new FormData();
21
21
  formData.append('chat_session_id', sessionId);
22
22
  formData.append('message', question);
23
+ if (macroId != null) {
24
+ formData.append('macro_id', macroId);
25
+ }
23
26
  for (const file of files) {
24
27
  formData.append('files', file, file.name);
25
28
  }
26
29
  apiCall = zeniAPI.postFormData(endpoint, formData);
27
30
  }
28
31
  else {
32
+ // `message` is the display token (e.g. "/flux"); `macro_id` tells the chat
33
+ // service to expand the skill's instructions as the actual agent prompt.
29
34
  apiCall = zeniAPI.postAndGetJSON(endpoint, {
30
35
  chat_session_id: sessionId,
31
36
  message: question,
37
+ ...(macroId != null && { macro_id: macroId }),
32
38
  });
33
39
  }
34
40
  return apiCall.pipe((0, operators_1.mergeMap)((response) => {
@@ -0,0 +1,6 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { RootState } from '../../../../reducer';
3
+ import { ZeniAPI } from '../../../../zeniAPI';
4
+ import { parseStatement, parseStatementFailure, parseStatementSuccess, updateParsedStatementData } from '../../reducers/reconciliationViewReducer';
5
+ export type ActionType = ReturnType<typeof parseStatement> | ReturnType<typeof parseStatementSuccess> | ReturnType<typeof parseStatementFailure> | ReturnType<typeof updateParsedStatementData>;
6
+ export declare const parseStatementEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<ActionType>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseStatementEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const responsePayload_1 = require("../../../../responsePayload");
7
+ const reconciliationPayload_1 = require("../../payload/reconciliationPayload");
8
+ const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
9
+ const parseStatementEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.parseStatement.match), (0, operators_1.switchMap)((action) => {
10
+ const { accountId, selectedPeriod, statementUploadId } = action.payload;
11
+ const parseStatementApi$ = zeniAPI.getJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/2.0/statement-uploads/${statementUploadId}`);
12
+ return parseStatementApi$.pipe((0, operators_1.mergeMap)((response) => {
13
+ if ((0, responsePayload_1.isSuccessResponse)(response) === true && response.data != null) {
14
+ const actions = [];
15
+ const transformedData = (0, reconciliationPayload_1.transformParseStatementPayloadToState)(response.data);
16
+ actions.push((0, reconciliationViewReducer_1.updateParsedStatementData)({
17
+ accountId,
18
+ selectedPeriod,
19
+ parsedStatementData: transformedData,
20
+ }));
21
+ actions.push((0, reconciliationViewReducer_1.parseStatementSuccess)({ accountId, selectedPeriod }));
22
+ return (0, rxjs_1.from)(actions);
23
+ }
24
+ else {
25
+ return (0, rxjs_1.of)((0, reconciliationViewReducer_1.parseStatementFailure)({
26
+ accountId,
27
+ selectedPeriod,
28
+ error: response.status,
29
+ }));
30
+ }
31
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.parseStatementFailure)({
32
+ accountId,
33
+ selectedPeriod,
34
+ error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Parse Statement REST API call errored out ' +
35
+ (error instanceof Error ? error.message : String(error))),
36
+ }))));
37
+ }));
38
+ exports.parseStatementEpic = parseStatementEpic;
@@ -0,0 +1,26 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { RootState } from '../../../../reducer';
3
+ import { updateAccountReconReparseStatement } from '../../../../entity/accountRecon/accountReconReducer';
4
+ import { ZeniAPI } from '../../../../zeniAPI';
5
+ import { reparseStatement, reparseStatementFailure, reparseStatementSuccess } from '../../reducers/reconciliationViewReducer';
6
+ export type ActionType = ReturnType<typeof reparseStatement> | ReturnType<typeof reparseStatementSuccess> | ReturnType<typeof reparseStatementFailure> | ReturnType<typeof updateAccountReconReparseStatement>;
7
+ export declare const reparseStatementEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
8
+ payload: {
9
+ accountId: import("../../../..").ID;
10
+ selectedPeriod: import("../../../..").MonthYearPeriod;
11
+ };
12
+ type: "expenseAutomationReconciliationView/reparseStatementSuccess";
13
+ } | {
14
+ payload: {
15
+ accountId: import("../../../..").ID;
16
+ error: import("../../../../responsePayload").ZeniAPIStatus;
17
+ selectedPeriod: import("../../../..").MonthYearPeriod;
18
+ };
19
+ type: "expenseAutomationReconciliationView/reparseStatementFailure";
20
+ } | {
21
+ payload: {
22
+ accountReconKey: string;
23
+ payload: import("../../payload/reconciliationPayload").ReparseStatementResponsePayload;
24
+ };
25
+ type: "accountRecon/updateAccountReconReparseStatement";
26
+ }>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.reparseStatementEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const accountReconReducer_1 = require("../../../../entity/accountRecon/accountReconReducer");
7
+ const accountReconState_1 = require("../../../../entity/accountRecon/accountReconState");
8
+ const responsePayload_1 = require("../../../../responsePayload");
9
+ const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
10
+ const reparseStatementEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.reparseStatement.match), (0, operators_1.switchMap)((action) => {
11
+ const { accountId, selectedPeriod, statementUploadId } = action.payload;
12
+ const reparseStatementApi$ = zeniAPI.postAndGetJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/1.0/reconciliation/statements/${statementUploadId}/reparse`);
13
+ return reparseStatementApi$.pipe((0, operators_1.mergeMap)((response) => {
14
+ if ((0, responsePayload_1.isSuccessResponse)(response) === true && response.data != null) {
15
+ const accountReconKey = (0, accountReconState_1.toAccountReconKey)(accountId, selectedPeriod);
16
+ return (0, rxjs_1.from)([
17
+ (0, accountReconReducer_1.updateAccountReconReparseStatement)(accountReconKey, response.data),
18
+ (0, reconciliationViewReducer_1.reparseStatementSuccess)({ accountId, selectedPeriod }),
19
+ ]);
20
+ }
21
+ else {
22
+ return (0, rxjs_1.of)((0, reconciliationViewReducer_1.reparseStatementFailure)({
23
+ accountId,
24
+ selectedPeriod,
25
+ error: response.status,
26
+ }));
27
+ }
28
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.reparseStatementFailure)({
29
+ accountId,
30
+ selectedPeriod,
31
+ error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Reparse Statement REST API call errored out ' +
32
+ (error instanceof Error ? error.message : String(error))),
33
+ }))));
34
+ }));
35
+ exports.reparseStatementEpic = reparseStatementEpic;
@@ -0,0 +1,27 @@
1
+ import { ActionsObservable, StateObservable } from 'redux-observable';
2
+ import { RootState } from '../../../../reducer';
3
+ import { ZeniAPI } from '../../../../zeniAPI';
4
+ import { submitStatementUpdate, submitStatementUpdateFailure, submitStatementUpdateSuccess, updateParsedStatementData } from '../../reducers/reconciliationViewReducer';
5
+ export type ActionType = ReturnType<typeof submitStatementUpdate> | ReturnType<typeof submitStatementUpdateSuccess> | ReturnType<typeof submitStatementUpdateFailure> | ReturnType<typeof updateParsedStatementData>;
6
+ export declare const updateStatementInfoEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
7
+ payload: {
8
+ accountId: import("../../../..").ID;
9
+ parsedStatementData: import("../../types/reconciliationViewState").ParsedStatementData;
10
+ selectedPeriod: import("../../../../commonStateTypes/timePeriod").MonthYearPeriod;
11
+ };
12
+ type: "expenseAutomationReconciliationView/updateParsedStatementData";
13
+ } | {
14
+ payload: {
15
+ accountId: import("../../../..").ID;
16
+ selectedPeriod: import("../../../../commonStateTypes/timePeriod").MonthYearPeriod;
17
+ };
18
+ type: "expenseAutomationReconciliationView/submitStatementUpdateSuccess";
19
+ } | {
20
+ payload: {
21
+ accountId: import("../../../..").ID;
22
+ error: import("../../../../responsePayload").ZeniAPIStatus;
23
+ selectedPeriod: import("../../../../commonStateTypes/timePeriod").MonthYearPeriod;
24
+ dateConflict?: import("../../types/reconciliationViewState").StatementDateConflict | null;
25
+ };
26
+ type: "expenseAutomationReconciliationView/submitStatementUpdateFailure";
27
+ }>;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateStatementInfoEpic = void 0;
4
+ const rxjs_1 = require("rxjs");
5
+ const operators_1 = require("rxjs/operators");
6
+ const timePeriod_1 = require("../../../../commonStateTypes/timePeriod");
7
+ const responsePayload_1 = require("../../../../responsePayload");
8
+ const reconciliationPayload_1 = require("../../payload/reconciliationPayload");
9
+ const reconciliationViewReducer_1 = require("../../reducers/reconciliationViewReducer");
10
+ const updateStatementInfoEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(reconciliationViewReducer_1.submitStatementUpdate.match), (0, operators_1.switchMap)((action) => {
11
+ const { accountId, selectedPeriod, statementUploadId } = action.payload;
12
+ const state = state$.value;
13
+ const reconciliationView = state.expenseAutomationReconciliationViewState;
14
+ const accountRecon = reconciliationView.accountReconciliationRecordsBySelectedPeriod[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]?.reconciliationByAccountID[accountId];
15
+ const localData = accountRecon?.localData?.statementUpdateLocalData;
16
+ if (!localData) {
17
+ return (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
18
+ accountId,
19
+ selectedPeriod,
20
+ error: (0, responsePayload_1.createZeniAPIStatus)('Missing Data', 'No statement update data found'),
21
+ }));
22
+ }
23
+ const hasInvalidUpdates = localData.statementTransactions.updated.some((txn) => txn.statementTransactionId == null);
24
+ if (hasInvalidUpdates) {
25
+ return (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
26
+ accountId,
27
+ selectedPeriod,
28
+ error: (0, responsePayload_1.createZeniAPIStatus)('Invalid Data', 'One or more edited transactions are missing statement transaction ids'),
29
+ }));
30
+ }
31
+ const payload = (0, reconciliationPayload_1.transformStatementUpdateStateToPayload)(localData);
32
+ const updateStatementApi$ = zeniAPI.putAndGetJSON(`${zeniAPI.apiEndPoints.reconciliationMicroServiceBaseUrl}/2.0/statement-uploads/${statementUploadId}`, payload);
33
+ return updateStatementApi$.pipe((0, operators_1.mergeMap)((response) => {
34
+ if ((0, responsePayload_1.isSuccessResponse)(response) === true && response.data != null) {
35
+ const parsedStatementData = (0, reconciliationPayload_1.transformUpdateStatementInfoPayloadToState)(response.data);
36
+ return (0, rxjs_1.of)((0, reconciliationViewReducer_1.updateParsedStatementData)({
37
+ accountId,
38
+ selectedPeriod,
39
+ parsedStatementData,
40
+ }), (0, reconciliationViewReducer_1.submitStatementUpdateSuccess)({
41
+ accountId,
42
+ selectedPeriod,
43
+ }));
44
+ }
45
+ // A 409 chain-validation conflict carries the blocking reconciled
46
+ // period at the top level so the UI can prompt a re-upload.
47
+ const dateConflict = (0, reconciliationPayload_1.transformStatementDateConflictToState)(response);
48
+ return (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
49
+ accountId,
50
+ selectedPeriod,
51
+ error: response.status,
52
+ dateConflict,
53
+ }));
54
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, reconciliationViewReducer_1.submitStatementUpdateFailure)({
55
+ accountId,
56
+ selectedPeriod,
57
+ error: (0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Update Statement REST API call errored out ' +
58
+ (error instanceof Error ? error.message : String(error))),
59
+ }))));
60
+ }));
61
+ exports.updateStatementInfoEpic = updateStatementInfoEpic;
@@ -62,9 +62,7 @@ const fetchFluxAnalysisViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((
62
62
  selectedPeriod: monthAndYear,
63
63
  fetchReimbursement,
64
64
  keepExistingListItems,
65
- // The backend returns last_refresh_success_time on the top-level
66
- // status object (alongside code/message), not inside data.status.
67
- status: response.status,
65
+ status: response.data?.status,
68
66
  }));
69
67
  }
70
68
  return (0, rxjs_1.from)(updateActions);