@zeniai/client-epic-state 4.16.3 → 4.16.4

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 (159) hide show
  1. package/lib/commonStateTypes/animations.d.ts +1 -1
  2. package/lib/commonStateTypes/animations.js +1 -1
  3. package/lib/entity/chargeCard/chargeCard.d.ts +8 -26
  4. package/lib/entity/chargeCard/chargeCard.js +6 -25
  5. package/lib/entity/chargeCard/chargeCardPayload.d.ts +5 -41
  6. package/lib/entity/chargeCard/chargeCardPayload.js +8 -20
  7. package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
  8. package/lib/entity/chargeCardTransaction/chargeCardTransaction.js +1 -5
  9. package/lib/entity/company/companyPayload.d.ts +1 -12
  10. package/lib/entity/company/companyPayload.js +0 -14
  11. package/lib/entity/company/companyStateTypes.d.ts +0 -11
  12. package/lib/entity/depositAccount/depositAccount.d.ts +2 -20
  13. package/lib/entity/depositAccount/depositAccountPayload.d.ts +1 -22
  14. package/lib/entity/depositAccount/depositAccountPayload.js +1 -39
  15. package/lib/entity/depositAccount/depositAccountReducer.d.ts +2 -2
  16. package/lib/entity/depositAccount/depositAccountReducer.js +2 -8
  17. package/lib/entity/depositAccount/depositAccountSelector.d.ts +1 -3
  18. package/lib/entity/depositAccount/depositAccountSelector.js +0 -10
  19. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  20. package/lib/entity/snackbar/snackbarTypes.js +0 -2
  21. package/lib/entity/tenant/clearAllEpic.d.ts +1 -2
  22. package/lib/entity/tenant/clearAllEpic.js +0 -2
  23. package/lib/entity/tenant/tenantSelector.d.ts +2 -6
  24. package/lib/entity/tenant/tenantSelector.js +2 -10
  25. package/lib/epic.d.ts +1 -5
  26. package/lib/epic.js +1 -5
  27. package/lib/index.d.ts +16 -16
  28. package/lib/index.js +29 -39
  29. package/lib/reducer.d.ts +0 -3
  30. package/lib/reducer.js +0 -3
  31. package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +0 -8
  32. package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +0 -16
  33. package/lib/view/addressView/addressViewState.d.ts +1 -1
  34. package/lib/view/dashboard/dashboardSelector.js +6 -7
  35. package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.js +4 -5
  36. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +2 -1
  37. package/lib/view/expenseAutomationView/epics/fluxAnalysis/fetchFluxAnalysisViewEpic.js +6 -18
  38. package/lib/view/expenseAutomationView/epics/fluxAnalysis/reviewFluxAnalysisEpic.js +4 -1
  39. package/lib/view/expenseAutomationView/helpers/helpers.js +4 -4
  40. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +23 -25
  41. package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.d.ts +9 -22
  42. package/lib/view/expenseAutomationView/payload/fluxAnalysisPayload.js +2 -2
  43. package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.d.ts +5 -13
  44. package/lib/view/expenseAutomationView/reducers/fluxAnalysisViewReducer.js +115 -245
  45. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +15 -9
  46. package/lib/view/expenseAutomationView/selectorTypes/fluxAnalysisViewSelectorTypes.d.ts +9 -29
  47. package/lib/view/expenseAutomationView/selectors/fluxAnalysisViewSelector.js +40 -108
  48. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +15 -40
  49. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.js +1 -1
  50. package/lib/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +4 -4
  51. package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.d.ts +1 -2
  52. package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.js +2 -2
  53. package/lib/view/settingsView/settingsViewHelpers.d.ts +4 -4
  54. package/lib/view/settingsView/settingsViewHelpers.js +8 -9
  55. package/lib/view/spendManagement/billPay/billPayReview/billPayReviewSelector.js +1 -1
  56. package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.d.ts +1 -6
  57. package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +2 -20
  58. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +0 -5
  59. package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +2 -9
  60. package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +0 -1
  61. package/lib/view/spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingSelector.js +3 -4
  62. package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigPayload.d.ts +3 -5
  63. package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigPayload.js +2 -4
  64. package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigReducer.js +3 -8
  65. package/lib/view/spendManagement/chargeCards/chargeCardConfig/chargeCardConfigState.d.ts +2 -4
  66. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +0 -12
  67. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.js +0 -26
  68. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailPayload.d.ts +0 -2
  69. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.d.ts +4 -43
  70. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer.js +9 -104
  71. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.d.ts +0 -15
  72. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetailSelector.js +16 -70
  73. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.d.ts +1 -2
  74. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardDetailEpic.js +3 -12
  75. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchChargeCardTransactionListEpic.js +1 -2
  76. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateChargeCardLimitEpic.js +2 -2
  77. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -11
  78. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.js +1 -20
  79. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +1 -16
  80. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.d.ts +4 -6
  81. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListReducer.js +4 -30
  82. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.d.ts +2 -5
  83. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListSelector.js +14 -26
  84. package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.d.ts +2 -2
  85. package/lib/view/spendManagement/chargeCards/chargeCardList/fetchChargeCardListPageEpic.js +5 -20
  86. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.d.ts +1 -2
  87. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewReducer.js +2 -4
  88. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.d.ts +1 -2
  89. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/chargeCardSetUpViewSelector.js +0 -2
  90. package/lib/view/spendManagement/chargeCards/chargeCardSetUp/epic/acceptChargeCardTermsEpic.js +2 -19
  91. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.d.ts +2 -2
  92. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchIssueCardPageEpic.js +3 -15
  93. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.d.ts +2 -2
  94. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardEpic.js +25 -65
  95. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.d.ts +3 -11
  96. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardReducer.js +11 -45
  97. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.d.ts +3 -6
  98. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardSelector.js +18 -33
  99. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.d.ts +8 -41
  100. package/lib/view/spendManagement/chargeCards/issueChargeCard/issueChargeCardState.js +21 -0
  101. package/lib/view/spendManagement/commonSetup/epic/setup/enableSetupEpic.js +0 -9
  102. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +3 -8
  103. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +4 -4
  104. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +1 -2
  105. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -3
  106. package/lib/view/spendManagement/commonSetup/setupViewState.js +1 -13
  107. package/lib/view/spendManagement/helpers.d.ts +0 -3
  108. package/lib/view/spendManagement/helpers.js +1 -13
  109. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/getPaymentAccountsEpic.js +1 -2
  110. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountEpic.js +1 -2
  111. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountLoginStatusEpic.js +1 -2
  112. package/lib/view/spendManagement/plaidAccount/epic/paymentAccounts/updatePaymentAccountStatusEpic.js +1 -2
  113. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.d.ts +1 -2
  114. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +1 -6
  115. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +10 -10
  116. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +0 -1
  117. package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +1 -1
  118. package/lib/view/spendManagement/zeniAccounts/checkDeposit/checkDepositSelector.js +1 -1
  119. package/lib/view/spendManagement/zeniAccounts/depositAccountList/depositAccountListSelector.d.ts +1 -1
  120. package/lib/view/spendManagement/zeniAccounts/depositAccountList/depositAccountListSelector.js +3 -3
  121. package/lib/view/spendManagement/zeniAccounts/expressPay/expressPaySelector.js +1 -1
  122. package/lib/view/spendManagement/zeniAccounts/transferDetail/transferDetailSelector.js +1 -1
  123. package/lib/view/spendManagement/zeniAccounts/zeniAccountList/zeniAccountListSelector.js +1 -1
  124. package/lib/view/twoFactorAuthentication/resendOtpEpic.d.ts +2 -3
  125. package/lib/view/twoFactorAuthentication/resendOtpEpic.js +19 -44
  126. package/lib/view/twoFactorAuthentication/sendOtpEpic.d.ts +1 -2
  127. package/lib/view/twoFactorAuthentication/sendOtpEpic.js +18 -45
  128. package/lib/view/twoFactorAuthentication/twoFactorAuthentication.d.ts +5 -17
  129. package/lib/view/twoFactorAuthentication/twoFactorAuthentication.js +0 -33
  130. package/lib/view/twoFactorAuthentication/twoFactorAuthenticationPayload.d.ts +7 -7
  131. package/lib/view/twoFactorAuthentication/twoFactorAuthenticationPayload.js +6 -6
  132. package/lib/view/twoFactorAuthentication/twoFactorAuthenticationReducer.d.ts +6 -22
  133. package/lib/view/twoFactorAuthentication/twoFactorAuthenticationReducer.js +60 -176
  134. package/lib/view/twoFactorAuthentication/twoFactorAuthenticationSelector.d.ts +3 -5
  135. package/lib/view/twoFactorAuthentication/twoFactorAuthenticationSelector.js +2 -13
  136. package/lib/view/twoFactorAuthentication/verifyOtpEpic.d.ts +2 -5
  137. package/lib/view/twoFactorAuthentication/verifyOtpEpic.js +5 -46
  138. package/lib/view/userListView/fetchUserListByTypeEpic.d.ts +2 -2
  139. package/lib/view/userListView/fetchUserListByTypeEpic.js +3 -4
  140. package/lib/view/userListView/userListViewPayload.d.ts +0 -11
  141. package/package.json +4 -5
  142. package/lib/entity/connectedAccount/connectedAccount.d.ts +0 -19
  143. package/lib/entity/connectedAccount/connectedAccount.js +0 -10
  144. package/lib/entity/connectedAccount/connectedAccountPayload.d.ts +0 -11
  145. package/lib/entity/connectedAccount/connectedAccountPayload.js +0 -15
  146. package/lib/entity/connectedAccount/connectedAccountReducer.d.ts +0 -6
  147. package/lib/entity/connectedAccount/connectedAccountReducer.js +0 -27
  148. package/lib/entity/connectedAccount/connectedAccountSelector.d.ts +0 -4
  149. package/lib/entity/connectedAccount/connectedAccountSelector.js +0 -17
  150. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchDepositAccountLimitEpic.d.ts +0 -8
  151. package/lib/view/spendManagement/chargeCards/chargeCardDetail/fetchDepositAccountLimitEpic.js +0 -41
  152. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateDebitCardPinAttemptEpic.d.ts +0 -11
  153. package/lib/view/spendManagement/chargeCards/chargeCardDetail/updateDebitCardPinAttemptEpic.js +0 -42
  154. package/lib/view/spendManagement/chargeCards/chargeCardList/fetchDebitCardSummaryEpic.d.ts +0 -7
  155. package/lib/view/spendManagement/chargeCards/chargeCardList/fetchDebitCardSummaryEpic.js +0 -23
  156. package/lib/view/spendManagement/chargeCards/issueChargeCard/depositAccountWithLimitPayload.d.ts +0 -6
  157. package/lib/view/spendManagement/chargeCards/issueChargeCard/depositAccountWithLimitPayload.js +0 -2
  158. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchDepositAccountListForCardsEpic.d.ts +0 -8
  159. package/lib/view/spendManagement/chargeCards/issueChargeCard/fetchDepositAccountListForCardsEpic.js +0 -31
