ravcredit-lib 0.0.26 → 0.0.27

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.
Files changed (68) hide show
  1. package/ng-package.json +7 -0
  2. package/package.json +14 -25
  3. package/src/index.d.ts +60 -0
  4. package/src/lib/ravcredit-lib.component.spec.ts +23 -0
  5. package/src/lib/ravcredit-lib.component.ts +16 -0
  6. package/src/lib/ravcredit-lib.service.spec.ts +16 -0
  7. package/src/lib/ravcredit-lib.service.ts +9 -0
  8. package/src/lib/v1/const/constants.ts +37 -0
  9. package/src/lib/v1/idb/idb.service.spec.ts +16 -0
  10. package/src/lib/v1/idb/indexed-db.service.ts +396 -0
  11. package/src/lib/v1/objects/oAddress.ts +9 -0
  12. package/src/lib/v1/objects/oBusiness.ts +93 -0
  13. package/src/lib/v1/objects/oClient.ts +46 -0
  14. package/src/lib/v1/objects/oConekta.ts +361 -0
  15. package/src/lib/v1/objects/oContract.ts +31 -0
  16. package/src/lib/v1/objects/oContractAll.ts +37 -0
  17. package/src/lib/v1/objects/oCustomer.ts +36 -0
  18. package/src/lib/v1/objects/oDevice.ts +5 -0
  19. package/src/lib/v1/objects/oFinancial.ts +32 -0
  20. package/src/lib/v1/objects/oLogIn.ts +26 -0
  21. package/src/lib/v1/objects/oNewPayment.ts +18 -0
  22. package/src/lib/v1/objects/oNotification.ts +33 -0
  23. package/src/lib/v1/objects/oPassport.ts +60 -0
  24. package/src/lib/v1/objects/oUser.ts +35 -0
  25. package/src/lib/v1/objects/oVerification.ts +79 -0
  26. package/src/lib/v1/util/UtilBusiness.ts +187 -0
  27. package/src/lib/v1/util/UtilClient.ts +300 -0
  28. package/src/lib/v1/util/UtilConekta.ts +97 -0
  29. package/src/lib/v1/util/UtilContract.ts +430 -0
  30. package/src/lib/v1/util/UtilDashboard.ts +19 -0
  31. package/src/lib/v1/util/UtilDynamiCore.ts +752 -0
  32. package/src/lib/v1/util/UtilNotification.ts +46 -0
  33. package/src/lib/v1/util/UtilPassport.ts +33 -0
  34. package/src/lib/v1/util/UtilPayment.ts +22 -0
  35. package/src/lib/v1/util/UtilTime.ts +179 -0
  36. package/src/lib/v1/util/UtilsHttp.ts +25 -0
  37. package/src/lib/v2/constant/constants.ts +125 -0
  38. package/src/lib/v2/constant/messages.ts +28 -0
  39. package/src/lib/v2/enum/EnumAsset.ts +4 -0
  40. package/src/lib/v2/enum/EnumAuth.ts +29 -0
  41. package/src/lib/v2/enum/EnumClient.ts +7 -0
  42. package/src/lib/v2/enum/EnumConekta.ts +14 -0
  43. package/src/lib/v2/enum/EnumDynamic.ts +8 -0
  44. package/src/lib/v2/enum/EnumNotification.ts +1 -0
  45. package/src/lib/v2/enum/EnumPassport.ts +4 -0
  46. package/src/lib/v2/enum/EnumPayment.ts +5 -0
  47. package/src/lib/v2/enum/EnumRoles.ts +7 -0
  48. package/src/lib/v2/enum/EnumToken.ts +11 -0
  49. package/src/lib/v2/enum/EnumUtil.ts +22 -0
  50. package/src/lib/v2/enum/EnumVerification.ts +22 -0
  51. package/src/lib/v2/objects/oAsset.ts +44 -0
  52. package/src/lib/v2/objects/oAws.ts +8 -0
  53. package/src/lib/v2/objects/oCatalog.ts +6 -0
  54. package/src/lib/v2/objects/oClient.ts +36 -0
  55. package/src/lib/v2/objects/oCompany.ts +10 -0
  56. package/src/lib/v2/objects/oContract.ts +10 -0
  57. package/src/lib/v2/objects/oHttp.ts +33 -0
  58. package/src/lib/v2/objects/oMediaDto.ts +10 -0
  59. package/src/lib/v2/objects/oMessaging.ts +10 -0
  60. package/src/lib/v2/objects/oScoreDto.ts +38 -0
  61. package/src/lib/v2/objects/oUtil.ts +68 -0
  62. package/src/public-api.ts +66 -0
  63. package/tsconfig.lib.json +15 -0
  64. package/tsconfig.lib.prod.json +11 -0
  65. package/tsconfig.spec.json +15 -0
  66. package/fesm2022/ravcredit-lib.mjs +0 -2182
  67. package/fesm2022/ravcredit-lib.mjs.map +0 -1
  68. package/index.d.ts +0 -1881
