ggez-banking-sdk 0.1.51 → 0.1.53

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.
@@ -24,6 +24,7 @@ exports.user_access_control_list = {
24
24
  { resource: "home", name: "accounts", is_allowed: true },
25
25
  { resource: "home", name: "next_step", is_allowed: true },
26
26
  { resource: "home", name: "increase_security", is_allowed: true },
27
+ { resource: "account", name: "e-wallet", is_allowed: true },
27
28
  { resource: "account", name: "chain", is_allowed: true },
28
29
  { resource: "activity", name: "e-wallet", is_allowed: true },
29
30
  { resource: "activity", name: "chain", is_allowed: true },
@@ -263,21 +263,32 @@ const Data = () => {
263
263
  };
264
264
  const dataSignUpWithGoogle = (values) => {
265
265
  const client = new clientjs_1.ClientJS();
266
- let customField = null;
266
+ const customField = {
267
+ user_access_control: acl_1.user_access_control_list,
268
+ };
267
269
  if (values.referralCode && values.referralCodeType) {
268
- if (!customField) {
269
- customField = { promotion_data: {} };
270
+ if (!customField.promotion_data) {
271
+ customField.promotion_data = {};
270
272
  }
271
- customField.promotion_data.referral_data = {
272
- code: values.referralCode,
273
- type: +values.referralCodeType,
273
+ customField.promotion_data = {
274
+ referral_data: {
275
+ code: values.referralCode,
276
+ type: +values.referralCodeType,
277
+ },
274
278
  };
275
279
  }
276
280
  if (values.giftData) {
277
- if (!customField) {
278
- customField = { promotion_data: {} };
281
+ if (!customField.promotion_data) {
282
+ customField.promotion_data = {};
279
283
  }
280
284
  customField.promotion_data.gift_data = [values.giftData];
285
+ customField.user_access_control.action =
286
+ acl_1.user_access_control_list.action.map((e) => {
287
+ if (e.name == "send") {
288
+ e.is_allowed = true;
289
+ }
290
+ return e;
291
+ });
281
292
  }
282
293
  let authentication = [];
283
294
  if (values.mobileAuthenticationCode &&
@@ -12,8 +12,8 @@ const utc_1 = __importDefault(require("dayjs/plugin/utc"));
12
12
  const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
13
13
  dayjs_1.default.extend(utc_1.default);
14
14
  dayjs_1.default.extend(timezone_1.default);
15
- const client = new clientjs_1.ClientJS();
16
15
  const fillDeviceDetails = () => {
16
+ const client = new clientjs_1.ClientJS();
17
17
  // const { geo_coordinates, ip_address } = await getGeoCoordinatesAndIPAddress(
18
18
  // baseUrl
19
19
  // );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
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",