@zeniai/client-epic-state 4.19.83 → 4.19.84-betaVR10

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 (116) hide show
  1. package/lib/entity/account/accountPayload.d.ts +2 -0
  2. package/lib/entity/account/accountPayload.js +2 -0
  3. package/lib/entity/account/accountState.d.ts +2 -0
  4. package/lib/entity/company/companyPayload.d.ts +13 -0
  5. package/lib/entity/company/companyPayload.js +21 -0
  6. package/lib/entity/company/companyStateTypes.d.ts +13 -0
  7. package/lib/entity/snackbar/snackbarTypes.d.ts +1 -1
  8. package/lib/entity/snackbar/snackbarTypes.js +1 -0
  9. package/lib/epic.d.ts +12 -1
  10. package/lib/epic.js +12 -1
  11. package/lib/esm/entity/account/accountPayload.js +2 -0
  12. package/lib/esm/entity/chargeCardTransaction/chargeCardTransactionPayload.js +2 -2
  13. package/lib/esm/entity/company/companyPayload.js +21 -0
  14. package/lib/esm/entity/snackbar/snackbarTypes.js +1 -0
  15. package/lib/esm/epic.js +12 -1
  16. package/lib/esm/index.js +13 -8
  17. package/lib/esm/view/companyView/epic/companyPassport/updateCompanyDetailsEpic.js +6 -0
  18. package/lib/esm/view/companyView/types/companyPassport/companyPassportLocalData.js +13 -0
  19. package/lib/esm/view/companyView/types/companyPassportViewPayload.js +55 -12
  20. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +28 -0
  21. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +49 -0
  22. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +40 -0
  23. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +47 -0
  24. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +61 -0
  25. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +34 -0
  26. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +57 -0
  27. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +78 -0
  28. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
  29. package/lib/esm/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +59 -0
  30. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -3
  31. package/lib/esm/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +24 -0
  32. package/lib/esm/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  33. package/lib/esm/view/expenseAutomationView/payload/missingReceiptsPayload.js +173 -1
  34. package/lib/esm/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +412 -1
  35. package/lib/esm/view/expenseAutomationView/reducers/transactionsViewReducer.js +20 -1
  36. package/lib/esm/view/expenseAutomationView/selectors/missingReceiptsSelector.js +225 -1
  37. package/lib/esm/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
  38. package/lib/esm/view/expenseAutomationView/types/missingReceiptsViewState.js +10 -0
  39. package/lib/esm/view/expenseAutomationView/types/transactionsViewState.js +2 -1
  40. package/lib/esm/view/onboardingView/customerView/onboardingCustomerViewSelector.js +22 -4
  41. package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryDownloadSelector.js +2 -2
  42. package/lib/esm/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistorySelector.js +2 -2
  43. package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailSelector.js +4 -1
  44. package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/fetchChargeCardRepaymentDetailEpic.js +2 -1
  45. package/lib/esm/view/spendManagement/chargeCards/chargeCardRepaymentDetail/initiateChargeCardRepaymentEpic.js +1 -1
  46. package/lib/esm/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +67 -1
  47. package/lib/esm/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +16 -2
  48. package/lib/esm/view/spendManagement/commonSetup/setupViewSelector.js +15 -1
  49. package/lib/esm/view/spendManagement/commonSetup/types/businessVerification.js +148 -1
  50. package/lib/esm/view/taskManager/taskDetailView/taskDetailSelector.js +1 -1
  51. package/lib/esm/zeniAPI.js +0 -2
  52. package/lib/index.d.ts +14 -9
  53. package/lib/index.js +90 -45
  54. package/lib/tsconfig.typecheck.tsbuildinfo +1 -0
  55. package/lib/view/companyView/epic/companyPassport/updateCompanyDetailsEpic.js +6 -0
  56. package/lib/view/companyView/types/companyPassport/companyDetailsLocalData.d.ts +13 -0
  57. package/lib/view/companyView/types/companyPassport/companyPassportLocalData.js +13 -0
  58. package/lib/view/companyView/types/companyPassportViewPayload.d.ts +1 -1
  59. package/lib/view/companyView/types/companyPassportViewPayload.js +55 -12
  60. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.d.ts +15 -0
  61. package/lib/view/expenseAutomationView/epics/missingReceipts/bulkUploadReceiptsEpic.js +32 -0
  62. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.d.ts +7 -0
  63. package/lib/view/expenseAutomationView/epics/missingReceipts/confirmBulkUploadMatchEpic.js +53 -0
  64. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.d.ts +8 -0
  65. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchDetailsEpic.js +44 -0
  66. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.d.ts +7 -0
  67. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchBulkUploadBatchesEpic.js +51 -0
  68. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.d.ts +8 -0
  69. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchCompletedTransactionsEpic.js +65 -0
  70. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.d.ts +8 -0
  71. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMoreBatchDetailsEpic.js +38 -0
  72. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.d.ts +9 -0
  73. package/lib/view/expenseAutomationView/epics/missingReceipts/fetchMultipleBatchDetailsEpic.js +62 -0
  74. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.d.ts +14 -0
  75. package/lib/view/expenseAutomationView/epics/missingReceipts/searchTransactionsForManualMatchEpic.js +82 -0
  76. package/lib/view/expenseAutomationView/epics/missingReceipts/uploadMissingReceiptSuccessEpic.js +7 -5
  77. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.d.ts +19 -0
  78. package/lib/view/expenseAutomationView/epics/missingReceipts/watchBulkUploadBatchStatusEpic.js +64 -0
  79. package/lib/view/expenseAutomationView/epics/transactionCategorization/triggerReviewTabRefetchEpic.js +2 -3
  80. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.d.ts +7 -0
  81. package/lib/view/expenseAutomationView/epics/transactionCategorization/uploadTransactionReceiptSuccessEpic.js +28 -0
  82. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  83. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +2 -2
  84. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.d.ts +118 -0
  85. package/lib/view/expenseAutomationView/payload/missingReceiptsPayload.js +185 -0
  86. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.d.ts +70 -3
  87. package/lib/view/expenseAutomationView/reducers/missingReceiptsViewReducer.js +414 -2
  88. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +11 -3
  89. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +21 -2
  90. package/lib/view/expenseAutomationView/selectorTypes/missingReceiptsSelectorTypes.d.ts +69 -1
  91. package/lib/view/expenseAutomationView/selectorTypes/transactionsViewSelectorTypes.d.ts +1 -0
  92. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.d.ts +1 -1
  93. package/lib/view/expenseAutomationView/selectors/missingReceiptsSelector.js +224 -0
  94. package/lib/view/expenseAutomationView/selectors/transactionCategorizationSelector.js +2 -1
  95. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +131 -0
  96. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.js +12 -1
  97. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -1
  98. package/lib/view/expenseAutomationView/types/transactionsViewState.js +2 -1
  99. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +1 -0
  100. package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +22 -3
  101. package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistoryDownloadSelector.js +2 -2
  102. package/lib/view/spendManagement/chargeCards/chargeCardPaymentHistory/chargeCardPaymentHistorySelector.js +2 -2
  103. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/chargeCardRepaymentDetailSelector.js +4 -1
  104. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/fetchChargeCardRepaymentDetailEpic.js +2 -1
  105. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/initiateChargeCardRepaymentEpic.d.ts +1 -1
  106. package/lib/view/spendManagement/chargeCards/chargeCardRepaymentDetail/initiateChargeCardRepaymentEpic.js +1 -1
  107. package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +67 -1
  108. package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +16 -2
  109. package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +14 -0
  110. package/lib/view/spendManagement/commonSetup/setupViewSelector.js +15 -1
  111. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +14 -0
  112. package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +43 -0
  113. package/lib/view/spendManagement/commonSetup/types/businessVerification.js +150 -0
  114. package/lib/view/taskManager/taskDetailView/taskDetailSelector.js +1 -1
  115. package/lib/zeniAPI.js +0 -2
  116. package/package.json +1 -1
