@cuenca-mx/cuenca-js 1.0.1 → 1.0.3
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/README.md +11 -2
- package/build/{data-6a1372ed.cjs → data-05e6356c.cjs} +11 -0
- package/build/{data-cef0ccf2.mjs → data-1407d97a.mjs} +11 -1
- package/build/index.cjs +105 -10
- package/build/index.mjs +105 -10
- package/build/requests/index.cjs +3 -2
- package/build/requests/index.mjs +3 -3
- package/build/types/index.cjs +4 -2
- package/build/types/index.mjs +2 -2
- package/build/umd/cuenca.umd.js +1 -1
- package/build/{vulnerableActivity-7996ae63.cjs → vulnerableActivity-1c803b4b.cjs} +15 -1
- package/build/{vulnerableActivity-8580107b.mjs → vulnerableActivity-682cac99.mjs} +15 -2
- package/build/{walletTransactionRequest-ff48dba8.cjs → walletTransactionRequest-db9c27b7.cjs} +162 -159
- package/build/{walletTransactionRequest-488638b1.mjs → walletTransactionRequest-ee13a264.mjs} +162 -160
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -144,11 +144,20 @@ Please submit an issue and how to replicate it.
|
|
|
144
144
|
|
|
145
145
|
Fork the repo and send your PR so we can review it! Any and all help is welcomed, just keep in mind:
|
|
146
146
|
|
|
147
|
+
#### Linting
|
|
148
|
+
|
|
149
|
+
Run linting from the **root of the project** (not from packages/cuenca-js):
|
|
150
|
+
```bash
|
|
151
|
+
npm run lint
|
|
152
|
+
```
|
|
153
|
+
|
|
147
154
|
#### Testing
|
|
148
155
|
|
|
149
156
|
Be sure to keep coverage at least 99%
|
|
150
|
-
|
|
151
|
-
|
|
157
|
+
|
|
158
|
+
From the **root of the project**:
|
|
159
|
+
```bash
|
|
160
|
+
npm test
|
|
152
161
|
```
|
|
153
162
|
|
|
154
163
|
## Contact
|
|
@@ -242,6 +242,16 @@ class KYCFileType {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
+
class KYCValidationSource {
|
|
246
|
+
static Client = new KYCValidationSource('client');
|
|
247
|
+
|
|
248
|
+
static Server = new KYCValidationSource('server');
|
|
249
|
+
|
|
250
|
+
constructor(value) {
|
|
251
|
+
this.value = value;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
245
255
|
class MLIndicatorLevel {
|
|
246
256
|
static Low = new MLIndicatorLevel('low');
|
|
247
257
|
|
|
@@ -535,6 +545,7 @@ exports.DepositNetwork = DepositNetwork;
|
|
|
535
545
|
exports.EntryType = EntryType;
|
|
536
546
|
exports.FileFormat = FileFormat;
|
|
537
547
|
exports.KYCFileType = KYCFileType;
|
|
548
|
+
exports.KYCValidationSource = KYCValidationSource;
|
|
538
549
|
exports.MLIndicatorLevel = MLIndicatorLevel;
|
|
539
550
|
exports.MLIndicatorPeriod = MLIndicatorPeriod;
|
|
540
551
|
exports.MLIndicatorType = MLIndicatorType;
|
|
@@ -240,6 +240,16 @@ class KYCFileType {
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
+
class KYCValidationSource {
|
|
244
|
+
static Client = new KYCValidationSource('client');
|
|
245
|
+
|
|
246
|
+
static Server = new KYCValidationSource('server');
|
|
247
|
+
|
|
248
|
+
constructor(value) {
|
|
249
|
+
this.value = value;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
243
253
|
class MLIndicatorLevel {
|
|
244
254
|
static Low = new MLIndicatorLevel('low');
|
|
245
255
|
|
|
@@ -517,4 +527,4 @@ const dateToUTC = (date) => {
|
|
|
517
527
|
const enumValueFromString = (enumValue, value) =>
|
|
518
528
|
Object.values(enumValue).find((enumV) => enumV.value === value);
|
|
519
529
|
|
|
520
|
-
export { AlertStatus as A, BridgeAccountStatus as B, Currency as C, DepositNetwork as D, EntryType as E, FileFormat as F, KYCFileType as K, MLIndicatorLevel as M, Network as N, Phase as P, SourceAlertType as S, TransactionStatus as T, UserStatus as U, VerificationStatus as V, WalletTransactionType as W, MLIndicatorPeriod as a, MLIndicatorType as b, PLDFilterType as c, dateToUTC as d, enumValueFromString as e, BridgeBankAccountStatus as f, BridgeTransactionType as g, CardFundingType as h, CardIssuer as i, CardStatus as j, CardType as k, CardErrorType as l, CardTransactionType as m, CommissionType as n,
|
|
530
|
+
export { AlertStatus as A, BridgeAccountStatus as B, Currency as C, DepositNetwork as D, EntryType as E, FileFormat as F, KYCFileType as K, MLIndicatorLevel as M, Network as N, Phase as P, SourceAlertType as S, TransactionStatus as T, UserStatus as U, VerificationStatus as V, WalletTransactionType as W, MLIndicatorPeriod as a, MLIndicatorType as b, PLDFilterType as c, dateToUTC as d, enumValueFromString as e, BridgeBankAccountStatus as f, BridgeTransactionType as g, CardFundingType as h, CardIssuer as i, CardStatus as j, CardType as k, CardErrorType as l, CardTransactionType as m, CommissionType as n, KYCValidationSource as o, SavingCategory as p, ServiceProviderCategory as q, SessionType as r, TransferNetwork as s, VerificationType as t, TrackDataMethod as u, UserType as v };
|
package/build/index.cjs
CHANGED
|
@@ -6,9 +6,9 @@ var axios = require('axios');
|
|
|
6
6
|
var Buffer = require('buffer');
|
|
7
7
|
var errors_index = require('./errors/index.cjs');
|
|
8
8
|
var jwt_index = require('./jwt/index.cjs');
|
|
9
|
-
var data = require('./data-
|
|
10
|
-
var vulnerableActivity = require('./vulnerableActivity-
|
|
11
|
-
var walletTransactionRequest = require('./walletTransactionRequest-
|
|
9
|
+
var data = require('./data-05e6356c.cjs');
|
|
10
|
+
var vulnerableActivity = require('./vulnerableActivity-1c803b4b.cjs');
|
|
11
|
+
var walletTransactionRequest = require('./walletTransactionRequest-db9c27b7.cjs');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
14
|
|
|
@@ -26,7 +26,7 @@ const isNode =
|
|
|
26
26
|
|
|
27
27
|
const runtimeEnv = { isBrowser, isNode };
|
|
28
28
|
|
|
29
|
-
const name="@cuenca-mx/cuenca-js";const version="1.0.
|
|
29
|
+
const name="@cuenca-mx/cuenca-js";const version="1.0.3";const description="Cuenca client for JS";const main="./build/index.cjs";const module$1="./build/index.mjs";const browser="./build/umd/cuenca.umd.js";const files=["build/**/*"];const exports$1={".":{"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$1,browser:browser,files:files,exports:exports$1,packageManager:packageManager,type:type,repository:repository,keywords:keywords,license:license,bugs:bugs,homepage:homepage,scripts:scripts,devDependencies:devDependencies,dependencies:dependencies};
|
|
30
30
|
|
|
31
31
|
class Client {
|
|
32
32
|
constructor({
|
|
@@ -1022,19 +1022,66 @@ class File {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
|
|
1024
1024
|
class KYCValidations {
|
|
1025
|
-
constructor({
|
|
1026
|
-
|
|
1027
|
-
|
|
1025
|
+
constructor({
|
|
1026
|
+
id,
|
|
1027
|
+
createdAt,
|
|
1028
|
+
updatedAt,
|
|
1029
|
+
deactivatedAt,
|
|
1030
|
+
platformId,
|
|
1031
|
+
filesUri,
|
|
1032
|
+
userId,
|
|
1033
|
+
verificationId,
|
|
1034
|
+
identityId,
|
|
1035
|
+
govtIdStatus,
|
|
1036
|
+
proofOfAddressStatus,
|
|
1037
|
+
proofOfLifeStatus,
|
|
1038
|
+
sourceType,
|
|
1039
|
+
flowId,
|
|
1040
|
+
status,
|
|
1041
|
+
providerUrl,
|
|
1042
|
+
}) {
|
|
1043
|
+
this.id = id;
|
|
1044
|
+
this.createdAt = data.dateToUTC(createdAt);
|
|
1045
|
+
this.updatedAt = data.dateToUTC(updatedAt);
|
|
1046
|
+
this.deactivatedAt = data.dateToUTC(deactivatedAt);
|
|
1028
1047
|
this.platformId = platformId;
|
|
1048
|
+
this.filesUri = filesUri || [];
|
|
1049
|
+
this.userId = userId;
|
|
1029
1050
|
this.verificationId = verificationId;
|
|
1051
|
+
this.identityId = identityId;
|
|
1052
|
+
this.govtIdStatus = data.enumValueFromString(data.VerificationStatus, govtIdStatus);
|
|
1053
|
+
this.proofOfAddressStatus = data.enumValueFromString(
|
|
1054
|
+
data.VerificationStatus,
|
|
1055
|
+
proofOfAddressStatus,
|
|
1056
|
+
);
|
|
1057
|
+
this.proofOfLifeStatus = data.enumValueFromString(
|
|
1058
|
+
data.VerificationStatus,
|
|
1059
|
+
proofOfLifeStatus,
|
|
1060
|
+
);
|
|
1061
|
+
this.sourceType = data.enumValueFromString(data.KYCValidationSource, sourceType);
|
|
1062
|
+
this.flowId = flowId;
|
|
1063
|
+
this.status = data.enumValueFromString(data.VerificationStatus, status);
|
|
1064
|
+
this.providerUrl = providerUrl;
|
|
1030
1065
|
}
|
|
1031
1066
|
|
|
1032
|
-
static fromObject = ({
|
|
1067
|
+
static fromObject = ({ id, status, ...obj }) =>
|
|
1033
1068
|
new KYCValidations({
|
|
1034
|
-
|
|
1035
|
-
|
|
1069
|
+
id,
|
|
1070
|
+
status,
|
|
1071
|
+
createdAt: obj.created_at,
|
|
1072
|
+
updatedAt: obj.updated_at,
|
|
1073
|
+
deactivatedAt: obj.deactivated_at,
|
|
1036
1074
|
platformId: obj.platform_id,
|
|
1075
|
+
filesUri: obj.files_uri,
|
|
1076
|
+
userId: obj.user_id,
|
|
1037
1077
|
verificationId: obj.verification_id,
|
|
1078
|
+
identityId: obj.identity_id,
|
|
1079
|
+
govtIdStatus: obj.govt_id_status,
|
|
1080
|
+
proofOfAddressStatus: obj.proof_of_address_status,
|
|
1081
|
+
proofOfLifeStatus: obj.proof_of_life_status,
|
|
1082
|
+
sourceType: obj.source_type,
|
|
1083
|
+
flowId: obj.flow_id,
|
|
1084
|
+
providerUrl: obj.provider_url,
|
|
1038
1085
|
});
|
|
1039
1086
|
}
|
|
1040
1087
|
|
|
@@ -1359,6 +1406,40 @@ class Partner extends BaseUser {
|
|
|
1359
1406
|
});
|
|
1360
1407
|
}
|
|
1361
1408
|
|
|
1409
|
+
class PostalCode {
|
|
1410
|
+
constructor({
|
|
1411
|
+
id,
|
|
1412
|
+
postalCode,
|
|
1413
|
+
colonia,
|
|
1414
|
+
city,
|
|
1415
|
+
state,
|
|
1416
|
+
country,
|
|
1417
|
+
createdAt,
|
|
1418
|
+
updatedAt,
|
|
1419
|
+
}) {
|
|
1420
|
+
this.id = id;
|
|
1421
|
+
this.postalCode = postalCode;
|
|
1422
|
+
this.colonia = colonia;
|
|
1423
|
+
this.city = city;
|
|
1424
|
+
this.state = state;
|
|
1425
|
+
this.country = country;
|
|
1426
|
+
this.createdAt = data.dateToUTC(createdAt);
|
|
1427
|
+
this.updatedAt = data.dateToUTC(updatedAt);
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
static fromObject = ({ id, colonia, city, state, country, ...obj }) =>
|
|
1431
|
+
new PostalCode({
|
|
1432
|
+
id,
|
|
1433
|
+
colonia,
|
|
1434
|
+
city,
|
|
1435
|
+
state,
|
|
1436
|
+
country,
|
|
1437
|
+
postalCode: obj.postal_code,
|
|
1438
|
+
createdAt: obj.created_at,
|
|
1439
|
+
updatedAt: obj.updated_at,
|
|
1440
|
+
});
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1362
1443
|
class Wallet {
|
|
1363
1444
|
constructor({ balance, createdAt, deactivatedAt, id, userId, updatedAt }) {
|
|
1364
1445
|
this.balance = balance;
|
|
@@ -1883,6 +1964,7 @@ const getModelFromPath = (path, obj) => {
|
|
|
1883
1964
|
kyc_validations: () => KYCValidations.fromObject(obj),
|
|
1884
1965
|
login_tokens: () => LoginToken.fromObject(obj),
|
|
1885
1966
|
partners: () => Partner.fromObject(obj),
|
|
1967
|
+
postal_codes: () => PostalCode.fromObject(obj),
|
|
1886
1968
|
savings: () => Saving.fromObject(obj),
|
|
1887
1969
|
service_providers: () => ServiceProvider.fromObject(obj),
|
|
1888
1970
|
sessions: () => Session.fromObject(obj),
|
|
@@ -2355,6 +2437,7 @@ class FileResource extends mix(Resource).with(Downlodable, Uploadable) {
|
|
|
2355
2437
|
class KYCValidationsResource extends mix(Resource).with(
|
|
2356
2438
|
Creatable,
|
|
2357
2439
|
Retrievable,
|
|
2440
|
+
Deactivable,
|
|
2358
2441
|
Queryable,
|
|
2359
2442
|
) {
|
|
2360
2443
|
constructor(client, isBridge = false) {
|
|
@@ -2375,6 +2458,11 @@ class KYCValidationsResource extends mix(Resource).with(
|
|
|
2375
2458
|
const kycValidation = await this._create(request.toCleanObject());
|
|
2376
2459
|
return kycValidation;
|
|
2377
2460
|
}
|
|
2461
|
+
|
|
2462
|
+
async deactivate(kycValidationId) {
|
|
2463
|
+
const response = await this._deactivate(kycValidationId);
|
|
2464
|
+
return response;
|
|
2465
|
+
}
|
|
2378
2466
|
}
|
|
2379
2467
|
|
|
2380
2468
|
class LoginTokenResource extends mix(Resource).with(Creatable) {
|
|
@@ -2411,6 +2499,12 @@ class PartnerResource extends mix(Resource).with(
|
|
|
2411
2499
|
}
|
|
2412
2500
|
}
|
|
2413
2501
|
|
|
2502
|
+
class PostalCodeResource extends mix(Resource).with(Queryable) {
|
|
2503
|
+
constructor(client) {
|
|
2504
|
+
super('postal_codes', vulnerableActivity.PostalCodeQuery, client);
|
|
2505
|
+
}
|
|
2506
|
+
}
|
|
2507
|
+
|
|
2414
2508
|
class SavingResource extends mix(Resource).with(
|
|
2415
2509
|
Creatable,
|
|
2416
2510
|
Deactivable,
|
|
@@ -2732,6 +2826,7 @@ class Cuenca {
|
|
|
2732
2826
|
this.kycValidations = new KYCValidationsResource(client);
|
|
2733
2827
|
this.loginTokens = new LoginTokenResource(client);
|
|
2734
2828
|
this.partners = new PartnerResource(client);
|
|
2829
|
+
this.postalCodes = new PostalCodeResource(client);
|
|
2735
2830
|
this.savings = new SavingResource(client);
|
|
2736
2831
|
this.serviceProviders = new ServiceProviderResource(client);
|
|
2737
2832
|
this.sessions = new SessionResource(client);
|
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 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,
|
|
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,
|
|
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-
|
|
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, V as VerificationStatus, o as KYCValidationSource, U as UserStatus, p as SavingCategory, q as ServiceProviderCategory, r as SessionType, s as TransferNetwork, t as VerificationType, W as WalletTransactionType } from './data-1407d97a.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, o as PostalCodeQuery, W as WalletQuery, p as StatementQuery, q as TransferQuery, U as UserQuery, r as WalletTransactionQuery } from './vulnerableActivity-682cac99.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-ee13a264.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="1.0.
|
|
20
|
+
const name="@cuenca-mx/cuenca-js";const version="1.0.3";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({
|
|
@@ -1013,19 +1013,66 @@ class File {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
|
|
1015
1015
|
class KYCValidations {
|
|
1016
|
-
constructor({
|
|
1017
|
-
|
|
1018
|
-
|
|
1016
|
+
constructor({
|
|
1017
|
+
id,
|
|
1018
|
+
createdAt,
|
|
1019
|
+
updatedAt,
|
|
1020
|
+
deactivatedAt,
|
|
1021
|
+
platformId,
|
|
1022
|
+
filesUri,
|
|
1023
|
+
userId,
|
|
1024
|
+
verificationId,
|
|
1025
|
+
identityId,
|
|
1026
|
+
govtIdStatus,
|
|
1027
|
+
proofOfAddressStatus,
|
|
1028
|
+
proofOfLifeStatus,
|
|
1029
|
+
sourceType,
|
|
1030
|
+
flowId,
|
|
1031
|
+
status,
|
|
1032
|
+
providerUrl,
|
|
1033
|
+
}) {
|
|
1034
|
+
this.id = id;
|
|
1035
|
+
this.createdAt = dateToUTC(createdAt);
|
|
1036
|
+
this.updatedAt = dateToUTC(updatedAt);
|
|
1037
|
+
this.deactivatedAt = dateToUTC(deactivatedAt);
|
|
1019
1038
|
this.platformId = platformId;
|
|
1039
|
+
this.filesUri = filesUri || [];
|
|
1040
|
+
this.userId = userId;
|
|
1020
1041
|
this.verificationId = verificationId;
|
|
1042
|
+
this.identityId = identityId;
|
|
1043
|
+
this.govtIdStatus = enumValueFromString(VerificationStatus, govtIdStatus);
|
|
1044
|
+
this.proofOfAddressStatus = enumValueFromString(
|
|
1045
|
+
VerificationStatus,
|
|
1046
|
+
proofOfAddressStatus,
|
|
1047
|
+
);
|
|
1048
|
+
this.proofOfLifeStatus = enumValueFromString(
|
|
1049
|
+
VerificationStatus,
|
|
1050
|
+
proofOfLifeStatus,
|
|
1051
|
+
);
|
|
1052
|
+
this.sourceType = enumValueFromString(KYCValidationSource, sourceType);
|
|
1053
|
+
this.flowId = flowId;
|
|
1054
|
+
this.status = enumValueFromString(VerificationStatus, status);
|
|
1055
|
+
this.providerUrl = providerUrl;
|
|
1021
1056
|
}
|
|
1022
1057
|
|
|
1023
|
-
static fromObject = ({
|
|
1058
|
+
static fromObject = ({ id, status, ...obj }) =>
|
|
1024
1059
|
new KYCValidations({
|
|
1025
|
-
|
|
1026
|
-
|
|
1060
|
+
id,
|
|
1061
|
+
status,
|
|
1062
|
+
createdAt: obj.created_at,
|
|
1063
|
+
updatedAt: obj.updated_at,
|
|
1064
|
+
deactivatedAt: obj.deactivated_at,
|
|
1027
1065
|
platformId: obj.platform_id,
|
|
1066
|
+
filesUri: obj.files_uri,
|
|
1067
|
+
userId: obj.user_id,
|
|
1028
1068
|
verificationId: obj.verification_id,
|
|
1069
|
+
identityId: obj.identity_id,
|
|
1070
|
+
govtIdStatus: obj.govt_id_status,
|
|
1071
|
+
proofOfAddressStatus: obj.proof_of_address_status,
|
|
1072
|
+
proofOfLifeStatus: obj.proof_of_life_status,
|
|
1073
|
+
sourceType: obj.source_type,
|
|
1074
|
+
flowId: obj.flow_id,
|
|
1075
|
+
providerUrl: obj.provider_url,
|
|
1029
1076
|
});
|
|
1030
1077
|
}
|
|
1031
1078
|
|
|
@@ -1350,6 +1397,40 @@ class Partner extends BaseUser {
|
|
|
1350
1397
|
});
|
|
1351
1398
|
}
|
|
1352
1399
|
|
|
1400
|
+
class PostalCode {
|
|
1401
|
+
constructor({
|
|
1402
|
+
id,
|
|
1403
|
+
postalCode,
|
|
1404
|
+
colonia,
|
|
1405
|
+
city,
|
|
1406
|
+
state,
|
|
1407
|
+
country,
|
|
1408
|
+
createdAt,
|
|
1409
|
+
updatedAt,
|
|
1410
|
+
}) {
|
|
1411
|
+
this.id = id;
|
|
1412
|
+
this.postalCode = postalCode;
|
|
1413
|
+
this.colonia = colonia;
|
|
1414
|
+
this.city = city;
|
|
1415
|
+
this.state = state;
|
|
1416
|
+
this.country = country;
|
|
1417
|
+
this.createdAt = dateToUTC(createdAt);
|
|
1418
|
+
this.updatedAt = dateToUTC(updatedAt);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
static fromObject = ({ id, colonia, city, state, country, ...obj }) =>
|
|
1422
|
+
new PostalCode({
|
|
1423
|
+
id,
|
|
1424
|
+
colonia,
|
|
1425
|
+
city,
|
|
1426
|
+
state,
|
|
1427
|
+
country,
|
|
1428
|
+
postalCode: obj.postal_code,
|
|
1429
|
+
createdAt: obj.created_at,
|
|
1430
|
+
updatedAt: obj.updated_at,
|
|
1431
|
+
});
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1353
1434
|
class Wallet {
|
|
1354
1435
|
constructor({ balance, createdAt, deactivatedAt, id, userId, updatedAt }) {
|
|
1355
1436
|
this.balance = balance;
|
|
@@ -1874,6 +1955,7 @@ const getModelFromPath = (path, obj) => {
|
|
|
1874
1955
|
kyc_validations: () => KYCValidations.fromObject(obj),
|
|
1875
1956
|
login_tokens: () => LoginToken.fromObject(obj),
|
|
1876
1957
|
partners: () => Partner.fromObject(obj),
|
|
1958
|
+
postal_codes: () => PostalCode.fromObject(obj),
|
|
1877
1959
|
savings: () => Saving.fromObject(obj),
|
|
1878
1960
|
service_providers: () => ServiceProvider.fromObject(obj),
|
|
1879
1961
|
sessions: () => Session.fromObject(obj),
|
|
@@ -2346,6 +2428,7 @@ class FileResource extends mix(Resource).with(Downlodable, Uploadable) {
|
|
|
2346
2428
|
class KYCValidationsResource extends mix(Resource).with(
|
|
2347
2429
|
Creatable,
|
|
2348
2430
|
Retrievable,
|
|
2431
|
+
Deactivable,
|
|
2349
2432
|
Queryable,
|
|
2350
2433
|
) {
|
|
2351
2434
|
constructor(client, isBridge = false) {
|
|
@@ -2366,6 +2449,11 @@ class KYCValidationsResource extends mix(Resource).with(
|
|
|
2366
2449
|
const kycValidation = await this._create(request.toCleanObject());
|
|
2367
2450
|
return kycValidation;
|
|
2368
2451
|
}
|
|
2452
|
+
|
|
2453
|
+
async deactivate(kycValidationId) {
|
|
2454
|
+
const response = await this._deactivate(kycValidationId);
|
|
2455
|
+
return response;
|
|
2456
|
+
}
|
|
2369
2457
|
}
|
|
2370
2458
|
|
|
2371
2459
|
class LoginTokenResource extends mix(Resource).with(Creatable) {
|
|
@@ -2402,6 +2490,12 @@ class PartnerResource extends mix(Resource).with(
|
|
|
2402
2490
|
}
|
|
2403
2491
|
}
|
|
2404
2492
|
|
|
2493
|
+
class PostalCodeResource extends mix(Resource).with(Queryable) {
|
|
2494
|
+
constructor(client) {
|
|
2495
|
+
super('postal_codes', PostalCodeQuery, client);
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2405
2499
|
class SavingResource extends mix(Resource).with(
|
|
2406
2500
|
Creatable,
|
|
2407
2501
|
Deactivable,
|
|
@@ -2723,6 +2817,7 @@ class Cuenca {
|
|
|
2723
2817
|
this.kycValidations = new KYCValidationsResource(client);
|
|
2724
2818
|
this.loginTokens = new LoginTokenResource(client);
|
|
2725
2819
|
this.partners = new PartnerResource(client);
|
|
2820
|
+
this.postalCodes = new PostalCodeResource(client);
|
|
2726
2821
|
this.savings = new SavingResource(client);
|
|
2727
2822
|
this.serviceProviders = new ServiceProviderResource(client);
|
|
2728
2823
|
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-db9c27b7.cjs');
|
|
6
6
|
require('../errors/index.cjs');
|
|
7
|
-
require('../data-
|
|
7
|
+
require('../data-05e6356c.cjs');
|
|
8
8
|
|
|
9
9
|
class UploadRequest extends walletTransactionRequest.BaseRequest {
|
|
10
10
|
constructor({ isBack = false, file, extension, type, userId = 'me' }) {
|
|
@@ -27,6 +27,7 @@ class UploadRequest extends walletTransactionRequest.BaseRequest {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
exports.AddressUpdateRequest = walletTransactionRequest.AddressUpdateRequest;
|
|
30
31
|
exports.AlertUpdateRequest = walletTransactionRequest.AlertUpdateRequest;
|
|
31
32
|
exports.ApiKeyUpdateRequest = walletTransactionRequest.ApiKeyUpdateRequest;
|
|
32
33
|
exports.ArpcRequest = walletTransactionRequest.ArpcRequest;
|
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, 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-
|
|
1
|
+
import { B as BaseRequest } from '../walletTransactionRequest-ee13a264.mjs';
|
|
2
|
+
export { k as AddressUpdateRequest, 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-ee13a264.mjs';
|
|
3
3
|
import '../errors/index.mjs';
|
|
4
|
-
import '../data-
|
|
4
|
+
import '../data-1407d97a.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,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var data = require('../data-
|
|
6
|
-
var vulnerableActivity = require('../vulnerableActivity-
|
|
5
|
+
var data = require('../data-05e6356c.cjs');
|
|
6
|
+
var vulnerableActivity = require('../vulnerableActivity-1c803b4b.cjs');
|
|
7
7
|
require('../errors/index.cjs');
|
|
8
8
|
|
|
9
9
|
class PageSize {
|
|
@@ -54,6 +54,7 @@ exports.DepositNetwork = data.DepositNetwork;
|
|
|
54
54
|
exports.EntryType = data.EntryType;
|
|
55
55
|
exports.FileFormat = data.FileFormat;
|
|
56
56
|
exports.KYCFileType = data.KYCFileType;
|
|
57
|
+
exports.KYCValidationSource = data.KYCValidationSource;
|
|
57
58
|
exports.MLIndicatorLevel = data.MLIndicatorLevel;
|
|
58
59
|
exports.MLIndicatorPeriod = data.MLIndicatorPeriod;
|
|
59
60
|
exports.MLIndicatorType = data.MLIndicatorType;
|
|
@@ -93,6 +94,7 @@ exports.KYCFile = vulnerableActivity.KYCFile;
|
|
|
93
94
|
exports.LegalRepresentatives = vulnerableActivity.LegalRepresentatives;
|
|
94
95
|
exports.License = vulnerableActivity.License;
|
|
95
96
|
exports.PartnerQuery = vulnerableActivity.PartnerQuery;
|
|
97
|
+
exports.PostalCodeQuery = vulnerableActivity.PostalCodeQuery;
|
|
96
98
|
exports.QueryParams = vulnerableActivity.QueryParams;
|
|
97
99
|
exports.ShareholderMoral = vulnerableActivity.ShareholderMoral;
|
|
98
100
|
exports.StatementQuery = vulnerableActivity.StatementQuery;
|
package/build/types/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 PLDFilterType, P as Phase,
|
|
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, E as ExternalAccount, K as KYCFile, L as LegalRepresentatives, d as License, P as PartnerQuery, Q as QueryParams, S as ShareholderMoral,
|
|
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, o as KYCValidationSource, M as MLIndicatorLevel, a as MLIndicatorPeriod, b as MLIndicatorType, N as Network, c as PLDFilterType, P as Phase, p as SavingCategory, q as ServiceProviderCategory, r as SessionType, S as SourceAlertType, u as TrackDataMethod, T as TransactionStatus, s as TransferNetwork, U as UserStatus, v as UserType, V as VerificationStatus, t as VerificationType, W as WalletTransactionType } from '../data-1407d97a.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, E as ExternalAccount, K as KYCFile, L as LegalRepresentatives, d as License, P as PartnerQuery, o as PostalCodeQuery, Q as QueryParams, S as ShareholderMoral, p as StatementQuery, T as TOSAgreements, s as TransactionQuery, b as TransactionalProfileServices, q as TransferQuery, U as UserQuery, t as VerificationError, V as VulnerableActivity, W as WalletQuery, r as WalletTransactionQuery } from '../vulnerableActivity-682cac99.mjs';
|
|
3
3
|
import '../errors/index.mjs';
|
|
4
4
|
|
|
5
5
|
class PageSize {
|