@cuenca-mx/cuenca-js 0.0.5-dev.6 → 0.0.5-dev.8
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-86ddd935.mjs → data-487ea691.mjs} +18 -26
- package/build/{data-d25afb50.cjs → data-f85a5287.cjs} +18 -26
- package/build/{identities-f01f7ffa.mjs → identities-32031e5d.mjs} +17 -63
- package/build/{identities-b472f1c7.cjs → identities-ab85ec0b.cjs} +17 -64
- package/build/index.cjs +79 -174
- package/build/index.mjs +79 -174
- package/build/requests/index.cjs +2 -6
- package/build/requests/index.mjs +2 -4
- package/build/types/index.cjs +4 -5
- package/build/types/index.mjs +2 -2
- package/build/umd/cuenca.umd.js +1 -1
- package/build/{walletTransactionRequest-ee4e5af1.cjs → walletTransactionRequest-8a816a1f.cjs} +1 -117
- package/build/{walletTransactionRequest-180eb9ea.mjs → walletTransactionRequest-bdcb7e35.mjs} +2 -112
- package/package.json +1 -1
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
class BridgeAccountStatus {
|
|
2
|
+
static Succeeded = new BridgeAccountStatus('succeeded');
|
|
3
|
+
|
|
4
|
+
static NotValidated = new BridgeAccountStatus('not_validated');
|
|
5
|
+
|
|
6
|
+
static Failed = new BridgeAccountStatus('failed');
|
|
7
|
+
|
|
8
|
+
static OnWaitList = new BridgeAccountStatus('on_wait_list');
|
|
9
|
+
|
|
10
|
+
constructor(value) {
|
|
11
|
+
this.value = value;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
1
15
|
class CardErrorType {
|
|
2
16
|
static Blocked = new CardErrorType('blocked');
|
|
3
17
|
|
|
@@ -125,13 +139,11 @@ class EntryType {
|
|
|
125
139
|
}
|
|
126
140
|
|
|
127
141
|
class FileFormat {
|
|
128
|
-
static Pdf = new FileFormat('
|
|
142
|
+
static Pdf = new FileFormat('pdf');
|
|
129
143
|
|
|
130
|
-
static Xml = new FileFormat('
|
|
144
|
+
static Xml = new FileFormat('xml');
|
|
131
145
|
|
|
132
|
-
static Json = new FileFormat('
|
|
133
|
-
|
|
134
|
-
static Any = new FileFormat('*/*');
|
|
146
|
+
static Json = new FileFormat('json');
|
|
135
147
|
|
|
136
148
|
constructor(value) {
|
|
137
149
|
this.value = value;
|
|
@@ -300,26 +312,6 @@ class UserStatus {
|
|
|
300
312
|
}
|
|
301
313
|
}
|
|
302
314
|
|
|
303
|
-
class VerificationStatus {
|
|
304
|
-
static Created = new VerificationStatus('created');
|
|
305
|
-
|
|
306
|
-
static NotVerified = new VerificationStatus('not_verified');
|
|
307
|
-
|
|
308
|
-
static Rejected = new VerificationStatus('rejected');
|
|
309
|
-
|
|
310
|
-
static ReviewNeeded = new VerificationStatus('review_needed');
|
|
311
|
-
|
|
312
|
-
static UploadAgain = new VerificationStatus('upload_again');
|
|
313
|
-
|
|
314
|
-
static Submitted = new VerificationStatus('submitted');
|
|
315
|
-
|
|
316
|
-
static Succeeded = new VerificationStatus('succeeded');
|
|
317
|
-
|
|
318
|
-
constructor(value) {
|
|
319
|
-
this.value = value;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
315
|
class VerificationType {
|
|
324
316
|
static Phone = new VerificationType('phone');
|
|
325
317
|
|
|
@@ -349,4 +341,4 @@ const dateToUTC = (date) => {
|
|
|
349
341
|
const enumValueFromString = (enumValue, value) =>
|
|
350
342
|
Object.values(enumValue).find((enumV) => enumV.value === value);
|
|
351
343
|
|
|
352
|
-
export { CardFundingType as C, DepositNetwork as D, EntryType as E, FileFormat as F, KYCFileType as K, Phase as P, SavingCategory as S, TransactionStatus as T, UserStatus as U,
|
|
344
|
+
export { BridgeAccountStatus as B, CardFundingType as C, DepositNetwork as D, EntryType as E, FileFormat as F, KYCFileType as K, Phase as P, SavingCategory as S, TransactionStatus as T, UserStatus as U, VerificationType as V, WalletTransactionType as W, CardIssuer as a, CardStatus as b, CardType as c, dateToUTC as d, enumValueFromString as e, CardErrorType as f, CardTransactionType as g, CommissionType as h, ServiceProviderCategory as i, TransferNetwork as j, KYCStatus as k, TrackDataMethod as l };
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
class BridgeAccountStatus {
|
|
4
|
+
static Succeeded = new BridgeAccountStatus('succeeded');
|
|
5
|
+
|
|
6
|
+
static NotValidated = new BridgeAccountStatus('not_validated');
|
|
7
|
+
|
|
8
|
+
static Failed = new BridgeAccountStatus('failed');
|
|
9
|
+
|
|
10
|
+
static OnWaitList = new BridgeAccountStatus('on_wait_list');
|
|
11
|
+
|
|
12
|
+
constructor(value) {
|
|
13
|
+
this.value = value;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
3
17
|
class CardErrorType {
|
|
4
18
|
static Blocked = new CardErrorType('blocked');
|
|
5
19
|
|
|
@@ -127,13 +141,11 @@ class EntryType {
|
|
|
127
141
|
}
|
|
128
142
|
|
|
129
143
|
class FileFormat {
|
|
130
|
-
static Pdf = new FileFormat('
|
|
144
|
+
static Pdf = new FileFormat('pdf');
|
|
131
145
|
|
|
132
|
-
static Xml = new FileFormat('
|
|
146
|
+
static Xml = new FileFormat('xml');
|
|
133
147
|
|
|
134
|
-
static Json = new FileFormat('
|
|
135
|
-
|
|
136
|
-
static Any = new FileFormat('*/*');
|
|
148
|
+
static Json = new FileFormat('json');
|
|
137
149
|
|
|
138
150
|
constructor(value) {
|
|
139
151
|
this.value = value;
|
|
@@ -302,26 +314,6 @@ class UserStatus {
|
|
|
302
314
|
}
|
|
303
315
|
}
|
|
304
316
|
|
|
305
|
-
class VerificationStatus {
|
|
306
|
-
static Created = new VerificationStatus('created');
|
|
307
|
-
|
|
308
|
-
static NotVerified = new VerificationStatus('not_verified');
|
|
309
|
-
|
|
310
|
-
static Rejected = new VerificationStatus('rejected');
|
|
311
|
-
|
|
312
|
-
static ReviewNeeded = new VerificationStatus('review_needed');
|
|
313
|
-
|
|
314
|
-
static UploadAgain = new VerificationStatus('upload_again');
|
|
315
|
-
|
|
316
|
-
static Submitted = new VerificationStatus('submitted');
|
|
317
|
-
|
|
318
|
-
static Succeeded = new VerificationStatus('succeeded');
|
|
319
|
-
|
|
320
|
-
constructor(value) {
|
|
321
|
-
this.value = value;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
317
|
class VerificationType {
|
|
326
318
|
static Phone = new VerificationType('phone');
|
|
327
319
|
|
|
@@ -351,6 +343,7 @@ const dateToUTC = (date) => {
|
|
|
351
343
|
const enumValueFromString = (enumValue, value) =>
|
|
352
344
|
Object.values(enumValue).find((enumV) => enumV.value === value);
|
|
353
345
|
|
|
346
|
+
exports.BridgeAccountStatus = BridgeAccountStatus;
|
|
354
347
|
exports.CardErrorType = CardErrorType;
|
|
355
348
|
exports.CardFundingType = CardFundingType;
|
|
356
349
|
exports.CardIssuer = CardIssuer;
|
|
@@ -370,7 +363,6 @@ exports.TrackDataMethod = TrackDataMethod;
|
|
|
370
363
|
exports.TransactionStatus = TransactionStatus;
|
|
371
364
|
exports.TransferNetwork = TransferNetwork;
|
|
372
365
|
exports.UserStatus = UserStatus;
|
|
373
|
-
exports.VerificationStatus = VerificationStatus;
|
|
374
366
|
exports.VerificationType = VerificationType;
|
|
375
367
|
exports.WalletTransactionType = WalletTransactionType;
|
|
376
368
|
exports.dateToUTC = dateToUTC;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ValidationError } from './errors/index.mjs';
|
|
2
|
-
import { d as dateToUTC, e as enumValueFromString, K as KYCFileType,
|
|
2
|
+
import { d as dateToUTC, e as enumValueFromString, K as KYCFileType, k as KYCStatus } from './data-487ea691.mjs';
|
|
3
3
|
|
|
4
4
|
class PageSize {
|
|
5
5
|
constructor(size) {
|
|
@@ -296,6 +296,19 @@ class StatementQuery extends QueryParams {
|
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
+
class BridgeAccountQuery extends QueryParams {
|
|
300
|
+
constructor({ emailAddress, ...args }) {
|
|
301
|
+
super(args);
|
|
302
|
+
this.emailAddress = emailAddress;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
toObject() {
|
|
306
|
+
return Object.assign(super.toObject(), {
|
|
307
|
+
email_address: this.emailAddress,
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
299
312
|
class TOSAgreements {
|
|
300
313
|
constructor({ ip, location, type, version }) {
|
|
301
314
|
this.ip = ip;
|
|
@@ -313,41 +326,19 @@ class TOSAgreements {
|
|
|
313
326
|
});
|
|
314
327
|
}
|
|
315
328
|
|
|
316
|
-
class VerificationError {
|
|
317
|
-
constructor({ code, error, identifier, message }) {
|
|
318
|
-
this.code = code;
|
|
319
|
-
this.error = error;
|
|
320
|
-
this.identifier = identifier;
|
|
321
|
-
this.message = message;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
static fromObject = ({ code, error, identifier, message }) =>
|
|
325
|
-
new VerificationError({
|
|
326
|
-
code,
|
|
327
|
-
error,
|
|
328
|
-
identifier,
|
|
329
|
-
message,
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
|
|
333
329
|
class KYCFile {
|
|
334
|
-
constructor({ data,
|
|
330
|
+
constructor({ data, isMx, status, type, uriBack, uriFront }) {
|
|
335
331
|
this.data = data;
|
|
336
332
|
this.isMx = isMx;
|
|
337
333
|
this.status = enumValueFromString(KYCStatus, status);
|
|
338
334
|
this.type = enumValueFromString(KYCFileType, type);
|
|
339
335
|
this.uriBack = uriBack;
|
|
340
336
|
this.uriFront = uriFront;
|
|
341
|
-
|
|
342
|
-
if (errors && errors.length > 0) {
|
|
343
|
-
this.errors = errors.map((e) => VerificationError.fromObject(e));
|
|
344
|
-
}
|
|
345
337
|
}
|
|
346
338
|
|
|
347
|
-
static fromObject = ({ data,
|
|
339
|
+
static fromObject = ({ data, status, type, ...obj }) =>
|
|
348
340
|
new KYCFile({
|
|
349
341
|
data,
|
|
350
|
-
errors,
|
|
351
342
|
status,
|
|
352
343
|
type,
|
|
353
344
|
isMx: obj.is_mx,
|
|
@@ -356,41 +347,4 @@ class KYCFile {
|
|
|
356
347
|
});
|
|
357
348
|
}
|
|
358
349
|
|
|
359
|
-
|
|
360
|
-
constructor({
|
|
361
|
-
city,
|
|
362
|
-
country,
|
|
363
|
-
createdAt,
|
|
364
|
-
extNumber,
|
|
365
|
-
fullName,
|
|
366
|
-
intNumber,
|
|
367
|
-
postalCode,
|
|
368
|
-
state,
|
|
369
|
-
street,
|
|
370
|
-
}) {
|
|
371
|
-
this.city = city;
|
|
372
|
-
this.country = country;
|
|
373
|
-
this.createdAt = dateToUTC(createdAt);
|
|
374
|
-
this.extNumber = extNumber;
|
|
375
|
-
this.fullName = fullName;
|
|
376
|
-
this.intNumber = intNumber;
|
|
377
|
-
this.postalCode = postalCode;
|
|
378
|
-
this.state = state;
|
|
379
|
-
this.street = street;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
static fromObject = ({ city, country, state, street, ...obj }) =>
|
|
383
|
-
new Address({
|
|
384
|
-
city,
|
|
385
|
-
country,
|
|
386
|
-
state,
|
|
387
|
-
street,
|
|
388
|
-
createdAt: obj.created_at,
|
|
389
|
-
extNumber: obj.ext_number,
|
|
390
|
-
fullName: obj.full_name,
|
|
391
|
-
intNumber: obj.int_number,
|
|
392
|
-
postalCode: obj.postal_code,
|
|
393
|
-
});
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
export { Address as A, BalanceEntryQuery as B, CardsQuery as C, DepositQuery as D, KYCFile as K, PageSize as P, QueryParams as Q, StatementQuery as S, TOSAgreements as T, UserQuery as U, WalletQuery as W, AccountQuery as a, ApiKeyQuery as b, BillPaymentQuery as c, CardTransactionQuery as d, TransferQuery as e, WalletTransactionQuery as f, TransactionQuery as g };
|
|
350
|
+
export { AccountQuery as A, BalanceEntryQuery as B, CardsQuery as C, DepositQuery as D, KYCFile as K, PageSize as P, QueryParams as Q, StatementQuery as S, TOSAgreements as T, UserQuery as U, WalletQuery as W, ApiKeyQuery as a, BillPaymentQuery as b, BridgeAccountQuery as c, CardTransactionQuery as d, TransferQuery as e, WalletTransactionQuery as f };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var errors_index = require('./errors/index.cjs');
|
|
4
|
-
var data = require('./data-
|
|
4
|
+
var data = require('./data-f85a5287.cjs');
|
|
5
5
|
|
|
6
6
|
class PageSize {
|
|
7
7
|
constructor(size) {
|
|
@@ -298,6 +298,19 @@ class StatementQuery extends QueryParams {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
+
class BridgeAccountQuery extends QueryParams {
|
|
302
|
+
constructor({ emailAddress, ...args }) {
|
|
303
|
+
super(args);
|
|
304
|
+
this.emailAddress = emailAddress;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
toObject() {
|
|
308
|
+
return Object.assign(super.toObject(), {
|
|
309
|
+
email_address: this.emailAddress,
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
301
314
|
class TOSAgreements {
|
|
302
315
|
constructor({ ip, location, type, version }) {
|
|
303
316
|
this.ip = ip;
|
|
@@ -315,41 +328,19 @@ class TOSAgreements {
|
|
|
315
328
|
});
|
|
316
329
|
}
|
|
317
330
|
|
|
318
|
-
class VerificationError {
|
|
319
|
-
constructor({ code, error, identifier, message }) {
|
|
320
|
-
this.code = code;
|
|
321
|
-
this.error = error;
|
|
322
|
-
this.identifier = identifier;
|
|
323
|
-
this.message = message;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
static fromObject = ({ code, error, identifier, message }) =>
|
|
327
|
-
new VerificationError({
|
|
328
|
-
code,
|
|
329
|
-
error,
|
|
330
|
-
identifier,
|
|
331
|
-
message,
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
|
|
335
331
|
class KYCFile {
|
|
336
|
-
constructor({ data: data$1,
|
|
332
|
+
constructor({ data: data$1, isMx, status, type, uriBack, uriFront }) {
|
|
337
333
|
this.data = data$1;
|
|
338
334
|
this.isMx = isMx;
|
|
339
335
|
this.status = data.enumValueFromString(data.KYCStatus, status);
|
|
340
336
|
this.type = data.enumValueFromString(data.KYCFileType, type);
|
|
341
337
|
this.uriBack = uriBack;
|
|
342
338
|
this.uriFront = uriFront;
|
|
343
|
-
|
|
344
|
-
if (errors && errors.length > 0) {
|
|
345
|
-
this.errors = errors.map((e) => VerificationError.fromObject(e));
|
|
346
|
-
}
|
|
347
339
|
}
|
|
348
340
|
|
|
349
|
-
static fromObject = ({ data,
|
|
341
|
+
static fromObject = ({ data, status, type, ...obj }) =>
|
|
350
342
|
new KYCFile({
|
|
351
343
|
data,
|
|
352
|
-
errors,
|
|
353
344
|
status,
|
|
354
345
|
type,
|
|
355
346
|
isMx: obj.is_mx,
|
|
@@ -358,48 +349,11 @@ class KYCFile {
|
|
|
358
349
|
});
|
|
359
350
|
}
|
|
360
351
|
|
|
361
|
-
class Address {
|
|
362
|
-
constructor({
|
|
363
|
-
city,
|
|
364
|
-
country,
|
|
365
|
-
createdAt,
|
|
366
|
-
extNumber,
|
|
367
|
-
fullName,
|
|
368
|
-
intNumber,
|
|
369
|
-
postalCode,
|
|
370
|
-
state,
|
|
371
|
-
street,
|
|
372
|
-
}) {
|
|
373
|
-
this.city = city;
|
|
374
|
-
this.country = country;
|
|
375
|
-
this.createdAt = data.dateToUTC(createdAt);
|
|
376
|
-
this.extNumber = extNumber;
|
|
377
|
-
this.fullName = fullName;
|
|
378
|
-
this.intNumber = intNumber;
|
|
379
|
-
this.postalCode = postalCode;
|
|
380
|
-
this.state = state;
|
|
381
|
-
this.street = street;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
static fromObject = ({ city, country, state, street, ...obj }) =>
|
|
385
|
-
new Address({
|
|
386
|
-
city,
|
|
387
|
-
country,
|
|
388
|
-
state,
|
|
389
|
-
street,
|
|
390
|
-
createdAt: obj.created_at,
|
|
391
|
-
extNumber: obj.ext_number,
|
|
392
|
-
fullName: obj.full_name,
|
|
393
|
-
intNumber: obj.int_number,
|
|
394
|
-
postalCode: obj.postal_code,
|
|
395
|
-
});
|
|
396
|
-
}
|
|
397
|
-
|
|
398
352
|
exports.AccountQuery = AccountQuery;
|
|
399
|
-
exports.Address = Address;
|
|
400
353
|
exports.ApiKeyQuery = ApiKeyQuery;
|
|
401
354
|
exports.BalanceEntryQuery = BalanceEntryQuery;
|
|
402
355
|
exports.BillPaymentQuery = BillPaymentQuery;
|
|
356
|
+
exports.BridgeAccountQuery = BridgeAccountQuery;
|
|
403
357
|
exports.CardTransactionQuery = CardTransactionQuery;
|
|
404
358
|
exports.CardsQuery = CardsQuery;
|
|
405
359
|
exports.DepositQuery = DepositQuery;
|
|
@@ -408,7 +362,6 @@ exports.PageSize = PageSize;
|
|
|
408
362
|
exports.QueryParams = QueryParams;
|
|
409
363
|
exports.StatementQuery = StatementQuery;
|
|
410
364
|
exports.TOSAgreements = TOSAgreements;
|
|
411
|
-
exports.TransactionQuery = TransactionQuery;
|
|
412
365
|
exports.TransferQuery = TransferQuery;
|
|
413
366
|
exports.UserQuery = UserQuery;
|
|
414
367
|
exports.WalletQuery = WalletQuery;
|