@zeniai/client-epic-state 5.0.36-betaRD13 → 5.0.36-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/recommendationBase.d.ts +1 -1
- package/lib/entity/project/projectPayload.d.ts +0 -7
- package/lib/entity/project/projectPayload.js +1 -15
- package/lib/entity/tenant/clearAllEpic.d.ts +2 -2
- package/lib/entity/tenant/clearAllEpic.js +2 -2
- 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 +1 -0
- package/lib/entity/tenant/tenantReducer.d.ts +59 -1
- package/lib/entity/tenant/tenantReducer.js +139 -4
- package/lib/entity/tenant/tenantState.d.ts +7 -0
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.d.ts +0 -2
- package/lib/entity/transaction/payloadTypes/transactionLinePayload.js +0 -9
- package/lib/entity/transaction/stateTypes/transactionLine.d.ts +0 -2
- package/lib/epic.d.ts +3 -2
- package/lib/epic.js +6 -2
- package/lib/esm/entity/project/projectPayload.js +0 -12
- package/lib/esm/entity/tenant/clearAllEpic.js +2 -2
- 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 +135 -2
- package/lib/esm/entity/transaction/payloadTypes/transactionLinePayload.js +0 -9
- package/lib/esm/epic.js +6 -2
- package/lib/esm/index.js +6 -5
- package/lib/esm/reducer.js +3 -3
- 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 +106 -0
- package/lib/esm/view/featureNotificationView/featureNotificationViewSelector.js +4 -0
- package/lib/esm/view/transactionDetail/epics/saveTransactionHelper.js +0 -1
- package/lib/esm/view/transactionDetail/epics/transactionDetailEpic.js +0 -6
- package/lib/esm/view/transactionDetail/epics/updateTransactionDetailEpic.js +0 -3
- package/lib/esm/view/transactionDetail/transactionDetailSelector.js +2 -14
- package/lib/index.d.ts +7 -5
- package/lib/index.js +45 -35
- package/lib/reducer.d.ts +3 -3
- package/lib/reducer.js +3 -3
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- 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 +19 -0
- package/lib/view/featureNotificationView/featureNotificationViewReducer.js +110 -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/transactionDetail/epics/saveTransactionHelper.js +0 -1
- package/lib/view/transactionDetail/epics/transactionDetailEpic.d.ts +1 -2
- package/lib/view/transactionDetail/epics/transactionDetailEpic.js +0 -6
- package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +0 -3
- package/lib/view/transactionDetail/transactionDetailSelector.d.ts +0 -3
- package/lib/view/transactionDetail/transactionDetailSelector.js +1 -13
- package/lib/view/transactionDetail/transactionDetailState.d.ts +0 -2
- package/lib/view/transactionDetail/transactionDetailTypes.d.ts +0 -2
- package/package.json +1 -1
- package/lib/esm/view/projectList/fetchProjectListEpic.js +0 -38
- package/lib/esm/view/projectList/projectListReducer.js +0 -39
- package/lib/esm/view/projectList/projectListSelector.js +0 -9
- package/lib/esm/view/projectList/projectListState.js +0 -1
- package/lib/view/projectList/fetchProjectListEpic.d.ts +0 -8
- package/lib/view/projectList/fetchProjectListEpic.js +0 -42
- package/lib/view/projectList/projectListPayload.d.ts +0 -7
- package/lib/view/projectList/projectListReducer.d.ts +0 -9
- package/lib/view/projectList/projectListReducer.js +0 -43
- package/lib/view/projectList/projectListSelector.d.ts +0 -8
- package/lib/view/projectList/projectListSelector.js +0 -13
- package/lib/view/projectList/projectListState.d.ts +0 -4
- package/lib/view/projectList/projectListState.js +0 -2
- /package/lib/esm/view/{projectList/projectListPayload.js → featureNotificationView/featureNotificationViewState.js} +0 -0
- /package/lib/view/{projectList/projectListPayload.js → featureNotificationView/featureNotificationViewState.js} +0 -0
|
@@ -10,7 +10,7 @@ export interface RecommendationBase {
|
|
|
10
10
|
recommendationHash?: ID;
|
|
11
11
|
type?: string;
|
|
12
12
|
}
|
|
13
|
-
export type TransactionLineRecommendationFieldTypes = 'vendor' | 'category' | 'class'
|
|
13
|
+
export type TransactionLineRecommendationFieldTypes = 'vendor' | 'category' | 'class';
|
|
14
14
|
export interface Recommendation {
|
|
15
15
|
account?: RecommendedAccountBase;
|
|
16
16
|
class?: RecommendedClassBase;
|
|
@@ -10,11 +10,4 @@ export interface ProjectMetadataPayload {
|
|
|
10
10
|
zeni_project_customer_id: string | null;
|
|
11
11
|
zeni_project_id: string;
|
|
12
12
|
}
|
|
13
|
-
export interface ProjectBasePayload {
|
|
14
|
-
zeni_project_id: string;
|
|
15
|
-
accounting_provider_project_id?: string | null;
|
|
16
|
-
project_name?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare const toProjectBasePayload: (project: Project | undefined) => ProjectBasePayload;
|
|
19
|
-
export declare const mapProjectBasePayloadToProject: (payload: ProjectBasePayload) => Project;
|
|
20
13
|
export declare const mapProjectMetadataPayloadToProject: (payload: ProjectMetadataPayload) => Project;
|
|
@@ -1,21 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapProjectMetadataPayloadToProject =
|
|
3
|
+
exports.mapProjectMetadataPayloadToProject = void 0;
|
|
4
4
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
5
|
-
const toProjectBasePayload = (project) => ({
|
|
6
|
-
zeni_project_id: project?.projectId ?? '',
|
|
7
|
-
accounting_provider_project_id: project?.accountingProviderProjectId ?? null,
|
|
8
|
-
project_name: project?.projectName ?? '',
|
|
9
|
-
});
|
|
10
|
-
exports.toProjectBasePayload = toProjectBasePayload;
|
|
11
|
-
const mapProjectBasePayloadToProject = (payload) => ({
|
|
12
|
-
projectId: payload.zeni_project_id,
|
|
13
|
-
projectName: payload.project_name ?? '',
|
|
14
|
-
...(payload.accounting_provider_project_id != null
|
|
15
|
-
? { accountingProviderProjectId: payload.accounting_provider_project_id }
|
|
16
|
-
: {}),
|
|
17
|
-
});
|
|
18
|
-
exports.mapProjectBasePayloadToProject = mapProjectBasePayloadToProject;
|
|
19
5
|
const mapProjectMetadataPayloadToProject = (payload) => ({
|
|
20
6
|
projectId: payload.zeni_project_id,
|
|
21
7
|
projectName: payload.project_name,
|
|
@@ -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';
|
|
@@ -68,7 +69,6 @@ import { clearPeople } from '../../view/people/peopleReducer';
|
|
|
68
69
|
import { clearProfitAndLoss } from '../../view/profitAndLoss/profitAndLossReducer';
|
|
69
70
|
import { clearProfitAndLossClassesView } from '../../view/profitAndLossClassesView/profitAndLossClassesViewReducer';
|
|
70
71
|
import { clearProfitAndLossProjectView } from '../../view/profitAndLossProjectView/profitAndLossProjectViewReducer';
|
|
71
|
-
import { clearProjectList } from '../../view/projectList/projectListReducer';
|
|
72
72
|
import { clearRecommendation } from '../../view/recommendation/recommendationReducer';
|
|
73
73
|
import { clearReferrals } from '../../view/referralView/referralReducer';
|
|
74
74
|
import { clearReimbursementCard } from '../../view/reimbursementCard/reimbursementCardReducer';
|
|
@@ -206,7 +206,7 @@ import { clearAllUserRoles } from '../userRole/userRoleReducer';
|
|
|
206
206
|
import { clearAllVendors } from '../vendor/vendorReducer';
|
|
207
207
|
import { clearAllVendorExpenseTrends } from '../vendorExpense/vendorExpenseReducer';
|
|
208
208
|
import { clearAll } from './tenantReducer';
|
|
209
|
-
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
|
|
209
|
+
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> | ReturnType<typeof clearZeniOAuthView>;
|
|
210
210
|
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>;
|
|
211
211
|
export type ActionType = clearActionTypeForViews | clearActionTypeForEntities | ReturnType<typeof clearAll>;
|
|
212
212
|
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");
|
|
@@ -72,7 +73,6 @@ const peopleReducer_1 = require("../../view/people/peopleReducer");
|
|
|
72
73
|
const profitAndLossReducer_1 = require("../../view/profitAndLoss/profitAndLossReducer");
|
|
73
74
|
const profitAndLossClassesViewReducer_1 = require("../../view/profitAndLossClassesView/profitAndLossClassesViewReducer");
|
|
74
75
|
const profitAndLossProjectViewReducer_1 = require("../../view/profitAndLossProjectView/profitAndLossProjectViewReducer");
|
|
75
|
-
const projectListReducer_1 = require("../../view/projectList/projectListReducer");
|
|
76
76
|
const recommendationReducer_1 = require("../../view/recommendation/recommendationReducer");
|
|
77
77
|
const referralReducer_1 = require("../../view/referralView/referralReducer");
|
|
78
78
|
const reimbursementCardReducer_1 = require("../../view/reimbursementCard/reimbursementCardReducer");
|
|
@@ -277,6 +277,7 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
|
|
|
277
277
|
(0, transactionsViewReducer_1.clearExpenseAutomationTransactionsView)(),
|
|
278
278
|
(0, expenseAutomationViewReducer_1.clearExpenseAutomationView)(),
|
|
279
279
|
(0, expressPayReducer_1.clearExpressPayView)(),
|
|
280
|
+
(0, featureNotificationViewReducer_1.clearFeatureNotificationView)(),
|
|
280
281
|
(0, fileViewReducer_1.clearFileViewList)(),
|
|
281
282
|
(0, financeStatementReducer_1.clearFinanceStatement)(),
|
|
282
283
|
(0, forecastListReducer_1.clearForecastList)(),
|
|
@@ -305,7 +306,6 @@ const clearAllEpic = (actions$) => actions$.pipe((0, operators_1.filter)(tenantR
|
|
|
305
306
|
(0, profitAndLossReducer_1.clearProfitAndLoss)(),
|
|
306
307
|
(0, profitAndLossClassesViewReducer_1.clearProfitAndLossClassesView)(),
|
|
307
308
|
(0, profitAndLossProjectViewReducer_1.clearProfitAndLossProjectView)(),
|
|
308
|
-
(0, projectListReducer_1.clearProjectList)(),
|
|
309
309
|
(0, recommendationReducer_1.clearRecommendation)(),
|
|
310
310
|
(0, referralReducer_1.clearReferrals)(),
|
|
311
311
|
(0, reimbursementCardReducer_1.clearReimbursementCard)(),
|
|
@@ -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: "revenue";
|
|
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: "revenue";
|
|
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: "revenue";
|
|
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;
|
|
@@ -13,6 +13,10 @@ export interface DoSignInPayload {
|
|
|
13
13
|
redirectUri: ZeniUrl;
|
|
14
14
|
sourceUri: ZeniUrl;
|
|
15
15
|
}
|
|
16
|
+
export declare const toExternalIntegrationType: (v: string) => "revenue";
|
|
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: "revenue", connectionName: "chargebee" | "hubspot", credentials: {
|
|
88
|
+
api_key: string;
|
|
89
|
+
site: string;
|
|
90
|
+
}], {
|
|
91
|
+
tenantId: string;
|
|
92
|
+
connectionId: string;
|
|
93
|
+
connectionType: "revenue";
|
|
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: "revenue", connectionPayload: ConnectionDataPayload], {
|
|
100
|
+
tenantId: string;
|
|
101
|
+
connectionType: "revenue";
|
|
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: "revenue", 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: "revenue";
|
|
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: "revenue", connectionPayload: ConnectionDataPayload], {
|
|
123
|
+
tenantId: string;
|
|
124
|
+
connectionType: "revenue";
|
|
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: "revenue"], {
|
|
130
|
+
tenantId: string;
|
|
131
|
+
connectionId: string;
|
|
132
|
+
connectionType: "revenue";
|
|
133
|
+
}, "tenant/deleteConnection", never, never>, deleteConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[tenantId: string, connectionId: string, connectionType: "revenue"], {
|
|
134
|
+
tenantId: string;
|
|
135
|
+
connectionId: string;
|
|
136
|
+
connectionType: "revenue";
|
|
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;
|
|
@@ -128,5 +185,6 @@ export declare const toRoleResource: (payload: RoleResourcePayload) => RoleResou
|
|
|
128
185
|
export declare function mapConnectionsPayloadToState(connectionsPayload: ConnectionsPayload): {
|
|
129
186
|
accounting: Connection[];
|
|
130
187
|
payments: Connection[];
|
|
188
|
+
revenue: Connection[];
|
|
131
189
|
};
|
|
132
190
|
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 = ['revenue'];
|
|
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,
|
|
@@ -341,7 +348,11 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
341
348
|
fetchState: 'In-Progress',
|
|
342
349
|
accounting: [],
|
|
343
350
|
payments: [],
|
|
351
|
+
revenue: [],
|
|
344
352
|
saveConnectionState: 'Not-Started',
|
|
353
|
+
saveAPIKeyConnectionState: 'Not-Started',
|
|
354
|
+
saveOAuthConnectionState: 'Not-Started',
|
|
355
|
+
deleteConnectionState: 'Not-Started',
|
|
345
356
|
error: undefined,
|
|
346
357
|
};
|
|
347
358
|
},
|
|
@@ -351,12 +362,16 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
351
362
|
return { payload: { tenantId, externalConnections } };
|
|
352
363
|
},
|
|
353
364
|
reducer(draft, action) {
|
|
354
|
-
const { accounting, payments } = mapConnectionsPayloadToState(action.payload.externalConnections);
|
|
365
|
+
const { accounting, payments, revenue } = mapConnectionsPayloadToState(action.payload.externalConnections);
|
|
355
366
|
draft.externalConnectionsByTenant[action.payload.tenantId] = {
|
|
356
367
|
fetchState: 'Completed',
|
|
357
368
|
accounting,
|
|
358
369
|
payments,
|
|
370
|
+
revenue,
|
|
359
371
|
saveConnectionState: 'Completed',
|
|
372
|
+
saveAPIKeyConnectionState: 'Not-Started',
|
|
373
|
+
saveOAuthConnectionState: 'Not-Started',
|
|
374
|
+
deleteConnectionState: 'Not-Started',
|
|
360
375
|
error: undefined,
|
|
361
376
|
};
|
|
362
377
|
},
|
|
@@ -371,7 +386,11 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
371
386
|
fetchState: 'Error',
|
|
372
387
|
accounting: [],
|
|
373
388
|
payments: [],
|
|
389
|
+
revenue: [],
|
|
374
390
|
saveConnectionState: 'Error',
|
|
391
|
+
saveAPIKeyConnectionState: 'Not-Started',
|
|
392
|
+
saveOAuthConnectionState: 'Not-Started',
|
|
393
|
+
deleteConnectionState: 'Not-Started',
|
|
375
394
|
error: status,
|
|
376
395
|
};
|
|
377
396
|
},
|
|
@@ -417,6 +436,121 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
417
436
|
});
|
|
418
437
|
},
|
|
419
438
|
},
|
|
439
|
+
saveAPIKeyConnection: {
|
|
440
|
+
prepare(tenantId, connectionId, connectionType, connectionName, credentials) {
|
|
441
|
+
return { payload: { tenantId, connectionId, connectionType, connectionName, credentials } };
|
|
442
|
+
},
|
|
443
|
+
reducer(draft, action) {
|
|
444
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
445
|
+
if (existing != null) {
|
|
446
|
+
existing.saveAPIKeyConnectionState = 'In-Progress';
|
|
447
|
+
existing.saveAPIKeyConnectionError = undefined;
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
saveAPIKeyConnectionSuccess: {
|
|
452
|
+
prepare(tenantId, connectionType, connectionPayload) {
|
|
453
|
+
return { payload: { tenantId, connectionType, connectionPayload } };
|
|
454
|
+
},
|
|
455
|
+
reducer(draft, action) {
|
|
456
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
457
|
+
if (existing != null) {
|
|
458
|
+
existing.saveAPIKeyConnectionState = 'Completed';
|
|
459
|
+
existing[action.payload.connectionType] = [(0, exports.toConnection)(action.payload.connectionPayload)];
|
|
460
|
+
existing.saveAPIKeyConnectionError = undefined;
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
saveAPIKeyConnectionFailure: {
|
|
465
|
+
prepare(tenantId, status) {
|
|
466
|
+
return { payload: { tenantId, status } };
|
|
467
|
+
},
|
|
468
|
+
reducer(draft, action) {
|
|
469
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
470
|
+
if (existing != null) {
|
|
471
|
+
existing.saveAPIKeyConnectionState = 'Error';
|
|
472
|
+
existing.saveAPIKeyConnectionError = action.payload.status;
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
saveOAuthConnection: {
|
|
477
|
+
prepare(tenantId, connectionId, connectionType, connectionName, credentials) {
|
|
478
|
+
return { payload: { tenantId, connectionId, connectionType, connectionName, credentials } };
|
|
479
|
+
},
|
|
480
|
+
reducer(draft, action) {
|
|
481
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
482
|
+
if (existing != null) {
|
|
483
|
+
existing.saveOAuthConnectionState = 'In-Progress';
|
|
484
|
+
existing.saveOAuthConnectionError = undefined;
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
},
|
|
488
|
+
saveOAuthConnectionSuccess: {
|
|
489
|
+
prepare(tenantId, connectionType, connectionPayload) {
|
|
490
|
+
return { payload: { tenantId, connectionType, connectionPayload } };
|
|
491
|
+
},
|
|
492
|
+
reducer(draft, action) {
|
|
493
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
494
|
+
if (existing != null) {
|
|
495
|
+
existing.saveOAuthConnectionState = 'Completed';
|
|
496
|
+
existing[action.payload.connectionType] = [(0, exports.toConnection)(action.payload.connectionPayload)];
|
|
497
|
+
existing.saveOAuthConnectionError = undefined;
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
saveOAuthConnectionFailure: {
|
|
502
|
+
prepare(tenantId, status) {
|
|
503
|
+
return { payload: { tenantId, status } };
|
|
504
|
+
},
|
|
505
|
+
reducer(draft, action) {
|
|
506
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
507
|
+
if (existing != null) {
|
|
508
|
+
existing.saveOAuthConnectionState = 'Error';
|
|
509
|
+
existing.saveOAuthConnectionError = action.payload.status;
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
deleteConnection: {
|
|
514
|
+
prepare(tenantId, connectionId, connectionType) {
|
|
515
|
+
return { payload: { tenantId, connectionId, connectionType } };
|
|
516
|
+
},
|
|
517
|
+
reducer(draft, action) {
|
|
518
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
519
|
+
if (existing != null) {
|
|
520
|
+
existing.deleteConnectionState = 'In-Progress';
|
|
521
|
+
existing.deleteConnectionError = undefined;
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
deleteConnectionSuccess: {
|
|
526
|
+
prepare(tenantId, connectionId, connectionType) {
|
|
527
|
+
return { payload: { tenantId, connectionId, connectionType } };
|
|
528
|
+
},
|
|
529
|
+
reducer(draft, action) {
|
|
530
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
531
|
+
if (existing != null) {
|
|
532
|
+
existing.deleteConnectionState = 'Completed';
|
|
533
|
+
existing.deleteConnectionError = undefined;
|
|
534
|
+
const arr = existing[action.payload.connectionType];
|
|
535
|
+
const idx = arr.findIndex((c) => c.connectionId === action.payload.connectionId);
|
|
536
|
+
if (idx !== -1) {
|
|
537
|
+
arr[idx] = { ...arr[idx], isValid: false };
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
},
|
|
542
|
+
deleteConnectionFailure: {
|
|
543
|
+
prepare(tenantId, status) {
|
|
544
|
+
return { payload: { tenantId, status } };
|
|
545
|
+
},
|
|
546
|
+
reducer(draft, action) {
|
|
547
|
+
const existing = draft.externalConnectionsByTenant[action.payload.tenantId];
|
|
548
|
+
if (existing != null) {
|
|
549
|
+
existing.deleteConnectionState = 'Error';
|
|
550
|
+
existing.deleteConnectionError = action.payload.status;
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
},
|
|
420
554
|
doSignOut(draft) {
|
|
421
555
|
draft.fetchState = 'Not-Started';
|
|
422
556
|
draft.signInState = 'Not-Started';
|
|
@@ -564,7 +698,7 @@ const tenant = (0, toolkit_1.createSlice)({
|
|
|
564
698
|
},
|
|
565
699
|
},
|
|
566
700
|
});
|
|
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;
|
|
701
|
+
_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
702
|
exports.default = tenant.reducer;
|
|
569
703
|
/**
|
|
570
704
|
* Converts tenants payload to Tenant and User State
|
|
@@ -693,6 +827,7 @@ function mapConnectionsPayloadToState(connectionsPayload) {
|
|
|
693
827
|
return {
|
|
694
828
|
accounting: connections.accounting.map((payload) => (0, exports.toConnection)(payload)),
|
|
695
829
|
payments: connections.payments.map((payload) => (0, exports.toConnection)(payload)),
|
|
830
|
+
revenue: (connections.revenue ?? []).map((payload) => (0, exports.toConnection)(payload)),
|
|
696
831
|
};
|
|
697
832
|
}
|
|
698
833
|
const toConnection = (payload) => ({
|