@cuenca-mx/cuenca-js 0.0.14-dev2 → 0.0.14-dev20
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/README.md +3 -1
- package/build/{data-15b623a1.mjs → data-27fc844b.mjs} +48 -14
- package/build/{data-665e0ec5.cjs → data-6c2897da.cjs} +50 -14
- package/build/index.cjs +427 -59
- package/build/index.mjs +397 -29
- package/build/requests/index.cjs +3 -2
- package/build/requests/index.mjs +3 -3
- package/build/types/index.cjs +70 -26
- package/build/types/index.mjs +36 -2
- package/build/umd/cuenca.umd.js +1 -1
- package/build/{identities-ca4f29bd.mjs → vulnerableActivity-70ff062e.mjs} +477 -193
- package/build/{identities-4ff313d8.cjs → vulnerableActivity-88488ee4.cjs} +487 -193
- package/build/{walletTransactionRequest-f733313f.cjs → walletTransactionRequest-534ea750.cjs} +700 -218
- package/build/{walletTransactionRequest-ada06c52.mjs → walletTransactionRequest-80f0424d.mjs} +700 -219
- package/package.json +4 -2
package/build/index.cjs
CHANGED
|
@@ -6,9 +6,9 @@ var axios = require('axios');
|
|
|
6
6
|
var Buffer = require('buffer');
|
|
7
7
|
var errors_index = require('./errors/index.cjs');
|
|
8
8
|
var jwt_index = require('./jwt/index.cjs');
|
|
9
|
-
var data = require('./data-
|
|
10
|
-
var
|
|
11
|
-
var walletTransactionRequest = require('./walletTransactionRequest-
|
|
9
|
+
var data = require('./data-6c2897da.cjs');
|
|
10
|
+
var vulnerableActivity = require('./vulnerableActivity-88488ee4.cjs');
|
|
11
|
+
var walletTransactionRequest = require('./walletTransactionRequest-534ea750.cjs');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
14
|
|
|
@@ -26,7 +26,7 @@ const isNode =
|
|
|
26
26
|
|
|
27
27
|
const runtimeEnv = { isBrowser, isNode };
|
|
28
28
|
|
|
29
|
-
const name="@cuenca-mx/cuenca-js";const version="0.0.14-
|
|
29
|
+
const name="@cuenca-mx/cuenca-js";const version="0.0.14-dev20";const description="Cuenca client for JS";const main="./build/index.cjs";const module$1="./build/index.mjs";const browser="./build/umd/cuenca.umd.js";const files=["build/**/*"];const exports$1={".":{"import":"./build/index.mjs",require:"./build/index.cjs"},"./errors":{"import":"./build/errors/index.mjs",require:"./build/errors/index.cjs"},"./jwt":{"import":"./build/jwt/index.mjs",require:"./build/jwt/index.cjs"},"./requests":{"import":"./build/requests/index.mjs",require:"./build/requests/index.cjs"},"./types":{"import":"./build/types/index.mjs",require:"./build/types/index.cjs"}};const packageManager="yarn@3.0.2";const type="module";const repository={type:"git",url:"https://github.com/cuenca-mx/cuenca-js.git",directory:"packages/cuenca-js"};const keywords=["cuenca"];const license="MIT";const bugs={url:"https://github.com/cuenca-mx/cuenca-js/issues"};const homepage="https://cuenca.com";const scripts={build:"rm -rf build/ && yarn rollup --config",test:"yarn node --experimental-vm-modules $(yarn bin jest)",publish:"yarn build && yarn npm publish",dev:"rm -rf build/ && yarn rollup --config && yarn node ../example.cjs",example:"yarn node ../example.cjs"};const devDependencies={"@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.1",jest:"^27.4.5",rollup:"^2.61.1","rollup-plugin-terser":"^7.0.2"};const dependencies={axios:"^0.24.0",buffer:"^6.0.3"};var pkg = {name:name,version:version,description:description,main:main,module:module$1,browser:browser,files:files,exports:exports$1,packageManager:packageManager,type:type,repository:repository,keywords:keywords,license:license,bugs:bugs,homepage:homepage,scripts:scripts,devDependencies:devDependencies,dependencies:dependencies};
|
|
30
30
|
|
|
31
31
|
class Client {
|
|
32
32
|
constructor({
|
|
@@ -246,12 +246,16 @@ class Account {
|
|
|
246
246
|
|
|
247
247
|
class Alert {
|
|
248
248
|
constructor({
|
|
249
|
+
agent,
|
|
249
250
|
accountNumber,
|
|
250
251
|
actualPeriodCount,
|
|
251
252
|
actualPeriodSum,
|
|
252
253
|
aggregationType,
|
|
254
|
+
changeLog,
|
|
255
|
+
comments,
|
|
253
256
|
committeeMeetingDate,
|
|
254
257
|
createdAt,
|
|
258
|
+
questionnaireId,
|
|
255
259
|
description,
|
|
256
260
|
hasQuestionnaire,
|
|
257
261
|
id,
|
|
@@ -261,6 +265,7 @@ class Alert {
|
|
|
261
265
|
period,
|
|
262
266
|
periodNumber,
|
|
263
267
|
status,
|
|
268
|
+
sourceType,
|
|
264
269
|
transactionDate,
|
|
265
270
|
type,
|
|
266
271
|
typeOfFilter,
|
|
@@ -270,9 +275,12 @@ class Alert {
|
|
|
270
275
|
this.accountNumber = accountNumber;
|
|
271
276
|
this.actualPeriodCount = actualPeriodCount;
|
|
272
277
|
this.actualPeriodSum = actualPeriodSum;
|
|
278
|
+
this.agent = agent;
|
|
273
279
|
this.aggregationType = aggregationType;
|
|
280
|
+
this.comments = comments;
|
|
274
281
|
this.committeeMeetingDate = data.dateToUTC(committeeMeetingDate);
|
|
275
282
|
this.createdAt = data.dateToUTC(createdAt);
|
|
283
|
+
this.questionnaireId = questionnaireId;
|
|
276
284
|
this.description = description;
|
|
277
285
|
this.hasQuestionnaire = hasQuestionnaire;
|
|
278
286
|
this.id = id;
|
|
@@ -282,14 +290,18 @@ class Alert {
|
|
|
282
290
|
this.period = data.enumValueFromString(data.MLIndicatorPeriod, period);
|
|
283
291
|
this.periodNumber = periodNumber;
|
|
284
292
|
this.status = data.enumValueFromString(data.AlertStatus, status);
|
|
293
|
+
this.sourceType = data.enumValueFromString(data.SourceAlertType, sourceType);
|
|
285
294
|
this.transactionDate = data.dateToUTC(transactionDate);
|
|
286
295
|
this.type = data.enumValueFromString(data.MLIndicatorType, type);
|
|
287
|
-
this.typeOfFilter = data.enumValueFromString(data.
|
|
296
|
+
this.typeOfFilter = data.enumValueFromString(data.PLDFilterType, typeOfFilter);
|
|
288
297
|
this.updatedAt = data.dateToUTC(updatedAt);
|
|
289
298
|
this.userId = userId;
|
|
299
|
+
this.changeLog = changeLog;
|
|
290
300
|
}
|
|
291
301
|
|
|
292
302
|
static fromObject = ({
|
|
303
|
+
agent,
|
|
304
|
+
comments,
|
|
293
305
|
description,
|
|
294
306
|
id,
|
|
295
307
|
level,
|
|
@@ -300,6 +312,8 @@ class Alert {
|
|
|
300
312
|
...obj
|
|
301
313
|
}) =>
|
|
302
314
|
new Alert({
|
|
315
|
+
agent,
|
|
316
|
+
comments,
|
|
303
317
|
description,
|
|
304
318
|
id,
|
|
305
319
|
level,
|
|
@@ -311,16 +325,28 @@ class Alert {
|
|
|
311
325
|
actualPeriodCount: obj.actual_period_count,
|
|
312
326
|
actualPeriodSum: obj.actual_period_sum,
|
|
313
327
|
aggregationType: obj.aggregation_type,
|
|
328
|
+
changeLog: obj.change_log,
|
|
314
329
|
committeeMeetingDate: obj.committee_meeting_date,
|
|
315
330
|
createdAt: obj.created_at,
|
|
331
|
+
questionnaireId: obj.questionnaire_id,
|
|
316
332
|
hasQuestionnaire: obj.has_questionnaire,
|
|
317
333
|
institutionName: obj.institution_name,
|
|
318
334
|
periodNumber: obj.period_number,
|
|
335
|
+
sourceType: obj.source_type,
|
|
319
336
|
transactionDate: obj.transaction_date,
|
|
320
337
|
typeOfFilter: obj.type_of_filter,
|
|
321
338
|
updatedAt: obj.updated_at,
|
|
322
339
|
userId: obj.user_id,
|
|
323
340
|
});
|
|
341
|
+
|
|
342
|
+
get changeLog() {
|
|
343
|
+
return this._changeLog;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
set changeLog(value) {
|
|
347
|
+
if (!value || !Array.isArray(value) || value.length === 0) return;
|
|
348
|
+
this._changeLog = value.map((entry) => vulnerableActivity.AlertLog.fromObject(entry));
|
|
349
|
+
}
|
|
324
350
|
}
|
|
325
351
|
|
|
326
352
|
class ApiKey {
|
|
@@ -479,7 +505,7 @@ class BridgeAccount {
|
|
|
479
505
|
this.updatedAt = data.dateToUTC(updatedAt);
|
|
480
506
|
this.emailAddress = emailAddress;
|
|
481
507
|
this.clientClabe = clientClabe;
|
|
482
|
-
this.
|
|
508
|
+
this.govtId = govtId;
|
|
483
509
|
this.names = names;
|
|
484
510
|
this.firstSurname = firstSurname;
|
|
485
511
|
this.secondSurname = secondSurname;
|
|
@@ -490,10 +516,10 @@ class BridgeAccount {
|
|
|
490
516
|
this.userId = userId;
|
|
491
517
|
this.gender = gender;
|
|
492
518
|
this.phoneNumber = phoneNumber;
|
|
493
|
-
this.
|
|
519
|
+
this.proofOfAddress = proofOfAddress;
|
|
494
520
|
this.status = data.enumValueFromString(data.BridgeAccountStatus, status);
|
|
495
|
-
this.
|
|
496
|
-
this.
|
|
521
|
+
this.termsOfService = termsOfService;
|
|
522
|
+
this.address = address;
|
|
497
523
|
}
|
|
498
524
|
|
|
499
525
|
static fromObject = ({ status, address, ...obj }) =>
|
|
@@ -524,36 +550,36 @@ class BridgeAccount {
|
|
|
524
550
|
return this._address;
|
|
525
551
|
}
|
|
526
552
|
|
|
527
|
-
set
|
|
553
|
+
set address(value) {
|
|
528
554
|
if (!value || Object.keys(value).length === 0) return;
|
|
529
|
-
this._address =
|
|
555
|
+
this._address = vulnerableActivity.Address.fromObject(value);
|
|
530
556
|
}
|
|
531
557
|
|
|
532
558
|
get proofOfAddress() {
|
|
533
559
|
return this._proofOfAddress;
|
|
534
560
|
}
|
|
535
561
|
|
|
536
|
-
set
|
|
562
|
+
set proofOfAddress(value) {
|
|
537
563
|
if (!value || Object.keys(value).length === 0) return;
|
|
538
|
-
this._proofOfAddress =
|
|
564
|
+
this._proofOfAddress = vulnerableActivity.KYCFile.fromObject(value);
|
|
539
565
|
}
|
|
540
566
|
|
|
541
567
|
get govtId() {
|
|
542
568
|
return this._govtId;
|
|
543
569
|
}
|
|
544
570
|
|
|
545
|
-
set
|
|
571
|
+
set govtId(value) {
|
|
546
572
|
if (!value || Object.keys(value).length === 0) return;
|
|
547
|
-
this._govtId =
|
|
573
|
+
this._govtId = vulnerableActivity.KYCFile.fromObject(value);
|
|
548
574
|
}
|
|
549
575
|
|
|
550
576
|
get termsOfService() {
|
|
551
577
|
return this._termsOfService;
|
|
552
578
|
}
|
|
553
579
|
|
|
554
|
-
set
|
|
580
|
+
set termsOfService(value) {
|
|
555
581
|
if (!value || Object.keys(value).length === 0) return;
|
|
556
|
-
this._termsOfService =
|
|
582
|
+
this._termsOfService = vulnerableActivity.TOSAgreements.fromObject(value);
|
|
557
583
|
}
|
|
558
584
|
}
|
|
559
585
|
|
|
@@ -1020,6 +1046,320 @@ class LoginToken {
|
|
|
1020
1046
|
static fromObject = ({ id }) => new LoginToken({ id });
|
|
1021
1047
|
}
|
|
1022
1048
|
|
|
1049
|
+
class TransactionalProfile {
|
|
1050
|
+
constructor({
|
|
1051
|
+
currency,
|
|
1052
|
+
monthlyAmount,
|
|
1053
|
+
recipientsNum,
|
|
1054
|
+
payersNum,
|
|
1055
|
+
deposits,
|
|
1056
|
+
withdrawal,
|
|
1057
|
+
}) {
|
|
1058
|
+
this.currency = currency;
|
|
1059
|
+
this.monthlyAmount = monthlyAmount;
|
|
1060
|
+
|
|
1061
|
+
this.recipientsNum = recipientsNum;
|
|
1062
|
+
this.payersNum = payersNum;
|
|
1063
|
+
|
|
1064
|
+
this.deposits = deposits;
|
|
1065
|
+
this.withdrawal = withdrawal;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
get deposits() {
|
|
1069
|
+
return this._deposits;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
set deposits(value) {
|
|
1073
|
+
if (!value) return;
|
|
1074
|
+
this._deposits = vulnerableActivity.TransactionalProfileServices.fromObject(value);
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
get withdrawal() {
|
|
1078
|
+
return this._withdrawal;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
set withdrawal(value) {
|
|
1082
|
+
if (!value) return;
|
|
1083
|
+
this._withdrawal = vulnerableActivity.TransactionalProfileServices.fromObject(value);
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
static fromObject = ({ currency, deposits, withdrawal, ...obj }) =>
|
|
1087
|
+
new TransactionalProfile({
|
|
1088
|
+
currency,
|
|
1089
|
+
deposits,
|
|
1090
|
+
withdrawal,
|
|
1091
|
+
payersNum: obj.payers_num,
|
|
1092
|
+
recipientsNum: obj.recipients_num,
|
|
1093
|
+
monthlyAmount: obj.monthly_amount,
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
class BaseUser {
|
|
1098
|
+
constructor({
|
|
1099
|
+
address,
|
|
1100
|
+
clabe,
|
|
1101
|
+
emailAddress,
|
|
1102
|
+
id,
|
|
1103
|
+
level,
|
|
1104
|
+
meta,
|
|
1105
|
+
nationality,
|
|
1106
|
+
platformId,
|
|
1107
|
+
phoneNumber,
|
|
1108
|
+
requiredLevel,
|
|
1109
|
+
rfc,
|
|
1110
|
+
status,
|
|
1111
|
+
createdAt,
|
|
1112
|
+
updatedAt,
|
|
1113
|
+
userType,
|
|
1114
|
+
}) {
|
|
1115
|
+
this.address = address;
|
|
1116
|
+
this.clabe = clabe;
|
|
1117
|
+
this.createdAt = data.dateToUTC(createdAt);
|
|
1118
|
+
this.emailAddress = emailAddress;
|
|
1119
|
+
this.id = id;
|
|
1120
|
+
this.level = level;
|
|
1121
|
+
this.meta = meta;
|
|
1122
|
+
this.nationality = nationality;
|
|
1123
|
+
this.platformId = platformId;
|
|
1124
|
+
this.phoneNumber = phoneNumber;
|
|
1125
|
+
this.requiredLevel = requiredLevel;
|
|
1126
|
+
this.rfc = rfc;
|
|
1127
|
+
this.status = data.enumValueFromString(data.UserStatus, status);
|
|
1128
|
+
this.updatedAt = data.dateToUTC(updatedAt);
|
|
1129
|
+
this.userType = userType;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
get address() {
|
|
1133
|
+
return this._address;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
set address(value) {
|
|
1137
|
+
if (!value) return;
|
|
1138
|
+
this._address = vulnerableActivity.Address.fromObject(value);
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
static fromObject = ({
|
|
1142
|
+
address,
|
|
1143
|
+
clabe,
|
|
1144
|
+
id,
|
|
1145
|
+
level,
|
|
1146
|
+
nationality,
|
|
1147
|
+
rfc,
|
|
1148
|
+
status,
|
|
1149
|
+
...obj
|
|
1150
|
+
}) =>
|
|
1151
|
+
new BaseUser({
|
|
1152
|
+
address,
|
|
1153
|
+
clabe,
|
|
1154
|
+
id,
|
|
1155
|
+
level,
|
|
1156
|
+
meta: obj.meta,
|
|
1157
|
+
nationality,
|
|
1158
|
+
rfc,
|
|
1159
|
+
status,
|
|
1160
|
+
createdAt: obj.created_at,
|
|
1161
|
+
emailAddress: obj.email_address,
|
|
1162
|
+
phoneNumber: obj.phone_number,
|
|
1163
|
+
platformId: obj.platform_id,
|
|
1164
|
+
requiredLevel: obj.required_level,
|
|
1165
|
+
updatedAt: obj.updated_at,
|
|
1166
|
+
userType: obj.user_type,
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
class Partner extends BaseUser {
|
|
1171
|
+
constructor({
|
|
1172
|
+
address,
|
|
1173
|
+
audit,
|
|
1174
|
+
businessDetails,
|
|
1175
|
+
businessModel,
|
|
1176
|
+
businessName,
|
|
1177
|
+
clabe,
|
|
1178
|
+
createdAt,
|
|
1179
|
+
documentationUrl,
|
|
1180
|
+
emailAddress,
|
|
1181
|
+
externalAccount,
|
|
1182
|
+
folio,
|
|
1183
|
+
id,
|
|
1184
|
+
incorporationDate,
|
|
1185
|
+
legalName,
|
|
1186
|
+
legalRepresentatives,
|
|
1187
|
+
level,
|
|
1188
|
+
license,
|
|
1189
|
+
meta,
|
|
1190
|
+
nationality,
|
|
1191
|
+
phoneNumber,
|
|
1192
|
+
platformId,
|
|
1193
|
+
requiredLevel,
|
|
1194
|
+
rfc,
|
|
1195
|
+
shareholders,
|
|
1196
|
+
status,
|
|
1197
|
+
transactionalProfile,
|
|
1198
|
+
updatedAt,
|
|
1199
|
+
userId,
|
|
1200
|
+
userType,
|
|
1201
|
+
vulnerableActivity,
|
|
1202
|
+
webSite,
|
|
1203
|
+
}) {
|
|
1204
|
+
super({
|
|
1205
|
+
address,
|
|
1206
|
+
clabe,
|
|
1207
|
+
emailAddress,
|
|
1208
|
+
rfc,
|
|
1209
|
+
id,
|
|
1210
|
+
level,
|
|
1211
|
+
license,
|
|
1212
|
+
meta,
|
|
1213
|
+
nationality,
|
|
1214
|
+
platformId,
|
|
1215
|
+
phoneNumber,
|
|
1216
|
+
requiredLevel,
|
|
1217
|
+
status,
|
|
1218
|
+
createdAt,
|
|
1219
|
+
updatedAt,
|
|
1220
|
+
userType,
|
|
1221
|
+
});
|
|
1222
|
+
this.audit = audit;
|
|
1223
|
+
this.businessModel = businessModel;
|
|
1224
|
+
this.businessName = businessName;
|
|
1225
|
+
this.businessDetails = businessDetails;
|
|
1226
|
+
this.documentationUrl = documentationUrl;
|
|
1227
|
+
this.incorporationDate = data.dateToUTC(incorporationDate);
|
|
1228
|
+
this.externalAccount = externalAccount;
|
|
1229
|
+
this.folio = folio;
|
|
1230
|
+
this.legalName = legalName;
|
|
1231
|
+
this.license = license;
|
|
1232
|
+
this.shareholders = shareholders;
|
|
1233
|
+
this.legalRepresentatives = legalRepresentatives;
|
|
1234
|
+
this.transactionalProfile = transactionalProfile;
|
|
1235
|
+
this.userId = userId;
|
|
1236
|
+
this.vulnerableActivity = vulnerableActivity;
|
|
1237
|
+
this.webSite = webSite;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
get shareholders() {
|
|
1241
|
+
return this._shareholders;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
set shareholders(value) {
|
|
1245
|
+
if (!value) return;
|
|
1246
|
+
this._shareholders = value.map((sh) => vulnerableActivity.ShareholderMoral.fromObject(sh));
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
get legalRepresentatives() {
|
|
1250
|
+
return this._legalRepresentatives;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
set legalRepresentatives(value) {
|
|
1254
|
+
if (!value) return;
|
|
1255
|
+
this._legalRepresentatives = value.map((lr) =>
|
|
1256
|
+
vulnerableActivity.LegalRepresentatives.fromObject(lr),
|
|
1257
|
+
);
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
get externalAccount() {
|
|
1261
|
+
return this._externalAccount;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
set externalAccount(value) {
|
|
1265
|
+
if (!value) return;
|
|
1266
|
+
this._externalAccount = vulnerableActivity.ExternalAccount.fromObject(value);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
get vulnerableActivity() {
|
|
1270
|
+
return this._vulnerableActivity;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
set vulnerableActivity(value) {
|
|
1274
|
+
if (!value) return;
|
|
1275
|
+
this._vulnerableActivity = vulnerableActivity.VulnerableActivity.fromObject(value);
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
get audit() {
|
|
1279
|
+
return this._audit;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
set audit(value) {
|
|
1283
|
+
if (!value) return;
|
|
1284
|
+
this._audit = vulnerableActivity.Audit.fromObject(value);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
get license() {
|
|
1288
|
+
return this._license;
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
set license(value) {
|
|
1292
|
+
if (!value) return;
|
|
1293
|
+
this._license = vulnerableActivity.License.fromObject(value);
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
get transactionalProfile() {
|
|
1297
|
+
return this._transactionalProfile;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
set transactionalProfile(value) {
|
|
1301
|
+
if (!value) return;
|
|
1302
|
+
this._transactionalProfile = TransactionalProfile.fromObject(value);
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
get businessDetails() {
|
|
1306
|
+
return this._businessDetails;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
set businessDetails(value) {
|
|
1310
|
+
if (!value) return;
|
|
1311
|
+
this._businessDetails = vulnerableActivity.BusinessDetails.fromObject(value);
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
static fromObject = ({
|
|
1315
|
+
audit,
|
|
1316
|
+
address,
|
|
1317
|
+
clabe,
|
|
1318
|
+
folio,
|
|
1319
|
+
id,
|
|
1320
|
+
level,
|
|
1321
|
+
license,
|
|
1322
|
+
nationality,
|
|
1323
|
+
rfc,
|
|
1324
|
+
status,
|
|
1325
|
+
shareholders,
|
|
1326
|
+
...obj
|
|
1327
|
+
}) =>
|
|
1328
|
+
new Partner({
|
|
1329
|
+
address,
|
|
1330
|
+
audit,
|
|
1331
|
+
clabe,
|
|
1332
|
+
folio,
|
|
1333
|
+
id,
|
|
1334
|
+
level,
|
|
1335
|
+
license,
|
|
1336
|
+
nationality,
|
|
1337
|
+
rfc,
|
|
1338
|
+
shareholders,
|
|
1339
|
+
status,
|
|
1340
|
+
legalName: obj.legal_name,
|
|
1341
|
+
legalRepresentatives: obj.legal_representatives,
|
|
1342
|
+
businessModel: obj.business_model,
|
|
1343
|
+
businessName: obj.business_name,
|
|
1344
|
+
businessDetails: obj.business_details,
|
|
1345
|
+
createdAt: obj.created_at,
|
|
1346
|
+
documentationUrl: obj.documentation_url,
|
|
1347
|
+
emailAddress: obj.email_address,
|
|
1348
|
+
externalAccount: obj.external_account,
|
|
1349
|
+
incorporationDate: obj.incorporation_date,
|
|
1350
|
+
meta: obj.meta,
|
|
1351
|
+
phoneNumber: obj.phone_number,
|
|
1352
|
+
platformId: obj.platform_id,
|
|
1353
|
+
requiredLevel: obj.required_level,
|
|
1354
|
+
transactionalProfile: obj.transactional_profile,
|
|
1355
|
+
updatedAt: obj.updated_at,
|
|
1356
|
+
userId: obj.user_id,
|
|
1357
|
+
userType: obj.user_type,
|
|
1358
|
+
vulnerableActivity: obj.vulnerable_activity,
|
|
1359
|
+
webSite: obj.web_site,
|
|
1360
|
+
});
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1023
1363
|
class Wallet {
|
|
1024
1364
|
constructor({ balance, createdAt, deactivatedAt, id, userId, updatedAt }) {
|
|
1025
1365
|
this.balance = balance;
|
|
@@ -1227,9 +1567,10 @@ class User {
|
|
|
1227
1567
|
status,
|
|
1228
1568
|
termsOfService,
|
|
1229
1569
|
updatedAt,
|
|
1570
|
+
userType,
|
|
1230
1571
|
verificationId,
|
|
1231
1572
|
}) {
|
|
1232
|
-
this.
|
|
1573
|
+
this.address = address;
|
|
1233
1574
|
this.blacklistValidationStatus = data.enumValueFromString(
|
|
1234
1575
|
data.VerificationStatus,
|
|
1235
1576
|
blacklistValidationStatus,
|
|
@@ -1238,7 +1579,7 @@ class User {
|
|
|
1238
1579
|
this.countryOfBirth = countryOfBirth;
|
|
1239
1580
|
this.createdAt = data.dateToUTC(createdAt);
|
|
1240
1581
|
this.curp = curp;
|
|
1241
|
-
this.
|
|
1582
|
+
this.curpDocument = curpDocument;
|
|
1242
1583
|
this.dateOfBirth = dateOfBirth;
|
|
1243
1584
|
this.emailAddress = emailAddress;
|
|
1244
1585
|
this.firstSurname = firstSurname;
|
|
@@ -1248,16 +1589,17 @@ class User {
|
|
|
1248
1589
|
this.names = names;
|
|
1249
1590
|
this.nationality = nationality;
|
|
1250
1591
|
this.phoneNumber = phoneNumber;
|
|
1251
|
-
this.
|
|
1252
|
-
this.
|
|
1253
|
-
this.
|
|
1592
|
+
this.govtId = govtId;
|
|
1593
|
+
this.proofOfAddress = proofOfAddress;
|
|
1594
|
+
this.proofOfLife = proofOfLife;
|
|
1254
1595
|
this.requiredLevel = requiredLevel;
|
|
1255
1596
|
this.rfc = rfc;
|
|
1256
1597
|
this.secondSurname = secondSurname;
|
|
1257
1598
|
this.stateOfBirth = stateOfBirth;
|
|
1258
1599
|
this.status = data.enumValueFromString(data.UserStatus, status);
|
|
1259
|
-
this.
|
|
1600
|
+
this.termsOfService = termsOfService;
|
|
1260
1601
|
this.updatedAt = data.dateToUTC(updatedAt);
|
|
1602
|
+
this.userType = userType;
|
|
1261
1603
|
this.verificationId = verificationId;
|
|
1262
1604
|
}
|
|
1263
1605
|
|
|
@@ -1265,54 +1607,54 @@ class User {
|
|
|
1265
1607
|
return this._address;
|
|
1266
1608
|
}
|
|
1267
1609
|
|
|
1268
|
-
set
|
|
1610
|
+
set address(value) {
|
|
1269
1611
|
if (!value) return;
|
|
1270
|
-
this._address =
|
|
1612
|
+
this._address = vulnerableActivity.Address.fromObject(value);
|
|
1271
1613
|
}
|
|
1272
1614
|
|
|
1273
1615
|
get proofOfAddress() {
|
|
1274
1616
|
return this._proofOfAddress;
|
|
1275
1617
|
}
|
|
1276
1618
|
|
|
1277
|
-
set
|
|
1619
|
+
set proofOfAddress(value) {
|
|
1278
1620
|
if (!value) return;
|
|
1279
|
-
this._proofOfAddress =
|
|
1621
|
+
this._proofOfAddress = vulnerableActivity.KYCFile.fromObject(value);
|
|
1280
1622
|
}
|
|
1281
1623
|
|
|
1282
1624
|
get proofOfLife() {
|
|
1283
1625
|
return this._proofOfLife;
|
|
1284
1626
|
}
|
|
1285
1627
|
|
|
1286
|
-
set
|
|
1628
|
+
set proofOfLife(value) {
|
|
1287
1629
|
if (!value) return;
|
|
1288
|
-
this._proofOfLife =
|
|
1630
|
+
this._proofOfLife = vulnerableActivity.KYCFile.fromObject(value);
|
|
1289
1631
|
}
|
|
1290
1632
|
|
|
1291
1633
|
get govtId() {
|
|
1292
1634
|
return this._govtId;
|
|
1293
1635
|
}
|
|
1294
1636
|
|
|
1295
|
-
set
|
|
1637
|
+
set govtId(value) {
|
|
1296
1638
|
if (!value) return;
|
|
1297
|
-
this._govtId =
|
|
1639
|
+
this._govtId = vulnerableActivity.KYCFile.fromObject(value);
|
|
1298
1640
|
}
|
|
1299
1641
|
|
|
1300
1642
|
get termsOfService() {
|
|
1301
1643
|
return this._termsOfService;
|
|
1302
1644
|
}
|
|
1303
1645
|
|
|
1304
|
-
set
|
|
1646
|
+
set termsOfService(value) {
|
|
1305
1647
|
if (!value) return;
|
|
1306
|
-
this._termsOfService =
|
|
1648
|
+
this._termsOfService = vulnerableActivity.TOSAgreements.fromObject(value);
|
|
1307
1649
|
}
|
|
1308
1650
|
|
|
1309
1651
|
get curpDocument() {
|
|
1310
1652
|
return this._curpDocument;
|
|
1311
1653
|
}
|
|
1312
1654
|
|
|
1313
|
-
set
|
|
1655
|
+
set curpDocument(value) {
|
|
1314
1656
|
if (!value) return;
|
|
1315
|
-
this._curpDocument =
|
|
1657
|
+
this._curpDocument = vulnerableActivity.KYCFile.fromObject(value);
|
|
1316
1658
|
}
|
|
1317
1659
|
|
|
1318
1660
|
static fromObject = ({
|
|
@@ -1355,6 +1697,7 @@ class User {
|
|
|
1355
1697
|
stateOfBirth: obj.state_of_birth,
|
|
1356
1698
|
termsOfService: obj.terms_of_service,
|
|
1357
1699
|
updatedAt: obj.updated_at,
|
|
1700
|
+
userType: obj.user_type,
|
|
1358
1701
|
verificationId: obj.verification_id,
|
|
1359
1702
|
});
|
|
1360
1703
|
}
|
|
@@ -1540,6 +1883,7 @@ const getModelFromPath = (path, obj) => {
|
|
|
1540
1883
|
files: () => File.fromObject(obj),
|
|
1541
1884
|
kyc_validations: () => KYCValidations.fromObject(obj),
|
|
1542
1885
|
login_tokens: () => LoginToken.fromObject(obj),
|
|
1886
|
+
partners: () => Partner.fromObject(obj),
|
|
1543
1887
|
savings: () => Saving.fromObject(obj),
|
|
1544
1888
|
service_providers: () => ServiceProvider.fromObject(obj),
|
|
1545
1889
|
sessions: () => Session.fromObject(obj),
|
|
@@ -1699,7 +2043,7 @@ const Queryable = (SuperClass) =>
|
|
|
1699
2043
|
|
|
1700
2044
|
class AccountResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
1701
2045
|
constructor(client) {
|
|
1702
|
-
super('accounts',
|
|
2046
|
+
super('accounts', vulnerableActivity.AccountQuery, client);
|
|
1703
2047
|
}
|
|
1704
2048
|
}
|
|
1705
2049
|
|
|
@@ -1710,18 +2054,18 @@ class AlertResource extends mix(Resource).with(
|
|
|
1710
2054
|
Updateable,
|
|
1711
2055
|
) {
|
|
1712
2056
|
constructor(client) {
|
|
1713
|
-
super('alerts',
|
|
2057
|
+
super('alerts', vulnerableActivity.AlertQuery, client);
|
|
1714
2058
|
}
|
|
1715
2059
|
|
|
1716
|
-
async create(
|
|
2060
|
+
async create(req) {
|
|
1717
2061
|
const request = new walletTransactionRequest.AlertUpdateRequest(req);
|
|
1718
|
-
const alert = await this._create(request.
|
|
2062
|
+
const alert = await this._create(request.toCleanObject());
|
|
1719
2063
|
return alert;
|
|
1720
2064
|
}
|
|
1721
2065
|
|
|
1722
|
-
async update(
|
|
2066
|
+
async update(alertId, req) {
|
|
1723
2067
|
const request = new walletTransactionRequest.AlertUpdateRequest(req);
|
|
1724
|
-
const alert = await this._update(alertId, request.
|
|
2068
|
+
const alert = await this._update(alertId, request.toCleanObject());
|
|
1725
2069
|
return alert;
|
|
1726
2070
|
}
|
|
1727
2071
|
}
|
|
@@ -1734,7 +2078,7 @@ class ApiKeyResource extends mix(Resource).with(
|
|
|
1734
2078
|
Updateable,
|
|
1735
2079
|
) {
|
|
1736
2080
|
constructor(client) {
|
|
1737
|
-
super('api_keys',
|
|
2081
|
+
super('api_keys', vulnerableActivity.ApiKeyQuery, client);
|
|
1738
2082
|
}
|
|
1739
2083
|
|
|
1740
2084
|
async create() {
|
|
@@ -1788,7 +2132,7 @@ class ArpcResource extends mix(Resource).with(Creatable) {
|
|
|
1788
2132
|
|
|
1789
2133
|
class BalanceEntryResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
1790
2134
|
constructor(client) {
|
|
1791
|
-
super('balance_entries',
|
|
2135
|
+
super('balance_entries', vulnerableActivity.BalanceEntryQuery, client);
|
|
1792
2136
|
}
|
|
1793
2137
|
|
|
1794
2138
|
async relatedTransaction(relatedTransactionUri) {
|
|
@@ -1814,7 +2158,7 @@ class BalanceEntryResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
|
1814
2158
|
|
|
1815
2159
|
class BillPaymentResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
1816
2160
|
constructor(client) {
|
|
1817
|
-
super('bill_payments',
|
|
2161
|
+
super('bill_payments', vulnerableActivity.BillPaymentQuery, client);
|
|
1818
2162
|
}
|
|
1819
2163
|
|
|
1820
2164
|
async serviceProvider(providerUri) {
|
|
@@ -1832,7 +2176,7 @@ class BridegAccountResource extends mix(Resource).with(
|
|
|
1832
2176
|
Retrievable,
|
|
1833
2177
|
) {
|
|
1834
2178
|
constructor(client) {
|
|
1835
|
-
super('bridge/accounts',
|
|
2179
|
+
super('bridge/accounts', vulnerableActivity.BridgeAccountQuery, client);
|
|
1836
2180
|
}
|
|
1837
2181
|
|
|
1838
2182
|
async update({ userId = 'me', ...req }) {
|
|
@@ -1847,13 +2191,13 @@ class BridgeBankAccountResource extends mix(Resource).with(
|
|
|
1847
2191
|
Retrievable,
|
|
1848
2192
|
) {
|
|
1849
2193
|
constructor(client) {
|
|
1850
|
-
super('bridge/bank_accounts',
|
|
2194
|
+
super('bridge/bank_accounts', vulnerableActivity.BridgeBankAccountQuery, client);
|
|
1851
2195
|
}
|
|
1852
2196
|
}
|
|
1853
2197
|
|
|
1854
2198
|
class BridgeClabeResource extends mix(Resource).with(Queryable) {
|
|
1855
2199
|
constructor(client) {
|
|
1856
|
-
super('bridge/clabes',
|
|
2200
|
+
super('bridge/clabes', vulnerableActivity.BridgeQuery, client);
|
|
1857
2201
|
}
|
|
1858
2202
|
}
|
|
1859
2203
|
|
|
@@ -1862,7 +2206,7 @@ class BridgeTransactionResource extends mix(Resource).with(
|
|
|
1862
2206
|
Retrievable,
|
|
1863
2207
|
) {
|
|
1864
2208
|
constructor(client) {
|
|
1865
|
-
super('bridge/transactions',
|
|
2209
|
+
super('bridge/transactions', vulnerableActivity.BridgeTransactionQuery, client);
|
|
1866
2210
|
}
|
|
1867
2211
|
}
|
|
1868
2212
|
|
|
@@ -1892,7 +2236,7 @@ class CardResource extends mix(Resource).with(
|
|
|
1892
2236
|
Updateable,
|
|
1893
2237
|
) {
|
|
1894
2238
|
constructor(client) {
|
|
1895
|
-
super('cards',
|
|
2239
|
+
super('cards', vulnerableActivity.CardsQuery, client);
|
|
1896
2240
|
}
|
|
1897
2241
|
|
|
1898
2242
|
async create(userId, issuer, fundingType) {
|
|
@@ -1918,7 +2262,7 @@ class CardTransactionResource extends mix(Resource).with(
|
|
|
1918
2262
|
Retrievable,
|
|
1919
2263
|
) {
|
|
1920
2264
|
constructor(client) {
|
|
1921
|
-
super('card_transactions',
|
|
2265
|
+
super('card_transactions', vulnerableActivity.CardTransactionQuery, client);
|
|
1922
2266
|
}
|
|
1923
2267
|
|
|
1924
2268
|
async relatedCard(relatedCardUri) {
|
|
@@ -1970,7 +2314,7 @@ class CardValidationResource extends mix(Resource).with(Creatable) {
|
|
|
1970
2314
|
|
|
1971
2315
|
class CommissionResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
1972
2316
|
constructor(client) {
|
|
1973
|
-
super('commissions',
|
|
2317
|
+
super('commissions', vulnerableActivity.QueryParams, client);
|
|
1974
2318
|
}
|
|
1975
2319
|
|
|
1976
2320
|
async relatedTransaction(relatedTransactionUri) {
|
|
@@ -1984,7 +2328,7 @@ class CommissionResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
|
1984
2328
|
|
|
1985
2329
|
class DepositResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
1986
2330
|
constructor(client) {
|
|
1987
|
-
super('deposits',
|
|
2331
|
+
super('deposits', vulnerableActivity.DepositQuery, client);
|
|
1988
2332
|
}
|
|
1989
2333
|
|
|
1990
2334
|
async source(sourceUri) {
|
|
@@ -2045,6 +2389,29 @@ class LoginTokenResource extends mix(Resource).with(Creatable) {
|
|
|
2045
2389
|
}
|
|
2046
2390
|
}
|
|
2047
2391
|
|
|
2392
|
+
class PartnerResource extends mix(Resource).with(
|
|
2393
|
+
Creatable,
|
|
2394
|
+
Queryable,
|
|
2395
|
+
Updateable,
|
|
2396
|
+
Retrievable,
|
|
2397
|
+
) {
|
|
2398
|
+
constructor(client) {
|
|
2399
|
+
super('partners', vulnerableActivity.PartnerQuery, client);
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
async create(req) {
|
|
2403
|
+
const request = new walletTransactionRequest.PartnerUserRequest(req);
|
|
2404
|
+
const partner = await this._create(request.toCleanObject());
|
|
2405
|
+
return partner;
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
async update(partnerId, req) {
|
|
2409
|
+
const request = new walletTransactionRequest.PartnerUserRequest(req);
|
|
2410
|
+
const partner = await this._update(partnerId, request.toCleanObject());
|
|
2411
|
+
return partner;
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2048
2415
|
class SavingResource extends mix(Resource).with(
|
|
2049
2416
|
Creatable,
|
|
2050
2417
|
Deactivable,
|
|
@@ -2053,7 +2420,7 @@ class SavingResource extends mix(Resource).with(
|
|
|
2053
2420
|
Updateable,
|
|
2054
2421
|
) {
|
|
2055
2422
|
constructor(client) {
|
|
2056
|
-
super('savings',
|
|
2423
|
+
super('savings', vulnerableActivity.WalletQuery, client);
|
|
2057
2424
|
}
|
|
2058
2425
|
|
|
2059
2426
|
async create(category, goalAmount, goalDate, name) {
|
|
@@ -2079,7 +2446,7 @@ class ServiceProviderResource extends mix(Resource).with(
|
|
|
2079
2446
|
Retrievable,
|
|
2080
2447
|
) {
|
|
2081
2448
|
constructor(client) {
|
|
2082
|
-
super('service_providers',
|
|
2449
|
+
super('service_providers', vulnerableActivity.QueryParams, client);
|
|
2083
2450
|
}
|
|
2084
2451
|
}
|
|
2085
2452
|
|
|
@@ -2108,7 +2475,7 @@ class SessionResource extends mix(Resource).with(
|
|
|
2108
2475
|
|
|
2109
2476
|
class StatementResource extends mix(Resource).with(Downlodable, Queryable) {
|
|
2110
2477
|
constructor(client) {
|
|
2111
|
-
super('statements',
|
|
2478
|
+
super('statements', vulnerableActivity.StatementQuery, client);
|
|
2112
2479
|
}
|
|
2113
2480
|
|
|
2114
2481
|
async pdf(id) {
|
|
@@ -2128,7 +2495,7 @@ class TransferResource extends mix(Resource).with(
|
|
|
2128
2495
|
Retrievable,
|
|
2129
2496
|
) {
|
|
2130
2497
|
constructor(client) {
|
|
2131
|
-
super('transfers',
|
|
2498
|
+
super('transfers', vulnerableActivity.TransferQuery, client);
|
|
2132
2499
|
}
|
|
2133
2500
|
|
|
2134
2501
|
async destination(destinationUri) {
|
|
@@ -2254,7 +2621,7 @@ class UserResourse extends mix(Resource).with(
|
|
|
2254
2621
|
Retrievable,
|
|
2255
2622
|
) {
|
|
2256
2623
|
constructor(client) {
|
|
2257
|
-
super('users',
|
|
2624
|
+
super('users', vulnerableActivity.UserQuery, client);
|
|
2258
2625
|
}
|
|
2259
2626
|
|
|
2260
2627
|
async update({ userId = 'me', ...req }) {
|
|
@@ -2288,7 +2655,7 @@ class WalletTransactionsResource extends mix(Resource).with(
|
|
|
2288
2655
|
Retrievable,
|
|
2289
2656
|
) {
|
|
2290
2657
|
constructor(client) {
|
|
2291
|
-
super('wallet_transactions',
|
|
2658
|
+
super('wallet_transactions', vulnerableActivity.WalletTransactionQuery, client);
|
|
2292
2659
|
}
|
|
2293
2660
|
|
|
2294
2661
|
async create(amount, transactionType, walletUri) {
|
|
@@ -2315,7 +2682,7 @@ class WhatsAppTransferResource extends mix(Resource).with(
|
|
|
2315
2682
|
Retrievable,
|
|
2316
2683
|
) {
|
|
2317
2684
|
constructor(client) {
|
|
2318
|
-
super('whatsapp_transfers',
|
|
2685
|
+
super('whatsapp_transfers', vulnerableActivity.QueryParams, client);
|
|
2319
2686
|
}
|
|
2320
2687
|
|
|
2321
2688
|
async accountDestination(destinationUri) {
|
|
@@ -2359,6 +2726,7 @@ class Cuenca {
|
|
|
2359
2726
|
this.files = new FileResource(client);
|
|
2360
2727
|
this.kycValidations = new KYCValidationsResource(client);
|
|
2361
2728
|
this.loginTokens = new LoginTokenResource(client);
|
|
2729
|
+
this.partners = new PartnerResource(client);
|
|
2362
2730
|
this.savings = new SavingResource(client);
|
|
2363
2731
|
this.serviceProviders = new ServiceProviderResource(client);
|
|
2364
2732
|
this.sessions = new SessionResource(client);
|