@zeniai/client-epic-state 5.2.35 → 5.2.36

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 (59) hide show
  1. package/lib/commonPayloadTypes/classesView/reportByClassPayloadV2.d.ts +1 -13
  2. package/lib/entity/sectionClassesViewV2/sectionClassesViewEpic.js +7 -10
  3. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +3 -3
  4. package/lib/entity/sectionProjectView/sectionProjectViewEpic.js +2 -6
  5. package/lib/entity/sectionProjectView/sectionProjectViewReducer.d.ts +3 -3
  6. package/lib/entity/sectionProjectView/sectionProjectViewReducer.js +3 -4
  7. package/lib/epic.js +0 -12
  8. package/lib/esm/entity/class/classReducer.js +1 -1
  9. package/lib/esm/entity/sectionClassesViewV2/sectionClassesViewEpic.js +7 -10
  10. package/lib/esm/entity/sectionProjectView/sectionProjectViewEpic.js +2 -6
  11. package/lib/esm/entity/sectionProjectView/sectionProjectViewReducer.js +4 -5
  12. package/lib/esm/epic.js +0 -12
  13. package/lib/esm/index.js +2 -2
  14. package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +1 -266
  15. package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +0 -50
  16. package/lib/esm/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.js +0 -4
  17. package/lib/index.d.ts +4 -4
  18. package/lib/index.js +40 -55
  19. package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -90
  20. package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +123 -164
  21. package/lib/view/aiCfoView/aiCfoViewReducer.js +3 -268
  22. package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -13
  23. package/lib/view/aiCfoView/aiCfoViewSelector.js +0 -55
  24. package/lib/view/aiCfoView/aiCfoViewState.d.ts +0 -157
  25. package/lib/view/cashFlowClassesView/cashFlowClassesViewPayload.d.ts +4 -4
  26. package/lib/view/cashFlowProjectView/cashFlowProjectViewPayload.d.ts +4 -4
  27. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.d.ts +11 -1
  28. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload.js +0 -4
  29. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer.d.ts +2 -1
  30. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewSelector.d.ts +2 -1
  31. package/lib/view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewState.d.ts +1 -15
  32. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewReducer.d.ts +1 -1
  33. package/lib/view/invoicing/invoicingCustomerListView/invoicingCustomerListViewState.d.ts +1 -1
  34. package/lib/view/profitAndLossProjectView/profitAndLossProjectViewPayload.d.ts +0 -12
  35. package/package.json +1 -1
  36. package/lib/esm/view/aiCfoView/epics/deleteRoutineEpic.js +0 -35
  37. package/lib/esm/view/aiCfoView/epics/fetchRoutineRunsEpic.js +0 -35
  38. package/lib/esm/view/aiCfoView/epics/fetchRoutinesEpic.js +0 -37
  39. package/lib/esm/view/aiCfoView/epics/runRoutineEpic.js +0 -34
  40. package/lib/esm/view/aiCfoView/epics/saveRoutineEpic.js +0 -65
  41. package/lib/esm/view/aiCfoView/epics/setRoutineEnabledEpic.js +0 -28
  42. package/lib/esm/view/aiCfoView/epics/toRoutine.js +0 -64
  43. package/lib/esm/view/aiCfoView/epics/toRoutineRun.js +0 -42
  44. package/lib/view/aiCfoView/epics/deleteRoutineEpic.d.ts +0 -18
  45. package/lib/view/aiCfoView/epics/deleteRoutineEpic.js +0 -39
  46. package/lib/view/aiCfoView/epics/fetchRoutineRunsEpic.d.ts +0 -13
  47. package/lib/view/aiCfoView/epics/fetchRoutineRunsEpic.js +0 -39
  48. package/lib/view/aiCfoView/epics/fetchRoutinesEpic.d.ts +0 -7
  49. package/lib/view/aiCfoView/epics/fetchRoutinesEpic.js +0 -41
  50. package/lib/view/aiCfoView/epics/runRoutineEpic.d.ts +0 -14
  51. package/lib/view/aiCfoView/epics/runRoutineEpic.js +0 -38
  52. package/lib/view/aiCfoView/epics/saveRoutineEpic.d.ts +0 -13
  53. package/lib/view/aiCfoView/epics/saveRoutineEpic.js +0 -69
  54. package/lib/view/aiCfoView/epics/setRoutineEnabledEpic.d.ts +0 -15
  55. package/lib/view/aiCfoView/epics/setRoutineEnabledEpic.js +0 -32
  56. package/lib/view/aiCfoView/epics/toRoutine.d.ts +0 -17
  57. package/lib/view/aiCfoView/epics/toRoutine.js +0 -69
  58. package/lib/view/aiCfoView/epics/toRoutineRun.d.ts +0 -12
  59. package/lib/view/aiCfoView/epics/toRoutineRun.js +0 -47
