@fiado/type-kit 3.214.0 → 3.215.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/benefitCenter/enums/BenefitFlowEnum.d.ts +11 -0
- package/bin/benefitCenter/enums/BenefitFlowEnum.js +15 -0
- package/bin/kyc/dtos/KycAddress.d.ts +24 -0
- package/bin/kyc/dtos/KycAddress.js +85 -0
- package/bin/kyc/events/KycVerificationChangedV1.d.ts +7 -5
- package/bin/kyc/events/KycVerificationChangedV1.js +3 -3
- package/bin/kyc/index.d.ts +1 -0
- package/bin/kyc/index.js +2 -0
- package/bin/loanConfig/enums/ModifiableByRoleEnum.d.ts +11 -0
- package/bin/loanConfig/enums/ModifiableByRoleEnum.js +15 -0
- package/bin/places/dtos/CashInFeeDto.d.ts +17 -0
- package/bin/places/dtos/CashInFeeDto.js +12 -0
- package/bin/platformRbac/dtos/ResendOtpRequest.d.ts +22 -0
- package/bin/platformRbac/dtos/ResendOtpRequest.js +36 -0
- package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.d.ts +11 -0
- package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.js +36 -0
- package/package.json +1 -1
- package/src/kyc/dtos/KycAddress.ts +46 -0
- package/src/kyc/events/KycVerificationChangedV1.ts +8 -6
- package/src/kyc/index.ts +3 -0
- package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.d.ts +0 -11
- package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.js +0 -46
- package/bin/loanCredit/enums/ClientLevelEnum.d.ts +0 -11
- package/bin/loanCredit/enums/ClientLevelEnum.js +0 -15
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum BenefitFlowEnum {
|
|
2
|
+
TOPUPS = "TOPUPS",
|
|
3
|
+
BILL_PAYMENT = "BILL_PAYMENT",
|
|
4
|
+
CREDIT = "CREDIT",
|
|
5
|
+
INSURANCE = "INSURANCE",
|
|
6
|
+
DONATION = "DONATION",
|
|
7
|
+
PHARMACY = "PHARMACY",
|
|
8
|
+
REMITTANCE = "REMITTANCE",
|
|
9
|
+
/** Fondeo de wallet PCF con efectivo via provider externo (Equality/Passport, OpenPay, …) — spec 13. */
|
|
10
|
+
WALLET_FUNDING = "WALLET_FUNDING"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BenefitFlowEnum = void 0;
|
|
4
|
+
var BenefitFlowEnum;
|
|
5
|
+
(function (BenefitFlowEnum) {
|
|
6
|
+
BenefitFlowEnum["TOPUPS"] = "TOPUPS";
|
|
7
|
+
BenefitFlowEnum["BILL_PAYMENT"] = "BILL_PAYMENT";
|
|
8
|
+
BenefitFlowEnum["CREDIT"] = "CREDIT";
|
|
9
|
+
BenefitFlowEnum["INSURANCE"] = "INSURANCE";
|
|
10
|
+
BenefitFlowEnum["DONATION"] = "DONATION";
|
|
11
|
+
BenefitFlowEnum["PHARMACY"] = "PHARMACY";
|
|
12
|
+
BenefitFlowEnum["REMITTANCE"] = "REMITTANCE";
|
|
13
|
+
/** Fondeo de wallet PCF con efectivo via provider externo (Equality/Passport, OpenPay, …) — spec 13. */
|
|
14
|
+
BenefitFlowEnum["WALLET_FUNDING"] = "WALLET_FUNDING";
|
|
15
|
+
})(BenefitFlowEnum || (exports.BenefitFlowEnum = BenefitFlowEnum = {}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domicilio del INE ya normalizado por `places-business` (AWS Location), listo para que el consumidor
|
|
3
|
+
* arme su `AddressBase` local. Mapea el `AddressCandidate` de places a un shape con `@Expose`, porque
|
|
4
|
+
* el consumer parsea el evento con `excludeExtraneousValues` y descartaría todo campo sin exponer.
|
|
5
|
+
*
|
|
6
|
+
* Todos los campos son opcionales: el domicilio es best-effort (la OCR del INE + el geocoding pueden
|
|
7
|
+
* no resolver todo). ⚠️ PII: nunca loguear esta estructura.
|
|
8
|
+
*/
|
|
9
|
+
export declare class KycAddress {
|
|
10
|
+
/** Etiqueta completa legible (equivalente a Place.Label). */
|
|
11
|
+
label?: string;
|
|
12
|
+
street?: string;
|
|
13
|
+
/** Número exterior (Place.AddressNumber). */
|
|
14
|
+
addressNumber?: string;
|
|
15
|
+
neighborhood?: string;
|
|
16
|
+
municipality?: string;
|
|
17
|
+
/** Estado/provincia (Place.Region). */
|
|
18
|
+
region?: string;
|
|
19
|
+
postalCode?: string;
|
|
20
|
+
/** ISO3 del país (Place.Country). */
|
|
21
|
+
country?: string;
|
|
22
|
+
latitude?: number;
|
|
23
|
+
longitude?: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.KycAddress = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Domicilio del INE ya normalizado por `places-business` (AWS Location), listo para que el consumidor
|
|
17
|
+
* arme su `AddressBase` local. Mapea el `AddressCandidate` de places a un shape con `@Expose`, porque
|
|
18
|
+
* el consumer parsea el evento con `excludeExtraneousValues` y descartaría todo campo sin exponer.
|
|
19
|
+
*
|
|
20
|
+
* Todos los campos son opcionales: el domicilio es best-effort (la OCR del INE + el geocoding pueden
|
|
21
|
+
* no resolver todo). ⚠️ PII: nunca loguear esta estructura.
|
|
22
|
+
*/
|
|
23
|
+
class KycAddress {
|
|
24
|
+
}
|
|
25
|
+
exports.KycAddress = KycAddress;
|
|
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
|
+
], KycAddress.prototype, "label", 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
|
+
], KycAddress.prototype, "street", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_transformer_1.Expose)(),
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], KycAddress.prototype, "addressNumber", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_transformer_1.Expose)(),
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
(0, class_validator_1.IsString)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], KycAddress.prototype, "neighborhood", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_transformer_1.Expose)(),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
(0, class_validator_1.IsString)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], KycAddress.prototype, "municipality", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_transformer_1.Expose)(),
|
|
58
|
+
(0, class_validator_1.IsOptional)(),
|
|
59
|
+
(0, class_validator_1.IsString)(),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], KycAddress.prototype, "region", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_transformer_1.Expose)(),
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
(0, class_validator_1.IsString)(),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], KycAddress.prototype, "postalCode", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_transformer_1.Expose)(),
|
|
70
|
+
(0, class_validator_1.IsOptional)(),
|
|
71
|
+
(0, class_validator_1.IsString)(),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], KycAddress.prototype, "country", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_transformer_1.Expose)(),
|
|
76
|
+
(0, class_validator_1.IsOptional)(),
|
|
77
|
+
(0, class_validator_1.IsNumber)(),
|
|
78
|
+
__metadata("design:type", Number)
|
|
79
|
+
], KycAddress.prototype, "latitude", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, class_transformer_1.Expose)(),
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
(0, class_validator_1.IsNumber)(),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], KycAddress.prototype, "longitude", void 0);
|
|
@@ -2,7 +2,7 @@ import { IdentificationDocumentStatus } from '../../identity/enums/Identificatio
|
|
|
2
2
|
import { KycVerificationStatusEnum } from '../enums/KycVerificationStatusEnum';
|
|
3
3
|
import { KycSubChecks } from '../dtos/KycSubChecks';
|
|
4
4
|
import { KycPersonData } from '../dtos/responses/KycPersonData';
|
|
5
|
-
import {
|
|
5
|
+
import { KycAddress } from '../dtos/KycAddress';
|
|
6
6
|
/**
|
|
7
7
|
* Cambio terminal de una verificación KYC, tal como lo publica `kyc-metamap-webhook` directo en
|
|
8
8
|
* `RetailKycInboundQueue` (el webhook manda un `SendMessage` cuando la verificación pasa a COMPLETED).
|
|
@@ -53,9 +53,11 @@ export declare class KycVerificationChangedV1 {
|
|
|
53
53
|
*/
|
|
54
54
|
person?: KycPersonData;
|
|
55
55
|
/**
|
|
56
|
-
* Domicilio del INE ya
|
|
57
|
-
* `
|
|
58
|
-
*
|
|
56
|
+
* Domicilio del INE ya normalizado por `places-business` (paso 02e). El webhook manda el resultado
|
|
57
|
+
* del geocoding (`KycAddress`); el CONSUMIDOR (wizard) arma con esto su `AddressBase` local, porque
|
|
58
|
+
* ese objeto lleva contexto de SureKeep (tenant, tipo) que el webhook no tiene. OPCIONAL y aditivo:
|
|
59
|
+
* si la OCR no trae domicilio o `places` no resuelve, viaja ausente y el upsert corre sin dirección.
|
|
60
|
+
* ⚠️ PII: nunca loguear.
|
|
59
61
|
*/
|
|
60
|
-
address?:
|
|
62
|
+
address?: KycAddress;
|
|
61
63
|
}
|
|
@@ -16,7 +16,7 @@ const IdentificationDocumentStatus_1 = require("../../identity/enums/Identificat
|
|
|
16
16
|
const KycVerificationStatusEnum_1 = require("../enums/KycVerificationStatusEnum");
|
|
17
17
|
const KycSubChecks_1 = require("../dtos/KycSubChecks");
|
|
18
18
|
const KycPersonData_1 = require("../dtos/responses/KycPersonData");
|
|
19
|
-
const
|
|
19
|
+
const KycAddress_1 = require("../dtos/KycAddress");
|
|
20
20
|
/**
|
|
21
21
|
* Cambio terminal de una verificación KYC, tal como lo publica `kyc-metamap-webhook` directo en
|
|
22
22
|
* `RetailKycInboundQueue` (el webhook manda un `SendMessage` cuando la verificación pasa a COMPLETED).
|
|
@@ -95,6 +95,6 @@ __decorate([
|
|
|
95
95
|
(0, class_transformer_1.Expose)(),
|
|
96
96
|
(0, class_validator_1.IsOptional)(),
|
|
97
97
|
(0, class_validator_1.ValidateNested)(),
|
|
98
|
-
(0, class_transformer_1.Type)(() =>
|
|
99
|
-
__metadata("design:type",
|
|
98
|
+
(0, class_transformer_1.Type)(() => KycAddress_1.KycAddress),
|
|
99
|
+
__metadata("design:type", KycAddress_1.KycAddress)
|
|
100
100
|
], KycVerificationChangedV1.prototype, "address", void 0);
|
package/bin/kyc/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './enums/KycVerificationStatusEnum';
|
|
|
2
2
|
export * from './enums/KycSubCheckStatusEnum';
|
|
3
3
|
export * from './enums/KycWatchlistStatusEnum';
|
|
4
4
|
export * from './dtos/KycSubChecks';
|
|
5
|
+
export * from './dtos/KycAddress';
|
|
5
6
|
export * from './dtos/responses/KycPersonData';
|
|
6
7
|
export * from './dtos/responses/KycByDirectoryResponse';
|
|
7
8
|
export * from './events/KycVerificationChangedV1';
|
package/bin/kyc/index.js
CHANGED
|
@@ -21,6 +21,8 @@ __exportStar(require("./enums/KycSubCheckStatusEnum"), exports);
|
|
|
21
21
|
__exportStar(require("./enums/KycWatchlistStatusEnum"), exports);
|
|
22
22
|
// Sub-pasos descompuestos (SureKeep F2)
|
|
23
23
|
__exportStar(require("./dtos/KycSubChecks"), exports);
|
|
24
|
+
// Domicilio del INE normalizado por places (SureKeep F2)
|
|
25
|
+
__exportStar(require("./dtos/KycAddress"), exports);
|
|
24
26
|
// Response DTOs
|
|
25
27
|
__exportStar(require("./dtos/responses/KycPersonData"), exports);
|
|
26
28
|
__exportStar(require("./dtos/responses/KycByDirectoryResponse"), exports);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rol RBAC mínimo que puede modificar un parámetro (RBAC a nivel de parámetro, modelo-datos §8).
|
|
3
|
+
* `retailer_admin` = "Admin VentasLuga" de M6 §8. Valores = identificadores de rol de RBAC F0.
|
|
4
|
+
* TD-004: confirmar mapeo super_admin ↔ platform_super_admin con el naming real de F0.
|
|
5
|
+
* @enum {string}
|
|
6
|
+
*/
|
|
7
|
+
export declare enum ModifiableByRoleEnum {
|
|
8
|
+
SUPER_ADMIN = "super_admin",
|
|
9
|
+
SOFOM_ADMIN = "sofom_admin",
|
|
10
|
+
RETAILER_ADMIN = "retailer_admin"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModifiableByRoleEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Rol RBAC mínimo que puede modificar un parámetro (RBAC a nivel de parámetro, modelo-datos §8).
|
|
6
|
+
* `retailer_admin` = "Admin VentasLuga" de M6 §8. Valores = identificadores de rol de RBAC F0.
|
|
7
|
+
* TD-004: confirmar mapeo super_admin ↔ platform_super_admin con el naming real de F0.
|
|
8
|
+
* @enum {string}
|
|
9
|
+
*/
|
|
10
|
+
var ModifiableByRoleEnum;
|
|
11
|
+
(function (ModifiableByRoleEnum) {
|
|
12
|
+
ModifiableByRoleEnum["SUPER_ADMIN"] = "super_admin";
|
|
13
|
+
ModifiableByRoleEnum["SOFOM_ADMIN"] = "sofom_admin";
|
|
14
|
+
ModifiableByRoleEnum["RETAILER_ADMIN"] = "retailer_admin";
|
|
15
|
+
})(ModifiableByRoleEnum || (exports.ModifiableByRoleEnum = ModifiableByRoleEnum = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CurrencyId } from '../../currency/enums/CurrencyId';
|
|
2
|
+
/**
|
|
3
|
+
* Comisión que cobra un punto de cash-in (lo que el lambda MUESTRA, no cobra).
|
|
4
|
+
* - GreenDot (US): representativo por cadena → `fixed` + `cap` (cada tienda cobra hasta el tope).
|
|
5
|
+
* - Passport (MX): por red → `fixed` + `percentage`.
|
|
6
|
+
* Response DTO — sin decoradores de validación.
|
|
7
|
+
*/
|
|
8
|
+
export declare class CashInFeeDto {
|
|
9
|
+
/** Comisión fija, en la moneda del país. */
|
|
10
|
+
fixed?: number;
|
|
11
|
+
/** Porcentaje del monto depositado (0–100). */
|
|
12
|
+
percentage?: number;
|
|
13
|
+
/** Tope máximo de comisión (GreenDot: el asociado cobra hasta este cap). */
|
|
14
|
+
cap?: number;
|
|
15
|
+
/** Moneda del fee: USD (GreenDot) | MXN (Passport). */
|
|
16
|
+
currency: CurrencyId;
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CashInFeeDto = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Comisión que cobra un punto de cash-in (lo que el lambda MUESTRA, no cobra).
|
|
6
|
+
* - GreenDot (US): representativo por cadena → `fixed` + `cap` (cada tienda cobra hasta el tope).
|
|
7
|
+
* - Passport (MX): por red → `fixed` + `percentage`.
|
|
8
|
+
* Response DTO — sin decoradores de validación.
|
|
9
|
+
*/
|
|
10
|
+
class CashInFeeDto {
|
|
11
|
+
}
|
|
12
|
+
exports.CashInFeeDto = CashInFeeDto;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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.ResendOtpRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Body del POST /auth/resend-otp (público, anónimo). DEC-RBAC-054.
|
|
17
|
+
* Reenvía el OTP del login re-disparando el challenge real CUSTOM_AUTH (EMAIL_OTP) para la
|
|
18
|
+
* identidad SIN password. `tenantId` obligatorio (DEC-064 — el picker ya lo resolvió, NO "solo email").
|
|
19
|
+
* El email se normaliza lowercase server-side. Postura anti-enumeración: respuesta 200 genérica
|
|
20
|
+
* siempre, sin filtrar existencia (ver AuthLoginManager.resendChallengeOtp).
|
|
21
|
+
*/
|
|
22
|
+
class ResendOtpRequest {
|
|
23
|
+
}
|
|
24
|
+
exports.ResendOtpRequest = ResendOtpRequest;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsEmail)(),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ResendOtpRequest.prototype, "email", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ResendOtpRequest.prototype, "tenantId", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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.ResendSelfRegisterOtpRequest = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Body del POST /self-register/resend-otp (público, anónimo). DEC-RBAC-054.
|
|
17
|
+
* Re-envía el OTP del autoregistro (mecanismo messages-business, NO Cognito) tras validar un
|
|
18
|
+
* `pending` existente. Misma postura anti-enumeración del start. El email se normaliza lowercase
|
|
19
|
+
* server-side. DTO propio por endpoint (NO reusa SelfRegisterStartRequest, que exige roleId/scope/
|
|
20
|
+
* scopeRef, ni SelfRegisterVerifyOtpRequest, que exige otp).
|
|
21
|
+
*/
|
|
22
|
+
class ResendSelfRegisterOtpRequest {
|
|
23
|
+
}
|
|
24
|
+
exports.ResendSelfRegisterOtpRequest = ResendSelfRegisterOtpRequest;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ResendSelfRegisterOtpRequest.prototype, "tenantId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsEmail)(),
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ResendSelfRegisterOtpRequest.prototype, "email", void 0);
|
package/package.json
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Expose } from 'class-transformer';
|
|
2
|
+
import { IsNumber, IsOptional, IsString } from 'class-validator';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Domicilio del INE ya normalizado por `places-business` (AWS Location), listo para que el consumidor
|
|
6
|
+
* arme su `AddressBase` local. Mapea el `AddressCandidate` de places a un shape con `@Expose`, porque
|
|
7
|
+
* el consumer parsea el evento con `excludeExtraneousValues` y descartaría todo campo sin exponer.
|
|
8
|
+
*
|
|
9
|
+
* Todos los campos son opcionales: el domicilio es best-effort (la OCR del INE + el geocoding pueden
|
|
10
|
+
* no resolver todo). ⚠️ PII: nunca loguear esta estructura.
|
|
11
|
+
*/
|
|
12
|
+
export class KycAddress {
|
|
13
|
+
/** Etiqueta completa legible (equivalente a Place.Label). */
|
|
14
|
+
@Expose() @IsOptional() @IsString()
|
|
15
|
+
label?: string;
|
|
16
|
+
|
|
17
|
+
@Expose() @IsOptional() @IsString()
|
|
18
|
+
street?: string;
|
|
19
|
+
|
|
20
|
+
/** Número exterior (Place.AddressNumber). */
|
|
21
|
+
@Expose() @IsOptional() @IsString()
|
|
22
|
+
addressNumber?: string;
|
|
23
|
+
|
|
24
|
+
@Expose() @IsOptional() @IsString()
|
|
25
|
+
neighborhood?: string;
|
|
26
|
+
|
|
27
|
+
@Expose() @IsOptional() @IsString()
|
|
28
|
+
municipality?: string;
|
|
29
|
+
|
|
30
|
+
/** Estado/provincia (Place.Region). */
|
|
31
|
+
@Expose() @IsOptional() @IsString()
|
|
32
|
+
region?: string;
|
|
33
|
+
|
|
34
|
+
@Expose() @IsOptional() @IsString()
|
|
35
|
+
postalCode?: string;
|
|
36
|
+
|
|
37
|
+
/** ISO3 del país (Place.Country). */
|
|
38
|
+
@Expose() @IsOptional() @IsString()
|
|
39
|
+
country?: string;
|
|
40
|
+
|
|
41
|
+
@Expose() @IsOptional() @IsNumber()
|
|
42
|
+
latitude?: number;
|
|
43
|
+
|
|
44
|
+
@Expose() @IsOptional() @IsNumber()
|
|
45
|
+
longitude?: number;
|
|
46
|
+
}
|
|
@@ -4,7 +4,7 @@ import { IdentificationDocumentStatus } from '../../identity/enums/Identificatio
|
|
|
4
4
|
import { KycVerificationStatusEnum } from '../enums/KycVerificationStatusEnum';
|
|
5
5
|
import { KycSubChecks } from '../dtos/KycSubChecks';
|
|
6
6
|
import { KycPersonData } from '../dtos/responses/KycPersonData';
|
|
7
|
-
import {
|
|
7
|
+
import { KycAddress } from '../dtos/KycAddress';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Cambio terminal de una verificación KYC, tal como lo publica `kyc-metamap-webhook` directo en
|
|
@@ -74,10 +74,12 @@ export class KycVerificationChangedV1 {
|
|
|
74
74
|
person?: KycPersonData;
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* Domicilio del INE ya
|
|
78
|
-
* `
|
|
79
|
-
*
|
|
77
|
+
* Domicilio del INE ya normalizado por `places-business` (paso 02e). El webhook manda el resultado
|
|
78
|
+
* del geocoding (`KycAddress`); el CONSUMIDOR (wizard) arma con esto su `AddressBase` local, porque
|
|
79
|
+
* ese objeto lleva contexto de SureKeep (tenant, tipo) que el webhook no tiene. OPCIONAL y aditivo:
|
|
80
|
+
* si la OCR no trae domicilio o `places` no resuelve, viaja ausente y el upsert corre sin dirección.
|
|
81
|
+
* ⚠️ PII: nunca loguear.
|
|
80
82
|
*/
|
|
81
|
-
@Expose() @IsOptional() @ValidateNested() @Type(() =>
|
|
82
|
-
address?:
|
|
83
|
+
@Expose() @IsOptional() @ValidateNested() @Type(() => KycAddress)
|
|
84
|
+
address?: KycAddress;
|
|
83
85
|
}
|
package/src/kyc/index.ts
CHANGED
|
@@ -7,6 +7,9 @@ export * from './enums/KycWatchlistStatusEnum';
|
|
|
7
7
|
// Sub-pasos descompuestos (SureKeep F2)
|
|
8
8
|
export * from './dtos/KycSubChecks';
|
|
9
9
|
|
|
10
|
+
// Domicilio del INE normalizado por places (SureKeep F2)
|
|
11
|
+
export * from './dtos/KycAddress';
|
|
12
|
+
|
|
10
13
|
// Response DTOs
|
|
11
14
|
export * from './dtos/responses/KycPersonData';
|
|
12
15
|
export * from './dtos/responses/KycByDirectoryResponse';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Body de PUT /credits/:creditId/checklist (loan-credit-business). Marca condiciones de activación
|
|
3
|
-
* cumplidas. Solo se mandan las que cambian; en F3 las marcarán los flujos de firma de contrato
|
|
4
|
-
* (`downPayment` + `contractSigned`) y de enrolamiento MDM (`imeiEnrolled` + `lockVerified`).
|
|
5
|
-
*/
|
|
6
|
-
export declare class UpdateActivationChecklistRequest {
|
|
7
|
-
downPayment?: boolean;
|
|
8
|
-
contractSigned?: boolean;
|
|
9
|
-
imeiEnrolled?: boolean;
|
|
10
|
-
lockVerified?: boolean;
|
|
11
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
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.UpdateActivationChecklistRequest = void 0;
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
/**
|
|
16
|
-
* Body de PUT /credits/:creditId/checklist (loan-credit-business). Marca condiciones de activación
|
|
17
|
-
* cumplidas. Solo se mandan las que cambian; en F3 las marcarán los flujos de firma de contrato
|
|
18
|
-
* (`downPayment` + `contractSigned`) y de enrolamiento MDM (`imeiEnrolled` + `lockVerified`).
|
|
19
|
-
*/
|
|
20
|
-
class UpdateActivationChecklistRequest {
|
|
21
|
-
}
|
|
22
|
-
exports.UpdateActivationChecklistRequest = UpdateActivationChecklistRequest;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, class_transformer_1.Expose)(),
|
|
25
|
-
(0, class_validator_1.IsOptional)(),
|
|
26
|
-
(0, class_validator_1.IsBoolean)(),
|
|
27
|
-
__metadata("design:type", Boolean)
|
|
28
|
-
], UpdateActivationChecklistRequest.prototype, "downPayment", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, class_transformer_1.Expose)(),
|
|
31
|
-
(0, class_validator_1.IsOptional)(),
|
|
32
|
-
(0, class_validator_1.IsBoolean)(),
|
|
33
|
-
__metadata("design:type", Boolean)
|
|
34
|
-
], UpdateActivationChecklistRequest.prototype, "contractSigned", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, class_transformer_1.Expose)(),
|
|
37
|
-
(0, class_validator_1.IsOptional)(),
|
|
38
|
-
(0, class_validator_1.IsBoolean)(),
|
|
39
|
-
__metadata("design:type", Boolean)
|
|
40
|
-
], UpdateActivationChecklistRequest.prototype, "imeiEnrolled", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, class_transformer_1.Expose)(),
|
|
43
|
-
(0, class_validator_1.IsOptional)(),
|
|
44
|
-
(0, class_validator_1.IsBoolean)(),
|
|
45
|
-
__metadata("design:type", Boolean)
|
|
46
|
-
], UpdateActivationChecklistRequest.prototype, "lockVerified", void 0);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Nivel del cliente según su SCI (M7/05_MOTOR §3.2): 21-60 Bronce · 61-80 Plata · 81-100 Oro.
|
|
3
|
-
* Distinto de `CreditPlanLevelEnum` de loanOfferings (que además tiene `ALL` para planes):
|
|
4
|
-
* un CLIENTE nunca es `ALL`.
|
|
5
|
-
* @enum {string}
|
|
6
|
-
*/
|
|
7
|
-
export declare enum ClientLevelEnum {
|
|
8
|
-
BRONZE = "BRONZE",
|
|
9
|
-
SILVER = "SILVER",
|
|
10
|
-
GOLD = "GOLD"
|
|
11
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ClientLevelEnum = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Nivel del cliente según su SCI (M7/05_MOTOR §3.2): 21-60 Bronce · 61-80 Plata · 81-100 Oro.
|
|
6
|
-
* Distinto de `CreditPlanLevelEnum` de loanOfferings (que además tiene `ALL` para planes):
|
|
7
|
-
* un CLIENTE nunca es `ALL`.
|
|
8
|
-
* @enum {string}
|
|
9
|
-
*/
|
|
10
|
-
var ClientLevelEnum;
|
|
11
|
-
(function (ClientLevelEnum) {
|
|
12
|
-
ClientLevelEnum["BRONZE"] = "BRONZE";
|
|
13
|
-
ClientLevelEnum["SILVER"] = "SILVER";
|
|
14
|
-
ClientLevelEnum["GOLD"] = "GOLD";
|
|
15
|
-
})(ClientLevelEnum || (exports.ClientLevelEnum = ClientLevelEnum = {}));
|