@zeniai/client-epic-state 5.0.31-betaNB1 → 5.0.31-betaRD2
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/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +0 -1
- package/lib/coreEpics.js +4 -1
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -1
- package/lib/entity/tenant/clearAllEpic.js +2 -0
- package/lib/entity/tenant/epic/deleteConnectionEpic.d.ts +19 -0
- package/lib/entity/tenant/epic/deleteConnectionEpic.js +29 -0
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.d.ts +19 -0
- package/lib/entity/tenant/epic/saveAPIKeyConnectionEpic.js +31 -0
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.d.ts +19 -0
- package/lib/entity/tenant/epic/saveOAuthConnectionEpic.js +33 -0
- package/lib/entity/tenant/tenantPayload.d.ts +2 -0
- package/lib/entity/tenant/tenantReducer.d.ts +60 -1
- package/lib/entity/tenant/tenantReducer.js +143 -4
- package/lib/entity/tenant/tenantState.d.ts +8 -0
- package/lib/epic.d.ts +3 -1
- package/lib/epic.js +6 -1
- package/lib/esm/commonStateTypes/animations.js +0 -1
- package/lib/esm/coreEpics.js +4 -1
- package/lib/esm/entity/tenant/clearAllEpic.js +2 -0
- package/lib/esm/entity/tenant/epic/deleteConnectionEpic.js +25 -0
- package/lib/esm/entity/tenant/epic/saveAPIKeyConnectionEpic.js +27 -0
- package/lib/esm/entity/tenant/epic/saveOAuthConnectionEpic.js +29 -0
- package/lib/esm/entity/tenant/tenantReducer.js +139 -2
- package/lib/esm/epic.js +6 -1
- package/lib/esm/index.js +5 -2
- package/lib/esm/reducer.js +3 -0
- package/lib/esm/view/featureNotificationView/epics/fetchRegisteredInterestsEpic.js +23 -0
- package/lib/esm/view/featureNotificationView/epics/notifyMeForFeatureEpic.js +25 -0
- package/lib/esm/view/featureNotificationView/featureNotificationViewPayload.js +11 -0
- package/lib/esm/view/featureNotificationView/featureNotificationViewReducer.js +99 -0
- package/lib/esm/view/featureNotificationView/featureNotificationViewSelector.js +4 -0
- package/lib/esm/view/featureNotificationView/featureNotificationViewState.js +1 -0
- package/lib/index.d.ts +6 -2
- package/lib/index.js +51 -30
- package/lib/reducer.d.ts +3 -0
- package/lib/reducer.js +3 -0
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
- package/lib/view/featureNotificationView/epics/fetchRegisteredInterestsEpic.d.ts +16 -0
- package/lib/view/featureNotificationView/epics/fetchRegisteredInterestsEpic.js +27 -0
- package/lib/view/featureNotificationView/epics/notifyMeForFeatureEpic.d.ts +14 -0
- package/lib/view/featureNotificationView/epics/notifyMeForFeatureEpic.js +29 -0
- package/lib/view/featureNotificationView/featureNotificationViewPayload.d.ts +23 -0
- package/lib/view/featureNotificationView/featureNotificationViewPayload.js +15 -0
- package/lib/view/featureNotificationView/featureNotificationViewReducer.d.ts +17 -0
- package/lib/view/featureNotificationView/featureNotificationViewReducer.js +103 -0
- package/lib/view/featureNotificationView/featureNotificationViewSelector.d.ts +6 -0
- package/lib/view/featureNotificationView/featureNotificationViewSelector.js +11 -0
- package/lib/view/featureNotificationView/featureNotificationViewState.d.ts +26 -0
- package/lib/view/featureNotificationView/featureNotificationViewState.js +2 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const toAnimationsFileName: (v: string) => "Success" | "AiAgent" | "AiIconEntry" | "AiIconExit" | "AiIconLoop" | "AiStar" | "AiStarIcon" | "AiStarPlain" | "AIPoweredInvoiceDark" | "AIPoweredInvoiceLight" | "Angry" | "AutoTransfer" | "CloseCard" | "Confetti" | "ConfettiSuccess" | "DashboardChristmasSnow" | "DashboardNewYearShow" | "DashboardSidebarBottomChristmas" | "DashboardSidebarBottomHalloween" | "DashboardSidebarBottomNewYear" | "DashboardSidebarBottomThanksgiving" | "DashboardSidebarTopChristmas" | "DashboardSidebarTopHalloween" | "DashboardSidebarTopNewYear" | "DashboardSidebarTopThanksgiving" | "Distribution" | "DistributionDark" | "EarnYield" | "FastestWayDark" | "FastestWayLight" | "FinanceTeamDark" | "FinanceTeamLight" | "Happy" | "Liquidity" | "LockCard" | "MoneyTransferSuccess" | "MultiLevelApprovalDark" | "MultiLevelApprovalLight" | "NotHappy" | "Protection" | "
|
|
1
|
+
export declare const toAnimationsFileName: (v: string) => "Success" | "AiAgent" | "AiIconEntry" | "AiIconExit" | "AiIconLoop" | "AiStar" | "AiStarIcon" | "AiStarPlain" | "AIPoweredInvoiceDark" | "AIPoweredInvoiceLight" | "Angry" | "AutoTransfer" | "CloseCard" | "Confetti" | "ConfettiSuccess" | "DashboardChristmasSnow" | "DashboardNewYearShow" | "DashboardSidebarBottomChristmas" | "DashboardSidebarBottomHalloween" | "DashboardSidebarBottomNewYear" | "DashboardSidebarBottomThanksgiving" | "DashboardSidebarTopChristmas" | "DashboardSidebarTopHalloween" | "DashboardSidebarTopNewYear" | "DashboardSidebarTopThanksgiving" | "Distribution" | "DistributionDark" | "EarnYield" | "FastestWayDark" | "FastestWayLight" | "FinanceTeamDark" | "FinanceTeamLight" | "Happy" | "Liquidity" | "LockCard" | "MoneyTransferSuccess" | "MultiLevelApprovalDark" | "MultiLevelApprovalLight" | "NotHappy" | "Protection" | "ReceiptDark" | "ReceiptLight" | "Recurring" | "RecurringDark" | "ReimburseDark" | "ReimburseLight" | "RewardsDark" | "RewardsDarkHover" | "RewardsLight" | "RewardsLightHover" | "Ripple" | "Secure" | "Target" | "TargetDark" | "UnlockCard" | "VeryHappy" | "ZeniAssist";
|
|
2
2
|
export type AnimationFileName = ReturnType<typeof toAnimationsFileName>;
|
package/lib/coreEpics.js
CHANGED
|
@@ -21,7 +21,10 @@ const fetchExcludedResourcesEpic_1 = require("./entity/tenant/epic/fetchExcluded
|
|
|
21
21
|
const fetchExternalConnectionsEpic_1 = require("./entity/tenant/epic/fetchExternalConnectionsEpic");
|
|
22
22
|
const fetchSubscriptionSummaryForTenantEpic_1 = require("./entity/tenant/epic/fetchSubscriptionSummaryForTenantEpic");
|
|
23
23
|
const resendVerifyDeviceOTPEpic_1 = require("./entity/tenant/epic/resendVerifyDeviceOTPEpic");
|
|
24
|
+
const deleteConnectionEpic_1 = require("./entity/tenant/epic/deleteConnectionEpic");
|
|
25
|
+
const saveAPIKeyConnectionEpic_1 = require("./entity/tenant/epic/saveAPIKeyConnectionEpic");
|
|
24
26
|
const saveExternalConnectionEpic_1 = require("./entity/tenant/epic/saveExternalConnectionEpic");
|
|
27
|
+
const saveOAuthConnectionEpic_1 = require("./entity/tenant/epic/saveOAuthConnectionEpic");
|
|
25
28
|
const sendEmailMagicLinkToUserEpic_1 = require("./entity/tenant/epic/sendEmailMagicLinkToUserEpic");
|
|
26
29
|
const signInUserEpic_1 = require("./entity/tenant/epic/signInUserEpic");
|
|
27
30
|
const sessionHeartbeatEpic_1 = require("./entity/tenant/epic/sessionHeartbeatEpic");
|
|
@@ -49,7 +52,7 @@ const verifyOtpEpic_1 = require("./view/twoFactorAuthentication/verifyOtpEpic");
|
|
|
49
52
|
// RootActionType is only available in the dynamically imported epic.ts.
|
|
50
53
|
const coreRootEpic = (0, redux_observable_1.combineEpics)(
|
|
51
54
|
// Auth & tenant
|
|
52
|
-
clearAllEpic_1.clearAllEpic, doMagicLinkSignInEpic_1.doMagicLinkSignInEpic, signInUserEpic_1.doSignInEpic, signOutUserEpic_1.doSignOutEpic, sessionHeartbeatEpic_1.sessionHeartbeatEpic, fetchActiveTenantEpic_1.fetchActiveTenantEpic, fetchAllTenantsEpic_1.fetchAllTenantsEpic, fetchExcludedResourcesEpic_1.fetchExcludedResourcesEpic, fetchExternalConnectionsEpic_1.fetchExternalConnectionsEpic, fetchSubscriptionSummaryForTenantEpic_1.fetchSubscriptionSummaryForTenantEpic, resendVerifyDeviceOTPEpic_1.resendVerifyDeviceOTPEpic, saveExternalConnectionEpic_1.saveExternalConnectionEpic, sendEmailMagicLinkToUserEpic_1.sendEmailMagicLinkToUserEpic, verifyDeviceWithTwoFAEpic_1.verifyDeviceWithTwoFAEpic,
|
|
55
|
+
clearAllEpic_1.clearAllEpic, doMagicLinkSignInEpic_1.doMagicLinkSignInEpic, signInUserEpic_1.doSignInEpic, signOutUserEpic_1.doSignOutEpic, sessionHeartbeatEpic_1.sessionHeartbeatEpic, fetchActiveTenantEpic_1.fetchActiveTenantEpic, fetchAllTenantsEpic_1.fetchAllTenantsEpic, fetchExcludedResourcesEpic_1.fetchExcludedResourcesEpic, fetchExternalConnectionsEpic_1.fetchExternalConnectionsEpic, fetchSubscriptionSummaryForTenantEpic_1.fetchSubscriptionSummaryForTenantEpic, resendVerifyDeviceOTPEpic_1.resendVerifyDeviceOTPEpic, deleteConnectionEpic_1.deleteConnectionEpic, saveAPIKeyConnectionEpic_1.saveAPIKeyConnectionEpic, saveExternalConnectionEpic_1.saveExternalConnectionEpic, saveOAuthConnectionEpic_1.saveOAuthConnectionEpic, sendEmailMagicLinkToUserEpic_1.sendEmailMagicLinkToUserEpic, verifyDeviceWithTwoFAEpic_1.verifyDeviceWithTwoFAEpic,
|
|
53
56
|
// Toast
|
|
54
57
|
pushToastNotificationEpic_1.pushToastNotificationEpic,
|
|
55
58
|
// Collaboration
|
|
@@ -47,6 +47,7 @@ import { clearExpenseAutomationJESchedulesView } from '../../view/expenseAutomat
|
|
|
47
47
|
import { clearExpenseAutomationMissingReceiptsView } from '../../view/expenseAutomationView/reducers/missingReceiptsViewReducer';
|
|
48
48
|
import { clearExpenseAutomationReconciliationView } from '../../view/expenseAutomationView/reducers/reconciliationViewReducer';
|
|
49
49
|
import { clearExpenseAutomationTransactionsView } from '../../view/expenseAutomationView/reducers/transactionsViewReducer';
|
|
50
|
+
import { clearFeatureNotificationView } from '../../view/featureNotificationView/featureNotificationViewReducer';
|
|
50
51
|
import { clearFileViewList } from '../../view/fileView/fileViewReducer';
|
|
51
52
|
import { clearFinanceStatement } from '../../view/financeStatement/financeStatementReducer';
|
|
52
53
|
import { clearForecastList } from '../../view/forecastList/forecastListReducer';
|
|
@@ -204,7 +205,7 @@ import { clearAllUserRoles } from '../userRole/userRoleReducer';
|
|
|
204
205
|
import { clearAllVendors } from '../vendor/vendorReducer';
|
|
205
206
|
import { clearAllVendorExpenseTrends } from '../vendorExpense/vendorExpenseReducer';
|
|
206
207
|
import { clearAll } from './tenantReducer';
|
|
207
|
-
type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearAutoTransferRules> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard>;
|
|
208
|
+
type clearActionTypeForViews = ReturnType<typeof clearAccountList> | ReturnType<typeof clearAccountMappingView> | ReturnType<typeof clearActivityHistory> | ReturnType<typeof clearActivityRealTimeApproval> | ReturnType<typeof clearAddressView> | ReturnType<typeof clearAiAccountantView> | ReturnType<typeof clearAllAiAccountantCustomers> | ReturnType<typeof clearAiCfoView> | ReturnType<typeof clearAllClasses> | ReturnType<typeof clearAllProjects> | ReturnType<typeof clearAllMonthEndCloseChecksView> | ReturnType<typeof clearApAging> | ReturnType<typeof clearApAgingDetail> | ReturnType<typeof clearArAging> | ReturnType<typeof clearArAgingDetail> | ReturnType<typeof clearAuthenticationView> | ReturnType<typeof clearAutoTransferRules> | ReturnType<typeof clearBalanceSheet> | ReturnType<typeof clearBankAccountView> | ReturnType<typeof clearBillDetailView> | ReturnType<typeof clearBillList> | ReturnType<typeof clearBillPayBulkActionView> | ReturnType<typeof clearBillPayCard> | ReturnType<typeof clearBillPayConfig> | ReturnType<typeof clearBillPayReview> | ReturnType<typeof clearBillPaySetupApproverView> | ReturnType<typeof clearBillPaySetupView> | ReturnType<typeof clearCardBalance> | ReturnType<typeof clearCardPaymentView> | ReturnType<typeof clearCardUserOnboarding> | ReturnType<typeof clearCashbackDetail> | ReturnType<typeof clearCashBalance> | ReturnType<typeof clearCashFlow> | ReturnType<typeof clearCashInCashOut> | ReturnType<typeof clearCashPosition> | ReturnType<typeof clearChargeCardConfig> | ReturnType<typeof clearChargeCardDetail> | ReturnType<typeof clearChargeCardList> | ReturnType<typeof clearChargeCardRepaymentDetail> | ReturnType<typeof clearChargeCardSetupView> | ReturnType<typeof clearChargeCardStatementList> | ReturnType<typeof clearCheckDeposit> | ReturnType<typeof clearCompanyConfigView> | ReturnType<typeof clearCompanyHealthMetric> | ReturnType<typeof clearCompanyHealthMetricView> | ReturnType<typeof clearCompanyMonthEndReportView> | ReturnType<typeof clearCompanyTaskManagerView> | ReturnType<typeof clearCompanyView> | ReturnType<typeof clearDashboard> | ReturnType<typeof clearDashboardLayout> | ReturnType<typeof clearDepositAccountDetail> | ReturnType<typeof clearDepositAccountList> | ReturnType<typeof clearDepositAccountTransactionList> | ReturnType<typeof clearEditBillViewDetail> | ReturnType<typeof clearEditRemiViewDetail> | ReturnType<typeof clearAllEntityAutoCompleteResults> | ReturnType<typeof clearExpenseAutomationFluxAnalysisView> | ReturnType<typeof clearExpenseAutomationJESchedulesView> | ReturnType<typeof clearExpenseAutomationMissingReceiptsView> | ReturnType<typeof clearExpenseAutomationReconciliationView> | ReturnType<typeof clearExpenseAutomationTransactionsView> | ReturnType<typeof clearExpenseAutomationView> | ReturnType<typeof clearExpressPayView> | ReturnType<typeof clearFeatureNotificationView> | ReturnType<typeof clearFileViewList> | ReturnType<typeof clearFinanceStatement> | ReturnType<typeof clearForecastList> | ReturnType<typeof clearGlobalMerchantAutoCompleteResults> | ReturnType<typeof clearGlobalMerchantView> | ReturnType<typeof clearInsightsCard> | ReturnType<typeof clearInternationalWire> | ReturnType<typeof clearInternationalVerificationView> | ReturnType<typeof clearIssueChargeCard> | ReturnType<typeof clearMerchantList> | ReturnType<typeof clearNetBurnOrIncome> | ReturnType<typeof clearNetBurnOrIncomeClassesView> | ReturnType<typeof clearNetBurnOrIncomeStoryCard> | ReturnType<typeof clearNotificationView> | ReturnType<typeof clearOnboardingCockpitView> | ReturnType<typeof clearOnboardingCustomerView> | ReturnType<typeof clearOpEx> | ReturnType<typeof clearOpExByVendor> | ReturnType<typeof clearOpExClassesView> | ReturnType<typeof clearOwnerList> | ReturnType<typeof clearPaymentAccountList> | ReturnType<typeof clearPeople> | ReturnType<typeof clearAggregatedReport> | ReturnType<typeof clearPreviousBills> | ReturnType<typeof clearProfitAndLoss> | ReturnType<typeof clearProfitAndLossClassesView> | ReturnType<typeof clearProfitAndLossProjectView> | ReturnType<typeof clearRecommendation> | ReturnType<typeof clearReferrals> | ReturnType<typeof clearReimbursementCard> | ReturnType<typeof clearReimbursementConfig> | ReturnType<typeof clearRemiBulkActionView> | ReturnType<typeof clearRemiDetailView> | ReturnType<typeof clearRemiList> | ReturnType<typeof clearRemiSetupApproverView> | ReturnType<typeof clearRemiSetupView> | ReturnType<typeof clearReportUIOption> | ReturnType<typeof clearRevenue> | ReturnType<typeof clearRevenueClassesView> | ReturnType<typeof clearReviewCompany> | ReturnType<typeof clearScheduleDetailView> | ReturnType<typeof clearScheduleAccruedDetailView> | ReturnType<typeof clearScheduleList> | ReturnType<typeof clearSettingsView> | ReturnType<typeof clearSetupView> | ReturnType<typeof clearPlaidAccountView> | ReturnType<typeof clearSubscriptionView> | ReturnType<typeof clearTagView> | ReturnType<typeof clearTaskDetail> | ReturnType<typeof clearTaskGroupTemplatesView> | ReturnType<typeof clearTaskGroupView> | ReturnType<typeof clearTaskList> | ReturnType<typeof clearTasksCard> | ReturnType<typeof clearTopEx> | ReturnType<typeof clearTransactionDetail> | ReturnType<typeof clearTransactionList> | ReturnType<typeof clearTransferDetail> | ReturnType<typeof clearTreasuryOverviewDetail> | ReturnType<typeof clearTreasurySetupView> | ReturnType<typeof clearTreasuryStatementList> | ReturnType<typeof clearTreasuryTaxLetterList> | ReturnType<typeof clearTreasuryTransferMoney> | ReturnType<typeof clearTrendData> | ReturnType<typeof clearTrendWithTransactions> | ReturnType<typeof clearTwoFactorAuthentication> | ReturnType<typeof clearUserFinancialAccount> | ReturnType<typeof clearUserListView> | ReturnType<typeof clearUserRoleConfigView> | ReturnType<typeof clearVendorGlobalReviewView> | ReturnType<typeof clearVendorReviewView> | ReturnType<typeof clearVendorTypeList> | ReturnType<typeof clearVendor1099TypeList> | ReturnType<typeof clearVendorView> | ReturnType<typeof clearVendorsFiling1099List> | ReturnType<typeof clearVendorsList> | ReturnType<typeof clearVendorsTabVendorView> | ReturnType<typeof clearWiseRedirectStatus> | ReturnType<typeof clearZeniAccStatementList> | ReturnType<typeof clearZeniAccountList> | ReturnType<typeof clearZeniAccountSetupView> | ReturnType<typeof clearZeniAccountsConfig> | ReturnType<typeof clearZeniAccountsPromoCard>;
|
|
208
209
|
type clearActionTypeForEntities = ReturnType<typeof clearAiCfo> | ReturnType<typeof clearAllAccountGroups> | ReturnType<typeof clearAllAccountRecon> | ReturnType<typeof clearAllAccountingSummary> | ReturnType<typeof clearAllAccounts> | ReturnType<typeof clearAllAddresses> | ReturnType<typeof clearAllApprovalRules> | ReturnType<typeof clearAllBankAccounts> | ReturnType<typeof clearAllBillTransactions> | ReturnType<typeof clearAllCardPayments> | ReturnType<typeof clearAllChargeCardRepayments> | ReturnType<typeof clearAllChargeCardTransactions> | ReturnType<typeof clearAllChargeCards> | ReturnType<typeof clearAllCompanies> | ReturnType<typeof clearAllConnectedAccounts> | ReturnType<typeof clearAllCurrencies> | ReturnType<typeof clearAllCustomerIncomeTrend> | ReturnType<typeof clearAllCustomers> | ReturnType<typeof clearAllDepositAccounts> | ReturnType<typeof clearAllEntities> | ReturnType<typeof clearAllEntityApprovalStatus> | ReturnType<typeof clearAllFiles> | ReturnType<typeof clearAllForecasts> | ReturnType<typeof clearAllGlobalMerchants> | ReturnType<typeof clearAllInsights> | ReturnType<typeof clearAllAccruedJESchedules> | ReturnType<typeof clearAllJEScheduleTransactions> | ReturnType<typeof clearAllMerchants> | ReturnType<typeof clearAllMonthEndCloseChecks> | ReturnType<typeof clearAllNotifications> | ReturnType<typeof clearAllOnboardingCustomersInfo> | ReturnType<typeof clearAllPaymentAccounts> | ReturnType<typeof clearAllPaymentInstruments> | ReturnType<typeof clearAllRecurringBills> | ReturnType<typeof clearAllReimbursements> | ReturnType<typeof clearAllSectionsAccountsView> | ReturnType<typeof clearAllSectionsClassesViewV2> | ReturnType<typeof clearAllSectionsProjectView> | ReturnType<typeof clearAllSubscriptionAddOns> | ReturnType<typeof clearAllSubscriptionCoupons> | ReturnType<typeof clearAllSubscriptionPlans> | ReturnType<typeof clearAllSubscriptionSummary> | ReturnType<typeof clearAllSubscriptions> | ReturnType<typeof clearAllTags> | ReturnType<typeof clearAllTaskGroups> | ReturnType<typeof clearAllTaskGroupTemplates> | ReturnType<typeof clearAllTaskSummary> | ReturnType<typeof clearAllTasks> | ReturnType<typeof clearAllToastNotifications> | ReturnType<typeof clearAllTransactions> | ReturnType<typeof clearAllUserRoles> | ReturnType<typeof clearAllUsers> | ReturnType<typeof clearAllVendorExpenseTrends> | ReturnType<typeof clearAllVendors> | ReturnType<typeof clearCannedResponses> | ReturnType<typeof clearClassList> | ReturnType<typeof clearContacts> | ReturnType<typeof clearCountryList> | ReturnType<typeof clearDepositAccountTransaction> | ReturnType<typeof clearSnackbar>;
|
|
209
210
|
export type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
|
|
210
211
|
export declare const clearAllEpic: (actions$: ActionsObservable<ActionType>) => import("rxjs").Observable<ActionType>;
|
|
@@ -51,6 +51,7 @@ const jeSchedulesViewReducer_1 = require("../../view/expenseAutomationView/reduc
|
|
|
51
51
|
const missingReceiptsViewReducer_1 = require("../../view/expenseAutomationView/reducers/missingReceiptsViewReducer");
|
|
52
52
|
const reconciliationViewReducer_1 = require("../../view/expenseAutomationView/reducers/reconciliationViewReducer");
|
|
53
53
|
const transactionsViewReducer_1 = require("../../view/expenseAutomationView/reducers/transactionsViewReducer");
|
|
54
|
+
const featureNotificationViewReducer_1 = require("../../view/featureNotificationView/featureNotificationViewReducer");
|
|
54
55
|
const fileViewReducer_1 = require("../../view/fileView/fileViewReducer");
|
|
55
56
|
const financeStatementReducer_1 = require("../../view/financeStatement/financeStatementReducer");
|
|
56
57
|
const forecastListReducer_1 = require("../../view/forecastList/forecastListReducer");
|
|
@@ -275,6 +276,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
|
|
|
275
276
|
(0, transactionsViewReducer_1.clearExpenseAutomationTransactionsView)(),
|
|
276
277
|
(0, expenseAutomationViewReducer_1.clearExpenseAutomationView)(),
|
|
277
278
|
(0, expressPayReducer_1.clearExpressPayView)(),
|
|
279
|
+
(0, featureNotificationViewReducer_1.clearFeatureNotificationView)(),
|
|
278
280
|
(0, fileViewReducer_1.clearFileViewList)(),
|
|
279
281
|
(0, financeStatementReducer_1.clearFinanceStatement)(),
|
|
280
282
|
(0, forecastListReducer_1.clearForecastList)(),
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { RootState } from '../../../reducer';
|
|
3
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
+
import { deleteConnection, deleteConnectionFailure, deleteConnectionSuccess } from '../tenantReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof deleteConnection> | ReturnType<typeof deleteConnectionSuccess> | ReturnType<typeof deleteConnectionFailure>;
|
|
6
|
+
export declare const deleteConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
|
+
payload: {
|
|
8
|
+
tenantId: string;
|
|
9
|
+
connectionId: string;
|
|
10
|
+
connectionType: "analytics" | "crm";
|
|
11
|
+
};
|
|
12
|
+
type: "tenant/deleteConnectionSuccess";
|
|
13
|
+
} | {
|
|
14
|
+
payload: {
|
|
15
|
+
tenantId: string;
|
|
16
|
+
status: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
17
|
+
};
|
|
18
|
+
type: "tenant/deleteConnectionFailure";
|
|
19
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteConnectionEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
+
const tenantReducer_1 = require("../tenantReducer");
|
|
8
|
+
const deleteConnectionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(tenantReducer_1.deleteConnection.match), (0, operators_1.switchMap)((action) => zeniAPI
|
|
9
|
+
.deleteAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/connections/${action.payload.connectionId}`, undefined, Object.assign({ 'zeni-tenant-id': action.payload.tenantId }))
|
|
10
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
11
|
+
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
12
|
+
return (0, rxjs_1.from)([
|
|
13
|
+
(0, tenantReducer_1.deleteConnectionSuccess)(action.payload.tenantId, action.payload.connectionId, action.payload.connectionType),
|
|
14
|
+
]);
|
|
15
|
+
}
|
|
16
|
+
const status = response.status ??
|
|
17
|
+
(0, responsePayload_1.createZeniAPIStatus)('Failed to delete connection. Please try again.');
|
|
18
|
+
return (0, rxjs_1.from)([
|
|
19
|
+
(0, tenantReducer_1.deleteConnectionFailure)(action.payload.tenantId, status),
|
|
20
|
+
]);
|
|
21
|
+
}), (0, operators_1.catchError)((error) => {
|
|
22
|
+
const message = error instanceof Error
|
|
23
|
+
? error.message
|
|
24
|
+
: 'Unexpected error deleting connection.';
|
|
25
|
+
return (0, rxjs_1.from)([
|
|
26
|
+
(0, tenantReducer_1.deleteConnectionFailure)(action.payload.tenantId, (0, responsePayload_1.createZeniAPIStatus)(message)),
|
|
27
|
+
]);
|
|
28
|
+
}))));
|
|
29
|
+
exports.deleteConnectionEpic = deleteConnectionEpic;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { RootState } from '../../../reducer';
|
|
3
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
+
import { saveAPIKeyConnection, saveAPIKeyConnectionFailure, saveAPIKeyConnectionSuccess } from '../tenantReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof saveAPIKeyConnection> | ReturnType<typeof saveAPIKeyConnectionSuccess> | ReturnType<typeof saveAPIKeyConnectionFailure>;
|
|
6
|
+
export declare const saveAPIKeyConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
|
+
payload: {
|
|
8
|
+
tenantId: string;
|
|
9
|
+
connectionType: "analytics" | "crm";
|
|
10
|
+
connectionPayload: import("../tenantPayload").ConnectionDataPayload;
|
|
11
|
+
};
|
|
12
|
+
type: "tenant/saveAPIKeyConnectionSuccess";
|
|
13
|
+
} | {
|
|
14
|
+
payload: {
|
|
15
|
+
tenantId: string;
|
|
16
|
+
status: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
17
|
+
};
|
|
18
|
+
type: "tenant/saveAPIKeyConnectionFailure";
|
|
19
|
+
}>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.saveAPIKeyConnectionEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
+
const tenantReducer_1 = require("../tenantReducer");
|
|
8
|
+
const saveAPIKeyConnectionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(tenantReducer_1.saveAPIKeyConnection.match), (0, operators_1.switchMap)((action) => zeniAPI
|
|
9
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/connections/${action.payload.connectionId}`, {
|
|
10
|
+
api_key: action.payload.credentials.api_key,
|
|
11
|
+
connection_name: action.payload.connectionName,
|
|
12
|
+
connection_type: action.payload.connectionType,
|
|
13
|
+
site: action.payload.credentials.site,
|
|
14
|
+
}, Object.assign({ 'zeni-tenant-id': action.payload.tenantId }))
|
|
15
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
16
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
17
|
+
return (0, rxjs_1.from)([
|
|
18
|
+
(0, tenantReducer_1.saveAPIKeyConnectionSuccess)(action.payload.tenantId, action.payload.connectionType, response.data // eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
19
|
+
),
|
|
20
|
+
]);
|
|
21
|
+
}
|
|
22
|
+
const status = response.status ??
|
|
23
|
+
(0, responsePayload_1.createZeniAPIStatus)('Failed to save connection. Please try again.');
|
|
24
|
+
return (0, rxjs_1.from)([(0, tenantReducer_1.saveAPIKeyConnectionFailure)(action.payload.tenantId, status)]);
|
|
25
|
+
}), (0, operators_1.catchError)((error) => {
|
|
26
|
+
const message = error instanceof Error ? error.message : 'Unexpected error saving connection.';
|
|
27
|
+
return (0, rxjs_1.from)([
|
|
28
|
+
(0, tenantReducer_1.saveAPIKeyConnectionFailure)(action.payload.tenantId, (0, responsePayload_1.createZeniAPIStatus)(message)),
|
|
29
|
+
]);
|
|
30
|
+
}))));
|
|
31
|
+
exports.saveAPIKeyConnectionEpic = saveAPIKeyConnectionEpic;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
+
import { RootState } from '../../../reducer';
|
|
3
|
+
import { ZeniAPI } from '../../../zeniAPI';
|
|
4
|
+
import { saveOAuthConnection, saveOAuthConnectionFailure, saveOAuthConnectionSuccess } from '../tenantReducer';
|
|
5
|
+
export type ActionType = ReturnType<typeof saveOAuthConnection> | ReturnType<typeof saveOAuthConnectionSuccess> | ReturnType<typeof saveOAuthConnectionFailure>;
|
|
6
|
+
export declare const saveOAuthConnectionEpic: (actions$: ActionsObservable<ActionType>, _: StateObservable<RootState>, zeniAPI: ZeniAPI) => import("rxjs").Observable<{
|
|
7
|
+
payload: {
|
|
8
|
+
tenantId: string;
|
|
9
|
+
connectionType: "analytics" | "crm";
|
|
10
|
+
connectionPayload: import("../tenantPayload").ConnectionDataPayload;
|
|
11
|
+
};
|
|
12
|
+
type: "tenant/saveOAuthConnectionSuccess";
|
|
13
|
+
} | {
|
|
14
|
+
payload: {
|
|
15
|
+
tenantId: string;
|
|
16
|
+
status: import("../../../responsePayload").ZeniAPIStatus<Record<string, unknown>>;
|
|
17
|
+
};
|
|
18
|
+
type: "tenant/saveOAuthConnectionFailure";
|
|
19
|
+
}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.saveOAuthConnectionEpic = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
5
|
+
const operators_1 = require("rxjs/operators");
|
|
6
|
+
const responsePayload_1 = require("../../../responsePayload");
|
|
7
|
+
const tenantReducer_1 = require("../tenantReducer");
|
|
8
|
+
const saveOAuthConnectionEpic = (actions$, _, zeniAPI) => actions$.pipe((0, operators_1.filter)(tenantReducer_1.saveOAuthConnection.match), (0, operators_1.switchMap)((action) => zeniAPI
|
|
9
|
+
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/connections/${action.payload.connectionId}`, {
|
|
10
|
+
authorization_code: action.payload.credentials.authorization_code,
|
|
11
|
+
client_id: action.payload.credentials.client_id,
|
|
12
|
+
client_secret: action.payload.credentials.client_secret,
|
|
13
|
+
connection_name: action.payload.connectionName,
|
|
14
|
+
connection_type: action.payload.connectionType,
|
|
15
|
+
redirect_uri: action.payload.credentials.redirect_uri,
|
|
16
|
+
}, Object.assign({ 'zeni-tenant-id': action.payload.tenantId }))
|
|
17
|
+
.pipe((0, operators_1.mergeMap)((response) => {
|
|
18
|
+
if ((0, responsePayload_1.isSuccessResponse)(response)) {
|
|
19
|
+
return (0, rxjs_1.from)([
|
|
20
|
+
(0, tenantReducer_1.saveOAuthConnectionSuccess)(action.payload.tenantId, action.payload.connectionType, response.data // eslint-disable-line @typescript-eslint/no-non-null-assertion
|
|
21
|
+
),
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
24
|
+
const status = response.status ??
|
|
25
|
+
(0, responsePayload_1.createZeniAPIStatus)('Failed to save connection. Please try again.');
|
|
26
|
+
return (0, rxjs_1.from)([(0, tenantReducer_1.saveOAuthConnectionFailure)(action.payload.tenantId, status)]);
|
|
27
|
+
}), (0, operators_1.catchError)((error) => {
|
|
28
|
+
const message = error instanceof Error ? error.message : 'Unexpected error saving connection.';
|
|
29
|
+
return (0, rxjs_1.from)([
|
|
30
|
+
(0, tenantReducer_1.saveOAuthConnectionFailure)(action.payload.tenantId, (0, responsePayload_1.createZeniAPIStatus)(message)),
|
|
31
|
+
]);
|
|
32
|
+
}))));
|
|
33
|
+
exports.saveOAuthConnectionEpic = saveOAuthConnectionEpic;
|
|
@@ -139,7 +139,9 @@ type RoleResourcesResponse = ZeniAPIResponse<RoleResourcesData>;
|
|
|
139
139
|
interface ConnectionsPayload {
|
|
140
140
|
connections: {
|
|
141
141
|
accounting: ConnectionDataPayload[];
|
|
142
|
+
analytics: ConnectionDataPayload[];
|
|
142
143
|
payments: ConnectionDataPayload[];
|
|
144
|
+
crm?: ConnectionDataPayload[];
|
|
143
145
|
};
|
|
144
146
|
}
|
|
145
147
|
interface ConnectionWithMetaPayload {
|
|
@@ -13,6 +13,10 @@ export interface DoSignInPayload {
|
|
|
13
13
|
redirectUri: ZeniUrl;
|
|
14
14
|
sourceUri: ZeniUrl;
|
|
15
15
|
}
|
|
16
|
+
export declare const toExternalIntegrationType: (v: string) => "analytics" | "crm";
|
|
17
|
+
export type ExternalIntegrationType = ReturnType<typeof toExternalIntegrationType>;
|
|
18
|
+
export declare const toExternalSupportedTool: (v: string) => "chargebee" | "hubspot";
|
|
19
|
+
export type ExternalSupportedTool = ReturnType<typeof toExternalSupportedTool>;
|
|
16
20
|
export declare const initialState: TenantState;
|
|
17
21
|
export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenants: TenantPayload[], userTenantPayload?: TenantUserPayload | undefined, tenantUpdated?: any], {
|
|
18
22
|
tenants: TenantPayload[];
|
|
@@ -80,7 +84,60 @@ export declare const updateTenants: import("@reduxjs/toolkit").ActionCreatorWith
|
|
|
80
84
|
}, "tenant/fetchExternalConnectionsFailure", never, never>, fetchExternalConnectionsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, externalConnections: ConnectionsPayload], {
|
|
81
85
|
tenantId: string;
|
|
82
86
|
externalConnections: ConnectionsPayload;
|
|
83
|
-
}, "tenant/fetchExternalConnectionsSuccess", never, never>,
|
|
87
|
+
}, "tenant/fetchExternalConnectionsSuccess", never, never>, saveAPIKeyConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "analytics" | "crm", connectionName: "chargebee" | "hubspot", credentials: {
|
|
88
|
+
api_key: string;
|
|
89
|
+
site: string;
|
|
90
|
+
}], {
|
|
91
|
+
tenantId: string;
|
|
92
|
+
connectionId: string;
|
|
93
|
+
connectionType: "analytics" | "crm";
|
|
94
|
+
connectionName: "chargebee" | "hubspot";
|
|
95
|
+
credentials: {
|
|
96
|
+
api_key: string;
|
|
97
|
+
site: string;
|
|
98
|
+
};
|
|
99
|
+
}, "tenant/saveAPIKeyConnection", never, never>, saveAPIKeyConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "analytics" | "crm", connectionPayload: ConnectionDataPayload], {
|
|
100
|
+
tenantId: string;
|
|
101
|
+
connectionType: "analytics" | "crm";
|
|
102
|
+
connectionPayload: ConnectionDataPayload;
|
|
103
|
+
}, "tenant/saveAPIKeyConnectionSuccess", never, never>, saveAPIKeyConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
104
|
+
tenantId: string;
|
|
105
|
+
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
106
|
+
}, "tenant/saveAPIKeyConnectionFailure", never, never>, saveOAuthConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "analytics" | "crm", connectionName: "chargebee" | "hubspot", credentials: {
|
|
107
|
+
authorization_code: string;
|
|
108
|
+
client_id: string;
|
|
109
|
+
client_secret: string;
|
|
110
|
+
redirect_uri: string;
|
|
111
|
+
}], {
|
|
112
|
+
tenantId: string;
|
|
113
|
+
connectionId: string;
|
|
114
|
+
connectionType: "analytics" | "crm";
|
|
115
|
+
connectionName: "chargebee" | "hubspot";
|
|
116
|
+
credentials: {
|
|
117
|
+
authorization_code: string;
|
|
118
|
+
client_id: string;
|
|
119
|
+
client_secret: string;
|
|
120
|
+
redirect_uri: string;
|
|
121
|
+
};
|
|
122
|
+
}, "tenant/saveOAuthConnection", never, never>, saveOAuthConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionType: "analytics" | "crm", connectionPayload: ConnectionDataPayload], {
|
|
123
|
+
tenantId: string;
|
|
124
|
+
connectionType: "analytics" | "crm";
|
|
125
|
+
connectionPayload: ConnectionDataPayload;
|
|
126
|
+
}, "tenant/saveOAuthConnectionSuccess", never, never>, saveOAuthConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
127
|
+
tenantId: string;
|
|
128
|
+
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
129
|
+
}, "tenant/saveOAuthConnectionFailure", never, never>, deleteConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "analytics" | "crm"], {
|
|
130
|
+
tenantId: string;
|
|
131
|
+
connectionId: string;
|
|
132
|
+
connectionType: "analytics" | "crm";
|
|
133
|
+
}, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "analytics" | "crm"], {
|
|
134
|
+
tenantId: string;
|
|
135
|
+
connectionId: string;
|
|
136
|
+
connectionType: "analytics" | "crm";
|
|
137
|
+
}, "tenant/deleteConnectionSuccess", never, never>, deleteConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
|
|
138
|
+
tenantId: string;
|
|
139
|
+
status: ZeniAPIStatus<Record<string, unknown>>;
|
|
140
|
+
}, "tenant/deleteConnectionFailure", never, never>, clearAll: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[keepTenantCompanyState?: boolean | undefined], {
|
|
84
141
|
keepTenantCompanyState: boolean;
|
|
85
142
|
}, "tenant/clearAll", never, never>, fetchSubscriptionSummaryForTenant: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string], {
|
|
86
143
|
tenantId: string;
|
|
@@ -127,6 +184,8 @@ export declare const toRoleResource: (payload: RoleResourcePayload) => RoleResou
|
|
|
127
184
|
*/
|
|
128
185
|
export declare function mapConnectionsPayloadToState(connectionsPayload: ConnectionsPayload): {
|
|
129
186
|
accounting: Connection[];
|
|
187
|
+
analytics: Connection[];
|
|
188
|
+
crm: Connection[];
|
|
130
189
|
payments: Connection[];
|
|
131
190
|
};
|
|
132
191
|
export declare const toConnection: (payload: ConnectionDataPayload) => Connection;
|
|
@@ -4,19 +4,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
exports.toConnection = exports.toRoleResource = exports.resendVerifyDeviceOTPFailure = void 0;
|
|
7
|
+
exports.updateTenantReimbursementInfo = exports.removeOnboardingTenant = exports.updateOnboardingTenants = exports.updateSubscriptionSummaryForTenantFailure = exports.updateSubscriptionSummaryForTenantSuccess = exports.fetchSubscriptionSummaryForTenant = exports.clearAll = exports.deleteConnectionFailure = exports.deleteConnectionSuccess = exports.deleteConnection = exports.saveOAuthConnectionFailure = exports.saveOAuthConnectionSuccess = exports.saveOAuthConnection = exports.saveAPIKeyConnectionFailure = exports.saveAPIKeyConnectionSuccess = exports.saveAPIKeyConnection = exports.fetchExternalConnectionsSuccess = exports.fetchExternalConnectionsFailure = exports.saveExternalConnectionFailure = exports.saveExternalConnectionSuccess = exports.saveExternalConnection = exports.fetchExternalConnections = exports.updateLoggedInUser = exports.sessionHeartbeatFailure = exports.sessionHeartbeatSuccess = exports.sendSessionHeartbeat = exports.signOutSuccess = exports.doSignOut = exports.updateSignInState = exports.sendEmailMagicLinkToUserFailure = exports.sendEmailMagicLinkToUserSuccess = exports.sendEmailMagicLinkToUser = exports.magicLinkSignInFailure = exports.magicLinkSignInSuccess = exports.doMagicLinkSignIn = exports.doSignIn = exports.updateExcludedResourcesFailure = exports.updateExcludedResourcesSuccess = exports.fetchExcludedResources = exports.updateCurrentTenant = exports.updateTenantFailure = exports.updateTenantSuccess = exports.fetchActiveTenant = exports.updateTenantsFailure = exports.updateTenantsSuccess = exports.fetchAllTenants = exports.updateTenants = exports.initialState = exports.toExternalSupportedTool = exports.toExternalIntegrationType = void 0;
|
|
8
|
+
exports.toConnection = exports.toRoleResource = exports.resendVerifyDeviceOTPFailure = exports.resendVerifyDeviceOTPSuccess = exports.resendVerifyDeviceOTP = exports.verifyDeviceWithTwoFAFailure = exports.verifyDeviceWithTwoFASuccess = exports.verifyDeviceWithTwoFA = exports.updateTenantMasterTOSInfo = exports.updateTenantAccountingClassesEnabled = exports.trigger2FA = exports.resetSignInState = exports.updateTreasuryVideoViewedForLoggedInUser = exports.updateReferViewedForLoggedInUser = void 0;
|
|
9
9
|
exports.mapConnectionsPayloadToState = mapConnectionsPayloadToState;
|
|
10
10
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
11
11
|
const js_base64_1 = require("js-base64");
|
|
12
12
|
const assignWith_1 = __importDefault(require("lodash/assignWith"));
|
|
13
13
|
const urlPayload_1 = require("../../commonPayloadTypes/urlPayload");
|
|
14
|
+
const stringToUnion_1 = require("../../commonStateTypes/stringToUnion");
|
|
14
15
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
15
16
|
const netBurnOrIncomeStoryCardSelectorTypes_1 = require("../../view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardSelectorTypes");
|
|
16
17
|
const netBurnOrIncomeStoryCardState_1 = require("../../view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardState");
|
|
17
18
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
18
19
|
const subscriptionSummaryReducer_1 = require("../subscription/subscriptionSummary/subscriptionSummaryReducer");
|
|
19
20
|
const userRolePayload_1 = require("../userRole/userRolePayload");
|
|
21
|
+
const EXTERNAL_INTEGRATION_TYPES = ['analytics', 'crm'];
|
|
22
|
+
const toExternalIntegrationType = (v) => (0, stringToUnion_1.stringToUnion)(v, EXTERNAL_INTEGRATION_TYPES);
|
|
23
|
+
exports.toExternalIntegrationType = toExternalIntegrationType;
|
|
24
|
+
const EXTERNAL_SUPPORTED_TOOLS = ['chargebee', 'hubspot'];
|
|
25
|
+
const toExternalSupportedTool = (v) => (0, stringToUnion_1.stringToUnion)(v, EXTERNAL_SUPPORTED_TOOLS);
|
|
26
|
+
exports.toExternalSupportedTool = toExternalSupportedTool;
|
|
20
27
|
exports.initialState = {
|
|
21
28
|
fetchState: 'Not-Started',
|
|
22
29
|
error: undefined,
|
|
@@ -340,8 +347,13 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
340
347
|
draft.externalConnectionsByTenant[action.payload.tenantId] = {
|
|
341
348
|
fetchState: 'In-Progress',
|
|
342
349
|
accounting: [],
|
|
350
|
+
analytics: [],
|
|
351
|
+
crm: [],
|
|
343
352
|
payments: [],
|
|
344
353
|
saveConnectionState: 'Not-Started',
|
|
354
|
+
saveAPIKeyConnectionState: 'Not-Started',
|
|
355
|
+
saveOAuthConnectionState: 'Not-Started',
|
|
356
|
+
deleteConnectionState: 'Not-Started',
|
|
345
357
|
error: undefined,
|
|
346
358
|
};
|
|
347
359
|
},
|
|
@@ -351,12 +363,17 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
351
363
|
return { payload: { tenantId, externalConnections } };
|
|
352
364
|
},
|
|
353
365
|
reducer(draft, action) {
|
|
354
|
-
const { accounting, payments } = mapConnectionsPayloadToState(action.payload.externalConnections);
|
|
366
|
+
const { accounting, analytics, crm, payments } = mapConnectionsPayloadToState(action.payload.externalConnections);
|
|
355
367
|
draft.externalConnectionsByTenant[action.payload.tenantId] = {
|
|
356
368
|
fetchState: 'Completed',
|
|
357
369
|
accounting,
|
|
370
|
+
analytics,
|
|
371
|
+
crm,
|
|
358
372
|
payments,
|
|
359
373
|
saveConnectionState: 'Completed',
|
|
374
|
+
saveAPIKeyConnectionState: 'Not-Started',
|
|
375
|
+
saveOAuthConnectionState: 'Not-Started',
|
|
376
|
+
deleteConnectionState: 'Not-Started',
|
|
360
377
|
error: undefined,
|
|
361
378
|
};
|
|
362
379
|
},
|
|
@@ -370,8 +387,13 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
370
387
|
draft.externalConnectionsByTenant[tenantId] = {
|
|
371
388
|
fetchState: 'Error',
|
|
372
389
|
accounting: [],
|
|
390
|
+
analytics: [],
|
|
391
|
+
crm: [],
|
|
373
392
|
payments: [],
|
|
374
393
|
saveConnectionState: 'Error',
|
|
394
|
+
saveAPIKeyConnectionState: 'Not-Started',
|
|
395
|
+
saveOAuthConnectionState: 'Not-Started',
|
|
396
|
+
deleteConnectionState: 'Not-Started',
|
|
375
397
|
error: status,
|
|
376
398
|
};
|
|
377
399
|
},
|
|
@@ -417,6 +439,121 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
417
439
|
});
|
|
418
440
|
},
|
|
419
441
|
},
|
|
442
|
+
saveAPIKeyConnection: {
|
|
443
|
+
prepare(tenantId, connectionId, connectionType, connectionName, credentials) {
|
|
444
|
+
return { payload: { tenantId, connectionId, connectionType, connectionName, credentials } };
|
|
445
|
+
},
|
|
446
|
+
reducer(draft, action) {
|
|
447
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
448
|
+
if (existing != null) {
|
|
449
|
+
existing.saveAPIKeyConnectionState = 'In-Progress';
|
|
450
|
+
existing.saveAPIKeyConnectionError = undefined;
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
saveAPIKeyConnectionSuccess: {
|
|
455
|
+
prepare(tenantId, connectionType, connectionPayload) {
|
|
456
|
+
return { payload: { tenantId, connectionType, connectionPayload } };
|
|
457
|
+
},
|
|
458
|
+
reducer(draft, action) {
|
|
459
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
460
|
+
if (existing != null) {
|
|
461
|
+
existing.saveAPIKeyConnectionState = 'Completed';
|
|
462
|
+
existing[action.payload.connectionType] = [(0, exports.toConnection)(action.payload.connectionPayload)];
|
|
463
|
+
existing.saveAPIKeyConnectionError = undefined;
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
saveAPIKeyConnectionFailure: {
|
|
468
|
+
prepare(tenantId, status) {
|
|
469
|
+
return { payload: { tenantId, status } };
|
|
470
|
+
},
|
|
471
|
+
reducer(draft, action) {
|
|
472
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
473
|
+
if (existing != null) {
|
|
474
|
+
existing.saveAPIKeyConnectionState = 'Error';
|
|
475
|
+
existing.saveAPIKeyConnectionError = action.payload.status;
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
saveOAuthConnection: {
|
|
480
|
+
prepare(tenantId, connectionId, connectionType, connectionName, credentials) {
|
|
481
|
+
return { payload: { tenantId, connectionId, connectionType, connectionName, credentials } };
|
|
482
|
+
},
|
|
483
|
+
reducer(draft, action) {
|
|
484
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
485
|
+
if (existing != null) {
|
|
486
|
+
existing.saveOAuthConnectionState = 'In-Progress';
|
|
487
|
+
existing.saveOAuthConnectionError = undefined;
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
},
|
|
491
|
+
saveOAuthConnectionSuccess: {
|
|
492
|
+
prepare(tenantId, connectionType, connectionPayload) {
|
|
493
|
+
return { payload: { tenantId, connectionType, connectionPayload } };
|
|
494
|
+
},
|
|
495
|
+
reducer(draft, action) {
|
|
496
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
497
|
+
if (existing != null) {
|
|
498
|
+
existing.saveOAuthConnectionState = 'Completed';
|
|
499
|
+
existing[action.payload.connectionType] = [(0, exports.toConnection)(action.payload.connectionPayload)];
|
|
500
|
+
existing.saveOAuthConnectionError = undefined;
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
},
|
|
504
|
+
saveOAuthConnectionFailure: {
|
|
505
|
+
prepare(tenantId, status) {
|
|
506
|
+
return { payload: { tenantId, status } };
|
|
507
|
+
},
|
|
508
|
+
reducer(draft, action) {
|
|
509
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
510
|
+
if (existing != null) {
|
|
511
|
+
existing.saveOAuthConnectionState = 'Error';
|
|
512
|
+
existing.saveOAuthConnectionError = action.payload.status;
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
deleteConnection: {
|
|
517
|
+
prepare(tenantId, connectionId, connectionType) {
|
|
518
|
+
return { payload: { tenantId, connectionId, connectionType } };
|
|
519
|
+
},
|
|
520
|
+
reducer(draft, action) {
|
|
521
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
522
|
+
if (existing != null) {
|
|
523
|
+
existing.deleteConnectionState = 'In-Progress';
|
|
524
|
+
existing.deleteConnectionError = undefined;
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
},
|
|
528
|
+
deleteConnectionSuccess: {
|
|
529
|
+
prepare(tenantId, connectionId, connectionType) {
|
|
530
|
+
return { payload: { tenantId, connectionId, connectionType } };
|
|
531
|
+
},
|
|
532
|
+
reducer(draft, action) {
|
|
533
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
534
|
+
if (existing != null) {
|
|
535
|
+
existing.deleteConnectionState = 'Completed';
|
|
536
|
+
existing.deleteConnectionError = undefined;
|
|
537
|
+
const arr = existing[action.payload.connectionType];
|
|
538
|
+
const idx = arr.findIndex((c) => c.connectionId === action.payload.connectionId);
|
|
539
|
+
if (idx !== -1) {
|
|
540
|
+
arr[idx] = { ...arr[idx], isValid: false };
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
deleteConnectionFailure: {
|
|
546
|
+
prepare(tenantId, status) {
|
|
547
|
+
return { payload: { tenantId, status } };
|
|
548
|
+
},
|
|
549
|
+
reducer(draft, action) {
|
|
550
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
551
|
+
if (existing != null) {
|
|
552
|
+
existing.deleteConnectionState = 'Error';
|
|
553
|
+
existing.deleteConnectionError = action.payload.status;
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
},
|
|
420
557
|
doSignOut(draft) {
|
|
421
558
|
draft.fetchState = 'Not-Started';
|
|
422
559
|
draft.signInState = 'Not-Started';
|
|
@@ -564,7 +701,7 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
564
701
|
},
|
|
565
702
|
},
|
|
566
703
|
});
|
|
567
|
-
_a = tenant.actions, exports.updateTenants = _a.updateTenants, exports.fetchAllTenants = _a.fetchAllTenants, exports.updateTenantsSuccess = _a.updateTenantsSuccess, exports.updateTenantsFailure = _a.updateTenantsFailure, exports.fetchActiveTenant = _a.fetchActiveTenant, exports.updateTenantSuccess = _a.updateTenantSuccess, exports.updateTenantFailure = _a.updateTenantFailure, exports.updateCurrentTenant = _a.updateCurrentTenant, exports.fetchExcludedResources = _a.fetchExcludedResources, exports.updateExcludedResourcesSuccess = _a.updateExcludedResourcesSuccess, exports.updateExcludedResourcesFailure = _a.updateExcludedResourcesFailure, exports.doSignIn = _a.doSignIn, exports.doMagicLinkSignIn = _a.doMagicLinkSignIn, exports.magicLinkSignInSuccess = _a.magicLinkSignInSuccess, exports.magicLinkSignInFailure = _a.magicLinkSignInFailure, exports.sendEmailMagicLinkToUser = _a.sendEmailMagicLinkToUser, exports.sendEmailMagicLinkToUserSuccess = _a.sendEmailMagicLinkToUserSuccess, exports.sendEmailMagicLinkToUserFailure = _a.sendEmailMagicLinkToUserFailure, exports.updateSignInState = _a.updateSignInState, exports.doSignOut = _a.doSignOut, exports.signOutSuccess = _a.signOutSuccess, exports.sendSessionHeartbeat = _a.sendSessionHeartbeat, exports.sessionHeartbeatSuccess = _a.sessionHeartbeatSuccess, exports.sessionHeartbeatFailure = _a.sessionHeartbeatFailure, exports.updateLoggedInUser = _a.updateLoggedInUser, exports.fetchExternalConnections = _a.fetchExternalConnections, exports.saveExternalConnection = _a.saveExternalConnection, exports.saveExternalConnectionSuccess = _a.saveExternalConnectionSuccess, exports.saveExternalConnectionFailure = _a.saveExternalConnectionFailure, exports.fetchExternalConnectionsFailure = _a.fetchExternalConnectionsFailure, exports.fetchExternalConnectionsSuccess = _a.fetchExternalConnectionsSuccess, exports.clearAll = _a.clearAll, exports.fetchSubscriptionSummaryForTenant = _a.fetchSubscriptionSummaryForTenant, exports.updateSubscriptionSummaryForTenantSuccess = _a.updateSubscriptionSummaryForTenantSuccess, exports.updateSubscriptionSummaryForTenantFailure = _a.updateSubscriptionSummaryForTenantFailure, exports.updateOnboardingTenants = _a.updateOnboardingTenants, exports.removeOnboardingTenant = _a.removeOnboardingTenant, exports.updateTenantReimbursementInfo = _a.updateTenantReimbursementInfo, exports.updateReferViewedForLoggedInUser = _a.updateReferViewedForLoggedInUser, exports.updateTreasuryVideoViewedForLoggedInUser = _a.updateTreasuryVideoViewedForLoggedInUser, exports.resetSignInState = _a.resetSignInState, exports.trigger2FA = _a.trigger2FA, exports.updateTenantAccountingClassesEnabled = _a.updateTenantAccountingClassesEnabled, exports.updateTenantMasterTOSInfo = _a.updateTenantMasterTOSInfo, exports.verifyDeviceWithTwoFA = _a.verifyDeviceWithTwoFA, exports.verifyDeviceWithTwoFASuccess = _a.verifyDeviceWithTwoFASuccess, exports.verifyDeviceWithTwoFAFailure = _a.verifyDeviceWithTwoFAFailure, exports.resendVerifyDeviceOTP = _a.resendVerifyDeviceOTP, exports.resendVerifyDeviceOTPSuccess = _a.resendVerifyDeviceOTPSuccess, exports.resendVerifyDeviceOTPFailure = _a.resendVerifyDeviceOTPFailure;
|
|
704
|
+
_a = tenant.actions, exports.updateTenants = _a.updateTenants, exports.fetchAllTenants = _a.fetchAllTenants, exports.updateTenantsSuccess = _a.updateTenantsSuccess, exports.updateTenantsFailure = _a.updateTenantsFailure, exports.fetchActiveTenant = _a.fetchActiveTenant, exports.updateTenantSuccess = _a.updateTenantSuccess, exports.updateTenantFailure = _a.updateTenantFailure, exports.updateCurrentTenant = _a.updateCurrentTenant, exports.fetchExcludedResources = _a.fetchExcludedResources, exports.updateExcludedResourcesSuccess = _a.updateExcludedResourcesSuccess, exports.updateExcludedResourcesFailure = _a.updateExcludedResourcesFailure, exports.doSignIn = _a.doSignIn, exports.doMagicLinkSignIn = _a.doMagicLinkSignIn, exports.magicLinkSignInSuccess = _a.magicLinkSignInSuccess, exports.magicLinkSignInFailure = _a.magicLinkSignInFailure, exports.sendEmailMagicLinkToUser = _a.sendEmailMagicLinkToUser, exports.sendEmailMagicLinkToUserSuccess = _a.sendEmailMagicLinkToUserSuccess, exports.sendEmailMagicLinkToUserFailure = _a.sendEmailMagicLinkToUserFailure, exports.updateSignInState = _a.updateSignInState, exports.doSignOut = _a.doSignOut, exports.signOutSuccess = _a.signOutSuccess, exports.sendSessionHeartbeat = _a.sendSessionHeartbeat, exports.sessionHeartbeatSuccess = _a.sessionHeartbeatSuccess, exports.sessionHeartbeatFailure = _a.sessionHeartbeatFailure, exports.updateLoggedInUser = _a.updateLoggedInUser, exports.fetchExternalConnections = _a.fetchExternalConnections, exports.saveExternalConnection = _a.saveExternalConnection, exports.saveExternalConnectionSuccess = _a.saveExternalConnectionSuccess, exports.saveExternalConnectionFailure = _a.saveExternalConnectionFailure, exports.fetchExternalConnectionsFailure = _a.fetchExternalConnectionsFailure, exports.fetchExternalConnectionsSuccess = _a.fetchExternalConnectionsSuccess, exports.saveAPIKeyConnection = _a.saveAPIKeyConnection, exports.saveAPIKeyConnectionSuccess = _a.saveAPIKeyConnectionSuccess, exports.saveAPIKeyConnectionFailure = _a.saveAPIKeyConnectionFailure, exports.saveOAuthConnection = _a.saveOAuthConnection, exports.saveOAuthConnectionSuccess = _a.saveOAuthConnectionSuccess, exports.saveOAuthConnectionFailure = _a.saveOAuthConnectionFailure, exports.deleteConnection = _a.deleteConnection, exports.deleteConnectionSuccess = _a.deleteConnectionSuccess, exports.deleteConnectionFailure = _a.deleteConnectionFailure, exports.clearAll = _a.clearAll, exports.fetchSubscriptionSummaryForTenant = _a.fetchSubscriptionSummaryForTenant, exports.updateSubscriptionSummaryForTenantSuccess = _a.updateSubscriptionSummaryForTenantSuccess, exports.updateSubscriptionSummaryForTenantFailure = _a.updateSubscriptionSummaryForTenantFailure, exports.updateOnboardingTenants = _a.updateOnboardingTenants, exports.removeOnboardingTenant = _a.removeOnboardingTenant, exports.updateTenantReimbursementInfo = _a.updateTenantReimbursementInfo, exports.updateReferViewedForLoggedInUser = _a.updateReferViewedForLoggedInUser, exports.updateTreasuryVideoViewedForLoggedInUser = _a.updateTreasuryVideoViewedForLoggedInUser, exports.resetSignInState = _a.resetSignInState, exports.trigger2FA = _a.trigger2FA, exports.updateTenantAccountingClassesEnabled = _a.updateTenantAccountingClassesEnabled, exports.updateTenantMasterTOSInfo = _a.updateTenantMasterTOSInfo, exports.verifyDeviceWithTwoFA = _a.verifyDeviceWithTwoFA, exports.verifyDeviceWithTwoFASuccess = _a.verifyDeviceWithTwoFASuccess, exports.verifyDeviceWithTwoFAFailure = _a.verifyDeviceWithTwoFAFailure, exports.resendVerifyDeviceOTP = _a.resendVerifyDeviceOTP, exports.resendVerifyDeviceOTPSuccess = _a.resendVerifyDeviceOTPSuccess, exports.resendVerifyDeviceOTPFailure = _a.resendVerifyDeviceOTPFailure;
|
|
568
705
|
exports.default = tenant.reducer;
|
|
569
706
|
/**
|
|
570
707
|
* Converts tenants payload to Tenant and User State
|
|
@@ -692,6 +829,8 @@ function mapConnectionsPayloadToState(connectionsPayload) {
|
|
|
692
829
|
const { connections } = connectionsPayload;
|
|
693
830
|
return {
|
|
694
831
|
accounting: connections.accounting.map((payload) => (0, exports.toConnection)(payload)),
|
|
832
|
+
analytics: (connections.analytics ?? []).map((payload) => (0, exports.toConnection)(payload)),
|
|
833
|
+
crm: (connections.crm ?? []).map((payload) => (0, exports.toConnection)(payload)),
|
|
695
834
|
payments: connections.payments.map((payload) => (0, exports.toConnection)(payload)),
|
|
696
835
|
};
|
|
697
836
|
}
|
|
@@ -12,10 +12,18 @@ import { UserRoleType } from '../userRole/userRoleType';
|
|
|
12
12
|
import { AuthProvider } from './tenantReducer';
|
|
13
13
|
export interface TenantExternalConnections {
|
|
14
14
|
accounting: Connection[];
|
|
15
|
+
analytics: Connection[];
|
|
16
|
+
crm: Connection[];
|
|
17
|
+
deleteConnectionState: FetchState;
|
|
15
18
|
fetchState: FetchState;
|
|
16
19
|
payments: Connection[];
|
|
20
|
+
saveAPIKeyConnectionState: FetchState;
|
|
17
21
|
saveConnectionState: FetchState;
|
|
22
|
+
saveOAuthConnectionState: FetchState;
|
|
23
|
+
deleteConnectionError?: ZeniAPIStatus;
|
|
18
24
|
error?: ZeniAPIStatus;
|
|
25
|
+
saveAPIKeyConnectionError?: ZeniAPIStatus;
|
|
26
|
+
saveOAuthConnectionError?: ZeniAPIStatus;
|
|
19
27
|
}
|
|
20
28
|
export interface TenantState extends FetchedState {
|
|
21
29
|
accountLocked: boolean;
|