ggez-banking-sdk 0.1.196 → 0.2.4

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.
@@ -19,6 +19,7 @@ const FillCreateBankAccountData = (data) => {
19
19
  verification_status: EntityVerificationStatus.Not_Verified,
20
20
  bank_address: data.bankAddress,
21
21
  state_region: data.stateRegion || "",
22
+ notes: data.notes || "",
22
23
  };
23
24
  const userData = UserHelper.FillUserData("bank_account", [bankAccount]);
24
25
  return userData;
@@ -43,6 +44,7 @@ const FillUpdateBankAccountData = (data) => {
43
44
  verification_status: EntityVerificationStatus.Not_Verified,
44
45
  bank_address: data.bankAddress,
45
46
  state_region: data.stateRegion || "",
47
+ notes: data.notes || "",
46
48
  };
47
49
  const userData = UserHelper.FillUserData("bank_account", [bankAccount]);
48
50
  return userData;
@@ -1,4 +1,5 @@
1
1
  import { UAParser } from "ua-parser-js";
2
+ import { get as getDomain } from "psl";
2
3
  class ClientHelper {
3
4
  clientBrowserData;
4
5
  constructor() {
@@ -24,8 +25,10 @@ class ClientHelper {
24
25
  return window.navigator.language;
25
26
  }
26
27
  getDomain() {
27
- if (!this.isHostOnly())
28
- return "ggez.one";
28
+ if (!this.isHostOnly()) {
29
+ const domain = getDomain(window.location.hostname);
30
+ return domain;
31
+ }
29
32
  return undefined;
30
33
  }
31
34
  isHostOnly() {
@@ -5,7 +5,7 @@ class CookiesHelper {
5
5
  // #region "Properties"
6
6
  key;
7
7
  eventHandlers = new Map();
8
- domain = "";
8
+ domain = undefined;
9
9
  programId = "0";
10
10
  Cookies = window.cookieStore;
11
11
  errorHandler;
@@ -271,7 +271,7 @@ class CookiesHelper {
271
271
  // #endregion
272
272
  // #region "Getters & Setters"
273
273
  async GET(key) {
274
- const cookie = await this.Cookies.get(key);
274
+ const cookie = await this.Cookies.get({ name: key, url: this.domain });
275
275
  return cookie?.value || "";
276
276
  }
277
277
  async SET(key, value, expires) {
@@ -283,6 +283,7 @@ class CookiesHelper {
283
283
  expires: expires || defaultExpireDate,
284
284
  path: "/",
285
285
  sameSite: "lax",
286
+ secure: true,
286
287
  });
287
288
  }
288
289
  async REMOVE(key) {
@@ -17,6 +17,7 @@ interface IBankAccountData {
17
17
  userId: number;
18
18
  bankAddress: string;
19
19
  stateRegion?: string;
20
+ notes?: string;
20
21
  }
21
22
  interface ICreateBankAccountData extends IBankAccountData {
22
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.196",
3
+ "version": "0.2.4",
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",
@@ -46,6 +46,7 @@
46
46
  "dayjs": "^1.11.10",
47
47
  "dotenv": "^16.3.1",
48
48
  "js-cookie": "^3.0.5",
49
+ "psl": "^1.15.0",
49
50
  "qs": "^6.11.2",
50
51
  "ua-parser-js": "^2.0.5",
51
52
  "uuid": "^13.0.0"