@cuenca-mx/cuenca-js 0.0.14-dev11 → 0.0.14-dev13
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-92aab1cc.cjs → data-e4c28528.cjs} +13 -0
- package/build/{data-7e8b28c6.mjs → data-fa5e8a84.mjs} +13 -1
- package/build/index.cjs +363 -35
- package/build/index.mjs +332 -4
- package/build/requests/index.cjs +3 -2
- package/build/requests/index.mjs +3 -3
- package/build/types/index.cjs +80 -26
- package/build/types/index.mjs +49 -2
- package/build/umd/cuenca.umd.js +1 -1
- package/build/{identities-2fdef0f0.mjs → vulnerableActivity-2fdebcc2.mjs} +383 -194
- package/build/{identities-21139389.cjs → vulnerableActivity-aad6b958.cjs} +390 -194
- package/build/{walletTransactionRequest-d488d4ff.cjs → walletTransactionRequest-7a9ae1a7.cjs} +106 -1
- package/build/{walletTransactionRequest-158d4fc6.mjs → walletTransactionRequest-dcc77215.mjs} +106 -2
- package/package.json +3 -2
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,
|
|
6
|
-
import { A as AlertLog, a as Address, K as KYCFile, T as TOSAgreements, b as
|
|
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-
|
|
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-2fdebcc2.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-
|
|
20
|
+
const name="@cuenca-mx/cuenca-js";const version="0.0.14-dev13";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,306 @@ 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
|
+
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
|
+
nationality,
|
|
1148
|
+
rfc,
|
|
1149
|
+
status,
|
|
1150
|
+
createdAt: obj.created_at,
|
|
1151
|
+
emailAddress: obj.email_address,
|
|
1152
|
+
phoneNumber: obj.phone_number,
|
|
1153
|
+
platformId: obj.platform_id,
|
|
1154
|
+
requiredLevel: obj.required_level,
|
|
1155
|
+
updatedAt: obj.updated_at,
|
|
1156
|
+
userType: obj.user_type,
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
class Partner extends BaseUser {
|
|
1161
|
+
constructor({
|
|
1162
|
+
address,
|
|
1163
|
+
audit,
|
|
1164
|
+
businessDetails,
|
|
1165
|
+
businessName,
|
|
1166
|
+
clabe,
|
|
1167
|
+
createdAt,
|
|
1168
|
+
documentationUrl,
|
|
1169
|
+
emailAddress,
|
|
1170
|
+
externalAccount,
|
|
1171
|
+
folio,
|
|
1172
|
+
id,
|
|
1173
|
+
incorporationDate,
|
|
1174
|
+
legalName,
|
|
1175
|
+
legalRepresentatives,
|
|
1176
|
+
level,
|
|
1177
|
+
license,
|
|
1178
|
+
meta,
|
|
1179
|
+
nationality,
|
|
1180
|
+
phoneNumber,
|
|
1181
|
+
platformId,
|
|
1182
|
+
requiredLevel,
|
|
1183
|
+
rfc,
|
|
1184
|
+
shareholders,
|
|
1185
|
+
status,
|
|
1186
|
+
transactionalProfile,
|
|
1187
|
+
updatedAt,
|
|
1188
|
+
userId,
|
|
1189
|
+
userType,
|
|
1190
|
+
vulnerableActivity,
|
|
1191
|
+
webSite,
|
|
1192
|
+
}) {
|
|
1193
|
+
super({
|
|
1194
|
+
address,
|
|
1195
|
+
clabe,
|
|
1196
|
+
emailAddress,
|
|
1197
|
+
rfc,
|
|
1198
|
+
id,
|
|
1199
|
+
level,
|
|
1200
|
+
license,
|
|
1201
|
+
meta,
|
|
1202
|
+
nationality,
|
|
1203
|
+
platformId,
|
|
1204
|
+
phoneNumber,
|
|
1205
|
+
requiredLevel,
|
|
1206
|
+
status,
|
|
1207
|
+
createdAt,
|
|
1208
|
+
updatedAt,
|
|
1209
|
+
userType,
|
|
1210
|
+
});
|
|
1211
|
+
this.setAudit = audit;
|
|
1212
|
+
this.businessName = businessName;
|
|
1213
|
+
this.setBusinessDetails = businessDetails;
|
|
1214
|
+
this.documentationUrl = documentationUrl;
|
|
1215
|
+
this.incorporationDate = dateToUTC(incorporationDate);
|
|
1216
|
+
this.externalAccount = externalAccount;
|
|
1217
|
+
this.folio = folio;
|
|
1218
|
+
this.legalName = legalName;
|
|
1219
|
+
this.setLicense = license;
|
|
1220
|
+
this.setShareholders = shareholders;
|
|
1221
|
+
this.setLegalRepresentatives = legalRepresentatives;
|
|
1222
|
+
this.setTransactionalProfile = transactionalProfile;
|
|
1223
|
+
this.userId = userId;
|
|
1224
|
+
this.setVulnerableActivity = vulnerableActivity;
|
|
1225
|
+
this.webSite = webSite;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
get shareholders() {
|
|
1229
|
+
return this._shareholders;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
set setShareholders(value) {
|
|
1233
|
+
if (!value) return;
|
|
1234
|
+
this._shareholders = value.map((sh) => ShareholderMoral.fromObject(sh));
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
get legalRepresentatives() {
|
|
1238
|
+
return this._legalRepresentatives;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
set setLegalRepresentatives(value) {
|
|
1242
|
+
if (!value) return;
|
|
1243
|
+
this._legalRepresentatives = value.map((lr) =>
|
|
1244
|
+
LegalRepresentatives.fromObject(lr),
|
|
1245
|
+
);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
get vulnerableActivity() {
|
|
1249
|
+
return this._vulnerableActivity;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
set setVulnerableActivity(value) {
|
|
1253
|
+
if (!value) return;
|
|
1254
|
+
this._vulnerableActivity = VulnerableActivity.fromObject(value);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
get audit() {
|
|
1258
|
+
return this._audit;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
set setAudit(value) {
|
|
1262
|
+
if (!value) return;
|
|
1263
|
+
this._audit = Audit.fromObject(value);
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
get license() {
|
|
1267
|
+
return this._license;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
set setLicense(value) {
|
|
1271
|
+
if (!value) return;
|
|
1272
|
+
this._license = License.fromObject(value);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
get transactionalProfile() {
|
|
1276
|
+
return this._transactionalProfile;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
set setTransactionalProfile(value) {
|
|
1280
|
+
if (!value) return;
|
|
1281
|
+
this._transactionalProfile = TransactionalProfile.fromObject(value);
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
get businessDetails() {
|
|
1285
|
+
return this._businessDetails;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
set setBusinessDetails(value) {
|
|
1289
|
+
if (!value) return;
|
|
1290
|
+
this._businessDetails = BusinessDetails.fromObject(value);
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
static fromObject = ({
|
|
1294
|
+
audit,
|
|
1295
|
+
address,
|
|
1296
|
+
clabe,
|
|
1297
|
+
folio,
|
|
1298
|
+
id,
|
|
1299
|
+
level,
|
|
1300
|
+
license,
|
|
1301
|
+
nationality,
|
|
1302
|
+
rfc,
|
|
1303
|
+
status,
|
|
1304
|
+
shareholders,
|
|
1305
|
+
...obj
|
|
1306
|
+
}) =>
|
|
1307
|
+
new Partner({
|
|
1308
|
+
address,
|
|
1309
|
+
audit,
|
|
1310
|
+
clabe,
|
|
1311
|
+
folio,
|
|
1312
|
+
id,
|
|
1313
|
+
level,
|
|
1314
|
+
license,
|
|
1315
|
+
nationality,
|
|
1316
|
+
rfc,
|
|
1317
|
+
shareholders,
|
|
1318
|
+
status,
|
|
1319
|
+
legalName: obj.legal_name,
|
|
1320
|
+
legalRepresentatives: obj.legal_representatives,
|
|
1321
|
+
businessModel: obj.business_model,
|
|
1322
|
+
businessName: obj.business_name,
|
|
1323
|
+
businessDetails: obj.business_details,
|
|
1324
|
+
createdAt: obj.created_at,
|
|
1325
|
+
documentationUrl: obj.documentation_url,
|
|
1326
|
+
emailAddress: obj.email_address,
|
|
1327
|
+
externalAccount: obj.external_account,
|
|
1328
|
+
incorporationDate: obj.incorporation_date,
|
|
1329
|
+
phoneNumber: obj.phone_number,
|
|
1330
|
+
platformId: obj.platform_id,
|
|
1331
|
+
requiredLevel: obj.required_level,
|
|
1332
|
+
transactionalProfile: obj.transactional_profile,
|
|
1333
|
+
updatedAt: obj.updated_at,
|
|
1334
|
+
userType: obj.user_type,
|
|
1335
|
+
vulnerableActivity: obj.vulnerable_activity,
|
|
1336
|
+
webSite: obj.web_site,
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1040
1340
|
class Wallet {
|
|
1041
1341
|
constructor({ balance, createdAt, deactivatedAt, id, userId, updatedAt }) {
|
|
1042
1342
|
this.balance = balance;
|
|
@@ -1244,6 +1544,7 @@ class User {
|
|
|
1244
1544
|
status,
|
|
1245
1545
|
termsOfService,
|
|
1246
1546
|
updatedAt,
|
|
1547
|
+
userType,
|
|
1247
1548
|
verificationId,
|
|
1248
1549
|
}) {
|
|
1249
1550
|
this.setAddress = address;
|
|
@@ -1275,6 +1576,7 @@ class User {
|
|
|
1275
1576
|
this.status = enumValueFromString(UserStatus, status);
|
|
1276
1577
|
this.setTerms = termsOfService;
|
|
1277
1578
|
this.updatedAt = dateToUTC(updatedAt);
|
|
1579
|
+
this.userType = userType;
|
|
1278
1580
|
this.verificationId = verificationId;
|
|
1279
1581
|
}
|
|
1280
1582
|
|
|
@@ -1372,6 +1674,7 @@ class User {
|
|
|
1372
1674
|
stateOfBirth: obj.state_of_birth,
|
|
1373
1675
|
termsOfService: obj.terms_of_service,
|
|
1374
1676
|
updatedAt: obj.updated_at,
|
|
1677
|
+
userType: obj.user_type,
|
|
1375
1678
|
verificationId: obj.verification_id,
|
|
1376
1679
|
});
|
|
1377
1680
|
}
|
|
@@ -1557,6 +1860,7 @@ const getModelFromPath = (path, obj) => {
|
|
|
1557
1860
|
files: () => File.fromObject(obj),
|
|
1558
1861
|
kyc_validations: () => KYCValidations.fromObject(obj),
|
|
1559
1862
|
login_tokens: () => LoginToken.fromObject(obj),
|
|
1863
|
+
partners: () => Partner.fromObject(obj),
|
|
1560
1864
|
savings: () => Saving.fromObject(obj),
|
|
1561
1865
|
service_providers: () => ServiceProvider.fromObject(obj),
|
|
1562
1866
|
sessions: () => Session.fromObject(obj),
|
|
@@ -2062,6 +2366,29 @@ class LoginTokenResource extends mix(Resource).with(Creatable) {
|
|
|
2062
2366
|
}
|
|
2063
2367
|
}
|
|
2064
2368
|
|
|
2369
|
+
class PartnerResource extends mix(Resource).with(
|
|
2370
|
+
Creatable,
|
|
2371
|
+
Queryable,
|
|
2372
|
+
Updateable,
|
|
2373
|
+
Retrievable,
|
|
2374
|
+
) {
|
|
2375
|
+
constructor(client) {
|
|
2376
|
+
super('partners', QueryParams, client);
|
|
2377
|
+
}
|
|
2378
|
+
|
|
2379
|
+
async create({ ...req }) {
|
|
2380
|
+
const request = new PartnerUserRequest(req);
|
|
2381
|
+
const moral = await this._create(request.toObect());
|
|
2382
|
+
return moral;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
async update({ userId = 'me', ...req }) {
|
|
2386
|
+
const request = new PartnerUserRequest(req);
|
|
2387
|
+
const moral = await this._update(userId, request.toObject());
|
|
2388
|
+
return moral;
|
|
2389
|
+
}
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2065
2392
|
class SavingResource extends mix(Resource).with(
|
|
2066
2393
|
Creatable,
|
|
2067
2394
|
Deactivable,
|
|
@@ -2376,6 +2703,7 @@ class Cuenca {
|
|
|
2376
2703
|
this.files = new FileResource(client);
|
|
2377
2704
|
this.kycValidations = new KYCValidationsResource(client);
|
|
2378
2705
|
this.loginTokens = new LoginTokenResource(client);
|
|
2706
|
+
this.partners = new PartnerResource(client);
|
|
2379
2707
|
this.savings = new SavingResource(client);
|
|
2380
2708
|
this.serviceProviders = new ServiceProviderResource(client);
|
|
2381
2709
|
this.sessions = new SessionResource(client);
|
package/build/requests/index.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var walletTransactionRequest = require('../walletTransactionRequest-
|
|
5
|
+
var walletTransactionRequest = require('../walletTransactionRequest-7a9ae1a7.cjs');
|
|
6
6
|
require('../errors/index.cjs');
|
|
7
|
-
require('../data-
|
|
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;
|
package/build/requests/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as BaseRequest } from '../walletTransactionRequest-
|
|
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-
|
|
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-
|
|
4
|
+
import '../data-fa5e8a84.mjs';
|
|
5
5
|
|
|
6
6
|
class UploadRequest extends BaseRequest {
|
|
7
7
|
constructor({ isBack = false, file, extension, type, userId = 'me' }) {
|
package/build/types/index.cjs
CHANGED
|
@@ -2,11 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var data = require('../data-
|
|
6
|
-
var
|
|
5
|
+
var data = require('../data-e4c28528.cjs');
|
|
6
|
+
var vulnerableActivity = require('../vulnerableActivity-aad6b958.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 =
|
|
45
|
-
exports.Address =
|
|
46
|
-
exports.AlertLog =
|
|
47
|
-
exports.AlertQuery =
|
|
48
|
-
exports.ApiKeyQuery =
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
54
|
-
exports.
|
|
55
|
-
exports.
|
|
56
|
-
exports.
|
|
57
|
-
exports.
|
|
58
|
-
exports.
|
|
59
|
-
exports.
|
|
60
|
-
exports.
|
|
61
|
-
exports.
|
|
62
|
-
exports.
|
|
63
|
-
exports.
|
|
64
|
-
exports.
|
|
65
|
-
exports.
|
|
66
|
-
exports.
|
|
67
|
-
exports.
|
|
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;
|
package/build/types/index.mjs
CHANGED
|
@@ -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-
|
|
2
|
-
export {
|
|
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-2fdebcc2.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 };
|