@@ -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, companyIndustryType, 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,55 @@ 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
+ ...(companyIndustryType != null && {
205
+ company_industry_type: companyIndustryType,
206
+ }),
207
+ ...(companySubIndustry != null && {
208
+ company_industry_sub_type: companySubIndustry,
209
+ }),
210
+ ...(countriesOfOperations != null &&
211
+ countriesOfOperations.length > 0 && {
212
+ company_countries_of_operations: countriesOfOperations,
213
+ }),
214
+ ...(companySourceOfFunds != null && {
215
+ company_source_of_funds: companySourceOfFunds,
216
+ }),
217
+ ...(companySourceOfFundsDescription != null && {
218
+ company_source_of_funds_desc: companySourceOfFundsDescription,
219
+ }),
220
+ ...(transactionVolume != null && {
221
+ company_transaction_vol_expectations: transactionVolume,
222
+ }),
223
+ ...(transactionVolumeDescription != null && {
224
+ company_transaction_vol_expectations_desc: transactionVolumeDescription,
225
+ }),
226
+ ...(purposeOfAccount != null && {
227
+ company_purpose_of_account: purposeOfAccount,
228
+ }),
229
+ ...(purposeOfAccountDescription != null && {
230
+ company_purpose_of_account_desc: purposeOfAccountDescription,
231
+ }),
232
+ ...(regulatedStatus != null && {
233
+ company_regulated_states: regulatedStatus === 'yes',
234
+ }),
235
+ ...(regulatedStatusDescription != null && {
236
+ company_regulated_states_desc: regulatedStatusDescription,
237
+ }),
238
+ ...(usNexus != null && {
239
+ company_us_nexus: usNexus === 'yes',
240
+ }),
241
+ ...(usNexusTypes != null &&
242
+ usNexusTypes.length > 0 && {
243
+ company_us_nexus_desc: usNexusTypes.map(toUsNexusTypeKey),
244
+ }),
245
+ });
180
246
  if (setupViewType === 'zeni_treasury' && sourceOfFunds != null) {
181
247
  company['source_of_funds'] = sourceOfFunds;
182
248
  }
