@fiado/type-kit 3.196.0 → 3.199.0
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/bin/creditEngine/dtos/AnticipatedPaymentQuote.d.ts +47 -0
- package/bin/creditEngine/dtos/AnticipatedPaymentQuote.js +22 -0
- package/bin/creditEngine/index.d.ts +1 -0
- package/bin/creditEngine/index.js +1 -0
- package/bin/index.d.ts +2 -0
- package/bin/index.js +8 -1
- package/bin/loanCredit/dtos/ActivationChecklist.d.ts +11 -0
- package/bin/loanCredit/dtos/ActivationChecklist.js +42 -0
- package/bin/loanCredit/dtos/LoanBeneficiary.d.ts +8 -0
- package/bin/{platformRbac/dtos/ResendOtpRequest.js → loanCredit/dtos/LoanBeneficiary.js} +14 -12
- package/bin/loanCredit/dtos/LoanBorrower.d.ts +22 -0
- package/bin/loanCredit/dtos/LoanBorrower.js +82 -0
- package/bin/loanCredit/dtos/LoanContract.d.ts +27 -0
- package/bin/loanCredit/dtos/LoanContract.js +91 -0
- package/bin/loanCredit/dtos/LoanCredit.d.ts +54 -0
- package/bin/loanCredit/dtos/LoanCredit.js +187 -0
- package/bin/loanCredit/dtos/LoanInstallment.d.ts +27 -0
- package/bin/loanCredit/dtos/LoanInstallment.js +97 -0
- package/bin/loanCredit/dtos/requests/ActivationCheckRequest.d.ts +21 -0
- package/bin/loanCredit/dtos/requests/ActivationCheckRequest.js +52 -0
- package/bin/loanCredit/dtos/requests/ChangeLoanCreditStatusRequest.d.ts +12 -0
- package/bin/{platformRbac/dtos/ResendSelfRegisterOtpRequest.js → loanCredit/dtos/requests/ChangeLoanCreditStatusRequest.js} +13 -13
- package/bin/loanCredit/dtos/requests/OriginateLoanCreditRequest.d.ts +25 -0
- package/bin/loanCredit/dtos/requests/OriginateLoanCreditRequest.js +85 -0
- package/bin/loanCredit/dtos/requests/QuoteLoanCreditRequest.d.ts +11 -0
- package/bin/loanCredit/dtos/requests/QuoteLoanCreditRequest.js +39 -0
- package/bin/loanCredit/dtos/requests/SignLoanCreditRequest.d.ts +17 -0
- package/bin/loanCredit/dtos/requests/SignLoanCreditRequest.js +37 -0
- package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.d.ts +11 -0
- package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.js +46 -0
- package/bin/loanCredit/dtos/requests/UpsertLoanBorrowerRequest.d.ts +14 -0
- package/bin/loanCredit/dtos/requests/UpsertLoanBorrowerRequest.js +57 -0
- package/bin/loanCredit/dtos/responses/ActivationCheckResponse.d.ts +10 -0
- package/bin/loanCredit/dtos/responses/ActivationCheckResponse.js +2 -0
- package/bin/loanCredit/dtos/responses/LoanBorrowerResponse.d.ts +21 -0
- package/bin/loanCredit/dtos/responses/LoanBorrowerResponse.js +2 -0
- package/bin/loanCredit/dtos/responses/LoanContractResponse.d.ts +16 -0
- package/bin/loanCredit/dtos/responses/LoanContractResponse.js +2 -0
- package/bin/loanCredit/dtos/responses/LoanCreditResponse.d.ts +38 -0
- package/bin/loanCredit/dtos/responses/LoanCreditResponse.js +2 -0
- package/bin/loanCredit/dtos/responses/LoanInstallmentResponse.d.ts +17 -0
- package/bin/loanCredit/dtos/responses/LoanInstallmentResponse.js +2 -0
- package/bin/loanCredit/dtos/responses/OriginateLoanCreditResponse.d.ts +13 -0
- package/bin/loanCredit/dtos/responses/OriginateLoanCreditResponse.js +2 -0
- package/bin/loanCredit/dtos/responses/QuoteLoanCreditResponse.d.ts +10 -0
- package/bin/loanCredit/dtos/responses/QuoteLoanCreditResponse.js +2 -0
- package/bin/loanCredit/dtos/responses/SignLoanCreditResponse.d.ts +20 -0
- package/bin/loanCredit/dtos/responses/SignLoanCreditResponse.js +2 -0
- package/bin/loanCredit/enums/ClientLevelEnum.d.ts +11 -0
- package/bin/loanCredit/enums/ClientLevelEnum.js +15 -0
- package/bin/loanCredit/enums/ContractTypeEnum.d.ts +12 -0
- package/bin/loanCredit/enums/ContractTypeEnum.js +16 -0
- package/bin/loanCredit/enums/LoanCreditStatusEnum.d.ts +21 -0
- package/bin/loanCredit/enums/LoanCreditStatusEnum.js +25 -0
- package/bin/loanCredit/enums/LoanInstallmentStatusEnum.d.ts +14 -0
- package/bin/loanCredit/enums/LoanInstallmentStatusEnum.js +18 -0
- package/bin/loanCredit/index.d.ts +24 -0
- package/bin/loanCredit/index.js +47 -0
- package/bin/loanScoring/dtos/SciBreakdown.d.ts +29 -0
- package/bin/loanScoring/dtos/SciBreakdown.js +2 -0
- package/bin/loanScoring/dtos/ScoringDecision.d.ts +29 -0
- package/bin/loanScoring/dtos/ScoringDecision.js +2 -0
- package/bin/loanScoring/dtos/ScoringOffer.d.ts +18 -0
- package/bin/loanScoring/dtos/ScoringOffer.js +2 -0
- package/bin/loanScoring/dtos/requests/EvaluateSciRequest.d.ts +23 -0
- package/bin/loanScoring/dtos/requests/EvaluateSciRequest.js +54 -0
- package/bin/loanScoring/dtos/requests/SciInternalHistoryInput.d.ts +19 -0
- package/bin/loanScoring/dtos/requests/SciInternalHistoryInput.js +51 -0
- package/bin/loanScoring/dtos/responses/EvaluateSciResponse.d.ts +24 -0
- package/bin/loanScoring/dtos/responses/EvaluateSciResponse.js +2 -0
- package/bin/loanScoring/dtos/responses/SciEvaluationResponse.d.ts +28 -0
- package/bin/loanScoring/dtos/responses/SciEvaluationResponse.js +2 -0
- package/bin/loanScoring/enums/ClientLevelEnum.d.ts +13 -0
- package/bin/loanScoring/enums/ClientLevelEnum.js +17 -0
- package/bin/loanScoring/enums/SciLayer2SourceEnum.d.ts +11 -0
- package/bin/loanScoring/enums/SciLayer2SourceEnum.js +15 -0
- package/bin/loanScoring/enums/ScoringDecisionEnum.d.ts +14 -0
- package/bin/loanScoring/enums/ScoringDecisionEnum.js +18 -0
- package/bin/loanScoring/enums/ScoringProviderEnum.d.ts +12 -0
- package/bin/loanScoring/enums/ScoringProviderEnum.js +16 -0
- package/bin/loanScoring/index.d.ts +11 -0
- package/bin/loanScoring/index.js +31 -0
- package/package.json +1 -1
- package/src/creditEngine/dtos/AnticipatedPaymentQuote.ts +56 -0
- package/src/creditEngine/index.ts +1 -0
- package/src/index.ts +7 -0
- package/src/loanCredit/dtos/ActivationChecklist.ts +25 -0
- package/src/loanCredit/dtos/LoanBeneficiary.ts +22 -0
- package/src/loanCredit/dtos/LoanBorrower.ts +71 -0
- package/src/loanCredit/dtos/LoanContract.ts +70 -0
- package/src/loanCredit/dtos/LoanCredit.ts +169 -0
- package/src/loanCredit/dtos/LoanInstallment.ts +75 -0
- package/src/loanCredit/dtos/requests/ActivationCheckRequest.ts +39 -0
- package/src/loanCredit/dtos/requests/ChangeLoanCreditStatusRequest.ts +22 -0
- package/src/loanCredit/dtos/requests/OriginateLoanCreditRequest.ts +74 -0
- package/src/loanCredit/dtos/requests/QuoteLoanCreditRequest.ts +24 -0
- package/src/loanCredit/dtos/requests/SignLoanCreditRequest.ts +24 -0
- package/src/loanCredit/dtos/requests/UpsertLoanBorrowerRequest.ts +48 -0
- package/src/loanCredit/dtos/responses/ActivationCheckResponse.ts +11 -0
- package/src/loanCredit/dtos/responses/LoanBorrowerResponse.ts +22 -0
- package/src/loanCredit/dtos/responses/LoanContractResponse.ts +17 -0
- package/src/loanCredit/dtos/responses/LoanCreditResponse.ts +39 -0
- package/src/loanCredit/dtos/responses/LoanInstallmentResponse.ts +18 -0
- package/src/loanCredit/dtos/responses/OriginateLoanCreditResponse.ts +14 -0
- package/src/loanCredit/dtos/responses/QuoteLoanCreditResponse.ts +11 -0
- package/src/loanCredit/dtos/responses/SignLoanCreditResponse.ts +21 -0
- package/src/loanCredit/enums/ContractTypeEnum.ts +12 -0
- package/src/loanCredit/enums/LoanCreditStatusEnum.ts +21 -0
- package/src/loanCredit/enums/LoanInstallmentStatusEnum.ts +14 -0
- package/src/loanCredit/index.ts +32 -0
- package/src/loanScoring/dtos/SciBreakdown.ts +33 -0
- package/src/loanScoring/dtos/ScoringDecision.ts +30 -0
- package/src/loanScoring/dtos/ScoringOffer.ts +18 -0
- package/src/loanScoring/dtos/requests/EvaluateSciRequest.ts +43 -0
- package/src/loanScoring/dtos/requests/SciInternalHistoryInput.ts +38 -0
- package/src/loanScoring/dtos/responses/EvaluateSciResponse.ts +25 -0
- package/src/loanScoring/dtos/responses/SciEvaluationResponse.ts +29 -0
- package/src/loanScoring/enums/ClientLevelEnum.ts +13 -0
- package/src/loanScoring/enums/SciLayer2SourceEnum.ts +11 -0
- package/src/loanScoring/enums/ScoringDecisionEnum.ts +14 -0
- package/src/loanScoring/enums/ScoringProviderEnum.ts +12 -0
- package/src/loanScoring/index.ts +18 -0
- package/bin/benefitCenter/enums/BenefitFlowEnum.d.ts +0 -11
- package/bin/benefitCenter/enums/BenefitFlowEnum.js +0 -15
- package/bin/loanConfig/enums/ModifiableByRoleEnum.d.ts +0 -11
- package/bin/loanConfig/enums/ModifiableByRoleEnum.js +0 -15
- package/bin/places/dtos/CashInFeeDto.d.ts +0 -17
- package/bin/places/dtos/CashInFeeDto.js +0 -12
- package/bin/platformRbac/dtos/ResendOtpRequest.d.ts +0 -22
- package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.d.ts +0 -11
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LoanCredit = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const regex_1 = require("../../helpers/constans/regex");
|
|
16
|
+
const ClientLevelEnum_1 = require("../../loanScoring/enums/ClientLevelEnum");
|
|
17
|
+
const LoanCreditStatusEnum_1 = require("../enums/LoanCreditStatusEnum");
|
|
18
|
+
const ActivationChecklist_1 = require("./ActivationChecklist");
|
|
19
|
+
/**
|
|
20
|
+
* LoanCredit — el crédito SOFOM (modelo-datos §5b · M2 · owner `loan-credit-business`).
|
|
21
|
+
*
|
|
22
|
+
* Convenciones: montos en **cents** (entero); TNA decimal (`2.30` = 230%); porcentajes decimal
|
|
23
|
+
* sobre 1. La estructura financiera es amortización francesa + IVA 16% sobre intereses, sin interés
|
|
24
|
+
* moratorio (M2 §3). El snapshot `sciAtOrigination`/`clientLevelAtOrigination` congela las
|
|
25
|
+
* condiciones del cliente al originar (el SCI vivo evoluciona en `LoanBorrower`).
|
|
26
|
+
*/
|
|
27
|
+
class LoanCredit {
|
|
28
|
+
}
|
|
29
|
+
exports.LoanCredit = LoanCredit;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_transformer_1.Expose)(),
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], LoanCredit.prototype, "creditId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], LoanCredit.prototype, "borrowerId", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_transformer_1.Expose)(),
|
|
42
|
+
(0, class_validator_1.IsEnum)(LoanCreditStatusEnum_1.LoanCreditStatusEnum),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], LoanCredit.prototype, "status", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_transformer_1.Expose)(),
|
|
47
|
+
(0, class_validator_1.IsString)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], LoanCredit.prototype, "planId", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_transformer_1.Expose)(),
|
|
52
|
+
(0, class_validator_1.IsInt)(),
|
|
53
|
+
(0, class_validator_1.Min)(1),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], LoanCredit.prototype, "termWeeks", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_transformer_1.Expose)(),
|
|
58
|
+
(0, class_validator_1.IsInt)(),
|
|
59
|
+
(0, class_validator_1.Min)(1),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], LoanCredit.prototype, "equipmentPriceCents", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_transformer_1.Expose)(),
|
|
64
|
+
(0, class_validator_1.IsInt)(),
|
|
65
|
+
(0, class_validator_1.Min)(0),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], LoanCredit.prototype, "downPaymentCents", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_transformer_1.Expose)(),
|
|
70
|
+
(0, class_validator_1.IsInt)(),
|
|
71
|
+
(0, class_validator_1.Min)(1),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], LoanCredit.prototype, "financedCapitalCents", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_transformer_1.Expose)(),
|
|
76
|
+
(0, class_validator_1.IsNumber)(),
|
|
77
|
+
(0, class_validator_1.Min)(0),
|
|
78
|
+
__metadata("design:type", Number)
|
|
79
|
+
], LoanCredit.prototype, "tnaAnnual", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, class_transformer_1.Expose)(),
|
|
82
|
+
(0, class_validator_1.IsInt)(),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], LoanCredit.prototype, "weeklyPaymentCents", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, class_transformer_1.Expose)(),
|
|
87
|
+
(0, class_validator_1.IsInt)(),
|
|
88
|
+
__metadata("design:type", Number)
|
|
89
|
+
], LoanCredit.prototype, "weeklyPaymentWithIvaCents", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, class_transformer_1.Expose)(),
|
|
92
|
+
(0, class_validator_1.IsInt)(),
|
|
93
|
+
__metadata("design:type", Number)
|
|
94
|
+
], LoanCredit.prototype, "totalInterestCents", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, class_transformer_1.Expose)(),
|
|
97
|
+
(0, class_validator_1.IsInt)(),
|
|
98
|
+
__metadata("design:type", Number)
|
|
99
|
+
], LoanCredit.prototype, "totalIvaCents", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, class_transformer_1.Expose)(),
|
|
102
|
+
(0, class_validator_1.IsInt)(),
|
|
103
|
+
__metadata("design:type", Number)
|
|
104
|
+
], LoanCredit.prototype, "totalToPayCents", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, class_transformer_1.Expose)(),
|
|
107
|
+
(0, class_validator_1.IsOptional)(),
|
|
108
|
+
(0, class_validator_1.IsNumber)(),
|
|
109
|
+
(0, class_validator_1.Min)(0),
|
|
110
|
+
__metadata("design:type", Number)
|
|
111
|
+
], LoanCredit.prototype, "catAnnual", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, class_transformer_1.Expose)(),
|
|
114
|
+
(0, class_validator_1.IsOptional)(),
|
|
115
|
+
(0, class_validator_1.IsString)(),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], LoanCredit.prototype, "wizardSessionId", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, class_transformer_1.Expose)(),
|
|
120
|
+
(0, class_validator_1.IsOptional)(),
|
|
121
|
+
(0, class_validator_1.IsString)(),
|
|
122
|
+
__metadata("design:type", String)
|
|
123
|
+
], LoanCredit.prototype, "imei", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, class_transformer_1.Expose)(),
|
|
126
|
+
(0, class_validator_1.ValidateNested)(),
|
|
127
|
+
(0, class_transformer_1.Type)(() => ActivationChecklist_1.ActivationChecklist),
|
|
128
|
+
__metadata("design:type", ActivationChecklist_1.ActivationChecklist)
|
|
129
|
+
], LoanCredit.prototype, "activationChecklist", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, class_transformer_1.Expose)(),
|
|
132
|
+
(0, class_validator_1.IsOptional)(),
|
|
133
|
+
(0, class_validator_1.IsInt)(),
|
|
134
|
+
(0, class_validator_1.Min)(0),
|
|
135
|
+
(0, class_validator_1.Max)(100),
|
|
136
|
+
__metadata("design:type", Number)
|
|
137
|
+
], LoanCredit.prototype, "sciAtOrigination", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, class_transformer_1.Expose)(),
|
|
140
|
+
(0, class_validator_1.IsOptional)(),
|
|
141
|
+
(0, class_validator_1.IsEnum)(ClientLevelEnum_1.ClientLevelEnum),
|
|
142
|
+
__metadata("design:type", String)
|
|
143
|
+
], LoanCredit.prototype, "clientLevelAtOrigination", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, class_transformer_1.Expose)(),
|
|
146
|
+
(0, class_validator_1.IsOptional)(),
|
|
147
|
+
(0, class_validator_1.Matches)(regex_1.regexIso8601),
|
|
148
|
+
__metadata("design:type", String)
|
|
149
|
+
], LoanCredit.prototype, "activatedAt", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, class_transformer_1.Expose)(),
|
|
152
|
+
(0, class_validator_1.IsOptional)(),
|
|
153
|
+
(0, class_validator_1.Matches)(regex_1.regexIso8601),
|
|
154
|
+
__metadata("design:type", String)
|
|
155
|
+
], LoanCredit.prototype, "voluntaryCancelDeadline", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, class_transformer_1.Expose)(),
|
|
158
|
+
(0, class_validator_1.IsOptional)(),
|
|
159
|
+
(0, class_validator_1.IsString)(),
|
|
160
|
+
__metadata("design:type", String)
|
|
161
|
+
], LoanCredit.prototype, "firstDueDate", void 0);
|
|
162
|
+
__decorate([
|
|
163
|
+
(0, class_transformer_1.Expose)(),
|
|
164
|
+
(0, class_validator_1.IsOptional)(),
|
|
165
|
+
(0, class_validator_1.IsString)(),
|
|
166
|
+
__metadata("design:type", String)
|
|
167
|
+
], LoanCredit.prototype, "lastDueDate", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, class_transformer_1.Expose)(),
|
|
170
|
+
(0, class_validator_1.IsString)(),
|
|
171
|
+
__metadata("design:type", String)
|
|
172
|
+
], LoanCredit.prototype, "createdBy", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
(0, class_transformer_1.Expose)(),
|
|
175
|
+
(0, class_validator_1.IsString)(),
|
|
176
|
+
__metadata("design:type", String)
|
|
177
|
+
], LoanCredit.prototype, "updatedBy", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
(0, class_transformer_1.Expose)(),
|
|
180
|
+
(0, class_validator_1.Matches)(regex_1.regexIso8601),
|
|
181
|
+
__metadata("design:type", String)
|
|
182
|
+
], LoanCredit.prototype, "createdAt", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
(0, class_transformer_1.Expose)(),
|
|
185
|
+
(0, class_validator_1.Matches)(regex_1.regexIso8601),
|
|
186
|
+
__metadata("design:type", String)
|
|
187
|
+
], LoanCredit.prototype, "updatedAt", void 0);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LoanInstallmentStatusEnum } from '../enums/LoanInstallmentStatusEnum';
|
|
2
|
+
/**
|
|
3
|
+
* LoanInstallment — cuota semanal del crédito (modelo-datos §5b). Montos en cents; el IVA (16%)
|
|
4
|
+
* aplica SOLO sobre el interés de la cuota (M2 §3.3). `dueDate` (YYYY-MM-DD) queda ausente hasta la
|
|
5
|
+
* activación: las fechas se fijan a partir del primer viernes después de `activatedAt` (05_MOTOR §7).
|
|
6
|
+
*/
|
|
7
|
+
export declare class LoanInstallment {
|
|
8
|
+
creditId: string;
|
|
9
|
+
/** Número de cuota 1-based. */
|
|
10
|
+
installmentNumber: number;
|
|
11
|
+
status: LoanInstallmentStatusEnum;
|
|
12
|
+
/** Vencimiento YYYY-MM-DD (viernes; festivo → lunes siguiente). Ausente hasta activar. */
|
|
13
|
+
dueDate?: string;
|
|
14
|
+
capitalCents: number;
|
|
15
|
+
interestCents: number;
|
|
16
|
+
/** IVA 16% sobre el interés de la cuota. */
|
|
17
|
+
ivaCents: number;
|
|
18
|
+
/** capital + interés + IVA. */
|
|
19
|
+
totalCents: number;
|
|
20
|
+
/** Saldo insoluto de capital tras aplicar la cuota. */
|
|
21
|
+
outstandingBalanceCents: number;
|
|
22
|
+
paidAt?: string;
|
|
23
|
+
createdBy: string;
|
|
24
|
+
updatedBy: string;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LoanInstallment = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const regex_1 = require("../../helpers/constans/regex");
|
|
16
|
+
const LoanInstallmentStatusEnum_1 = require("../enums/LoanInstallmentStatusEnum");
|
|
17
|
+
/**
|
|
18
|
+
* LoanInstallment — cuota semanal del crédito (modelo-datos §5b). Montos en cents; el IVA (16%)
|
|
19
|
+
* aplica SOLO sobre el interés de la cuota (M2 §3.3). `dueDate` (YYYY-MM-DD) queda ausente hasta la
|
|
20
|
+
* activación: las fechas se fijan a partir del primer viernes después de `activatedAt` (05_MOTOR §7).
|
|
21
|
+
*/
|
|
22
|
+
class LoanInstallment {
|
|
23
|
+
}
|
|
24
|
+
exports.LoanInstallment = LoanInstallment;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], LoanInstallment.prototype, "creditId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_transformer_1.Expose)(),
|
|
32
|
+
(0, class_validator_1.IsInt)(),
|
|
33
|
+
(0, class_validator_1.Min)(1),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], LoanInstallment.prototype, "installmentNumber", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_transformer_1.Expose)(),
|
|
38
|
+
(0, class_validator_1.IsEnum)(LoanInstallmentStatusEnum_1.LoanInstallmentStatusEnum),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], LoanInstallment.prototype, "status", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_transformer_1.Expose)(),
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], LoanInstallment.prototype, "dueDate", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
(0, class_validator_1.IsInt)(),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], LoanInstallment.prototype, "capitalCents", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_transformer_1.Expose)(),
|
|
54
|
+
(0, class_validator_1.IsInt)(),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], LoanInstallment.prototype, "interestCents", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, class_transformer_1.Expose)(),
|
|
59
|
+
(0, class_validator_1.IsInt)(),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], LoanInstallment.prototype, "ivaCents", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_transformer_1.Expose)(),
|
|
64
|
+
(0, class_validator_1.IsInt)(),
|
|
65
|
+
__metadata("design:type", Number)
|
|
66
|
+
], LoanInstallment.prototype, "totalCents", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, class_transformer_1.Expose)(),
|
|
69
|
+
(0, class_validator_1.IsInt)(),
|
|
70
|
+
__metadata("design:type", Number)
|
|
71
|
+
], LoanInstallment.prototype, "outstandingBalanceCents", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_transformer_1.Expose)(),
|
|
74
|
+
(0, class_validator_1.IsOptional)(),
|
|
75
|
+
(0, class_validator_1.Matches)(regex_1.regexIso8601),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], LoanInstallment.prototype, "paidAt", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, class_transformer_1.Expose)(),
|
|
80
|
+
(0, class_validator_1.IsString)(),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], LoanInstallment.prototype, "createdBy", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_transformer_1.Expose)(),
|
|
85
|
+
(0, class_validator_1.IsString)(),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], LoanInstallment.prototype, "updatedBy", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, class_transformer_1.Expose)(),
|
|
90
|
+
(0, class_validator_1.Matches)(regex_1.regexIso8601),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], LoanInstallment.prototype, "createdAt", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_transformer_1.Expose)(),
|
|
95
|
+
(0, class_validator_1.Matches)(regex_1.regexIso8601),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], LoanInstallment.prototype, "updatedAt", void 0);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body de `POST /private/credits/:creditId/activate-check` (loan-credit-business — M2 §5).
|
|
3
|
+
* Marca condiciones del checklist de activación cumplidas (solo las que cambian, solo a `true`):
|
|
4
|
+
* `downPayment` la reporta el wizard al confirmar el enganche (paso 07); `imeiEnrolled` +
|
|
5
|
+
* `lockVerified` las dispara el paso 09 variante crédito (enrolamiento MDM vía la abstracción de
|
|
6
|
+
* proveedor). `contractSigned` NO se marca por acá — solo la firma FES (endpoint sign).
|
|
7
|
+
*
|
|
8
|
+
* Cuando las 4 condiciones quedan `true` en el mismo request → el crédito pasa a `ACTIVE`:
|
|
9
|
+
* vencimientos `activatedAt + n×7d` (domingo→lunes), `voluntaryCancelDeadline = +7d`, flag de
|
|
10
|
+
* cobro PCF configurado (C7 — solo flag, el débito real requiere adendum).
|
|
11
|
+
*/
|
|
12
|
+
export declare class ActivationCheckRequest {
|
|
13
|
+
/** Enganche confirmado (efectivo/débito inmediato; SPEI espera confirmación — M2 §5). */
|
|
14
|
+
downPayment?: boolean;
|
|
15
|
+
/** IMEI enrolado en MDM. Dispara el enroll vía `MdmConnectorRouter` si aún no se hizo. */
|
|
16
|
+
imeiEnrolled?: boolean;
|
|
17
|
+
/** Software de bloqueo verificado (el MDM reporta "activo"). */
|
|
18
|
+
lockVerified?: boolean;
|
|
19
|
+
/** IMEI del equipo (paso 09) si no se fijó en el originate. Luhn-validado por el motor. */
|
|
20
|
+
imei?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ActivationCheckRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Body de `POST /private/credits/:creditId/activate-check` (loan-credit-business — M2 §5).
|
|
17
|
+
* Marca condiciones del checklist de activación cumplidas (solo las que cambian, solo a `true`):
|
|
18
|
+
* `downPayment` la reporta el wizard al confirmar el enganche (paso 07); `imeiEnrolled` +
|
|
19
|
+
* `lockVerified` las dispara el paso 09 variante crédito (enrolamiento MDM vía la abstracción de
|
|
20
|
+
* proveedor). `contractSigned` NO se marca por acá — solo la firma FES (endpoint sign).
|
|
21
|
+
*
|
|
22
|
+
* Cuando las 4 condiciones quedan `true` en el mismo request → el crédito pasa a `ACTIVE`:
|
|
23
|
+
* vencimientos `activatedAt + n×7d` (domingo→lunes), `voluntaryCancelDeadline = +7d`, flag de
|
|
24
|
+
* cobro PCF configurado (C7 — solo flag, el débito real requiere adendum).
|
|
25
|
+
*/
|
|
26
|
+
class ActivationCheckRequest {
|
|
27
|
+
}
|
|
28
|
+
exports.ActivationCheckRequest = ActivationCheckRequest;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
(0, class_validator_1.IsOptional)(),
|
|
32
|
+
(0, class_validator_1.IsBoolean)(),
|
|
33
|
+
__metadata("design:type", Boolean)
|
|
34
|
+
], ActivationCheckRequest.prototype, "downPayment", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_validator_1.IsBoolean)(),
|
|
39
|
+
__metadata("design:type", Boolean)
|
|
40
|
+
], ActivationCheckRequest.prototype, "imeiEnrolled", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_transformer_1.Expose)(),
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsBoolean)(),
|
|
45
|
+
__metadata("design:type", Boolean)
|
|
46
|
+
], ActivationCheckRequest.prototype, "lockVerified", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], ActivationCheckRequest.prototype, "imei", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LoanCreditStatusEnum } from '../../enums/LoanCreditStatusEnum';
|
|
2
|
+
/**
|
|
3
|
+
* Body de PUT /credits/:creditId/status (loan-credit-business). Cambio MANUAL de estado (05_MOTOR
|
|
4
|
+
* §8.2 — solo admin). Transiciones válidas: PENDING_ACTIVATION→CANCELLED (siempre),
|
|
5
|
+
* ACTIVE→CANCELLED (solo dentro de la ventana de 7 días), ACTIVE→WRITTEN_OFF,
|
|
6
|
+
* IN_ARREARS→WRITTEN_OFF. Cualquier otra → 400 INVALID_TRANSITION.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ChangeLoanCreditStatusRequest {
|
|
9
|
+
newStatus: LoanCreditStatusEnum;
|
|
10
|
+
/** Razón del cambio (obligatoria — va al audit trail). */
|
|
11
|
+
reason: string;
|
|
12
|
+
}
|
|
@@ -9,28 +9,28 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.ChangeLoanCreditStatusRequest = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
+
const LoanCreditStatusEnum_1 = require("../../enums/LoanCreditStatusEnum");
|
|
15
16
|
/**
|
|
16
|
-
* Body
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* scopeRef, ni SelfRegisterVerifyOtpRequest, que exige otp).
|
|
17
|
+
* Body de PUT /credits/:creditId/status (loan-credit-business). Cambio MANUAL de estado (05_MOTOR
|
|
18
|
+
* §8.2 — solo admin). Transiciones válidas: PENDING_ACTIVATION→CANCELLED (siempre),
|
|
19
|
+
* ACTIVE→CANCELLED (solo dentro de la ventana de 7 días), ACTIVE→WRITTEN_OFF,
|
|
20
|
+
* IN_ARREARS→WRITTEN_OFF. Cualquier otra → 400 INVALID_TRANSITION.
|
|
21
21
|
*/
|
|
22
|
-
class
|
|
22
|
+
class ChangeLoanCreditStatusRequest {
|
|
23
23
|
}
|
|
24
|
-
exports.
|
|
24
|
+
exports.ChangeLoanCreditStatusRequest = ChangeLoanCreditStatusRequest;
|
|
25
25
|
__decorate([
|
|
26
26
|
(0, class_transformer_1.Expose)(),
|
|
27
|
-
(0, class_validator_1.
|
|
28
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
+
(0, class_validator_1.IsEnum)(LoanCreditStatusEnum_1.LoanCreditStatusEnum),
|
|
29
28
|
__metadata("design:type", String)
|
|
30
|
-
],
|
|
29
|
+
], ChangeLoanCreditStatusRequest.prototype, "newStatus", void 0);
|
|
31
30
|
__decorate([
|
|
32
31
|
(0, class_transformer_1.Expose)(),
|
|
33
|
-
(0, class_validator_1.
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
34
33
|
(0, class_validator_1.IsNotEmpty)(),
|
|
34
|
+
(0, class_validator_1.MaxLength)(500),
|
|
35
35
|
__metadata("design:type", String)
|
|
36
|
-
],
|
|
36
|
+
], ChangeLoanCreditStatusRequest.prototype, "reason", void 0);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ClientLevelEnum } from '../../../loanScoring/enums/ClientLevelEnum';
|
|
2
|
+
/**
|
|
3
|
+
* Body de `POST /private/credits/originate` (loan-credit-business — wizard, vía api-invoker).
|
|
4
|
+
* Origina el crédito en `PENDING_ACTIVATION`: valida (M2 §4.2: sin otro crédito vivo, plan activo,
|
|
5
|
+
* IMEI libre), invoca el simulador de loan-offerings con `planId+termWeeks+precio+enganche` (la
|
|
6
|
+
* TNA y el CAT los resuelve el PLAN — el caller NO los manda) y persiste crédito + cuotas +
|
|
7
|
+
* contratos draft.
|
|
8
|
+
*
|
|
9
|
+
* **Idempotente por `wizardSessionId`** (el wizard reintenta): mismo wizardSessionId → devuelve el
|
|
10
|
+
* crédito ya originado, no crea otro. El tenant viaja por query `?tenantId=` (convención privados).
|
|
11
|
+
*/
|
|
12
|
+
export declare class OriginateLoanCreditRequest {
|
|
13
|
+
/** Sesión del wizard que origina — clave de idempotencia (AS-07). */
|
|
14
|
+
wizardSessionId: string;
|
|
15
|
+
borrowerId: string;
|
|
16
|
+
planId: string;
|
|
17
|
+
termWeeks: number;
|
|
18
|
+
equipmentPriceCents: number;
|
|
19
|
+
downPaymentCents: number;
|
|
20
|
+
/** SCI del cliente al originar (snapshot de la evaluación del paso 05). */
|
|
21
|
+
sciAtOrigination?: number;
|
|
22
|
+
clientLevelAtOrigination?: ClientLevelEnum;
|
|
23
|
+
/** IMEI del equipo si ya se conoce (también puede fijarse en el paso 09 vía activate-check). */
|
|
24
|
+
imei?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OriginateLoanCreditRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const ClientLevelEnum_1 = require("../../../loanScoring/enums/ClientLevelEnum");
|
|
16
|
+
/**
|
|
17
|
+
* Body de `POST /private/credits/originate` (loan-credit-business — wizard, vía api-invoker).
|
|
18
|
+
* Origina el crédito en `PENDING_ACTIVATION`: valida (M2 §4.2: sin otro crédito vivo, plan activo,
|
|
19
|
+
* IMEI libre), invoca el simulador de loan-offerings con `planId+termWeeks+precio+enganche` (la
|
|
20
|
+
* TNA y el CAT los resuelve el PLAN — el caller NO los manda) y persiste crédito + cuotas +
|
|
21
|
+
* contratos draft.
|
|
22
|
+
*
|
|
23
|
+
* **Idempotente por `wizardSessionId`** (el wizard reintenta): mismo wizardSessionId → devuelve el
|
|
24
|
+
* crédito ya originado, no crea otro. El tenant viaja por query `?tenantId=` (convención privados).
|
|
25
|
+
*/
|
|
26
|
+
class OriginateLoanCreditRequest {
|
|
27
|
+
}
|
|
28
|
+
exports.OriginateLoanCreditRequest = OriginateLoanCreditRequest;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], OriginateLoanCreditRequest.prototype, "wizardSessionId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_transformer_1.Expose)(),
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], OriginateLoanCreditRequest.prototype, "borrowerId", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_transformer_1.Expose)(),
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], OriginateLoanCreditRequest.prototype, "planId", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_transformer_1.Expose)(),
|
|
49
|
+
(0, class_validator_1.IsInt)(),
|
|
50
|
+
(0, class_validator_1.Min)(1),
|
|
51
|
+
(0, class_validator_1.Max)(104),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], OriginateLoanCreditRequest.prototype, "termWeeks", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_transformer_1.Expose)(),
|
|
56
|
+
(0, class_validator_1.IsInt)(),
|
|
57
|
+
(0, class_validator_1.Min)(1),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], OriginateLoanCreditRequest.prototype, "equipmentPriceCents", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_transformer_1.Expose)(),
|
|
62
|
+
(0, class_validator_1.IsInt)(),
|
|
63
|
+
(0, class_validator_1.Min)(0),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], OriginateLoanCreditRequest.prototype, "downPaymentCents", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_transformer_1.Expose)(),
|
|
68
|
+
(0, class_validator_1.IsOptional)(),
|
|
69
|
+
(0, class_validator_1.IsInt)(),
|
|
70
|
+
(0, class_validator_1.Min)(0),
|
|
71
|
+
(0, class_validator_1.Max)(100),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], OriginateLoanCreditRequest.prototype, "sciAtOrigination", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_transformer_1.Expose)(),
|
|
76
|
+
(0, class_validator_1.IsOptional)(),
|
|
77
|
+
(0, class_validator_1.IsEnum)(ClientLevelEnum_1.ClientLevelEnum),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], OriginateLoanCreditRequest.prototype, "clientLevelAtOrigination", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, class_transformer_1.Expose)(),
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
(0, class_validator_1.IsString)(),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], OriginateLoanCreditRequest.prototype, "imei", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body de `POST /private/credits/:creditId/quote` (loan-credit-business — wizard paso 06).
|
|
3
|
+
* Re-cotiza el crédito en `PENDING_ACTIVATION` con términos nuevos (el cliente itera
|
|
4
|
+
* plazo/enganche en el cotizador) e invoca el simulador de loan-offerings; regenera las cuotas.
|
|
5
|
+
* Campos ausentes = conservar el valor actual del crédito. Rechaza si el crédito no está PENDING
|
|
6
|
+
* o si el contrato ya se firmó (los términos quedan congelados con la firma).
|
|
7
|
+
*/
|
|
8
|
+
export declare class QuoteLoanCreditRequest {
|
|
9
|
+
termWeeks?: number;
|
|
10
|
+
downPaymentCents?: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.QuoteLoanCreditRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Body de `POST /private/credits/:creditId/quote` (loan-credit-business — wizard paso 06).
|
|
17
|
+
* Re-cotiza el crédito en `PENDING_ACTIVATION` con términos nuevos (el cliente itera
|
|
18
|
+
* plazo/enganche en el cotizador) e invoca el simulador de loan-offerings; regenera las cuotas.
|
|
19
|
+
* Campos ausentes = conservar el valor actual del crédito. Rechaza si el crédito no está PENDING
|
|
20
|
+
* o si el contrato ya se firmó (los términos quedan congelados con la firma).
|
|
21
|
+
*/
|
|
22
|
+
class QuoteLoanCreditRequest {
|
|
23
|
+
}
|
|
24
|
+
exports.QuoteLoanCreditRequest = QuoteLoanCreditRequest;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
(0, class_validator_1.IsInt)(),
|
|
29
|
+
(0, class_validator_1.Min)(1),
|
|
30
|
+
(0, class_validator_1.Max)(104),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], QuoteLoanCreditRequest.prototype, "termWeeks", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_transformer_1.Expose)(),
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
(0, class_validator_1.IsInt)(),
|
|
37
|
+
(0, class_validator_1.Min)(0),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], QuoteLoanCreditRequest.prototype, "downPaymentCents", void 0);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Body de `POST /private/credits/:creditId/sign` (loan-credit-business — wizard paso 08, firma FES
|
|
3
|
+
* M2 §4.4). Endpoint de DOS tiempos sobre el mismo contrato:
|
|
4
|
+
*
|
|
5
|
+
* 1. **SIN `otpCode`** → INICIA la firma: congela términos, genera los 3 PDFs (C4), calcula sus
|
|
6
|
+
* sha256 y dispara el OTP dedicado de firma (4 dígitos, 5 min, vía messages-business — D5;
|
|
7
|
+
* distinto al OTP del paso 01). Responde `otpSent: true`.
|
|
8
|
+
* 2. **CON `otpCode`** → VERIFICA el OTP y firma: marca los contratos `otpVerified` + `signedAt` +
|
|
9
|
+
* NOM-151, y pone `activationChecklist.contractSigned = true`.
|
|
10
|
+
*
|
|
11
|
+
* Errores: `OTP_INVALID` · `OTP_EXPIRED` · `OTP_MAX_ATTEMPTS` · `CREDIT_NOT_PENDING`.
|
|
12
|
+
* (Semántica a ratificar con el contrato del wizard — AS-07.)
|
|
13
|
+
*/
|
|
14
|
+
export declare class SignLoanCreditRequest {
|
|
15
|
+
/** Código OTP de firma. Ausente = iniciar la firma (generar PDFs + enviar OTP). */
|
|
16
|
+
otpCode?: string;
|
|
17
|
+
}
|