@zeniai/client-epic-state 5.3.18-betaAK2 → 5.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.d.ts +4 -2
- package/lib/entity/tenant/epic/fetchAllTenantsEpic.js +42 -45
- package/lib/entity/tenant/tenantPayload.d.ts +1 -17
- package/lib/entity/tenant/tenantReducer.d.ts +2 -7
- package/lib/entity/tenant/tenantReducer.js +19 -48
- package/lib/entity/tenant/tenantSelector.d.ts +6 -26
- package/lib/entity/tenant/tenantSelector.js +96 -119
- package/lib/entity/tenant/tenantState.d.ts +0 -10
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +0 -2
- package/lib/esm/entity/tenant/epic/fetchAllTenantsEpic.js +46 -49
- package/lib/esm/entity/tenant/tenantReducer.js +17 -46
- package/lib/esm/entity/tenant/tenantSelector.js +95 -115
- package/lib/esm/epic.js +0 -2
- package/lib/esm/index.js +7 -7
- package/lib/esm/view/aiCfoView/aiCfoViewReducer.js +3 -65
- package/lib/esm/view/aiCfoView/aiCfoViewSelector.js +0 -25
- package/lib/esm/view/dashboard/dashboardEpic.js +4 -0
- package/lib/esm/view/dashboard/dashboardSelector.js +3 -2
- package/lib/esm/view/financeStatement/financeStatementEpic.js +5 -1
- package/lib/esm/view/people/peoplePageEpic.js +4 -0
- package/lib/index.d.ts +8 -8
- package/lib/index.js +46 -56
- package/lib/view/aiCfoView/aiCfoViewPayload.d.ts +0 -20
- package/lib/view/aiCfoView/aiCfoViewReducer.d.ts +2 -2
- package/lib/view/aiCfoView/aiCfoViewReducer.js +4 -66
- package/lib/view/aiCfoView/aiCfoViewSelector.d.ts +1 -8
- package/lib/view/aiCfoView/aiCfoViewSelector.js +0 -27
- package/lib/view/aiCfoView/aiCfoViewState.d.ts +0 -9
- package/lib/view/dashboard/dashboardEpic.js +4 -0
- package/lib/view/dashboard/dashboardSelector.d.ts +2 -0
- package/lib/view/dashboard/dashboardSelector.js +2 -1
- package/lib/view/financeStatement/financeStatementEpic.js +5 -1
- package/lib/view/people/peoplePageEpic.js +4 -0
- package/package.json +1 -1
- package/lib/esm/view/aiCfoView/epics/transcribeAudioEpic.js +0 -60
- package/lib/view/aiCfoView/epics/transcribeAudioEpic.d.ts +0 -19
- package/lib/view/aiCfoView/epics/transcribeAudioEpic.js +0 -64
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSelector } from '@reduxjs/toolkit';
|
|
2
2
|
import { newBalancesFilter } from '../../commonStateTypes/coaBalance/coaBalancesFilter';
|
|
3
3
|
import { reduceFetchState } from '../../commonStateTypes/reduceFetchState';
|
|
4
|
-
import { getCurrentTenant } from '../../entity/tenant/tenantSelector';
|
|
4
|
+
import { getCurrentTenant, getTenantsByCheckInDateSelector, } from '../../entity/tenant/tenantSelector';
|
|
5
5
|
import { hasAdminLevelAccess, hasInvestorBankerLevelAccess, } from '../../entity/userRole/userRoleType';
|
|
6
6
|
import { getApAgingReport } from '../apAgingView/apAgingReport/apAgingSelector';
|
|
7
7
|
import { getArAgingReport } from '../arAgingView/arAgingReport/arAgingSelector';
|
|
@@ -34,7 +34,8 @@ const getCashInCashOutLast4Periods = (state) => getCashInCashOut(state.accountSt
|
|
|
34
34
|
const getNetBurnOrIncomeStoryCard = (state) => getNetBurnOrIncomeStoryCardReport(state);
|
|
35
35
|
const apAgingSelector = (state) => getApAgingReport(state);
|
|
36
36
|
const arAgingSelector = (state) => getArAgingReport(state);
|
|
37
|
-
const tenantSelector = createSelector(getCurrentTenant, (currentTenant) => ({
|
|
37
|
+
const tenantSelector = createSelector(getTenantsByCheckInDateSelector, getCurrentTenant, (tenantsOrdered, currentTenant) => ({
|
|
38
|
+
tenantsOrdered,
|
|
38
39
|
currentTenant,
|
|
39
40
|
}));
|
|
40
41
|
export const getDashboard = createSelector(tenantSelector, getCardBalance, getCashBalance, getOperatingExpensesForLast5Periods, getRevenueForLast4Periods, getTop6Expenses, getNetBurnOrIncomeForLast4Periods, getNetBurnOrIncomeStoryCard, getCashPositionLast5Periods, getCashInCashOutLast4Periods, getInsights, getCompanyPassportView, getTasksCardReport, getBillPayCardReport, getReimbursementCardReport, apAgingSelector, arAgingSelector, getRewardsPlanCard, getDashboardCardsOrdered, (state) => {
|
|
@@ -15,8 +15,12 @@ export const fetchFinanceStatementEpic = (actions$, state$) => actions$.pipe(fil
|
|
|
15
15
|
return of(fetchAllTenants(userId), fetchProfitAndLoss(), fetchBalanceSheet(), fetchCashFlow());
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
|
-
const { financeStatementState } = state;
|
|
18
|
+
const { tenantState, financeStatementState } = state;
|
|
19
19
|
const fetchActions = [];
|
|
20
|
+
if (tenantState.fetchState !== 'In-Progress' &&
|
|
21
|
+
!tenantState.hasValidState()) {
|
|
22
|
+
fetchActions.push(fetchAllTenants(userId));
|
|
23
|
+
}
|
|
20
24
|
const pandLFetchState = getPandLReportFetchState(undefined, state.profitAndLossState);
|
|
21
25
|
const balanceSheetFetchState = getBalanceSheetFetchState(state.balanceSheetState);
|
|
22
26
|
const cashFlowFetchState = getCashFlowReportFetchState(state.cashFlowState);
|
|
@@ -10,6 +10,10 @@ export const fetchPeoplePageEpic = (actions$, state$) => actions$.pipe(filter(fe
|
|
|
10
10
|
else {
|
|
11
11
|
const state = state$.value;
|
|
12
12
|
const fetchActions = [];
|
|
13
|
+
if (state.tenantState.fetchState !== 'In-Progress' &&
|
|
14
|
+
!state.tenantState.hasValidState()) {
|
|
15
|
+
fetchActions.push(fetchAllTenants(userId));
|
|
16
|
+
}
|
|
13
17
|
if (state.peopleState.fetchState != 'In-Progress' &&
|
|
14
18
|
!state.peopleState.hasValidState()) {
|
|
15
19
|
fetchActions.push(fetchPeople());
|
package/lib/index.d.ts
CHANGED
|
@@ -146,8 +146,8 @@ import { ALL_WEEK_DAYS, DayOfWeek, PriorityCodeType, Task, TaskCodeType, TaskPri
|
|
|
146
146
|
import { getTaskGroupById } from './entity/taskGroup/taskGroupSelector';
|
|
147
147
|
import { TaskGroupState } from './entity/taskGroup/taskGroupState';
|
|
148
148
|
import { TaskGroupTemplate } from './entity/taskGroupTemplate/taskGroupTemplateState';
|
|
149
|
-
import { DoSignInPayload, deleteConnection, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, initEmailConnectOAuth, resendVerifyDeviceOTP, resetSignInState, saveAPIKeyConnection, saveConnectorCredentials, saveExternalConnection as saveExternalConnectionForTenant, saveOAuthConnection,
|
|
150
|
-
import { CurrentTenant,
|
|
149
|
+
import { DoSignInPayload, deleteConnection, doMagicLinkSignIn, doSignIn, doSignOut, fetchActiveTenant, fetchAllTenants, fetchExcludedResources as fetchExcludedResourcesForTenant, fetchExternalConnections as fetchExternalConnectionsForTenant, fetchSubscriptionSummaryForTenant, initEmailConnectOAuth, resendVerifyDeviceOTP, resetSignInState, saveAPIKeyConnection, saveConnectorCredentials, saveExternalConnection as saveExternalConnectionForTenant, saveOAuthConnection, sendEmailMagicLinkToUser, sendSessionHeartbeat, toExternalIntegrationType, updateCurrentTenant, updateSignInState, verifyDeviceWithTwoFA } from './entity/tenant/tenantReducer';
|
|
150
|
+
import { CurrentTenant, DEFAULT_RECEIPTS_EMAIL, TenantBaseView, TenantCoreDetailsView, TenantView, TenantsBaseOrdered, TenantsOrdered, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getIsAutoReviewIncomeWithoutCustomerEnabled, getReceiptsEmail, getTenantBaseById, getTenantBaseViewForTenantId, getTenantBaseViewForTenantView, getTenantsBaseByCheckInDateSelector, getTenantsByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, isOtherProductsEnabledForTenant, isTenantBankingOnly, isTenantBookkeepingEnabled, isTenantCardsOnly, isTenantUsingZeniCOA, isZeniDomainTenant, toTenantCoreDetailsView } from './entity/tenant/tenantSelector';
|
|
151
151
|
import { CapitalizableAccount, CapitalizableAccounts, CapitalizableClassificationType, CapitalizableMatchPattern, Connection, LoggedInUser, RoleResource, Tenant, TenantProductSettings } from './entity/tenant/tenantState';
|
|
152
152
|
import { toExternalSupportedTool } from './entity/tenant/tenantTypes';
|
|
153
153
|
import { ToastNotificationPayload } from './entity/toastNotification/toastNotificationPayload';
|
|
@@ -512,7 +512,7 @@ import { InternationalWireSelectorView, getInternationalWireView } from './view/
|
|
|
512
512
|
import { fetchInternationalVerificationForm, submitInternationalVerificationForm, updateVerificationFormLocalData } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer';
|
|
513
513
|
import { InternationalWireVerificationView, getIntlWireVerificationView } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector';
|
|
514
514
|
import { FieldValueType, InternationalWireVerificationState, VerificationFormField, VerificationFormLocalData } from './view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState';
|
|
515
|
-
import { fetchBillAttachment, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, fetchMagicLinkTenant, saveBankAccount, saveMagicLinkAddressInLocalStore, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData
|
|
515
|
+
import { fetchBillAttachment, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, fetchMagicLinkTenant, saveBankAccount, saveMagicLinkAddressInLocalStore, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData } from './view/spendManagement/billPay/magicLinkView/magicLinkViewReducer';
|
|
516
516
|
import { MagicLinkView, getMagicLinkBankAccountView, getMagicLinkCurrentAddressState, getMagicLinkView } from './view/spendManagement/billPay/magicLinkView/magicLinkViewSelector';
|
|
517
517
|
import { PreviousBillsSelectorView } from './view/spendManagement/billPay/previousBills/previousBillsSelector';
|
|
518
518
|
import { fetchWiseRedirectStatus } from './view/spendManagement/billPay/wiseRedirectView/wiseRedirectReducer';
|
|
@@ -754,7 +754,7 @@ export { TimeframeTick, TimeframeTickWithMetaData, toTimeframeTick, mapTimePerio
|
|
|
754
754
|
export { VendorSpendTrendFilterTabType, toVendorSpendTrendFilterTabsTypeStrict, } from './entity/vendorExpense/vendorSpendTrendFilterTabType';
|
|
755
755
|
export { getNumberOfPeriods };
|
|
756
756
|
export { SCHEDULE_DAYS_OF_MONTH, ScheduleDaysOfMonth, toScheduleDaysOfMonth, Day, Month, toMonth, toMonthStrict, Quarter, toQuarter, toQuarterStrict, AbsoluteDay, TimePeriod, };
|
|
757
|
-
export { CapitalizableAccount, CapitalizableAccounts, CapitalizableClassificationType, CapitalizableMatchPattern, Tenant, TenantView, LoggedInUser, TenantBaseView, CurrentTenant,
|
|
757
|
+
export { CapitalizableAccount, CapitalizableAccounts, CapitalizableClassificationType, CapitalizableMatchPattern, Tenant, TenantView, LoggedInUser, TenantBaseView, CurrentTenant, TenantProductSettings, getTenantBaseById, getCurrentTenant, getIsAccountingClassesEnabled, getIsAccountingProjectsEnabled, getIsAutoReviewIncomeWithoutCustomerEnabled, getTenantsByCheckInDateSelector, getTenantsBaseByCheckInDateSelector, getTenantsCoreDetailsByCheckInDateSelector, toTenantCoreDetailsView, getTenantBaseViewForTenantView, getTenantBaseViewForTenantId, isZeniDomainTenant, isTenantUsingZeniCOA, TenantsBaseOrdered, TenantsOrdered, TenantCoreDetailsView, fetchActiveTenant, fetchAllTenants, updateCurrentTenant, clearAll, doMagicLinkSignIn, verifyDeviceWithTwoFA, resendVerifyDeviceOTP, sendEmailMagicLinkToUser, doSignIn, updateSignInState, DoSignInPayload, doSignOut, sendSessionHeartbeat, resetSignInState, RoleResource, Connection, fetchExcludedResourcesForTenant, fetchExternalConnectionsForTenant, saveExternalConnectionForTenant, deleteConnection, saveAPIKeyConnection, saveConnectorCredentials, saveOAuthConnection, initEmailConnectOAuth, toExternalIntegrationType, toExternalSupportedTool, fetchSubscriptionSummaryForTenant, isTenantBankingOnly, isTenantCardsOnly, isTenantBookkeepingEnabled, isOtherProductsEnabledForTenant, DEFAULT_RECEIPTS_EMAIL, getReceiptsEmail, };
|
|
758
758
|
export { Account, AccountType, AccountBase, StatementCloseDay, toAccountType, AccountReport, NestedAccountReport, AccountWithBalanceReport, AccountGroup, AccountGroupReportV2, AccountGroupType, toAccountGroupType, AccountGroupReport, getAccountGroupKey, AccountGroupKey, RecommendedAccountBase, AccountFilterOption, getAllAccounts, getTransactionFilterAccountOptions, };
|
|
759
759
|
export { Class, ClassBase, RecommendedClassBase, } from './entity/class/classState';
|
|
760
760
|
export { ClassFilterOption, getAllClasses, getClassById, getClassFilterOptions, } from './entity/class/classSelector';
|
|
@@ -952,7 +952,7 @@ export { isZeniClearingAccountReport, ZENI_CLEARING_ACCOUNT, isZeniClearingAccou
|
|
|
952
952
|
export { fetchOnboardingCustomerView, fetchOnboardingCustomerSetupView, getOnboardingPlaidLinkToken, establishOnboardingPlaidConnection, updateOnboardingCustomerViewAccountDetails, updateOnboardingCustomerViewCompleteStatus, updateOnboardingCustomerViewDashboardLoaded, updateOnboardingPaymentAccountLoginStatus, updateOnboardingPaymentAccountStatus, updateOnboardingCustomerView, updateOnboardingCustomerViewLocalStoreData, updateCurrentStep, updateCurrentSubStep, updateOnboardingCustomerViewUIState, saveOnboardingCompnayOfficerPhoneInLocalStore, saveOnboardingCustomerViewDataInLocalStore, clearOnboardingCustomerViewDataInLocalStore, applyKycDocumentAutofillForOnboarding, applyKybDocumentAutofillForOnboarding, clearKycKybAutofillForOnboarding, acknowledgeOnboardingAiActivationViewed, acknowledgeOnboardingAiFinanceTeam, fetchAiAgentsActivationStatus, aiAgentsActivationCountsUpdated, aiAgentsActivationPhaseChanged, getAiAgentsActivationCounts, getAiAgentsActivationPhases, getAiAgentsActivationSubview, getOnboardingCustomerView, getProductSettingsString, OnboardingCustomerView, OnboardingStep, OnboardingSubStep, ALL_ONBOARDING_STEPS, ALL_ONBOARDING_SUB_STEPS, toOnboardingStepType, toOnboardingSubStepType, OnboardingCustomerViewUIState, OnboardingCustomerViewLocalData, OnboardingBusinessProfileUpdate, AiAgentsActivationCounts, AiAgentsActivationPhase, AiAgentsActivationPhaseStatus, AiAgentsActivationSubview, };
|
|
953
953
|
export { saveAccountMapping, saveAccountMappingLocalData, clearAccountMappingLocalData, AccountMappingLocalData, AccountMappingView, VendorAccountMappingView, getAccountMappingView, initializeAccountMappingView, ExpenseCategory1099Filing, };
|
|
954
954
|
export { MagicLinkView, getMagicLinkView, getMagicLinkBankAccountView, getMagicLinkCurrentAddressState, };
|
|
955
|
-
export { fetchMagicLinkTenant,
|
|
955
|
+
export { fetchMagicLinkTenant, fetchBillAttachment, saveBankAccount, updateMagicLinkBankAccountLocalStoreData, updateMagicLinkInternationalBankAccountLocalStoreData, fetchMagicLinkBankNameByRouting, fetchMagicLinkBankNameBySwift, saveMagicLinkAddressInLocalStore, };
|
|
956
956
|
export { getWiseRedirect, fetchWiseRedirectStatus };
|
|
957
957
|
export { getInternationalWireView, InternationalWireSelectorView, DynamicFormField, CreateInternationalWireDetailsLocalData, SupportedAccountType, VendorCurrency, initializeInternationalWireLocalData, updateInternationalWireLocalStoreData, initializeDynamicForm, fetchInternationalWireDynamicForm, createPaymentInstrument, createPaymentInstrumentUpdateStatus, deletePaymentInstrument, clearInternationalWire, };
|
|
958
958
|
export { fetchUserRoleConfig, getUserRoleConfig };
|
|
@@ -1002,12 +1002,12 @@ export { AiAccountantCustomerViewState, AiAccountantSortKey, AiAccountantUIState
|
|
|
1002
1002
|
export { AiAccountantFilterCategoryField } from './view/companyView/types/cockpitTypes';
|
|
1003
1003
|
export { cancelAiAccountantOnboarding, fetchAiAccountantCustomers, fetchAiAccountantJobs, setSelectedTenantIdsForJobTrigger, triggerAiAccountantJob, updateAiAccountantUIState, } from './view/aiAccountantView/aiAccountantViewReducer';
|
|
1004
1004
|
export { AiAccountantCockpitView, getAiAccountantCockpitView, } from './view/aiAccountantView/aiAccountantViewSelector';
|
|
1005
|
-
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,
|
|
1005
|
+
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';
|
|
1006
1006
|
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';
|
|
1007
1007
|
export { FetchSuggestedQuestionsResponse, SuggestedQuestionsDataPayload, FetchSkillsResponse, SkillSummaryPayload, SkillListDataPayload, } from './view/aiCfoView/aiCfoViewPayload';
|
|
1008
|
-
export type { FeedbackType, SubmitFeedbackPayload,
|
|
1008
|
+
export type { FeedbackType, SubmitFeedbackPayload, } from './view/aiCfoView/aiCfoViewPayload';
|
|
1009
1009
|
export type { AiCfoSuggestedQuestionsPageContext } from './common/aiCfo/aiCfoSuggestedQuestionsPageContext';
|
|
1010
|
-
export { AiCfoViewSelector, canCreateRoutine, getAiCfoView,
|
|
1010
|
+
export { AiCfoViewSelector, canCreateRoutine, getAiCfoView, getRoutineMutation, getRoutineRuns, getRoutines, getRoutinesEnabled, getSkillDetail, getSkillMutation, getSkills, getSkillsEnabled, getSkillVersionBody, getSkillVersions, getSuggestedQuestionsForPageContext, } from './view/aiCfoView/aiCfoViewSelector';
|
|
1011
1011
|
export { MessagePayload, ChatSessionPayload, AiCfoAnswerPayload, } from './entity/aiCfo/aiCfoPayload';
|
|
1012
1012
|
export { setNewSession, setSessions, updateAiCfoAnswerCardPolicyWizardPlan, upsertAnswerPayload, upsertOrAddQuestionAnswerPayload, addQuestionPayload, clearSession, toAiCfoExports, toAiCfoVisualization, appendSyntheticAiCfoAnswer, updateSyntheticAiCfoAnswer, removeSyntheticAiCfoAnswer, } from './entity/aiCfo/aiCfoReducer';
|
|
1013
1013
|
export { AiCfoSelectorView, getAllQuestionAnswersForChatSession, getQuestionAnswerByIdForChatSession, getAllQuestionsForChatSession, getAiCfoSelectorView, getSyntheticAiCfoAnswersForChatSession, getSyntheticAiCfoAnswerByQuestionAnswerId, ChatSessionWithOrderedQuestionAnswers, } from './entity/aiCfo/aiCfoSelector';
|