ggez-banking-sdk 0.1.52 → 0.1.55

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,16 +1,2 @@
1
- export declare const user_access_control_list: {
2
- resource: {
3
- name: string;
4
- is_allowed: boolean;
5
- }[];
6
- section: {
7
- resource: string;
8
- name: string;
9
- is_allowed: boolean;
10
- }[];
11
- action: {
12
- resource: string;
13
- name: string;
14
- is_allowed: boolean;
15
- }[];
16
- };
1
+ import { IUserAccessControl } from "../interfaces";
2
+ export declare const user_access_control: IUserAccessControl;
@@ -1,114 +1,114 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.user_access_control_list = void 0;
4
- exports.user_access_control_list = {
5
- resource: [
6
- { name: "home", is_allowed: true },
7
- { name: "profile", is_allowed: true },
8
- { name: "account", is_allowed: true },
9
- { name: "activity", is_allowed: true },
10
- { name: "referral", is_allowed: true },
11
- { name: "profile/home", is_allowed: true },
12
- { name: "profile/organization", is_allowed: true },
13
- { name: "profile/identification", is_allowed: true },
14
- { name: "profile/email", is_allowed: true },
15
- { name: "profile/phone", is_allowed: true },
16
- { name: "profile/address", is_allowed: true },
17
- { name: "profile/bank", is_allowed: true },
18
- { name: "profile/preferences", is_allowed: true },
19
- { name: "profile/security", is_allowed: true },
20
- { name: "profile/device", is_allowed: true },
21
- { name: "profile/account_activity", is_allowed: true },
3
+ exports.user_access_control = void 0;
4
+ exports.user_access_control = {
5
+ page: [
6
+ { name: "home", is_allowed: 1 },
7
+ { name: "profile", is_allowed: 1 },
8
+ { name: "account", is_allowed: 1 },
9
+ { name: "activity", is_allowed: 1 },
10
+ { name: "referral", is_allowed: 1 },
11
+ { name: "profile/home", is_allowed: 1 },
12
+ { name: "profile/organization", is_allowed: 1 },
13
+ { name: "profile/identification", is_allowed: 1 },
14
+ { name: "profile/email", is_allowed: 1 },
15
+ { name: "profile/phone", is_allowed: 1 },
16
+ { name: "profile/address", is_allowed: 1 },
17
+ { name: "profile/bank", is_allowed: 1 },
18
+ { name: "profile/preferences", is_allowed: 1 },
19
+ { name: "profile/security", is_allowed: 1 },
20
+ { name: "profile/device", is_allowed: 1 },
21
+ { name: "profile/account_activity", is_allowed: 1 },
22
22
  ],
23
23
  section: [
24
- { resource: "home", name: "accounts", is_allowed: true },
25
- { resource: "home", name: "next_step", is_allowed: true },
26
- { resource: "home", name: "increase_security", is_allowed: true },
27
- { resource: "account", name: "e-wallet", is_allowed: true },
28
- { resource: "account", name: "chain", is_allowed: true },
29
- { resource: "activity", name: "e-wallet", is_allowed: true },
30
- { resource: "activity", name: "chain", is_allowed: true },
24
+ { page: "home", name: "accounts", is_allowed: 1 },
25
+ { page: "home", name: "next_step", is_allowed: 1 },
26
+ { page: "home", name: "increase_security", is_allowed: 1 },
27
+ { page: "account", name: "e-wallet", is_allowed: 1 },
28
+ { page: "account", name: "chain", is_allowed: 1 },
29
+ { page: "activity", name: "e-wallet", is_allowed: 1 },
30
+ { page: "activity", name: "chain", is_allowed: 1 },
31
31
  {
32
- resource: "profile/account_activity",
32
+ page: "profile/account_activity",
33
33
  name: "login_history",
34
- is_allowed: true,
34
+ is_allowed: 1,
35
35
  },
36
36
  {
37
- resource: "profile/account_activity",
37
+ page: "profile/account_activity",
38
38
  name: "security_operations",
39
- is_allowed: true,
39
+ is_allowed: 1,
40
40
  },
41
41
  ],
42
42
  action: [
43
- { resource: "account", name: "deposit", is_allowed: true },
44
- { resource: "account", name: "withdraw", is_allowed: true },
45
- { resource: "account", name: "send", is_allowed: false },
46
- { resource: "account", name: "receive", is_allowed: true },
47
- { resource: "account", name: "buy", is_allowed: true },
48
- { resource: "account", name: "sell", is_allowed: true },
49
- { resource: "account", name: "stake", is_allowed: false },
50
- { resource: "account", name: "unstake", is_allowed: false },
51
- { resource: "profile/organization", name: "create", is_allowed: true },
52
- { resource: "profile/organization", name: "show", is_allowed: true },
53
- { resource: "profile/organization", name: "edit", is_allowed: true },
54
- { resource: "profile/organization", name: "delete", is_allowed: true },
55
- { resource: "profile/organization", name: "verify", is_allowed: true },
43
+ { page: "account", name: "deposit", is_allowed: 1 },
44
+ { page: "account", name: "withdraw", is_allowed: 1 },
45
+ { page: "account", name: "send", is_allowed: 0 },
46
+ { page: "account", name: "receive", is_allowed: 1 },
47
+ { page: "account", name: "buy", is_allowed: 1 },
48
+ { page: "account", name: "sell", is_allowed: 1 },
49
+ { page: "account", name: "stake", is_allowed: 0 },
50
+ { page: "account", name: "unstake", is_allowed: 0 },
51
+ { page: "profile/organization", name: "create", is_allowed: 1 },
52
+ { page: "profile/organization", name: "show", is_allowed: 1 },
53
+ { page: "profile/organization", name: "edit", is_allowed: 1 },
54
+ { page: "profile/organization", name: "delete", is_allowed: 1 },
55
+ { page: "profile/organization", name: "verify", is_allowed: 1 },
56
56
  {
57
- resource: "profile/organization",
57
+ page: "profile/organization",
58
58
  name: "make_primary",
59
- is_allowed: true,
59
+ is_allowed: 1,
60
60
  },
61
- { resource: "profile/identification", name: "create", is_allowed: true },
62
- { resource: "profile/identification", name: "show", is_allowed: true },
63
- { resource: "profile/identification", name: "edit", is_allowed: true },
64
- { resource: "profile/identification", name: "delete", is_allowed: true },
65
- { resource: "profile/identification", name: "verify", is_allowed: true },
61
+ { page: "profile/identification", name: "create", is_allowed: 1 },
62
+ { page: "profile/identification", name: "show", is_allowed: 1 },
63
+ { page: "profile/identification", name: "edit", is_allowed: 1 },
64
+ { page: "profile/identification", name: "delete", is_allowed: 1 },
65
+ { page: "profile/identification", name: "verify", is_allowed: 1 },
66
66
  {
67
- resource: "profile/identification",
67
+ page: "profile/identification",
68
68
  name: "make_primary",
69
- is_allowed: true,
69
+ is_allowed: 1,
70
70
  },
71
- { resource: "profile/email", name: "create", is_allowed: true },
72
- { resource: "profile/email", name: "show", is_allowed: true },
73
- { resource: "profile/email", name: "edit", is_allowed: true },
74
- { resource: "profile/email", name: "delete", is_allowed: true },
75
- { resource: "profile/email", name: "verify", is_allowed: true },
76
- { resource: "profile/email", name: "make_primary", is_allowed: true },
77
- { resource: "profile/phone", name: "create", is_allowed: true },
78
- { resource: "profile/phone", name: "show", is_allowed: true },
79
- { resource: "profile/phone", name: "edit", is_allowed: true },
80
- { resource: "profile/phone", name: "delete", is_allowed: true },
81
- { resource: "profile/phone", name: "verify", is_allowed: true },
82
- { resource: "profile/phone", name: "make_primary", is_allowed: true },
83
- { resource: "profile/address", name: "create", is_allowed: true },
84
- { resource: "profile/address", name: "show", is_allowed: true },
85
- { resource: "profile/address", name: "edit", is_allowed: true },
86
- { resource: "profile/address", name: "delete", is_allowed: true },
87
- { resource: "profile/address", name: "verify", is_allowed: true },
88
- { resource: "profile/address", name: "make_primary", is_allowed: true },
89
- { resource: "profile/bank", name: "create", is_allowed: true },
90
- { resource: "profile/bank", name: "show", is_allowed: true },
91
- { resource: "profile/bank", name: "edit", is_allowed: true },
92
- { resource: "profile/bank", name: "delete", is_allowed: true },
93
- { resource: "profile/bank", name: "verify", is_allowed: true },
94
- { resource: "profile/bank", name: "make_primary", is_allowed: true },
95
- { resource: "profile/preferences", name: "edit", is_allowed: true },
96
- { resource: "profile/security", name: "password", is_allowed: true },
97
- { resource: "profile/security", name: "security_code", is_allowed: true },
71
+ { page: "profile/email", name: "create", is_allowed: 1 },
72
+ { page: "profile/email", name: "show", is_allowed: 1 },
73
+ { page: "profile/email", name: "edit", is_allowed: 1 },
74
+ { page: "profile/email", name: "delete", is_allowed: 1 },
75
+ { page: "profile/email", name: "verify", is_allowed: 1 },
76
+ { page: "profile/email", name: "make_primary", is_allowed: 1 },
77
+ { page: "profile/phone", name: "create", is_allowed: 1 },
78
+ { page: "profile/phone", name: "show", is_allowed: 1 },
79
+ { page: "profile/phone", name: "edit", is_allowed: 1 },
80
+ { page: "profile/phone", name: "delete", is_allowed: 1 },
81
+ { page: "profile/phone", name: "verify", is_allowed: 1 },
82
+ { page: "profile/phone", name: "make_primary", is_allowed: 1 },
83
+ { page: "profile/address", name: "create", is_allowed: 1 },
84
+ { page: "profile/address", name: "show", is_allowed: 1 },
85
+ { page: "profile/address", name: "edit", is_allowed: 1 },
86
+ { page: "profile/address", name: "delete", is_allowed: 1 },
87
+ { page: "profile/address", name: "verify", is_allowed: 1 },
88
+ { page: "profile/address", name: "make_primary", is_allowed: 1 },
89
+ { page: "profile/bank", name: "create", is_allowed: 1 },
90
+ { page: "profile/bank", name: "show", is_allowed: 1 },
91
+ { page: "profile/bank", name: "edit", is_allowed: 1 },
92
+ { page: "profile/bank", name: "delete", is_allowed: 1 },
93
+ { page: "profile/bank", name: "verify", is_allowed: 1 },
94
+ { page: "profile/bank", name: "make_primary", is_allowed: 1 },
95
+ { page: "profile/preferences", name: "edit", is_allowed: 1 },
96
+ { page: "profile/security", name: "password", is_allowed: 1 },
97
+ { page: "profile/security", name: "security_code", is_allowed: 1 },
98
98
  {
99
- resource: "profile/security",
99
+ page: "profile/security",
100
100
  name: "security_questions",
101
- is_allowed: true,
101
+ is_allowed: 1,
102
102
  },
103
103
  {
104
- resource: "profile/security",
104
+ page: "profile/security",
105
105
  name: "authenticator_app",
106
- is_allowed: true,
106
+ is_allowed: 1,
107
107
  },
108
- { resource: "profile/device", name: "trust", is_allowed: true },
109
- { resource: "profile/device", name: "untrust", is_allowed: true },
110
- { resource: "profile/device", name: "logout_all", is_allowed: true },
111
- { resource: "profile/device", name: "logout", is_allowed: true },
112
- { resource: "profile/device", name: "delete", is_allowed: true },
108
+ { page: "profile/device", name: "trust", is_allowed: 1 },
109
+ { page: "profile/device", name: "untrust", is_allowed: 1 },
110
+ { page: "profile/device", name: "logout_all", is_allowed: 1 },
111
+ { page: "profile/device", name: "logout", is_allowed: 1 },
112
+ { page: "profile/device", name: "delete", is_allowed: 1 },
113
113
  ],
114
114
  };
@@ -126,7 +126,7 @@ const Data = () => {
126
126
  const dataSignUpApi = (values) => {
127
127
  const client = new clientjs_1.ClientJS();
128
128
  const customField = {
129
- user_access_control: acl_1.user_access_control_list,
129
+ user_access_control: acl_1.user_access_control,
130
130
  };
131
131
  if (values.referralCode && values.referralCodeType) {
132
132
  if (!customField.promotion_data) {
@@ -144,13 +144,12 @@ const Data = () => {
144
144
  customField.promotion_data = {};
145
145
  }
146
146
  customField.promotion_data.gift_data = [values.giftData];
147
- customField.user_access_control.action =
148
- acl_1.user_access_control_list.action.map((e) => {
149
- if (e.name == "send") {
150
- e.is_allowed = true;
151
- }
152
- return e;
153
- });
147
+ customField.user_access_control.action = acl_1.user_access_control.action.map((e) => {
148
+ if (e.name == "send") {
149
+ e.is_allowed = 1;
150
+ }
151
+ return e;
152
+ });
154
153
  }
155
154
  let authentication = [];
156
155
  if (values.mobileAuthenticationCode &&
@@ -264,7 +263,7 @@ const Data = () => {
264
263
  const dataSignUpWithGoogle = (values) => {
265
264
  const client = new clientjs_1.ClientJS();
266
265
  const customField = {
267
- user_access_control: acl_1.user_access_control_list,
266
+ user_access_control: acl_1.user_access_control,
268
267
  };
269
268
  if (values.referralCode && values.referralCodeType) {
270
269
  if (!customField.promotion_data) {
@@ -282,13 +281,12 @@ const Data = () => {
282
281
  customField.promotion_data = {};
283
282
  }
284
283
  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
- });
284
+ customField.user_access_control.action = acl_1.user_access_control.action.map((e) => {
285
+ if (e.name == "send") {
286
+ e.is_allowed = 1;
287
+ }
288
+ return e;
289
+ });
292
290
  }
293
291
  let authentication = [];
294
292
  if (values.mobileAuthenticationCode &&
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const sortUserInfo_1 = require("../utils/sortUserInfo");
7
7
  const generateSourceId_1 = require("../utils/generateSourceId");
8
8
  const restApi_1 = __importDefault(require("../restApi"));
9
- //import { fingerPrintHandler } from "../utils/info";
10
9
  const qs_1 = __importDefault(require("qs"));
11
10
  const enum_1 = require("../constants/enum");
12
11
  const fillDeviceDetails_1 = require("../utils/fillDeviceDetails");
@@ -98,7 +98,7 @@ export interface LimitedTokenInterface {
98
98
  }
99
99
  export interface CustomField {
100
100
  promotion_data?: PromotionData;
101
- user_access_control: AccessControlPolicy;
101
+ user_access_control: IUserAccessControl;
102
102
  }
103
103
  export interface PromotionData {
104
104
  referral_data?: ReferralData;
@@ -108,19 +108,23 @@ export interface ReferralData {
108
108
  code: string;
109
109
  type: number;
110
110
  }
111
- export interface AccessControlPolicy {
112
- resource: {
113
- name: string;
114
- is_allowed: boolean;
115
- }[];
116
- section: {
117
- resource: string;
118
- name: string;
119
- is_allowed: boolean;
120
- }[];
121
- action: {
122
- resource: string;
123
- name: string;
124
- is_allowed: boolean;
125
- }[];
111
+ interface IPage {
112
+ name: string;
113
+ is_allowed: number;
126
114
  }
115
+ interface ISection {
116
+ page: string;
117
+ name: string;
118
+ is_allowed: number;
119
+ }
120
+ interface IAction {
121
+ page: string;
122
+ name: string;
123
+ is_allowed: number;
124
+ }
125
+ export interface IUserAccessControl {
126
+ page: IPage[];
127
+ section: ISection[];
128
+ action: IAction[];
129
+ }
130
+ export {};
@@ -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
  // );
@@ -1 +1 @@
1
- {"root":["../src/index.ts","../src/bank-system/constants/acl.ts","../src/bank-system/constants/constants.ts","../src/bank-system/constants/enum.ts","../src/bank-system/constants/index.ts","../src/bank-system/constants/structure.ts","../src/bank-system/content/accountCurrencies.ts","../src/bank-system/content/countries.ts","../src/bank-system/content/currencies.ts","../src/bank-system/content/index.ts","../src/bank-system/content/state.ts","../src/bank-system/helper/data.tsx","../src/bank-system/helper/dataStructure.tsx","../src/bank-system/helper/index.tsx","../src/bank-system/interfaces/accountInterface.ts","../src/bank-system/interfaces/bankingSystemInterface.ts","../src/bank-system/interfaces/blockchain.ts","../src/bank-system/interfaces/commonInterface.ts","../src/bank-system/interfaces/deviceInterface.ts","../src/bank-system/interfaces/index.ts","../src/bank-system/interfaces/interface.ts","../src/bank-system/interfaces/organizationInterface.ts","../src/bank-system/interfaces/promotion.ts","../src/bank-system/interfaces/signInterface.ts","../src/bank-system/interfaces/transactionInterface.ts","../src/bank-system/restApi/index.tsx","../src/bank-system/services/account.ts","../src/bank-system/services/addresses.ts","../src/bank-system/services/auth.ts","../src/bank-system/services/bankAccount.ts","../src/bank-system/services/blockchain.ts","../src/bank-system/services/device.ts","../src/bank-system/services/document.ts","../src/bank-system/services/email.ts","../src/bank-system/services/history.ts","../src/bank-system/services/identification.ts","../src/bank-system/services/index.ts","../src/bank-system/services/organization.ts","../src/bank-system/services/personalInfo.ts","../src/bank-system/services/phone.ts","../src/bank-system/services/security.ts","../src/bank-system/services/ticket.ts","../src/bank-system/services/token.ts","../src/bank-system/services/transaction.ts","../src/bank-system/services/verifyAndConfirm.ts","../src/bank-system/utils/blockchainHelper.ts","../src/bank-system/utils/chainAddressMasking.ts","../src/bank-system/utils/copyText.ts","../src/bank-system/utils/countryAndCurrencyData.ts","../src/bank-system/utils/enumToOption.ts","../src/bank-system/utils/fillDeviceDetails.ts","../src/bank-system/utils/generateOneLiner.ts","../src/bank-system/utils/generateSourceId.ts","../src/bank-system/utils/getCountryName.ts","../src/bank-system/utils/getEnumName.ts","../src/bank-system/utils/getStateByCountryCode.ts","../src/bank-system/utils/index.ts","../src/bank-system/utils/info.ts","../src/bank-system/utils/maskingFunction.ts","../src/bank-system/utils/regex.ts","../src/bank-system/utils/sortUserInfo.ts","../src/bank-system/utils/handleEncryption/decryptData.tsx","../src/bank-system/utils/handleEncryption/encryptData.tsx","../src/bank-system/utils/handleEncryption/index.ts","../src/bank-system/utils/handleEncryption/key.ts","../src/keplr-config/chainInfo.ts"],"version":"5.8.3"}
1
+ {"root":["../src/index.ts","../src/bank-system/constants/acl.ts","../src/bank-system/constants/constants.ts","../src/bank-system/constants/enum.ts","../src/bank-system/constants/index.ts","../src/bank-system/constants/structure.ts","../src/bank-system/content/accountCurrencies.ts","../src/bank-system/content/countries.ts","../src/bank-system/content/currencies.ts","../src/bank-system/content/index.ts","../src/bank-system/content/state.ts","../src/bank-system/helper/data.ts","../src/bank-system/helper/dataStructure.tsx","../src/bank-system/helper/index.tsx","../src/bank-system/interfaces/accountInterface.ts","../src/bank-system/interfaces/bankingSystemInterface.ts","../src/bank-system/interfaces/blockchain.ts","../src/bank-system/interfaces/commonInterface.ts","../src/bank-system/interfaces/deviceInterface.ts","../src/bank-system/interfaces/index.ts","../src/bank-system/interfaces/interface.ts","../src/bank-system/interfaces/organizationInterface.ts","../src/bank-system/interfaces/promotion.ts","../src/bank-system/interfaces/signInterface.ts","../src/bank-system/interfaces/transactionInterface.ts","../src/bank-system/restApi/index.tsx","../src/bank-system/services/account.ts","../src/bank-system/services/addresses.ts","../src/bank-system/services/auth.ts","../src/bank-system/services/bankAccount.ts","../src/bank-system/services/blockchain.ts","../src/bank-system/services/device.ts","../src/bank-system/services/document.ts","../src/bank-system/services/email.ts","../src/bank-system/services/history.ts","../src/bank-system/services/identification.ts","../src/bank-system/services/index.ts","../src/bank-system/services/organization.ts","../src/bank-system/services/personalInfo.ts","../src/bank-system/services/phone.ts","../src/bank-system/services/security.ts","../src/bank-system/services/ticket.ts","../src/bank-system/services/token.ts","../src/bank-system/services/transaction.ts","../src/bank-system/services/verifyAndConfirm.ts","../src/bank-system/utils/blockchainHelper.ts","../src/bank-system/utils/chainAddressMasking.ts","../src/bank-system/utils/copyText.ts","../src/bank-system/utils/countryAndCurrencyData.ts","../src/bank-system/utils/enumToOption.ts","../src/bank-system/utils/fillDeviceDetails.ts","../src/bank-system/utils/generateOneLiner.ts","../src/bank-system/utils/generateSourceId.ts","../src/bank-system/utils/getCountryName.ts","../src/bank-system/utils/getEnumName.ts","../src/bank-system/utils/getStateByCountryCode.ts","../src/bank-system/utils/index.ts","../src/bank-system/utils/info.ts","../src/bank-system/utils/maskingFunction.ts","../src/bank-system/utils/regex.ts","../src/bank-system/utils/sortUserInfo.ts","../src/bank-system/utils/handleEncryption/decryptData.tsx","../src/bank-system/utils/handleEncryption/encryptData.tsx","../src/bank-system/utils/handleEncryption/index.ts","../src/bank-system/utils/handleEncryption/key.ts","../src/keplr-config/chainInfo.ts"],"version":"5.8.3"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.52",
3
+ "version": "0.1.55",
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",