ravcredit-lib 0.0.21 → 0.0.23

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/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { UntypedFormGroup, UntypedFormControl, UntypedFormArray } from '@angular
4
4
  import { MatSnackBarConfig } from '@angular/material/snack-bar';
5
5
  import * as idb from 'idb';
6
6
  import { IDBPDatabase } from 'idb';
7
+ import * as ravcredit_lib from 'ravcredit-lib';
7
8
 
8
9
  declare class RavcreditLibService {
9
10
  constructor();
@@ -108,50 +109,6 @@ interface oTmpBusinessConfig {
108
109
  sundayClose?: string;
109
110
  }
110
111
 
111
- interface oClientPayments {
112
- date: number;
113
- dayPayment: number;
114
- amount: number;
115
- id: string;
116
- }
117
- interface oUserReference {
118
- name: string;
119
- phone: string;
120
- relationship: string;
121
- }
122
- interface oClientReferences {
123
- date?: number;
124
- amount?: number;
125
- id: string;
126
- url?: string;
127
- }
128
- interface oClient {
129
- id: string;
130
- name: string;
131
- username: string;
132
- password?: string;
133
- email: string;
134
- phone: string;
135
- curp: string;
136
- contract?: string;
137
- createdAt?: number;
138
- lastLogin?: number;
139
- contract_temporary?: string;
140
- exists?: boolean;
141
- conekta_id?: string;
142
- dynamic_id?: number | string;
143
- dynamic_account?: string | number;
144
- dynamic_ref?: string;
145
- passport_id?: string;
146
- payments?: oClientPayments[];
147
- reference?: string;
148
- references?: oClientReferences[];
149
- token?: string;
150
- userReferences: oUserReference[];
151
- contractUrl?: string;
152
- status: string;
153
- }
154
-
155
112
  declare enum eConektaRes {
156
113
  CUSTOMER_CREATED = "customer.created",
157
114
  ORDER_PENDING_PAYMENT = "order.pending_payment",
@@ -512,6 +469,50 @@ interface oContract {
512
469
  photo?: string;
513
470
  }
514
471
 
472
+ interface oClientPayments$1 {
473
+ date: number;
474
+ dayPayment: number;
475
+ amount: number;
476
+ id: string;
477
+ }
478
+ interface oUserReference$1 {
479
+ name: string;
480
+ phone: string;
481
+ relationship: string;
482
+ }
483
+ interface oClientReferences$1 {
484
+ date?: number;
485
+ amount?: number;
486
+ id: string;
487
+ url?: string;
488
+ }
489
+ interface oClient {
490
+ id: string;
491
+ name: string;
492
+ username: string;
493
+ password?: string;
494
+ email: string;
495
+ phone: string;
496
+ curp: string;
497
+ contract?: string;
498
+ createdAt?: number;
499
+ lastLogin?: number;
500
+ contract_temporary?: string;
501
+ exists?: boolean;
502
+ conekta_id?: string;
503
+ dynamic_id?: number | string;
504
+ dynamic_account?: string | number;
505
+ dynamic_ref?: string;
506
+ passport_id?: string;
507
+ payments?: oClientPayments$1[];
508
+ reference?: string;
509
+ references?: oClientReferences$1[];
510
+ token?: string;
511
+ userReferences: oUserReference$1[];
512
+ contractUrl?: string;
513
+ status: string;
514
+ }
515
+
515
516
  declare enum eReferenceStatusRav {
516
517
  "Disponible" = "Disponible",
517
518
  "Active" = "Activo con credito vigente",
@@ -966,7 +967,8 @@ declare class FactoryDynamiCore {
966
967
  declare enum eRoles {
967
968
  Administrator = "Administrator",
968
969
  Seller = "Seller",
969
- Consultant = "Consultant"
970
+ Consultant = "Consultant",
971
+ Client = "Client"
970
972
  }
971
973
 
972
974
  type tyClientContract = oClient & oContract;
@@ -1243,7 +1245,7 @@ interface oClientConekta {
1243
1245
  ravcredit: oClient;
1244
1246
  conekta: iConektaRecurrent;
1245
1247
  }
1246
- declare const cUserReference: oUserReference;
1248
+ declare const cUserReference: oUserReference$1;
1247
1249
  declare const cClientConekta: oClientConekta;
1248
1250
  interface iClientContract {
1249
1251
  client: oClient;
@@ -1361,7 +1363,7 @@ declare class FactoryContract {
1361
1363
  curp: UntypedFormControl;
1362
1364
  userReferences: UntypedFormArray;
1363
1365
  };
1364
- static CreateUserReferenceFormObj(user: oUserReference): {
1366
+ static CreateUserReferenceFormObj(user: oUserReference$1): {
1365
1367
  name: UntypedFormControl;
1366
1368
  phone: UntypedFormControl;
1367
1369
  relationship: UntypedFormControl;
@@ -1553,13 +1555,85 @@ declare const dateFormat = "EEEE, dd MMM yyyy";
1553
1555
  declare const dateCompleteFormat = "EEEE, dd MMM yyyy hh:mm aaaa";
1554
1556
  declare const timeFormat = "hh:mm aaaa";
1555
1557
  declare const expiredPayment = "expiredPayment";
1558
+ declare const ROLES_KEY = "roles";
1556
1559
 
1557
- interface ILambdaResponse {
1558
- StatusCode: number;
1559
- VerificationSms?: IVerificationSms;
1560
- VerificationCheckSms?: IVerificationCheckSms;
1561
- Error: string;
1562
- }
1560
+ declare const cSingleOptionClientStatus: iOptionsSelect;
1561
+ declare const cOptionsClientStatus: iOptionsSelect[];
1562
+ declare const eRolesSelect: iSelect[];
1563
+ declare const cPaymentDelay: iPaymentDelay;
1564
+ declare const snackBarConfigAction: MatSnackBarConfig;
1565
+ declare const snackBarConfigNoAction: MatSnackBarConfig;
1566
+ declare const snackBarConfigNoActionLong: MatSnackBarConfig;
1567
+ declare const cTyClientContract: {
1568
+ id: string;
1569
+ dynamicAccount?: number;
1570
+ client: string;
1571
+ address: oAddress;
1572
+ device: ravcredit_lib.oDevice;
1573
+ financial: ravcredit_lib.oFinancial;
1574
+ createdAt?: number;
1575
+ lastPayment?: number;
1576
+ by: string;
1577
+ active: boolean;
1578
+ photo?: string;
1579
+ name: string;
1580
+ username: string;
1581
+ password?: string;
1582
+ email: string;
1583
+ phone: string;
1584
+ curp: string;
1585
+ contract?: string;
1586
+ lastLogin?: number;
1587
+ contract_temporary?: string;
1588
+ exists?: boolean;
1589
+ conekta_id?: string;
1590
+ dynamic_id?: number | string;
1591
+ dynamic_account?: string | number;
1592
+ dynamic_ref?: string;
1593
+ passport_id?: string;
1594
+ payments?: oClientPayments$1[];
1595
+ reference?: string;
1596
+ references?: oClientReferences$1[];
1597
+ token?: string;
1598
+ userReferences: oUserReference$1[];
1599
+ contractUrl?: string;
1600
+ status: string;
1601
+ };
1602
+ declare const cAddress: oAddress;
1603
+ declare const cOxxoRecurrentSourcesData: iOxxorecurrentSourcesData;
1604
+ declare const cOxxoRecurrentSources: iOxxoRecurrentSources;
1605
+ declare const cConektaRecurrent: iConektaRecurrent;
1606
+ declare const cAuthConfig: iAuthConfig;
1607
+ declare const cDaySchedule: oDaySchedule;
1608
+
1609
+ declare const ErrorMessages: {
1610
+ NotFound: string;
1611
+ Unauthorized: string;
1612
+ RandomError: string;
1613
+ RandomErrorFirestore: string;
1614
+ CreateUser: string;
1615
+ CreateFoundedUser: string;
1616
+ FindAllNotFound: string;
1617
+ UserFindOne: string;
1618
+ UserFindOneError: string;
1619
+ UserUpdate: string;
1620
+ DeleteUser: string;
1621
+ UsernameNotFound: string;
1622
+ IncorrectPassword: string;
1623
+ LastLogIn: string;
1624
+ authError: string;
1625
+ tokenRequired: string;
1626
+ ClientDefined: string;
1627
+ ClientsNotFound: string;
1628
+ ClientNotFound: string;
1629
+ ClientNotUpdated: string;
1630
+ DeleteClient: string;
1631
+ UsernameClientNotFound: string;
1632
+ ContractsAllEmpty: string;
1633
+ ContractNotFound: string;
1634
+ ContractUpdateError: string;
1635
+ ContractDeleteError: string;
1636
+ };
1563
1637
 
1564
1638
  interface oCatalog {
1565
1639
  name: string;
@@ -1568,14 +1642,6 @@ interface oCatalog {
1568
1642
  createdAt: number;
1569
1643
  }
1570
1644
 
1571
- interface oCompany {
1572
- name: string;
1573
- id: string;
1574
- rfc: string;
1575
- taxRegime: string;
1576
- address: oAddress;
1577
- }
1578
-
1579
1645
  interface oScoreAddress {
1580
1646
  CP: string;
1581
1647
  ciudad: string;
@@ -1652,10 +1718,11 @@ interface oAsset {
1652
1718
  IMEI: string;
1653
1719
  }
1654
1720
 
1655
- interface oContractV2 extends oContract {
1656
- company: oCompany;
1657
- status: eContractStatus;
1658
- asset: oAsset;
1721
+ interface ILambdaResponse {
1722
+ StatusCode: number;
1723
+ VerificationSms?: IVerificationSms;
1724
+ VerificationCheckSms?: IVerificationCheckSms;
1725
+ Error: string;
1659
1726
  }
1660
1727
 
1661
1728
  interface oMediaIdentity {
@@ -1666,23 +1733,73 @@ interface oMediaIdentity {
1666
1733
  uploaded: number;
1667
1734
  }
1668
1735
 
1669
- interface oResponse {
1670
- error?: string;
1671
- data: oUser | oUser[] | oBusinessInfo | oAddress | oSchedule | oFinancial | string | iPaymentDelay | oClient | oDevice | iConfigUUID | Response | oNotification;
1736
+ interface oClientPayments {
1737
+ date: number;
1738
+ dayPayment: number;
1739
+ amount: number;
1740
+ id: string;
1741
+ }
1742
+ interface oUserReference {
1743
+ name: string;
1744
+ phone: string;
1745
+ relationship: string;
1746
+ }
1747
+ interface oClientReferences {
1748
+ date?: number;
1749
+ amount?: number;
1750
+ id: string;
1751
+ url?: string;
1752
+ }
1753
+ interface oClientV2 extends oClient {
1754
+ score: oScore;
1755
+ seller_id?: string;
1756
+ scoreNoHit?: oScoreNoHit;
1757
+ study_degree?: string;
1758
+ mediaSelfie?: oMediaIdentity;
1759
+ mediaAddress?: oMediaIdentity;
1760
+ mediaWithDevice?: oMediaIdentity;
1761
+ mediaSelfieBack?: oMediaIdentity;
1762
+ identityVerification?: eVerificationStep;
1763
+ }
1764
+
1765
+ interface oCompany {
1766
+ name: string;
1767
+ id: string;
1768
+ rfc: string;
1769
+ taxRegime: string;
1770
+ address: oAddress;
1771
+ }
1772
+
1773
+ interface oContractV2 extends oContract {
1774
+ company: oCompany;
1775
+ status: eContractStatus;
1776
+ asset: oAsset;
1672
1777
  }
1673
- interface gResponse {
1778
+
1779
+ /** Response from APIs */
1780
+ interface oResponse {
1674
1781
  status?: boolean;
1675
- path: string;
1782
+ path?: string;
1676
1783
  statusCode: number;
1677
1784
  error?: string;
1678
1785
  epochTime: number;
1679
- data?: any;
1786
+ data?: oUser | oUser[] | oBusinessInfo | oAddress | oSchedule | oFinancial | string | iPaymentDelay | oClient | oDevice | iConfigUUID | Response | oNotification;
1680
1787
  }
1681
- interface gResponseFuncEmail {
1788
+ interface oResponseFuncEmail {
1682
1789
  success: boolean;
1683
1790
  message: any;
1684
1791
  }
1685
1792
 
1793
+ interface oMessagingData {
1794
+ id: string;
1795
+ curp: string;
1796
+ type: string;
1797
+ }
1798
+ interface oMessaging {
1799
+ data: oMessagingData;
1800
+ topic: string;
1801
+ }
1802
+
1686
1803
  declare enum eLoginStatus {
1687
1804
  IDLE = "IDLE",
1688
1805
  ERROR = "ERROR",
@@ -1729,6 +1846,18 @@ declare enum eProcessStatus {
1729
1846
  PROCESSING = "PROCESSING",
1730
1847
  WAITING = "WAITING"
1731
1848
  }
1849
+ declare enum eRequestVerb {
1850
+ POST = "POST",
1851
+ GET = "GET",
1852
+ PATCH = "PATCH",
1853
+ DELETE = "DELETE"
1854
+ }
1855
+ declare enum eGCActions {
1856
+ Create = "Create",
1857
+ Update = "Update",
1858
+ Remove = "Remove",
1859
+ LoginTime = "UpdateLogIn"
1860
+ }
1732
1861
 
1733
- export { FactoryBusiness, FactoryClient, FactoryConekta, FactoryContract, FactoryDynamiCore, FactoryNotification, FactoryPassport, FactoryPayment, IndexedDbService, ROUTE_GLOBAL_REFERENCE2, ROUTE_NOTIFICATIONS, RavcreditLibComponent, RavcreditLibService, UtilTime, UtilsHttp, cBusinessConfig, cBusinessDeadlines, cBusinessInfo, cClient, cClientConekta, cClientContract, cClientDynamicStatus, cContract, cContractMetrics, cDefinedSchedule, cDevice, cEmptyDay, cFinancial, cIDCCharge, cIDCCustomer, cIDCDataPii, cIDCGeneratedReference, cIDCPayment, cNotification, cSchedule, cTopic, 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, eAssetPeriod, eAuthActions, eAuthType, eClientDynamicStatus, eClientStatus, eConektaOrderStatus, eConektaRes, eContractStatus, eContractSteps, eIdentityTypes, eLoginStatus, eNotificationType, ePassportTypes, ePaymentType, eProcessStatus, eProvider, eReferenceStatusRav, eRoles, eVerificationChannel, eVerificationStatus, eVerificationStep, expiredPayment, keyPathId, keyUserID, ravCreditFunctions, timeFormat, week };
1734
- export type { HasUnsavedChanges, IBaseVerification, IDCAccount, IDCAccountConfig, IDCAccountProps, IDCCharge, IDCClient, IDCClientObjFilter, IDCClientPiiFilter, IDCClientQuery, IDCCredit, IDCCreditConfig, IDCCreditProperties, IDCDataPii, IDCGeneratedReference, IDCMntryCycle, IDCMntryPymt, IDCMntryPymtAll, IDCMntryPymtAllPaidTotal, IDCMntryPymtCal, IDCMntryPymtDue, IDCMntryPymtDueTax, IDCMntryPymtOpen, IDCMntryPymtPaid, IDCMntryPymtPymt, IDCMsg, IDCNewReference, IDCOxxoRef, IDCOxxoRefItem, IDCOxxoRefPymtMth, IDCPayment, IDCRefCustInfo, IDCRefItems, IDCRefPymtMethod, IDCReference, IDCTransaction, IDCTxn, IDCTxnHeader, IDCTxnRow, IDCTxnRowExtras, IDynamiCore, ILambdaResponse, ISendCodeAttempt, ISignIn, IVerificationCheckSms, IVerificationData, IVerificationSms, gResponse, gResponseFuncEmail, iAuthConfig, iBusinessInfo, iClientContract, iConektaRecurrent, iConektaResData, iConektaResObjChargePaid, iConektaResObjChargePaidMethod, iConektaResPrevAttr, iConektaSources, iConfigUUID, iContract, iContractAll, iGlobalPassport, iInformativeDialog, iNewPayment, iOptionsSelect, iOxxoRecurrentSources, iOxxorecurrentSourcesData, iPassportAdditional, iPassportReference, iPassportReferenceCenters, iPassportReferenceData, iPassportReferenceRes, iPassportResponse, iPassportResponseData, iPaymentDelay, iSelect, iServiceUser, iSnackBarMessage, iUser, oAddress, oAsset, oAssetBrand, oAssetCategory, oAssetOffer, oAuth, oAuthRes, oBusinessConfig, oBusinessDeadlines, oBusinessInfo, oCatalog, oClient, oClientConekta, oClientPayments, oClientReferences, oCompany, oConektaChannel, oConektaChargeData, oConektaCharges, oConektaCheckout, oConektaCustomerInfo, oConektaLineItem, oConektaLineItems, oConektaNewOrder, oConektaNewOrderAntifraudInfo, oConektaNewOrderCharge, oConektaNewOrderCustomerInfo, oConektaNewOrderLineItem, oConektaNewOrderPymMethod, oConektaOrder, oConektaOrderCreate, oConektaOrdersResponse, oConektaPaymentMethod, oConektaRes, oConektaResData, oConektaResObjChargePaid, oConektaResObjOrderPaid, oConektaResPrevAttr, oContract, oContractMetrics, oContractV2, oCustomer, oCustomerInfo, oDaySchedule, oDevice, oFinancial, oFinancialProgress, oMediaIdentity, oNotification, oNotificationResponses, oPaymentDates, oPaymentGlobal, oPaymentOption, oResponse, oSchedule, oScore, oScoreAddress, oScoreGeneral, oScoreHit, oScoreNoHit, oScoreReference, oTmpBusinessConfig, oUser, oUserReference, oWeekSchedule, partialIDCData, tyClientContract };
1862
+ export { ErrorMessages, FactoryBusiness, FactoryClient, FactoryConekta, FactoryContract, FactoryDynamiCore, FactoryNotification, FactoryPassport, FactoryPayment, IndexedDbService, ROLES_KEY, ROUTE_GLOBAL_REFERENCE2, ROUTE_NOTIFICATIONS, RavcreditLibComponent, RavcreditLibService, UtilTime, UtilsHttp, cAddress, cAuthConfig, cBusinessConfig, cBusinessDeadlines, cBusinessInfo, cClient, cClientConekta, cClientContract, cClientDynamicStatus, cConektaRecurrent, cContract, cContractMetrics, cDaySchedule, cDefinedSchedule, cDevice, cEmptyDay, cFinancial, cIDCCharge, cIDCCustomer, cIDCDataPii, cIDCGeneratedReference, cIDCPayment, cNotification, cOptionsClientStatus, cOxxoRecurrentSources, cOxxoRecurrentSourcesData, cPaymentDelay, 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, eAssetPeriod, eAuthActions, eAuthType, eClientDynamicStatus, eClientStatus, eConektaOrderStatus, eConektaRes, eContractStatus, eContractSteps, eGCActions, eIdentityTypes, eLoginStatus, eNotificationType, ePassportTypes, ePaymentType, eProcessStatus, eProvider, eReferenceStatusRav, eRequestVerb, eRoles, eRolesSelect, eVerificationChannel, eVerificationStatus, eVerificationStep, expiredPayment, keyPathId, keyUserID, ravCreditFunctions, snackBarConfigAction, snackBarConfigNoAction, snackBarConfigNoActionLong, timeFormat, week };
1863
+ export type { HasUnsavedChanges, IBaseVerification, IDCAccount, IDCAccountConfig, IDCAccountProps, IDCCharge, IDCClient, IDCClientObjFilter, IDCClientPiiFilter, IDCClientQuery, IDCCredit, IDCCreditConfig, IDCCreditProperties, IDCDataPii, IDCGeneratedReference, IDCMntryCycle, IDCMntryPymt, IDCMntryPymtAll, IDCMntryPymtAllPaidTotal, IDCMntryPymtCal, IDCMntryPymtDue, IDCMntryPymtDueTax, IDCMntryPymtOpen, IDCMntryPymtPaid, IDCMntryPymtPymt, IDCMsg, IDCNewReference, IDCOxxoRef, IDCOxxoRefItem, IDCOxxoRefPymtMth, IDCPayment, IDCRefCustInfo, IDCRefItems, IDCRefPymtMethod, IDCReference, IDCTransaction, IDCTxn, IDCTxnHeader, IDCTxnRow, IDCTxnRowExtras, IDynamiCore, ILambdaResponse, ISendCodeAttempt, ISignIn, IVerificationCheckSms, IVerificationData, IVerificationSms, iAuthConfig, iBusinessInfo, iClientContract, iConektaRecurrent, iConektaResData, iConektaResObjChargePaid, iConektaResObjChargePaidMethod, iConektaResPrevAttr, iConektaSources, iConfigUUID, iContract, iContractAll, iGlobalPassport, iInformativeDialog, iNewPayment, iOptionsSelect, iOxxoRecurrentSources, iOxxorecurrentSourcesData, iPassportAdditional, iPassportReference, iPassportReferenceCenters, iPassportReferenceData, iPassportReferenceRes, iPassportResponse, iPassportResponseData, iPaymentDelay, iSelect, iServiceUser, iSnackBarMessage, iUser, oAddress, oAsset, oAssetBrand, oAssetCategory, oAssetOffer, oAuth, oAuthRes, oBusinessConfig, oBusinessDeadlines, oBusinessInfo, oCatalog, oClientConekta, oClientPayments, oClientReferences, oClientV2, oCompany, oConektaChannel, oConektaChargeData, oConektaCharges, oConektaCheckout, oConektaCustomerInfo, oConektaLineItem, oConektaLineItems, oConektaNewOrder, oConektaNewOrderAntifraudInfo, oConektaNewOrderCharge, oConektaNewOrderCustomerInfo, oConektaNewOrderLineItem, oConektaNewOrderPymMethod, oConektaOrder, oConektaOrderCreate, oConektaOrdersResponse, oConektaPaymentMethod, oConektaRes, oConektaResData, oConektaResObjChargePaid, oConektaResObjOrderPaid, oConektaResPrevAttr, oContract, oContractMetrics, oContractV2, oCustomer, oCustomerInfo, oDaySchedule, oDevice, oFinancial, oFinancialProgress, oMediaIdentity, oMessaging, oMessagingData, oNotification, oNotificationResponses, oPaymentDates, oPaymentGlobal, oPaymentOption, oResponse, oResponseFuncEmail, oSchedule, oScore, oScoreAddress, oScoreGeneral, oScoreHit, oScoreNoHit, oScoreReference, oTmpBusinessConfig, oUser, oUserReference, oWeekSchedule, partialIDCData, tyClientContract };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ravcredit-lib",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "types": "./index.d.ts",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^20.0.0",