@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.
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, S as SourceAlertType, 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, o as SavingCategory, p as ServiceProviderCategory, q as SessionType, r as TransferNetwork, V as VerificationStatus, U as UserStatus, s as VerificationType, W as WalletTransactionType } from './data-7e8b28c6.mjs';
6
- import { A as AlertLog, a as Address, K as KYCFile, T as TOSAgreements, b as AccountQuery, c as AlertQuery, d as ApiKeyQuery, B as BalanceEntryQuery, e as BillPaymentQuery, f as BridgeAccountQuery, g as BridgeBankAccountQuery, h as BridgeQuery, i as BridgeTransactionQuery, C as CardsQuery, j as CardTransactionQuery, Q as QueryParams, D as DepositQuery, W as WalletQuery, S as StatementQuery, k as TransferQuery, U as UserQuery, l as WalletTransactionQuery } from './identities-2fdef0f0.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-158d4fc6.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 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, 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-fa5e8a84.mjs';
6
+ import { A as AlertLog, a as Address, K as KYCFile, T as TOSAgreements, b as TransactionalProfileServices, S as ShareholderMoral, L as LegalRepresentatives, 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, W as WalletQuery, o as StatementQuery, p as TransferQuery, U as UserQuery, q as WalletTransactionQuery } from './vulnerableActivity-e1e6fdf0.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-dcc77215.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-dev11";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-dev12";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"};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({
@@ -1037,6 +1037,351 @@ class LoginToken {
1037
1037
  static fromObject = ({ id }) => new LoginToken({ id });
1038
1038
  }
