ravcredit-lib 0.0.2 → 0.0.3

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 (44) hide show
  1. package/esm2022/lib/v1/objects/oAddress.mjs +2 -0
  2. package/esm2022/lib/v1/objects/oBusiness.mjs +2 -0
  3. package/esm2022/lib/v1/objects/oClient.mjs +2 -0
  4. package/esm2022/lib/v1/objects/oConekta.mjs +85 -0
  5. package/esm2022/lib/v1/objects/oContract.mjs +2 -0
  6. package/esm2022/lib/v1/objects/oContractAll.mjs +2 -0
  7. package/esm2022/lib/v1/objects/oCustomer.mjs +18 -0
  8. package/esm2022/lib/v1/objects/oDevice.mjs +2 -0
  9. package/esm2022/lib/v1/objects/oFinancial.mjs +2 -0
  10. package/esm2022/lib/v1/objects/oGlobal.mjs +86 -0
  11. package/esm2022/lib/v1/objects/oLogIn.mjs +17 -0
  12. package/esm2022/lib/v1/objects/oNewPayment.mjs +2 -0
  13. package/esm2022/lib/v1/objects/oNotification.mjs +17 -0
  14. package/esm2022/lib/v1/objects/oPassport.mjs +7 -0
  15. package/esm2022/lib/v1/objects/oUser.mjs +2 -0
  16. package/esm2022/lib/v1/util/UtilBusiness.mjs +181 -0
  17. package/esm2022/lib/v1/util/UtilClient.mjs +221 -0
  18. package/esm2022/lib/v1/util/UtilContract.mjs +339 -0
  19. package/esm2022/lib/v1/util/UtilDynamiCore.mjs +292 -0
  20. package/esm2022/public-api.mjs +16 -2
  21. package/fesm2022/ravcredit-lib.mjs +962 -1
  22. package/fesm2022/ravcredit-lib.mjs.map +1 -1
  23. package/lib/v1/objects/oAddress.d.ts +9 -0
  24. package/lib/v1/objects/oBusiness.d.ts +101 -0
  25. package/lib/{oClient.d.ts → v1/objects/oClient.d.ts} +0 -1
  26. package/lib/v1/objects/oConekta.d.ts +305 -0
  27. package/lib/v1/objects/oContract.d.ts +23 -0
  28. package/lib/v1/objects/oContractAll.d.ts +21 -0
  29. package/lib/v1/objects/oCustomer.d.ts +17 -0
  30. package/lib/v1/objects/oDevice.d.ts +5 -0
  31. package/lib/v1/objects/oFinancial.d.ts +30 -0
  32. package/lib/v1/objects/oGlobal.d.ts +149 -0
  33. package/lib/v1/objects/oLogIn.d.ts +30 -0
  34. package/lib/v1/objects/oNewPayment.d.ts +11 -0
  35. package/lib/v1/objects/oNotification.d.ts +25 -0
  36. package/lib/v1/objects/oPassport.d.ts +55 -0
  37. package/lib/v1/objects/oUser.d.ts +25 -0
  38. package/lib/v1/util/UtilBusiness.d.ts +54 -0
  39. package/lib/v1/util/UtilClient.d.ts +34 -0
  40. package/lib/v1/util/UtilContract.d.ts +71 -0
  41. package/lib/v1/util/UtilDynamiCore.d.ts +453 -0
  42. package/package.json +1 -1
  43. package/public-api.d.ts +15 -1
  44. package/esm2022/lib/oClient.mjs +0 -2