@@ -51,16 +51,21 @@ 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, companyIndustryType, } = incInfo;
57
57
  const { companyIndustry } = questionaire;
58
58
  const { taxId } = taxInfo;
59
59
  const companyDetails = {
60
60
  companyId,
61
61
  companyDescription,
62
62
  companyIndustry,
63
+ companyIndustryType,
63
64
  companyLegalName,
65
+ companySubIndustry,
66
+ companySourceOfFunds: incCompanySourceOfFunds,
67
+ companySourceOfFundsDescription,
68
+ countriesOfOperations,
64
69
  taxIdOrEIN: taxId,
65
70
  incDate,
66
71
  phone,
@@ -69,6 +74,15 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
69
74
  syncToken,
70
75
  typeOfIncorporation: companyIncType,
71
76
  sourceOfFunds,
77
+ stateOfIncorporation: companyIncState,
78
+ transactionVolume,
79
+ transactionVolumeDescription,
80
+ purposeOfAccount,
81
+ purposeOfAccountDescription,
82
+ regulatedStatus,
83
+ regulatedStatusDescription,
84
+ usNexus,
85
+ usNexusTypes,
72
86
  };
73
87
  let primaryContactDetails = undefined;
74
88
  if (primaryContact != null) {
@@ -69,15 +69,29 @@ export interface CompanyDetails {
69
69
  addressStatus?: NewAddressData;
70
70
  companyDescription?: string;
71
71
  companyIndustry?: string;
72
+ companyIndustryType?: string;
72
73
  companyLegalName?: string;
74
+ companySourceOfFunds?: string;
75
+ companySourceOfFundsDescription?: string;
76
+ companySubIndustry?: string;
77
+ countriesOfOperations?: string[];
73
78
  incDate?: ZeniDate;
74
79
  phone?: string;
75
80
  primaryContactLocalData?: PrimaryContactLocalData;
81
+ purposeOfAccount?: string;
82
+ purposeOfAccountDescription?: string;
76
83
  registeredAddressStatus?: NewAddressData;
84
+ regulatedStatus?: string;
85
+ regulatedStatusDescription?: string;
77
86
  sourceOfFunds?: string;
87
+ stateOfIncorporation?: string;
78
88
  syncToken?: string;
79
89
  taxIdOrEIN?: string;
90
+ transactionVolume?: string;
91
+ transactionVolumeDescription?: string;
80
92
  typeOfIncorporation?: string;
93
+ usNexus?: string;
94
+ usNexusTypes?: string[];
81
95
  website?: ZeniUrl;
82
96
  }
83
97
  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, companyIndustryType, 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,11 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
128
128
  companyDescription,
129
129
  companyLegalName,
130
130
  companyIndustry,
131
+ companyIndustryType,
132
+ companySubIndustry,
133
+ companySourceOfFunds,
134
+ companySourceOfFundsDescription,
135
+ countriesOfOperations,
131
136
  website,
132
137
  phone,
133
138
  taxIdOrEIN,
@@ -141,6 +146,15 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
141
146
  primaryContactLocalData,
142
147
  typeOfIncorporation,
143
148
  sourceOfFunds,
149
+ transactionVolume,
150
+ transactionVolumeDescription,
151
+ purposeOfAccount,
152
+ purposeOfAccountDescription,
153
+ regulatedStatus,
154
+ regulatedStatusDescription,
155
+ stateOfIncorporation,
156
+ usNexus,
157
+ usNexusTypes,
144
158
  };
