ggez-banking-sdk 0.1.186 → 0.1.188
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,13 +1,13 @@
|
|
|
1
|
-
import { DeviceType, EntityStatus, EntityVerificationStatus, Gender, DocumentType,
|
|
1
|
+
import { DeviceType, EntityStatus, EntityVerificationStatus, Gender, DocumentType, SecurityAuthenticationTypes, SecurityLoginType, Titles, } from "../../../constants";
|
|
2
2
|
import { ClientHelper, DateTimeHelper, UserHelper } from "../../../helper";
|
|
3
3
|
import { getBase64 } from "../../../utils";
|
|
4
4
|
export { FillCreateUserData, FillCreateUserWithGoogleData };
|
|
5
5
|
const FillCreateUserData = (data) => {
|
|
6
6
|
const clientHelper = new ClientHelper();
|
|
7
7
|
const userData = {
|
|
8
|
-
info: {
|
|
9
|
-
|
|
10
|
-
},
|
|
8
|
+
// info: {
|
|
9
|
+
// type: data.userType,
|
|
10
|
+
// },
|
|
11
11
|
personal_info: {
|
|
12
12
|
title: data.gender == Gender.Male ? Titles.Mr : Titles.Miss,
|
|
13
13
|
first_name: data.firstName,
|
|
@@ -29,22 +29,22 @@ const FillCreateUserData = (data) => {
|
|
|
29
29
|
verification_status: EntityVerificationStatus.Verified,
|
|
30
30
|
},
|
|
31
31
|
],
|
|
32
|
-
phone: [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
],
|
|
32
|
+
// phone: [
|
|
33
|
+
// {
|
|
34
|
+
// id: 0,
|
|
35
|
+
// type: PhoneNumberTypes.Mobile,
|
|
36
|
+
// country_code: data.mobileNumberCountry,
|
|
37
|
+
// number: data.mobileNumber,
|
|
38
|
+
// is_primary: 1,
|
|
39
|
+
// verification_status: data.isMobileConfirmed
|
|
40
|
+
// ? EntityVerificationStatus.Verified
|
|
41
|
+
// : EntityVerificationStatus.Not_Verified,
|
|
42
|
+
// },
|
|
43
|
+
// ],
|
|
44
44
|
authentication: [],
|
|
45
45
|
security: {
|
|
46
46
|
password: data.password,
|
|
47
|
-
security_code: data.securityCode,
|
|
47
|
+
// security_code: data.securityCode,
|
|
48
48
|
},
|
|
49
49
|
preferences: {
|
|
50
50
|
preferred_language_code: data.preferredLanguageCode,
|
|
@@ -87,12 +87,12 @@ const FillCreateUserData = (data) => {
|
|
|
87
87
|
referralCodeType: data.referralCodeType,
|
|
88
88
|
}),
|
|
89
89
|
};
|
|
90
|
-
if (data.isMobileConfirmed && data.mobileAuthenticationCode) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
90
|
+
// if (data.isMobileConfirmed && data.mobileAuthenticationCode) {
|
|
91
|
+
// userData.authentication.push({
|
|
92
|
+
// type: SecurityAuthenticationTypes.SMS_Code,
|
|
93
|
+
// code: data.mobileAuthenticationCode,
|
|
94
|
+
// });
|
|
95
|
+
// }
|
|
96
96
|
if (data.emailAuthenticationCode) {
|
|
97
97
|
userData.authentication.push({
|
|
98
98
|
type: SecurityAuthenticationTypes.Email_Code,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getDomain } from "tldts";
|
|
2
1
|
import { UAParser } from "ua-parser-js";
|
|
3
2
|
class ClientHelper {
|
|
4
3
|
clientBrowserData;
|
|
@@ -26,7 +25,9 @@ class ClientHelper {
|
|
|
26
25
|
}
|
|
27
26
|
getDomain() {
|
|
28
27
|
const host = window.location.hostname;
|
|
29
|
-
|
|
28
|
+
if (host != "localhost")
|
|
29
|
+
return "ggez.one";
|
|
30
|
+
return host;
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
export { ClientHelper };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ggez-banking-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.188",
|
|
4
4
|
"description": "A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"dotenv": "^16.3.1",
|
|
48
48
|
"js-cookie": "^3.0.5",
|
|
49
49
|
"qs": "^6.11.2",
|
|
50
|
-
"tldts": "^7.0.18",
|
|
51
50
|
"ua-parser-js": "^2.0.5",
|
|
52
51
|
"uuid": "^13.0.0"
|
|
53
52
|
},
|