@cuenca-mx/cuenca-js 1.0.2 → 1.0.4
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/{data-1407d97a.mjs → data-519413b2.mjs} +575 -1
- package/build/{data-05e6356c.cjs → data-5a8f0772.cjs} +576 -0
- package/build/index.cjs +46 -4
- package/build/index.mjs +46 -4
- package/build/requests/index.cjs +3 -2
- package/build/requests/index.mjs +3 -3
- package/build/types/index.cjs +5 -2
- package/build/types/index.mjs +2 -2
- package/build/umd/cuenca.umd.js +1 -1
- package/build/{vulnerableActivity-5e433319.cjs → vulnerableActivity-7ce02b65.cjs} +15 -1
- package/build/{vulnerableActivity-cd72e082.mjs → vulnerableActivity-cffffbc1.mjs} +15 -2
- package/build/{walletTransactionRequest-6d77a257.cjs → walletTransactionRequest-4a81fe7b.cjs} +162 -159
- package/build/{walletTransactionRequest-4988596d.mjs → walletTransactionRequest-629ca362.mjs} +162 -160
- package/package.json +1 -1
package/build/{walletTransactionRequest-4988596d.mjs → walletTransactionRequest-629ca362.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ValidationError } from './errors/index.mjs';
|
|
2
|
-
import { d as dateToUTC, e as enumValueFromString,
|
|
2
|
+
import { d as dateToUTC, e as enumValueFromString, v as VerificationType } from './data-519413b2.mjs';
|
|
3
3
|
|
|
4
4
|
class BaseRequest {
|
|
5
5
|
toObject() {
|
|
@@ -407,42 +407,6 @@ class KYCValidationsRequest extends BaseRequest {
|
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
|
|
410
|
-
class TosUpdateRequest extends BaseRequest {
|
|
411
|
-
constructor({ ip, location, type, version }) {
|
|
412
|
-
super();
|
|
413
|
-
this.ipAddress = ip;
|
|
414
|
-
this.location = location;
|
|
415
|
-
this.type = type;
|
|
416
|
-
this.version = version;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
get ip() {
|
|
420
|
-
return this._ip;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
set ipAddress(value) {
|
|
424
|
-
if (!value) throw new ValidationError('missing ip address');
|
|
425
|
-
const ipBlocks = value.split('.');
|
|
426
|
-
const blocks = ipBlocks.every((block) => {
|
|
427
|
-
return block >= 0 && block <= 255;
|
|
428
|
-
});
|
|
429
|
-
if (blocks) {
|
|
430
|
-
this._ip = value;
|
|
431
|
-
} else {
|
|
432
|
-
throw new ValidationError('Invalid ip address');
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
toObject() {
|
|
437
|
-
return {
|
|
438
|
-
ip: this.ip,
|
|
439
|
-
location: this.location,
|
|
440
|
-
type: this.type,
|
|
441
|
-
version: this.version,
|
|
442
|
-
};
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
|
|
446
410
|
class AddressUpdateRequest extends BaseRequest {
|
|
447
411
|
constructor({
|
|
448
412
|
city,
|
|
@@ -452,6 +416,7 @@ class AddressUpdateRequest extends BaseRequest {
|
|
|
452
416
|
fullName,
|
|
453
417
|
intNumber,
|
|
454
418
|
postalCode,
|
|
419
|
+
postalCodeId,
|
|
455
420
|
state,
|
|
456
421
|
street,
|
|
457
422
|
} = {}) {
|
|
@@ -463,6 +428,7 @@ class AddressUpdateRequest extends BaseRequest {
|
|
|
463
428
|
this.fullName = fullName;
|
|
464
429
|
this.intNumber = intNumber;
|
|
465
430
|
this.postalCode = postalCode;
|
|
431
|
+
this.postalCodeId = postalCodeId;
|
|
466
432
|
this.state = state;
|
|
467
433
|
this.street = street;
|
|
468
434
|
}
|
|
@@ -476,134 +442,13 @@ class AddressUpdateRequest extends BaseRequest {
|
|
|
476
442
|
full_name: this.fullName,
|
|
477
443
|
int_number: this.intNumber,
|
|
478
444
|
postal_code: this.postalCode,
|
|
445
|
+
postal_code_id: this.postalCodeId,
|
|
479
446
|
state: this.state,
|
|
480
447
|
street: this.street,
|
|
481
448
|
};
|
|
482
449
|
}
|
|
483
450
|
}
|
|
484
451
|
|
|
485
|
-
class KycFileRequest extends BaseRequest {
|
|
486
|
-
constructor({ data, isMx, status, type, uriBack, uriFront }) {
|
|
487
|
-
super();
|
|
488
|
-
this.data = data;
|
|
489
|
-
this.isMx = isMx;
|
|
490
|
-
this.status = status;
|
|
491
|
-
this.type = type;
|
|
492
|
-
this.uriBack = uriBack;
|
|
493
|
-
this.uriFront = uriFront;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
toObject() {
|
|
497
|
-
return {
|
|
498
|
-
data: this.data,
|
|
499
|
-
is_mx: this.isMx,
|
|
500
|
-
status: this.status,
|
|
501
|
-
type: this.type,
|
|
502
|
-
uri_back: this.uriBack,
|
|
503
|
-
uri_front: this.uriFront,
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
class UserUpdateRequest extends BaseRequest {
|
|
509
|
-
constructor({
|
|
510
|
-
address,
|
|
511
|
-
curpDocumentUri,
|
|
512
|
-
govtId,
|
|
513
|
-
emailAddress,
|
|
514
|
-
profession,
|
|
515
|
-
proofOfAddress,
|
|
516
|
-
proofOfLife,
|
|
517
|
-
requiredLevel,
|
|
518
|
-
termsOfService,
|
|
519
|
-
phoneNumber,
|
|
520
|
-
rfc,
|
|
521
|
-
status,
|
|
522
|
-
userType,
|
|
523
|
-
verificationId,
|
|
524
|
-
}) {
|
|
525
|
-
super();
|
|
526
|
-
this.addressProofs = proofOfAddress;
|
|
527
|
-
this.adrs = address;
|
|
528
|
-
this.curpDocumentUri = curpDocumentUri;
|
|
529
|
-
this.emailAddress = emailAddress;
|
|
530
|
-
this.govstIds = govtId;
|
|
531
|
-
this.lifeProofs = proofOfLife;
|
|
532
|
-
this.profession = profession;
|
|
533
|
-
this.phoneNumber = phoneNumber;
|
|
534
|
-
this.requiredLevel = requiredLevel;
|
|
535
|
-
this.termsOfService = termsOfService;
|
|
536
|
-
this.rfc = rfc;
|
|
537
|
-
this.status = status;
|
|
538
|
-
this.userType = userType;
|
|
539
|
-
this.verificationId = verificationId;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
get termsOfService() {
|
|
543
|
-
return this._termsOfService;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
set termsOfService(value) {
|
|
547
|
-
if (!value) return;
|
|
548
|
-
this._termsOfService = new TosUpdateRequest(value).toObject();
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
get address() {
|
|
552
|
-
return this._address;
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
set adrs(value) {
|
|
556
|
-
if (!value) return;
|
|
557
|
-
this._address = new AddressUpdateRequest(value).toCleanObject();
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
get proofOfLife() {
|
|
561
|
-
return this._proofOfLife;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
set lifeProofs(value) {
|
|
565
|
-
if (!value) return;
|
|
566
|
-
this._proofOfLife = new KycFileRequest(value).toCleanObject();
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
get proofOfAddress() {
|
|
570
|
-
return this._proofOfAddress;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
set addressProofs(value) {
|
|
574
|
-
if (!value) return;
|
|
575
|
-
this._proofOfAddress = new KycFileRequest(value).toCleanObject();
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
get govtId() {
|
|
579
|
-
return this._govtId;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
set govstIds(value) {
|
|
583
|
-
if (!value) return;
|
|
584
|
-
this._govtId = new KycFileRequest(value).toCleanObject();
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
toObject() {
|
|
588
|
-
return {
|
|
589
|
-
address: this.address,
|
|
590
|
-
curp_document_uri: this.curpDocumentUri,
|
|
591
|
-
email_address: this.emailAddress,
|
|
592
|
-
govt_id: this.govtId,
|
|
593
|
-
phone_number: this.phoneNumber,
|
|
594
|
-
profession: this.profession,
|
|
595
|
-
proof_of_life: this.proofOfLife,
|
|
596
|
-
proof_of_address: this.proofOfAddress,
|
|
597
|
-
requiredLevel: this.requiredLevel,
|
|
598
|
-
rfc: this.rfc,
|
|
599
|
-
status: this.status,
|
|
600
|
-
terms_of_service: this.termsOfService,
|
|
601
|
-
verification_id: this.verificationId,
|
|
602
|
-
user_type: this.userType,
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
|
|
607
452
|
class TransactionalProfileServicesRequest extends BaseRequest {
|
|
608
453
|
constructor({
|
|
609
454
|
speiTransfersNum,
|
|
@@ -1245,6 +1090,163 @@ class UserLoginRequest extends BaseRequest {
|
|
|
1245
1090
|
}
|
|
1246
1091
|
}
|
|
1247
1092
|
|
|
1093
|
+
class TosUpdateRequest extends BaseRequest {
|
|
1094
|
+
constructor({ ip, location, type, version }) {
|
|
1095
|
+
super();
|
|
1096
|
+
this.ipAddress = ip;
|
|
1097
|
+
this.location = location;
|
|
1098
|
+
this.type = type;
|
|
1099
|
+
this.version = version;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
get ip() {
|
|
1103
|
+
return this._ip;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
set ipAddress(value) {
|
|
1107
|
+
if (!value) throw new ValidationError('missing ip address');
|
|
1108
|
+
const ipBlocks = value.split('.');
|
|
1109
|
+
const blocks = ipBlocks.every((block) => {
|
|
1110
|
+
return block >= 0 && block <= 255;
|
|
1111
|
+
});
|
|
1112
|
+
if (blocks) {
|
|
1113
|
+
this._ip = value;
|
|
1114
|
+
} else {
|
|
1115
|
+
throw new ValidationError('Invalid ip address');
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
toObject() {
|
|
1120
|
+
return {
|
|
1121
|
+
ip: this.ip,
|
|
1122
|
+
location: this.location,
|
|
1123
|
+
type: this.type,
|
|
1124
|
+
version: this.version,
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
class KycFileRequest extends BaseRequest {
|
|
1130
|
+
constructor({ data, isMx, status, type, uriBack, uriFront }) {
|
|
1131
|
+
super();
|
|
1132
|
+
this.data = data;
|
|
1133
|
+
this.isMx = isMx;
|
|
1134
|
+
this.status = status;
|
|
1135
|
+
this.type = type;
|
|
1136
|
+
this.uriBack = uriBack;
|
|
1137
|
+
this.uriFront = uriFront;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
toObject() {
|
|
1141
|
+
return {
|
|
1142
|
+
data: this.data,
|
|
1143
|
+
is_mx: this.isMx,
|
|
1144
|
+
status: this.status,
|
|
1145
|
+
type: this.type,
|
|
1146
|
+
uri_back: this.uriBack,
|
|
1147
|
+
uri_front: this.uriFront,
|
|
1148
|
+
};
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
class UserUpdateRequest extends BaseRequest {
|
|
1152
|
+
constructor({
|
|
1153
|
+
address,
|
|
1154
|
+
curpDocumentUri,
|
|
1155
|
+
govtId,
|
|
1156
|
+
emailAddress,
|
|
1157
|
+
profession,
|
|
1158
|
+
proofOfAddress,
|
|
1159
|
+
proofOfLife,
|
|
1160
|
+
requiredLevel,
|
|
1161
|
+
termsOfService,
|
|
1162
|
+
phoneNumber,
|
|
1163
|
+
rfc,
|
|
1164
|
+
status,
|
|
1165
|
+
userType,
|
|
1166
|
+
verificationId,
|
|
1167
|
+
}) {
|
|
1168
|
+
super();
|
|
1169
|
+
this.addressProofs = proofOfAddress;
|
|
1170
|
+
this.adrs = address;
|
|
1171
|
+
this.curpDocumentUri = curpDocumentUri;
|
|
1172
|
+
this.emailAddress = emailAddress;
|
|
1173
|
+
this.govstIds = govtId;
|
|
1174
|
+
this.lifeProofs = proofOfLife;
|
|
1175
|
+
this.profession = profession;
|
|
1176
|
+
this.phoneNumber = phoneNumber;
|
|
1177
|
+
this.requiredLevel = requiredLevel;
|
|
1178
|
+
this.termsOfService = termsOfService;
|
|
1179
|
+
this.rfc = rfc;
|
|
1180
|
+
this.status = status;
|
|
1181
|
+
this.userType = userType;
|
|
1182
|
+
this.verificationId = verificationId;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
get termsOfService() {
|
|
1186
|
+
return this._termsOfService;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
set termsOfService(value) {
|
|
1190
|
+
if (!value) return;
|
|
1191
|
+
this._termsOfService = new TosUpdateRequest(value).toObject();
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
get address() {
|
|
1195
|
+
return this._address;
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
set adrs(value) {
|
|
1199
|
+
if (!value) return;
|
|
1200
|
+
this._address = new AddressUpdateRequest(value).toCleanObject();
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
get proofOfLife() {
|
|
1204
|
+
return this._proofOfLife;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
set lifeProofs(value) {
|
|
1208
|
+
if (!value) return;
|
|
1209
|
+
this._proofOfLife = new KycFileRequest(value).toCleanObject();
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
get proofOfAddress() {
|
|
1213
|
+
return this._proofOfAddress;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
set addressProofs(value) {
|
|
1217
|
+
if (!value) return;
|
|
1218
|
+
this._proofOfAddress = new KycFileRequest(value).toCleanObject();
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
get govtId() {
|
|
1222
|
+
return this._govtId;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
set govstIds(value) {
|
|
1226
|
+
if (!value) return;
|
|
1227
|
+
this._govtId = new KycFileRequest(value).toCleanObject();
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
toObject() {
|
|
1231
|
+
return {
|
|
1232
|
+
address: this.address,
|
|
1233
|
+
curp_document_uri: this.curpDocumentUri,
|
|
1234
|
+
email_address: this.emailAddress,
|
|
1235
|
+
govt_id: this.govtId,
|
|
1236
|
+
phone_number: this.phoneNumber,
|
|
1237
|
+
profession: this.profession,
|
|
1238
|
+
proof_of_life: this.proofOfLife,
|
|
1239
|
+
proof_of_address: this.proofOfAddress,
|
|
1240
|
+
requiredLevel: this.requiredLevel,
|
|
1241
|
+
rfc: this.rfc,
|
|
1242
|
+
status: this.status,
|
|
1243
|
+
terms_of_service: this.termsOfService,
|
|
1244
|
+
verification_id: this.verificationId,
|
|
1245
|
+
user_type: this.userType,
|
|
1246
|
+
};
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1248
1250
|
class VerificationRequest extends BaseRequest {
|
|
1249
1251
|
constructor({ platformId, recipient, type }) {
|
|
1250
1252
|
super();
|
|
@@ -1325,4 +1327,4 @@ class WalletTransactionRequest extends BaseRequest {
|
|
|
1325
1327
|
}
|
|
1326
1328
|
}
|
|
1327
1329
|
|
|
1328
|
-
export { AlertUpdateRequest as A, BaseRequest as B, CardActivationRequest as C, KYCValidationsRequest as K, PartnerUserRequest as P, SavingRequest as S, TransferRequest as T, UserUpdateRequest as U, VerificationRequest as V, WalletTransactionRequest as W, ApiKeyUpdateRequest as a, ArpcRequest as b, CardRequest as c, CardUpdateRequest as d, CardValidationRequest as e, SessionRequest as f, UserCredentialRequest as g, UserCredentialUpdateRequest as h, UserLoginRequest as i, VerificationAttemptRequest as j };
|
|
1330
|
+
export { AlertUpdateRequest as A, BaseRequest as B, CardActivationRequest as C, KYCValidationsRequest as K, PartnerUserRequest as P, SavingRequest as S, TransferRequest as T, UserUpdateRequest as U, VerificationRequest as V, WalletTransactionRequest as W, ApiKeyUpdateRequest as a, ArpcRequest as b, CardRequest as c, CardUpdateRequest as d, CardValidationRequest as e, SessionRequest as f, UserCredentialRequest as g, UserCredentialUpdateRequest as h, UserLoginRequest as i, VerificationAttemptRequest as j, AddressUpdateRequest as k };
|