@zeniai/client-epic-state 4.18.12 → 4.18.13
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/accountView/getNestedAccountIDHierarchyForReport.js +0 -2
- package/lib/commonStateTypes/accountView/nestedAccountID.d.ts +0 -1
- package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
- package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
- package/lib/entity/account/accountPayload.d.ts +0 -1
- package/lib/entity/account/accountPayload.js +1 -2
- package/lib/entity/account/accountSelector.d.ts +0 -3
- package/lib/entity/account/accountSelector.js +0 -2
- package/lib/entity/account/accountState.d.ts +1 -2
- package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +0 -1
- package/lib/entity/accountGroup/accountGroupSelector.d.ts +0 -22
- package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
- package/lib/entity/class/classReducer.d.ts +4 -4
- package/lib/entity/class/classState.d.ts +1 -1
- package/lib/entity/company/companyPayload.d.ts +0 -1
- package/lib/entity/company/companyPayload.js +4 -5
- package/lib/entity/company/companyStateTypes.d.ts +0 -1
- package/lib/entity/forecast/forecastState.d.ts +1 -1
- 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 +0 -1
- package/lib/epic.d.ts +1 -2
- package/lib/epic.js +1 -2
- package/lib/index.d.ts +2 -2
- package/lib/index.js +8 -9
- package/lib/view/accountMappingView/__mocks__/accountMappingSelectorMock.js +0 -29
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +0 -1
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +0 -2
- 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 -2
- package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -2
- package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
- package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
- package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
- package/lib/view/dashboard/dashboardSelector.js +8 -11
- package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
- package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
- package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.d.ts +1 -3
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.js +2 -31
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.d.ts +1 -2
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.js +2 -3
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewState.d.ts +0 -1
- package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
- package/lib/view/topEx/topExSelector.d.ts +1 -1
- package/package.json +1 -1
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/expressInterestChargeCardEpic.d.ts +0 -11
- package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/expressInterestChargeCardEpic.js +0 -48
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FetchStateAndError, FetchedState } from '../../../../commonStateTypes/common';
|
|
2
2
|
export interface ChargeCardSetupViewState extends FetchedState {
|
|
3
3
|
earlyPayFetchStatus: FetchStateAndError;
|
|
4
|
-
expressInterestInChargeCardStatus: FetchStateAndError;
|
|
5
4
|
isRefreshingViewInBackground: boolean;
|
|
6
5
|
chargeCardTermsDetails?: {
|
|
7
6
|
fetchStatus: FetchStateAndError;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RootState } from '../../reducer';
|
|
2
2
|
export declare const getTasksCardReport: (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"
|
|
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";
|
|
4
4
|
reportTitle: string;
|
|
5
5
|
version: string | number | undefined;
|
|
6
6
|
status: import("../..").Status | undefined;
|
|
@@ -4,7 +4,7 @@ import { RootState } from '../../reducer';
|
|
|
4
4
|
import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
|
|
5
5
|
import { TopExState } from './topExState';
|
|
6
6
|
export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number) => {
|
|
7
|
-
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"
|
|
7
|
+
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";
|
|
8
8
|
reportTitle: string;
|
|
9
9
|
version: string | number | undefined;
|
|
10
10
|
status: import("../..").Status | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.18.
|
|
3
|
+
"version": "4.18.13",
|
|
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
|
"types": "lib/index.d.ts",
|
package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/expressInterestChargeCardEpic.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ActionsObservable, StateObservable } from 'redux-observable';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { updateCompanies } from '../../../../../entity/company/companyReducer';
|
|
4
|
-
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
5
|
-
import { updateAllUsers } from '../../../../../entity/user/userReducer';
|
|
6
|
-
import { updateUserRoles } from '../../../../../entity/userRole/userRoleReducer';
|
|
7
|
-
import { RootState } from '../../../../../reducer';
|
|
8
|
-
import { ZeniAPI } from '../../../../../zeniAPI';
|
|
9
|
-
import { expressInterestInChargeCard, expressInterestInChargeCardFailure, expressInterestInChargeCardSuccess } from '../chargeCardSetUpViewReducer';
|
|
10
|
-
export type ActionType = ReturnType<typeof expressInterestInChargeCard> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof expressInterestInChargeCardSuccess> | ReturnType<typeof expressInterestInChargeCardFailure> | ReturnType<typeof openSnackbar>;
|
|
11
|
-
export declare const expressInterestChargeCardEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/expressInterestChargeCardEpic.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.expressInterestChargeCardEpic = void 0;
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const operators_1 = require("rxjs/operators");
|
|
6
|
-
const companyReducer_1 = require("../../../../../entity/company/companyReducer");
|
|
7
|
-
const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
|
|
8
|
-
const userReducer_1 = require("../../../../../entity/user/userReducer");
|
|
9
|
-
const userRoleReducer_1 = require("../../../../../entity/userRole/userRoleReducer");
|
|
10
|
-
const responsePayload_1 = require("../../../../../responsePayload");
|
|
11
|
-
const chargeCardSetUpViewReducer_1 = require("../chargeCardSetUpViewReducer");
|
|
12
|
-
const expressInterestChargeCardEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(chargeCardSetUpViewReducer_1.expressInterestInChargeCard.match), (0, operators_1.mergeMap)((action) => {
|
|
13
|
-
const { companyId } = action.payload;
|
|
14
|
-
const payload = {
|
|
15
|
-
is_company_interested_in_charge_card: true,
|
|
16
|
-
};
|
|
17
|
-
return zeniAPI
|
|
18
|
-
.putAndGetJSON(`${zeniAPI.apiEndPoints.tenantMicroServiceBaseUrl}/1.0/companies/${companyId}`, payload)
|
|
19
|
-
.pipe((0, operators_1.mergeMap)((response) => {
|
|
20
|
-
if ((0, responsePayload_1.isSuccessStatus)(response) && response.data != null) {
|
|
21
|
-
const actions = [
|
|
22
|
-
(0, userReducer_1.updateAllUsers)({ users: response.data.users }),
|
|
23
|
-
(0, userRoleReducer_1.updateUserRoles)(response.data.user_roles),
|
|
24
|
-
(0, companyReducer_1.updateCompanies)({
|
|
25
|
-
payload: response.data.companies,
|
|
26
|
-
schema: {},
|
|
27
|
-
}),
|
|
28
|
-
(0, chargeCardSetUpViewReducer_1.expressInterestInChargeCardSuccess)(),
|
|
29
|
-
];
|
|
30
|
-
return (0, rxjs_1.from)(actions);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
return (0, rxjs_1.of)((0, chargeCardSetUpViewReducer_1.expressInterestInChargeCardFailure)(response.status), (0, snackbarReducer_1.openSnackbar)({
|
|
34
|
-
messageSection: 'charge_card_express_interest',
|
|
35
|
-
messageText: 'failed',
|
|
36
|
-
type: 'error',
|
|
37
|
-
variables: [
|
|
38
|
-
{
|
|
39
|
-
variableName: '_api-error_',
|
|
40
|
-
variableValue: response.status.message,
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
}));
|
|
44
|
-
}
|
|
45
|
-
}), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, chargeCardSetUpViewReducer_1.expressInterestInChargeCardFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Express Interest in Charge Card errored out' +
|
|
46
|
-
JSON.stringify(error))))));
|
|
47
|
-
}));
|
|
48
|
-
exports.expressInterestChargeCardEpic = expressInterestChargeCardEpic;
|