ggez-banking-sdk 0.4.13 → 0.4.15

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/dist/api/api.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AccountProxy, AuthProxy, BlockchainProxy, IPAddressAndLocationProxy, LimitedProxy, OrderProxy, OrganizationProxy, ProgramProxy, PromotionProxy, TransactionProxy, UserProxy } from "./proxy";
2
- import type { ClientData, ErrorHandler } from "../types";
2
+ import type { APIConfig, ErrorHandler } from "../types";
3
3
  import type { ClientContextProvider } from "../types/api/context/clientContext";
4
4
  declare class API {
5
5
  readonly context: ClientContextProvider;
@@ -15,7 +15,7 @@ declare class API {
15
15
  readonly transaction: TransactionProxy;
16
16
  readonly user: UserProxy;
17
17
  private readonly cookiesHelper;
18
- constructor(clientData: ClientData, errorHandler: ErrorHandler);
18
+ constructor(config: APIConfig, errorHandler: ErrorHandler);
19
19
  logout(): Promise<void>;
20
20
  }
21
21
  export { API };
package/dist/api/api.js CHANGED
@@ -15,13 +15,13 @@ class API {
15
15
  transaction;
16
16
  user;
17
17
  cookiesHelper;
18
- constructor(clientData, errorHandler) {
19
- this.cookiesHelper = new CookiesHelper(clientData.programId, clientData.domain, errorHandler);
18
+ constructor(config, errorHandler) {
19
+ this.cookiesHelper = new CookiesHelper(config.programId, config.domain, errorHandler);
20
20
  this.context = new DefaultClientContextProvider({
21
- baseUrl: clientData.baseUrl,
22
- nodeUrl: clientData.nodeUrl,
23
- programId: clientData.programId,
24
- lang: clientData.lang,
21
+ baseUrl: config.baseUrl,
22
+ nodeUrl: config.nodeUrl,
23
+ programId: config.programId,
24
+ lang: config.lang,
25
25
  });
26
26
  const proxyData = {
27
27
  context: this.context,
@@ -1,8 +1,8 @@
1
- type ClientData = {
1
+ type APIConfig = {
2
2
  baseUrl: string;
3
3
  nodeUrl: string;
4
4
  programId: string;
5
5
  lang: string;
6
6
  domain: string;
7
7
  };
8
- export type { ClientData };
8
+ export type { APIConfig };
@@ -2,7 +2,7 @@ import { PromotionData, UserAccessControl } from "..";
2
2
  export type * from "./promotionData";
3
3
  export type * from "./userAccessControl";
4
4
  type CustomField = {
5
- promotion_data: PromotionData;
5
+ promotion_data?: PromotionData;
6
6
  user_access_control: UserAccessControl;
7
7
  };
8
8
  export type { CustomField };
@@ -1,7 +1,7 @@
1
1
  import type { ReferralData } from "./referralData";
2
2
  import type { GiftData } from "./giftData";
3
3
  type PromotionData = {
4
- referral_data: ReferralData;
5
- gift_data: GiftData[];
4
+ referral_data?: ReferralData;
5
+ gift_data?: GiftData[];
6
6
  };
7
7
  export type { PromotionData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.4.13",
3
+ "version": "0.4.15",
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",