@zeniai/client-epic-state 4.19.68 → 4.19.69-betaJK11

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.

Potentially problematic release.


This version of @zeniai/client-epic-state might be problematic. Click here for more details.

Files changed (134) hide show
  1. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  2. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  3. package/lib/entity/account/accountState.d.ts +1 -1
  4. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  5. package/lib/entity/aiCfo/aiCfoPayload.d.ts +1 -0
  6. package/lib/entity/aiCfo/aiCfoReducer.js +5 -1
  7. package/lib/entity/aiCfo/aiCfoState.d.ts +1 -0
  8. package/lib/entity/class/classReducer.d.ts +4 -4
  9. package/lib/entity/class/classState.d.ts +1 -1
  10. package/lib/entity/company/companyPayload.d.ts +12 -0
  11. package/lib/entity/company/companyPayload.js +20 -0
  12. package/lib/entity/company/companyStateTypes.d.ts +12 -0
  13. package/lib/entity/forecast/forecastState.d.ts +1 -1
  14. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  15. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  16. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  17. package/lib/entity/transaction/payloadTypes/transactionPayload.js +1 -0
  18. package/lib/entity/transaction/stateTypes/transaction.d.ts +1 -0
  19. package/lib/entity/transactionActivityLog/transactionActivityLogPayload.d.ts +36 -0
  20. package/lib/entity/transactionActivityLog/transactionActivityLogPayload.js +56 -0
  21. package/lib/entity/transactionActivityLog/transactionActivityLogReducer.d.ts +6 -0
  22. package/lib/entity/transactionActivityLog/transactionActivityLogReducer.js +27 -0
  23. package/lib/entity/transactionActivityLog/transactionActivityLogSelector.d.ts +4 -0
  24. package/lib/entity/transactionActivityLog/transactionActivityLogSelector.js +17 -0
  25. package/lib/entity/transactionActivityLog/transactionActivityLogState.d.ts +40 -0
  26. package/lib/entity/transactionActivityLog/transactionActivityLogState.js +20 -0
  27. package/lib/epic.d.ts +2 -1
  28. package/lib/epic.js +2 -1
  29. package/lib/esm/commonStateTypes/viewAndReport/viewAndReport.js +1 -0
  30. package/lib/esm/entity/aiCfo/aiCfoReducer.js +5 -1
  31. package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionPayload.js +2 -2
  32. package/lib/esm/entity/company/companyPayload.js +20 -0
  33. package/lib/esm/entity/transaction/payloadTypes/transactionPayload.js +1 -0
  34. package/lib/esm/entity/transactionActivityLog/transactionActivityLogPayload.js +50 -0
  35. package/lib/esm/entity/transactionActivityLog/transactionActivityLogReducer.js +23 -0
  36. package/lib/esm/entity/transactionActivityLog/transactionActivityLogSelector.js +10 -0
  37. package/lib/esm/entity/transactionActivityLog/transactionActivityLogState.js +16 -0
  38. package/lib/esm/epic.js +2 -1
  39. package/lib/esm/index.js +9 -5
  40. package/lib/esm/reducer.js +6 -0
  41. package/lib/esm/view/companyView/epic/companyPassport/updateCompanyDetailsEpic.js +3 -0
  42. package/lib/esm/view/companyView/types/companyPassport/companyPassportLocalData.js +12 -0
  43. package/lib/esm/view/companyView/types/companyPassportViewPayload.js +55 -12
  44. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -3
  45. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  46. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +22 -4
  47. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +13 -4
  48. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +4 -2
  49. package/lib/esm/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +3 -1
  50. package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryDownloadSelector.js +2 -2
  51. package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistorySelector.js +2 -2
  52. package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailSelector.js +4 -1
  53. package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/fetchChargeCardRepaymentDetailEpic.js +2 -1
  54. package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/initiateChargeCardRepaymentEpic.js +1 -1
  55. package/lib/esm/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +66 -1
  56. package/lib/esm/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +15 -2
  57. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +14 -1
  58. package/lib/esm/view/spendManagement/commonSetup/setupViewState.js +2 -2
  59. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +3 -1
  60. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +11 -3
  61. package/lib/esm/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +4 -2
  62. package/lib/esm/view/transactionActivityLogView/fetchTransactionActivityLogEpic.js +43 -0
  63. package/lib/esm/view/transactionActivityLogView/transactionActivityLogViewPayload.js +1 -0
  64. package/lib/esm/view/transactionActivityLogView/transactionActivityLogViewReducer.js +47 -0
  65. package/lib/esm/view/transactionActivityLogView/transactionActivityLogViewSelector.js +34 -0
  66. package/lib/esm/view/transactionActivityLogView/transactionActivityLogViewState.js +1 -0
  67. package/lib/index.d.ts +10 -6
  68. package/lib/index.js +42 -36
  69. package/lib/reducer.d.ts +6 -0
  70. package/lib/reducer.js +6 -0
  71. package/lib/view/auditReportView/auditReportViewState.d.ts +1 -1
  72. package/lib/view/billPayCard/billPayCardSelector.d.ts +1 -1
  73. package/lib/view/cardBalance/cardBalanceSelector.d.ts +1 -1
  74. package/lib/view/cashBalance/cashBalanceSelector.d.ts +1 -1
  75. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +1 -1
  76. package/lib/view/cashPosition/cashPositionSelector.d.ts +1 -1
  77. package/lib/view/companyView/epic/companyPassport/updateCompanyDetailsEpic.js +3 -0
  78. package/lib/view/companyView/types/companyPassport/companyDetailsLocalData.d.ts +12 -0
  79. package/lib/view/companyView/types/companyPassport/companyPassportLocalData.js +12 -0
  80. package/lib/view/companyView/types/companyPassportViewPayload.d.ts +1 -1
  81. package/lib/view/companyView/types/companyPassportViewPayload.js +55 -12
  82. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  83. package/lib/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -3
  84. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  85. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  86. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +2 -2
  87. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +1 -0
  88. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +22 -3
  89. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +1 -1
  90. package/lib/view/reportsResync/reportsResyncReducer.d.ts +2 -2
  91. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.d.ts +3 -1
  92. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewReducer.js +13 -4
  93. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelector.js +4 -2
  94. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewSelectorTypes.d.ts +3 -1
  95. package/lib/view/spendManagement/billPay/billPaySetupApproverView/billPaySetupApproverViewState.d.ts +2 -0
  96. package/lib/view/spendManagement/billPay/billPaySetupApproverView/epic/saveBillPaySetupApproverViewUpdatesEpic.js +3 -1
  97. package/lib/view/spendManagement/billPay/billPaySetupApproverView/types/commonPayload.d.ts +2 -0
  98. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardList.d.ts +1 -1
  99. package/lib/view/spendManagement/chargeCards/chargeCardList/chargeCardListPayload.d.ts +1 -1
  100. package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryDownloadSelector.js +2 -2
  101. package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistorySelector.js +2 -2
  102. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailSelector.js +4 -1
  103. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/fetchChargeCardRepaymentDetailEpic.js +2 -1
  104. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/initiateChargeCardRepaymentEpic.d.ts +1 -1
  105. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/initiateChargeCardRepaymentEpic.js +1 -1
  106. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +66 -1
  107. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +15 -2
  108. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +4 -4
  109. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +13 -0
  110. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +14 -1
  111. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +14 -1
  112. package/lib/view/spendManagement/commonSetup/setupViewState.js +1 -1
  113. package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +13 -0
  114. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +10 -10
  115. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/epic/saveRemiSetupApproverViewUpdatesEpic.js +3 -1
  116. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.d.ts +3 -1
  117. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewReducer.js +11 -3
  118. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelector.js +4 -2
  119. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewSelectorTypes.d.ts +3 -1
  120. package/lib/view/spendManagement/reimbursement/remiSetupApproverView/remiSetupApproverViewState.d.ts +2 -0
  121. package/lib/view/tasksCard/tasksCardSelector.d.ts +1 -1
  122. package/lib/view/topEx/topExSelector.d.ts +1 -1
  123. package/lib/view/transactionActivityLogView/fetchTransactionActivityLogEpic.d.ts +9 -0
  124. package/lib/view/transactionActivityLogView/fetchTransactionActivityLogEpic.js +47 -0
  125. package/lib/view/transactionActivityLogView/transactionActivityLogViewPayload.d.ts +8 -0
  126. package/lib/view/transactionActivityLogView/transactionActivityLogViewPayload.js +2 -0
  127. package/lib/view/transactionActivityLogView/transactionActivityLogViewReducer.d.ts +17 -0
  128. package/lib/view/transactionActivityLogView/transactionActivityLogViewReducer.js +51 -0
  129. package/lib/view/transactionActivityLogView/transactionActivityLogViewSelector.d.ts +8 -0
  130. package/lib/view/transactionActivityLogView/transactionActivityLogViewSelector.js +37 -0
  131. package/lib/view/transactionActivityLogView/transactionActivityLogViewState.d.ts +5 -0
  132. package/lib/view/transactionActivityLogView/transactionActivityLogViewState.js +2 -0
  133. package/package.json +1 -1
  134. package/lib/tsconfig.typecheck.tsbuildinfo +0 -1
