@riocrypto/common 1.0.1267 → 1.0.1269

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.
@@ -1,3 +1,8 @@
1
+ import { UBO } from "../types/UBO";
2
+ import { CountryOfOrigin } from "../types/country-of-origin";
1
3
  import { OnboardingStatus } from "../types/onboarding-status";
2
4
  import { User } from "../types/user";
3
- export declare const getHighestOnboardingStatus: (user: User) => OnboardingStatus;
5
+ export declare const getHighestOnboardingStatus: (user: User | UBO) => {
6
+ status: OnboardingStatus;
7
+ country?: CountryOfOrigin | undefined;
8
+ };
@@ -5,15 +5,17 @@ const onboarding_status_1 = require("../types/onboarding-status");
5
5
  const getHighestOnboardingStatus = (user) => {
6
6
  var _a, _b;
7
7
  let status = onboarding_status_1.OnboardingStatus.None;
8
+ let statusCountry = undefined;
8
9
  if (user.onboarding) {
9
10
  for (const country of Object.keys(user.onboarding)) {
10
11
  if (((_a = user.onboarding[country]) === null || _a === void 0 ? void 0 : _a.status) &&
11
12
  ((_b = user.onboarding[country]) === null || _b === void 0 ? void 0 : _b.status) !==
12
13
  onboarding_status_1.OnboardingStatus.None) {
13
14
  status = user.onboarding[country].status;
15
+ statusCountry = country;
14
16
  }
15
17
  }
16
18
  }
17
- return status;
19
+ return { status, country: statusCountry };
18
20
  };
19
21
  exports.getHighestOnboardingStatus = getHighestOnboardingStatus;
@@ -35,6 +35,14 @@ export declare type UBO = {
35
35
  personalIdentificationCertificate?: string;
36
36
  extraFiles?: string[];
37
37
  };
38
+ address?: {
39
+ street1?: string;
40
+ street2?: string;
41
+ city?: string;
42
+ state?: string;
43
+ postalCode?: string;
44
+ country: CountryOfOrigin;
45
+ };
38
46
  };
39
47
  };
40
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1267",
3
+ "version": "1.0.1269",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",