@zeniai/client-epic-state 4.10.47 → 4.10.48

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.
Files changed (69) hide show
  1. package/lib/entity/paymentAccount/paymentAccountSelector.d.ts +1 -0
  2. package/lib/entity/paymentAccount/paymentAccountSelector.js +5 -1
  3. package/lib/entity/tenant/clearAllEpic.d.ts +1 -2
  4. package/lib/entity/tenant/clearAllEpic.js +0 -2
  5. package/lib/epic.d.ts +6 -6
  6. package/lib/epic.js +6 -6
  7. package/lib/index.d.ts +3 -6
  8. package/lib/index.js +15 -18
  9. package/lib/reducer.d.ts +0 -3
  10. package/lib/reducer.js +0 -3
  11. package/lib/view/onboardingView/customerView/epic/plaidConnection/getOnboardingPlaidLinkTokenEpic.js +1 -1
  12. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +2 -2
  13. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +1 -2
  14. package/lib/view/onboardingView/customerView/onboardingCustomerViewState.d.ts +1 -2
  15. package/lib/view/settingsView/epic/fetchBankConnectionsViewEpic.d.ts +1 -1
  16. package/lib/view/settingsView/epic/fetchBankConnectionsViewEpic.js +2 -2
  17. package/lib/view/settingsView/settingsViewSelector.js +3 -3
  18. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +2 -3
  19. package/lib/view/spendManagement/billPay/billPaySetupView/billPaySetupViewSelector.js +1 -1
  20. package/lib/view/spendManagement/billPay/billPaySetupView/epic/billPaySetup/fetchBillPaySetupViewEpic.d.ts +2 -3
  21. package/lib/view/spendManagement/billPay/billPaySetupView/epic/billPaySetup/fetchBillPaySetupViewEpic.js +4 -5
  22. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +2 -3
  23. package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.d.ts +1 -1
  24. package/lib/view/spendManagement/billPay/editBillView/epics/fetchEditBillDetailPageEpic.js +5 -5
  25. package/lib/view/spendManagement/billPay/editBillView/epics/initializeBillToLocalStoreEpic.d.ts +1 -1
  26. package/lib/view/spendManagement/billPay/internationalWire/epics/initializeInternationalWireLocalDataEpic.js +2 -2
  27. package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.js +2 -2
  28. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.js +1 -1
  29. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/fetchChargeCardSetupViewEpic.d.ts +2 -3
  30. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/fetchChargeCardSetupViewEpic.js +4 -5
  31. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/paymentAccounts/getPaymentAccountsEpic.d.ts +1 -1
  32. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/paymentAccounts/getPaymentAccountsEpic.js +6 -6
  33. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/paymentAccounts/updatePaymentAccountEpic.d.ts +1 -1
  34. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/paymentAccounts/updatePaymentAccountEpic.js +6 -6
  35. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/paymentAccounts/updatePaymentAccountLoginStatusEpic.d.ts +1 -1
  36. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/paymentAccounts/updatePaymentAccountLoginStatusEpic.js +7 -7
  37. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/paymentAccounts/updatePaymentAccountStatusEpic.d.ts +1 -1
  38. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/paymentAccounts/updatePaymentAccountStatusEpic.js +7 -7
  39. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/plaidConnection/establishPlaidConnectionEpic.d.ts +2 -2
  40. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/plaidConnection/establishPlaidConnectionEpic.js +7 -7
  41. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/plaidConnection/getPlaidLinkTokenEpic.d.ts +2 -2
  42. package/lib/view/spendManagement/{plaidAccount → commonSetup}/epic/plaidConnection/getPlaidLinkTokenEpic.js +6 -6
  43. package/lib/view/spendManagement/commonSetup/setupViewPayload.d.ts +1 -1
  44. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +59 -3
  45. package/lib/view/spendManagement/commonSetup/setupViewReducer.js +334 -2
  46. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +2 -3
  47. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -12
  48. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +14 -0
  49. package/lib/view/spendManagement/reimbursement/remiSetupView/epic/remiSetup/fetchRemiSetupViewEpic.d.ts +2 -3
  50. package/lib/view/spendManagement/reimbursement/remiSetupView/epic/remiSetup/fetchRemiSetupViewEpic.js +4 -5
  51. package/lib/view/spendManagement/reimbursement/remiSetupView/epic/remiSetup/updateMileageDetailsEpic.d.ts +2 -3
  52. package/lib/view/spendManagement/reimbursement/remiSetupView/remiSetupViewSelector.js +1 -1
  53. package/lib/view/spendManagement/zeniAccounts/paymentAccountList/paymentAccountListPayload.d.ts +1 -1
  54. package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.d.ts +1 -1
  55. package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.js +2 -2
  56. package/lib/view/spendManagement/zeniAccounts/zeniAccountSetUp/epic/fetchZeniAccountSetupViewEpic.d.ts +2 -3
  57. package/lib/view/spendManagement/zeniAccounts/zeniAccountSetUp/epic/fetchZeniAccountSetupViewEpic.js +4 -5
  58. package/lib/view/spendManagement/zeniAccounts/zeniAccountSetUp/zeniAccountSetupViewSelector.js +1 -1
  59. package/package.json +1 -1
  60. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +0 -85
  61. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +0 -332
  62. package/lib/view/spendManagement/plaidAccount/plaidAccountViewSelector.d.ts +0 -2
  63. package/lib/view/spendManagement/plaidAccount/plaidAccountViewSelector.js +0 -7
  64. package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +0 -21
  65. package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.js +0 -29
  66. /package/lib/view/spendManagement/{plaidAccount → commonSetup}/types/paymentAccount.d.ts +0 -0
  67. /package/lib/view/spendManagement/{plaidAccount → commonSetup}/types/paymentAccount.js +0 -0
  68. /package/lib/view/spendManagement/{plaidAccount → commonSetup}/types/plaidConnection.d.ts +0 -0
  69. /package/lib/view/spendManagement/{plaidAccount → commonSetup}/types/plaidConnection.js +0 -0
