@zeniai/client-epic-state 4.14.99 → 4.15.0

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.
@@ -69,12 +69,11 @@ function getOnboardingCustomerView(state, companyId) {
69
69
  companyDetailsLocalData.addressStatus = subscriptionBillingAddress;
70
70
  }
71
71
  const completedSteps = [];
72
- if (((((_l = (_k = paymentAccount === null || paymentAccount === void 0 ? void 0 : paymentAccount.providerVerificationStatus) === null || _k === void 0 ? void 0 : _k.code) === null || _l === void 0 ? void 0 : _l.includes('verified')) ===
72
+ if ((((_l = (_k = paymentAccount === null || paymentAccount === void 0 ? void 0 : paymentAccount.providerVerificationStatus) === null || _k === void 0 ? void 0 : _k.code) === null || _l === void 0 ? void 0 : _l.includes('verified')) ===
73
73
  true &&
74
74
  (paymentAccount === null || paymentAccount === void 0 ? void 0 : paymentAccount.isLoginRequired) === false) ||
75
75
  ((_o = (_m = subscriptionPaymentAccount === null || subscriptionPaymentAccount === void 0 ? void 0 : subscriptionPaymentAccount.providerVerificationStatus) === null || _m === void 0 ? void 0 : _m.code) === null || _o === void 0 ? void 0 : _o.includes('verified')) === true ||
76
- cardPaymentViewState.cardPaymentsIds.length > 0) &&
77
- (companyView === null || companyView === void 0 ? void 0 : companyView.company.company.companyOnboardingInfo.subscriptionBillingAddressId) != null) {
76
+ cardPaymentViewState.cardPaymentsIds.length > 0) {
78
77
  completedSteps.push('link_payment_account');
79
78
  }
80
79
  const isValidConnection = (_q = (_p = externalConnections === null || externalConnections === void 0 ? void 0 : externalConnections.accounting[0]) === null || _p === void 0 ? void 0 : _p.isValid) !== null && _q !== void 0 ? _q : false;
@@ -185,7 +185,6 @@ const toBusinessVerificationPrimaryContactDataPayload = (primaryContact, isNewPr
185
185
  };
186
186
  exports.toBusinessVerificationPrimaryContactDataPayload = toBusinessVerificationPrimaryContactDataPayload;
187
187
  const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAdditionalDocuments, companyOfficerAddressData) => {
188
- var _a;
189
188
  const { firstName, lastName, userId, email, syncToken: userSyncToken, ssn, birthday, nationalityCountryCode, phone: userPhone, otpChallenge, isPhoneVerified, titleAtCompany, ownershipInCompany, documentTypeSelectedForVerification, fileIds: userFileIds, additionalSubmittedDocumentsForVerificationFileIds, } = companyOfficer;
190
189
  const company_officer = {
191
190
  first_name: firstName,
@@ -214,15 +213,25 @@ const toBusinessVerificationOfficerDataPayload = (companyOfficer, isSubmittingAd
214
213
  if (ssn != null) {
215
214
  company_officer['ssn'] = ssn;
216
215
  }
217
- company_officer['birthday'] = (_a = birthday === null || birthday === void 0 ? void 0 : birthday.format('YYYY-MM-DD')) !== null && _a !== void 0 ? _a : null;
216
+ if (birthday != null) {
217
+ company_officer['birthday'] = birthday.format('YYYY-MM-DD');
218
+ }
219
+ if (nationalityCountryCode != null) {
220
+ company_officer['nationality_country_code'] = nationalityCountryCode;
221
+ }
218
222
  if (userPhone != null) {
219
223
  company_officer['phone'] = userPhone;
220
224
  }
221
- company_officer['title_at_company'] = titleAtCompany !== null && titleAtCompany !== void 0 ? titleAtCompany : '';
222
- company_officer['company_ownership'] = ownershipInCompany !== null && ownershipInCompany !== void 0 ? ownershipInCompany : null;
223
- company_officer['document_type_for_verification'] =
224
- documentTypeSelectedForVerification !== null && documentTypeSelectedForVerification !== void 0 ? documentTypeSelectedForVerification : '';
225
- company_officer['nationality_country_code'] = nationalityCountryCode !== null && nationalityCountryCode !== void 0 ? nationalityCountryCode : '';
225
+ if (titleAtCompany != null) {
226
+ company_officer['title_at_company'] = titleAtCompany;
227
+ }
228
+ if (ownershipInCompany != null) {
229
+ company_officer['company_ownership'] = ownershipInCompany;
230
+ }
231
+ if (documentTypeSelectedForVerification != null) {
232
+ company_officer['document_type_for_verification'] =
233
+ documentTypeSelectedForVerification;
234
+ }
226
235
  if (companyOfficerAddressPayload != null) {
227
236
  company_officer['address'] = companyOfficerAddressPayload;
228
237
  }
@@ -7,10 +7,10 @@ export interface CompanyOfficerVerificationPayload {
7
7
  phone: string;
8
8
  sync_token: string;
9
9
  ssn: string;
10
- birthday: string | null;
10
+ birthday: string;
11
11
  nationality_country_code: string;
12
12
  title_at_company: string;
13
- company_ownership: number | null;
13
+ company_ownership: number;
14
14
  document_type_for_verification: string;
15
15
  are_additional_documents_submitted_for_verification: boolean;
16
16
  additional_submitted_documents_for_verification_file_ids: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeniai/client-epic-state",
3
- "version": "4.14.99",
3
+ "version": "4.15.0",
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",