ravcredit-api-dtos 0.0.1

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 (145) hide show
  1. package/dist/index.d.ts +70 -0
  2. package/dist/index.js +71 -0
  3. package/dist/lib/v1/DTO/AddressDto.d.ts +9 -0
  4. package/dist/lib/v1/DTO/AddressDto.js +39 -0
  5. package/dist/lib/v1/DTO/AmortizationDto.d.ts +21 -0
  6. package/dist/lib/v1/DTO/AmortizationDto.js +82 -0
  7. package/dist/lib/v1/DTO/AssetDto.d.ts +43 -0
  8. package/dist/lib/v1/DTO/AssetDto.js +146 -0
  9. package/dist/lib/v1/DTO/AuthAdminDto.d.ts +7 -0
  10. package/dist/lib/v1/DTO/AuthAdminDto.js +29 -0
  11. package/dist/lib/v1/DTO/AuthClientDto.d.ts +4 -0
  12. package/dist/lib/v1/DTO/AuthClientDto.js +22 -0
  13. package/dist/lib/v1/DTO/BusinessConfigDto.d.ts +15 -0
  14. package/dist/lib/v1/DTO/BusinessConfigDto.js +71 -0
  15. package/dist/lib/v1/DTO/BusinessConfigUpdateDto.d.ts +5 -0
  16. package/dist/lib/v1/DTO/BusinessConfigUpdateDto.js +4 -0
  17. package/dist/lib/v1/DTO/BusinessDeadlineDto.d.ts +4 -0
  18. package/dist/lib/v1/DTO/BusinessDeadlineDto.js +17 -0
  19. package/dist/lib/v1/DTO/BusinessInfoDto.d.ts +11 -0
  20. package/dist/lib/v1/DTO/BusinessInfoDto.js +47 -0
  21. package/dist/lib/v1/DTO/BusinessInfoUpdateDto.d.ts +5 -0
  22. package/dist/lib/v1/DTO/BusinessInfoUpdateDto.js +4 -0
  23. package/dist/lib/v1/DTO/CatalogDto.d.ts +6 -0
  24. package/dist/lib/v1/DTO/CatalogDto.js +25 -0
  25. package/dist/lib/v1/DTO/ClientDto.d.ts +77 -0
  26. package/dist/lib/v1/DTO/ClientDto.js +286 -0
  27. package/dist/lib/v1/DTO/CompanyDto.d.ts +8 -0
  28. package/dist/lib/v1/DTO/CompanyDto.js +32 -0
  29. package/dist/lib/v1/DTO/ConektaChannelDto.d.ts +6 -0
  30. package/dist/lib/v1/DTO/ConektaChannelDto.js +25 -0
  31. package/dist/lib/v1/DTO/ConektaChargeDataDto.d.ts +24 -0
  32. package/dist/lib/v1/DTO/ConektaChargeDataDto.js +98 -0
  33. package/dist/lib/v1/DTO/ConektaChargesDto.d.ts +7 -0
  34. package/dist/lib/v1/DTO/ConektaChargesDto.js +29 -0
  35. package/dist/lib/v1/DTO/ConektaCheckoutDto.d.ts +24 -0
  36. package/dist/lib/v1/DTO/ConektaCheckoutDto.js +101 -0
  37. package/dist/lib/v1/DTO/ConektaCustomerInfoDto.d.ts +9 -0
  38. package/dist/lib/v1/DTO/ConektaCustomerInfoDto.js +39 -0
  39. package/dist/lib/v1/DTO/ConektaDto.d.ts +95 -0
  40. package/dist/lib/v1/DTO/ConektaDto.js +339 -0
  41. package/dist/lib/v1/DTO/ConektaLineItemDto.d.ts +15 -0
  42. package/dist/lib/v1/DTO/ConektaLineItemDto.js +67 -0
  43. package/dist/lib/v1/DTO/ConektaLineItemsDto.d.ts +7 -0
  44. package/dist/lib/v1/DTO/ConektaLineItemsDto.js +29 -0
  45. package/dist/lib/v1/DTO/ConektaNewOrderDto.d.ts +7 -0
  46. package/dist/lib/v1/DTO/ConektaNewOrderDto.js +27 -0
  47. package/dist/lib/v1/DTO/ConektaOrdCreateDto.d.ts +9 -0
  48. package/dist/lib/v1/DTO/ConektaOrdCreateDto.js +34 -0
  49. package/dist/lib/v1/DTO/ConektaOrderDto.d.ts +29 -0
  50. package/dist/lib/v1/DTO/ConektaOrderDto.js +113 -0
  51. package/dist/lib/v1/DTO/ConektaOrderSpeiDto.d.ts +7 -0
  52. package/dist/lib/v1/DTO/ConektaOrderSpeiDto.js +27 -0
  53. package/dist/lib/v1/DTO/ConektaOrdersResponseDto.d.ts +8 -0
  54. package/dist/lib/v1/DTO/ConektaOrdersResponseDto.js +35 -0
  55. package/dist/lib/v1/DTO/ConektaPaymentDto.d.ts +8 -0
  56. package/dist/lib/v1/DTO/ConektaPaymentDto.js +29 -0
  57. package/dist/lib/v1/DTO/ConektaPaymentMethodDto.d.ts +13 -0
  58. package/dist/lib/v1/DTO/ConektaPaymentMethodDto.js +53 -0
  59. package/dist/lib/v1/DTO/ConektaPaymentSourcesDto.d.ts +4 -0
  60. package/dist/lib/v1/DTO/ConektaPaymentSourcesDto.js +18 -0
  61. package/dist/lib/v1/DTO/ConektaUpdateDto.d.ts +8 -0
  62. package/dist/lib/v1/DTO/ConektaUpdateDto.js +26 -0
  63. package/dist/lib/v1/DTO/ContractDto.d.ts +39 -0
  64. package/dist/lib/v1/DTO/ContractDto.js +139 -0
  65. package/dist/lib/v1/DTO/ContractUpdateDto.d.ts +5 -0
  66. package/dist/lib/v1/DTO/ContractUpdateDto.js +4 -0
  67. package/dist/lib/v1/DTO/CustomerDto.d.ts +17 -0
  68. package/dist/lib/v1/DTO/CustomerDto.js +66 -0
  69. package/dist/lib/v1/DTO/DeviceDto.d.ts +5 -0
  70. package/dist/lib/v1/DTO/DeviceDto.js +22 -0
  71. package/dist/lib/v1/DTO/DynamiCoreCreditDto.d.ts +47 -0
  72. package/dist/lib/v1/DTO/DynamiCoreCreditDto.js +170 -0
  73. package/dist/lib/v1/DTO/DynamiCoreDto.d.ts +473 -0
  74. package/dist/lib/v1/DTO/DynamiCoreDto.js +1603 -0
  75. package/dist/lib/v1/DTO/DynamicUpdateReferenceDto.d.ts +5 -0
  76. package/dist/lib/v1/DTO/DynamicUpdateReferenceDto.js +4 -0
  77. package/dist/lib/v1/DTO/FinancialDto.d.ts +30 -0
  78. package/dist/lib/v1/DTO/FinancialDto.js +185 -0
  79. package/dist/lib/v1/DTO/NotificationDto.d.ts +13 -0
  80. package/dist/lib/v1/DTO/NotificationDto.js +46 -0
  81. package/dist/lib/v1/DTO/NotificationUpdateDto.d.ts +5 -0
  82. package/dist/lib/v1/DTO/NotificationUpdateDto.js +4 -0
  83. package/dist/lib/v1/DTO/OrdCreatLineItemDto.d.ts +7 -0
  84. package/dist/lib/v1/DTO/OrdCreatLineItemDto.js +28 -0
  85. package/dist/lib/v1/DTO/OrdCreateAntifraudInfoDto.d.ts +3 -0
  86. package/dist/lib/v1/DTO/OrdCreateAntifraudInfoDto.js +13 -0
  87. package/dist/lib/v1/DTO/OrdCreateChargeDto.d.ts +5 -0
  88. package/dist/lib/v1/DTO/OrdCreateChargeDto.js +20 -0
  89. package/dist/lib/v1/DTO/OrdCreateCusInfoDto.d.ts +6 -0
  90. package/dist/lib/v1/DTO/OrdCreateCusInfoDto.js +29 -0
  91. package/dist/lib/v1/DTO/OrdCreatePymtMetDto.d.ts +4 -0
  92. package/dist/lib/v1/DTO/OrdCreatePymtMetDto.js +17 -0
  93. package/dist/lib/v1/DTO/PartialClientDto.d.ts +5 -0
  94. package/dist/lib/v1/DTO/PartialClientDto.js +4 -0
  95. package/dist/lib/v1/DTO/PassportAdditionalDto.d.ts +5 -0
  96. package/dist/lib/v1/DTO/PassportAdditionalDto.js +24 -0
  97. package/dist/lib/v1/DTO/PassportCreateDto.d.ts +7 -0
  98. package/dist/lib/v1/DTO/PassportCreateDto.js +27 -0
  99. package/dist/lib/v1/DTO/PassportDto.d.ts +30 -0
  100. package/dist/lib/v1/DTO/PassportDto.js +145 -0
  101. package/dist/lib/v1/DTO/PassportGlobalDto.d.ts +7 -0
  102. package/dist/lib/v1/DTO/PassportGlobalDto.js +27 -0
  103. package/dist/lib/v1/DTO/PassportReferenceDataDto.d.ts +8 -0
  104. package/dist/lib/v1/DTO/PassportReferenceDataDto.js +33 -0
  105. package/dist/lib/v1/DTO/PayLinkResDto.d.ts +61 -0
  106. package/dist/lib/v1/DTO/PayLinkResDto.js +174 -0
  107. package/dist/lib/v1/DTO/PayOrderResAlternaDto.d.ts +175 -0
  108. package/dist/lib/v1/DTO/PayOrderResAlternaDto.js +399 -0
  109. package/dist/lib/v1/DTO/PayOrderResOxxoDto.d.ts +46 -0
  110. package/dist/lib/v1/DTO/PayOrderResOxxoDto.js +290 -0
  111. package/dist/lib/v1/DTO/PaymentLinkDto.d.ts +37 -0
  112. package/dist/lib/v1/DTO/PaymentLinkDto.js +170 -0
  113. package/dist/lib/v1/DTO/ScheduleDto.d.ts +6 -0
  114. package/dist/lib/v1/DTO/ScheduleDto.js +25 -0
  115. package/dist/lib/v1/DTO/ScoreDto.d.ts +29 -0
  116. package/dist/lib/v1/DTO/ScoreDto.js +97 -0
  117. package/dist/lib/v1/DTO/UserCreateDto.d.ts +10 -0
  118. package/dist/lib/v1/DTO/UserCreateDto.js +52 -0
  119. package/dist/lib/v1/DTO/UserDto.d.ts +14 -0
  120. package/dist/lib/v1/DTO/UserDto.js +53 -0
  121. package/dist/lib/v1/DTO/UserUpdateDto.d.ts +5 -0
  122. package/dist/lib/v1/DTO/UserUpdateDto.js +4 -0
  123. package/dist/lib/v1/DTO/WeekScheduleDto.d.ts +13 -0
  124. package/dist/lib/v1/DTO/WeekScheduleDto.js +65 -0
  125. package/dist/lib/v1/core/Crypt.d.ts +4 -0
  126. package/dist/lib/v1/core/Crypt.js +9 -0
  127. package/dist/lib/v1/core/Validators.d.ts +10 -0
  128. package/dist/lib/v1/core/Validators.js +31 -0
  129. package/dist/lib/v1/util/Constants.d.ts +89 -0
  130. package/dist/lib/v1/util/Constants.js +388 -0
  131. package/dist/lib/v1/util/Cors.d.ts +2 -0
  132. package/dist/lib/v1/util/Cors.js +5 -0
  133. package/dist/lib/v1/util/ExternalPaths.d.ts +28 -0
  134. package/dist/lib/v1/util/ExternalPaths.js +28 -0
  135. package/dist/lib/v1/util/FactoryClient.d.ts +11 -0
  136. package/dist/lib/v1/util/FactoryClient.js +108 -0
  137. package/dist/lib/v1/util/FactoryUser.d.ts +6 -0
  138. package/dist/lib/v1/util/FactoryUser.js +43 -0
  139. package/dist/lib/v1/util/FactoryUtil.d.ts +3 -0
  140. package/dist/lib/v1/util/FactoryUtil.js +6 -0
  141. package/dist/lib/v1/util/FirestorePaths.d.ts +13 -0
  142. package/dist/lib/v1/util/FirestorePaths.js +13 -0
  143. package/dist/lib/v1/util/Http.d.ts +0 -0
  144. package/dist/lib/v1/util/Http.js +1 -0
  145. package/package.json +37 -0