1039
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.setDeposits = deposits;
1056
+ this.setWithdrawal = withdrawal;
1057
+ }
1058
+
1059
+ get deposits() {
1060
+ return this._deposits;
1061
+ }
1062
+
1063
+ set setDeposits(value) {
1064
+ if (!value) return;
1065
+ this._deposits = TransactionalProfileServices.fromObject(value);
1066
+ }
1067
+
1068
+ get withdrawal() {
1069
+ return this._withdrawal;
1070
+ }
1071
+
1072
+ set setWithdrawal(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.setAddress = 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 setAddress(value) {
1128
+ if (!value) return;
1129
+ this._address = Address.fromObject(value);
1130
+ }
1131
+
1132
+ get proofOfAddress() {
1133
+ return this._proofOfAddress;
1134
+ }
1135
+
1136
+ set setProofOfAddress(value) {
1137
+ if (!value) return;
1138
+ this._proofOfAddress = KYCFile.fromObject(value);
1139
+ }
1140
+
1141
+ get proofOfLife() {
1142
+ return this._proofOfLife;
1143
+ }
1144
+
1145
+ set setProofOfLife(value) {
1146
+ if (!value) return;
1147
+ this._proofOfLife = KYCFile.fromObject(value);
1148
+ }
1149
+
1150
+ get govtId() {
1151
+ return this._govtId;
1152
+ }
1153
+
1154
+ set setGovtId(value) {
1155
+ if (!value) return;
1156
+ this._govtId = KYCFile.fromObject(value);
1157
+ }
1158
+
1159
+ get termsOfService() {
1160
+ return this._termsOfService;
1161
+ }
1162
+
1163
+ set setTerms(value) {
1164
+ if (!value) return;
1165
+ this._termsOfService = TOSAgreements.fromObject(value);
1166
+ }
1167
+
1168
+ get curpDocument() {
1169
+ return this._curpDocument;
1170
+ }
1171
+
1172
+ set setCurpDoc(value) {
1173
+ if (!value) return;
1174
+ this._curpDocument = KYCFile.fromObject(value);
1175
+ }
1176
+
1177
+ static fromObject = ({
1178
+ address,
1179
+ clabe,
1180
+ id,
1181
+ level,
1182
+ nationality,
1183
+ rfc,
1184
+ status,
1185
+ ...obj
1186
+ }) =>
1187
+ new BaseUser({
1188
+ address,
1189
+ clabe,
1190
+ id,
1191
+ level,
1192
+ nationality,
1193
+ rfc,
1194
+ status,
1195
+ createdAt: obj.created_at,
1196
+ emailAddress: obj.email_address,
1197
+ phoneNumber: obj.phone_number,
1198
+ platformId: obj.platform_id,
1199
+ requiredLevel: obj.required_level,
1200
+ updatedAt: obj.updated_at,
1201
+ userType: obj.user_type,
1202
+ });
1203
+ }
1204
+
1205
+ class Partner extends BaseUser {
1206
+ constructor({
1207
+ address,
1208
+ audit,
1209
+ businessDetails,
1210
+ businessName,
1211
+ clabe,
1212
+ createdAt,
1213
+ documentationUrl,
1214
+ emailAddress,
1215
+ externalAccount,
1216
+ folio,
1217
+ id,
1218
+ incorporationDate,
1219
+ legalName,
1220
+ legalRepresentatives,
1221
+ level,
1222
+ license,
1223
+ meta,
1224
+ nationality,
1225
+ phoneNumber,
1226
+ platformId,
1227
+ requiredLevel,
1228
+ rfc,
1229
+ shareholders,
1230
+ status,
1231
+ transactionalProfile,
1232
+ updatedAt,
1233
+ userId,
1234
+ userType,
1235
+ vulnerableActivity,
1236
+ webSite,
1237
+ }) {
1238
+ super({
1239
+ address,
1240
+ clabe,
1241
+ emailAddress,
1242
+ rfc,
1243
+ id,
1244
+ level,
1245
+ license,
1246
+ meta,
1247
+ nationality,
1248
+ platformId,
1249
+ phoneNumber,
1250
+ requiredLevel,
1251
+ status,
1252
+ createdAt,
1253
+ updatedAt,
1254
+ userType,
1255
+ });
1256
+ this.setAudit = audit;
1257
+ this.businessName = businessName;
1258
+ this.setBusinessDetails = businessDetails;
1259
+ this.documentationUrl = documentationUrl;
1260
+ this.incorporationDate = dateToUTC(incorporationDate);
1261
+ this.externalAccount = externalAccount;
1262
+ this.folio = folio;
1263
+ this.legalName = legalName;
1264
+ this.setLicense = license;
1265
+ this.setShareholders = shareholders;
1266
+ this.setLegalRepresentatives = legalRepresentatives;
1267
+ this.setTransactionalProfile = transactionalProfile;
1268
+ this.userId = userId;
1269
+ this.setVulnerableActivity = vulnerableActivity;
1270
+ this.webSite = webSite;
1271
+ }
1272
+
1273
+ get shareholders() {
1274
+ return this._shareholders;
1275
+ }
1276
+
1277
+ set setShareholders(value) {
1278
+ if (!value) return;
1279
+ this._shareholders = value.map((sh) => ShareholderMoral.fromObject(sh));
1280
+ }
1281
+
1282
+ get legalRepresentatives() {
1283
+ return this._legalRepresentatives;
1284
+ }
1285
+
1286
+ set setLegalRepresentatives(value) {
1287
+ if (!value) return;
1288
+ this._legalRepresentatives = value.map((lr) =>
1289
+ LegalRepresentatives.fromObject(lr),
1290
+ );
1291
+ }
1292
+
1293
+ get vulnerableActivity() {
1294
+ return this._vulnerableActivity;
1295
+ }
1296
+
1297
+ set setVulnerableActivity(value) {
1298
+ if (!value) return;
1299
+ this._vulnerableActivity = VulnerableActivity.fromObject(value);
1300
+ }
1301
+
1302
+ get audit() {
1303
+ return this._audit;
1304
+ }
1305
+
1306
+ set setAudit(value) {
1307
+ if (!value) return;
1308
+ this._audit = Audit.fromObject(value);
1309
+ }
1310
+
1311
+ get license() {
1312
+ return this._license;
1313
+ }
1314
+
1315
+ set setLicense(value) {
1316
+ if (!value) return;
1317
+ this._license = License.fromObject(value);
1318
+ }
1319
+
1320
+ get transactionalProfile() {
1321
+ return this._transactionalProfile;
1322
+ }
1323
+
1324
+ set setTransactionalProfile(value) {
1325
+ if (!value) return;
1326
+ this._transactionalProfile = TransactionalProfile.fromObject(value);
1327
+ }
1328
+
1329
+ get businessDetails() {
1330
+ return this._businessDetails;
1331
+ }
1332
+
1333
+ set setBusinessDetails(value) {
1334
+ if (!value) return;
1335
+ this._businessDetails = BusinessDetails.fromObject(value);
1336
+ }
1337
+
1338
+ static fromObject = ({
1339
+ audit,
1340
+ address,
1341
+ clabe,
1342
+ folio,
1343
+ id,
1344
+ level,
1345
+ license,
1346
+ nationality,
1347
+ rfc,
1348
+ status,
1349
+ shareholders,
1350
+ ...obj
1351
+ }) =>
1352
+ new Partner({
1353
+ address,
1354
+ audit,
1355
+ clabe,
1356
+ folio,
1357
+ id,
1358
+ level,
1359
+ license,
1360
+ nationality,
1361
+ rfc,
1362
+ shareholders,
1363
+ status,
1364
+ legalName: obj.legal_name,
1365
+ legalRepresentatives: obj.legal_representatives,
1366
+ businessModel: obj.business_model,
1367
+ businessName: obj.business_name,
1368
+ businessDetails: obj.business_details,
1369
+ createdAt: obj.created_at,
1370
+ documentationUrl: obj.documentation_url,
1371
+ emailAddress: obj.email_address,
1372
+ externalAccount: obj.external_account,
1373
+ incorporationDate: obj.incorporation_date,
1374
+ phoneNumber: obj.phone_number,
1375
+ platformId: obj.platform_id,
1376
+ requiredLevel: obj.required_level,
1377
+ transactionalProfile: obj.transactional_profile,
1378
+ updatedAt: obj.updated_at,
1379
+ userType: obj.user_type,
1380
+ vulnerableActivity: obj.vulnerable_activity,
1381
+ webSite: obj.web_site,
1382
+ });
1383
+ }
1384
+
1040
1385
  class Wallet {
1041
1386
  constructor({ balance, createdAt, deactivatedAt, id, userId, updatedAt }) {
1042
1387
  this.balance = balance;
@@ -1244,6 +1589,7 @@ class User {
1244
1589
  status,
1245
1590
  termsOfService,
1246
1591
  updatedAt,
1592
+ userType,
1247
1593
  verificationId,
1248
1594
  }) {
1249
1595
  this.setAddress = address;
@@ -1275,6 +1621,7 @@ class User {
1275
1621
  this.status = enumValueFromString(UserStatus, status);
1276
1622
  this.setTerms = termsOfService;
1277
1623
  this.updatedAt = dateToUTC(updatedAt);
1624
+ this.userType = userType;
1278
1625
  this.verificationId = verificationId;
1279
1626
  }
1280
1627
 
@@ -1372,6 +1719,7 @@ class User {
1372
1719
  stateOfBirth: obj.state_of_birth,
1373
1720
  termsOfService: obj.terms_of_service,
1374
1721
  updatedAt: obj.updated_at,
1722
+ userType: obj.user_type,
1375
1723
  verificationId: obj.verification_id,
1376
1724
  });
1377
1725
  }
