ggez-banking-sdk 0.0.61 → 0.0.62

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,3 +1120,7 @@ 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
1126
+ }
@@ -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.PromotionGames = exports.PromotionStatus = void 0;
4
+ exports.GGEZPromotionType = exports.PromotionGames = exports.PromotionStatus = void 0;
5
5
  var RequestStatus;
6
6
  (function (RequestStatus) {
7
7
  RequestStatus[RequestStatus["Undefined"] = 0] = "Undefined";
@@ -1184,3 +1184,8 @@ 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 = {}));
@@ -1,6 +1,6 @@
1
1
  import { AddressType, AuthorizationOperationRequestType, BankAccountTypes, BankBeneficiaryType, CommerceProductSourceType, DeviceType, DocumentType, Entity, EntityStatus, OrderType, TransactionType, ValidateType } from "../constants/enum";
2
2
  import { CreateDeviceInterface, UpdateDeviceInterface, DeleteDeviceInterface, VerifyDeviceInterface, ConfirmDeviceInterface, LogoutDeviceInterface } from "../interfaces/deviceInterface";
3
- import { SignUpInterface, SignUpWithGoogleInterface } from "../interfaces/signInterface";
3
+ import { CustomField, SignUpInterface, SignUpWithGoogleInterface } from "../interfaces/signInterface";
4
4
  import { DoTransactionInterface, GetTransactionInterface } from "../interfaces/accountInterface";
5
5
  import { CreateAddressInterface, DeleteUserAddressInterface, MakeAddressPrimaryInterface, UpdateAddressInterface, CreateUserEmailInterface, DeleteUserEmailInterface, UpdateUserEmailInterface, ConfirmLimitedEmailInterface, MakePrimaryUserEmailInterface, VerifyLimitedEmailInterface, ConfirmLimitedPhoneInterface, CreateUserPhoneInterface, DeleteUserPhoneInterface, MakeUserPhonePrimaryInterface, UpdateUserPhoneInterface, VerifyLimitedPhoneInterface, CreateBankAccountInterFace, UpdateBankAccountInterFace, DeleteBankAccountInterFace, MakeBankAccountPrimaryInterFace, CreateIdentificationInterface, DeleteIdentificationInterface, UpdateIdentificationInterface, UpdatePersonalInfoInterface, UpdateProfilePictureInterface, ChangeUserSecurityCodeInterface, ResetPasswordInterface, ResetSecurityQuestionsInterface, UpdateUserPreferencesInterface, ValidateSecurityCodeInterface, ActivateGoogleAuthInterface, ValidateLimitedPhoneInterface, IsEmailPresentAndValidInterface, IsPhonePresentAndValidInterface, SendOTPPhoneInterface, SendOTPEmailInterface, CreateDocumentInterface, ForgetPasswordConfirmInterface, ForgetPasswordValidateInterface, DeleteGoogleAuthInterface } from "../interfaces/bankingSystemInterface";
6
6
  import { IOrderInterface } from "../interfaces/transactionInterface";
@@ -76,7 +76,7 @@ declare const Data: () => {
76
76
  user_agent: any;
77
77
  };
78
78
  }[];
79
- custom_field: any;
79
+ custom_field: CustomField[];
80
80
  geo_coordinates: import("../interfaces").IGeoCoordinates;
81
81
  result: any;
82
82
  addresses: any;
@@ -188,7 +188,7 @@ declare const Data: () => {
188
188
  user_agent: any;
189
189
  };
190
190
  }[];
191
- custom_field: any;
191
+ custom_field: CustomField[];
192
192
  geo_coordinates: import("../interfaces").IGeoCoordinates;
193
193
  client_time_zone: string;
194
194
  result: any;
