ggez-banking-sdk 0.0.70 → 0.0.72

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.
@@ -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 { CustomField, SignUpInterface, SignUpWithGoogleInterface } from "../interfaces/signInterface";
3
+ import { 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: Record<string, CustomField>;
79
+ custom_field: any;
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: CustomField[];
191
+ custom_field: any;
192
192
  geo_coordinates: import("../interfaces").IGeoCoordinates;
193
193
  client_time_zone: string;
194
194
  result: any;
@@ -70,7 +70,7 @@ const Data = () => {
70
70
  const client = new clientjs_1.ClientJS();
71
71
  let customField = {};
72
72
  if (values.referralCode && values.referralCodeType) {
73
- customField["referral"] = {
73
+ customField["referral_data"] = {
74
74
  type: enum_1.GGEZPromotionType.referral,
75
75
  referral_data: {
76
76
  referral_code: values.referralCode,
@@ -79,11 +79,13 @@ const Data = () => {
79
79
  };
80
80
  }
81
81
  if (values.giftData) {
82
- customField["gift"] = {
83
- type: enum_1.GGEZPromotionType.gift,
84
- order_status: enum_1.OrderStatus.Pending,
85
- gift_data: values.giftData,
86
- };
82
+ customField["gift_data"] = [
83
+ {
84
+ type: enum_1.GGEZPromotionType.gift,
85
+ order_status: enum_1.OrderStatus.Pending,
86
+ gift_data: values.giftData,
87
+ },
88
+ ];
87
89
  }
88
90
  let data = {
89
91
  ...data_1.userData,
@@ -171,30 +173,32 @@ const Data = () => {
171
173
  },
172
174
  },
173
175
  ],
174
- custom_field: customField,
176
+ custom_field: JSON.parse(JSON.stringify(customField)),
175
177
  geo_coordinates: values.geoCoordinates,
176
178
  };
177
- console.log("dataSignUpApi ~ data:", data);
179
+ console.log("dataSignUpApi ~ custom_field:", data);
178
180
  return data;
179
181
  };
180
182
  const dataSignUpWithGoogle = (values) => {
181
183
  const client = new clientjs_1.ClientJS();
182
- let customField = [];
184
+ let customField = {};
183
185
  if (values.referralCode && values.referralCodeType) {
184
- customField.push({
186
+ customField["referral_data"] = {
185
187
  type: enum_1.GGEZPromotionType.referral,
186
188
  referral_data: {
187
189
  referral_code: values.referralCode,
188
190
  type: +values.referralCodeType,
189
191
  },
190
- });
192
+ };
191
193
  }
192
194
  if (values.giftData) {
193
- customField.push({
194
- type: enum_1.GGEZPromotionType.gift,
195
- order_status: enum_1.OrderStatus.Pending,
196
- gift_data: values.giftData,
197
- });
195
+ customField["gift_data"] = [
196
+ {
197
+ type: enum_1.GGEZPromotionType.gift,
198
+ order_status: enum_1.OrderStatus.Pending,
199
+ gift_data: values.giftData,
200
+ },
201
+ ];
198
202
  }
199
203
  let data = {
200
204
  ...data_1.userData,
@@ -288,7 +292,7 @@ const Data = () => {
288
292
  },
289
293
  },
290
294
  ],
291
- custom_field: customField,
295
+ custom_field: JSON.parse(JSON.stringify(customField)),
292
296
  geo_coordinates: values.geoCoordinates,
293
297
  client_time_zone: `UTC ${dayjs_1.default.tz(new Date()).format("Z")}`,
294
298
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.0.70",
3
+ "version": "0.0.72",
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",