ggez-banking-sdk 0.1.55 → 0.1.58

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.
@@ -3,112 +3,245 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.user_access_control = void 0;
4
4
  exports.user_access_control = {
5
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
- ],
23
- section: [
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
6
  {
32
- page: "profile/account_activity",
33
- name: "login_history",
7
+ name: "home",
34
8
  is_allowed: 1,
9
+ section: [
10
+ { name: "accounts", is_allowed: 1, action: [] },
11
+ { name: "next_step", is_allowed: 1, action: [] },
12
+ { name: "increase_security", is_allowed: 1, action: [] },
13
+ ],
35
14
  },
36
15
  {
37
- page: "profile/account_activity",
38
- name: "security_operations",
16
+ name: "profile",
39
17
  is_allowed: 1,
18
+ section: [],
19
+ },
20
+ {
21
+ name: "account",
22
+ is_allowed: 1,
23
+ section: [
24
+ {
25
+ name: "e-wallet",
26
+ is_allowed: 1,
27
+ action: [
28
+ { name: "deposit", is_allowed: 1 },
29
+ { name: "withdraw", is_allowed: 1 },
30
+ ],
31
+ },
32
+ {
33
+ name: "chain",
34
+ is_allowed: 1,
35
+ action: [
36
+ { name: "send", is_allowed: 0 },
37
+ { name: "receive", is_allowed: 1 },
38
+ { name: "buy", is_allowed: 1 },
39
+ { name: "sell", is_allowed: 1 },
40
+ { name: "stake", is_allowed: 0 },
41
+ { name: "unstake", is_allowed: 0 },
42
+ ],
43
+ },
44
+ ],
45
+ },
46
+ {
47
+ name: "activity",
48
+ is_allowed: 1,
49
+ section: [
50
+ {
51
+ name: "e-wallet",
52
+ is_allowed: 1,
53
+ action: [
54
+ { name: "submit", is_allowed: 1 },
55
+ { name: "reset", is_allowed: 1 },
56
+ ],
57
+ },
58
+ {
59
+ name: "chain",
60
+ is_allowed: 1,
61
+ action: [
62
+ { name: "submit", is_allowed: 1 },
63
+ { name: "reset", is_allowed: 1 },
64
+ ],
65
+ },
66
+ ],
67
+ },
68
+ {
69
+ name: "referral",
70
+ is_allowed: 1,
71
+ section: [],
72
+ },
73
+ {
74
+ name: "profile/home",
75
+ is_allowed: 1,
76
+ section: [],
77
+ },
78
+ {
79
+ name: "profile/organization",
80
+ is_allowed: 1,
81
+ section: [
82
+ {
83
+ name: "index",
84
+ is_allowed: 1,
85
+ action: [
86
+ { name: "create", is_allowed: 1 },
87
+ { name: "show", is_allowed: 1 },
88
+ { name: "edit", is_allowed: 1 },
89
+ { name: "delete", is_allowed: 1 },
90
+ { name: "verify", is_allowed: 1 },
91
+ { name: "make_primary", is_allowed: 1 },
92
+ ],
93
+ },
94
+ ],
95
+ },
96
+ {
97
+ name: "profile/identification",
98
+ is_allowed: 1,
99
+ section: [
100
+ {
101
+ name: "index",
102
+ is_allowed: 1,
103
+ action: [
104
+ { name: "create", is_allowed: 1 },
105
+ { name: "show", is_allowed: 1 },
106
+ { name: "edit", is_allowed: 1 },
107
+ { name: "delete", is_allowed: 1 },
108
+ { name: "verify", is_allowed: 1 },
109
+ { name: "make_primary", is_allowed: 1 },
110
+ ],
111
+ },
112
+ ],
113
+ },
114
+ {
115
+ name: "profile/email",
116
+ is_allowed: 1,
117
+ section: [
118
+ {
119
+ name: "index",
120
+ is_allowed: 1,
121
+ action: [
122
+ { name: "create", is_allowed: 1 },
123
+ { name: "show", is_allowed: 1 },
124
+ { name: "edit", is_allowed: 1 },
125
+ { name: "delete", is_allowed: 1 },
126
+ { name: "verify", is_allowed: 1 },
127
+ { name: "make_primary", is_allowed: 1 },
128
+ ],
129
+ },
130
+ ],
131
+ },
132
+ {
133
+ name: "profile/phone",
134
+ is_allowed: 1,
135
+ section: [
136
+ {
137
+ name: "index",
138
+ is_allowed: 1,
139
+ action: [
140
+ { name: "create", is_allowed: 1 },
141
+ { name: "show", is_allowed: 1 },
142
+ { name: "edit", is_allowed: 1 },
143
+ { name: "delete", is_allowed: 1 },
144
+ { name: "verify", is_allowed: 1 },
145
+ { name: "make_primary", is_allowed: 1 },
146
+ ],
147
+ },
148
+ ],
149
+ },
150
+ {
151
+ name: "profile/address",
152
+ is_allowed: 1,
153
+ section: [
154
+ {
155
+ name: "index",
156
+ is_allowed: 1,
157
+ action: [
158
+ { name: "create", is_allowed: 1 },
159
+ { name: "show", is_allowed: 1 },
160
+ { name: "edit", is_allowed: 1 },
161
+ { name: "delete", is_allowed: 1 },
162
+ { name: "verify", is_allowed: 1 },
163
+ { name: "make_primary", is_allowed: 1 },
164
+ ],
165
+ },
166
+ ],
167
+ },
168
+ {
169
+ name: "profile/bank",
170
+ is_allowed: 1,
171
+ section: [
172
+ {
173
+ name: "index",
174
+ is_allowed: 1,
175
+ action: [
176
+ { name: "create", is_allowed: 1 },
177
+ { name: "show", is_allowed: 1 },
178
+ { name: "edit", is_allowed: 1 },
179
+ { name: "delete", is_allowed: 1 },
180
+ { name: "verify", is_allowed: 1 },
181
+ { name: "make_primary", is_allowed: 1 },
182
+ ],
183
+ },
184
+ ],
185
+ },
186
+ {
187
+ name: "profile/preferences",
188
+ is_allowed: 1,
189
+ section: [
190
+ {
191
+ name: "index",
192
+ is_allowed: 1,
193
+ action: [{ name: "edit", is_allowed: 1 }],
194
+ },
195
+ ],
196
+ },
197
+ {
198
+ name: "profile/security",
199
+ is_allowed: 1,
200
+ section: [
201
+ {
202
+ name: "index",
203
+ is_allowed: 1,
204
+ action: [
205
+ { name: "password", is_allowed: 1 },
206
+ { name: "security_code", is_allowed: 1 },
207
+ { name: "security_questions", is_allowed: 1 },
208
+ { name: "authenticator_app", is_allowed: 1 },
209
+ ],
210
+ },
211
+ ],
212
+ },
213
+ {
214
+ name: "profile/device",
215
+ is_allowed: 1,
216
+ section: [
217
+ {
218
+ name: "index",
219
+ is_allowed: 1,
220
+ action: [
221
+ { name: "trust", is_allowed: 1 },
222
+ { name: "untrust", is_allowed: 1 },
223
+ { name: "logout_all", is_allowed: 1 },
224
+ { name: "logout", is_allowed: 1 },
225
+ { name: "delete", is_allowed: 1 },
226
+ ],
227
+ },
228
+ ],
229
+ },
230
+ {
231
+ name: "profile/account_activity",
232
+ is_allowed: 1,
233
+ section: [
234
+ {
235
+ name: "login_history",
236
+ is_allowed: 1,
237
+ action: [],
238
+ },
239
+ {
240
+ name: "security_operations",
241
+ is_allowed: 1,
242
+ action: [],
243
+ },
244
+ ],
40
245
  },
41
- ],
42
- action: [
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
- {
57
- page: "profile/organization",
58
- name: "make_primary",
59
- is_allowed: 1,
60
- },
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
- {
67
- page: "profile/identification",
68
- name: "make_primary",
69
- is_allowed: 1,
70
- },
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
- {
99
- page: "profile/security",
100
- name: "security_questions",
101
- is_allowed: 1,
102
- },
103
- {
104
- page: "profile/security",
105
- name: "authenticator_app",
106
- is_allowed: 1,
107
- },
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
246
  ],