@@ -81,29 +81,6 @@ export const initialAiCfoViewState = {
81
81
  skillsEnabled: false,
82
82
  canPublish: false,
83
83
  },
84
- routines: {
85
- fetchState: 'Not-Started',
86
- error: undefined,
87
- deletedScheduleIds: [],
88
- routines: [],
89
- routinesEnabled: false,
90
- // 0 until the server says otherwise. The form reads this to decide whether
91
- // "New routine" is available, and a guessed cap would either block a user
92
- // who is under it or invite one who is over it to fill in a doomed form.
93
- maxRoutines: 0,
94
- },
95
- routineMutation: {
96
- fetchState: 'Not-Started',
97
- error: undefined,
98
- kind: undefined,
99
- },
100
- routineRuns: {
101
- fetchState: 'Not-Started',
102
- error: undefined,
103
- runs: [],
104
- scheduleId: null,
105
- sessionId: null,
106
- },
107
84
  };
108
85
  /**
109
86
  * Forget the skill that was open — prompt AND history together.
@@ -286,15 +263,6 @@ const aiCfoView = createSlice({
286
263
  fetchState: 'Error',
287
264
  error,
288
265
  };
289
- // A page that failed is not a promise of another one. Leaving `hasMore`
290
- // at its default meant the screen kept asking: the fetch condition is
291
- // "not in flight and there is more", and Error satisfies the first half,
292
- // so a session whose history 404s was requested in a tight loop forever
293
- // while the view sat on its loading skeletons.
294
- draft.uiState.chatHistoryNextPageToken[chatSessionId] = {
295
- nextPageToken: null,
296
- hasMore: false,
297
- };
298
266
  },
299
267
  setSession(draft, action) {
300
268
  draft.uiState.currentChatSessionId = action.payload.sessionId;
@@ -633,229 +601,6 @@ const aiCfoView = createSlice({
633
601
  error,
634
602
  };
635
603
  },
636
- fetchRoutines(draft) {
637
- draft.routines = {
638
- fetchState: 'In-Progress',
639
- error: undefined,
640
- routines: draft.routines.routines,
641
- maxRoutines: draft.routines.maxRoutines,
642
- // Carried for the same reason as maxRoutines: a refetch in flight is not
643
- // a reason to hide the entry the user is currently looking at.
644
- routinesEnabled: draft.routines.routinesEnabled,
645
- // Carried, not cleared: the response about to arrive may still contain a
646
- // routine deleted moments ago, which is the whole reason the list exists.
647
- deletedScheduleIds: draft.routines.deletedScheduleIds,
648
- };
649
- },
650
- fetchRoutinesSuccess(draft, action) {
651
- draft.routines = {
652
- fetchState: 'Completed',
653
- error: undefined,
654
- // A list response can predate a delete — a save refetches, and a delete
655
- // can land while that is outstanding — so replacing wholesale would put
656
- // the deleted row back and read as the delete having failed.
657
- routines: action.payload.routines.filter((routine) => !draft.routines.deletedScheduleIds.includes(routine.scheduleId)),
658
- maxRoutines: action.payload.maxRoutines,
659
- routinesEnabled: action.payload.routinesEnabled,
660
- // Carried, NOT cleared here.
661
- //
662
- // The skills slice clears its tombstone on a list response, which fixed
663
- // one bug and introduced the mirror of it: two list responses can both
664
- // land before the DELETE is processed, and the second one — arriving
665
- // with an empty tombstone — puts the deleted row back. The window is
666
- // small and entirely real, since a save refetches.
667
- //
668
- // The tombstone's true lifetime is the delete request, so it is dropped
669
- // in deleteRoutineSuccess / deleteRoutineFailure instead. That bounds it
670
- // just as tightly (a delete always resolves) without this race.
671
- deletedScheduleIds: draft.routines.deletedScheduleIds,
672
- };
673
- },
674
- fetchRoutinesFailure(draft, action) {
675
- draft.routines = {
676
- fetchState: 'Error',
677
- error: action.payload,
678
- routines: draft.routines.routines,
679
- // Kept: a failed refresh is not evidence the cap changed, and zeroing it
680
- // would disable "New routine" on any transient error.
681
- maxRoutines: draft.routines.maxRoutines,
682
- // Same again: a transient error must not make the entry vanish.
683
- routinesEnabled: draft.routines.routinesEnabled,
684
- deletedScheduleIds: draft.routines.deletedScheduleIds,
685
- };
686
- },
687
- setRoutineEnabled: {
688
- prepare: (payload) => ({
689
- payload,
690
- }),
691
- reducer(draft, action) {
692
- // Pause and resume without a full draft. A routine whose cadence this
693
- // client does not recognise has `recurrence: null`, so it cannot build
694
- // a RoutineDraft at all — and that is exactly the routine a user most
695
- // needs to be able to stop. Flipped locally too, so the switch responds
696
- // immediately; the refetch confirms it.
697
- const routine = draft.routines.routines.find((candidate) => candidate.scheduleId === action.payload.scheduleId);
698
- if (routine) {
699
- routine.enabled = action.payload.enabled;
700
- }
701
- draft.routineMutation = {
702
- fetchState: 'In-Progress',
703
- error: undefined,
704
- kind: 'save',
705
- };
706
- },
707
- },
708
- fetchRoutineRuns: {
709
- prepare: (payload) => ({ payload }),
710
- reducer(draft, action) {
711
- // Only a different routine's rows are wrong to show. This list polls
712
- // itself while a run is in flight, and clearing on every fetch blanked
713
- // the history and its summary a few times a minute — the rows were
714
- // being replaced by "Loading runs…" and then re-rendered, which reads
715
- // as the page breaking rather than refreshing.
716
- const sameRoutine = draft.routineRuns.scheduleId === action.payload.scheduleId;
717
- draft.routineRuns = {
718
- fetchState: 'In-Progress',
719
- error: undefined,
720
- // Showing one routine's runs under another's name is the one thing a
721
- // history must never do, so a change of routine still clears.
722
- runs: sameRoutine ? draft.routineRuns.runs : [],
723
- scheduleId: action.payload.scheduleId,
724
- sessionId: sameRoutine ? draft.routineRuns.sessionId : null,
725
- };
726
- },
727
- },
728
- fetchRoutineRunsSuccess: {
729
- prepare: (payload) => ({ payload }),
730
- reducer(draft, action) {
731
- // A response for a routine the user has since collapsed or swapped away
732
- // from is dropped. switchMap makes this rare, not impossible.
733
- if (draft.routineRuns.scheduleId !== action.payload.scheduleId) {
734
- return;
735
- }
736
- draft.routineRuns = {
737
- fetchState: 'Completed',
738
- error: undefined,
739
- runs: action.payload.runs,
740
- scheduleId: action.payload.scheduleId,
741
- sessionId: action.payload.sessionId,
742
- };
743
- },
744
- },
745
- fetchRoutineRunsFailure(draft, action) {
746
- draft.routineRuns.fetchState = 'Error';
747
- draft.routineRuns.error = action.payload;
748
- },
749
- closeRoutineRuns(draft) {
750
- draft.routineRuns = {
751
- fetchState: 'Not-Started',
752
- error: undefined,
753
- runs: [],
754
- scheduleId: null,
755
- sessionId: null,
756
- };
757
- },
758
- runRoutine: {
759
- prepare: (payload) => ({ payload }),
760
- reducer(draft, action) {
761
- draft.routineMutation = {
762
- fetchState: 'In-Progress',
763
- error: undefined,
764
- kind: 'run',
765
- runningScheduleId: action.payload.scheduleId,
766
- };
767
- },
768
- },
769
- runRoutineSuccess(draft) {
770
- draft.routineMutation = {
771
- fetchState: 'Completed',
772
- error: undefined,
773
- kind: 'run',
774
- // Cleared: the request is done. The RUN is not — the answer arrives by
775
- // email a minute or two later, and the row reports that through
776
- // last_run_at on the next fetch, not through this flag.
777
- runningScheduleId: undefined,
778
- };
779
- },
780
- runRoutineFailure(draft, action) {
781
- draft.routineMutation = {
782
- fetchState: 'Error',
783
- error: action.payload,
784
- kind: 'run',
785
- runningScheduleId: undefined,
786
- };
787
- },
788
- saveRoutine: {
789
- prepare: (payload) => ({
790
- payload,
791
- }),
792
- reducer(draft) {
793
- draft.routineMutation = {
794
- fetchState: 'In-Progress',
795
- error: undefined,
796
- kind: 'save',
797
- };
798
- },
799
- },
800
- saveRoutineSuccess(draft) {
801
- draft.routineMutation = {
802
- fetchState: 'Completed',
803
- error: undefined,
804
- kind: 'save',
805
- };
806
- },
807
- saveRoutineFailure(draft, action) {
808
- // On its OWN slice, so the `fetchRoutines` this write triggers cannot
809
- // clear the error in the same tick and report a failed save as nothing.
810
- draft.routineMutation = {
811
- fetchState: 'Error',
812
- error: action.payload,
813
- kind: 'save',
814
- };
815
- },
816
- deleteRoutine: {
817
- prepare: (payload) => ({ payload }),
818
- reducer(draft, action) {
819
- draft.routineMutation = {
820
- fetchState: 'In-Progress',
821
- error: undefined,
822
- kind: 'delete',
823
- };
824
- // Removed immediately AND tombstoned. The row must leave the list now —
825
- // waiting for the refetch makes the click feel ignored — and the
826
- // tombstone is what stops an in-flight list response restoring it.
827
- draft.routines.routines = draft.routines.routines.filter((routine) => routine.scheduleId !== action.payload.scheduleId);
828
- draft.routines.deletedScheduleIds = [
829
- ...draft.routines.deletedScheduleIds,
830
- action.payload.scheduleId,
831
- ];
832
- },
833
- },
834
- deleteRoutineSuccess(draft, action) {
835
- // The server has it. Nothing it sends from here on will contain this row,
836
- // so the tombstone has done its job and holding it any longer is what
837
- // makes a routine recreated under the same id invisible forever.
838
- draft.routines.deletedScheduleIds = draft.routines.deletedScheduleIds.filter((id) => id !== action.payload.scheduleId);
839
- draft.routineMutation = {
840
- fetchState: 'Completed',
841
- error: undefined,
842
- kind: 'delete',
843
- };
844
- },
845
- deleteRoutineFailure(draft, action) {
846
- // The routine still exists and is still emailing. Dropping the tombstone
847
- // is what lets the refetch put the row back — leaving it hidden would
848
- // tell the user they had stopped something they had not, which is the
849
- // worst outcome this list can produce.
850
- draft.routines.deletedScheduleIds = draft.routines.deletedScheduleIds.filter((id) => id !== action.payload.scheduleId);
851
- // Its own slice: the refetch that puts the row back would otherwise wipe
852
- // this error, leaving the row silently reappearing with no explanation.
853
- draft.routineMutation = {
854
- fetchState: 'Error',
855
- error: action.payload.status,
856
- kind: 'delete',
857
- };
858
- },
859
604
  fetchSkills(draft) {
860
605
  // Read straight off `draft.skills` — no optional chain. This store is never
861
606
  // persisted or rehydrated (no redux-persist anywhere in the repo, and no
@@ -1153,18 +898,8 @@ const aiCfoView = createSlice({
1153
898
  kind: undefined,
1154
899
  };
1155
900
  },
1156
- openRoutinesBrowser(draft) {
1157
- draft.uiState.isRoutinesBrowserOpen = true;
1158
- // The two browsers share the page body, so opening one closes the other.
1159
- // Leaving both true renders whichever the screen happens to check first.
1160
- draft.uiState.isSkillsBrowserOpen = false;
1161
- },
1162
- closeRoutinesBrowser(draft) {
1163
- draft.uiState.isRoutinesBrowserOpen = false;
1164
- },
1165
901
  openSkillsBrowser(draft) {
1166
902
  draft.uiState.isSkillsBrowserOpen = true;
1167
- draft.uiState.isRoutinesBrowserOpen = false;
1168
903
  },
1169
904
  closeSkillsBrowser(draft) {
1170
905
  // Unguarded, unlike the implicit closes: an explicit close should clear a lingering
@@ -1183,5 +918,5 @@ const aiCfoView = createSlice({
1183
918
  });
1184
919
  },
1185
920
  });
1186
- export const { acceptMasterTOS, acceptMasterTOSFailure, acceptMasterTOSSuccess, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, clearSkillDetail, clearSkillMutation, closeRoutineRuns, closeRoutinesBrowser, closeSkillsBrowser, createSession, createSessionAndSubmit, createSessionAndSubmitFailure, createSessionAndSubmitSuccess, createSessionFailure, createSessionSuccess, deleteChatSession, deleteChatSessionFailure, deleteChatSessionSuccess, deleteRoutine, deleteRoutineFailure, deleteRoutineSuccess, deleteSkill, deleteSkillFailure, deleteSkillSuccess, fetchChatHistory, fetchChatHistoryFailure, fetchChatHistorySuccess, fetchChatSessionsForUser, fetchChatSessionsForUserFailure, fetchChatSessionsForUserSuccess, fetchRoutineRuns, fetchRoutineRunsFailure, fetchRoutineRunsSuccess, fetchRoutines, fetchRoutinesFailure, fetchRoutinesSuccess, fetchSkillDetail, fetchSkillDetailFailure, fetchSkillDetailSuccess, fetchSkills, fetchSkillsFailure, fetchSkillsSuccess, fetchSkillVersionBody, fetchSkillVersionBodyFailure, fetchSkillVersionBodySuccess, fetchSkillVersions, fetchSkillVersionsFailure, fetchSkillVersionsSuccess, fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess, initializeNewSessionState, openRoutinesBrowser, openSkillsBrowser, runRoutine, runRoutineFailure, runRoutineSuccess, saveRoutine, saveRoutineFailure, saveRoutineSuccess, saveSkill, saveSkillFailure, saveSkillSuccess, setRoutineEnabled, setSession, setSkillVisibility, setSkillVisibilityFailure, setSkillVisibilitySuccess, stopSubmit, stopSubmitFailure, stopSubmitQuestion, stopSubmitQuestionFailure, stopSubmitQuestionSuccess, stopSubmitSuccess, submitFeedback, submitFeedbackFailure, submitFeedbackSuccess, submitQuestion, submitQuestionFailure, submitQuestionSuccess, updateAiCfoViewScrollPosition, updateCotCollapsedState, updateCurrentInput, updateResponseState, } = aiCfoView.actions;
921
+ export const { submitQuestion, submitQuestionSuccess, submitQuestionFailure, updateResponseState, updateAiCfoViewScrollPosition, updateCurrentInput, submitFeedback, submitFeedbackSuccess, submitFeedbackFailure, setSession, createSession, createSessionSuccess, createSessionFailure, createSessionAndSubmit, initializeNewSessionState, createSessionAndSubmitSuccess, createSessionAndSubmitFailure, fetchChatSessionsForUser, fetchChatSessionsForUserSuccess, fetchChatSessionsForUserFailure, fetchChatHistory, fetchChatHistorySuccess, fetchChatHistoryFailure, clearCurrentSessionId, clearLastContextMessage, stopSubmit, stopSubmitSuccess, stopSubmitFailure, stopSubmitQuestion, stopSubmitQuestionSuccess, stopSubmitQuestionFailure, acceptMasterTOS, acceptMasterTOSSuccess, acceptMasterTOSFailure, deleteChatSession, deleteChatSessionSuccess, deleteChatSessionFailure, clearDeleteChatSessionStatus, updateCotCollapsedState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, fetchSkills, fetchSkillsSuccess, fetchSkillsFailure, fetchSkillDetail, fetchSkillDetailSuccess, fetchSkillDetailFailure, clearSkillDetail, clearSkillMutation, deleteSkill, deleteSkillSuccess, deleteSkillFailure, fetchSkillVersionBody, fetchSkillVersionBodySuccess, fetchSkillVersionBodyFailure, fetchSkillVersions, fetchSkillVersionsSuccess, fetchSkillVersionsFailure, saveSkill, saveSkillSuccess, saveSkillFailure, setSkillVisibility, setSkillVisibilitySuccess, setSkillVisibilityFailure, openSkillsBrowser, closeSkillsBrowser, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } = aiCfoView.actions;
1187
922
  export default aiCfoView.reducer;
@@ -64,56 +64,6 @@ const EMPTY_SKILL_MUTATION_STATE = {
64
64
  savedMacroId: undefined,
65
65
  kind: undefined,
66
66
  };
67
- // Stable fallback, same reasoning as EMPTY_SKILLS_STATE: a fresh literal each
68
- // call defeats useSelector identity checks and re-renders the list for nothing.
69
- const EMPTY_ROUTINES_STATE = {
70
- fetchState: 'Not-Started',
71
- error: undefined,
72
- routines: [],
73
- // 0 withholds "New routine" until the server states the cap. Guessing a number
74
- // either blocks a user who is under it or invites one who is over it into a
75
- // form that cannot save.
76
- maxRoutines: 0,
77
- // false, so the Routines entry stays hidden until the server confirms the
78
- // feature is on. Defaulting true would flash an entry at tenants without it.
79
- routinesEnabled: false,
80
- deletedScheduleIds: [],
81
- };
82
- const EMPTY_ROUTINE_MUTATION_STATE = {
83
- fetchState: 'Not-Started',
84
- error: undefined,
85
- kind: undefined,
86
- };
87
- export function getRoutineMutation(state) {
88
- return state.aiCfoViewState?.routineMutation ?? EMPTY_ROUTINE_MUTATION_STATE;
89
- }
90
- const EMPTY_ROUTINE_RUNS_STATE = {
91
- fetchState: 'Not-Started',
92
- error: undefined,
93
- runs: [],
94
- scheduleId: null,
95
- sessionId: null,
96
- };
97
- export function getRoutineRuns(state) {
98
- return state.aiCfoViewState?.routineRuns ?? EMPTY_ROUTINE_RUNS_STATE;
99
- }
100
- export function getRoutines(state) {
101
- return state.aiCfoViewState?.routines ?? EMPTY_ROUTINES_STATE;
102
- }
103
- /**
104
- * Whether another routine may be created.
105
- *
106
- * False while the cap is still unknown: offering the control and failing on
107
- * save is worse than withholding it for the moment the list takes to load.
108
- */
109
- export function canCreateRoutine(state) {
110
- const { maxRoutines, routines } = getRoutines(state);
111
- return maxRoutines > 0 && routines.length < maxRoutines;
112
- }
113
- /** True only when the server says Routines is on for this tenant. */
114
- export function getRoutinesEnabled(state) {
115
- return getRoutines(state).routinesEnabled;
116
- }
117
67
  export function getSkills(state) {
118
68
  return state.aiCfoViewState?.skills ?? EMPTY_SKILLS_STATE;
119
69
  }