@@ -0,0 +1,453 @@
1
+ import { UntypedFormControl } from "@angular/forms";
2
+ import { oClient } from '../objects/oClient';
3
+ import { oContract } from '../objects/oContract';
4
+ export declare enum eReferenceStatusRav {
5
+ "Disponible" = "Disponible",
6
+ "Active" = "Activo con credito vigente",
7
+ "ActiveEnded" = "Activo sin credito vigente",
8
+ "Registered" = "Registrado",
9
+ "NonRegistered" = "No registrado",
10
+ "NonVerified" = "No verificado",
11
+ "Rejected" = "Rechazado",
12
+ "Pending" = "Pendiente"
13
+ }
14
+ export declare enum eAccountDynamicStatus {
15
+ "OK" = "Con cuenta activa",
16
+ "NOK" = "Sin cuenta activa"
17
+ }
18
+ export declare enum eClientDynamicStatus {
19
+ "Active" = "Active",
20
+ "Pending" = "Pending",
21
+ "Accepted" = "Accepted",
22
+ "Rejected" = "Rejected",
23
+ "approved" = "Aprobado"
24
+ }
25
+ export declare const cClientDynamicStatus: {
26
+ Active: {
27
+ value: string;
28
+ viewValue: string;
29
+ };
30
+ Pending: {
31
+ value: string;
32
+ viewValue: string;
33
+ };
34
+ Accepted: {
35
+ value: string;
36
+ viewValue: string;
37
+ };
38
+ Rejected: {
39
+ value: string;
40
+ viewValue: string;
41
+ };
42
+ Idle: {
43
+ value: string;
44
+ viewValue: string;
45
+ };
46
+ };
47
+ export declare enum eContractSteps {
48
+ "idle" = "idle",
49
+ "general" = "General",
50
+ "address" = "Address",
51
+ "device" = "Device",
52
+ "financial" = "Financial",
53
+ "app" = "App"
54
+ }
55
+ export type partialIDCData = Pick<IDCClient, "pii" | "client_type">;
56
+ export interface IDCCharge {
57
+ barcode_url: string;
58
+ currency: string;
59
+ expires_at: number;
60
+ object: string;
61
+ quantity: number;
62
+ reference: string;
63
+ service_name: string;
64
+ store_name: string;
65
+ type: string;
66
+ unit_price: number;
67
+ }
68
+ export interface IDCGeneratedReference {
69
+ account: number;
70
+ active: number;
71
+ amount: number;
72
+ channel: string;
73
+ charge: IDCCharge;
74
+ company: number;
75
+ config?: any;
76
+ id: string;
77
+ operation: number;
78
+ }
79
+ export declare const cIDCDataPii: IDCDataPii;
80
+ /**
81
+ * Base customer for create customer with DynamiCore provider
82
+ * */
83
+ export declare const cIDCCustomer: partialIDCData;
84
+ export interface IDCDataPii {
85
+ icc: string;
86
+ rfc: string;
87
+ city: string;
88
+ curp: string;
89
+ sex: string;
90
+ days: string;
91
+ step: string;
92
+ ticket: string;
93
+ evidence: string;
94
+ proof_of_address: string;
95
+ score_interno: string;
96
+ imei: string;
97
+ name: string;
98
+ term: string;
99
+ brand: string;
100
+ email: string;
101
+ model: string;
102
+ phone: string;
103
+ score: any;
104
+ state: string;
105
+ amount: string;
106
+ colony: string;
107
+ estado: any;
108
+ gender: string;
109
+ period: string;
110
+ street: string;
111
+ num_ext: string;
112
+ num_int: string;
113
+ zipcode: string;
114
+ financed: string;
115
+ house_is: string;
116
+ lastname: string;
117
+ type_job: string;
118
+ birthdate: string;
119
+ birthstate: string;
120
+ dicio_data: string;
121
+ dicio_step: any;
122
+ secondname: string;
123
+ nationality: string;
124
+ seller_name: string;
125
+ down_payment: string;
126
+ municipality: string;
127
+ score_no_hit: string;
128
+ study_degree: string;
129
+ branch_office: string;
130
+ identity_data: any;
131
+ interest_rate: string;
132
+ marital_status: string;
133
+ monthly_income: string;
134
+ motherlastname: string;
135
+ score_rcc_fico: string;
136
+ identity_selfie: any;
137
+ amount_by_period: string;
138
+ identity_id_back: any;
139
+ identity_id_front: any;
140
+ economic_dependents: string;
141
+ identity_id_request: any;
142
+ identity_verification: any;
143
+ is_address_ine_currently_live: string;
144
+ fotografia_del_cliente_con_el_equipo?: string;
145
+ }
146
+ export interface IDCAccountProps {
147
+ clabe: string | number;
148
+ pagaqui: string | number;
149
+ start_date: string;
150
+ expected_disbursed: number;
151
+ reference_pagaaqui: string;
152
+ principal_disbursed: number;
153
+ amount_commission_opening: number;
154
+ seller_name?: string;
155
+ }
156
+ export interface IDCAccountConfig {
157
+ contract: string;
158
+ credit_type: string;
159
+ periodicity: string;
160
+ installments: number;
161
+ interest_base: string;
162
+ interest_rate: number;
163
+ interest_arrears: number;
164
+ commission_opening: number;
165
+ financed_amount?: number;
166
+ }
167
+ export interface IDCAccount {
168
+ id: number;
169
+ group: number;
170
+ company: number;
171
+ client: number;
172
+ created_at: string;
173
+ currency: string | number;
174
+ status: string;
175
+ properties: IDCAccountProps;
176
+ product: number;
177
+ enabled: string | number;
178
+ config: IDCAccountConfig;
179
+ amount: number;
180
+ type: string;
181
+ identifier: string;
182
+ start_at: string;
183
+ el: any;
184
+ client_id: string | number;
185
+ }
186
+ export interface IDCTxnRowExtras {
187
+ reference: string;
188
+ transaction: string;
189
+ }
190
+ export interface IDCTxnRow {
191
+ id: string;
192
+ created_at: string;
193
+ seq: number;
194
+ created: string;
195
+ last4: string;
196
+ response: any;
197
+ transaction_id: string;
198
+ contrapart: string;
199
+ reference: string;
200
+ external_reference: any;
201
+ extras: IDCTxnRowExtras;
202
+ name: string;
203
+ debit: number;
204
+ credit: number;
205
+ amount: number;
206
+ }
207
+ export interface IDCTxnHeader {
208
+ name: string;
209
+ type: string;
210
+ label?: string;
211
+ money?: string;
212
+ format?: string;
213
+ }
214
+ export interface IDCTxn {
215
+ rows: IDCTxnRow[];
216
+ headers: IDCTxnHeader[];
217
+ }
218
+ export interface IDCMntryCycle {
219
+ date: string;
220
+ late: number;
221
+ paid: number;
222
+ past: string | boolean;
223
+ cycle: string | number;
224
+ amount: number;
225
+ detail: any;
226
+ status: string;
227
+ }
228
+ export interface IDCMntryPymtAllPaidTotal {
229
+ amount: string;
230
+ cycles: string;
231
+ }
232
+ export interface IDCMntryPymtAll {
233
+ late: number;
234
+ total: number;
235
+ va_cp: number;
236
+ actual: number;
237
+ cycles: IDCMntryCycle[];
238
+ vencido: number;
239
+ paid_total: IDCMntryPymtAllPaidTotal;
240
+ total_amount: number;
241
+ }
242
+ export interface IDCMntryPymtDue {
243
+ total: number;
244
+ cycles: IDCMntryCycle[];
245
+ new_cycle: IDCMntryCycle;
246
+ old_cycle: IDCMntryCycle;
247
+ total_amount: number;
248
+ }
249
+ export interface IDCMntryPymtOpen extends IDCMntryPymtDue {
250
+ }
251
+ export interface IDCMntryPymtPaid {
252
+ total: number;
253
+ cycles: IDCMntryCycle[] | any[];
254
+ new_cycle: any;
255
+ old_cycle: any;
256
+ total_amount: number;
257
+ }
258
+ export interface IDCMntryPymtDueTax {
259
+ expected: number;
260
+ }
261
+ export interface IDCMntryPymtPymt {
262
+ paid: number;
263
+ expected: number;
264
+ }
265
+ export interface IDCMntryPymtCal {
266
+ due: IDCMntryPymtDue;
267
+ date: string;
268
+ past: string;
269
+ cycle: number;
270
+ balance: number;
271
+ due_tax: IDCMntryPymtDueTax;
272
+ payment: IDCMntryPymtPymt;
273
+ interest: IDCMntryPymtPymt;
274
+ principal: IDCMntryPymtPymt;
275
+ payment_tax: IDCMntryPymtPymt;
276
+ interest_tax: IDCMntryPymtPymt;
277
+ final_balance: number;
278
+ payment_total: IDCMntryPymtPymt;
279
+ principal_tax: IDCMntryPymtPymt;
280
+ }
281
+ export interface IDCMntryPymt {
282
+ all: IDCMntryPymtAll;
283
+ due: IDCMntryPymtDue;
284
+ open: IDCMntryPymtOpen;
285
+ paid: IDCMntryPymtPaid;
286
+ payment_calendar: IDCMntryPymtCal[];
287
+ }
288
+ export interface IDCClient {
289
+ id: number;
290
+ company: number;
291
+ status: string;
292
+ external_id: string;
293
+ pii: IDCDataPii;
294
+ client_type: number;
295
+ created_at: string;
296
+ pd: number;
297
+ username: string;
298
+ group: number;
299
+ }
300
+ export interface IDCMsg {
301
+ code: number;
302
+ total: number;
303
+ data: IDCClient[] | IDCAccount[] | IDCTxn[] | IDCTxn | IDCMntryPymt | IDCCredit[] | IDCTransaction[];
304
+ transaction?: string;
305
+ }
306
+ export interface IDynamiCore {
307
+ status: string;
308
+ message: IDCMsg;
309
+ }
310
+ /**
311
+ * Interfaces for request (base)
312
+ * */
313
+ export interface IDCClientObjFilter {
314
+ name: string;
315
+ filter: string[] | number[];
316
+ type: string;
317
+ sort: string;
318
+ }
319
+ export interface IDCClientQuery {
320
+ filters: IDCClientObjFilter[];
321
+ }
322
+ export interface IDCClientPiiFilter {
323
+ limit: number;
324
+ page: number;
325
+ query: IDCClientQuery;
326
+ }
327
+ /**
328
+ * DynamiCore Reference Interface
329
+ * */
330
+ export interface IDCRefCustInfo {
331
+ name: string;
332
+ email: string;
333
+ phone: string | number;
334
+ }
335
+ export interface IDCOxxoRefItem {
336
+ name: string;
337
+ unit_price: number;
338
+ quantity: number;
339
+ }
340
+ export interface IDCOxxoRefPymtMth {
341
+ type: string;
342
+ }
343
+ export interface IDCOxxoRef {
344
+ account: number;
345
+ operation: number;
346
+ customer_info: IDCRefCustInfo;
347
+ items: IDCOxxoRefItem;
348
+ payment_method: IDCOxxoRefPymtMth;
349
+ }
350
+ /**
351
+ * DynamiCore Reference
352
+ * */
353
+ export interface IDCRefCustInfo {
354
+ name: string;
355
+ email: string;
356
+ phone: string | number;
357
+ }
358
+ export interface IDCRefItems {
359
+ name: string;
360
+ unit_price: number;
361
+ quantity: number;
362
+ }
363
+ export interface IDCRefPymtMethod {
364
+ type: string;
365
+ }
366
+ export interface IDCNewReference {
367
+ id: string;
368
+ data: IDCReference;
369
+ date?: number;
370
+ }
371
+ export interface IDCReference {
372
+ account: number;
373
+ operation: number;
374
+ customer_info: IDCRefCustInfo;
375
+ items: IDCRefItems;
376
+ payment_method: IDCRefPymtMethod;
377
+ }
378
+ /**
379
+ * Interfaces to Credits
380
+ * */
381
+ export interface IDCCreditProperties {
382
+ start_date: string;
383
+ principal_disbursed: number;
384
+ expected_disbursed: number;
385
+ amount_commission_opening: number;
386
+ }
387
+ export interface IDCCreditConfig {
388
+ contract: string;
389
+ credit_type: string;
390
+ interest_rate: number;
391
+ installments: number;
392
+ periodicity: string;
393
+ interest_base: string;
394
+ commission_opening: number;
395
+ financed_amount: number;
396
+ interest_arrears: number;
397
+ }
398
+ export interface IDCCredit {
399
+ id: number;
400
+ group: number;
401
+ company: number;
402
+ client: number;
403
+ created_at: string;
404
+ currency: string;
405
+ status: string;
406
+ properties: IDCCreditProperties;
407
+ product: number;
408
+ enabled: string;
409
+ config: IDCCreditConfig;
410
+ amount: number;
411
+ type: string;
412
+ identifier: null | string;
413
+ start_at: null | string;
414
+ }
415
+ /**
416
+ * Payments
417
+ * */
418
+ export interface IDCPayment {
419
+ operation: number;
420
+ account: string;
421
+ date: string;
422
+ amount: number;
423
+ external_id?: string;
424
+ dst_account: string;
425
+ extras?: object;
426
+ reference: string;
427
+ }
428
+ export declare const cIDCPayment: IDCPayment;
429
+ /**
430
+ * Transactions
431
+ * */
432
+ export interface IDCTransaction {
433
+ data: [number, {
434
+ transaction: string;
435
+ }];
436
+ }
437
+ export declare const cIDCCharge: IDCCharge;
438
+ export declare const cIDCGeneratedReference: IDCGeneratedReference;
439
+ /**
440
+ * Common Factory Dynamic
441
+ * */
442
+ export declare class FactoryDynamiCore {
443
+ static CreateReferenceBody(client: oClient, contract: oContract, dateTime?: number): IDCNewReference | null;
444
+ static CreateEmptyCustomer(): partialIDCData;
445
+ static CreateCustomerFromOClient(client: oClient, contract: oContract): partialIDCData;
446
+ static CreateDynamicCredit(client: oClient, contract: oContract, clientDynamic: IDCClient): Partial<IDCCredit> | null;
447
+ static CreatePayment(contract: oContract, clientDynamic: IDCAccount): IDCPayment;
448
+ static getNextDateTime(): string;
449
+ static getIsoDate(): string;
450
+ static FormPayment(contract: oContract, account: IDCAccount): {
451
+ amount: UntypedFormControl;
452
+ };
453
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ravcredit-lib",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.0.0",
6
6
  "@angular/core": "^20.0.0"
package/public-api.d.ts CHANGED
@@ -1,3 +1,17 @@
1
1
  export * from './lib/ravcredit-lib.service';
2
2
  export * from './lib/ravcredit-lib.component';
3
- export * from './lib/oClient';
3
+ export * from './lib/v1/objects/oAddress';
4
+ export * from './lib/v1/objects/oBusiness';
5
+ export * from './lib/v1/objects/oClient';
6
+ export * from './lib/v1/objects/oConekta';
7
+ export * from './lib/v1/objects/oContract';
8
+ export * from './lib/v1/objects/oContractAll';
9
+ export * from './lib/v1/objects/oCustomer';
10
+ export * from './lib/v1/objects/oDevice';
11
+ export * from './lib/v1/objects/oFinancial';
12
+ export * from './lib/v1/objects/oGlobal';
13
+ export * from './lib/v1/objects/oLogIn';
14
+ export * from './lib/v1/objects/oNewPayment';
15
+ export * from './lib/v1/objects/oNotification';
16
+ export * from './lib/v1/objects/oPassport';
17
+ export * from './lib/v1/objects/oUser';
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib0NsaWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3JhdmNyZWRpdC1saWIvc3JjL2xpYi9vQ2xpZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVud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