@cuenca-mx/cuenca-js 0.0.14-dev2 → 0.0.14-dev21

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/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-665e0ec5.cjs');
10
- var identities = require('./identities-4ff313d8.cjs');
11
- var walletTransactionRequest = require('./walletTransactionRequest-f733313f.cjs');
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-dev2";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"};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};
29
+ const name="@cuenca-mx/cuenca-js";const version="0.0.14-dev21";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.PLDFinterType, typeOfFilter);
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.setGovtId = govtId;
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.setProofOfAddress = proofOfAddress;
519
+ this.proofOfAddress = proofOfAddress;
494
520
  this.status = data.enumValueFromString(data.BridgeAccountStatus, status);
495
- this.setTerms = termsOfService;
496
- this.setAddress = address;
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 setAddress(value) {
553
+ set address(value) {
528
554
  if (!value || Object.keys(value).length === 0) return;
529
- this._address = identities.Address.fromObject(value);
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 setProofOfAddress(value) {
562
+ set proofOfAddress(value) {
537
563
  if (!value || Object.keys(value).length === 0) return;
538
- this._proofOfAddress = identities.KYCFile.fromObject(value);
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 setGovtId(value) {
571
+ set govtId(value) {
546
572
  if (!value || Object.keys(value).length === 0) return;
547
- this._govtId = identities.KYCFile.fromObject(value);
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 setTerms(value) {
580
+ set termsOfService(value) {
555
581
  if (!value || Object.keys(value).length === 0) return;
556
- this._termsOfService = identities.TOSAgreements.fromObject(value);
582
+ this._termsOfService = vulnerableActivity.TOSAgreements.fromObject(value);
557
583
  }
558
584
  }
559
585
 
@@ -1020,6 +1046,319 @@ 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
+ 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
+
1023
1362
  class Wallet {
1024
1363
  constructor({ balance, createdAt, deactivatedAt, id, userId, updatedAt }) {
1025
1364
  this.balance = balance;
@@ -1227,9 +1566,10 @@ class User {
1227
1566
  status,
1228
1567
  termsOfService,
1229
1568
  updatedAt,
1569
+ userType,
1230
1570
  verificationId,
1231
1571
  }) {
1232
- this.setAddress = address;
1572
+ this.address = address;
1233
1573
  this.blacklistValidationStatus = data.enumValueFromString(
1234
1574
  data.VerificationStatus,
1235
1575
  blacklistValidationStatus,
@@ -1238,7 +1578,7 @@ class User {
1238
1578
  this.countryOfBirth = countryOfBirth;
1239
1579
  this.createdAt = data.dateToUTC(createdAt);
1240
1580
  this.curp = curp;
1241
- this.setCurpDoc = curpDocument;
1581
+ this.curpDocument = curpDocument;
1242
1582
  this.dateOfBirth = dateOfBirth;
1243
1583
  this.emailAddress = emailAddress;
1244
1584
  this.firstSurname = firstSurname;
@@ -1248,16 +1588,17 @@ class User {
1248
1588
  this.names = names;
1249
1589
  this.nationality = nationality;
1250
1590
  this.phoneNumber = phoneNumber;
1251
- this.setGovtId = govtId;
1252
- this.setProofOfAddress = proofOfAddress;
1253
- this.setProofOfLife = proofOfLife;
1591
+ this.govtId = govtId;
1592
+ this.proofOfAddress = proofOfAddress;
1593
+ this.proofOfLife = proofOfLife;
1254
1594
  this.requiredLevel = requiredLevel;
1255
1595
  this.rfc = rfc;
1256
1596
  this.secondSurname = secondSurname;
1257
1597
  this.stateOfBirth = stateOfBirth;
1258
1598
  this.status = data.enumValueFromString(data.UserStatus, status);
1259
- this.setTerms = termsOfService;
1599
+ this.termsOfService = termsOfService;
1260
1600
  this.updatedAt = data.dateToUTC(updatedAt);
1601
+ this.userType = userType;
1261
1602
  this.verificationId = verificationId;
1262
1603
  }
1263
1604
 
@@ -1265,54 +1606,54 @@ class User {
1265
1606
  return this._address;
1266
1607
  }
1267
1608
 
1268
- set setAddress(value) {
1609
+ set address(value) {
1269
1610
  if (!value) return;
1270
- this._address = identities.Address.fromObject(value);
1611
+ this._address = vulnerableActivity.Address.fromObject(value);
1271
1612
  }
1272
1613
 
1273
1614
  get proofOfAddress() {
1274
1615
  return this._proofOfAddress;
1275
1616
  }
1276
1617
 
1277
- set setProofOfAddress(value) {
1618
+ set proofOfAddress(value) {
1278
1619
  if (!value) return;
1279
- this._proofOfAddress = identities.KYCFile.fromObject(value);
1620
+ this._proofOfAddress = vulnerableActivity.KYCFile.fromObject(value);
1280
1621
  }
1281
1622
 
1282
1623
  get proofOfLife() {
1283
1624
  return this._proofOfLife;
1284
1625
  }
1285
1626
 
1286
- set setProofOfLife(value) {
1627
+ set proofOfLife(value) {
1287
1628
  if (!value) return;
1288
- this._proofOfLife = identities.KYCFile.fromObject(value);
1629
+ this._proofOfLife = vulnerableActivity.KYCFile.fromObject(value);
1289
1630
  }
1290
1631
 
1291
1632
  get govtId() {
1292
1633
  return this._govtId;
1293
1634
  }
1294
1635
 
1295
- set setGovtId(value) {
1636
+ set govtId(value) {
1296
1637
  if (!value) return;
1297
- this._govtId = identities.KYCFile.fromObject(value);
1638
+ this._govtId = vulnerableActivity.KYCFile.fromObject(value);
1298
1639
  }
1299
1640
 
1300
1641
  get termsOfService() {
1301
1642
  return this._termsOfService;
1302
1643
  }
1303
1644
 
1304
- set setTerms(value) {
1645
+ set termsOfService(value) {
1305
1646
  if (!value) return;
1306
- this._termsOfService = identities.TOSAgreements.fromObject(value);
1647
+ this._termsOfService = vulnerableActivity.TOSAgreements.fromObject(value);
1307
1648
  }
1308
1649
 
1309
1650
  get curpDocument() {
1310
1651
  return this._curpDocument;
1311
1652
  }
1312
1653
 
1313
- set setCurpDoc(value) {
1654
+ set curpDocument(value) {
1314
1655
  if (!value) return;
1315
- this._curpDocument = identities.KYCFile.fromObject(value);
1656
+ this._curpDocument = vulnerableActivity.KYCFile.fromObject(value);
1316
1657
  }
1317
1658
 
1318
1659
  static fromObject = ({
@@ -1355,6 +1696,7 @@ class User {
1355
1696
  stateOfBirth: obj.state_of_birth,
1356
1697
  termsOfService: obj.terms_of_service,
1357
1698
  updatedAt: obj.updated_at,
1699
+ userType: obj.user_type,
1358
1700
  verificationId: obj.verification_id,
1359
1701
  });
1360
1702
  }
@@ -1540,6 +1882,7 @@ const getModelFromPath = (path, obj) => {
1540
1882
  files: () => File.fromObject(obj),
1541
1883
  kyc_validations: () => KYCValidations.fromObject(obj),
1542
1884
  login_tokens: () => LoginToken.fromObject(obj),
1885
+ partners: () => Partner.fromObject(obj),
1543
1886
  savings: () => Saving.fromObject(obj),
1544
1887
  service_providers: () => ServiceProvider.fromObject(obj),
1545
1888
  sessions: () => Session.fromObject(obj),
@@ -1699,7 +2042,7 @@ const Queryable = (SuperClass) =>
1699
2042
 
1700
2043
  class AccountResource extends mix(Resource).with(Queryable, Retrievable) {
1701
2044
  constructor(client) {
1702
- super('accounts', identities.AccountQuery, client);
2045
+ super('accounts', vulnerableActivity.AccountQuery, client);
1703
2046
  }
1704
2047
  }
1705
2048
 
@@ -1710,18 +2053,18 @@ class AlertResource extends mix(Resource).with(
1710
2053
  Updateable,
1711
2054
  ) {
1712
2055
  constructor(client) {
1713
- super('alerts', identities.AlertQuery, client);
2056
+ super('alerts', vulnerableActivity.AlertQuery, client);
1714
2057
  }
1715
2058
 
1716
- async create(...req) {
2059
+ async create(req) {
1717
2060
  const request = new walletTransactionRequest.AlertUpdateRequest(req);
1718
- const alert = await this._create(request.toObject());
2061
+ const alert = await this._create(request.toCleanObject());
1719
2062
  return alert;
1720
2063
  }
1721
2064
 
1722
- async update({ alertId, ...req }) {
2065
+ async update(alertId, req) {
1723
2066
  const request = new walletTransactionRequest.AlertUpdateRequest(req);
1724
- const alert = await this._update(alertId, request.toObject());
2067
+ const alert = await this._update(alertId, request.toCleanObject());
1725
2068
  return alert;
1726
2069
  }
1727
2070
  }
@@ -1734,7 +2077,7 @@ class ApiKeyResource extends mix(Resource).with(
1734
2077
  Updateable,
1735
2078
  ) {
1736
2079
  constructor(client) {
1737
- super('api_keys', identities.ApiKeyQuery, client);
2080
+ super('api_keys', vulnerableActivity.ApiKeyQuery, client);
1738
2081
  }
1739
2082
 
1740
2083
  async create() {
@@ -1788,7 +2131,7 @@ class ArpcResource extends mix(Resource).with(Creatable) {
1788
2131
 
1789
2132
  class BalanceEntryResource extends mix(Resource).with(Queryable, Retrievable) {
1790
2133
  constructor(client) {
1791
- super('balance_entries', identities.BalanceEntryQuery, client);
2134
+ super('balance_entries', vulnerableActivity.BalanceEntryQuery, client);
1792
2135
  }
1793
2136
 
1794
2137
  async relatedTransaction(relatedTransactionUri) {
@@ -1814,7 +2157,7 @@ class BalanceEntryResource extends mix(Resource).with(Queryable, Retrievable) {
1814
2157
 
1815
2158
  class BillPaymentResource extends mix(Resource).with(Queryable, Retrievable) {
1816
2159
  constructor(client) {
1817
- super('bill_payments', identities.BillPaymentQuery, client);
2160
+ super('bill_payments', vulnerableActivity.BillPaymentQuery, client);
1818
2161
  }
1819
2162
 
1820
2163
  async serviceProvider(providerUri) {
@@ -1832,7 +2175,7 @@ class BridegAccountResource extends mix(Resource).with(
1832
2175
  Retrievable,
1833
2176
  ) {
1834
2177
  constructor(client) {
1835
- super('bridge/accounts', identities.BridgeAccountQuery, client);
2178
+ super('bridge/accounts', vulnerableActivity.BridgeAccountQuery, client);
1836
2179
  }
1837
2180
 
1838
2181
  async update({ userId = 'me', ...req }) {
@@ -1847,13 +2190,13 @@ class BridgeBankAccountResource extends mix(Resource).with(
1847
2190
  Retrievable,
1848
2191
  ) {
1849
2192
  constructor(client) {
1850
- super('bridge/bank_accounts', identities.BridgeBankAccountQuery, client);
2193
+ super('bridge/bank_accounts', vulnerableActivity.BridgeBankAccountQuery, client);
1851
2194
  }
1852
2195
  }
1853
2196
 
1854
2197
  class BridgeClabeResource extends mix(Resource).with(Queryable) {
1855
2198
  constructor(client) {
1856
- super('bridge/clabes', identities.BridgeQuery, client);
2199
+ super('bridge/clabes', vulnerableActivity.BridgeQuery, client);
1857
2200
  }
1858
2201
  }
1859
2202
 
@@ -1862,7 +2205,7 @@ class BridgeTransactionResource extends mix(Resource).with(
1862
2205
  Retrievable,
1863
2206
  ) {
1864
2207
  constructor(client) {
1865
- super('bridge/transactions', identities.BridgeTransactionQuery, client);
2208
+ super('bridge/transactions', vulnerableActivity.BridgeTransactionQuery, client);
1866
2209
  }
1867
2210
  }
1868
2211
 
@@ -1892,7 +2235,7 @@ class CardResource extends mix(Resource).with(
1892
2235
  Updateable,
1893
2236
  ) {
1894
2237
  constructor(client) {
1895
- super('cards', identities.CardsQuery, client);
2238
+ super('cards', vulnerableActivity.CardsQuery, client);
1896
2239
  }
1897
2240
 
1898
2241
  async create(userId, issuer, fundingType) {
@@ -1918,7 +2261,7 @@ class CardTransactionResource extends mix(Resource).with(
1918
2261
  Retrievable,
1919
2262
  ) {
1920
2263
  constructor(client) {
1921
- super('card_transactions', identities.CardTransactionQuery, client);
2264
+ super('card_transactions', vulnerableActivity.CardTransactionQuery, client);
1922
2265
  }
1923
2266
 
1924
2267
  async relatedCard(relatedCardUri) {
@@ -1970,7 +2313,7 @@ class CardValidationResource extends mix(Resource).with(Creatable) {
1970
2313
 
1971
2314
  class CommissionResource extends mix(Resource).with(Queryable, Retrievable) {
1972
2315
  constructor(client) {
1973
- super('commissions', identities.QueryParams, client);
2316
+ super('commissions', vulnerableActivity.QueryParams, client);
1974
2317
  }
1975
2318
 
1976
2319
  async relatedTransaction(relatedTransactionUri) {
@@ -1984,7 +2327,7 @@ class CommissionResource extends mix(Resource).with(Queryable, Retrievable) {
1984
2327
 
1985
2328
  class DepositResource extends mix(Resource).with(Queryable, Retrievable) {
1986
2329
  constructor(client) {
1987
- super('deposits', identities.DepositQuery, client);
2330
+ super('deposits', vulnerableActivity.DepositQuery, client);
1988
2331
  }
1989
2332
 
1990
2333
  async source(sourceUri) {
@@ -2045,6 +2388,29 @@ class LoginTokenResource extends mix(Resource).with(Creatable) {
2045
2388
  }
2046
2389
  }
2047
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
+
2048
2414
  class SavingResource extends mix(Resource).with(
2049
2415
  Creatable,
2050
2416
  Deactivable,
@@ -2053,7 +2419,7 @@ class SavingResource extends mix(Resource).with(
2053
2419
  Updateable,
2054
2420
  ) {
2055
2421
  constructor(client) {
2056
- super('savings', identities.WalletQuery, client);
2422
+ super('savings', vulnerableActivity.WalletQuery, client);
2057
2423
  }
2058
2424
 
2059
2425
  async create(category, goalAmount, goalDate, name) {
@@ -2079,7 +2445,7 @@ class ServiceProviderResource extends mix(Resource).with(
2079
2445
  Retrievable,
2080
2446
  ) {
2081
2447
  constructor(client) {
2082
- super('service_providers', identities.QueryParams, client);
2448
+ super('service_providers', vulnerableActivity.QueryParams, client);
2083
2449
  }
2084
2450
  }
2085
2451
 
@@ -2108,7 +2474,7 @@ class SessionResource extends mix(Resource).with(
2108
2474
 
2109
2475
  class StatementResource extends mix(Resource).with(Downlodable, Queryable) {
2110
2476
  constructor(client) {
2111
- super('statements', identities.StatementQuery, client);
2477
+ super('statements', vulnerableActivity.StatementQuery, client);
2112
2478
  }
2113
2479
 
2114
2480
  async pdf(id) {
@@ -2128,7 +2494,7 @@ class TransferResource extends mix(Resource).with(
2128
2494
  Retrievable,
2129
2495
  ) {
2130
2496
  constructor(client) {
2131
- super('transfers', identities.TransferQuery, client);
2497
+ super('transfers', vulnerableActivity.TransferQuery, client);
2132
2498
  }
2133
2499
 
2134
2500
  async destination(destinationUri) {
@@ -2254,7 +2620,7 @@ class UserResourse extends mix(Resource).with(
2254
2620
  Retrievable,
2255
2621
  ) {
2256
2622
  constructor(client) {
2257
- super('users', identities.UserQuery, client);
2623
+ super('users', vulnerableActivity.UserQuery, client);
2258
2624
  }
2259
2625
 
2260
2626
  async update({ userId = 'me', ...req }) {
@@ -2288,7 +2654,7 @@ class WalletTransactionsResource extends mix(Resource).with(
2288
2654
  Retrievable,
2289
2655
  ) {
2290
2656
  constructor(client) {
2291
- super('wallet_transactions', identities.WalletTransactionQuery, client);
2657
+ super('wallet_transactions', vulnerableActivity.WalletTransactionQuery, client);
2292
2658
  }
2293
2659
 
2294
2660
  async create(amount, transactionType, walletUri) {
@@ -2315,7 +2681,7 @@ class WhatsAppTransferResource extends mix(Resource).with(
2315
2681
  Retrievable,
2316
2682
  ) {
2317
2683
  constructor(client) {
2318
- super('whatsapp_transfers', identities.QueryParams, client);
2684
+ super('whatsapp_transfers', vulnerableActivity.QueryParams, client);
2319
2685
  }
2320
2686
 
2321
2687
  async accountDestination(destinationUri) {
@@ -2359,6 +2725,7 @@ class Cuenca {
2359
2725
  this.files = new FileResource(client);
2360
2726
  this.kycValidations = new KYCValidationsResource(client);
2361
2727
  this.loginTokens = new LoginTokenResource(client);
2728
+ this.partners = new PartnerResource(client);
2362
2729
  this.savings = new SavingResource(client);
2363
2730
  this.serviceProviders = new ServiceProviderResource(client);
2364
2731
  this.sessions = new SessionResource(client);