ggez-banking-sdk 0.1.55 → 0.1.59
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,269 @@ 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
|
-
|
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
|
-
|
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
|
+
name: "chain/spendable_tab",
|
46
|
+
is_allowed: 1,
|
47
|
+
action: [],
|
48
|
+
},
|
49
|
+
{
|
50
|
+
name: "chain/staked_tab",
|
51
|
+
is_allowed: 1,
|
52
|
+
action: [],
|
53
|
+
},
|
54
|
+
{
|
55
|
+
name: "chain/vested_tab",
|
56
|
+
is_allowed: 1,
|
57
|
+
action: [],
|
58
|
+
},
|
59
|
+
],
|
60
|
+
},
|
61
|
+
{
|
62
|
+
name: "activity",
|
63
|
+
is_allowed: 1,
|
64
|
+
section: [
|
65
|
+
{
|
66
|
+
name: "e_wallet",
|
67
|
+
is_allowed: 1,
|
68
|
+
action: [
|
69
|
+
{ name: "submit", is_allowed: 1 },
|
70
|
+
{ name: "reset", is_allowed: 1 },
|
71
|
+
{ name: "e_wallet", is_allowed: 1 },
|
72
|
+
{ name: "period", is_allowed: 1 },
|
73
|
+
{ name: "transaction_type", is_allowed: 1 },
|
74
|
+
{ name: "status", is_allowed: 1 },
|
75
|
+
],
|
76
|
+
},
|
77
|
+
{
|
78
|
+
name: "chain",
|
79
|
+
is_allowed: 1,
|
80
|
+
action: [
|
81
|
+
{ name: "submit", is_allowed: 1 },
|
82
|
+
{ name: "reset", is_allowed: 1 },
|
83
|
+
{ name: "address", is_allowed: 1 },
|
84
|
+
{ name: "period", is_allowed: 1 },
|
85
|
+
{ name: "asset", is_allowed: 1 },
|
86
|
+
{ name: "transaction_type", is_allowed: 1 },
|
87
|
+
{ name: "status", is_allowed: 1 },
|
88
|
+
],
|
89
|
+
},
|
90
|
+
],
|
91
|
+
},
|
92
|
+
{
|
93
|
+
name: "referral",
|
94
|
+
is_allowed: 1,
|
95
|
+
section: [],
|
96
|
+
},
|
97
|
+
{
|
98
|
+
name: "profile/home",
|
99
|
+
is_allowed: 1,
|
100
|
+
section: [],
|
101
|
+
},
|
102
|
+
{
|
103
|
+
name: "profile/organization",
|
104
|
+
is_allowed: 1,
|
105
|
+
section: [
|
106
|
+
{
|
107
|
+
name: "index",
|
108
|
+
is_allowed: 1,
|
109
|
+
action: [
|
110
|
+
{ name: "create", is_allowed: 1 },
|
111
|
+
{ name: "show", is_allowed: 1 },
|
112
|
+
{ name: "edit", is_allowed: 1 },
|
113
|
+
{ name: "delete", is_allowed: 1 },
|
114
|
+
{ name: "verify", is_allowed: 1 },
|
115
|
+
{ name: "make_primary", is_allowed: 1 },
|
116
|
+
],
|
117
|
+
},
|
118
|
+
],
|
119
|
+
},
|
120
|
+
{
|
121
|
+
name: "profile/identification",
|
122
|
+
is_allowed: 1,
|
123
|
+
section: [
|
124
|
+
{
|
125
|
+
name: "index",
|
126
|
+
is_allowed: 1,
|
127
|
+
action: [
|
128
|
+
{ name: "create", is_allowed: 1 },
|
129
|
+
{ name: "show", is_allowed: 1 },
|
130
|
+
{ name: "edit", is_allowed: 1 },
|
131
|
+
{ name: "delete", is_allowed: 1 },
|
132
|
+
{ name: "verify", is_allowed: 1 },
|
133
|
+
{ name: "make_primary", is_allowed: 1 },
|
134
|
+
],
|
135
|
+
},
|
136
|
+
],
|
137
|
+
},
|
138
|
+
{
|
139
|
+
name: "profile/email",
|
140
|
+
is_allowed: 1,
|
141
|
+
section: [
|
142
|
+
{
|
143
|
+
name: "index",
|
144
|
+
is_allowed: 1,
|
145
|
+
action: [
|
146
|
+
{ name: "create", is_allowed: 1 },
|
147
|
+
{ name: "show", is_allowed: 1 },
|
148
|
+
{ name: "edit", is_allowed: 1 },
|
149
|
+
{ name: "delete", is_allowed: 1 },
|
150
|
+
{ name: "verify", is_allowed: 1 },
|
151
|
+
{ name: "make_primary", is_allowed: 1 },
|
152
|
+
],
|
153
|
+
},
|
154
|
+
],
|
155
|
+
},
|
156
|
+
{
|
157
|
+
name: "profile/phone",
|
158
|
+
is_allowed: 1,
|
159
|
+
section: [
|
160
|
+
{
|
161
|
+
name: "index",
|
162
|
+
is_allowed: 1,
|
163
|
+
action: [
|
164
|
+
{ name: "create", is_allowed: 1 },
|
165
|
+
{ name: "show", is_allowed: 1 },
|
166
|
+
{ name: "edit", is_allowed: 1 },
|
167
|
+
{ name: "delete", is_allowed: 1 },
|
168
|
+
{ name: "verify", is_allowed: 1 },
|
169
|
+
{ name: "make_primary", is_allowed: 1 },
|
170
|
+
],
|
171
|
+
},
|
172
|
+
],
|
173
|
+
},
|
174
|
+
{
|
175
|
+
name: "profile/address",
|
176
|
+
is_allowed: 1,
|
177
|
+
section: [
|
178
|
+
{
|
179
|
+
name: "index",
|
180
|
+
is_allowed: 1,
|
181
|
+
action: [
|
182
|
+
{ name: "create", is_allowed: 1 },
|
183
|
+
{ name: "show", is_allowed: 1 },
|
184
|
+
{ name: "edit", is_allowed: 1 },
|
185
|
+
{ name: "delete", is_allowed: 1 },
|
186
|
+
{ name: "verify", is_allowed: 1 },
|
187
|
+
{ name: "make_primary", is_allowed: 1 },
|
188
|
+
],
|
189
|
+
},
|
190
|
+
],
|
191
|
+
},
|
192
|
+
{
|
193
|
+
name: "profile/bank",
|
194
|
+
is_allowed: 1,
|
195
|
+
section: [
|
196
|
+
{
|
197
|
+
name: "index",
|
198
|
+
is_allowed: 1,
|
199
|
+
action: [
|
200
|
+
{ name: "create", is_allowed: 1 },
|
201
|
+
{ name: "show", is_allowed: 1 },
|
202
|
+
{ name: "edit", is_allowed: 1 },
|
203
|
+
{ name: "delete", is_allowed: 1 },
|
204
|
+
{ name: "verify", is_allowed: 1 },
|
205
|
+
{ name: "make_primary", is_allowed: 1 },
|
206
|
+
],
|
207
|
+
},
|
208
|
+
],
|
209
|
+
},
|
210
|
+
{
|
211
|
+
name: "profile/preferences",
|
212
|
+
is_allowed: 1,
|
213
|
+
section: [
|
214
|
+
{
|
215
|
+
name: "index",
|
216
|
+
is_allowed: 1,
|
217
|
+
action: [{ name: "edit", is_allowed: 1 }],
|
218
|
+
},
|
219
|
+
],
|
220
|
+
},
|
221
|
+
{
|
222
|
+
name: "profile/security",
|
223
|
+
is_allowed: 1,
|
224
|
+
section: [
|
225
|
+
{
|
226
|
+
name: "index",
|
227
|
+
is_allowed: 1,
|
228
|
+
action: [
|
229
|
+
{ name: "password", is_allowed: 1 },
|
230
|
+
{ name: "security_code", is_allowed: 1 },
|
231
|
+
{ name: "security_questions", is_allowed: 1 },
|
232
|
+
{ name: "authenticator_app", is_allowed: 1 },
|
233
|
+
],
|
234
|
+
},
|
235
|
+
],
|
236
|
+
},
|
237
|
+
{
|
238
|
+
name: "profile/device",
|
239
|
+
is_allowed: 1,
|
240
|
+
section: [
|
241
|
+
{
|
242
|
+
name: "index",
|
243
|
+
is_allowed: 1,
|
244
|
+
action: [
|
245
|
+
{ name: "trust", is_allowed: 1 },
|
246
|
+
{ name: "untrust", is_allowed: 1 },
|
247
|
+
{ name: "logout_all", is_allowed: 1 },
|
248
|
+
{ name: "logout", is_allowed: 1 },
|
249
|
+
{ name: "delete", is_allowed: 1 },
|
250
|
+
],
|
251
|
+
},
|
252
|
+
],
|
253
|
+
},
|
254
|
+
{
|
255
|
+
name: "profile/account_activity",
|
256
|
+
is_allowed: 1,
|
257
|
+
section: [
|
258
|
+
{
|
259
|
+
name: "login_history",
|
260
|
+
is_allowed: 1,
|
261
|
+
action: [],
|
262
|
+
},
|
263
|
+
{
|
264
|
+
name: "security_operations",
|
265
|
+
is_allowed: 1,
|
266
|
+
action: [],
|
267
|
+
},
|
268
|
+
],
|
40
269
|
},
|
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
270
|
],
|
114
271
|
};
|
@@ -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.
|
148
|
-
|
149
|
-
e.
|
150
|
-
|
151
|
-
|
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.
|
285
|
-
|
286
|
-
e.
|
287
|
-
|
288
|
-
|
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.
|
3
|
+
"version": "0.1.59",
|
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",
|