145
159
  }
146
160
  const companyOfficerLocalData = {
@@ -16,13 +16,27 @@ export interface CompanyDetailsLocalData {
16
16
  fileIds: ID[];
17
17
  companyDescription?: string;
18
18
  companyIndustry?: string;
19
+ companyIndustryType?: string;
19
20
  companyLegalName?: string;
21
+ companySourceOfFunds?: string;
22
+ companySourceOfFundsDescription?: string;
23
+ companySubIndustry?: string;
24
+ countriesOfOperations?: string[];
20
25
  incDate?: ZeniDate;
21
26
  phone?: string;
27
+ purposeOfAccount?: string;
28
+ purposeOfAccountDescription?: string;
29
+ regulatedStatus?: string;
30
+ regulatedStatusDescription?: string;
22
31
  sourceOfFunds?: string;
32
+ stateOfIncorporation?: string;
23
33
  syncToken?: string;
24
34
  taxIdOrEIN?: string;
35
+ transactionVolume?: string;
36
+ transactionVolumeDescription?: string;
25
37
  typeOfIncorporation?: string;
38
+ usNexus?: string;
39
+ usNexusTypes?: string[];
26
40
  website?: ZeniUrl;
27
41
  }
28
42
  export interface PrimaryContactLocalData {
@@ -1,5 +1,34 @@
1
1
  import { ID } from '../../../../commonStateTypes/common';
2
2
  import { AddressUpdatableInfoPayload } from '../../../addressView/addressViewPayload';
3
+ export declare const COMPANY_TRANSACTION_VOLUME_CODES: readonly ["less_than_10000", "10000_50000", "50001_250000", "250001_1000000", "1000001_2000000", "over_2000000"];
4
+ export type CompanyTransactionVolumeCode = (typeof COMPANY_TRANSACTION_VOLUME_CODES)[number];
5
+ export declare const COMPANY_SOURCE_OF_FUNDS_CODES: readonly ["sales_of_goods", "sales_of_services", "customer_payments", "investment_capital", "business_loans", "owner_contributions", "franchise_revenue", "rental_income", "government_contracts_grants", "donations_fundraising", "membership_fees_subscriptions", "licensing_royalties", "commission_income", "import_export_revenue", "cryptocurrency_activity"];
6
+ export type CompanySourceOfFundsCode = (typeof COMPANY_SOURCE_OF_FUNDS_CODES)[number];
7
+ export declare const COMPANY_PURPOSE_OF_ACCOUNT_CODES: readonly ["retail_sales", "ecommerce_sales", "cash_heavy_operations", "import_export_trade", "professional_services_not_handling_funds", "professional_services_handling_funds", "holding_investment_company", "property_management_real_estate", "charitable_nonprofit", "construction_contracting", "commercial_cash_operations", "freight_forwarding_logistics", "third_party_payment_processing", "technology_startup", "wholesale_distribution", "franchise_operation", "healthcare_provider", "educational_institution"];
8
+ export type CompanyPurposeOfAccountCode = (typeof COMPANY_PURPOSE_OF_ACCOUNT_CODES)[number];
9
+ /** Keys for company_us_nexus_desc / form usNexusTypes (labels from usNexusOptions in app locale). */
10
+ export declare const COMPANY_US_NEXUS_TYPE_CODES: readonly ["employees", "customers", "physical_office", "banking_relationships"];
11
+ export type CompanyUsNexusTypeCode = (typeof COMPANY_US_NEXUS_TYPE_CODES)[number];
12
+ /** Industry type codes for onboarding / business verification (paired with sub-industry). */
13
+ export declare const COMPANY_ONBOARDING_INDUSTRY_TYPE_CODES: readonly ["retail_consumer_goods", "financial_services", "food_agriculture", "healthcare_pharmaceuticals", "professional_services", "manufacturing_industrial", "real_estate_construction", "logistics_transportation", "wholesale_trade", "business_support_services", "escort_dating_adult_entertainment"];
14
+ export type CompanyOnboardingIndustryTypeCode = (typeof COMPANY_ONBOARDING_INDUSTRY_TYPE_CODES)[number];
15
+ export declare const COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY: {
16
+ readonly retail_consumer_goods: readonly ["grocery_stores_supermarkets", "convenience_stores", "specialty_food_retailers", "gas_stations_retail", "general_merchandise_department", "online_retail_ecommerce", "subscription_membership", "direct_to_consumer", "cannabis"];
17
+ readonly financial_services: readonly ["banks_credit_unions", "fintech_payment_processing", "insurance_providers", "investment_advisors_broker", "lending_mortgage", "treasury_management", "personal_finance_apps", "retirement_planning", "real_estate_investment", "money_service_businesses", "cryptocurrency", "debt_collection", "payday_lending", "gambling"];
18
+ readonly food_agriculture: readonly ["farms_agricultural", "food_wholesalers_distributors", "restaurants_cafes", "bars_nightclubs", "catering_services", "farmers_markets", "restaurant_tech_pos"];
19
+ readonly healthcare_pharmaceuticals: readonly ["hospitals_clinics", "pharmacies", "medical_equipment", "biotechnology", "home_health", "healthcare_staffing", "wellness_benefits", "healthcare_social_assistance"];
20
+ readonly professional_services: readonly ["legal_services", "accounting_auditing", "consulting_firms", "marketing_advertising", "real_estate_agents_property", "corporate_services_incorporation", "hr_workforce_management", "direct_marketing_telemarketing", "legal_accounting_consulting_programming"];
21
+ readonly manufacturing_industrial: readonly ["chemical_manufacturing", "electronics_hardware", "automotive_manufacturing", "construction_materials", "textiles_apparel", "mining"];
22
+ readonly real_estate_construction: readonly ["real_estate", "construction"];
23
+ readonly logistics_transportation: readonly ["transportation_warehousing"];
24
+ readonly wholesale_trade: readonly ["wholesale_trade"];
25
+ readonly business_support_services: readonly ["business_support_building"];
26
+ readonly escort_dating_adult_entertainment: readonly ["escort_services", "dating_adult_entertainment"];
27
+ };
28
+ export type CompanyOnboardingSubIndustryTypeCode = {
29
+ [K in keyof typeof COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY]: (typeof COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY)[K][number];
30
+ }[keyof typeof COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY];
31
+ export declare function getCompanyOnboardingSubIndustryCodesForIndustry(industryTypeCode: string | undefined | null): CompanyOnboardingSubIndustryTypeCode[];
3
32
  export interface CompanyOfficerVerificationPayload {
4
33
  additional_submitted_documents_for_verification_file_ids: {
5
34
  social_security_card: ID[];
@@ -63,6 +92,20 @@ export interface CompanyDetailsVerificationPayload {
63
92
  source_of_funds: string;
64
93
  sync_token: string;
65
94
  tax_id: string;
95
+ company_countries_of_operations?: string[];
96
+ company_inc_state?: string | null;
97
+ company_industry_sub_type?: string;
98
+ company_industry_type?: string;
99
+ company_purpose_of_account?: CompanyPurposeOfAccountCode;
100
+ company_purpose_of_account_desc?: string;
101
+ company_regulated_states?: boolean;
102
+ company_regulated_states_desc?: string;
103
+ company_source_of_funds?: CompanySourceOfFundsCode;
104
+ company_source_of_funds_desc?: string;
105
+ company_transaction_vol_expectations?: CompanyTransactionVolumeCode;
106
+ company_transaction_vol_expectations_desc?: string;
107
+ company_us_nexus?: boolean;
108
+ company_us_nexus_desc?: string[];
66
109
  subscription_billing_address?: AddressUpdatableInfoPayload;
67
110
  }
68
111
  export interface BusinessVerificationDataPayload {
@@ -1,2 +1,152 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY = exports.COMPANY_ONBOARDING_INDUSTRY_TYPE_CODES = exports.COMPANY_US_NEXUS_TYPE_CODES = exports.COMPANY_PURPOSE_OF_ACCOUNT_CODES = exports.COMPANY_SOURCE_OF_FUNDS_CODES = exports.COMPANY_TRANSACTION_VOLUME_CODES = void 0;
4
+ exports.getCompanyOnboardingSubIndustryCodesForIndustry = getCompanyOnboardingSubIndustryCodesForIndustry;
5
+ exports.COMPANY_TRANSACTION_VOLUME_CODES = [
6
+ 'less_than_10000',
7
+ '10000_50000',
8
+ '50001_250000',
9
+ '250001_1000000',
10
+ '1000001_2000000',
11
+ 'over_2000000',
12
+ ];
13
+ exports.COMPANY_SOURCE_OF_FUNDS_CODES = [
14
+ 'sales_of_goods',
15
+ 'sales_of_services',
16
+ 'customer_payments',
17
+ 'investment_capital',
18
+ 'business_loans',
19
+ 'owner_contributions',
20
+ 'franchise_revenue',
21
+ 'rental_income',
22
+ 'government_contracts_grants',
23
+ 'donations_fundraising',
24
+ 'membership_fees_subscriptions',
25
+ 'licensing_royalties',
26
+ 'commission_income',
27
+ 'import_export_revenue',
28
+ 'cryptocurrency_activity',
29
+ ];
30
+ exports.COMPANY_PURPOSE_OF_ACCOUNT_CODES = [
31
+ 'retail_sales',
32
+ 'ecommerce_sales',
33
+ 'cash_heavy_operations',
34
+ 'import_export_trade',
35
+ 'professional_services_not_handling_funds',
36
+ 'professional_services_handling_funds',
37
+ 'holding_investment_company',
38
+ 'property_management_real_estate',
39
+ 'charitable_nonprofit',
40
+ 'construction_contracting',
41
+ 'commercial_cash_operations',
42
+ 'freight_forwarding_logistics',
43
+ 'third_party_payment_processing',
44
+ 'technology_startup',
45
+ 'wholesale_distribution',
46
+ 'franchise_operation',
47
+ 'healthcare_provider',
48
+ 'educational_institution',
49
+ ];
50
+ /** Keys for company_us_nexus_desc / form usNexusTypes (labels from usNexusOptions in app locale). */
51
+ exports.COMPANY_US_NEXUS_TYPE_CODES = [
52
+ 'employees',
53
+ 'customers',
54
+ 'physical_office',
55
+ 'banking_relationships',
56
+ ];
57
+ /** Industry type codes for onboarding / business verification (paired with sub-industry). */
58
+ exports.COMPANY_ONBOARDING_INDUSTRY_TYPE_CODES = [
59
+ 'retail_consumer_goods',
60
+ 'financial_services',
61
+ 'food_agriculture',
62
+ 'healthcare_pharmaceuticals',
63
+ 'professional_services',
64
+ 'manufacturing_industrial',
65
+ 'real_estate_construction',
66
+ 'logistics_transportation',
67
+ 'wholesale_trade',
68
+ 'business_support_services',
69
+ 'escort_dating_adult_entertainment',
70
+ ];
71
+ exports.COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY = {
72
+ retail_consumer_goods: [
73
+ 'grocery_stores_supermarkets',
74
+ 'convenience_stores',
75
+ 'specialty_food_retailers',
76
+ 'gas_stations_retail',
77
+ 'general_merchandise_department',
78
+ 'online_retail_ecommerce',
79
+ 'subscription_membership',
80
+ 'direct_to_consumer',
81
+ 'cannabis',
82
+ ],
83
+ financial_services: [
84
+ 'banks_credit_unions',
85
+ 'fintech_payment_processing',
86
+ 'insurance_providers',
87
+ 'investment_advisors_broker',
88
+ 'lending_mortgage',
89
+ 'treasury_management',
90
+ 'personal_finance_apps',
91
+ 'retirement_planning',
92
+ 'real_estate_investment',
93
+ 'money_service_businesses',
94
+ 'cryptocurrency',
95
+ 'debt_collection',
96
+ 'payday_lending',
97
+ 'gambling',
98
+ ],
99
+ food_agriculture: [
100
+ 'farms_agricultural',
101
+ 'food_wholesalers_distributors',
102
+ 'restaurants_cafes',
103
+ 'bars_nightclubs',
104
+ 'catering_services',
105
+ 'farmers_markets',
106
+ 'restaurant_tech_pos',
107
+ ],
108
+ healthcare_pharmaceuticals: [
109
+ 'hospitals_clinics',
110
+ 'pharmacies',
111
+ 'medical_equipment',
112
+ 'biotechnology',
113
+ 'home_health',
114
+ 'healthcare_staffing',
115
+ 'wellness_benefits',
116
+ 'healthcare_social_assistance',
117
+ ],
118
+ professional_services: [
119
+ 'legal_services',
120
+ 'accounting_auditing',
121
+ 'consulting_firms',
122
+ 'marketing_advertising',
123
+ 'real_estate_agents_property',
124
+ 'corporate_services_incorporation',
125
+ 'hr_workforce_management',
126
+ 'direct_marketing_telemarketing',
127
+ 'legal_accounting_consulting_programming',
128
+ ],
129
+ manufacturing_industrial: [
130
+ 'chemical_manufacturing',
131
+ 'electronics_hardware',
132
+ 'automotive_manufacturing',
133
+ 'construction_materials',
134
+ 'textiles_apparel',
135
+ 'mining',
136
+ ],
137
+ real_estate_construction: ['real_estate', 'construction'],
138
+ logistics_transportation: ['transportation_warehousing'],
139
+ wholesale_trade: ['wholesale_trade'],
140
+ business_support_services: ['business_support_building'],
141
+ escort_dating_adult_entertainment: [
142
+ 'escort_services',
143
+ 'dating_adult_entertainment',
144
+ ],
145
+ };
146
+ function getCompanyOnboardingSubIndustryCodesForIndustry(industryTypeCode) {
147
+ if (industryTypeCode == null || industryTypeCode === '') {
148
+ return [];
149
+ }
150
+ const row = exports.COMPANY_ONBOARDING_SUB_INDUSTRY_CODES_BY_INDUSTRY[industryTypeCode];
151
+ return row != null ? [...row] : [];
152
+ }
@@ -116,7 +116,7 @@ exports.allTaskPriority = [
116
116
  },
117
117
  {
118
118
  code: 'medium',
119
- name: 'Normal',
119
+ name: 'Medium',
120
120
  },
121
121
  {
122
122
  code: 'low',
package/lib/zeniAPI.js CHANGED
@@ -82,8 +82,6 @@ class ZeniAPIClient {
82
82
  return (0, rxjs_1.from)(promise);
83
83
  }
84
84
  postFormData(restEndPoint, formData, signal) {
85
- // Use apiHeaders for auth headers, then remove Content-Type
86
- // so the browser sets multipart/form-data with the correct boundary
87
85
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
88
86
  const { 'Content-Type': _contentType, ...headers } = this.apiHeaders();
89
87
  const promise = (0, cross_fetch_1.fetch)(restEndPoint, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.19.83",
3
+ "version": "4.19.84-betaVR10",
4
4
  "description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/esm/index.js",