@@ -6,7 +6,7 @@ const operators_1 = require("rxjs/operators");
6
6
  const editBillViewReducer_1 = require("../editBillViewReducer");
7
7
  const classListReducer_1 = require("../../../../classList/classListReducer");
8
8
  const accountListReducer_1 = require("../../../../accountList/accountListReducer");
9
- const plaidAccountViewReducer_1 = require("../../../plaidAccount/plaidAccountViewReducer");
9
+ const setupViewReducer_1 = require("../../../commonSetup/setupViewReducer");
10
10
  const billPaySetupApproverViewReducer_1 = require("../../billPaySetupApproverView/billPaySetupApproverViewReducer");
11
11
  const ownerListReducer_1 = require("../../../../ownerList/ownerListReducer");
12
12
  const vendorTypeListReducer_1 = require("../../../../vendorTypeList/vendorTypeListReducer");
@@ -25,7 +25,7 @@ const fetchEditBillDetailPageEpic = (actions$, state$) => actions$.pipe((0, oper
25
25
  : undefined;
26
26
  const currentCompany = (0, companySelector_1.getCompanyByCompanyId)(companyState, companyId !== null && companyId !== void 0 ? companyId : '');
27
27
  const isCompanyZeniAccountsSetUpDone = (_c = currentCompany === null || currentCompany === void 0 ? void 0 : currentCompany.company.companyZeniAccountInfo.isZeniAccountEnabled) !== null && _c !== void 0 ? _c : false;
28
- if (cacheOverride) {
28
+ if (cacheOverride == true) {
29
29
  billDetailActions.push((0, accountListReducer_1.fetchAccountList)('billPayAccountList', true, true, true));
30
30
  billDetailActions.push((0, classListReducer_1.fetchClassList)());
31
31
  billDetailActions.push((0, vendorTypeListReducer_1.fetchVendorTypeList)());
@@ -34,7 +34,7 @@ const fetchEditBillDetailPageEpic = (actions$, state$) => actions$.pipe((0, oper
34
34
  if (isCompanyZeniAccountsSetUpDone) {
35
35
  billDetailActions.push((0, depositAccountListReducer_1.fetchDepositAccountList)());
36
36
  }
37
- billDetailActions.push((0, plaidAccountViewReducer_1.getPaymentAccounts)('bill_pay', 'spend_management_setup'));
37
+ billDetailActions.push((0, setupViewReducer_1.getPaymentAccounts)('bill_pay'));
38
38
  if (billId != null) {
39
39
  billDetailActions.push((0, editBillViewReducer_1.fetchBillAndInitializeLocalStore)(billId, true, isShowDeletedBillsEnabled));
40
40
  }
@@ -73,10 +73,10 @@ const fetchEditBillDetailPageEpic = (actions$, state$) => actions$.pipe((0, oper
73
73
  depositAccounts.fetchState !== 'Completed') {
74
74
  billDetailActions.push((0, depositAccountListReducer_1.fetchDepositAccountList)());
75
75
  }
76
- const paymentAccount = state.plaidAccountViewState['spend_management_setup'].accountDetails;
76
+ const paymentAccount = state.setupViewState.accountDetails;
77
77
  if (paymentAccount.fetchStatus.fetchState !== 'In-Progress' &&
78
78
  paymentAccount.fetchStatus.fetchState !== 'Completed') {
79
- billDetailActions.push((0, plaidAccountViewReducer_1.getPaymentAccounts)('bill_pay', 'spend_management_setup'));
79
+ billDetailActions.push((0, setupViewReducer_1.getPaymentAccounts)('bill_pay'));
80
80
  }
81
81
  if (billId != null) {
82
82
  billDetailActions.push((0, editBillViewReducer_1.fetchBillAndInitializeLocalStore)(billId, false, isShowDeletedBillsEnabled));
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs';
3
3
  import { convertAmountToHomeCurrency, initializeBillToLocalStore, saveBillUpdatesToLocalStore, updateEditBillFetchStateCompleted } from '../editBillViewReducer';
4
4
  import { RootState } from '../../../../../reducer';
5
5
  import { fetchClassList } from '../../../../classList/classListReducer';
6
- import { getPaymentAccounts } from '../../../plaidAccount/plaidAccountViewReducer';
6
+ import { getPaymentAccounts } from '../../../commonSetup/setupViewReducer';
7
7
  import { LineItemRecommendationsLocalData } from '../editBillViewSelector';
8
8
  import { RecommendationByLineId } from '../../../../../entity/transaction/stateTypes/transaction';
9
9
  import { Vendor } from '../../../../../entity/vendor/vendorState';
@@ -15,11 +15,11 @@ const initializeInternationalWireLocalDataEpic = (actions$, state$) => actions$.
15
15
  if (billId != null) {
16
16
  const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
17
17
  billAmount =
18
- (_d = (_c = (_b = (_a = state.editBillDetailViewState.editBillStateById[key]) === null || _a === void 0 ? void 0 : _a.billDetailLocalData) === null || _b === void 0 ? void 0 : _b.totalAmount) === null || _c === void 0 ? void 0 : _c.amount) !== null && _d !== void 0 ? _d : 0;
18
+ (_d = (_c = (_b = (_a = state.editBillDetailViewState.editBillStateById[key]) === null || _a === void 0 ? void 0 : _a.billDetailLocalData) === null || _b === void 0 ? void 0 : _b.recipientTotalAmount) === null || _c === void 0 ? void 0 : _c.amount) !== null && _d !== void 0 ? _d : 0;
19
19
  }
20
20
  else {
21
21
  billAmount =
22
- (_g = (_f = (_e = state.editBillDetailViewState.newBillState.billDetailLocalData) === null || _e === void 0 ? void 0 : _e.totalAmount) === null || _f === void 0 ? void 0 : _f.amount) !== null && _g !== void 0 ? _g : 0;
22
+ (_g = (_f = (_e = state.editBillDetailViewState.newBillState.billDetailLocalData) === null || _e === void 0 ? void 0 : _e.recipientTotalAmount) === null || _f === void 0 ? void 0 : _f.amount) !== null && _g !== void 0 ? _g : 0;
23
23
  }
24
24
  if (existinglocalData == null) {
25
25
  const localDataPayload = {
@@ -13,11 +13,11 @@ const getInternationalWireView = (state, vendorType, billId) => {
13
13
  if (billId != null) {
14
14
  const key = (0, billDetailViewState_1.getBillTransactionDetailKey)(billId);
15
15
  totalAmount =
16
- (_c = (_b = (_a = state.editBillDetailViewState.editBillStateById[key]) === null || _a === void 0 ? void 0 : _a.billDetailLocalData.totalAmount) === null || _b === void 0 ? void 0 : _b.amount) !== null && _c !== void 0 ? _c : 0;
16
+ (_c = (_b = (_a = state.editBillDetailViewState.editBillStateById[key]) === null || _a === void 0 ? void 0 : _a.billDetailLocalData.recipientTotalAmount) === null || _b === void 0 ? void 0 : _b.amount) !== null && _c !== void 0 ? _c : 0;
17
17
  }
18
18
  else {
19
19
  totalAmount =
20
- (_e = (_d = state.editBillDetailViewState.newBillState.billDetailLocalData.totalAmount) === null || _d === void 0 ? void 0 : _d.amount) !== null && _e !== void 0 ? _e : 0;
20
+ (_e = (_d = state.editBillDetailViewState.newBillState.billDetailLocalData.recipientTotalAmount) === null || _d === void 0 ? void 0 : _d.amount) !== null && _e !== void 0 ? _e : 0;
21
21
  }
22
22
  const accountTypeKey = (0, internationalWire_1.getSupportedAccountKey)((_f = localData === null || localData === void 0 ? void 0 : localData.currencyCode) !== null && _f !== void 0 ? _f : '', totalAmount !== null && totalAmount !== void 0 ? totalAmount : 0, vendorType);
23
23
  const dynamicFormDetails = fetchDynamicFormDetails(dynamicFormDetailsbyKey, accountTypeKey);
@@ -5,7 +5,7 @@ const getCompanyView_1 = require("../../../companyView/selectorHelpers/getCompan
5
5
  const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
6
6
  const helpers_1 = require("../../helpers");
7
7
  function getChargeCardSetupViewDetails(state, companyId) {
8
- const chargeCardSetupViewDetails = (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'charge_cards', 'spend_management_setup');
8
+ const chargeCardSetupViewDetails = (0, setupViewSelector_1.getCommonSetupViewDetails)(state, companyId, 'charge_cards');
9
9
  const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId, []);
10
10
  const companyChargeCardInfo = companyView === null || companyView === void 0 ? void 0 : companyView.company.company.companyChargeCardInfo;
11
11
  const { chargeCardSetupViewState, setupViewState } = state;
@@ -10,8 +10,7 @@ import { updateAllUsers } from '../../../../../entity/user/userReducer';
10
10
  import { updateUserRoles } from '../../../../../entity/userRole/userRoleReducer';
11
11
  import { RootState } from '../../../../../reducer';
12
12
  import { ZeniAPI } from '../../../../../zeniAPI';
13
- import { updateSetupViewLocalStoreData } from '../../../commonSetup/setupViewReducer';
13
+ import { updateSetupViewAccountDetails, updateSetupViewLocalStoreData } from '../../../commonSetup/setupViewReducer';
14
14
  import { fetchChargeCardSetupView, fetchChargeCardSetupViewFailure, fetchChargeCardSetupViewSuccess } from '../chargeCardSetUpViewReducer';
15
- import { updatePlaidAccountViewAccountDetails } from '../../../plaidAccount/plaidAccountViewReducer';
16
- export declare type ActionType = ReturnType<typeof fetchChargeCardSetupView> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateFiles> | ReturnType<typeof updateAccounts> | ReturnType<typeof updateAddresses> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updatePlaidAccountViewAccountDetails> | ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof openSnackbar> | ReturnType<typeof fetchChargeCardSetupViewSuccess> | ReturnType<typeof fetchChargeCardSetupViewFailure>;
15
+ export declare type ActionType = ReturnType<typeof fetchChargeCardSetupView> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateFiles> | ReturnType<typeof updateAccounts> | ReturnType<typeof updateAddresses> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updateSetupViewAccountDetails> | ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof openSnackbar> | ReturnType<typeof fetchChargeCardSetupViewSuccess> | ReturnType<typeof fetchChargeCardSetupViewFailure>;
17
16
  export declare const fetchChargeCardSetupViewEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -15,11 +15,10 @@ const userRoleReducer_1 = require("../../../../../entity/userRole/userRoleReduce
15
15
  const responsePayload_1 = require("../../../../../responsePayload");
16
16
  const setupViewReducer_1 = require("../../../commonSetup/setupViewReducer");
17
17
  const chargeCardSetUpViewReducer_1 = require("../chargeCardSetUpViewReducer");
18
- const plaidAccountViewReducer_1 = require("../../../plaidAccount/plaidAccountViewReducer");
19
18
  const fetchChargeCardSetupViewEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(chargeCardSetUpViewReducer_1.fetchChargeCardSetupView.match), (0, operators_1.switchMap)((action) => {
20
19
  var _a;
21
20
  const { companyId, cacheOverride, refreshViewInBackground } = action.payload;
22
- const { chargeCardSetupViewState, plaidAccountViewState, companyState } = state$.value;
21
+ const { chargeCardSetupViewState, setupViewState, companyState } = state$.value;
23
22
  const company = (_a = (0, companySelector_1.getCompanyByCompanyId)(companyState, companyId)) === null || _a === void 0 ? void 0 : _a.company;
24
23
  if (cacheOverride === true ||
25
24
  refreshViewInBackground === true ||
@@ -46,7 +45,7 @@ const fetchChargeCardSetupViewEpic = (actions$, state$, zeniAPI) => actions$.pip
46
45
  (0, setupViewReducer_1.updateSetupViewLocalStoreData)({
47
46
  companyId: response.data.companies[0].company_id,
48
47
  }),
49
- (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, paymentAccountIds, 'spend_management_setup'),
48
+ (0, setupViewReducer_1.updateSetupViewAccountDetails)(allBankAccountIds, paymentAccountIds),
50
49
  (0, chargeCardSetUpViewReducer_1.fetchChargeCardSetupViewSuccess)(),
51
50
  ];
52
51
  return (0, rxjs_1.from)(actions);
@@ -62,10 +61,10 @@ const fetchChargeCardSetupViewEpic = (actions$, state$, zeniAPI) => actions$.pip
62
61
  JSON.stringify(error))))));
63
62
  }
64
63
  else {
65
- const { allBankAccountIds, paymentAccountIds } = plaidAccountViewState['spend_management_setup'].accountDetails;
64
+ const { allBankAccountIds, paymentAccountIds } = setupViewState.accountDetails;
66
65
  return (0, rxjs_1.of)((0, setupViewReducer_1.updateSetupViewLocalStoreData)({
67
66
  companyId,
68
- }), (0, plaidAccountViewReducer_1.updatePlaidAccountViewAccountDetails)(allBankAccountIds, paymentAccountIds, 'spend_management_setup'), (0, chargeCardSetUpViewReducer_1.fetchChargeCardSetupViewSuccess)());
67
+ }), (0, setupViewReducer_1.updateSetupViewAccountDetails)(allBankAccountIds, paymentAccountIds), (0, chargeCardSetUpViewReducer_1.fetchChargeCardSetupViewSuccess)());
69
68
  }
70
69
  }));
71
70
  exports.fetchChargeCardSetupViewEpic = fetchChargeCardSetupViewEpic;
@@ -2,7 +2,7 @@ import { ActionsObservable, StateObservable } from 'redux-observable';
2
2
  import { Observable } from 'rxjs';
3
3
  import { RootState } from '../../../../../reducer';
4
4
  import { ZeniAPI } from '../../../../../zeniAPI';
5
- import { getPaymentAccounts, getPaymentAccountsSuccess, getPaymentAccountsFailure } from '../../plaidAccountViewReducer';
5
+ import { getPaymentAccounts, getPaymentAccountsSuccess, getPaymentAccountsFailure } from '../../setupViewReducer';
6
6
  import { updateAccounts } from '../../../../../entity/account/accountReducer';
7
7
  import { updatePaymentAccounts } from '../../../../../entity/paymentAccount/paymentAccountReducer';
8
8
  export declare type ActionType = ReturnType<typeof getPaymentAccounts> | ReturnType<typeof updateAccounts> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof getPaymentAccountsSuccess> | ReturnType<typeof getPaymentAccountsFailure>;
@@ -4,11 +4,11 @@ exports.getPaymentAccountsEpic = void 0;
4
4
  const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const responsePayload_1 = require("../../../../../responsePayload");
7
- const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
7
+ const setupViewReducer_1 = require("../../setupViewReducer");
8
8
  const accountReducer_1 = require("../../../../../entity/account/accountReducer");
9
9
  const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/paymentAccountReducer");
10
- const getPaymentAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.getPaymentAccounts.match), (0, operators_1.switchMap)((action) => {
11
- const { setupViewType, includeBalances, plaidAccountKeyType } = action.payload;
10
+ const getPaymentAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.getPaymentAccounts.match), (0, operators_1.switchMap)((action) => {
11
+ const { setupViewType, includeBalances } = action.payload;
12
12
  return zeniAPI
13
13
  .getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/payment-accounts?query=${encodeURIComponent(JSON.stringify({
14
14
  is_include_balances: includeBalances,
@@ -21,13 +21,13 @@ const getPaymentAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0,
21
21
  const actions = [
22
22
  (0, accountReducer_1.updateAccounts)(response.data.accounts, setupViewType),
23
23
  (0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
24
- (0, plaidAccountViewReducer_1.getPaymentAccountsSuccess)(paymentAccountIds, plaidAccountKeyType),
24
+ (0, setupViewReducer_1.getPaymentAccountsSuccess)(paymentAccountIds),
25
25
  ];
26
26
  return (0, rxjs_1.from)(actions);
27
27
  }
28
28
  else {
29
- return (0, rxjs_1.of)((0, plaidAccountViewReducer_1.getPaymentAccountsFailure)(response.status, plaidAccountKeyType));
29
+ return (0, rxjs_1.of)((0, setupViewReducer_1.getPaymentAccountsFailure)(response.status));
30
30
  }
31
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, plaidAccountViewReducer_1.getPaymentAccountsFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Get Payment Accounts errored out' + JSON.stringify(error)), plaidAccountKeyType))));
31
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, setupViewReducer_1.getPaymentAccountsFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Get Payment Accounts errored out' + JSON.stringify(error))))));
32
32
  }));
33
33
  exports.getPaymentAccountsEpic = getPaymentAccountsEpic;
@@ -4,6 +4,6 @@ import { RootState } from '../../../../../reducer';
4
4
  import { ZeniAPI } from '../../../../../zeniAPI';
5
5
  import { updateAccounts } from '../../../../../entity/account/accountReducer';
6
6
  import { updatePaymentAccounts } from '../../../../../entity/paymentAccount/paymentAccountReducer';
7
- import { updatePaymentAccount, updatePaymentAccountSuccess, updatePaymentAccountFailure } from '../../plaidAccountViewReducer';
7
+ import { updatePaymentAccount, updatePaymentAccountSuccess, updatePaymentAccountFailure } from '../../setupViewReducer';
8
8
  export declare type ActionType = ReturnType<typeof updatePaymentAccount> | ReturnType<typeof updateAccounts> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updatePaymentAccountSuccess> | ReturnType<typeof updatePaymentAccountFailure>;
9
9
  export declare const updatePaymentAccountEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -6,9 +6,9 @@ const operators_1 = require("rxjs/operators");
6
6
  const responsePayload_1 = require("../../../../../responsePayload");
7
7
  const accountReducer_1 = require("../../../../../entity/account/accountReducer");
8
8
  const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/paymentAccountReducer");
9
- const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
10
- const updatePaymentAccountEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.updatePaymentAccount.match), (0, operators_1.mergeMap)((action) => {
11
- const { accountId, paymentAccountId, setupViewType, plaidAccountKeyType } = action.payload;
9
+ const setupViewReducer_1 = require("../../setupViewReducer");
10
+ const updatePaymentAccountEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.updatePaymentAccount.match), (0, operators_1.mergeMap)((action) => {
11
+ const { accountId, paymentAccountId, setupViewType } = action.payload;
12
12
  return zeniAPI
13
13
  .putAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/payment-accounts/${paymentAccountId}`, {
14
14
  zeni_mapped_account_id: accountId,
@@ -19,13 +19,13 @@ const updatePaymentAccountEpic = (actions$, _state$, zeniAPI) => actions$.pipe((
19
19
  const actions = [
20
20
  (0, accountReducer_1.updateAccounts)(response.data.accounts, setupViewType),
21
21
  (0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
22
- (0, plaidAccountViewReducer_1.updatePaymentAccountSuccess)(paymentAccountIds, plaidAccountKeyType),
22
+ (0, setupViewReducer_1.updatePaymentAccountSuccess)(paymentAccountIds),
23
23
  ];
24
24
  return (0, rxjs_1.from)(actions);
25
25
  }
26
26
  else {
27
- return (0, rxjs_1.of)((0, plaidAccountViewReducer_1.updatePaymentAccountFailure)(response.status, plaidAccountKeyType));
27
+ return (0, rxjs_1.of)((0, setupViewReducer_1.updatePaymentAccountFailure)(response.status));
28
28
  }
29
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, plaidAccountViewReducer_1.updatePaymentAccountFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Update Payment Account errored out' + JSON.stringify(error)), plaidAccountKeyType))));
29
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, setupViewReducer_1.updatePaymentAccountFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Update Payment Account errored out' + JSON.stringify(error))))));
30
30
  }));
31
31
  exports.updatePaymentAccountEpic = updatePaymentAccountEpic;
@@ -5,6 +5,6 @@ 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 { updatePaymentAccountLoginStatus, updatePaymentAccountLoginStatusSuccess, updatePaymentAccountLoginStatusFailure } from '../../plaidAccountViewReducer';
8
+ import { updatePaymentAccountLoginStatus, updatePaymentAccountLoginStatusSuccess, updatePaymentAccountLoginStatusFailure } from '../../setupViewReducer';
9
9
  export declare type ActionType = ReturnType<typeof updatePaymentAccountLoginStatus> | ReturnType<typeof updateAccounts> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof openSnackbar> | ReturnType<typeof updatePaymentAccountLoginStatusSuccess> | ReturnType<typeof updatePaymentAccountLoginStatusFailure>;
10
10
  export declare const updatePaymentAccountLoginStatusEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -7,9 +7,9 @@ const responsePayload_1 = require("../../../../../responsePayload");
7
7
  const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
8
8
  const accountReducer_1 = require("../../../../../entity/account/accountReducer");
9
9
  const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/paymentAccountReducer");
10
- const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
11
- const updatePaymentAccountLoginStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.updatePaymentAccountLoginStatus.match), (0, operators_1.mergeMap)((action) => {
12
- const { isLoginRequired, paymentAccountId, setupViewType, linkTokenType, plaidAccountKeyType, } = action.payload;
10
+ const setupViewReducer_1 = require("../../setupViewReducer");
11
+ const updatePaymentAccountLoginStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.updatePaymentAccountLoginStatus.match), (0, operators_1.mergeMap)((action) => {
12
+ const { isLoginRequired, paymentAccountId, setupViewType, linkTokenType } = action.payload;
13
13
  return zeniAPI
14
14
  .putAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/payment-accounts/${paymentAccountId}`, {
15
15
  is_login_required: isLoginRequired,
@@ -20,7 +20,7 @@ const updatePaymentAccountLoginStatusEpic = (actions$, _state$, zeniAPI) => acti
20
20
  const actions = [
21
21
  (0, accountReducer_1.updateAccounts)(response.data.accounts, setupViewType),
22
22
  (0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
23
- (0, plaidAccountViewReducer_1.updatePaymentAccountLoginStatusSuccess)(paymentAccountIds, linkTokenType, plaidAccountKeyType),
23
+ (0, setupViewReducer_1.updatePaymentAccountLoginStatusSuccess)(paymentAccountIds, linkTokenType),
24
24
  ];
25
25
  return (0, rxjs_1.from)(actions);
26
26
  }
@@ -29,9 +29,9 @@ const updatePaymentAccountLoginStatusEpic = (actions$, _state$, zeniAPI) => acti
29
29
  messageSection: 'plaid_connection',
30
30
  messageText: 'failed',
31
31
  type: 'error',
32
- }), (0, plaidAccountViewReducer_1.updatePaymentAccountLoginStatusFailure)(response.status, linkTokenType, plaidAccountKeyType));
32
+ }), (0, setupViewReducer_1.updatePaymentAccountLoginStatusFailure)(response.status, linkTokenType));
33
33
  }
34
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, plaidAccountViewReducer_1.updatePaymentAccountLoginStatusFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Update Payment Account Login Status failed ' +
35
- JSON.stringify(error)), linkTokenType, plaidAccountKeyType))));
34
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, setupViewReducer_1.updatePaymentAccountLoginStatusFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Update Payment Account Login Status failed ' +
35
+ JSON.stringify(error)), linkTokenType))));
36
36
  }));
