@fiado/type-kit 3.608.0 → 3.610.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/_test_/unit/biometrics/BiometricEventTypeEnum.test.ts +35 -0
- package/_test_/unit/biometrics/BiometricVerificationResponse.test.ts +19 -0
- package/_test_/unit/kyc/KycProgressEnums.test.ts +20 -0
- package/_test_/unit/kyc/KycProofOfAddressCompletedV1.test.ts +24 -0
- package/_test_/unit/kyc/KycStepCompletedV1.test.ts +34 -0
- package/_test_/unit/kyc/KycVerificationChangedV1.test.ts +30 -0
- package/_test_/unit/kyc/KycVerificationProgressV1.test.ts +144 -0
- package/_test_/unit/loanCredit/dtos/originateLoanCreditRequest.test.ts +9 -0
- package/_test_/unit/loanOfferings/promotionCategoryTierScope.test.ts +89 -0
- package/_test_/unit/retailWizard/kycAttemptProgress.test.ts +131 -0
- package/bin/biometrics/dtos/responses/BiometricVerificationResponse.d.ts +2 -0
- package/bin/biometrics/dtos/responses/BiometricVerificationResponse.js +6 -0
- package/bin/biometrics/enums/BiometricEventTypeEnum.d.ts +7 -3
- package/bin/biometrics/enums/BiometricEventTypeEnum.js +6 -2
- package/bin/kyc/enums/KycFlowEnum.d.ts +5 -0
- package/bin/kyc/enums/KycFlowEnum.js +9 -0
- package/bin/kyc/enums/KycProgressStageEnum.d.ts +6 -0
- package/bin/kyc/enums/KycProgressStageEnum.js +10 -0
- package/bin/kyc/events/KycProofOfAddressCompletedV1.d.ts +2 -0
- package/bin/kyc/events/KycProofOfAddressCompletedV1.js +7 -0
- package/bin/kyc/events/KycStepCompletedV1.d.ts +5 -0
- package/bin/kyc/events/KycStepCompletedV1.js +14 -0
- package/bin/kyc/events/KycVerificationChangedV1.d.ts +2 -0
- package/bin/kyc/events/KycVerificationChangedV1.js +7 -0
- package/bin/kyc/events/KycVerificationProgressV1.d.ts +14 -0
- package/bin/kyc/events/KycVerificationProgressV1.js +63 -0
- package/bin/kyc/index.d.ts +3 -0
- package/bin/kyc/index.js +3 -0
- package/bin/loanCredit/dtos/requests/OriginateLoanCreditRequest.d.ts +6 -0
- package/bin/loanCredit/dtos/requests/OriginateLoanCreditRequest.js +14 -0
- package/bin/loanOfferings/constants/promotionSkuBatch.d.ts +2 -0
- package/bin/loanOfferings/constants/promotionSkuBatch.js +5 -0
- package/bin/loanOfferings/dtos/requests/CreatePromotionRequest.d.ts +6 -0
- package/bin/loanOfferings/dtos/requests/CreatePromotionRequest.js +16 -0
- package/bin/loanOfferings/dtos/requests/ListPromotedSkusRequest.d.ts +11 -0
- package/bin/loanOfferings/dtos/requests/ListPromotedSkusRequest.js +47 -0
- package/bin/loanOfferings/dtos/requests/ListSkuPromotionsRequest.d.ts +11 -0
- package/bin/loanOfferings/dtos/requests/ListSkuPromotionsRequest.js +47 -0
- package/bin/loanOfferings/dtos/requests/PromotionSkuInput.d.ts +8 -0
- package/bin/loanOfferings/dtos/requests/PromotionSkuInput.js +37 -0
- package/bin/loanOfferings/dtos/requests/SimulateCreditPlanRequest.d.ts +6 -0
- package/bin/loanOfferings/dtos/requests/SimulateCreditPlanRequest.js +14 -0
- package/bin/loanOfferings/dtos/requests/UpdatePromotionRequest.d.ts +6 -0
- package/bin/loanOfferings/dtos/requests/UpdatePromotionRequest.js +16 -0
- package/bin/loanOfferings/dtos/responses/PromotionResponse.d.ts +6 -0
- package/bin/loanOfferings/index.d.ts +4 -0
- package/bin/loanOfferings/index.js +5 -0
- package/bin/retailWizard/dtos/KycAttemptProgress.d.ts +14 -0
- package/bin/retailWizard/dtos/KycAttemptProgress.js +2 -0
- package/bin/retailWizard/dtos/KycStatusProgress.d.ts +7 -0
- package/bin/retailWizard/dtos/KycStatusProgress.js +2 -0
- package/bin/retailWizard/dtos/responses/KycPrepareResponse.d.ts +4 -0
- package/bin/retailWizard/dtos/responses/ProofOfAddressPrepareResponse.d.ts +2 -0
- package/bin/retailWizard/enums/KycAttemptStageEnum.d.ts +8 -0
- package/bin/retailWizard/enums/KycAttemptStageEnum.js +12 -0
- package/bin/retailWizard/index.d.ts +3 -0
- package/bin/retailWizard/index.js +3 -0
- package/package.json +1 -1
- package/src/biometrics/dtos/responses/BiometricVerificationResponse.ts +4 -0
- package/src/biometrics/enums/BiometricEventTypeEnum.ts +8 -2
- package/src/kyc/enums/KycFlowEnum.ts +5 -0
- package/src/kyc/enums/KycProgressStageEnum.ts +6 -0
- package/src/kyc/events/KycProofOfAddressCompletedV1.ts +4 -0
- package/src/kyc/events/KycStepCompletedV1.ts +9 -0
- package/src/kyc/events/KycVerificationChangedV1.ts +4 -0
- package/src/kyc/events/KycVerificationProgressV1.ts +33 -0
- package/src/kyc/index.ts +3 -0
- package/src/loanCredit/dtos/requests/OriginateLoanCreditRequest.ts +14 -0
- package/src/loanOfferings/constants/promotionSkuBatch.ts +2 -0
- package/src/loanOfferings/dtos/requests/CreatePromotionRequest.ts +16 -0
- package/src/loanOfferings/dtos/requests/ListPromotedSkusRequest.ts +32 -0
- package/src/loanOfferings/dtos/requests/ListSkuPromotionsRequest.ts +32 -0
- package/src/loanOfferings/dtos/requests/PromotionSkuInput.ts +21 -0
- package/src/loanOfferings/dtos/requests/SimulateCreditPlanRequest.ts +16 -1
- package/src/loanOfferings/dtos/requests/UpdatePromotionRequest.ts +16 -0
- package/src/loanOfferings/dtos/responses/PromotionResponse.ts +6 -0
- package/src/loanOfferings/index.ts +6 -0
- package/src/retailWizard/dtos/KycAttemptProgress.ts +15 -0
- package/src/retailWizard/dtos/KycStatusProgress.ts +8 -0
- package/src/retailWizard/dtos/responses/KycPrepareResponse.ts +4 -0
- package/src/retailWizard/dtos/responses/ProofOfAddressPrepareResponse.ts +2 -0
- package/src/retailWizard/enums/KycAttemptStageEnum.ts +8 -0
- package/src/retailWizard/index.ts +3 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { KycModalityEnum } from '../../retailCustomer/enums/KycModalityEnum';
|
|
2
|
+
import { KycAttemptStageEnum } from '../enums/KycAttemptStageEnum';
|
|
3
|
+
/** Avance del intento vigente de un flujo KYC, tal como lo devuelve `GET kyc/status`. */
|
|
4
|
+
export interface KycAttemptProgress {
|
|
5
|
+
attemptId: string;
|
|
6
|
+
modality: KycModalityEnum.CUSTOMER_LINK | KycModalityEnum.STORE_DEVICE;
|
|
7
|
+
/** `shortUrl` del QR; ausente en `STORE_DEVICE`. */
|
|
8
|
+
link?: string;
|
|
9
|
+
stage: KycAttemptStageEnum;
|
|
10
|
+
/** Cuándo entró a la etapa actual, ISO-8601 UTC. */
|
|
11
|
+
stageAt: string;
|
|
12
|
+
/** Fecha del prepare, ISO-8601 UTC; el front mide contra ella el tope de 25 min. */
|
|
13
|
+
attemptStartedAt: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { KycAttemptProgress } from './KycAttemptProgress';
|
|
2
|
+
/** Bloque `progress` de `GET kyc/status`: el intento vigente de cada flujo, o `null` si no hay. */
|
|
3
|
+
export interface KycStatusProgress {
|
|
4
|
+
identity: KycAttemptProgress | null;
|
|
5
|
+
facematch: KycAttemptProgress | null;
|
|
6
|
+
proofOfAddress: KycAttemptProgress | null;
|
|
7
|
+
}
|
|
@@ -52,6 +52,8 @@ export interface KycSdkMetadata {
|
|
|
52
52
|
* domicilio del documento de identidad: `kyc-metamap-webhook` rutea por este campo.
|
|
53
53
|
*/
|
|
54
54
|
kycStep?: KycMetadataStepEnum;
|
|
55
|
+
/** Intento del wizard que originó la verificación; el webhook lo copia a cada evento. */
|
|
56
|
+
attemptId?: string;
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
57
59
|
* Paso del onboarding que originó una verificación, tal como viaja en `KycSdkMetadata.kycStep`.
|
|
@@ -94,6 +96,8 @@ export interface KycPrepareResponse {
|
|
|
94
96
|
* (`KycManualRequest`). Por eso el tipo se estrecha a las dos que el SDK puede ejecutar.
|
|
95
97
|
*/
|
|
96
98
|
modality: KycModalityEnum.CUSTOMER_LINK | KycModalityEnum.STORE_DEVICE;
|
|
99
|
+
/** Intento que abrió este prepare; ausente cuando no se crea intento: alreadyVerified o bypass de dev. */
|
|
100
|
+
attemptId?: string;
|
|
97
101
|
/** STORE_DEVICE — clientId de la cuenta Metamap (mismo valor en prod y dev). */
|
|
98
102
|
clientId?: string;
|
|
99
103
|
/** STORE_DEVICE — flow de Metamap por país; sale de la configuración del wizard. */
|
|
@@ -13,6 +13,8 @@ import { KycModalityEnum } from '../../../retailCustomer/enums/KycModalityEnum';
|
|
|
13
13
|
export interface ProofOfAddressPrepareResponse {
|
|
14
14
|
/** `MANUAL` no es una modalidad de `prepare`: la captura manual es su propio endpoint. */
|
|
15
15
|
modality: KycModalityEnum.CUSTOMER_LINK | KycModalityEnum.STORE_DEVICE;
|
|
16
|
+
/** Intento que abrió este prepare; ausente cuando alreadyHasAddress. */
|
|
17
|
+
attemptId?: string;
|
|
16
18
|
/** STORE_DEVICE — clientId de la cuenta Metamap (mismo valor en prod y dev). */
|
|
17
19
|
clientId?: string;
|
|
18
20
|
/** STORE_DEVICE — flow de Metamap del comprobante de domicilio. */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Etapa del intento vigente de un flujo KYC del wizard; el rango de monotonía vive en el wizard. */
|
|
2
|
+
export declare enum KycAttemptStageEnum {
|
|
3
|
+
AWAITING_START = "AWAITING_START",
|
|
4
|
+
STARTED = "STARTED",
|
|
5
|
+
INPUTS_COMPLETED = "INPUTS_COMPLETED",
|
|
6
|
+
EXPIRED = "EXPIRED",
|
|
7
|
+
RESULT = "RESULT"
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KycAttemptStageEnum = void 0;
|
|
4
|
+
/** Etapa del intento vigente de un flujo KYC del wizard; el rango de monotonía vive en el wizard. */
|
|
5
|
+
var KycAttemptStageEnum;
|
|
6
|
+
(function (KycAttemptStageEnum) {
|
|
7
|
+
KycAttemptStageEnum["AWAITING_START"] = "AWAITING_START";
|
|
8
|
+
KycAttemptStageEnum["STARTED"] = "STARTED";
|
|
9
|
+
KycAttemptStageEnum["INPUTS_COMPLETED"] = "INPUTS_COMPLETED";
|
|
10
|
+
KycAttemptStageEnum["EXPIRED"] = "EXPIRED";
|
|
11
|
+
KycAttemptStageEnum["RESULT"] = "RESULT";
|
|
12
|
+
})(KycAttemptStageEnum || (exports.KycAttemptStageEnum = KycAttemptStageEnum = {}));
|
|
@@ -33,6 +33,7 @@ export * from './enums/LinePaymentTypeEnum';
|
|
|
33
33
|
export * from './enums/WizardLineRoleEnum';
|
|
34
34
|
export * from './enums/EmailStateEnum';
|
|
35
35
|
export * from './enums/SaleChannelEnum';
|
|
36
|
+
export * from './enums/KycAttemptStageEnum';
|
|
36
37
|
export * from './dtos/WizardConsents';
|
|
37
38
|
export * from './dtos/WizardPayment';
|
|
38
39
|
export * from './dtos/WizardProduct';
|
|
@@ -57,6 +58,8 @@ export * from './dtos/WizardReservedLine';
|
|
|
57
58
|
export * from './dtos/WizardGiftLine';
|
|
58
59
|
export * from './dtos/SaleLine';
|
|
59
60
|
export * from './dtos/AccessorySaleLine';
|
|
61
|
+
export * from './dtos/KycAttemptProgress';
|
|
62
|
+
export * from './dtos/KycStatusProgress';
|
|
60
63
|
export * from './dtos/WizardSession';
|
|
61
64
|
export * from './dtos/OtpVerification';
|
|
62
65
|
export * from './dtos/Sale';
|
|
@@ -52,6 +52,7 @@ __exportStar(require("./enums/LinePaymentTypeEnum"), exports);
|
|
|
52
52
|
__exportStar(require("./enums/WizardLineRoleEnum"), exports);
|
|
53
53
|
__exportStar(require("./enums/EmailStateEnum"), exports);
|
|
54
54
|
__exportStar(require("./enums/SaleChannelEnum"), exports);
|
|
55
|
+
__exportStar(require("./enums/KycAttemptStageEnum"), exports);
|
|
55
56
|
// DTOs anidados
|
|
56
57
|
__exportStar(require("./dtos/WizardConsents"), exports);
|
|
57
58
|
__exportStar(require("./dtos/WizardPayment"), exports);
|
|
@@ -79,6 +80,8 @@ __exportStar(require("./dtos/WizardReservedLine"), exports);
|
|
|
79
80
|
__exportStar(require("./dtos/WizardGiftLine"), exports);
|
|
80
81
|
__exportStar(require("./dtos/SaleLine"), exports);
|
|
81
82
|
__exportStar(require("./dtos/AccessorySaleLine"), exports);
|
|
83
|
+
__exportStar(require("./dtos/KycAttemptProgress"), exports);
|
|
84
|
+
__exportStar(require("./dtos/KycStatusProgress"), exports);
|
|
82
85
|
// Entidades principales (shapes de estado/persistencia — planas)
|
|
83
86
|
__exportStar(require("./dtos/WizardSession"), exports);
|
|
84
87
|
__exportStar(require("./dtos/OtpVerification"), exports);
|
package/package.json
CHANGED
|
@@ -138,6 +138,10 @@ export class BiometricVerificationResponse {
|
|
|
138
138
|
@Expose() @IsISO8601({ strict: true })
|
|
139
139
|
expiresAt!: string;
|
|
140
140
|
|
|
141
|
+
/** Cuándo el usuario terminó de subir su información. ISO-8601 UTC con `Z`; ausente si aún no. */
|
|
142
|
+
@Expose() @IsOptional() @IsISO8601({ strict: true })
|
|
143
|
+
inputsCompletedAt?: string;
|
|
144
|
+
|
|
141
145
|
/** Cuándo alcanzó un estado terminal. Ausente mientras siga viva. */
|
|
142
146
|
@Expose() @IsOptional() @IsISO8601({ strict: true })
|
|
143
147
|
completedAt?: string;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* lo que el consumer usa para decidir la transición de estado.
|
|
4
4
|
*
|
|
5
5
|
* Es el vocabulario NUESTRO, no el de Metamap: `kyc-metamap-webhook` traduce sus `eventName` a
|
|
6
|
-
* estos
|
|
7
|
-
* el día que entre otro proveedor traduce a los mismos
|
|
6
|
+
* estos valores antes de publicar. Así el consumer no aprende el catálogo de un proveedor externo, y
|
|
7
|
+
* el día que entre otro proveedor traduce a los mismos valores.
|
|
8
8
|
*
|
|
9
9
|
* `biometrics-business` — Entrega 1.
|
|
10
10
|
*/
|
|
@@ -28,4 +28,10 @@ export enum BiometricEventTypeEnum {
|
|
|
28
28
|
* contra `expiresAt` (DEC-015), así que una verificación vence aunque este evento nunca llegue.
|
|
29
29
|
*/
|
|
30
30
|
VERIFICATION_EXPIRED = 'VERIFICATION_EXPIRED',
|
|
31
|
+
|
|
32
|
+
/** El usuario terminó de subir su información. Sigue en `IN_PROGRESS` y graba `inputsCompletedAt`. */
|
|
33
|
+
INPUTS_COMPLETED = 'INPUTS_COMPLETED',
|
|
34
|
+
|
|
35
|
+
/** El proveedor cambió el veredicto (revisión manual). Se trata igual que `VERIFICATION_COMPLETED`. */
|
|
36
|
+
UPDATED = 'UPDATED',
|
|
31
37
|
}
|
|
@@ -65,4 +65,8 @@ export class KycProofOfAddressCompletedV1 {
|
|
|
65
65
|
message: 'occurredAt debe ser ISO-8601 en UTC con Z (ej. 2026-08-11T10:05:00.000Z): un offset rompe el orden léxico',
|
|
66
66
|
})
|
|
67
67
|
occurredAt!: string;
|
|
68
|
+
|
|
69
|
+
/** Intento del wizard que originó el comprobante; el consumidor descarta los que no son el vigente. */
|
|
70
|
+
@Expose() @IsOptional() @IsString() @IsNotEmpty()
|
|
71
|
+
attemptId?: string;
|
|
68
72
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Expose } from 'class-transformer';
|
|
2
2
|
import { IsEnum, IsIn, IsISO8601, IsNotEmpty, IsOptional, IsString, Matches, Validate } from 'class-validator';
|
|
3
|
+
import { KycFlowEnum } from '../enums/KycFlowEnum';
|
|
3
4
|
import { KycSubCheckNameEnum } from '../enums/KycSubCheckNameEnum';
|
|
4
5
|
import { KycSubCheckStatusEnum } from '../enums/KycSubCheckStatusEnum';
|
|
5
6
|
import { KycWatchlistStatusEnum } from '../enums/KycWatchlistStatusEnum';
|
|
@@ -102,4 +103,12 @@ export class KycStepCompletedV1 {
|
|
|
102
103
|
/** El flujo de Metamap que corrió. Solo para diagnóstico — nadie ramifica por él. */
|
|
103
104
|
@Expose() @IsOptional() @IsString()
|
|
104
105
|
metamapFlowId?: string;
|
|
106
|
+
|
|
107
|
+
/** Intento del wizard que originó la verificación; el consumidor descarta los que no son el vigente. */
|
|
108
|
+
@Expose() @IsOptional() @IsString() @IsNotEmpty()
|
|
109
|
+
attemptId?: string;
|
|
110
|
+
|
|
111
|
+
/** Flujo al que pertenece la estación, derivado de `metadata.kycStep`. */
|
|
112
|
+
@Expose() @IsOptional() @IsEnum(KycFlowEnum)
|
|
113
|
+
flow?: KycFlowEnum;
|
|
105
114
|
}
|
|
@@ -95,4 +95,8 @@ export class KycVerificationChangedV1 {
|
|
|
95
95
|
*/
|
|
96
96
|
@Expose() @IsOptional() @IsBoolean()
|
|
97
97
|
addressPushedToFiado?: boolean;
|
|
98
|
+
|
|
99
|
+
/** Intento del wizard que originó la verificación; el consumidor descarta los que no son el vigente. */
|
|
100
|
+
@Expose() @IsOptional() @IsString() @IsNotEmpty()
|
|
101
|
+
attemptId?: string;
|
|
98
102
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsEnum, IsIn, IsISO8601, IsNotEmpty, IsOptional, IsString, Matches } from 'class-validator';
|
|
3
|
+
import { KycFlowEnum } from '../enums/KycFlowEnum';
|
|
4
|
+
import { KycProgressStageEnum } from '../enums/KycProgressStageEnum';
|
|
5
|
+
|
|
6
|
+
/** Avance de una verificación de Metamap (started, inputs_completed, expired) que publica `kyc-metamap-webhook`. */
|
|
7
|
+
export class KycVerificationProgressV1 {
|
|
8
|
+
@Expose() @IsIn(['KycVerificationProgressV1'])
|
|
9
|
+
eventType!: 'KycVerificationProgressV1';
|
|
10
|
+
|
|
11
|
+
@Expose() @IsEnum(KycProgressStageEnum)
|
|
12
|
+
stage!: KycProgressStageEnum;
|
|
13
|
+
|
|
14
|
+
@Expose() @IsEnum(KycFlowEnum)
|
|
15
|
+
flow!: KycFlowEnum;
|
|
16
|
+
|
|
17
|
+
@Expose() @IsString() @IsNotEmpty()
|
|
18
|
+
verificationId!: string;
|
|
19
|
+
|
|
20
|
+
@Expose() @IsString() @IsNotEmpty()
|
|
21
|
+
directoryId!: string;
|
|
22
|
+
|
|
23
|
+
/** Intento del wizard que originó la verificación; ausente en sesiones previas al despliegue. */
|
|
24
|
+
@Expose() @IsOptional() @IsString() @IsNotEmpty()
|
|
25
|
+
attemptId?: string;
|
|
26
|
+
|
|
27
|
+
/** ISO-8601 en UTC con `Z`, igual que los demás eventos de la cola. */
|
|
28
|
+
@Expose() @IsString() @IsISO8601({ strict: true })
|
|
29
|
+
@Matches(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/, {
|
|
30
|
+
message: 'occurredAt debe ser ISO-8601 en UTC con Z (ej. 2026-10-28T10:05:00.000Z)',
|
|
31
|
+
})
|
|
32
|
+
occurredAt!: string;
|
|
33
|
+
}
|
package/src/kyc/index.ts
CHANGED
|
@@ -5,6 +5,8 @@ export * from './enums/KycSubCheckStatusEnum';
|
|
|
5
5
|
export * from './enums/KycWatchlistStatusEnum';
|
|
6
6
|
export * from './enums/KycSubCheckNameEnum';
|
|
7
7
|
export * from './enums/ProofAddressStatusEnum';
|
|
8
|
+
export * from './enums/KycProgressStageEnum';
|
|
9
|
+
export * from './enums/KycFlowEnum';
|
|
8
10
|
|
|
9
11
|
// Sub-pasos descompuestos (SureKeep F2)
|
|
10
12
|
export * from './dtos/KycSubChecks';
|
|
@@ -26,3 +28,4 @@ export * from './dtos/responses/KycByDirectoryResponse';
|
|
|
26
28
|
export * from './events/KycVerificationChangedV1';
|
|
27
29
|
export * from './events/KycStepCompletedV1';
|
|
28
30
|
export * from './events/KycProofOfAddressCompletedV1';
|
|
31
|
+
export * from './events/KycVerificationProgressV1';
|
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
Max,
|
|
9
9
|
Min,
|
|
10
10
|
} from 'class-validator';
|
|
11
|
+
import { ProductCategoryEnum } from '../../../retailCatalog/enums/ProductCategoryEnum';
|
|
12
|
+
import { ProductTierEnum } from '../../../retailCatalog/enums/ProductTierEnum';
|
|
11
13
|
import { ClientLevelEnum } from '../../../loanScoring/enums/ClientLevelEnum';
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -106,4 +108,16 @@ export class OriginateLoanCreditRequest {
|
|
|
106
108
|
@IsOptional()
|
|
107
109
|
@IsString()
|
|
108
110
|
productSku?: string;
|
|
111
|
+
|
|
112
|
+
/** Tipo del equipo: resuelve promociones acotadas por tipo. */
|
|
113
|
+
@Expose()
|
|
114
|
+
@IsOptional()
|
|
115
|
+
@IsEnum(ProductCategoryEnum)
|
|
116
|
+
productCategory?: ProductCategoryEnum;
|
|
117
|
+
|
|
118
|
+
/** Gama del equipo: resuelve promociones acotadas por gama. */
|
|
119
|
+
@Expose()
|
|
120
|
+
@IsOptional()
|
|
121
|
+
@IsEnum(ProductTierEnum)
|
|
122
|
+
productTier?: ProductTierEnum;
|
|
109
123
|
}
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
ValidateNested,
|
|
11
11
|
} from 'class-validator';
|
|
12
12
|
import { CreditPlanLevelEnum } from '../../enums/CreditPlanLevelEnum';
|
|
13
|
+
import { ProductCategoryEnum } from '../../../retailCatalog/enums/ProductCategoryEnum';
|
|
14
|
+
import { ProductTierEnum } from '../../../retailCatalog/enums/ProductTierEnum';
|
|
13
15
|
import { PromotionEffectInput } from './PromotionEffectInput';
|
|
14
16
|
|
|
15
17
|
/**
|
|
@@ -49,6 +51,20 @@ export class CreatePromotionRequest {
|
|
|
49
51
|
@IsString({ each: true })
|
|
50
52
|
productSkus?: string[] | null;
|
|
51
53
|
|
|
54
|
+
/** Tipos de producto alcanzados; ausente o `null` = todos los tipos. */
|
|
55
|
+
@Expose()
|
|
56
|
+
@IsOptional()
|
|
57
|
+
@IsArray()
|
|
58
|
+
@IsEnum(ProductCategoryEnum, { each: true })
|
|
59
|
+
productCategories?: ProductCategoryEnum[] | null;
|
|
60
|
+
|
|
61
|
+
/** Gamas alcanzadas; ausente o `null` = todas las gamas. */
|
|
62
|
+
@Expose()
|
|
63
|
+
@IsOptional()
|
|
64
|
+
@IsArray()
|
|
65
|
+
@IsEnum(ProductTierEnum, { each: true })
|
|
66
|
+
tiers?: ProductTierEnum[] | null;
|
|
67
|
+
|
|
52
68
|
/** Tiendas alcanzadas. `null` o ausente = todas. */
|
|
53
69
|
@Expose()
|
|
54
70
|
@IsOptional()
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { ArrayMaxSize, IsArray, IsEnum, IsNotEmpty, IsOptional, IsString, ValidateNested } from 'class-validator';
|
|
3
|
+
import { PROMOTION_SKU_BATCH_MAX_ITEMS } from '../../constants/promotionSkuBatch';
|
|
4
|
+
import { CreditPlanLevelEnum } from '../../enums/CreditPlanLevelEnum';
|
|
5
|
+
import { PromotionSkuInput } from './PromotionSkuInput';
|
|
6
|
+
|
|
7
|
+
/** Body de `POST /private/promotions/promoted-skus` (M2M): SKUs del lote con promoción viva para el badge; hasta 100 SKUs. */
|
|
8
|
+
export class ListPromotedSkusRequest {
|
|
9
|
+
@Expose()
|
|
10
|
+
@IsString()
|
|
11
|
+
@IsNotEmpty()
|
|
12
|
+
storeId!: string;
|
|
13
|
+
|
|
14
|
+
/** Nivel del cliente si loan-scoring ya corrió. */
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@IsEnum(CreditPlanLevelEnum)
|
|
18
|
+
level?: CreditPlanLevelEnum;
|
|
19
|
+
|
|
20
|
+
/** Segmento del cliente si ya se resolvió. */
|
|
21
|
+
@Expose()
|
|
22
|
+
@IsOptional()
|
|
23
|
+
@IsString()
|
|
24
|
+
segmentId?: string;
|
|
25
|
+
|
|
26
|
+
@Expose()
|
|
27
|
+
@IsArray()
|
|
28
|
+
@ArrayMaxSize(PROMOTION_SKU_BATCH_MAX_ITEMS)
|
|
29
|
+
@ValidateNested({ each: true })
|
|
30
|
+
@Type(() => PromotionSkuInput)
|
|
31
|
+
items!: PromotionSkuInput[];
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Expose, Type } from 'class-transformer';
|
|
2
|
+
import { ArrayMaxSize, IsArray, IsEnum, IsNotEmpty, IsOptional, IsString, ValidateNested } from 'class-validator';
|
|
3
|
+
import { PROMOTION_SKU_BATCH_MAX_ITEMS } from '../../constants/promotionSkuBatch';
|
|
4
|
+
import { CreditPlanLevelEnum } from '../../enums/CreditPlanLevelEnum';
|
|
5
|
+
import { PromotionSkuInput } from './PromotionSkuInput';
|
|
6
|
+
|
|
7
|
+
/** Body de `POST /private/promotions/by-sku` (M2M): promociones vivas de cada SKU del lote; hasta 100 SKUs. */
|
|
8
|
+
export class ListSkuPromotionsRequest {
|
|
9
|
+
@Expose()
|
|
10
|
+
@IsString()
|
|
11
|
+
@IsNotEmpty()
|
|
12
|
+
storeId!: string;
|
|
13
|
+
|
|
14
|
+
/** Nivel del cliente si loan-scoring ya corrió. */
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@IsEnum(CreditPlanLevelEnum)
|
|
18
|
+
level?: CreditPlanLevelEnum;
|
|
19
|
+
|
|
20
|
+
/** Segmento del cliente si ya se resolvió. */
|
|
21
|
+
@Expose()
|
|
22
|
+
@IsOptional()
|
|
23
|
+
@IsString()
|
|
24
|
+
segmentId?: string;
|
|
25
|
+
|
|
26
|
+
@Expose()
|
|
27
|
+
@IsArray()
|
|
28
|
+
@ArrayMaxSize(PROMOTION_SKU_BATCH_MAX_ITEMS)
|
|
29
|
+
@ValidateNested({ each: true })
|
|
30
|
+
@Type(() => PromotionSkuInput)
|
|
31
|
+
items!: PromotionSkuInput[];
|
|
32
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsEnum, IsOptional, IsString } from 'class-validator';
|
|
3
|
+
import { ProductCategoryEnum } from '../../../retailCatalog/enums/ProductCategoryEnum';
|
|
4
|
+
import { ProductTierEnum } from '../../../retailCatalog/enums/ProductTierEnum';
|
|
5
|
+
|
|
6
|
+
/** Un SKU con su tipo y gama; sin ellos no cumple un alcance por tipo o por gama. */
|
|
7
|
+
export class PromotionSkuInput {
|
|
8
|
+
@Expose()
|
|
9
|
+
@IsString()
|
|
10
|
+
sku!: string;
|
|
11
|
+
|
|
12
|
+
@Expose()
|
|
13
|
+
@IsOptional()
|
|
14
|
+
@IsEnum(ProductCategoryEnum)
|
|
15
|
+
category?: ProductCategoryEnum;
|
|
16
|
+
|
|
17
|
+
@Expose()
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@IsEnum(ProductTierEnum)
|
|
20
|
+
tier?: ProductTierEnum;
|
|
21
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Expose } from 'class-transformer';
|
|
2
|
-
import { IsArray, IsInt, IsNumber, IsOptional, IsString, Max, Min } from 'class-validator';
|
|
2
|
+
import { IsArray, IsEnum, IsInt, IsNumber, IsOptional, IsString, Max, Min } from 'class-validator';
|
|
3
|
+
import { ProductCategoryEnum } from '../../../retailCatalog/enums/ProductCategoryEnum';
|
|
4
|
+
import { ProductTierEnum } from '../../../retailCatalog/enums/ProductTierEnum';
|
|
5
|
+
|
|
3
6
|
|
|
4
7
|
/**
|
|
5
8
|
* Body de POST /private/credit-plans/:planId/simulate y query de GET /credit-plans/:planId/simulator.
|
|
@@ -46,6 +49,18 @@ export class SimulateCreditPlanRequest {
|
|
|
46
49
|
@IsString()
|
|
47
50
|
productSku?: string;
|
|
48
51
|
|
|
52
|
+
/** Tipo del equipo. Sin él no se resuelven las promociones acotadas por tipo. */
|
|
53
|
+
@Expose()
|
|
54
|
+
@IsOptional()
|
|
55
|
+
@IsEnum(ProductCategoryEnum)
|
|
56
|
+
productCategory?: ProductCategoryEnum;
|
|
57
|
+
|
|
58
|
+
/** Gama del equipo. Sin ella no se resuelven las promociones acotadas por gama. */
|
|
59
|
+
@Expose()
|
|
60
|
+
@IsOptional()
|
|
61
|
+
@IsEnum(ProductTierEnum)
|
|
62
|
+
productTier?: ProductTierEnum;
|
|
63
|
+
|
|
49
64
|
/**
|
|
50
65
|
* Segmentos del cliente, los que devolvió `POST /private/segments/resolve`. Un arreglo vacío
|
|
51
66
|
* declara que el cliente no está en ninguno; ausente declara que el caller no lo consultó.
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
ValidateNested,
|
|
11
11
|
} from 'class-validator';
|
|
12
12
|
import { CreditPlanLevelEnum } from '../../enums/CreditPlanLevelEnum';
|
|
13
|
+
import { ProductCategoryEnum } from '../../../retailCatalog/enums/ProductCategoryEnum';
|
|
14
|
+
import { ProductTierEnum } from '../../../retailCatalog/enums/ProductTierEnum';
|
|
13
15
|
import { PromotionEffectInput } from './PromotionEffectInput';
|
|
14
16
|
|
|
15
17
|
/**
|
|
@@ -52,6 +54,20 @@ export class UpdatePromotionRequest {
|
|
|
52
54
|
@IsString({ each: true })
|
|
53
55
|
productSkus?: string[] | null;
|
|
54
56
|
|
|
57
|
+
/** Tipos de producto alcanzados; ausente o `null` = todos los tipos. */
|
|
58
|
+
@Expose()
|
|
59
|
+
@IsOptional()
|
|
60
|
+
@IsArray()
|
|
61
|
+
@IsEnum(ProductCategoryEnum, { each: true })
|
|
62
|
+
productCategories?: ProductCategoryEnum[] | null;
|
|
63
|
+
|
|
64
|
+
/** Gamas alcanzadas; ausente o `null` = todas las gamas. */
|
|
65
|
+
@Expose()
|
|
66
|
+
@IsOptional()
|
|
67
|
+
@IsArray()
|
|
68
|
+
@IsEnum(ProductTierEnum, { each: true })
|
|
69
|
+
tiers?: ProductTierEnum[] | null;
|
|
70
|
+
|
|
55
71
|
/** Tiendas alcanzadas. `null` o ausente = todas. */
|
|
56
72
|
@Expose()
|
|
57
73
|
@IsOptional()
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ProductCategoryEnum } from '../../../retailCatalog/enums/ProductCategoryEnum';
|
|
2
|
+
import { ProductTierEnum } from '../../../retailCatalog/enums/ProductTierEnum';
|
|
1
3
|
import { CreditPlanLevelEnum } from '../../enums/CreditPlanLevelEnum';
|
|
2
4
|
import { PromotionEffectKindEnum } from '../../enums/PromotionEffectKindEnum';
|
|
3
5
|
import { PromotionPhaseEnum } from '../../enums/PromotionPhaseEnum';
|
|
@@ -22,6 +24,10 @@ export interface PromotionResponse {
|
|
|
22
24
|
targetLevels: CreditPlanLevelEnum[];
|
|
23
25
|
/** `null` = alcanza a todos los productos. */
|
|
24
26
|
productSkus: string[] | null;
|
|
27
|
+
/** `null` = alcanza a todos los tipos de producto. */
|
|
28
|
+
productCategories: ProductCategoryEnum[] | null;
|
|
29
|
+
/** `null` = alcanza a todas las gamas. */
|
|
30
|
+
tiers: ProductTierEnum[] | null;
|
|
25
31
|
/** `null` = alcanza a todas las tiendas. Dimensión «Tienda / canal» del alcance. */
|
|
26
32
|
storeIds: string[] | null;
|
|
27
33
|
validFrom: string | null;
|
|
@@ -18,6 +18,9 @@ export * from './enums/SegmentColorSlotEnum';
|
|
|
18
18
|
export * from './enums/SegmentFilterIdEnum';
|
|
19
19
|
export * from './enums/PrepaymentMinimumModeEnum';
|
|
20
20
|
|
|
21
|
+
// Constantes
|
|
22
|
+
export * from './constants/promotionSkuBatch';
|
|
23
|
+
|
|
21
24
|
// Entity DTOs
|
|
22
25
|
export * from './dtos/CreditPlan';
|
|
23
26
|
export * from './dtos/PrepaymentMinimum';
|
|
@@ -50,6 +53,9 @@ export * from './dtos/requests/ChangeSegmentStatusRequest';
|
|
|
50
53
|
export * from './dtos/requests/ResolveCustomerSegmentsRequest';
|
|
51
54
|
export * from './dtos/requests/ComputeAmortizationScheduleRequest';
|
|
52
55
|
export * from './dtos/requests/ListSegmentCatalogQuery';
|
|
56
|
+
export * from './dtos/requests/PromotionSkuInput';
|
|
57
|
+
export * from './dtos/requests/ListPromotedSkusRequest';
|
|
58
|
+
export * from './dtos/requests/ListSkuPromotionsRequest';
|
|
53
59
|
|
|
54
60
|
// Response DTOs
|
|
55
61
|
export * from './dtos/responses/CreditPlanResponse';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { KycModalityEnum } from '../../retailCustomer/enums/KycModalityEnum';
|
|
2
|
+
import { KycAttemptStageEnum } from '../enums/KycAttemptStageEnum';
|
|
3
|
+
|
|
4
|
+
/** Avance del intento vigente de un flujo KYC, tal como lo devuelve `GET kyc/status`. */
|
|
5
|
+
export interface KycAttemptProgress {
|
|
6
|
+
attemptId: string;
|
|
7
|
+
modality: KycModalityEnum.CUSTOMER_LINK | KycModalityEnum.STORE_DEVICE;
|
|
8
|
+
/** `shortUrl` del QR; ausente en `STORE_DEVICE`. */
|
|
9
|
+
link?: string;
|
|
10
|
+
stage: KycAttemptStageEnum;
|
|
11
|
+
/** Cuándo entró a la etapa actual, ISO-8601 UTC. */
|
|
12
|
+
stageAt: string;
|
|
13
|
+
/** Fecha del prepare, ISO-8601 UTC; el front mide contra ella el tope de 25 min. */
|
|
14
|
+
attemptStartedAt: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { KycAttemptProgress } from './KycAttemptProgress';
|
|
2
|
+
|
|
3
|
+
/** Bloque `progress` de `GET kyc/status`: el intento vigente de cada flujo, o `null` si no hay. */
|
|
4
|
+
export interface KycStatusProgress {
|
|
5
|
+
identity: KycAttemptProgress | null;
|
|
6
|
+
facematch: KycAttemptProgress | null;
|
|
7
|
+
proofOfAddress: KycAttemptProgress | null;
|
|
8
|
+
}
|
|
@@ -53,6 +53,8 @@ export interface KycSdkMetadata {
|
|
|
53
53
|
* domicilio del documento de identidad: `kyc-metamap-webhook` rutea por este campo.
|
|
54
54
|
*/
|
|
55
55
|
kycStep?: KycMetadataStepEnum;
|
|
56
|
+
/** Intento del wizard que originó la verificación; el webhook lo copia a cada evento. */
|
|
57
|
+
attemptId?: string;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
/**
|
|
@@ -98,6 +100,8 @@ export interface KycPrepareResponse {
|
|
|
98
100
|
* (`KycManualRequest`). Por eso el tipo se estrecha a las dos que el SDK puede ejecutar.
|
|
99
101
|
*/
|
|
100
102
|
modality: KycModalityEnum.CUSTOMER_LINK | KycModalityEnum.STORE_DEVICE;
|
|
103
|
+
/** Intento que abrió este prepare; ausente cuando no se crea intento: alreadyVerified o bypass de dev. */
|
|
104
|
+
attemptId?: string;
|
|
101
105
|
/** STORE_DEVICE — clientId de la cuenta Metamap (mismo valor en prod y dev). */
|
|
102
106
|
clientId?: string;
|
|
103
107
|
/** STORE_DEVICE — flow de Metamap por país; sale de la configuración del wizard. */
|
|
@@ -14,6 +14,8 @@ import { KycModalityEnum } from '../../../retailCustomer/enums/KycModalityEnum';
|
|
|
14
14
|
export interface ProofOfAddressPrepareResponse {
|
|
15
15
|
/** `MANUAL` no es una modalidad de `prepare`: la captura manual es su propio endpoint. */
|
|
16
16
|
modality: KycModalityEnum.CUSTOMER_LINK | KycModalityEnum.STORE_DEVICE;
|
|
17
|
+
/** Intento que abrió este prepare; ausente cuando alreadyHasAddress. */
|
|
18
|
+
attemptId?: string;
|
|
17
19
|
/** STORE_DEVICE — clientId de la cuenta Metamap (mismo valor en prod y dev). */
|
|
18
20
|
clientId?: string;
|
|
19
21
|
/** STORE_DEVICE — flow de Metamap del comprobante de domicilio. */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Etapa del intento vigente de un flujo KYC del wizard; el rango de monotonía vive en el wizard. */
|
|
2
|
+
export enum KycAttemptStageEnum {
|
|
3
|
+
AWAITING_START = 'AWAITING_START',
|
|
4
|
+
STARTED = 'STARTED',
|
|
5
|
+
INPUTS_COMPLETED = 'INPUTS_COMPLETED',
|
|
6
|
+
EXPIRED = 'EXPIRED',
|
|
7
|
+
RESULT = 'RESULT',
|
|
8
|
+
}
|
|
@@ -36,6 +36,7 @@ export * from './enums/LinePaymentTypeEnum';
|
|
|
36
36
|
export * from './enums/WizardLineRoleEnum';
|
|
37
37
|
export * from './enums/EmailStateEnum';
|
|
38
38
|
export * from './enums/SaleChannelEnum';
|
|
39
|
+
export * from './enums/KycAttemptStageEnum';
|
|
39
40
|
|
|
40
41
|
// DTOs anidados
|
|
41
42
|
export * from './dtos/WizardConsents';
|
|
@@ -62,6 +63,8 @@ export * from './dtos/WizardReservedLine';
|
|
|
62
63
|
export * from './dtos/WizardGiftLine';
|
|
63
64
|
export * from './dtos/SaleLine';
|
|
64
65
|
export * from './dtos/AccessorySaleLine';
|
|
66
|
+
export * from './dtos/KycAttemptProgress';
|
|
67
|
+
export * from './dtos/KycStatusProgress';
|
|
65
68
|
|
|
66
69
|
// Entidades principales (shapes de estado/persistencia — planas)
|
|
67
70
|
export * from './dtos/WizardSession';
|