@@ -1,66 +1,33 @@
1
1
  import { Amount } from '../../../../commonStateTypes/amount';
2
2
  import { FetchStateAndError, FetchedState, ID } from '../../../../commonStateTypes/common';
3
- import { ChargeCardType, CreditCardCodeType, CreditLimitFrequencyCodeType, DebitCardCodeType, ShippingAddressType } from '../../../../entity/chargeCard/chargeCard';
3
+ import { CardCodeType, CreditLimitFrequencyCodeType, ShippingAddressType } from '../../../../entity/chargeCard/chargeCard';
4
4
  export interface IssueChargeCardState extends FetchedState {
5
5
  localData: IssueChargeCardLocalData[];
6
6
  saveStatus: FetchStateAndError;
7
- activeChargeCardCount: Record<ID, ActiveChargeCardCount>;
8
- activeDebitCardCountByDepositAccountId: Record<ID, ActiveDebitCardCountByUserId>;
9
- depositAccountIds: ID[];
10
- depositAccountsFetchState: FetchStateAndError;
7
+ activeCardCount: Record<ID, ActiveChargeCardCount>;
11
8
  }
12
9
  export interface ActiveChargeCardCount {
13
10
  physicalCardCount: number;
14
11
  virtualCardCount: number;
15
12
  }
