@zeniai/client-epic-state 4.11.67 → 4.11.69
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/view/cardPayment/epic/fetchPaymentSourcesEpic.js +6 -8
- package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.d.ts +3 -2
- package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +3 -0
- package/package.json +1 -1
|
@@ -13,14 +13,12 @@ const fetchPaymentSourcesEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0
|
|
|
13
13
|
const fetchPaymentSourcesApi$ = zeniAPI.getJSON(`${zeniAPI.apiEndPoints.accountMicroServiceBaseUrl}/1.0/subscriptions/payment-sources?query=${encodeURIComponent(JSON.stringify(queryParams))}`);
|
|
14
14
|
return fetchPaymentSourcesApi$.pipe((0, operators_1.mergeMap)((response) => {
|
|
15
15
|
if ((0, responsePayload_1.isSuccessResponse)(response) && response.data) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}),
|
|
23
|
-
]);
|
|
16
|
+
const actions = [];
|
|
17
|
+
actions.push((0, cardPaymentReducer_1.updateCardPayments)(response.data.payment_sources.cards), (0, subscriptionPaymentAccountReducer_1.updateSubscriptionPaymentAccounts)(response.data.payment_sources.bank_accounts), (0, cardPaymentViewReducer_1.updatePaymentSources)({
|
|
18
|
+
fetchState: 'Completed',
|
|
19
|
+
response: response.data,
|
|
20
|
+
}));
|
|
21
|
+
return (0, rxjs_1.from)(actions);
|
|
24
22
|
}
|
|
25
23
|
else {
|
|
26
24
|
return (0, rxjs_1.from)([
|
package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.d.ts
CHANGED
|
@@ -5,10 +5,11 @@ import { ZeniAPI } from '../../../../../zeniAPI';
|
|
|
5
5
|
import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
|
|
6
6
|
import { updateAccounts } from '../../../../../entity/account/accountReducer';
|
|
7
7
|
import { updatePaymentAccounts } from '../../../../../entity/paymentAccount/paymentAccountReducer';
|
|
8
|
-
import { establishPlaidConnection, establishPlaidConnectionSuccess, establishPlaidConnectionFailure } from '../../plaidAccountViewReducer';
|
|
8
|
+
import { establishPlaidConnection, establishPlaidConnectionSuccess, establishPlaidConnectionFailure, getPaymentAccounts } from '../../plaidAccountViewReducer';
|
|
9
9
|
import { updateBankAccounts } from '../../../../../entity/bankAccount/bankAccountReducer';
|
|
10
10
|
import { updateUserBankAccount } from '../../../../userFinancialAccount/userFinancialAccountReducer';
|
|
11
11
|
import { updatePaymentAccountList } from '../../../zeniAccounts/paymentAccountList/paymentAccountListReducer';
|
|
12
12
|
import { updateCompanyPrimaryAccount } from '../../../../../entity/company/companyReducer';
|
|
13
|
-
|
|
13
|
+
import { fetchBillingAccountsView } from '../../../../settingsView/settingsViewReducer';
|
|
14
|
+
export declare type ActionType = ReturnType<typeof establishPlaidConnection> | ReturnType<typeof updateAccounts> | ReturnType<typeof updateBankAccounts> | ReturnType<typeof updateUserBankAccount> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof openSnackbar> | ReturnType<typeof updatePaymentAccountList> | ReturnType<typeof getPaymentAccounts> | ReturnType<typeof establishPlaidConnectionSuccess> | ReturnType<typeof establishPlaidConnectionFailure> | ReturnType<typeof fetchBillingAccountsView> | ReturnType<typeof updateCompanyPrimaryAccount>;
|
|
14
15
|
export declare const establishPlaidConnectionEpic: (actions$: ActionsObservable<ActionType>, state: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js
CHANGED
|
@@ -57,6 +57,9 @@ const establishPlaidConnectionEpic = (actions$, state, zeniAPI) => actions$.pipe
|
|
|
57
57
|
const primaryAccountForProducts = [];
|
|
58
58
|
// if the account added is primary for any product, it should be reflected on that setup page without refresh also
|
|
59
59
|
// this happens when the first external account is added - it becomes primary for rest of the products also
|
|
60
|
+
if (setupViewType === 'billing') {
|
|
61
|
+
actions.push((0, plaidAccountViewReducer_1.getPaymentAccounts)(setupViewType, plaidAccountKeyType, false));
|
|
62
|
+
}
|
|
60
63
|
if (paymentAccount.is_primary_for_bill_pay === true) {
|
|
61
64
|
primaryAccountForProducts.push('bill_pay');
|
|
62
65
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.69",
|
|
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",
|