114
247
  };
@@ -144,12 +144,24 @@ const Data = () => {
144
144
  customField.promotion_data = {};
145
145
  }
146
146
  customField.promotion_data.gift_data = [values.giftData];
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
- });
147
+ customField.user_access_control.page =
148
+ customField.user_access_control.page.map((e) => {
149
+ if (e.name == "account") {
150
+ const section = e.section.map((e) => {
151
+ if (e.name == "chain") {
152
+ e.action = e.action.map((e) => {
153
+ if (e.name == "send") {
154
+ e.is_allowed = 1;
155
+ }
156
+ return e;
157
+ });
158
+ }
159
+ return e;
160
+ });
161
+ return { ...e, section };
162
+ }
163
+ return e;
164
+ });
153
165
  }
154
166
  let authentication = [];
155
167
  if (values.mobileAuthenticationCode &&
@@ -281,12 +293,24 @@ const Data = () => {
281
293
  customField.promotion_data = {};
282
294
  }
283
295
  customField.promotion_data.gift_data = [values.giftData];
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
- });
296
+ customField.user_access_control.page =
297
+ customField.user_access_control.page.map((e) => {
298
+ if (e.name == "account") {
299
+ const section = e.section.map((e) => {
300
+ if (e.name == "chain") {
301
+ e.action = e.action.map((e) => {
302
+ if (e.name == "send") {
303
+ e.is_allowed = 1;
304
+ }
305
+ return e;
306
+ });
307
+ }
308
+ return e;
309
+ });
310
+ return { ...e, section };
311
+ }
312
+ return e;
313
+ });
290
314
  }
291
315
  let authentication = [];
292
316
  if (values.mobileAuthenticationCode &&
@@ -111,20 +111,18 @@ export interface ReferralData {
111
111
  interface IPage {
112
112
  name: string;
113
113
  is_allowed: number;
114
+ section: ISection[];
114
115
  }
115
116
  interface ISection {
116
- page: string;
117
117
  name: string;
118
118
  is_allowed: number;
119
+ action: IAction[];
119
120
  }
120
121
  interface IAction {
121
- page: string;
122
122
  name: string;
123
123
  is_allowed: number;
124
124
  }
125
125
  export interface IUserAccessControl {
126
126
  page: IPage[];
127
- section: ISection[];
128
- action: IAction[];
129
127
  }
130
128
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ggez-banking-sdk",
3
- "version": "0.1.55",
3
+ "version": "0.1.58",
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",