@fiado/type-kit 3.184.0 → 3.186.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/cognitoBackofficeConnector/dtos/MfaPoolConfig.d.ts +7 -0
- package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.js +36 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.d.ts +20 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.js +11 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.d.ts +4 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.js +6 -0
- package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.d.ts +17 -0
- package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.js +39 -0
- package/bin/index.d.ts +2 -0
- package/bin/index.js +6 -1
- package/bin/loanConfig/dtos/Parameter.d.ts +23 -0
- package/bin/loanConfig/dtos/Parameter.js +93 -0
- package/bin/loanConfig/dtos/requests/BulkGetParametersRequest.d.ts +9 -0
- package/bin/{platformRbac/dtos/ResendSelfRegisterOtpRequest.js → loanConfig/dtos/requests/BulkGetParametersRequest.js} +20 -16
- package/bin/loanConfig/dtos/requests/BulkUpdateParametersRequest.d.ts +11 -0
- package/bin/loanConfig/dtos/requests/BulkUpdateParametersRequest.js +52 -0
- package/bin/loanConfig/dtos/requests/UpdateParameterRequest.d.ts +8 -0
- package/bin/{platformRbac/dtos/ResendOtpRequest.js → loanConfig/dtos/requests/UpdateParameterRequest.js} +10 -13
- package/bin/loanConfig/dtos/responses/ParameterResponse.d.ts +28 -0
- package/bin/loanConfig/dtos/responses/ParameterResponse.js +2 -0
- package/bin/loanConfig/enums/ModifiableByRoleEnum.d.ts +11 -0
- package/bin/loanConfig/enums/ModifiableByRoleEnum.js +15 -0
- package/bin/loanConfig/enums/ParameterTypeEnum.d.ts +20 -0
- package/bin/loanConfig/enums/ParameterTypeEnum.js +24 -0
- package/bin/loanConfig/enums/ParameterValueTypeEnum.d.ts +11 -0
- package/bin/loanConfig/enums/ParameterValueTypeEnum.js +15 -0
- package/bin/loanConfig/index.d.ts +8 -0
- package/bin/loanConfig/index.js +27 -0
- package/bin/loanOfferings/dtos/CreditPlan.d.ts +52 -0
- package/bin/loanOfferings/dtos/CreditPlan.js +184 -0
- package/bin/loanOfferings/dtos/Financier.d.ts +30 -0
- package/bin/loanOfferings/dtos/Financier.js +103 -0
- package/bin/loanOfferings/dtos/RetailerCreditPlan.d.ts +15 -0
- package/bin/loanOfferings/dtos/RetailerCreditPlan.js +71 -0
- package/bin/loanOfferings/dtos/requests/ChangeCreditPlanStatusRequest.d.ts +8 -0
- package/bin/loanOfferings/dtos/requests/ChangeCreditPlanStatusRequest.js +27 -0
- package/bin/loanOfferings/dtos/requests/ChangeFinancierStatusRequest.d.ts +8 -0
- package/bin/loanOfferings/dtos/requests/ChangeFinancierStatusRequest.js +27 -0
- package/bin/loanOfferings/dtos/requests/CreateCreditPlanRequest.d.ts +27 -0
- package/bin/loanOfferings/dtos/requests/CreateCreditPlanRequest.js +137 -0
- package/bin/loanOfferings/dtos/requests/CreateFinancierRequest.d.ts +17 -0
- package/bin/loanOfferings/dtos/requests/CreateFinancierRequest.js +70 -0
- package/bin/loanOfferings/dtos/requests/ReorderFinancierRequest.d.ts +7 -0
- package/bin/loanOfferings/dtos/requests/ReorderFinancierRequest.js +27 -0
- package/bin/loanOfferings/dtos/requests/SimulateCreditPlanRequest.d.ts +11 -0
- package/bin/loanOfferings/dtos/requests/SimulateCreditPlanRequest.js +49 -0
- package/bin/loanOfferings/dtos/requests/UpdateCreditPlanRequest.d.ts +25 -0
- package/bin/loanOfferings/dtos/requests/UpdateCreditPlanRequest.js +134 -0
- package/bin/loanOfferings/dtos/requests/UpdateFinancierRequest.d.ts +12 -0
- package/bin/loanOfferings/dtos/requests/UpdateFinancierRequest.js +53 -0
- package/bin/loanOfferings/dtos/responses/CreditPlanResponse.d.ts +35 -0
- package/bin/loanOfferings/dtos/responses/CreditPlanResponse.js +2 -0
- package/bin/loanOfferings/dtos/responses/FinancierResponse.d.ts +23 -0
- package/bin/loanOfferings/dtos/responses/FinancierResponse.js +2 -0
- package/bin/loanOfferings/dtos/responses/RetailerCreditPlanResponse.d.ts +14 -0
- package/bin/loanOfferings/dtos/responses/RetailerCreditPlanResponse.js +2 -0
- package/bin/loanOfferings/dtos/responses/SimulationResultResponse.d.ts +44 -0
- package/bin/loanOfferings/dtos/responses/SimulationResultResponse.js +2 -0
- package/bin/loanOfferings/enums/CreditPlanLevelEnum.d.ts +12 -0
- package/bin/loanOfferings/enums/CreditPlanLevelEnum.js +16 -0
- package/bin/loanOfferings/enums/CreditPlanStatusEnum.d.ts +8 -0
- package/bin/loanOfferings/enums/CreditPlanStatusEnum.js +12 -0
- package/bin/loanOfferings/enums/FinancierStatusEnum.d.ts +9 -0
- package/bin/loanOfferings/enums/FinancierStatusEnum.js +13 -0
- package/bin/loanOfferings/enums/FinancierTypeEnum.d.ts +9 -0
- package/bin/loanOfferings/enums/FinancierTypeEnum.js +13 -0
- package/bin/loanOfferings/enums/ProductTierEnum.d.ts +15 -0
- package/bin/loanOfferings/enums/ProductTierEnum.js +19 -0
- package/bin/loanOfferings/enums/SaleTypeEnum.d.ts +13 -0
- package/bin/loanOfferings/enums/SaleTypeEnum.js +17 -0
- package/bin/loanOfferings/index.d.ts +21 -0
- package/bin/loanOfferings/index.js +41 -0
- package/bin/rbac/enums/PoolKind.d.ts +16 -0
- package/bin/rbac/enums/PoolKind.js +20 -0
- package/bin/rbac/index.d.ts +1 -0
- package/bin/rbac/index.js +17 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +5 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +31 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +7 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +6 -0
- package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +11 -0
- package/bin/walletFunding/dtos/CancelFundingRequest.js +33 -0
- package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +14 -0
- package/bin/walletFunding/dtos/CancelFundingResponse.js +12 -0
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +3 -0
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +21 -0
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +7 -0
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +6 -0
- package/package.json +1 -1
- package/src/index.ts +5 -0
- package/src/loanConfig/dtos/Parameter.ts +68 -0
- package/src/loanConfig/dtos/requests/BulkGetParametersRequest.ts +23 -0
- package/src/loanConfig/dtos/requests/BulkUpdateParametersRequest.ts +33 -0
- package/src/loanConfig/dtos/requests/UpdateParameterRequest.ts +18 -0
- package/src/loanConfig/dtos/responses/ParameterResponse.ts +28 -0
- package/src/loanConfig/enums/ModifiableByRoleEnum.ts +11 -0
- package/src/loanConfig/enums/ParameterTypeEnum.ts +20 -0
- package/src/loanConfig/enums/ParameterValueTypeEnum.ts +11 -0
- package/src/loanConfig/index.ts +14 -0
- package/src/loanOfferings/dtos/CreditPlan.ts +171 -0
- package/src/loanOfferings/dtos/Financier.ts +91 -0
- package/src/loanOfferings/dtos/RetailerCreditPlan.ts +49 -0
- package/src/loanOfferings/dtos/requests/ChangeCreditPlanStatusRequest.ts +13 -0
- package/src/loanOfferings/dtos/requests/ChangeFinancierStatusRequest.ts +13 -0
- package/src/loanOfferings/dtos/requests/CreateCreditPlanRequest.ts +118 -0
- package/src/loanOfferings/dtos/requests/CreateFinancierRequest.ts +57 -0
- package/src/loanOfferings/dtos/requests/ReorderFinancierRequest.ts +13 -0
- package/src/loanOfferings/dtos/requests/SimulateCreditPlanRequest.ts +32 -0
- package/src/loanOfferings/dtos/requests/UpdateCreditPlanRequest.ts +117 -0
- package/src/loanOfferings/dtos/requests/UpdateFinancierRequest.ts +41 -0
- package/src/loanOfferings/dtos/responses/CreditPlanResponse.ts +36 -0
- package/src/loanOfferings/dtos/responses/FinancierResponse.ts +24 -0
- package/src/loanOfferings/dtos/responses/RetailerCreditPlanResponse.ts +14 -0
- package/src/loanOfferings/dtos/responses/SimulationResultResponse.ts +45 -0
- package/src/loanOfferings/enums/CreditPlanLevelEnum.ts +12 -0
- package/src/loanOfferings/enums/CreditPlanStatusEnum.ts +8 -0
- package/src/loanOfferings/enums/FinancierStatusEnum.ts +9 -0
- package/src/loanOfferings/enums/FinancierTypeEnum.ts +9 -0
- package/src/loanOfferings/enums/ProductTierEnum.ts +15 -0
- package/src/loanOfferings/enums/SaleTypeEnum.ts +13 -0
- package/src/loanOfferings/index.ts +28 -0
- package/bin/platformRbac/dtos/ResendOtpRequest.d.ts +0 -22
- package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.d.ts +0 -11
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsInt, IsNumber, IsOptional, Max, Min } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Body de POST /private/credit-plans/:planId/simulate y query de GET /credit-plans/:planId/simulator.
|
|
6
|
+
* Entradas del simulador de cuota (flow 06 §6.1.4). `productPriceCents` en cents; `downPaymentPct`
|
|
7
|
+
* decimal sobre 1. `customerSciScore` opcional: si viene, se valida contra el rango SCI del plan.
|
|
8
|
+
*/
|
|
9
|
+
export class SimulateCreditPlanRequest {
|
|
10
|
+
@Expose()
|
|
11
|
+
@IsInt()
|
|
12
|
+
@Min(1)
|
|
13
|
+
productPriceCents!: number;
|
|
14
|
+
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsNumber()
|
|
17
|
+
@Min(0)
|
|
18
|
+
@Max(1)
|
|
19
|
+
downPaymentPct!: number;
|
|
20
|
+
|
|
21
|
+
@Expose()
|
|
22
|
+
@IsInt()
|
|
23
|
+
@Min(1)
|
|
24
|
+
termWeeks!: number;
|
|
25
|
+
|
|
26
|
+
@Expose()
|
|
27
|
+
@IsOptional()
|
|
28
|
+
@IsInt()
|
|
29
|
+
@Min(0)
|
|
30
|
+
@Max(100)
|
|
31
|
+
customerSciScore?: number;
|
|
32
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import {
|
|
3
|
+
ArrayNotEmpty,
|
|
4
|
+
IsArray,
|
|
5
|
+
IsBoolean,
|
|
6
|
+
IsEnum,
|
|
7
|
+
IsInt,
|
|
8
|
+
IsNumber,
|
|
9
|
+
IsOptional,
|
|
10
|
+
IsString,
|
|
11
|
+
Max,
|
|
12
|
+
Min,
|
|
13
|
+
} from 'class-validator';
|
|
14
|
+
import { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
15
|
+
import { SaleTypeEnum } from '../../enums/SaleTypeEnum';
|
|
16
|
+
|
|
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
|
+
export class UpdateCreditPlanRequest {
|
|
24
|
+
@Expose()
|
|
25
|
+
@IsOptional()
|
|
26
|
+
@IsString()
|
|
27
|
+
name?: string;
|
|
28
|
+
|
|
29
|
+
@Expose()
|
|
30
|
+
@IsOptional()
|
|
31
|
+
@IsString()
|
|
32
|
+
description?: string;
|
|
33
|
+
|
|
34
|
+
@Expose()
|
|
35
|
+
@IsOptional()
|
|
36
|
+
@IsArray()
|
|
37
|
+
@ArrayNotEmpty()
|
|
38
|
+
@IsEnum(SaleTypeEnum, { each: true })
|
|
39
|
+
saleTypes?: SaleTypeEnum[];
|
|
40
|
+
|
|
41
|
+
@Expose()
|
|
42
|
+
@IsOptional()
|
|
43
|
+
@IsArray()
|
|
44
|
+
@IsEnum(ProductTierEnum, { each: true })
|
|
45
|
+
eligibleTiers?: ProductTierEnum[] | null;
|
|
46
|
+
|
|
47
|
+
@Expose()
|
|
48
|
+
@IsOptional()
|
|
49
|
+
@IsNumber()
|
|
50
|
+
@Min(0)
|
|
51
|
+
@Max(1)
|
|
52
|
+
minDownPaymentPct?: number;
|
|
53
|
+
|
|
54
|
+
@Expose()
|
|
55
|
+
@IsOptional()
|
|
56
|
+
@IsNumber()
|
|
57
|
+
@Min(0)
|
|
58
|
+
@Max(1)
|
|
59
|
+
maxDownPaymentPct?: number | null;
|
|
60
|
+
|
|
61
|
+
@Expose()
|
|
62
|
+
@IsOptional()
|
|
63
|
+
@IsArray()
|
|
64
|
+
@ArrayNotEmpty()
|
|
65
|
+
@IsInt({ each: true })
|
|
66
|
+
@Min(1, { each: true })
|
|
67
|
+
termWeeksOptions?: number[];
|
|
68
|
+
|
|
69
|
+
@Expose()
|
|
70
|
+
@IsOptional()
|
|
71
|
+
@IsInt()
|
|
72
|
+
@Min(0)
|
|
73
|
+
maxFinancedAmountCents?: number;
|
|
74
|
+
|
|
75
|
+
@Expose()
|
|
76
|
+
@IsOptional()
|
|
77
|
+
@IsNumber()
|
|
78
|
+
@Min(2.0)
|
|
79
|
+
@Max(2.6)
|
|
80
|
+
tnaAnnual?: number;
|
|
81
|
+
|
|
82
|
+
@Expose()
|
|
83
|
+
@IsOptional()
|
|
84
|
+
@IsNumber()
|
|
85
|
+
@Min(0)
|
|
86
|
+
@Max(1)
|
|
87
|
+
openingCommissionPct?: number;
|
|
88
|
+
|
|
89
|
+
@Expose()
|
|
90
|
+
@IsOptional()
|
|
91
|
+
@IsBoolean()
|
|
92
|
+
paymentShift?: boolean;
|
|
93
|
+
|
|
94
|
+
@Expose()
|
|
95
|
+
@IsOptional()
|
|
96
|
+
@IsInt()
|
|
97
|
+
@Min(0)
|
|
98
|
+
@Max(100)
|
|
99
|
+
minSciScore?: number | null;
|
|
100
|
+
|
|
101
|
+
@Expose()
|
|
102
|
+
@IsOptional()
|
|
103
|
+
@IsInt()
|
|
104
|
+
@Min(0)
|
|
105
|
+
@Max(100)
|
|
106
|
+
maxSciScore?: number | null;
|
|
107
|
+
|
|
108
|
+
@Expose()
|
|
109
|
+
@IsOptional()
|
|
110
|
+
@IsString()
|
|
111
|
+
validFrom?: string | null;
|
|
112
|
+
|
|
113
|
+
@Expose()
|
|
114
|
+
@IsOptional()
|
|
115
|
+
@IsString()
|
|
116
|
+
validUntil?: string | null;
|
|
117
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import {
|
|
3
|
+
IsArray,
|
|
4
|
+
IsEnum,
|
|
5
|
+
IsObject,
|
|
6
|
+
IsOptional,
|
|
7
|
+
IsString,
|
|
8
|
+
} from 'class-validator';
|
|
9
|
+
import { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Body de PUT /financiers/:financierId — edición parcial (todos opcionales).
|
|
13
|
+
* `code`, `type` y `displayOrder` no se editan aquí (identidad / orden por endpoint dedicado).
|
|
14
|
+
*/
|
|
15
|
+
export class UpdateFinancierRequest {
|
|
16
|
+
@Expose()
|
|
17
|
+
@IsOptional()
|
|
18
|
+
@IsString()
|
|
19
|
+
name?: string;
|
|
20
|
+
|
|
21
|
+
@Expose()
|
|
22
|
+
@IsOptional()
|
|
23
|
+
@IsString()
|
|
24
|
+
label?: string;
|
|
25
|
+
|
|
26
|
+
@Expose()
|
|
27
|
+
@IsOptional()
|
|
28
|
+
@IsString()
|
|
29
|
+
externalRedirectUrl?: string | null;
|
|
30
|
+
|
|
31
|
+
@Expose()
|
|
32
|
+
@IsOptional()
|
|
33
|
+
@IsArray()
|
|
34
|
+
@IsEnum(ProductTierEnum, { each: true })
|
|
35
|
+
eligibleTiers?: ProductTierEnum[] | null;
|
|
36
|
+
|
|
37
|
+
@Expose()
|
|
38
|
+
@IsOptional()
|
|
39
|
+
@IsObject()
|
|
40
|
+
config?: Record<string, unknown> | null;
|
|
41
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
/**
|
|
7
|
+
* Shape de salida de un plan de crédito (GET / POST / PUT de /credit-plans).
|
|
8
|
+
* Montos en cents; porcentajes y TNA en decimal.
|
|
9
|
+
*/
|
|
10
|
+
export interface CreditPlanResponse {
|
|
11
|
+
planId: string;
|
|
12
|
+
code: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
level: CreditPlanLevelEnum;
|
|
16
|
+
saleTypes: SaleTypeEnum[];
|
|
17
|
+
eligibleTiers: ProductTierEnum[] | null;
|
|
18
|
+
minDownPaymentPct: number;
|
|
19
|
+
maxDownPaymentPct: number | null;
|
|
20
|
+
termWeeksOptions: number[];
|
|
21
|
+
maxFinancedAmountCents: number;
|
|
22
|
+
tnaAnnual: number;
|
|
23
|
+
ivaOnInterest: number;
|
|
24
|
+
openingCommissionPct: number;
|
|
25
|
+
paymentShift: boolean;
|
|
26
|
+
minSciScore: number | null;
|
|
27
|
+
maxSciScore: number | null;
|
|
28
|
+
version: number;
|
|
29
|
+
validFrom: string | null;
|
|
30
|
+
validUntil: string | null;
|
|
31
|
+
status: CreditPlanStatusEnum;
|
|
32
|
+
createdBy: string;
|
|
33
|
+
updatedBy: string;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FinancierStatusEnum } from '../../enums/FinancierStatusEnum';
|
|
2
|
+
import { FinancierTypeEnum } from '../../enums/FinancierTypeEnum';
|
|
3
|
+
import { ProductTierEnum } from '../../enums/ProductTierEnum';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Shape de salida de una financiera (GET / POST / PUT de /financiers).
|
|
7
|
+
* Los listados devuelven `FinancierResponse[]` ordenados por `displayOrder`.
|
|
8
|
+
*/
|
|
9
|
+
export interface FinancierResponse {
|
|
10
|
+
financierId: string;
|
|
11
|
+
code: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: FinancierTypeEnum;
|
|
14
|
+
displayOrder: number;
|
|
15
|
+
label: string;
|
|
16
|
+
externalRedirectUrl: string | null;
|
|
17
|
+
eligibleTiers: ProductTierEnum[] | null;
|
|
18
|
+
config: Record<string, unknown> | null;
|
|
19
|
+
status: FinancierStatusEnum;
|
|
20
|
+
createdBy: string;
|
|
21
|
+
updatedBy: string;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
}
|
|
@@ -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,45 @@
|
|
|
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
|
+
/**
|
|
18
|
+
* Resultado del simulador de cuota (POST /private/credit-plans/:planId/simulate,
|
|
19
|
+
* GET /credit-plans/:planId/simulator). Amortización francesa + IVA 16% + comisión de apertura + CAT.
|
|
20
|
+
*
|
|
21
|
+
* NOTA (supuesto F1): `catAnnual` se calcula con la metodología estándar CONDUSEF (TIR anualizada)
|
|
22
|
+
* — pendiente de confirmar fórmula/ejemplos oficiales con Jaime/M2.
|
|
23
|
+
*/
|
|
24
|
+
export interface SimulationResultResponse {
|
|
25
|
+
planId: string;
|
|
26
|
+
planCode: string;
|
|
27
|
+
productPriceCents: number;
|
|
28
|
+
downPaymentPct: number;
|
|
29
|
+
downPaymentCents: number;
|
|
30
|
+
/** Capital financiado = precio − enganche (antes de comisión de apertura). */
|
|
31
|
+
financedAmountCents: number;
|
|
32
|
+
openingCommissionCents: number;
|
|
33
|
+
termWeeks: number;
|
|
34
|
+
tnaAnnual: number;
|
|
35
|
+
/** Cuota semanal sin IVA (capital + interés), constante en amortización francesa. */
|
|
36
|
+
weeklyPaymentSinIvaCents: number;
|
|
37
|
+
totalCapitalCents: number;
|
|
38
|
+
totalInterestCents: number;
|
|
39
|
+
totalIvaCents: number;
|
|
40
|
+
/** Total a pagar = capital + interés + IVA (+ comisión de apertura). */
|
|
41
|
+
totalToPayCents: number;
|
|
42
|
+
/** Costo Anual Total (decimal, ej. 2.87 = 287%). Metodología estándar CONDUSEF (supuesto). */
|
|
43
|
+
catAnnual: number;
|
|
44
|
+
schedule: AmortizationRowResponse[];
|
|
45
|
+
}
|
|
@@ -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 enum CreditPlanLevelEnum {
|
|
8
|
+
BRONZE = 'BRONZE',
|
|
9
|
+
SILVER = 'SILVER',
|
|
10
|
+
GOLD = 'GOLD',
|
|
11
|
+
ALL = 'ALL',
|
|
12
|
+
}
|
|
@@ -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 enum FinancierTypeEnum {
|
|
7
|
+
INTERNAL = 'INTERNAL',
|
|
8
|
+
EXTERNAL = 'EXTERNAL',
|
|
9
|
+
}
|
|
@@ -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 enum ProductTierEnum {
|
|
11
|
+
LOW = 'LOW',
|
|
12
|
+
MID = 'MID',
|
|
13
|
+
HIGH = 'HIGH',
|
|
14
|
+
PREMIUM = 'PREMIUM',
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tipo de venta al que aplica un plan de crédito (M6 §4 · modelo-datos §6.1).
|
|
3
|
+
* Un plan puede configurarse para uno o más tipos (por eso `CreditPlan.saleTypes` es array).
|
|
4
|
+
* @enum {string}
|
|
5
|
+
*/
|
|
6
|
+
export enum SaleTypeEnum {
|
|
7
|
+
/** Cliente sin historial previo con SureKeep (primera compra). */
|
|
8
|
+
NEW = 'NEW',
|
|
9
|
+
/** Cliente que ya tuvo un crédito con SureKeep (recompra / renovación). */
|
|
10
|
+
REPURCHASE = 'REPURCHASE',
|
|
11
|
+
/** Empleado de VentasLuga que compra para uso personal (condiciones preferenciales). */
|
|
12
|
+
EMPLOYEE = 'EMPLOYEE',
|
|
13
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Enums
|
|
2
|
+
export * from './enums/CreditPlanLevelEnum';
|
|
3
|
+
export * from './enums/SaleTypeEnum';
|
|
4
|
+
export * from './enums/ProductTierEnum';
|
|
5
|
+
export * from './enums/CreditPlanStatusEnum';
|
|
6
|
+
export * from './enums/FinancierTypeEnum';
|
|
7
|
+
export * from './enums/FinancierStatusEnum';
|
|
8
|
+
|
|
9
|
+
// Entity DTOs
|
|
10
|
+
export * from './dtos/CreditPlan';
|
|
11
|
+
export * from './dtos/Financier';
|
|
12
|
+
export * from './dtos/RetailerCreditPlan';
|
|
13
|
+
|
|
14
|
+
// Request DTOs
|
|
15
|
+
export * from './dtos/requests/CreateCreditPlanRequest';
|
|
16
|
+
export * from './dtos/requests/UpdateCreditPlanRequest';
|
|
17
|
+
export * from './dtos/requests/ChangeCreditPlanStatusRequest';
|
|
18
|
+
export * from './dtos/requests/SimulateCreditPlanRequest';
|
|
19
|
+
export * from './dtos/requests/CreateFinancierRequest';
|
|
20
|
+
export * from './dtos/requests/UpdateFinancierRequest';
|
|
21
|
+
export * from './dtos/requests/ChangeFinancierStatusRequest';
|
|
22
|
+
export * from './dtos/requests/ReorderFinancierRequest';
|
|
23
|
+
|
|
24
|
+
// Response DTOs
|
|
25
|
+
export * from './dtos/responses/CreditPlanResponse';
|
|
26
|
+
export * from './dtos/responses/FinancierResponse';
|
|
27
|
+
export * from './dtos/responses/RetailerCreditPlanResponse';
|
|
28
|
+
export * from './dtos/responses/SimulationResultResponse';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { MfaMethodEnum } from '../enums/MfaMethodEnum';
|
|
2
|
-
/**
|
|
3
|
-
* Body del POST /auth/resend-otp (público, anónimo). DEC-RBAC-054.
|
|
4
|
-
* Reenvía el OTP del login re-disparando el challenge real CUSTOM_AUTH (EMAIL_OTP) para la
|
|
5
|
-
* identidad SIN password. `tenantId` obligatorio (DEC-064 — el picker ya lo resolvió, NO "solo email").
|
|
6
|
-
* El email se normaliza lowercase server-side. Postura anti-enumeración: respuesta 200 genérica
|
|
7
|
-
* siempre, sin filtrar existencia (ver AuthLoginManager.resendChallengeOtp).
|
|
8
|
-
*/
|
|
9
|
-
export declare class ResendOtpRequest {
|
|
10
|
-
email: string;
|
|
11
|
-
tenantId: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Respuesta del resend-otp. `session`/`mfaMethod` frescos del nuevo challenge CUSTOM_AUTH.
|
|
15
|
-
* Plain sin validators (no validamos lo que mandamos al cliente — fiado-validation-and-dtos § 7).
|
|
16
|
-
* Ambos opcionales: en los caminos de rechazo silencioso (anti-enumeración) o ramas sin CUSTOM_AUTH
|
|
17
|
-
* el server responde 200 genérico sin session ni método.
|
|
18
|
-
*/
|
|
19
|
-
export interface ResendOtpResponse {
|
|
20
|
-
session?: string;
|
|
21
|
-
mfaMethod?: MfaMethodEnum;
|
|
22
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Body del POST /self-register/resend-otp (público, anónimo). DEC-RBAC-054.
|
|
3
|
-
* Re-envía el OTP del autoregistro (mecanismo messages-business, NO Cognito) tras validar un
|
|
4
|
-
* `pending` existente. Misma postura anti-enumeración del start. El email se normaliza lowercase
|
|
5
|
-
* server-side. DTO propio por endpoint (NO reusa SelfRegisterStartRequest, que exige roleId/scope/
|
|
6
|
-
* scopeRef, ni SelfRegisterVerifyOtpRequest, que exige otp).
|
|
7
|
-
*/
|
|
8
|
-
export declare class ResendSelfRegisterOtpRequest {
|
|
9
|
-
tenantId: string;
|
|
10
|
-
email: string;
|
|
11
|
-
}
|