ravcredit-lib 0.0.5 → 0.0.6
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/fesm2022/ravcredit-lib.mjs +420 -2
- package/fesm2022/ravcredit-lib.mjs.map +1 -1
- package/index.d.ts +85 -3
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component } from '@angular/core';
|
|
2
|
+
import { Injectable, Component, runInInjectionContext, inject } from '@angular/core';
|
|
3
3
|
import { UntypedFormControl, Validators, UntypedFormArray } from '@angular/forms';
|
|
4
|
+
import { add, getDate, format } from 'date-fns';
|
|
5
|
+
import { es } from 'date-fns/locale/es';
|
|
4
6
|
import { openDB } from 'idb';
|
|
5
7
|
|
|
6
8
|
class RavcreditLibService {
|
|
@@ -982,6 +984,17 @@ var ePassportTypes;
|
|
|
982
984
|
})(ePassportTypes || (ePassportTypes = {}));
|
|
983
985
|
/** ******************************** */
|
|
984
986
|
|
|
987
|
+
class UtilsHttp {
|
|
988
|
+
static CreateHeadersApi(token) {
|
|
989
|
+
return {
|
|
990
|
+
'Content-Type': 'application/json',
|
|
991
|
+
'Accept': 'application/json',
|
|
992
|
+
'Access-Control-Allow-Headers': 'Content-Type',
|
|
993
|
+
'Authorization': `Bearer ${token}`
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
|
|
985
998
|
var eReferenceStatusRav;
|
|
986
999
|
(function (eReferenceStatusRav) {
|
|
987
1000
|
eReferenceStatusRav["Disponible"] = "Disponible";
|
|
@@ -1273,6 +1286,121 @@ class FactoryDynamiCore {
|
|
|
1273
1286
|
}
|
|
1274
1287
|
}
|
|
1275
1288
|
|
|
1289
|
+
var ePaymentType;
|
|
1290
|
+
(function (ePaymentType) {
|
|
1291
|
+
ePaymentType["OXXO"] = "OXXO";
|
|
1292
|
+
ePaymentType["ALTERNA"] = "ALTERNA";
|
|
1293
|
+
ePaymentType["OXXO_RECURRENT"] = "oxxo_recurrent";
|
|
1294
|
+
})(ePaymentType || (ePaymentType = {}));
|
|
1295
|
+
class FactoryConekta {
|
|
1296
|
+
static createOrder(client, contract, dateTime) {
|
|
1297
|
+
if (client.conekta_id == undefined)
|
|
1298
|
+
return {
|
|
1299
|
+
data: {
|
|
1300
|
+
charges: [],
|
|
1301
|
+
currency: "",
|
|
1302
|
+
customer_info: { customer_id: "" },
|
|
1303
|
+
line_items: []
|
|
1304
|
+
},
|
|
1305
|
+
id: ""
|
|
1306
|
+
};
|
|
1307
|
+
const customer_info = {
|
|
1308
|
+
customer_id: client.conekta_id
|
|
1309
|
+
};
|
|
1310
|
+
const week = ((3600 * 24) * 30) * 1000;
|
|
1311
|
+
let next = new Date().getTime() + week;
|
|
1312
|
+
next = Math.floor(next / 1000);
|
|
1313
|
+
const method = {
|
|
1314
|
+
type: "cash",
|
|
1315
|
+
expires_at: next,
|
|
1316
|
+
};
|
|
1317
|
+
const charge = {
|
|
1318
|
+
amount: contract.financial.weeklyPayment * 100,
|
|
1319
|
+
payment_method: method
|
|
1320
|
+
};
|
|
1321
|
+
const charges = [charge];
|
|
1322
|
+
const antifraud_info = {
|
|
1323
|
+
newKey: "Key"
|
|
1324
|
+
};
|
|
1325
|
+
const lineItem = {
|
|
1326
|
+
antifraud_info: antifraud_info,
|
|
1327
|
+
name: `Referencia credito ${client.name}`,
|
|
1328
|
+
quantity: 1,
|
|
1329
|
+
unit_price: contract.financial.weeklyPayment * 100,
|
|
1330
|
+
};
|
|
1331
|
+
const lineItems = [lineItem];
|
|
1332
|
+
const orderData = {
|
|
1333
|
+
customer_info: customer_info,
|
|
1334
|
+
charges: charges,
|
|
1335
|
+
currency: "MXN",
|
|
1336
|
+
line_items: lineItems
|
|
1337
|
+
};
|
|
1338
|
+
const order = {
|
|
1339
|
+
data: orderData,
|
|
1340
|
+
id: client.id
|
|
1341
|
+
};
|
|
1342
|
+
if (dateTime != undefined)
|
|
1343
|
+
order.date = dateTime;
|
|
1344
|
+
return order;
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
// '
|
|
1348
|
+
// {
|
|
1349
|
+
// "customer_info": {
|
|
1350
|
+
// "name": "DevTest",
|
|
1351
|
+
// "email": "test@femsa.com",
|
|
1352
|
+
// "phone": "5522997233"
|
|
1353
|
+
// },
|
|
1354
|
+
// "currency": "MXN",
|
|
1355
|
+
// "line_items": [
|
|
1356
|
+
// {
|
|
1357
|
+
// "name": "Box of Cohiba S1s",
|
|
1358
|
+
// "quantity": 1,
|
|
1359
|
+
// "unit_price": 20000
|
|
1360
|
+
// }
|
|
1361
|
+
// ]
|
|
1362
|
+
// }
|
|
1363
|
+
// '
|
|
1364
|
+
|
|
1365
|
+
const ROUTE_NOTIFICATIONS = "notifications";
|
|
1366
|
+
const ROUTE_GLOBAL_REFERENCE2 = "/contract-reference";
|
|
1367
|
+
const prodFunction = "https://us-central1-ravcredit-2b079.cloudfunctions.net/CustomerNotification";
|
|
1368
|
+
const prodFunction2 = "https://customernotification-2imgfxveka-uc.a.run.app";
|
|
1369
|
+
const localTest = "http://127.0.0.1:5001/ravcredit-2b079/us-central1/CustomerNotification";
|
|
1370
|
+
const ravCreditFunctions = prodFunction;
|
|
1371
|
+
class FactoryNotification {
|
|
1372
|
+
static FormNotification(notification) {
|
|
1373
|
+
let data = cNotification;
|
|
1374
|
+
if (notification)
|
|
1375
|
+
data = notification;
|
|
1376
|
+
return {
|
|
1377
|
+
title: new UntypedFormControl(data.notification.title, [Validators.required, Validators.min(1)]),
|
|
1378
|
+
body: new UntypedFormControl(data.notification.body, [Validators.required, Validators.min(1)]),
|
|
1379
|
+
};
|
|
1380
|
+
}
|
|
1381
|
+
static CreateGlobalNotificationObj(data) {
|
|
1382
|
+
const o = {};
|
|
1383
|
+
if (data.notification) {
|
|
1384
|
+
const not = {};
|
|
1385
|
+
if (data.notification.body)
|
|
1386
|
+
not["body"] = data.notification.body;
|
|
1387
|
+
if (data.notification.title)
|
|
1388
|
+
not["title"] = data.notification.title;
|
|
1389
|
+
if (data.ids)
|
|
1390
|
+
not["ids"] = data.ids;
|
|
1391
|
+
if (data.tokens)
|
|
1392
|
+
not["tokens"] = data.tokens;
|
|
1393
|
+
if (data.type)
|
|
1394
|
+
not["type"] = data.type;
|
|
1395
|
+
if (data.data)
|
|
1396
|
+
if (data.data.route)
|
|
1397
|
+
not["route"] = data.data.route;
|
|
1398
|
+
o["data"] = not;
|
|
1399
|
+
}
|
|
1400
|
+
return o;
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1276
1404
|
const keyUserID = "rc_uid";
|
|
1277
1405
|
const dbVersion = 1;
|
|
1278
1406
|
const dbName = "RavCreditDB";
|
|
@@ -1322,11 +1450,38 @@ class IndexedDbService {
|
|
|
1322
1450
|
let auth = null;
|
|
1323
1451
|
return auth;
|
|
1324
1452
|
}
|
|
1453
|
+
/****************** SIMPLE Transactional - CRUD *************************************/
|
|
1454
|
+
async dbGetObject(store, data) {
|
|
1455
|
+
if (!data)
|
|
1456
|
+
return data;
|
|
1457
|
+
const db = await openDB(dbName, dbVersion);
|
|
1458
|
+
return await db.get(store, data);
|
|
1459
|
+
}
|
|
1460
|
+
async dbGetAllByStore(store, index) {
|
|
1461
|
+
const db = await openDB(dbName, dbVersion);
|
|
1462
|
+
return await db.getAll(store);
|
|
1463
|
+
}
|
|
1464
|
+
async dbAddObject(store, data) {
|
|
1465
|
+
try {
|
|
1466
|
+
const db = await openDB(dbName, dbVersion);
|
|
1467
|
+
await db.put(store, data);
|
|
1468
|
+
return true;
|
|
1469
|
+
}
|
|
1470
|
+
catch (e) {
|
|
1471
|
+
return false;
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
async dbRemoveObject(store, data) {
|
|
1475
|
+
const db = await openDB(dbName, dbVersion);
|
|
1476
|
+
return await db.delete(store, data);
|
|
1477
|
+
}
|
|
1478
|
+
/********************************************************************************* **/
|
|
1325
1479
|
async dbSignIn(store, data) {
|
|
1326
1480
|
await this.iDb.put(store, data);
|
|
1327
1481
|
const _data = data;
|
|
1328
1482
|
this.setLocalStorage(keyUserID, _data.id);
|
|
1329
1483
|
}
|
|
1484
|
+
/******************************** Local Storage *************************************/
|
|
1330
1485
|
setLocalStorage(k, v) {
|
|
1331
1486
|
localStorage.setItem(k, v);
|
|
1332
1487
|
}
|
|
@@ -1340,6 +1495,7 @@ class IndexedDbService {
|
|
|
1340
1495
|
const k = localStorage.getItem(keyUserID);
|
|
1341
1496
|
return (k);
|
|
1342
1497
|
}
|
|
1498
|
+
/********************************************************************************* **/
|
|
1343
1499
|
async getPlatformUser() {
|
|
1344
1500
|
const k = this.getLocalStorage(keyUserID);
|
|
1345
1501
|
if (k == null)
|
|
@@ -1508,6 +1664,61 @@ class IndexedDbService {
|
|
|
1508
1664
|
}
|
|
1509
1665
|
return clientContract;
|
|
1510
1666
|
}
|
|
1667
|
+
/******************** MERGE **************************************/
|
|
1668
|
+
async dbGetAllClientContracts() {
|
|
1669
|
+
const clientContract = [];
|
|
1670
|
+
const clients = await this.dbGetAllByStore(dbClientsStore);
|
|
1671
|
+
if (clients.length == 0)
|
|
1672
|
+
return [];
|
|
1673
|
+
for (let client of clients) {
|
|
1674
|
+
const contract = await this.dbGetObject(dbContractsStore, client.contract);
|
|
1675
|
+
const e = { ...client, ...contract };
|
|
1676
|
+
// preserve the id value over concat models
|
|
1677
|
+
e.id = client.id;
|
|
1678
|
+
e.status = client.status;
|
|
1679
|
+
clientContract.push(e);
|
|
1680
|
+
}
|
|
1681
|
+
return clientContract;
|
|
1682
|
+
}
|
|
1683
|
+
/****************** BUSINESS INFO *************************************/
|
|
1684
|
+
async getBusinessInfo() {
|
|
1685
|
+
const config = await this.dbGetAllByStore(dbBusinessInfo);
|
|
1686
|
+
if (!config)
|
|
1687
|
+
return null;
|
|
1688
|
+
return config[0];
|
|
1689
|
+
}
|
|
1690
|
+
/****************** BUSINESS CONFIG ************************************/
|
|
1691
|
+
async getBusinessConfig() {
|
|
1692
|
+
const config = await this.dbGetAllByStore(dbBusinessConfig);
|
|
1693
|
+
if (!config)
|
|
1694
|
+
return null;
|
|
1695
|
+
return config[0];
|
|
1696
|
+
}
|
|
1697
|
+
async updateBusinessConfig(config) {
|
|
1698
|
+
// config.version = "1.0"
|
|
1699
|
+
await this.dbRemoveObject(dbBusinessConfig, "1.0");
|
|
1700
|
+
await this.dbAddObject(dbBusinessConfig, config);
|
|
1701
|
+
}
|
|
1702
|
+
async updateBusinessInfo(config) {
|
|
1703
|
+
config.version = "v2024";
|
|
1704
|
+
await this.dbRemoveObject(dbBusinessInfo, "v2024");
|
|
1705
|
+
await this.dbAddObject(dbBusinessInfo, config);
|
|
1706
|
+
}
|
|
1707
|
+
/**************** NOTIFICATIONS *********************************/
|
|
1708
|
+
async getLocalNotifications() {
|
|
1709
|
+
const notifications = await this.dbGetAllByStore(dbNotificationsStore);
|
|
1710
|
+
if (!notifications)
|
|
1711
|
+
return null;
|
|
1712
|
+
return notifications;
|
|
1713
|
+
}
|
|
1714
|
+
async updateNotifications(notifications) {
|
|
1715
|
+
for (const o of notifications) {
|
|
1716
|
+
const exists = await this.dbGetObject(dbNotificationsStore, o.notification_id);
|
|
1717
|
+
if (!exists) {
|
|
1718
|
+
await this.dbAddObject(dbNotificationsStore, o);
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1511
1722
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IndexedDbService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1512
1723
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: IndexedDbService, providedIn: 'root' });
|
|
1513
1724
|
}
|
|
@@ -1518,6 +1729,213 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1518
1729
|
}]
|
|
1519
1730
|
}], ctorParameters: () => [] });
|
|
1520
1731
|
|
|
1732
|
+
class UtilTime {
|
|
1733
|
+
localeFns = es;
|
|
1734
|
+
static IsExpired(time) {
|
|
1735
|
+
const dateInit = new Date(time);
|
|
1736
|
+
const dayInit = dateInit.getDate();
|
|
1737
|
+
const monthInit = dateInit.getMonth() + 1;
|
|
1738
|
+
const dateActual = new Date();
|
|
1739
|
+
const dayActual = dateActual.getDate();
|
|
1740
|
+
const monthActual = dateActual.getMonth() + 1;
|
|
1741
|
+
if (monthActual > monthInit)
|
|
1742
|
+
return true;
|
|
1743
|
+
return dayActual > dayInit;
|
|
1744
|
+
}
|
|
1745
|
+
static getDates(initial, weeks) {
|
|
1746
|
+
const dates = [];
|
|
1747
|
+
let prev = initial;
|
|
1748
|
+
for (let i = 0; i < weeks; i++) {
|
|
1749
|
+
const date = add(prev, { weeks: 1 });
|
|
1750
|
+
dates.push({
|
|
1751
|
+
week: i + 1,
|
|
1752
|
+
date: date.getTime()
|
|
1753
|
+
});
|
|
1754
|
+
prev = date.getTime();
|
|
1755
|
+
}
|
|
1756
|
+
return dates;
|
|
1757
|
+
}
|
|
1758
|
+
static getPreviousWeek() {
|
|
1759
|
+
const today = new Date().getTime();
|
|
1760
|
+
const week = ((3600 * 24) * 7) * 1000;
|
|
1761
|
+
return today - week;
|
|
1762
|
+
}
|
|
1763
|
+
static getDayNum(date) {
|
|
1764
|
+
return getDate(date);
|
|
1765
|
+
}
|
|
1766
|
+
static getDayName(date) {
|
|
1767
|
+
return format(date, "EEEE", { locale: es });
|
|
1768
|
+
}
|
|
1769
|
+
static getMonthName(date) {
|
|
1770
|
+
return format(date, "MMMM", { locale: es }).toUpperCase();
|
|
1771
|
+
}
|
|
1772
|
+
static getYear(date) {
|
|
1773
|
+
return format(date, "yyyy");
|
|
1774
|
+
}
|
|
1775
|
+
static GetNextPayment(time, provider) {
|
|
1776
|
+
let week = 0;
|
|
1777
|
+
if (provider == eProvider.Conekta) {
|
|
1778
|
+
week = (((3600 * 24) * 7));
|
|
1779
|
+
}
|
|
1780
|
+
else if (provider == eProvider.DynamiCore) {
|
|
1781
|
+
week = (((3600 * 24) * 7) * 1000);
|
|
1782
|
+
}
|
|
1783
|
+
return this.getLocalTimeFromLong(time + week, provider);
|
|
1784
|
+
}
|
|
1785
|
+
static getLocalTimeFromLong(time, provider) {
|
|
1786
|
+
if (time <= 0)
|
|
1787
|
+
return "";
|
|
1788
|
+
let factor = this.GetFactor(provider);
|
|
1789
|
+
let dateTime = time * factor;
|
|
1790
|
+
let parsedDate = format(new Date(dateTime), dateFormat, {
|
|
1791
|
+
locale: es
|
|
1792
|
+
});
|
|
1793
|
+
return parsedDate;
|
|
1794
|
+
}
|
|
1795
|
+
static DelayPaymentLast(lastPayment, provider, injector) {
|
|
1796
|
+
let factor = this.GetFactor(provider);
|
|
1797
|
+
let now = new Date().getTime();
|
|
1798
|
+
let last = 0;
|
|
1799
|
+
if (provider == eProvider.Conekta)
|
|
1800
|
+
last = ((((3600 * 24) * 7)) + lastPayment) * factor;
|
|
1801
|
+
else if (provider == eProvider.DynamiCore)
|
|
1802
|
+
last = ((((3600 * 24) * 7) * 1000) + lastPayment) * factor;
|
|
1803
|
+
runInInjectionContext(injector, () => {
|
|
1804
|
+
const idb = inject(IndexedDbService);
|
|
1805
|
+
// const observable = inject(ObservablesService)
|
|
1806
|
+
idb.setLocalStorage(expiredPayment, String(now > last));
|
|
1807
|
+
// observable.isLate.next(now > last)
|
|
1808
|
+
});
|
|
1809
|
+
// 1751091565767
|
|
1810
|
+
// 1751557440
|
|
1811
|
+
return now > last;
|
|
1812
|
+
}
|
|
1813
|
+
static GetFactor(provider) {
|
|
1814
|
+
let factor = 1;
|
|
1815
|
+
if (provider == eProvider.Conekta)
|
|
1816
|
+
factor = 1000;
|
|
1817
|
+
return factor;
|
|
1818
|
+
}
|
|
1819
|
+
static GetEpochFromFormatedDate(date) {
|
|
1820
|
+
if (date == "")
|
|
1821
|
+
return 0;
|
|
1822
|
+
const _date = new Date(date);
|
|
1823
|
+
if (isNaN(_date.getTime()))
|
|
1824
|
+
return 0;
|
|
1825
|
+
return _date.getTime();
|
|
1826
|
+
}
|
|
1827
|
+
static GetTimeFromString(date) {
|
|
1828
|
+
return format(new Date(date), timeFormat, {
|
|
1829
|
+
locale: es
|
|
1830
|
+
});
|
|
1831
|
+
}
|
|
1832
|
+
static GetDateFromString(date) {
|
|
1833
|
+
return format(new Date(date), dateCompleteFormat, {
|
|
1834
|
+
locale: es
|
|
1835
|
+
});
|
|
1836
|
+
}
|
|
1837
|
+
// Quick sort
|
|
1838
|
+
static SortingByTime(payments) {
|
|
1839
|
+
if (payments.length <= 1)
|
|
1840
|
+
return payments;
|
|
1841
|
+
const pivot = payments[payments.length - 1];
|
|
1842
|
+
const pivotDate = new Date(pivot.created).getTime();
|
|
1843
|
+
const left = [];
|
|
1844
|
+
const right = [];
|
|
1845
|
+
for (let i = 0; i < payments.length - 1; i++) {
|
|
1846
|
+
const actualDate = new Date(payments[i].created).getTime();
|
|
1847
|
+
if (actualDate > pivotDate)
|
|
1848
|
+
left.push(payments[i]);
|
|
1849
|
+
else
|
|
1850
|
+
right.push(payments[i]);
|
|
1851
|
+
}
|
|
1852
|
+
return [...this.SortingByTime(left), pivot, ...this.SortingByTime(right)];
|
|
1853
|
+
}
|
|
1854
|
+
static SortingByTimeConekta(payments) {
|
|
1855
|
+
if (payments.length <= 1)
|
|
1856
|
+
return payments;
|
|
1857
|
+
const pivot = payments[payments.length - 1];
|
|
1858
|
+
let pivotDate = 0;
|
|
1859
|
+
if (pivot.charges.data == undefined)
|
|
1860
|
+
return payments;
|
|
1861
|
+
if (pivot.charges.data[0].paid_at != undefined) {
|
|
1862
|
+
pivotDate = pivot.charges.data[0].paid_at;
|
|
1863
|
+
}
|
|
1864
|
+
else {
|
|
1865
|
+
pivot.charges.data[0].created_at;
|
|
1866
|
+
}
|
|
1867
|
+
if (pivotDate <= 0)
|
|
1868
|
+
return payments;
|
|
1869
|
+
const left = [];
|
|
1870
|
+
const right = [];
|
|
1871
|
+
for (let i = 0; i < payments.length - 1; i++) {
|
|
1872
|
+
const actual = payments[i].charges.data[0].paid_at;
|
|
1873
|
+
if (actual <= 0)
|
|
1874
|
+
continue;
|
|
1875
|
+
if (actual > pivotDate)
|
|
1876
|
+
left.push(payments[i]);
|
|
1877
|
+
else
|
|
1878
|
+
right.push(payments[i]);
|
|
1879
|
+
}
|
|
1880
|
+
return [...this.SortingByTimeConekta(left), pivot, ...this.SortingByTimeConekta(right)];
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
const cContractMetrics = {
|
|
1885
|
+
total: 0,
|
|
1886
|
+
activated: 0,
|
|
1887
|
+
paused: 0,
|
|
1888
|
+
completed: 0,
|
|
1889
|
+
canceled: 0,
|
|
1890
|
+
late: 0,
|
|
1891
|
+
conektaCount: 0,
|
|
1892
|
+
dynamicCount: 0,
|
|
1893
|
+
passportCount: 0,
|
|
1894
|
+
rateTotal: 0,
|
|
1895
|
+
rateActive: 0,
|
|
1896
|
+
ratePaused: 0,
|
|
1897
|
+
rateComplete: 0,
|
|
1898
|
+
rateCanceled: 0,
|
|
1899
|
+
rateLate: 0
|
|
1900
|
+
};
|
|
1901
|
+
|
|
1902
|
+
class FactoryPassport {
|
|
1903
|
+
static CreatePassportReference(client, contract, dateTime) {
|
|
1904
|
+
const o = {
|
|
1905
|
+
passport: {
|
|
1906
|
+
type: ePassportTypes.CREATE,
|
|
1907
|
+
data: {
|
|
1908
|
+
name: client.name,
|
|
1909
|
+
email: client.email,
|
|
1910
|
+
amount: contract.financial.weeklyPayment,
|
|
1911
|
+
expirationDate: "",
|
|
1912
|
+
additional: {
|
|
1913
|
+
client: client.name,
|
|
1914
|
+
clientID: client.id,
|
|
1915
|
+
credit: client.status
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
},
|
|
1919
|
+
contract: contract,
|
|
1920
|
+
date: dateTime
|
|
1921
|
+
};
|
|
1922
|
+
if (dateTime != undefined)
|
|
1923
|
+
o.date = dateTime;
|
|
1924
|
+
return o;
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
class FactoryPayment {
|
|
1929
|
+
static CreatePayment(data, provider) {
|
|
1930
|
+
const o = {};
|
|
1931
|
+
if (provider == eProvider.DynamiCore)
|
|
1932
|
+
o.dynamicPayment = data;
|
|
1933
|
+
if (provider == eProvider.Conekta)
|
|
1934
|
+
o.conektaPayment = data;
|
|
1935
|
+
return o;
|
|
1936
|
+
}
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1521
1939
|
/*
|
|
1522
1940
|
* Public API Surface of ravcredit-lib
|
|
1523
1941
|
*/
|
|
@@ -1526,5 +1944,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1526
1944
|
* Generated bundle index. Do not edit.
|
|
1527
1945
|
*/
|
|
1528
1946
|
|
|
1529
|
-
export { FactoryBusiness, FactoryClient, FactoryContract, FactoryDynamiCore, IndexedDbService, RavcreditLibComponent, RavcreditLibService, cAddress, cAuthConfig, cBusinessConfig, cBusinessDeadlines, cBusinessInfo, cClient, cClientConekta, cClientContract, cClientDynamicStatus, cConektaRecurrent, cContract, cDefinedSchedule, cDevice, cEmptyDay, cFinancial, cIDCCharge, cIDCCustomer, cIDCDataPii, cIDCGeneratedReference, cIDCPayment, cNotification, cOptionsClientStatus, cOxxoRecurrentSources, cOxxorecurrentSourcesData, cPaymentDalay, cSchedule, cSingleOptionClientStatus, cTopic, cTyClientContract, cUserReference, dateCompleteFormat, dateFormat, dbAuthStore, dbBusinessConfig, dbBusinessInfo, dbClientsStore, dbConektaClientsStore, dbConektaReferencesStore, dbContractsStore, dbDynamicAccountStore, dbDynamicReferencesStore, dbIndexAuth, dbIndexBusiness, dbIndexClients, dbIndexConektaClients, dbIndexConektaClientsRef, dbIndexContracts, dbIndexNotification, dbIndexPassportClientsRef, dbIndexPayments, dbIndexUsers, dbName, dbNotificationsStore, dbPassportReferencesStore, dbPaymentsStore, dbUsersStore, dbVersion, eAccountDynamicStatus, eAuthActions, eAuthType, eClientDynamicStatus, eClientStatus, eConektaOrderStatus, eConektaRes, eContractSteps, eLoginStatus, eNotificationType, ePassportTypes, eProcessStatus, eProvider, eReferenceStatusRav, eRoles, eRolesSelect, expiredPayment, keyPathId, keyUserID, snackBarConfigAction, snackBarConfigNoAction, timeFormat, week };
|
|
1947
|
+
export { FactoryBusiness, FactoryClient, FactoryConekta, FactoryContract, FactoryDynamiCore, FactoryNotification, FactoryPassport, FactoryPayment, IndexedDbService, ROUTE_GLOBAL_REFERENCE2, ROUTE_NOTIFICATIONS, RavcreditLibComponent, RavcreditLibService, UtilTime, UtilsHttp, cAddress, cAuthConfig, cBusinessConfig, cBusinessDeadlines, cBusinessInfo, cClient, cClientConekta, cClientContract, cClientDynamicStatus, cConektaRecurrent, cContract, cContractMetrics, cDefinedSchedule, cDevice, cEmptyDay, cFinancial, cIDCCharge, cIDCCustomer, cIDCDataPii, cIDCGeneratedReference, cIDCPayment, cNotification, cOptionsClientStatus, cOxxoRecurrentSources, cOxxorecurrentSourcesData, cPaymentDalay, cSchedule, cSingleOptionClientStatus, cTopic, cTyClientContract, cUserReference, dateCompleteFormat, dateFormat, dbAuthStore, dbBusinessConfig, dbBusinessInfo, dbClientsStore, dbConektaClientsStore, dbConektaReferencesStore, dbContractsStore, dbDynamicAccountStore, dbDynamicReferencesStore, dbIndexAuth, dbIndexBusiness, dbIndexClients, dbIndexConektaClients, dbIndexConektaClientsRef, dbIndexContracts, dbIndexNotification, dbIndexPassportClientsRef, dbIndexPayments, dbIndexUsers, dbName, dbNotificationsStore, dbPassportReferencesStore, dbPaymentsStore, dbUsersStore, dbVersion, eAccountDynamicStatus, eAuthActions, eAuthType, eClientDynamicStatus, eClientStatus, eConektaOrderStatus, eConektaRes, eContractSteps, eLoginStatus, eNotificationType, ePassportTypes, ePaymentType, eProcessStatus, eProvider, eReferenceStatusRav, eRoles, eRolesSelect, expiredPayment, keyPathId, keyUserID, ravCreditFunctions, snackBarConfigAction, snackBarConfigNoAction, timeFormat, week };
|
|
1530
1948
|
//# sourceMappingURL=ravcredit-lib.mjs.map
|