@@ -0,0 +1,36 @@
1
+ import {oClient} from '../../v1/objects/oClient';
2
+ import { oMediaIdentity } from "./oMediaDto";
3
+ import {oScore, oScoreNoHit} from './oScoreDto';
4
+ import {eVerificationStep} from '../enum/EnumVerification';
5
+
6
+ export interface oClientPayments {
7
+ date: number;
8
+ dayPayment: number;
9
+ amount: number;
10
+ id: string;
11
+ }
12
+
13
+ export interface oUserReference {
14
+ name: string,
15
+ phone: string,
16
+ relationship: string
17
+ }
18
+
19
+ export interface oClientReferences {
20
+ date?: number;
21
+ amount?: number;
22
+ id: string;
23
+ url?: string;
24
+ }
25
+
26
+ export interface oClientV2 extends oClient {
27
+ score: oScore,
28
+ seller_id?: string
29
+ scoreNoHit?: oScoreNoHit,
30
+ study_degree?: string,
31
+ mediaSelfie?: oMediaIdentity,
32
+ mediaAddress?: oMediaIdentity,
33
+ mediaWithDevice?: oMediaIdentity,
34
+ mediaSelfieBack?: oMediaIdentity,
35
+ identityVerification?: eVerificationStep
36
+ }
@@ -0,0 +1,10 @@
1
+ import {oAddress} from '../../v1/objects/oAddress';
2
+
3
+ export interface oCompany {
4
+ name: string
5
+ id: string
6
+ rfc: string
7
+ taxRegime: string
8
+ address: oAddress
9
+
10
+ }
@@ -0,0 +1,10 @@
1
+ import {oContract} from '../../v1/objects/oContract';
2
+ import {oCompany} from './oCompany';
3
+ import {oAsset} from './oAsset';
4
+ import {eContractStatus} from '../../v1/util/UtilContract';
5
+
6
+ export interface oContractV2 extends oContract {
7
+ company: oCompany
8
+ status: eContractStatus
9
+ asset: oAsset // new entity to represent a user device
10
+ }
@@ -0,0 +1,33 @@
1
+
2
+ import {oBusinessInfo, oSchedule} from "../../v1/objects/oBusiness";
3
+ import {oUser} from '../../v1/objects/oUser';
4
+ import {oAddress} from '../../v1/objects/oAddress';
5
+ import { oFinancial } from "../../v1/objects/oFinancial";
6
+ import {oClient} from '../../v1/objects/oClient';
7
+ import {oDevice} from '../../v1/objects/oDevice';
8
+ import {oNotification} from '../../v1/objects/oNotification';
9
+ import {iConfigUUID, iPaymentDelay} from "./oUtil";
10
+
11
+ // export interface oResponse {
12
+ // error?: string;
13
+ // data?: oUser | oUser[] | oBusinessInfo | oAddress |
14
+ // oSchedule | oFinancial | string | iPaymentDelay |
15
+ // oClient | oDevice | iConfigUUID | Response | oNotification;
16
+ // }
17
+
18
+ /** Response from APIs */
19
+ export interface oResponse {
20
+ status?: boolean; // indicates whether resource required was returned
21
+ path?: string;
22
+ statusCode: number;
23
+ error?: string;
24
+ epochTime: number;
25
+ data: oUser | oUser[] | oBusinessInfo | oAddress |
26
+ oSchedule | oFinancial | string | iPaymentDelay |
27
+ oClient | oDevice | iConfigUUID | Response | oNotification | null;
28
+ }
29
+
30
+ export interface oResponseFuncEmail {
31
+ success: boolean,
32
+ message: any
33
+ }
@@ -0,0 +1,10 @@
1
+ import {eIdentityTypes} from '../../v1/util/UtilClient';
2
+
3
+ export interface oMediaIdentity
4
+ {
5
+ url: string,
6
+ name: eIdentityTypes,
7
+ active: boolean,
8
+ metadata: any,
9
+ uploaded: number
10
+ }
@@ -0,0 +1,10 @@
1
+ export interface oMessagingData {
2
+ id: string,
3
+ curp: string,
4
+ type: string
5
+ }
6
+
7
+ export interface oMessaging {
8
+ data: oMessagingData,
9
+ topic: string
10
+ }
@@ -0,0 +1,38 @@
1
+ export interface oScoreAddress {
2
+ CP: string,
3
+ ciudad: string,
4
+ estado: string,
5
+ domicilio: string,
6
+ coloniaPoblacion: string,
7
+ delegacionMunicipio: string
8
+ }
9
+
10
+ export interface oScoreHit {
11
+ valor: string
12
+ }
13
+
14
+ export interface oScoreNoHit {
15
+ date: string,
16
+ score: string,
17
+ message: string,
18
+ evaluation: string
19
+ }
20
+
21
+ export interface oScoreGeneral {
22
+ nombres: string,
23
+ apellidoMaterno: string,
24
+ apellidoPaterno: string,
25
+ fechaNacimiento: string
26
+ }
27
+
28
+ export interface oScore {
29
+ domicilio: oScoreAddress,
30
+ scoreNoHit: oScoreHit,
31
+ folioConsulta: string,
32
+ datosGenerales: oScoreGeneral
33
+ }
34
+ //TODO: Add pending data, those params will comes from "Circulo de credito" API
35
+ export interface oScoreReference {
36
+ name: string,
37
+ score: number
38
+ }
@@ -0,0 +1,68 @@
1
+ import {oClient} from '../../v1/objects/oClient';
2
+ import {oContract} from '../../v1/objects/oContract';
3
+ import {MatSnackBarConfig} from '@angular/material/snack-bar';
4
+ import {eRoles} from '../enum/EnumRoles';
5
+
6
+ export type tyClientContract = oClient & oContract
7
+
8
+ export interface oContractMetrics {
9
+ total: number
10
+ activated: number
11
+ paused: number
12
+ completed: number
13
+ canceled: number
14
+ late: number
15
+ dynamicCount: number
16
+ passportCount: number
17
+ conektaCount: number
18
+ rateTotal: number
19
+ rateActive: number
20
+ ratePaused: number
21
+ rateComplete: number
22
+ rateCanceled: number
23
+ rateLate: number
24
+ }
25
+
26
+ export interface HasUnsavedChanges {
27
+ hasUnsavedChanges(): boolean;
28
+ }
29
+
30
+ export interface oPaymentDates {
31
+ week: number
32
+ date: number
33
+ }
34
+
35
+ export interface iInformativeDialog {
36
+ message: string,
37
+ title: string,
38
+ cancel: string,
39
+ continue: string
40
+ }
41
+
42
+ export interface iSnackBarMessage {
43
+ message: string,
44
+ action: string,
45
+ config: MatSnackBarConfig
46
+ }
47
+
48
+ export interface iOptionsSelect {
49
+ viewValue: String
50
+ value: String
51
+ }
52
+
53
+ export interface iSelect {
54
+ viewValue: eRoles
55
+ value: eRoles
56
+ }
57
+
58
+ export interface iConfigUUID {
59
+ client_uuid?: string;
60
+ contract_uuid: string;
61
+ }
62
+
63
+ export interface iPaymentDelay {
64
+ today: number;
65
+ nextPayment: number;
66
+ daysDelay: number
67
+ late: boolean
68
+ }
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Public API Surface of ravcredit-lib
3
+ */
4
+
5
+ export * from './lib/ravcredit-lib.service';
6
+ export * from './lib/ravcredit-lib.component';
7
+ export * from './lib/v1/objects/oAddress';
8
+ export * from './lib/v1/objects/oBusiness';
9
+ // export * from './lib/v1/objects/oClient';
10
+ export * from './lib/v1/objects/oConekta';
11
+ export * from './lib/v1/objects/oContract';
12
+ export * from './lib/v1/objects/oContractAll';
13
+ export * from './lib/v1/objects/oCustomer';
14
+ export * from './lib/v1/objects/oDevice';
15
+ export * from './lib/v1/objects/oFinancial';
16
+ export * from './lib/v1/objects/oLogIn';
17
+ export * from './lib/v1/objects/oNewPayment';
18
+ export * from './lib/v1/objects/oNotification';
19
+ export * from './lib/v1/objects/oPassport';
20
+ export * from './lib/v1/objects/oUser';
21
+ export * from './lib/v1/objects/oVerification';
22
+
23
+ export * from './lib/v1/util/UtilClient';
24
+ export * from './lib/v1/util/UtilsHttp'
25
+ export * from './lib/v1/util/UtilBusiness';
26
+ export * from './lib/v1/util/UtilDynamiCore';
27
+ export * from './lib/v1/util/UtilContract';
28
+ export * from './lib/v1/util/UtilConekta';
29
+ export * from './lib/v1/util/UtilNotification';
30
+ export * from './lib/v1/util/UtilTime';
31
+ export * from './lib/v1/util/UtilDashboard';
32
+ export * from './lib/v1/util/UtilPassport';
33
+ export * from './lib/v1/util/UtilPayment';
34
+
35
+ export * from './lib/v1/idb/indexed-db.service';
36
+ export * from './lib/v1/const/constants';
37
+
38
+ export * from './lib/v2/constant/constants';
39
+ export * from './lib/v2/constant/messages';
40
+
41
+ export * from './lib/v2/objects/oAsset';
42
+ export * from './lib/v2/objects/oAws';
43
+ export * from './lib/v2/objects/oCatalog';
44
+ export * from './lib/v2/objects/oClient';
45
+ export * from './lib/v2/objects/oCompany';
46
+ export * from './lib/v2/objects/oContract';
47
+ export * from './lib/v2/objects/oHttp';
48
+ export * from './lib/v2/objects/oMediaDto';
49
+ export * from './lib/v2/objects/oMessaging';
50
+ export * from './lib/v2/objects/oScoreDto';
51
+ export * from './lib/v2/objects/oUtil';
52
+
53
+ export * from './lib/v2/objects/oUtil';
54
+ export * from './lib/v2/objects/oHttp';
55
+
56
+ export * from './lib/v2/enum/EnumAsset';
57
+ export * from './lib/v2/enum/EnumAuth';
58
+ export * from './lib/v2/enum/EnumClient';
59
+ export * from './lib/v2/enum/EnumConekta';
60
+ export * from './lib/v2/enum/EnumDynamic';
61
+ export * from './lib/v2/enum/EnumNotification';
62
+ export * from './lib/v2/enum/EnumPassport';
63
+ export * from './lib/v2/enum/EnumRoles';
64
+ export * from './lib/v2/enum/EnumToken';
65
+ export * from './lib/v2/enum/EnumUtil';
66
+ export * from './lib/v2/enum/EnumVerification';
@@ -0,0 +1,15 @@
1
+ /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
+ /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
+ {
4
+ "extends": "../../tsconfig.json",
5
+ "compilerOptions": {
6
+ "outDir": "../../out-tsc/lib",
7
+ "declaration": true,
8
+ "declarationMap": true,
9
+ "inlineSources": true,
10
+ "types": []
11
+ },
12
+ "exclude": [
13
+ "**/*.spec.ts"
14
+ ]
15
+ }
@@ -0,0 +1,11 @@
1
+ /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
+ /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
+ {
4
+ "extends": "./tsconfig.lib.json",
5
+ "compilerOptions": {
6
+ "declarationMap": false
7
+ },
8
+ "angularCompilerOptions": {
9
+ "compilationMode": "partial"
10
+ }
11
+ }
@@ -0,0 +1,15 @@
1
+ /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
2
+ /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
3
+ {
4
+ "extends": "../../tsconfig.json",
5
+ "compilerOptions": {
6
+ "outDir": "../../out-tsc/spec",
7
+ "types": [
8
+ "jasmine"
9
+ ]
10
+ },
11
+ "include": [
12
+ "**/*.spec.ts",
13
+ "**/*.d.ts"
14
+ ]
15
+ }