ggez-banking-sdk 0.1.31 → 0.1.32

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.
@@ -140,10 +140,7 @@ declare const Data: () => {
140
140
  is_primary: number;
141
141
  verification_status: number;
142
142
  }[];
143
- authentication: {
144
- type: number;
145
- code: string;
146
- }[];
143
+ authentication: any[];
147
144
  security: {
148
145
  password: string;
149
146
  security_code: number;
@@ -137,6 +137,10 @@ const Data = () => {
137
137
  },
138
138
  ];
139
139
  }
140
+ let mobileVerificationStatus = 0;
141
+ if (values?.isMobileConfirmed && values.isMobileConfirmed == true) {
142
+ mobileVerificationStatus = 1;
143
+ }
140
144
  let data = {
141
145
  ...data_1.userData,
142
146
  info: {
@@ -170,7 +174,7 @@ const Data = () => {
170
174
  country_code: values.mobileNumberCountry,
171
175
  number: values.mobileNumber,
172
176
  is_primary: 1,
173
- verification_status: 1,
177
+ verification_status: mobileVerificationStatus,
174
178
  },
175
179
  ],
176
180
  authentication: authentication,
@@ -237,6 +241,22 @@ const Data = () => {
237
241
  }
238
242
  customField.promotion_data.gift_data = [values.giftData];
239
243
  }
244
+ let authentication = [];
245
+ if (values.mobileAuthenticationCode) {
246
+ authentication = [
247
+ {
248
+ type: enum_1.SecurityAuthenticationTypes.SMS_Code,
249
+ code: values.mobileAuthenticationCode,
250
+ },
251
+ ];
252
+ }
253
+ else {
254
+ authentication = null;
255
+ }
256
+ let mobileVerificationStatus = 0;
257
+ if (values?.isMobileConfirmed && values.isMobileConfirmed == true) {
258
+ mobileVerificationStatus = 1;
259
+ }
240
260
  let data = {
241
261
  ...data_1.userData,
242
262
  info: {
@@ -270,15 +290,10 @@ const Data = () => {
270
290
  country_code: values.mobileNumberCountry,
271
291
  number: values.mobileNumber,
272
292
  is_primary: 1,
273
- verification_status: 1,
274
- },
275
- ],
276
- authentication: [
277
- {
278
- type: 10,
279
- code: values.mobileAuthenticationCode,
293
+ verification_status: mobileVerificationStatus,
280
294
  },
281
295
  ],
296
+ authentication: authentication,
282
297
  security: {
283
298
  password: values.password,
284
299
  security_code: values.securityCode,
@@ -13,6 +13,7 @@ export interface SignUpInterface {
13
13
  mobileNumber: string;
14
14
  password: string;
15
15
  currency: string;
16
+ isMobileConfirmed?: boolean;
16
17
  mobileAuthenticationCode: string;
17
18
  emailAuthenticationCode: string;
18
19
  installationID: string;
@@ -51,6 +52,7 @@ export interface SignUpWithGoogleInterface {
51
52
  currency: string;
52
53
  loginId: string;
53
54
  token: string;
55
+ isMobileConfirmed?: boolean;
54
56
  mobileAuthenticationCode: string;
55
57
  picture: string;
56
58
  installationID: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
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",