ggez-banking-sdk 0.1.185 → 0.1.187

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.
@@ -7,5 +7,6 @@ declare class ClientHelper {
7
7
  getCPU(): string;
8
8
  getUserAgent(): string;
9
9
  getSystemLanguage(): string;
10
+ getDomain(): "localhost" | "ggez.one";
10
11
  }
11
12
  export { ClientHelper };
@@ -23,5 +23,11 @@ class ClientHelper {
23
23
  getSystemLanguage() {
24
24
  return window.navigator.language;
25
25
  }
26
+ getDomain() {
27
+ const host = window.location.hostname;
28
+ if (host != "localhost")
29
+ return "ggez.one";
30
+ return host;
31
+ }
26
32
  }
27
33
  export { ClientHelper };
@@ -6,6 +6,7 @@ declare class CookiesHelper {
6
6
  private programId;
7
7
  private Cookies;
8
8
  private errorHandler;
9
+ private clientHelper;
9
10
  constructor(programId: string, errorHandler: (error: any) => void);
10
11
  GetIID(): Promise<string>;
11
12
  SetIID(): Promise<string>;
@@ -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.domain = window.location.hostname;
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.185",
3
+ "version": "0.1.187",
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",