ggez-banking-sdk 0.1.185 → 0.1.186
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,4 @@
|
|
|
1
|
+
import { getDomain } from "tldts";
|
|
1
2
|
import { UAParser } from "ua-parser-js";
|
|
2
3
|
class ClientHelper {
|
|
3
4
|
clientBrowserData;
|
|
@@ -23,5 +24,9 @@ class ClientHelper {
|
|
|
23
24
|
getSystemLanguage() {
|
|
24
25
|
return window.navigator.language;
|
|
25
26
|
}
|
|
27
|
+
getDomain() {
|
|
28
|
+
const host = window.location.hostname;
|
|
29
|
+
return getDomain(host) || host;
|
|
30
|
+
}
|
|
26
31
|
}
|
|
27
32
|
export { ClientHelper };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { v4 } from "uuid";
|
|
2
2
|
import { CipherHelper } from "../cipherHelper";
|
|
3
|
+
import { ClientHelper } from "../..";
|
|
3
4
|
class CookiesHelper {
|
|
4
5
|
// #region "Properties"
|
|
5
6
|
key;
|
|
@@ -8,6 +9,7 @@ class CookiesHelper {
|
|
|
8
9
|
programId = "0";
|
|
9
10
|
Cookies = window.cookieStore;
|
|
10
11
|
errorHandler;
|
|
12
|
+
clientHelper;
|
|
11
13
|
// #endregion
|
|
12
14
|
// #region "Constructor"
|
|
13
15
|
constructor(programId, errorHandler) {
|
|
@@ -15,7 +17,8 @@ class CookiesHelper {
|
|
|
15
17
|
this.programId = programId;
|
|
16
18
|
this.errorHandler = errorHandler;
|
|
17
19
|
this.Cookies = window.cookieStore;
|
|
18
|
-
this.
|
|
20
|
+
this.clientHelper = new ClientHelper();
|
|
21
|
+
this.domain = this.clientHelper.getDomain();
|
|
19
22
|
}
|
|
20
23
|
// #endregion
|
|
21
24
|
// #region "IID"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ggez-banking-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.186",
|
|
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,6 +47,7 @@
|
|
|
47
47
|
"dotenv": "^16.3.1",
|
|
48
48
|
"js-cookie": "^3.0.5",
|
|
49
49
|
"qs": "^6.11.2",
|
|
50
|
+
"tldts": "^7.0.18",
|
|
50
51
|
"ua-parser-js": "^2.0.5",
|
|
51
52
|
"uuid": "^13.0.0"
|
|
52
53
|
},
|