16
- export interface ActiveDebitCardCountByUserId {
17
- [userId: ID]: ActiveDebitCardCount;
18
- }
19
- export interface ActiveDebitCardCount {
20
- physicalCardCount: number;
21
- virtualCardCount: number;
22
- }
23
- export interface PhysicalCreditCardData {
24
- cardName: string;
25
- frequency: CreditLimitFrequencyCodeType;
26
- addressType?: ShippingAddressType;
27
- addressId?: ID;
28
- amount?: Amount;
29
- userId?: ID;
30
- }
31
- export interface VirtualCreditCardData {
32
- userIds: ID[];
33
- cardName: string;
34
- frequency: CreditLimitFrequencyCodeType;
35
- amount?: Amount;
36
- }
37
- export interface PhysicalDebitCardData {
13
+ export interface PhysicalCardData {
38
14
  cardName: string;
39
15
  frequency: CreditLimitFrequencyCodeType;
40
16
  addressType?: ShippingAddressType;
41
17
  addressId?: ID;
42
18
  amount?: Amount;
43
19
  userId?: ID;
44
- connectedAccountId?: ID;
45
20
  }
46
- export interface VirtualDebitCardData {
21
+ export interface VirtualCardData {
47
22
  userIds: ID[];
48
23
  cardName: string;
49
24
  frequency: CreditLimitFrequencyCodeType;
50
25
  amount?: Amount;
51
- connectedAccountId?: ID;
52
26
  }
53
27
  export interface IssueChargeCardLocalData {
54
28
  lineId: ID;
55
- chargeCardType: ChargeCardType;
56
- creditCard: {
57
- cardType: CreditCardCodeType;
58
- physicalCard: PhysicalCreditCardData;
59
- virtualCard: VirtualCreditCardData;
60
- };
61
- debitCard: {
62
- cardType: DebitCardCodeType;
63
- physicalCard: PhysicalDebitCardData;
64
- virtualCard: VirtualDebitCardData;
65
- };
29
+ cardType: CardCodeType;
30
+ physicalCard: PhysicalCardData;
31
+ virtualCard: VirtualCardData;
66
32
  }
33
+ export declare const initialIssueChargeCardLocalData: IssueChargeCardLocalData[];
@@ -1,2 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initialIssueChargeCardLocalData = void 0;
4
+ exports.initialIssueChargeCardLocalData = [
5
+ {
6
+ lineId: '1',
7
+ cardType: 'business_virtual_credit_card',
8
+ physicalCard: {
9
+ userId: undefined,
10
+ cardName: '',
11
+ frequency: 'monthly',
12
+ addressType: undefined,
13
+ addressId: undefined,
14
+ amount: undefined,
15
+ },
16
+ virtualCard: {
17
+ userIds: [],
18
+ cardName: '',
19
+ frequency: 'monthly',
20
+ amount: undefined,
21
+ },
22
+ },
23
+ ];
@@ -18,15 +18,6 @@ const enableSetupEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operat
18
18
  case 'charge_cards':
19
19
  payload = { is_charge_cards_enabled: true };
20
20
  break;
21
- case 'debit_cards':
22
- payload = { is_debit_cards_enabled: true };
23
- break;
24
- case 'charge_cards__debit_cards':
25
- payload = {
26
- is_charge_cards_enabled: true,
27
- is_debit_cards_enabled: true,
28
- };
29
- break;
30
21
  case 'zeni_accounts':
31
22
  payload = { is_deposit_accounts_enabled: true };
32
23
  break;
@@ -19,7 +19,6 @@ const responsePayload_1 = require("../../../../../responsePayload");
19
19
  const addressViewPayload_1 = require("../../../../addressView/addressViewPayload");
20
20
  const addressViewSelector_1 = require("../../../../addressView/addressViewSelector");
21
21
  const getCompanyView_1 = require("../../../../companyView/selectorHelpers/getCompanyView");
22
- const helpers_1 = require("../../../helpers");
23
22
  const setupViewReducer_1 = require("../../setupViewReducer");
24
23
  const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.updateBusinessVerificationDetails.match), (0, operators_1.mergeMap)((action) => {
25
24
  var _a, _b, _c, _d;
@@ -49,7 +48,7 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
49
48
  Boolean(companyOfficerLocalData.email) === true // Don't save Empty Company Officer details
50
49
  ? (0, exports.toBusinessVerificationOfficerDataPayload)(companyOfficerLocalData, isSubmittingAdditionalDocuments, companyOfficerAddressToCreate)
51
50
  : {};
52
- const business_verification_submitted_for_feature = getBusinessVerificationForFeature(setupViewType);
51
+ const business_verification_submitted_for_feature = getBussinessVerificationForFeature(setupViewType);
53
52
  let payload = {
54
53
  company,
55
54
  company_officer,
@@ -72,7 +71,7 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
72
71
  }),
73
72
  (0, addressReducer_1.updateAddresses)(response.data.addresses),
74
73
  (0, fileReducer_1.updateFiles)({ files: response.data.files }),
75
- (0, accountReducer_1.updateAccounts)(response.data.accounts, (0, helpers_1.getReportIDPlusForecastIDFromSetupViewType)(setupViewType)),
74
+ (0, accountReducer_1.updateAccounts)(response.data.accounts, setupViewType),
76
75
  (0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
77
76
  (0, setupViewReducer_1.updateSetupViewLocalStoreData)({
78
77
  companyId: response.data.companies[0].company_id,
@@ -239,14 +238,10 @@ const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAd
239
238
  return company_officer;
240
239
  };
241
240
  exports.toBusinessVerificationOfficerDataPayload = toBusinessVerificationOfficerDataPayload;
242
- const getBusinessVerificationForFeature = (setupViewType) => {
241
+ const getBussinessVerificationForFeature = (setupViewType) => {
243
242
  switch (setupViewType) {
244
243
  case 'charge_cards':
245
244
  return 'charge_cards';
246
- case 'debit_cards':
247
- return 'debit_cards';
248
- case 'charge_cards__debit_cards':
249
- return 'charge_cards__debit_cards';
250
245
  case 'reimbursement':
251
246
  return 'reimbursements';
252
247
  case 'zeni_accounts':
@@ -4,13 +4,13 @@ import { ZeniDate } from '../../../zeniDayJS';
4
4
  import { CompanyOfficerType } from '../../companyView/types/companyPassport/companyUsersLocalData';
5
5
  import { SetupViewLocalData, SetupViewState } from './setupViewState';
6
6
  export declare const initialState: SetupViewState;
7
- export declare const enableSetup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards"], {
7
+ export declare const enableSetup: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing"], {
8
8
  companyId: string;
9
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
10
- }, "setupView/enableSetup", never, never>, enableSetupSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/enableSetupSuccess">, enableSetupFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "setupView/enableSetupFailure", never, never>, updateBusinessVerificationDetails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, officerType: "Officer_1" | "Officer_3" | "Officer_2" | "Officer_4" | "Officer_5" | "Officer_6" | "Officer_7" | "Officer_8" | "Officer_9" | "Officer_10", setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards", sendForVerification?: any, fromBillListScreen?: any, isSubmittingAdditionalDocuments?: any], {
9
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing";
10
+ }, "setupView/enableSetup", never, never>, enableSetupSuccess: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"setupView/enableSetupSuccess">, enableSetupFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>], ZeniAPIStatus<Record<string, unknown>>, "setupView/enableSetupFailure", never, never>, updateBusinessVerificationDetails: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[companyId: string, officerType: "Officer_1" | "Officer_3" | "Officer_2" | "Officer_4" | "Officer_5" | "Officer_6" | "Officer_7" | "Officer_8" | "Officer_9" | "Officer_10", setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing", sendForVerification?: any, fromBillListScreen?: any, isSubmittingAdditionalDocuments?: any], {
11
11
  companyId: string;
12
12
  officerType: "Officer_1" | "Officer_3" | "Officer_2" | "Officer_4" | "Officer_5" | "Officer_6" | "Officer_7" | "Officer_8" | "Officer_9" | "Officer_10";
13
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
13
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing";
14
14
  sendForVerification: any;
15
15
  fromBillListScreen: any;
16
16
  isSubmittingAdditionalDocuments: any;
@@ -10,7 +10,6 @@ const fileSelector_1 = require("../../../entity/file/fileSelector");
10
10
  const paymentAccountSelector_1 = require("../../../entity/paymentAccount/paymentAccountSelector");
11
11
  const getCompanyView_1 = require("../../companyView/selectorHelpers/getCompanyView");
12
12
  const fileViewSelector_1 = require("../../fileView/fileViewSelector");
13
- const helpers_1 = require("../helpers");
14
13
  const plaidAccountViewSelector_1 = require("../plaidAccount/plaidAccountViewSelector");
15
14
  function getCommonSetupViewDetails(state, companyId, setupViewType, plaidAccountKeyType) {
16
15
  var _a, _b, _c, _d;
@@ -20,7 +19,7 @@ function getCommonSetupViewDetails(state, companyId, setupViewType, plaidAccount
20
19
  const { allBankAccountIds } = accountDetails;
21
20
  const { paymentAccountIds, paymentAccountBalanceFetchStatus } = paymentAccountListState;
22
21
  const { accountIds: depositAccountIds } = depositAccountListState;
23
- const allBankAccounts = (_a = allBankAccountIds === null || allBankAccountIds === void 0 ? void 0 : allBankAccountIds.map((accountId) => (0, accountSelector_1.getAccountBase)(accountState, accountId, (0, helpers_1.getReportIDPlusForecastIDFromSetupViewType)(setupViewType))).filter((account) => account != null)) !== null && _a !== void 0 ? _a : [];
22
+ const allBankAccounts = (_a = allBankAccountIds === null || allBankAccountIds === void 0 ? void 0 : allBankAccountIds.map((accountId) => (0, accountSelector_1.getAccountBase)(accountState, accountId, setupViewType)).filter((account) => account != null)) !== null && _a !== void 0 ? _a : [];
24
23
  const paymentAccounts = (_b = (0, paymentAccountSelector_1.getPaymentAccountsByPaymentAccountIds)(paymentAccountState, paymentAccountIds).filter((account) => account != null)) !== null && _b !== void 0 ? _b : [];
25
24
  const depositAccounts = (_c = (0, depositAccountSelector_1.getDepositAccountsByDepositAccountIds)(depositAccountState, depositAccountIds).filter((account) => account != null)) !== null && _c !== void 0 ? _c : [];
26
25
  const allFundingAccounts = (0, exports.getAllFundingAccounts)(setupViewType === 'zeni_accounts' ? [] : depositAccounts, // only external acct can be made primary for accounts setup
@@ -4,10 +4,8 @@ import { AllowedDocumentType } from '../../../entity/file/fileState';
4
4
  import { ZeniDate } from '../../../zeniDayJS';
5
5
  import ZeniUrl from '../../../zeniUrl';
6
6
  import { CompanyOfficerType } from '../../companyView/types/companyPassport/companyUsersLocalData';
7
- declare const toSetupViewType: (v: string) => "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
7
+ declare const toSetupViewType: (v: string) => "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing";
8
8
  export type SetupViewType = ReturnType<typeof toSetupViewType>;
9
- export declare const toChargeCardSetupViewType: (v: string) => "charge_cards" | "debit_cards" | "charge_cards__debit_cards";
10
- export type ChargeCardSetupViewType = ReturnType<typeof toChargeCardSetupViewType>;
11
9
  /**
12
10
  * Setup View Local Data - Interfaces
13
11
  */
@@ -1,19 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toChargeCardSetupViewType = void 0;
4
3
  const stringToUnion_1 = require("../../../commonStateTypes/stringToUnion");
5
4
  const entityApprovalStatusState_1 = require("../../../entity/entityApprovalStatus/entityApprovalStatusState");
6
5
  const SETUP_VIEW_TYPES = ['billing'];
7
6
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
8
- const toSetupViewType = (v) => (0, stringToUnion_1.stringToUnion)(v, [
9
- ...entityApprovalStatusState_1.ALL_ENTITY_TYPES,
10
- ...SETUP_VIEW_TYPES,
11
- ...CHARGE_CARD_SETUP_VIEW_TYPES,
12
- ]);
13
- const CHARGE_CARD_SETUP_VIEW_TYPES = [
14
- 'charge_cards',
15
- 'debit_cards',
16
- 'charge_cards__debit_cards',
17
- ];
18
- const toChargeCardSetupViewType = (v) => (0, stringToUnion_1.stringToUnion)(v, CHARGE_CARD_SETUP_VIEW_TYPES);
19
- exports.toChargeCardSetupViewType = toChargeCardSetupViewType;
7
+ const toSetupViewType = (v) => (0, stringToUnion_1.stringToUnion)(v, [...entityApprovalStatusState_1.ALL_ENTITY_TYPES, ...SETUP_VIEW_TYPES]);
@@ -1,5 +1,4 @@
1
1
  import { Amount } from '../../commonStateTypes/amount';
2
- import { ReportIDPlusForecastID } from '../../commonStateTypes/viewAndReport/viewAndReport';
3
2
  import { BillPayInfo, BulkProcessingStateType } from '../../entity/billPay/billTransaction/billTransactionState';
4
3
  import { RecurringBillConfig } from '../../entity/billPay/recurringBills/recurringBillsState';
5
4
  import { ReimbursementTypeCode } from '../../entity/reimbursement/reimbursementState';
@@ -11,7 +10,6 @@ import { BillTransactionView } from './billPay/billList/billListSelector';
11
10
  import { AccType, AccountTypeSubConfigCodeKeyType } from './billPay/billPayConfig/billPayConfigState';
12
11
  import { RecurringBillConfigLocalData, RecurringBillInstance } from './billPay/editBillView/editBillViewState';
13
12
  import { BusinessVerificationDetails, CompanyOfficersDetails } from './commonSetup/setupViewSelector';
14
- import { SetupViewType } from './commonSetup/setupViewState';
15
13
  import { RemiActivity } from './reimbursement/remiDetailView/remiDetailViewSelector';
16
14
  export declare const getLatestApprovalDate: (allActivities: BillActivity[] | RemiActivity[]) => ZeniDate | undefined;
17
15
  export declare function getSpendManagementEffectiveListPeriod(): import("../..").TimePeriod;
@@ -40,5 +38,4 @@ export interface ZeniAccountsPromoConfig {
40
38
  export declare const toAccountsPromoConfig: (dynamicConfigValue: Record<string, unknown>) => ZeniAccountsPromoConfig;
41
39
  export declare const isPaymentMethodOutsideZeni: (code?: string) => boolean;
42
40
  export declare const isAwaitingMarkAsPaid: (code?: string) => boolean;
43
- export declare const getReportIDPlusForecastIDFromSetupViewType: (setupViewType: SetupViewType) => ReportIDPlusForecastID;
44
41
  export declare const checkIfLowBalance: (totalAmount: Amount, bankBalance: Amount) => boolean;
@@ -3,14 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.checkIfLowBalance = exports.getReportIDPlusForecastIDFromSetupViewType = exports.isAwaitingMarkAsPaid = exports.isPaymentMethodOutsideZeni = exports.toAccountsPromoConfig = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.getActualPaymentDate = exports.accountTypeSubConfigCodeToAccType = exports.isRecurringConfigChanged = exports.updateRecurringBillDetails = exports.getPaymentDateFromVendorReceiveDate = exports.getSelectedCompanyOfficer = exports.getLatestApprovalDate = void 0;
6
+ exports.checkIfLowBalance = exports.isAwaitingMarkAsPaid = exports.isPaymentMethodOutsideZeni = exports.toAccountsPromoConfig = exports.getBulkOperationSuffix = exports.getRemiListUniqueType = exports.getBillListUniqueType = exports.isBulkProcessing = exports.getActualPaymentDate = exports.accountTypeSubConfigCodeToAccType = exports.isRecurringConfigChanged = exports.updateRecurringBillDetails = exports.getPaymentDateFromVendorReceiveDate = exports.getSelectedCompanyOfficer = exports.getLatestApprovalDate = void 0;
7
7
  exports.getSpendManagementEffectiveListPeriod = getSpendManagementEffectiveListPeriod;
8
8
  exports.showReimbursementPromoPage = showReimbursementPromoPage;
9
9
  exports.showBillPayPromoPage = showBillPayPromoPage;
10
10
  exports.isVerifiedStatusCode = isVerifiedStatusCode;
11
11
  const uniq_1 = __importDefault(require("lodash/uniq"));
12
12
  const timeframeTick_1 = require("../../commonStateTypes/timeframeTick");
13
- const viewAndReport_1 = require("../../commonStateTypes/viewAndReport/viewAndReport");
14
13
  const workingDayHelper_1 = require("../../commonStateTypes/workingDayHelper");
15
14
  const userRoleType_1 = require("../../entity/userRole/userRoleType");
16
15
  const zeniDayJS_1 = require("../../zeniDayJS");
@@ -340,17 +339,6 @@ const isAwaitingMarkAsPaid = (code) => {
340
339
  return code != null ? code === 'awaiting_to_be_marked_as_paid' : false;
341
340
  };
342
341
  exports.isAwaitingMarkAsPaid = isAwaitingMarkAsPaid;
343
- const getReportIDPlusForecastIDFromSetupViewType = (setupViewType) => {
344
- if (setupViewType === 'charge_cards__debit_cards' ||
345
- setupViewType === 'charge_cards' ||
346
- setupViewType === 'debit_cards') {
347
- return 'charge_cards';
348
- }
349
- else {
350
- return (0, viewAndReport_1.toReportID)(setupViewType);
351
- }
352
- };
353
- exports.getReportIDPlusForecastIDFromSetupViewType = getReportIDPlusForecastIDFromSetupViewType;
354
342
  const checkIfLowBalance = (totalAmount, bankBalance) => {
355
343
  let isLowBalance = false;
356
344
  if (totalAmount.currencyCode === bankBalance.currencyCode) {
@@ -6,7 +6,6 @@ const operators_1 = require("rxjs/operators");
6
6
  const accountReducer_1 = require("../../../../../entity/account/accountReducer");
7
7
  const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/paymentAccountReducer");
8
8
  const responsePayload_1 = require("../../../../../responsePayload");
9
- const helpers_1 = require("../../../helpers");
10
9
  const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
11
10
  const getPaymentAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.getPaymentAccounts.match), (0, operators_1.switchMap)((action) => {
12
11
  const { setupViewType, includeBalances, plaidAccountKeyType } = action.payload;
@@ -27,7 +26,7 @@ const getPaymentAccountsEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0,
27
26
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
28
27
  const paymentAccountIds = response.data.payment_accounts.map((paymentAccount) => paymentAccount.payment_account_id);
29
28
  const actions = [
30
- (0, accountReducer_1.updateAccounts)(response.data.accounts, (0, helpers_1.getReportIDPlusForecastIDFromSetupViewType)(setupViewType)),
29
+ (0, accountReducer_1.updateAccounts)(response.data.accounts, setupViewType),
31
30
  (0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
32
31
  (0, plaidAccountViewReducer_1.getPaymentAccountsSuccess)(paymentAccountIds, plaidAccountKeyType),
33
32
  ];
@@ -6,7 +6,6 @@ const operators_1 = require("rxjs/operators");
6
6
  const accountReducer_1 = require("../../../../../entity/account/accountReducer");
7
7
  const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/paymentAccountReducer");
8
8
  const responsePayload_1 = require("../../../../../responsePayload");
9
- const helpers_1 = require("../../../helpers");
10
9
  const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
11
10
  const updatePaymentAccountEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.updatePaymentAccount.match), (0, operators_1.mergeMap)((action) => {
12
11
  const { accountId, paymentAccountId, setupViewType, plaidAccountKeyType } = action.payload;
@@ -17,7 +16,7 @@ const updatePaymentAccountEpic = (actions$, _state$, zeniAPI) => actions$.pipe((
17
16
  .pipe((0, operators_1.mergeMap)((response) => {
18
17
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
19
18
  const actions = [
20
- (0, accountReducer_1.updateAccounts)(response.data.accounts, (0, helpers_1.getReportIDPlusForecastIDFromSetupViewType)(setupViewType)),
19
+ (0, accountReducer_1.updateAccounts)(response.data.accounts, setupViewType),
21
20
  (0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
22
21
  (0, plaidAccountViewReducer_1.updatePaymentAccountSuccess)(plaidAccountKeyType),
23
22
  ];
@@ -7,7 +7,6 @@ const accountReducer_1 = require("../../../../../entity/account/accountReducer")
7
7
  const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/paymentAccountReducer");
8
8
  const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
9
9
  const responsePayload_1 = require("../../../../../responsePayload");
10
- const helpers_1 = require("../../../helpers");
11
10
  const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
12
11
  const updatePaymentAccountLoginStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.updatePaymentAccountLoginStatus.match), (0, operators_1.mergeMap)((action) => {
13
12
  const { isLoginRequired, paymentAccountId, setupViewType, linkTokenType, plaidAccountKeyType, } = action.payload;
@@ -19,7 +18,7 @@ const updatePaymentAccountLoginStatusEpic = (actions$, _state$, zeniAPI) => acti
19
18
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
20
19
  const paymentAccountIds = response.data.payment_accounts.map((paymentAccount) => paymentAccount.payment_account_id);
21
20
  const actions = [
22
- (0, accountReducer_1.updateAccounts)(response.data.accounts, (0, helpers_1.getReportIDPlusForecastIDFromSetupViewType)(setupViewType)),
21
+ (0, accountReducer_1.updateAccounts)(response.data.accounts, setupViewType),
23
22
  (0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
24
23
  (0, plaidAccountViewReducer_1.updatePaymentAccountLoginStatusSuccess)(paymentAccountIds, linkTokenType, plaidAccountKeyType),
25
24
  ];
@@ -7,7 +7,6 @@ const accountReducer_1 = require("../../../../../entity/account/accountReducer")
7
7
  const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/paymentAccountReducer");
8
8
  const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
9
9
  const responsePayload_1 = require("../../../../../responsePayload");
10
- const helpers_1 = require("../../../helpers");
11
10
  const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
12
11
  const updatePaymentAccountStatusEpic = (actions$, _state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.updatePaymentAccountStatus.match), (0, operators_1.mergeMap)((action) => {
13
12
  const { verificationStatusCode, paymentAccountId, setupViewType, linkTokenType, plaidAccountKeyType, } = action.payload;
@@ -18,7 +17,7 @@ const updatePaymentAccountStatusEpic = (actions$, _state$, zeniAPI) => actions$.
18
17
  .pipe((0, operators_1.mergeMap)((response) => {
19
18
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
20
19
  const actions = [
21
- (0, accountReducer_1.updateAccounts)(response.data.accounts, (0, helpers_1.getReportIDPlusForecastIDFromSetupViewType)(setupViewType)),
20
+ (0, accountReducer_1.updateAccounts)(response.data.accounts, setupViewType),
22
21
  (0, paymentAccountReducer_1.updatePaymentAccounts)(response.data.payment_accounts),
23
22
  (0, plaidAccountViewReducer_1.updatePaymentAccountStatusSuccess)(linkTokenType, plaidAccountKeyType),
24
23
  ];
@@ -9,8 +9,7 @@ import { RootState } from '../../../../../reducer';
9
9
  import { ZeniAPI } from '../../../../../zeniAPI';
10
10
  import { fetchBillingAccountsView } from '../../../../settingsView/settingsViewReducer';
11
11
  import { updateUserBankAccount } from '../../../../userFinancialAccount/userFinancialAccountReducer';
12
- import { updateNewAddedBillPaymentAccount } from '../../../billPay/editBillView/editBillViewReducer';
13
12
  import { updatePaymentAccountList } from '../../../zeniAccounts/paymentAccountList/paymentAccountListReducer';
14
13
  import { establishPlaidConnection, establishPlaidConnectionFailure, establishPlaidConnectionSuccess, getPaymentAccounts } from '../../plaidAccountViewReducer';
15
- export 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> | ReturnType<typeof updateNewAddedBillPaymentAccount>;
14
+ export 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>;
16
15
  export declare const establishPlaidConnectionEpic: (actions$: ActionsObservable<ActionType>, state: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -10,8 +10,6 @@ const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/pa
10
10
  const snackbarReducer_1 = require("../../../../../entity/snackbar/snackbarReducer");
11
11
  const responsePayload_1 = require("../../../../../responsePayload");
12
12
  const userFinancialAccountReducer_1 = require("../../../../userFinancialAccount/userFinancialAccountReducer");
13
- const editBillViewReducer_1 = require("../../../billPay/editBillView/editBillViewReducer");
14
- const helpers_1 = require("../../../helpers");
15
13
  const paymentAccountListReducer_1 = require("../../../zeniAccounts/paymentAccountList/paymentAccountListReducer");
16
14
  const plaidAccountViewReducer_1 = require("../../plaidAccountViewReducer");
17
15
  const establishPlaidConnectionEpic = (actions$, state, zeniAPI) => actions$.pipe((0, operators_1.filter)(plaidAccountViewReducer_1.establishPlaidConnection.match), (0, operators_1.mergeMap)((action) => {
@@ -63,9 +61,6 @@ const establishPlaidConnectionEpic = (actions$, state, zeniAPI) => actions$.pipe
63
61
  }),
64
62
  (0, plaidAccountViewReducer_1.establishPlaidConnectionSuccess)(linkTokenType, plaidAccountKeyType),
65
63
  ];
66
- if (plaidAccountKeyType === 'bill_pay_detail') {
67
- actions.push((0, editBillViewReducer_1.updateNewAddedBillPaymentAccount)(paymentAccount.payment_account_id));
68
- }
69
64
  if (setupViewType != null) {
70
65
  const primaryAccountForProducts = [];
71
66
  // if the account added is primary for any product, it should be reflected on that setup page without refresh also
@@ -114,7 +109,7 @@ const establishPlaidConnectionEpic = (actions$, state, zeniAPI) => actions$.pipe
114
109
  actions.push((0, bankAccountReducer_1.updateBankAccounts)(response.data.bank_accounts), (0, userFinancialAccountReducer_1.updateUserBankAccount)({ bankAccountIds, userId }));
115
110
  }
116
111
  if (setupViewType != null) {
117
- actions.push((0, accountReducer_1.updateAccounts)(response.data.accounts, (0, helpers_1.getReportIDPlusForecastIDFromSetupViewType)(setupViewType)));
112
+ actions.push((0, accountReducer_1.updateAccounts)(response.data.accounts, setupViewType));
118
113
  }
119
114
  //show notification in case user account is added
120
115
  else {
@@ -1,8 +1,8 @@
1
1
  import { ZeniAPIStatus } from '../../../responsePayload';
2
2
  import { PlaidAccountKeyType, PlaidAccountViewState, PlaidLinkTokenType } from './plaidAccountViewState';
3
3
  export declare const initialState: PlaidAccountViewState;
4
- export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType, includeBalances?: boolean | undefined], {
5
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
4
+ export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing", plaidAccountKeyType: PlaidAccountKeyType, includeBalances?: boolean | undefined], {
5
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing";
6
6
  includeBalances: boolean;
7
7
  plaidAccountKeyType: PlaidAccountKeyType;
8
8
  }, "plaidAccountView/getPaymentAccounts", never, never>, getPaymentAccountsSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[paymentAccountIds: string[], plaidAccountKeyType: PlaidAccountKeyType], {
@@ -11,20 +11,20 @@ export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreato
11
11
  }, "plaidAccountView/getPaymentAccountsSuccess", never, never>, getPaymentAccountsFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>, plaidAccountKeyType: PlaidAccountKeyType], {
12
12
  error: ZeniAPIStatus<Record<string, unknown>>;
13
13
  plaidAccountKeyType: PlaidAccountKeyType;
14
- }, "plaidAccountView/getPaymentAccountsFailure", never, never>, updatePaymentAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accountId: string, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType], {
14
+ }, "plaidAccountView/getPaymentAccountsFailure", never, never>, updatePaymentAccount: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[accountId: string, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing", plaidAccountKeyType: PlaidAccountKeyType], {
15
15
  accountId: string;
16
16
  paymentAccountId: string;
17
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
17
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing";
18
18
  plaidAccountKeyType: PlaidAccountKeyType;
19
19
  }, "plaidAccountView/updatePaymentAccount", never, never>, updatePaymentAccountSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[plaidAccountKeyType: PlaidAccountKeyType], {
20
20
  plaidAccountKeyType: PlaidAccountKeyType;
21
21
  }, "plaidAccountView/updatePaymentAccountSuccess", never, never>, updatePaymentAccountFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[error: ZeniAPIStatus<Record<string, unknown>>, plaidAccountKeyType: PlaidAccountKeyType], {
22
22
  error: ZeniAPIStatus<Record<string, unknown>>;
23
23
  plaidAccountKeyType: PlaidAccountKeyType;
24
- }, "plaidAccountView/updatePaymentAccountFailure", never, never>, updatePaymentAccountStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[verificationStatusCode: string, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType, linkTokenType?: PlaidLinkTokenType | undefined], {
24
+ }, "plaidAccountView/updatePaymentAccountFailure", never, never>, updatePaymentAccountStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[verificationStatusCode: string, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing", plaidAccountKeyType: PlaidAccountKeyType, linkTokenType?: PlaidLinkTokenType | undefined], {
25
25
  verificationStatusCode: string;
26
26
  paymentAccountId: string;
27
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
27
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing";
28
28
  plaidAccountKeyType: PlaidAccountKeyType;
29
29
  linkTokenType: PlaidLinkTokenType;
30
30
  }, "plaidAccountView/updatePaymentAccountStatus", never, never>, updatePaymentAccountStatusSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[linkTokenType: PlaidLinkTokenType, plaidAccountKeyType: PlaidAccountKeyType], {
@@ -34,10 +34,10 @@ export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreato
34
34
  error: ZeniAPIStatus<Record<string, unknown>>;
35
35
  linkTokenType: PlaidLinkTokenType;
36
36
  plaidAccountKeyType: PlaidAccountKeyType;
37
- }, "plaidAccountView/updatePaymentAccountStatusFailure", never, never>, updatePaymentAccountLoginStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isLoginRequired: boolean, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType, linkTokenType?: PlaidLinkTokenType | undefined], {
37
+ }, "plaidAccountView/updatePaymentAccountStatusFailure", never, never>, updatePaymentAccountLoginStatus: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[isLoginRequired: boolean, paymentAccountId: string, setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing", plaidAccountKeyType: PlaidAccountKeyType, linkTokenType?: PlaidLinkTokenType | undefined], {
38
38
  isLoginRequired: boolean;
39
39
  paymentAccountId: string;
40
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
40
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing";
41
41
  plaidAccountKeyType: PlaidAccountKeyType;
42
42
  linkTokenType: PlaidLinkTokenType;
43
43
  }, "plaidAccountView/updatePaymentAccountLoginStatus", never, never>, updatePaymentAccountLoginStatusSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[paymentAccountIds: string[], linkTokenType: PlaidLinkTokenType, plaidAccountKeyType: PlaidAccountKeyType], {
@@ -61,10 +61,10 @@ export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreato
61
61
  error: ZeniAPIStatus<Record<string, unknown>>;
62
62
  linkTokenType: PlaidLinkTokenType;
63
63
  plaidAccountKeyType: PlaidAccountKeyType;
64
- }, "plaidAccountView/getPlaidLinkTokenFailure", never, never>, establishPlaidConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[publicToken: string, companyId: string, plaidAccountKeyType: PlaidAccountKeyType, setupViewType?: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards" | undefined, linkTokenType?: PlaidLinkTokenType | undefined, zeniMappedAccountId?: string | undefined], {
64
+ }, "plaidAccountView/getPlaidLinkTokenFailure", never, never>, establishPlaidConnection: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[publicToken: string, companyId: string, plaidAccountKeyType: PlaidAccountKeyType, setupViewType?: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | undefined, linkTokenType?: PlaidLinkTokenType | undefined, zeniMappedAccountId?: string | undefined], {
65
65
  publicToken: string;
66
66
  companyId: string;
67
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards" | undefined;
67
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "charge_cards" | "billing" | undefined;
68
68
  linkTokenType: PlaidLinkTokenType;
69
69
  plaidAccountKeyType: PlaidAccountKeyType;
70
70
  zeniMappedAccountId: string | undefined;
@@ -8,7 +8,6 @@ const plaidAccountViewState_1 = require("./plaidAccountViewState");
8
8
  exports.initialState = {
9
9
  spend_management_setup: plaidAccountViewState_1.initialPlaidAccountState,
10
10
  bill_pay_setup: plaidAccountViewState_1.initialPlaidAccountState,
11
- bill_pay_detail: plaidAccountViewState_1.initialPlaidAccountState,
12
11
  reimbursement_setup: plaidAccountViewState_1.initialPlaidAccountState,
13
12
  account_setup: plaidAccountViewState_1.initialPlaidAccountState,
14
13
  charge_card_setup: plaidAccountViewState_1.initialPlaidAccountState,
@@ -1,7 +1,7 @@
1
1
  import { FetchStateAndError, ID } from '../../../commonStateTypes/common';
2
2
  import { ZeniDate } from '../../../zeniDayJS';
3
3
  export type PlaidLinkTokenType = 'link_account' | 'update_account' | 'link_account_no_microdeposit' | 'link_external_account';
4
- export type PlaidAccountKeyType = 'spend_management_setup' | 'bill_pay_setup' | 'bill_pay_detail' | 'reimbursement_setup' | 'account_setup' | 'charge_card_setup' | 'user_reimbursement_account' | 'external_account' | 'billing_setup' | 'expense_automation_reconcile';
4
+ export type PlaidAccountKeyType = 'spend_management_setup' | 'bill_pay_setup' | 'reimbursement_setup' | 'account_setup' | 'charge_card_setup' | 'user_reimbursement_account' | 'external_account' | 'billing_setup' | 'expense_automation_reconcile';
5
5
  export type PlaidConnectionDetails = Record<PlaidLinkTokenType, {
6
6
  linkToken?: string;
7
7
  expiration?: ZeniDate;
@@ -9,7 +9,7 @@ const getCheckDepositDetail = (state) => {
9
9
  const updateFileStatusById = {};
10
10
  const { depositAccountState, depositAccountListState, checkDepositState, fileState, } = state;
11
11
  const { localData, fetchState, error } = checkDepositState;
12
- const depositAccountsView = (0, depositAccountListSelector_1.getAllDepositAccounts)(depositAccountState, depositAccountListState);
12
+ const depositAccountsView = (0, depositAccountListSelector_1.getAllDepostAccounts)(depositAccountState, depositAccountListState);
13
13
  localData.fileIds.forEach((fileId) => {
14
14
  deleteFileStatusById[fileId] = (0, fileViewSelector_1.getFileDeleteStatusById)(state, fileId);
15
15
  updateFileStatusById[fileId] = (0, fileViewSelector_1.getFileUpdateNameStatusById)(state, fileId);
@@ -4,4 +4,4 @@ import { DepositAccountListState } from './depositAccountList';
4
4
  export interface DepositAccountListSelectorView extends SelectorView {
5
5
  depositAccounts: DepositAccount[];
6
6
  }
7
- export declare const getAllDepositAccounts: (depositAccountState: DepositAccountState, depositAccountListState: DepositAccountListState) => DepositAccountListSelectorView;
7
+ export declare const getAllDepostAccounts: (depositAccountState: DepositAccountState, depositAccountListState: DepositAccountListState) => DepositAccountListSelectorView;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAllDepositAccounts = void 0;
3
+ exports.getAllDepostAccounts = void 0;
4
4
  const depositAccountSelector_1 = require("../../../../entity/depositAccount/depositAccountSelector");
5
- const getAllDepositAccounts = (depositAccountState, depositAccountListState) => {
5
+ const getAllDepostAccounts = (depositAccountState, depositAccountListState) => {
6
6
  return {
7
7
  depositAccounts: (0, depositAccountSelector_1.getDepositAccountsByDepositAccountIds)(depositAccountState, depositAccountListState.accountIds),
8
8
  fetchState: depositAccountListState.fetchState,
@@ -10,4 +10,4 @@ const getAllDepositAccounts = (depositAccountState, depositAccountListState) =>
10
10
  version: 0,
11
11
  };
12
12
  };
13
- exports.getAllDepositAccounts = getAllDepositAccounts;
13
+ exports.getAllDepostAccounts = getAllDepostAccounts;
@@ -38,7 +38,7 @@ const getExpressPayView = (state) => {
38
38
  ...vendorBankAccounts.map((acc) => (0, editBillViewSelector_1.toPaymentToOption)(acc)),
39
39
  ...vendorPaymentInstruments.map((pi) => (0, editBillViewSelector_1.toPaymentToOption)(pi)),
40
40
  ].sort((a, b) => { var _a; return (((_a = b.createTime) === null || _a === void 0 ? void 0 : _a.isAfter(a.createTime)) === true ? 1 : -1); });
41
- const allDepositAccounts = (0, depositAccountListSelector_1.getAllDepositAccounts)(depositAccountState, depositAccountListState).depositAccounts;
41
+ const allDepositAccounts = (0, depositAccountListSelector_1.getAllDepostAccounts)(depositAccountState, depositAccountListState).depositAccounts;
42
42
  const withdrawFromList = (0, setupViewSelector_1.getAllFundingAccounts)(allDepositAccounts, [], paymentAccountListState.paymentAccountBalanceFetchStatus).sort((a, b) => { var _a; return (((_a = a.createTime) === null || _a === void 0 ? void 0 : _a.isAfter(b.createTime)) === true ? 1 : -1); });
43
43
  const internationalWireOnboardingStatus = companyView === null || companyView === void 0 ? void 0 : companyView.company.company.companyBillPayInfo.internationalWireOnboardingStatus;
44
44
  const fileId = (_k = expressPayState.formLocalData) === null || _k === void 0 ? void 0 : _k.receiptFileId;
@@ -8,7 +8,7 @@ const paymentAccountListSelector_1 = require("../paymentAccountList/paymentAccou
8
8
  const getTransferDetail = (state) => {
9
9
  const { transferDetailState, depositAccountState, paymentAccountState, depositAccountListState, paymentAccountListState, } = state;
10
10
  const { localData, fetchState, error, reviewTransferDetail } = transferDetailState;
11
- const depositAccountsView = (0, depositAccountListSelector_1.getAllDepositAccounts)(depositAccountState, depositAccountListState);
11
+ const depositAccountsView = (0, depositAccountListSelector_1.getAllDepostAccounts)(depositAccountState, depositAccountListState);
12
12
  const paymentAccountsView = (0, paymentAccountListSelector_1.getAllPaymentAccounts)(paymentAccountState, paymentAccountListState);
13
13
  let transferParties = [];
14
14
  const transferMoneyPartiesFetchState = (0, reduceFetchState_1.reduceAllFetchState)([
@@ -9,7 +9,7 @@ const zeniAccountsConfigSelector_1 = require("../zeniAccountsConfig/zeniAccounts
9
9
  const getZeniAccountList = (state) => {
10
10
  const { zeniAccountListState, depositAccountState, paymentAccountState, plaidAccountViewState, depositAccountListState, paymentAccountListState, } = state;
11
11
  const { plaidConnectionDetails } = plaidAccountViewState['external_account'];
12
- const depositAccountsSelectorView = (0, depositAccountListSelector_1.getAllDepositAccounts)(depositAccountState, depositAccountListState);
12
+ const depositAccountsSelectorView = (0, depositAccountListSelector_1.getAllDepostAccounts)(depositAccountState, depositAccountListState);
13
13
  const zeniAccountsConfig = (0, zeniAccountsConfigSelector_1.getZeniAccountsConfigDetail)(state);
14
14
  const { paymentAccountIds } = paymentAccountListState;
15
15
  const externalAccountsSelectorView = (0, paymentAccountListSelector_1.getAllPaymentAccounts)(paymentAccountState, paymentAccountListState);
@@ -6,8 +6,7 @@ import { resendOtpVendorView, sendOtpVendorViewFailure, sendOtpVendorViewSuccess
6
6
  import { resendOnboardingOfficerOtp, sendOnboardingOfficerOtpFailure, sendOnboardingOfficerOtpSuccess } from '../onboardingView/customerView/onboardingCustomerViewReducer';
7
7
  import { resendOtpMyProfile, sendOtpMyProfileFailure, sendOtpMyProfileSuccess } from '../settingsView/settingsViewReducer';
8
8
  import { resendOtpCardUserOnboarding, sendOtpCardUserOnboardingFailure, sendOtpCardUserOnboardingSuccess } from '../spendManagement/chargeCards/cardUserOnboarding/cardUserOnboardingReducer';
9
- import { resendOtpCardHolder, sendOtpCardHolderFailure, sendOtpCardHolderSuccess } from '../spendManagement/chargeCards/chargeCardDetail/chargeCardDetailReducer';
10
9
  import { resendOtpSpendManagementSetUp, sendOtpFailureSpendManagementSetUp, sendOtpSuccessSpendManagementSetUp } from '../spendManagement/commonSetup/setupViewReducer';
11
10
  import { resendOtp, sendOtpFailure, sendOtpSuccess } from './twoFactorAuthenticationReducer';
12
- export type ActionType = ReturnType<typeof resendOtp> | ReturnType<typeof sendOtpSuccess> | ReturnType<typeof sendOtpFailure> | ReturnType<typeof resendOtpSpendManagementSetUp> | ReturnType<typeof sendOtpSuccessSpendManagementSetUp> | ReturnType<typeof sendOtpFailureSpendManagementSetUp> | ReturnType<typeof resendOtpVendorView> | ReturnType<typeof sendOtpVendorViewSuccess> | ReturnType<typeof sendOtpVendorViewFailure> | ReturnType<typeof resendOnboardingOfficerOtp> | ReturnType<typeof sendOnboardingOfficerOtpSuccess> | ReturnType<typeof sendOnboardingOfficerOtpFailure> | ReturnType<typeof resendOtpCardUserOnboarding> | ReturnType<typeof sendOtpCardUserOnboardingSuccess> | ReturnType<typeof sendOtpCardUserOnboardingFailure> | ReturnType<typeof resendOtpMyProfile> | ReturnType<typeof resendOtpCardHolder> | ReturnType<typeof sendOtpCardHolderSuccess> | ReturnType<typeof sendOtpCardHolderFailure> | ReturnType<typeof sendOtpMyProfileFailure> | ReturnType<typeof sendOtpMyProfileSuccess>;
13
- export declare const resendOtpEpic: (actions$: ActionsObservable<ActionType>, _state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
11
+ export type ActionType = ReturnType<typeof resendOtp> | ReturnType<typeof sendOtpSuccess> | ReturnType<typeof sendOtpFailure> | ReturnType<typeof resendOtpSpendManagementSetUp> | ReturnType<typeof sendOtpSuccessSpendManagementSetUp> | ReturnType<typeof sendOtpFailureSpendManagementSetUp> | ReturnType<typeof resendOtpVendorView> | ReturnType<typeof sendOtpVendorViewSuccess> | ReturnType<typeof sendOtpVendorViewFailure> | ReturnType<typeof resendOnboardingOfficerOtp> | ReturnType<typeof sendOnboardingOfficerOtpSuccess> | ReturnType<typeof sendOnboardingOfficerOtpFailure> | ReturnType<typeof resendOtpCardUserOnboarding> | ReturnType<typeof sendOtpCardUserOnboardingSuccess> | ReturnType<typeof sendOtpCardUserOnboardingFailure> | ReturnType<typeof resendOtpMyProfile> | ReturnType<typeof sendOtpMyProfileFailure> | ReturnType<typeof sendOtpMyProfileSuccess>;
12
+ export declare const resendOtpEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;