@@ -1557,6 +1905,7 @@ const getModelFromPath = (path, obj) => {
1557
1905
  files: () => File.fromObject(obj),
1558
1906
  kyc_validations: () => KYCValidations.fromObject(obj),
1559
1907
  login_tokens: () => LoginToken.fromObject(obj),
1908
+ partners: () => Partner.fromObject(obj),
1560
1909
  savings: () => Saving.fromObject(obj),
1561
1910
  service_providers: () => ServiceProvider.fromObject(obj),
1562
1911
  sessions: () => Session.fromObject(obj),
@@ -2062,6 +2411,29 @@ class LoginTokenResource extends mix(Resource).with(Creatable) {
2062
2411
  }
2063
2412
  }
2064
2413
 
2414
+ class PartnerResource extends mix(Resource).with(
2415
+ Creatable,
2416
+ Queryable,
2417
+ Updateable,
2418
+ Retrievable,
2419
+ ) {
2420
+ constructor(client) {
2421
+ super('partners', QueryParams, client);
2422
+ }
2423
+
2424
+ async create({ ...req }) {
2425
+ const request = new PartnerUserRequest(req);
2426
+ const moral = await this._create(request.toObect());
2427
+ return moral;
2428
+ }
2429
+
2430
+ async update({ userId = 'me', ...req }) {
2431
+ const request = new PartnerUserRequest(req);
2432
+ const moral = await this._update(userId, request.toObject());
2433
+ return moral;
2434
+ }
2435
+ }
2436
+
2065
2437
  class SavingResource extends mix(Resource).with(
2066
2438
  Creatable,
2067
2439
  Deactivable,
@@ -2376,6 +2748,7 @@ class Cuenca {
2376
2748
  this.files = new FileResource(client);
2377
2749
  this.kycValidations = new KYCValidationsResource(client);
2378
2750
  this.loginTokens = new LoginTokenResource(client);
2751
+ this.partners = new PartnerResource(client);
2379
2752
  this.savings = new SavingResource(client);
2380
2753
  this.serviceProviders = new ServiceProviderResource(client);
2381
2754
  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-d488d4ff.cjs');
5
+ var walletTransactionRequest = require('../walletTransactionRequest-7a9ae1a7.cjs');
6
6
  require('../errors/index.cjs');
7
- require('../data-92aab1cc.cjs');
7
+ require('../data-e4c28528.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-158d4fc6.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-158d4fc6.mjs';
1
+ import { B as BaseRequest } from '../walletTransactionRequest-dcc77215.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-dcc77215.mjs';
3
3
  import '../errors/index.mjs';
4
- import '../data-7e8b28c6.mjs';
4
+ import '../data-fa5e8a84.mjs';
5
5
 
6
6
  class UploadRequest extends BaseRequest {
7
7
  constructor({ isBack = false, file, extension, type, userId = 'me' }) {
@@ -2,11 +2,54 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var data = require('../data-92aab1cc.cjs');
6
- var identities = require('../identities-21139389.cjs');
5
+ var data = require('../data-e4c28528.cjs');
6
+ var vulnerableActivity = require('../vulnerableActivity-8f7d19e6.cjs');
7
7
  require('../errors/index.cjs');
8
8
 
9
+ class PageSize {
10
+ constructor(size) {
11
+ this.maxSize = 100;
12
+ this._ps = size;
13
+ }
9
14
 
15
+ get size() {
16
+ return this._pageSize;
17
+ }
18
+
19
+ set _ps(value) {
20
+ let validatedPageSize = this.maxSize;
21
+ if (value && value > 0 && value <= this.maxSize) {
22
+ validatedPageSize = value;
23
+ }
24
+ this._pageSize = validatedPageSize;
25
+ }
26
+ }
27
+
28
+ class ExternalAccount {
29
+ constructor({ bank, account }) {
30
+ this.bank = bank;
31
+ this.account = account;
32
+ }
33
+
34
+ static fromObject = ({ account, bank }) =>
35
+ new ExternalAccount({
36
+ bank,
37
+ account,
38
+ });
39
+ }
40
+
41
+ class MoralOperation {
42
+ constructor({ transactions, amount }) {
43
+ this.transactions = transactions;
44
+ this.amount = amount;
45
+ }
46
+
47
+ static fromObject = ({ transactions, amount }) =>
48
+ new MoralOperation({
49
+ transactions,
50
+ amount,
51
+ });
52
+ }
10
53
 
11
54
  exports.AlertStatus = data.AlertStatus;
12
55
  exports.BridgeAccountStatus = data.BridgeAccountStatus;
@@ -38,30 +81,41 @@ exports.TrackDataMethod = data.TrackDataMethod;
38
81
  exports.TransactionStatus = data.TransactionStatus;
39
82
  exports.TransferNetwork = data.TransferNetwork;
40
83
  exports.UserStatus = data.UserStatus;
84
+ exports.UserType = data.UserType;
41
85
  exports.VerificationStatus = data.VerificationStatus;
42
86
  exports.VerificationType = data.VerificationType;
43
87
  exports.WalletTransactionType = data.WalletTransactionType;
44
- exports.AccountQuery = identities.AccountQuery;
45
- exports.Address = identities.Address;
46
- exports.AlertLog = identities.AlertLog;
47
- exports.AlertQuery = identities.AlertQuery;
48
- exports.ApiKeyQuery = identities.ApiKeyQuery;
49
- exports.BalanceEntryQuery = identities.BalanceEntryQuery;
50
- exports.BillPaymentQuery = identities.BillPaymentQuery;
51
- exports.BridgeAccountQuery = identities.BridgeAccountQuery;
52
- exports.BridgeBankAccountQuery = identities.BridgeBankAccountQuery;
53
- exports.BridgeQuery = identities.BridgeQuery;
54
- exports.BridgeTransactionQuery = identities.BridgeTransactionQuery;
55
- exports.CardTransactionQuery = identities.CardTransactionQuery;
56
- exports.CardsQuery = identities.CardsQuery;
57
- exports.DepositQuery = identities.DepositQuery;
58
- exports.KYCFile = identities.KYCFile;
59
- exports.PageSize = identities.PageSize;
60
- exports.QueryParams = identities.QueryParams;
61
- exports.StatementQuery = identities.StatementQuery;
62
- exports.TOSAgreements = identities.TOSAgreements;
63
- exports.TransactionQuery = identities.TransactionQuery;
64
- exports.TransferQuery = identities.TransferQuery;
65
- exports.UserQuery = identities.UserQuery;
66
- exports.WalletQuery = identities.WalletQuery;
67
- exports.WalletTransactionQuery = identities.WalletTransactionQuery;
88
+ exports.AccountQuery = vulnerableActivity.AccountQuery;
89
+ exports.Address = vulnerableActivity.Address;
90
+ exports.AlertLog = vulnerableActivity.AlertLog;
91
+ exports.AlertQuery = vulnerableActivity.AlertQuery;
92
+ exports.ApiKeyQuery = vulnerableActivity.ApiKeyQuery;
93
+ exports.Audit = vulnerableActivity.Audit;
94
+ exports.BalanceEntryQuery = vulnerableActivity.BalanceEntryQuery;
95
+ exports.BillPaymentQuery = vulnerableActivity.BillPaymentQuery;
96
+ exports.BridgeAccountQuery = vulnerableActivity.BridgeAccountQuery;
97
+ exports.BridgeBankAccountQuery = vulnerableActivity.BridgeBankAccountQuery;
98
+ exports.BridgeQuery = vulnerableActivity.BridgeQuery;
99
+ exports.BridgeTransactionQuery = vulnerableActivity.BridgeTransactionQuery;
100
+ exports.BusinessDetails = vulnerableActivity.BusinessDetails;
101
+ exports.CardTransactionQuery = vulnerableActivity.CardTransactionQuery;
102
+ exports.CardsQuery = vulnerableActivity.CardsQuery;
103
+ exports.DepositQuery = vulnerableActivity.DepositQuery;
104
+ exports.KYCFile = vulnerableActivity.KYCFile;
105
+ exports.LegalRepresentatives = vulnerableActivity.LegalRepresentatives;
106
+ exports.License = vulnerableActivity.License;
107
+ exports.QueryParams = vulnerableActivity.QueryParams;
108
+ exports.ShareholderMoral = vulnerableActivity.ShareholderMoral;
109
+ exports.StatementQuery = vulnerableActivity.StatementQuery;
110
+ exports.TOSAgreements = vulnerableActivity.TOSAgreements;
111
+ exports.TransactionQuery = vulnerableActivity.TransactionQuery;
112
+ exports.TransactionalProfileServices = vulnerableActivity.TransactionalProfileServices;
113
+ exports.TransferQuery = vulnerableActivity.TransferQuery;
114
+ exports.UserQuery = vulnerableActivity.UserQuery;
115
+ exports.VerificationError = vulnerableActivity.VerificationError;
116
+ exports.VulnerableActivity = vulnerableActivity.VulnerableActivity;
117
+ exports.WalletQuery = vulnerableActivity.WalletQuery;
118
+ exports.WalletTransactionQuery = vulnerableActivity.WalletTransactionQuery;
119
+ exports.ExternalAccount = ExternalAccount;
120
+ exports.MoralOperation = MoralOperation;
121
+ exports.PageSize = PageSize;
@@ -1,3 +1,50 @@
1
- export { A as AlertStatus, B as BridgeAccountStatus, f as BridgeBankAccountStatus, g as BridgeTransactionType, l as CardErrorType, h as CardFundingType, i as CardIssuer, j as CardStatus, m as CardTransactionType, k as CardType, n as CommissionType, C as Currency, D as DepositNetwork, E as EntryType, F as FileFormat, K as KYCFileType, M as MLIndicatorLevel, a as MLIndicatorPeriod, b as MLIndicatorType, N as Network, c as PLDFinterType, P as Phase, o as SavingCategory, p as ServiceProviderCategory, q as SessionType, S as SourceAlertType, t as TrackDataMethod, T as TransactionStatus, r as TransferNetwork, U as UserStatus, V as VerificationStatus, s as VerificationType, W as WalletTransactionType } from '../data-7e8b28c6.mjs';
2
- export { b as AccountQuery, a as Address, A as AlertLog, c as AlertQuery, d as ApiKeyQuery, B as BalanceEntryQuery, e as BillPaymentQuery, f as BridgeAccountQuery, g as BridgeBankAccountQuery, h as BridgeQuery, i as BridgeTransactionQuery, j as CardTransactionQuery, C as CardsQuery, D as DepositQuery, K as KYCFile, P as PageSize, Q as QueryParams, S as StatementQuery, T as TOSAgreements, m as TransactionQuery, k as TransferQuery, U as UserQuery, W as WalletQuery, l as WalletTransactionQuery } from '../identities-2fdef0f0.mjs';
1
+ export { A as AlertStatus, B as BridgeAccountStatus, f as BridgeBankAccountStatus, g as BridgeTransactionType, l as CardErrorType, h as CardFundingType, i as CardIssuer, j as CardStatus, m as CardTransactionType, k as CardType, n as CommissionType, C as Currency, D as DepositNetwork, E as EntryType, F as FileFormat, K as KYCFileType, M as MLIndicatorLevel, a as MLIndicatorPeriod, b as MLIndicatorType, N as Network, c as PLDFinterType, P as Phase, o as SavingCategory, p as ServiceProviderCategory, q as SessionType, S as SourceAlertType, t as TrackDataMethod, T as TransactionStatus, r as TransferNetwork, U as UserStatus, u as UserType, V as VerificationStatus, s as VerificationType, W as WalletTransactionType } from '../data-fa5e8a84.mjs';
2
+ export { e as AccountQuery, a as Address, A as AlertLog, f as AlertQuery, g as ApiKeyQuery, c as Audit, h as BalanceEntryQuery, i as BillPaymentQuery, j as BridgeAccountQuery, k as BridgeBankAccountQuery, l as BridgeQuery, m as BridgeTransactionQuery, B as BusinessDetails, n as CardTransactionQuery, C as CardsQuery, D as DepositQuery, K as KYCFile, L as LegalRepresentatives, d as License, Q as QueryParams, S as ShareholderMoral, o as StatementQuery, T as TOSAgreements, r as TransactionQuery, b as TransactionalProfileServices, p as TransferQuery, U as UserQuery, s as VerificationError, V as VulnerableActivity, W as WalletQuery, q as WalletTransactionQuery } from '../vulnerableActivity-e1e6fdf0.mjs';
3
3
  import '../errors/index.mjs';
4
+
5
+ class PageSize {
6
+ constructor(size) {
7
+ this.maxSize = 100;
8
+ this._ps = size;
9
+ }
10
+
11
+ get size() {
12
+ return this._pageSize;
13
+ }
14
+
15
+ set _ps(value) {
16
+ let validatedPageSize = this.maxSize;
17
+ if (value && value > 0 && value <= this.maxSize) {
18
+ validatedPageSize = value;
19
+ }
20
+ this._pageSize = validatedPageSize;
21
+ }
22
+ }
23
+
24
+ class ExternalAccount {
25
+ constructor({ bank, account }) {
26
+ this.bank = bank;
27
+ this.account = account;
28
+ }
29
+
30
+ static fromObject = ({ account, bank }) =>
31
+ new ExternalAccount({
32
+ bank,
33
+ account,
34
+ });
35
+ }
36
+
37
+ class MoralOperation {
38
+ constructor({ transactions, amount }) {
39
+ this.transactions = transactions;
40
+ this.amount = amount;
41
+ }
42
+
43
+ static fromObject = ({ transactions, amount }) =>
44
+ new MoralOperation({
45
+ transactions,
46
+ amount,
47
+ });
48
+ }
49
+
50
+ export { ExternalAccount, MoralOperation, PageSize };