@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,70 @@
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.CreateFinancierRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const FinancierTypeEnum_1 = require("../../enums/FinancierTypeEnum");
16
+ const ProductTierEnum_1 = require("../../enums/ProductTierEnum");
17
+ /**
18
+ * Body de POST /financiers — alta de una financiera (SureKeep Fase 1 — pista Loan).
19
+ * `financierId` y auditoría los asigna el lambda; `status` default ACTIVE. `displayOrder` opcional
20
+ * (si no viene, se coloca al final del catálogo).
21
+ */
22
+ class CreateFinancierRequest {
23
+ }
24
+ exports.CreateFinancierRequest = CreateFinancierRequest;
25
+ __decorate([
26
+ (0, class_transformer_1.Expose)(),
27
+ (0, class_validator_1.IsString)(),
28
+ __metadata("design:type", String)
29
+ ], CreateFinancierRequest.prototype, "code", void 0);
30
+ __decorate([
31
+ (0, class_transformer_1.Expose)(),
32
+ (0, class_validator_1.IsString)(),
33
+ __metadata("design:type", String)
34
+ ], CreateFinancierRequest.prototype, "name", void 0);
35
+ __decorate([
36
+ (0, class_transformer_1.Expose)(),
37
+ (0, class_validator_1.IsEnum)(FinancierTypeEnum_1.FinancierTypeEnum),
38
+ __metadata("design:type", String)
39
+ ], CreateFinancierRequest.prototype, "type", void 0);
40
+ __decorate([
41
+ (0, class_transformer_1.Expose)(),
42
+ (0, class_validator_1.IsOptional)(),
43
+ (0, class_validator_1.IsInt)(),
44
+ (0, class_validator_1.Min)(1),
45
+ __metadata("design:type", Number)
46
+ ], CreateFinancierRequest.prototype, "displayOrder", void 0);
47
+ __decorate([
48
+ (0, class_transformer_1.Expose)(),
49
+ (0, class_validator_1.IsString)(),
50
+ __metadata("design:type", String)
51
+ ], CreateFinancierRequest.prototype, "label", void 0);
52
+ __decorate([
53
+ (0, class_transformer_1.Expose)(),
54
+ (0, class_validator_1.IsOptional)(),
55
+ (0, class_validator_1.IsString)(),
56
+ __metadata("design:type", String)
57
+ ], CreateFinancierRequest.prototype, "externalRedirectUrl", void 0);
58
+ __decorate([
59
+ (0, class_transformer_1.Expose)(),
60
+ (0, class_validator_1.IsOptional)(),
61
+ (0, class_validator_1.IsArray)(),
62
+ (0, class_validator_1.IsEnum)(ProductTierEnum_1.ProductTierEnum, { each: true }),
63
+ __metadata("design:type", Array)
64
+ ], CreateFinancierRequest.prototype, "eligibleTiers", void 0);
65
+ __decorate([
66
+ (0, class_transformer_1.Expose)(),
67
+ (0, class_validator_1.IsOptional)(),
68
+ (0, class_validator_1.IsObject)(),
69
+ __metadata("design:type", Object)
70
+ ], CreateFinancierRequest.prototype, "config", void 0);
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Body de PUT /financiers/:financierId/reorder — nueva posición en el catálogo.
3
+ * El lambda renumera el resto de forma contigua (M6 §6 · flow 06 §6.2.1).
4
+ */
5
+ export declare class ReorderFinancierRequest {
6
+ displayOrder: number;
7
+ }
@@ -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.ReorderFinancierRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ /**
16
+ * Body de PUT /financiers/:financierId/reorder — nueva posición en el catálogo.
17
+ * El lambda renumera el resto de forma contigua (M6 §6 · flow 06 §6.2.1).
18
+ */
19
+ class ReorderFinancierRequest {
20
+ }
21
+ exports.ReorderFinancierRequest = ReorderFinancierRequest;
22
+ __decorate([
23
+ (0, class_transformer_1.Expose)(),
24
+ (0, class_validator_1.IsInt)(),
25
+ (0, class_validator_1.Min)(1),
26
+ __metadata("design:type", Number)
27
+ ], ReorderFinancierRequest.prototype, "displayOrder", void 0);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Body de POST /private/credit-plans/:planId/simulate y query de GET /credit-plans/:planId/simulator.
3
+ * Entradas del simulador de cuota (flow 06 §6.1.4). `productPriceCents` en cents; `downPaymentPct`
4
+ * decimal sobre 1. `customerSciScore` opcional: si viene, se valida contra el rango SCI del plan.
5
+ */
6
+ export declare class SimulateCreditPlanRequest {
7
+ productPriceCents: number;
8
+ downPaymentPct: number;
9
+ termWeeks: number;
10
+ customerSciScore?: number;
11
+ }
@@ -0,0 +1,49 @@
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.SimulateCreditPlanRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ /**
16
+ * Body de POST /private/credit-plans/:planId/simulate y query de GET /credit-plans/:planId/simulator.
17
+ * Entradas del simulador de cuota (flow 06 §6.1.4). `productPriceCents` en cents; `downPaymentPct`
18
+ * decimal sobre 1. `customerSciScore` opcional: si viene, se valida contra el rango SCI del plan.
19
+ */
20
+ class SimulateCreditPlanRequest {
21
+ }
22
+ exports.SimulateCreditPlanRequest = SimulateCreditPlanRequest;
23
+ __decorate([
24
+ (0, class_transformer_1.Expose)(),
25
+ (0, class_validator_1.IsInt)(),
26
+ (0, class_validator_1.Min)(1),
27
+ __metadata("design:type", Number)
28
+ ], SimulateCreditPlanRequest.prototype, "productPriceCents", void 0);
29
+ __decorate([
30
+ (0, class_transformer_1.Expose)(),
31
+ (0, class_validator_1.IsNumber)(),
32
+ (0, class_validator_1.Min)(0),
33
+ (0, class_validator_1.Max)(1),
34
+ __metadata("design:type", Number)
35
+ ], SimulateCreditPlanRequest.prototype, "downPaymentPct", void 0);
36
+ __decorate([
37
+ (0, class_transformer_1.Expose)(),
38
+ (0, class_validator_1.IsInt)(),
39
+ (0, class_validator_1.Min)(1),
40
+ __metadata("design:type", Number)
41
+ ], SimulateCreditPlanRequest.prototype, "termWeeks", void 0);
42
+ __decorate([
43
+ (0, class_transformer_1.Expose)(),
44
+ (0, class_validator_1.IsOptional)(),
45
+ (0, class_validator_1.IsInt)(),
46
+ (0, class_validator_1.Min)(0),
47
+ (0, class_validator_1.Max)(100),
48
+ __metadata("design:type", Number)
49
+ ], SimulateCreditPlanRequest.prototype, "customerSciScore", void 0);
@@ -0,0 +1,25 @@
1
+ import { ProductTierEnum } from '../../enums/ProductTierEnum';
2
+ import { SaleTypeEnum } from '../../enums/SaleTypeEnum';
3
+ /**
4
+ * Body de PUT /credit-plans/:planId — edición parcial de parámetros del plan (todos opcionales).
5
+ * En F1 el PUT puede editar `min/maxSciScore` por-plan (DEC-004); el guard atómico anti-huecos
6
+ * entre planes (21-100) es F2/F3. El cambio de `status` va por su endpoint dedicado.
7
+ * `code` y `level` no se editan aquí (identidad/segmentación del plan).
8
+ */
9
+ export declare class UpdateCreditPlanRequest {
10
+ name?: string;
11
+ description?: string;
12
+ saleTypes?: SaleTypeEnum[];
13
+ eligibleTiers?: ProductTierEnum[] | null;
14
+ minDownPaymentPct?: number;
15
+ maxDownPaymentPct?: number | null;
16
+ termWeeksOptions?: number[];
17
+ maxFinancedAmountCents?: number;
18
+ tnaAnnual?: number;
19
+ openingCommissionPct?: number;
20
+ paymentShift?: boolean;
21
+ minSciScore?: number | null;
22
+ maxSciScore?: number | null;
23
+ validFrom?: string | null;
24
+ validUntil?: string | null;
25
+ }
@@ -0,0 +1,134 @@
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.UpdateCreditPlanRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const ProductTierEnum_1 = require("../../enums/ProductTierEnum");
16
+ const SaleTypeEnum_1 = require("../../enums/SaleTypeEnum");
17
+ /**
18
+ * Body de PUT /credit-plans/:planId — edición parcial de parámetros del plan (todos opcionales).
19
+ * En F1 el PUT puede editar `min/maxSciScore` por-plan (DEC-004); el guard atómico anti-huecos
20
+ * entre planes (21-100) es F2/F3. El cambio de `status` va por su endpoint dedicado.
21
+ * `code` y `level` no se editan aquí (identidad/segmentación del plan).
22
+ */
23
+ class UpdateCreditPlanRequest {
24
+ }
25
+ exports.UpdateCreditPlanRequest = UpdateCreditPlanRequest;
26
+ __decorate([
27
+ (0, class_transformer_1.Expose)(),
28
+ (0, class_validator_1.IsOptional)(),
29
+ (0, class_validator_1.IsString)(),
30
+ __metadata("design:type", String)
31
+ ], UpdateCreditPlanRequest.prototype, "name", void 0);
32
+ __decorate([
33
+ (0, class_transformer_1.Expose)(),
34
+ (0, class_validator_1.IsOptional)(),
35
+ (0, class_validator_1.IsString)(),
36
+ __metadata("design:type", String)
37
+ ], UpdateCreditPlanRequest.prototype, "description", void 0);
38
+ __decorate([
39
+ (0, class_transformer_1.Expose)(),
40
+ (0, class_validator_1.IsOptional)(),
41
+ (0, class_validator_1.IsArray)(),
42
+ (0, class_validator_1.ArrayNotEmpty)(),
43
+ (0, class_validator_1.IsEnum)(SaleTypeEnum_1.SaleTypeEnum, { each: true }),
44
+ __metadata("design:type", Array)
45
+ ], UpdateCreditPlanRequest.prototype, "saleTypes", void 0);
46
+ __decorate([
47
+ (0, class_transformer_1.Expose)(),
48
+ (0, class_validator_1.IsOptional)(),
49
+ (0, class_validator_1.IsArray)(),
50
+ (0, class_validator_1.IsEnum)(ProductTierEnum_1.ProductTierEnum, { each: true }),
51
+ __metadata("design:type", Array)
52
+ ], UpdateCreditPlanRequest.prototype, "eligibleTiers", void 0);
53
+ __decorate([
54
+ (0, class_transformer_1.Expose)(),
55
+ (0, class_validator_1.IsOptional)(),
56
+ (0, class_validator_1.IsNumber)(),
57
+ (0, class_validator_1.Min)(0),
58
+ (0, class_validator_1.Max)(1),
59
+ __metadata("design:type", Number)
60
+ ], UpdateCreditPlanRequest.prototype, "minDownPaymentPct", void 0);
61
+ __decorate([
62
+ (0, class_transformer_1.Expose)(),
63
+ (0, class_validator_1.IsOptional)(),
64
+ (0, class_validator_1.IsNumber)(),
65
+ (0, class_validator_1.Min)(0),
66
+ (0, class_validator_1.Max)(1),
67
+ __metadata("design:type", Number)
68
+ ], UpdateCreditPlanRequest.prototype, "maxDownPaymentPct", void 0);
69
+ __decorate([
70
+ (0, class_transformer_1.Expose)(),
71
+ (0, class_validator_1.IsOptional)(),
72
+ (0, class_validator_1.IsArray)(),
73
+ (0, class_validator_1.ArrayNotEmpty)(),
74
+ (0, class_validator_1.IsInt)({ each: true }),
75
+ (0, class_validator_1.Min)(1, { each: true }),
76
+ __metadata("design:type", Array)
77
+ ], UpdateCreditPlanRequest.prototype, "termWeeksOptions", void 0);
78
+ __decorate([
79
+ (0, class_transformer_1.Expose)(),
80
+ (0, class_validator_1.IsOptional)(),
81
+ (0, class_validator_1.IsInt)(),
82
+ (0, class_validator_1.Min)(0),
83
+ __metadata("design:type", Number)
84
+ ], UpdateCreditPlanRequest.prototype, "maxFinancedAmountCents", void 0);
85
+ __decorate([
86
+ (0, class_transformer_1.Expose)(),
87
+ (0, class_validator_1.IsOptional)(),
88
+ (0, class_validator_1.IsNumber)(),
89
+ (0, class_validator_1.Min)(2.0),
90
+ (0, class_validator_1.Max)(2.6),
91
+ __metadata("design:type", Number)
92
+ ], UpdateCreditPlanRequest.prototype, "tnaAnnual", void 0);
93
+ __decorate([
94
+ (0, class_transformer_1.Expose)(),
95
+ (0, class_validator_1.IsOptional)(),
96
+ (0, class_validator_1.IsNumber)(),
97
+ (0, class_validator_1.Min)(0),
98
+ (0, class_validator_1.Max)(1),
99
+ __metadata("design:type", Number)
100
+ ], UpdateCreditPlanRequest.prototype, "openingCommissionPct", void 0);
101
+ __decorate([
102
+ (0, class_transformer_1.Expose)(),
103
+ (0, class_validator_1.IsOptional)(),
104
+ (0, class_validator_1.IsBoolean)(),
105
+ __metadata("design:type", Boolean)
106
+ ], UpdateCreditPlanRequest.prototype, "paymentShift", void 0);
107
+ __decorate([
108
+ (0, class_transformer_1.Expose)(),
109
+ (0, class_validator_1.IsOptional)(),
110
+ (0, class_validator_1.IsInt)(),
111
+ (0, class_validator_1.Min)(0),
112
+ (0, class_validator_1.Max)(100),
113
+ __metadata("design:type", Number)
114
+ ], UpdateCreditPlanRequest.prototype, "minSciScore", void 0);
115
+ __decorate([
116
+ (0, class_transformer_1.Expose)(),
117
+ (0, class_validator_1.IsOptional)(),
118
+ (0, class_validator_1.IsInt)(),
119
+ (0, class_validator_1.Min)(0),
120
+ (0, class_validator_1.Max)(100),
121
+ __metadata("design:type", Number)
122
+ ], UpdateCreditPlanRequest.prototype, "maxSciScore", void 0);
123
+ __decorate([
124
+ (0, class_transformer_1.Expose)(),
125
+ (0, class_validator_1.IsOptional)(),
126
+ (0, class_validator_1.IsString)(),
127
+ __metadata("design:type", String)
128
+ ], UpdateCreditPlanRequest.prototype, "validFrom", void 0);
129
+ __decorate([
130
+ (0, class_transformer_1.Expose)(),
131
+ (0, class_validator_1.IsOptional)(),
132
+ (0, class_validator_1.IsString)(),
133
+ __metadata("design:type", String)
134
+ ], UpdateCreditPlanRequest.prototype, "validUntil", void 0);
@@ -0,0 +1,12 @@
1
+ import { ProductTierEnum } from '../../enums/ProductTierEnum';
2
+ /**
3
+ * Body de PUT /financiers/:financierId — edición parcial (todos opcionales).
4
+ * `code`, `type` y `displayOrder` no se editan aquí (identidad / orden por endpoint dedicado).
5
+ */
6
+ export declare class UpdateFinancierRequest {
7
+ name?: string;
8
+ label?: string;
9
+ externalRedirectUrl?: string | null;
10
+ eligibleTiers?: ProductTierEnum[] | null;
11
+ config?: Record<string, unknown> | null;
12
+ }
@@ -0,0 +1,53 @@
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.UpdateFinancierRequest = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const ProductTierEnum_1 = require("../../enums/ProductTierEnum");
16
+ /**
17
+ * Body de PUT /financiers/:financierId — edición parcial (todos opcionales).
18
+ * `code`, `type` y `displayOrder` no se editan aquí (identidad / orden por endpoint dedicado).
19
+ */
20
+ class UpdateFinancierRequest {
21
+ }
22
+ exports.UpdateFinancierRequest = UpdateFinancierRequest;
23
+ __decorate([
24
+ (0, class_transformer_1.Expose)(),
25
+ (0, class_validator_1.IsOptional)(),
26
+ (0, class_validator_1.IsString)(),
27
+ __metadata("design:type", String)
28
+ ], UpdateFinancierRequest.prototype, "name", void 0);
29
+ __decorate([
30
+ (0, class_transformer_1.Expose)(),
31
+ (0, class_validator_1.IsOptional)(),
32
+ (0, class_validator_1.IsString)(),
33
+ __metadata("design:type", String)
34
+ ], UpdateFinancierRequest.prototype, "label", void 0);
35
+ __decorate([
36
+ (0, class_transformer_1.Expose)(),
37
+ (0, class_validator_1.IsOptional)(),
38
+ (0, class_validator_1.IsString)(),
39
+ __metadata("design:type", String)
40
+ ], UpdateFinancierRequest.prototype, "externalRedirectUrl", void 0);
41
+ __decorate([
42
+ (0, class_transformer_1.Expose)(),
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_validator_1.IsArray)(),
45
+ (0, class_validator_1.IsEnum)(ProductTierEnum_1.ProductTierEnum, { each: true }),
46
+ __metadata("design:type", Array)
47
+ ], UpdateFinancierRequest.prototype, "eligibleTiers", void 0);
48
+ __decorate([
49
+ (0, class_transformer_1.Expose)(),
50
+ (0, class_validator_1.IsOptional)(),
51
+ (0, class_validator_1.IsObject)(),
52
+ __metadata("design:type", Object)
53
+ ], UpdateFinancierRequest.prototype, "config", void 0);
@@ -0,0 +1,35 @@
1
+ import { CreditPlanLevelEnum } from '../../enums/CreditPlanLevelEnum';
2
+ import { CreditPlanStatusEnum } from '../../enums/CreditPlanStatusEnum';
3
+ import { ProductTierEnum } from '../../enums/ProductTierEnum';
4
+ import { SaleTypeEnum } from '../../enums/SaleTypeEnum';
5
+ /**
6
+ * Shape de salida de un plan de crédito (GET / POST / PUT de /credit-plans).
7
+ * Montos en cents; porcentajes y TNA en decimal.
8
+ */
9
+ export interface CreditPlanResponse {
10
+ planId: string;
11
+ code: string;
12
+ name: string;
13
+ description: string;
14
+ level: CreditPlanLevelEnum;
15
+ saleTypes: SaleTypeEnum[];
16
+ eligibleTiers: ProductTierEnum[] | null;
17
+ minDownPaymentPct: number;
18
+ maxDownPaymentPct: number | null;
19
+ termWeeksOptions: number[];
20
+ maxFinancedAmountCents: number;
21
+ tnaAnnual: number;
22
+ ivaOnInterest: number;
23
+ openingCommissionPct: number;
24
+ paymentShift: boolean;
25
+ minSciScore: number | null;
26
+ maxSciScore: number | null;
27
+ version: number;
28
+ validFrom: string | null;
29
+ validUntil: string | null;
30
+ status: CreditPlanStatusEnum;
31
+ createdBy: string;
32
+ updatedBy: string;
33
+ createdAt: string;
34
+ updatedAt: string;
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { FinancierStatusEnum } from '../../enums/FinancierStatusEnum';
2
+ import { FinancierTypeEnum } from '../../enums/FinancierTypeEnum';
3
+ import { ProductTierEnum } from '../../enums/ProductTierEnum';
4
+ /**
5
+ * Shape de salida de una financiera (GET / POST / PUT de /financiers).
6
+ * Los listados devuelven `FinancierResponse[]` ordenados por `displayOrder`.
7
+ */
8
+ export interface FinancierResponse {
9
+ financierId: string;
10
+ code: string;
11
+ name: string;
12
+ type: FinancierTypeEnum;
13
+ displayOrder: number;
14
+ label: string;
15
+ externalRedirectUrl: string | null;
16
+ eligibleTiers: ProductTierEnum[] | null;
17
+ config: Record<string, unknown> | null;
18
+ status: FinancierStatusEnum;
19
+ createdBy: string;
20
+ updatedBy: string;
21
+ createdAt: string;
22
+ updatedAt: string;
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Shape de salida del enlace M:N retailer↔plan.
3
+ * Devuelto por activate/deactivate, por GET /retailers/:retailerId/credit-plans y por
4
+ * GET /credit-plans/:planId/active-retailers (lista de `RetailerCreditPlanResponse`).
5
+ */
6
+ export interface RetailerCreditPlanResponse {
7
+ retailerId: string;
8
+ planId: string;
9
+ active: boolean;
10
+ activatedAt: string | null;
11
+ deactivatedAt: string | null;
12
+ createdAt: string;
13
+ updatedAt: string;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Un renglón de la tabla de amortización (M2 §3.3). Todos los montos en cents.
3
+ */
4
+ export interface AmortizationRowResponse {
5
+ /** Número de cuota semanal (1-based). */
6
+ week: number;
7
+ capitalCents: number;
8
+ interestCents: number;
9
+ /** IVA 16% sobre el interés de la cuota. */
10
+ ivaCents: number;
11
+ /** capital + interés + IVA de la cuota. */
12
+ totalPaymentCents: number;
13
+ /** Saldo insoluto de capital tras aplicar la cuota. */
14
+ remainingBalanceCents: number;
15
+ }
16
+ /**
17
+ * Resultado del simulador de cuota (POST /private/credit-plans/:planId/simulate,
18
+ * GET /credit-plans/:planId/simulator). Amortización francesa + IVA 16% + comisión de apertura + CAT.
19
+ *
20
+ * NOTA (supuesto F1): `catAnnual` se calcula con la metodología estándar CONDUSEF (TIR anualizada)
21
+ * — pendiente de confirmar fórmula/ejemplos oficiales con Jaime/M2.
22
+ */
23
+ export interface SimulationResultResponse {
24
+ planId: string;
25
+ planCode: string;
26
+ productPriceCents: number;
27
+ downPaymentPct: number;
28
+ downPaymentCents: number;
29
+ /** Capital financiado = precio − enganche (antes de comisión de apertura). */
30
+ financedAmountCents: number;
31
+ openingCommissionCents: number;
32
+ termWeeks: number;
33
+ tnaAnnual: number;
34
+ /** Cuota semanal sin IVA (capital + interés), constante en amortización francesa. */
35
+ weeklyPaymentSinIvaCents: number;
36
+ totalCapitalCents: number;
37
+ totalInterestCents: number;
38
+ totalIvaCents: number;
39
+ /** Total a pagar = capital + interés + IVA (+ comisión de apertura). */
40
+ totalToPayCents: number;
41
+ /** Costo Anual Total (decimal, ej. 2.87 = 287%). Metodología estándar CONDUSEF (supuesto). */
42
+ catAnnual: number;
43
+ schedule: AmortizationRowResponse[];
44
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Nivel de cliente al que aplica un plan de crédito SureKeep (M6 §4/§5 · modelo-datos §6.1).
3
+ * `ALL` = plan que aplica a todos los niveles (Jaime modela EMPLEADO como tipo de venta
4
+ * con nivel "todos", no como un nivel propio — corrección 2026-07-10).
5
+ * @enum {string}
6
+ */
7
+ export declare enum CreditPlanLevelEnum {
8
+ BRONZE = "BRONZE",
9
+ SILVER = "SILVER",
10
+ GOLD = "GOLD",
11
+ ALL = "ALL"
12
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreditPlanLevelEnum = void 0;
4
+ /**
5
+ * Nivel de cliente al que aplica un plan de crédito SureKeep (M6 §4/§5 · modelo-datos §6.1).
6
+ * `ALL` = plan que aplica a todos los niveles (Jaime modela EMPLEADO como tipo de venta
7
+ * con nivel "todos", no como un nivel propio — corrección 2026-07-10).
8
+ * @enum {string}
9
+ */
10
+ var CreditPlanLevelEnum;
11
+ (function (CreditPlanLevelEnum) {
12
+ CreditPlanLevelEnum["BRONZE"] = "BRONZE";
13
+ CreditPlanLevelEnum["SILVER"] = "SILVER";
14
+ CreditPlanLevelEnum["GOLD"] = "GOLD";
15
+ CreditPlanLevelEnum["ALL"] = "ALL";
16
+ })(CreditPlanLevelEnum || (exports.CreditPlanLevelEnum = CreditPlanLevelEnum = {}));
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Estado de un plan de crédito (modelo-datos §6.1). Soft-delete vía status (nunca DELETE físico).
3
+ * @enum {string}
4
+ */
5
+ export declare enum CreditPlanStatusEnum {
6
+ ACTIVE = "ACTIVE",
7
+ INACTIVE = "INACTIVE"
8
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreditPlanStatusEnum = void 0;
4
+ /**
5
+ * Estado de un plan de crédito (modelo-datos §6.1). Soft-delete vía status (nunca DELETE físico).
6
+ * @enum {string}
7
+ */
8
+ var CreditPlanStatusEnum;
9
+ (function (CreditPlanStatusEnum) {
10
+ CreditPlanStatusEnum["ACTIVE"] = "ACTIVE";
11
+ CreditPlanStatusEnum["INACTIVE"] = "INACTIVE";
12
+ })(CreditPlanStatusEnum || (exports.CreditPlanStatusEnum = CreditPlanStatusEnum = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Estado de una financiera (modelo-datos §6.3). Desactivar la quita del wizard sin afectar
3
+ * créditos existentes (M6 §6).
4
+ * @enum {string}
5
+ */
6
+ export declare enum FinancierStatusEnum {
7
+ ACTIVE = "ACTIVE",
8
+ INACTIVE = "INACTIVE"
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FinancierStatusEnum = void 0;
4
+ /**
5
+ * Estado de una financiera (modelo-datos §6.3). Desactivar la quita del wizard sin afectar
6
+ * créditos existentes (M6 §6).
7
+ * @enum {string}
8
+ */
9
+ var FinancierStatusEnum;
10
+ (function (FinancierStatusEnum) {
11
+ FinancierStatusEnum["ACTIVE"] = "ACTIVE";
12
+ FinancierStatusEnum["INACTIVE"] = "INACTIVE";
13
+ })(FinancierStatusEnum || (exports.FinancierStatusEnum = FinancierStatusEnum = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Tipo de financiera (M6 §6 · modelo-datos §6.3). `INTERNAL` = SureKeep (SOFOM propia);
3
+ * `EXTERNAL` = financiera de terceros con derivación por URL (PayJoy / KREDIYA / LESPAGO).
4
+ * @enum {string}
5
+ */
6
+ export declare enum FinancierTypeEnum {
7
+ INTERNAL = "INTERNAL",
8
+ EXTERNAL = "EXTERNAL"
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FinancierTypeEnum = void 0;
4
+ /**
5
+ * Tipo de financiera (M6 §6 · modelo-datos §6.3). `INTERNAL` = SureKeep (SOFOM propia);
6
+ * `EXTERNAL` = financiera de terceros con derivación por URL (PayJoy / KREDIYA / LESPAGO).
7
+ * @enum {string}
8
+ */
9
+ var FinancierTypeEnum;
10
+ (function (FinancierTypeEnum) {
11
+ FinancierTypeEnum["INTERNAL"] = "INTERNAL";
12
+ FinancierTypeEnum["EXTERNAL"] = "EXTERNAL";
13
+ })(FinancierTypeEnum || (exports.FinancierTypeEnum = FinancierTypeEnum = {}));
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Gama del equipo (modelo-datos §4.1 `RetailProduct.tier` · §6.1 `eligibleTiers`).
3
+ *
4
+ * NOTA (supuesto F1): conceptualmente esta gama pertenece al dominio de catálogo retail
5
+ * (`retail-catalog-business`), cuyo dominio type-kit aún no existe. Se define aquí para poder
6
+ * tipar `CreditPlan.eligibleTiers` y `Financier.eligibleTiers` sin bloquear. Al publicarse el
7
+ * dominio `retailCatalog`, consolidar allí y reexportar (coordinar con la pista Retail).
8
+ * @enum {string}
9
+ */
10
+ export declare enum ProductTierEnum {
11
+ LOW = "LOW",
12
+ MID = "MID",
13
+ HIGH = "HIGH",
14
+ PREMIUM = "PREMIUM"
15
+ }