@@ -0,0 +1,388 @@
1
+ import { HttpStatus } from '@nestjs/common';
2
+ export var eCurrencies;
3
+ (function (eCurrencies) {
4
+ eCurrencies["MXN"] = "MXN";
5
+ })(eCurrencies || (eCurrencies = {}));
6
+ export var ePaymentMethods;
7
+ (function (ePaymentMethods) {
8
+ ePaymentMethods["cash"] = "cash";
9
+ ePaymentMethods["card"] = "card";
10
+ ePaymentMethods["bank_transfer"] = "bank_transfer";
11
+ })(ePaymentMethods || (ePaymentMethods = {}));
12
+ export const PaymentOptions = [
13
+ ePaymentMethods.cash,
14
+ ePaymentMethods.card,
15
+ ePaymentMethods.bank_transfer,
16
+ ];
17
+ export const cPaymentLink = 'PaymentLink';
18
+ export const cCustomerInfoDto = {
19
+ phone: '',
20
+ customer_id: ""
21
+ };
22
+ export const cAlternaChargesDataMethodsDto = {
23
+ service_name: "",
24
+ barcode_url: "",
25
+ object: "",
26
+ type: "",
27
+ expires_at: 0,
28
+ store_names: [],
29
+ store_name: "",
30
+ reference: ""
31
+ };
32
+ export const cMetadataDto = {
33
+ datos_extra: ""
34
+ };
35
+ export const cAlternaLineItemsDto = {
36
+ object: "",
37
+ has_more: false,
38
+ total: 0,
39
+ data: []
40
+ };
41
+ export const cChargesDto = {
42
+ object: "",
43
+ has_more: false,
44
+ total: 0,
45
+ data: []
46
+ };
47
+ export const cPaymentMethodsDto = {
48
+ type: "",
49
+ expires_at: 0
50
+ };
51
+ export const cOrderTemplateDto = {
52
+ line_items: [],
53
+ currency: "",
54
+ customer_info: cCustomerInfoDto
55
+ };
56
+ export const cIDCTxnRowExtrasDto = {
57
+ reference: "",
58
+ transaction: ""
59
+ };
60
+ export const cIDCAccountPropsDto = {
61
+ clabe: "",
62
+ pagaqui: "",
63
+ start_date: "",
64
+ expected_disbursed: 0,
65
+ reference_pagaaqui: "",
66
+ principal_disbursed: 0,
67
+ amount_commission_opening: 0
68
+ };
69
+ export const cIDCAccountConfigDto = {
70
+ contract: "",
71
+ credit_type: "",
72
+ periodicity: "",
73
+ installments: 0,
74
+ interest_base: "",
75
+ interest_rate: 0,
76
+ interest_arrears: 0,
77
+ commission_opening: 0
78
+ };
79
+ export const cIDCMntryPymtAllPaidTotalDto = {
80
+ amount: "",
81
+ cycles: ""
82
+ };
83
+ export const cIDCMntryCycleDto = {
84
+ date: "",
85
+ late: 0,
86
+ paid: 0,
87
+ past: "",
88
+ cycle: "",
89
+ amount: 0,
90
+ detail: {},
91
+ status: ""
92
+ };
93
+ export const cIDCMntryPymtDueDto = {
94
+ total: 0,
95
+ cycles: [],
96
+ new_cycle: cIDCMntryCycleDto,
97
+ old_cycle: cIDCMntryCycleDto,
98
+ total_amount: 0
99
+ };
100
+ export const cIDCMntryPymtDueTaxDto = {
101
+ expected: 0
102
+ };
103
+ export const cIDCMntryPymtPymtDto = {
104
+ paid: 0,
105
+ expected: 0
106
+ };
107
+ export const cIDCMntryPymtAllDto = {
108
+ late: 0,
109
+ total: 0,
110
+ va_cp: 0,
111
+ actual: 0,
112
+ cycles: [],
113
+ vencido: 0,
114
+ paid_total: cIDCMntryPymtAllPaidTotalDto,
115
+ total_amount: 0
116
+ };
117
+ export const cIDCMntryPymtOpenDto = {
118
+ total: 0,
119
+ cycles: [],
120
+ new_cycle: cIDCMntryCycleDto,
121
+ old_cycle: cIDCMntryCycleDto,
122
+ total_amount: 0
123
+ };
124
+ export const cIDCMntryPymtPaidDto = {
125
+ total: 0,
126
+ cycles: [],
127
+ new_cycle: cIDCMntryCycleDto,
128
+ old_cycle: cIDCMntryCycleDto,
129
+ total_amount: 0
130
+ };
131
+ export const cIDCDataPiiDto = {
132
+ icc: "",
133
+ rfc: "",
134
+ city: "",
135
+ curp: "",
136
+ imei: "",
137
+ name: "",
138
+ term: "",
139
+ brand: "",
140
+ email: "",
141
+ model: "",
142
+ phone: "",
143
+ score: {},
144
+ state: "",
145
+ amount: "",
146
+ colony: "",
147
+ estado: {},
148
+ gender: "",
149
+ period: "",
150
+ street: "",
151
+ num_ext: "",
152
+ num_int: "",
153
+ zipcode: "",
154
+ financed: "",
155
+ house_is: "",
156
+ lastname: "",
157
+ type_job: "",
158
+ birthdate: "",
159
+ birthstate: "",
160
+ dicio_data: "",
161
+ dicio_step: {},
162
+ secondname: "",
163
+ nationality: "",
164
+ seller_name: "",
165
+ down_payment: "",
166
+ municipality: "",
167
+ score_no_hit: "",
168
+ study_degree: "",
169
+ branch_office: "",
170
+ identity_data: {},
171
+ interest_rate: "",
172
+ marital_status: "",
173
+ monthly_income: "",
174
+ motherlastname: "",
175
+ score_rcc_fico: "",
176
+ identity_selfie: {},
177
+ amount_by_period: "",
178
+ identity_id_back: {},
179
+ identity_id_front: {},
180
+ economic_dependents: "",
181
+ identity_id_request: {},
182
+ identity_verification: {},
183
+ is_address_ine_currently_live: ""
184
+ };
185
+ export const cIDCMsgDto = {
186
+ code: 0,
187
+ total: 0,
188
+ data: []
189
+ };
190
+ export const cIDCClientQueryDto = {
191
+ filters: []
192
+ };
193
+ export const cIDCRefCustInfoDto = {
194
+ name: "",
195
+ email: "",
196
+ phone: ""
197
+ };
198
+ export const cIDCOxxoRefItemDto = {
199
+ name: "",
200
+ unit_price: 0,
201
+ quantity: 0
202
+ };
203
+ export const cIDCOxxoRefPymtMthDto = {
204
+ type: ""
205
+ };
206
+ export const cIDCRefItemsDto = {
207
+ name: "",
208
+ unit_price: 0,
209
+ quantity: 0
210
+ };
211
+ export const cIDCRefPymtMethodDto = {
212
+ type: ""
213
+ };
214
+ export const cAddressDto = {
215
+ street: "",
216
+ city: "",
217
+ neighbor: "",
218
+ zip: "",
219
+ ext: "",
220
+ int: "",
221
+ state: ""
222
+ };
223
+ export const cDeviceDto = {
224
+ device: "",
225
+ id: "",
226
+ IMEI: ""
227
+ };
228
+ export const cBusinessDeadlineDto = {
229
+ weeks: 0,
230
+ interest: 0
231
+ };
232
+ export const cFinancialDto = {
233
+ deadlines: cBusinessDeadlineDto,
234
+ financed: 0,
235
+ initDate: 0,
236
+ initial: 0,
237
+ provider: "",
238
+ total: 0,
239
+ pendingOf: [],
240
+ weeklyPayment: 0,
241
+ clabe: ""
242
+ };
243
+ export const PassportProviderPassport = {
244
+ reference: '73407124368',
245
+ centerId: 'passport',
246
+ };
247
+ export const PassportProviderConekta = {
248
+ reference: '93003831529864',
249
+ centerId: 'conekta',
250
+ };
251
+ export const PassportProviderEnefevo = {
252
+ reference: '10003016999899152802369',
253
+ centerId: 'enefevo',
254
+ };
255
+ export const PassportProviderPespay = {
256
+ reference: '10003016999899167453',
257
+ centerId: 'pespay',
258
+ };
259
+ export const cPassportAdditionalDto = {
260
+ client: "",
261
+ clientID: "",
262
+ credit: ""
263
+ };
264
+ export const cPassportReferenceDataDto = {
265
+ name: "",
266
+ email: "",
267
+ amount: 0,
268
+ expirationDate: "",
269
+ additional: cPassportAdditionalDto
270
+ };
271
+ export const cPassportReferenceResDto = {
272
+ type: "",
273
+ data: cPassportReferenceDataDto,
274
+ message: "",
275
+ references: []
276
+ };
277
+ export const cPassportContract = {
278
+ id: "",
279
+ client: ""
280
+ };
281
+ export const cOxxoLineItemsOrderDataDto = {
282
+ name: "",
283
+ unit_price: 0,
284
+ quantity: 0,
285
+ object: "",
286
+ id: "",
287
+ parent_id: "",
288
+ metadata: {},
289
+ antifraud_info: {}
290
+ };
291
+ export const cOxxoLineItemsOrderDto = {
292
+ object: "",
293
+ has_more: false,
294
+ total: 0,
295
+ data: cOxxoLineItemsOrderDataDto
296
+ };
297
+ export var eConektaRes;
298
+ (function (eConektaRes) {
299
+ eConektaRes["CUSTOMER_CREATED"] = "customer.created";
300
+ eConektaRes["ORDER_PENDING_PAYMENT"] = "order.pending_payment";
301
+ eConektaRes["ORDER_CREATED"] = "order.created";
302
+ eConektaRes["CHARGE_CREATED"] = "charge.created";
303
+ eConektaRes["ORDER_PAID"] = "order.paid";
304
+ eConektaRes["CHARGE_PAID"] = "charge.paid";
305
+ eConektaRes["REVERSE"] = "inbound_payment.reverse";
306
+ eConektaRes["PAYMENT_ATTEMPT"] = "inbound_payment.payment_attempt";
307
+ eConektaRes["LOOK_UP"] = "inbound_payment.lookup";
308
+ })(eConektaRes || (eConektaRes = {}));
309
+ export const cConektaResPrevAttrDto = {
310
+ status: '',
311
+ };
312
+ export const cConektaResObjChargePaidDto = {
313
+ id: '',
314
+ livemode: false,
315
+ created_at: 0,
316
+ currency: '',
317
+ payment_method: {},
318
+ object: '',
319
+ description: '',
320
+ status: '',
321
+ amount: 0,
322
+ paid_at: 0,
323
+ fee: 0,
324
+ customer_id: '',
325
+ order_id: '',
326
+ };
327
+ export const cConektaResDataDto = {
328
+ object: cConektaResObjChargePaidDto,
329
+ previous_attributes: cConektaResPrevAttrDto,
330
+ };
331
+ export const cConektaRes = {
332
+ data: cConektaResDataDto,
333
+ livemode: false,
334
+ webhook_status: '',
335
+ webhook_logs: [],
336
+ id: '',
337
+ object: '',
338
+ type: eConektaRes.PAYMENT_ATTEMPT,
339
+ created_at: 0,
340
+ };
341
+ export const cOxxoRecurrentSourcesDto = {
342
+ object: "",
343
+ has_more: false,
344
+ total: 0,
345
+ data: []
346
+ };
347
+ export const cNotification = {
348
+ token: '',
349
+ notification: {
350
+ title: '',
351
+ body: '',
352
+ },
353
+ data: {
354
+ route: '',
355
+ },
356
+ };
357
+ export const cNotificationContentDto = {
358
+ title: "",
359
+ body: ""
360
+ };
361
+ export const cNotificationDataDto = {
362
+ route: ""
363
+ };
364
+ export const cDayScheduleDTO = {
365
+ open: "",
366
+ close: ""
367
+ };
368
+ export const cWeekScheduleDTO = {
369
+ monday: cDayScheduleDTO,
370
+ tuesday: cDayScheduleDTO,
371
+ wednesday: cDayScheduleDTO,
372
+ thursday: cDayScheduleDTO,
373
+ friday: cDayScheduleDTO,
374
+ saturday: cDayScheduleDTO,
375
+ sunday: cDayScheduleDTO,
376
+ };
377
+ export const cPaymentDaley = {
378
+ today: 0,
379
+ nextPayment: 0,
380
+ daysDelay: 0,
381
+ late: false,
382
+ };
383
+ export const cResponse = {
384
+ path: '',
385
+ statusCode: HttpStatus.CONTINUE,
386
+ epochTime: 0,
387
+ data: null,
388
+ };
@@ -0,0 +1,2 @@
1
+ import { CorsOptions } from "@nestjs/common/interfaces/external/cors-options.interface";
2
+ export declare const Cors: CorsOptions;
@@ -0,0 +1,5 @@
1
+ export const Cors = {
2
+ origin: true,
3
+ methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
4
+ credentials: false
5
+ };
@@ -0,0 +1,28 @@
1
+ export declare const ExtPaths: {
2
+ globalConekta: string;
3
+ conektaCustomers: string;
4
+ conektaCheckouts: string;
5
+ conektaOrders: string;
6
+ passportUrl: string;
7
+ passportSandBox: string;
8
+ passportReference: string;
9
+ dynamic: string;
10
+ dynamicReference: string;
11
+ };
12
+ export declare const ConektaEndpoints: {
13
+ customers: string;
14
+ orders: string;
15
+ };
16
+ export declare const DynamicEndPoints: {
17
+ private: string;
18
+ clients: string;
19
+ accounts: string;
20
+ movements: string;
21
+ filter: string;
22
+ processor: string;
23
+ };
24
+ export declare const FunctionsPaths: {
25
+ payments: string;
26
+ notifications: string;
27
+ dynamicEvent: string;
28
+ };
@@ -0,0 +1,28 @@
1
+ export const ExtPaths = {
2
+ globalConekta: 'https://api.digitalfemsa.io/',
3
+ conektaCustomers: 'https://api.conekta.io/customers',
4
+ conektaCheckouts: 'https://api.conekta.io/checkouts',
5
+ conektaOrders: 'https://api.conekta.io/orders',
6
+ passportUrl: 'https://api.hub.solucionfaas.com/v1/',
7
+ passportSandBox: 'webhook/sandbox/passport/',
8
+ passportReference: 'payments',
9
+ dynamic: 'https://api.dynamicore.io/',
10
+ dynamicReference: 'https://api.dynamicore.io/marketplace/apps/conekta/order/v2/',
11
+ };
12
+ export const ConektaEndpoints = {
13
+ customers: 'customers',
14
+ orders: 'orders',
15
+ };
16
+ export const DynamicEndPoints = {
17
+ private: 'private/',
18
+ clients: 'clients',
19
+ accounts: 'accounts',
20
+ movements: 'movements',
21
+ filter: 'pii_filter',
22
+ processor: 'processor',
23
+ };
24
+ export const FunctionsPaths = {
25
+ payments: 'https://us-central1-ravcredit-2b079.cloudfunctions.net/PaymentNotification',
26
+ notifications: 'https://customernotification-2imgfxveka-uc.a.run.app',
27
+ dynamicEvent: 'https://us-central1-ravcredit-2b079.cloudfunctions.net/DynamicEventHandler',
28
+ };
@@ -0,0 +1,11 @@
1
+ import { ClientDto } from '../DTO/ClientDto';
2
+ import { PartialClientDto } from '../DTO/PartialClientDto';
3
+ import { eGCActions } from "ravcredit-lib";
4
+ import { IDCClientDto, IDCDataAccountDto } from '../DTO/DynamiCoreDto';
5
+ export declare const cClient: ClientDto;
6
+ export declare class FactoryClient {
7
+ static CreateClientObj(data: ClientDto | PartialClientDto, action: eGCActions): Promise<any>;
8
+ static EncryptPassword(data: any): Promise<any>;
9
+ static checkClientType(object: any): object is PartialClientDto;
10
+ static CreateClientFromDynamicObj(account: IDCDataAccountDto, client: IDCClientDto): ClientDto;
11
+ }
@@ -0,0 +1,108 @@
1
+ import { eClientStatus, eGCActions } from "ravcredit-lib";
2
+ import { Crypter } from "../core/Crypt";
3
+ export const cClient = {
4
+ id: '',
5
+ name: '',
6
+ username: '',
7
+ email: '',
8
+ phone: '',
9
+ curp: '',
10
+ createdAt: 0,
11
+ userReferences: [],
12
+ status: '',
13
+ contract: '',
14
+ password: '',
15
+ lastLogin: 0,
16
+ payments: [],
17
+ reference: '',
18
+ references: [],
19
+ token: '',
20
+ notifications: [],
21
+ contractUrl: '',
22
+ exists: false,
23
+ contract_temporary: '',
24
+ conekta_id: '',
25
+ passport_id: '',
26
+ dynamic_id: '',
27
+ dynamic_account: '',
28
+ };
29
+ export class FactoryClient {
30
+ static async CreateClientObj(data, action) {
31
+ const o = {};
32
+ if (data.id)
33
+ o['id'] = data.id;
34
+ if (data.name)
35
+ o['name'] = data.name;
36
+ if (data.username)
37
+ o['username'] = data.username;
38
+ if (data.email)
39
+ o['email'] = data.email;
40
+ if (data.phone)
41
+ o['phone'] = data.phone;
42
+ if (data.curp)
43
+ o['curp'] = data.curp;
44
+ if (data.contract)
45
+ o['contract'] = data.contract;
46
+ if (data.conekta_id)
47
+ o['conekta_id'] = data.conekta_id;
48
+ if (data.payments)
49
+ o['payments'] = data.payments;
50
+ if (data.reference)
51
+ o['reference'] = data.reference;
52
+ if (data.userReferences)
53
+ o['userReferences'] = data.userReferences;
54
+ if (data.contractUrl)
55
+ o['contractUrl'] = data.contractUrl;
56
+ if (data.status)
57
+ o['status'] = data.status;
58
+ if (data.dynamic_id)
59
+ o['dynamic_id'] = data.dynamic_id;
60
+ if (data.dynamic_account)
61
+ o['dynamic_account'] = data.dynamic_account;
62
+ if (action === eGCActions.LoginTime) {
63
+ // Define Dates
64
+ o['lastLogin'] = new Date().getTime();
65
+ }
66
+ if (action === eGCActions.Create) {
67
+ // Define UUID
68
+ // o["id"] = v4()
69
+ o['createdAt'] = new Date().getTime();
70
+ // Encrypt Password
71
+ if (data['password'])
72
+ o['password'] = await Crypter.encryptPassword(data.password);
73
+ o['status'] = 'active';
74
+ }
75
+ return o;
76
+ }
77
+ static async EncryptPassword(data) {
78
+ const o = {};
79
+ // Encrypt Password
80
+ if (data['password'])
81
+ o['password'] = await Crypter.encryptPassword(data.password);
82
+ return o;
83
+ }
84
+ //Guard Type
85
+ static checkClientType(object) {
86
+ return 'conekta' in object;
87
+ }
88
+ static CreateClientFromDynamicObj(account, client) {
89
+ const createdAt = new Date(client.created_at).getTime();
90
+ const o = {
91
+ id: '',
92
+ name: [client.pii.name, client.pii.lastname, client.pii.motherlastname].join(' '),
93
+ username: String(client.pii.phone),
94
+ password: client.pii.curp,
95
+ email: client.pii.email,
96
+ phone: String(client.pii.phone),
97
+ curp: client.pii.curp,
98
+ userReferences: [],
99
+ createdAt: createdAt,
100
+ status: eClientStatus.ACTIVE,
101
+ };
102
+ if (client.id)
103
+ o.dynamic_id = String(client.id);
104
+ if (account.id)
105
+ o.dynamic_account = String(account.id);
106
+ return o;
107
+ }
108
+ }
@@ -0,0 +1,6 @@
1
+ import { eGCActions } from "ravcredit-lib";
2
+ import { UpdateUserDto, UserDto } from '../DTO/UserDto';
3
+ export declare class FactoryUser {
4
+ static createUserObj(data: UpdateUserDto, action: eGCActions): Promise<any>;
5
+ static UserFromServer(data: UserDto): any;
6
+ }
@@ -0,0 +1,43 @@
1
+ import { v4 } from 'uuid';
2
+ import { eGCActions } from "ravcredit-lib";
3
+ import { Crypter } from "../core/Crypt";
4
+ export class FactoryUser {
5
+ static async createUserObj(data, action) {
6
+ const o = {};
7
+ //Adjust attributes
8
+ if (data['name'])
9
+ o['name'] = data.name;
10
+ if (data['username'])
11
+ o['username'] = data.username;
12
+ if (data['role'])
13
+ o['role'] = data.role;
14
+ if (action === eGCActions.LoginTime) {
15
+ // Define Dates
16
+ o['lastLogin'] = new Date().getTime();
17
+ }
18
+ if (action === eGCActions.Create) {
19
+ // Define UUID
20
+ o['id'] = v4();
21
+ o['createdAt'] = new Date().getTime();
22
+ // Encrypt Password
23
+ if (data['password'])
24
+ o['password'] = await Crypter.encryptPassword(data.password);
25
+ }
26
+ return o;
27
+ }
28
+ static UserFromServer(data) {
29
+ const o = {};
30
+ //Adjust attributes
31
+ if (data.name)
32
+ o['name'] = data.name;
33
+ if (data.username)
34
+ o['username'] = data.username;
35
+ if (data.role)
36
+ o['role'] = data.role;
37
+ if (data.lastLogin)
38
+ o['lastLogin'] = data.lastLogin;
39
+ if (data.createdAt)
40
+ o['createdAt'] = data.createdAt;
41
+ return o;
42
+ }
43
+ }
@@ -0,0 +1,3 @@
1
+ export declare class FactoryUtil {
2
+ static CreateUUID(): Promise<string>;
3
+ }
@@ -0,0 +1,6 @@
1
+ import { v4 } from 'uuid';
2
+ export class FactoryUtil {
3
+ static async CreateUUID() {
4
+ return v4();
5
+ }
6
+ }
@@ -0,0 +1,13 @@
1
+ export declare const FirestorePaths: {
2
+ ContractsCollection: string;
3
+ ClientsCollection: string;
4
+ UsersCollection: string;
5
+ BusinessCollection: string;
6
+ BusinessInfoDoc: string;
7
+ BusinessConfigDoc: string;
8
+ PaymentCollection: string;
9
+ DynamicEventsCollection: string;
10
+ DynamicEventsCollection2: string;
11
+ ReferencesCollection: string;
12
+ NotificationsCollection: string;
13
+ };
@@ -0,0 +1,13 @@
1
+ export const FirestorePaths = {
2
+ ContractsCollection: 'contract',
3
+ ClientsCollection: 'client',
4
+ UsersCollection: 'users',
5
+ BusinessCollection: 'business',
6
+ BusinessInfoDoc: 'info',
7
+ BusinessConfigDoc: 'config',
8
+ PaymentCollection: 'payments',
9
+ DynamicEventsCollection: 'dynamicEvents',
10
+ DynamicEventsCollection2: 'dynamicEvents2',
11
+ ReferencesCollection: 'references',
12
+ NotificationsCollection: 'notifications',
13
+ };
File without changes
@@ -0,0 +1 @@
1
+ "use strict";