@cuenca-mx/cuenca-js 0.0.14-dev10 → 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/{data-92aab1cc.cjs → data-e4c28528.cjs} +13 -0
- package/build/{data-7e8b28c6.mjs → data-fa5e8a84.mjs} +13 -1
- package/build/index.cjs +412 -39
- package/build/index.mjs +381 -8
- 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-0e0a6f42.cjs → vulnerableActivity-8f7d19e6.cjs} +388 -194
- package/build/{identities-38d66e33.mjs → vulnerableActivity-e1e6fdf0.mjs} +381 -194
- package/build/{walletTransactionRequest-da986c71.cjs → walletTransactionRequest-7a9ae1a7.cjs} +109 -4
- package/build/{walletTransactionRequest-d05a25a9.mjs → walletTransactionRequest-dcc77215.mjs} +109 -5
- package/package.json +3 -2
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
import { ValidationError } from './errors/index.mjs';
|
|
2
|
-
import { d as dateToUTC, e as enumValueFromString,
|
|
3
|
-
|
|
4
|
-
class PageSize {
|
|
5
|
-
constructor(size) {
|
|
6
|
-
this.maxSize = 100;
|
|
7
|
-
this._ps = size;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
get size() {
|
|
11
|
-
return this._pageSize;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
set _ps(value) {
|
|
15
|
-
let validatedPageSize = this.maxSize;
|
|
16
|
-
if (value && value > 0 && value <= this.maxSize) {
|
|
17
|
-
validatedPageSize = value;
|
|
18
|
-
}
|
|
19
|
-
this._pageSize = validatedPageSize;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
2
|
+
import { d as dateToUTC, e as enumValueFromString, A as AlertStatus, V as VerificationStatus, K as KYCFileType } from './data-fa5e8a84.mjs';
|
|
22
3
|
|
|
23
4
|
class QueryParams {
|
|
24
5
|
constructor({
|
|
@@ -90,156 +71,144 @@ class AccountQuery extends QueryParams {
|
|
|
90
71
|
}
|
|
91
72
|
}
|
|
92
73
|
|
|
93
|
-
class
|
|
94
|
-
constructor({
|
|
74
|
+
class AlertQuery extends QueryParams {
|
|
75
|
+
constructor({
|
|
76
|
+
agent,
|
|
77
|
+
comments,
|
|
78
|
+
committeeMeetingDate,
|
|
79
|
+
count,
|
|
80
|
+
hasQuestionnaire,
|
|
81
|
+
inProcess,
|
|
82
|
+
status,
|
|
83
|
+
typeOfFilter,
|
|
84
|
+
transactionDate,
|
|
85
|
+
...args
|
|
86
|
+
}) {
|
|
95
87
|
super(args);
|
|
96
|
-
this.
|
|
88
|
+
this.agent = agent;
|
|
89
|
+
this.comments = comments;
|
|
90
|
+
this.committeeMeetingDate = committeeMeetingDate;
|
|
91
|
+
this.count = count;
|
|
92
|
+
this.hasQuestionnaire = hasQuestionnaire;
|
|
93
|
+
this.inProcess = inProcess;
|
|
94
|
+
this.status = status;
|
|
95
|
+
this.typeOfFilter = typeOfFilter;
|
|
96
|
+
this.transactionDate = transactionDate;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
toObject() {
|
|
100
100
|
return Object.assign(super.toObject(), {
|
|
101
|
-
|
|
101
|
+
agent: this.agent,
|
|
102
|
+
comments: this.comments,
|
|
103
|
+
committee_meeting_date: this.committeeMeetingDate,
|
|
104
|
+
count: this.count,
|
|
105
|
+
has_questionnaire: this.hasQuestionnaire,
|
|
106
|
+
in_process: this.inProcess,
|
|
107
|
+
status: this.status,
|
|
108
|
+
transaction_date: this.transactionDate,
|
|
109
|
+
type_of_filter: this.typeOfFilter,
|
|
102
110
|
});
|
|
103
111
|
}
|
|
104
112
|
}
|
|
105
113
|
|
|
106
|
-
class
|
|
107
|
-
constructor({
|
|
114
|
+
class ApiKeyQuery extends QueryParams {
|
|
115
|
+
constructor({ active, ...args }) {
|
|
108
116
|
super(args);
|
|
109
|
-
this.
|
|
117
|
+
this.active = active;
|
|
110
118
|
}
|
|
111
119
|
|
|
112
120
|
toObject() {
|
|
113
121
|
return Object.assign(super.toObject(), {
|
|
114
|
-
|
|
122
|
+
active: this.active,
|
|
115
123
|
});
|
|
116
124
|
}
|
|
117
125
|
}
|
|
118
126
|
|
|
119
|
-
class
|
|
120
|
-
constructor({
|
|
127
|
+
class BalanceEntryQuery extends QueryParams {
|
|
128
|
+
constructor({
|
|
129
|
+
fundingInstrumentUri,
|
|
130
|
+
count = false,
|
|
131
|
+
walletId = 'default',
|
|
132
|
+
...args
|
|
133
|
+
}) {
|
|
121
134
|
super(args);
|
|
122
|
-
this.
|
|
123
|
-
this.
|
|
135
|
+
this.fundingInstrumentUri = fundingInstrumentUri;
|
|
136
|
+
this.count = count;
|
|
137
|
+
this.walletId = walletId;
|
|
124
138
|
}
|
|
125
139
|
|
|
126
140
|
toObject() {
|
|
127
141
|
return Object.assign(super.toObject(), {
|
|
128
|
-
|
|
129
|
-
|
|
142
|
+
wallet_id: this.walletId,
|
|
143
|
+
funding_instrument_uri: this.fundingInstrumentUri,
|
|
144
|
+
count: this.count,
|
|
130
145
|
});
|
|
131
146
|
}
|
|
132
147
|
}
|
|
133
148
|
|
|
134
|
-
class
|
|
135
|
-
constructor({
|
|
136
|
-
accountNumber,
|
|
137
|
-
idempotencyKey,
|
|
138
|
-
trackingKey,
|
|
139
|
-
network,
|
|
140
|
-
...args
|
|
141
|
-
}) {
|
|
149
|
+
class BillPaymentQuery extends QueryParams {
|
|
150
|
+
constructor({ accountNumber, ...args }) {
|
|
142
151
|
super(args);
|
|
143
152
|
this.accountNumber = accountNumber;
|
|
144
|
-
this.idempotencyKey = idempotencyKey;
|
|
145
|
-
this.trackingKey = trackingKey;
|
|
146
|
-
this.network = network;
|
|
147
153
|
}
|
|
148
154
|
|
|
149
155
|
toObject() {
|
|
150
156
|
return Object.assign(super.toObject(), {
|
|
151
157
|
account_number: this.accountNumber,
|
|
152
|
-
idempotency_key: this.idempotencyKey,
|
|
153
|
-
tracking_key: this.trackingKey,
|
|
154
|
-
network: this.network,
|
|
155
158
|
});
|
|
156
159
|
}
|
|
157
160
|
}
|
|
158
161
|
|
|
159
|
-
class
|
|
160
|
-
constructor({
|
|
161
|
-
fundingInstrumentUri,
|
|
162
|
-
count = false,
|
|
163
|
-
walletId = 'default',
|
|
164
|
-
...args
|
|
165
|
-
}) {
|
|
162
|
+
class BridgeAccountQuery extends QueryParams {
|
|
163
|
+
constructor({ emailAddress, ...args }) {
|
|
166
164
|
super(args);
|
|
167
|
-
this.
|
|
168
|
-
this.count = count;
|
|
169
|
-
this.walletId = walletId;
|
|
165
|
+
this.emailAddress = emailAddress;
|
|
170
166
|
}
|
|
171
167
|
|
|
172
168
|
toObject() {
|
|
173
169
|
return Object.assign(super.toObject(), {
|
|
174
|
-
|
|
175
|
-
funding_instrument_uri: this.fundingInstrumentUri,
|
|
176
|
-
count: this.count,
|
|
170
|
+
email_address: this.emailAddress,
|
|
177
171
|
});
|
|
178
172
|
}
|
|
179
173
|
}
|
|
180
174
|
|
|
181
|
-
class
|
|
182
|
-
constructor({
|
|
183
|
-
aggent,
|
|
184
|
-
comments,
|
|
185
|
-
committeeMeetingDate,
|
|
186
|
-
count,
|
|
187
|
-
hasQuestionnaire,
|
|
188
|
-
inProcess,
|
|
189
|
-
status,
|
|
190
|
-
typeOfFilter,
|
|
191
|
-
transactionDate,
|
|
192
|
-
...args
|
|
193
|
-
}) {
|
|
175
|
+
class BridgeBankAccountQuery extends QueryParams {
|
|
176
|
+
constructor({ accountId, ...args }) {
|
|
194
177
|
super(args);
|
|
195
|
-
this.
|
|
196
|
-
this.comments = comments;
|
|
197
|
-
this.committeeMeetingDate = committeeMeetingDate;
|
|
198
|
-
this.count = count;
|
|
199
|
-
this.hasQuestionnaire = hasQuestionnaire;
|
|
200
|
-
this.inProcess = inProcess;
|
|
201
|
-
this.status = status;
|
|
202
|
-
this.typeOfFilter = typeOfFilter;
|
|
203
|
-
this.transactionDate = transactionDate;
|
|
178
|
+
this.accountId = accountId;
|
|
204
179
|
}
|
|
205
180
|
|
|
206
181
|
toObject() {
|
|
207
182
|
return Object.assign(super.toObject(), {
|
|
208
|
-
|
|
209
|
-
comments: this.comments,
|
|
210
|
-
committee_meeting_date: this.committeeMeetingDate,
|
|
211
|
-
count: this.count,
|
|
212
|
-
has_questionnaire: this.hasQuestionnaire,
|
|
213
|
-
in_process: this.inProcess,
|
|
214
|
-
status: this.status,
|
|
215
|
-
transaction_date: this.transactionDate,
|
|
216
|
-
type_of_filter: this.typeOfFilter,
|
|
183
|
+
account_id: this.accountId,
|
|
217
184
|
});
|
|
218
185
|
}
|
|
219
186
|
}
|
|
220
187
|
|
|
221
|
-
class
|
|
222
|
-
constructor({
|
|
188
|
+
class BridgeQuery extends QueryParams {
|
|
189
|
+
constructor({ accountId, ...args }) {
|
|
223
190
|
super(args);
|
|
224
|
-
this.
|
|
191
|
+
this.accountId = accountId;
|
|
225
192
|
}
|
|
226
193
|
|
|
227
194
|
toObject() {
|
|
228
195
|
return Object.assign(super.toObject(), {
|
|
229
|
-
|
|
196
|
+
account: this.accountId,
|
|
230
197
|
});
|
|
231
198
|
}
|
|
232
199
|
}
|
|
233
200
|
|
|
234
|
-
class
|
|
235
|
-
constructor({
|
|
201
|
+
class BridgeTransactionQuery extends BridgeQuery {
|
|
202
|
+
constructor({ status, type, ...args }) {
|
|
236
203
|
super(args);
|
|
237
|
-
this.
|
|
204
|
+
this.status = status;
|
|
205
|
+
this.type = type;
|
|
238
206
|
}
|
|
239
207
|
|
|
240
208
|
toObject() {
|
|
241
209
|
return Object.assign(super.toObject(), {
|
|
242
|
-
|
|
210
|
+
status: this.status,
|
|
211
|
+
type: this.type,
|
|
243
212
|
});
|
|
244
213
|
}
|
|
245
214
|
}
|
|
@@ -259,47 +228,43 @@ class CardsQuery extends QueryParams {
|
|
|
259
228
|
}
|
|
260
229
|
}
|
|
261
230
|
|
|
262
|
-
class
|
|
263
|
-
constructor({
|
|
231
|
+
class CardTransactionQuery extends QueryParams {
|
|
232
|
+
constructor({ cardUri, ...args }) {
|
|
264
233
|
super(args);
|
|
265
|
-
this.
|
|
234
|
+
this.cardUri = cardUri;
|
|
266
235
|
}
|
|
267
236
|
|
|
268
237
|
toObject() {
|
|
269
238
|
return Object.assign(super.toObject(), {
|
|
270
|
-
|
|
239
|
+
card_uri: this.cardUri,
|
|
271
240
|
});
|
|
272
241
|
}
|
|
273
242
|
}
|
|
274
243
|
|
|
275
|
-
class
|
|
276
|
-
constructor({
|
|
244
|
+
class TransactionQuery extends QueryParams {
|
|
245
|
+
constructor({ status, ...args }) {
|
|
277
246
|
super(args);
|
|
278
|
-
this.emailAddress = emailAddress;
|
|
279
|
-
this.hasCurpDocument = hasCurpDocument;
|
|
280
|
-
this.phoneNumber = phoneNumber;
|
|
281
247
|
this.status = status;
|
|
282
248
|
}
|
|
283
249
|
|
|
284
250
|
toObject() {
|
|
285
251
|
return Object.assign(super.toObject(), {
|
|
286
|
-
email_address: this.emailAddress,
|
|
287
|
-
has_curp_document: this.hasCurpDocument,
|
|
288
|
-
phone_number: this.phoneNumber,
|
|
289
252
|
status: this.status,
|
|
290
253
|
});
|
|
291
254
|
}
|
|
292
255
|
}
|
|
293
256
|
|
|
294
|
-
class
|
|
295
|
-
constructor({
|
|
257
|
+
class DepositQuery extends TransactionQuery {
|
|
258
|
+
constructor({ trackingKey, network, ...args }) {
|
|
296
259
|
super(args);
|
|
297
|
-
this.
|
|
260
|
+
this.trackingKey = trackingKey;
|
|
261
|
+
this.network = network;
|
|
298
262
|
}
|
|
299
263
|
|
|
300
264
|
toObject() {
|
|
301
265
|
return Object.assign(super.toObject(), {
|
|
302
|
-
|
|
266
|
+
tracking_key: this.trackingKey,
|
|
267
|
+
network: this.network,
|
|
303
268
|
});
|
|
304
269
|
}
|
|
305
270
|
}
|
|
@@ -338,74 +303,162 @@ class StatementQuery extends QueryParams {
|
|
|
338
303
|
}
|
|
339
304
|
}
|
|
340
305
|
|
|
341
|
-
class
|
|
342
|
-
constructor({
|
|
306
|
+
class TransferQuery extends TransactionQuery {
|
|
307
|
+
constructor({
|
|
308
|
+
accountNumber,
|
|
309
|
+
idempotencyKey,
|
|
310
|
+
trackingKey,
|
|
311
|
+
network,
|
|
312
|
+
...args
|
|
313
|
+
}) {
|
|
343
314
|
super(args);
|
|
344
|
-
this.
|
|
315
|
+
this.accountNumber = accountNumber;
|
|
316
|
+
this.idempotencyKey = idempotencyKey;
|
|
317
|
+
this.trackingKey = trackingKey;
|
|
318
|
+
this.network = network;
|
|
345
319
|
}
|
|
346
320
|
|
|
347
321
|
toObject() {
|
|
348
322
|
return Object.assign(super.toObject(), {
|
|
349
|
-
|
|
323
|
+
account_number: this.accountNumber,
|
|
324
|
+
idempotency_key: this.idempotencyKey,
|
|
325
|
+
tracking_key: this.trackingKey,
|
|
326
|
+
network: this.network,
|
|
350
327
|
});
|
|
351
328
|
}
|
|
352
329
|
}
|
|
353
330
|
|
|
354
|
-
class
|
|
355
|
-
constructor({
|
|
331
|
+
class UserQuery extends QueryParams {
|
|
332
|
+
constructor({ emailAddress, hasCurpDocument, phoneNumber, status, ...args }) {
|
|
356
333
|
super(args);
|
|
357
|
-
this.
|
|
334
|
+
this.emailAddress = emailAddress;
|
|
335
|
+
this.hasCurpDocument = hasCurpDocument;
|
|
336
|
+
this.phoneNumber = phoneNumber;
|
|
337
|
+
this.status = status;
|
|
358
338
|
}
|
|
359
339
|
|
|
360
340
|
toObject() {
|
|
361
341
|
return Object.assign(super.toObject(), {
|
|
362
|
-
|
|
342
|
+
email_address: this.emailAddress,
|
|
343
|
+
has_curp_document: this.hasCurpDocument,
|
|
344
|
+
phone_number: this.phoneNumber,
|
|
345
|
+
status: this.status,
|
|
363
346
|
});
|
|
364
347
|
}
|
|
365
348
|
}
|
|
366
349
|
|
|
367
|
-
class
|
|
368
|
-
constructor({
|
|
350
|
+
class WalletQuery extends QueryParams {
|
|
351
|
+
constructor({ active, ...args }) {
|
|
369
352
|
super(args);
|
|
370
|
-
this.
|
|
353
|
+
this.active = active;
|
|
371
354
|
}
|
|
372
355
|
|
|
373
356
|
toObject() {
|
|
374
357
|
return Object.assign(super.toObject(), {
|
|
375
|
-
|
|
358
|
+
active: this.active,
|
|
376
359
|
});
|
|
377
360
|
}
|
|
378
361
|
}
|
|
379
362
|
|
|
380
|
-
class
|
|
381
|
-
constructor({
|
|
363
|
+
class WalletTransactionQuery extends QueryParams {
|
|
364
|
+
constructor({ walletUri, ...args }) {
|
|
382
365
|
super(args);
|
|
383
|
-
this.
|
|
384
|
-
this.type = type;
|
|
366
|
+
this.walletUri = walletUri;
|
|
385
367
|
}
|
|
386
368
|
|
|
387
369
|
toObject() {
|
|
388
370
|
return Object.assign(super.toObject(), {
|
|
389
|
-
|
|
390
|
-
type: this.type,
|
|
371
|
+
wallet_uri: this.walletUri,
|
|
391
372
|
});
|
|
392
373
|
}
|
|
393
374
|
}
|
|
394
375
|
|
|
395
|
-
class
|
|
396
|
-
constructor({
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
376
|
+
class Address {
|
|
377
|
+
constructor({
|
|
378
|
+
city,
|
|
379
|
+
colonia,
|
|
380
|
+
country,
|
|
381
|
+
createdAt,
|
|
382
|
+
extNumber,
|
|
383
|
+
fullName,
|
|
384
|
+
intNumber,
|
|
385
|
+
postalCode,
|
|
386
|
+
state,
|
|
387
|
+
street,
|
|
388
|
+
}) {
|
|
389
|
+
this.city = city;
|
|
390
|
+
this.colonia = colonia;
|
|
391
|
+
this.country = country;
|
|
392
|
+
this.createdAt = dateToUTC(createdAt);
|
|
393
|
+
this.extNumber = extNumber;
|
|
394
|
+
this.fullName = fullName;
|
|
395
|
+
this.intNumber = intNumber;
|
|
396
|
+
this.postalCode = postalCode;
|
|
397
|
+
this.state = state;
|
|
398
|
+
this.street = street;
|
|
401
399
|
}
|
|
402
400
|
|
|
403
|
-
static fromObject = ({
|
|
404
|
-
new
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
401
|
+
static fromObject = ({ city, colonia, country, state, street, ...obj }) =>
|
|
402
|
+
new Address({
|
|
403
|
+
city,
|
|
404
|
+
colonia,
|
|
405
|
+
country,
|
|
406
|
+
state,
|
|
407
|
+
street,
|
|
408
|
+
createdAt: obj.created_at,
|
|
409
|
+
extNumber: obj.ext_number,
|
|
410
|
+
fullName: obj.full_name,
|
|
411
|
+
intNumber: obj.int_number,
|
|
412
|
+
postalCode: obj.postal_code,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
class AlertLog {
|
|
417
|
+
constructor({ agent, createdAt, status, updatedAt, comments }) {
|
|
418
|
+
this.agent = agent;
|
|
419
|
+
this.comments = comments;
|
|
420
|
+
this.createdAt = dateToUTC(createdAt);
|
|
421
|
+
this.updatedAt = dateToUTC(updatedAt);
|
|
422
|
+
this.status = enumValueFromString(AlertStatus, status);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
static fromObject = ({ agent, comments, status, ...obj }) =>
|
|
426
|
+
new AlertLog({
|
|
427
|
+
agent,
|
|
428
|
+
comments,
|
|
429
|
+
status,
|
|
430
|
+
createdAt: obj.created_at,
|
|
431
|
+
updatedAt: obj.updated_at,
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
class Audit {
|
|
436
|
+
constructor({ hasAudit, auditProvider, auditDate, auditComments }) {
|
|
437
|
+
this.hasAudit = hasAudit;
|
|
438
|
+
this.auditProvider = auditProvider;
|
|
439
|
+
this.auditDate = dateToUTC(auditDate);
|
|
440
|
+
this.auditComments = auditComments;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
static fromObject = ({ ...obj }) =>
|
|
444
|
+
new Audit({
|
|
445
|
+
hasAudit: obj.has_audit,
|
|
446
|
+
auditProvider: obj.audit_provider,
|
|
447
|
+
auditDate: obj.audit_date,
|
|
448
|
+
auditComments: obj.audit_comments,
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
class BusinessDetails {
|
|
453
|
+
constructor({ accountUsageDescription, businessDescription }) {
|
|
454
|
+
this.accountUsageDescription = accountUsageDescription;
|
|
455
|
+
this.businessDescription = businessDescription;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
static fromObject = ({ ...obj }) =>
|
|
459
|
+
new BusinessDetails({
|
|
460
|
+
accountUsageDescription: obj.account_usage_description,
|
|
461
|
+
businessDescription: obj.business_description,
|
|
409
462
|
});
|
|
410
463
|
}
|
|
411
464
|
|
|
@@ -452,63 +505,197 @@ class KYCFile {
|
|
|
452
505
|
});
|
|
453
506
|
}
|
|
454
507
|
|
|
455
|
-
class
|
|
508
|
+
class License {
|
|
456
509
|
constructor({
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
extNumber,
|
|
462
|
-
fullName,
|
|
463
|
-
intNumber,
|
|
464
|
-
postalCode,
|
|
465
|
-
state,
|
|
466
|
-
street,
|
|
510
|
+
licenseRequired,
|
|
511
|
+
supervisoryEntity,
|
|
512
|
+
licenseType,
|
|
513
|
+
licenseDate,
|
|
467
514
|
}) {
|
|
468
|
-
this.
|
|
469
|
-
this.
|
|
470
|
-
this.
|
|
471
|
-
this.
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
515
|
+
this.licenseRequired = licenseRequired;
|
|
516
|
+
this.supervisoryEntity = supervisoryEntity;
|
|
517
|
+
this.licenseType = licenseType;
|
|
518
|
+
this.licenseDate = dateToUTC(licenseDate);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
static fromObject = ({ ...obj }) =>
|
|
522
|
+
new License({
|
|
523
|
+
licenseRequired: obj.license_required,
|
|
524
|
+
supervisoryEntity: obj.supervisory_entity,
|
|
525
|
+
licenseType: obj.license_type,
|
|
526
|
+
licenseDate: obj.license_date,
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
class PhysicalPerson {
|
|
531
|
+
constructor({ names, curp, rfc, firstSurname, secondSurname }) {
|
|
532
|
+
this.names = names;
|
|
533
|
+
this.curp = curp;
|
|
534
|
+
this.rfc = rfc;
|
|
535
|
+
this.firstSurname = firstSurname;
|
|
536
|
+
this.secondSurname = secondSurname;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
static fromObject = ({ names, curp, rfc, ...obj }) => {
|
|
540
|
+
return new PhysicalPerson({
|
|
541
|
+
names,
|
|
542
|
+
curp,
|
|
543
|
+
rfc,
|
|
544
|
+
firstSurname: obj.first_surname,
|
|
545
|
+
secondSurname: obj.second_surname,
|
|
546
|
+
});
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
class LegalRepresentatives extends PhysicalPerson {
|
|
551
|
+
constructor({
|
|
552
|
+
names,
|
|
553
|
+
curp,
|
|
554
|
+
rfc,
|
|
555
|
+
firstSurname,
|
|
556
|
+
secondSurname,
|
|
557
|
+
job,
|
|
558
|
+
phoneNumber,
|
|
559
|
+
emailAddress,
|
|
560
|
+
address,
|
|
561
|
+
}) {
|
|
562
|
+
super({ names, curp, rfc, firstSurname, secondSurname });
|
|
563
|
+
this.job = job;
|
|
564
|
+
this.phoneNumber = phoneNumber;
|
|
565
|
+
this.emailAddress = emailAddress;
|
|
566
|
+
this.setAddress = address;
|
|
478
567
|
}
|
|
479
568
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
569
|
+
get address() {
|
|
570
|
+
return this._address;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
set setAddress(value) {
|
|
574
|
+
if (!value) return;
|
|
575
|
+
this._address = Address.fromObject(value);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
static fromObject = ({ job, address, ...obj }) =>
|
|
579
|
+
new LegalRepresentatives({
|
|
580
|
+
address,
|
|
581
|
+
job,
|
|
582
|
+
phoneNumber: obj.phone_number,
|
|
583
|
+
emailAddress: obj.email_address,
|
|
584
|
+
...PhysicalPerson.fromObject(obj),
|
|
492
585
|
});
|
|
493
586
|
}
|
|
494
587
|
|
|
495
|
-
class
|
|
496
|
-
constructor({
|
|
497
|
-
|
|
498
|
-
this.
|
|
499
|
-
this.createdAt = dateToUTC(createdAt);
|
|
500
|
-
this.updatedAt = dateToUTC(updatedAt);
|
|
501
|
-
this.status = enumValueFromString(AlertStatus, status);
|
|
588
|
+
class ShareholderPhysical extends PhysicalPerson {
|
|
589
|
+
constructor({ names, curp, rfc, firstSurname, secondSurname, percentage }) {
|
|
590
|
+
super({ names, curp, rfc, firstSurname, secondSurname });
|
|
591
|
+
this.percentage = percentage;
|
|
502
592
|
}
|
|
503
593
|
|
|
504
|
-
static fromObject = ({
|
|
505
|
-
new
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
594
|
+
static fromObject = ({ percentage, ...obj }) => {
|
|
595
|
+
return new ShareholderPhysical({
|
|
596
|
+
percentage,
|
|
597
|
+
...PhysicalPerson.fromObject(obj),
|
|
598
|
+
});
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
// Asegúrate de tener las clases ShareholderPhysical y LegalRepresentative importadas correctamente
|
|
603
|
+
|
|
604
|
+
class ShareholderMoral {
|
|
605
|
+
constructor({ name, percentage, shareholders, legalRepresentatives }) {
|
|
606
|
+
this.name = name;
|
|
607
|
+
this.percentage = percentage;
|
|
608
|
+
this.setShareholders = shareholders;
|
|
609
|
+
this.setLegalRepresentatives = legalRepresentatives;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
get shareholders() {
|
|
613
|
+
return this._shareholders;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
set setShareholders(value) {
|
|
617
|
+
if (!value) return;
|
|
618
|
+
this._shareholders = ShareholderPhysical.fromObject(value);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
get legalRepresentatives() {
|
|
622
|
+
return this._legalRepresentatives;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
set setLegalRepresentatives(value) {
|
|
626
|
+
if (!value) return;
|
|
627
|
+
this._legalRepresentatives = LegalRepresentatives.fromObject(value);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
static fromObject = ({ name, percentage, shareholders, ...obj }) => {
|
|
631
|
+
return new ShareholderMoral({
|
|
632
|
+
name,
|
|
633
|
+
percentage,
|
|
634
|
+
shareholders: shareholders || [],
|
|
635
|
+
legalRepresentatives: obj.legal_representatives || [],
|
|
636
|
+
});
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
class TransactionalProfileServices {
|
|
641
|
+
constructor({
|
|
642
|
+
speiTransfersNum,
|
|
643
|
+
speiTransfersAmount,
|
|
644
|
+
internalTransfersNum,
|
|
645
|
+
internalTransfersAmount,
|
|
646
|
+
}) {
|
|
647
|
+
this.speiTransfersNum = speiTransfersNum;
|
|
648
|
+
this.speiTransfersAmount = speiTransfersAmount;
|
|
649
|
+
this.internalTransfersNum = internalTransfersNum;
|
|
650
|
+
this.internalTransfersAmount = internalTransfersAmount;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
static fromObject = ({ ...obj }) =>
|
|
654
|
+
new TransactionalProfileServices({
|
|
655
|
+
speiTransfersNum: obj.spei_transfers_num,
|
|
656
|
+
speiTransfersAmount: obj.spei_transfers_amount,
|
|
657
|
+
internalTransfersNum: obj.internal_transfers_num,
|
|
658
|
+
internalTransfersAmount: obj.internal_transfers_amount,
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
class TOSAgreements {
|
|
663
|
+
constructor({ ip, location, type, version }) {
|
|
664
|
+
this.ip = ip;
|
|
665
|
+
this.location = location;
|
|
666
|
+
this.type = type;
|
|
667
|
+
this.version = version;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
static fromObject = ({ ip, location, type, version }) =>
|
|
671
|
+
new TOSAgreements({
|
|
672
|
+
ip,
|
|
673
|
+
location,
|
|
674
|
+
type,
|
|
675
|
+
version,
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
class VulnerableActivity {
|
|
680
|
+
constructor({
|
|
681
|
+
isVulnerableActivity,
|
|
682
|
+
hasSatRegister,
|
|
683
|
+
satRegisteredDate,
|
|
684
|
+
isInCompliance,
|
|
685
|
+
}) {
|
|
686
|
+
this.isVulnerableActivity = isVulnerableActivity;
|
|
687
|
+
this.hasSatRegister = hasSatRegister;
|
|
688
|
+
this.satRegisteredDate = dateToUTC(satRegisteredDate);
|
|
689
|
+
this.isInCompliance = isInCompliance;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
static fromObject = ({ ...obj }) =>
|
|
693
|
+
new VulnerableActivity({
|
|
694
|
+
isVulnerableActivity: obj.is_vulnerable_activity,
|
|
695
|
+
hasSatRegister: obj.has_sat_register,
|
|
696
|
+
satRegisteredDate: obj.sat_registered_date,
|
|
697
|
+
isInCompliance: obj.is_in_compliance,
|
|
511
698
|
});
|
|
512
699
|
}
|
|
513
700
|
|
|
514
|
-
export { AlertLog as A,
|
|
701
|
+
export { AlertLog as A, BusinessDetails as B, CardsQuery as C, DepositQuery as D, KYCFile as K, LegalRepresentatives as L, QueryParams as Q, ShareholderMoral as S, TOSAgreements as T, UserQuery as U, VulnerableActivity as V, WalletQuery as W, Address as a, TransactionalProfileServices as b, Audit as c, License as d, AccountQuery as e, AlertQuery as f, ApiKeyQuery as g, BalanceEntryQuery as h, BillPaymentQuery as i, BridgeAccountQuery as j, BridgeBankAccountQuery as k, BridgeQuery as l, BridgeTransactionQuery as m, CardTransactionQuery as n, StatementQuery as o, TransferQuery as p, WalletTransactionQuery as q, TransactionQuery as r, VerificationError as s };
|