@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.mjs CHANGED
@@ -2,9 +2,9 @@ import axios from 'axios';
2
2
  import Buffer from 'buffer';
3
3
  import { CuencaResponseException, CuencaException, NoResultFound, MultipleResultsFound, InvalidPassword } from './errors/index.mjs';
4
4
  import { Jwt } from './jwt/index.mjs';
5
- import { P as Phase, F as FileFormat, d as dateToUTC, e as enumValueFromString, M as MLIndicatorLevel, a as MLIndicatorPeriod, A as AlertStatus, b as MLIndicatorType, c as PLDFinterType, E as EntryType, T as TransactionStatus, B as BridgeAccountStatus, f as BridgeBankAccountStatus, C as Currency, N as Network, g as BridgeTransactionType, h as CardFundingType, i as CardIssuer, j as CardStatus, k as CardType, l as CardErrorType, m as CardTransactionType, n as CommissionType, D as DepositNetwork, K as KYCFileType, S as SavingCategory, o as ServiceProviderCategory, p as SessionType, q as TransferNetwork, V as VerificationStatus, U as UserStatus, r as VerificationType, W as WalletTransactionType } from './data-15b623a1.mjs';
6
- import { A as Address, K as KYCFile, T as TOSAgreements, a as AccountQuery, b as AlertQuery, c as ApiKeyQuery, B as BalanceEntryQuery, d as BillPaymentQuery, e as BridgeAccountQuery, f as BridgeBankAccountQuery, g as BridgeQuery, h as BridgeTransactionQuery, C as CardsQuery, i as CardTransactionQuery, Q as QueryParams, D as DepositQuery, W as WalletQuery, S as StatementQuery, j as TransferQuery, U as UserQuery, k as WalletTransactionQuery } from './identities-ca4f29bd.mjs';
7
- import { A as AlertUpdateRequest, a as ApiKeyUpdateRequest, b as ArpcRequest, U as UserUpdateRequest, C as CardActivationRequest, c as CardRequest, d as CardUpdateRequest, e as CardValidationRequest, K as KYCValidationsRequest, S as SavingRequest, f as SessionRequest, T as TransferRequest, g as UserCredentialRequest, h as UserCredentialUpdateRequest, i as UserLoginRequest, V as VerificationRequest, j as VerificationAttemptRequest, W as WalletTransactionRequest } from './walletTransactionRequest-ada06c52.mjs';
5
+ import { P as Phase, F as FileFormat, d as dateToUTC, e as enumValueFromString, M as MLIndicatorLevel, a as MLIndicatorPeriod, A as AlertStatus, S as SourceAlertType, b as MLIndicatorType, c as PLDFilterType, E as EntryType, T as TransactionStatus, B as BridgeAccountStatus, f as BridgeBankAccountStatus, C as Currency, N as Network, g as BridgeTransactionType, h as CardFundingType, i as CardIssuer, j as CardStatus, k as CardType, l as CardErrorType, m as CardTransactionType, n as CommissionType, D as DepositNetwork, K as KYCFileType, U as UserStatus, o as SavingCategory, p as ServiceProviderCategory, q as SessionType, r as TransferNetwork, V as VerificationStatus, s as VerificationType, W as WalletTransactionType } from './data-27fc844b.mjs';
6
+ import { A as AlertLog, a as Address, K as KYCFile, T as TOSAgreements, b as TransactionalProfileServices, S as ShareholderMoral, L as LegalRepresentatives, E as ExternalAccount, V as VulnerableActivity, c as Audit, d as License, B as BusinessDetails, e as AccountQuery, f as AlertQuery, g as ApiKeyQuery, h as BalanceEntryQuery, i as BillPaymentQuery, j as BridgeAccountQuery, k as BridgeBankAccountQuery, l as BridgeQuery, m as BridgeTransactionQuery, C as CardsQuery, n as CardTransactionQuery, Q as QueryParams, D as DepositQuery, P as PartnerQuery, W as WalletQuery, o as StatementQuery, p as TransferQuery, U as UserQuery, q as WalletTransactionQuery } from './vulnerableActivity-70ff062e.mjs';
7
+ import { A as AlertUpdateRequest, a as ApiKeyUpdateRequest, b as ArpcRequest, U as UserUpdateRequest, C as CardActivationRequest, c as CardRequest, d as CardUpdateRequest, e as CardValidationRequest, K as KYCValidationsRequest, P as PartnerUserRequest, S as SavingRequest, f as SessionRequest, T as TransferRequest, g as UserCredentialRequest, h as UserCredentialUpdateRequest, i as UserLoginRequest, V as VerificationRequest, j as VerificationAttemptRequest, W as WalletTransactionRequest } from './walletTransactionRequest-80f0424d.mjs';
8
8
 