@@ -33,7 +33,7 @@ export interface CreditAccountPayload {
33
33
  update_time: string;
34
34
  cashback_amount?: number | null;
35
35
  }
36
- export type ChargeCardPaymentMethod = "ACH" | "Book Transfer";
36
+ export type ChargeCardPaymentMethod = 'ACH' | 'Book Transfer';
37
37
  export interface CreditAccountRepaymentPayload {
38
38
  credit_account_id: string;
39
39
  currency_code: string;
@@ -5,8 +5,8 @@ const chargeCardRepaymentSelector_1 = require("../../../../entity/chargeCardRepa
5
5
  const userSelector_1 = require("../../../../entity/user/userSelector");
6
6
  const chargeCardPaymentHistoryHelpers_1 = require("./chargeCardPaymentHistoryHelpers");
7
7
  const getChargeCardPaymentHistoryDownloadReport = (state) => {
8
- const { chargeCardPaymentHistoryState, chargeCardRepaymentState, userState, } = state;
9
- const { filters, repaymentHistoryIds, searchText, uiState, fetchState, error, } = chargeCardPaymentHistoryState;
8
+ const { chargeCardPaymentHistoryState, chargeCardRepaymentState, userState } = state;
9
+ const { filters, repaymentHistoryIds, searchText, uiState, fetchState, error } = chargeCardPaymentHistoryState;
10
10
  const repaymentHistory = (0, chargeCardRepaymentSelector_1.getChargeCardRepaymentByIds)(chargeCardRepaymentState, repaymentHistoryIds);
11
11
  const repaymentHistoryUserIds = Array.from(new Set(repaymentHistory.map((r) => r.paidById)));
12
12
  const repaymentHistoryUsers = (0, userSelector_1.getUsersByUserIds)(userState, repaymentHistoryUserIds);
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getChargeCardPaymentHistoryView = void 0;
4
4
  const reduceFetchState_1 = require("../../../../commonStateTypes/reduceFetchState");
5
5
  const chargeCardRepaymentSelector_1 = require("../../../../entity/chargeCardRepayment/chargeCardRepaymentSelector");
6
- const userSelector_1 = require("../../../../entity/user/userSelector");
7
- const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
8
6
  const depositAccountSelector_1 = require("../../../../entity/depositAccount/depositAccountSelector");
9
7
  const paymentAccountSelector_1 = require("../../../../entity/paymentAccount/paymentAccountSelector");
8
+ const userSelector_1 = require("../../../../entity/user/userSelector");
9
+ const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
10
10
  const depositAccountListSelector_1 = require("../../zeniAccounts/depositAccountList/depositAccountListSelector");
11
11
  const paymentAccountListSelector_1 = require("../../zeniAccounts/paymentAccountList/paymentAccountListSelector");
12
12
  const chargeCardPaymentHistoryHelpers_1 = require("./chargeCardPaymentHistoryHelpers");
@@ -18,7 +18,10 @@ const getChargeCardRepaymentDetail = (state) => {
18
18
  else {
19
19
  const depositFundingFromLimit = Object.values(depositAccountState.depositAccountLimitForChargeCardByID ?? {}).map(setupViewSelector_1.mapDepositAccountWithLimitToFundingAccount);
20
20
  const paymentFundingAccounts = (0, setupViewSelector_1.getAllFundingAccounts)([], paymentAccountsView.paymentAccounts, paymentAccountListState.paymentAccountBalanceFetchStatus);
21
- transferFromAccounts = [...depositFundingFromLimit, ...paymentFundingAccounts];
21
+ transferFromAccounts = [
22
+ ...depositFundingFromLimit,
23
+ ...paymentFundingAccounts,
24
+ ];
22
25
  }
23
26
  }
24
27
  const reducedFetchState = (0, reduceFetchState_1.reduceAnyCompletedFetchState)([
@@ -10,7 +10,8 @@ const fetchChargeCardRepaymentDetailEpic = (actions$, state$) => actions$.pipe((
10
10
  const fetchChargeCardRepaymentDetailActions = [];
11
11
  const state = state$.value;
12
12
  const depositAccounts = state.depositAccountListState;
13
- const willFetchDeposit = depositAccounts.fetchState !== 'In-Progress' && depositAccounts.fetchState !== 'Completed';
13
+ const willFetchDeposit = depositAccounts.fetchState !== 'In-Progress' &&
14
+ depositAccounts.fetchState !== 'Completed';
14
15
  if (willFetchDeposit) {
15
16
  fetchChargeCardRepaymentDetailActions.push((0, depositAccountListReducer_1.fetchDepositAccountList)());
16
17
  }
@@ -4,8 +4,8 @@ import { updateChargeCardRepayment } from '../../../../entity/chargeCardRepaymen
4
4
  import { updateCompanyPrimaryAccount, updateEnableAutoPayForChargeCard } from '../../../../entity/company/companyReducer';
5
5
  import { RootState } from '../../../../reducer';
6
6
  import { ZeniAPI } from '../../../../zeniAPI';
7
- import { addRepaymentToChargeCardPaymentHistory } from '../chargeCardPaymentHistory/chargeCardPaymentHistoryReducer';
8
7
  import { updateCreditAccountRepaymentAmountAndDate } from '../chargeCardList/chargeCardListReducer';
8
+ import { addRepaymentToChargeCardPaymentHistory } from '../chargeCardPaymentHistory/chargeCardPaymentHistoryReducer';
9
9
  import { initiateChargeCardRepayment, updateChargeCardRepaymentStatus } from './chargeCardRepaymentDetailReducer';
10
10
  export type ActionType = ReturnType<typeof addRepaymentToChargeCardPaymentHistory> | ReturnType<typeof initiateChargeCardRepayment> | ReturnType<typeof updateChargeCardRepayment> | ReturnType<typeof updateCreditAccountRepaymentAmountAndDate> | ReturnType<typeof updateChargeCardRepaymentStatus> | ReturnType<typeof updateCompanyPrimaryAccount> | ReturnType<typeof updateEnableAutoPayForChargeCard>;
11
11
  export declare const initiateChargeCardRepaymentEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
@@ -12,8 +12,8 @@ const setupViewSelector_1 = require("../../commonSetup/setupViewSelector");
12
12
  const helpers_1 = require("../../helpers");
13
13
  const depositAccountListSelector_1 = require("../../zeniAccounts/depositAccountList/depositAccountListSelector");
14
14
  const paymentAccountListSelector_1 = require("../../zeniAccounts/paymentAccountList/paymentAccountListSelector");
15
- const chargeCardPaymentHistoryReducer_1 = require("../chargeCardPaymentHistory/chargeCardPaymentHistoryReducer");
16
15
  const chargeCardListReducer_1 = require("../chargeCardList/chargeCardListReducer");
16
+ const chargeCardPaymentHistoryReducer_1 = require("../chargeCardPaymentHistory/chargeCardPaymentHistoryReducer");
17
17
  const chargeCardRepaymentDetailReducer_1 = require("./chargeCardRepaymentDetailReducer");
18
18
  const initiateChargeCardRepaymentEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(chargeCardRepaymentDetailReducer_1.initiateChargeCardRepayment.match), (0, operators_1.switchMap)((action) => {
19
19
  const state = state$.value;
@@ -122,8 +122,28 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
122
122
  }
123
123
  }));
124
124
  exports.updateBusinessVerificationDetailsEpic = updateBusinessVerificationDetailsEpic;
125
+ /** US Nexus API keys. Form may submit these or display labels; we send keys to API. */
126
+ const US_NEXUS_KEYS = new Set([
127
+ 'employees',
128
+ 'customers',
129
+ 'physical_office',
130
+ 'banking_relationships',
131
+ ]);
132
+ /** Maps display label → API key for US nexus types (English labels from strings). */
133
+ const US_NEXUS_LABEL_TO_KEY = {
134
+ Employees: 'employees',
135
+ Customers: 'customers',
136
+ 'Physical office or facility': 'physical_office',
137
+ 'Banking relationships': 'banking_relationships',
138
+ };
139
+ function toUsNexusTypeKey(value) {
140
+ if (US_NEXUS_KEYS.has(value)) {
141
+ return value;
142
+ }
143
+ return US_NEXUS_LABEL_TO_KEY[value] ?? value;
144
+ }
125
145
  const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerification, companyAddressData, registeredAddressData, setupViewType) => {
126
- const { companyDescription, companyLegalName, companyIndustry, website, incDate, taxIdOrEIN, phone, syncToken, fileIds, typeOfIncorporation, sourceOfFunds, } = companyLocalData;
146
+ const { companyDescription, companyLegalName, companyIndustry, companySubIndustry, countriesOfOperations, companySourceOfFunds, companySourceOfFundsDescription, transactionVolume, transactionVolumeDescription, purposeOfAccount, purposeOfAccountDescription, regulatedStatus, regulatedStatusDescription, usNexus, usNexusTypes, website, incDate, taxIdOrEIN, phone, syncToken, fileIds, typeOfIncorporation, stateOfIncorporation, sourceOfFunds, } = companyLocalData;
127
147
  const company = {
128
148
  is_ready_for_verification: sendForVerification,
129
149
  file_ids: fileIds,
@@ -174,9 +194,52 @@ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerif
174
194
  if (typeOfIncorporation != null) {
175
195
  company['company_inc_type'] = typeOfIncorporation;
176
196
  }
197
+ if (stateOfIncorporation != null) {
198
+ company['company_inc_state'] = stateOfIncorporation;
199
+ }
177
200
  if (companyIndustry != null) {
178
201
  company['company_industry'] = companyIndustry;
179
202
  }
203
+ Object.assign(company, {
204
+ ...(companySubIndustry != null && {
205
+ company_industry_sub_type: companySubIndustry,
206
+ }),
207
+ ...(countriesOfOperations != null &&
208
+ countriesOfOperations.length > 0 && {
209
+ company_countries_of_operations: countriesOfOperations,
210
+ }),
211
+ ...(companySourceOfFunds != null && {
212
+ company_source_of_funds: companySourceOfFunds,
213
+ }),
214
+ ...(companySourceOfFundsDescription != null && {
215
+ company_source_of_funds_desc: companySourceOfFundsDescription,
216
+ }),
217
+ ...(transactionVolume != null && {
218
+ company_transaction_vol_expectations: transactionVolume,
219
+ }),
220
+ ...(transactionVolumeDescription != null && {
221
+ company_transaction_vol_expectations_desc: transactionVolumeDescription,
222
+ }),
223
+ ...(purposeOfAccount != null && {
224
+ company_purpose_of_account: purposeOfAccount,
225
+ }),
226
+ ...(purposeOfAccountDescription != null && {
227
+ company_purpose_of_account_desc: purposeOfAccountDescription,
228
+ }),
229
+ ...(regulatedStatus != null && {
230
+ company_regulated_states: regulatedStatus === 'yes',
231
+ }),
232
+ ...(regulatedStatusDescription != null && {
233
+ company_regulated_states_desc: regulatedStatusDescription,
234
+ }),
235
+ ...(usNexus != null && {
236
+ company_us_nexus: usNexus === 'yes',
237
+ }),
238
+ ...(usNexusTypes != null &&
239
+ usNexusTypes.length > 0 && {
240
+ company_us_nexus_desc: usNexusTypes.map(toUsNexusTypeKey),
241
+ }),
242
+ });
180
243
  if (setupViewType === 'zeni_treasury' && sourceOfFunds != null) {
181
244
  company['source_of_funds'] = sourceOfFunds;
182
245
  }
@@ -268,6 +331,8 @@ const getBusinessVerificationForFeature = (setupViewType) => {
268
331
  return 'bill_pay';
269
332
  case 'zeni_treasury':
270
333
  return 'treasury_accounts';
334
+ case 'other_connection':
335
+ return 'other_connection';
271
336
  //whenever a new setup view type is added, add the corresponding feature here
272
337
  case 'billing':
273
338
  console.warn(`Invalid type for setup view`);
@@ -51,9 +51,9 @@ exports.updateSetupViewLocalStoreDataEpic = updateSetupViewLocalStoreDataEpic;
51
51
  */
52
52
  function toSetupViewLocalData(company, users, userRoles, primaryContact) {
53
53
  const { companyInfo, incInfo, taxInfo, questionaire, companyBillPayInfo } = company;
54
- const { companyId, companyDescription, companyLegalName, companyUrl, phone, syncToken, sourceOfFunds, } = companyInfo;
54
+ const { companyId, companyDescription, companyLegalName, companyUrl, phone, syncToken, sourceOfFunds, companySourceOfFunds: incCompanySourceOfFunds, companySourceOfFundsDescription, countriesOfOperations, transactionVolume, transactionVolumeDescription, purposeOfAccount, purposeOfAccountDescription, regulatedStatus, regulatedStatusDescription, usNexus, usNexusTypes, } = companyInfo;
55
55
  const { usersSelectedForVerification: usersSelected } = companyBillPayInfo;
56
- const { fileIds, companyIncDate: incDate, companyIncType } = incInfo;
56
+ const { fileIds, companyIncDate: incDate, companyIncType, companyIncState, companySubIndustry, } = incInfo;
57
57
  const { companyIndustry } = questionaire;
58
58
  const { taxId } = taxInfo;
59
59
  const companyDetails = {
@@ -61,6 +61,10 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
61
61
  companyDescription,
62
62
  companyIndustry,
63
63
  companyLegalName,
64
+ companySubIndustry,
65
+ companySourceOfFunds: incCompanySourceOfFunds,
66
+ companySourceOfFundsDescription,
67
+ countriesOfOperations,
64
68
  taxIdOrEIN: taxId,
65
69
  incDate,
66
70
  phone,
@@ -69,6 +73,15 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
69
73
  syncToken,
70
74
  typeOfIncorporation: companyIncType,
71
75
  sourceOfFunds,
76
+ stateOfIncorporation: companyIncState,
77
+ transactionVolume,
78
+ transactionVolumeDescription,
79
+ purposeOfAccount,
80
+ purposeOfAccountDescription,
81
+ regulatedStatus,
82
+ regulatedStatusDescription,
83
+ usNexus,
84
+ usNexusTypes,
72
85
  };
73
86
  let primaryContactDetails = undefined;
74
87
  if (primaryContact != null) {
@@ -4,13 +4,13 @@ import { ZeniDate } from '../../../zeniDayJS';
4
4
  import { CompanyOfficerType } from '../../companyView/types/companyPassport/companyUsersLocalData';
5
5
  import { CompanyDetailsLocalData, 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" | "zeni_treasury" | "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" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards"], {
8
8
  companyId: string;
9
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "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" | "zeni_treasury" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards", sendForVerification?: any, fromBillListScreen?: any, isSubmittingAdditionalDocuments?: any], {
9
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection" | "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" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards", 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" | "zeni_treasury" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
13
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards";
14
14
  sendForVerification: any;
15
15
  fromBillListScreen: any;
16
16
  isSubmittingAdditionalDocuments: any;
@@ -70,14 +70,27 @@ export interface CompanyDetails {
70
70
  companyDescription?: string;
71
71
  companyIndustry?: string;
72
72
  companyLegalName?: string;
73
+ companySourceOfFunds?: string;
74
+ companySourceOfFundsDescription?: string;
75
+ companySubIndustry?: string;
76
+ countriesOfOperations?: string[];
73
77
  incDate?: ZeniDate;
74
78
  phone?: string;
75
79
  primaryContactLocalData?: PrimaryContactLocalData;
80
+ purposeOfAccount?: string;
81
+ purposeOfAccountDescription?: string;
76
82
  registeredAddressStatus?: NewAddressData;
83
+ regulatedStatus?: string;
84
+ regulatedStatusDescription?: string;
77
85
  sourceOfFunds?: string;
86
+ stateOfIncorporation?: string;
78
87
  syncToken?: string;
79
88
  taxIdOrEIN?: string;
89
+ transactionVolume?: string;
90
+ transactionVolumeDescription?: string;
80
91
  typeOfIncorporation?: string;
92
+ usNexus?: string;
93
+ usNexusTypes?: string[];
81
94
  website?: ZeniUrl;
82
95
  }
83
96
  interface CompanyAndOfficerLocalData {
@@ -114,7 +114,7 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
114
114
  if (companyDetails.localData != null) {
115
115
  const deleteFileStatusById = {};
116
116
  const updateFileStatusById = {};
117
- const { syncToken, companyDescription, companyLegalName, website, companyIndustry, phone, taxIdOrEIN, incDate, fileIds, typeOfIncorporation, sourceOfFunds, } = companyDetails.localData;
117
+ const { syncToken, companyDescription, companyLegalName, website, companyIndustry, companySubIndustry, companySourceOfFunds, companySourceOfFundsDescription, countriesOfOperations, phone, taxIdOrEIN, incDate, fileIds, typeOfIncorporation, sourceOfFunds, transactionVolume, transactionVolumeDescription, purposeOfAccount, purposeOfAccountDescription, regulatedStatus, regulatedStatusDescription, stateOfIncorporation, usNexus, usNexusTypes, } = companyDetails.localData;
118
118
  fileIds.forEach((fileId) => {
119
119
  deleteFileStatusById[fileId] = (0, fileViewSelector_1.getFileDeleteStatusById)(state, fileId);
120
120
  });
@@ -128,6 +128,10 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
128
128
  companyDescription,
129
129
  companyLegalName,
130
130
  companyIndustry,
131
+ companySubIndustry,
132
+ companySourceOfFunds,
133
+ companySourceOfFundsDescription,
134
+ countriesOfOperations,
131
135
  website,
132
136
  phone,
133
137
  taxIdOrEIN,
@@ -141,6 +145,15 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
141
145
  primaryContactLocalData,
142
146
  typeOfIncorporation,
143
147
  sourceOfFunds,
148
+ transactionVolume,
149
+ transactionVolumeDescription,
150
+ purposeOfAccount,
151
+ purposeOfAccountDescription,
152
+ regulatedStatus,
153
+ regulatedStatusDescription,
154
+ stateOfIncorporation,
155
+ usNexus,
156
+ usNexusTypes,
144
157
  };
145
158
  }
146
159
  const companyOfficerLocalData = {
@@ -4,7 +4,7 @@ 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" | "zeni_treasury" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
7
+ declare const toSetupViewType: (v: string) => "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards";
8
8
  export type SetupViewType = ReturnType<typeof toSetupViewType>;
9
9
  export declare const toChargeCardSetupViewType: (v: string) => "charge_cards" | "debit_cards" | "charge_cards__debit_cards";
10
10
  export type ChargeCardSetupViewType = ReturnType<typeof toChargeCardSetupViewType>;
@@ -17,12 +17,25 @@ export interface CompanyDetailsLocalData {
17
17
  companyDescription?: string;
18
18
  companyIndustry?: string;
19
19
  companyLegalName?: string;
20
+ companySourceOfFunds?: string;
21
+ companySourceOfFundsDescription?: string;
22
+ companySubIndustry?: string;
23
+ countriesOfOperations?: string[];
20
24
  incDate?: ZeniDate;
21
25
  phone?: string;
26
+ purposeOfAccount?: string;
27
+ purposeOfAccountDescription?: string;
28
+ regulatedStatus?: string;
29
+ regulatedStatusDescription?: string;
22
30
  sourceOfFunds?: string;
31
+ stateOfIncorporation?: string;
23
32
  syncToken?: string;
24
33
  taxIdOrEIN?: string;
34
+ transactionVolume?: string;
35
+ transactionVolumeDescription?: string;
25
36
  typeOfIncorporation?: string;
37
+ usNexus?: string;
38
+ usNexusTypes?: string[];
26
39
  website?: ZeniUrl;
27
40
  }
28
41
  export interface PrimaryContactLocalData {
@@ -6,7 +6,7 @@ const entityApprovalStatusState_1 = require("../../../entity/entityApprovalStatu
6
6
  const SETUP_VIEW_TYPES = ['billing'];
7
7
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
8
8
  const toSetupViewType = (v) => (0, stringToUnion_1.stringToUnion)(v, [
9
- ...entityApprovalStatusState_1.ALL_ENTITY_TYPES,
9
+ ...entityApprovalStatusState_1.ALL_ENTITY_TYPES_WITH_OTHER_CONNECTION,
10
10
  ...SETUP_VIEW_TYPES,
11
11
  ...CHARGE_CARD_SETUP_VIEW_TYPES,
12
12
  ]);
@@ -63,6 +63,19 @@ export interface CompanyDetailsVerificationPayload {
63
63
  source_of_funds: string;
64
64
  sync_token: string;
65
65
  tax_id: string;
66
+ company_countries_of_operations?: string[];
67
+ company_inc_state?: string | null;
68
+ company_industry_sub_type?: string;
69
+ company_purpose_of_account?: string;
70
+ company_purpose_of_account_desc?: string;
71
+ company_regulated_states?: boolean;
72
+ company_regulated_states_desc?: string;
73
+ company_source_of_funds?: string;
74
+ company_source_of_funds_desc?: string;
75
+ company_transaction_vol_expectations?: string;
76
+ company_transaction_vol_expectations_desc?: string;
77
+ company_us_nexus?: boolean;
78
+ company_us_nexus_desc?: string[];
66
79
  subscription_billing_address?: AddressUpdatableInfoPayload;
67
80
  }
68
81
  export interface BusinessVerificationDataPayload {
@@ -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" | "zeni_treasury" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType, includeBalances?: boolean | undefined], {
5
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
4
+ export declare const getPaymentAccounts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType, includeBalances?: boolean | undefined], {
5
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards";
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" | "zeni_treasury" | "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" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType], {
15
15
  accountId: string;
16
16
  paymentAccountId: string;
17
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
17
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards";
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" | "zeni_treasury" | "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" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType, linkTokenType?: PlaidLinkTokenType | undefined], {
25
25
  verificationStatusCode: string;
26
26
  paymentAccountId: string;
27
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
27
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards";
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" | "zeni_treasury" | "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" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards", plaidAccountKeyType: PlaidAccountKeyType, linkTokenType?: PlaidLinkTokenType | undefined], {
38
38
  isLoginRequired: boolean;
39
39
  paymentAccountId: string;
40
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards";
40
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards";
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" | "zeni_treasury" | "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" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards" | undefined, linkTokenType?: PlaidLinkTokenType | undefined, zeniMappedAccountId?: string | undefined], {
65
65
  publicToken: string;
66
66
  companyId: string;
67
- setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "billing" | "debit_cards" | "charge_cards__debit_cards" | undefined;
67
+ setupViewType: "bill_pay" | "reimbursement" | "zeni_accounts" | "zeni_treasury" | "charge_cards" | "other_connection" | "billing" | "debit_cards" | "charge_cards__debit_cards" | undefined;
68
68
  linkTokenType: PlaidLinkTokenType;
69
69
  plaidAccountKeyType: PlaidAccountKeyType;
70
70
  zeniMappedAccountId: string | undefined;
@@ -20,6 +20,8 @@ const saveRemiSetupApproverViewUpdatesEpic = (actions$, state$, zeniAPI) => acti
20
20
  .pipe((0, operators_1.mergeMap)((response) => {
21
21
  if ((0, responsePayload_1.isSuccessResponse)(response) && response.data != null) {
22
22
  const approvalRuleIds = response.data.approval_rules.map((approvalRule) => approvalRule.approval_rule_id);
23
+ const affectedEntityIds = response.data.affected_entity_ids ?? [];
24
+ const newApprovalRuleId = response.data.new_approval_rule?.approval_rule_id;
23
25
  const actions = [
24
26
  (0, userReducer_1.updateAllUsers)({ users: response.data.users }),
25
27
  (0, approvalRuleReducer_1.updateApprovalRules)(response.data.approval_rules),
@@ -28,7 +30,7 @@ const saveRemiSetupApproverViewUpdatesEpic = (actions$, state$, zeniAPI) => acti
28
30
  messageText: 'success',
29
31
  type: 'success',
30
32
  }),
31
- (0, remiSetupApproverViewReducer_1.saveRemiSetupApproverViewUpdatesSuccess)(approvalRuleIds),
33
+ (0, remiSetupApproverViewReducer_1.saveRemiSetupApproverViewUpdatesSuccess)(approvalRuleIds, affectedEntityIds, newApprovalRuleId),
32
34
  ];
33
35
  return (0, rxjs_1.from)(actions);
34
36
  }
@@ -32,8 +32,10 @@ export declare const fetchRemiSetupApproverView: import("@reduxjs/toolkit").Acti
32
32
  }, "remiSetupApproverView/deleteRemiApprovalRuleSuccess", never, never>, deleteRemiApprovalRuleFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[approvalRuleId: string, status: ZeniAPIStatus<Record<string, unknown>>], {
33
33
  approvalRuleId: string;
34
34
  status: ZeniAPIStatus<Record<string, unknown>>;
35
- }, "remiSetupApproverView/deleteRemiApprovalRuleFailure", never, never>, saveRemiSetupApproverViewUpdates: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"remiSetupApproverView/saveRemiSetupApproverViewUpdates">, saveRemiSetupApproverViewUpdatesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[approvalRuleIds: string[]], {
35
+ }, "remiSetupApproverView/deleteRemiApprovalRuleFailure", never, never>, saveRemiSetupApproverViewUpdates: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"remiSetupApproverView/saveRemiSetupApproverViewUpdates">, saveRemiSetupApproverViewUpdatesSuccess: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[approvalRuleIds: string[], affectedEntityIds?: string[] | undefined, newApprovalRuleId?: string | undefined], {
36
36
  approvalRuleIds: string[];
37
+ affectedEntityIds: string[] | undefined;
38
+ newApprovalRuleId: string | undefined;
37
39
  }, "remiSetupApproverView/saveRemiSetupApproverViewUpdatesSuccess", never, never>, saveRemiSetupApproverViewUpdatesFailure: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[status: ZeniAPIStatus<Record<string, unknown>>], {
38
40
  status: ZeniAPIStatus<Record<string, unknown>>;
39
41
  }, "remiSetupApproverView/saveRemiSetupApproverViewUpdatesFailure", never, never>, initializeRemiSetupApproverViewUpdateData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[approvalRuleId?: string | undefined], {
@@ -12,7 +12,9 @@ exports.initialState = {
12
12
  attributes: [],
13
13
  fetchStatus: { fetchState: 'Not-Started', error: undefined },
14
14
  },
15
+ affectedEntityIds: undefined,
15
16
  approvalRuleIds: [],
17
+ newApprovalRuleId: undefined,
16
18
  approvalRulesDeleteStatusById: {},
17
19
  remiSetupApproverViewUpdateData: undefined,
18
20
  hasValidState() {
@@ -179,7 +181,7 @@ const remiSetupApproverView = (0, toolkit_1.createSlice)({
179
181
  },
180
182
  saveRemiSetupApproverViewUpdatesSuccess: {
181
183
  reducer(draft, action) {
182
- const { approvalRuleIds } = action.payload;
184
+ const { approvalRuleIds, affectedEntityIds, newApprovalRuleId } = action.payload;
183
185
  if (draft.remiSetupApproverViewUpdateData != null) {
184
186
  if (draft.remiSetupApproverViewUpdateData.type === 'approval_update' &&
185
187
  draft.remiSetupApproverViewUpdateData.data
@@ -192,10 +194,12 @@ const remiSetupApproverView = (0, toolkit_1.createSlice)({
192
194
  };
193
195
  }
194
196
  draft.approvalRuleIds = approvalRuleIds;
197
+ draft.affectedEntityIds = affectedEntityIds;
198
+ draft.newApprovalRuleId = newApprovalRuleId;
195
199
  },
196
- prepare(approvalRuleIds) {
200
+ prepare(approvalRuleIds, affectedEntityIds, newApprovalRuleId) {
197
201
  return {
198
- payload: { approvalRuleIds },
202
+ payload: { approvalRuleIds, affectedEntityIds, newApprovalRuleId },
199
203
  };
200
204
  },
201
205
  },
@@ -248,6 +252,10 @@ const remiSetupApproverView = (0, toolkit_1.createSlice)({
248
252
  },
249
253
  setListeningToPusherEvent(draft, action) {
250
254
  draft.listeningToPusherEvent = action.payload;
255
+ if (action.payload === false) {
256
+ draft.affectedEntityIds = undefined;
257
+ draft.newApprovalRuleId = undefined;
258
+ }
251
259
  },
252
260
  clearRemiSetupApproverViewUpdateData(draft) {
253
261
  if (draft.remiSetupApproverViewUpdateData != null) {
@@ -13,7 +13,7 @@ const userSelector_1 = require("../../../../entity/user/userSelector");
13
13
  const userRoleSelector_1 = require("../../../../entity/userRole/userRoleSelector");
14
14
  const getRemiSetupApproverView = (state, filterAdmins = true) => {
15
15
  const { remiSetupApproverViewState, approvalRuleState, userState } = state;
16
- const { approvalRulesDeleteStatusById, approvalRuleIds, fetchState, error, listeningToPusherEvent, } = remiSetupApproverViewState;
16
+ const { approvalRulesDeleteStatusById, approvalRuleIds, fetchState, error, listeningToPusherEvent, newApprovalRuleId, } = remiSetupApproverViewState;
17
17
  const deleteStateList = Object.values(approvalRulesDeleteStatusById);
18
18
  const approvalRules = (0, approvalRuleSelector_1.getApprovalRulesByIds)(approvalRuleState, approvalRuleIds);
19
19
  const allApprovalRules = approvalRules.map((approvalRule) => {
@@ -49,11 +49,12 @@ const getRemiSetupApproverView = (state, filterAdmins = true) => {
49
49
  fetchState,
50
50
  error,
51
51
  listeningToPusherEvent,
52
+ newApprovalRuleId,
52
53
  };
53
54
  };
54
55
  exports.getRemiSetupApproverView = getRemiSetupApproverView;
55
56
  exports.getRemiSetupApproverUpdateDataView = (0, toolkit_1.createSelector)((state) => state.remiSetupApproverViewState, (state) => state.approvalRuleState, (state) => state.classState, (state) => state.classListState, (state) => state.userState, (state) => state.userRoleState, (remiSetupApproverViewState, approvalRuleState, classState, classListState, userState, userRoleState) => {
56
- const { approvalRuleIds, approverListState, remiSetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = remiSetupApproverViewState;
57
+ const { affectedEntityIds, approvalRuleIds, approverListState, remiSetupApproverViewUpdateData, fetchState, error, listeningToPusherEvent, } = remiSetupApproverViewState;
57
58
  const { approverIds, attributes, fetchStatus } = approverListState;
58
59
  const { fetchState: classListFetchState, error: classListFetchStateError, classIds, } = classListState;
59
60
  const allApprovalRules = (0, approvalRuleSelector_1.getApprovalRulesByIds)(approvalRuleState, approvalRuleIds).map((approvalRule) => {
@@ -108,6 +109,7 @@ exports.getRemiSetupApproverUpdateDataView = (0, toolkit_1.createSelector)((stat
108
109
  reportId: 'class_list',
109
110
  });
110
111
  return {
112
+ affectedEntityIds,
111
113
  allApprovalRules,
112
114
  allApprovers,
113
115
  allAttributes,
@@ -1,5 +1,5 @@
1
1
  import { AllowedValueWithCode } from '../../../../commonStateTypes/allowedValue';
2
- import { FetchStateAndError } from '../../../../commonStateTypes/common';
2
+ import { FetchStateAndError, ID } from '../../../../commonStateTypes/common';
3
3
  import { SelectorView } from '../../../../commonStateTypes/viewAndReport/viewAndReport';
4
4
  import { Actor, ApprovalRule, AttributeType, Step } from '../../../../entity/approvalRule/approvalRuleState';
5
5
  import { Class } from '../../../../entity/class/classState';
@@ -18,6 +18,7 @@ export interface RemiSetupApproverView extends SelectorView {
18
18
  approvalRulesStatus: AllowedValueWithCode;
19
19
  deleteStatus: FetchStateAndError;
20
20
  listeningToPusherEvent?: boolean;
21
+ newApprovalRuleId?: ID;
21
22
  }
22
23
  export interface RemiSetupApproverUpdateDataView extends SelectorView {
23
24
  allAccountingClasses: Class[];
@@ -27,6 +28,7 @@ export interface RemiSetupApproverUpdateDataView extends SelectorView {
27
28
  approversDetailsFetchStatus: FetchStateAndError;
28
29
  filteredApprovers: UserAndRole[];
29
30
  filteredAttributes: AttributeType[];
31
+ affectedEntityIds?: ID[];
30
32
  listeningToPusherEvent?: boolean;
31
33
  remiSetupApproverViewUpdateData?: ApproverViewUpdateData;
32
34
  }
@@ -10,6 +10,8 @@ export interface RemiSetupApproverViewState extends FetchedState {
10
10
  fetchStatus: FetchStateAndError;
11
11
  attributeSubTypeToUserIdMapping?: Record<AttributeType, ID>;
12
12
  };
13
+ affectedEntityIds?: ID[];
13
14
  listeningToPusherEvent?: boolean;
15
+ newApprovalRuleId?: ID;
14
16
  remiSetupApproverViewUpdateData?: ApproverViewUpdateData;
15
17
  }
@@ -1,6 +1,6 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getTasksCardReport: (state: RootState) => {
3
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
3
+ reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "zeni_treasury" | "charge_cards" | "other_connection" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation" | "zeni_credit_promo_card" | "treasury_promo_card";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  status: import("../..").Status | undefined;