@@ -70,17 +70,20 @@ const Data = () => {
70
70
  const client = new clientjs_1.ClientJS();
71
71
  let customField = null;
72
72
  if (values.referralCode && values.referralCodeType) {
73
- customField = {
74
- ...customField,
75
- referral_code: values.referralCode,
76
- type: values.referralCodeType,
77
- };
73
+ customField.push({
74
+ type: enum_1.GGEZPromotionType.referral,
75
+ referral_data: {
76
+ referral_code: values.referralCode,
77
+ type: +values.referralCodeType,
78
+ },
79
+ });
78
80
  }
79
- if (values.promotionData) {
80
- customField = {
81
- ...customField,
82
- promotionData: values.promotionData,
83
- };
81
+ if (values.giftData) {
82
+ customField.push({
83
+ type: enum_1.GGEZPromotionType.gift,
84
+ order_status: enum_1.OrderStatus.Pending,
85
+ gift_data: values.giftData,
86
+ });
84
87
  }
85
88
  let data = {
86
89
  ...data_1.userData,
@@ -177,17 +180,20 @@ const Data = () => {
177
180
  const client = new clientjs_1.ClientJS();
178
181
  let customField = null;
179
182
  if (values.referralCode && values.referralCodeType) {
180
- customField = {
181
- ...customField,
182
- referral_code: values.referralCode,
183
- type: values.referralCodeType,
184
- };
183
+ customField.push({
184
+ type: enum_1.GGEZPromotionType.referral,
185
+ referral_data: {
186
+ referral_code: values.referralCode,
187
+ type: +values.referralCodeType,
188
+ },
189
+ });
185
190
  }
186
- if (values.promotionData) {
187
- customField = {
188
- ...customField,
189
- promotionData: values.promotionData,
190
- };
191
+ if (values.giftData) {
192
+ customField.push({
193
+ type: enum_1.GGEZPromotionType.gift,
194
+ order_status: enum_1.OrderStatus.Pending,
195
+ gift_data: values.giftData,
196
+ });
191
197
  }
192
198
  let data = {
193
199
  ...data_1.userData,
@@ -34,9 +34,9 @@ export type PromotionDetails = {
34
34
  lottery_prizes?: LotteryPrize[];
35
35
  };
36
36
  export type SocialMediaPlatform = "twitter" | "instagram" | "facebook" | "linkedin" | "youtube";
37
- export interface PromotionData {
38
- claimedPrize: Amount;
37
+ export interface GiftData {
38
+ claimed_prize: Amount;
39
39
  code: string;
40
40
  id: number;
41
- claimedDate: string;
41
+ claimed_date: string;
42
42
  }
@@ -1,6 +1,7 @@
1
1
  import { Dispatch, SetStateAction } from "react";
2
2
  import { IGeoCoordinates } from "./interface";
3
- import { PromotionData } from "./promotion";
3
+ import { GiftData } from "./promotion";
4
+ import { GGEZPromotionType, OrderStatus } from "../constants";
4
5
  export interface SignUpInterface {
5
6
  firstName: string;
6
7
  lastName: string;
@@ -23,7 +24,7 @@ export interface SignUpInterface {
23
24
  geoCoordinates?: IGeoCoordinates | null;
24
25
  mobileNumberCountry: string;
25
26
  preferredLanguageCode: string;
26
- promotionData?: PromotionData;
27
+ giftData?: GiftData;
27
28
  }
28
29
  export interface LoginRequestInterface {
29
30
  email: string;
@@ -61,7 +62,7 @@ export interface SignUpWithGoogleInterface {
61
62
  geoCoordinates?: IGeoCoordinates | null;
62
63
  mobileNumberCountry: string;
63
64
  preferredLanguageCode: string;
64
- promotionData?: PromotionData;
65
+ giftData?: GiftData;
65
66
  }
66
67
  export interface LoginWithGoogleInterface {
67
68
  token: string;
@@ -94,3 +95,14 @@ export interface LimitedTokenInterface {
94
95
  installationId: string;
95
96
  geoCoordinates?: IGeoCoordinates | null;
96
97
  }
98
+ export interface CustomField {
99
+ type: GGEZPromotionType;
100
+ order_status?: OrderStatus;
101
+ referral_data?: ReferralData;
102
+ gift_data?: GiftData;
103
+ }
104
+ interface ReferralData {
105
+ referral_code: string;
106
+ type: number;
107
+ }
108
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.0.61",
3
+ "version": "0.0.62",
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",