ggez-banking-sdk 0.0.59 → 0.0.61

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.
@@ -76,10 +76,7 @@ declare const Data: () => {
76
76
  user_agent: any;
77
77
  };
78
78
  }[];
79
- custom_field: {
80
- referral_code: string;
81
- type: string;
82
- };
79
+ custom_field: any;
83
80
  geo_coordinates: import("../interfaces").IGeoCoordinates;
84
81
  result: any;
85
82
  addresses: any;
@@ -191,10 +188,7 @@ declare const Data: () => {
191
188
  user_agent: any;
192
189
  };
193
190
  }[];
194
- custom_field: {
195
- referral_code: string;
196
- type: string;
197
- };
191
+ custom_field: any;
198
192
  geo_coordinates: import("../interfaces").IGeoCoordinates;
199
193
  client_time_zone: string;
200
194
  result: any;
@@ -68,6 +68,20 @@ const Data = () => {
68
68
  };
69
69
  const dataSignUpApi = (values) => {
70
70
  const client = new clientjs_1.ClientJS();
71
+ let customField = null;
72
+ if (values.referralCode && values.referralCodeType) {
73
+ customField = {
74
+ ...customField,
75
+ referral_code: values.referralCode,
76
+ type: values.referralCodeType,
77
+ };
78
+ }
79
+ if (values.promotionData) {
80
+ customField = {
81
+ ...customField,
82
+ promotionData: values.promotionData,
83
+ };
84
+ }
71
85
  let data = {
72
86
  ...data_1.userData,
73
87
  info: {
@@ -154,18 +168,27 @@ const Data = () => {
154
168
  },
155
169
  },
156
170
  ],
157
- custom_field: values.referralCode && values.referralCodeType
158
- ? {
159
- referral_code: values.referralCode,
160
- type: values.referralCodeType,
161
- }
162
- : null,
171
+ custom_field: customField,
163
172
  geo_coordinates: values.geoCoordinates,
164
173
  };
165
174
  return data;
166
175
  };
167
176
  const dataSignUpWithGoogle = (values) => {
168
177
  const client = new clientjs_1.ClientJS();
178
+ let customField = null;
179
+ if (values.referralCode && values.referralCodeType) {
180
+ customField = {
181
+ ...customField,
182
+ referral_code: values.referralCode,
183
+ type: values.referralCodeType,
184
+ };
185
+ }
186
+ if (values.promotionData) {
187
+ customField = {
188
+ ...customField,
189
+ promotionData: values.promotionData,
190
+ };
191
+ }
169
192
  let data = {
170
193
  ...data_1.userData,
171
194
  info: {
@@ -258,12 +281,7 @@ const Data = () => {
258
281
  },
259
282
  },
260
283
  ],
261
- custom_field: values.referralCode && values.referralCodeType
262
- ? {
263
- referral_code: values.referralCode,
264
- type: values.referralCodeType,
265
- }
266
- : null,
284
+ custom_field: customField,
267
285
  geo_coordinates: values.geoCoordinates,
268
286
  client_time_zone: `UTC ${dayjs_1.default.tz(new Date()).format("Z")}`,
269
287
  };
@@ -34,3 +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;
39
+ code: string;
40
+ id: number;
41
+ claimedDate: string;
42
+ }
@@ -1,5 +1,6 @@
1
1
  import { Dispatch, SetStateAction } from "react";
2
2
  import { IGeoCoordinates } from "./interface";
3
+ import { PromotionData } from "./promotion";
3
4
  export interface SignUpInterface {
4
5
  firstName: string;
5
6
  lastName: string;
@@ -22,6 +23,7 @@ export interface SignUpInterface {
22
23
  geoCoordinates?: IGeoCoordinates | null;
23
24
  mobileNumberCountry: string;
24
25
  preferredLanguageCode: string;
26
+ promotionData?: PromotionData;
25
27
  }
26
28
  export interface LoginRequestInterface {
27
29
  email: string;
@@ -59,6 +61,7 @@ export interface SignUpWithGoogleInterface {
59
61
  geoCoordinates?: IGeoCoordinates | null;
60
62
  mobileNumberCountry: string;
61
63
  preferredLanguageCode: string;
64
+ promotionData?: PromotionData;
62
65
  }
63
66
  export interface LoginWithGoogleInterface {
64
67
  token: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.0.59",
3
+ "version": "0.0.61",
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",