ggez-banking-sdk 0.1.115 → 0.1.117
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.
- package/dist/helper/userHelper.d.ts +3 -13
- package/dist/helper/userHelper.js +2 -336
- package/dist/types/api/data/order.d.ts +1 -1
- package/dist/types/banking/account/accountdata.d.ts +13 -13
- package/dist/types/banking/account/info.d.ts +1 -1
- package/dist/types/banking/account/options/fulfilmentinfo.d.ts +1 -1
- package/dist/types/banking/account/options/options.d.ts +1 -1
- package/dist/types/banking/blockchain/info.d.ts +1 -1
- package/dist/types/banking/common/baseresult.d.ts +2 -2
- package/dist/types/banking/common/currencyclouddata.d.ts +4 -4
- package/dist/types/banking/common/history.d.ts +1 -1
- package/dist/types/banking/entities/address.d.ts +2 -2
- package/dist/types/banking/entities/bankaccount.d.ts +3 -3
- package/dist/types/banking/entities/creditcard.d.ts +2 -2
- package/dist/types/banking/entities/cryptoaddress.d.ts +1 -1
- package/dist/types/banking/entities/customField/promotionData/giftData.d.ts +1 -1
- package/dist/types/banking/entities/device.d.ts +4 -4
- package/dist/types/banking/entities/devicehistory.d.ts +1 -1
- package/dist/types/banking/entities/email.d.ts +2 -2
- package/dist/types/banking/entities/externalauthentication.d.ts +1 -1
- package/dist/types/banking/entities/identification.d.ts +4 -3
- package/dist/types/banking/entities/json/device/deviceextendedinfo.d.ts +2 -2
- package/dist/types/banking/entities/phone.d.ts +2 -2
- package/dist/types/banking/entities/relationship.d.ts +2 -2
- package/dist/types/banking/entities/socialmedia.d.ts +1 -1
- package/dist/types/banking/group/info.d.ts +1 -1
- package/dist/types/banking/oauth/tokenData.d.ts +1 -1
- package/dist/types/banking/order/fulfilment/pinCodeFulfilment.d.ts +1 -1
- package/dist/types/banking/order/info.d.ts +1 -1
- package/dist/types/banking/order/paymentMethod.d.ts +2 -2
- package/dist/types/banking/organization/info.d.ts +1 -1
- package/dist/types/banking/organization/organizationdata.d.ts +9 -9
- package/dist/types/banking/ticket/info.d.ts +1 -1
- package/dist/types/banking/transaction/info.d.ts +3 -3
- package/dist/types/banking/user/confirmUserSecurityInfo.d.ts +2 -2
- package/dist/types/banking/user/documentinfo.d.ts +1 -1
- package/dist/types/banking/user/info.d.ts +1 -1
- package/dist/types/banking/user/personalinfo.d.ts +1 -1
- package/dist/types/banking/user/resetUserSecurityInfo.d.ts +2 -2
- package/dist/types/banking/user/userdata.d.ts +2 -2
- package/dist/types/banking/user/validateSecurityData.d.ts +1 -1
- package/dist/types/banking/user/validateUserSecurityInfo.d.ts +2 -2
- package/dist/types/banking/user/verifyUserSecurityInfo.d.ts +2 -2
- package/dist/types/helper/userHelper.d.ts +3 -3
- package/package.json +1 -1
@@ -1,17 +1,7 @@
|
|
1
|
-
import {
|
2
|
-
declare const OldUserHelper: (userInfo: any) => {
|
3
|
-
checkResponse: () => {
|
4
|
-
checkUserResponseAuth: (response: any, showMessageSuccess: boolean, funcName: string) => any;
|
5
|
-
checkGlobalResponse: (key: string, response: any, funcName: string, keyAction?: string) => {
|
6
|
-
newUserInfo: any;
|
7
|
-
};
|
8
|
-
errorHandler: (error: any, funcName: string, response?: string) => never;
|
9
|
-
};
|
10
|
-
};
|
11
|
-
export declare function sortUserInfo(list?: any[] | null): any;
|
12
|
-
export default OldUserHelper;
|
1
|
+
import { TModifyListByEntity, TModifyByDocumentData, TSortByID, TSortByIsPrimary, TSortByVerificationStatus, TSortEntity } from "..";
|
13
2
|
declare class UserHelper {
|
14
|
-
static
|
3
|
+
static ModifyListByEntity: TModifyListByEntity;
|
4
|
+
static ModifyProfilePicture: () => {};
|
15
5
|
static ModifyByDocumentData: TModifyByDocumentData;
|
16
6
|
static SortEntity: TSortEntity;
|
17
7
|
static SortByIsPrimary: TSortByIsPrimary;
|
@@ -1,342 +1,7 @@
|
|
1
1
|
import { EntityVerificationStatus } from "../constants/enum";
|
2
|
-
import { SystemResponses } from "../constants";
|
3
|
-
const OldUserHelper = (userInfo) => {
|
4
|
-
// error Handler
|
5
|
-
// action type
|
6
|
-
const newUserInfo = () => {
|
7
|
-
const error = null;
|
8
|
-
const addInfo = (key, data) => {
|
9
|
-
if (Array.isArray(userInfo[`${key}`])) {
|
10
|
-
const newData = [...userInfo[`${key}`], data[0]];
|
11
|
-
const newUserInfo = { ...userInfo, [key]: sortUserInfo(newData) };
|
12
|
-
return { newUserInfo: newUserInfo };
|
13
|
-
}
|
14
|
-
else {
|
15
|
-
const newUserInfo = { ...userInfo, [key]: data };
|
16
|
-
return { newUserInfo: newUserInfo };
|
17
|
-
}
|
18
|
-
};
|
19
|
-
const updateInfo = (key, data) => {
|
20
|
-
const updatedData = Array.isArray(userInfo[`${key}`]) &&
|
21
|
-
userInfo[`${key}`].map((el, i) => {
|
22
|
-
if (el.id == data[0].id) {
|
23
|
-
return data[0];
|
24
|
-
}
|
25
|
-
else {
|
26
|
-
return el;
|
27
|
-
}
|
28
|
-
});
|
29
|
-
const newUserInfo = { ...userInfo, [key]: sortUserInfo(updatedData) };
|
30
|
-
return { newUserInfo: newUserInfo };
|
31
|
-
};
|
32
|
-
const removeInfo = (key, data) => {
|
33
|
-
let newUserInfo;
|
34
|
-
if (Array.isArray(userInfo[`${key}`]) && data != null) {
|
35
|
-
const removeData = Array.isArray(userInfo[`${key}`]) &&
|
36
|
-
userInfo[`${key}`].filter((el, i) => {
|
37
|
-
return el.id !== data[0].id;
|
38
|
-
});
|
39
|
-
newUserInfo = { ...userInfo, [key]: sortUserInfo(removeData) };
|
40
|
-
}
|
41
|
-
else if (data == null) {
|
42
|
-
const userInfoObj = { ...userInfo };
|
43
|
-
userInfoObj[key] = data;
|
44
|
-
newUserInfo = userInfoObj;
|
45
|
-
}
|
46
|
-
return { newUserInfo: newUserInfo };
|
47
|
-
};
|
48
|
-
const updatePrimaryInfo = (key, data) => {
|
49
|
-
const updateData = Array.isArray(userInfo[`${key}`]) &&
|
50
|
-
userInfo[`${key}`].map((el, i) => {
|
51
|
-
if (el.id == data[0].id) {
|
52
|
-
return { ...el, is_primary: 1 };
|
53
|
-
}
|
54
|
-
else if (el.is_primary == 1) {
|
55
|
-
return { ...el, is_primary: 0 };
|
56
|
-
}
|
57
|
-
else {
|
58
|
-
return el;
|
59
|
-
}
|
60
|
-
});
|
61
|
-
const newUserInfo = { ...userInfo, [key]: sortUserInfo(updateData) };
|
62
|
-
return { newUserInfo: newUserInfo };
|
63
|
-
};
|
64
|
-
const updateDocumentInfo = (key, data) => {
|
65
|
-
const updateData = Array.isArray(userInfo[`${key}`]) &&
|
66
|
-
userInfo[`${key}`].map((el, i) => {
|
67
|
-
if (el.id == data?.info?.entity_id) {
|
68
|
-
return {
|
69
|
-
...el,
|
70
|
-
verification_status: EntityVerificationStatus.Pending,
|
71
|
-
};
|
72
|
-
}
|
73
|
-
else {
|
74
|
-
return el;
|
75
|
-
}
|
76
|
-
});
|
77
|
-
const newUserInfo = { ...userInfo, [key]: sortUserInfo(updateData) };
|
78
|
-
return { newUserInfo: newUserInfo, error: error };
|
79
|
-
};
|
80
|
-
const updateObjectInfo = (key, data) => {
|
81
|
-
const updateData = { ...userInfo[`${key}`], ...data };
|
82
|
-
const newUserInfo = { ...userInfo, [key]: updateData };
|
83
|
-
return { newUserInfo: newUserInfo };
|
84
|
-
};
|
85
|
-
const updateProfilePicture = (key, res) => {
|
86
|
-
const data = res.data.attachment[0].file_url;
|
87
|
-
const updateData = { ...userInfo[`${key}`], ["picture"]: data };
|
88
|
-
const newUserInfo = { ...userInfo, [`${key}`]: updateData };
|
89
|
-
return { newUserInfo: newUserInfo };
|
90
|
-
};
|
91
|
-
const getUserInfo = (data) => {
|
92
|
-
const newUserInfo = { ...userInfo, data };
|
93
|
-
return { newUserInfo: newUserInfo };
|
94
|
-
};
|
95
|
-
const resetSecurity = (key, keyAction) => {
|
96
|
-
let security = null;
|
97
|
-
if (keyAction == "resetQuestions") {
|
98
|
-
security = {
|
99
|
-
...userInfo[`${key}`],
|
100
|
-
["secret_answer_1"]: "____",
|
101
|
-
["secret_answer_2"]: "____",
|
102
|
-
};
|
103
|
-
}
|
104
|
-
else if (keyAction == "resetSecurityCode") {
|
105
|
-
security = {
|
106
|
-
...userInfo[`${key}`],
|
107
|
-
["security_code"]: "____",
|
108
|
-
};
|
109
|
-
}
|
110
|
-
const newUserInfo = { ...userInfo, [`${key}`]: security };
|
111
|
-
return { newUserInfo: newUserInfo };
|
112
|
-
};
|
113
|
-
const addOrganizationInfo = (key, data) => {
|
114
|
-
if (Array.isArray(userInfo[`${key}`])) {
|
115
|
-
const newData = [...userInfo[`${key}`], data];
|
116
|
-
const newUserInfo = { ...userInfo, [key]: sortUserInfo(newData) };
|
117
|
-
return { newUserInfo: newUserInfo };
|
118
|
-
}
|
119
|
-
else {
|
120
|
-
const newUserInfo = { ...userInfo, [key]: [data] };
|
121
|
-
return { newUserInfo: newUserInfo };
|
122
|
-
}
|
123
|
-
};
|
124
|
-
const updateOrganizationInfo = (key, data) => {
|
125
|
-
const updatedData = Array.isArray(userInfo[`${key}`]) &&
|
126
|
-
userInfo[`${key}`].map((el, i) => {
|
127
|
-
if (el.info.id == data.info.id) {
|
128
|
-
return data;
|
129
|
-
}
|
130
|
-
else {
|
131
|
-
return el;
|
132
|
-
}
|
133
|
-
});
|
134
|
-
const newUserInfo = { ...userInfo, [key]: sortUserInfo(updatedData) };
|
135
|
-
return { newUserInfo: newUserInfo };
|
136
|
-
};
|
137
|
-
const removeOrganizationInfo = (key, data) => {
|
138
|
-
let newUserInfo;
|
139
|
-
if (Array.isArray(userInfo[`${key}`]) && data != null) {
|
140
|
-
let removeData = Array.isArray(userInfo[`${key}`]) &&
|
141
|
-
userInfo[`${key}`].filter((el, i) => {
|
142
|
-
return el.info.id !== data.info.id;
|
143
|
-
});
|
144
|
-
if (removeData.length <= 0) {
|
145
|
-
removeData = null;
|
146
|
-
}
|
147
|
-
newUserInfo = { ...userInfo, [key]: sortUserInfo(removeData) };
|
148
|
-
}
|
149
|
-
else if (data == null) {
|
150
|
-
const userInfoObj = { ...userInfo };
|
151
|
-
userInfoObj[key] = data;
|
152
|
-
newUserInfo = userInfoObj;
|
153
|
-
}
|
154
|
-
return { newUserInfo: newUserInfo };
|
155
|
-
};
|
156
|
-
const createDocumentOrganization = (key, data) => {
|
157
|
-
const updateData = Array.isArray(userInfo[`${key}`]) &&
|
158
|
-
userInfo[`${key}`].map((el, i) => {
|
159
|
-
if (el.info.id == data?.info?.entity_id) {
|
160
|
-
const newInfo = {
|
161
|
-
...el.info,
|
162
|
-
verification_status: EntityVerificationStatus.Pending,
|
163
|
-
};
|
164
|
-
return { ...el, ["info"]: newInfo };
|
165
|
-
}
|
166
|
-
else {
|
167
|
-
return el;
|
168
|
-
}
|
169
|
-
});
|
170
|
-
const newUserInfo = { ...userInfo, [key]: updateData };
|
171
|
-
return { newUserInfo: newUserInfo };
|
172
|
-
};
|
173
|
-
return {
|
174
|
-
addInfo,
|
175
|
-
removeInfo,
|
176
|
-
updateInfo,
|
177
|
-
updatePrimaryInfo,
|
178
|
-
updateDocumentInfo,
|
179
|
-
updateObjectInfo,
|
180
|
-
updateProfilePicture,
|
181
|
-
getUserInfo,
|
182
|
-
resetSecurity,
|
183
|
-
addOrganizationInfo,
|
184
|
-
updateOrganizationInfo,
|
185
|
-
removeOrganizationInfo,
|
186
|
-
createDocumentOrganization,
|
187
|
-
};
|
188
|
-
};
|
189
|
-
const { addInfo, removeInfo, updateInfo, updatePrimaryInfo, updateDocumentInfo, updateObjectInfo, updateProfilePicture, getUserInfo, resetSecurity, addOrganizationInfo, updateOrganizationInfo, removeOrganizationInfo, createDocumentOrganization, } = newUserInfo();
|
190
|
-
// check response
|
191
|
-
const checkResponse = () => {
|
192
|
-
const errorHandler = (error, funcName, response) => {
|
193
|
-
const errorObj = {
|
194
|
-
status: "failed",
|
195
|
-
message: error,
|
196
|
-
funcName: funcName,
|
197
|
-
response: response,
|
198
|
-
};
|
199
|
-
throw errorObj;
|
200
|
-
};
|
201
|
-
const actionTypeHandler = (key, response, keyAction) => {
|
202
|
-
const data = response?.data[`${key}`];
|
203
|
-
if (keyAction == "create") {
|
204
|
-
return addInfo(`${key}`, data);
|
205
|
-
}
|
206
|
-
else if (keyAction == "update") {
|
207
|
-
return updateInfo(`${key}`, data);
|
208
|
-
}
|
209
|
-
else if (keyAction == "delete") {
|
210
|
-
return removeInfo(`${key}`, data);
|
211
|
-
}
|
212
|
-
else if (keyAction == "updatePrimary") {
|
213
|
-
return updatePrimaryInfo(`${key}`, data);
|
214
|
-
}
|
215
|
-
else if (keyAction == "confirm") {
|
216
|
-
const data = response?.data?.verify_data[`${key}`];
|
217
|
-
return updateInfo(`${key}`, [data]);
|
218
|
-
}
|
219
|
-
else if (keyAction == "createDocument") {
|
220
|
-
return updateDocumentInfo(`${key}`, response?.data);
|
221
|
-
}
|
222
|
-
else if (keyAction == "updateObjectInfo") {
|
223
|
-
return updateObjectInfo(`${key}`, data);
|
224
|
-
}
|
225
|
-
else if (keyAction == "updateProfilePicture") {
|
226
|
-
return updateProfilePicture(`${key}`, response);
|
227
|
-
}
|
228
|
-
else if (keyAction == "userInfo") {
|
229
|
-
return getUserInfo(response?.data);
|
230
|
-
}
|
231
|
-
else if (keyAction == "resetQuestions" ||
|
232
|
-
keyAction == "resetSecurityCode") {
|
233
|
-
return resetSecurity(`${key}`, keyAction);
|
234
|
-
}
|
235
|
-
else if (keyAction == "createOrganization") {
|
236
|
-
return addOrganizationInfo(`${key}`, response?.data);
|
237
|
-
}
|
238
|
-
else if (keyAction == "updateOrganization") {
|
239
|
-
return updateOrganizationInfo(`${key}`, response?.data);
|
240
|
-
}
|
241
|
-
else if (keyAction == "deleteOrganization") {
|
242
|
-
return removeOrganizationInfo(`${key}`, response?.data);
|
243
|
-
}
|
244
|
-
else if (keyAction == "createDocumentOrganization") {
|
245
|
-
return createDocumentOrganization(`${key}`, response?.data);
|
246
|
-
}
|
247
|
-
else {
|
248
|
-
return { newUserInfo: null };
|
249
|
-
}
|
250
|
-
};
|
251
|
-
const checkUserResponseAuth = (response, showMessageSuccess, funcName) => {
|
252
|
-
const check = response?.data?.result?.code;
|
253
|
-
if (check != SystemResponses.Approved &&
|
254
|
-
check != SystemResponses.Create_User_Completed_Partially) {
|
255
|
-
errorHandler(response?.data?.result?.message, funcName, response);
|
256
|
-
}
|
257
|
-
else if (!showMessageSuccess) {
|
258
|
-
const value = response.data;
|
259
|
-
value.email = sortUserInfo(value.email);
|
260
|
-
value.phone = sortUserInfo(value.phone);
|
261
|
-
value.identification = sortUserInfo(value.identification);
|
262
|
-
value.addresses = sortUserInfo(value.addresses);
|
263
|
-
value.bank_account = sortUserInfo(value.bank_account);
|
264
|
-
return value;
|
265
|
-
}
|
266
|
-
else {
|
267
|
-
return {
|
268
|
-
action: "Success",
|
269
|
-
message: "User Created Successfully",
|
270
|
-
};
|
271
|
-
}
|
272
|
-
};
|
273
|
-
const checkGlobalResponse = (key, response, funcName, keyAction) => {
|
274
|
-
const check = response?.data?.result?.code;
|
275
|
-
if (!check && funcName.includes("login")) {
|
276
|
-
return { newUserInfo: null };
|
277
|
-
}
|
278
|
-
else if (check &&
|
279
|
-
(check == SystemResponses.Approved ||
|
280
|
-
check == SystemResponses.Create_User_Completed_Partially)) {
|
281
|
-
return actionTypeHandler(key, response, keyAction);
|
282
|
-
}
|
283
|
-
else {
|
284
|
-
return errorHandler(response?.data?.result?.message, funcName, response);
|
285
|
-
}
|
286
|
-
};
|
287
|
-
return {
|
288
|
-
checkUserResponseAuth,
|
289
|
-
checkGlobalResponse,
|
290
|
-
errorHandler,
|
291
|
-
};
|
292
|
-
};
|
293
|
-
return {
|
294
|
-
checkResponse,
|
295
|
-
};
|
296
|
-
};
|
297
|
-
export function sortUserInfo(list) {
|
298
|
-
try {
|
299
|
-
const verificationStatusOrder = {
|
300
|
-
"1": 0, // Verified
|
301
|
-
"2": 1, // Pending
|
302
|
-
"3": 2, // Failed
|
303
|
-
"0": 3, // Not Verified
|
304
|
-
"-1": 4, // Undefined
|
305
|
-
};
|
306
|
-
return list
|
307
|
-
? list?.sort((a, b) => {
|
308
|
-
// First, compare by 'is_primary'
|
309
|
-
const isPrimaryComparison = a?.is_primary != undefined && b?.is_primary != undefined
|
310
|
-
? b?.is_primary - a?.is_primary
|
311
|
-
: 0;
|
312
|
-
// If 'is_primary' values are equal, compare by 'verification_status'
|
313
|
-
if (isPrimaryComparison === 0) {
|
314
|
-
const verificationStatusComparison = verificationStatusOrder[a?.verification_status] -
|
315
|
-
verificationStatusOrder[b?.verification_status];
|
316
|
-
// If 'is_primary' values are equal, and 'verification_status' values are equal, compare by id
|
317
|
-
if (verificationStatusComparison == 0) {
|
318
|
-
return b?.id - a?.id;
|
319
|
-
}
|
320
|
-
return verificationStatusComparison;
|
321
|
-
}
|
322
|
-
return isPrimaryComparison;
|
323
|
-
})
|
324
|
-
: list;
|
325
|
-
}
|
326
|
-
catch (error) {
|
327
|
-
const errorObj = {
|
328
|
-
status: "failed",
|
329
|
-
message: error,
|
330
|
-
funcName: "sortUserInfo",
|
331
|
-
response: null,
|
332
|
-
};
|
333
|
-
return errorObj;
|
334
|
-
}
|
335
|
-
}
|
336
|
-
export default OldUserHelper;
|
337
2
|
class UserHelper {
|
338
3
|
// #region "Modify"
|
339
|
-
static
|
4
|
+
static ModifyListByEntity = (entityList, entity) => {
|
340
5
|
const modifiedList = entityList.map((e) => {
|
341
6
|
if (e.id == entity.id) {
|
342
7
|
return { ...e, ...entity };
|
@@ -349,6 +14,7 @@ class UserHelper {
|
|
349
14
|
const sortedList = this.SortEntity(modifiedList);
|
350
15
|
return sortedList;
|
351
16
|
};
|
17
|
+
static ModifyProfilePicture;
|
352
18
|
static ModifyByDocumentData = (entityList, documentData) => {
|
353
19
|
const modifiedList = entityList.map((e) => {
|
354
20
|
if (e.id == documentData.info.entity_id) {
|
@@ -1,19 +1,19 @@
|
|
1
1
|
import { AccountStatementData, BankAccount, ChainData, CreditLimit, AccountFulfilment, AccountInfo, Limits, Options, Provision, Tokenization, Archive, BaseResult, GeoCoordinates, SimplifiedAccessRule } from "..";
|
2
2
|
type AccountData = BaseResult & {
|
3
3
|
info: AccountInfo;
|
4
|
-
limits: Limits
|
5
|
-
archive: Archive
|
4
|
+
limits: Limits;
|
5
|
+
archive: Archive;
|
6
6
|
custom_field: Record<string, any>;
|
7
|
-
geo_coordinates: GeoCoordinates
|
8
|
-
options: Options
|
9
|
-
bank_account: BankAccount[]
|
10
|
-
history: History[]
|
11
|
-
fulfilment: AccountFulfilment[]
|
12
|
-
access_rule: SimplifiedAccessRule[]
|
13
|
-
provision: Provision
|
14
|
-
credit_limit: CreditLimit
|
15
|
-
tokenization: Tokenization[]
|
16
|
-
chain_data: ChainData
|
17
|
-
statement: AccountStatementData[]
|
7
|
+
geo_coordinates: GeoCoordinates;
|
8
|
+
options: Options;
|
9
|
+
bank_account: BankAccount[];
|
10
|
+
history: History[];
|
11
|
+
fulfilment: AccountFulfilment[];
|
12
|
+
access_rule: SimplifiedAccessRule[];
|
13
|
+
provision: Provision;
|
14
|
+
credit_limit: CreditLimit;
|
15
|
+
tokenization: Tokenization[];
|
16
|
+
chain_data: ChainData;
|
17
|
+
statement: AccountStatementData[];
|
18
18
|
};
|
19
19
|
export type { AccountData };
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import type { Authentication, LastActivity, Notes, Result } from "..";
|
2
2
|
type BaseResult = {
|
3
3
|
result: Result;
|
4
|
-
notes: Notes
|
4
|
+
notes: Notes;
|
5
5
|
last_activity: LastActivity;
|
6
|
-
authentication: Authentication[]
|
6
|
+
authentication: Authentication[];
|
7
7
|
validate: string;
|
8
8
|
function_code: number;
|
9
9
|
time_zone: string;
|
@@ -5,9 +5,9 @@ type CurrencyCloudData = {
|
|
5
5
|
funding_account_data: CurrencyCloudFundingAccountData[];
|
6
6
|
};
|
7
7
|
type CurrencyCloudAccountData = {
|
8
|
-
phone_trading: boolean
|
9
|
-
online_trading: boolean
|
10
|
-
api_trading: boolean
|
8
|
+
phone_trading: boolean;
|
9
|
+
online_trading: boolean;
|
10
|
+
api_trading: boolean;
|
11
11
|
short_reference: string;
|
12
12
|
identification_value: string;
|
13
13
|
identification_type: string;
|
@@ -25,7 +25,7 @@ type CurrencyCloudAccountData = {
|
|
25
25
|
account_name: string;
|
26
26
|
legal_entity_type: string;
|
27
27
|
id: string;
|
28
|
-
process_third_party_funds: boolean
|
28
|
+
process_third_party_funds: boolean;
|
29
29
|
settlement_type: string;
|
30
30
|
};
|
31
31
|
type CurrencyCloudContactData = {
|
@@ -17,9 +17,9 @@ type Address = {
|
|
17
17
|
original_source_id: string;
|
18
18
|
server_date: string;
|
19
19
|
date_utc: string;
|
20
|
-
client_date: string
|
20
|
+
client_date: string;
|
21
21
|
update_date_utc: string;
|
22
|
-
custom_field: Record<string, unknown
|
22
|
+
custom_field: Record<string, unknown>;
|
23
23
|
ticket: TicketData[];
|
24
24
|
};
|
25
25
|
export type { Address };
|
@@ -26,16 +26,16 @@ type BankAccount = {
|
|
26
26
|
verification_status: number;
|
27
27
|
city_town: string;
|
28
28
|
postal_zip_code: string;
|
29
|
-
extended_data: BankExtendedData
|
29
|
+
extended_data: BankExtendedData;
|
30
30
|
sort_code: string;
|
31
31
|
description: string;
|
32
32
|
original_source_id: string;
|
33
33
|
server_date: string;
|
34
34
|
date_utc: string;
|
35
|
-
client_date: string
|
35
|
+
client_date: string;
|
36
36
|
update_date_utc: string;
|
37
37
|
service_provider: number;
|
38
|
-
custom_field: Record<string, unknown
|
38
|
+
custom_field: Record<string, unknown>;
|
39
39
|
ticket: TicketData[];
|
40
40
|
wire_transfer_type: number;
|
41
41
|
notes: string;
|
@@ -17,9 +17,9 @@ type CreditCard = {
|
|
17
17
|
original_source_id: string;
|
18
18
|
server_date: string;
|
19
19
|
date_utc: string;
|
20
|
-
client_date: string
|
20
|
+
client_date: string;
|
21
21
|
update_date_utc: string;
|
22
|
-
custom_field: Record<string, any
|
22
|
+
custom_field: Record<string, any>;
|
23
23
|
ticket: TicketData[];
|
24
24
|
};
|
25
25
|
export type { CreditCard };
|
@@ -6,19 +6,19 @@ type Device = {
|
|
6
6
|
os: string;
|
7
7
|
unique_id: string;
|
8
8
|
installation_id: string;
|
9
|
-
extended_info: DeviceExtendedInfo
|
9
|
+
extended_info: DeviceExtendedInfo;
|
10
10
|
status: number;
|
11
11
|
verification_status: number;
|
12
|
-
is_online: boolean
|
12
|
+
is_online: boolean;
|
13
13
|
encryption_key: string;
|
14
14
|
application_version: string;
|
15
15
|
serial_number: string;
|
16
16
|
source_ip_address: string;
|
17
|
-
geo_coordinates: GeoCoordinates
|
17
|
+
geo_coordinates: GeoCoordinates;
|
18
18
|
original_source_id: string;
|
19
19
|
server_date: string;
|
20
20
|
date_utc: string;
|
21
|
-
client_date: string
|
21
|
+
client_date: string;
|
22
22
|
update_date_utc: string;
|
23
23
|
client_time_zone: string;
|
24
24
|
};
|
@@ -8,8 +8,8 @@ type Email = {
|
|
8
8
|
original_source_id: string;
|
9
9
|
server_date: string;
|
10
10
|
date_utc: string;
|
11
|
-
client_date: string
|
11
|
+
client_date: string;
|
12
12
|
update_date_utc: string;
|
13
|
-
custom_field: Record<string, unknown
|
13
|
+
custom_field: Record<string, unknown>;
|
14
14
|
};
|
15
15
|
export type { Email };
|
@@ -3,6 +3,7 @@ import { TicketData } from "../ticket";
|
|
3
3
|
type Identification = {
|
4
4
|
result: Result;
|
5
5
|
id: number;
|
6
|
+
is_primary: undefined;
|
6
7
|
type: number;
|
7
8
|
country_of_issue: string;
|
8
9
|
country_of_residence: string;
|
@@ -14,10 +15,10 @@ type Identification = {
|
|
14
15
|
original_source_id: string;
|
15
16
|
server_date: string;
|
16
17
|
date_utc: string;
|
17
|
-
client_date: string
|
18
|
+
client_date: string;
|
18
19
|
update_date_utc: string;
|
19
|
-
extra_data: IdentificationExtraData
|
20
|
-
custom_field: Record<string, unknown
|
20
|
+
extra_data: IdentificationExtraData;
|
21
|
+
custom_field: Record<string, unknown>;
|
21
22
|
ticket: TicketData[];
|
22
23
|
};
|
23
24
|
export type { Identification };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { DeviceCultureInfo, SIMInfo } from "../../..";
|
2
2
|
type DeviceExtendedInfo = {
|
3
|
-
sim_info: SIMInfo
|
4
|
-
culture_info: DeviceCultureInfo
|
3
|
+
sim_info: SIMInfo;
|
4
|
+
culture_info: DeviceCultureInfo;
|
5
5
|
user_agent: string;
|
6
6
|
fingerprint: string;
|
7
7
|
cpu: string;
|
@@ -9,8 +9,8 @@ type Phone = {
|
|
9
9
|
original_source_id: string;
|
10
10
|
server_date: string;
|
11
11
|
date_utc: string;
|
12
|
-
client_date: string
|
12
|
+
client_date: string;
|
13
13
|
update_date_utc: string;
|
14
|
-
custom_field: Record<string, unknown
|
14
|
+
custom_field: Record<string, unknown>;
|
15
15
|
};
|
16
16
|
export type { Phone };
|
@@ -17,8 +17,8 @@ type Relationship = {
|
|
17
17
|
original_source_id: string;
|
18
18
|
server_date: string;
|
19
19
|
date_utc: string;
|
20
|
-
client_date: string
|
20
|
+
client_date: string;
|
21
21
|
update_date_utc: string;
|
22
|
-
custom_field: Record<string, unknown
|
22
|
+
custom_field: Record<string, unknown>;
|
23
23
|
};
|
24
24
|
export type { Relationship };
|
@@ -3,20 +3,20 @@ type OrganizationData = BaseResult & {
|
|
3
3
|
info: OrganizationInfo;
|
4
4
|
details: OrganizationDetails;
|
5
5
|
address: Address[];
|
6
|
-
email: Email[]
|
7
|
-
phone: Phone[]
|
8
|
-
social_media: SocialMedia[]
|
6
|
+
email: Email[];
|
7
|
+
phone: Phone[];
|
8
|
+
social_media: SocialMedia[];
|
9
9
|
ownership_json: string;
|
10
|
-
classification: Classification
|
10
|
+
classification: Classification;
|
11
11
|
working_hours: WorkingHour;
|
12
12
|
json: string;
|
13
13
|
geo_coordinates: GeoCoordinates;
|
14
|
-
history: History[]
|
14
|
+
history: History[];
|
15
15
|
relationship: Relationship[];
|
16
|
-
documents: DocumentData[]
|
17
|
-
users: UserData[]
|
18
|
-
accounts: AccountData[]
|
19
|
-
picture: string[]
|
16
|
+
documents: DocumentData[];
|
17
|
+
users: UserData[];
|
18
|
+
accounts: AccountData[];
|
19
|
+
picture: string[];
|
20
20
|
ticket: TicketData[];
|
21
21
|
};
|
22
22
|
export type { OrganizationData };
|
@@ -19,9 +19,9 @@ type TransactionInfo = {
|
|
19
19
|
date_utc: string;
|
20
20
|
auth_date_utc: string;
|
21
21
|
post_date_utc: string;
|
22
|
-
client_date: Date
|
23
|
-
auth_client_date: Date
|
24
|
-
post_client_date: Date
|
22
|
+
client_date: Date;
|
23
|
+
auth_client_date: Date;
|
24
|
+
post_client_date: Date;
|
25
25
|
source_time_zone: string;
|
26
26
|
service_provider: number;
|
27
27
|
wallet_identifier: string;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { AccountData, Activity, Address, BankAccount, BaseResult, CreditCard, CryptoAddress, Currency, Device, DeviceHistory, DocumentData, Email, History, ExternalAuthentication, GeneralRequirements, GeoCoordinates, GroupData, Identification, OrganizationData, PersonalInfo, Phone, Preferences, Relationship, UserSecurity, SimplifiedAccessRule, TermsConditions, TicketData, UserAuthenticationData, UserCreditLimit, UserInfo, Commerce, ValidationData, PromotionData, UserAccessControl } from "..";
|
2
2
|
type CustomField = {
|
3
|
-
promotion_data: PromotionData
|
4
|
-
user_access_control: UserAccessControl
|
3
|
+
promotion_data: PromotionData;
|
4
|
+
user_access_control: UserAccessControl;
|
5
5
|
};
|
6
6
|
type UserData = BaseResult & {
|
7
7
|
info: UserInfo;
|
@@ -6,8 +6,8 @@ type VerifyUserSecurityInfo = {
|
|
6
6
|
type: number;
|
7
7
|
authorization_request_type: number;
|
8
8
|
source_id: string;
|
9
|
-
server_date: Date
|
10
|
-
date_utc: Date
|
9
|
+
server_date: Date;
|
10
|
+
date_utc: Date;
|
11
11
|
source_time_zone: string;
|
12
12
|
};
|
13
13
|
export type { VerifyUserSecurityInfo };
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { DocumentData, OrganizationData, UserData } from "..";
|
2
|
-
type TEntity = UserData[keyof Pick<UserData, "addresses" | "bank_account" | "email" | "phone">][0];
|
3
|
-
type
|
2
|
+
type TEntity = UserData[keyof Pick<UserData, "addresses" | "bank_account" | "email" | "phone" | "identification">][0];
|
3
|
+
type TModifyListByEntity = <K extends TEntity>(entityList: K[], entity: K) => K[];
|
4
4
|
type TModifyByDocumentData = <K extends TEntity>(entityList: K[], entity: DocumentData) => K[];
|
5
5
|
type TModifyOrganizationByDocumentData = <K extends OrganizationData>(entityList: K[], entity: DocumentData) => K[];
|
6
|
-
export { TEntity,
|
6
|
+
export { TEntity, TModifyListByEntity, TModifyByDocumentData, TModifyOrganizationByDocumentData, };
|
7
7
|
type BaseEntity = {
|
8
8
|
id: number;
|
9
9
|
is_primary: number;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ggez-banking-sdk",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.117",
|
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
|
"types": "dist/index.d.ts",
|
6
6
|
"main": "dist/index.js",
|