9
9
  /* global window */
10
10
 
@@ -17,7 +17,7 @@ const isNode =
17
17
 
18
18
  const runtimeEnv = { isBrowser, isNode };
19
19
 
20
- 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="./build/index.mjs";const browser="./build/umd/cuenca.umd.js";const files=["build/**/*"];const exports={".":{"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,browser:browser,files:files,exports:exports,packageManager:packageManager,type:type,repository:repository,keywords:keywords,license:license,bugs:bugs,homepage:homepage,scripts:scripts,devDependencies:devDependencies,dependencies:dependencies};
20
+ 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="./build/index.mjs";const browser="./build/umd/cuenca.umd.js";const files=["build/**/*"];const exports={".":{"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,browser:browser,files:files,exports:exports,packageManager:packageManager,type:type,repository:repository,keywords:keywords,license:license,bugs:bugs,homepage:homepage,scripts:scripts,devDependencies:devDependencies,dependencies:dependencies};
21
21
 
22
22
  class Client {
23
23
  constructor({
@@ -237,12 +237,16 @@ class Account {
237
237
 
238
238
  class Alert {
239
239
  constructor({
240
+ agent,
240
241
  accountNumber,
241
242
  actualPeriodCount,
242
243
  actualPeriodSum,
243
244
  aggregationType,
245
+ changeLog,
246
+ comments,
244
247
  committeeMeetingDate,
245
248
  createdAt,
249
+ questionnaireId,
246
250
  description,
247
251
  hasQuestionnaire,
248
252
  id,
@@ -252,6 +256,7 @@ class Alert {
252
256
  period,
253
257
  periodNumber,
254
258
  status,
259
+ sourceType,
255
260
  transactionDate,
256
261
  type,
257
262
  typeOfFilter,
@@ -261,9 +266,12 @@ class Alert {
261
266
  this.accountNumber = accountNumber;
262
267
  this.actualPeriodCount = actualPeriodCount;
263
268
  this.actualPeriodSum = actualPeriodSum;
269
+ this.agent = agent;
264
270
  this.aggregationType = aggregationType;
271
+ this.comments = comments;
265
272
  this.committeeMeetingDate = dateToUTC(committeeMeetingDate);
266
273
  this.createdAt = dateToUTC(createdAt);
274
+ this.questionnaireId = questionnaireId;
267
275
  this.description = description;
268
276
  this.hasQuestionnaire = hasQuestionnaire;
269
277
  this.id = id;
@@ -273,14 +281,18 @@ class Alert {
273
281
  this.period = enumValueFromString(MLIndicatorPeriod, period);
274
282
  this.periodNumber = periodNumber;
275
283
  this.status = enumValueFromString(AlertStatus, status);
284
+ this.sourceType = enumValueFromString(SourceAlertType, sourceType);
276
285
  this.transactionDate = dateToUTC(transactionDate);
277
286
  this.type = enumValueFromString(MLIndicatorType, type);
278
- this.typeOfFilter = enumValueFromString(PLDFinterType, typeOfFilter);
287
+ this.typeOfFilter = enumValueFromString(PLDFilterType, typeOfFilter);
279
288
  this.updatedAt = dateToUTC(updatedAt);
280
289
  this.userId = userId;
290
+ this.changeLog = changeLog;
281
291
  }
282
292
 
283
293
  static fromObject = ({
294
+ agent,
295
+ comments,
284
296
  description,
285
297
  id,
286
298
  level,
@@ -291,6 +303,8 @@ class Alert {
291
303
  ...obj
292
304
  }) =>
293
305
  new Alert({
306
+ agent,
307
+ comments,
294
308
  description,
295
309
  id,
296
310
  level,
@@ -302,16 +316,28 @@ class Alert {
302
316
  actualPeriodCount: obj.actual_period_count,
303
317
  actualPeriodSum: obj.actual_period_sum,
304
318
  aggregationType: obj.aggregation_type,
319
+ changeLog: obj.change_log,
305
320
  committeeMeetingDate: obj.committee_meeting_date,
306
321
  createdAt: obj.created_at,
322
+ questionnaireId: obj.questionnaire_id,
307
323
  hasQuestionnaire: obj.has_questionnaire,
308
324
  institutionName: obj.institution_name,
309
325
  periodNumber: obj.period_number,
326
+ sourceType: obj.source_type,
310
327
  transactionDate: obj.transaction_date,
311
328
  typeOfFilter: obj.type_of_filter,
312
329
  updatedAt: obj.updated_at,
313
330
  userId: obj.user_id,
314
331
  });
332
+
333
+ get changeLog() {
334
+ return this._changeLog;
335
+ }
336
+
337
+ set changeLog(value) {
338
+ if (!value || !Array.isArray(value) || value.length === 0) return;
339
+ this._changeLog = value.map((entry) => AlertLog.fromObject(entry));
340
+ }
315
341
  }
316
342
 
317
343
  class ApiKey {
@@ -470,7 +496,7 @@ class BridgeAccount {
470
496
  this.updatedAt = dateToUTC(updatedAt);
471
497
  this.emailAddress = emailAddress;
472
498
  this.clientClabe = clientClabe;
473
- this.setGovtId = govtId;
499
+ this.govtId = govtId;
474
500
  this.names = names;
475
501
  this.firstSurname = firstSurname;
476
502
  this.secondSurname = secondSurname;
@@ -481,10 +507,10 @@ class BridgeAccount {
481
507
  this.userId = userId;
482
508
  this.gender = gender;
483
509
  this.phoneNumber = phoneNumber;
484
- this.setProofOfAddress = proofOfAddress;
510
+ this.proofOfAddress = proofOfAddress;
485
511
  this.status = enumValueFromString(BridgeAccountStatus, status);
486
- this.setTerms = termsOfService;
487
- this.setAddress = address;
512
+ this.termsOfService = termsOfService;
513
+ this.address = address;
488
514
  }
489
515
 
490
516
  static fromObject = ({ status, address, ...obj }) =>
@@ -515,7 +541,7 @@ class BridgeAccount {
515
541
  return this._address;
516
542
  }
517
543
 
518
- set setAddress(value) {
544
+ set address(value) {
519
545
  if (!value || Object.keys(value).length === 0) return;
520
546
  this._address = Address.fromObject(value);
521
547
  }
@@ -524,7 +550,7 @@ class BridgeAccount {
524
550
  return this._proofOfAddress;
525
551
  }
526
552
 
527
- set setProofOfAddress(value) {
553
+ set proofOfAddress(value) {
528
554
  if (!value || Object.keys(value).length === 0) return;
529
555
  this._proofOfAddress = KYCFile.fromObject(value);
530
556
  }
@@ -533,7 +559,7 @@ class BridgeAccount {
533
559
  return this._govtId;
534
560
  }
535
561
 
536
- set setGovtId(value) {
562
+ set govtId(value) {
537
563
  if (!value || Object.keys(value).length === 0) return;
538
564
  this._govtId = KYCFile.fromObject(value);
539
565
  }
@@ -542,7 +568,7 @@ class BridgeAccount {
542
568
  return this._termsOfService;
543
569
  }
544
570
 
545
- set setTerms(value) {
571
+ set termsOfService(value) {
546
572
  if (!value || Object.keys(value).length === 0) return;
547
573
  this._termsOfService = TOSAgreements.fromObject(value);
548
574
  }
@@ -1011,6 +1037,319 @@ class LoginToken {
1011
1037
  static fromObject = ({ id }) => new LoginToken({ id });
1012
1038
  }
1013
1039
 
1040
+ class TransactionalProfile {
1041
+ constructor({
1042
+ currency,
1043
+ monthlyAmount,
1044
+ recipientsNum,
1045
+ payersNum,
1046
+ deposits,
1047
+ withdrawal,
1048
+ }) {
1049
+ this.currency = currency;
1050
+ this.monthlyAmount = monthlyAmount;
1051
+
1052
+ this.recipientsNum = recipientsNum;
1053
+ this.payersNum = payersNum;
1054
+
1055
+ this.deposits = deposits;
1056
+ this.withdrawal = withdrawal;
1057
+ }
1058
+
1059
+ get deposits() {
1060
+ return this._deposits;
1061
+ }
1062
+
1063
+ set deposits(value) {
1064
+ if (!value) return;
1065
+ this._deposits = TransactionalProfileServices.fromObject(value);
1066
+ }
1067
+
1068
+ get withdrawal() {
1069
+ return this._withdrawal;
1070
+ }
1071
+
1072
+ set withdrawal(value) {
1073
+ if (!value) return;
1074
+ this._withdrawal = TransactionalProfileServices.fromObject(value);
1075
+ }
1076
+
1077
+ static fromObject = ({ currency, deposits, withdrawal, ...obj }) =>
1078
+ new TransactionalProfile({
1079
+ currency,
1080
+ deposits,
1081
+ withdrawal,
1082
+ payersNum: obj.payers_num,
1083
+ recipientsNum: obj.recipients_num,
1084
+ monthlyAmount: obj.monthly_amount,
1085
+ });
1086
+ }
1087
+
1088
+ class BaseUser {
1089
+ constructor({
1090
+ address,
1091
+ clabe,
1092
+ emailAddress,
1093
+ id,
1094
+ level,
1095
+ meta,
1096
+ nationality,
1097
+ platformId,
1098
+ phoneNumber,
1099
+ requiredLevel,
1100
+ rfc,
1101
+ status,
1102
+ createdAt,
1103
+ updatedAt,
1104
+ userType,
1105
+ }) {
1106
+ this.address = address;
1107
+ this.clabe = clabe;
1108
+ this.createdAt = dateToUTC(createdAt);
1109
+ this.emailAddress = emailAddress;
1110
+ this.id = id;
1111
+ this.level = level;
1112
+ this.meta = meta;
1113
+ this.nationality = nationality;
1114
+ this.platformId = platformId;
1115
+ this.phoneNumber = phoneNumber;
1116
+ this.requiredLevel = requiredLevel;
1117
+ this.rfc = rfc;
1118
+ this.status = enumValueFromString(UserStatus, status);
1119
+ this.updatedAt = dateToUTC(updatedAt);
1120
+ this.userType = userType;
1121
+ }
1122
+
1123
+ get address() {
1124
+ return this._address;
1125
+ }
1126
+
1127
+ set address(value) {
1128
+ if (!value) return;
1129
+ this._address = Address.fromObject(value);
1130
+ }
1131
+
1132
+ static fromObject = ({
1133
+ address,
1134
+ clabe,
1135
+ id,
1136
+ level,
1137
+ nationality,
1138
+ rfc,
1139
+ status,
1140
+ ...obj
1141
+ }) =>
1142
+ new BaseUser({
1143
+ address,
1144
+ clabe,
1145
+ id,
1146
+ level,
1147
+ meta: obj.meta,
1148
+ nationality,
1149
+ rfc,
1150
+ status,
1151
+ createdAt: obj.created_at,
1152
+ emailAddress: obj.email_address,
1153
+ phoneNumber: obj.phone_number,
1154
+ platformId: obj.platform_id,
1155
+ requiredLevel: obj.required_level,
1156
+ updatedAt: obj.updated_at,
1157
+ userType: obj.user_type,
1158
+ });
1159
+ }
1160
+
1161
+ class Partner extends BaseUser {
1162
+ constructor({
1163
+ address,
1164
+ audit,
1165
+ businessDetails,
1166
+ businessModel,
1167
+ businessName,
1168
+ clabe,
1169
+ createdAt,
1170
+ documentationUrl,
1171
+ emailAddress,
1172
+ externalAccount,
1173
+ folio,
1174
+ id,
1175
+ incorporationDate,
1176
+ legalName,
1177
+ legalRepresentatives,
1178
+ level,
1179
+ license,
1180
+ meta,
1181
+ nationality,
1182
+ phoneNumber,
1183
+ platformId,
1184
+ requiredLevel,
1185
+ rfc,
1186
+ shareholders,
1187
+ status,
1188
+ transactionalProfile,
1189
+ updatedAt,
1190
+ userId,
1191
+ userType,
1192
+ vulnerableActivity,
1193
+ webSite,
1194
+ }) {
1195
+ super({
1196
+ address,
1197
+ clabe,
1198
+ emailAddress,
1199
+ rfc,
1200
+ id,
1201
+ level,
1202
+ meta,
1203
+ nationality,
1204
+ platformId,
1205
+ phoneNumber,
1206
+ requiredLevel,
1207
+ status,
1208
+ createdAt,
1209
+ updatedAt,
1210
+ userType,
1211
+ });
1212
+ this.audit = audit;
1213
+ this.businessModel = businessModel;
1214
+ this.businessName = businessName;
1215
+ this.businessDetails = businessDetails;
1216
+ this.documentationUrl = documentationUrl;
1217
+ this.incorporationDate = dateToUTC(incorporationDate);
1218
+ this.externalAccount = externalAccount;
1219
+ this.folio = folio;
1220
+ this.legalName = legalName;
1221
+ this.license = license;
1222
+ this.shareholders = shareholders;
1223
+ this.legalRepresentatives = legalRepresentatives;
1224
+ this.transactionalProfile = transactionalProfile;
1225
+ this.userId = userId;
1226
+ this.vulnerableActivity = vulnerableActivity;
1227
+ this.webSite = webSite;
1228
+ }
1229
+
1230
+ get shareholders() {
1231
+ return this._shareholders;
1232
+ }
1233
+
1234
+ set shareholders(value) {
1235
+ if (!value) return;
1236
+ this._shareholders = value.map((sh) => ShareholderMoral.fromObject(sh));
1237
+ }
1238
+
1239
+ get legalRepresentatives() {
1240
+ return this._legalRepresentatives;
1241
+ }
1242
+
1243
+ set legalRepresentatives(value) {
1244
+ if (!value) return;
1245
+ this._legalRepresentatives = value.map((lr) =>
1246
+ LegalRepresentatives.fromObject(lr),
1247
+ );
1248
+ }
1249
+
1250
+ get externalAccount() {
1251
+ return this._externalAccount;
1252
+ }
1253
+
1254
+ set externalAccount(value) {
1255
+ if (!value) return;
1256
+ this._externalAccount = ExternalAccount.fromObject(value);
1257
+ }
1258
+
1259
+ get vulnerableActivity() {
1260
+ return this._vulnerableActivity;
1261
+ }
1262
+
1263
+ set vulnerableActivity(value) {
1264
+ if (!value) return;
1265
+ this._vulnerableActivity = VulnerableActivity.fromObject(value);
1266
+ }
1267
+
1268
+ get audit() {
1269
+ return this._audit;
1270
+ }
1271
+
1272
+ set audit(value) {
1273
+ if (!value) return;
1274
+ this._audit = Audit.fromObject(value);
1275
+ }
1276
+
1277
+ get license() {
1278
+ return this._license;
1279
+ }
1280
+
1281
+ set license(value) {
1282
+ if (!value) return;
1283
+ this._license = License.fromObject(value);
1284
+ }
1285
+
1286
+ get transactionalProfile() {
1287
+ return this._transactionalProfile;
1288
+ }
1289
+
1290
+ set transactionalProfile(value) {
1291
+ if (!value) return;
1292
+ this._transactionalProfile = TransactionalProfile.fromObject(value);
1293
+ }
1294
+
1295
+ get businessDetails() {
1296
+ return this._businessDetails;
1297
+ }
1298
+
1299
+ set businessDetails(value) {
1300
+ if (!value) return;
1301
+ this._businessDetails = BusinessDetails.fromObject(value);
1302
+ }
1303
+
1304
+ static fromObject = ({
1305
+ audit,
1306
+ address,
1307
+ clabe,
1308
+ folio,
1309
+ id,
1310
+ level,
1311
+ license,
1312
+ nationality,
1313
+ rfc,
1314
+ status,
1315
+ shareholders,
1316
+ ...obj
1317
+ }) =>
1318
+ new Partner({
1319
+ address,
1320
+ audit,
1321
+ clabe,
1322
+ folio,
1323
+ id,
1324
+ level,
1325
+ license,
1326
+ nationality,
1327
+ rfc,
1328
+ shareholders,
1329
+ status,
1330
+ legalName: obj.legal_name,
1331
+ legalRepresentatives: obj.legal_representatives,
1332
+ businessModel: obj.business_model,
1333
+ businessName: obj.business_name,
1334
+ businessDetails: obj.business_details,
1335
+ createdAt: obj.created_at,
1336
+ documentationUrl: obj.documentation_url,
1337
+ emailAddress: obj.email_address,
1338
+ externalAccount: obj.external_account,
1339
+ incorporationDate: obj.incorporation_date,
1340
+ meta: obj.meta,
1341
+ phoneNumber: obj.phone_number,
1342
+ platformId: obj.platform_id,
1343
+ requiredLevel: obj.required_level,
1344
+ transactionalProfile: obj.transactional_profile,
1345
+ updatedAt: obj.updated_at,
1346
+ userId: obj.user_id,
1347
+ userType: obj.user_type,
1348
+ vulnerableActivity: obj.vulnerable_activity,
1349
+ webSite: obj.web_site,
1350
+ });
1351
+ }
1352
+
1014
1353
  class Wallet {
1015
1354
  constructor({ balance, createdAt, deactivatedAt, id, userId, updatedAt }) {
1016
1355
  this.balance = balance;
@@ -1218,9 +1557,10 @@ class User {
1218
1557
  status,
1219
1558
  termsOfService,
1220
1559
  updatedAt,
1560
+ userType,
1221
1561
  verificationId,
1222
1562
  }) {
1223
- this.setAddress = address;
1563
+ this.address = address;
1224
1564
  this.blacklistValidationStatus = enumValueFromString(
1225
1565
  VerificationStatus,
1226
1566
  blacklistValidationStatus,
@@ -1229,7 +1569,7 @@ class User {
1229
1569
  this.countryOfBirth = countryOfBirth;
1230
1570
  this.createdAt = dateToUTC(createdAt);
1231
1571
  this.curp = curp;
1232
- this.setCurpDoc = curpDocument;
1572
+ this.curpDocument = curpDocument;
1233
1573
  this.dateOfBirth = dateOfBirth;
1234
1574
  this.emailAddress = emailAddress;
1235
1575
  this.firstSurname = firstSurname;
@@ -1239,16 +1579,17 @@ class User {
1239
1579
  this.names = names;
1240
1580
  this.nationality = nationality;
1241
1581
  this.phoneNumber = phoneNumber;
1242
- this.setGovtId = govtId;
1243
- this.setProofOfAddress = proofOfAddress;
1244
- this.setProofOfLife = proofOfLife;
1582
+ this.govtId = govtId;
1583
+ this.proofOfAddress = proofOfAddress;
1584
+ this.proofOfLife = proofOfLife;
1245
1585
  this.requiredLevel = requiredLevel;
1246
1586
  this.rfc = rfc;
1247
1587
  this.secondSurname = secondSurname;
1248
1588
  this.stateOfBirth = stateOfBirth;
1249
1589
  this.status = enumValueFromString(UserStatus, status);
1250
- this.setTerms = termsOfService;
1590
+ this.termsOfService = termsOfService;
1251
1591
  this.updatedAt = dateToUTC(updatedAt);
1592
+ this.userType = userType;
1252
1593
  this.verificationId = verificationId;
1253
1594
  }
1254
1595
 
@@ -1256,7 +1597,7 @@ class User {
1256
1597
  return this._address;
1257
1598
  }
1258
1599
 
1259
- set setAddress(value) {
1600
+ set address(value) {
1260
1601
  if (!value) return;
1261
1602
  this._address = Address.fromObject(value);
1262
1603
  }
@@ -1265,7 +1606,7 @@ class User {
1265
1606
  return this._proofOfAddress;
1266
1607
  }
1267
1608
 
1268
- set setProofOfAddress(value) {
1609
+ set proofOfAddress(value) {
1269
1610
  if (!value) return;
1270
1611
  this._proofOfAddress = KYCFile.fromObject(value);
1271
1612
  }
@@ -1274,7 +1615,7 @@ class User {
1274
1615
  return this._proofOfLife;
1275
1616
  }
1276
1617
 
1277
- set setProofOfLife(value) {
1618
+ set proofOfLife(value) {
1278
1619
  if (!value) return;
1279
1620
  this._proofOfLife = KYCFile.fromObject(value);
1280
1621
  }
@@ -1283,7 +1624,7 @@ class User {
1283
1624
  return this._govtId;
1284
1625
  }
1285
1626
 
1286
- set setGovtId(value) {
1627
+ set govtId(value) {
1287
1628
  if (!value) return;
1288
1629
  this._govtId = KYCFile.fromObject(value);
1289
1630
  }
@@ -1292,7 +1633,7 @@ class User {
1292
1633
  return this._termsOfService;
1293
1634
  }
1294
1635
 
1295
- set setTerms(value) {
1636
+ set termsOfService(value) {
1296
1637
  if (!value) return;
1297
1638
  this._termsOfService = TOSAgreements.fromObject(value);
1298
1639
  }
@@ -1301,7 +1642,7 @@ class User {
1301
1642
  return this._curpDocument;
1302
1643
  }
1303
1644
 
1304
- set setCurpDoc(value) {
1645
+ set curpDocument(value) {
1305
1646
  if (!value) return;
1306
1647
  this._curpDocument = KYCFile.fromObject(value);
1307
1648
  }
@@ -1346,6 +1687,7 @@ class User {
1346
1687
  stateOfBirth: obj.state_of_birth,
1347
1688
  termsOfService: obj.terms_of_service,
1348
1689
  updatedAt: obj.updated_at,
1690
+ userType: obj.user_type,
1349
1691
  verificationId: obj.verification_id,
1350
1692
  });
1351
1693
  }
@@ -1531,6 +1873,7 @@ const getModelFromPath = (path, obj) => {
1531
1873
  files: () => File.fromObject(obj),
1532
1874
  kyc_validations: () => KYCValidations.fromObject(obj),
1533
1875
  login_tokens: () => LoginToken.fromObject(obj),
1876
+ partners: () => Partner.fromObject(obj),
1534
1877
  savings: () => Saving.fromObject(obj),
1535
1878
  service_providers: () => ServiceProvider.fromObject(obj),
1536
1879
  sessions: () => Session.fromObject(obj),
@@ -1704,15 +2047,15 @@ class AlertResource extends mix(Resource).with(
1704
2047
  super('alerts', AlertQuery, client);
1705
2048
  }
1706
2049
 
1707
- async create(...req) {
2050
+ async create(req) {
1708
2051
  const request = new AlertUpdateRequest(req);
1709
- const alert = await this._create(request.toObject());
2052
+ const alert = await this._create(request.toCleanObject());
1710
2053
  return alert;
1711
2054
  }
1712
2055
 
1713
- async update({ alertId, ...req }) {
2056
+ async update(alertId, req) {
1714
2057
  const request = new AlertUpdateRequest(req);
1715
- const alert = await this._update(alertId, request.toObject());
2058
+ const alert = await this._update(alertId, request.toCleanObject());
1716
2059
  return alert;
1717
2060
  }
1718
2061
  }
@@ -2036,6 +2379,29 @@ class LoginTokenResource extends mix(Resource).with(Creatable) {
2036
2379
  }
2037
2380
  }
2038
2381
 
2382
+ class PartnerResource extends mix(Resource).with(
2383
+ Creatable,
2384
+ Queryable,
2385
+ Updateable,
2386
+ Retrievable,
2387
+ ) {
2388
+ constructor(client) {
2389
+ super('partners', PartnerQuery, client);
2390
+ }
2391
+
2392
+ async create(req) {
2393
+ const request = new PartnerUserRequest(req);
2394
+ const partner = await this._create(request.toCleanObject());
2395
+ return partner;
2396
+ }
2397
+
2398
+ async update(partnerId, req) {
2399
+ const request = new PartnerUserRequest(req);
2400
+ const partner = await this._update(partnerId, request.toCleanObject());
2401
+ return partner;
2402
+ }
2403
+ }
2404
+
2039
2405
  class SavingResource extends mix(Resource).with(
2040
2406
  Creatable,
2041
2407
  Deactivable,
@@ -2350,6 +2716,7 @@ class Cuenca {
2350
2716
  this.files = new FileResource(client);
2351
2717
  this.kycValidations = new KYCValidationsResource(client);
2352
2718
  this.loginTokens = new LoginTokenResource(client);
2719
+ this.partners = new PartnerResource(client);
2353
2720
  this.savings = new SavingResource(client);
2354
2721
  this.serviceProviders = new ServiceProviderResource(client);
2355
2722
  this.sessions = new SessionResource(client);
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var walletTransactionRequest = require('../walletTransactionRequest-f733313f.cjs');
5
+ var walletTransactionRequest = require('../walletTransactionRequest-534ea750.cjs');
6
6
  require('../errors/index.cjs');
7
- require('../data-665e0ec5.cjs');
7
+ require('../data-6c2897da.cjs');
8
8
 
9
9
  class UploadRequest extends walletTransactionRequest.BaseRequest {
10
10
  constructor({ isBack = false, file, extension, type, userId = 'me' }) {
@@ -35,6 +35,7 @@ exports.CardRequest = walletTransactionRequest.CardRequest;
35
35
  exports.CardUpdateRequest = walletTransactionRequest.CardUpdateRequest;
36
36
  exports.CardValidationRequest = walletTransactionRequest.CardValidationRequest;
37
37
  exports.KYCValidationsRequest = walletTransactionRequest.KYCValidationsRequest;
38
+ exports.PartnerUserRequest = walletTransactionRequest.PartnerUserRequest;
38
39
  exports.SavingRequest = walletTransactionRequest.SavingRequest;
39
40
  exports.SessionRequest = walletTransactionRequest.SessionRequest;
40
41
  exports.TransferRequest = walletTransactionRequest.TransferRequest;
@@ -1,7 +1,7 @@
1
- import { B as BaseRequest } from '../walletTransactionRequest-ada06c52.mjs';
2
- export { A as AlertUpdateRequest, a as ApiKeyUpdateRequest, b as ArpcRequest, C as CardActivationRequest, c as CardRequest, d as CardUpdateRequest, e as CardValidationRequest, K as KYCValidationsRequest, S as SavingRequest, f as SessionRequest, T as TransferRequest, g as UserCredentialRequest, h as UserCredentialUpdateRequest, i as UserLoginRequest, U as UserUpdateRequest, j as VerificationAttemptRequest, V as VerificationRequest, W as WalletTransactionRequest } from '../walletTransactionRequest-ada06c52.mjs';
1
+ import { B as BaseRequest } from '../walletTransactionRequest-80f0424d.mjs';
2
+ export { A as AlertUpdateRequest, a as ApiKeyUpdateRequest, b as ArpcRequest, C as CardActivationRequest, c as CardRequest, d as CardUpdateRequest, e as CardValidationRequest, K as KYCValidationsRequest, P as PartnerUserRequest, S as SavingRequest, f as SessionRequest, T as TransferRequest, g as UserCredentialRequest, h as UserCredentialUpdateRequest, i as UserLoginRequest, U as UserUpdateRequest, j as VerificationAttemptRequest, V as VerificationRequest, W as WalletTransactionRequest } from '../walletTransactionRequest-80f0424d.mjs';
3
3
  import '../errors/index.mjs';
4
- import '../data-15b623a1.mjs';
4
+ import '../data-27fc844b.mjs';
5
5
 
6
6
  class UploadRequest extends BaseRequest {
7
7
  constructor({ isBack = false, file, extension, type, userId = 'me' }) {