ggez-banking-sdk 0.1.61 → 0.1.62
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.
@@ -12,7 +12,6 @@ const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
|
|
12
12
|
const utils_1 = require("../utils");
|
13
13
|
const structure_1 = require("../constants/structure");
|
14
14
|
const constants_1 = require("../constants");
|
15
|
-
const acl_1 = require("../constants/acl");
|
16
15
|
dayjs_1.default.extend(utc_1.default);
|
17
16
|
dayjs_1.default.extend(timezone_1.default);
|
18
17
|
const Data = () => {
|
@@ -125,9 +124,7 @@ const Data = () => {
|
|
125
124
|
};
|
126
125
|
const dataSignUpApi = (values) => {
|
127
126
|
const client = new clientjs_1.ClientJS();
|
128
|
-
const customField = {
|
129
|
-
user_access_control: acl_1.user_access_control,
|
130
|
-
};
|
127
|
+
const customField = {};
|
131
128
|
if (values.referralCode && values.referralCodeType) {
|
132
129
|
if (!customField.promotion_data) {
|
133
130
|
customField.promotion_data = {};
|
@@ -144,24 +141,6 @@ const Data = () => {
|
|
144
141
|
customField.promotion_data = {};
|
145
142
|
}
|
146
143
|
customField.promotion_data.gift_data = [values.giftData];
|
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
|
-
});
|
165
144
|
}
|
166
145
|
let authentication = [];
|
167
146
|
if (values.mobileAuthenticationCode &&
|
@@ -274,9 +253,7 @@ const Data = () => {
|
|
274
253
|
};
|
275
254
|
const dataSignUpWithGoogle = (values) => {
|
276
255
|
const client = new clientjs_1.ClientJS();
|
277
|
-
const customField = {
|
278
|
-
user_access_control: acl_1.user_access_control,
|
279
|
-
};
|
256
|
+
const customField = {};
|
280
257
|
if (values.referralCode && values.referralCodeType) {
|
281
258
|
if (!customField.promotion_data) {
|
282
259
|
customField.promotion_data = {};
|
@@ -293,24 +270,6 @@ const Data = () => {
|
|
293
270
|
customField.promotion_data = {};
|
294
271
|
}
|
295
272
|
customField.promotion_data.gift_data = [values.giftData];
|
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
|
-
});
|
314
273
|
}
|
315
274
|
let authentication = [];
|
316
275
|
if (values.mobileAuthenticationCode &&
|
@@ -98,7 +98,7 @@ export interface LimitedTokenInterface {
|
|
98
98
|
}
|
99
99
|
export interface CustomField {
|
100
100
|
promotion_data?: PromotionData;
|
101
|
-
user_access_control
|
101
|
+
user_access_control?: IUserAccessControl;
|
102
102
|
}
|
103
103
|
export interface PromotionData {
|
104
104
|
referral_data?: ReferralData;
|
@@ -1 +1 @@
|
|
1
|
-
{"root":["../src/index.ts","../src/bank-system/constants/
|
1
|
+
{"root":["../src/index.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.
|
3
|
+
"version": "0.1.62",
|
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",
|
@@ -1,294 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.user_access_control = void 0;
|
4
|
-
exports.user_access_control = {
|
5
|
-
page: [
|
6
|
-
{
|
7
|
-
name: "home",
|
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
|
-
],
|
14
|
-
},
|
15
|
-
{
|
16
|
-
name: "profile",
|
17
|
-
is_allowed: 1,
|
18
|
-
section: [],
|
19
|
-
},
|
20
|
-
{
|
21
|
-
name: "account",
|
22
|
-
is_allowed: 1,
|
23
|
-
section: [
|
24
|
-
{
|
25
|
-
name: "ewallet",
|
26
|
-
is_allowed: 1,
|
27
|
-
action: [
|
28
|
-
{ name: "deposit", is_allowed: 1 },
|
29
|
-
{ name: "withdraw", is_allowed: 1 },
|
30
|
-
],
|
31
|
-
},
|
32
|
-
{
|
33
|
-
name: "ewallet/table",
|
34
|
-
is_allowed: 1,
|
35
|
-
action: [],
|
36
|
-
},
|
37
|
-
{
|
38
|
-
name: "chain",
|
39
|
-
is_allowed: 1,
|
40
|
-
action: [
|
41
|
-
{ name: "send", is_allowed: 0 },
|
42
|
-
{ name: "receive", is_allowed: 1 },
|
43
|
-
{ name: "buy", is_allowed: 1 },
|
44
|
-
{ name: "sell", is_allowed: 1 },
|
45
|
-
{ name: "stake", is_allowed: 0 },
|
46
|
-
{ name: "unstake", is_allowed: 0 },
|
47
|
-
],
|
48
|
-
},
|
49
|
-
{
|
50
|
-
name: "chain/address_dropdown",
|
51
|
-
is_allowed: 1,
|
52
|
-
action: [],
|
53
|
-
},
|
54
|
-
{
|
55
|
-
name: "chain/spendable_tab",
|
56
|
-
is_allowed: 1,
|
57
|
-
action: [],
|
58
|
-
},
|
59
|
-
{
|
60
|
-
name: "chain/staked_tab",
|
61
|
-
is_allowed: 1,
|
62
|
-
action: [],
|
63
|
-
},
|
64
|
-
{
|
65
|
-
name: "chain/vested_tab",
|
66
|
-
is_allowed: 1,
|
67
|
-
action: [],
|
68
|
-
},
|
69
|
-
],
|
70
|
-
},
|
71
|
-
{
|
72
|
-
name: "activity",
|
73
|
-
is_allowed: 1,
|
74
|
-
section: [],
|
75
|
-
},
|
76
|
-
{
|
77
|
-
name: "activity/chain",
|
78
|
-
is_allowed: 1,
|
79
|
-
section: [
|
80
|
-
{
|
81
|
-
name: "index",
|
82
|
-
is_allowed: 1,
|
83
|
-
action: [
|
84
|
-
{ name: "submit", is_allowed: 1 },
|
85
|
-
{ name: "reset", is_allowed: 1 },
|
86
|
-
{ name: "expand", is_allowed: 1 },
|
87
|
-
{ name: "address", is_allowed: 1 },
|
88
|
-
{ name: "period", is_allowed: 1 },
|
89
|
-
{ name: "asset", is_allowed: 1 },
|
90
|
-
{ name: "transaction_type", is_allowed: 1 },
|
91
|
-
{ name: "status", is_allowed: 1 },
|
92
|
-
],
|
93
|
-
},
|
94
|
-
],
|
95
|
-
},
|
96
|
-
{
|
97
|
-
name: "activity/ewallet",
|
98
|
-
is_allowed: 1,
|
99
|
-
section: [
|
100
|
-
{
|
101
|
-
name: "index",
|
102
|
-
is_allowed: 1,
|
103
|
-
action: [
|
104
|
-
{ name: "submit", is_allowed: 1 },
|
105
|
-
{ name: "reset", is_allowed: 1 },
|
106
|
-
{ name: "expand", is_allowed: 1 },
|
107
|
-
{ name: "account", is_allowed: 1 },
|
108
|
-
{ name: "period", is_allowed: 1 },
|
109
|
-
{ name: "transaction_type", is_allowed: 1 },
|
110
|
-
{ name: "status", is_allowed: 1 },
|
111
|
-
],
|
112
|
-
},
|
113
|
-
],
|
114
|
-
},
|
115
|
-
{
|
116
|
-
name: "referral",
|
117
|
-
is_allowed: 1,
|
118
|
-
section: [],
|
119
|
-
},
|
120
|
-
{
|
121
|
-
name: "profile/home",
|
122
|
-
is_allowed: 1,
|
123
|
-
section: [],
|
124
|
-
},
|
125
|
-
{
|
126
|
-
name: "profile/organization",
|
127
|
-
is_allowed: 1,
|
128
|
-
section: [
|
129
|
-
{
|
130
|
-
name: "index",
|
131
|
-
is_allowed: 1,
|
132
|
-
action: [
|
133
|
-
{ name: "create", is_allowed: 1 },
|
134
|
-
{ name: "show", is_allowed: 1 },
|
135
|
-
{ name: "edit", is_allowed: 1 },
|
136
|
-
{ name: "delete", is_allowed: 1 },
|
137
|
-
{ name: "verify", is_allowed: 1 },
|
138
|
-
{ name: "make_primary", is_allowed: 1 },
|
139
|
-
],
|
140
|
-
},
|
141
|
-
],
|
142
|
-
},
|
143
|
-
{
|
144
|
-
name: "profile/identification",
|
145
|
-
is_allowed: 1,
|
146
|
-
section: [
|
147
|
-
{
|
148
|
-
name: "index",
|
149
|
-
is_allowed: 1,
|
150
|
-
action: [
|
151
|
-
{ name: "create", is_allowed: 1 },
|
152
|
-
{ name: "show", is_allowed: 1 },
|
153
|
-
{ name: "edit", is_allowed: 1 },
|
154
|
-
{ name: "delete", is_allowed: 1 },
|
155
|
-
{ name: "verify", is_allowed: 1 },
|
156
|
-
{ name: "make_primary", is_allowed: 1 },
|
157
|
-
],
|
158
|
-
},
|
159
|
-
],
|
160
|
-
},
|
161
|
-
{
|
162
|
-
name: "profile/email",
|
163
|
-
is_allowed: 1,
|
164
|
-
section: [
|
165
|
-
{
|
166
|
-
name: "index",
|
167
|
-
is_allowed: 1,
|
168
|
-
action: [
|
169
|
-
{ name: "create", is_allowed: 1 },
|
170
|
-
{ name: "show", is_allowed: 1 },
|
171
|
-
{ name: "edit", is_allowed: 1 },
|
172
|
-
{ name: "delete", is_allowed: 1 },
|
173
|
-
{ name: "verify", is_allowed: 1 },
|
174
|
-
{ name: "make_primary", is_allowed: 1 },
|
175
|
-
],
|
176
|
-
},
|
177
|
-
],
|
178
|
-
},
|
179
|
-
{
|
180
|
-
name: "profile/phone",
|
181
|
-
is_allowed: 1,
|
182
|
-
section: [
|
183
|
-
{
|
184
|
-
name: "index",
|
185
|
-
is_allowed: 1,
|
186
|
-
action: [
|
187
|
-
{ name: "create", is_allowed: 1 },
|
188
|
-
{ name: "show", is_allowed: 1 },
|
189
|
-
{ name: "edit", is_allowed: 1 },
|
190
|
-
{ name: "delete", is_allowed: 1 },
|
191
|
-
{ name: "verify", is_allowed: 1 },
|
192
|
-
{ name: "make_primary", is_allowed: 1 },
|
193
|
-
],
|
194
|
-
},
|
195
|
-
],
|
196
|
-
},
|
197
|
-
{
|
198
|
-
name: "profile/address",
|
199
|
-
is_allowed: 1,
|
200
|
-
section: [
|
201
|
-
{
|
202
|
-
name: "index",
|
203
|
-
is_allowed: 1,
|
204
|
-
action: [
|
205
|
-
{ name: "create", is_allowed: 1 },
|
206
|
-
{ name: "show", is_allowed: 1 },
|
207
|
-
{ name: "edit", is_allowed: 1 },
|
208
|
-
{ name: "delete", is_allowed: 1 },
|
209
|
-
{ name: "verify", is_allowed: 1 },
|
210
|
-
{ name: "make_primary", is_allowed: 1 },
|
211
|
-
],
|
212
|
-
},
|
213
|
-
],
|
214
|
-
},
|
215
|
-
{
|
216
|
-
name: "profile/bank",
|
217
|
-
is_allowed: 1,
|
218
|
-
section: [
|
219
|
-
{
|
220
|
-
name: "index",
|
221
|
-
is_allowed: 1,
|
222
|
-
action: [
|
223
|
-
{ name: "create", is_allowed: 1 },
|
224
|
-
{ name: "show", is_allowed: 1 },
|
225
|
-
{ name: "edit", is_allowed: 1 },
|
226
|
-
{ name: "delete", is_allowed: 1 },
|
227
|
-
{ name: "verify", is_allowed: 1 },
|
228
|
-
{ name: "make_primary", is_allowed: 1 },
|
229
|
-
],
|
230
|
-
},
|
231
|
-
],
|
232
|
-
},
|
233
|
-
{
|
234
|
-
name: "profile/preferences",
|
235
|
-
is_allowed: 1,
|
236
|
-
section: [
|
237
|
-
{
|
238
|
-
name: "index",
|
239
|
-
is_allowed: 1,
|
240
|
-
action: [{ name: "edit", is_allowed: 1 }],
|
241
|
-
},
|
242
|
-
],
|
243
|
-
},
|
244
|
-
{
|
245
|
-
name: "profile/security",
|
246
|
-
is_allowed: 1,
|
247
|
-
section: [
|
248
|
-
{
|
249
|
-
name: "index",
|
250
|
-
is_allowed: 1,
|
251
|
-
action: [
|
252
|
-
{ name: "password", is_allowed: 1 },
|
253
|
-
{ name: "security_code", is_allowed: 1 },
|
254
|
-
{ name: "security_questions", is_allowed: 1 },
|
255
|
-
{ name: "authenticator_app", is_allowed: 1 },
|
256
|
-
],
|
257
|
-
},
|
258
|
-
],
|
259
|
-
},
|
260
|
-
{
|
261
|
-
name: "profile/device",
|
262
|
-
is_allowed: 1,
|
263
|
-
section: [
|
264
|
-
{
|
265
|
-
name: "index",
|
266
|
-
is_allowed: 1,
|
267
|
-
action: [
|
268
|
-
{ name: "trust", is_allowed: 1 },
|
269
|
-
{ name: "untrust", is_allowed: 1 },
|
270
|
-
{ name: "logout_all", is_allowed: 1 },
|
271
|
-
{ name: "logout", is_allowed: 1 },
|
272
|
-
{ name: "delete", is_allowed: 1 },
|
273
|
-
],
|
274
|
-
},
|
275
|
-
],
|
276
|
-
},
|
277
|
-
{
|
278
|
-
name: "profile/account_activity",
|
279
|
-
is_allowed: 1,
|
280
|
-
section: [
|
281
|
-
{
|
282
|
-
name: "login_history",
|
283
|
-
is_allowed: 1,
|
284
|
-
action: [],
|
285
|
-
},
|
286
|
-
{
|
287
|
-
name: "security_operations",
|
288
|
-
is_allowed: 1,
|
289
|
-
action: [],
|
290
|
-
},
|
291
|
-
],
|
292
|
-
},
|
293
|
-
],
|
294
|
-
};
|