@riocrypto/common 1.0.1209 → 1.0.1212
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/build/helpers/get-user-name.js +7 -7
- package/build/types/user.d.ts +26 -17
- package/package.json +1 -1
|
@@ -4,16 +4,16 @@ exports.getUserName = void 0;
|
|
|
4
4
|
const user_type_1 = require("../types/user-type");
|
|
5
5
|
const getUserName = (user) => {
|
|
6
6
|
if (user.type === user_type_1.UserType.Business) {
|
|
7
|
-
return user.
|
|
7
|
+
return user.businessData.businessName;
|
|
8
8
|
}
|
|
9
9
|
else {
|
|
10
|
-
let name = user.firstName;
|
|
11
|
-
if (user.middleName) {
|
|
12
|
-
name += ` ${user.middleName}`;
|
|
10
|
+
let name = user.individualData.firstName;
|
|
11
|
+
if (user.individualData.middleName) {
|
|
12
|
+
name += ` ${user.individualData.middleName}`;
|
|
13
13
|
}
|
|
14
|
-
name += ` ${user.lastName}`;
|
|
15
|
-
if (user.secondLastName) {
|
|
16
|
-
name += ` ${user.secondLastName}`;
|
|
14
|
+
name += ` ${user.individualData.lastName}`;
|
|
15
|
+
if (user.individualData.secondLastName) {
|
|
16
|
+
name += ` ${user.individualData.secondLastName}`;
|
|
17
17
|
}
|
|
18
18
|
return name;
|
|
19
19
|
}
|
package/build/types/user.d.ts
CHANGED
|
@@ -4,33 +4,42 @@ import { KYCStatus } from "./kyc-status";
|
|
|
4
4
|
import { PlatformFeeRange } from "./platform-fee-range";
|
|
5
5
|
import { UserAttribute } from "./user-attribute";
|
|
6
6
|
import { UserType } from "./user-type";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
companyLegalRepresentative: {
|
|
17
|
-
name: string;
|
|
18
|
-
id?: string;
|
|
7
|
+
declare type IndividualUser = {
|
|
8
|
+
id: string;
|
|
9
|
+
individualData: {
|
|
10
|
+
firstName: string;
|
|
11
|
+
middleName?: string;
|
|
12
|
+
lastName: string;
|
|
13
|
+
secondLastName?: string;
|
|
14
|
+
birthday: Date;
|
|
15
|
+
countryOfOrigin: CountryOfOrigin;
|
|
19
16
|
};
|
|
20
|
-
}
|
|
17
|
+
};
|
|
18
|
+
declare type BusinessUser = {
|
|
19
|
+
businessData: {
|
|
20
|
+
businessName: string;
|
|
21
|
+
legalRepresentative?: {
|
|
22
|
+
name: string;
|
|
23
|
+
status?: string;
|
|
24
|
+
};
|
|
25
|
+
UBO?: {
|
|
26
|
+
name: string;
|
|
27
|
+
id?: string;
|
|
28
|
+
status?: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
21
32
|
export declare type User = {
|
|
22
33
|
createdAt: Date;
|
|
23
34
|
authIds?: string[];
|
|
35
|
+
brokerId?: string;
|
|
24
36
|
type: UserType;
|
|
25
37
|
phoneNumber: string;
|
|
26
38
|
email: string;
|
|
27
39
|
risk: RiskTier;
|
|
28
40
|
hasPassedEDD: boolean;
|
|
29
41
|
cosignerGroupId?: string;
|
|
30
|
-
companyName?: string;
|
|
31
|
-
birthday?: Date;
|
|
32
42
|
attributes?: UserAttribute[];
|
|
33
|
-
brokerId?: string;
|
|
34
43
|
authorizedPhoneNumbers?: string[];
|
|
35
44
|
platformFeeRanges?: {
|
|
36
45
|
MX?: {
|
|
@@ -108,7 +117,7 @@ export declare type User = {
|
|
|
108
117
|
};
|
|
109
118
|
invoicing?: {
|
|
110
119
|
MX: {
|
|
111
|
-
shouldInvoice
|
|
120
|
+
shouldInvoice?: boolean;
|
|
112
121
|
fiscalName?: string;
|
|
113
122
|
fiscalRegimenCode?: number;
|
|
114
123
|
};
|