ggez-banking-sdk
Advanced tools
Comparing version 0.0.75 to 0.0.76
@@ -1123,5 +1123,4 @@ export declare enum RequestStatus { | ||
} | ||
export declare enum GGEZPromotionType { | ||
referral = 1, | ||
gift = 2 | ||
export declare enum GGEZGiftType { | ||
Wheel_Of_Fortune = 1 | ||
} |
@@ -71,18 +71,15 @@ "use strict"; | ||
const client = new clientjs_1.ClientJS(); | ||
let customField = {}; | ||
let customField = { referral_and_gift: {} }; | ||
if (values.referralCode && values.referralCodeType) { | ||
customField["referral_data"] = { | ||
type: enum_1.GGEZPromotionType.referral, | ||
referral_data: { | ||
referral_code: values.referralCode, | ||
type: +values.referralCodeType, | ||
}, | ||
customField.referral_and_gift["referral_data"] = { | ||
code: values.referralCode, | ||
type: +values.referralCodeType, | ||
}; | ||
} | ||
if (values.giftData) { | ||
customField["gift_data"] = [ | ||
customField.referral_and_gift["gift_data"] = [ | ||
{ | ||
type: enum_1.GGEZPromotionType.gift, | ||
type: enum_1.GGEZGiftType.Wheel_Of_Fortune, | ||
order_status: enum_1.OrderStatus.Pending, | ||
gift_data: values.giftData, | ||
...values.giftData, | ||
}, | ||
@@ -185,18 +182,15 @@ ]; | ||
const client = new clientjs_1.ClientJS(); | ||
let customField = {}; | ||
let customField = { referral_and_gift: {} }; | ||
if (values.referralCode && values.referralCodeType) { | ||
customField["referral_data"] = { | ||
type: enum_1.GGEZPromotionType.referral, | ||
referral_data: { | ||
referral_code: values.referralCode, | ||
type: +values.referralCodeType, | ||
}, | ||
customField.referral_and_gift["referral_data"] = { | ||
code: values.referralCode, | ||
type: +values.referralCodeType, | ||
}; | ||
} | ||
if (values.giftData) { | ||
customField["gift_data"] = [ | ||
customField.referral_and_gift["gift_data"] = [ | ||
{ | ||
type: enum_1.GGEZPromotionType.gift, | ||
type: enum_1.GGEZGiftType.Wheel_Of_Fortune, | ||
order_status: enum_1.OrderStatus.Pending, | ||
gift_data: values.giftData, | ||
...values.giftData, | ||
}, | ||
@@ -203,0 +197,0 @@ ]; |
@@ -1,2 +0,2 @@ | ||
import { PromotionType, PromotionVisibility, PromotionStatus, PromotionGames } from "../constants"; | ||
import { PromotionType, PromotionVisibility, PromotionStatus, PromotionGames, GGEZGiftType, OrderStatus } from "../constants"; | ||
export type Amount = { | ||
@@ -37,7 +37,10 @@ amount: number; | ||
export type SocialMediaPlatform = "twitter" | "instagram" | "facebook" | "linkedin" | "youtube"; | ||
export interface GiftData { | ||
claimed_prize: Amount; | ||
export interface Gift { | ||
id: number; | ||
code: string; | ||
id: number; | ||
type: GGEZGiftType; | ||
order_status: OrderStatus; | ||
claimed_date: string; | ||
claimed_prize_amount: number; | ||
claimed_prize_asset: string; | ||
} |
import { Dispatch, SetStateAction } from "react"; | ||
import { IGeoCoordinates } from "./interface"; | ||
import { GiftData } from "./promotion"; | ||
import { GGEZPromotionType, OrderStatus } from "../constants"; | ||
import { Gift } from "./promotion"; | ||
export interface SignUpInterface { | ||
@@ -27,3 +26,3 @@ firstName: string; | ||
preferredLanguageCode: string; | ||
giftData?: GiftData; | ||
giftData?: Gift; | ||
} | ||
@@ -66,3 +65,3 @@ export interface LoginRequestInterface { | ||
preferredLanguageCode: string; | ||
giftData?: GiftData; | ||
giftData?: Gift; | ||
} | ||
@@ -101,11 +100,11 @@ export interface LoginWithGoogleInterface { | ||
export interface CustomField { | ||
type: GGEZPromotionType; | ||
order_status?: OrderStatus; | ||
referral_and_gift: ReferralAndGift; | ||
} | ||
export interface ReferralAndGift { | ||
referral_data?: ReferralData; | ||
gift_data?: GiftData; | ||
gift_data?: Gift[]; | ||
} | ||
interface ReferralData { | ||
referral_code: string; | ||
export interface ReferralData { | ||
code: string; | ||
type: number; | ||
} | ||
export {}; |
import { LoginWithGoogleInterface, SignUpInterface, SignUpWithGoogleInterface, LoginRequestInterface, LoginDeviceCredentialInterface } from "../interfaces/signInterface"; | ||
import { IGeoCoordinates, UserInfo } from "../interfaces/interface"; | ||
import { LimitedTokenInterface } from "../interfaces/signInterface"; | ||
import { GiftData } from "../interfaces"; | ||
import { Gift } from "../interfaces"; | ||
export declare const useAuth: (baseUrl: string, nodeUrl: string, userInfo: UserInfo, tokenData: LimitedTokenInterface, programId: string, geoCoordinates?: IGeoCoordinates | null, lang?: string) => { | ||
@@ -72,3 +72,3 @@ GetUser: (installationId: string, token?: string, userId?: string) => Promise<{ | ||
}>; | ||
incrementPromotionParticipants: (giftData: GiftData) => Promise<{ | ||
incrementPromotionParticipants: (giftData: Gift) => Promise<{ | ||
response: any; | ||
@@ -75,0 +75,0 @@ newUser: any; |
{ | ||
"name": "ggez-banking-sdk", | ||
"version": "0.0.75", | ||
"version": "0.0.76", | ||
"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,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
779366
25651