@zeniai/client-epic-state 4.18.86 → 4.18.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonStateTypes/animations.d.ts +1 -1
- package/lib/commonStateTypes/animations.js +4 -0
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
- package/lib/entity/account/accountState.d.ts +1 -1
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/chargeCard/chargeCard.d.ts +2 -1
- package/lib/entity/chargeCard/chargeCard.js +2 -0
- package/lib/entity/chargeCard/chargeCardPayload.d.ts +2 -1
- package/lib/entity/chargeCard/chargeCardPayload.js +10 -9
- package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
- package/lib/entity/chargeCardTransaction/chargeCardTransactionPayload.d.ts +1 -2
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.d.ts +8 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksPayload.js +14 -0
- package/lib/entity/monthEndCloseChecks/monthEndCloseChecksState.d.ts +8 -0
- package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
- package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
- package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
- package/lib/entity/snackbar/snackbarTypes.js +12 -0
- package/lib/entity/tenant/tenantPayload.d.ts +1 -0
- package/lib/entity/tenant/tenantReducer.d.ts +1 -1
- package/lib/entity/tenant/tenantReducer.js +8 -2
- package/lib/entity/tenant/tenantState.d.ts +1 -0
- package/lib/epic.d.ts +13 -1
- package/lib/epic.js +13 -1
- package/lib/index.d.ts +14 -12
- package/lib/index.js +53 -30
- package/lib/init.d.ts +2 -1
- package/lib/init.js +3 -2
- package/lib/responsePayload.d.ts +3 -0
- package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
- package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
- package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.d.ts +2 -1
- package/lib/view/companyMonthEndReportView/companyMonthEndReportViewReducer.js +10 -2
- package/lib/view/companyMonthEndReportView/epics/fetchCompanyMonthEndReportViewEpic.js +2 -4
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/dashboard/dashboardSelector.d.ts +2 -1
- package/lib/view/dashboard/dashboardSelector.js +14 -6
- package/lib/view/dashboardLayout/dashboardLayoutReducer.js +1 -0
- package/lib/view/dashboardLayout/fetchDashboardLayoutEpic.js +14 -1
- package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +1 -1
- package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.d.ts +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/markTransactionAsNotMiscategorizedEpic.js +13 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/saveTransactionCategorizationEpic.js +2 -2
- package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +2 -2
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +6 -3
- package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +6 -3
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthClosePerformanceTrendEpic.d.ts +7 -0
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthClosePerformanceTrendEpic.js +47 -0
- package/lib/view/monthEndCloseChecksView/epics/fetchMonthEndCloseChecksEpic.js +1 -1
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewPayload.d.ts +8 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.d.ts +11 -1
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewReducer.js +47 -3
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.d.ts +2 -0
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewSelector.js +13 -6
- package/lib/view/monthEndCloseChecksView/monthEndCloseChecksViewState.d.ts +7 -1
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +17 -2
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +38 -3
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailPayload.d.ts +11 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +40 -4
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +189 -26
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +19 -1
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +87 -12
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/closeChargeCardEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/closeChargeCardEpic.js +71 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardsRecurringExpensesEpic.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardsRecurringExpensesEpic.js +44 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchDepositAccountLimitEpic.js +4 -4
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/lockChargeCardEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/lockChargeCardEpic.js +78 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/unlockChargeCardEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/unlockChargeCardEpic.js +75 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateChargeCardNameEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateChargeCardNameEpic.js +83 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +7 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +1 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +34 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +142 -3
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +46 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +198 -4
- package/lib/view/spendManagement/chargeCards/chargeCardList/closeChargeCardsEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/closeChargeCardsEpic.js +69 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.d.ts +3 -1
- package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +18 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/lockChargeCardsEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/lockChargeCardsEpic.js +69 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/revokeChargeCardsInviteEpic.d.ts +8 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/revokeChargeCardsInviteEpic.js +71 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/unlockChargeCardsEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/unlockChargeCardsEpic.js +68 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/updateChargeCardsLimitEpic.d.ts +9 -0
- package/lib/view/spendManagement/chargeCards/chargeCardList/updateChargeCardsLimitEpic.js +76 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.d.ts +8 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/epic/updateTreasuryVideoViewedEpic.js +22 -0
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.d.ts +1 -1
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewReducer.js +24 -2
- package/lib/view/spendManagement/treasury/treasurySetUp/treasurySetupViewState.d.ts +1 -0
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/lib/zeniAPI.d.ts +12 -1
- package/lib/zeniAPI.js +33 -6
- package/package.json +1 -1
|
@@ -4,7 +4,9 @@ import { SelectorView } from '../../commonStateTypes/viewAndReport/viewAndReport
|
|
|
4
4
|
import { MonthEndAuditSummary, MonthEndCloseChecksInfo } from '../../entity/monthEndCloseChecks/monthEndCloseChecksState';
|
|
5
5
|
import { CurrentTenant } from '../../entity/tenant/tenantSelector';
|
|
6
6
|
import { RootState } from '../../reducer';
|
|
7
|
+
import { MonthClosePerformanceTrend } from './monthEndCloseChecksViewState';
|
|
7
8
|
export interface MonthEndCloseChecksView extends SelectorView {
|
|
9
|
+
monthClosePerformanceTrend: MonthClosePerformanceTrend[];
|
|
8
10
|
refreshStatus: FetchStateAndError;
|
|
9
11
|
selectedPeriod: MonthYearPeriod;
|
|
10
12
|
monthEndCloseChecks?: MonthEndCloseChecksInfo;
|
|
@@ -7,6 +7,7 @@ exports.getMonthEndCloseChecksViewByTenantId = exports.isMonthEndInsightDisabled
|
|
|
7
7
|
const toolkit_1 = require("@reduxjs/toolkit");
|
|
8
8
|
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
9
9
|
const formatZeniDateFY_1 = require("../../commonStateTypes/fiscalYearHelpers/formatZeniDateFY");
|
|
10
|
+
const reduceFetchState_1 = require("../../commonStateTypes/reduceFetchState");
|
|
10
11
|
const timePeriod_1 = require("../../commonStateTypes/timePeriod");
|
|
11
12
|
const monthEndCloseChecksSelector_1 = require("../../entity/monthEndCloseChecks/monthEndCloseChecksSelector");
|
|
12
13
|
const fetchAllTenantsEpic_1 = require("../../entity/tenant/epic/fetchAllTenantsEpic");
|
|
@@ -40,14 +41,15 @@ const isMonthEndInsightDisabled = (currentTenant, selectedPeriod, userAllowedToA
|
|
|
40
41
|
};
|
|
41
42
|
exports.isMonthEndInsightDisabled = isMonthEndInsightDisabled;
|
|
42
43
|
exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((state) => state.monthEndCloseChecksState, (state) => state.monthEndCloseChecksViewState, (state) => state.expenseAutomationViewState, (state) => (0, tenantSelector_1.getCurrentTenant)(state), (state) => state.companyState, (state) => state.tenantState, (_state, tenantId) => tenantId, (monthEndCloseChecksState, monthEndCloseChecksViewState, expenseAutomationViewState, currentTenant, companyState, tenantState, tenantId) => {
|
|
43
|
-
var _a, _b, _c;
|
|
44
|
+
var _a, _b, _c, _d, _e;
|
|
44
45
|
const { refreshStatus } = monthEndCloseChecksViewState;
|
|
45
46
|
const { loggedInUser } = tenantState;
|
|
46
47
|
const selectedPeriod = (_a = expenseAutomationViewState.selectedPeriodByTenantId[tenantId]) !== null && _a !== void 0 ? _a : fetchAllTenantsEpic_1.defaultMonthYearPeriod;
|
|
47
|
-
const { monthEndCloseChecksViewByTenantId } = monthEndCloseChecksViewState;
|
|
48
|
+
const { monthEndCloseChecksViewByTenantId, monthClosePerformanceTrend, monthClosePerformanceTrendFetchStatus, } = monthEndCloseChecksViewState;
|
|
49
|
+
const monthClosePerformanceTrendForSelectedPeriod = (_b = monthClosePerformanceTrend[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]) !== null && _b !== void 0 ? _b : [];
|
|
48
50
|
const monthYearPeriodId = selectedPeriod != null ? (0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod) : null;
|
|
49
51
|
const monthEndCloseChecksView = monthYearPeriodId != null
|
|
50
|
-
? (
|
|
52
|
+
? (_c = monthEndCloseChecksViewByTenantId[tenantId]) === null || _c === void 0 ? void 0 : _c[monthYearPeriodId]
|
|
51
53
|
: undefined;
|
|
52
54
|
const monthEndCloseChecks = monthYearPeriodId != null
|
|
53
55
|
? (0, monthEndCloseChecksSelector_1.getMonthEndCloseChecksByTenantId)(monthEndCloseChecksState, tenantId, monthYearPeriodId)
|
|
@@ -59,7 +61,7 @@ exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((st
|
|
|
59
61
|
const currentCompany = companyState.companiesById[currentTenant.companyId];
|
|
60
62
|
const managementInfo = currentCompany === null || currentCompany === void 0 ? void 0 : currentCompany.managementInfo;
|
|
61
63
|
const preparerUserIds = managementInfo != null ? managementInfo.preparerUserIds : [];
|
|
62
|
-
const isZeniUser = Boolean((
|
|
64
|
+
const isZeniUser = Boolean((_d = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.userEmail) === null || _d === void 0 ? void 0 : _d.includes('zeni.ai'));
|
|
63
65
|
const isPreparer = loggedInUser != null && preparerUserIds.includes(loggedInUser.userId);
|
|
64
66
|
const userAllowedToAccessMonthEndInsights = isZeniUser === false || isPreparer === false;
|
|
65
67
|
const monthEndCloseCheckListWithDisabledState = sortedMonthEndCloseCheckList.map((check) => {
|
|
@@ -71,8 +73,12 @@ exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((st
|
|
|
71
73
|
}
|
|
72
74
|
return check;
|
|
73
75
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
const combinedFetchState = (0, reduceFetchState_1.reduceAnyFetchState)([
|
|
77
|
+
monthEndCloseChecksView,
|
|
78
|
+
(_e = monthClosePerformanceTrendFetchStatus[(0, timePeriod_1.toMonthYearPeriodId)(selectedPeriod)]) !== null && _e !== void 0 ? _e : { fetchState: 'Not-Started' },
|
|
79
|
+
]);
|
|
80
|
+
return Object.assign(Object.assign({}, monthEndCloseChecksView), { fetchState: combinedFetchState.fetchState, error: combinedFetchState.error, monthEndCloseChecks: Object.assign(Object.assign({}, monthEndCloseChecks), { monthEndCloseCheckList: monthEndCloseCheckListWithDisabledState }), reportId: 'expense_automation_card', selectedPeriod,
|
|
81
|
+
refreshStatus, monthClosePerformanceTrend: monthClosePerformanceTrendForSelectedPeriod });
|
|
76
82
|
}
|
|
77
83
|
return {
|
|
78
84
|
fetchState: 'Not-Started',
|
|
@@ -80,5 +86,6 @@ exports.getMonthEndCloseChecksViewByTenantId = (0, toolkit_1.createSelector)((st
|
|
|
80
86
|
reportId: 'expense_automation_card',
|
|
81
87
|
selectedPeriod,
|
|
82
88
|
refreshStatus,
|
|
89
|
+
monthClosePerformanceTrend: monthClosePerformanceTrendForSelectedPeriod,
|
|
83
90
|
};
|
|
84
91
|
});
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { FetchStateAndError, ID } from '../../commonStateTypes/common';
|
|
2
|
-
import { MonthYearPeriodId } from '../../commonStateTypes/timePeriod';
|
|
2
|
+
import { MonthYearPeriod, MonthYearPeriodId } from '../../commonStateTypes/timePeriod';
|
|
3
|
+
export interface MonthClosePerformanceTrend {
|
|
4
|
+
auditScore: number;
|
|
5
|
+
period: MonthYearPeriod;
|
|
6
|
+
}
|
|
3
7
|
export interface MonthEndCloseChecksViewState {
|
|
8
|
+
monthClosePerformanceTrend: Record<MonthYearPeriodId, MonthClosePerformanceTrend[]>;
|
|
9
|
+
monthClosePerformanceTrendFetchStatus: Record<MonthYearPeriodId, FetchStateAndError>;
|
|
4
10
|
monthEndCloseChecksViewByTenantId: Record<ID, Record<MonthYearPeriodId, FetchStateAndError>>;
|
|
5
11
|
refreshStatus: FetchStateAndError;
|
|
6
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getReimbursementCardReport: (state: RootState) => {
|
|
3
|
-
reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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";
|
|
3
|
+
reportId: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
fetchState: import("../..").FetchState;
|
|
@@ -2,8 +2,8 @@ import { ReportID } from '../../commonStateTypes/viewAndReport/viewAndReport';
|
|
|
2
2
|
import { ZeniAPIStatus } from '../../responsePayload';
|
|
3
3
|
import { ReportsResyncState } from './reportsResyncState';
|
|
4
4
|
export declare const initialReportsResyncState: ReportsResyncState;
|
|
5
|
-
export declare const initiateReportsResync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportIdToResync: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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"], {
|
|
6
|
-
reportIdToResync: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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";
|
|
5
|
+
export declare const initiateReportsResync: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[reportIdToResync: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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"], {
|
|
6
|
+
reportIdToResync: "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" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "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" | "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";
|
|
7
7
|
}, "initiateReportsResync/initiateReportsResync", never, never>, initiateReportsClassViewRefetching: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
8
8
|
reportIdToResync: ReportID;
|
|
9
9
|
}, "initiateReportsResync/initiateReportsClassViewRefetching">, reportsResyncSuccess: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -1,22 +1,36 @@
|
|
|
1
|
+
import { Amount } from '../../../../commonStateTypes/amount';
|
|
1
2
|
import { FetchStateAndError, FetchedState, ID } from '../../../../commonStateTypes/common';
|
|
2
3
|
import { SortOrder } from '../../../../commonStateTypes/selectorTypes/sortOrderTypes';
|
|
3
4
|
import { PageToken } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
5
|
+
import { ChargeCardMerchant } from '../../../../entity/chargeCardTransaction/chargeCardTransaction';
|
|
4
6
|
import { Attachment } from '../../../../entity/transaction/stateTypes/attachment';
|
|
5
|
-
import {
|
|
7
|
+
import { ZeniDate } from '../../../../zeniDayJS';
|
|
8
|
+
import { ChargeCardTransactionStatisticsPayload, RecurringExpensePayload } from './chargeCardDetailPayload';
|
|
6
9
|
export declare const VISA_EOD_CORRECTION_TRANSACTION_TYPE_NAME = "Card Transaction";
|
|
7
10
|
export interface ChargeCardDetailState {
|
|
11
|
+
depositAccountLimitFetchStateByDepositAccountId: Record<ID, FetchStateAndError>;
|
|
8
12
|
detailById: Record<ID, ChargeCardDetail>;
|
|
13
|
+
recurringExpensesByChargeCardId: Record<ID, RecurringExpense[]>;
|
|
14
|
+
recurringExpensesFetchState: FetchStateAndError;
|
|
15
|
+
}
|
|
16
|
+
export interface RecurringExpense {
|
|
17
|
+
amount: Amount;
|
|
18
|
+
merchant: ChargeCardMerchant;
|
|
19
|
+
nextPaymentDate: ZeniDate;
|
|
9
20
|
}
|
|
10
21
|
interface ChargeCardDetail extends FetchedState {
|
|
22
|
+
closeChargeCardFetchState: FetchStateAndError;
|
|
11
23
|
cvvActivationWaitStatus: FetchStateAndError;
|
|
12
24
|
debitCardSetPinWaitStatus: FetchStateAndError;
|
|
13
|
-
depositAccountLimitFetchState: FetchStateAndError;
|
|
14
25
|
id: ID;
|
|
15
26
|
isRefreshingViewInBackground: boolean;
|
|
27
|
+
lockChargeCardFetchState: FetchStateAndError;
|
|
16
28
|
transactionList: ChargeCardDetailTransactionList;
|
|
17
29
|
transactionStatistics: TransactionStatistics;
|
|
18
30
|
twoFAState: TwoFAState;
|
|
31
|
+
unlockChargeCardFetchState: FetchStateAndError;
|
|
19
32
|
updateChargeCardLimitFetchState: FetchStateAndError;
|
|
33
|
+
updateChargeCardNameFetchState: FetchStateAndError;
|
|
20
34
|
updateDebitCardPinAttemptFetchState: FetchStateAndError;
|
|
21
35
|
updatePhysicalChargeCardAttemptFetchState: FetchStateAndError;
|
|
22
36
|
updateStatus: FetchStateAndError;
|
|
@@ -68,4 +82,5 @@ export interface ChargeCardTransactionStatistics {
|
|
|
68
82
|
totalNumberOfTransactionsWithReceipts: number;
|
|
69
83
|
}
|
|
70
84
|
export declare const mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics: (statistics: ChargeCardTransactionStatisticsPayload) => ChargeCardTransactionStatistics;
|
|
85
|
+
export declare const mapRecurringExpensePayloadToRecurringExpense: (recurringExpense: RecurringExpensePayload) => RecurringExpense;
|
|
71
86
|
export {};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics = exports.emptyChargeCardDetail = exports.initialTransactionStatistics = exports.initialTransactionAttachments = exports.toChargeCardTransactionSortKeyType = exports.VISA_EOD_CORRECTION_TRANSACTION_TYPE_NAME = void 0;
|
|
3
|
+
exports.mapRecurringExpensePayloadToRecurringExpense = exports.mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics = exports.emptyChargeCardDetail = exports.initialTransactionStatistics = exports.initialTransactionAttachments = exports.toChargeCardTransactionSortKeyType = exports.VISA_EOD_CORRECTION_TRANSACTION_TYPE_NAME = void 0;
|
|
4
|
+
const urlPayload_1 = require("../../../../commonPayloadTypes/urlPayload");
|
|
5
|
+
const amount_1 = require("../../../../commonStateTypes/amount");
|
|
4
6
|
const stringToUnion_1 = require("../../../../commonStateTypes/stringToUnion");
|
|
7
|
+
const zeniDayJS_1 = require("../../../../zeniDayJS");
|
|
5
8
|
exports.VISA_EOD_CORRECTION_TRANSACTION_TYPE_NAME = 'Card Transaction';
|
|
6
9
|
const ALL_CHARGE_CARD_TRANSACTION_SORT_KEYS = [
|
|
7
10
|
'merchant',
|
|
@@ -48,12 +51,20 @@ exports.emptyChargeCardDetail = {
|
|
|
48
51
|
otpChallenge: undefined,
|
|
49
52
|
},
|
|
50
53
|
isRefreshingViewInBackground: false,
|
|
51
|
-
|
|
54
|
+
id: '',
|
|
55
|
+
updateChargeCardNameFetchState: {
|
|
56
|
+
fetchState: 'Not-Started',
|
|
57
|
+
error: undefined,
|
|
58
|
+
},
|
|
59
|
+
lockChargeCardFetchState: {
|
|
52
60
|
fetchState: 'Not-Started',
|
|
53
61
|
error: undefined,
|
|
54
62
|
},
|
|
55
|
-
id: '',
|
|
56
63
|
fetchState: 'Not-Started',
|
|
64
|
+
closeChargeCardFetchState: {
|
|
65
|
+
fetchState: 'Not-Started',
|
|
66
|
+
error: undefined,
|
|
67
|
+
},
|
|
57
68
|
cvvActivationWaitStatus: {
|
|
58
69
|
fetchState: 'Not-Started',
|
|
59
70
|
error: undefined,
|
|
@@ -100,6 +111,10 @@ exports.emptyChargeCardDetail = {
|
|
|
100
111
|
error: undefined,
|
|
101
112
|
},
|
|
102
113
|
transactionStatistics: exports.initialTransactionStatistics,
|
|
114
|
+
unlockChargeCardFetchState: {
|
|
115
|
+
fetchState: 'Not-Started',
|
|
116
|
+
error: undefined,
|
|
117
|
+
},
|
|
103
118
|
};
|
|
104
119
|
const mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics = (statistics) => {
|
|
105
120
|
return {
|
|
@@ -116,3 +131,23 @@ const mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics
|
|
|
116
131
|
};
|
|
117
132
|
};
|
|
118
133
|
exports.mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics = mapChargeCardTransactionStatisticsPayloadToChargeCardTransactionStatistics;
|
|
134
|
+
const mapRecurringExpensePayloadToRecurringExpense = (recurringExpense) => {
|
|
135
|
+
var _a;
|
|
136
|
+
return {
|
|
137
|
+
amount: (0, amount_1.toAmount)(recurringExpense.amount, recurringExpense.currency_code, recurringExpense.currency_symbol),
|
|
138
|
+
nextPaymentDate: (0, zeniDayJS_1.date)(recurringExpense.next_payment_date),
|
|
139
|
+
merchant: {
|
|
140
|
+
name: recurringExpense.merchant.name,
|
|
141
|
+
brandName: recurringExpense.merchant.brand_name != null
|
|
142
|
+
? recurringExpense.merchant.brand_name
|
|
143
|
+
: undefined,
|
|
144
|
+
logo: recurringExpense.merchant.logo != null
|
|
145
|
+
? {
|
|
146
|
+
url: (0, urlPayload_1.toURL)(recurringExpense.merchant.logo),
|
|
147
|
+
base64: (_a = recurringExpense.merchant.logo.base64) !== null && _a !== void 0 ? _a : undefined,
|
|
148
|
+
}
|
|
149
|
+
: undefined,
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
exports.mapRecurringExpensePayloadToRecurringExpense = mapRecurringExpensePayloadToRecurringExpense;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AddressPayload } from '../../../../entity/address/addressPayload';
|
|
2
2
|
import { ChargeCardPayload } from '../../../../entity/chargeCard/chargeCardPayload';
|
|
3
|
-
import { ChargeCardTransactionPayload } from '../../../../entity/chargeCardTransaction/chargeCardTransactionPayload';
|
|
3
|
+
import { ChargeCardMerchantPayload, ChargeCardTransactionPayload } from '../../../../entity/chargeCardTransaction/chargeCardTransactionPayload';
|
|
4
4
|
import { ConnectedAccountPayload } from '../../../../entity/connectedAccount/connectedAccountPayload';
|
|
5
|
+
import { AmountPayload } from '../../../../entity/reimbursement/reimbursementPayload';
|
|
5
6
|
import { AttachmentPayload } from '../../../../entity/transaction/payloadTypes/attachmentPayload';
|
|
6
7
|
import { UserPayload } from '../../../../entity/user/userPayload';
|
|
7
8
|
import { UserRolePayload } from '../../../../entity/userRole/userRolePayload';
|
|
@@ -45,4 +46,13 @@ export interface ChargeCardTransactionStatisticsPayload {
|
|
|
45
46
|
total_number_of_paid_transactions: number;
|
|
46
47
|
total_number_of_transactions_with_receipts: number;
|
|
47
48
|
}
|
|
49
|
+
export interface RecurringExpensePayload extends AmountPayload {
|
|
50
|
+
merchant: ChargeCardMerchantPayload;
|
|
51
|
+
next_payment_date: string;
|
|
52
|
+
}
|
|
53
|
+
interface ChargeCardRecurringExpensePayload {
|
|
54
|
+
card_id: string;
|
|
55
|
+
expenses: RecurringExpensePayload[];
|
|
56
|
+
}
|
|
57
|
+
export type FetchChargeCardRecurringExpensesResponse = ZeniAPIResponse<ChargeCardRecurringExpensePayload[]>;
|
|
48
58
|
export {};
|
|
@@ -3,7 +3,7 @@ import { FetchState, ID } from '../../../../commonStateTypes/common';
|
|
|
3
3
|
import { PageToken } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
|
|
4
4
|
import { AttachmentPayload } from '../../../../entity/transaction/payloadTypes/attachmentPayload';
|
|
5
5
|
import { ZeniAPIStatus } from '../../../../responsePayload';
|
|
6
|
-
import { ChargeCardDetailState, ChargeCardDetailUiState } from './chargeCardDetail';
|
|
6
|
+
import { ChargeCardDetailState, ChargeCardDetailUiState, RecurringExpense } from './chargeCardDetail';
|
|
7
7
|
import { ChargeCardTransactionListPayload, ChargeCardTransactionStatisticsPayload } from './chargeCardDetailPayload';
|
|
8
8
|
export declare const initialState: ChargeCardDetailState;
|
|
9
9
|
export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, doFetchCreditAccounts: boolean, isCreditCardEnabled: boolean, cacheOverride?: any], {
|
|
@@ -97,11 +97,40 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
97
97
|
chargeCardId: ID;
|
|
98
98
|
fetchState: FetchState;
|
|
99
99
|
error?: ZeniAPIStatus;
|
|
100
|
-
}, "chargeCardDetail/updateChargeCardSpendLimitSuccessOrFailure">,
|
|
100
|
+
}, "chargeCardDetail/updateChargeCardSpendLimitSuccessOrFailure">, updateChargeCardName: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isChargeCardAdmin: boolean, chargeCardId: string, name: string], {
|
|
101
|
+
isChargeCardAdmin: boolean;
|
|
102
|
+
chargeCardId: string;
|
|
103
|
+
name: string;
|
|
104
|
+
}, "chargeCardDetail/updateChargeCardName", never, never>, updateChargeCardNameSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
105
|
+
chargeCardId: ID;
|
|
106
|
+
fetchState: FetchState;
|
|
107
|
+
error?: ZeniAPIStatus;
|
|
108
|
+
}, "chargeCardDetail/updateChargeCardNameSuccessOrFailure">, lockChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isChargeCardAdmin: boolean, chargeCardId: string, reason?: string | undefined], {
|
|
109
|
+
isChargeCardAdmin: boolean;
|
|
110
|
+
chargeCardId: string;
|
|
111
|
+
reason: string | undefined;
|
|
112
|
+
}, "chargeCardDetail/lockChargeCard", never, never>, lockChargeCardSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
101
113
|
chargeCardId: ID;
|
|
114
|
+
fetchState: FetchState;
|
|
115
|
+
error?: ZeniAPIStatus;
|
|
116
|
+
}, "chargeCardDetail/lockChargeCardSuccessOrFailure">, unlockChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isChargeCardAdmin: boolean, chargeCardId: string], {
|
|
117
|
+
chargeCardId: string;
|
|
118
|
+
isChargeCardAdmin: boolean;
|
|
119
|
+
}, "chargeCardDetail/unlockChargeCard", never, never>, unlockChargeCardSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
120
|
+
chargeCardId: ID;
|
|
121
|
+
fetchState: FetchState;
|
|
122
|
+
error?: ZeniAPIStatus;
|
|
123
|
+
}, "chargeCardDetail/unlockChargeCardSuccessOrFailure">, closeChargeCard: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[chargeCardId: string, reason?: string | undefined], {
|
|
124
|
+
chargeCardId: string;
|
|
125
|
+
reason: string | undefined;
|
|
126
|
+
}, "chargeCardDetail/closeChargeCard", never, never>, closeChargeCardSuccessOrFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
127
|
+
chargeCardId: ID;
|
|
128
|
+
fetchState: FetchState;
|
|
129
|
+
error?: ZeniAPIStatus;
|
|
130
|
+
}, "chargeCardDetail/closeChargeCardSuccessOrFailure">, fetchDepositAccountLimit: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
102
131
|
depositAccountId: ID;
|
|
103
132
|
}, "chargeCardDetail/fetchDepositAccountLimit">, updateDepositAccountLimitFetchStatus: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
104
|
-
|
|
133
|
+
depositAccountId: ID;
|
|
105
134
|
fetchState: FetchState;
|
|
106
135
|
error?: ZeniAPIStatus;
|
|
107
136
|
}, "chargeCardDetail/updateDepositAccountLimitFetchStatus">, fetchChargeCardTransactionStatistics: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
@@ -113,7 +142,14 @@ export declare const fetchChargeCardDetailPage: import("@reduxjs/toolkit").Actio
|
|
|
113
142
|
chargeCardId: ID;
|
|
114
143
|
fetchState: FetchState;
|
|
115
144
|
error?: ZeniAPIStatus;
|
|
116
|
-
}, "chargeCardDetail/updateChargeCardTransactionStatisticsFetchState">,
|
|
145
|
+
}, "chargeCardDetail/updateChargeCardTransactionStatisticsFetchState">, fetchChargeCardsRecurringExpenses: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[cardIds: string[]], {
|
|
146
|
+
cardIds: string[];
|
|
147
|
+
}, "chargeCardDetail/fetchChargeCardsRecurringExpenses", never, never>, updateChargeCardsRecurringExpenses: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
148
|
+
recurringExpensesByChargeCardId: Record<ID, RecurringExpense[]>;
|
|
149
|
+
}, "chargeCardDetail/updateChargeCardsRecurringExpenses">, updateChargeCardsRecurringExpensesFetchState: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
150
|
+
fetchState: FetchState;
|
|
151
|
+
error?: ZeniAPIStatus;
|
|
152
|
+
}, "chargeCardDetail/updateChargeCardsRecurringExpensesFetchState">, sendOtpCardHolder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
117
153
|
chargeCardId: ID;
|
|
118
154
|
phone: string;
|
|
119
155
|
}, "chargeCardDetail/sendOtpCardHolder">, resendOtpCardHolder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|