@@ -30,10 +30,6 @@ export const localDataToSaveInvoicingCustomerPayload = (localData, billingAddres
30
30
  : {}),
31
31
  };
32
32
  };
33
- /**
34
- * The email rendered once with sentinel tokens standing in for the subject and
35
- * body, so the composer can splice a draft into it without another request.
36
- */
37
33
  export const toInvoicingPaymentLinkEmailPreview = (payload) => ({
38
34
  body: payload.body,
39
35
  bodyToken: payload.body_token,
package/lib/index.d.ts CHANGED
@@ -983,12 +983,12 @@ export { AiAccountantCustomerViewState, AiAccountantSortKey, AiAccountantUIState
983
983
  export { AiAccountantFilterCategoryField } from './view/companyView/types/cockpitTypes';
984
984
  export { cancelAiAccountantOnboarding, fetchAiAccountantCustomers, fetchAiAccountantJobs, setSelectedTenantIdsForJobTrigger, triggerAiAccountantJob, updateAiAccountantUIState, } from './view/aiAccountantView/aiAccountantViewReducer';
985
985
  export { AiAccountantCockpitView, getAiAccountantCockpitView, } from './view/aiAccountantView/aiAccountantViewSelector';
986
- export { acceptMasterTOS, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, clearSkillDetail, clearSkillMutation, closeRoutineRuns, closeRoutinesBrowser, closeSkillsBrowser, createSession, createSessionAndSubmit, deleteChatSession, deleteRoutine, deleteSkill, fetchChatHistory, fetchChatSessionsForUser, fetchRoutineRuns, fetchRoutines, fetchSkillDetail, fetchSkills, fetchSkillsFailure, fetchSkillsSuccess, fetchSkillVersionBody, fetchSkillVersions, fetchSuggestedQuestions, fetchSuggestedQuestionsFailure, fetchSuggestedQuestionsSuccess, openRoutinesBrowser, openSkillsBrowser, runRoutine, saveRoutine, saveSkill, setRoutineEnabled, setSession, setSkillVisibility, stopSubmit, stopSubmitQuestion, submitFeedback, submitQuestion, updateAiCfoViewScrollPosition, updateCotCollapsedState, updateCurrentInput, updateResponseState, } from './view/aiCfoView/aiCfoViewReducer';
987
- export { AiCfoViewState, AiCfoViewUIState, Routine, RoutineDraft, RoutineMutationState, RoutineRecurrence, RoutineRun, RoutineRunsState, RoutineRunStatus, RoutinesState, RoutineStatus, Skill, SkillDetail, SkillDetailState, SkillDraft, SkillMutationState, SkillsState, SkillVersion, SkillVersionBodyState, SkillVersionsState, SkillVisibility, SuggestedQuestionsForPageContext, } from './view/aiCfoView/aiCfoViewState';
986
+ export { fetchChatSessionsForUser, createSession, submitQuestion, updateAiCfoViewScrollPosition, updateCurrentInput, updateCotCollapsedState, setSession, clearCurrentSessionId, clearDeleteChatSessionStatus, clearLastContextMessage, createSessionAndSubmit, stopSubmit, stopSubmitQuestion, fetchChatHistory, acceptMasterTOS, deleteChatSession, submitFeedback, updateResponseState, fetchSuggestedQuestions, fetchSuggestedQuestionsSuccess, fetchSuggestedQuestionsFailure, fetchSkills, fetchSkillsSuccess, fetchSkillsFailure, fetchSkillDetail, clearSkillDetail, clearSkillMutation, deleteSkill, fetchSkillVersionBody, fetchSkillVersions, saveSkill, setSkillVisibility, openSkillsBrowser, closeSkillsBrowser, applyAiCfoSidePanelHostPageTransition, clearAiCfoSidePanelHostPageContext, } from './view/aiCfoView/aiCfoViewReducer';
987
+ export { AiCfoViewState, AiCfoViewUIState, Skill, SkillDetail, SkillDetailState, SkillDraft, SkillMutationState, SkillVersion, SkillVersionBodyState, SkillVersionsState, SkillVisibility, SkillsState, SuggestedQuestionsForPageContext, } from './view/aiCfoView/aiCfoViewState';
988
988
  export { FetchSuggestedQuestionsResponse, SuggestedQuestionsDataPayload, FetchSkillsResponse, SkillSummaryPayload, SkillListDataPayload, } from './view/aiCfoView/aiCfoViewPayload';
989
989
  export type { FeedbackType, SubmitFeedbackPayload, } from './view/aiCfoView/aiCfoViewPayload';
990
990
  export type { AiCfoSuggestedQuestionsPageContext } from './common/aiCfo/aiCfoSuggestedQuestionsPageContext';
991
- export { AiCfoViewSelector, canCreateRoutine, getAiCfoView, getRoutineMutation, getRoutineRuns, getRoutines, getRoutinesEnabled, getSkillDetail, getSkillMutation, getSkills, getSkillsEnabled, getSkillVersionBody, getSkillVersions, getSuggestedQuestionsForPageContext, } from './view/aiCfoView/aiCfoViewSelector';
991
+ export { AiCfoViewSelector, getAiCfoView, getSuggestedQuestionsForPageContext, getSkills, getSkillDetail, getSkillMutation, getSkillVersionBody, getSkillVersions, getSkillsEnabled, } from './view/aiCfoView/aiCfoViewSelector';
992
992
  export { MessagePayload, ChatSessionPayload, AiCfoAnswerPayload, } from './entity/aiCfo/aiCfoPayload';
993
993
  export { setNewSession, setSessions, updateAiCfoAnswerCardPolicyWizardPlan, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, toAiCfoExports, toAiCfoVisualization, appendSyntheticAiCfoAnswer, updateSyntheticAiCfoAnswer, removeSyntheticAiCfoAnswer, } from './entity/aiCfo/aiCfoReducer';
994
994
  export { AiCfoSelectorView, getAllQuestionAnswersForChatSession, getQuestionAnswerByIdForChatSession, getAllQuestionsForChatSession, getAiCfoSelectorView, getSyntheticAiCfoAnswersForChatSession, getSyntheticAiCfoAnswerByQuestionAnswerId, ChatSessionWithOrderedQuestionAnswers, } from './entity/aiCfo/aiCfoSelector';
@@ -1171,7 +1171,7 @@ export type { InvoicingCustomerColumnConfig, InvoicingCustomerFilters, Invoicing
1171
1171
  export { getInvoicingCustomerListView } from './view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector';
1172
1172
  export type { InvoicingCustomerListView } from './view/invoicing/invoicingCustomerListView/invoicingCustomerListViewSelector';
1173
1173
  export { fetchInvoicingCustomerDetail, fetchInvoicingCustomerDetailPage, fetchInvoicingPaymentLinkEmailPreviewPage, } from './view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewReducer';
1174
- export type { InvoicingPaymentLinkEmailPreviewData } from './view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewState';
1174
+ export type { InvoicingPaymentLinkEmailPreviewData } from './view/invoicing/editInvoicingCustomerDetailView/editInvoicingCustomerDetailViewPayload';
1175
1175
  export { createInvoicingSetupIntent, fetchInvoicingPlaidLinkToken, resetInvoicingCustomerPaymentMethod, saveInvoicingPaymentMethod, sendInvoicingPaymentLink, } from './view/invoicing/customerPaymentMethod/customerPaymentMethodReducer';
1176
1176
  export type { InvoicingSetupIntent } from './view/invoicing/customerPaymentMethod/customerPaymentMethodState';
1177
1177
  export { getInvoicingPaymentLinkSendState, getInvoicingPaymentMethodSaveState, getInvoicingPlaidLinkToken, getInvoicingSentPaymentLinkEmail, getInvoicingSentPaymentLinkMagicUrl, getInvoicingSetupIntent, getInvoicingSetupIntentFetchState, } from './view/invoicing/customerPaymentMethod/customerPaymentMethodSelector';