@fiado/type-kit 3.185.0 → 3.187.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.
Files changed (109) hide show
  1. package/bin/index.d.ts +2 -0
  2. package/bin/index.js +7 -1
  3. package/bin/loanCollectorAssignment/dtos/PriorityWeights.d.ts +10 -0
  4. package/bin/loanCollectorAssignment/dtos/PriorityWeights.js +43 -0
  5. package/bin/loanCollectorAssignment/dtos/requests/AutoAssignRequest.d.ts +9 -0
  6. package/bin/loanCollectorAssignment/dtos/requests/AutoAssignRequest.js +39 -0
  7. package/bin/loanCollectorAssignment/dtos/requests/CreateAssignmentRuleRequest.d.ts +12 -0
  8. package/bin/loanCollectorAssignment/dtos/requests/CreateAssignmentRuleRequest.js +46 -0
  9. package/bin/loanCollectorAssignment/dtos/requests/ReassignRequest.d.ts +7 -0
  10. package/bin/loanCollectorAssignment/dtos/requests/ReassignRequest.js +27 -0
  11. package/bin/loanCollectorAssignment/dtos/requests/RedistributeRequest.d.ts +7 -0
  12. package/bin/loanCollectorAssignment/dtos/requests/RedistributeRequest.js +27 -0
  13. package/bin/loanCollectorAssignment/dtos/requests/UpdateAssignmentRuleRequest.d.ts +12 -0
  14. package/bin/loanCollectorAssignment/dtos/requests/UpdateAssignmentRuleRequest.js +49 -0
  15. package/bin/loanCollectorAssignment/dtos/responses/AssignmentRuleResponse.d.ts +15 -0
  16. package/bin/loanCollectorAssignment/dtos/responses/AssignmentRuleResponse.js +2 -0
  17. package/bin/loanCollectorAssignment/dtos/responses/CollectorAssignmentResponse.d.ts +16 -0
  18. package/bin/loanCollectorAssignment/dtos/responses/CollectorAssignmentResponse.js +2 -0
  19. package/bin/loanCollectorAssignment/dtos/responses/CollectorLoadResponse.d.ts +11 -0
  20. package/bin/loanCollectorAssignment/dtos/responses/CollectorLoadResponse.js +2 -0
  21. package/bin/loanCollectorAssignment/dtos/responses/RedistributeSummaryResponse.d.ts +9 -0
  22. package/bin/loanCollectorAssignment/dtos/responses/RedistributeSummaryResponse.js +2 -0
  23. package/bin/loanCollectorAssignment/enums/AssignmentStatusEnum.d.ts +10 -0
  24. package/bin/loanCollectorAssignment/enums/AssignmentStatusEnum.js +14 -0
  25. package/bin/loanCollectorAssignment/enums/AssignmentStrategyEnum.d.ts +12 -0
  26. package/bin/loanCollectorAssignment/enums/AssignmentStrategyEnum.js +16 -0
  27. package/bin/loanCollectorAssignment/index.d.ts +12 -0
  28. package/bin/loanCollectorAssignment/index.js +32 -0
  29. package/bin/loanOfferings/dtos/CreditPlan.d.ts +52 -0
  30. package/bin/loanOfferings/dtos/CreditPlan.js +184 -0
  31. package/bin/loanOfferings/dtos/Financier.d.ts +30 -0
  32. package/bin/loanOfferings/dtos/Financier.js +103 -0
  33. package/bin/loanOfferings/dtos/RetailerCreditPlan.d.ts +15 -0
  34. package/bin/loanOfferings/dtos/RetailerCreditPlan.js +71 -0
  35. package/bin/loanOfferings/dtos/requests/ChangeCreditPlanStatusRequest.d.ts +8 -0
  36. package/bin/loanOfferings/dtos/requests/ChangeCreditPlanStatusRequest.js +27 -0
  37. package/bin/loanOfferings/dtos/requests/ChangeFinancierStatusRequest.d.ts +8 -0
  38. package/bin/loanOfferings/dtos/requests/ChangeFinancierStatusRequest.js +27 -0
  39. package/bin/loanOfferings/dtos/requests/CreateCreditPlanRequest.d.ts +27 -0
  40. package/bin/loanOfferings/dtos/requests/CreateCreditPlanRequest.js +137 -0
  41. package/bin/loanOfferings/dtos/requests/CreateFinancierRequest.d.ts +17 -0
  42. package/bin/loanOfferings/dtos/requests/CreateFinancierRequest.js +70 -0
  43. package/bin/loanOfferings/dtos/requests/ReorderFinancierRequest.d.ts +7 -0
  44. package/bin/loanOfferings/dtos/requests/ReorderFinancierRequest.js +27 -0
  45. package/bin/loanOfferings/dtos/requests/SimulateCreditPlanRequest.d.ts +11 -0
  46. package/bin/loanOfferings/dtos/requests/SimulateCreditPlanRequest.js +49 -0
  47. package/bin/loanOfferings/dtos/requests/UpdateCreditPlanRequest.d.ts +25 -0
  48. package/bin/loanOfferings/dtos/requests/UpdateCreditPlanRequest.js +134 -0
  49. package/bin/loanOfferings/dtos/requests/UpdateFinancierRequest.d.ts +12 -0
  50. package/bin/loanOfferings/dtos/requests/UpdateFinancierRequest.js +53 -0
  51. package/bin/loanOfferings/dtos/responses/CreditPlanResponse.d.ts +35 -0
  52. package/bin/loanOfferings/dtos/responses/CreditPlanResponse.js +2 -0
  53. package/bin/loanOfferings/dtos/responses/FinancierResponse.d.ts +23 -0
  54. package/bin/loanOfferings/dtos/responses/FinancierResponse.js +2 -0
  55. package/bin/loanOfferings/dtos/responses/RetailerCreditPlanResponse.d.ts +14 -0
  56. package/bin/loanOfferings/dtos/responses/RetailerCreditPlanResponse.js +2 -0
  57. package/bin/loanOfferings/dtos/responses/SimulationResultResponse.d.ts +44 -0
  58. package/bin/loanOfferings/dtos/responses/SimulationResultResponse.js +2 -0
  59. package/bin/loanOfferings/enums/CreditPlanLevelEnum.d.ts +12 -0
  60. package/bin/loanOfferings/enums/CreditPlanLevelEnum.js +16 -0
  61. package/bin/loanOfferings/enums/CreditPlanStatusEnum.d.ts +8 -0
  62. package/bin/loanOfferings/enums/CreditPlanStatusEnum.js +12 -0
  63. package/bin/loanOfferings/enums/FinancierStatusEnum.d.ts +9 -0
  64. package/bin/loanOfferings/enums/FinancierStatusEnum.js +13 -0
  65. package/bin/loanOfferings/enums/FinancierTypeEnum.d.ts +9 -0
  66. package/bin/loanOfferings/enums/FinancierTypeEnum.js +13 -0
  67. package/bin/loanOfferings/enums/ProductTierEnum.d.ts +15 -0
  68. package/bin/loanOfferings/enums/ProductTierEnum.js +19 -0
  69. package/bin/loanOfferings/enums/SaleTypeEnum.d.ts +13 -0
  70. package/bin/loanOfferings/enums/SaleTypeEnum.js +17 -0
  71. package/bin/loanOfferings/index.d.ts +21 -0
  72. package/bin/loanOfferings/index.js +41 -0
  73. package/package.json +1 -1
  74. package/src/index.ts +6 -0
  75. package/src/loanCollectorAssignment/dtos/PriorityWeights.ts +27 -0
  76. package/src/loanCollectorAssignment/dtos/requests/AutoAssignRequest.ts +23 -0
  77. package/src/loanCollectorAssignment/dtos/requests/CreateAssignmentRuleRequest.ts +29 -0
  78. package/src/loanCollectorAssignment/dtos/requests/ReassignRequest.ts +13 -0
  79. package/src/loanCollectorAssignment/dtos/requests/RedistributeRequest.ts +13 -0
  80. package/src/loanCollectorAssignment/dtos/requests/UpdateAssignmentRuleRequest.ts +32 -0
  81. package/src/loanCollectorAssignment/dtos/responses/AssignmentRuleResponse.ts +16 -0
  82. package/src/loanCollectorAssignment/dtos/responses/CollectorAssignmentResponse.ts +17 -0
  83. package/src/loanCollectorAssignment/dtos/responses/CollectorLoadResponse.ts +11 -0
  84. package/src/loanCollectorAssignment/dtos/responses/RedistributeSummaryResponse.ts +10 -0
  85. package/src/loanCollectorAssignment/enums/AssignmentStatusEnum.ts +10 -0
  86. package/src/loanCollectorAssignment/enums/AssignmentStrategyEnum.ts +12 -0
  87. package/src/loanCollectorAssignment/index.ts +19 -0
  88. package/src/loanOfferings/dtos/CreditPlan.ts +171 -0
  89. package/src/loanOfferings/dtos/Financier.ts +91 -0
  90. package/src/loanOfferings/dtos/RetailerCreditPlan.ts +49 -0
  91. package/src/loanOfferings/dtos/requests/ChangeCreditPlanStatusRequest.ts +13 -0
  92. package/src/loanOfferings/dtos/requests/ChangeFinancierStatusRequest.ts +13 -0
  93. package/src/loanOfferings/dtos/requests/CreateCreditPlanRequest.ts +118 -0
  94. package/src/loanOfferings/dtos/requests/CreateFinancierRequest.ts +57 -0
  95. package/src/loanOfferings/dtos/requests/ReorderFinancierRequest.ts +13 -0
  96. package/src/loanOfferings/dtos/requests/SimulateCreditPlanRequest.ts +32 -0
  97. package/src/loanOfferings/dtos/requests/UpdateCreditPlanRequest.ts +117 -0
  98. package/src/loanOfferings/dtos/requests/UpdateFinancierRequest.ts +41 -0
  99. package/src/loanOfferings/dtos/responses/CreditPlanResponse.ts +36 -0
  100. package/src/loanOfferings/dtos/responses/FinancierResponse.ts +24 -0
  101. package/src/loanOfferings/dtos/responses/RetailerCreditPlanResponse.ts +14 -0
  102. package/src/loanOfferings/dtos/responses/SimulationResultResponse.ts +45 -0
  103. package/src/loanOfferings/enums/CreditPlanLevelEnum.ts +12 -0
  104. package/src/loanOfferings/enums/CreditPlanStatusEnum.ts +8 -0
  105. package/src/loanOfferings/enums/FinancierStatusEnum.ts +9 -0
  106. package/src/loanOfferings/enums/FinancierTypeEnum.ts +9 -0
  107. package/src/loanOfferings/enums/ProductTierEnum.ts +15 -0
  108. package/src/loanOfferings/enums/SaleTypeEnum.ts +13 -0
  109. package/src/loanOfferings/index.ts +28 -0
