@cuenca-mx/cuenca-js 0.0.14-dev11 → 0.0.14-dev12

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var errors_index = require('./errors/index.cjs');
4
- var data = require('./data-92aab1cc.cjs');
4
+ var data = require('./data-e4c28528.cjs');
5
5
 
6
6
  class BaseRequest {
7
7
  toObject() {
@@ -409,6 +409,107 @@ class KYCValidationsRequest extends BaseRequest {
409
409
  }
410
410
  }
411
411
 
412
+ class PartnerUserRequest extends BaseRequest {
413
+ constructor({
414
+ address,
415
+ audit,
416
+ businessDetails,
417
+ businessName,
418
+ cert,
419
+ clabe,
420
+ createdAt,
421
+ documentationUrl,
422
+ emailAddress,
423
+ externalAccount,
424
+ folio,
425
+ id,
426
+ incorporationDate,
427
+ legalName,
428
+ legalRepresentatives,
429
+ level,
430
+ license,
431
+ meta,
432
+ phoneNumber,
433
+ platformId,
434
+ requiredLevel,
435
+ shareholders,
436
+ status,
437
+ transactionalProfile,
438
+ updatedAt,
439
+ userId,
440
+ userType,
441
+ vulnerableActivity,
442
+ webSite,
443
+ } = {}) {
444
+ super(); // Asegúrate de pasar cualquier argumento necesario al constructor de la clase base, si es aplicable
445
+ this.address = address;
446
+ this.audit = audit;
447
+ this.businessDetails = businessDetails;
448
+ this.businessName = businessName;
449
+ this.cert = cert;
450
+ this.clabe = clabe;
451
+ this.createdAt = createdAt;
452
+ this.documentationUrl = documentationUrl;
453
+ this.emailAddress = emailAddress;
454
+ this.externalAccount = externalAccount;
455
+ this.folio = folio;
456
+ this.id = id;
457
+ this.incorporationDate = incorporationDate;
458
+ this.legalName = legalName;
459
+ this.legalRepresentatives = legalRepresentatives; // Asegúrate de manejar correctamente las listas de objetos
460
+ this.level = level;
461
+ this.license = license;
462
+ this.meta = meta;
463
+ this.phoneNumber = phoneNumber;
464
+ this.platformId = platformId;
465
+ this.requiredLevel = requiredLevel;
466
+ this.shareholders = shareholders; // Asegúrate de manejar correctamente las listas de objetos
467
+ this.status = status;
468
+ this.transactionalProfile = transactionalProfile;
469
+ this.updatedAt = updatedAt;
470
+ this.userId = userId;
471
+ this.userType = userType;
472
+ this.vulnerableActivity = vulnerableActivity;
473
+ this.webSite = webSite;
474
+ }
475
+
476
+ toObject() {
477
+ return {
478
+ address: this.address,
479
+ audit: this.audit,
480
+ business_details: this.businessDetails,
481
+ business_name: this.businessName,
482
+ cert: this.cert,
483
+ clabe: this.clabe,
484
+ created_at: this.createdAt,
485
+ documentation_url: this.documentationUrl,
486
+ email_address: this.emailAddress,
487
+ external_account: this.externalAccount,
488
+ folio: this.folio,
489
+ id: this.id,
490
+ incorporation_date: this.incorporationDate,
491
+ legal_name: this.legalName,
492
+ legal_representatives: this.legalRepresentatives.map((lr) =>
493
+ lr.toObject(),
494
+ ),
495
+ level: this.level,
496
+ license: this.license,
497
+ meta: this.meta,
498
+ phone_number: this.phoneNumber,
499
+ platform_id: this.platformId,
500
+ required_level: this.requiredLevel,
501
+ shareholders: this.shareholders.map((sh) => sh.toObject()),
502
+ status: this.status,
503
+ transactional_profile: this.transactionalProfile,
504
+ updated_at: this.updatedAt,
505
+ user_id: this.userId,
506
+ user_type: this.userType,
507
+ vulnerable_activity: this.vulnerableActivity,
508
+ web_site: this.webSite,
509
+ };
510
+ }
511
+ }
512
+
412
513
  class SavingRequest extends BaseRequest {
413
514
  constructor(category, goalAmount, goalDate, name) {
414
515
  super();
@@ -695,6 +796,7 @@ class UserUpdateRequest extends BaseRequest {
695
796
  proofOfLife,
696
797
  requiredLevel,
697
798
  termsOfService,
799
+ userType,
698
800
  verificationId,
699
801
  }) {
700
802
  super();
@@ -706,6 +808,7 @@ class UserUpdateRequest extends BaseRequest {
706
808
  this.lifeProofs = proofOfLife;
707
809
  this.requiredLevel = requiredLevel;
708
810
  this.terms = termsOfService;
811
+ this.userType = userType;
709
812
  this.verificationId = verificationId;
710
813
  }
711
814
 
@@ -765,6 +868,7 @@ class UserUpdateRequest extends BaseRequest {
765
868
  proof_of_life: this.proofOfLife,
766
869
  proof_of_address: this.proofOfAddress,
767
870
  govt_id: this.govtId,
871
+ user_type: this.userType,
768
872
  };
769
873
  }
770
874
  }
@@ -858,6 +962,7 @@ exports.CardRequest = CardRequest;
858
962
  exports.CardUpdateRequest = CardUpdateRequest;
859
963
  exports.CardValidationRequest = CardValidationRequest;
860
964
  exports.KYCValidationsRequest = KYCValidationsRequest;
965
+ exports.PartnerUserRequest = PartnerUserRequest;
861
966
  exports.SavingRequest = SavingRequest;
862
967
  exports.SessionRequest = SessionRequest;
863
968
  exports.TransferRequest = TransferRequest;
@@ -1,5 +1,5 @@
1
1
  import { ValidationError } from './errors/index.mjs';
2
- import { d as dateToUTC, e as enumValueFromString, s as VerificationType } from './data-7e8b28c6.mjs';
2
+ import { d as dateToUTC, e as enumValueFromString, s as VerificationType } from './data-fa5e8a84.mjs';
3
3
 
4
4
  class BaseRequest {
5
5
  toObject() {
@@ -407,6 +407,107 @@ class KYCValidationsRequest extends BaseRequest {
407
407
  }
408
408
  }
409
409
 
410
+ class PartnerUserRequest extends BaseRequest {
411
+ constructor({
412
+ address,
413
+ audit,
414
+ businessDetails,
415
+ businessName,
416
+ cert,
417
+ clabe,
418
+ createdAt,
419
+ documentationUrl,
420
+ emailAddress,
421
+ externalAccount,
422
+ folio,
423
+ id,
424
+ incorporationDate,
425
+ legalName,
426
+ legalRepresentatives,
427
+ level,
428
+ license,
429
+ meta,
430
+ phoneNumber,
431
+ platformId,
432
+ requiredLevel,
433
+ shareholders,
434
+ status,
435
+ transactionalProfile,
436
+ updatedAt,
437
+ userId,
438
+ userType,
439
+ vulnerableActivity,
440
+ webSite,
441
+ } = {}) {
442
+ super(); // Asegúrate de pasar cualquier argumento necesario al constructor de la clase base, si es aplicable
443
+ this.address = address;
444
+ this.audit = audit;
445
+ this.businessDetails = businessDetails;
446
+ this.businessName = businessName;
447
+ this.cert = cert;
448
+ this.clabe = clabe;
449
+ this.createdAt = createdAt;
450
+ this.documentationUrl = documentationUrl;
451
+ this.emailAddress = emailAddress;
452
+ this.externalAccount = externalAccount;
453
+ this.folio = folio;
454
+ this.id = id;
455
+ this.incorporationDate = incorporationDate;
456
+ this.legalName = legalName;
457
+ this.legalRepresentatives = legalRepresentatives; // Asegúrate de manejar correctamente las listas de objetos
458
+ this.level = level;
459
+ this.license = license;
460
+ this.meta = meta;
461
+ this.phoneNumber = phoneNumber;
462
+ this.platformId = platformId;
463
+ this.requiredLevel = requiredLevel;
464
+ this.shareholders = shareholders; // Asegúrate de manejar correctamente las listas de objetos
465
+ this.status = status;
466
+ this.transactionalProfile = transactionalProfile;
467
+ this.updatedAt = updatedAt;
468
+ this.userId = userId;
469
+ this.userType = userType;
470
+ this.vulnerableActivity = vulnerableActivity;
471
+ this.webSite = webSite;
472
+ }
473
+
474
+ toObject() {
475
+ return {
476
+ address: this.address,
477
+ audit: this.audit,
478
+ business_details: this.businessDetails,
479
+ business_name: this.businessName,
480
+ cert: this.cert,
481
+ clabe: this.clabe,
482
+ created_at: this.createdAt,
483
+ documentation_url: this.documentationUrl,
484
+ email_address: this.emailAddress,
485
+ external_account: this.externalAccount,
486
+ folio: this.folio,
487
+ id: this.id,
488
+ incorporation_date: this.incorporationDate,
489
+ legal_name: this.legalName,
490
+ legal_representatives: this.legalRepresentatives.map((lr) =>
491
+ lr.toObject(),
492
+ ),
493
+ level: this.level,
494
+ license: this.license,
495
+ meta: this.meta,
496
+ phone_number: this.phoneNumber,
497
+ platform_id: this.platformId,
498
+ required_level: this.requiredLevel,
499
+ shareholders: this.shareholders.map((sh) => sh.toObject()),
500
+ status: this.status,
501
+ transactional_profile: this.transactionalProfile,
502
+ updated_at: this.updatedAt,
503
+ user_id: this.userId,
504
+ user_type: this.userType,
505
+ vulnerable_activity: this.vulnerableActivity,
506
+ web_site: this.webSite,
507
+ };
508
+ }
509
+ }
510
+
410
511
  class SavingRequest extends BaseRequest {
411
512
  constructor(category, goalAmount, goalDate, name) {
412
513
  super();
@@ -693,6 +794,7 @@ class UserUpdateRequest extends BaseRequest {
693
794
  proofOfLife,
694
795
  requiredLevel,
695
796
  termsOfService,
797
+ userType,
696
798
  verificationId,
697
799
  }) {
698
800
  super();
@@ -704,6 +806,7 @@ class UserUpdateRequest extends BaseRequest {
704
806
  this.lifeProofs = proofOfLife;
705
807
  this.requiredLevel = requiredLevel;
706
808
  this.terms = termsOfService;
809
+ this.userType = userType;
707
810
  this.verificationId = verificationId;
708
811
  }
709
812
 
@@ -763,6 +866,7 @@ class UserUpdateRequest extends BaseRequest {
763
866
  proof_of_life: this.proofOfLife,
764
867
  proof_of_address: this.proofOfAddress,
765
868
  govt_id: this.govtId,
869
+ user_type: this.userType,
766
870
  };
767
871
  }
768
872
  }
@@ -847,4 +951,4 @@ class WalletTransactionRequest extends BaseRequest {
847
951
  }
848
952
  }
849
953
 
850
- export { AlertUpdateRequest as A, BaseRequest as B, CardActivationRequest as C, KYCValidationsRequest as K, 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 };
954
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuenca-mx/cuenca-js",
3
- "version": "0.0.14-dev11",
3
+ "version": "0.0.14-dev12",
4
4
  "description": "Cuenca client for JS",
5
5
  "main": "./build/index.cjs",
6
6
  "module": "./build/index.mjs",
@@ -48,7 +48,8 @@
48
48
  "scripts": {
49
49
  "build": "rm -rf build/ && yarn rollup --config",
50
50
  "test": "yarn node --experimental-vm-modules $(yarn bin jest)",
51
- "publish": "yarn build && yarn npm publish"
51
+ "publish": "yarn build && yarn npm publish",
52
+ "dev": "rm -rf build/ && yarn rollup --config && yarn node ../example.cjs"
52
53
  },
53
54
  "devDependencies": {
54
55
  "@rollup/plugin-json": "^4.1.0",