@zeniai/client-epic-state 5.0.81-betaAS2 → 5.0.81-betaJK2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/entity/task/taskPayload.d.ts +3 -1
- package/lib/entity/task/taskPayload.js +2 -0
- package/lib/entity/task/taskState.d.ts +2 -0
- package/lib/entity/tenant/tenantPayload.d.ts +0 -3
- package/lib/entity/tenant/tenantReducer.d.ts +1 -1
- package/lib/entity/tenant/tenantReducer.js +3 -23
- package/lib/entity/tenant/tenantState.d.ts +0 -3
- package/lib/epic.d.ts +1 -3
- package/lib/epic.js +1 -3
- package/lib/esm/entity/task/taskPayload.js +2 -0
- package/lib/esm/entity/tenant/tenantReducer.js +2 -22
- package/lib/esm/epic.js +1 -3
- package/lib/esm/index.js +4 -4
- package/lib/esm/view/companyTaskManagerView/companyTaskManagerViewReducer.js +25 -11
- package/lib/esm/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +24 -28
- package/lib/esm/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/esm/view/dashboard/dashboardReducer.js +5 -1
- package/lib/esm/view/dashboard/dashboardSelector.js +2 -1
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +1 -45
- package/lib/index.d.ts +6 -6
- package/lib/index.js +29 -30
- package/lib/view/companyTaskManagerView/companyTaskManagerViewPayload.d.ts +13 -15
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +3 -4
- package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.js +26 -12
- package/lib/view/companyTaskManagerView/companyTaskManagerViewState.d.ts +3 -3
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.d.ts +1 -3
- package/lib/view/companyTaskManagerView/epics/fetchCompanyTaskManagerViewEpic.js +24 -28
- package/lib/view/companyView/epic/fetchAllCockpitViewsEpic.js +2 -2
- package/lib/view/companyView/types/cockpitTypes.d.ts +2 -1
- package/lib/view/dashboard/dashboardReducer.d.ts +1 -1
- package/lib/view/dashboard/dashboardReducer.js +6 -2
- package/lib/view/dashboard/dashboardSelector.d.ts +1 -0
- package/lib/view/dashboard/dashboardSelector.js +2 -1
- package/lib/view/dashboard/dashboardState.d.ts +1 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +2 -46
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewState.d.ts +0 -2
- package/package.json +1 -1
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +0 -18
- package/lib/esm/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +0 -18
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.d.ts +0 -8
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoIntroClosedByOutsideClickEpic.js +0 -22
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.d.ts +0 -8
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryPromoRemindMeLaterClickedEpic.js +0 -22
|
@@ -18,11 +18,12 @@ export type ManagementViewFilterCategoryField = 'controllerUserIds' | 'customerS
|
|
|
18
18
|
export type SubscriptionViewFilterCategoryField = 'controllerUserIds' | 'statusCode' | 'recommendedActionCode' | 'subscriptionPlans' | 'subscriptionAddOns' | 'avg2MonthExpenses' | 'slabLowerLimit' | 'slabUpperLimit' | 'monthlyRecurringRevenue';
|
|
19
19
|
export type PortfolioViewFilterCategoryField = 'netBurnOrIncome' | 'cashPosition' | 'income' | 'expenses' | 'runway';
|
|
20
20
|
export type HealthMonitorViewFilterCategoryField = 'verticalProductServices' | 'runway' | 'netPromoterScore' | 'customerSatisfactionScore' | 'churnProbabilityPercentage' | 'controller' | 'customerSuccessManager' | 'lastReportSent' | 'subscriptionStartDate' | 'subscriptionRenewalDate' | 'externalProductServiceExposure' | 'companyEngagementMetricsUpdatedAt' | 'companyGroupId' | 'monthlyRecurringRevenue';
|
|
21
|
+
export type TaskManagerViewFilterCategoryField = 'assignee' | 'creationDate' | 'dueDate' | 'priority' | 'status' | 'tag';
|
|
21
22
|
export interface CockpitFilterCategory {
|
|
22
23
|
matchingOperator: 'equal' | 'not_equal';
|
|
23
24
|
values: FilterCategoryValueType[];
|
|
24
25
|
valuesCombinationOperator: 'ANY' | 'ALL';
|
|
25
|
-
field?: AiAccountantFilterCategoryField | ManagementViewFilterCategoryField | SubscriptionViewFilterCategoryField | PortfolioViewFilterCategoryField | HealthMonitorViewFilterCategoryField;
|
|
26
|
+
field?: AiAccountantFilterCategoryField | ManagementViewFilterCategoryField | SubscriptionViewFilterCategoryField | PortfolioViewFilterCategoryField | HealthMonitorViewFilterCategoryField | TaskManagerViewFilterCategoryField;
|
|
26
27
|
}
|
|
27
28
|
export interface CockpitFilters {
|
|
28
29
|
categories?: CockpitFilterCategory[];
|
|
@@ -7,6 +7,6 @@ export declare const fetchDashboard: import("@reduxjs/toolkit").ActionCreatorWit
|
|
|
7
7
|
fetchFullReport: any;
|
|
8
8
|
cacheOverride: any;
|
|
9
9
|
excludeResources: ("cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "profit_and_loss_by_projects" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_list_of_account_by_project" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card" | "excluded_account_reconciliation")[];
|
|
10
|
-
}, "dashboard/fetchDashboard", never, never>, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/clearDashboard">;
|
|
10
|
+
}, "dashboard/fetchDashboard", never, never>, updateTreasuryVideoClosed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/updateTreasuryVideoClosed">, clearDashboard: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"dashboard/clearDashboard">;
|
|
11
11
|
declare const _default: import("redux").Reducer<DashboardState>;
|
|
12
12
|
export default _default;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.clearDashboard = exports.fetchDashboard = exports.initialState = void 0;
|
|
4
|
+
exports.clearDashboard = exports.updateTreasuryVideoClosed = exports.fetchDashboard = exports.initialState = void 0;
|
|
5
5
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
6
6
|
const zeniDayJS_1 = require("../../zeniDayJS");
|
|
7
7
|
exports.initialState = {
|
|
8
8
|
lastFetchRequestTime: undefined,
|
|
9
|
+
isTreasuryVideoClosed: false,
|
|
9
10
|
};
|
|
10
11
|
const dashboard = (0, toolkit_1.createSlice)({
|
|
11
12
|
name: 'dashboard',
|
|
@@ -28,10 +29,13 @@ const dashboard = (0, toolkit_1.createSlice)({
|
|
|
28
29
|
};
|
|
29
30
|
},
|
|
30
31
|
},
|
|
32
|
+
updateTreasuryVideoClosed(draft) {
|
|
33
|
+
draft.isTreasuryVideoClosed = true;
|
|
34
|
+
},
|
|
31
35
|
clearDashboard(draft) {
|
|
32
36
|
Object.assign(draft, exports.initialState);
|
|
33
37
|
},
|
|
34
38
|
},
|
|
35
39
|
});
|
|
36
|
-
_a = dashboard.actions, exports.fetchDashboard = _a.fetchDashboard, exports.clearDashboard = _a.clearDashboard;
|
|
40
|
+
_a = dashboard.actions, exports.fetchDashboard = _a.fetchDashboard, exports.updateTreasuryVideoClosed = _a.updateTreasuryVideoClosed, exports.clearDashboard = _a.clearDashboard;
|
|
37
41
|
exports.default = dashboard.reducer;
|
|
@@ -6,6 +6,7 @@ import { CardType } from './dashboardState';
|
|
|
6
6
|
export interface DashboardReport extends SelectorReport {
|
|
7
7
|
cardsForDashboardUI: CardType[];
|
|
8
8
|
cardsOrdered: CardType[];
|
|
9
|
+
isTreasuryVideoClosed: boolean;
|
|
9
10
|
reportsInOrder: (SelectorReport | SelectorView)[];
|
|
10
11
|
tenantsOrdered: TenantsOrdered;
|
|
11
12
|
currentTenant?: Tenant;
|
|
@@ -45,7 +45,7 @@ const tenantSelector = (0, toolkit_1.createSelector)(tenantSelector_1.getTenants
|
|
|
45
45
|
exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalanceSelector_1.getCardBalance, cashBalanceSelector_1.getCashBalance, getOperatingExpensesForLast5Periods, getRevenueForLast4Periods, topExSelector_1.getTop6Expenses, getNetBurnOrIncomeForLast4Periods, getNetBurnOrIncomeStoryCard, getCashPositionLast5Periods, getCashInCashOutLast4Periods, insightsCardSelector_1.getInsights, companyPassportViewSelector_1.getCompanyPassportView, tasksCardSelector_1.getTasksCardReport, billPayCardSelector_1.getBillPayCardReport, reimbursementCardSelector_1.getReimbursementCardReport, apAgingSelector, arAgingSelector, zeniAccountsPromoCardSelector_1.getZeniAccountsPromoCard, referralSelector_1.getRewardsPlanCard, dashboardLayoutSelector_1.getDashboardCardsOrdered, (state) => {
|
|
46
46
|
const currentTenant = (0, tenantSelector_1.getCurrentTenant)(state);
|
|
47
47
|
return (0, monthEndCloseChecksViewSelector_1.getMonthEndCloseChecksViewByTenantId)(state, currentTenant.tenantId);
|
|
48
|
-
}, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (_state, _additionalExcludedReports, signedInUser) => signedInUser, (_state, _excluded, _signedInUser, isExpenseAutomationFeatureEnabledV2) => isExpenseAutomationFeatureEnabledV2, (_state, _excluded, _signedInUser, _enabledV2, isExpenseAutomationFeatureEnabled) => isExpenseAutomationFeatureEnabled, (_state, _excluded, _signedInUser, _enabledV2, _enabled, isTreasuryFeatureEnabled) => isTreasuryFeatureEnabled, (tenants, cardBalance, cashBalance, opEx, revenue, topEx, netBurnOrIncome, netBurnOrIncomeStoryCard, cashPosition, cashInCashOut, insightsView, companyPassportView, tasksCard, billPayCard, reimbursementCard, apAgingReport, arAgingReport, zeniAccountsPromoCard, rewardsPlanCard, cards, monthEndCloseChecksView, tenantState, additionalExcludedReports, signedInUser, isExpenseAutomationFeatureEnabledV2, isExpenseAutomationFeatureEnabled, isTreasuryFeatureEnabled) => {
|
|
48
|
+
}, (state) => state.tenantState, (_state, additionalExcludedReports) => additionalExcludedReports, (_state, _additionalExcludedReports, signedInUser) => signedInUser, (_state, _excluded, _signedInUser, isExpenseAutomationFeatureEnabledV2) => isExpenseAutomationFeatureEnabledV2, (_state, _excluded, _signedInUser, _enabledV2, isExpenseAutomationFeatureEnabled) => isExpenseAutomationFeatureEnabled, (_state, _excluded, _signedInUser, _enabledV2, _enabled, isTreasuryFeatureEnabled) => isTreasuryFeatureEnabled, (state) => state.dashboardState.isTreasuryVideoClosed, (tenants, cardBalance, cashBalance, opEx, revenue, topEx, netBurnOrIncome, netBurnOrIncomeStoryCard, cashPosition, cashInCashOut, insightsView, companyPassportView, tasksCard, billPayCard, reimbursementCard, apAgingReport, arAgingReport, zeniAccountsPromoCard, rewardsPlanCard, cards, monthEndCloseChecksView, tenantState, additionalExcludedReports, signedInUser, isExpenseAutomationFeatureEnabledV2, isExpenseAutomationFeatureEnabled, isTreasuryFeatureEnabled, isTreasuryVideoClosed) => {
|
|
49
49
|
const isReimbursementFeatureEnabled = tenants.currentTenant.company?.featuresActivationInfo
|
|
50
50
|
.isReimbursementFeatureEnabled;
|
|
51
51
|
const isBillPayFeatureEnabled = tenants.currentTenant.company?.featuresActivationInfo
|
|
@@ -276,5 +276,6 @@ exports.getDashboard = (0, toolkit_1.createSelector)(tenantSelector, cardBalance
|
|
|
276
276
|
...tenants,
|
|
277
277
|
reportsInOrder,
|
|
278
278
|
cardsForDashboardUI: cardsCopy,
|
|
279
|
+
isTreasuryVideoClosed,
|
|
279
280
|
};
|
|
280
281
|
});
|
|
@@ -2,5 +2,6 @@ import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
|
2
2
|
import { ZeniDate } from '../../zeniDayJS';
|
|
3
3
|
export type CardType = ReportID | 'information_card' | 'zeni_promo_card' | 'expense_automation_card' | 'rewards_card';
|
|
4
4
|
export interface DashboardState {
|
|
5
|
+
isTreasuryVideoClosed: boolean;
|
|
5
6
|
lastFetchRequestTime?: ZeniDate;
|
|
6
7
|
}
|
|
@@ -15,6 +15,6 @@ export declare const fetchTreasuryFunds: import("@reduxjs/toolkit").ActionCreato
|
|
|
15
15
|
}, "treasurySetupView/updatePortfolioAllocation", never, never>, updatePortfolioAllocationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<UpdatePortfolioAllocationPayload, "treasurySetupView/updatePortfolioAllocationSuccess">, updatePortfolioAllocationFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "treasurySetupView/updatePortfolioAllocationFailure", never, never>, fetchPortfolioAllocation: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"treasurySetupView/fetchPortfolioAllocation">, fetchPortfolioAllocationSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
16
16
|
allocation_percentages: Record<string, number>;
|
|
17
17
|
custom_corporate_id: string | null;
|
|
18
|
-
}, "treasurySetupView/fetchPortfolioAllocationSuccess">, fetchPortfolioAllocationFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "treasurySetupView/fetchPortfolioAllocationFailure">, updateFundAllocationLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<FundAllocationOption, "treasurySetupView/updateFundAllocationLocalData">,
|
|
18
|
+
}, "treasurySetupView/fetchPortfolioAllocationSuccess">, fetchPortfolioAllocationFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "treasurySetupView/fetchPortfolioAllocationFailure">, updateFundAllocationLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<FundAllocationOption, "treasurySetupView/updateFundAllocationLocalData">, updateTreasuryVideoViewed: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"treasurySetupView/updateTreasuryVideoViewed">, updateTreasuryVideoViewedSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"treasurySetupView/updateTreasuryVideoViewedSuccess">, updateTreasuryVideoViewedFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, "treasurySetupView/updateTreasuryVideoViewedFailure">;
|
|
19
19
|
declare const _default: import("redux").Reducer<TreasurySetupViewState>;
|
|
20
20
|
export default _default;
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.updateTreasuryVideoViewedFailure = exports.updateTreasuryVideoViewedSuccess = exports.updateTreasuryVideoViewed = exports.updateFundAllocationLocalData = exports.fetchPortfolioAllocationFailure = exports.fetchPortfolioAllocationSuccess = exports.fetchPortfolioAllocation = exports.updatePortfolioAllocationFailure = exports.updatePortfolioAllocationSuccess = exports.updatePortfolioAllocation = exports.updateTreasuryFundsFailure = exports.updateTreasuryFundsSuccess = exports.clearTreasurySetupView = exports.acceptTreasuryTermsFailure = exports.acceptTreasuryTermsSuccess = exports.acceptTreasuryTerms = exports.fetchTreasurySetupViewFailure = exports.fetchTreasurySetupViewSuccess = exports.fetchTreasurySetupView = exports.fetchTreasuryFunds = exports.initialState = void 0;
|
|
8
8
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
9
9
|
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
10
10
|
const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
@@ -40,14 +40,6 @@ exports.initialState = {
|
|
|
40
40
|
fetchState: 'Not-Started',
|
|
41
41
|
error: undefined,
|
|
42
42
|
},
|
|
43
|
-
updateTreasuryPromoIntroClosedByOutsideClickStatus: {
|
|
44
|
-
fetchState: 'Not-Started',
|
|
45
|
-
error: undefined,
|
|
46
|
-
},
|
|
47
|
-
updateTreasuryPromoRemindMeLaterClickedStatus: {
|
|
48
|
-
fetchState: 'Not-Started',
|
|
49
|
-
error: undefined,
|
|
50
|
-
},
|
|
51
43
|
updateTreasuryVideoViewedStatus: {
|
|
52
44
|
fetchState: 'Not-Started',
|
|
53
45
|
error: undefined,
|
|
@@ -305,48 +297,12 @@ const treasurySetupView = (0, toolkit_1.createSlice)({
|
|
|
305
297
|
error: action.payload,
|
|
306
298
|
};
|
|
307
299
|
},
|
|
308
|
-
updateTreasuryPromoRemindMeLaterClicked(draft) {
|
|
309
|
-
draft.updateTreasuryPromoRemindMeLaterClickedStatus = {
|
|
310
|
-
fetchState: 'In-Progress',
|
|
311
|
-
error: undefined,
|
|
312
|
-
};
|
|
313
|
-
},
|
|
314
|
-
updateTreasuryPromoRemindMeLaterClickedSuccess(draft) {
|
|
315
|
-
draft.updateTreasuryPromoRemindMeLaterClickedStatus = {
|
|
316
|
-
fetchState: 'Completed',
|
|
317
|
-
error: undefined,
|
|
318
|
-
};
|
|
319
|
-
},
|
|
320
|
-
updateTreasuryPromoRemindMeLaterClickedFailure(draft, action) {
|
|
321
|
-
draft.updateTreasuryPromoRemindMeLaterClickedStatus = {
|
|
322
|
-
fetchState: 'Error',
|
|
323
|
-
error: action.payload,
|
|
324
|
-
};
|
|
325
|
-
},
|
|
326
|
-
updateTreasuryPromoIntroClosedByOutsideClick(draft) {
|
|
327
|
-
draft.updateTreasuryPromoIntroClosedByOutsideClickStatus = {
|
|
328
|
-
fetchState: 'In-Progress',
|
|
329
|
-
error: undefined,
|
|
330
|
-
};
|
|
331
|
-
},
|
|
332
|
-
updateTreasuryPromoIntroClosedByOutsideClickSuccess(draft) {
|
|
333
|
-
draft.updateTreasuryPromoIntroClosedByOutsideClickStatus = {
|
|
334
|
-
fetchState: 'Completed',
|
|
335
|
-
error: undefined,
|
|
336
|
-
};
|
|
337
|
-
},
|
|
338
|
-
updateTreasuryPromoIntroClosedByOutsideClickFailure(draft, action) {
|
|
339
|
-
draft.updateTreasuryPromoIntroClosedByOutsideClickStatus = {
|
|
340
|
-
fetchState: 'Error',
|
|
341
|
-
error: action.payload,
|
|
342
|
-
};
|
|
343
|
-
},
|
|
344
300
|
clearTreasurySetupView(draft) {
|
|
345
301
|
Object.assign(draft, exports.initialState);
|
|
346
302
|
},
|
|
347
303
|
},
|
|
348
304
|
});
|
|
349
|
-
_a = treasurySetupView.actions, exports.fetchTreasuryFunds = _a.fetchTreasuryFunds, exports.fetchTreasurySetupView = _a.fetchTreasurySetupView, exports.fetchTreasurySetupViewSuccess = _a.fetchTreasurySetupViewSuccess, exports.fetchTreasurySetupViewFailure = _a.fetchTreasurySetupViewFailure, exports.acceptTreasuryTerms = _a.acceptTreasuryTerms, exports.acceptTreasuryTermsSuccess = _a.acceptTreasuryTermsSuccess, exports.acceptTreasuryTermsFailure = _a.acceptTreasuryTermsFailure, exports.clearTreasurySetupView = _a.clearTreasurySetupView, exports.updateTreasuryFundsSuccess = _a.updateTreasuryFundsSuccess, exports.updateTreasuryFundsFailure = _a.updateTreasuryFundsFailure, exports.updatePortfolioAllocation = _a.updatePortfolioAllocation, exports.updatePortfolioAllocationSuccess = _a.updatePortfolioAllocationSuccess, exports.updatePortfolioAllocationFailure = _a.updatePortfolioAllocationFailure, exports.fetchPortfolioAllocation = _a.fetchPortfolioAllocation, exports.fetchPortfolioAllocationSuccess = _a.fetchPortfolioAllocationSuccess, exports.fetchPortfolioAllocationFailure = _a.fetchPortfolioAllocationFailure, exports.updateFundAllocationLocalData = _a.updateFundAllocationLocalData, exports.
|
|
305
|
+
_a = treasurySetupView.actions, exports.fetchTreasuryFunds = _a.fetchTreasuryFunds, exports.fetchTreasurySetupView = _a.fetchTreasurySetupView, exports.fetchTreasurySetupViewSuccess = _a.fetchTreasurySetupViewSuccess, exports.fetchTreasurySetupViewFailure = _a.fetchTreasurySetupViewFailure, exports.acceptTreasuryTerms = _a.acceptTreasuryTerms, exports.acceptTreasuryTermsSuccess = _a.acceptTreasuryTermsSuccess, exports.acceptTreasuryTermsFailure = _a.acceptTreasuryTermsFailure, exports.clearTreasurySetupView = _a.clearTreasurySetupView, exports.updateTreasuryFundsSuccess = _a.updateTreasuryFundsSuccess, exports.updateTreasuryFundsFailure = _a.updateTreasuryFundsFailure, exports.updatePortfolioAllocation = _a.updatePortfolioAllocation, exports.updatePortfolioAllocationSuccess = _a.updatePortfolioAllocationSuccess, exports.updatePortfolioAllocationFailure = _a.updatePortfolioAllocationFailure, exports.fetchPortfolioAllocation = _a.fetchPortfolioAllocation, exports.fetchPortfolioAllocationSuccess = _a.fetchPortfolioAllocationSuccess, exports.fetchPortfolioAllocationFailure = _a.fetchPortfolioAllocationFailure, exports.updateFundAllocationLocalData = _a.updateFundAllocationLocalData, exports.updateTreasuryVideoViewed = _a.updateTreasuryVideoViewed, exports.updateTreasuryVideoViewedSuccess = _a.updateTreasuryVideoViewedSuccess, exports.updateTreasuryVideoViewedFailure = _a.updateTreasuryVideoViewedFailure;
|
|
350
306
|
exports.default = treasurySetupView.reducer;
|
|
351
307
|
function mapTreasuryFundsPayloadToFundData(fundsPayload) {
|
|
352
308
|
return fundsPayload.funds.map((fund) => ({
|
|
@@ -16,8 +16,6 @@ export interface TreasurySetupViewState extends FetchedState {
|
|
|
16
16
|
fundAllocationOptions: FundAllocationOption[];
|
|
17
17
|
fundsDetails: FundData[];
|
|
18
18
|
};
|
|
19
|
-
updateTreasuryPromoIntroClosedByOutsideClickStatus: FetchStateAndError;
|
|
20
|
-
updateTreasuryPromoRemindMeLaterClickedStatus: FetchStateAndError;
|
|
21
19
|
updateTreasuryVideoViewedStatus: FetchStateAndError;
|
|
22
20
|
treasuryTermsDetails?: {
|
|
23
21
|
fetchStatus: FetchStateAndError;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.81-
|
|
3
|
+
"version": "5.0.81-betaJK2",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
-
import { updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../../responsePayload';
|
|
5
|
-
import { updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoIntroClosedByOutsideClickFailure, updateTreasuryPromoIntroClosedByOutsideClickSuccess, } from '../treasurySetupViewReducer';
|
|
6
|
-
export const updateTreasuryPromoIntroClosedByOutsideClickEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(updateTreasuryPromoIntroClosedByOutsideClick.match), switchMap(() => {
|
|
7
|
-
return zeniAPI
|
|
8
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_intro_closed_by_outside_click: true })
|
|
9
|
-
.pipe(mergeMap((response) => {
|
|
10
|
-
if (isSuccessStatus(response)) {
|
|
11
|
-
return of(updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser(), updateTreasuryPromoIntroClosedByOutsideClickSuccess());
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
return of(updateTreasuryPromoIntroClosedByOutsideClickFailure(response.status));
|
|
15
|
-
}
|
|
16
|
-
}), catchError((error) => of(updateTreasuryPromoIntroClosedByOutsideClickFailure(createZeniAPIStatus('Unexpected error', 'Update treasury promo intro closed by outside click REST API call errored out' +
|
|
17
|
-
JSON.stringify(error))))));
|
|
18
|
-
}));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { of } from 'rxjs';
|
|
2
|
-
import { catchError, filter, mergeMap, switchMap } from 'rxjs/operators';
|
|
3
|
-
import { updateTreasuryPromoRemindMeLaterClickedForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
-
import { createZeniAPIStatus, isSuccessStatus, } from '../../../../../responsePayload';
|
|
5
|
-
import { updateTreasuryPromoRemindMeLaterClicked, updateTreasuryPromoRemindMeLaterClickedFailure, updateTreasuryPromoRemindMeLaterClickedSuccess, } from '../treasurySetupViewReducer';
|
|
6
|
-
export const updateTreasuryPromoRemindMeLaterClickedEpic = (actions$, _state$, zeniAPI) => actions$.pipe(filter(updateTreasuryPromoRemindMeLaterClicked.match), switchMap(() => {
|
|
7
|
-
return zeniAPI
|
|
8
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_video_remind_me_later_clicked: true })
|
|
9
|
-
.pipe(mergeMap((response) => {
|
|
10
|
-
if (isSuccessStatus(response)) {
|
|
11
|
-
return of(updateTreasuryPromoRemindMeLaterClickedForLoggedInUser(), updateTreasuryPromoRemindMeLaterClickedSuccess());
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
return of(updateTreasuryPromoRemindMeLaterClickedFailure(response.status));
|
|
15
|
-
}
|
|
16
|
-
}), catchError((error) => of(updateTreasuryPromoRemindMeLaterClickedFailure(createZeniAPIStatus('Unexpected error', 'Update treasury promo remind me later REST API call errored out' +
|
|
17
|
-
JSON.stringify(error))))));
|
|
18
|
-
}));
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
-
import { RootState } from '../../../../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
6
|
-
import { updateTreasuryPromoIntroClosedByOutsideClick, updateTreasuryPromoIntroClosedByOutsideClickFailure, updateTreasuryPromoIntroClosedByOutsideClickSuccess } from '../treasurySetupViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClick> | ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser> | ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClickSuccess> | ReturnType<typeof updateTreasuryPromoIntroClosedByOutsideClickFailure>;
|
|
8
|
-
export declare const updateTreasuryPromoIntroClosedByOutsideClickEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateTreasuryPromoIntroClosedByOutsideClickEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const tenantReducer_1 = require("../../../../../entity/tenant/tenantReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../../../responsePayload");
|
|
8
|
-
const treasurySetupViewReducer_1 = require("../treasurySetupViewReducer");
|
|
9
|
-
const updateTreasuryPromoIntroClosedByOutsideClickEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClick.match), (0, operators_1.switchMap)(() => {
|
|
10
|
-
return zeniAPI
|
|
11
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_intro_closed_by_outside_click: true })
|
|
12
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
-
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
14
|
-
return (0, rxjs_1.of)((0, tenantReducer_1.updateTreasuryPromoIntroClosedByOutsideClickForLoggedInUser)(), (0, treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClickSuccess)());
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClickFailure)(response.status));
|
|
18
|
-
}
|
|
19
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoIntroClosedByOutsideClickFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update treasury promo intro closed by outside click REST API call errored out' +
|
|
20
|
-
JSON.stringify(error))))));
|
|
21
|
-
}));
|
|
22
|
-
exports.updateTreasuryPromoIntroClosedByOutsideClickEpic = updateTreasuryPromoIntroClosedByOutsideClickEpic;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { updateTreasuryPromoRemindMeLaterClickedForLoggedInUser } from '../../../../../entity/tenant/tenantReducer';
|
|
4
|
-
import { RootState } from '../../../../../reducer';
|
|
5
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
6
|
-
import { updateTreasuryPromoRemindMeLaterClicked, updateTreasuryPromoRemindMeLaterClickedFailure, updateTreasuryPromoRemindMeLaterClickedSuccess } from '../treasurySetupViewReducer';
|
|
7
|
-
export type ActionType = ReturnType<typeof updateTreasuryPromoRemindMeLaterClicked> | ReturnType<typeof updateTreasuryPromoRemindMeLaterClickedForLoggedInUser> | ReturnType<typeof updateTreasuryPromoRemindMeLaterClickedSuccess> | ReturnType<typeof updateTreasuryPromoRemindMeLaterClickedFailure>;
|
|
8
|
-
export declare const updateTreasuryPromoRemindMeLaterClickedEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateTreasuryPromoRemindMeLaterClickedEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const tenantReducer_1 = require("../../../../../entity/tenant/tenantReducer");
|
|
7
|
-
const responsePayload_1 = require("../../../../../responsePayload");
|
|
8
|
-
const treasurySetupViewReducer_1 = require("../treasurySetupViewReducer");
|
|
9
|
-
const updateTreasuryPromoRemindMeLaterClickedEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClicked.match), (0, operators_1.switchMap)(() => {
|
|
10
|
-
return zeniAPI
|
|
11
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/user/self`, { is_treasury_promo_video_remind_me_later_clicked: true })
|
|
12
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
13
|
-
if ((0, responsePayload_1.isSuccessStatus)(response)) {
|
|
14
|
-
return (0, rxjs_1.of)((0, tenantReducer_1.updateTreasuryPromoRemindMeLaterClickedForLoggedInUser)(), (0, treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClickedSuccess)());
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
return (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClickedFailure)(response.status));
|
|
18
|
-
}
|
|
19
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, treasurySetupViewReducer_1.updateTreasuryPromoRemindMeLaterClickedFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected error', 'Update treasury promo remind me later REST API call errored out' +
|
|
20
|
-
JSON.stringify(error))))));
|
|
21
|
-
}));
|
|
22
|
-
exports.updateTreasuryPromoRemindMeLaterClickedEpic = updateTreasuryPromoRemindMeLaterClickedEpic;
|