@cuenca-mx/cuenca-js 0.0.14-dev9 → 1.0.0
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-7e8b28c6.mjs → data-27fc844b.mjs} +18 -6
- package/build/{data-92aab1cc.cjs → data-6c2897da.cjs} +19 -6
- package/build/index.cjs +409 -68
- package/build/index.mjs +379 -38
- package/build/requests/index.cjs +3 -2
- package/build/requests/index.mjs +3 -3
- package/build/types/index.cjs +69 -28
- package/build/types/index.mjs +36 -2
- package/build/umd/cuenca.umd.js +1 -1
- package/build/{identities-4686dc22.mjs → vulnerableActivity-70ff062e.mjs} +466 -214
- package/build/{identities-240756bd.cjs → vulnerableActivity-88488ee4.cjs} +475 -215
- package/build/{walletTransactionRequest-da986c71.cjs → walletTransactionRequest-534ea750.cjs} +680 -204
- package/build/{walletTransactionRequest-d05a25a9.mjs → walletTransactionRequest-80f0424d.mjs} +680 -205
- 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
|
|
29
|
+
const name="@cuenca-mx/cuenca-js";const version="1.0.0";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,7 +246,7 @@ class Account {
|
|
|
246
246
|
|
|
247
247
|
class Alert {
|
|
248
248
|
constructor({
|
|
249
|
-
|
|
249
|
+
agent,
|
|
250
250
|
accountNumber,
|
|
251
251
|
actualPeriodCount,
|
|
252
252
|
actualPeriodSum,
|
|
@@ -275,7 +275,7 @@ class Alert {
|
|
|
275
275
|
this.accountNumber = accountNumber;
|
|
276
276
|
this.actualPeriodCount = actualPeriodCount;
|
|
277
277
|
this.actualPeriodSum = actualPeriodSum;
|
|
278
|
-
this.
|
|
278
|
+
this.agent = agent;
|
|
279
279
|
this.aggregationType = aggregationType;
|
|
280
280
|
this.comments = comments;
|
|
281
281
|
this.committeeMeetingDate = data.dateToUTC(committeeMeetingDate);
|
|
@@ -293,14 +293,14 @@ class Alert {
|
|
|
293
293
|
this.sourceType = data.enumValueFromString(data.SourceAlertType, sourceType);
|
|
294
294
|
this.transactionDate = data.dateToUTC(transactionDate);
|
|
295
295
|
this.type = data.enumValueFromString(data.MLIndicatorType, type);
|
|
296
|
-
this.typeOfFilter = data.enumValueFromString(data.
|
|
296
|
+
this.typeOfFilter = data.enumValueFromString(data.PLDFilterType, typeOfFilter);
|
|
297
297
|
this.updatedAt = data.dateToUTC(updatedAt);
|
|
298
298
|
this.userId = userId;
|
|
299
|
-
this.
|
|
299
|
+
this.changeLog = changeLog;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
static fromObject = ({
|
|
303
|
-
|
|
303
|
+
agent,
|
|
304
304
|
comments,
|
|
305
305
|
description,
|
|
306
306
|
id,
|
|
@@ -312,7 +312,7 @@ class Alert {
|
|
|
312
312
|
...obj
|
|
313
313
|
}) =>
|
|
314
314
|
new Alert({
|
|
315
|
-
|
|
315
|
+
agent,
|
|
316
316
|
comments,
|
|
317
317
|
description,
|
|
318
318
|
id,
|
|
@@ -343,9 +343,9 @@ class Alert {
|
|
|
343
343
|
return this._changeLog;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
set
|
|
347
|
-
if (!value ||
|
|
348
|
-
this._changeLog =
|
|
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
349
|
}
|
|
350
350
|
}
|
|
351
351
|
|
|
@@ -505,7 +505,7 @@ class BridgeAccount {
|
|
|
505
505
|
this.updatedAt = data.dateToUTC(updatedAt);
|
|
506
506
|
this.emailAddress = emailAddress;
|
|
507
507
|
this.clientClabe = clientClabe;
|
|
508
|
-
this.
|
|
508
|
+
this.govtId = govtId;
|
|
509
509
|
this.names = names;
|
|
510
510
|
this.firstSurname = firstSurname;
|
|
511
511
|
this.secondSurname = secondSurname;
|
|
@@ -516,10 +516,10 @@ class BridgeAccount {
|
|
|
516
516
|
this.userId = userId;
|
|
517
517
|
this.gender = gender;
|
|
518
518
|
this.phoneNumber = phoneNumber;
|
|
519
|
-
this.
|
|
519
|
+
this.proofOfAddress = proofOfAddress;
|
|
520
520
|
this.status = data.enumValueFromString(data.BridgeAccountStatus, status);
|
|
521
|
-
this.
|
|
522
|
-
this.
|
|
521
|
+
this.termsOfService = termsOfService;
|
|
522
|
+
this.address = address;
|
|
523
523
|
}
|
|
524
524
|
|
|
525
525
|
static fromObject = ({ status, address, ...obj }) =>
|
|
@@ -550,36 +550,36 @@ class BridgeAccount {
|
|
|
550
550
|
return this._address;
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
-
set
|
|
553
|
+
set address(value) {
|
|
554
554
|
if (!value || Object.keys(value).length === 0) return;
|
|
555
|
-
this._address =
|
|
555
|
+
this._address = vulnerableActivity.Address.fromObject(value);
|
|
556
556
|
}
|
|
557
557
|
|
|
558
558
|
get proofOfAddress() {
|
|
559
559
|
return this._proofOfAddress;
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
set
|
|
562
|
+
set proofOfAddress(value) {
|
|
563
563
|
if (!value || Object.keys(value).length === 0) return;
|
|
564
|
-
this._proofOfAddress =
|
|
564
|
+
this._proofOfAddress = vulnerableActivity.KYCFile.fromObject(value);
|
|
565
565
|
}
|
|
566
566
|
|
|
567
567
|
get govtId() {
|
|
568
568
|
return this._govtId;
|
|
569
569
|
}
|
|
570
570
|
|
|
571
|
-
set
|
|
571
|
+
set govtId(value) {
|
|
572
572
|
if (!value || Object.keys(value).length === 0) return;
|
|
573
|
-
this._govtId =
|
|
573
|
+
this._govtId = vulnerableActivity.KYCFile.fromObject(value);
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
get termsOfService() {
|
|
577
577
|
return this._termsOfService;
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
-
set
|
|
580
|
+
set termsOfService(value) {
|
|
581
581
|
if (!value || Object.keys(value).length === 0) return;
|
|
582
|
-
this._termsOfService =
|
|
582
|
+
this._termsOfService = vulnerableActivity.TOSAgreements.fromObject(value);
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
585
|
|
|
@@ -1046,6 +1046,319 @@ class LoginToken {
|
|
|
1046
1046
|
static fromObject = ({ id }) => new LoginToken({ id });
|
|
1047
1047
|
}
|
|
1048
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
|
+
meta,
|
|
1212
|
+
nationality,
|
|
1213
|
+
platformId,
|
|
1214
|
+
phoneNumber,
|
|
1215
|
+
requiredLevel,
|
|
1216
|
+
status,
|
|
1217
|
+
createdAt,
|
|
1218
|
+
updatedAt,
|
|
1219
|
+
userType,
|
|
1220
|
+
});
|
|
1221
|
+
this.audit = audit;
|
|
1222
|
+
this.businessModel = businessModel;
|
|
1223
|
+
this.businessName = businessName;
|
|
1224
|
+
this.businessDetails = businessDetails;
|
|
1225
|
+
this.documentationUrl = documentationUrl;
|
|
1226
|
+
this.incorporationDate = data.dateToUTC(incorporationDate);
|
|
1227
|
+
this.externalAccount = externalAccount;
|
|
1228
|
+
this.folio = folio;
|
|
1229
|
+
this.legalName = legalName;
|
|
1230
|
+
this.license = license;
|
|
1231
|
+
this.shareholders = shareholders;
|
|
1232
|
+
this.legalRepresentatives = legalRepresentatives;
|
|
1233
|
+
this.transactionalProfile = transactionalProfile;
|
|
1234
|
+
this.userId = userId;
|
|
1235
|
+
this.vulnerableActivity = vulnerableActivity;
|
|
1236
|
+
this.webSite = webSite;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
get shareholders() {
|
|
1240
|
+
return this._shareholders;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
set shareholders(value) {
|
|
1244
|
+
if (!value) return;
|
|
1245
|
+
this._shareholders = value.map((sh) => vulnerableActivity.ShareholderMoral.fromObject(sh));
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
get legalRepresentatives() {
|
|
1249
|
+
return this._legalRepresentatives;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
set legalRepresentatives(value) {
|
|
1253
|
+
if (!value) return;
|
|
1254
|
+
this._legalRepresentatives = value.map((lr) =>
|
|
1255
|
+
vulnerableActivity.LegalRepresentatives.fromObject(lr),
|
|
1256
|
+
);
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
get externalAccount() {
|
|
1260
|
+
return this._externalAccount;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
set externalAccount(value) {
|
|
1264
|
+
if (!value) return;
|
|
1265
|
+
this._externalAccount = vulnerableActivity.ExternalAccount.fromObject(value);
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
get vulnerableActivity() {
|
|
1269
|
+
return this._vulnerableActivity;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
set vulnerableActivity(value) {
|
|
1273
|
+
if (!value) return;
|
|
1274
|
+
this._vulnerableActivity = vulnerableActivity.VulnerableActivity.fromObject(value);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
get audit() {
|
|
1278
|
+
return this._audit;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
set audit(value) {
|
|
1282
|
+
if (!value) return;
|
|
1283
|
+
this._audit = vulnerableActivity.Audit.fromObject(value);
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
get license() {
|
|
1287
|
+
return this._license;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
set license(value) {
|
|
1291
|
+
if (!value) return;
|
|
1292
|
+
this._license = vulnerableActivity.License.fromObject(value);
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
get transactionalProfile() {
|
|
1296
|
+
return this._transactionalProfile;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
set transactionalProfile(value) {
|
|
1300
|
+
if (!value) return;
|
|
1301
|
+
this._transactionalProfile = TransactionalProfile.fromObject(value);
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
get businessDetails() {
|
|
1305
|
+
return this._businessDetails;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
set businessDetails(value) {
|
|
1309
|
+
if (!value) return;
|
|
1310
|
+
this._businessDetails = vulnerableActivity.BusinessDetails.fromObject(value);
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
static fromObject = ({
|
|
1314
|
+
audit,
|
|
1315
|
+
address,
|
|
1316
|
+
clabe,
|
|
1317
|
+
folio,
|
|
1318
|
+
id,
|
|
1319
|
+
level,
|
|
1320
|
+
license,
|
|
1321
|
+
nationality,
|
|
1322
|
+
rfc,
|
|
1323
|
+
status,
|
|
1324
|
+
shareholders,
|
|
1325
|
+
...obj
|
|
1326
|
+
}) =>
|
|
1327
|
+
new Partner({
|
|
1328
|
+
address,
|
|
1329
|
+
audit,
|
|
1330
|
+
clabe,
|
|
1331
|
+
folio,
|
|
1332
|
+
id,
|
|
1333
|
+
level,
|
|
1334
|
+
license,
|
|
1335
|
+
nationality,
|
|
1336
|
+
rfc,
|
|
1337
|
+
shareholders,
|
|
1338
|
+
status,
|
|
1339
|
+
legalName: obj.legal_name,
|
|
1340
|
+
legalRepresentatives: obj.legal_representatives,
|
|
1341
|
+
businessModel: obj.business_model,
|
|
1342
|
+
businessName: obj.business_name,
|
|
1343
|
+
businessDetails: obj.business_details,
|
|
1344
|
+
createdAt: obj.created_at,
|
|
1345
|
+
documentationUrl: obj.documentation_url,
|
|
1346
|
+
emailAddress: obj.email_address,
|
|
1347
|
+
externalAccount: obj.external_account,
|
|
1348
|
+
incorporationDate: obj.incorporation_date,
|
|
1349
|
+
meta: obj.meta,
|
|
1350
|
+
phoneNumber: obj.phone_number,
|
|
1351
|
+
platformId: obj.platform_id,
|
|
1352
|
+
requiredLevel: obj.required_level,
|
|
1353
|
+
transactionalProfile: obj.transactional_profile,
|
|
1354
|
+
updatedAt: obj.updated_at,
|
|
1355
|
+
userId: obj.user_id,
|
|
1356
|
+
userType: obj.user_type,
|
|
1357
|
+
vulnerableActivity: obj.vulnerable_activity,
|
|
1358
|
+
webSite: obj.web_site,
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1049
1362
|
class Wallet {
|
|
1050
1363
|
constructor({ balance, createdAt, deactivatedAt, id, userId, updatedAt }) {
|
|
1051
1364
|
this.balance = balance;
|
|
@@ -1253,9 +1566,10 @@ class User {
|
|
|
1253
1566
|
status,
|
|
1254
1567
|
termsOfService,
|
|
1255
1568
|
updatedAt,
|
|
1569
|
+
userType,
|
|
1256
1570
|
verificationId,
|
|
1257
1571
|
}) {
|
|
1258
|
-
this.
|
|
1572
|
+
this.address = address;
|
|
1259
1573
|
this.blacklistValidationStatus = data.enumValueFromString(
|
|
1260
1574
|
data.VerificationStatus,
|
|
1261
1575
|
blacklistValidationStatus,
|
|
@@ -1264,7 +1578,7 @@ class User {
|
|
|
1264
1578
|
this.countryOfBirth = countryOfBirth;
|
|
1265
1579
|
this.createdAt = data.dateToUTC(createdAt);
|
|
1266
1580
|
this.curp = curp;
|
|
1267
|
-
this.
|
|
1581
|
+
this.curpDocument = curpDocument;
|
|
1268
1582
|
this.dateOfBirth = dateOfBirth;
|
|
1269
1583
|
this.emailAddress = emailAddress;
|
|
1270
1584
|
this.firstSurname = firstSurname;
|
|
@@ -1274,16 +1588,17 @@ class User {
|
|
|
1274
1588
|
this.names = names;
|
|
1275
1589
|
this.nationality = nationality;
|
|
1276
1590
|
this.phoneNumber = phoneNumber;
|
|
1277
|
-
this.
|
|
1278
|
-
this.
|
|
1279
|
-
this.
|
|
1591
|
+
this.govtId = govtId;
|
|
1592
|
+
this.proofOfAddress = proofOfAddress;
|
|
1593
|
+
this.proofOfLife = proofOfLife;
|
|
1280
1594
|
this.requiredLevel = requiredLevel;
|
|
1281
1595
|
this.rfc = rfc;
|
|
1282
1596
|
this.secondSurname = secondSurname;
|
|
1283
1597
|
this.stateOfBirth = stateOfBirth;
|
|
1284
1598
|
this.status = data.enumValueFromString(data.UserStatus, status);
|
|
1285
|
-
this.
|
|
1599
|
+
this.termsOfService = termsOfService;
|
|
1286
1600
|
this.updatedAt = data.dateToUTC(updatedAt);
|
|
1601
|
+
this.userType = userType;
|
|
1287
1602
|
this.verificationId = verificationId;
|
|
1288
1603
|
}
|
|
1289
1604
|
|
|
@@ -1291,54 +1606,54 @@ class User {
|
|
|
1291
1606
|
return this._address;
|
|
1292
1607
|
}
|
|
1293
1608
|
|
|
1294
|
-
set
|
|
1609
|
+
set address(value) {
|
|
1295
1610
|
if (!value) return;
|
|
1296
|
-
this._address =
|
|
1611
|
+
this._address = vulnerableActivity.Address.fromObject(value);
|
|
1297
1612
|
}
|
|
1298
1613
|
|
|
1299
1614
|
get proofOfAddress() {
|
|
1300
1615
|
return this._proofOfAddress;
|
|
1301
1616
|
}
|
|
1302
1617
|
|
|
1303
|
-
set
|
|
1618
|
+
set proofOfAddress(value) {
|
|
1304
1619
|
if (!value) return;
|
|
1305
|
-
this._proofOfAddress =
|
|
1620
|
+
this._proofOfAddress = vulnerableActivity.KYCFile.fromObject(value);
|
|
1306
1621
|
}
|
|
1307
1622
|
|
|
1308
1623
|
get proofOfLife() {
|
|
1309
1624
|
return this._proofOfLife;
|
|
1310
1625
|
}
|
|
1311
1626
|
|
|
1312
|
-
set
|
|
1627
|
+
set proofOfLife(value) {
|
|
1313
1628
|
if (!value) return;
|
|
1314
|
-
this._proofOfLife =
|
|
1629
|
+
this._proofOfLife = vulnerableActivity.KYCFile.fromObject(value);
|
|
1315
1630
|
}
|
|
1316
1631
|
|
|
1317
1632
|
get govtId() {
|
|
1318
1633
|
return this._govtId;
|
|
1319
1634
|
}
|
|
1320
1635
|
|
|
1321
|
-
set
|
|
1636
|
+
set govtId(value) {
|
|
1322
1637
|
if (!value) return;
|
|
1323
|
-
this._govtId =
|
|
1638
|
+
this._govtId = vulnerableActivity.KYCFile.fromObject(value);
|
|
1324
1639
|
}
|
|
1325
1640
|
|
|
1326
1641
|
get termsOfService() {
|
|
1327
1642
|
return this._termsOfService;
|
|
1328
1643
|
}
|
|
1329
1644
|
|
|
1330
|
-
set
|
|
1645
|
+
set termsOfService(value) {
|
|
1331
1646
|
if (!value) return;
|
|
1332
|
-
this._termsOfService =
|
|
1647
|
+
this._termsOfService = vulnerableActivity.TOSAgreements.fromObject(value);
|
|
1333
1648
|
}
|
|
1334
1649
|
|
|
1335
1650
|
get curpDocument() {
|
|
1336
1651
|
return this._curpDocument;
|
|
1337
1652
|
}
|
|
1338
1653
|
|
|
1339
|
-
set
|
|
1654
|
+
set curpDocument(value) {
|
|
1340
1655
|
if (!value) return;
|
|
1341
|
-
this._curpDocument =
|
|
1656
|
+
this._curpDocument = vulnerableActivity.KYCFile.fromObject(value);
|
|
1342
1657
|
}
|
|
1343
1658
|
|
|
1344
1659
|
static fromObject = ({
|
|
@@ -1381,6 +1696,7 @@ class User {
|
|
|
1381
1696
|
stateOfBirth: obj.state_of_birth,
|
|
1382
1697
|
termsOfService: obj.terms_of_service,
|
|
1383
1698
|
updatedAt: obj.updated_at,
|
|
1699
|
+
userType: obj.user_type,
|
|
1384
1700
|
verificationId: obj.verification_id,
|
|
1385
1701
|
});
|
|
1386
1702
|
}
|
|
@@ -1566,6 +1882,7 @@ const getModelFromPath = (path, obj) => {
|
|
|
1566
1882
|
files: () => File.fromObject(obj),
|
|
1567
1883
|
kyc_validations: () => KYCValidations.fromObject(obj),
|
|
1568
1884
|
login_tokens: () => LoginToken.fromObject(obj),
|
|
1885
|
+
partners: () => Partner.fromObject(obj),
|
|
1569
1886
|
savings: () => Saving.fromObject(obj),
|
|
1570
1887
|
service_providers: () => ServiceProvider.fromObject(obj),
|
|
1571
1888
|
sessions: () => Session.fromObject(obj),
|
|
@@ -1725,7 +2042,7 @@ const Queryable = (SuperClass) =>
|
|
|
1725
2042
|
|
|
1726
2043
|
class AccountResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
1727
2044
|
constructor(client) {
|
|
1728
|
-
super('accounts',
|
|
2045
|
+
super('accounts', vulnerableActivity.AccountQuery, client);
|
|
1729
2046
|
}
|
|
1730
2047
|
}
|
|
1731
2048
|
|
|
@@ -1736,18 +2053,18 @@ class AlertResource extends mix(Resource).with(
|
|
|
1736
2053
|
Updateable,
|
|
1737
2054
|
) {
|
|
1738
2055
|
constructor(client) {
|
|
1739
|
-
super('alerts',
|
|
2056
|
+
super('alerts', vulnerableActivity.AlertQuery, client);
|
|
1740
2057
|
}
|
|
1741
2058
|
|
|
1742
|
-
async create(
|
|
1743
|
-
const request = new walletTransactionRequest.AlertUpdateRequest(
|
|
1744
|
-
const alert = await this._create(request.
|
|
2059
|
+
async create(req) {
|
|
2060
|
+
const request = new walletTransactionRequest.AlertUpdateRequest(req);
|
|
2061
|
+
const alert = await this._create(request.toCleanObject());
|
|
1745
2062
|
return alert;
|
|
1746
2063
|
}
|
|
1747
2064
|
|
|
1748
|
-
async update(alertId,
|
|
2065
|
+
async update(alertId, req) {
|
|
1749
2066
|
const request = new walletTransactionRequest.AlertUpdateRequest(req);
|
|
1750
|
-
const alert = await this._update(alertId, request.
|
|
2067
|
+
const alert = await this._update(alertId, request.toCleanObject());
|
|
1751
2068
|
return alert;
|
|
1752
2069
|
}
|
|
1753
2070
|
}
|
|
@@ -1760,7 +2077,7 @@ class ApiKeyResource extends mix(Resource).with(
|
|
|
1760
2077
|
Updateable,
|
|
1761
2078
|
) {
|
|
1762
2079
|
constructor(client) {
|
|
1763
|
-
super('api_keys',
|
|
2080
|
+
super('api_keys', vulnerableActivity.ApiKeyQuery, client);
|
|
1764
2081
|
}
|
|
1765
2082
|
|
|
1766
2083
|
async create() {
|
|
@@ -1814,7 +2131,7 @@ class ArpcResource extends mix(Resource).with(Creatable) {
|
|
|
1814
2131
|
|
|
1815
2132
|
class BalanceEntryResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
1816
2133
|
constructor(client) {
|
|
1817
|
-
super('balance_entries',
|
|
2134
|
+
super('balance_entries', vulnerableActivity.BalanceEntryQuery, client);
|
|
1818
2135
|
}
|
|
1819
2136
|
|
|
1820
2137
|
async relatedTransaction(relatedTransactionUri) {
|
|
@@ -1840,7 +2157,7 @@ class BalanceEntryResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
|
1840
2157
|
|
|
1841
2158
|
class BillPaymentResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
1842
2159
|
constructor(client) {
|
|
1843
|
-
super('bill_payments',
|
|
2160
|
+
super('bill_payments', vulnerableActivity.BillPaymentQuery, client);
|
|
1844
2161
|
}
|
|
1845
2162
|
|
|
1846
2163
|
async serviceProvider(providerUri) {
|
|
@@ -1858,7 +2175,7 @@ class BridegAccountResource extends mix(Resource).with(
|
|
|
1858
2175
|
Retrievable,
|
|
1859
2176
|
) {
|
|
1860
2177
|
constructor(client) {
|
|
1861
|
-
super('bridge/accounts',
|
|
2178
|
+
super('bridge/accounts', vulnerableActivity.BridgeAccountQuery, client);
|
|
1862
2179
|
}
|
|
1863
2180
|
|
|
1864
2181
|
async update({ userId = 'me', ...req }) {
|
|
@@ -1873,13 +2190,13 @@ class BridgeBankAccountResource extends mix(Resource).with(
|
|
|
1873
2190
|
Retrievable,
|
|
1874
2191
|
) {
|
|
1875
2192
|
constructor(client) {
|
|
1876
|
-
super('bridge/bank_accounts',
|
|
2193
|
+
super('bridge/bank_accounts', vulnerableActivity.BridgeBankAccountQuery, client);
|
|
1877
2194
|
}
|
|
1878
2195
|
}
|
|
1879
2196
|
|
|
1880
2197
|
class BridgeClabeResource extends mix(Resource).with(Queryable) {
|
|
1881
2198
|
constructor(client) {
|
|
1882
|
-
super('bridge/clabes',
|
|
2199
|
+
super('bridge/clabes', vulnerableActivity.BridgeQuery, client);
|
|
1883
2200
|
}
|
|
1884
2201
|
}
|
|
1885
2202
|
|
|
@@ -1888,7 +2205,7 @@ class BridgeTransactionResource extends mix(Resource).with(
|
|
|
1888
2205
|
Retrievable,
|
|
1889
2206
|
) {
|
|
1890
2207
|
constructor(client) {
|
|
1891
|
-
super('bridge/transactions',
|
|
2208
|
+
super('bridge/transactions', vulnerableActivity.BridgeTransactionQuery, client);
|
|
1892
2209
|
}
|
|
1893
2210
|
}
|
|
1894
2211
|
|
|
@@ -1918,7 +2235,7 @@ class CardResource extends mix(Resource).with(
|
|
|
1918
2235
|
Updateable,
|
|
1919
2236
|
) {
|
|
1920
2237
|
constructor(client) {
|
|
1921
|
-
super('cards',
|
|
2238
|
+
super('cards', vulnerableActivity.CardsQuery, client);
|
|
1922
2239
|
}
|
|
1923
2240
|
|
|
1924
2241
|
async create(userId, issuer, fundingType) {
|
|
@@ -1944,7 +2261,7 @@ class CardTransactionResource extends mix(Resource).with(
|
|
|
1944
2261
|
Retrievable,
|
|
1945
2262
|
) {
|
|
1946
2263
|
constructor(client) {
|
|
1947
|
-
super('card_transactions',
|
|
2264
|
+
super('card_transactions', vulnerableActivity.CardTransactionQuery, client);
|
|
1948
2265
|
}
|
|
1949
2266
|
|
|
1950
2267
|
async relatedCard(relatedCardUri) {
|
|
@@ -1996,7 +2313,7 @@ class CardValidationResource extends mix(Resource).with(Creatable) {
|
|
|
1996
2313
|
|
|
1997
2314
|
class CommissionResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
1998
2315
|
constructor(client) {
|
|
1999
|
-
super('commissions',
|
|
2316
|
+
super('commissions', vulnerableActivity.QueryParams, client);
|
|
2000
2317
|
}
|
|
2001
2318
|
|
|
2002
2319
|
async relatedTransaction(relatedTransactionUri) {
|
|
@@ -2010,7 +2327,7 @@ class CommissionResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
|
2010
2327
|
|
|
2011
2328
|
class DepositResource extends mix(Resource).with(Queryable, Retrievable) {
|
|
2012
2329
|
constructor(client) {
|
|
2013
|
-
super('deposits',
|
|
2330
|
+
super('deposits', vulnerableActivity.DepositQuery, client);
|
|
2014
2331
|
}
|
|
2015
2332
|
|
|
2016
2333
|
async source(sourceUri) {
|
|
@@ -2071,6 +2388,29 @@ class LoginTokenResource extends mix(Resource).with(Creatable) {
|
|
|
2071
2388
|
}
|
|
2072
2389
|
}
|
|
2073
2390
|
|
|
2391
|
+
class PartnerResource extends mix(Resource).with(
|
|
2392
|
+
Creatable,
|
|
2393
|
+
Queryable,
|
|
2394
|
+
Updateable,
|
|
2395
|
+
Retrievable,
|
|
2396
|
+
) {
|
|
2397
|
+
constructor(client) {
|
|
2398
|
+
super('partners', vulnerableActivity.PartnerQuery, client);
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2401
|
+
async create(req) {
|
|
2402
|
+
const request = new walletTransactionRequest.PartnerUserRequest(req);
|
|
2403
|
+
const partner = await this._create(request.toCleanObject());
|
|
2404
|
+
return partner;
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
async update(partnerId, req) {
|
|
2408
|
+
const request = new walletTransactionRequest.PartnerUserRequest(req);
|
|
2409
|
+
const partner = await this._update(partnerId, request.toCleanObject());
|
|
2410
|
+
return partner;
|
|
2411
|
+
}
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2074
2414
|
class SavingResource extends mix(Resource).with(
|
|
2075
2415
|
Creatable,
|
|
2076
2416
|
Deactivable,
|
|
@@ -2079,7 +2419,7 @@ class SavingResource extends mix(Resource).with(
|
|
|
2079
2419
|
Updateable,
|
|
2080
2420
|
) {
|
|
2081
2421
|
constructor(client) {
|
|
2082
|
-
super('savings',
|
|
2422
|
+
super('savings', vulnerableActivity.WalletQuery, client);
|
|
2083
2423
|
}
|
|
2084
2424
|
|
|
2085
2425
|
async create(category, goalAmount, goalDate, name) {
|
|
@@ -2105,7 +2445,7 @@ class ServiceProviderResource extends mix(Resource).with(
|
|
|
2105
2445
|
Retrievable,
|
|
2106
2446
|
) {
|
|
2107
2447
|
constructor(client) {
|
|
2108
|
-
super('service_providers',
|
|
2448
|
+
super('service_providers', vulnerableActivity.QueryParams, client);
|
|
2109
2449
|
}
|
|
2110
2450
|
}
|
|
2111
2451
|
|
|
@@ -2134,7 +2474,7 @@ class SessionResource extends mix(Resource).with(
|
|
|
2134
2474
|
|
|
2135
2475
|
class StatementResource extends mix(Resource).with(Downlodable, Queryable) {
|
|
2136
2476
|
constructor(client) {
|
|
2137
|
-
super('statements',
|
|
2477
|
+
super('statements', vulnerableActivity.StatementQuery, client);
|
|
2138
2478
|
}
|
|
2139
2479
|
|
|
2140
2480
|
async pdf(id) {
|
|
@@ -2154,7 +2494,7 @@ class TransferResource extends mix(Resource).with(
|
|
|
2154
2494
|
Retrievable,
|
|
2155
2495
|
) {
|
|
2156
2496
|
constructor(client) {
|
|
2157
|
-
super('transfers',
|
|
2497
|
+
super('transfers', vulnerableActivity.TransferQuery, client);
|
|
2158
2498
|
}
|
|
2159
2499
|
|
|
2160
2500
|
async destination(destinationUri) {
|
|
@@ -2280,7 +2620,7 @@ class UserResourse extends mix(Resource).with(
|
|
|
2280
2620
|
Retrievable,
|
|
2281
2621
|
) {
|
|
2282
2622
|
constructor(client) {
|
|
2283
|
-
super('users',
|
|
2623
|
+
super('users', vulnerableActivity.UserQuery, client);
|
|
2284
2624
|
}
|
|
2285
2625
|
|
|
2286
2626
|
async update({ userId = 'me', ...req }) {
|
|
@@ -2314,7 +2654,7 @@ class WalletTransactionsResource extends mix(Resource).with(
|
|
|
2314
2654
|
Retrievable,
|
|
2315
2655
|
) {
|
|
2316
2656
|
constructor(client) {
|
|
2317
|
-
super('wallet_transactions',
|
|
2657
|
+
super('wallet_transactions', vulnerableActivity.WalletTransactionQuery, client);
|
|
2318
2658
|
}
|
|
2319
2659
|
|
|
2320
2660
|
async create(amount, transactionType, walletUri) {
|
|
@@ -2341,7 +2681,7 @@ class WhatsAppTransferResource extends mix(Resource).with(
|
|
|
2341
2681
|
Retrievable,
|
|
2342
2682
|
) {
|
|
2343
2683
|
constructor(client) {
|
|
2344
|
-
super('whatsapp_transfers',
|
|
2684
|
+
super('whatsapp_transfers', vulnerableActivity.QueryParams, client);
|
|
2345
2685
|
}
|
|
2346
2686
|
|
|
2347
2687
|
async accountDestination(destinationUri) {
|
|
@@ -2385,6 +2725,7 @@ class Cuenca {
|
|
|
2385
2725
|
this.files = new FileResource(client);
|
|
2386
2726
|
this.kycValidations = new KYCValidationsResource(client);
|
|
2387
2727
|
this.loginTokens = new LoginTokenResource(client);
|
|
2728
|
+
this.partners = new PartnerResource(client);
|
|
2388
2729
|
this.savings = new SavingResource(client);
|
|
2389
2730
|
this.serviceProviders = new ServiceProviderResource(client);
|
|
2390
2731
|
this.sessions = new SessionResource(client);
|