@@ -0,0 +1,184 @@
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.CreditPlan = 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 CreditPlanLevelEnum_1 = require("../enums/CreditPlanLevelEnum");
17
+ const CreditPlanStatusEnum_1 = require("../enums/CreditPlanStatusEnum");
18
+ const ProductTierEnum_1 = require("../enums/ProductTierEnum");
19
+ const SaleTypeEnum_1 = require("../enums/SaleTypeEnum");
20
+ /**
21
+ * CreditPlan — plan de crédito del catálogo SOFOM SureKeep (modelo-datos §6.1 · M6 §4).
22
+ * Entidad completa del dominio `loan-offerings-business` (SureKeep Fase 1 — pista Loan).
23
+ *
24
+ * Convenciones: montos en **cents** (entero); porcentajes **decimal sobre 1** (`0.40` = 40%);
25
+ * TNA decimal (`2.60` = 260%). El PLAN es dueño de los umbrales SCI por nivel
26
+ * (`minSciScore`/`maxSciScore`, resolución 2026-07-15) y del techo de enganche `maxDownPaymentPct`.
27
+ */
28
+ class CreditPlan {
29
+ }
30
+ exports.CreditPlan = CreditPlan;
31
+ __decorate([
32
+ (0, class_transformer_1.Expose)(),
33
+ (0, class_validator_1.IsString)(),
34
+ __metadata("design:type", String)
35
+ ], CreditPlan.prototype, "planId", void 0);
36
+ __decorate([
37
+ (0, class_transformer_1.Expose)(),
38
+ (0, class_validator_1.IsString)(),
39
+ __metadata("design:type", String)
40
+ ], CreditPlan.prototype, "code", void 0);
41
+ __decorate([
42
+ (0, class_transformer_1.Expose)(),
43
+ (0, class_validator_1.IsString)(),
44
+ __metadata("design:type", String)
45
+ ], CreditPlan.prototype, "name", void 0);
46
+ __decorate([
47
+ (0, class_transformer_1.Expose)(),
48
+ (0, class_validator_1.IsString)(),
49
+ __metadata("design:type", String)
50
+ ], CreditPlan.prototype, "description", void 0);
51
+ __decorate([
52
+ (0, class_transformer_1.Expose)(),
53
+ (0, class_validator_1.IsEnum)(CreditPlanLevelEnum_1.CreditPlanLevelEnum),
54
+ __metadata("design:type", String)
55
+ ], CreditPlan.prototype, "level", void 0);
56
+ __decorate([
57
+ (0, class_transformer_1.Expose)(),
58
+ (0, class_validator_1.IsArray)(),
59
+ (0, class_validator_1.ArrayNotEmpty)(),
60
+ (0, class_validator_1.IsEnum)(SaleTypeEnum_1.SaleTypeEnum, { each: true }),
61
+ __metadata("design:type", Array)
62
+ ], CreditPlan.prototype, "saleTypes", void 0);
63
+ __decorate([
64
+ (0, class_transformer_1.Expose)(),
65
+ (0, class_validator_1.IsOptional)(),
66
+ (0, class_validator_1.IsArray)(),
67
+ (0, class_validator_1.IsEnum)(ProductTierEnum_1.ProductTierEnum, { each: true }),
68
+ __metadata("design:type", Array)
69
+ ], CreditPlan.prototype, "eligibleTiers", void 0);
70
+ __decorate([
71
+ (0, class_transformer_1.Expose)(),
72
+ (0, class_validator_1.IsNumber)(),
73
+ (0, class_validator_1.Min)(0),
74
+ (0, class_validator_1.Max)(1),
75
+ __metadata("design:type", Number)
76
+ ], CreditPlan.prototype, "minDownPaymentPct", void 0);
77
+ __decorate([
78
+ (0, class_transformer_1.Expose)(),
79
+ (0, class_validator_1.IsOptional)(),
80
+ (0, class_validator_1.IsNumber)(),
81
+ (0, class_validator_1.Min)(0),
82
+ (0, class_validator_1.Max)(1),
83
+ __metadata("design:type", Number)
84
+ ], CreditPlan.prototype, "maxDownPaymentPct", void 0);
85
+ __decorate([
86
+ (0, class_transformer_1.Expose)(),
87
+ (0, class_validator_1.IsArray)(),
88
+ (0, class_validator_1.ArrayNotEmpty)(),
89
+ (0, class_validator_1.IsInt)({ each: true }),
90
+ (0, class_validator_1.Min)(1, { each: true }),
91
+ __metadata("design:type", Array)
92
+ ], CreditPlan.prototype, "termWeeksOptions", void 0);
93
+ __decorate([
94
+ (0, class_transformer_1.Expose)(),
95
+ (0, class_validator_1.IsInt)(),
96
+ (0, class_validator_1.Min)(0),
97
+ __metadata("design:type", Number)
98
+ ], CreditPlan.prototype, "maxFinancedAmountCents", void 0);
99
+ __decorate([
100
+ (0, class_transformer_1.Expose)(),
101
+ (0, class_validator_1.IsNumber)(),
102
+ (0, class_validator_1.Min)(0),
103
+ __metadata("design:type", Number)
104
+ ], CreditPlan.prototype, "tnaAnnual", void 0);
105
+ __decorate([
106
+ (0, class_transformer_1.Expose)(),
107
+ (0, class_validator_1.IsNumber)(),
108
+ (0, class_validator_1.Min)(0),
109
+ (0, class_validator_1.Max)(1),
110
+ __metadata("design:type", Number)
111
+ ], CreditPlan.prototype, "ivaOnInterest", void 0);
112
+ __decorate([
113
+ (0, class_transformer_1.Expose)(),
114
+ (0, class_validator_1.IsNumber)(),
115
+ (0, class_validator_1.Min)(0),
116
+ (0, class_validator_1.Max)(1),
117
+ __metadata("design:type", Number)
118
+ ], CreditPlan.prototype, "openingCommissionPct", void 0);
119
+ __decorate([
120
+ (0, class_transformer_1.Expose)(),
121
+ (0, class_validator_1.IsBoolean)(),
122
+ __metadata("design:type", Boolean)
123
+ ], CreditPlan.prototype, "paymentShift", void 0);
124
+ __decorate([
125
+ (0, class_transformer_1.Expose)(),
126
+ (0, class_validator_1.IsOptional)(),
127
+ (0, class_validator_1.IsInt)(),
128
+ (0, class_validator_1.Min)(0),
129
+ (0, class_validator_1.Max)(100),
130
+ __metadata("design:type", Number)
131
+ ], CreditPlan.prototype, "minSciScore", void 0);
132
+ __decorate([
133
+ (0, class_transformer_1.Expose)(),
134
+ (0, class_validator_1.IsOptional)(),
135
+ (0, class_validator_1.IsInt)(),
136
+ (0, class_validator_1.Min)(0),
137
+ (0, class_validator_1.Max)(100),
138
+ __metadata("design:type", Number)
139
+ ], CreditPlan.prototype, "maxSciScore", void 0);
140
+ __decorate([
141
+ (0, class_transformer_1.Expose)(),
142
+ (0, class_validator_1.IsInt)(),
143
+ (0, class_validator_1.Min)(1),
144
+ __metadata("design:type", Number)
145
+ ], CreditPlan.prototype, "version", void 0);
146
+ __decorate([
147
+ (0, class_transformer_1.Expose)(),
148
+ (0, class_validator_1.IsOptional)(),
149
+ (0, class_validator_1.IsString)(),
150
+ __metadata("design:type", String)
151
+ ], CreditPlan.prototype, "validFrom", void 0);
152
+ __decorate([
153
+ (0, class_transformer_1.Expose)(),
154
+ (0, class_validator_1.IsOptional)(),
155
+ (0, class_validator_1.IsString)(),
156
+ __metadata("design:type", String)
157
+ ], CreditPlan.prototype, "validUntil", void 0);
158
+ __decorate([
159
+ (0, class_transformer_1.Expose)(),
160
+ (0, class_validator_1.IsEnum)(CreditPlanStatusEnum_1.CreditPlanStatusEnum),
161
+ __metadata("design:type", String)
162
+ ], CreditPlan.prototype, "status", void 0);
163
+ __decorate([
164
+ (0, class_transformer_1.Expose)(),
165
+ (0, class_validator_1.IsString)(),
166
+ __metadata("design:type", String)
167
+ ], CreditPlan.prototype, "createdBy", void 0);
168
+ __decorate([
169
+ (0, class_transformer_1.Expose)(),
170
+ (0, class_validator_1.IsString)(),
171
+ __metadata("design:type", String)
172
+ ], CreditPlan.prototype, "updatedBy", void 0);
173
+ __decorate([
174
+ (0, class_transformer_1.Expose)(),
175
+ (0, class_validator_1.IsString)(),
176
+ (0, class_validator_1.Matches)(regex_1.regexIso8601, { message: 'createdAt debe ser una fecha ISO 8601' }),
177
+ __metadata("design:type", String)
178
+ ], CreditPlan.prototype, "createdAt", void 0);
179
+ __decorate([
180
+ (0, class_transformer_1.Expose)(),
181
+ (0, class_validator_1.IsString)(),
182
+ (0, class_validator_1.Matches)(regex_1.regexIso8601, { message: 'updatedAt debe ser una fecha ISO 8601' }),
183
+ __metadata("design:type", String)
184
+ ], CreditPlan.prototype, "updatedAt", void 0);
@@ -0,0 +1,30 @@
1
+ import { FinancierStatusEnum } from '../enums/FinancierStatusEnum';
2
+ import { FinancierTypeEnum } from '../enums/FinancierTypeEnum';
3
+ import { ProductTierEnum } from '../enums/ProductTierEnum';
4
+ /**
5
+ * Financier — financiera del catálogo mostrado al cliente (modelo-datos §6.3 · M6 §6).
6
+ * Entidad completa del dominio `loan-offerings-business` (SureKeep Fase 1 — pista Loan).
7
+ * SureKeep (INTERNAL) va primero (`displayOrder=1`); las externas después.
8
+ */
9
+ export declare class Financier {
10
+ financierId: string;
11
+ /** Grafía canónica: `SUREKEEP` | `PAYJOY` | `KREDIYA` | `LESPAGO`. */
12
+ code: string;
13
+ name: string;
14
+ type: FinancierTypeEnum;
15
+ /** Orden de presentación en el wizard (M1 paso 4). Reorder renumera. */
16
+ displayOrder: number;
17
+ /** Texto mostrado en el wizard (ej. "RECOMENDADO"). */
18
+ label: string;
19
+ /** Solo EXTERNAL: URL de derivación; `null` para INTERNAL. */
20
+ externalRedirectUrl: string | null;
21
+ /** Gamas que la financiera acepta por defecto; `null` = todas. */
22
+ eligibleTiers: ProductTierEnum[] | null;
23
+ /** Configuración específica por financiera; `null` si no aplica. */
24
+ config: Record<string, unknown> | null;
25
+ status: FinancierStatusEnum;
26
+ createdBy: string;
27
+ updatedBy: string;
28
+ createdAt: string;
29
+ updatedAt: string;
30
+ }
@@ -0,0 +1,103 @@
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.Financier = 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 FinancierStatusEnum_1 = require("../enums/FinancierStatusEnum");
17
+ const FinancierTypeEnum_1 = require("../enums/FinancierTypeEnum");
18
+ const ProductTierEnum_1 = require("../enums/ProductTierEnum");
19
+ /**
20
+ * Financier — financiera del catálogo mostrado al cliente (modelo-datos §6.3 · M6 §6).
21
+ * Entidad completa del dominio `loan-offerings-business` (SureKeep Fase 1 — pista Loan).
22
+ * SureKeep (INTERNAL) va primero (`displayOrder=1`); las externas después.
23
+ */
24
+ class Financier {
25
+ }
26
+ exports.Financier = Financier;
27
+ __decorate([
28
+ (0, class_transformer_1.Expose)(),
29
+ (0, class_validator_1.IsString)(),
30
+ __metadata("design:type", String)
31
+ ], Financier.prototype, "financierId", void 0);
32
+ __decorate([
33
+ (0, class_transformer_1.Expose)(),
34
+ (0, class_validator_1.IsString)(),
35
+ __metadata("design:type", String)
36
+ ], Financier.prototype, "code", void 0);
37
+ __decorate([
38
+ (0, class_transformer_1.Expose)(),
39
+ (0, class_validator_1.IsString)(),
40
+ __metadata("design:type", String)
41
+ ], Financier.prototype, "name", void 0);
42
+ __decorate([
43
+ (0, class_transformer_1.Expose)(),
44
+ (0, class_validator_1.IsEnum)(FinancierTypeEnum_1.FinancierTypeEnum),
45
+ __metadata("design:type", String)
46
+ ], Financier.prototype, "type", void 0);
47
+ __decorate([
48
+ (0, class_transformer_1.Expose)(),
49
+ (0, class_validator_1.IsInt)(),
50
+ (0, class_validator_1.Min)(1),
51
+ __metadata("design:type", Number)
52
+ ], Financier.prototype, "displayOrder", void 0);
53
+ __decorate([
54
+ (0, class_transformer_1.Expose)(),
55
+ (0, class_validator_1.IsString)(),
56
+ __metadata("design:type", String)
57
+ ], Financier.prototype, "label", void 0);
58
+ __decorate([
59
+ (0, class_transformer_1.Expose)(),
60
+ (0, class_validator_1.IsOptional)(),
61
+ (0, class_validator_1.IsString)(),
62
+ __metadata("design:type", String)
63
+ ], Financier.prototype, "externalRedirectUrl", void 0);
64
+ __decorate([
65
+ (0, class_transformer_1.Expose)(),
66
+ (0, class_validator_1.IsOptional)(),
67
+ (0, class_validator_1.IsArray)(),
68
+ (0, class_validator_1.IsEnum)(ProductTierEnum_1.ProductTierEnum, { each: true }),
69
+ __metadata("design:type", Array)
70
+ ], Financier.prototype, "eligibleTiers", void 0);
71
+ __decorate([
72
+ (0, class_transformer_1.Expose)(),
73
+ (0, class_validator_1.IsOptional)(),
74
+ (0, class_validator_1.IsObject)(),
75
+ __metadata("design:type", Object)
76
+ ], Financier.prototype, "config", void 0);
77
+ __decorate([
78
+ (0, class_transformer_1.Expose)(),
79
+ (0, class_validator_1.IsEnum)(FinancierStatusEnum_1.FinancierStatusEnum),
80
+ __metadata("design:type", String)
81
+ ], Financier.prototype, "status", void 0);
82
+ __decorate([
83
+ (0, class_transformer_1.Expose)(),
84
+ (0, class_validator_1.IsString)(),
85
+ __metadata("design:type", String)
86
+ ], Financier.prototype, "createdBy", void 0);
87
+ __decorate([
88
+ (0, class_transformer_1.Expose)(),
89
+ (0, class_validator_1.IsString)(),
90
+ __metadata("design:type", String)
91
+ ], Financier.prototype, "updatedBy", void 0);
92
+ __decorate([
93
+ (0, class_transformer_1.Expose)(),
94
+ (0, class_validator_1.IsString)(),
95
+ (0, class_validator_1.Matches)(regex_1.regexIso8601, { message: 'createdAt debe ser una fecha ISO 8601' }),
96
+ __metadata("design:type", String)
97
+ ], Financier.prototype, "createdAt", void 0);
98
+ __decorate([
99
+ (0, class_transformer_1.Expose)(),
100
+ (0, class_validator_1.IsString)(),
101
+ (0, class_validator_1.Matches)(regex_1.regexIso8601, { message: 'updatedAt debe ser una fecha ISO 8601' }),
102
+ __metadata("design:type", String)
103
+ ], Financier.prototype, "updatedAt", void 0);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * RetailerCreditPlan — enlace M:N "qué planes ofrece cada retailer" (modelo-datos §6.2).
3
+ * Activación explícita e idempotente por retailer. Entidad del dominio `loan-offerings-business`.
4
+ */
5
+ export declare class RetailerCreditPlan {
6
+ retailerId: string;
7
+ planId: string;
8
+ active: boolean;
9
+ activatedAt: string | null;
10
+ deactivatedAt: string | null;
11
+ createdBy: string;
12
+ updatedBy: string;
13
+ createdAt: string;
14
+ updatedAt: string;
15
+ }
@@ -0,0 +1,71 @@
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.RetailerCreditPlan = 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
+ /**
17
+ * RetailerCreditPlan — enlace M:N "qué planes ofrece cada retailer" (modelo-datos §6.2).
18
+ * Activación explícita e idempotente por retailer. Entidad del dominio `loan-offerings-business`.
19
+ */
20
+ class RetailerCreditPlan {
21
+ }
22
+ exports.RetailerCreditPlan = RetailerCreditPlan;
23
+ __decorate([
24
+ (0, class_transformer_1.Expose)(),
25
+ (0, class_validator_1.IsString)(),
26
+ __metadata("design:type", String)
27
+ ], RetailerCreditPlan.prototype, "retailerId", void 0);
28
+ __decorate([
29
+ (0, class_transformer_1.Expose)(),
30
+ (0, class_validator_1.IsString)(),
31
+ __metadata("design:type", String)
32
+ ], RetailerCreditPlan.prototype, "planId", void 0);
33
+ __decorate([
34
+ (0, class_transformer_1.Expose)(),
35
+ (0, class_validator_1.IsBoolean)(),
36
+ __metadata("design:type", Boolean)
37
+ ], RetailerCreditPlan.prototype, "active", void 0);
38
+ __decorate([
39
+ (0, class_transformer_1.Expose)(),
40
+ (0, class_validator_1.IsOptional)(),
41
+ (0, class_validator_1.IsString)(),
42
+ __metadata("design:type", String)
43
+ ], RetailerCreditPlan.prototype, "activatedAt", void 0);
44
+ __decorate([
45
+ (0, class_transformer_1.Expose)(),
46
+ (0, class_validator_1.IsOptional)(),
47
+ (0, class_validator_1.IsString)(),
48
+ __metadata("design:type", String)
49
+ ], RetailerCreditPlan.prototype, "deactivatedAt", void 0);
50
+ __decorate([
51
+ (0, class_transformer_1.Expose)(),
52
+ (0, class_validator_1.IsString)(),
53
+ __metadata("design:type", String)
54
+ ], RetailerCreditPlan.prototype, "createdBy", void 0);
55
+ __decorate([
56
+ (0, class_transformer_1.Expose)(),
57
+ (0, class_validator_1.IsString)(),
58
+ __metadata("design:type", String)
59
+ ], RetailerCreditPlan.prototype, "updatedBy", void 0);
60
+ __decorate([
61
+ (0, class_transformer_1.Expose)(),
62
+ (0, class_validator_1.IsString)(),
63
+ (0, class_validator_1.Matches)(regex_1.regexIso8601, { message: 'createdAt debe ser una fecha ISO 8601' }),
64
+ __metadata("design:type", String)
65
+ ], RetailerCreditPlan.prototype, "createdAt", void 0);
66
+ __decorate([
67
+ (0, class_transformer_1.Expose)(),
68
+ (0, class_validator_1.IsString)(),
69
+ (0, class_validator_1.Matches)(regex_1.regexIso8601, { message: 'updatedAt debe ser una fecha ISO 8601' }),
70
+ __metadata("design:type", String)
71
+ ], RetailerCreditPlan.prototype, "updatedAt", void 0);
@@ -0,0 +1,8 @@
1
+ import { CreditPlanStatusEnum } from '../../enums/CreditPlanStatusEnum';
2
+ /**
3
+ * Body de PUT /credit-plans/:planId/status — activar / inactivar un plan.
4
+ * Desactivar no afecta créditos existentes; solo deja de estar disponible para nuevas ventas.
5
+ */
6
+ export declare class ChangeCreditPlanStatusRequest {
7
+ status: CreditPlanStatusEnum;
8
+ }
@@ -0,0 +1,27 @@
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.ChangeCreditPlanStatusRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const CreditPlanStatusEnum_1 = require("../../enums/CreditPlanStatusEnum");
16
+ /**
17
+ * Body de PUT /credit-plans/:planId/status — activar / inactivar un plan.
18
+ * Desactivar no afecta créditos existentes; solo deja de estar disponible para nuevas ventas.
19
+ */
20
+ class ChangeCreditPlanStatusRequest {
21
+ }
22
+ exports.ChangeCreditPlanStatusRequest = ChangeCreditPlanStatusRequest;
23
+ __decorate([
24
+ (0, class_transformer_1.Expose)(),
25
+ (0, class_validator_1.IsEnum)(CreditPlanStatusEnum_1.CreditPlanStatusEnum),
26
+ __metadata("design:type", String)
27
+ ], ChangeCreditPlanStatusRequest.prototype, "status", void 0);
@@ -0,0 +1,8 @@
1
+ import { FinancierStatusEnum } from '../../enums/FinancierStatusEnum';
2
+ /**
3
+ * Body de PUT /financiers/:financierId/status — activar / inactivar una financiera.
4
+ * Desactivar la quita del wizard sin afectar créditos existentes (M6 §6).
5
+ */
6
+ export declare class ChangeFinancierStatusRequest {
7
+ status: FinancierStatusEnum;
8
+ }
@@ -0,0 +1,27 @@
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.ChangeFinancierStatusRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const FinancierStatusEnum_1 = require("../../enums/FinancierStatusEnum");
16
+ /**
17
+ * Body de PUT /financiers/:financierId/status — activar / inactivar una financiera.
18
+ * Desactivar la quita del wizard sin afectar créditos existentes (M6 §6).
19
+ */
20
+ class ChangeFinancierStatusRequest {
21
+ }
22
+ exports.ChangeFinancierStatusRequest = ChangeFinancierStatusRequest;
23
+ __decorate([
24
+ (0, class_transformer_1.Expose)(),
25
+ (0, class_validator_1.IsEnum)(FinancierStatusEnum_1.FinancierStatusEnum),
26
+ __metadata("design:type", String)
27
+ ], ChangeFinancierStatusRequest.prototype, "status", void 0);
@@ -0,0 +1,27 @@
1
+ import { CreditPlanLevelEnum } from '../../enums/CreditPlanLevelEnum';
2
+ import { ProductTierEnum } from '../../enums/ProductTierEnum';
3
+ import { SaleTypeEnum } from '../../enums/SaleTypeEnum';
4
+ /**
5
+ * Body de POST /credit-plans — alta de un plan (SureKeep Fase 1 — pista Loan).
6
+ * Campos server-assigned (`planId`, `version`, `ivaOnInterest`=0.16, `status`, auditoría) NO viajan
7
+ * en el request: los asigna el lambda. `tnaAnnual` en decimal; rango de negocio [2.00, 2.60].
8
+ */
9
+ export declare class CreateCreditPlanRequest {
10
+ code: string;
11
+ name: string;
12
+ description: string;
13
+ level: CreditPlanLevelEnum;
14
+ saleTypes: SaleTypeEnum[];
15
+ eligibleTiers?: ProductTierEnum[] | null;
16
+ minDownPaymentPct: number;
17
+ maxDownPaymentPct?: number | null;
18
+ termWeeksOptions: number[];
19
+ maxFinancedAmountCents: number;
20
+ tnaAnnual: number;
21
+ openingCommissionPct?: number;
22
+ paymentShift?: boolean;
23
+ minSciScore?: number | null;
24
+ maxSciScore?: number | null;
25
+ validFrom?: string | null;
26
+ validUntil?: string | null;
27
+ }
@@ -0,0 +1,137 @@
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.CreateCreditPlanRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const CreditPlanLevelEnum_1 = require("../../enums/CreditPlanLevelEnum");
16
+ const ProductTierEnum_1 = require("../../enums/ProductTierEnum");
17
+ const SaleTypeEnum_1 = require("../../enums/SaleTypeEnum");
18
+ /**
19
+ * Body de POST /credit-plans — alta de un plan (SureKeep Fase 1 — pista Loan).
20
+ * Campos server-assigned (`planId`, `version`, `ivaOnInterest`=0.16, `status`, auditoría) NO viajan
21
+ * en el request: los asigna el lambda. `tnaAnnual` en decimal; rango de negocio [2.00, 2.60].
22
+ */
23
+ class CreateCreditPlanRequest {
24
+ }
25
+ exports.CreateCreditPlanRequest = CreateCreditPlanRequest;
26
+ __decorate([
27
+ (0, class_transformer_1.Expose)(),
28
+ (0, class_validator_1.IsString)(),
29
+ __metadata("design:type", String)
30
+ ], CreateCreditPlanRequest.prototype, "code", void 0);
31
+ __decorate([
32
+ (0, class_transformer_1.Expose)(),
33
+ (0, class_validator_1.IsString)(),
34
+ __metadata("design:type", String)
35
+ ], CreateCreditPlanRequest.prototype, "name", void 0);
36
+ __decorate([
37
+ (0, class_transformer_1.Expose)(),
38
+ (0, class_validator_1.IsString)(),
39
+ __metadata("design:type", String)
40
+ ], CreateCreditPlanRequest.prototype, "description", void 0);
41
+ __decorate([
42
+ (0, class_transformer_1.Expose)(),
43
+ (0, class_validator_1.IsEnum)(CreditPlanLevelEnum_1.CreditPlanLevelEnum),
44
+ __metadata("design:type", String)
45
+ ], CreateCreditPlanRequest.prototype, "level", void 0);
46
+ __decorate([
47
+ (0, class_transformer_1.Expose)(),
48
+ (0, class_validator_1.IsArray)(),
49
+ (0, class_validator_1.ArrayNotEmpty)(),
50
+ (0, class_validator_1.IsEnum)(SaleTypeEnum_1.SaleTypeEnum, { each: true }),
51
+ __metadata("design:type", Array)
52
+ ], CreateCreditPlanRequest.prototype, "saleTypes", void 0);
53
+ __decorate([
54
+ (0, class_transformer_1.Expose)(),
55
+ (0, class_validator_1.IsOptional)(),
56
+ (0, class_validator_1.IsArray)(),
57
+ (0, class_validator_1.IsEnum)(ProductTierEnum_1.ProductTierEnum, { each: true }),
58
+ __metadata("design:type", Array)
59
+ ], CreateCreditPlanRequest.prototype, "eligibleTiers", void 0);
60
+ __decorate([
61
+ (0, class_transformer_1.Expose)(),
62
+ (0, class_validator_1.IsNumber)(),
63
+ (0, class_validator_1.Min)(0),
64
+ (0, class_validator_1.Max)(1),
65
+ __metadata("design:type", Number)
66
+ ], CreateCreditPlanRequest.prototype, "minDownPaymentPct", void 0);
67
+ __decorate([
68
+ (0, class_transformer_1.Expose)(),
69
+ (0, class_validator_1.IsOptional)(),
70
+ (0, class_validator_1.IsNumber)(),
71
+ (0, class_validator_1.Min)(0),
72
+ (0, class_validator_1.Max)(1),
73
+ __metadata("design:type", Number)
74
+ ], CreateCreditPlanRequest.prototype, "maxDownPaymentPct", void 0);
75
+ __decorate([
76
+ (0, class_transformer_1.Expose)(),
77
+ (0, class_validator_1.IsArray)(),
78
+ (0, class_validator_1.ArrayNotEmpty)(),
79
+ (0, class_validator_1.IsInt)({ each: true }),
80
+ (0, class_validator_1.Min)(1, { each: true }),
81
+ __metadata("design:type", Array)
82
+ ], CreateCreditPlanRequest.prototype, "termWeeksOptions", void 0);
83
+ __decorate([
84
+ (0, class_transformer_1.Expose)(),
85
+ (0, class_validator_1.IsInt)(),
86
+ (0, class_validator_1.Min)(0),
87
+ __metadata("design:type", Number)
88
+ ], CreateCreditPlanRequest.prototype, "maxFinancedAmountCents", void 0);
89
+ __decorate([
90
+ (0, class_transformer_1.Expose)(),
91
+ (0, class_validator_1.IsNumber)(),
92
+ (0, class_validator_1.Min)(2.0),
93
+ (0, class_validator_1.Max)(2.6),
94
+ __metadata("design:type", Number)
95
+ ], CreateCreditPlanRequest.prototype, "tnaAnnual", void 0);
96
+ __decorate([
97
+ (0, class_transformer_1.Expose)(),
98
+ (0, class_validator_1.IsOptional)(),
99
+ (0, class_validator_1.IsNumber)(),
100
+ (0, class_validator_1.Min)(0),
101
+ (0, class_validator_1.Max)(1),
102
+ __metadata("design:type", Number)
103
+ ], CreateCreditPlanRequest.prototype, "openingCommissionPct", void 0);
104
+ __decorate([
105
+ (0, class_transformer_1.Expose)(),
106
+ (0, class_validator_1.IsOptional)(),
107
+ (0, class_validator_1.IsBoolean)(),
108
+ __metadata("design:type", Boolean)
109
+ ], CreateCreditPlanRequest.prototype, "paymentShift", void 0);
110
+ __decorate([
111
+ (0, class_transformer_1.Expose)(),
112
+ (0, class_validator_1.IsOptional)(),
113
+ (0, class_validator_1.IsInt)(),
114
+ (0, class_validator_1.Min)(0),
115
+ (0, class_validator_1.Max)(100),
116
+ __metadata("design:type", Number)
117
+ ], CreateCreditPlanRequest.prototype, "minSciScore", void 0);
118
+ __decorate([
119
+ (0, class_transformer_1.Expose)(),
120
+ (0, class_validator_1.IsOptional)(),
121
+ (0, class_validator_1.IsInt)(),
122
+ (0, class_validator_1.Min)(0),
123
+ (0, class_validator_1.Max)(100),
124
+ __metadata("design:type", Number)
125
+ ], CreateCreditPlanRequest.prototype, "maxSciScore", void 0);
126
+ __decorate([
127
+ (0, class_transformer_1.Expose)(),
128
+ (0, class_validator_1.IsOptional)(),
129
+ (0, class_validator_1.IsString)(),
130
+ __metadata("design:type", String)
131
+ ], CreateCreditPlanRequest.prototype, "validFrom", void 0);
132
+ __decorate([
133
+ (0, class_transformer_1.Expose)(),
134
+ (0, class_validator_1.IsOptional)(),
135
+ (0, class_validator_1.IsString)(),
136
+ __metadata("design:type", String)
137
+ ], CreateCreditPlanRequest.prototype, "validUntil", void 0);
@@ -0,0 +1,17 @@
1
+ import { FinancierTypeEnum } from '../../enums/FinancierTypeEnum';
2
+ import { ProductTierEnum } from '../../enums/ProductTierEnum';
3
+ /**
4
+ * Body de POST /financiers — alta de una financiera (SureKeep Fase 1 — pista Loan).
5
+ * `financierId` y auditoría los asigna el lambda; `status` default ACTIVE. `displayOrder` opcional
6
+ * (si no viene, se coloca al final del catálogo).
7
+ */
8
+ export declare class CreateFinancierRequest {
9
+ code: string;
10
+ name: string;
11
+ type: FinancierTypeEnum;
12
+ displayOrder?: number;
13
+ label: string;
14
+ externalRedirectUrl?: string | null;
15
+ eligibleTiers?: ProductTierEnum[] | null;
16
+ config?: Record<string, unknown> | null;
17
+ }