@zeniai/client-epic-state 4.12.91 → 4.12.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonPayloadTypes/commonPayload.d.ts +7 -0
- package/lib/entity/company/companyPayload.d.ts +4 -0
- package/lib/entity/company/companyPayload.js +8 -3
- package/lib/entity/company/companyReducer.d.ts +4 -1
- package/lib/entity/company/companyReducer.js +6 -2
- package/lib/entity/company/companyStateTypes.d.ts +4 -0
- package/lib/entity/file/fileState.d.ts +3 -3
- package/lib/entity/file/fileState.js +2 -0
- package/lib/entity/tenant/clearAllEpic.d.ts +3 -1
- package/lib/entity/tenant/clearAllEpic.js +4 -0
- package/lib/entity/user/userPayload.d.ts +1 -0
- package/lib/entity/user/userReducer.js +9 -8
- package/lib/entity/user/userState.d.ts +1 -0
- package/lib/epic.d.ts +6 -1
- package/lib/epic.js +6 -1
- package/lib/index.d.ts +12 -5
- package/lib/index.js +15 -6
- package/lib/reducer.d.ts +6 -0
- package/lib/reducer.js +6 -0
- package/lib/view/addressView/__mocks__/json/createCompanyAddressSuccess.json +7 -1
- package/lib/view/addressView/__mocks__/json/createCompanyUserAddressSuccess.json +7 -1
- package/lib/view/addressView/addressViewState.d.ts +1 -1
- package/lib/view/addressView/toAddressViewLocalData.js +5 -0
- package/lib/view/commonVendorView/vendorView/vendorViewSelector.d.ts +1 -1
- package/lib/view/companyView/epic/companyPassport/updateCompanyPassportLocalStoreDataEpic.js +1 -6
- package/lib/view/companyView/selectorHelpers/getCompanyView.js +4 -0
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +2 -0
- package/lib/view/companyView/types/companyPassport/companyUsersLocalData.js +7 -1
- package/lib/view/companyView/types/companyView.d.ts +1 -0
- package/lib/view/countryList/countryListReducer.d.ts +17 -0
- package/lib/view/countryList/countryListReducer.js +58 -0
- package/lib/view/countryList/countryListSelector.d.ts +7 -0
- package/lib/view/countryList/countryListSelector.js +13 -0
- package/lib/view/countryList/countryListState.d.ts +12 -0
- package/lib/view/countryList/countryListState.js +2 -0
- package/lib/view/countryList/epics/fetchCountryListEpic.d.ts +6 -0
- package/lib/view/countryList/epics/fetchCountryListEpic.js +19 -0
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.d.ts +7 -0
- package/lib/view/countryList/epics/fetchNationalityCountryListEpic.js +38 -0
- package/lib/view/countryList/payloads/countryListPayload.d.ts +6 -0
- package/lib/view/countryList/payloads/countryListPayload.js +10 -0
- package/lib/view/countryList/payloads/nationalityCountryListPayload.d.ts +11 -0
- package/lib/view/countryList/payloads/nationalityCountryListPayload.js +2 -0
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.d.ts +8 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/fetchOnboardingCustomerViewEpic.js +3 -1
- package/lib/view/onboardingView/customerView/epic/customerDetails/updateOnboardingCustomerViewEpic.js +5 -4
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.d.ts +2 -0
- package/lib/view/onboardingView/customerView/onboardingCustomerViewSelector.js +6 -3
- package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +1 -1
- package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -4
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.d.ts +2 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +3 -0
- package/lib/view/spendManagement/billPay/internationalWire/internationalWireSelector.d.ts +2 -1
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.d.ts +7 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/fetchIntlVerificationFormEpic.js +36 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.d.ts +6 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/initializeIntlVerificationFormEpic.js +28 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.d.ts +9 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/epics/submitIntlVerificationEpic.js +67 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.d.ts +26 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationPayload.js +22 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.d.ts +22 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationReducer.js +89 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.d.ts +15 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationSelector.js +30 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.d.ts +20 -0
- package/lib/view/spendManagement/billPay/internationalWireVerification/internationalWireVerificationState.js +2 -0
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts +1 -1
- package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js +31 -6
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts +2 -2
- package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js +5 -2
- package/lib/view/spendManagement/commonSetup/setupViewSelector.d.ts +4 -1
- package/lib/view/spendManagement/commonSetup/setupViewSelector.js +6 -2
- package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -0
- package/lib/view/spendManagement/commonSetup/types/businessVerification.d.ts +4 -0
- package/package.json +1 -1
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.d.ts +0 -0
- package/lib/commonPayloadTypes/v2/getSumOfBalancesGroupedByPeriod.js +0 -1
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.d.ts +0 -0
- package/lib/commonStateTypes/selectorTypes/pickAndMergeForecastSectionWithAcOnly.js +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FetchStateAndError } from '../../../../commonStateTypes/common';
|
|
2
|
+
export interface InternationalWireVerificationState {
|
|
3
|
+
verificationFormFetchState: FetchStateAndError;
|
|
4
|
+
verificationFormFields: VerificationFormField[];
|
|
5
|
+
verificationFormLocalData: VerificationFormLocalData;
|
|
6
|
+
verificationFormSubmitState: FetchStateAndError;
|
|
7
|
+
}
|
|
8
|
+
export declare type VerificationFormLocalData = Record<string, string | string[]>;
|
|
9
|
+
export interface FieldValueType {
|
|
10
|
+
code: string;
|
|
11
|
+
description: string;
|
|
12
|
+
}
|
|
13
|
+
export interface VerificationFormField {
|
|
14
|
+
name: string;
|
|
15
|
+
label: string;
|
|
16
|
+
placeholder: string;
|
|
17
|
+
fieldValues: FieldValueType[];
|
|
18
|
+
isMultipleValuesAllowed: boolean;
|
|
19
|
+
type: string;
|
|
20
|
+
}
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ import { CompanyDetailsVerificationPayload, CompanyOfficerVerificationPayload, N
|
|
|
16
16
|
import { CompanyDetailsLocalData, CompanyOfficerLocalData, PrimaryContactLocalData } from '../../setupViewState';
|
|
17
17
|
export declare type ActionType = ReturnType<typeof updateBusinessVerificationDetails> | ReturnType<typeof updateAllUsers> | ReturnType<typeof updateUserRoles> | ReturnType<typeof updateCompanies> | ReturnType<typeof updateAddresses> | ReturnType<typeof updateFiles> | ReturnType<typeof updateAccounts> | ReturnType<typeof updatePaymentAccounts> | ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof updateSelectedCompanyOfficer> | ReturnType<typeof openSnackbar> | ReturnType<typeof updateBusinessVerificationDetailsSuccess> | ReturnType<typeof updateBusinessVerificationDetailsFailure>;
|
|
18
18
|
export declare const updateBusinessVerificationDetailsEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>, zeniAPI: ZeniAPI) => Observable<ActionType>;
|
|
19
|
-
export declare const toBusinessVerificationCompanyDataPayload: (companyLocalData: CompanyDetailsLocalData, sendForVerification: boolean, companyAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyDetailsVerificationPayload>;
|
|
19
|
+
export declare const toBusinessVerificationCompanyDataPayload: (companyLocalData: CompanyDetailsLocalData, sendForVerification: boolean, companyAddressData?: AddressUpdatableInfo | undefined, registeredAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyDetailsVerificationPayload>;
|
|
20
20
|
export declare const toBusinessVerificationPrimaryContactDataPayload: (primaryContact: PrimaryContactLocalData, isNewPrimaryContactUser: boolean) => Partial<PrimaryContactVerificationPayload>;
|
|
21
21
|
export declare const toBusinessVerificationOfficerDataPayload: (companyOfficer: CompanyOfficerLocalData, isSubmittingAdditionalDocuments: boolean, companyOfficerAddressData?: AddressUpdatableInfo | undefined) => Partial<CompanyOfficerVerificationPayload> | Partial<NewCompanyOfficerVerificationPayload>;
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateBusinessVerificationDetailsEpic.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.toBusinessVerificationOfficerDataPayload = exports.toBusinessVerificationPrimaryContactDataPayload = exports.toBusinessVerificationCompanyDataPayload = exports.updateBusinessVerificationDetailsEpic = void 0;
|
|
4
7
|
const rxjs_1 = require("rxjs");
|
|
@@ -15,8 +18,10 @@ const paymentAccountReducer_1 = require("../../../../../entity/paymentAccount/pa
|
|
|
15
18
|
const addressViewPayload_1 = require("../../../../addressView/addressViewPayload");
|
|
16
19
|
const getCompanyView_1 = require("../../../../companyView/selectorHelpers/getCompanyView");
|
|
17
20
|
const setupViewReducer_1 = require("../../setupViewReducer");
|
|
21
|
+
const addressViewSelector_1 = require("../../../../addressView/addressViewSelector");
|
|
22
|
+
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
18
23
|
const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => actions$.pipe((0, operators_1.filter)(setupViewReducer_1.updateBusinessVerificationDetails.match), (0, operators_1.mergeMap)((action) => {
|
|
19
|
-
var _a, _b, _c;
|
|
24
|
+
var _a, _b, _c, _d;
|
|
20
25
|
const { companyId, officerType, setupViewType, sendForVerification, fromBillListScreen, isSubmittingAdditionalDocuments, } = action.payload;
|
|
21
26
|
const { setupViewState } = state$.value;
|
|
22
27
|
const companyLocalData = setupViewState.companyDetails.localData;
|
|
@@ -26,14 +31,15 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
|
|
|
26
31
|
const companyView = (0, getCompanyView_1.getCompanyView)(state$.value, companyId, []);
|
|
27
32
|
const { newAddressState } = state$.value.addressViewState;
|
|
28
33
|
const companyAddressToCreate = (_a = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_address) === null || _a === void 0 ? void 0 : _a.addressToCreate;
|
|
34
|
+
const registeredAddressToCreate = (_b = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState.company_registered_address) === null || _b === void 0 ? void 0 : _b.addressToCreate;
|
|
29
35
|
const addressType = officerType
|
|
30
36
|
.toLowerCase()
|
|
31
37
|
.concat('_address');
|
|
32
|
-
const companyOfficerAddressToCreate = (
|
|
38
|
+
const companyOfficerAddressToCreate = (_c = newAddressState === null || newAddressState === void 0 ? void 0 : newAddressState[addressType]) === null || _c === void 0 ? void 0 : _c.addressToCreate;
|
|
33
39
|
const isNewPrimaryContactUser = (primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.userId) == null ||
|
|
34
40
|
(primaryContactLocalData === null || primaryContactLocalData === void 0 ? void 0 : primaryContactLocalData.email) !==
|
|
35
|
-
((
|
|
36
|
-
const company = (0, exports.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate);
|
|
41
|
+
((_d = companyView === null || companyView === void 0 ? void 0 : companyView.primaryContact) === null || _d === void 0 ? void 0 : _d.user.email);
|
|
42
|
+
const company = (0, exports.toBusinessVerificationCompanyDataPayload)(companyLocalData, sendForVerification, companyAddressToCreate, registeredAddressToCreate);
|
|
37
43
|
const primary_contact_user = primaryContactLocalData != null &&
|
|
38
44
|
Boolean(primaryContactLocalData.email) === true // Don't save Empty Primary Contact details
|
|
39
45
|
? (0, exports.toBusinessVerificationPrimaryContactDataPayload)(primaryContactLocalData, isNewPrimaryContactUser)
|
|
@@ -104,7 +110,7 @@ const updateBusinessVerificationDetailsEpic = (actions$, state$, zeniAPI) => act
|
|
|
104
110
|
}
|
|
105
111
|
}));
|
|
106
112
|
exports.updateBusinessVerificationDetailsEpic = updateBusinessVerificationDetailsEpic;
|
|
107
|
-
const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerification, companyAddressData) => {
|
|
113
|
+
const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerification, companyAddressData, registeredAddressData) => {
|
|
108
114
|
const { companyDescription, companyLegalName, companyIndustry, website, incDate, taxIdOrEIN, phone, syncToken, fileIds, typeOfIncorporation, } = companyLocalData;
|
|
109
115
|
const company = {
|
|
110
116
|
is_ready_for_verification: sendForVerification,
|
|
@@ -113,6 +119,19 @@ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerif
|
|
|
113
119
|
const companyAddressPayload = companyAddressData != null
|
|
114
120
|
? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(companyAddressData)
|
|
115
121
|
: undefined;
|
|
122
|
+
const registeredAddressPayload = registeredAddressData != null
|
|
123
|
+
? (0, addressViewPayload_1.toAddressUpdatableInfoPayload)(registeredAddressData)
|
|
124
|
+
: undefined;
|
|
125
|
+
if ((0, isEqual_1.default)(companyAddressData != null
|
|
126
|
+
? (0, addressViewSelector_1.getFormattedAddress)(companyAddressData)
|
|
127
|
+
: companyAddressData, registeredAddressData != null
|
|
128
|
+
? (0, addressViewSelector_1.getFormattedAddress)(registeredAddressData)
|
|
129
|
+
: registeredAddressData)) {
|
|
130
|
+
company['is_registered_address_same_as_company_address'] = true;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
company['is_registered_address_same_as_company_address'] = false;
|
|
134
|
+
}
|
|
116
135
|
if (companyDescription != null) {
|
|
117
136
|
company['company_description'] = companyDescription;
|
|
118
137
|
}
|
|
@@ -137,6 +156,9 @@ const toBusinessVerificationCompanyDataPayload = (companyLocalData, sendForVerif
|
|
|
137
156
|
if (companyAddressPayload != null) {
|
|
138
157
|
company['address'] = companyAddressPayload;
|
|
139
158
|
}
|
|
159
|
+
if (registeredAddressPayload != null) {
|
|
160
|
+
company['registered_address'] = registeredAddressPayload;
|
|
161
|
+
}
|
|
140
162
|
if (typeOfIncorporation != null) {
|
|
141
163
|
company['company_inc_type'] = typeOfIncorporation;
|
|
142
164
|
}
|
|
@@ -163,7 +185,7 @@ const toBusinessVerificationPrimaryContactDataPayload = (primaryContact, isNewPr
|
|
|
163
185
|
};
|
|
164
186
|
exports.toBusinessVerificationPrimaryContactDataPayload = toBusinessVerificationPrimaryContactDataPayload;
|
|
165
187
|
const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAdditionalDocuments, companyOfficerAddressData) => {
|
|
166
|
-
const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday, phone: userPhone, otpChallenge, isPhoneVerified, titleAtCompany, ownershipInCompany, documentTypeSelectedForVerification, fileIds: userFileIds, additionalSubmittedDocumentsForVerificationFileIds, } = companyOfficer;
|
|
188
|
+
const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday, nationalityCountryCode, phone: userPhone, otpChallenge, isPhoneVerified, titleAtCompany, ownershipInCompany, documentTypeSelectedForVerification, fileIds: userFileIds, additionalSubmittedDocumentsForVerificationFileIds, } = companyOfficer;
|
|
167
189
|
const company_officer = {
|
|
168
190
|
first_name: firstName,
|
|
169
191
|
last_name: lastName,
|
|
@@ -194,6 +216,9 @@ const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAd
|
|
|
194
216
|
if (birthday != null) {
|
|
195
217
|
company_officer['birthday'] = birthday.format('YYYY-MM-DD');
|
|
196
218
|
}
|
|
219
|
+
if (nationalityCountryCode != null) {
|
|
220
|
+
company_officer['nationality_country_code'] = nationalityCountryCode;
|
|
221
|
+
}
|
|
197
222
|
if (userPhone != null) {
|
|
198
223
|
company_officer['phone'] = userPhone;
|
|
199
224
|
}
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { Company } from '../../../../../entity/company/companyStateTypes';
|
|
|
5
5
|
import { clearSetupViewDataInLocalStore, saveSetupViewDataInLocalStore, updateSetupViewLocalStoreData } from '../../setupViewReducer';
|
|
6
6
|
import { SetupViewLocalData } from '../../setupViewState';
|
|
7
7
|
import { UserRole } from '../../../../../entity/userRole/userRoleState';
|
|
8
|
-
import { newAddressInLocalStore,
|
|
9
|
-
export declare type ActionType = ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof saveSetupViewDataInLocalStore> | ReturnType<typeof clearSetupViewDataInLocalStore> | ReturnType<typeof
|
|
8
|
+
import { newAddressInLocalStore, resetNewAddressDataInLocalStoreForAddressTypes } from '../../../../addressView/addressViewReducer';
|
|
9
|
+
export declare type ActionType = ReturnType<typeof updateSetupViewLocalStoreData> | ReturnType<typeof saveSetupViewDataInLocalStore> | ReturnType<typeof clearSetupViewDataInLocalStore> | ReturnType<typeof resetNewAddressDataInLocalStoreForAddressTypes> | ReturnType<typeof newAddressInLocalStore>;
|
|
10
10
|
export declare const updateSetupViewLocalStoreDataEpic: (actions$: ActionsObservable<ActionType>, state$: StateObservable<RootState>) => import("rxjs").Observable<ActionType>;
|
|
11
11
|
/**
|
|
12
12
|
* Helpers
|
package/lib/view/spendManagement/commonSetup/epic/setup/updateSetupViewLocalStoreDataEpic.js
CHANGED
|
@@ -29,7 +29,8 @@ const updateSetupViewLocalStoreDataEpic = (actions$, state$) => actions$.pipe((0
|
|
|
29
29
|
const fetchActions = [];
|
|
30
30
|
if (company != null) {
|
|
31
31
|
const setupViewLocalData = toSetupViewLocalData(company, companyOfficers, companyOfficerRoles, primaryContact);
|
|
32
|
-
fetchActions.push((0, setupViewReducer_1.clearSetupViewDataInLocalStore)(), (0, setupViewReducer_1.saveSetupViewDataInLocalStore)(setupViewLocalData)
|
|
32
|
+
fetchActions.push((0, setupViewReducer_1.clearSetupViewDataInLocalStore)(), (0, setupViewReducer_1.saveSetupViewDataInLocalStore)(setupViewLocalData));
|
|
33
|
+
fetchActions.push((0, addressViewReducer_1.resetNewAddressDataInLocalStoreForAddressTypes)(companyUsersLocalData_1.AllCompanyPassportAddressTypes));
|
|
33
34
|
}
|
|
34
35
|
if (companyView != null) {
|
|
35
36
|
const addresses = (0, toAddressViewLocalData_1.toAddressViewLocalData)(companyView);
|
|
@@ -90,7 +91,7 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
|
|
|
90
91
|
}
|
|
91
92
|
const officers = companyOfficers.map((user, index) => {
|
|
92
93
|
var _a, _b, _c, _d, _e;
|
|
93
|
-
const { userId, firstName, lastName, birthday, email, phone: userPhone, isPhoneVerified, ssn, syncToken, } = user;
|
|
94
|
+
const { userId, firstName, lastName, birthday, email, nationalityCountryCode, phone: userPhone, isPhoneVerified, ssn, syncToken, } = user;
|
|
94
95
|
const userRole = userRoles.find((userRole) => userRole.userId === userId);
|
|
95
96
|
return {
|
|
96
97
|
officerType: `Officer_${index + 1}`,
|
|
@@ -99,6 +100,7 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
|
|
|
99
100
|
lastName,
|
|
100
101
|
birthday,
|
|
101
102
|
email,
|
|
103
|
+
nationalityCountryCode,
|
|
102
104
|
phone: userPhone,
|
|
103
105
|
isPhoneVerified,
|
|
104
106
|
ssn,
|
|
@@ -122,6 +124,7 @@ function toSetupViewLocalData(company, users, userRoles, primaryContact) {
|
|
|
122
124
|
firstName: '',
|
|
123
125
|
lastName: '',
|
|
124
126
|
email: '',
|
|
127
|
+
nationalityCountryCode: undefined,
|
|
125
128
|
fileIds: [],
|
|
126
129
|
isSelectedForVerification: false,
|
|
127
130
|
additionalDocumentTypesRequestedForVerification: [],
|
|
@@ -16,6 +16,7 @@ import { DepositAccount } from '../../../entity/depositAccount/depositAccount';
|
|
|
16
16
|
import { AllowedValueWithCode } from '../../../commonStateTypes/allowedValue';
|
|
17
17
|
import { Amount } from '../../../commonStateTypes/amount';
|
|
18
18
|
import { BalanceChange } from '../../../commonStateTypes/balance';
|
|
19
|
+
import { Country } from '../../countryList/countryListState';
|
|
19
20
|
export interface SetupView {
|
|
20
21
|
allFundingAccounts: FundingAccount[];
|
|
21
22
|
allBankAccounts: AccountBase[];
|
|
@@ -72,6 +73,7 @@ export interface CompanyDetails {
|
|
|
72
73
|
incDate?: ZeniDate;
|
|
73
74
|
syncToken?: string;
|
|
74
75
|
addressStatus?: NewAddressData;
|
|
76
|
+
registeredAddressStatus?: NewAddressData;
|
|
75
77
|
primaryContactLocalData?: PrimaryContactLocalData;
|
|
76
78
|
typeOfIncorporation?: string;
|
|
77
79
|
}
|
|
@@ -80,8 +82,9 @@ interface CompanyAndOfficerLocalData {
|
|
|
80
82
|
companyOfficerLocalData: Record<CompanyOfficerType, CompanyOfficersDetails | undefined>;
|
|
81
83
|
}
|
|
82
84
|
export interface BusinessVerificationDetails extends CompanyAndOfficerLocalData {
|
|
83
|
-
companyView?: CompanyView;
|
|
84
85
|
updateStatus: FetchStateAndError;
|
|
86
|
+
allNationalityCountries: Country[];
|
|
87
|
+
companyView?: CompanyView;
|
|
85
88
|
}
|
|
86
89
|
export declare function getCommonSetupViewDetails(state: RootState, companyId: ID, setupViewType: SetupViewType, plaidAccountKeyType: PlaidAccountKeyType): SetupView;
|
|
87
90
|
export declare function getBusinessVerificationDetails(state: RootState, companyId: ID): BusinessVerificationDetails;
|
|
@@ -82,7 +82,7 @@ function getPrimaryAccountForTheProduct(state, companyId, setupViewType) {
|
|
|
82
82
|
return primaryFundingAccount;
|
|
83
83
|
}
|
|
84
84
|
function getBusinessVerificationDetails(state, companyId) {
|
|
85
|
-
const { setupViewState } = state;
|
|
85
|
+
const { setupViewState, countryListState } = state;
|
|
86
86
|
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails, updateStatus, } = setupViewState;
|
|
87
87
|
const companyView = (0, getCompanyView_1.getCompanyView)(state, companyId, []);
|
|
88
88
|
const { companyDetailsLocalData, companyOfficerLocalData } = (0, exports.getCompanyAndIdentityDetails)(state, companyId, {
|
|
@@ -90,16 +90,18 @@ function getBusinessVerificationDetails(state, companyId) {
|
|
|
90
90
|
companyOfficerUpdateStatus,
|
|
91
91
|
primaryContactDetails,
|
|
92
92
|
});
|
|
93
|
+
const allNationalityCountries = countryListState.byCountryListCode.nationalityCountryList.countries;
|
|
93
94
|
return {
|
|
94
95
|
companyDetailsLocalData,
|
|
95
96
|
companyOfficerLocalData,
|
|
96
97
|
companyView,
|
|
97
98
|
updateStatus,
|
|
99
|
+
allNationalityCountries,
|
|
98
100
|
};
|
|
99
101
|
}
|
|
100
102
|
exports.getBusinessVerificationDetails = getBusinessVerificationDetails;
|
|
101
103
|
const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetails) => {
|
|
102
|
-
var _a;
|
|
104
|
+
var _a, _b;
|
|
103
105
|
const { companyDetails, companyOfficerUpdateStatus, primaryContactDetails } = companyAndIdentityDetails;
|
|
104
106
|
const { fileState, addressViewState } = state;
|
|
105
107
|
const { localData: primaryContactLocalData } = primaryContactDetails;
|
|
@@ -115,6 +117,7 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
|
|
|
115
117
|
updateFileStatusById[fileId] = (0, fileViewSelector_1.getFileUpdateNameStatusById)(state, fileId);
|
|
116
118
|
});
|
|
117
119
|
const companyAddress = (_a = addressViewState.newAddressState) === null || _a === void 0 ? void 0 : _a.company_address;
|
|
120
|
+
const registeredCompanyAddress = (_b = addressViewState.newAddressState) === null || _b === void 0 ? void 0 : _b.company_registered_address;
|
|
118
121
|
companyDetailsLocalData = {
|
|
119
122
|
companyId,
|
|
120
123
|
companyDescription,
|
|
@@ -129,6 +132,7 @@ const getCompanyAndIdentityDetails = (state, companyId, companyAndIdentityDetail
|
|
|
129
132
|
deleteFileStatusById,
|
|
130
133
|
updateFileStatusById,
|
|
131
134
|
addressStatus: companyAddress,
|
|
135
|
+
registeredAddressStatus: registeredCompanyAddress,
|
|
132
136
|
primaryContactLocalData,
|
|
133
137
|
typeOfIncorporation,
|
|
134
138
|
};
|
|
@@ -8,6 +8,7 @@ export interface CompanyOfficerVerificationPayload {
|
|
|
8
8
|
sync_token: string;
|
|
9
9
|
ssn: string;
|
|
10
10
|
birthday: string;
|
|
11
|
+
nationality_country_code: string;
|
|
11
12
|
title_at_company: string;
|
|
12
13
|
company_ownership: number;
|
|
13
14
|
document_type_for_verification: string;
|
|
@@ -31,6 +32,7 @@ export interface NewCompanyOfficerVerificationPayload {
|
|
|
31
32
|
title_at_company: string;
|
|
32
33
|
company_ownership: number;
|
|
33
34
|
document_type_for_verification: string;
|
|
35
|
+
nationality_country_code: string;
|
|
34
36
|
file_ids: ID[];
|
|
35
37
|
address: AddressUpdatableInfoPayload;
|
|
36
38
|
phone_verification?: {
|
|
@@ -55,6 +57,8 @@ export interface CompanyDetailsVerificationPayload {
|
|
|
55
57
|
file_ids: ID[];
|
|
56
58
|
sync_token: string;
|
|
57
59
|
address: AddressUpdatableInfoPayload;
|
|
60
|
+
registered_address: AddressUpdatableInfoPayload;
|
|
61
|
+
is_registered_address_same_as_company_address: boolean;
|
|
58
62
|
company_inc_type: string;
|
|
59
63
|
company_inc_date: string | null;
|
|
60
64
|
is_new_company_industry_verified: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.93",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|