ggez-banking-sdk 0.0.74 → 0.0.76

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.
@@ -1120,7 +1120,6 @@ export declare enum PromotionGames {
1120
1120
  Wheel_Of_Fortune = 1,
1121
1121
  Rock_Paper_Scissors = 2
1122
1122
  }
1123
- export declare enum GGEZPromotionType {
1124
- referral = 1,
1125
- gift = 2
1123
+ export declare enum GGEZGiftType {
1124
+ Wheel_Of_Fortune = 1
1126
1125
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PromotionVisibility = exports.PromotionType = exports.ValidateType = exports.VariantType = exports.CurrencyConversionType = exports.TransactionClassification = exports.WireTransferType = exports.ProgramTypes = exports.UserTrustLevelRange = exports.SourceApp = exports.CommerceProductSourceType = exports.OrderType = exports.PaymentMethodType = exports.ForgetPasswordSecurityTypes = exports.ForgetUserSecurityTypes = exports.ResponseStatusCode = exports.CountryCode = exports.DocumentType = exports.AccountStatus = exports.UserType = exports.BusinessType = exports.OrganizationRequestTypes = exports.SecurityOperationMethod = exports.TransactionInquiryStatus = exports.DeviceType = exports.TransactionType = exports.SettlementTransactionType = exports.AuthorizationOperationRequestType = exports.TransactionRequestStatus = exports.EntityStatus = exports.OperationStatus = exports.BankBeneficiaryType = exports.BankAccountTypes = exports.SecurityQuestion2 = exports.SecurityQuestion1 = exports.TrustLimits = exports.EntityVerificationStatus = exports.DocumentStatus = exports.IdentificationTypes = exports.AddressType = exports.Gender = exports.ChainRequestType = exports.ServiceProvider = exports.SecurityAuthenticationTypes = exports.ActivityType = exports.EntityData = exports.Entity = exports.ErrorLevel = exports.OrderStatus = exports.RequestStatus = void 0;
4
- exports.GGEZPromotionType = exports.PromotionGames = exports.PromotionStatus = void 0;
4
+ exports.GGEZGiftType = exports.PromotionGames = exports.PromotionStatus = void 0;
5
5
  var RequestStatus;
6
6
  (function (RequestStatus) {
7
7
  RequestStatus[RequestStatus["Undefined"] = 0] = "Undefined";
@@ -1184,8 +1184,7 @@ var PromotionGames;
1184
1184
  PromotionGames[PromotionGames["Wheel_Of_Fortune"] = 1] = "Wheel_Of_Fortune";
1185
1185
  PromotionGames[PromotionGames["Rock_Paper_Scissors"] = 2] = "Rock_Paper_Scissors";
1186
1186
  })(PromotionGames || (exports.PromotionGames = PromotionGames = {}));
1187
- var GGEZPromotionType;
1188
- (function (GGEZPromotionType) {
1189
- GGEZPromotionType[GGEZPromotionType["referral"] = 1] = "referral";
1190
- GGEZPromotionType[GGEZPromotionType["gift"] = 2] = "gift";
1191
- })(GGEZPromotionType || (exports.GGEZPromotionType = GGEZPromotionType = {}));
1187
+ var GGEZGiftType;
1188
+ (function (GGEZGiftType) {
1189
+ GGEZGiftType[GGEZGiftType["Wheel_Of_Fortune"] = 1] = "Wheel_Of_Fortune";
1190
+ })(GGEZGiftType || (exports.GGEZGiftType = GGEZGiftType = {}));
@@ -68,22 +68,19 @@ const Data = () => {
68
68
  };
69
69
  const dataSignUpApi = (values) => {
70
70
  const client = new clientjs_1.ClientJS();
71
- let customField = {};
71
+ let customField = { referral_and_gift: {} };
72
72
  if (values.referralCode && values.referralCodeType) {
73
- customField["referral_data"] = {
74
- type: enum_1.GGEZPromotionType.referral,
75
- referral_data: {
76
- referral_code: values.referralCode,
77
- type: +values.referralCodeType,
78
- },
73
+ customField.referral_and_gift["referral_data"] = {
74
+ code: values.referralCode,
75
+ type: +values.referralCodeType,
79
76
  };
80
77
  }
81
78
  if (values.giftData) {
82
- customField["gift_data"] = [
79
+ customField.referral_and_gift["gift_data"] = [
83
80
  {
84
- type: enum_1.GGEZPromotionType.gift,
81
+ type: enum_1.GGEZGiftType.Wheel_Of_Fortune,
85
82
  order_status: enum_1.OrderStatus.Pending,
86
- gift_data: values.giftData,
83
+ ...values.giftData,
87
84
  },
88
85
  ];
89
86
  }
@@ -181,22 +178,19 @@ const Data = () => {
181
178
  };
182
179
  const dataSignUpWithGoogle = (values) => {
183
180
  const client = new clientjs_1.ClientJS();
184
- let customField = {};
181
+ let customField = { referral_and_gift: {} };
185
182
  if (values.referralCode && values.referralCodeType) {
186
- customField["referral_data"] = {
187
- type: enum_1.GGEZPromotionType.referral,
188
- referral_data: {
189
- referral_code: values.referralCode,
190
- type: +values.referralCodeType,
191
- },
183
+ customField.referral_and_gift["referral_data"] = {
184
+ code: values.referralCode,
185
+ type: +values.referralCodeType,
192
186
  };
193
187
  }
194
188
  if (values.giftData) {
195
- customField["gift_data"] = [
189
+ customField.referral_and_gift["gift_data"] = [
196
190
  {
197
- type: enum_1.GGEZPromotionType.gift,
191
+ type: enum_1.GGEZGiftType.Wheel_Of_Fortune,
198
192
  order_status: enum_1.OrderStatus.Pending,
199
- gift_data: values.giftData,
193
+ ...values.giftData,
200
194
  },
201
195
  ];
202
196
  }
@@ -1,4 +1,4 @@
1
- import { PromotionType, PromotionVisibility, PromotionStatus, PromotionGames } from "../constants";
1
+ import { PromotionType, PromotionVisibility, PromotionStatus, PromotionGames, GGEZGiftType, OrderStatus } from "../constants";
2
2
  export type Amount = {
3
3
  amount: number;
4
4
  asset: string;
@@ -34,9 +34,12 @@ export type PromotionDetails = {
34
34
  lottery_prizes?: LotteryPrize[];
35
35
  };
36
36
  export type SocialMediaPlatform = "twitter" | "instagram" | "facebook" | "linkedin" | "youtube";
37
- export interface GiftData {
38
- claimed_prize: Amount;
39
- code: string;
37
+ export interface Gift {
40
38
  id: number;
39
+ code: string;
40
+ type: GGEZGiftType;
41
+ order_status: OrderStatus;
41
42
  claimed_date: string;
43
+ claimed_prize_amount: number;
44
+ claimed_prize_asset: string;
42
45
  }
@@ -1,7 +1,6 @@
1
1
  import { Dispatch, SetStateAction } from "react";
2
2
  import { IGeoCoordinates } from "./interface";
3
- import { GiftData } from "./promotion";
4
- import { GGEZPromotionType, OrderStatus } from "../constants";
3
+ import { Gift } from "./promotion";
5
4
  export interface SignUpInterface {
6
5
  firstName: string;
7
6
  lastName: string;
@@ -24,7 +23,7 @@ export interface SignUpInterface {
24
23
  geoCoordinates?: IGeoCoordinates | null;
25
24
  mobileNumberCountry: string;
26
25
  preferredLanguageCode: string;
27
- giftData?: GiftData;
26
+ giftData?: Gift;
28
27
  }
29
28
  export interface LoginRequestInterface {
30
29
  email: string;
@@ -62,7 +61,7 @@ export interface SignUpWithGoogleInterface {
62
61
  geoCoordinates?: IGeoCoordinates | null;
63
62
  mobileNumberCountry: string;
64
63
  preferredLanguageCode: string;
65
- giftData?: GiftData;
64
+ giftData?: Gift;
66
65
  }
67
66
  export interface LoginWithGoogleInterface {
68
67
  token: string;
@@ -96,13 +95,13 @@ export interface LimitedTokenInterface {
96
95
  geoCoordinates?: IGeoCoordinates | null;
97
96
  }
98
97
  export interface CustomField {
99
- type: GGEZPromotionType;
100
- order_status?: OrderStatus;
98
+ referral_and_gift: ReferralAndGift;
99
+ }
100
+ export interface ReferralAndGift {
101
101
  referral_data?: ReferralData;
102
- gift_data?: GiftData;
102
+ gift_data?: Gift[];
103
103
  }
104
- interface ReferralData {
105
- referral_code: string;
104
+ export interface ReferralData {
105
+ code: string;
106
106
  type: number;
107
107
  }
108
- export {};
@@ -1,7 +1,7 @@
1
1
  import { LoginWithGoogleInterface, SignUpInterface, SignUpWithGoogleInterface, LoginRequestInterface, LoginDeviceCredentialInterface } from "../interfaces/signInterface";
2
2
  import { IGeoCoordinates, UserInfo } from "../interfaces/interface";
3
3
  import { LimitedTokenInterface } from "../interfaces/signInterface";
4
- import { GiftData } from "../interfaces";
4
+ import { Gift } from "../interfaces";
5
5
  export declare const useAuth: (baseUrl: string, nodeUrl: string, userInfo: UserInfo, tokenData: LimitedTokenInterface, programId: string, geoCoordinates?: IGeoCoordinates | null, lang?: string) => {
6
6
  GetUser: (installationId: string, token?: string, userId?: string) => Promise<{
7
7
  response: import("axios").AxiosResponse<any, any>;
@@ -69,7 +69,7 @@ export declare const useAuth: (baseUrl: string, nodeUrl: string, userInfo: UserI
69
69
  message: any;
70
70
  status: string;
71
71
  }>;
72
- incrementPromotionParticipants: (giftData: GiftData) => Promise<{
72
+ incrementPromotionParticipants: (giftData: Gift) => Promise<{
73
73
  response: any;
74
74
  newUser: any;
75
75
  message: any;
@@ -257,7 +257,7 @@ const useAuth = (baseUrl, nodeUrl, userInfo, tokenData, programId, geoCoordinate
257
257
  const incrementPromotionParticipants = async (giftData) => {
258
258
  try {
259
259
  const data = {
260
- giftData: giftData,
260
+ gift_data: giftData,
261
261
  };
262
262
  let headersData = {
263
263
  isUrlEncoded: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
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
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",