37
37
  exports.updatePaymentAccountLoginStatusEpic = updatePaymentAccountLoginStatusEpic;
@@ -5,6 +5,6 @@ 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 { updatePaymentAccountStatus, updatePaymentAccountStatusSuccess, updatePaymentAccountStatusFailure } from '../../plaidAccountViewReducer';
8
+ import { updatePaymentAccountStatus, updatePaymentAccountStatusSuccess, updatePaymentAccountStatusFailure } from '../../setupViewReducer';
9
9
  export declare type ActionType = ReturnType<typeof updatePaymentAccountStatus> | ReturnType<typeof updateAccounts> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof openSnackbar> | ReturnType<typeof updatePaymentAccountStatusSuccess> | ReturnType<typeof updatePaymentAccountStatusFailure>;
10
10
  export declare const updatePaymentAccountStatusEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -7,9 +7,9 @@ const responsePayload_1 = require("../../../../../responsePayload");
7
7
  const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
8
8
  const accountReducer_1 = require("../../../../../entity/account/accountReducer");
9
9
  const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/paymentAccountReducer");
10
- const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
11
- const updatePaymentAccountStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.updatePaymentAccountStatus.match), (0, operators_1.mergeMap)((action) => {
12
- const { verificationStatusCode, paymentAccountId, setupViewType, linkTokenType, plaidAccountKeyType, } = action.payload;
10
+ const setupViewReducer_1 = require("../../setupViewReducer");
11
+ const updatePaymentAccountStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.updatePaymentAccountStatus.match), (0, operators_1.mergeMap)((action) => {
12
+ const { verificationStatusCode, paymentAccountId, setupViewType, linkTokenType, } = action.payload;
13
13
  return zeniAPI
14
14
  .putAndGetJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/payment-accounts/${paymentAccountId}`, {
15
15
  provider_verification_status_code: verificationStatusCode,
@@ -20,7 +20,7 @@ const updatePaymentAccountStatusEpic = (actions$, _state$, zeniAPI) => actions$.
20
20
  const actions = [
21
21
  (0, accountReducer_1.updateAccounts)(response.data.accounts, setupViewType),
22
22
  (0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
23
- (0, plaidAccountViewReducer_1.updatePaymentAccountStatusSuccess)(paymentAccountIds, linkTokenType, plaidAccountKeyType),
23
+ (0, setupViewReducer_1.updatePaymentAccountStatusSuccess)(paymentAccountIds, linkTokenType),
24
24
  ];
25
25
  return (0, rxjs_1.from)(actions);
26
26
  }
@@ -29,9 +29,9 @@ const updatePaymentAccountStatusEpic = (actions$, _state$, zeniAPI) => actions$.
29
29
  messageSection: 'plaid_connection',
30
30
  messageText: 'failed',
31
31
  type: 'error',
32
- }), (0, plaidAccountViewReducer_1.updatePaymentAccountStatusFailure)(response.status, linkTokenType, plaidAccountKeyType));
32
+ }), (0, setupViewReducer_1.updatePaymentAccountStatusFailure)(response.status, linkTokenType));
33
33
  }
34
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, plaidAccountViewReducer_1.updatePaymentAccountStatusFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Update Payment Account Status failed ' +
35
- JSON.stringify(error)), linkTokenType, plaidAccountKeyType))));
34
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, setupViewReducer_1.updatePaymentAccountStatusFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Update Payment Account Status failed ' +
35
+ JSON.stringify(error)), linkTokenType))));
36
36
  }));
37
37
  exports.updatePaymentAccountStatusEpic = updatePaymentAccountStatusEpic;
@@ -5,9 +5,9 @@ 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 } from '../../setupViewReducer';
9
9
  import { updateBankAccounts } from '../../../../../entity/bankAccount/bankAccountReducer';
10
10
  import { updateUserBankAccount } from '../../../../userFinancialAccount/userFinancialAccountReducer';
11
11
  import { updatePaymentAccountList } from '../../../zeniAccounts/paymentAccountList/paymentAccountListReducer';
12
- 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 establishPlaidConnectionSuccess> | ReturnType<typeof establishPlaidConnectionFailure>;
12
+ 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 establishPlaidConnectionSuccess> | ReturnType<typeof openSnackbar> | ReturnType<typeof establishPlaidConnectionFailure>;
13
13
  export declare const establishPlaidConnectionEpic: (actions$: ActionsObservable<ActionType>, state: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -7,13 +7,13 @@ const responsePayload_1 = require("../../../../../responsePayload");
7
7
  const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
8
8
  const accountReducer_1 = require("../../../../../entity/account/accountReducer");
9
9
  const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/paymentAccountReducer");
10
- const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
10
+ const setupViewReducer_1 = require("../../setupViewReducer");
11
11
  const bankAccountReducer_1 = require("../../../../../entity/bankAccount/bankAccountReducer");
12
12
  const userFinancialAccountReducer_1 = require("../../../../userFinancialAccount/userFinancialAccountReducer");
13
13
  const paymentAccountListReducer_1 = require("../../../zeniAccounts/paymentAccountList/paymentAccountListReducer");
14
- const establishPlaidConnectionEpic = (actions$, state, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.establishPlaidConnection.match), (0, operators_1.mergeMap)((action) => {
14
+ const establishPlaidConnectionEpic = (actions$, state, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.establishPlaidConnection.match), (0, operators_1.mergeMap)((action) => {
15
15
  var _a, _b;
16
- const { publicToken, setupViewType, linkTokenType, plaidAccountKeyType } = action.payload;
16
+ const { publicToken, setupViewType, linkTokenType } = action.payload;
17
17
  const requestPayload = {
18
18
  public_token: publicToken,
19
19
  };
@@ -38,7 +38,7 @@ const establishPlaidConnectionEpic = (actions$, state, zeniAPI) => actions$.pipe
38
38
  data: response.data.payment_accounts,
39
39
  updateType: 'merge',
40
40
  }),
41
- (0, plaidAccountViewReducer_1.establishPlaidConnectionSuccess)(paymentAccountIds, linkTokenType, plaidAccountKeyType),
41
+ (0, setupViewReducer_1.establishPlaidConnectionSuccess)(paymentAccountIds, linkTokenType),
42
42
  ];
43
43
  if (response.data.bank_accounts != null) {
44
44
  const bankAccountIds = response.data.bank_accounts.map((bank_account) => bank_account.bank_account_id);
@@ -62,9 +62,9 @@ const establishPlaidConnectionEpic = (actions$, state, zeniAPI) => actions$.pipe
62
62
  messageSection: 'plaid_connection',
63
63
  messageText: 'failed',
64
64
  type: 'error',
65
- }), (0, plaidAccountViewReducer_1.establishPlaidConnectionFailure)(response.status, linkTokenType, plaidAccountKeyType));
65
+ }), (0, setupViewReducer_1.establishPlaidConnectionFailure)(response.status, linkTokenType));
66
66
  }
67
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, plaidAccountViewReducer_1.establishPlaidConnectionFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Establish Plaid Connection errored out' +
68
- JSON.stringify(error)), linkTokenType, plaidAccountKeyType))));
67
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, setupViewReducer_1.establishPlaidConnectionFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Establish Plaid Connection errored out' +
68
+ JSON.stringify(error)), linkTokenType))));
69
69
  }));
70
70
  exports.establishPlaidConnectionEpic = establishPlaidConnectionEpic;
@@ -3,8 +3,8 @@ import { Observable } from 'rxjs';
3
3
  import { RootState } from '../../../../../reducer';
4
4
  import { ZeniAPI } from '../../../../../zeniAPI';
5
5
  import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer';
6
- import { getPlaidLinkToken, getPlaidLinkTokenSuccess, getPlaidLinkTokenFailure } from '../../plaidAccountViewReducer';
7
- import { PlaidLinkTokenType } from '../../plaidAccountViewState';
6
+ import { getPlaidLinkToken, getPlaidLinkTokenSuccess, getPlaidLinkTokenFailure } from '../../setupViewReducer';
7
+ import { PlaidLinkTokenType } from '../../setupViewState';
8
8
  import { ID } from '../../../../../commonStateTypes/common';
9
9
  export declare type ActionType = ReturnType<typeof getPlaidLinkToken> | ReturnType<typeof openSnackbar> | ReturnType<typeof getPlaidLinkTokenSuccess> | ReturnType<typeof getPlaidLinkTokenFailure>;
10
10
  export declare const getPlaidLinkTokenEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -5,15 +5,15 @@ const rxjs_1 = require("rxjs");
5
5
  const operators_1 = require("rxjs/operators");
6
6
  const responsePayload_1 = require("../../../../../responsePayload");
7
7
  const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
8
- const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
9
- const getPlaidLinkTokenEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.getPlaidLinkToken.match), (0, operators_1.switchMap)((action) => {
10
- const { linkTokenType, paymentAccountId, plaidAccountKeyType } = action.payload;
8
+ const setupViewReducer_1 = require("../../setupViewReducer");
9
+ const getPlaidLinkTokenEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.getPlaidLinkToken.match), (0, operators_1.switchMap)((action) => {
10
+ const { linkTokenType, paymentAccountId } = action.payload;
11
11
  return zeniAPI
12
12
  .getJSON(`${zeniAPI.apiEndPoints.payMicroServiceBaseUrl}/1.0/plaid/link-token?query=${JSON.stringify((0, exports.toLinkTokenPayload)(linkTokenType, paymentAccountId))}`)
13
13
  .pipe((0, operators_1.mergeMap)((response) => {
14
14
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
15
15
  const actions = [
16
- (0, plaidAccountViewReducer_1.getPlaidLinkTokenSuccess)(response.data.link_token, response.data.expiration, linkTokenType, plaidAccountKeyType),
16
+ (0, setupViewReducer_1.getPlaidLinkTokenSuccess)(response.data.link_token, response.data.expiration, linkTokenType),
17
17
  ];
18
18
  return (0, rxjs_1.from)(actions);
19
19
  }
@@ -22,9 +22,9 @@ const getPlaidLinkTokenEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0,
22
22
  messageSection: 'plaid_connection',
23
23
  messageText: 'failed',
24
24
  type: 'error',
25
- }), (0, plaidAccountViewReducer_1.getPlaidLinkTokenFailure)(response.status, linkTokenType, plaidAccountKeyType));
25
+ }), (0, setupViewReducer_1.getPlaidLinkTokenFailure)(response.status, linkTokenType));
26
26
  }
27
- }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, plaidAccountViewReducer_1.getPlaidLinkTokenFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Get Plaid Link Token errored out' + JSON.stringify(error)), linkTokenType, plaidAccountKeyType))));
27
+ }), (0, operators_1.catchError)((error) => (0, rxjs_1.of)((0, setupViewReducer_1.getPlaidLinkTokenFailure)((0, responsePayload_1.createZeniAPIStatus)('Unexpected Error', 'Get Plaid Link Token errored out' + JSON.stringify(error)), linkTokenType))));
28
28
  }));
29
29
  exports.getPlaidLinkTokenEpic = getPlaidLinkTokenEpic;
30
30
  const toLinkTokenPayload = (linkTokenType, paymentAccountId) => {
@@ -4,7 +4,7 @@ import { UserPayload } from '../../../entity/user/userPayload';
4
4
  import { UserRolePayload } from '../../../entity/userRole/userRolePayload';
5
5
  import { FilePayload } from '../../../entity/file/filePayload';
6
6
  import { AddressPayload } from '../../../entity/address/addressPayload';
7
- import { PaymentAccountsPayload } from '../plaidAccount/types/paymentAccount';
7
+ import { PaymentAccountsPayload } from './types/paymentAccount';
8
8
  /**
9
9
  * Setup View Payload
10
10
  */
@@ -2,7 +2,7 @@ import { ID } from '../../../commonStateTypes/common';
2
2
  import { ZeniDate } from '../../../zeniDayJS';
3
3
  import { ZeniAPIStatus } from '../../../responsePayload';
4
4
  import { CompanyOfficerType } from '../../companyView/types/companyPassport/companyUsersLocalData';
5
- import { SetupViewLocalData, SetupViewState } from './setupViewState';
5
+ import { PlaidLinkTokenType, SetupViewLocalData, SetupViewState } from './setupViewState';
6
6
  export declare const initialState: SetupViewState;
7
7
  export declare const enableSetup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards"], {
8
8
  companyId: string;
@@ -14,7 +14,60 @@ export declare const enableSetup: import("@reduxjs/toolkit").ActionCreatorWithPr
14
14
  sendForVerification: any;
15
15
  fromBillListScreen: any;
16
16
  isSubmittingAdditionalDocuments: any;
17
- }, string, never, never>, updateBusinessVerificationDetailsSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateBusinessVerificationDetailsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, string, never, never>, updateSelectedCompanyOfficer: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedOfficerType: "Officer_2" | "Officer_1" | "Officer_3" | "Officer_4" | "Officer_5" | "Officer_6" | "Officer_7" | "Officer_8" | "Officer_9" | "Officer_10"], {
17
+ }, string, never, never>, updateBusinessVerificationDetailsSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, updateBusinessVerificationDetailsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, string, never, never>, getPaymentAccounts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards", includeBalances?: any], {
18
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards";
19
+ includeBalances: any;
20
+ }, string, never, never>, getPaymentAccountsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[paymentAccountIds: string[]], {
21
+ paymentAccountIds: string[];
22
+ }, string, never, never>, getPaymentAccountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, string, never, never>, updatePaymentAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accountId: string, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards"], {
23
+ accountId: string;
24
+ paymentAccountId: string;
25
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards";
26
+ }, string, never, never>, updatePaymentAccountSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[paymentAccountIds: string[]], {
27
+ paymentAccountIds: string[];
28
+ }, string, never, never>, updatePaymentAccountFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, string, never, never>, updatePaymentAccountStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[verificationStatusCode: string, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards", linkTokenType?: PlaidLinkTokenType | undefined], {
29
+ verificationStatusCode: string;
30
+ paymentAccountId: string;
31
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards";
32
+ linkTokenType: PlaidLinkTokenType;
33
+ }, string, never, never>, updatePaymentAccountStatusSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[paymentAccountIds: string[], linkTokenType: PlaidLinkTokenType], {
34
+ paymentAccountIds: string[];
35
+ linkTokenType: PlaidLinkTokenType;
36
+ }, string, never, never>, updatePaymentAccountStatusFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>, linkTokenType: PlaidLinkTokenType], {
37
+ error: ZeniAPIStatus<Record<string, unknown>>;
38
+ linkTokenType: PlaidLinkTokenType;
39
+ }, string, never, never>, updatePaymentAccountLoginStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isLoginRequired: boolean, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards", linkTokenType?: PlaidLinkTokenType | undefined], {
40
+ isLoginRequired: boolean;
41
+ paymentAccountId: string;
42
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards";
43
+ linkTokenType: PlaidLinkTokenType;
44
+ }, string, never, never>, updatePaymentAccountLoginStatusSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[paymentAccountIds: string[], linkTokenType: PlaidLinkTokenType], {
45
+ paymentAccountIds: string[];
46
+ linkTokenType: PlaidLinkTokenType;
47
+ }, string, never, never>, updatePaymentAccountLoginStatusFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>, linkTokenType: PlaidLinkTokenType], {
48
+ error: ZeniAPIStatus<Record<string, unknown>>;
49
+ linkTokenType: PlaidLinkTokenType;
50
+ }, string, never, never>, getPlaidLinkToken: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[linkTokenType?: PlaidLinkTokenType | undefined, paymentAccountId?: string | undefined], {
51
+ linkTokenType: PlaidLinkTokenType;
52
+ paymentAccountId: string | undefined;
53
+ }, string, never, never>, getPlaidLinkTokenSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[linkToken: string, expiration: string, linkTokenType: PlaidLinkTokenType], {
54
+ linkToken: string;
55
+ expiration: string;
56
+ linkTokenType: PlaidLinkTokenType;
57
+ }, string, never, never>, getPlaidLinkTokenFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>, linkTokenType: PlaidLinkTokenType], {
58
+ error: ZeniAPIStatus<Record<string, unknown>>;
59
+ linkTokenType: PlaidLinkTokenType;
60
+ }, string, never, never>, establishPlaidConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[publicToken: string, setupViewType?: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | undefined, linkTokenType?: PlaidLinkTokenType | undefined], {
61
+ publicToken: string;
62
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | undefined;
63
+ linkTokenType: PlaidLinkTokenType;
64
+ }, string, never, never>, establishPlaidConnectionSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[paymentAccountIds: string[], linkTokenType: PlaidLinkTokenType], {
65
+ paymentAccountIds: string[];
66
+ linkTokenType: PlaidLinkTokenType;
67
+ }, string, never, never>, establishPlaidConnectionFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>, linkTokenType: PlaidLinkTokenType], {
68
+ error: ZeniAPIStatus<Record<string, unknown>>;
69
+ linkTokenType: PlaidLinkTokenType;
70
+ }, string, never, never>, updateSelectedCompanyOfficer: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[selectedOfficerType: "Officer_2" | "Officer_1" | "Officer_3" | "Officer_4" | "Officer_5" | "Officer_6" | "Officer_7" | "Officer_8" | "Officer_9" | "Officer_10"], {
18
71
  selectedOfficerType: "Officer_2" | "Officer_1" | "Officer_3" | "Officer_4" | "Officer_5" | "Officer_6" | "Officer_7" | "Officer_8" | "Officer_9" | "Officer_10";
19
72
  }, string, never, never>, updateSetupViewLocalStoreData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
20
73
  companyId: ID;
@@ -24,7 +77,10 @@ export declare const enableSetup: import("@reduxjs/toolkit").ActionCreatorWithPr
24
77
  }, string>, saveCompnayOfficerAdditionalDocumentsInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
25
78
  officerType: CompanyOfficerType;
26
79
  fileIds: ID[];
27
- }, string>, sendOtpSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resendOtpSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, sendOtpSuccessSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
80
+ }, string>, updateSetupViewAccountDetails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[allBankAccountIds: string[], paymentAccountIds: string[]], {
81
+ allBankAccountIds: string[];
82
+ paymentAccountIds: string[];
83
+ }, string, never, never>, sendOtpSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, resendOtpSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, sendOtpSuccessSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
28
84
  otpChallenge: string;
29
85
  }, string>, sendOtpFailureSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, verifyOtpSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpSuccessSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<string>, verifyOtpFailureSpendManagementSetUp: import("@reduxjs/toolkit").ActionCreatorWithPayload<ZeniAPIStatus<Record<string, unknown>>, string>, saveIndustryAndIncDateInLocalStore: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
30
86
  industry: string;